Posts

Showing posts from February, 2014

graph algorithms: reachability from adjacency map -

I have a dependency graph, which I used to call map & lt; Node, collection & lt; Node & gt; & Gt; (in Java-Speech, or f (node ​​n) - & gt; Collection [node] as a function; it is a given node n Mapping from is a collection of nodes which depends on n ) graph is potentially cyclic *. Looking at the list of nodes list , I would like to solve it: i.e. map & lt; Node, set & lt; Node & gt; & Gt; ; Example: Example For, (x -> y stands for node y depends on node x) n1 - & gt; N 2 N 2 - & gt; N3 N3 - & gt; N1N3 - & gt; N5N4 - & gt; N2N4 - & gt; N5 N6 - & gt; N1N7 - & gt; N1 presented as adjacent map {n1: [n2], n2: [n3], n3: [n1, n5], n4: [n2, n5] Can be done], N6: [N1], N7: [N1]} . If the badlist = [n4, n5, n1] then badmap = {n4: [n4, n2, n3, n1, n5], n5: [n5] ], N1: [n1, n2, n3, n5]} . Graph Algorithms rush as well as references to the online search, so if I can point to an efficient...

c# - Reading/preserving a PixelFormat.Format48bppRgb PNG Bitmap in .NET? -

I am able to create the Format48bppRgb .png file (with some internal HDR data) using the following C # code: / P> Bitmap BMP16 = New Bitmap (_viewer.Width, _viewer.Height, System.Downings.imaging.pixelformat.format 48bpRGB); System.Drawing.Imaging.BitmapData data16 = bmp16.LockBits (_viewer.ClientRectangle, System.Drawing.Imaging.ImageLockMode.WriteOnly, bmp16.PixelFormat); Unsafe {(Populated BMP 16)} BMP 16.Save ("C: /temp/48bpp.png", System.Downing.imaging.imageformat.png); ImageMagik (and other apps) verify that this is actually a 16bpp image: C: \ Temp & gt; 48bpp.png 48bpp.png PNG 1022x1125 Identify 1022x1125 + 0 + 0 Direct Class 16-bit 900.963kb However, in reading PNG I was frustrated to find out, To change it was changed to Format32bppRgb: Bitmap BMP = new bitmap ("c: /temp/48bpp.png", incorrect); String information = string.format ("pixel format: {0}", BMP pixel format); ... Given that PNG codec can write a Format 48bppRgb...

bash - how to remove only ext3 here in unix? filename.ext1.ext2.ext3 -

