Posts

Showing posts from February, 2011

ruby on rails - javascript code or json objects as ajax response? -

I am reading railway guides, especially I am reading this: The part which is a bit confusing to me. It says that if Action Actions receives an AJAX request, it will return the JavaScript code which will include the user in the page. I have found other solutions in which the client gets the json object (instead of the JavaScript code) and creates the respective DOM elements and inserts them on the page. My questions are: What is the json object? Receive and create DOM elements and get them better than receiving the JavaScript code on the page and executing it so that the new content is added to the page? What are the best practices about this? In this example, what will get the AJAX call? Javascript code, a Jason object or both? There is no right or wrong way in the example that you have quoted, Ajax calls to Javascript will be received, which will then be executed in the browser. However, it is likely that you want to embed html in javascript feedback. For example, a rai...

extjs4.2 - How to determine which menu item I'm working with in changeHandler with ExtJs? -

जब एक मेनू आइटम चुना जाता है और मेरा changeHandler लागू होता है ( फ़ंक्शन (cycleBtn, ActiveItem) ), मैं किस आइटम के साथ काम कर रहा हूं यह निर्धारित करने के लिए क्या एक्स्टजे सिस्टम की सिफारिश की जाती है? आइटम का टेक्स्ट इस्तेमाल करना आदर्श नहीं है क्योंकि यह बदल सकता है। अन्य चौखटे अक्सर एक मूल्य विशेषता प्रदान करते हैं जो प्रदर्शित वास्तविक टेक्स्ट से अलग हो सकता है जो कि आप किस आइटम के साथ काम कर रहे हैं यह सही ढंग से निर्धारित करने पर भरोसा किया जा सकता है। क्या एक्स्टजेन्स की कोई संपत्ति है, क्या मैं चयनित आइटम पर सटीक रूप से पता लगा सकता हूं कि मैं किस आइटम पर कार्य करने के लिए काम कर रहा हूं? जाहिर है, मैं इसे अग्रिम में भी सेट करवाता हूं। आप idId के बजाय itemId का उपयोग कर सकते हैं क्योंकि itemId कंटेनर को स्थानीय, इस मामले में मेनू। आपको केवल यह सुनिश्चित करने की ज़रूरत है कि आइटम मेनू का मेनू आइटम में अद्वितीय है।

html - Can i eliminate down button on tag? -

Image
& lt; Datlist & gt; is an HTML tag, which uses elements to order and select them. When I call it & lt; Input & gt; , then it gives me I do not want to see the list before I type it, before the item is like this, I can finish this button on it. & lt; Input & gt; is a feature for? ALSO No There is no answer for this question! To delete the down arrow, try using the following in your CSS : Input :: - WebKit-Calendar-picker-pointer {display: none; } Example

c++ - QtCreator: symbol(s) not found for architecture x86_64 issue on Mac OS Mavericks -

I am trying to compile a C ++ program using QT. When I try to compile, I get this output: not found symbol for architecture (s) x86_64 linker failed in command failure code 1 (for viewing invitations -V Use) What can I do? Why is this happening? I have already tried my project file in QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 (as suggested in this post) but it has given this problem Did not solve. Any thoughts? Edit: How it looks like my project file: TEMPLATE = app CONFIG + = console CONFIG - = app_bundle CONFIG - = qt Source + = main.cpp \ a.cpp \ b.cpp \ c.cpp \ headers + = \ ah \ bh \ ch

javascript - Load error is not captured by try catch block -

मेरे पास एक कोड है: try {...} पकड़ (त्रुटि) {...}; में प्रयास करें ब्लॉक, एक फ़ंक्शन कॉल है जो सर्वर से अनुरोध करता है जब सर्वर पर कोई संसाधन नहीं होता है, तो एक त्रुटि उठाई गई है (जैसा कि मैं Google क्रोम के डेवलपर्स टूल में देख सकता हूं): संसाधन लोड करने में विफल: सर्वर ने 404 की स्थिति और मैं इसे पकड़ ब्लॉक में पकड़ने की कोशिश कर रहा हूं, लेकिन त्रुटि पर कब्जा नहीं किया गया है। क्या यह एक विशेषता है जावास्क्रिप्ट के लोड लोड को try catch block आमतौर पर, जब एक सर्वर से जानकारी का अनुरोध करते हैं (उदाहरण के लिए, एजाक्स के माध्यम से, src तत्व का img सेटिंग आदि, सेटिंग करके), तो आप डॉन एक अपवाद प्राप्त नहीं करते हैं, लेकिन आपको एक त्रुटि इवेंट या कॉलबैक प्राप्त नहीं होता, कम से कम नहीं क्योंकि अनुरोध करने से पहले कोड समाप्त हो रहा है, इसलिए उस समय अपवाद फेंकना असंभव है। चूंकि आपने यह नहीं दिखाया है कि आप जानकारी का अनुरोध क्यों कर रहे हैं, यह अधिक विशिष्ट होना असंभव है, लेकिन यही कारण है कि आपको अपवाद नहीं मिल रहा है। उदाहरण के लिए, अगर एक एजेक्स अनुर...

c# - Why does using parameterized queries or entity framework prevent sql injection? -

