Posts

Showing posts from July, 2013

java - How to dispose wizard pages? -

I have created a "complex" composite, which contains some widgets and hears for some events (i.e., it's a And registers itself in the element). I have also applied a displacement method in that composite, which cancels itself from the information and calls the settlement at composite ( super.dispose () ). I use this widget in a number of places including a page of a wizard, however, it seems that when the wizard closes (either "finished" or "canceled"), my widget was settled Does not happen. In fact, the disposal of the method of wizard page is very simple, because it only clears the image. Am I forgetting something or do I have to execute clearly on my composite? You implement your dissection () in your "complex" composite class This widget can explicitly call resources to clean allocated resources within its implementation of the wizard page, break () method, but it only works for the wizard page !. A better way to execu...

java - How can I use JDBCTemplate from Spring JDBC in a Swing desktop application? -

I use many JDBC codes in my swing desktop application. Now I read from JDBCTemplate with Spring in Spring in Action and it looks like a good API to work with JDBC. But Spring JDBC needs some XML configuration files for beans Can I use JDBCTemplate without these XML configuration files (for example, with annotation)? Or how can I use this JDBC template in the swing desktop application for database access? You create a Spring @ configuration without a XML by creating aoted Java class and reference To create a configuration, create a Spring Context using the Antenna Conflict AppLogging Contex class See a code sample.

ruby on rails - No pics in my PDF created with PdfKit on heroku -

I have an app that works well in development and on my current production server. I want to move Heroko free (basic configuration: 1 Dino, 1 employee). Unfortunately, PDF generation ( PDFKit use ) is okay, but without pictures defined in my CSS An alternative solution has been found, but I'm still eager to know a better option: A different file is included in a dedicated view for HTML only Finally, Strong> view for the PDF: .foo {background-image: url ( / public / images / Bar.png)} > This is probably an issue in the manner described in the URL CSS. As I remember, they should be file paths full path. What does your CSS look like?

wpf - Dynamically change implicit style -

I now have some tabs in my app that are styled mutually. I want to add my app "night mode" and change my style. How should I go about this? You can do all your "normal" styles in a dictionary with merged dictionaries Keep it in the app resources by default: & lt; application. Resources & gt; & Lt; ResourceDictionary & gt; & Lt; ResourceDictionary.MergedDictionaries & gt; & Lt; Source Source = "Styles / Normal.xml" /> & Lt; /ResourceDictionary.MergedDocs> & Lt; / ResourceDictionary & gt; & Lt; /Application.Resources> Then you can remove the existing dictionary and load each other dynamically: Private Zero ChangeStyles () {App.Current.Resources.MergedDictionaries.Clear (); StreamResourceInfo resInfo = App.GetResourceStream (new Uri ("Styles / New Style .xml", Uricund.Relative)); XDocument xaml = XDocument.Load (resInfo.Stream); ResourceDictionary resource = XamlReader.Load (xaml...

java - Glassfish Asynchronous only using 2 cores out of 4. Anybody know how I can tell it to use all 4? Or at least 3? -

Install Ubuntu Quad-Core Glassfish I want to tell glassfish to use all 4 cores for the process of async jobs Because it's just using 2 now. I do not find any setting to specify that though. Does anyone know where it can be? I do not know glassfish, but the points are still valid: Not to mention what the worker thread is doing, or which version of glassfish you are using ... If worker threads are not doing much, then it is possible that you are on a web server If this is the case, then I suggest that you have some threads in the sublet. If you do not, then try the following ... There is also a JMX interface ... there is an attack around it, you think that the worker pool size is only 2 threads ... Just a guess ...

javascript - Getting file upload status without AJAX -

It seems that the information is already being output to the user by a browser, something to be accessible in the DOM Ways to Use Through Javascript When you upload a file using an old IFrame trick using a webkit browser (and possibly other), then the browser window displays an upload percentage in the status bar at the bottom. Instead of needing to ask the server for the same information, it would be astonishing to be able to tap into it. Has anyone ever tried to do this? I have tried to do something like that. You can get upload information only when using the old method with iframe to upload a file if you have an API server side (for php) with javascript as much as you can know, equals start and interval Uploaded (using iframe onload event). You can use an animated GIF file when the file uploads start and delete the animated GIF after it expires (which causes the iLame event of the IFrame). Then upload status to uploaded IFrame. After the upload finishes, you can do some ...

c# - Is Interlocked.Decrement(i) right for Parallel.ForEach()? -

अतीत में मैंने यह किया है: सूची & gt; आइटम & gt; _Items = GetItems (); Int _CountDown = _Items.Count; (पृष्ठभूमिवर्कर _Worker = नया बैकग्राउंडवर्क ()) का उपयोग करना {_Worker.DoWork + = (s, arg) = & gt; {डोसोमिंग (_Items [_CountDown]); }; _Worker.RunWorkerCompleted + = (s, arg) = & gt; {If (System.Threading.Interlocked.Decrement (ref _CountDown) == 0) RaiseAllDoneEvent (); अन्य _Worker.RunWorkerAsync (); }; _Worker.RunWorkerAsync (); } समानांतर के साथ मैं ऐसा कुछ करना चाहता हूं: सूची & gt; आइटम & gt; _Items = GetItems (); Int _CountDown = _Items.Count; System.Threading.Tasks.Parallel.ForEach (_Items, (i) = & gt; {DoSomething (i); यदि (System.Threading.Interlocked.Decrement (ref _CountDown) == 0) RaiseAllDoneEvent ();}); मेरा असली प्रश्न यह है कि इंटरलॉक किया गया है। अधिग्रहण () यहां सही है? समानांतर। फोरेईक तब तक अवरुद्ध करे जब तक कि सभी वस्तुओं को संसाधित नहीं किया जाता है- यहां पर करने के लिए सही बात कॉलर से रैसेअले डोनइवेंट () को समा...

iphone - How to use pattern to simplify the UIPopoverController management? -

UIVopController (parent) & gt; It is always uncomfortable to use UIPopoverController with the hierarchy of the view controller. UIPopoverController & gt; UINavigationControler & gt; UIViewController. Alternatively, it is likely that many pop-ups need to keep a book and display at the same time. The same bundle of most time code is copied and pasted from this class to another. Patterns like variables declaration / @products / retaining / @syntheses / release can not be terminated. What is the good OOP pattern to make management of UIPopoverController easier? You can create subclass for UIPopoverController (like ). MyPopover ) and add all the standard code you want. Then create the sub-category of MyPopover where you only add specific code. However, I guess that this does not give you less amount like diarrhea. The reason is that the things you mention (qualities, preserves, synthesized, release etc.) actually There are standard code blocks which can seem to ...

jquery - Why does VideoJS's $("#video")[0].player.pause() break in IE8? -

I try to control the play and stop function of an HTML5 video by using the plugin and the following command: / P> $ ("#clip") [0]. Player (.); Everything works well in Safari, Chrome and Firefox, but not in IE8 Debugger says: this.player is not empty or an object. This command also works in other browsers, but not in IE8: $ ("# clip") [0] .pause () ; Any ideas? tag does not support IE8 html5 video

c++ - How is dynamically allocated space freed when a program is interrupted using Ctrl-C? -

निम्न कोड को देखते हुए: #include & lt; stdio.h & gt; Int main () {int * p; P = (int *) malloc (10 * आकार (int)); जबकि (1); वापसी 0; } जब उपरोक्त कोड संकलित और चलाया जाता है, और Ctrl + C को दबाकर निष्पादन के दौरान बाधित है, तो p को आवंटित स्मृति कैसे है मुक्त है? यहां ऑपरेटिंग सिस्टम की भूमिका क्या है? और यह कैसे जब कोई प्रक्रिया समाप्त हो जाती है, ऑपरेटिंग सिस्टम सभी मेमोरी को पुनः प्राप्त करती है जो कि प्रक्रिया का उपयोग कर रही थी। ओएस आपके ऐप को मेमोरी को पुनः प्राप्त करते समय भी लोगों को मेमोरी लीक से बड़ा सौदा करने का कारण जब यह समाप्त होता है तो यह प्रयोग होता था कि आमतौर पर गैर-तुच्छ अनुप्रयोगों को सिस्टम पर सभी मेमोरी को धीमा करने के लिए लंबे समय तक चलेगा। यह बहुत ही कम-आजीवन कार्यक्रमों के लिए कम समस्या है (लेकिन आप कभी भी नहीं बता सकते हैं कि जब एक लाइनर एक बड़ा कार्यक्रम बन जाएगा, तो छोटे कार्यक्रमों में भी कोई मेमोरी लीक नहीं है।)

opengl - Is there any way to make a row of tiles work with GL_QUAD_STRIP? -

If I want to draw a line of 2D square tiles for a game, then the obvious way is to use GL_QUADS and 4 is to specify the top and texture coordinates for each tile but since it is a line of square tile, the last two coordinates of each class are two of the next one over, which is actually designed to look like GL_QUAD_STRIP is. You are not repeating all the interior corners in the end. The problem comes when you try to apply the texture when you attract them as the "end" of the quad, the texture coordinates are already bound, but when you If you want to reuse the last two as the beginning of the next quad, you do not need to reassign them to the new textured coordinates. The tile you use is directly near the tile which you Sector Tailset texture of went last tile used. Is there any way to do this work? Or do you just have to live with GL_QUADS and repeat them twice? Later versions of OpenGL have to restart primitive while drawing from an array array Presented a w...

c# - Text from SQL Server to a label -

How do I select a column from my SQL server and put it in a label, and then the label always shows the latest (I have daytime ) This is a good article for you to read and follow. There are 4 parts in it. You will find your answers there and learn the basics.

imagemagick - MagickWand for C, error when calling DestroyPixelWands -

I am starting to use the ImageMagic and Magicwand API in a simple program. Right now, as a test, I'm looking for black pixels in just one frame here. My code is: int find_black_pixel (MagickWand * wand) {int res = 0; Pixeliterator * iterator = new pixelitter (rod); Size_t width = Maggiegeimagewidth (rod); Size_t height = maggiegmegehight (rod); Pixelwand ** pixel; Unsigned long X, Y; Unsigned integer alpha; Unsigned int red, green, blue; // printf ("width:% d, height:% d \ n", (integer) width, (integer) height); For (y = 0; y & lt; height; y ++) {pixels = PixelGetNextIteratorRow (iterator, and width); {Alpha = (unsigned integer) (255 * pixelgate elf (pixels [x]) for (x = 0; x and lt; width; x ++); If (alpha == 0) will continue; Red = (unsigned integer) (255 * pixelgatered (pixels [x]); Green = (unsigned integer) (255 × pixelgategreen (pixels [x]); Blue = (unsigned integer) (255 × pixelgate (pixels [x]); // printf ("% 04ld,% 04ld, alpha:% D, RGB:% d,% d,% d...

c# - TransparencyKey Property on Forms -

I would like to clear the background transparency of my form in a Windows Forms application with Visual C #. I used backclosure = color White; Transparency = Color White; Now I want to switch back to "not transparent". How can I do this? Just switching back to Beller, the elements of the form seem weird and it looks ugly. I think there is a way to reset the property. How about storing previous values ​​of backenders and transparency in local variables, and when you use non- -Traders want to return, so they should be restored? For example: Private color _oldBG; Private color _oldTPKey; Private Zero MakeTransparent () {_oldBG = BackColor; _oldTPKey = TransparencyKey; BackColor = Color White; Transparency = Color White; } Private Zero MakeNonTransparent () {BackColor = _oldBG; Transparency = _oldTPKey; }

spim - What is the meaning of "" in MIPS comments? -

I have recently started learning the assembly through MIPS, and I have found that for some reasons, QiTspim comments Removes anything inside and while showing the original source in the "text" window between the Apple brackets: [snip] sll $ 0, $ 0, 0 # This text shows QtSpim sll $ 0, $ 0, 0 # and this & lt ;, but it & gt; No [Snip] Is this a feature of some comment comments from MIP, I am not getting anything, or is it just a weird bug in QiTspim? Good ... # There is a character to start a comment in the MIPS, then on that line Everything should be ignored after #It is possible that the editor is getting confused and does not handle the comment correctly or there is no unrelated reason for italic ...

iphone - Moving a CLLocation by x meters -

I have a CLLocation defined, and I want to take that point before x meters and south of y meters I am How can I get it? There is a function that is close to what you are asking but it takes an effect and distance This is in my utilities geo class. You can pass latitude and longitude from your CLLocation and then create a new CLLocation from the resultant layout 2 and loan 2 which gives it: / * ------ ---- ---------------------------------------------- ---- ------------- * An initial latitude / lane point on the earth, in the distance (in meters) * and the effect, calculates the destination coordinates lat2 / lon2 * * All parameters in degree * ------------------------------------------- - ---------------------------- * / zero distortioned indegrad (double latte 1, double lawn 1, dub Distance Meter, double effect, double * Flat 2, Double * lon2); If you can not use it, take a look at the algorithm that was derived from it and you can modify it or some of those sites close...

c# - Yet another DeflateStream decompression problem (using using and memory streams) -

First of all, I see that the object requires more byte for compression, even though the object is binary Appears in the form. (228 vs 166). Second, I can not uncompress it. In addition, I can not use good copy functionality because I do not have version 4 .NET Framework with the help of block should go to the final DeflateStream? MyClass MyObj = New MyClass (); MyObj.MyProp1 = True; MyObj.MyProp2 = "D"; MyClass MyObAfterSerDeser = Null; (MemoryStream MS = New MemoryStream ()) Using {BinaryFormatter bf = New BinaryFormatter (); Bf Cyrilize (MS, Myos); Byte [] PREBITS = MS. Toure (); // Length 166. ms.SetLength (0L); (Deflestream TMPMS = New MemoryStream ()) (DeflestStream DSC = New DefaultTerm (TMPMS, Compression Mode. Compress)) {DSC. Worth (PREBITES, 0, PREBITT. LANG); Tmpms.WriteTo (MS); // unforunately though, just want # of compressed bytes }} Byte [] cbytes = ms.ToArray (); // length 228. longer than uncompressed version! Ms.SetLength (0L); (Memorystream TMP...

multithreading - Where should I put "exec this when jobs 1 .. n are done?" -

I have some parallel codes and a thread pool. And I need to send 15 jobs, and when all 15 are completed , this particular task should be performed "Job 16". You can only complete "Job 16" Jobs 13, 14, 15. Therefore , you should have a way to count. My question is, where is the responsibility related? In the calling code : Use a static / global variable that will increase the end of every job of jobs 1-15 counter ++ When the counter == 15 , exec job 16 in the thread pool : execute Thunderpool "execute" when no work was submitted In the callback : (It is the responsibility to see that 1-15 jobs are completed, spin / sleep otherwise) You can also capture this behavior in your class, and raise an incident when your job is completed to trigger your 16th job queue: internal class parallelBatchRunner {public event EventHandler full = delegate}; Public Zero Run (list & jobs; task & gt; function) {int count = taskss....

jquery mobile individual page background -

Unable to stop adding an image to a jquery mobile page and preventing it from being duplicated. OK for mobile devices but when viewed on tablet or desktop 'thank you!' & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; JQuery mobile web app & lt; / Title & gt; & Lt; Link href = "..// jquery-mobile / jquery.mobile-1.0a3.min.css" rel = "stylesheet" type = "text / css" /> & Lt; Script src = "../ jquery-mobile / jquery-1.5.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "../jquery-mobile / jquery.mobile-1.0a3.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div data-role = "page" id = "page 1" data-theme = "b" styl...

mysql - PHP/Javascript countdown script -

Note * I need something that fixes it and me Tell me how they did not make tips about doing this, or coments * About PPND Java, I have a countdown The script is working, but when it hits the target date, the timer stays going on negative times. I want to stop the date of that goal and just want to display a refinement message. This is live on my site. I need help editing the countdown script. I want to have the same layout. I need some help in adding a finishing message and preventing it from going on a negative date, or 0days, 0 hours, 0 minutes until it is officially released on the site. Can not be displayed for 0 seconds. When this is the last, I want to display this message. Countdown script & lt; Php date_default_timezone_set ('EST'); ? & Gt; & Lt ;? Php // Set your target date here $ targetYear = 2011; $ TargetMonth = 9; $ TargetDay = 1; $ Targeth = 20; $ TargetMinute = 00; $ Target seconds = 00; // Last Goal Date Definition // Defined...

php - json_decode returns NULL on string that has passed through encryption -

I'm trying to secure information on its database and is the standard type of data JSON and I have some simple Mcrypt function that encrypts any text and decrypt, they are: function encrypt ($ key, $ data) {$ encrypted_data = mcrypt_cbc (MCRYPT_RIJNDAEL_192, $ Key, $ data, MCRYPT_ENCRYPT); Return base64_encode ($ encrypted_data); } Function decrypt ($ key, $ Ankripteddeta) {$ decrypt = mcrypt_cbc (MCRYPT_RIJNDAEL_192, the $, Base64_decode ($ Ankripteddeta), MCRYPT_DECRYPT); Return $ decrypt; } I have a valid JSON string and I tested json_decode without passing through encryption, and so am but when I encrypt it works It tries to decrypt then to json_decode , it only returns NULL . I'm just now debugging it in a simple script: Include ("coreFunctions.php"); $ Arr = '{"number": "4646464646", "type": "home"}'; $ Key = "Ladida"; $ Lock = encrypt ($ key, $ arr); Var_dump ($ closed); Var_dump (j...

Javascript to Java Applet communication -

I am trying to pass a selected value from the HTML drop-down with an applet method using the setter method in the applet I am But every time Javascript applies, it shows that as an exception, "objects do not support this property or method". My Javascript code: function show selected (value) {warning (+ value given from "value"); Var diseasename = value; Warning (diseasename); Document.decisiontreeapplet.setDieasename (diseasename); Warning ("I'm after value set"); } My applet code: package com. Facility; Import java.io.phileNotFoundException; Import java.io.IOException; Import java.io.InputStream; Import java.net.MalformedURLException; Import java.net.URL; Import java.net.URLConnection; Import prefuse.util.ui.JPrefuseApplet; Public Square DynamicTreeApplet, JPrefuseApplet {Personal Stable Last Long Serial VersionUID = 1L; Public static int i = 1; Public string डायसनामनामको code; //System.out.println("asjdjkhcd"+dieasenameencod...

haskell - FunGen in Ubuntu -

I have successfully installed Ubuntu, mainly making Haskell libraries work easier than Windows. When I run some Haskell code on which I was working, it just closes my socks. I am using Fengen libraries for my game and I get this error when I tried to run it. FreeGlot (Fengen app): Error: Internal error & lt; FBConfig with the necessary capabilities nt found & gt; Error in unsuccessful request in fgOpenWindow X: BadWindow (Invalid Window Parameter) Key Opportunity of Failed Request: 4 (X_DestroyWindow) In Failed Request Resource ID: 0x0 Serial Number of Failed Request: 33 Current Serial Number in Output Stream: 36 After some web search, I found a way to fix this in C code, (using GlDouble instead of GlDDouble ), And I am using my Haskell code type in Graphics.Rendering.OpenG L.Gldouble One more research told me that type GlDouble = double, therefore, this is not the reason, besides, I just removed the gldouble part in the code and still it Does not work. So, h...

vb.net - How do I delete number of files from folder in asp.net? -

I have a list of albums and albums. Now I want that when I delete a particular album, its photos will also be removed. The name of the images of a particular album is "ID 1, such as the album's name should be 1_1.1_2, hence the name of the name of" 1_ "in the time of the album's extinction.How do I remove the images, I have been confusing the "1_" in the prefix. My code is String = "imagefolder = Server.MapPath (" ~ / ") as a Col_Alb_Ids Dynamic Image file in each album_id. DesktopModules / Albums / Images Upload / ") as String Ss = string_l_id and" _ "i Magefolder.Contains (ss) Dim AA string = imagefolder + ss if file.exists (imagefolder.contain (aa)) then file.delete (aa) and enfame ` You can call Directory.GetFiles in a wildcard for search: C # Code string [] albumFiles = directory .GetFiles (imageFolder, ss + "*. *");

shell - find and grep command this but not that -

I am trying to find all the files that are *. O (object) files are not stored and stored in the MyFile.lst file in the current directory tree. I am using this command. #! / Usr / bin / ksh search-type F | Grep -v "* .o" & gt; & Gt; Edit: find-type F | Grep -v '\ .o $' & gt; & Gt; MyFile.lst Looks like no comment / suggestions. (Added keith.layne correction) You do not need grep . Search Type 'F!' -name '* .o' & gt; & Gt; MyFile.lst In GRP, search patterns should be a regular expression. Therefore, . , $ and * have special meaning. . That means match any character, it means that the line X * means the match matches the end of X, zero or more times (greedy) Grep -v '\ .o $ " .o will match the files with the extension. (You need to avoid the for your code. ) .

html - Containing an XML nodevalue with jQuery -

My prediction: I have some things on my server that I connect to an AJAX call I want to: An XML file An HTML test index A folder full of HTML copies Some jQuery scripts XML are the relative addresses of HTML copies. JQuery is considered to capture that nodeview and some DIV which is on the Test Index page. After all, the index page should update some of its HTML without fully reloading, as if my AJAX has read as it has said. Unfortunately, I do not know what I'm doing. I am working with it: $ (document) .ready (function () {$ ('# header'). ($ '(' P # test ') .HTML (' at least function '); $ .aex ({type: "GET", url : "Archives.xml", dataTip: "xml", success: function (xml) {$ ('div # viewer'). Attachment ($ (this) .fund ('title')). Text ();}} );});}); My AJAX call does nothing I can tell that I am doing something wrong, but at this time I am happy That i got dome 4 errors ...

.net - What do you call IEnumerable? -

Sometimes I find out that someone has IEnumerable & lt; Foo & gt; I do not think I get a corresponding name while reading. IEnumerable & lt; Foo & gt; : This is a type of name Archive : It is valid but is not used everywhere. Although we have the system. Selection Namespace Sequence : It is also valid and probably better defines it. Enumerator or Iterator : They insist on operation, rarely use. What would be most appropriate? What do you read in your code? a IEnumerable & lt; Foo & gt; refers to a specific device, such as operation / removal; It does not apply here, but the word is not inappropriate. Personally I use "sequence" in the discussion, but I do not use it to give things names in the code - I just use it representing this object sequence , i.e. "order", "unique users", etc. - or in the case of general methods, "item", "value", etc.

c# - Accessing Petrel 3D window framebuffer -

In addition to Window3D , window3D is exploring a way to access the framebuffer. SaveBmp . The preferred solution will be able to draw the visual graph in the offscreen buffer, but other ways to reach the framebuffer can also work. Currently it is not supported by the ocean for petrel. I agree that it may look a bit strange that saving bitmaps is supported, but the in-memory copy is not accessible because the reason is only historical because most of the underlying C ++ structures of the underlying CIV + OV viewer Are sigraphographs. This encapsulation done provides a good way to store bitmaps, but there is no way to get an in-memory copy, so we went for the first easy win. She said, adding this API will not be rocket science, just work. Ocean Friend

Replacing text with Regex -

I have a text file that contains data dump from the database. This place is delimited and this sounds as stupid, it That's what I have to work with. My problem is that there is a free textfield that contains Newline So whatever I try to do, I change every RR which is If you are looking at the device you are supporting with continuous expression, you use Can \ r (?! \ D {6})

objective c - How to set part of string to bold font to TextView on iphone -

कैसे iPhone पर बोल्ड फ़ॉन्ट पर पाठ दृश्य के पाठ का भाग सेट करना है? NSAttributedString का उपयोग करें ... यहां NSAttributedString को आकर्षित करने के लिए एक नमूना UIController है

iframe - Scrollable box containing list of Checkboxes in HTML -

Image
Attachments You will see a mock-up photo for the required UI. As you can see, I need some type of scroll box in the check box. I have a scrolling device Have thought about it, though I can not find a way to set a boundary around the divis? Second, I was thinking about an IFrame .. but it's also not certain that this is my best choice. Is anyone an easy / better way to do this? Thank you! CSS: .container {border: 2px solid # ccc ; Width: 300px; Height: 100 pixels; Overflow-y: scroll up; } HTML: & lt; Div class = "container" & gt; & Lt; Input type = "checkbox" /> This checkbox is & lt; Br / & gt; & Lt; Input type = "checkbox" /> This checkbox is & lt; Br / & gt; & Lt; Input type = "checkbox" /> This checkbox is & lt; Br / & gt; & Lt; Input type = "checkbox" /> This checkbox is & lt; Br / & gt; & Lt; Input type = "checkbox" /...

php - Prepare statement and placeholder value is no set... null or blank field? -

I am using a ready statement to put some values ​​in my table. Before doing this, I am validating the field. Some fields are empty and therefore have to be zero. For some reason, on my local development environment, when the field does not start, the field in the database remains futile ... but, development on my life, when an area does not start, So the field in the database turns to an empty space when it is a varchar and 0 when it is an int Why is it so? If a value is not entered in the form then I want to stay faucet! This is what mysql looks like: create table album (album_idlititin not note auto_ignment, title varchar (75) not tap, subtitle varchar (75),) Engine = MyISAM DEFAULT charetate = utf8 COLLATE = utf8_general_ci; My PHP script to validate the data: // verification $ warning = array (); // Valid Title (required) $ title = trim ($ _ POST ['title']); If ($ title == '') {$ warning ['title'] = 'title is a required field'; } /...

HTML/CSS: Problem with full width -

कृपया इस पृष्ठ पर एक नज़र डालें: & lt;! DOCTYPE html public "- // W3C // डीटीटी एक्सएचटीएमएल 1.0 ट्रांस्क्रिप्शन // एन "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; html xmlns = "http://www.w3.org/1999/xhtml" dir = "ltr" lang = "दा-डीके" & gt; & Lt; शीर्ष & gt; & Lt; title & gt; & lt; / title & gt; & Lt; / head & gt; & Lt; body style = "background-color: # e0e0e0; रंग: #fff;" & gt; & Lt; div शैली = "स्थिति: पूर्ण; चौड़ाई: 100%;" & gt; & Lt; div शैली = "पृष्ठभूमि-रंग: # 000;" & gt; & Lt; div शैली = "चौड़ाई: 800px; मार्जिन: 0 पिक्सेर ऑटो; पाठ-संरेखित करें: दाएं;" & gt; कंटेनर चौड़ाई 1500px की चौड़ाई & lt; / div & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; / body & gt; & Lt; / html & gt; आंतरिक डिवा में 800px की चौड़ाई है और विंडो 800px से बड़ा होने ...

architecture - Trading applications trade-offs : Databases and low-latency -

To store data, almost all business applications require databases and transactions made on that data. Transactions usually take time to sequence of milliseconds. At the same time, one thing in a business application that is not acceptable, is "latency", therefore, trade-offs in such applications which require upper limit on the time of delay? For example, a business has been kept by the customer, it must pass some checks, which require the database, a DB. Again, the business should pass in OMS / ORS or Exchange. And, at each level, there will be no need to store any transaction data in the database. How should a balance be maintained between the persistency and low latency of the transaction? Two things: Caching: Cache rules in your application , So you do not have to hit the database for each business Threading: Keep the code that stores the transaction data in the database in another thread. In this way, you can route the business to the exchange immediately...

java - JdbcTemplate problems with nested queries -

I am trying to experiment with Nedsted queries with the JDBC template, but I found out the problem, It seems that this is not in the question. Am I right? Or do I need to change? Then, I invoke getJdbcTemplate (). Query (request, new object [] {name} ...) / request query that you can see in the error message , which returns the result in Oracle but fails with org.springframework.jdbc.InvalidResultSetAccessException: created callbacks; Select the invalid result of SQL [name as name by name (select the name as out of table 1 t1 t2.id = t1.fk_id, select 2 t2 in the left outer table, where t1.name Is not empty) (name) as upper ('?')] ; Nested exception Java.sql.SQLException: invalid column index edit The request is a simple string object that is actually a SQL that you see in the exception message. list & lt; MyObject & gt; ; List = getJdbcTemplate (). Query (request, new object [] {"Somename"}, new RowMapper () {Public Object mapRow (R...

local - Saving facebook login details locally in android app -

I'm developing an Android app where the user has the ability to share Facebook. I have user login details for Facebook, now what I am trying to do, these login details should be saved until the application is removed. When I tried to find an answer for it, I got some answers about the shared preferences. But I'm not exactly sure how it works. What I'm trying to do here, username = username.getText (). ToString (); Passwords = passwords.gate text (). ToString (); Where username and password are 2 editors fields when the user enters Facebook for the first time, then these data should be saved somewhere for my future reference so that they do not have to re-enter Need to do How can someone get me this? // Share your information SharedPreferences settings = get obtained reference ("my_file_name ", 0); SharedPreferences.Editor Editor = settings.edit (); Editor.putString ("Username", username.getText (). ToString ()); Editor.putString (...

objective c - NSURLRequest / NSURLConnection ios 5.0 v/s earlier versions -

I am trying to use the NSMutableRequest and NSURL connection to bring the compressed file to the server. Here the code I am using is: NSMutableURLRequest * newRequest = [NSMutableURLRequest requestWithURL: downloadUrl cachePolicy: NSURLRequestReloadIgnoringCacheData timeoutInterval: 30.0]; [NewRequest set value: @ "Y29tLm5vbWFkZ ......" forHTTPHeaderField: @ "Authority"]; NSURLConnection * connection = [request with NSURL connection connection: newRequest representative: self]; If (! Connection) {[download manually]; } and I use the same NSURLConnectionDelegate method didReceiveResponse, didReceiveData, connectionDidFinishLoading, didFailWithError but When I run this code in iOS 4.3 or earlier, I get different responses (it downloads the zipped file) and iOS 5.0 (JSON says "authentication failed."). IOS 5.0 has introduced many new methods for NSURLConnectionDelegate but I'm not sure that this is an issue about the converted API for iO...

c# - RIA EntityQuery duplicating rows where one of the values matches -

In my application I work as an entity, if I use SQL Profiler, it catches the SQL query which Is generated, and runs it manually, this result I expect. For example Val Date 68 2011-05-31 00: 00: 00.000 48 2011-05-30 00: 00: 00.000 92 2011-05-29 00: 00: 00.000 52 2011 - 05-28 00: 00: 00.000 32 2011-05-27 00: 00: 00.000 32 2011-05-26 00: 00: 00.000 52 2011-05-25 00: 00: 00.000 81 2011-05-24 00: 00: 00.000 If I touch a breakpoint in my code and see if load operation. Determination, then I know that when the 'Wall' figure for entry already appears (Up to IE 52), then load operation. The data collection uses data from the previous entry (actual value Instead of somewhere with a value of 52). So in the above data, my load operation. Definition (note that the dates are repeated now, it appears because 'wall' has already happened) 68 2011-05 -31 00:00: 00.000 48 2011-05-30 00: 00: 00.000 92 2011-05-29 00: 00: 00.000 52 2011-05-28 00: 00: 00.000 32 2011-05-27 00: 00:...

flash - Problem with instance names inside Button -

I have created a button in Flash, and within it I have a TextField and Movie clip, for example both names set I cover all 4 frames without any keyframe. I found that I can not use the object using those instance names, so I used this piece of code to see what is happening: var obj: DisplayObject = this.m_graphics.btnChange.upState; (Var i: int = 0; i & lt; obj.numChildren; i ++) {trace ("we have one object + + + +" + "+ obj.getChildAt (i) +": "+ Obj.getChildAt (my name); var t: TextField = obj.getChildAt (i) as TextField; if (T == blank) is issued; trace ("text field is text" "+ t.text +" ') ;} I get this as output: We have an object 0 - [object shape]: Example 195 with us There is an object - [Object Textfield]: Text is change in the Instance 1999 textfield - Object on 2 - [Object MovieClip]: instance203 Because they are TextField and MovieClip, they have their instance name reset to normal "instance ###"...

java - Analysing Memory Issues -

We have an issue where GVM memory usage grows slowly and then this effect CPU performance increases CPU time We are trying to take a heap dump to analyze the problem. But it wants to understand what the general process is - by looking at the GC log, provide the information needed to pay attention to the pile-dump. You can find this article useful.

How do I convert a solution to windows phone 7? -

It should be an easy way to read the entire source code and check against each row against it. Suggestion Am I thinking that you get a Windows Phone 7 solution from a Silverlight solution? Either way, there is no answer - there is no easy / easy migration path. Just copy the project files into a new WP7 project and start working through compilation errors. is on the device which can help you to create a portable code, allowing you to create assemblies that are Silverlight, WP7, WPF, XNA solutions, however, which codes you can shae She is somewhat limited.

html - How to position text at the bottom of block or inline-block element? -

I have an element with fixed height and width, and to add text to it which is located below it (but many lines Element can be less than height), which makes it difficult. This is just a few modern browsers like & gt; = IE8, & gt; = Need to work in FF3 and WebKit. Div style = "height: 100px; range: 1px solid # 000; condition: position Relative, "& gt; & Lt; P style = "position: full; bottom: 0; range: 1px solid # f00;" & Gt; It is located under the text containing HIV. & Lt; / P & gt; & Lt; / Div & gt; should work: -)

Accessing a counter in a variable name in Javascript (code inside) -

I am trying to do something similar to the following PHP code but in javascipt: After reaching the loop number basically, the following is messy with 0, if less than 10 but I do not know syntax in JS to do this: ( Sorry for the noob style I think that you have zero to zero Instead a leading zero means ... You can use conditional operators for example: (n You can do a general question The function function also implements: function pad left (str, len, ch) {while (str.length & lt; len) str = ch + str; return str;} For example: var value = obj ['entry' + (n : '') + N + '_cash']; If n contains 4 , then this Obj.entry04_cash .

node.js - Iterate Mongoose Properties in Jade -

I am trying to produce a list of properties from a Mongoose object, but I also get very Javascript Helper functions I'm thinking that there is a clear way to output only my mouth schema properties. My Z display code looks like this: h4 legacy data ul - every val key, D.old li = key + ":" + val and my strange schema definition entry = new schema ({old: {depositor: string, table: string, verged: number}}); But when the page is provided, a bunch of other JavaScript properties and functions are output at the same time. E.g. _scope: [object] toObject: function () {return.get (path); } Wordid: 2035 ... Is there an easy way to repeat through my schema through properties? I can use a specific list, but I was thinking that there is a good way. Actually, how would I write in the specified way? In Ruby I know that I can do ['wordid', 'submitter']. But what's the equivalent in Z? You are facing prototype properties of the object. Y...

Facebook Like iframe issue -

We are having a problem today, the face book like iframe does not work on some of our sites: Is anyone experiencing another problem? This issue is with Facebook.

gsp - Text field validation Using Jquery -

मेरे पास इस तरह 5 पंक्तियों में 5 टेक्स्ट फ़ील्ड हैं .. & lt; div class = "dt_distance_slab" & gt; & Lt; g: textField क्लास = "संख्या दूरी एसएलएबी 1" नाम = "दूरीस्लाबकास्ट 1" आईडी = "दूरीस्लाबकास्ट 1" मान = "" / & gt; & Lt; / div & gt; & Lt; div वर्ग = "dt_distance_slab" & gt; & Lt; g: textField क्लास = "संख्या दूरी एसएलएबी 2" नाम = "दूरीस्लाबकास्ट 2" आईडी = "दूरीस्लाब कॉस्ट 2" मान = "" / & gt; & Lt; / div & gt; & Lt; div वर्ग = "dt_distance_slab" & gt; & Lt; g: textField क्लास = "संख्या दूरी एसएलएबी 3" नाम = "दूरीस्लाबकास्ट 3" आईडी = "दूरीस्लाबकास्ट 3" मान = "" / & gt; & Lt; / div & gt; & Lt; div वर्ग = "dt_distance_slab" & gt; & Lt; g: textField क्लास = "संख्या दूरी एसएलएबी 4" नाम = "दूरी एसएलएबीसीस्ट 4" आईडी = "...

jquery - Is it possible to recreate this effect with text rather than an image? -

Especially the top example: To be accurate, I want background image Instead of & lt; P & gt; . Generally, you have to put your code inside the code #reveal and offset from the same pixel which is moved to #reveal , but negative.

How to provide a download of a mySQL database in PHP -

The form that I have, which are stored in the database instead of being emailed to the webmaster, Output is being done in, but it may be crowded so that I would like to provide a download link for the user to download a readable file. CSV can be the most basic, but if this is possible, a spreadsheet will also be better thanks, Henry This is not really difficult: Include SELECT t1.a, t2.b from Table 1 T1 in INNER Table 2 T2 On (T1 Id = t2.table1_id) WHERE table2.somefield = 'OUTFILE' in some 'outfile.csv'; Now provide a download link to outfile.csv. Link:

web services - What are some good alternatives to a UDDI registry? -

I work as an intern application developer in a large organization prototype SOA. I am new to web services and technologies such as WSDL, SOAP, UDDI, and so on. Last week, I have had a lot of difficulty in understanding UDID, and how to use it. It is effectively the consensus on the Internet that the UDDI is dead, either too complicated , Unnecessary, or interrupt for most use cases. Some websites indicate that UDDI is useful only as an internal registry within an organization and it is by the business partners of the Universal Business Registry, for which it was designed. You can read StackOverflow's attitude towards UDDI by reading some answers and comments on these questions: What are some options of UDDI? What are the other ways in which web services can be published so that developers can get details and technical details without any complexity that UDDI seems to have? Is there really a good business case for using the UDII registry? Many open source repo...

Android Strings -

I wrote a big app in the code with thousands of strings ... very bad idea, because now I want to translate It takes a long time to copy all strings to string strings .... big strings. Eclipse has an option to pick all the selected strings and put them in messages. Properties Does this work as similar strings .xml? Why, all people use strings. Xml. Or should I use Eclipse to separate the string and copy them into string.xml? All people are using strings.xml because this is the common way of doing so on Android. You can see the document here: BTW, you can easily make your conversion string after extraction. Eclipse generated file in the xml file.

Android : After Callback from Facebook, Which State will called of my Main Activity? -

I am using Facebook SDK in my Android project and for Login Clicking on that button will enter the callback return on user login and main activity. All work fine Now when I am backed up, I have to change the text of that button from logout to logout. How can I do this? Which call will be named after my main activity back .. What do I mean by resume () or reset? Please help me in doing this .. and understand how this might be possible ... i have read enough documentation and tutorials for Android Lifestyle .. but Yet I could not get it anyway to do so. Thank you, Peacock Parek So I believe that you do something like this Login to Facebook by: mFacebook.authorize (this, blank, requestcode, new Facebook.Di AlogListener () {public void onFacebookError (FacebookError e) {// TODO Auto-generated Method Stub} Error on Public Zero (DialogError e) {// TODO Automatically generated method stub} Public void (bundle value) {// TODO Auto-specified method stub} Public voi...

What is the difference between the different connection strings from JBoss 5 to Oracle 11g R2 -

We have a Java application running inside JBoss EAP version 5.1 and up to date we always use standard thin driver Use Oracle for Oracle 11.2.0.2 After upgrading all our customers to the JDBC driver after further investigation and after downloading all related files from the Oracle site, we have jabs & lt; Connection-url & gt; Jdbc: oracle: thin: @ ... & lt; / Connection-url & gt; & Lt; Driver category & gt; Oracle.jdbc.driver.OracleDriver & lt; / Driver category & gt; & Lt; Connection-URL & gt; JDBC: Oracle: Thin: @ ... & lt; / Connection-URL & gt; & Lt; Driver category & gt; Oracle.jdbc.pool.OracleDataSource & lt; / Driver category & gt; & Lt; Connection-URL & gt; JDBC: Oracle: Thin: @ ... & lt; / Connection-URL & gt; & Lt; Driver category & gt; Oracle.ucp.UniversalConnectionPool & lt; / Driver category & gt; In the latest JBoss lib directory requires a copy of the UCP.JAR file....

java ee - @Schedule equivalent for Guice: execute tasks in @singleton at specified intervals -

I am using Google Guice, Guice servlet, and Jersey, an easy way to run scheduled jobs in JVM Want to find I found the following EJB example, which creates "A @ signleton ejb @ schedule method that executes in the background at specified intervals." This is what I want to do but wanted to see an easy way to add EE dependency. You can probably get quartz integration to meet your needs here - Here is an example of syntax @ javax.inject.Singleton @ org.nnsoft.guice.guartz.Scheduled (jobname = "test", cronation = "0" / 2 * * * *? ") Public class com.acme.MyJobImpl apply org.quartz.job {@ javax.inject.Inject Personal MyCustomService service; Public Zero Executes (JobExecutionContext References) JobExecutionException throws {service.customOperation (); }}

daemon - Using GNU Screen instead of daemonizing -

I have taken a legacy app that instead of launching background processes in GNU screen sessions, rather than demonizing them, launch Does. I am trying to understand why the original programmer wrote such a thing. Do they have to fork or nohup ? @ Mark B's comment is a very good thing (this is not how unfortunate answer is, it would be good!). Anyway, I see another reason is that it is an application It is easy to use the screen for lemon. I, for one, do a lot of things For example, I am developing a company for my company, that in the future I have some time It will not be full Useful for me, so I started it in a screen session and made available for use it when I need it.

php - CakePHP - Just Layout? -

मैं $ this-> लेआउट से json सेट करना चाहता हूं नियंत्रक कार्रवाई में जेसन लेआउट में, $ this-> Javascript & gt; ऑब्जेक्ट (); कहने वाली एक पंक्ति होगी, जो दिए गए डेटा को पार्स करेगा नियंत्रक द्वारा इसे करने के लिए, और json आउटपुट। हालांकि, प्रत्येक json अनुरोध के लिए एक नया दृश्य फ़ाइल बनाने, उदा। recipe_view , ingredient_view आवश्यक नहीं है, मुझे सिर्फ एक लेआउट की आवश्यकता है। क्या दृश्य फ़ाइल को पूरी तरह से बायपास करने का एक तरीका है और केवल लेआउट है , कुख्यात लापता दृश्य! त्रुटि के बिना @ संतुटबेल्बॉल का समाधान काम करता है आप एक लेआउट भी बना सकते हैं और एजेक्स के लिए देख सकते हैं। आपका लेआउट ऐसा कुछ हो सकता है: & lt;? Php $ content_for_layout;? & Gt; और फिर आप इस तरह एक एजेक्स दृश्य बना सकते हैं: & lt;? Php echo $ this- & gt; जेएस- & gt; ऑब्जेक्ट ($ परिणाम );? & gt; और फिर अपने नियंत्रक से ... सार्वजनिक फ़ंक्शन savecontent () {$ this- & gt; ऑटोरेन्डर = गलत; $ इस- & gt; सेट ('परिणाम', गलत); यदि ...

asp.net - MVC 3 Deploy Automation -

I am looking for the most straightforward methods to automate the deployment of an MVC 3 application. There is already a wealth of information about stack overflow, but most of them seem outdated, and I'm not sure what is still relevant to MVC 3. What I'm trying to achieve here: Publish MVC applications Zip files Remote location Copy zip to Is this the one ?? ?? Publishâ ???? One part of this is the biggest problem I have here: Here are the main points of my confusion: How can the automatic build for a MVC 3 app be started? Do we need to use the AspNetComiler MSBuild function? I have seen an example of this use in conjunction with CSC Task. Is both really necessary? â €? Create deployment package is ???? What options can be started with MSBuild in Visual Studio? Should it be used instead? Web Deployment Projects: Why are these photos fit? Thanks for any help No, the applications can be better in deployment, but what do I do here. I use to preco...

nsurlconnectiondelegate - What if app sleeping or dead before NSURLConnection asynchronous request comes back? -

If an app is dead, dies, sleeps or is in the process of getting out when NSURL connection accepts requests Is the bench? It seems that I keep at least one flag which says "the program is coming out" before my ASCNC function, it assumes that the program data is valid. Thank you. In iOS 4.0 and above, when the user closes the app, Is put in. Until you tell it otherwise, the representative callback will not work until the user opens the app again. You can test yourself by writing some NSLogs in your callback. Then, run the app on a test device, and try closing the app after the connection has started. Wait for some time and reopen the app (still running 'Xcode'), and see what the delegate callsbacks are. // Annex Connection NSLog (@ "connection" has started ...); - (zero) connection: (NSURLConnection *) connection was filewidth error: (NSError *) error { NSLog (@ "failed with connection error -% @", error);} - (zero) connectionDifffish...

jquery - Zend Json_Encode and .getJson success not being called? -

I have a script that I am using to return some JSON back to PHP using Zed Framework . This is what I am getting back to: [] {"Test": "Tester"} But in jQuery the success function is not being called. Should be Json [{"Test": "Tester"}]? I did this in my controller: echo Zend_Json :: encode (array ("test" => "tester")); Client JS: $ .getJSON ("/ entry / get-project", {"id": 1, "format": " Jason "}, function (data, textstats, jxxhr) {alert (" win ");}); In your action dealing with Jason Call $ Callback = $ this- & gt; GetRequest () - & gt; GetParam ('callback'); Resonance $ callback '(' .Zend_Json :: encode (array '' '='> 'value')). '' '; In your JS Not so, you can always try: http://php.net/manual/en/function.json-encode.php Echo json_encode (array ('Key' = & gt; ...

php - MySQL Escape Backslash -

I have a regular expression that contains escape characters that I need to store in a mysql table. If I can not escape the backslash, then it has been eliminated. I have tried to avoid mysql_real_escape_string, addslashes, str_replace, and backslashes using the database from backslash, and each time stores a double backslash instead of a single database example: $ regex = "stackoverflow \ .com \ question / \ / ask"; $ Query_text = Add Lars ($ regex); Include $ Query = "my_table (url) values ​​('$ query_text')"; me @ server: $ echo "select * my_table '| mysql -user -database-p'password' stackoverflow \\ com \\ / questions \\ Any questions as to what I am doing wrong? The slash mysql client's console output has escaped; not in the database;) Try running the client interactively: mysql -user - Database -p'password 'mysql & gt; * Choose from my_table; + ---------------------------------- - + | X | +...

asp.net mvc - How do I display a Web Forms page from an MVC 2 application? -

The report viewer controls apparently only work in a web form page (I'm using MVC 2). So, let me create one, add my report to it, and try linking it to a view in my MVC 2 site. I get a constant error "Can not find the resource" I have tried every possible url, I can think it's got to work for it. I also pulled out and removed a hyperlink tool in the page and set it to link to the web form and got the same results. I have tried a URL such as ~ / views / maintenanceReports / DriverList.aspx (without * .aspx) and some other but, I have tried the URL in the web form / view / maintenance ranks folder. Make sure this URL should be. I have also added this page to the Global.assx file, so it is expected that this is some magical routes. MapPageRoute ("DriverListing", "Maintenance Ripit / Driver Lossing", "~ / View / Maintenance Reports / Drivers Listings.aspx"); I also tried to add to my fellow programmer, an MVC view, according to th...

Tapestry: Redirect-after-post messing my StreamResponse in onSuccess() -

After uploading the file to a user, I read the file, processed it and received a CSV (stream response) Sent back I am facing problems getting back the results. In the firebug I see the post response as '302 temporarily taken' and my page does not show the streaming file again, it loads again I think tapestry redirect-post-post send me the file back streaming Instead of reloading the page. Is this happening? How can it be fixed? This is my code: (only by cutting the body) @log stream Response onsut () throws IOException {file tmpFile = File.createTempFile (urlFile.getFileName (), blank); BufferedWriter br = new BufferedWriter (new FileWriter (tmpFile)); Br.append ("The second line to test" is something to test) ;; Br.flush (); Br.close (); New CsvStreamResponse (new FileInputStream (tmpFile.getAbsolutePath ()), "results_file" Return;} public class implements CsvStreamResponse StreamResponse {private InputStream; private String filename; public CsvS...

C++ - catch all exceptions? -

I want to inject a DLL into a process. Once this DLL is there, then he should catch it; Arrange all access violation exceptions to be processed, is there any way to accomplish this? How about the setup options ( function ) about filters? The prototype of function is: long __stdcall exception handler (EXCEPTION_POINTERS * ExceptionInfo); I have used this function to create crash dumps etc.

How to upgrade a Rails 3.0 app to Rails 3.1? -

I have a Rail 3.0 app (technically 3.0.7), which I want to upgrade to Rail 3.1. What is the best way to do new property pipeline and other fancy new features? Should I use the Rail New generator, then copy from my old app to one new one? What about version control? I already have my old app using Git. One of your apps was upgraded from 3.0.9 to 3.1, here My view is, your mileage may vary: Edit Gemfile, Change Rail Gem version Mani 'Rail', '3.1.0' Adds new gems started in 3.1.0 Group: Assets Mani 'sass-rails', "~> 3.1.0" Mani' coffee-rail ',' ~ Gt; 3.1.0 "Mani 'Uglfire' and Mani 'jquery-rails' Run Bundle Update Rail Then Rock Rail Run: Update and resolve the conflict. Move your code / css / javascript / images into the app / property folder, make sure that a application.js and a application.css file (you want to take a look from the 3.1.0 projects that were created from them again)...

asp.net mvc - Lose Focus from Select Box with Jquery .change() event -

I am using a dropdown that shows several form fields after selecting something from the dropdown. I have forced the dropdown with jquery to detect a change, however, the box should focus 'Focus' before 'losing focus'. Any way to fix this? $ (select "Employee"). Change (work () {alert ('hi');}); It does not need to lose at least the focus with a traditional change. If you are using other forms of changing, i.e. keystroke, then you may consider compelling additional events for it. As long as you choose it in traditional sense, Em> (click on option) If you are using a different method, such as keyboard input , you will need to bind it to a proper event, such as keypress , keydown , etc.

oop - basic Python(ic) inheritance question -

Quick question about Python (IC) Warsas: What is the difference between idioms ( super (childclass, self)? "post-text" itemprop = "text" .method ( Args) ) vs ( ParentClass.method (self, [args])? Is another pointer than the other? using super (ChildClass, self) .method arguments) The method allows the resolution to run on the order - and if everyone uses the previous parent super - then call each class one time in sequence (not that the super works only with new-style sections.) Using ParentClass.method (self, args) calls a specific class. It does not work if it is involved in many heritage. Provides some details of this issue and clarifies many issues for some people. I do not agree with all my findings, but it provides good examples and discussion.

node.js - Download a file from NodeJS Server using Express -

Maybe there is a dumb question but how can I download a file that is in my machine that is a nodejs server ? I am using ExpressJS and I am trying this: app.get ('/ download', function (req, res) {var file = Fs.readFileSync (__DERNAM + '/upload-folder/dramaticpenguin.MOV', 'Binary'); res.setHeader ('content-length', file.length); res.write (file, 'binary'); Res .com ();}); But I can not get the file name and file type (or extension). Can anyone help me with this? Thanks a lot As far as your browser is concerned, the file The name is just 'download', so you have to give it more information using another HTTP header. res.setHeader ('content-type', 'attachment; filename = dramatic penguin. Mov'); You may also want to send a mime-type like this: res.setHeader ('Content Type', 'Video / QuickTime') ; If you want some depth, go here. var path = required ('path'); Var mime =...