Example file: filename.ext1.ext2.ext3 How to remove only ext3 in Unix Bash shell under sun solar? In all directories: find -name "* .ext3" | | MV '{}'? You can pipe output to a find command When reading while typing with the loop spaces, the file name will also read correctly. Do not use the for the file in $ (find ...) creation is very disabled (search must be completed before the loop starts, problems with files with spaces on its name , And it can overload the command line buffer which will be without a little signal. You can also create $ [var% name} % means the small right filter, with the matching globe, the right of an environment variable A single % stands for the minimum possible amount. One double %% corresponds to the highest amount. # and ## for the left side of the string. Also be careful to use quotation marks on the name of the blank space on your name. / P> .- type f -name "* .ext3" | When the file is rea...

datetime - MySQL: Add 30 days to a value in the table -

I am trying to use the ADDDATE function on a value in the table. addOns = ADDDATE (addOns, INTERVAL 30) is addOns where I can not add 30 days where I store datetime / Can i Updated credit SET addOns = ADDDATE (addOns, INTERVAL 30 DAY) - or updated credit SET addOns = ADDDATE (addOns, 30) / Code>

javascript - Is it possible to take data from one web-page and generate another(webpage to be printed) without any interference of server? -

I am trying to prepare a report from that data to take and print data from HTML because the Internet connection Not very consistent, it is important that in print format only a web browser is generated on the client side. Generate both screen and print edition from server at the same time. For class-only items for class = "notepant", attach different parts to the DIV with class = "notepant", and do not just print-only stuff for class = "note-onscreen", and both of them There is nothing extra which should be visible on both screen and print. Then use this CSS: @ Media Screen {.NotOnScreen {Display: None; }} @ Media Print {. NotOnPrint {display: none; }}

php - Warnings from mysql_connect() not populating mysql_error() -

पर्यावरण - PHP5.2.17, MySQL5.0.92 मैं अपने आवेदन में त्रुटि लॉगिंग ढांचे को कार्यान्वित कर रहा हूं और मैं एक डेटाबेस में त्रुटियों और चेतावनियों को लॉग ऑन करने का प्रयास कर रहा हूं। $ db = mysql_connect ('होस्ट', 'डेटाबेस', 'पासवर्ड'); अगर (! $ Db) {लॉग (mysql_error ()); } ... कोड जारी रखें मैं लॉगिंग का परीक्षण करना चाहता था और गलत मेजबान को mysql_connect फ़ंक्शन पर पास करना था। उम्मीद के मुताबिक मुझे स्क्रीन पर चेतावनी मिली चेतावनी: mysql_connect () [function.mysql-connect] अज्ञात MySQL सर्वर होस्ट 'होस्ट' (1) में / path / to / my / php /file.php पंक्ति 4 पर और मेरे लॉग फ़ंक्शन को बुलाया गया था लेकिन mysql_error () शून्य है। पीएचपी मैनुअल (http://php.net/manual/en/function.mysql-connect.php) के अनुसार, mysql_error () को अंतिम MySQL त्रुटि वापस करनी चाहिए मैनुअल में उनके पास एक उदाहरण है कि कैसे mysql_error () का उपयोग करते हुए स्क्रीन पर त्रुटि को गूंजती है। मैंने mysql_error ($ db) का उपयोग करने की कोशिश की, लेकिन यह बताते हुए एक त...

Memcached PHP module: How can you tell if the connection failed? -

एक php फ़ाइल में, मेरे पास है: & lt;? Php $ m = new memcached (); गूंज get_class ($ m); गूंज "& lt; br & gt;"; प्रतिध्वन करें $ m-> addServer ('192.168.1.77', 11211, 1); $ M- & gt; सेट ("foo", "bar"); ? & Gt; चलाने के बाद, आधा सेकंड के बाद, मुझे मिल जाता है: memcached 1 अगर मैं memcached बंद के बारे में 5 सेकंड के बाद, मैं मिलता है: memcached 1 मुझे कुछ और की तरह उम्मीद थी ... Memcached 0 आप कैसे जानते हैं कि आपने सफलतापूर्वक memcached सर्वर को मारा है या नहीं? मैं पूरी तरह से उम्मीद कर रहा था कि यह addServer से एक वापसी मूल्य के रूप में सरल है ...: ( यह मैं किस प्रकार की तलाश कर रहा था: Memcached :: getStats (); तो, मैंने लिखा: add_memcached_server ($ m, $ addr, $ port) {$ एम- & gt; एडसर्वर ($ एडीआर, $ पोर्ट); $ स्टेटस = $ एम- & gt; GetStats (); रिटर्न प्रदाता ($ स्थिति [$ addr। ":"। $ पोर्ट]);} एक आकर्षण की तरह काम करता है ...

php - html2fpdf issue -

मैं निम्नलिखित php: html2fpdfconverter.php & Lt;? Php की आवश्यकता है ('html2fpdf.php'); यदि (isset ($ _ POST ['डेटा'])) {$ urlcontents = $ _POST ['डेटा']; $ Filename = $ _POST ['फाइलनाम']; $ तारीख = $ _POST ['तिथि']; कन्वर्ट ($ urlcontents, $ filename, $ date); } फ़ंक्शन कन्वर्ट ($ सामग्री, $ नाम, $ तारीख) {$ pdf = new HTML2FPDF (); $ Pdf- & gt; AddPage (); $ Pdf- & gt; SetFont ( 'एरियल', 'बी', 16); $ पीडीएफ- & gt; सेल (40,10, "प्रविष्टि रिपोर्ट"); $ Pdf- & gt; सेटफॉन्ट ('एरियल', '', 12); $ Pdf- & gt; सेल (90,12, '-'। $ तारीख); $ सामग्री = strip_tags ($ सामग्री, '& lt; html & gt; & lt; body & gt; & lt; मेटा & gt; & lt; img & gt; & lt; h2 & gt; & lt; h4 & gt; & lt; br & gt; & lt; div & gt;'); $ Pdf- & gt; SetY (20); $ Pdf- & gt; लिखें HTML ($ सामग्री); $ Pdf- & gt; आउटपुट ($ नाम, ...

python - getting the full UserProfile profile -

मैं इसे डीजेंगो के माध्यम से कर रहा हूं $ python manage.py shell से django.contrib .auth.models आयात उपयोगकर्ता a = उपयोगकर्ता (उपयोगकर्ता नाम = 'ज़ोरो') a.get_profile ()।? मैं get_profile के बाद क्या करता हूं। a.get_profile ()। स्थान की तरह एक ही चीज़ में टाइप करने के बजाय पूर्ण प्रोफ़ाइल प्राप्त करने के लिए केवल स्थान प्राप्त करें a.get_profile () पूर्ण प्रोफ़ाइल है (इसकी एक उदाहरण वस्तु आपके उपयोगकर्ता प्रोफाइल मॉडल का)। तो आप इसे किसी चर में सहेज सकते हैं और इसे इस्तेमाल कर सकते हैं। यद्यपि आप अजगर के रूप में सब कुछ प्राप्त करना चाहते हैं, तो आप a.get_profile () .__ dict __ कोशिश कर सकते हैं। / P>

testing - Test framework with automated email notification for python -

I'm looking for a test framework for Python which will automatically email me if the test fails Test and broken test output I think it is very trivial to wrap a test library in the test / catch block, but I was surprised that I could not get the framework, which supported outside of the box. Am I not seeing hardly, or am I taking the wrong approach to running the test? I am very innovative for the exam process. Thank you, Kevin If I correctly understand that you want your The test runs automatically and emails are sent to you because you do not have to run them, this is the tool: You can run the test whenever you work in the repository, and through failure of email, IRC message, etc. You can be alerted from

android - MP3Extractor(34): Unable to resync. Signalling end of stream -

An error is occurring while trying to play the MP3 file from your ** resource folder Android application I have created a raw folder in the RAS folder. This is the sample code by which I am playing MediaPlayer mediaPlayer = MediaPlayer.create (GetBaseContext (), R.Rob); MediaPlayer.start (); LOG: 09-02 10: 44: 07.854: info / Android runtime (441): note: attached The thread 'Binder Thread # 3' failed 09-02-10: 44: 08.003: Debuts / AudioSync (34): Buffer Contract (4) is too small and 12 to 09-02 10: 44: 08.224: Warne / AudioFlanger (34 ): Blocked 117 messages, 44 pending writing to write, thread 0xb3f0 09-02 10: 44: 08.283: info / activity manager (59): displayed activity com.soundtest / .soundTestActivity: 511 ms (total 511 ms) 09- 02 10: 44: 13.052: Error / MP3 Actuator (34): Pu Level end unable stream signaling to sync I'm missing something or what ?? The error went after deciding to copy mp3 files from SD to SD when my data If the source is se...

ruby on rails 3 - Requesting header information of a file -

Anyway, I can only request header information for any media. For example, Header should request the information so that its video length can be found. I tried to use ffmpeg -i {video_url} and I did this but I found out that it actually downloads the given media in local storage and returns the header information Which clearly enhances roundtrip time. So I really appreciate if there is any idea to find the length of the media in a fly. BTWW, I have Ruby on Rail application where I have to implement it. You can ffprobe -show_format . Ffprobe comes with FFmpeg, and should have been compiled and installed with it.

c - Manual allocation in a stringbuffer object -

For a small embedded application, I wrote some functions + struct that works as a string buffer (Similar to std) :: stringstream in C ++). Works fine in this form of code, but there are some small issues: I have never written a function in C. Before that manually Use the increasing allocation of and , thus I am afraid that there are still some quirks that need to be addressed so far It seems that the code is actually Allocates more memory than needed Warnings reported by Valgrind Due to I have switched from malloc to calloc very bad / code> one in code The place, which successfully deleted the warning, but I am not completely convinced that I am using it in the right way. This means that it allocates It is actually needed in comparison (using the 56k file): == 23668 == Heap Summary: Use == 23668 == 0 blocks on exit C = 0 2366 8 == Total Hep Usage: 49,998 Overall, 49,998 Free, 1,249, 875, 362 Bytes Allowed ... This does not look right ... The question ...

osx - CoreGraphics - Special characters not drawn correctly -

I am drawing a picture using core graphics and displaying correctly "â € ¢ can not sign in. . The dollar sign works fine, though. I tried to use it different fonts but there is only one problem, my guess is that there is some kind of encoding problem, but I'm still not working it correctly. Here is my code that draws: context. Selection Font (Font Family Name, Font Page Size, CGTextEncoding.MacRoman); Context.SetFillColorWithColor (color.CGColor); Context.SetTextDrawingMode (CGTextDrawingMode.Fill); Context.SetShouldAntialias (anti-aliases); Context.ShowTextAtPoint (position .x, position.y, text); I can point in the right direction, whatever is appreciated. The "euro" symbol is slightly smaller than the other characters, but is also defined in matron , So I could not display it correctly with CoreGraphics ShowTextAtPoint (I suspect an encoding problem). Although this works fine, if you use UIKit instead of choreographics, see Q & A for sample...

String parsing functions in NSIS -

Is there a string parsing function in NSIC except for Straussi and Straile? Or a plugin that includes methods such as strstaf, strkamp, ​​search, etc. The default installation includes many functions in $ {StrCase} $ {StrClb} $ {$ {strCb}} $ { $ {StrL}} $ {StrL}} $ {StrN}} $ {StrR}} $ {StrR}} $ {StrStr} $ {StrStrAdv} $ {Stroke} $ {Stratium New Lines}} $ {StrSort}

wpf - Ways to apply dynamic style to same user control in different silverlight application? -