I have a good understanding of SQL injection. This is when a SQL query that should be something like a customer from SELECT FirstName, LastName. Customer customer WHERE customer ID = @valueFromApplication changes like a query select first name, last name from customers WHERE CustomerId = ''; Drop Account Foo - Whenever users enter anything malicious in your app, website, customer .. I also know that we can only try to leave the attacker. To find the names of tables and get information from them. I also have a few things that help in preventing it: Using stored procedures that take parameters (SQL Server parametric Using SQL queries Using LINQ for entity framework / unit (C #, probably F #?) How can these things really be stopped? Having SQL injection? Why not the attacker only the malicious value that whatever the input is before Using and using the same result can pass. Your first example is parameter And is not insecure against SQL injection. ...

javascript - HTML5 offline authentication -

I'm looking for advice / criticism how best to use an HTML5 which is largely offline Is used. This application uses a combination of indexed, local and session storage so that the data can be stored so that it can be used offline, the data / pages are served through HTTPS. Its goal is to reduce the risk of data being viewed when the tablet / PC is lost / stolen Currently this application allows users to encrypt / password Stanford uses the JavaScript crypto library and then saves it in local storage if the user can successfully authenticate to the server if the application goes offline then use The subject has to be certified 'locally' against the encrypted user / password at the local location. In addition, an unencrypted user / password is stored in session storage, if the user successfully authenticates the server, it is used so that the application can periodically attempt to restore contact with the server. And could re-authenticate the user 'randomly...

ios - How to get knownTimeZoneNames according to currentLocale -

I want to automatically translate a list of knownTimeZoneNames into the user's language. I have this code for those countries that work very well, but I can not be successful in doing this for the known timezone name . NSLocale * localeTwo = [NSLocale currentLocale]; NSArray * countryArray = [NSLocale ISOCountryCodes]; NSMutableArray * Sort Country Country = [[NSMUTABARRROR] INST]; (For countryCode in NSString * countryArray) {NSString * displayNameString = [local two display nameForkeys: NSLocaleCountryCode value: country code]; [Sorted countiere ad object: displayNameString]; NSLog (@ "NSDisplayNameString:% @", displayNameString); } [Sorted Couturerera Sort Using Selector: @Selector (Localized Compaired :)); [Sorted Couturerera Sort Using Selector: @Selector (Localized Compaired :)); [NSTimeZone knownTimeZoneNames] Talks Try: NSArray * Known TimezoneArere = [NSTimeZone knownTimeJonname]; NSLog (@ "knownTimeJonesArere =% @", knowntimezonea...

c++ - How do I return my dynamically allocated array? -

So for my problem I need a dynamically allocated array that can be created in the main function and any other function. The problem I am facing is that I need to use that function in other functions and my array has no value when I put it in my function (or at least this case). The code is: #include & lt; Iostream & gt; # Include & lt; iomanip & gt; using namespace std; // prototype int getNumber (); Zero getMovieData (int * ptrToArray, int arraySize); Zero Type (integer * ptrToArray, int arraySize); Double getAverage (integer * ptrToArray, int arraySize); Zero print (integer * ptrToArray, int arraySize); Int main () {int stuNum = 0; Int * stuArray; Steware = new int [stuum]; GetMovieData (Stuyere, Stnam); Cout & lt; & Lt; "--- Here is the data you entered" & lt; & Lt; Endl; Print (steware, stoom); Sort (Stuyere, Stnam); Cout & lt; & Lt; "--- Here is the data that you sort" - & lt; & Lt; Endl; Print (steware, st...

java - Hazelcast ConcurrentMap / MultiMap Key -

I am declaring a multimate and want to know whether it is a good idea to keep the key in the form of an integer string As the key will accelerate to retrieve the values ​​with the key? Multimap & lt; String, order & gt; MmCustomerOrders = hz.getMultiMap ("Customer Order"); versus multimap & lt; Integer, order & gt; MmCustomerOrders = hz.getMultiMap ("Customer Order"); thx. It may be slightly faster, encoding / decoding simple ASCII strings based on string length and complexity It's easy to do but if you have non ASCII characters then it will be a bit more complex. But even on integers there is a high chance that you have to keep making the whole thing since the values ​​are high, if you override the default integer cache size you can work around it (java. Lang.Integer .IntegerCache.high ". This increases the size of the integers before determining more than 127. The question in the reality is that if you make real spee...

javascript - Jquery to check height and add class -

I am trying to check which division has a large height and in that space, compared to a class is big. I have this code $ (document) .ready (function () {var sideNavMenu = $ ("col-md-3") height () ; Var mainColumn = $ ("col-md-9") height (); if (sideNew menu> main column) {$ ("col-md-3"). AddClass ('dotright');} and {$ ("Col-md-9"). AddClass ('dotLeft');}}); The goal here is whether the side navigation menu is higher than the main column compared to the place on its divi tag. If the main column is large, then the left tag on its div. But it is not working. Any suggestions on how to change / improve. Thank you very much You do not refer to these sections based on ID Because, on the page there may be several elements with these class names. should be one with only every ID $ (document) .ready (function () {var sideNavMenu = $ ("# sidebar"). Height (); var main column = $ ("# main")...

.innerHTML not updating HTML in Javascript -

Working on a rock paper scissor assignment, where the increase of a global variable increases, depending on whether the computer or Humans live. My work works fine, but the scoreboard will not be updated while using. WinnerHTML Any suggestions? document.getElementById ("humanScore"). InnerHTML = humanTotal; Document.getElementById ("computerScore"). Internal html = complex; You have some problems. In your play function, you are not doing anything with the computerChoice variable, and this function should be on the call compPlay () . Currently it is var computerChoice = compPlay , which is actually assigning computerChoice to a function, not the result of it. If the statement in the second test, you are again examining compPlay , which is a function, I think it is the computerChoice must be the third one. Return value from compPlay is an index, it will be updated from compOptions array code diverse human total = 0 ; Var compatib...

actionscript 3 - How send parameters for URLRequest -

I have sent parameters to my backend in PHP but I have a code and I do not see the parameters var Request: URLRequest = New URLRequest (modelLocator.CaminhoServidor + "AnexoDocumentos_Financeiro / asdas / xml.php"); Var loader: URL loader = new URL loader (); Loader.dataFormat = URLLoaderDataFormat.VARIABLES; Request.data = Remessa; Request.method = URLRequestMethod.POST; Loader.addEventListener (Event.Complete, RecepxML); Loader.load (request); How do this parameter send 3 parameters? You use the 'variable' field in the URLRequest object: var request: URLRequest = new URLRequest (url); Request.method = URLRequestMethod.POST; Var variable: URLVariables = new URLVariables (); Variables.param1 = ... variables.param2 = ... variables.param3 = ... request.data = variable; Var urlLoader: URLLoader = new URL loader (); UrlLoader.dataFormat = URLLoaderDataFormat.VARIABLES; UrlLoader.addEventListener (event.complete, urlLoader_complete); UrlLoader.addEventLis...

c++ - Scope of object created using new -

I am learning C ++ as a hobby and "new" to create a new object dynamically I'm wrestling. I have read that dynamically created classes do not scope, but this does not work for my simple example. When executed , the value of 'testValue1' is set to 555 in the constructor and is printed. When the control is mainly returned, then 'testvalue' is unfortunately set to 0 (or not defined - not sure). I can set the value inside the main and the value is properly maintained for the main and also the loop properly. Problem: I do not understand why the initial value of 555 is not why the control is back to the main. I know that for the right to the dynamically assigned class, I am confused or scarcity of understanding ... any help is appreciated. Here is the sample code: // main.cpp # include & lt; Iostream & gt; using namespace std; Square GeneralVerses {Private: Public: // Testing values ​​for data values ​​1; // Constructor General () {cout & l...

javascript - Override Zurb Foundation 5 change Clearing default template globally -

I am trying to change the global template of the clearing plugin (responsive lightbox gallery), but the documentation does not say how it is Programatically to do about; The data-option is explained in the manner but nothing else. I have been seen that in fact the foundation. There is a template in libs.clearing ... Namespace After some attempts I came over it: // Include the script // Change the template. Foundation.libs.clearing.settings.templates.viewing = '' + '& lt; One class = "clearing-pass" & gt; & Amp; times; & Lt; / A & gt; '+' & Lt; Div class = "visible-img" style = "display: none" & gt; div class = "clearing-touch-label" & gt; & Lt; / Div & gt; & Lt; Img src = "data: image / gif; base 64, rll global a qubaad / aquaaaaaaaaaaaaaaaaaaaaaaaaaaaadas% 3d" alt = "" /> '+' & Lt; p class = "clearing-caption" & gt; ...

android - Genymotion and PackageManager.FEATURE_CAMERA -

I have many questions relating to the use of camera in Genymotion android emulator. I finally got the camera jamming to solve the problem (though The problem has been resolved with this feature being small, and working from time to time). Now I am trying to check the camera availability by using the following code: PackageManager pm = PhotosSectionFragment.this.getActivity (). GetPackageManager (); But it always gives me the false , however the use of the following block to obtain the image take the intent image = New Intent (MediaStore.action_IMUNCUCCT); Le pictureentant Input extras (mediastore.xtra_uaptut, store lockation); StartActivityForResult (Le Pictureentant, requestId); I think it's a bug of population, because that investigation works well in AVD and on the actual device. But there may be another way to do the same test, which will work in genomes? pm.hasSystemFeature (PackageManager.FEATURE_CAMERA) Always on Genymotion True should be returned...

uitableview - didSelectRowAtIndexPath resizes the imageview on iOS7 -

Image
ऐसा होता है यदि cell.selectionStyle UITableViewCellSelectionStyleNone से भिन्न होता है। // FrameFiew - ( UITableViewCell *) तालिकादृश्य: (UITableView *) तालिका दृश्य सेलफोराअटइंडपैथ: (NSIndexPath *) indexPath {... imageView = [[FXImageView alloc] initWithFrame: CGRectMake (10, 10, 50.0f, 50.0f)]; ImageView.contentMode = UIViewContentModeScaleAspectFit; imageView.asynchronous = हाँ; imageView.cornerRadius = 5.0f; imageView.tag = indexPath.row; //cell.selectionStyle = UITableViewCellSelectionStyleNone; ...}

How close MS Office Ribbon using AppleScript? -

I am using AppleScript to drive some test, I do it for scripts in PowerPoint Generation in another language I am here. Actually what the script does is to reload a particular presentation, then close all other panes except the slide pane so I can get the most detailed description of the biggest, slide I am creating. I'm most there by way, but can not work out how to close the ribbon at the top of the window. I have AppleScript ribbon? How to get a reference for using this is my script so far: The application "Microsoft PowerPoint" says if the name of the active window is "foobar.pptx "To open the active window end, open the" foobar.pptx "to set the active window segment of {-1920, 22, 0, 1200} horizontal 0, set the active window limit of 100 active window to end Try the vertical set of : Activate the application "Microsoft PowerPoint" application tell the "system developments" process, tell the "Microsoft Po...

table - Set th or td height in HTML for one column -

I use & lt; Th & gt; Trying to set the size. I & lt; Thth = 100 & gt; Something like was trying to & lt; Tr & gt; ( & lt; tr width = 100 & gt; ) The size of the above column Not at all. You are trying to use inline style inside your HTML tags First, I suggest I'd like you to have code around your unit like & lt; Th width = "100" & gt; & Lt; / Th & gt; In addition, you are not defining the unit of tag measurements you can use: & lt; Th width = "100px" & gt; & Lt; / Th & gt; or & lt; Width = "100%" & gt; & Lt; / Th & gt; I think you can also do inches and centimeters be careful while using the inline style 'length' as ​​a webpage. Another way you can do this is using CSS. Inside your head tag, a & lt; Style & gt; The tag can be in. You can: . Measurement {width: 100px; } Note that this should not be a pixel, then on any tag yo...

c++ - What will happen if I keep incrementing an iterator? -

I have a simple question: What if I continue to extend the interferral Iterator () the last one) + STL container? E.g. set & lt; Int & gt; intSet; IntSet.insert (0); IntSet.insert (1); IntSet.insert (2); Set & lt; Int & gt; :: Iterator Setter = intSet.begin (); For (Int i = 0; I & lt; 10; i ++) Set Ether ++; So, will be set intSet.end () always? Or is it an undefined behavior (can I give incompatible junk)? The only work to grow is nothing , at least the GNU compilers . If you try dereference, it invites undefined behavior. For more discussion, see.

html - Why does this php code not display my calendar given the year and month? -

I select the dropdown and do not populate anything. I'm not sure why? I'm new to PHP so any help is greatly appreciated. Here's my code: & lt; Section id = "content" class = "planer" & gt; & Lt; Select ID = "month" name = "month" & gt; & Lt; Option value = "0" & ​​gt; - Choose Month - & lt; / Options & gt; & Lt; Option value = "Jan" & gt; January & lt; / Options & gt; & Lt; Option value = "fable" & gt; February & lt; / Options & gt; & Lt; Option value = "march" & gt; March & lt; / Options & gt; & Lt; Option value = "April" & gt; April & lt; / Options & gt; & Lt; Option value = "may" & gt; May & lt; / Options & gt; & Lt; Option value = "June" & gt; June & lt; / Options & gt; & Lt; Option value = "July" & gt; July ...

python - subprocess.call() fails on Mac and Linux -

I'm running a strange problem with the subprocess.call () function. I'm trying to use Java's Jar command subprocess.call (). Here's the code: imported OS import subprocess def read_war (): war_file_path = "JacobBit-WebEp-2.6.5.wire" Java_Home = OS Environment ['java' ham '] jar_path = OS Path.join (java_home, 'bin', 'jar') jar_cmd = jar_path + 'tvf' + war_file_path "to execute the command" command: "+ jar_cmd subprances. I am using Python v2.7.3 on both Windows and Linux (Oracle Enterprise Linux). In Windows 7, I see the content of the war file that I see. On Linux, however, I'm seeing 'no such file or directory' error. $ python is a command to execute example.py: /usr/local/tools/jdk1.7.0_15/bin/jar tvf jackrabbit-webapp-2.6.5. War traceback (most Recently Call End): File "example.py", line 24, & lt; Module & gt; Read_war () file "example.py", line 23, read_war...

a issue about python socket -

I have terminated a Python socket server script. I and I want to connect it to the browser, and then the socket server is something The data will be sent to the browser which will display the data message. The server can accept the request from the socket browser, but the server can not send data messages in the browser, the browser is in a blocked position for a long time. Why? Server socket script is as follows, please help me review this code, thank you! Import socket HOST = '127.0.0.1' ports = 9003 buffer = 4096 sock = socket.socket (socket (FINNET, socket.SOCECRRM) sock.bind (HOST, PORT) sock .listen (0) Print ('Listen to TCP server:% s:% s \ n \ r'% (HOST, PORT)) True: Client_sock, client_addr = sock.accept () Print ('% s:% s Connect 'Client_addr' is correct: recv = client_sock.recv (buffer) if not recv: client_sock.close () break print ('[client% s Client_addr [0], client_addr [1], recv)) client_sock.send (' HTTP / 1.1 200 is OK \ n Conten...

EditText inside Toast in android? -

I am creating an application in which I have to display a toast that has editing text. Is it possible to make an edit text in toast? You must use a quick user input dialog Steps: Create a quick dialog layout XML file. Attach quick dialog layout to AlertDialog.builder. AlertDialog.builder attach alert alert to. Yout layout / main_activity.exam & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: orientation = "vertical" & gt; Android: Android: Android: Android: Android: Android: Layout_Width = "Wrap-Content" Android: Layout_Height = "Wrap-content" Android: Text = "Show Prompt Dialog" / & gt; & Lt; EditText Android: id = "@ + id / editTextResult" Android: layout_width = "match_p...

windows - Encrypted command line -

I have a situation where a group of administrators must give a command to run a command from the Windows Command Line Which has a password. For example: c: & gt; Mycommand-p mypassword I have no alternative solution to avoid placing a password on this command line for this application. Just want to give them an encrypted string decree "mycommand-P mypassword" and execute that command with its parameters without displaying any encrypted text. Say like this: c: & gt; Mycommanddecoder efouhpefibhusdvn, iu3r3ksjdfdfbpisiegf I have googled but the results do come with PGP command line utilities and kind I could just write executable to a custom job but It can not stop a lover operator from seeing this object code. I could encrypt it internally but still there would be a visible key until I use a certificate ... and you get this idea thanks, Mark Your problem is that in the end you have a script / program / command line system Call that the result...

Algorithm - comparing performance -

Assume that I have 3 algiusither A, B and C, which process N records. Algorithm A takes a 80n + 40 step algorithm B takes n ^ 2 + 30n step algorithm takes c 2 ^ n step The algorithm is the most efficient i) 10 & lt; N & lt; 50 The way I solve this problem, it is to assume that the value is equal to the value I i) Let n = 20 Therefore algo A - 80 (20) + 40 = 1640 step algo B - 20 ^ 2 = 400 step algo C - 2 ^ 20 = 1048576 Step That's why Algon B is most effective. I am not sure if I have correctly evaluated the performance of 3 algorithms, because I am replacing it with a value rather than using Big O Notation? Please give advice Thanks Deals with Big O Notation N Which is arbitrarily grown, i.e. the calculation of the O (n) expression n - & gt; Must be for infinity N is given in your case, so the overall running time can be calculated properly, the way you did it.

php - managing the phone number validation exploits using regex -

I've written regex to validate the US and UK phone numbers. It's working fine, but not for all cases. As such, it should not filter a valid number: 12345678 or 123456789 , 1989 etc. Maybe I need to validate each one for the first three digits, is the area code of US UK right? Here is a list of all UK area codes: the big list Do I need to include them all? Regex? Problem: It should filter out such exploits: 203453seven67 How can this be done? Here is an example: Reject: $ pattern = '((^ \ (? (? :(?: 0 (?: 0 | 11) \) what's that? [\ S -] \ | 44 \) [\ s -] \ [\ s -] \? (\ +?)? ((?: 0 \?)? (?) | | 0) (?: \ D {2} \) [\ s -] \ d {4} [\ s -] \ d {4} | ?? \ d {3} \) [\ s -] \ D {3} ?? [\ s -] \ d {3,4} | \ d {4} \) [\ s -] (??? \ d {5} | \ d {3} [\ s - ] \ D ?? {3}) | \ d {5} \) [\ s -] \ d {4,5} | 8 (? 00 [\s -] 11 [45] [\? - - 46] x | ext \ \ s | \ #)? \ d +)) $) | ([[[2- 9] [0-8] [0- 9] \)? [-]] [0- 9] {3} [-]] [0- 9] {4})) ' ; To ensure tha...

encryption - RSA Enabled Simple Java Chat - Not PKCS#1 block type 2 or Zero padding -

I have created a simple Java chat application below to follow chat client. Run Java - The dialog box is displayed where the user enters the user name. Then the private key and the public key is created and stored in C / Username / PublicKi, C: / Username / Pivetakic. When we re-run the Chatecolient Java, the phase repeats. Then User2 encrypts the user2 in a encrypted form using the User2 public key (which is working fine) (after encryption, the message is stored in the text file), then user 2 Clicks the decrypt button that decrypt text (reads encrypted text using User 2) Private key is displayed in TextRena. When I try to decrypt, I can not find the "PKCS # 1 block type 2 or zero padding" exception public static byte [] encrypt (String text, the key of the public) {// Receive an RSA cipher object and the last cipher cipher = cipher to the provider. Print Get Instance (Algorithm); // Encrypt plain text using public key cipher.init (cipher NCRIPTMMEE, key); Byte ...

java - My Menu Won't Show On My Sudoku Grid -

I have created a board for a Sudoku game but this one thing is stumped to me. It's late where I am and I'm working for a while and I can not find my problem, if someone can tell it, thanks! Import java.awt.GridLayout; Import java.awt.event.ActionEvent; Import java.awt.event.ActionListener; Import javax.swing.JFrame; Import javax.swing.JMenu; Import javax.swing.JenuBar; Import javax.swing.JPanel; Public category sudokuenel JFrame {Public Final Inc SQUARE_COUNT = 9; Public square [] class = new square [SQUARE_COUNT]; Public sudocoanell () {super ("sudoku"); SetSize (600,600); setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); SetLayout (new grid layout (1,1)); SetVisible (true); SetLocationRelativeTo (zero); Zpean panel = new zpinal (new grid layout (3,3)); (Int i = 0; i & lt; SQUARE_COUNT; i ++) for {intersections [i] = new squares (); Panel.add (square [i]); } Add (panels); Jemanubar Menubar = new JMUR (); SetJMenuBar (Menubar); Gemen reset = new jmnu (); Men...

android - Create windows not showing URL Titanium -

I'm trying to create this app, and I'm using counter loop to add data, but I AddEventListener can not find the .js file to open the source path correctly I have verified with the properties that! I tried to do it on an alloy project but failed, so back to a conventional project. The code for app.gs file is given below: var win = Ti.UI.createWindow ({title: 'categories', exit on exit: true}); Var data = []; Square categories = [{title: "art", url: 'ap: // project 333 / processing / art / art category. {Title: "dance"}, {title: "automotive"}, {title: "books and literature"}, {title: "buildings"}, {title: "business"}, {title: "Title": "title": "title": "title": "title": "title": "title": "title": "title": "title": "title": "title": "title": "title": "title...

wrap - JDialog doesn't size correctly with wrapped JTextArea -

Image
एक प्रोग्राम बनाते समय, मैंने जॉप्शनपैन। शोमोस डियालाओग () कॉल के साथ एक बग देखा। मैं एक JTextArea बनाने के लिए एक बटन का उपयोग करता हूं जो लपेटता है और फिर इस पाठ क्षेत्र वाले डायलॉग को प्रदर्शित करता है। अगर पाठ क्षेत्र बहुत बड़ा है, हालांकि, डायलॉग JTextArea की ऊंचाई तक सही ढंग से आकार नहीं करता है इस उदाहरण में डायलॉग ने ठीक बटन बंद कर दिया है। मैंने बग को निम्न कोड में दोहराया है: import java.awt। *; Import java.awt.event। *; आयात javax.swing। *; सार्वजनिक वर्ग DialogBug {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] args) {अंतिम JFrame फ्रेम = नया JFrame (); frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); अंतिम स्ट्रिंग पाठ = "looooooooooooooooooooooooong पाठ looooooooooooooooooooooooooooooooooooooooong पाठ"; जेबटन बटन = नया जेबटन (); Button.setPreferredSize (नया आयाम (30, 30)); button.addActionListener (नया एक्शनलिस्टनर () {@ ओवरराइड सार्वजनिक शून्य एक्शनपररफेड (एक्शन एवेन्ट ई) {JTextArea क्षेत्र = नया JTextArea (पाठ, 0, 50); क्षेत्र.सेटअक्षम (गलत); क्षेत्र ...

javascript - Printing Issue in Chrome -

I have Google Chrome version 34.0.1847.116. I am using the following code for printing $ ('# print'). Live ("click", function () {var url = baseUrlReports + "******** **********" var txnwindow = window.open (url, ""); txnwindow .print (); txnwindow.focus ();}); Chrome is hanging at the loading preview at this time. Then all of my JS stopped answering and I can not refresh the page. There is no other option to shut the window. Can someone tell me what is the problem really? The same code is working well on Firefox and IE. OK, so I have the same problem Interested in watching - you can find it here and reproduce it: (Just close the print pop-up in Chrome, do not use the "Print" or "Close" button, just close a window) So here's my solution (I'm not calling window.print () in Chrome originally) // start the browser detection section var isOpera = !! Window.opera || Navigator.userAgent.indexOf ('OPR ...

eclipse - error: Error parsing XML: not well-formed (invalid token) android -

& lt;? xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & gt; & lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" एंड्रॉइड: ओरिएंटेशन = "ऊर्ध्वाधर" एंड्रॉइड: layout_width = "fill_parent" एंड्रॉइड: layout_height = "fill_parent" & gt; & lt; TextView एंड्रॉइड: layout_width = "fill_parent" एंड्रॉइड: layout_height = "wrap_content" android: text = "@ स्ट्रिंग / हैलो" / & gt; & lt; LinearLayout एंड्रॉइड: layout_width = "match_parent" android: layout_height = "wrap_content" एंड्रॉइड: id = "@ + id / linearLayout1" & gt; एंड्रॉइड: एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: layout_width = "100dip" एंड्रॉइड: inputType = "text" & gt; & lt; / edittext & gt; & lt; संपादन टेक्स्ट & एंड्रॉइड: आईडी = "@ + आईडी / इननाम" एंड्रॉइड: एंड्रॉइड: layout_width = ...

c# - Cross-platform filepaths comparison -

I'm trying to check whether two file path strings specify the same path. We know the path that Windows is not case-sensitive. Path. Gatefulpath (path 1). Aqualus (path. Gatefulpath (Path 2), String Comparison. Current Culture Igor Cass) I know that this will not work properly on Linux, because the path is there Case-sensitive. That's why I am searching for some point-of-the-road signs for sensitivity. Or for some functions like path.Equals . In your case, this is probably the easiest (and most reliable) to check if the is equal to '/' or '\' and if it is pre-call the same method without the "undiscovered case" section. In full: if (path. Directory seirter room == '/') {path. Gatefulpath (path 1). Ecloss (path. Gatefulpath (Path 2), String Companion.Currentculture); } And Path (Gatefulpath (path 1) .Equals (PathGetfulpath (Path 2), String Comperson. Current Culture Ignore Seas);}

jenkins - Trigger Build through push notification -

I'm trying to trigger a build via HTTP request as stated. But when I curl http: // yourserver / jenkins / git / notifyCommit? Url = & lt; URL's GIT repository & gt; I get this: jobs get but they are not configured for voting I do not Find any option to allow this. Any help? Thanks! Under your job configuration , Build trigger Section, and Checkmark Polls SCM Configure cron schedule for something irregular, like once a month.

e commerce - spree 2.2.1 add sale price to product -

I am trying to find the gem working for vogue 2.2.1 to be able to add the sales price for some products I am doing The only solution I found is that for vampire version 2.0.0 It is a bit surprising that currently this functionality is not by default in the current version of the contest because it is the first What do you want to do during running an online store? Can someone tell me in the right direction how to solve this problem without writing your own solution? 1 - (simple) - An easy guide for your work in the official guide is described 2 - "Post-text" itemprop = "text" You can fork and update this gem for your needs. Best regards!

xml - Margin does not work on android 2.3.5 device -

& lt; linearLayout xmlns: android = "http://schemas.android.com/apk/res/android "xmlns: उपकरण =" http://schemas.android.com/tools "एंड्रॉयड: layout_width =" fill_parent "एंड्रॉयड: layout_height =" fill_parent "एंड्रॉयड: layout_marginBottom =" @ Dimen / activity_horizontal_margin "एंड्रॉयड: layout_marginLeft =" @ Dimen / activity_vertical_margin "एंड्रॉयड: layout_marginRight =" @ Dimen / activity_vertical_margin "एंड्रॉयड: layout_marginTop =" @ Dimen / activity_horizontal_margin "एंड्रॉयड: अभिविन्यास =" ऊर्ध्वाधर-। "उपकरण: संदर्भ =" MainActivity "& gt; & Lt; TextView android: layout_width = "wrap_content" एंड्रॉइड: layout_height = "wrap_content" android: text = "@ string / phone_number_" / & gt; & LT; EditText एंड्रॉयड: आईडी = "@ + id / numberText" एंड्रॉयड: layout_width = "fill_parent" एंड्रॉयड: layout_height = ...

installing specflow for vs2013 mssing TechTalk.SpecFlow reference -

I have installed Specflow using the download button I add new object to my eyepiece project and Choosing SpecFlow Feature File When I create this project, I get an error 1 type or namespace name 'tectech' could not be found (are not you missing access director or assembly reference?) I also get an error that the NUINT is missing. Where can I find a file for reference and how do I check that they are right to go with tectech. SPEsflow 1.9.3.0? Visit the Visual Studio Package Manager console. To set up a sample for NUnit, Install-Package SpecFlow.NUnit To work with NUnit For all the necessary package and a configured app.config will install. If you have handled all the references rather than hand-in-hand, you still have to make app configurations correctly Detecting the right config for MSTest or NUnit may take a while to take the right time , So it is better to use the nugget package.

c - waitpid - WIFEXITED returning 0 although child exited normally -

I am writing a program that gives birth to the hair process, and call waitpid The waiting code for the child process is below: // fork & amp; Exec to child pid_t pid = fork (); If (pid == -1) // Here is the error handling code ** ** ** triggered if (! Pid) {// binary_invocation is an array of child process program and its argument execv (args.binary_invocation [0], (four * const *) args.binary_invocation); // Here is some error handling code that is not ** ** triggered} and {int condition = 0; Pid_t res = waitpid (pid, and position, 0); // Here I see that pid_t is a positive integer & gt; Meaning of 0 and position 11, which means WIFEXITED (position) is 0. // It triggers a warning in my program output. } The value of waitpid page WIFEXITED : returns the right for WIFEXITED (status) If the child ends normally, then by calling the exit (3) or _ext (2), or returning to the main (). Which means that I want to return an integer! = 0 on success, which is not happ...

java - Periodically schedule timer taks -

बस यह सुनिश्चित करने के लिए: void java.util.Timer.schedule (टाइमर टास्क कार्य) , दिनांक प्रथमटाईम, लंबी अवधि) यदि मेरे कार्य में अधिक समय लगता है तो अवधि पैरामीटर तो टाइमर एक नया समानांतर धागा नहीं शुरू करता है, है ना? यह कार्य समाप्त होने तक इंतजार करता है और ठीक बाद शुरू होता है। आप सही हैं से: प्रत्येक टाइमर ऑब्जेक्ट के समतुल्य एक एकल पृष्ठभूमि थ्रेड है जिसका प्रयोग टाइमर के सभी कार्यों को निष्पादित करने के लिए किया जाता है, क्रमिक रूप से। टाइमर कार्यों को शीघ्रता से पूरा करना चाहिए यदि टाइमर कार्य को पूरा करने के लिए अत्यधिक समय लगता है, तो यह टाइमर के कार्य निष्पादन धागा "hogs" करता है यह बदले में, बाद के कार्यों के निष्पादन में देरी कर सकता है, जो "गुच्छा" हो सकता है और तेजी से उत्तराधिकार में निष्पादित हो सकता है जब (और अगर) आपत्तिजनक काम अंत में पूरा हो जाता है। यदि आप अपेक्षा करते हैं कि आपके कार्यों को अधिक समय लग सकता है और उन्हें कतारबद्ध होना चाहिए।

scala - Runtime type checks / pattern matching involving variable arity types -

I am reviewing the problem of generic wrappers for a heterogeneous primary types group together. I am using type members, so the structure looks like this now: properties external [s] {type A1r inner inside: internal [s] {type a = a1 }} Specialty Inner [S] {type A def peer: A} Definitely the problem is definitely for specific items, for example: Diff Test [S] (o: External [s]): Option [External [S] {Type A1 = String}] = O Match {Case OS: External [S] {Type A1 = String} = & Gt; Some (OS) cases _ = & gt; None} This type does not work because of erasure. The problem is that I should be the essence of type parameter ereety for peer, i.e., (most) companions who also do a type of parameter [S] , but others do not, therefore, It is not possible to use a type constructor parameter for inner and / or external . Cheap solutions require actual subclasses: But I do not like this solution because I have many different partners, and I do not want to create dedicated wr...

c# - Linq average in Dictionary -

I have a dictionary and want to get the average of attendance from a particular time frame. So far, I have this work which gives me the number of attendance: var vCounts = (from pil.in.List to pil.Value in where (s.CheckInActualUtc.TimeOfDay & Gt; = TStart & amp;; & amp; Amp; s.CheckInActualUtc.TimeOfDay & lt; = TEND). s.CheckInActualUtc has more than one date. How to get the avarage of attendance? I have tried this, but do not go one: var vAverage = plan in pil in INInList pil.Value where (s.CheckInActualUtc.TimeOfDay> = TStart & amp; amp; s.CheckInActualUtc.TimeOfDay & lt; = TEND) Select s.CheckInActualUtc.DayOfYear by Group S new {av = g.Average ()}; If you mean, then you want the average of the number of people present per day : var vAverage = (in pilInInfoList pil.Value of pil where (s.CheckInActualUtc.TimeOfDay & gt; = TStart & amp; amp; s.CheckInActualUtc.TimeOfDay & lt; = TEND ) Select Group S. S.CheckInActualUtc.Day...

c# - Font conversion Kurtidev to mangal -

I have a Microsoft Access file in which the data is stored in the curtidev font. I have to change it to Mars font. Is there an API available to do this? If not, please suggest it in a programmatic manner. If you are talking about masterpiece, then make these fonts signify Devanagari glyph shapes Use Latin / English Unicode for Mars, on the other hand, correctly uses Unicode from the Devanagari range. In other words, Devanagari's' (¤ ??), Mars in Yu + 0915, in return, U + 0064 has been handed over to Kruti Dev. U + 0064 is considered Latin 'D'. To display the contents of your database correctly from Mars, you will need to make a change on the text from "Devanagari-K-Latin" Unicode to Devanagari Unicode for some type of translation table would be required. There are so many tools to replace, some for free, some cost, I could not find any source code for these devices, which probably had a translation table, but you could May be able to find somethi...

CasperJS scraping assistance required -

I am trying to get the 'title' and 'author' for each thesis from each link. So far, I have this (my issues with whom I need help with the comments inside the code): var utils = require (utils'); Var casper = require ('casper') Creating (verbose: true, logleval: 'error', page settings: {loadImages: false, loadPlugins: false, userAgent: 'Mozilla / 5.0 (Windows NT 6.2; WOW64) AppleWebKit / 537.36 (KHTML, like Geico) Chrome / 29.0 Var link: [1547.2 Safari / 537.36 '}, client password: [' lib / jquery.min.js']}); Var i = 0; Var link = []; var thesis_data = []; function getThesisLinks () {var link = Document.querySelectorAll (''); // Not sure what should go ('') return [] .map.call (link, action) (link); return link.getAttribute ('href');}); Function loopThusThesisLinks () {// until all links are processed (i & lt; links.length) {this .echo ('[LINK #' + + + ']' + link [i]) iterations ; GetT...

c# - WebBrowser ContextMenu run action of menu item -

itemprop = "text"> I have an application with a web browser control. I load a page by clicking on a button. Then I want to run an "Adobe PDF Convert" action from the contextual web browser, but ... when I try to reach the context menu: foreach (MenuItem vMenuItem in WebBrowser.ContextMenu.MenuItems) {if (vMenuItem.Text.Contains ("Onvert") and VMenuItem.Text.Contains ("PDF")) {vMenuItem.PerformClick (); }} IDE shows the "object reference not set for an example of an object" line in the line with foreach (in the menu vMenuItem WebBrowser ContextMenu.MenuItems) I have not created my own context menu, I want to show the default context menu. How do I use WebBrowser's context menu and how can I do that action? I have a similar problem to you. I have made a reference to your problem in my post. If you are still interested in this problem, then it is doing something that imitates the clicks: // code Example of how...

Is there a nice way to get hash as a loop result in coffeescript? -

There are expressions in coffee loops and give an array. For example, we may func = (name) -> can do. Propagate to take support in name.toUpperCase () Results = (['A', 'B']) and get as a result: ['a', 'b'] But if I want to get the hash table instead of the array? {a: 'A', b: 'B'} ? How to modify the example given above: I know, I can make an ID like this: func = (name) - & gt; Name.toUpperCase () Result = {} result [prop] = ['A', 'B'] Function for Process for Prok Very literal! What could be a good way? is not as good as understanding the real object, you can use ara :: Reduce for this. Specifically for your example, using the "transformer" function such as: transform = (f) -> (Previous, Carru) - & gt; previous [curr] = f curr prev and your func : func = (name) -> name.toUpperCase () You can do the same to your array like transform and func : res...

javascript - Ajax send image within data -

I am trying to send some data to Ajax and this data may contain an image. I there is no form , so I can not present in a traditional way. This is my html: & lt; Input type = "file" accept = "image / png, image / jpg, image / jpeg, image / bmp" id = "addProduct_image" & gt; Whenever the user changes the file, I get that value. var files; $ (Document) .on ('change', '#addProduct_image', function (e) {readyUpload (e);}); Upload the function ready (events) {files = event.target.files; } When I press the OK button I call an Ajax function. $ (document) .on ('click', '#addProduct_OK', function (e) {var img = new form data ($); $ .ee (files, functions (key, value) } {Img.append (key, value);}); $ .ajax ({url: 'responses / product val (), description: $ ("# addProduct_description"). Val (), image: img, status: php $ ("# AddProduct_status"). Val ()}, success: function (data) {con...

javascript - How to wait for async angularJS call to complete if concurrent call requested the data being still loaded? -

I have an angular service / resource combo that gives the user an asynchronous call to get the user priority. It is called UserPreferencesService and receives a method load: /// User Provider Service. Load method CommonService.asyncCall (UserPreferencesResource.getAll, {username: user name}). (Function (data) {userPreferenceData = data;} Where asyncCall means the angular ASINC server call which is postponed, which is postponed. Promoter. It is called at some point. Function () {var prj = UserPreferencesService.getCurrentProject ();} I have one such The situation is that some controller (which shows the "current project" on the screen) call "getCurrentProject" WHILE "load" async call is in progress, so getCurrentProject does not return nested data, because it is not fully loaded yet. How can I make it so that the user can wait "wait" through service provider service if it is running, and only returns the price, ...