Posts

Showing posts from February, 2011

Using Python to Create MIDI's -

Essentially, I'm trying to make MIDI scratch and putting them online for different languages I'm open, but likes to use Python (one of 2, if it makes a difference). And wondering what library I should use. thank you in advanced! It looks like you want it: Create MIDI files in Python.

php merge arrays -

I am trying to merge the output of multiple arrays in an array (unsuccessful). One example I tried was: $ data1 = array ("cat", "goat"); $ Data2 = array ("dog", "cow"); Print_r (array_merge ($ data1, $ data2)); It works fine, but I am using the following code, how can I get the desired output? $ filename = "item.txt"; $ Lines = array (); $ File = fopen ($ filename, "r"); Flexose ($ file); Foreign currency ($ lines in $ internally) {$ item = Ere ($ inner [1]); echo " ;; My current output is: Array ([0] = & gt; item one) array ([0] = & gt; two items) array ([0] => item three) array ([0] => item four ) The desired product will be: Array ([0] => items one [1] => two items [2] = & Gt; Item Three [3] => Item Four) Anyone in Advanced Thanks for suggesting. There may be a better way, but this should work. Loop through and combine each array separately: $ items = array ();...

linux - Can io scheduling priority be set on a filehandle basis? -

What folds can open in Linux, do they have an io scheduling preference? IONOS allows you to fully determine the IO priority for the processes. Is it possible for a process, for example, unnecessary priority on a file handle but general priority on the other? Or, to implement something like this, do I have to change the priority of 'io scheduling of processes because every file is read by hand? I do not think that's straight, right. Unix V6 Kernel (C.1978) Based on the characteristics of some devices, the awakening priority for different values ​​will give priority, depending on the length of the delay. If that functionality has been moved to Linux, then it may be used for your purposes. Otherwise, you have to modify the kernel for your purposes. May increase the ioctl () to set the file to a new area with scheduling bias.

unserialize data from mysql table and output via php? -

Image
मेरी wp_usermeta तालिका में 4 कॉलम हैं, umeta_id | User_id | मेटा_की | Meta_value तालिका की छवि: कॉलमों में से एक में डेटा सीरियल किया गया है - wp_s2member_custom_fields। सीरिजलाइज्ड कॉलम के भीतर अपने सारे उपयोगकर्ता डेटा देखने के लिए मैं पीएचपी के साथ मेरी एसक्यूएल या आउटपुट से कैसे अनसियलाइज़ कर सकता हूं? यहाँ सीरियल की गई डेटा का टूटना है: wp_s2member_custom_fields a : 12: {एस: 7: "देश"; रों: 2: "सीए"; रों: 4: "शहर"; रों: 8: "ब्रैम्पटन"; रों: 5: "राज्य"; रों: 7: "ओंटारियो"; रों: 8: "ZIP_CODE"; रों: 6: "L6T4E7"; रों: 3: "उम्र"; S: 13: "25" ??? 34 साल "; रों: 8: "BLOG_URL"; रों: 22: "http://www.blog.com"; रों: 16: "blog_description"; S: 106: "ब्लॉगिंग के बारे में एक ब्लॉग"; रों: 15: "monthly_uniques"; रों: 4: "1000"; रों: 13: "facebook_page"; रों: 55: "http://www.facebook.com/myfacebookpage"...

silverlight - How to generate new table related code in existing Ria Service without deleting it -

How to generate a new table related code without removing it in existing RIA service. Please suggest the best practice I have a domain service, I have modified a lot of auto-generated code and meta data, now I want to include more than two tables auto-generated code without deleting it. Your best option is to add a second, temporary doamian service that includes those tables And then copy the code for the existing domain service. Once you are finished, remove the temporary domain service. The second option is to put the new code into the hand, for example, use existing code for other tables. My understanding is that the generator is intended to use only for the creation of new domain services.

optimization - What does Java compile an enumeration down to? -

A coworker and I were discussed about how Java shows the enumeration. I was under the impression that they were strictly like C / C ++ or, if you add behavior (type-safe enum), then it is wrapped in a class. He believed that if it is small, then Java will compact a byte. However, I found it on the Oracle site: The meaning of the Java programming language is far more powerful than their counterparts in other languages, which is slightly higher than the glorified integer The NUM declaration defines an integer class (an enum type is dubbed). I think they are real objects, if that is so, is there any way to optimize them to save space? Thanks Edit: As stated in the comment on John's answer, I am after the ordering size of an enum No, Java enum values ​​are actually objects they can have different implementations of methods based on fields, methods etc. - and per-value. However, there is only one set of them - it is not that you make yourself an example of anna; The set...

c++ - prefix operator overloading -

I overload the ++ prefix operator using a member function. Here's the prototype: test and operator ++ (); But my suspicions arise when I use it for my object below: test t; ++ t; As far as I know that the operator is exaggerated by the any operator for on the left but when that operator I'm calling this ++ prefix overloaded operator, so I do not need any object in class test on the left. Why? So far I have learned that for any operators overloaded by any member operator The object of the same category on the left side of that operator should be one. This will be pre-and post-indentment for any binary operator, as well as a direct operator ( * obj ) operators Are there. They have an argument (either a function parameter or contained "this" parameter, how you overload the operator) and for overloaded operators it should be only one class type. But when I am calling this ++ prefix surcharge operator, then I do not need any of th...

Download a File through Safari with AppleScript -

Due to the reasons I really will not go, I have to write something in the Apple script, which is specially some files Will download (Just something that double click to double click on a person who will open the safari and will show them a web page when starting some downloads.) I can set the document's URL with Apple script, but that file Does not download This is a file that Safari thinks she understands, so she tries to open it directly, I need to download it on the file system. Anything that I find on Google is called "URL access scripting", but when I use it AppleScript Editor asks me to select which application it is I do not think so (or do not know where it is) Other suggestions are to call command line tools to download the file, but the problem here is that the user has some cookies (s) in Safari, Because the author authorizes for processing, the command line tool will get an error I think the question breaks down: How do I To download a file, tell t...

iOS (iPhone, iPad, iPodTouch) view real-time console log terminal -

There is a way to see real-time console logs for real-time NSLog and other debug messages, such as ADB Lockat? Technical questions for Xcode 6 and the solution given by Apple in QQ1747 is: Select window - & gt; Device from Xcode menu. Select the device in the left column. To show the device console, click on the triangle above the lower left hand part.

sqlclr - SQL CLR - retrieving data / updating results -

As part of my business logic, I need to get 2000+ rows from a SQL table; those lines are somewhat complex, Run through procedural, business logic (yes, it should be procedural, and so far all the technical techniques that have been researched do not deduct it for efficiency). Then I have to update the database, and return the result. Using SQLDataReader - Data exits from SQL, and in my argument - which just works fine. Repeats on the logic data, and makes the necessary changes. To save changes now - I do not really want to send the result to an update statement by filling the parameter. If I have found a result in SQL, then I will be in the floating table with the base table, and make all the updates in the same TSQL update statement. My "table" is in SQL CLR, and the base table is ending on the SQL side. I have read the techniques about XML serializing the results, and have completely moved it to a varchar variable - but I am using SQL Server 2008 R2. I've ...

python - Using twill's builtin mechanize distribution throws AttributeError on _debug? -

I use twill (0.9) and I have builtin mechanize Distribution (at Python 2.6.6). I read all the documents and I am not clear whether they also support or recommend it, if they are, they certainly do not propagate it. It seems that you can do this: Import _ Mechanize_magnain as a dd br = mechanized. Broser (br.open ('http://www.yahoo.com') However mechanized bottom robotparser._debug But the stupid attribute throws down the error. Should not I try to use it? Or is it simply by the muddy exception handling machine? (Twill itself works fine: twill.commands.go ('http://www.yahoo.com') ) traceback (most recent Call end): File "& lt; pyshell # 19" gt; Line 1, & lt; Module & gt; Br.open ('http://www.yahoo.com') File "C: \ God \ Python26 \ lib \ site-packages \ twill-0.9-py2.6.egg \ twill \ other_packages \ _mechanize_dist \ _mechanize.py ", Line 212, open itself in open returns _mech_open (url, data) file "C: \ g...

Warning about an unchecked type argument in this Scala pattern match? -

यह फाइल: ऑब्जेक्ट टेस्ट ऐप {xv valj = list (1,2) , 3): ऑब्जेक्ट वैल रेज़ = ओबजे मैच {केस सेक् (1,2,3) = & gt; "प्रथम" केस _ = & gt; "अन्य"} println (res)} इस चेतावनी को देता है: Test.scala: 6: चेतावनी: गैर चर प्रकार तर्क A में प्रकार पैटर्न Seq [ए] अनियंत्रित है क्योंकि यह विलोपन केस सेक (1,2,3) = & gt; "प्रथम" स्काला संस्करण 2.9.0.1 मुझे नहीं पता कि मैच को कैसे निष्कासित करने के लिए एक मिटाने वाला प्रकार पैरामीटर आवश्यक है। पहला मामला खंड यह पूछने के लिए है कि क्या obj 1, 2, और 3 के बराबर 3 तत्वों के साथ एक सीक है। अगर मैं कुछ लिखा होता : केस स्ट्रिंग: सीक [स्ट्रिंग] = & gt; ... मुझे चेतावनी क्यों मिलती है, और इसे दूर करने का एक अच्छा तरीका क्या है? वैसे, मैं किसी वस्तु के स्थैतिक प्रकार के साथ मैच करना चाहता हूं। वास्तविक कोड में मैं कुछ लिस्प का एक उदाहरण पार्स कर रहा हूं- यह एक स्ट्रिंग, अनुक्रमों का अनुक्रम, प्रतीक, संख्या, आदि हो सकता है। इस दृश्य के पीछे क्या होता है यह कुछ जानकारी है इस कोड पर विचा...

iphone - setting a float value in a condition -

अगर (eventRecord.byName) {प्रस्तुत.टेक्स्ट = eventRecord.byName; Flop descPos = 50.0; } और {[प्रस्तुत removeFromSuperview]; Float descPos = 35.0; } CGRect descFrame = CGRectMake (125, descPos, 185, descStringSize.height); मुझे पूरा यकीन है कि यहाँ क्या करना है, जब से मैं उद्देश्य-सी के साथ पूरी तरह से काम कर रहा हूं, वस्तुओं के साथ किया गया है लेकिन अब, मुझे हालत के आधार पर एक फ्लोट वैल्यू के साथ एक वैरिएबल निर्धारित करना होगा। मुझे यकीन नहीं है कि वाक्यविन्यास क्या होना चाहिए। एक तरफ नोट पर, xcode4 की अंतिम पंक्ति एक त्रुटि है क्योंकि descPos अघोषित है। लेकिन यह तब नहीं होगा जब स्थिति चलती है? आप केवल descPos अगर स्टेटमेंट के दायरे के भीतर। यदि आप अगर ब्लॉक के भीतर सेटिंग कर रहे हैं, तो इसे पहले से ही घोषित करें: float descPos; अगर (eventRecord.byName) {प्रस्तुत.टेक्स्ट = eventRecord.byName; DescPos = 50.0; } और {[प्रस्तुत removeFromSuperview]; DescPos = 35.0; } CGRect descFrame = CGRectMake (125, descPos, 185, descStringSize.height) अन्यथा, जिस तरह से आप यह...

nullpointerexception - Why is adMob throwing these null pointer exceptions in Android? -

I Android application complete and everything, so I integrated into the SDK downloads and applications from AdMob. After integrating the ads, I saw that this exception continued to appear in the console even when I ran the app. [2011-09-01 22:25:21 - ddms] tap Java com.android.ddmlib.Client.sendAndConsume (Client.java:572) com.android.ddmlib.HandleHello. sendHELO (HandleHello.java:142) lang.NullPointerException (HandleHello on com.android.ddmlib.HandleHello.sendHelloCommands. Java: 65) com.android.ddmlib.Client.getJdwpPacket (Client.java:671) com.android. ddmlib.MonitorThread.processClientActivity (MonitorThread.java:317) Java on com.android.ddmlib.MonitorThread.run (MonitorThread: 263) [2011-09-01 22:25:21 - DDMS] com.android in com.android.ddmlib.Client.sendAndConsume (Client.java:572) on .ddmlib.HandleHello null java.lang.NullPointerException .sendHELO com.android.ddmlib.HandleHello.sendHelloCommands (HandleHello.java:142) (HandleHello. Java: 65) at com.android.ddmlib.Client....

c++ - call of overloaded ‘max(char&, char&)’ is ambiguous -

#include & lt; iostream & gt; नेमस्पेस एसटीडी का उपयोग करना; इंट मैक्स (इंट ए, इंट बी) {एक & lt; b? B: a; } टेम्पलेट & lt; typename T & gt; टी मैक्स (टी ए, टी बी) {एक & lt; b? B: a; } टेम्पलेट & lt; typename T & gt; टी अधिकतम (टी ए, टी बी, टी सी) {वापसी अधिकतम (अधिकतम (ए, बी), सी); } Int main () {// दो वर्णों के साथ कॉल, काम निरर्थक :: अधिकतम ('सी', 'बी'); // इस तीन कॉल के साथ कॉल नीचे सूचीबद्ध त्रुटि उत्पन्न करती है: :: अधिकतम ('सी', 'बी', 'ए'); वापसी 0; } त्रुटि: त्रुटि: अतिभारित कॉल (अधिकतम और कॉल, चार और) ??? अतिविशिष्ट है यह नहीं होना चाहिए अधिकतम ('c', 'b', 'a') तीन तर्कों के साथ अतिभारित फ़ंक्शन को कॉल करें? बात यह है कि, पहले से ही एक अधिकतम में std और आप नामस्थान std का उपयोग कर रहे हैं; : टेम्पलेट & lt; class T & gt; कॉन्स्ट टी एंड amp; अधिकतम (कॉन्स्ट टी एंड ए, कॉन्स्ट टी एंड बी); तो आपका अधिकतम ('c', 'b', 'a') ठी...

How to upload image from C# application to SQL Server 2005 -

संभव डुप्लिकेट: सी # एप्लिकेशन से SQL सर्वर 2005 में छवि कैसे अपलोड करें का उपयोग करके (SqlConnection Conn = नई SqlConnection ("कॉन्फ़िगरेशन स्ट्रिंग" ["ConnectionString"] ConnectionString) {try {const स्ट्रिंग एसक्यूएल = "[द्विपदीय में शामिल करें] ([फ़ाइलनाम], [दिनांकटाइम अपलोड], [एमआईएमई], [बाइनरीडेटा]) मूल्य (@फ़ाइलनाम, @ डेटटाइमअपलोडेड, @ एमएमईएम, @ बाइनरीडाटा) "; SqlCommand सीएमडी = नया एसक्यूएल कॉमांड (एसक्यूएल, कॉन); Cmd.Parameters.AddWithValue ("@ फ़ाइलनाम", फ़ाइलनाम। Text.Trim ()); Cmd.Parameters.AddWithValue ("@ MIME", FileToUpload.PostedFile.ContentType); बाइट [] imageBytes = नया बाइट [FileToUpload.PostedFile.InputStream.Length + 1]; FileToUpload.PostedFile.InputStream.Read (imageBytes, 0, imageBytes.Length); Cmd.Parameters.AddWithValue ("@ BinaryData", imageBytes); Cmd.Parameters.AddWithValue ("@ दिनांकटाइमअपलोडेड", दिनांकटाइम.अब); Conn.Open (); cmd.ExecuteNonQuery (); Lit_Status.Text = ...

javascript - jQuery - Call function when dropping div -

I want to leave the div # draggable to run the function insertHouse () Can not manage to work You are trying to call me in the second line below. What am i doing & lt; Img src = "picture / door 1.jpg" id = "draggable" & gt; & Lt; Div id = "item" & gt; & Lt; / Div & gt; // Place House; Enter functionHouse () {Bleblabla} $ (init); Function init () {$ ('# makeMeDraggable'). Draggable (); $ ('Body') Droppable ({drop: handleDropEvent}); } Function handle DoPevent (Event, UI) {function insertHouse (); } The following code will work ... Function Init () {$ ('#memedragable'). Dragable (); $ ('Body') Droppable ({drop: function (Event, UI) {insertHouse ();}}); }

c++ - Fast uniformly distributed random points on the surface of a unit hemisphere -

I am trying to make the same random number on the surface of the unit area for the Monte Carlo Ray tracing program. When I say uniform, I mean that the numbers are evenly distributed in relation to the surface area. My current method is to calculate a parallel number on the hemisphere, which points in the positive z axis and XI plane in base. The random point on the hemisphere represents the direction of emission of thermal radiation for a diffuse gray. Emitter I get the right result when using the following result: Note: dsfmt will return a random number between * 0 and 1. Azimuthal = 2 * PI * dsfmt_genrand_close_open (& amp; dsfmtt); Xenith = asin (sqrt (dsfmt_genrand_close_open (and dsfmtt)); // cartesian point osRay.c._x = count (sinith) * cos (azimuthal); OsRay.c._y = Sin (zero) * Sin (azimuthal); OsRay.c._z = Kos (zero); Although it is quite slow and profiling shows that it takes a large part of run time, so I asked for some alternative ways: MarcGlia19...

Rails 'post' command in rspec controllers: Files aren't passing through. (Is there a multipart setting?) -

I am trying to run the following space describe "create post" Describe the "with valid parameters" post it redirects to the "created banner": create: banner = & gt; Valid_attributes response.should redirect_to (admin_banner_url (banner.lists)) End end end valid valid_attributes demo_image = File.open (File (Rails.root, "spec", "samples", "laptop1.jpg")) {: Name = & gt; 'Test Speak Banner' ,: bannerimage = & gt; Demo_image} end Validation failed on validates_presence_of: bannerimage - I have narrowed down to: If I turn off validates_presence_of validation of Bannerimage It works, but the banner has been reported as 'absentee' banner.credited! (Valid_addresses) works I have shown only one speck, but there is a problem on any device, in which the post is included: Create: banner = & gt; Valid_attributes line I have removed every reference for attr_accessible ... there is no diffe...

Bad request error when posting xml using curl -

While dragging my hair in an attempt to solve this problem, I am getting a bad request error while posting on XML using curls. My code is: $ post_string = '& lt; XML Data & gt; '; $ Ch = curl_init (); Curl_setopt ($ CH, CURLOPT_HTTPHEADER, array ('content-type: text / xml; charset = UTF-8', 'SOAPAction: ""' ')); Curl_setopt ($ CH, CURLOPT_POST, 1); Curl_setopt ($ ch, CURLOPT_URL, $ url); Curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ post_string); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); $ Data = curl_xac ($ ch); Var_dump ($ data); Any ideas on what is wrong? Below is my XML string & lt ;? Xml version = "1.0" encoding = "utf-8" & gt; & Lt; Soap: envelope xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: xsd = "http://www.w3.org/2001/XMLSchema" xmlns: soap = "http: //schemas.xmlsoap.org/soap/envelope/"> & Lt; Soaps: Body & gt; & Lt; SubmitLe...

java - Error message "cannot find symbol" -

I am quite new to Java and programming. I'm using the textbook "How to program a Java". I am solving a practice (3.11 p 136). In this exercise, I am trying to get an application with two sections to print information about a gradebook. It is considered to print two teals for each of the two objects of the class, with information: "The gradebook is the name of the course: Introduction to CS101 Java Programming, Coach Donald Duck". Some other information for Gradebook 2 I have to meet and use set-methods, and use a constructor. I have not arranged to compile "Gradebook Test Class", which contains the main method I get the following error message: aGradeBookTest.java:8: can not find the symbol symbol : Variable gradebook1 location: class aGradeBookTest System.out.printf ("Gradebook 1 is the name of the course: stressed on text% s, \ n instructor% s \ n", gradebook1.getCourseName (), gradebook 1.getInstructorName ()) ; ^ Agradebooktest.jav...

android - Custom listview -

I created a custom list view using the adapter. Each row of list view includes a profile image, text view, and 5 image views when I click on a particular item in the list, then I must display a view with 5 buttons. This new view is only after the selected row and selection Items must come in between. New view list will have the same width of view Can anyone please tell me how can I get a new small scene? Any help would be greatly appreciated. Thanks in advance Pratheeja Have you tried to optimize the extended listview is? Http://techdroid.kbeanie.com/2010/09/expandablelistview-on-android.html

c - What is the difference between writing to a file and a mapped memory? -

I have the following questions related to handling and mapping files ( mmap ): We know that if we make a file, and write that file, then we are writing memory then using the code Why map the map and If this is due to security that we mmap - PROT_NONE , PROT_READ , PROT_WRITE , then The same level of protection can be obtained by using the files O_RDONLY , O_RDWR etc. Then why mmap ? Is there any special advantage that we get to mapping files in memory, and then using it? Instead of just creating a file and writing it? Let's assume that we consider a file in the mmap memory, if we return that storage location by MMAP, then does it even simultaneously Please help me answer all the questions. Thank you very much earlier. * Edit: Sharing Files Between Thread * As far as I know, if we are between two threads (not process) If you share a file, then use it instead of using mmap in the archive and then instead of using the file directly. But we kno...

How to skip invalid characters in stream in Java/Scala? -

उदाहरण के लिए मेरे पास कोड है source.fromFile (नया फ़ाइल (पथ), "UTF-8")। GetLines () और यह अपवाद फेंकता थ्रेड में अपवाद "मुख्य" java.nio.charset.MalformedInputException: इनपुट लंबाई = 1 java.nio.charset.CoderResult.throwException (CoderResult.java माह 60) पर sun.nio.cs.StreamDecoder.implRead (StreamDecoder.java319) मैं डॉन 'कोई बात नहीं है अगर कुछ लाइनें नहीं पढ़ीं, लेकिन अमान्य वर्णों को कैसे छोड़ें और रीडिंग लाइनों को जारी रखने के लिए? आप जिस तरह से वर्णसेट डिकोडिंग को कॉल करके अमान्य इनपुट को नियंत्रित कर सकते हैं, उसे प्रभावित कर सकते हैं। आपको कभी भी वर्णसेटडिकोडर ऑब्जेक्ट सीधे नहीं दिखाई देगा, क्योंकि यह आपके लिए पर्दे के पीछे बनाया जाएगा इसलिए यदि आपको इसे एक्सेस करने की आवश्यकता है, तो आपको एपीआई का उपयोग करने की आवश्यकता होगी जो आपको सीधे CharsetDecoder को निर्दिष्ट करने के बजाय (केवल एन्कोडिंग नाम या Charset ) की अनुमति देता है। / P> इस तरह के एपीआई का सबसे बुनियादी उदाहरण है: InputStream in = ...; वर्णसेटडिकोडर डिको...

CodeIgniter session not saved -

मेरे पास परीक्षण द्वारा नियंत्रक का उदाहरण नाम है। इंडेक्स विधि में मैं सत्र बनाऊँगा, यह स्टोर करेगा डेटाबेस में सफलतापूर्वक, लेकिन जब मैं उन्हें अन्य पद्धति में पढ़ना चाहता हूँ, तो यह डेटाबेस में एक और सत्र बना देगा उदाहरण के लिए: सार्वजनिक फ़ंक्शन इंडेक्स () {$ this- & gt; सत्र- & gt; सेट_यूसरडेटा ('परीक्षण', 'परीक्षण'); } सार्वजनिक फ़ंक्शन परीक्षण () {गूंज $ this- & gt; सत्र- & gt; उपयोगकर्ता डेटा ('परीक्षण'); } यह कुछ नहीं गूंजती है और जब मैं डेटाबेस की जांच करता हूं, तो उसने नई पंक्ति बनाई। मैंने कहीं और देखा है (उदाहरण के लिए) कि Codeigniter में स्थानीय होस्ट पर कुकीज़ के साथ समस्याएं हैं और जो आपके द्वारा बताई गई समस्याओं का कारण होगा क्योंकि अगर कुकी मान्य नहीं है तो Codeigniter सत्र को पहचानने और डेटाबेस से उस जानकारी को एकत्र करने में सक्षम नहीं होगा। इस अवधारणा को सत्यापित करने के लिए आप अपने आवेदन को एक वास्तविक सर्वर पर अपलोड कर सकते हैं और वहां इसे आज़मा सकते हैं।

solr - What is the formula for calculating hit result score in Sunspot on Rails? -

कहो, मेरे मॉडल में यह कोड है: वर्ग सुविधा & lt; ActiveRecord :: बेस ... खोज योग्य पाठ: नाम पाठ: सुविधा_प्रकार समाप्त करें ... और यह खोज नियंत्रक में: @search = सुविधा। खोजशब्द (क्वेरी) करो boost_fields करते हैं: name = & gt; 1.9,: सुविधा_प्रकार = & gt; 1.98 अंत ... और मेरे पास दो सुविधा ऑब्जेक्ट हैं - सबसे पहले एक प्रकार "कैफ़े" है, लेकिन एक शब्द "कैफ़े" नाम में नहीं है, दूसरा वाला - " कैफे सूर्य ", उदाहरण के लिए, लेकिन वास्तव में एक" बार "प्रकार की हो। मैं खोज =" कैफे "के साथ खोज चलाता हूं और प्रतिक्रिया में दोनों सुविधाएं प्राप्त करता हूं, लेकिन स्कोर 5.0033 9 1 के लिए है "कैफ़े सूरज" और 1.250491 एक वास्तविक "कैफे" के लिए दूसरी कोशिश के लिए मैं सेट boost_fields: name = & gt; 1.9,: सुविधा_प्रकार = & gt; "कैफ़े धूप" के लिए स्कोर नहीं बदलता है, लेकिन "कैफ़े" कुछ हद तक बड़ा हो गया - 1.8946824 तो, जब तक परिणाम स्कोर से छंटनी न हो या क्या मैं गलत टोकनेवाल...

jquery - Ajax.BeginForm doesn't call onSuccess -

ASP.NET MVC 3 अनुप्रयोग में मैं Ajax.BeginForm का उपयोग करने के लिए लिखित पाठ नियंत्रक को पोस्ट करने के लिए। @using (Ajax.BeginForm ("पोस्ट", "फोरम", नया {धागे} = Model.Thread.Id}, नई AjaxOptions {OnSuccess = "PostReply"})) {& lt; div id = "उत्तर क्षेत्र "& gt; & Lt; h3 शैली = "सीमा नीचे: 1 पीएक्स ठोस काले" & gt; POST REPLY & lt; / h3 & gt; & Lt; span id = "post-error" class = "error-message" & gt; & lt; / span & gt; & Lt; textarea पंक्तियां = "1" cols = "1" id = "पोस्ट-पाठयरा" नाम = "सामग्री" & gt; & Lt; / पाठ क्षेत्र & gt; & Lt; इनपुट प्रकार = "सबमिट करें" वर्ग = "बटन" मान = "सबमिट करें" / & gt; & Lt; / div & gt; } नियंत्रक में मेरे पास है [एचटीटीपी पोस्ट] सार्वजनिक एक्शनरेशेंट पोस्ट (इंट थ्रेड ईडी, पोस्ट मॉोडेल मॉडल) {bool सफलता = गलत; If (ModelState.IsValid) {स...

c# - tail recursion optimization happens in visual studio 10 x64 debug but not in release? -

Basically I found a stack overflow exception in x86 mode. As I saw that the x64 tail will adapt to the reorder, so I switched to compile in x64. And it worked succinctly in debug mode .. But when I tried to run the release code, he threw the stackhawarflow again .. any possible reason? Rules complicate and sometimes change when parse recession optimizations are applied. I strongly recommend that you don

jquery - Add a modal dialog into Rails? -

I want to add an Ajax link to my application. When I click on the link, it should pop up a modal dialog, which details the event. I add this link to my assistant category. link_to (event.name, events_path (@event): remote => true Then to insert content in a hidden div I create a JS file. $ ('modal') .HTML (& lt;% = Escape_javascript (render (%);% & gt;); $ ('.modal'). Dialog (); The modal is my hidden div here but it is not able to pop up any of the model dialogues. I can not understand what the error is and it Why is not it working? Can someone help me to correct me? change $ ('modal'). Html (& lt;% = escape_javascript (render (@vent))% & gt;); $ ('modal') .html ("& lt;% = Escape_javascript (render)%>)) By seeing the JS point, your code will be invalid because you do not wrap your render in the quote and it will evaluate your HTML Edit If you are trying to link it to show click, you w...

java - Clipboard format for DOCX data -

My Java application creates a document in DOCX format using DOCX4J to send it to the clipboard for paste in Word Will happen. I know that Word will use HTML, but instead of converting DOCX into HTML (I'm not sure DocX4J supports it and I do not loose any formatting). In the clipboard format (in the Java word dataflow) can I use to send DocX data to the clipboard so that Word can understand it? I am also doing the same thing with OpenOffice Documents and for this I use it DATAFLOWER ODTEFLVER = NEW DATA FLOVOR ("App / X-OpenOffice- Source-xml; "+" presentation class = java.eo.inputstream "); How should I represent a DocX document? In the case of Open Office ODT, I pass the Intestream stream created with the ODT file. I believe there is a similar question asked by David Thillin here: but there is no answer. You can export the worst case, docx4j HTML, so that you can do this. Or you can use RTF using FOP to create Docx4j PDF, so that you can us...

java - PDF printing to client's printer without opening them -

I am working on the web app developed in Java which is with the running strings on Tomcat as I have in the web application There is a requirement: A JSP page containing a list of PDF files associated with each checkbox. There is a button in the JSP page, once the user selects PDF documents, then he wants to print by selecting the corresponding checkbox, the user clicks on the button. Then all selected PDF documents should be sent to a specific local printer (eg printer connected to the client machine from which the user is accessing the web application). Selected PDF files should not be lost in Acrobat Reader or in Browser. The PDF docs should not be visible to the user while being sent to the printer. Can anyone help me in implementing this requirement? Possible with Internet Explorer and ActiveX Auto print with Google "And" silent printing "You may have to reduce security settings in Internet Explorer. We are using it for some intranets from our consum...

What's the best way to create multiple backgrounds using HTML5 and CSS and keep markup semantic? -

What is the best way to create multiple backgrounds with HTML 5 and CSS and keep your markup sense? I realize that CSS3 supports many backgrounds, but I also want to use gradients and are interested in how this is practically done - not just its principle. The traditional approach might be something like this: & lt; Div class = "background-outer" & gt; & Lt; Div class = "background-internal" & gt; & Lt; Article class = "exit-news" & gt; & Lt; P & gt; We'll talk about some exciting things here & lt; / P & gt; & Lt; / Article & gt; & Lt; Div & gt; & Lt; / Div & gt; I have to do a method that is cross browser friendly and does not include any programmatic work in Javascript or ASP.NET / PHP etc. This is just More vocabulary can be a case of using class names, but I've been stumped! Note: Someone may have already answered it but it is difficult to find, if it is a repetitio...

How to get vim to format bulleted lists with correct indentation -

I can set text width option in VIM and then formatted to wrap new text. I can also use the "gq" command to wrap the text clearly, however, the behavior of bulleted lists is slightly unpredictable for me. Vim documents use bulleted lists with hyphens for bullets. When I try to do this, it starts fine: - This is a bulleted list item that is wrapped. I'm liking it. However, if I continue on a third line, it returns to indent: - This is a bulleted list item, on which The indentation is unexpected for lines after more than two lines have been wrapped. This happens with: formatoptions = tcq Comments = s1: / *, Mb: *, ex: * /,: //, b: To be clear, I would like the indent like this: - - This is a bulleted list item which is more than two Is wrapped went on Ainon. I want to first line each line to get the same indent, after looking forward, it seems that I just need to "set autodend". Get the expected behavior It works well to wrap the text ...

How Can I close the service for a specific user in Exchange Server 2007 -

I'm new to touching program 20077 programming. My scenario is to read the mail from more than one user account at a time. I am now reading a user's information, but not for the other user at the same time. Can someone help me to get this? I'm assuming how I can stop the service for a specific user and continue with the same service to another user. This is the time limit situation. Immediate response can be of great help. In advance thank you Assume that you use Exchange Web Services or EWS managed API You are using, you do not have to stop anything. While viewing Approvite permissions (this is exactly what you really need), just open another user by mailbox by specifying the user's primary email address in the bind operation: var folder = folder Bine (Service, New Folder ID (WellenFolderName Inbox, New Mailbox ("someone@company.local")));

On demand color set of rows in SmartClient (TreeGrid) -

I have a tree grid in the SmartClient. Now I can change the lines of some lines like Line Number 3-5, 7-11 etc. Want to I am using an external button that passes the value of the smartclient. Can anyone tell me how to do that? A button value is passing and it is working fine. But the problem is, where can I find the value in the SmartClient and how I will paint the set of lines. Since tree grid is a list grid, I think that you can override the getCellStyle function and change the colors. Then basically in the pseudo code: if (line> = 3 and row & lt; = 5) Return "style1" if ( html>

windows - Undeletable Folder in java -

I tried to create Undeletable folder using Java code. I use "cacls (folder name) / e / c / d% username% at the command prompt at the command prompt. Then I tried to implement it in my Java class (Eclipse IDE). It does not work. UndeletableFolder.java import java.io.buffferedReader; Import java.io.file; Import java.io.FileInputStream; Import java.io.FileOutputStream; Import java.io.IOException; Import java.io.InputStream; Import java.io.InputStreamReader; Public class unseen folder (public static zero main (string algos []) {runtime RT = runtime.gettime (); String cmd = ("cacls hide / e / c / d% username%"); ProcessorBuilder P = New process builder (new string [] ("CMD.exe", "/ c", CMD}); Processor pro; try {pro = p.start (); InputStream = Pro .getInputStream (); InputStreamReader isr = New InputStreamReader (buffated reader); New buffated reader (ISR); string line; while ((line = br.readline)! = Null {} System.out.println (line);}} hold (...

javascript - How to change cursor style when hovering the Google Plus One button -

I want to change the cursor style when users press the Google "+1" button. I tried to use the div tag and tried to add the style attribute, but it is not working. & lt; Div class = "g-plosone" data-size = "tall" style = "cursor: wait" & gt; & Lt; / Div & gt; & Lt; Script type = "text / javascript" & gt; (Function () {var po = document.createElement ('script'); po.type = 'text / javascript'; po.async = true; po.src = 'https://apis.google.com/js/ Plusone.js'; var s = document.getElementsByTagName ('script') [0]; s.parentNode.insertBefore (po, s);}); & Lt; / Script & gt; I think we have to add something in their JS code. +1 has a button with these sections: class = "esw eswd" , and when hovered, this: class = "esw eswd eswh" You can get this element with jQuery and control it: For example: // with jQuery: $ ("button.esw.eswd...

javascript - resize a canvas and duplicate the resized content inside another one -

How can I duplicate the contents of a resized canvas inside each other? If I make a picture within the canvas and after that I will resize it, when I clone the material, then I mimic the canvas first on its original size, even if its shape has changed . html: & lt; Img id = "image" src = "the-image.png" width = "275" height = "95" /> & Lt; Canvas ID = "canvas-image" width = "275" height = "95" & gt; & Lt; / Canvas & gt; & Lt; Canvas ID = "canvas-small" width = "138" height = "48" & gt; & Lt; / Canvas & gt; JS: var img = $ ('image'); Var cnvImage = $ ('canvas-image'); CtxImage = cnvImage.getContext ('2d'); CtxImage.drawImage (img, 0,0); CnvImage.setStyles ({'width': 138, 'height': 48}); Var cnv Little = $ ('canvas-small'); CtxLittle = cnvLittle.getContext ('2d'); CtxLittle.drawI...

java - What are some tips on shortening the classpath in ant? -

While deploying my application on the Hudson Server (Windows machine), I'm having trouble calling java.exe because my class-path is too long - Windows taps after a few lengths. Classpath basically hundreds of jar files separated by semicolons Assume that the lower squared will be very large if every jar is clear To be listed in the form space: & lt; Path id = "classpath.project" & gt; & Lt; Fileset dir = "lib" includes = "** / * .jar" /> & Lt; / Path & gt; What can I do in ant to reduce my squares? You can do Google for the wages if you want to do it yourself, a "blank" Generate a jar file, which contains only one manifest, add the "class-path: a.jar, other .jer, bli-blub.zer" line containing all the necessary jars in the manifest. (Google for "manifest class-path") (can be done with an ant) ​​provided that all jars have been deployed AAS, usually you just need a blank "jar fi...

java - ListView "onPopulate" Listener? -

I want to set an initial scroll state in a ListView. I thought I can do this by calling list.setSelectionFromTop after adapter.notifyDataSetInvalidated , but certainly notify the list view only later And the actual population can be later. When the list view itself is populated, then can I change the scroll, as can be reported? OK, then I can change the code on onFinishInflate and onSizeChanged Tried it, but they did not work. Worked later, if the number changed, if the number had changed, but otherwise the data was changed. I tried to do everything then, and the ways to work for override were onFinishInflate and onSizeChanged . They are also called on scrolling. In fact, the ListView s layout is the last line in the call to call invokeOnItemScrollListener , so it is detected You do not need to extend ListView , but you can only set one onScrollListener . No matter what type of solution you choose, you still need to work manually about the problem of...

symetric encryption with key for javascript and ruby -

I want to encode a number which will be 10 digits long by key with ASCII characters. The encoded string should be decodable with the same key, which should return the decoded number. 10 = & gt; Encoding_digit ("secret_pass") = & gt; Hash = & gt; Decoding_with ("secret_pass") = & gt; 10 Both tasks should work in JavaScript and Ruby in a similar way. Which algorithm should I use for this purpose? All data should be in ASCII, no multibyte data for input, hash and key. Should be a simple XOR is enough. Yes, you can go overboard and break the complete crypto suite, but since part of the algorithm will run in-browser, JS ( In a completely unreal environment), any attempt on serious cryptography will give you one (in other words, in fact, your system will less secure). If you are trying to protect the data in transit, use the tool for the job; In this case, HTTPS.

visual studio - Custom building SGEN assemblies and including in installer -

I am confused with some SGN stuff. I have enabled the generation of the serialization assembly for one of my projects, basically I get a follow-up error, which I believe is that I have solved some remnant assembly with some cursor material. Unable to load one or more request types Recover LoaderExceptions propery for more information Now however, I do not get an assembly generated. Adding some debugging / verbose output provides the message "SS.dll does not contain any type that can be serialized using the XmlSerializer" message. I have read that this is due to the proxy switch implemented by VS. The strange thing is that it is not a problem with any other project. So if I disable proxy switches () it starts working Linked Build event Although all projects do I have not enough information about MSBuild to learn about only one project, Does anyone know what I need to change? In addition, if this change is made, is there any way I can add it automatically to an i...

multithreading - Asynchronous view manipulation android -

I have a little problem, I want to spend a lot of time now. I hope you can help me. OK, I have an activity witch load content out of the data base in the background, it gives asynchrony and modifies my data model. Now I'm exploring a good way to inform the administrator about updating the updates. I use the data changer method but I got an exception. Android does not allow modification of one view from another thread. In my opinion, this is a basic functionality so there should be a way to implement such functionality. Can you give me an indication I also look at the content supervisor class. But I do not think the correct one thanks Please enter your activity Provide some code snippet from code>. If you are using asynkTask which is the best method of background processing on data, you should use the onPostExecute () method to update your code, because doInBackground () runs on a background thread, not on UIThread. You must declare a solution in your ...

c++ - Error 411 (Length Required) in post request with header, but header has Content-Length. libCurl -

मैं इस विकल्प का उपयोग करता हूं: curl_easy_setopt (कर्ल, CURLOPT_URL, url अपलोड); Curl_easy_setopt (कर्ल, CURLOPT_ERRORBUFFER, त्रुटि बफर); Curl_easy_setopt (कर्ल, CURLOPT_POSTFIELDS, body.c_str ()); Curl_easy_setopt (कर्ल, CURLOPT_HTTPHEADER, हैडर); यह शीर्षक के साथ पोस्ट अनुरोध होना चाहिए। और हेडर वैरिएबल में लम्बाई है *** चार आकार एसटीआर [50]; स्प्रिंटफ (आकार एसटीआर, "सामग्री-लंबाई:% d", body.length ()); *** शीर्षलेख = curl_slist_append (हैडर, आकार एसटीआर); *** मैं क्या करने की कोशिश कर रहा हूं यूट्यूब पर वीडियो अपलोड करना है, मैं का उपयोग कर रहा हूं और मुझे ऐसा त्रुटि मिलती है। & lt;! DOCTYPE html & gt; & Lt; html lang = en & gt; & Lt; मेटा वर्णसेट = यूटीएफ -8 & gt; & Lt; title & gt; 411 त्रुटि (लंबाई आवश्यक) !! 1 & lt; / title & gt; & LT; शैली & gt; * यहां कई प्रतीक * & lt; / style & gt; & Lt; a href = // www.google.com/ आईडी = g & gt; & lt; आईएमजी src = // www.google.com/images/logo...

math - GIF data block formula -

यहां GIF विनिर्देश में: यह स्पष्ट-कोड देता है के सूत्र: 2 ** codeize गणितीय बोलने वाला, उपरोक्त सूत्र का क्या मतलब है? क्षमा करें, मुझे जाहिरा तौर पर 8 के मुताबिक इस सवाल को फिर से खोलें, लेकिन GIF विनिर्देशन में दिया गया उदाहरण 16 को उनके फार्मूले के उत्तर के रूप में बताता है: उदाहरण के लिए यदि कोड का आकार 4 था (छवि 4 थी बिट्स / पिक्सेल) स्पष्ट कोड मान 16 (10000 बाइनरी) होगा। यह कोडेज़ की की शक्ति के लिए उठाए गए 2 का मतलब है ** एक्सपोनेंटिएशन के लिए नोटेशन फोरट्रान से आता है, मुझे विश्वास है।

php - Problem in use of json_encode? -

I insert the data into the database with json_encode () , now I should get ( select * to & lt; table & gt; ... ) only the name_unitsin database? I want the output to- & gt; Hats & amp; Mokhle & amp; [{"Name_units": "salam", "price_units" in fadat database line units : : "", "Box_inits": "[" minibar "," mobileman "]}, {" name_units ":" mock "," value_accept ":" 4,851,269 "," checkbox_news ": [" mobleman "," tv "] } "" "" "" "," Value_anounts ":" 85,642 "," checkbox_notes ": [" minibar "," mobelman "," tv "]}] $ query_hotel_search = $ this- & gt; db- & gt; query ("Select * FROM from the hotel name where the name '% $ hotel_search%' is entered ) "; $ Data = array (); foreign currenc...

iphone - How to remove the default UISearchBar len? -

I was looking for it for a while & amp; I do not know anything about it! How can I hide / hide this LAN, thanks to the left side of search! This is not supported but UISearchBar, although you can capture UISearchBar and some image editing tools You can also remove the magnifying glass and then use this image with UIButton and mimic the functionality of UISearchBar.

c# - linq with groupby and count -

It's very easy, but I'm hurt: looking at this type of data set: UserInfo (name, metric, day, other_metric) and this sample data set: joe 1 01/01/2011 5 jane 0 01/02/2011 9 John 2 01/03/2011 0 Jim 3 01/04/2011 1 Gen 1 01/05/2011 3 Jail 2 01/06/2011 5 Pock 0 01/07/2011 3 Jen 0 01 / 08/2011 7 I would like to retrieve the table that sorts the metric (0,1,2,3 .. ..) counted with the total number of is. So you can end this set: 0 3 1 2 2 2 3 1 I'm battling the LINQ syntax but where is anyone The group was kept and counted .... any help ?? EDIT: I was never able to answer the answers posted because they always have a record with the number of different calculations. Although I could put SQL instance together from a LINQ that used to work: according to the information from var pl = R. r.metric group r by r.metric in grp new {key = Grp.Key, cnt = grp.Count ()}; This result gave me an ordered set of records with the 'metric' and the number of use...

In ASP.NET Webforms, how do get my control to work in a link tag's href attribute? -

I have a situation where I need to load url prefix dynamically. I have a quick control to control it and it works for the following example:

How can I speed up insert/update 1-2mb text field in MySQL? -

I write bots that collect web pages, but some pages are 1-2MB (normally larger than Pantip. .com) Thank you in advance You definitely need to increase max_allowed_packet and restart mysql. One of MySQL's selected killers is MySQL packet that is controlled. p> Understand what the MySQL packet can do. According to , here paragraphs 1-3 are understood: The MySQL network communication code was written down the assumption that the questions are always weak, and therefore by the server A segment can be sent and processed, which is called packet in the MySQL terminology, the server allocates memory to store packets for a temporary buffer, and it fully assigns it to This request is enough to fit this Iteccr need for caution to avoid being run out of memory the server is a cap on the packet size, which meets this option. This option is found in the code of interest SQL / net_serv.cc . Take a look at my_net_read () , then follow the call to my_real_read ()...

c# - Switching from POST to GET for jqGrid populated from WCF back-end -

I'm trying to change my client side AJAX-calls and jqGrid to use GET instead of POST . I have confirmed that working with the purpose of service is checked in firebug and inspected the JSON reaction object and that is correct - although I am still missing something on the client side because the data No specific javascript errors are seen in the firebug not coming in the grid. I have a question about how to contact the .jax () request URL / data parameters when using GET instead of post. I do not really need to pass a parameter through the data parameter if I can exceed the parameters with the specific urlplate in the URL, then I think? function getData (pdata) {var jqGridArgs = {startdate: pdata.startDate (), expiration date: pdata.endDate ()}; Var _url = "Service. Svc / product? S =" + jqGridArgs.startDate + "& e =" + jqGridArgs.endDate; $ .ajaks ({type: "GET" content type "application / Jason; charset = UTF -8", url: _uarel,...

URL rewriting going from www.example.com/blog/blog.php to just www.example.com/blog/ -

I have a site in the blog section to get me to www.example.com/blog/blog.php and I would like to use www.example.com/blog/ Folder structure I have a blog.php inside a folder called blog, can I rewrite blog.php and add the blog to the top level? As I know you want to show up to blog.php If the user has typed www.example.com/blog/ in the address bar. You will try to rename blog.php to index.php (You have not provided any additional information about your web server; I think this load Index.php as the start page by default).

android - HorizonatalScrollView on TabWidged "steals" space -

I have a tab activation with custom tab widgets. I want to add more than 5 tabs, unlike the menubar, which are dynamically Adds a "more" button, the size of the tabs is changed and looks poorly. That's why my first attempt was to wrap my tabwidts in a horizontal sculview. The problem is, that I have list list tabs in the form of content and its last item is hidden behind my tabwidts. This is the layout for my tabviv Android: Android: Android: layout_width = "fail_parent" Android: layout_heat = "wrap-content" Android: fillViewport = "true" Android: scrollbars = "none" Android: layout_linesparrebottom = "true" & gt; & Lt; TabWidget Android: id = "@Android: ID / Tabs" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" android: layout_gravity = "center" /> & Lt; / HorizontalScrollView & gt; & Lt; / RelativeLayout & gt; & Lt...

html - jQuery load() code not working in Google Chrome -

I'm stuck here with a little jQuery problem! I am using this code to load the contents of the HTML code (bio.html) into a Diva Container (Content). It works in IE8 and Firefox 6, but not in Google Chrome! Any thoughts that I am doing wrong? Here's the code: & lt; Head & gt; & Lt; Title & gt; Test & lt; / Title & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Script type = "text / javascript" src = "./ js / jquery.min.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & lt; Div id = "content" & gt; Hello & lt; / Div & gt; & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('# content'). Load ('./ html / bio.html');}); & Lt; / Script & gt; It works fine for me in Chrome If you see any unexpected errors, then try to...