I have created a user control in the light of silver I have given this control two different applications I will use it. Each application has its own style rules I want control for the user to adopt the style defined in the related application. One way I found 1) Two different style templates are the same key in App.xaml of both apps. 2) Use binding static resources to bind the style in control. If no one can change the style within the same application, I This will define a style: style target type =" my user control / "gt; If it changes per position / view, then apply a resource key and set the example style to control.

php - How to avoid Unknown: write failed: No space left on device (28) -

I am on a shared host and receive this error on my domain unknown : Failed to write: No space left on device (28) I think my / tmp directory is full, but I can not believe it. If this is the case then why can anyone help me? This is the second time this happens and I have to shut down my site on the Web when it is not good ... I do not know that it is related, but I handle a lot of images and Convert them to PHP I temporarily save them using the tempnam () function. Does this create an error? Do anyone have any ideas? I need to fix this fast :( Thanks. There are two reasons for this: There is a quota set in your web hosting account that you have crossed. Solution: Free up some space (you should have some control panel that can prompt you That's the case.) The web server running on your site is out of space. Talk to your hosting provider They need to be sure that this does not happen again.

Youtube video player in asp.net with c# -

This is my first question in this site. I'm designing and coding a new website nowadays in Asp.net with C #. My question is: I want to add a music player (YouTube player) to the default .aspx In short, this website has 4 or 5 other pages and I want to play non-intrusive voice while browsing other pages. Is it possible or not? And if this is possible, then how? Thank you. I researched this site on this topic, but I could not find any real answer. You will not be able to do it with C # or some other purely server-side technology. Once you go to a new page, your embedded YouTube player will be trashed. To get the results, you have to do some work on the client side with Javascript. The simplest (but least least elegant) approach should be "default .aspx", a page that includes the main navigation framework within an iframe. Navigation of the site is then all within the iframe without refreshing "default.aspx". One problem with this is that the URL d...

locale - How do I change the currency symbol in Magento 1.5.1.0? -

I'm trying to change price format in Magento ver from 1.5.1.0 ¬ 8.4 9 to EUR 8.49 I am looking through many posts and forums but it is not working. I tried to follow the instructions but it has not been able to work yet. The cache is inactive. /lib/Zend/Locale/Data/en.xml & lt; Currency type = "EUR" & gt; & Lt; DISPLAYNAME & gt; Euro & lt; / DISPLAYNAME & gt; & Lt; DisplayName count = "one" & gt; Euro & lt; / DisplayName & gt; & Lt; DisplayName count = "Other" & gt; Euro & lt; / DisplayName & gt; // added & lt; Symbol & gt; EUR & lt; / Symbol & gt; Here & lt; / Currency & gt; /lib/Zend/Locale/Data/root.xml & lt; Currency type = "EUR" & gt; & Lt; Symbol & gt; ?? ¬ & lt; / Symbol & gt; = & Gt; By changing & lt; Symbol & gt; EUR & lt; / Symbol & gt; Did not work & lt; / Currency & gt; No more, I do not w...

javascript - Dynamically added input box problem? -

I've dynamically added the div. In which I have a text box. While adding a dynamic div I can put the value to the existing device but not the first open device. I would like to ask how to add value to the open text box before the devil. Thanks Here is a solution that is refreshing all (I can not understand the part of the "pre-open text box" section of your question. Okay, I understand it, but it does not appear in your code. I think the "rhythm" column of your table is a Input / Teterera is HTML element (since you use it). Please note I do not know what the vitalset function should do, or "vitals_form_readings _1_rhythm ". function queryDb (statement) {dbQuery = new air. SQLStatement (); dbQuery.sqlConnection = db; dbQuery.text = statement //" SELECT * FROM rhythm "; // alert (DBteExt);) {dbQuery.execute () try; } Hold (error) {air.trace ("Error retrieving note from DB:", error); Air.trace (error.message); Return;...

xcode - Autorotation with navigation back button -

I am creating an app that supports all the orientation. I am using navigation controller. Using this code - (zero) WilmatorotationTwo interface orientation: (Orientation Orientation) Interface Orientation Period: (NSTEEInterval) Period {if (Interface Orientation == UINFFF Definition Portrait} Interface Orientation == UINPreference Orientation PortraitSupenseDown) {class1. Frame = CGRectMake 54, 68, 190, 174); Category2.frame = CGRectMake (291, 68, 190, 174); Category3.frame = CGRectMake (525, 68, 190, 174); Category4.frame = CGRectMake (54, 296, 190, 174); Category5.frame = CGRectMake (291, 296, 190, 174); Category6.frame = CGRectMake (525, 296, 190, 174); Category7.frame = CGRectMake (54, 527, 190, 174); Category8.frame = CGRectMake (291, 527, 190, 174); Category 9.frame = CGRectMake (525, 527, 190, 174); Category 10.frame = CGRectMake (291, 757, 190, 174); Extra1.frame = CGRectMake (80, 781, 138, 125); Extra2.frame = CGRectMake (551, 781, 138, 125); } Else {class1.frame = CGR...

css - Firefox default font size issue -

Flexible layout EMS or% used as font-size units, a normal practice as a 62.5% body font- Size is but the default font of Firefox is 14px, which is the result of smaller layouts compared to 16px default font size Are we just the body's font-size Can not fix in 10px so that the relative size works in each To obtain a browser. In addition, in addition to the @Ray reply .. For Browser Consider this type of inefficiency, using a reset stylesheet. A good one can be found and. I am pasting the code here for reference. html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, Big, quote, code, del, dfn, m, img, ins, kbid, q, s, samp, small, strike, strong, sub, support, tt, var, b, u, i, center, dl, dt, DD, OL, UL, Li, Field, Form, Label, Legend, Table, Caption, Tub, Tiffut, Thread, TR, Th, TD, Article, On one side, Canvas, Description, Embed, Shape, Digitization, Footer, Header , Hgprov, menu, nav, output, ruby,...

tsql - How to get a week number from a date in SQL Server 2005 -

I have a date and a week number field for each row in Table A. The date field has already been populated and I was hoping that instead of doing it manually, there will be a way to automatically fill the week number area. An example of the date is as follows: 20111007 Hope you can help, Cheers :) With this syntax, you can retrieve the week for a date. SELECT datepart (week, '20111007'), date format (iso_week, '20111007') Although iso_week only works from sqlserver 2008 though. You really should consider creating a field of field in a math column. This will make your life so easy (I will use this solution). This will be your syntax: Changing the table & lt; Yourtable & gt; If you are prevented from changing the database for any reason, you can use it: update You can also create a view to show all the columns and to add the week as a math field, it will also be a valid solution. Although it is a good practice to list columns instea...

Linking mixed FORTRAN and C++ in the Visual studio 2008 environment -

I am calling a C ++ function by Fortran using the ISO_C_Binding module. I can compile and link Fortran and C ++ files using the command sequence. Pre> To compile and add, I can use the gfortran option and with C ++ standard libraries gfrontran main.o print_hi.o -o main -lstdc ++ Which work perfectly fine. Now my question is how can I do this in the visual studio environment. In the case of simple C, we can only include the print_hi.o file in additional dependencies in the linker, but if I include only this C ++ file (print_hi.o), then it gives errors such as error LNK2010: External symbol mentioned in function _print_en _ZSt4cout, so I think I need to give the path to the C ++ library in my Fortran project Because we can do the command line in the mingview case Area, but I do not know how to do it. PS: I am using Windows Vista with Visual Component Professional Edition 11.1 in Visual Studio 2008 and Visual Studio 2008 in C ++ in the same computer. This MSDN a...

php - How to know, which functions i can trigger by OLE Automation -

I have an application, I register it and I can start a file by opening it like this: / P> $ Com = New com ('name.application'); $ Com- & gt; Openfile ('C: \ test.txt'); Now my question, can I analyze the application which is the trigger (crazy word) function? This example can trigger: savefile (), too, but I had to ask the developer to get this information. The best regard is Probably not, but I'm COM (or COM +) There is no way to do this with the object, I can be wrong about this because I am not a Windows developer from nature, and if there is a way to do this, I would also like to know ...

javascript - Retrieve a Get Http request in php -

I have to get a get http request in php and store it in a variable me The following is required to be performed: https://graph.facebook.com/oauth/access_token? Client_id = YOUR_APP_ID & amp; Client_secret = YOUR_APP_SECRET & amp; Grant_type = client_credentials I know it's simple not just able to get my head around it. $ content = file_get_contents ('https://graph.facebook.com/oauth/ ACCESS_TOKEN client_id = YOUR_APP_ID & client_secret = YOUR_APP_SECRET & grant_type = client_credentials');

ios - How can I distribute an iphone app to specific organization? -

We need to make some versions of an iPhone app and it does not want to be available publicly. Is it possible to control this distribution. If your customers are not from the US, then they should be registered, without them the ADOK distribution limitations. The app will provide the ability to distribute the house.

android - menu button Problem in tablet? -

I will make Android applications. It is compatible for Android phones and tablets. But I have a problem with some tablets, there is no physical menu button in the tablet. All menu functionality in my app has been added to the device menu button How to manage menu button events in the tablet? Then you can open onClickListeners using the menu example For example, if you have image view in that page, you can open the menu for image click event image.setOnClickListener (New OnClickListener () {public Click Zero (see V) {openOptionsMenu ();}});

oracle11g - Indexes in Oracle -

Can you tell which index is fragmented in the oracle? Is there a script to get the discrete indexed list? And to improve performance, what should be done with such indexes? Should they be rebuilt? I'm not sure what you mean by the "fragmented" index, but in general almost never There is no need to recreate the indexes in the oracle - at least not to improve performance. Rebuild the index, and see the ideas of Tom Pitt - quote: My opinion - 99.9% of all rearges, reconstruction etc., total of time and energy useless. We have lost a lot of time in this manner.

html5 - jquery mobile theme scaling -

Image
मैं jquery मोबाइल का इस्तेमाल करते हुए विषय (हेडर्स, पादलेख, इनपुट आदि) / P> हम कहते हैं कि मेरे पास यह हैडर है जो ऊंचाई 90px के बारे में है, यह iphone4 पर अच्छा लग रहा है, यह मेरे आकाशगंगा s पर कुछ अच्छा लग रहा है, मजबूत> लेकिन कम संकल्प वाले 3g / 3gs और एंड्रॉइड फोन पर हास्यास्पद रूप से बड़ा हो जाएगा। मैं शायद मीडिया प्रश्नों का उपयोग कर सकता हूं, लेकिन यह कोडिंग जैसा होगा पूरे मामले को अनगिनत बार हर बड़े प्रयोग के संकल्प पर ठीक से देखने के लिए, मुझे मैन्युअल रूप से प्रत्येक एक संभव तत्व और सामग्री के लिए ऊंचाई निर्धारित करना होगा, मैं इसे जोड़ दूंगा .. या मैं अभी छोड़ सकता था यह वही है पर पर विचार कर रहा हूँ कि मैं सिर्फ ग्रेडियेंट का उपयोग नहीं कर रहा हूँ, लेकिन एक्ट्यूएल ग्राफिक्स, जो कि iphone4 रिजोल्यूशन (90 पीएक्स हैडर) के लिए डिज़ाइन किया गया था, यह अच्छा दिखने वाला नहीं है, बहुत कम है या I संभवत: em s का उपयोग कर सकते हैं लेकिन यह बिल्कुल वास्तविकता नहीं है Ble, न ही percents .. क्या कोई अन्य तरीका है? कुछ सर्वश्रेष्ठ अभ्यास शायद? नीचे ऐप के डिज़...

java me - How to select programmatically a menubar command and then select a command from a Dialog programmatically? -

On my LWUIT form I have two LWUIT commands: "back" and "phone". When I click on the "Phone" command, an LWUIT dialog is shown, this dialog has a list of commands: if (ae.getCommand () == back) {backForm .showBack (); } Else if (ae.getCommand () == phoneCmd) {command [] comms = new command [6]; Comics [0] = farmer; Communities [1] = Transferrers; Comics [2] = Telecharger; Comics [3] = camera; Comics [4] = Deletion; Comms [5] = Vinod; IsMenuShown = True; New CMNU (Communities, "Droit") Achich (); } CMenu class is an LWUIT dialog in which there is a list of commands, commands of command "comics" have been passed. Let me specify a specific command, "delete" command, CMenu dialog executed in my code. How to get it? The easiest way is to use myList.setCommandList (true) .

html5 - Canvas - Combing two images, return one img html object? -

I have two html img objects with different SRP url I want to combine these two images (using canvas ), And create a merged IMG object. Is this possible? You can draw both images on the canvas and add them to an overlay mode.

ibm mq - WebSphereMQ PCFMessageAgent / PCFAgent - Is it Thread Safe? -

मैं WebSphereMQ जावा पीसीएफ (प्रोग्राम कंट्रोल फॉर्मेट) लाइब्रेरी का उपयोग कर एक निगरानी और प्रशासनिक एमक्यू एपीआई को लागू कर रहा हूं। मैं क्या जानना चाहता हूं कि अगर और / या कक्षाएं सुरक्षित हैं दस्तावेज़ीकरण इसे स्पष्ट नहीं करता [मुझे]। यदि नहीं, तो मेरे पास 2 विकल्प हैं: एजेंटों का एक पूल बनाएं महत्वपूर्ण जानकारी जो आप चाहते हैं वह शायद इस पृष्ठ पर है: मुख्य मुद्दा जो आप देखेंगे वह है MQQueueManager ऑब्जेक्ट (जो आप या तो आप में पास करते हैं, या आपके लिए बनाया गया है) वास्तव में एक ही कनेक्शन पर 2 चीजों को एक बार नहीं कर सकते हैं। इसलिए यदि आपके पास एक एजेंट के पास प्रतीक्षा-प्रतीक्षा-प्रतीक्षा पर बैठे हैं एक बड़ी कड़ी के जवाब (हजारों कतारों के लिए पूर्ण विवरण प्राप्त करने से) जब तक जवाब वापस नहीं आता तब तक उस कनेक्शन का उपयोग कुछ भी नहीं किया जा सकता। कनेक्ट / डिस्कनेक्ट एमक्यू से बात करते समय सबसे बड़ा ओवरहेड है, इसलिए अगर आपको कई थ्रेडेड एक्सेस की आवश्यकता होती है तो मैं विकल्प 1 के साथ जाता हूं अन्यथा आप प्रत्येक टिम को कनेक्ट करने के लिए प्रतीक्षा करने के...

regex - decimal pattern matching -

I have a large file and the line pattern is given below: MDQ [ 11: 15], Io, MDQ [10:14] ,,,, MDQ [12:16], TPR_AWD [11:15] I want to modify this file below : MDQ [11], Io, MDQ [10] ,,,, MDQ [12], TPR_AWD [11] MDQ [12], Io, MDQ [11] ,,,, MDQ [13], TPR_AWD [12] MDQ [13], Io, MDQ [12] ,,,, MDQ [14], TPR_AWD [13] MDQ [14], Io, MDQ [13] ,,,, MDQ [15], TPR_AAWD [14] I have it in sed / awk / perl / csh / vim How can I apply? Please help awk -F '[] []' '{partition ($ 2 Split ($ 4, b, /: /) partition ($ 6, c, /: /) partition ($ 8, d, /: for A and I = 0; i & lt; a [2] /) [1]; i ++) {printf ("% s [% d]% s [% d]% s [% d]% s [% d] \ n", $ 1, a [1] + I, $ 3, b [1] + i, $ 5, c [1] + i, $ 7, d [1] + i)}} '

performance - Speed of comparing to null vs undefined in JavaScript -

Image
I have just run a very simple JavaScript (why not ask) test declares a variable, but nothing is assigned to it Does: var x; This again compares the comparison of the variable variable null , and undefined , in other words: var y = (x == null); and var y = (x == undefined); I was expecting to compare with undefined for fasting. Actually it was somewhere. The comparison with null was fastest, about 80% faster. The results described above come from running tests in Chrome (version 13). Running them in Firefox produces too many results (compared to undefined in comparison to null , but it is very minor). So, my question is, what could be the reason? Why does Chrome look too much to compare with null ? For quick reference, here is a screenshot of the results: null is a reserved keyword that overrides So, when you're comparing it with Null, you only have to make a comparison However, when you are examining against undefined So the engine sh...

django - TemplateSyntaxError caught DoesNotExist while iterating through a forloop on a populated list of forms -

I am following this useful article. Unfortunately, that does not indicate the template code, so I'm guessing there. I want to add several types of formats to a single model in one page, with some common property set, in either form or in the variables of the page or at the top of the page. This is for a teacher's market. My thoughts: def record_assessments (request, teaching group, purpose): theclass = TeachingGroup.objects.get (name__iexact = teachinggroup)) students = pupil.objects. Filter (teaching_group = theclass) theobjective = Objective.objects.get (code = objective) thedate = datetime.date.today () if request.method == 'POST': aforms = [PupilAssessmentForm (POOT request, prefix = xid , Instant = Assessment ()) For students in X if all (for F.I.I.VIDID) (for AFFF): For F.Formes: new_record = af.save (commit = False) new_record .objective = theobjectiv E new_record.date = thedate new_record.save () Redirection redirect ("/ app /" + theclass + ...

caching - html5 cache manifest compatibility with head.js? -

There are large speed advantages to using head.js in my own sites. I now consider the HTML 5 Cache Manifest I'm having to improve offline access on sites and improve speed (more things load with cache), am I using the HTML5 cache manifest, if there are still benefits of head.js (especially Parallel script loading)? During the initial cache manifest download event and also during the Cash Manifest update, you receive that head.js speed advantage

c# - Silverlight4 with RhinoMock -

Does RhinoMocks work with SilverLight 4? If not, is there any alternative? I know Rhinomak 3.5 has been placed in Silverlight but I did not get the DLL file because I get redirected to anyone every time I get the link (Official page :) I do not think there is any recent version. You can go instead.

android - Get screen size bucket programmatically? -

I want to determine whether the current device has a small, medium, large or bigger screen in the code. I have not found anything in the SDK docs which will help me get it into that information. I have only given full value to all the methods / sections (i.e. the screen size, screen density, etc. in pixels) Is there a way to tell what type of screen I'm running on the code? I have finished using the bool resources given in various bucket folders. Have given . I just needed to differentiate between normal (small / medium) and large (large / large) screens, so I did this: value / bools.xml Value-Large / bools.xml Then, I can tell whether the screen is big or not. In this way up to 100% of the platform determines which device the device is on.

JCheckbox in Java swing -

Image
I have created a checkbox like this: jacaxbox field = new jacquet box (" EDEX: "true,"); I was adding it to Genpel and the layout is a formulas using Selconstrines XI positions. But this does not display the EDEX text after the checkbox. This code is: panel.add (field, cc.xy (5, 3)); Please help me thanks This works fine: Import java.awt.EventQueue; Import com.jgoodies.forms.layout.CellConstraints; Import com.jgoodies.forms.layout.FormLayout; Import javax.swing.JCheckBox; Import javax.swing.JFrame; Import javax.swing.JPanel; Public class examples {public example (formulate layout = new formlate ("left: pref, 15px, center: pref, 15px, right: pref, 15px, fill: pref, 15px, pref", "pref, 12px, pref, 4px, pref, 4px, pref, 4px, pref, 4px, pref "); Zpean panel = new zpn (layout); Cell Consultancy CC = New Cell Consultancy (); JCheckBox field = new JCheckBox ("EDEX:", true); Panel.add (field, cc.xy (5, 3)); JFrame f = ne...

groovy - Grails create link to webflow -

Is Grails the tag possible to create a link for a Grails webflow (first state)? Update I'm saying how to create a link to the first stage of the flow outside the flow, i.e. the page on which the link appears no Part of the flow. & lt; A href = "$ {createLink (Controller: Controller Name ', verb:' FlamingActionMinzflow ')}" & gt; Start flow & lt; / A & gt;

semantic web - Find location of person with SPARQL in Java -

I get a morphology:. This includes places, individuals, activities, etc. I want to find the person's location in the SPARQL query in Java. The result of this query should be something like this: ("Ali" is located in "Kitchen") Can anyone help me with this query? is ? From the top of my head, would you need something like SELECT {"Ali"? P? O} Then you have to stop the worries that are the place of concern. Here is a link for some people; I hope you find it useful.

css - Font-face text gets jagged on windows -

Then I use font-face on one page and I have smooth edges on IE 7, IE 8 and Chrome I can get from Windows 7. I have read that this is due to the true type and I have tried to disable it in CSS because most people have done it on the internet. But none of these "IE fixes" work is going on. Do you have any ideas? Here is a demo / test page that I have decided: Web How well fonts are provided depends on 5 things; How appropriate are the design of typeface? How good is the font sign? What font delivery is being served? Is the font size being used? Which system configuration is being viewed on this? For more information:

javascript - Node.js: How to create XML files -

Is there a good way to create XML files? For example, like the builder (or any other way) for the rail? Thank you It seems that the library can do this for you. If you have NPM installed, you can do npm install xmlbuilder . This will let you do (taken from their example): var requires builder = 'xmlbuilder'); Var doc = builder.create (); ('For', 'node-js') .ele ('repo') .att ('type', 'git') .txt ('' for '' xmlbuilder '' .git: //github.com /oozcitak/xmlbuilder-js.git ') .up () .up () .ele (' test ') .txt (' absolute '); Console.log (doc.toString ({beautiful: true})); As a result: & lt; Root & gt; & Lt; Xmlbuilder for = "node-js" & gt; & Lt; Repo type = "git" & gt; Git: //github.com/oozcitak/xmlbuilder-js.git< / Repo & gt; & Lt; / Xmlbuilder & gt; & Lt; Test & gt; Full & lt; / Test & gt; & Lt; / R...

mysql - Mulitple IN() operators - No results -

I have a query: select country country, country country Country is landed Country_networks on N. country.id = n.country_id and n.network_id IN (1,14) That works fine though, now I should be 'for this' The clause must be added so that the n.network_id is set (6,7,8,9). (BTW, they can have multiple network_ads, because I am pulling directly from a lookup table.) So I tried to add another one: Select Country as Country Country, Country Contact Country Join country INNER country_networks country.ID = N. Country_ID and n.network_id IN (1,14) and n.network_id IN (6,7,8,9) which no longer yields any results. It seems that I'm making a stupid mistake here. Can anyone see what this is? Thank you. Yes; You must present that code in two non-intersections list. To beat a dead horse, We look at every value price list 1 list 2 ------------------ 1 x 6 x 7 x 8 x 9 x 14 X This is a set of all values ​​that comes in the list; Anything outside the scope w...

android - Making changes to Main Activity UI from thread in Service -

I'm looking for some good documents or a good example of this for some time from the worker thread in my service There is a change in your main activity UI which is going on in the background, as far as I think I think I'm supposed to work with some type of handler, but I'm not sure how to contact it Go. Do anyone have any ideas or good examples that they can direct me to? The UI Elements I am changing is a TextView that informs the user about the status of the thread. Thank you for your help You just have a handler on the theater to make: Private Handler Service Handler = New Handler () {@ Override Public Wind Handmess (Message Message) {someFunctionInTheUIThread (); }}; and then pass it through your service. You can do a function in the service like this: public void registerHandler (handler service handler) {Handler = serviceHandler; } and then pass the handler in such a way: theservice = ((local billing service)) .getService (); TheService....

How do i programmatically create a model that has an imagefield and fields to capture width and height in Django -

मेरे पास एक फोटो मॉडल है जो इस तरह दिखता है क्लास फोटो (models.Model) : title = models.CharField (MAX_LENGTH = 100, खाली = सच) चौड़ाई = models.IntegerField () ऊंचाई = models.IntegerField () छवि = models.ImageField (upload_to = upload_to_callable, width_field = "चौड़ाई", height_field = "ऊंचाई" ) content_type = models.ForeignKey (ContentType) object_id = models.PositiveIntegerField () content_object = generic.GenericForeignKey () create_date = models.DateTimeField (auto_now_add = सच) MODIFIED_DATE = models.DateTimeField (auto_now = सच) साइट = models.ForeignKey (साइट ) अपने एक परीक्षण में मुझे इस मॉडल को प्रोग्राम बनाने की आवश्यकता है I यह मैं क्या कर रहा हूँ है डीईएफ़ _create_random_image (स्वयं): आयात छवि, ImageDraw img = Image.new ( "आरजीबी", (300,300), "#FFFFFF") आकर्षित = ImageDraw.Draw (आईएमजी) आर, जी, बी = प्रिंट (0,255), प्रिंट (0, 255), प्रिंट (0,255) डॉ = (प्रिंट (0, 255) -आर) / 300 डीजी = (प्रिंट (0, 255) - g) / 300 डीबी = (प...

iphone - Download iOS SDK 3.1.2 and simulator -

Where can I download iOS SDK 3.1.2 and simulator? Perhaps someone can 'upload' to the web? If you are a registered Apple developer, go to connect. Log in with Apple.com, your developer credentials, and you will see all the Apple properties available for you to download, including older versions of Developer Tools. Not sure that Xcode 3.1.2 is still, but may be.

iphone - Is there a way to parse serializeJSON file in objective C -

मैं सीरियलइजजेसन प्रारूप में कोल्डफ्यूज़ेशन सर्वर से उत्पन्न जेएसओएन फाइल को पार्स करने की कोशिश कर रहा हूं। SerializeJSON फ़ाइल को पार्स करने के लिए कोई विशिष्ट तरीका है? यह सामान्य ट्विटर फ़ीड JSON फ़ाइल से भिन्न है। इस प्रारूप में JSON फ़ाइल को कैसे पार्स करना है? मैं इसे पार्स करने के लिए एसबीजेएसओएन फाइल का उपयोग कर रहा हूं। {"ROWCOUNT": 2, "COLUMNS": ["आईडी", "TITLE", "CLASS_START", "CLASS_END",], " डेटा ": {" KEY_ID ": [" a11c1a361a38 "," 6be127103538 "]," TITLE ": [" टेस्ट "," टेस्ट 2 "]," CLASS_START ": [" अक्टूबर, 25 2011 00:00:00 "," अक्टूबर, 26 2011 14:47:00 "]," CLASS_END ": [" अक्टूबर, 25 2011 00:00:00 "," अक्टूबर, 27 2011 14:47:00 "]}} कोड के पास: NSString * jsonString = [आत्म जेसनफ़ॉर्मूस्ट्रॉल स्ट्रिंग: यूआरएलस्ट्रिंग]; एनएसडीटा * जेएसएनडीटा = [जेसनस्ट्रिंग डेटाउपिंग एन...

Possible to write flash content in C#? -

I'm goggling this for a while but nothing has come up. What is possible to compile Flash SWF app by using C # (by which I also mean practical)? Actually, so you can, but this is not easy. I did this on some projects - mainly because Flash 5 was quite limited in time (you could not load it in an image dynamically). These days there is not much need of output SWF in the code and automation tools make other solutions more attractive. This is definitely possible, but it is a byte-by-byte, though some C # libraries are kicking for it these days. Practical? No.

linux - Apache2 config file path on Ubuntu. -

Someone can tell me the path to the Apache 2 config file on Ubuntu! You should read Ubuntu This will most probably answer most of your initial questions after getting your web server setup (In which you asked the question, in which the guide is in state / etc / apache2 / / />).

java - Best Practice? Where do I put configuration parameters for my own application in Struts2? -

In the Java Servlet, & lt; Context-param> gt; . In desktop applications, we generally define our own configuration file. Where should I put the configuration parameters for my Struts2 app? For example, my application has to set the time frame for user input, or save and read any stored files anywhere, or users can type incorrect passwords, maximum time I want to configure those things. How are people usually treated in the applications of Stratus 2? Any best practice? If you are familiar with the ServletContext approach, then you have mentioned, You can stick with it in your web.xml , just copy your & lt; Context-param & gt; Add s. Then, to get ServletContext in your works, just execute ServletContextAware and it will automatically be injected for you. Here is a brief example: web.xml & lt; Context param & gt; & Lt; Ultimate Name & gt; SomeSetting & lt; / Lastname & gt; & Lt; Ultimate Price & gt; SomeValue ...

javascript - Is there a name for a formula to calculate ascending numbers to a quadratic-like sequence? -

उदाहरण के लिए किसी भी श्रेणी की संख्या 0 - n [0, 1, 2, 3, 4, 5, 6] के लिए: [0, 2, 4, 6, 4, 2, 0] क्या दूसरे में पहली गणना करने के लिए एक सूत्र है? द्विघात? क्या इस प्रकार के सूत्र या गणना का कोई नाम है? संपादित करें: यह जावास्क्रिप्ट में होना चाहिए मुझे नहीं पता है कि आप" द्विघात-समान "से क्या कहते हैं, लेकिन निम्नलिखित जावास्क्रिप्ट प्रोग्राम आपके अनुक्रम की तरह दिखाई देने वाला कुछ प्रिंट करता है: n = 6; (I = 0; i & lt; = n; i ++) {प्रिंट (i, n-Math.abs (2 * में)}} आउटपुट: 0 0 1 2 2 4 3 6 4 4 5 2 6 0

c - What is the easiest way of intercepting library calls in Windows? -

I want to monitor / filter Internet traffic. I had planned to do this by blocking calls to send and receive in the WinSock API. Patching / disassembling is very difficult and takes time. The DLL method is also very time consuming because I want to patch and there are 2 calls and I have to reproduce the entire DLL. Is there an easy way to produce redirects DLL? Or maybe an easy way to stop calls? Imbalances and patching are not easy, this is why DLL injection & amp; The hook that can be used for interception can be used to get you started here:

java - Match two urls with regular expressions -

I have a list of URLs and I use regular expressions with those URLs Http://investor.somehost.com/* Here * means anything after this or you can say that this is a wildcard ... String href = url.getURL (); Here all the URLs in the href are included. Looks like the URL ( http://investor.somehost.com/* ) in Firstentry then how can I compare it with Firstentry? Like if this URL starts with ... If you decide Want a string to start with a special prefix, then use it. Example: string href = "http://google.com/mail"; If (href.startsWith ("http://google.com")) {// ... content}}

database - sql server: one file for all the application or is it better to make it multiple db files? -

Is better to keep separate parts of the app in separate databases or in a single database file. For example by putting a forum table in a database file and putting the blog's table in the other DB? The different databases probably do not understand, but considering SQL Server 2005 or later versions, I I encourage the use of schema to logically exclude these functional areas. See Buck Woody's article as the starting point.

Python string manipulation -- performance problems -

I have the code of the following code that I execute in my application almost 2 million times so that several records can be parsed . This part is being hampered and I was thinking that if there are any such nifty moves which can help me by suggesting that these simple string manipulals are sharp. try: data = [] for start = 0 end = 0 = column (): end = start + (info.columnLength) piece = line [start: end] if the piece == '' or lane (piece)! = Info.columnLength: Increase the 'wrong input' if info.hasSignage: if (slice [0: 1] .stip ()! = '+' And slice [0: 1]. Stream ()! = '-'): Increase "wrong input" if not info.skipColumn: Data.append (slice) start = end parsedLine = excluding data: parsedLine = false Edit: I'm changing this answer a bit. I will leave the original answer below. In my other answer, I have commented that the best thing to do is to find an underlying Python module which will have to be unpacking. I could not thin...

c# - API Design Question -

While designing my API, I'm thinking how I would like to model the following behavior options 1 seems more logical, but with the same invasions apply as if to check that the spreadsheet is actually related to the workbook. Option 2 looks weird that a spreadsheet knows how to remove it, but in fact there is a reference to its parent workbook in the spreadsheet and can hand over the call directly to it. Or is this not really a valid case because the workbook will need to validate this spreadsheet, no matter what? idea? workbook wb = new workbook ("finance"); Spreadsheet SS = wb.CreateSpreadsheet ("Bob's"); // Option 1: wb.RemoveSheet (SS); // Option 2: ss.RemoveFromWorkbook (); Thank you everyone I'll use wb.Sheets.Remove (SS) This sheet allows the separation of responsibilities in the form of an object, which is a collection of spreadsheets. It later also allows the concept that a sheet can be in many workbooks.

github - Git Add Without Directory? -

मेरे जीआईटी रेपो की मुख्य शाखा संरचना निम्नानुसार है / demo index.html style सीएसएस रीसेट सीएसएस jquery.dimlights.js jquery.dimlights.css jquery.dimlights.min.js jquery.dimlights.min.css readme.md हालांकि gh-pages की शाखा में I सिर्फ / डेमो की निर्देशिका को बिना निर्देशिका के ही चाहते हैं क्या ऐसा करने का कोई तरीका है? यह एक तरीका है: जीआईटी चेकआउट-बी जीएच-पेज जीआईटी आरएम (डेमो के अलावा सब कुछ) जीआईटी एमवी डेमो / * जीआईटी कमिट-एम "gh-pages" में सामग्री जोड़ना " एक अन्य तरीका जिस पर आप gh-pages की शाखा को कैसे संभाल करना चाहते हैं, यह एक अनाथ शाखा बनाने के लिए है: जीआईटी चेकआउट - अरफान जीएच-पेज आरएम (डेमो छोड़कर सब कुछ) एमवी डेमो / * जीआईटी जोड़ें Git commit -m "gh-pages" में सामग्री जोड़ना "

java me - J2ME app menu develop -

I am developing a small j2me game and I want to make a menu for this application. I imagine the menu as the vertical list of items with the cursor on either the left or right side, that I can go to the item from the item, something like that but to get such effects as the main menu Should use? I only need advice or a link, I will develop it myself Thanks in advance! Import java.util.Vector; Import javax.microedition.lcdui.Canvas; Import javax.microedition.lcdui.Font; Import javax.microedition.lcdui.Graphics; Import javax.microedition.lcdui.Image; The plan you want is not possible to give more links because nobody Do not remember what can help on things like yours In fact, the most useful link for you might be the MIDP () API reference - your share is going to be mostly LCDI package, and especially Graphics API. For advice, there is no problem. The first thing is that with the inherent list you will have more coding and more (too many) testing / debugging compared...

asp.net - Clarification on Fiddler's Transfer Timeline View -

Image
I am trying to measure the performance of the server side code, seeing the request from the client, Fideller gives me the following view: before responding to the vertical line server Byte indicates time (timer.Saverbizan Response) . Does this mean that the TCP response of time servers ACK) or does it mean that the server has compiled all the data in less than half the seconds and took about 5 seconds to transfer it? This time it is requested that the byte was removed from the server before a response. It contains all the steps to do this. This becomes the first byte of the page received by the browser to become an HTTP request The virtual user period. The socket connection to send the time, which HTTP requests and takes time to get the first byte of the page. Then yes 1/2 seconds to answer, then to move 5secs.

facebook c# sdk - Post to fan page / group page as application not as user -

I am using Facebook C # SDK to post the item. I can post the user's wall as a user, I can post on the group page / fan page but it appears as if it comes from the administrator and not the application. What do I want to do, a post appears as if it came from the application and there is no administration - what am I doing? I request the following permissions: publish_stream, manage_pages, offline_access Here is a code snippet: var fb2 = New FacebookOAuthClient (FacebookApplication) .Current); Dynamic result = fb2.GetApplicationAccessToken (); Var appAccessToken = resultt.access_token; Dynamic parameters = new ExpandoObject (); {Parameters.access_token = appAccessToken; Parameters.link = "http://www.msn.com"; Parameters.picture = ""; Parameters.name = "test"; Parameters.caption = "test!"; Parameters.description = "Just another exam."; Parameters.from = AppID; Parameters.to = PageID; Parameters.actions = new {name = "te...

sql server 2008 - How to make a SQL table bigger -

I have a table with data as 100 rows a1 a2 a3 .. --------- 1 2 3 23 55 4 2 3 7 I use the UNION ALL to enlarge that table I'm planning to do a1 a2 a3 ... --------- 1 2 3 23 55 4 2 3 7 1 2 3 23 55 4 2 3 7 1 2 3 23 55 4 2 3 7 This is for testing purposes, so what do you suggest, what would be the most effective way to do this? This will increase the size of your table faster ... earlier this X record, 2x, 4x, 8x Inserts ... If you want to add the same number of records only if you select different or top n , etc. DECLARE @ counts int DECLARE @max int SET @ count int = 1 SET @max = 10 WHILE @ country & lt; Insert in the max @ myTable (a1, a2, a3) select myTable SET @count = @count + 1 END Select A1, A2, A3 from BTW - Not sure what you are trying to test, but you can add anything other than the entire numbers in your data set - like, 1.01, .99, 55.7, 60, etc. Edit For your comment - if you want actually to use union All then ... enter in myTA...

c# - What is the equivalent of static methods in ColdFusion? -

In C #, I have created steady ways to assist me in simple operation. For example: Public Static Class StringHelper {public static string reverse (string input) {// reverse string returns reversed input; }} Then in a controller, I will call it using just: StringHelper.Reverse (input); Now I am using Cold Fusion with model Gum, and I want to do the same thing. However, it seems that there is no concept of stable methods in coldfusion. If I make the CFC like this: component stringheller {public string function reverse (string input) {// reverse string returns inverted input; }} Can I call this method by creating an example of StringHelper in the controller, such as: component Controller {Public reverse of zero function {var input = event.getValue ("input"); Var stringHelper = new string helper (); Var reversed string = string heller. Reverse; Event.setValue ("Reversed String", reversed); }} Or there is a place where I can put 'static...

jquery - how to acccess the asp.net dropdownlist selected item value from javascript -

How to access the asp.net dropdownlist selectitem value from javascript? I have follwing code where I want to use dropdownownlist selectitem value in javascript, and that query is another page function example () {var e = $ find ("ExampleDropDownList"); Var strUser = e.options [e.selectedIndex] .value; Warning (strUser); Window.radopen ("ExampleDetail.aspx? Id =" + Strucer, "Delog"); return false; } & Lt; Telerik: RadComboBox id = "ExampleDropDownList" runat = "server" & gt; & Lt; / Telerik: RadComboBox & gt; ASP.Net control presents back in plain HTML controls. When using JavaScript, you can actually call an object as you normally would have a dropdown. The list of dropdowns will identify your redcombboxes. var myDropDown = document.getElementById ('ExampleDropDownList'); And you will have access to your dropdown list.

.net - How do I match the slash at the end of an xml string? -

समस्या: मैं एक निश्चित एक्सएमएल सबस्ट्रिंग से मिलान करना चाहता हूं (नीचे देखें। ए) रेगेक्स का उपयोग करना समस्या यह है कि मैं एक्सएमएल स्ट्रिंग के अंत में स्लैश मैच नहीं कर सकता क्योंकि यह रेगेक्स में एक सार्थक चार है। मैंने अपने पैटर्न में स्लैश के पहले एक बैकस्लैश डालकर स्लेश से बचने की भी कोशिश की थी (नीचे कोड देखें), लेकिन फिर भी यह काम करने में सक्षम नहीं हो सकता ... प्रश्न: मैं कैसे हेक कर सकता हूँ। नेट रेगेक्स एक्सएमएल स्ट्रिंग के अंत में स्लैश से मेल करता है ??? मेरी मदद करने के लिए आप में से कुछ कोड निंजा की आवश्यकता है आपकी मदद के लिए पहले से धन्यवाद, मेरा मित्र। इनपुट: & lt; सारांशएडेशन आईडी = "_ 470" & gt; & Lt; title & gt; सांख्यिकी & lt; / title & gt; & Lt; पैरा आईडी = "_ 331" & gt; नोट: 2010 में संयुक्त राज्य अमेरिका में अनुमानित नए मामले: & lt; संदर्भ refidx = "1" / & gt; & Lt; / पैरा & gt; & Lt; / SummarySection & gt; कोड : // पूर्व ए: पैटर्न को मिलान करने क...

iphone - Best way to store class variables? -

I am making a very simple game, but I can not determine what my custom class will use. I just know two ways of doing this, but think about the rules of other people where you kept some things. I would like to know how I should use the variable, I am using it efficiently, and I expected that I can find answers here. Actually, this is my header file. # Import & lt; Foundation / Foundation. H & gt; #import "URWInventoryView.h" @ Interface RWInventory: NSObject {URWInventoryView * inventoryWindow; Bull slot is encapsulated [5] [5]; Int numbersoffices; Int number offslotfil; Int number of columns; Int numberoffro; } // ///// //// Initial //// // - (ID) initWithSlots: (int) slots; - (id) initWithColumns: (int) column and row: (integer) rows; - (ID) initWithInventoryData: (RWInventory *) list; // //// ////Seters//// // - (zero) set slot: (int) slots; - (zero) set column: (int) column; - (zero) setrise: (integer) rows; - (zero) setSlotIsOccupiedColumn: (int) column a...

entity framework 4.1 - EF Code First Additional column in join table for ordering purposes -

I have two bodies for which I am creating an included table Public Class Student {Public Ent ID (Received); Set; } Public string name {get; Set; } Public virtual iconging & lt; Image & gt; Images {get; Set; }} Set the image of the public square {Public Entity}; } The name of the public string file {get; Set; } Public virtual iconging & lt; Students & gt; Student {Received; Set; }} Secure Override Zero OnModelCreating (DbModelbuilder Model Builder) {modelBuilder.Entity & lt; Students & gt; () .HasMany (i => i.Iages) .Many (s = & gt; s.Students) .map (m = & gt; m ToTable ("StudentImages")); } I would like to add an extra column to allow the chronological order of student image. Where do I want to insert the relevant code? Do you want to use that new column in your application? In such a case you can not do this with your model Many-to-many relations work only when there is nothing except the foreign key from the main table in ...