Posts

Showing posts from February, 2014

google apps script - Updating a field based on contents on another tab -

I have created a spreadsheet with several tabs. The column 'id' and 'name' in my 'source' tab 1 have 'id' in my 'target' tab 2. I am trying to iterate through rows in my Target tab and read the value of the ID and then search my source tab. Id. When I get the ID, I want to capture the value in the 'Name' field and I want to add it to a cell on the same line of ID of my Target tab. I have a difficult time getting rid of the logic through an array and I'm getting the value in an array of the contents of the target tab or the target tab. In the Targets tab, there can be more than one instance of an ID, and I have to update them all. Any suggestions will be welcome! Here's a suggestion: / * Tell us source name With array (column A) & amp; The ID (column B) array is the 'source' and the target array in which the ID array is the 'target', you get it with something like * / var source = Spreadsheet...

- Where Developers Learn, Share, & Build Careers

In my app the user can drag the top caller from the stack of CALayers. When the user prevents dragging the CALayer, others should return to their original position at the top of the CALayers until the claire (after dragging) overlaps with other calendars It should be taken under the other calorie. Now, how can I find out that two calories overlap? CALayer's frame property is a CGRact. Fortunately for you, CGGomitry has the following method: CgTTIntecpectors You can use it like this: if (CGRectIntersectsRect (MyLayer1.frame, MyLayer2.frame)) {// code}

- Where Developers Learn, Share, & Build Careers

I have a simple jump menu that I have found. It worked great until I wanted to go to it on a page "?" In the URL, this "?" After everything strips out so why when i mywordpresspage /? If I try to go to Id = 1, the jump menu takes me to mywordpresspage /. I do not know a lot about jquery ... I mostly work with php. Here is the code: & lt; Script type = "text / javascript" charset = "utf-8" & gt; $ (Document) .ready (function () {$ ('site_quick_jump'). Change (function () {if ($ (this) .val ()! = '') {$ ('# Site_quick_jump_form'). Attr ( 'Action', $ (this) .val ()); // $ ('# site_quick_jump_form'). Submit (); // Go!}});}); // Doctor Prepared & lt; / Script & gt; & Lt; Form id = "site_quick_jump_form" method = "get" action = "" & gt; Browse Survey: & amp; Nbsp; & Lt; Select class = "site_quick_jump" & gt; & Lt; Options ...

- Where Developers Learn, Share, & Build Careers

After All, I have found the following code: onDone: function (e, data ) {Var results = jQuery.parseJSON (data.result); Var uploadtype = result.upload_type; Var filename = result.name; Var insert_id = result.insert_id; } When I run it, I get the following error from IE: Message: 'upload_type' is zero or not when I get console.log (data.result) in Chrome, I get the following data: [{"name": "1_3266_671641333369_14800358_42187036_5237378_n.jpg", "Size": 35535, "Type" : "Delete / url": "\ / web \ / upload \ /1_3266_671641333369_14800358_42187036_5237378_n.jpg", "thumbnail_url": "\ / web \ upload / thumbnail \ /1_3266_671641333369_14800358_42187036_5237378_n.jpg", "delete_url": "\ / web \ /upload.php file = 1_3266_671641333369_14800358_42187036_5237378_n.jpg? "," delete_type ":" delete "," upload_type ":" video_montage "," ...

asp.net - HTML Agility Pack Syntax -

& lt; div वर्ग = "लोगोडस" & gt; जीएनबी रोड, चंदमरी, गुवाहाटी - 781003 | & Lt; a href = "http://www.justdial.com/Guwahati/Kiran-Mistanna-Bhandar-<near>- चांदीमरी / 99 99 पीएक्स 361- एक्स 361-1230284509 जी 9 वी 5 बी 2-डीसी_आर 3 वी 3 वाईडएचएचडीजीकेजीएमएमएमएफएजीवीएसबी 3 आईजीक्यू 2 एफआरजेक्यू ==_BZDET/map" & gt; मानचित्र देखें & lt; / a & gt; & lt; br & gt; & Lt; p & gt; & Lt; span class = "gray" & gt; कॉल: & lt; / span & gt; & lt; span शैली = "रंग: # 424242; फ़ॉन्ट-आकार: 12px;" & gt; + (91) -9954843180 & lt; / span & gt; & Lt; span शैली = "रंग: # 424242;" & gt; | & lt; / span & gt; & Lt; a href = "http://contest.justdial.com/contest/register.php?utm_source=rsbnr&utm_medium=banner&cont_ref=rsbnr" शैली = "फ़ॉन्ट-आकार: 12px; प्रदर्शन: इनलाइन -block, " Onclick = "_ ct ('विन Ipad2', '...

c++ - Converting a class to a template -

I want to convert a class to a template and this class needs access to some data by type name. In this case typename T can be an object or pointer for objects. How do I tell within the template if I am working with a pointer or an object? I can not use Boost. You will use a template expert First of all, you can use your template as the default type of template parameter Make them. template & lt; Typename T & gt; Structure fu {t t_; Fu () {std :: cout & lt; & Lt; "Regular edition" & lt; & Lt; Std :: endl; }}; After that, you will be the specialist for that template when it will be some kind of indicator. template & lt; Typename T & gt; Structure foo & lt; T * & gt; {T * T_; Fu () {std :: cout & lt; & Lt; "Notifier version" & lt; & Lt; Std :: endl; }}; Foo & LT; Integer & gt; a; Foo & lt; Int * & gt; B;

xml - How to grep multiple strings with -A -

I need grep for the data present in an XML file. There are many elements I get, and the last one is inside the node. There is a bunch of data between those elements through which I am focusing on them. I can easily grep for several elements: grep -E "& lt; first | & lt; second | & lt; third | & lt; seventh" file.xml But since I have a file structure that looks like this: & lt; First & gt; First & lt; / First & gt; & Lt; Second & gt; Second & lt; / Second & gt; & Lt; Third> Third & lt; / Third> & Lt; Fourth & gt; Fourth & lt; / 4th & gt; & Lt; Fifth & gt; Fifth & lt; / Fifth & gt; & Lt; Sixth flexible = "true" & gt; & Lt; Less & gt; 0.09 & lt; / Less> & Lt; High & gt; 5.90 & lt; / High & gt; & Lt; / 6th & gt; & Lt; Seventh Flexible = "False" & gt; & Lt; Less & gt; 1.82 & lt; / Less> ...

html - Do modern browsers care about the DOCTYPE? -

यदि आप पदावनत विशेषताओं या टैग & lt; center & gt; , & lt; फ़ॉन्ट रंग का उपयोग करते हैं एक्सएचटीएमएल 1.0 में सख्त (कोई depr विशेषता नहीं), आधुनिक ब्राउज़र (मैं क्रोम का उपयोग करेगा के रूप में) = "लाल" & gt; , या & lt; td valign = "top" & gt; एक उदाहरण) अभी भी नोटिस लेते हैं और इसका इस्तेमाल करते हैं। यदि आप एचटीएमएलएम 5 एंड एलटी; वीडियो & gt; पर एक्सएचटीएमएल 1.0 सख्त DOCTYPE का उपयोग करते हैं तो क्रोम उसे पहचान लेगा - ऐसा नहीं है कि वे 'डी कार्यक्रम इसे नहीं करने के लिए मैंने क्रोम में एक्सएचटीएमएल 1.0 सख्त DOCTYPE के साथ एचटीएमएल 5 ऑडियो के साथ, मैं सबसे खराब पदावनत, पूंजीकृत, और बिना चिह्नित विशेषता कोड का परीक्षण किया और यह बिना किसी समय flawlessly गाया। यहाँ है क्रोम (लाल बीजी, केंद्रित तालिका, ऑडियो बजाने) में मैं बिना कथित रूप से काम कर रहा हूं। & lt;! DOCTYPE HTML PUBLIC "- // W3C // DTD एचटीएमएल 4.01 //" http://www.w3.org/TR/html4/strict.dtd"> & LT; html & gt; & Lt; शीर्ष ...

threadpool - Java application with httpServer hangs for 45 seconds before exiting -

I'm playing with a little bit with Java Accord Class. When I run my trial application, it will primarily reach the last line (a println) in a way, but then it sits for approximately 45 seconds before closing the application. Why does it do this and there is a way to do this so that it ends up fast? Thanks Public Stace Voice Men (String [] Args) IOException throws {InetSocketAddress addr = new InetSocketAddress ("127.0.0.1", 8780); HTTP Server Server = HTTPS Server. Build (ADR, 0); Server.createContext ("/", New MyHandler ()); Server.setExecutor (Executors.newCachedThreadPool ()); Server.start (); URL url = new URL ("http: // localhost: 8780 / test"); HttpURL Connection Connection = (HttpURL Connection) url.openConnection (); Connection.setRequestMethod ("GET"); InputStreamReader (connection.getInputStream ())); // response header system.out.println ("\ nHTPP response header"); For (int i = 0 ;; i ++) {string header name = con...

c# - What are the semantics of the modulus operator? -

Programmer 2010 was a piece of code in C #, which I was thinking, here it is: (int i = 0; i & lt; deck langti; i ++) {deck [i] = new card (face [i% 13], suite [i / 13]) ; } I think counting arrays have a slot in memory, and this is putting new card suits and faces in the deck and they return the counting amount. I do not understand how you can divide into the measure and zero? Or am I mistaken? Thank you The question seems to be that the modulus operator is confusing you. The modulus ( % ) operator calculates the balance from a split. It is structured in the form of division (fraction / separator). It appears that you are wrong with i% 13 as the remaining 13 / i looks like this. This is remaining I / 13 so if i is zero, then the modulus operator will return 0. You ever Em> app An example is 3/2 . 3/2 is 1 and half but if you do not save that result for integer (no decimals), then only 1 is saved where the half went? It was thrown away if you w...

mercurial - Visual Studio 2010, VisualHg, keeps adding bin, obj folders -

Everything was working fine for 3 months, now suddenly when I open Visual Studio, all this untouched Add files to the root solution folder Close VS 2010 Use the Turtle HG workspace to forget the files added by VS2010 when it HG, ie bin and obg folders are included in. Opened Adding all the files back to HG is being started, it appears that when the "Preparation of solution" dialog appears I To include "bin" and "obz" in the root folder, but it is being ignored by the VS. Why is any thoughts happening? Instead of including the following, try editing your unseen file: AP / B [/ B] in / [DD] Euggets * / OBJ / [Sometimes the capitalization can change (I do not remember what is the reason for it ..)

php - calling stored procedure from MySQL in Cakephp gets only first row of result -

As I call my SP, it only gives me the first result, and on the second call, Returns: / P> Error: SQLSTATE [HY000]: General error: 2014 can not execute questions, while other unanswered questions are active. Consider using PDOStatement :: fetchAll (). Alternatively, if your code is only running against mysql, then you can enable query buffering by setting the PDO: MYSQL_ATTR_USE_BUFFERED_QUERY setting. Well, I have examined the related questions as some suggested by Staxahovarflow gave me this idea, but when I tried it did not work. This is a loop inside my function that makes my SP call: foreach ($ filenames $ value) {$ queryssid = "call GetUniqueSSIDByCategoryCombine ('$ username ',' $ Value '); "; $ DataAssenseId = $ this-> User- & gt; Query ($ queryssid); Public relations ($ dataUniqueSSID); } This is my SP: make DEFINER = `Rut` @ Sthaniyhost Prkriya` GetUniqueSSIDByCategoryCombine` (URI VARARAR (50), filename VARCHAR ( 50)) Selec...

- Where Developers Learn, Share, & Build Careers

There is a problem taking piflex to run on windows Any apt on windows Install , so ... what to do? The question may be slightly outdated, because the "PIP installation pflex" Without working for me ...

android - Google cloud messaging GCM through proxy -

I'm having trouble sending a message to a device via a company's proxy. I have done a GCM tutorial on Google Sites and successfully registered a device on Google servers with Android emulator, and at the end of my life also on the server For this, I had to go through the company proxy, to set it in the access point of the emulator. Now I have a problem sending one device from my server to the device via the same proxy. I am using the servlet code from the demo which send com.google. Android.gcm.server.Sender Uses an Assistant Class. . I am running servlets on the Tomcat 7. I have tried to set up a proxy, such as in the catalina.properties file. http.proxyHost = proxy.company.com http.proxyPort = 8080 And I have tried to install properties inside the servlet as below . System .setProperty ("http.proxyHost", "proxy.company.com"); System.setProperty ("http.proxy port", "8080"); But even then I'm out of time I ...

- Where Developers Learn, Share, & Build Careers

There is a problem with SSRS in my report layout. SSRS will only cut some columns in IE8 when I open the report for the first time. The problem does not appear in FF and Chrome. However, it is my surprise, when I refresh the report, the missing columns will appear in IE8, or if I go to the next page and come back again. Any help is appreciated! You may not need to set IE8 browser mode in Internet Explorer 8, IE8 No IE8 commute view using the developer tool Press F12 and go to the Browser Mode tab. Regards

Which is more efficient -> hibernate criteria-mysql query? -

I am developing a web based application using spring and hibernate-mySQL. I have a restriction that the user's name should be unique, which is a more efficient way? To use the Hibernate criteria to check the user? Or define unique in the database and then use a try hold? Thank you in advance .. You should use both. In hibernation the query will allow the functionality to check the functionality that it does not exist before the user is inserted, and return a proper result or enter the appropriate exception, it is better to rely on a unique obstacle, Due to rollback with a secret error message, exceptions will be hidden within the stack. But you should also have a unique barrier to guarantee uniqueness in the case of two concurrent threads, check that the user is not present at the same time, then insert both the same user at the same time. For general questions that do not need to be dynamically composed I will use the HQL instead of criteria: Read more IMHO

uiwebview - Using "stringbyevaluatingjavascriptfromstring" for get the link in tag in objective C -

मेरे पास ऐसा html कोड है & lt; html & gt; & Lt; शीर्ष & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; a href = '001' & gt; & lt; img src = 'chp1.png' / & gt; & lt; / a & gt; & Lt; a href = '002' & gt; & lt; img src = 'chp2.png' / & gt; & lt; / a & gt; & Lt; / body & gt; & lt; / html & gt; मुझे 001 या 002 में स्ट्रिंगबीव्यूलेटिंग javascriptfromstring जैसे [self.webView stringByEvaluatingJavaScriptFromString: @ ""] प्राप्त करना चाहते हैं। ; किसी को भी यह कैसे पता है thx मुझे नहीं लगता कि -stringByEvaluatingJavaScriptFromString: एक अच्छा विकल्प है यहाँ। एक NSScanner : NSScanner * स्कैनर = [NSScanner scannerWithString: yourHTML] का उपयोग करने का प्रयास करें; जबकि ([स्कैनर स्कैनअपटॉस्ट्रिंग: @ "a href = '" स्ट्रिंग: नाइल]) {[स्कैनर स्कैन स्ट्रिंग: @ "a href ='" स्ट्रिंग: नाइल]; NSString * परिणाम =...

Rails Tutorial: Chapter 8.1.5 error (rendering with a flash message; listings 8.11 and 8.12) -

I'm taking the ROR tutorial, in the last part of Chapter 8.1.5, when all RSPEC tests will be green, then I can not get to do my work. I run bundle ent rspec spec / requests / authentication_pages_spec.rb -e "Sign In with Invalid Information" with this error and one of the four trials fails: 1) Invalid information Failure / error after the authentication signin arrives at any other page with: it is not required_jalector ('div.alert.alert-error')} expected css "div.alert.alert-error" to not return anything # ./spec/requests/authentication_pages_spec.rb: 25: `Block (level 5) & lt; Top (required) & gt; App / Controllers / Session_ Controller The text for RB is below: Class session controller & lt; ApplicationController def new end def user = User.find_by_email (params [: session] [: Email]) if user & amp; Amp; User.authenticate (params [: session] [: password]) # User sign in and redirect to user's show page. Else flash.now [...

- Where Developers Learn, Share, & Build Careers

I am using VIM 7.3. With this plugin, when you type : MRU is seeing a new window with the files you used recently, this is good, but I Want something more specific than that: Let's say I'm working with just one window. I open the file a first time, then file b, then file c. Now when I am in File C, I want to go back to file and then I want to go back to file a keystroke with a back button on browser history and I want to move forward to move it, to file back from file A and to finally file back C, like I'm playing with a browser history. How can I do this? The file A, B, and C are called "buffer" in the VIM language. The ability to jump directly from buffer to buffer what you want, or the ability to select the buffer you want to jump from. It's easy to jump from one buffer to another, with the : b command or its cousin: : b Filename & Lt; CR & gt; Jump directly into buffer by name: b fil In more than one match, if "otherwis...

c# - windows mobile- leave user logged in for 24 hours -

I'm making my first Windows Mobile application I have a login screen - I'm just wandering, 24 hours a day How does the user sign in, where will it ask for a username and password? The application was opened / closed during the day, and I only want to put my certificate in the morning. Thank you You can capture the database for the first time, and check the time separately from the first log You can. Time, if time varies more than 24 hours, delete the row in the table

iphone - Retriving certain attributes from html with xcode -

मैं html पृष्ठ से href मान पाने की कोशिश कर रहा हूं NSURL * url = [ [SearchBar.text stringByReplacingOccurrencesofString: @ "" withString: @ "+"]]; NSString * html = [NSString stringWithContentOfURL: url एन्कोडिंग: NSASCIIStringEncoding त्रुटि: & NSLog त्रुटि (@ "एचटीएमएल =% @", एचटीएमएल); अब तक, कोड के इस बिंदु तक, यह यूट्यूब से html प्राप्त करने और खोज परिणामों के पहले पृष्ठ के लिए html प्रदर्शित करने के मामले में, पूरी तरह से काम कर रहा है। अगली बात जो मैंने करने की कोशिश की वह कुछ अवांछित HTML टेंग्स को निकालने के लिए है, जैसे मुझे, की आवश्यकता नहीं है, आदि। मैं चाहता हूं कि सभी को छोड़ दिया जाए और उनके साथ टैग और उनके मान या डेटा हो। । इसलिए मैंने NSScanner और Regex का उपयोग करने की कोशिश की है। लेकिन मुझे वांछित परिणाम प्राप्त करने में असमर्थ हैं I अब जो कोड मैं कोशिश कर रहा हूं NSScanner * स्कैनर = [NSScanner scannerWithString: self]; [स्कैनर सेटकर्चरर्स टॉबेस्केप: शून्य]; NSMutableSet * टैग = [[एनएसएमयूटेबलसैट एलोक] इनट]; NSStr...

SSO between Sharepoint & Asp.Net MVC3 -

itemprop = "text"> I have a SharePoint site (not SP expert) where the user is the authentication model based on the logon form where the user's password is Stored in a DB ... When the user clicks a link I want to redirect him to a MVC3 application. While doing so, I want to officially sign the user in the MVC application. What is the best way to implement it? Thanks One way is to SharePoint Pass the authentication token next to another web application in the http header, then, before reaching the web site the MVC application should validate the token.

javascript - Why is my requestAnimFrame still slow? -

I have followed the best practices for creating a simple animation by requestAnimFrame: Unfortunately the animation shows this example It's been too long (on Chrome, Firefox and IE). Explanation of the source code: What is the solution, displaying simple animation in html5 without any slow motion? Use double buffer techniques for complex animations to avoid slow tasks such as saving, restoring and so on. Good article "requestAnimFrame" will not boost your performance, because in this situation the browser decides that you have to present your code for a while, and not you My experience shows that it is better to set timers for the required FPS, using the PhoneGap for Android I had a bad experience while experiencing the game. I tried various techniques and was best to use the best two canvas, to avoid using the paths and to avoid slower changes.

mysql - Subqueries for each result or inner join with php loop or ...? -

I also want to display their pictures in the user's search results. Not only avatar photo but also 3 photos photos are in extra table user_photos If I get a single line per user then the answer will be clear - internally but I will get multersonage for each user. The first method I can use may include: Add user INNER from photos SELECT * photos.user_id = users.user_id In this case I need some additional php code to merge results with the same user_id. Something like this: foreach ($ result as result of $) {if (isset ($ user [$ result ['user_id']] ['age'])) $ $ [$ Results ['user_id']] ['photo'] [] = $ result ['photo']; to continue; } $ User [$ result ['user_id']] ['age'] = $ result ['age']; $ User [$ result ['user_id']] ['photo'] [] = $ result ['photo']; I first need a first level loop for users to see and then $$$ [$ result [user_id ']] [' photo '] array for each user....

java - JOptionPane isn't showing -

जॉशनपेन नहीं दिखा रहा है .. कृपया मेरा कोड देखें: सार्वजनिक शून्य एक्शनपररफेड (एक्शनएवेंट ई) {// टूडो ऑटो-जनरेटेड विधि स्टब // यदि (ई.ए.ए.एक्टेक कॉमांड)। बराबर ("ओके")) {if (e.getActionCommand)। बराबर (बीटीएनओक)) {if (कनेक्ट (txtUser.getText (), TxtPass.getText ())) {JOptionPane.showMessageDialog (शून्य, "चेतावनी", "मान्य उपयोगकर्ता!", जॉप्शनपैन। INFORMATION_MESSAGE); } और {System.out.print ("गलत पासवर्ड!"); }}}} मेरी कनेक्ट विधि, कृपया इसे चेक करें। सार्वजनिक बूलियन कनेक्ट (स्ट्रिंग यूएसआर, स्ट्रिंग पीडब्ल्यूडी) {try {class.forName (" com.mysql.jdbc.Driver "); Connection = DriverManager.getConnection ("jdbc: mysql: // localhost: 3306 / उपयोगकर्ता", "रूट", "रूट"); तैयार किए गए स्थान पीएस = connection.prepareStatement ("सेलेक्ट lname, fname कर्मचारी जहां fname =? और lname =?"); ps.setString (1, usr); ps.setString (2, लोक निर्माण विभाग); ResultSet = ps.executeQuery (); यदि (resultSet.ne...

php - UPDATE data in the database -

I want to show selected ID data in the form and edit it and update it in database. I selected the data from the database and put it in the input tag but it does not work. help please! & lt; Html & gt; & Lt; Body & gt; By & lt;? $ Db = mysql_connect ("localhost", "root", ""); Mysql_select_db ("db_ncs", $ Database); $ Id = $ _GET ['s_id']; If ($ id) {$ result = mysql_query ("SELECT * FROM tbl_student WHERE s_id = $ id"); $ Line = mysql_fetch_assoc ($ result); }? & Gt; & Lt; Form method = "post" action = "update.php" & gt; Name: & lt; Input type = "text" name = "name" value = "& lt ;? php echo $ row ['s_name'] ;? & gt;" / & Gt; & Lt; Br> Contact: & lt; Input type = "text" name = "contact" value = "& lt ;? php echo $ line ['s_contact'] ;? / & Gt; & Lt; Br> Address...

ajax - Trigger a jQuery function on click -

It's quite simple, but I'm not very skilled with jQuery, so this is making it difficult to work. ... I have to show a notification popup (in the form of Facebook) which tells the user that he has earned some points. I am using WordPress and the code is working fine for popup, which is below. jQuery.noticeAdd ({lesson: "Congratulations! You've just earned 5 points", cancel: incorrect}); I want to display a popup when a particular button is clicked. The class for the button is comment-answer-link then I wrote this code $ ("comment-answer-link") . Click here (function () {jQuery}: But this code works I did not make any mistake. How can I disclose the information popup only when a particular class button is clicked on. Please try both of these codes one by one if it will work the first code $ (" comment-reply- Link "). Click (function () {$ .no second code Code> jQuery (click "comment-answer-link...

vb.net - How to create a pdf print out using Visual basic 2010? -

I read a webpage () It shows how to create a PDF file through VB, however, VB shows many errors after I follow the webpage to create my own PDF program. For example mjwPDF.cls (1): Error BC30188: Announcement is expected. I'm not sure whether this is a VB version difference problem or not. Does any other PDF creator know which is free? Thanks

- Where Developers Learn, Share, & Build Careers

I have the following code, when a user selects the input box, the value will disappear, but the default value will be Once the user is re-inserted after closing it. $ (function () {var default text = ''; $ ('input [id = input]'). Focus (function () {$ ('input' [id = input] ). $ (This). $ (This) .val (); $ (this) .val ('');}); $ ('input [id = input]'). DefaultText);})}} ; However, this is not exactly how I want it. If a user inserts the text, then I do not want to override the default text on the user that the user has inserted. I'm also quite new to jQuery so that any help would be greatly appreciated. Your focus () method should be checked to see if Before clearing it, it is equivalent to defaultText , and in your blur () function, you have to check whether setting the defaultText First val () is empty If you are going to work with multiple inputs, it is better to use Class instead of ID, so your selector will be inp...

Disable editting of javascript from chrome console? -

Image
So, I have just seen that you can explicitly run JavaScript in Chrome console. I did not know you did it You can. This really is really good. In my train app, I have an external javascript page, some variables that I want to be global on that page so that all functions in the JS file can be used by them. For example, I have a map, and I would like the map object to be global in a javascript file because in this way all my functions use a single map variable instead of my own, and I use complex tasks I can break into functions. It's all well and good. I know how to do this and it's working perfectly. My problem now, can I protect the variable from the outside? For example, you can change the values ​​of all JavaScript class variables from Chrome console. For example, there are ways in which the map is accessible and executable. I have locked the map settings on one page, so it Can not say zooming or running, I can just say map.setZoom (11) from the console and zoom to ...

ios - Grand Central Dispatch EXC_BAD_ACCESS Exception -

I have an empty block that runs fine in the iPhone 6.0 simulator in Xcode, but when I switch to the iPhone 5.1 simulator Exception to the following: "EXC_BAD_ACCESS". Sender_Assic (send_gate_global_que (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^ {// I have removed all the codes from here and the exception is still.}); Any idea what happens to this? The exception is thrown on sender_sync line. I'm sure if this is the case, although I am using ARC. Error on my part, I have fixed the iOS deployment target at 6.0. I updated it to 5.1 and it works fine.

Using BufferedImage and ImageIO classes in my Android Activity -

I am developing an Android app that can improve the gamma of any image stored in the phone. My activity can get image position, but I can not use the BufferedImage class and ImageIO class in my application. I get the following error in eclipse. IDE with ADT plugin. ImageIO can not be resolved BufferedImage can not be resolved I can not process the image I have an idea of ​​including the Java Library but I do not know how to do it in Android This is the function I need to work it is. Personal Static Buffer Image Gamma Correction (Buffer Image Original, Double Gamma) {Intimate Alpha, Red, Green, Blue; Int NewPixel; Double gamma_nuvi = 1 / gamma; Int [] gamma_LUT = gamma_lut (gamma_new); Buffer image gamma_k = new buffard image (original.getwidth), original. Gatehight (), origin. Gettype ()); For (int i = 0; i & lt; original.getWidth (); i ++) {for (int j = 0; j & lt; original.getHeight (); j ++) {// received by R Pixels, g, b alpha = new colors (original .get...

python - Check if a form is valid from within a form field [Django] -

I have sub-squared the text-field form field in Django to create my own custom widget for a field I was wondering if it is possible to check that all other fields of the form are valid (I want to separate my server side behavior based on the recognition of other areas) See the comment Something like this: class CustomField (TextInput): def __init __ (self, * args, ** kwargs): ... soup (CustomField, itself) .__ init __ (* arg, ** kwargs) Input_type = 'hidden' def value_from_datadict (auto, data, file, name): aws_file_key = data.get (name, none) _media_bucket = boto.connect_s3 (Settings.AWS_ACCESS_KEY_ID, settings.AWS_SECRET_ACCESS_KEY) .lookup (settings.AWS_MEDIA_STORAGE_BUCKET_NAME) Try: except key: _media_bucket.get_key (aws_file_key): Failed to get print 'key.' Key = none if key and aws_file_key: fh = tempfile.TemporaryFile () key.get_contents_to_file (fh) fh.seek (0) files = plainloaded file (key.name, fh.read ()) ### If the form valid delete key Otherwise...

javascript - Unable to make an element move diagonally with jQuery animate() -

OK so I only need to learn JQuery for some animation on one site. I'm reading the tutorial, and I'm just trying to implement a simple diagonal step animation. I'm still very new to JQuery (as it has started today), but whatever I think, the following code should work. What am i doing & lt; Head & gt; & Lt; Script type = "text / javascript" src = "jquery.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Click to edit an '' '' '' '' '' '(' = '= 50', below: '+ = 50'}, 1000) '' '' '' '' '' ''. }}}}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "moveme" & gt; This lesson is & lt; / Div & gt; & Lt; / Body & gt; Edit: The associated assets of the CSS and the fixed brackets have been combined with the document But st...

sql - DB Evolution in Play Framework 2.0 -

On Play 1.0, when we change a variable type or for example @OneToMany change @ManyToMany to model play Make changes automatically, but with the 2.0 development script drop-down database. What is a way to apply the changes without leaving DB to Play 2.0? Yes, one way. You need to disable the automatic reconstruction of the file 1.sql and start writing your own evolutions with ALTERS instead of CREATES - them 2.SQL , 3.sql etc. In practice it means that, if you are working with a single database then you can also ... Manage the database tables and columns using your favorite DB GUI Evolutions Only when you are unable to use the GUI (host external connection is not allowed and do not have any GUI) or when you are planning to run multiple instances of the application on different databases, otherwise the GUI can be used. Yoga manually typing will be manually more complex. Tip: Sometimes, if I'm not sure if I have added all necessary relationships and barriers to m...

- Where Developers Learn, Share, & Build Careers

I am uploading an image file on the server and resizing it to save the disk space in the datastore. My method of resizing and then removing the original blob and keeping the small version of the blob all the metadata removed. Is there a way to copy Blob metadata from the original blob and copy it to a smaller version? def (self): upload_files = self.get_uploads ('file') blob_info = Upload_files [0] if blob_info: img = images.image (blob_key = blob_info) img.im_feeling_lucky () Img.resize (width = 600, height = 800) smallVersion = img.execute_transforms (output_encoding = images.JPEG) file_name = files with files.open (file_name, 'a') blobstore.create (mime_type = 'image / jpeg' ) F: In the form of f.write (smallVersion) files. Finalize (file_name) blob_key = files.blobstore.get_blob_key (file_name) blobstore Delete (blob_info.key ()) blobCacheURL = images.get_serving_url (blob_key) when If you create a Blob with the file API, you can set the uploade...

c++ - Why cant cast from pointer to reference to pointer in template function -

मेरे संकलन के समय में त्रुटि है इनलाइन टेम्प्लेट & lt; typename T & gt; टी एंड एनीमेशन :: गेटके (इंट सबएनिम, इंट नोड, इंट फ़्रेम इन एसएपीएएनआईएम) {कॉन्स्ट इंट की इंडेक्स = गेटकेइंडएक्स (सब एनीम, नोड, फ़्रेम इन एसएपीएनआईएम); रिटर्न स्टेटिक_कास्ट & lt; T * & gt; (m_Keys [keyIndex]); } निम्नलिखित त्रुटि डी: \ before_me \ motion \ pipeline \ एनीमेशन \ AnimationData.inl (98): त्रुटि C2440: 'वापसी': 'मोशन :: एनीमेशन :: कुंजी *' से 'मोशन :: एनीमेशन :: कुंजी' & amp; और मैं यह कैसे काम कर सकता हूँ? मुझे लगता है यह आप क्या चाहते हैं और एक घृणित कार्यवाही प्रदान करता है शून्य * m_keys [] = {0, 0, 0}; टेम्पलेट & lt; typename T & gt; टी * & amp; फू (कंस इंट इंडेक्स) {रिटर्न * रीइन्टरिप_कास्ट & lt; टी ** & gt; (और एम_कीज [इंडेक्स]); } Int main () {foo & lt; int & gt; (0) = नया इंट (); }

- Where Developers Learn, Share, & Build Careers

I have the following questions to get a column of data: routes_query = Select ([Schema.stop_times.c.route_number], schema.stop_times.c.stop_id == stop_id) .distinct (schema.stop_times.c.route_number) results = conn.execute (routes_query) returns [r ['route_number' ] Results in R]] I'm thinking that data is a cleaner way to bring back the original list of rows. 1-element is the shortest way to draw the list of tuples in the list: result = [r [0] for result in R] or: result = [r for r, result In]

session - Codeigniter flashdata not working in internet explorer and google chrome -

Codeigniter FlashData is not working in Internet Explorer and Chrome but it is working on Firefox. What can be the problem? In my Controller: - $ this-> Session-> Set_flashdata ('login_reference', 'your username or password is incorrect.'); Redirect (base_url () 'admin / login'.); In my opinion resonance '& lt; Span & gt; ' $ This- & gt; Session-> Flash data ('login_ar'). & Lt; / Span & gt; '; In Chrome and that means I'm getting an empty span, while in Firefox it's displaying flash data. There are similar questions on the stack but I have not got any answer which is working. I solved my problem. I can change from 'sess_cookie_name' to 'ci_session' to 'cisession' and sess_expiration to 7200 to 84200 and it was fixed.

c++ - Reference to multimap object -

Is it possible to return a reference to an object inside a valuable one? This is what I am trying to: return and this-> note-list. Search (key) - & gt; second; But I'm getting the non-contact lavewell reference for the type 'note' temporarily can not force 'note *' so I'm thinking Was that possible even here, and if so, how? Notifier is multimap and inside it is a note object. this-> Note list.find (key) - & gt; Second already gives you context for a multimap inside any object (if this-> note list one ampersand ( & amp; ) prefix that expression, you get an indicator on such an object (if the operator is not overloaded)

java - Generating HSQLDB tables in memory from JPA/EclipseLink (no files) -

The JPA 2 with Aklipsl ink 2.4 to me, and I have to implement an in-memory database using Acskyueldibi I am trying. HSQLDB: File: I have been enabled to create a file implementation of HSQLDB using jdbc ; = Shutdown true; ./ database / test files_readonly = true but when I try to use jdbc: hsqldb: mem: tableName , I get the following message: Staktrres: javax.persistence.PersistenceException: exception [EclipseLink-4002] (Eclipse persistence services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException internal exception: JavaksqlkSQLSyntaxErrorException: user without privileges or object not found: EFFECTIVITY error code: -5501 Call: impact bind receipt (HULL) value (?) = & gt; [1 parameter binding] Q: InsertObjectQuery (101) org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush (EntityManagerImpl.java:804) on com.gdeb.touchtable.db.TestJPAEntities.testTTTouch (TestJPAEntities.java:93 Org.hsqldb.HsqlException :) .............. lac...

JSLint : how to use it? -

I understand that JSLIIT is a great tool for JavaScript development, but in my global understanding of this There are some dark points. How to use it inside the environment of my development? In other words, how and how do you run JSLIT against your code? I have seen Aptana integration but it does not seem like this account details: / * jslint name: false * / How to work correctly in the client-side development environment? I want to feel good JSLint to parse the call, including items such as "console", "$" or "JQuery" How to use it with multiple files on the whole project (with no import I paste it on JSL to get proper sleep To answer the copy, we have read a lot of statements, so any answer that configures the online JSLINT form will be considered irrelevant. Someone uses the node.js automatically on your project Came up with a solution to get:

ruby on rails - Nested Model Form. Belongs_to class not displaying -

I have a topic model and a text model I have implemented the nested model form. After creating the topic, I took it to a page where it shows the guessed lesson. However, I failed to see the lessons. I believe the lesson data is not saved properly when I have given lesson for example. FID_by_accact_id ('1'), I get 'zero' in return. I am trying to explain how polymorphism works on the railway and if someone tells me where I am getting wrong or guiding me, it has to be made. topic model attr_accessible: subjectcode,: lessons_attributes is_maya: lessons, dependent => : Delete accepts_nested_attributes_for: lessons ,: reject_if = & gt; Lambda {| One | A [: content] .blank? } ,: Allow_destroy = & gt; Topic text model attr_accessible: lessonName, subject: subject_id related to: topic content controller > > theme> Gt; "Theme created successfully." And render: action = & gt; End of 'new' end form & l...

asp.net mvc 3 - MVC3 JQuery Tabs -

I am trying to create three tabs with 3 partial views. The main view that hosts the tab. & lt; Script type = "text / javascript" & gt; $ (Function () {$ ("# tab"). Tab ();}); & Lt; / Script & gt; & Lt; Div id = "tab" style = "display: inline; float: heir" & gt; & Lt; Ul & gt; & Lt; Li & gt; @ Ajax.exeLink ("Tab name 1", "Action mathia 1", "controller name", new Ajax option {UpdateTargetId = "div1"}) & lt; / Li & gt; & Lt; Li & gt; @ Ajax.exeLink ("Tab name 2", "Action math 2", "controller name", new Ajax option {UpdateTargetId = "div2"}) & lt; / Li & gt; & Lt; Li & gt; @ AjaxActionLink ("Tab name 3", "Action method 3", "controller name", new Ajax option {UpdateTargetId = "div3"}) & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & ...

svg - Using Javascript D3 library, how can I determine mouse position in data set of an area element on mousemove event? -

I am trying to set up a tooltip for the area path that I have created in all the arguments in the Mausomov event handler Passed, and I'm just getting a full data set of 0, 0. As far as I can see, there is nothing to indicate to my index the data. The "this" reference is also the SVG path element, but nothing is useful, even d3.select (saw), and I did not get the index anywhere. Is there a way to decide which data is my mouse? Look around I got the reference of D.Mouse (this), and it gives me X / Y coordinates, but how do I map it back to the data point in the data set? My goal set is to have a tooltip to display some meta-data related to that particular data point. Here are some code snippets as requested: var field = d3.svg.area (). Interpolate ("Monoton"). X (function (D) {return (scale (d.date));}) .00 (height-padding.bottom). Y1 (function (d) {return (scale (y.cc)}}; ("clip-path", "url (#clip)") .attr ('fill', '...

primefaces - Display HashMap data in JSF page -

मैं हांमप की सामग्री को इनपुट टेक्स्ट, चयनऑनमेनयू इत्यादि जैसे प्राइमफस विजेट्स में प्रदर्शित करने में संघर्ष कर रहा हूं। मैंने hasmaps परिभाषित किया है निजी मानचित्र & lt; स्ट्रिंग, स्ट्रिंग & gt; सबआईडमैप = नया हैशमैप & lt; स्ट्रिंग, स्ट्रिंग & gt; (); निजी मानचित्र & lt; स्ट्रिंग, मानचित्र & lt; स्ट्रिंग, स्ट्रिंग & gt; & gt; डेटामैप = नया हैशमैप & lt; स्ट्रिंग, मानचित्र & lt; स्ट्रिंग, स्ट्रिंग & gt; & gt; (); // उनके प्राप्तकर्ता और सेटर्स। उपआयडमार्क में कुंजी और मान शामिल हैं आईडी 001 निजी मानचित्र & lt; स्ट्रिंग, स्ट्रिंग & gt; सबआईडमैप = नया हैशमैप & lt; स्ट्रिंग, स्ट्रिंग & gt; (); SubIdMap.put ("id", "001"); SubIdMap.put ("name", "एलेक्जेंडर"); सबआईडमैप। इनपुट ("आयु", "24"); SubIdMap.put ("लिंग", "पुरुष"); सबआईडमैप.पूट ("देश", "ग्रीस"); आईडी = 002 निजी मानचित्र & lt; स्ट्रिंग, ...

javascript - Access $(this) DOM element from within jQuery Autocomplete Widget Ajax call -

In the code below (coffeespot), the AJAX call for jQuery's autocomplete data source, 5 lines of code But, I'm passing 2 paramours - duration: and ll: for: I'm trying to be $ (this) to be a DOM element. Was applied to autocomplete. In this case its $ ('[type = "text"] [name * = "[location]"]') I need to reference that on the 5 line with the DOM element especially ($ this). However, I believe that 'this' is something else in the radius that does not have a DOM element, will someone tell me what I need to do? Autocomplete (source: (request, response) - & gt; $ .jax url: $ ('[type =' 'text'] [name * = "[location]"] ' ). Data ('auto-complete') data: {period: request.term, ll: $ (this) .siblings ('$ [' type = "text"] [name * = "[location]"] '. [Name * = "[geocode_location]"]')} contentType: "application / json; charset = utf-8" success: (dat...

- Where Developers Learn, Share, & Build Careers

I'm having difficulty using the required annotation of June 4 to see exceptions. I can not compile the code because it has an unrestricted exception This is a simple example that creates a situation: import static org.junit.Assert. *; Import java.io.UnsupportedEncodingException; Import org.junit.Test; Public class simple {@ test (expected = unsupported encoding exception. Clash) Public Zero Simple () {string A = ""; A.getBytes ("UTF-123"); }} I get a compilation error called "compiled exception type unsupported encoding exception" It makes sense, and I can make it clear that Simplified unsupported encoding throws an exception, we have seen many examples online where people do not do it (which would be good when writing a lot of test cases). Is there a way to configure the test case, which clearly tell me what exceptions will be thrown? As far as I know, unsupported encoding exceptions are a check exception, therefore the compiler e...

winforms - Passing a Date Value from one Windows From to Another Form in C# -

I am working on a very complex project and I am very new to the windows project. I have 2 forms ViewSchedule.cs scheduler.cs (this is a dialog form / ul> viewable CS to select two dates are selected. They have been saved in the answer: _fromDate = dtFromDate.DateTime.ToUniversalTime (); _toDate = dtToDate.DateTime.ToUniversalTime (); Form 2 is the Scheduler CS is a dialog form I " text "> You need to set these properties before creating a public property in the dialog form and displaying the dialog. Then use these on-value property values. Add to form2 Date Properties: Public Partial Category Form 2: Form {Public Date Time Date 1; Set; } Public Date Time Date 2 {Received; Set; } Public Form 2 () {Initialization (); }} and access to Form 1 as follows: Private Zero Form 1_load (Object Sender, EventEurge E) {Form 2 FM = 2 Form 2 (); Frm2.Date1 = DateTime.Now; Frm2.Date2 = DateTime.Now; Frm2.ShowDialog (); }

java - What might be causing my results to print out in reverse of what they should? -

For this set of my last experiment I have do / while-while loops and I'm different from this one side My result is printed in this exact reverse how it should be. Public category classesAnini {Private int base 10; Private In Newbes; Public Tenanto () {} Public Tantawany (integer ten, in base) {base 10 = ten; NewBase = base; } Public Zero Saturns (integer ten, inti base) {base10 = ten; NewBase = base; } Public string getNewNum () {string newNum = ""; Int orig = base10; While (original> gt; 0) {newNum = orig% newBase + newNum; Orig = origin / newBase; } Return new number; } Public string toring () {string full = base 10 + "base is 10" + receivedNew () + "in base" + newbase; Return complete; }} Here are my outcomes: 234 base 10 base 9 280 100 base 10 1100100 is the base 2 in These are the expected results for the first two values ​​(23 in the base 9 and 100 in the binary) What I'm doing here: 234 Base 10 is 08 in base 9 100 ...

objective c - Running external programs in a sandboxed app -

How do I create an app to show all users logged in to the computer using the w command in the terminal? I have made a beta app but it is disabling sandboxing [it shows to users] but it is not working with sandboxing [this is the case that there are no user login] code : NSTask * task = [NSTask new]; [Task set lockpath: @ "/ usr / bin / w"]; NSPipe * Output = [NSPipe pipe]; [Work setstandard input: [nspipe pipe]]; [Set output standard output: output]; [Launch the task]; NSFileHandle * Read = [Output filehousingFororing]; NSDTA * Datard = [ReadTataOfFile]; NSString * Result = [[NSString alloc] initWithData: data read encoding: NSUTF8StringEncoding]; [TV view set string: result]; The utility to be used ( w >) Trying to access a file that is outside the sandbox. In essence, this will not work when launched from the sandboxed application.

jQuery hover animation - how to stop properly on mouseout -

My problem is that when I take the mouse quickly on the square element and then exit my cursor Sometimes the "mouseout" part of the hover function My HTML: & lt; Div id = "wrapper" & gt; & Lt; Div id = "o1" square = "square" & gt; & Lt; / Div & gt; & Lt; Div id = "o2" square = "square" & gt; & Lt; / Div & gt; & Lt; / Div & gt; CSS #wrapper {width: 100px; Height: 100 pixels; Status: Relative; } .square {width: 100px; Height: 100 pixels; Status: Completed; } # O1 {background: red; } # O2 {background: blue; display none; Javascript: $ (function () {var o1 = $ ("# o1"); var o2 = $ ("# o2" ); $ ('# Wrapper') Hover (function () (o1.fadeOut (400, function) (o2.fadeIn (400);})}}, function () {o2.fadeOut (400, function) {O1 .fadeIn (400);});});}); jsFiddle: I tried to use stop () with different parameters at different places in my code ...

- Where Developers Learn, Share, & Build Careers

I use method.invoke to call a method that throws a custom exception. What are the methods of catching this exception and handle it in an attempt to catch around Try.invoke? The only way I can think is to catch all the exceptions and test the exception type; try {... method.invoke ...} hold (AE) {} Try: try {method.invoke} (invocation targeting x) {throwable main exception = e.getCause (); If (mainException instanceof .....) {}} InvocationTargetException is the cover for the exception thrown by the method. In your case, the main exception would be A .

- Where Developers Learn, Share, & Build Careers

I am currently working with umbraco CMS. I notice about web.config session status. My site will be without a state server on a web form. What is umbraco dependent on session status? And if so, is it necessary for the authorization of the material or is it necessary to serve the content? End of the front until you do not code to do this, Is not used so that it is OK to display the contents of things. I'm not 100% off at the back office, but I think it is done with cookies instead of all sessions. The easiest way to check is to disable the session in the web.config file and return Attempt to use the office. If this works, then you are fine, otherwise it requires a session to work for content editing.

Extract information from Python file -

मेरे पास एक अजगर फ़ाइल है def ihavefile (): I = 1 def anotherfile (): पास मैं फ़ाइल से सभी कार्यों को निकालना चाहता हूं, जैसे ihavefile और anotherfile । मैं उसको कैसे करू? क्या मैं बस फ़ाइल लाइन को रेखा से पढ़ता हूं और शायद एक रीजएक्स लिखना या बेहतर तरीका है? आपके उदाहरण को देखते हुए: आयात मिलते-जुलते, कार्यप्रणाली, होशियार आयात का निरीक्षण करने से आपका_मॉड्यूल प्रिंट मिलमेल (अपने_मॉड्यूल, इज़फंक्शन) # [('अन्य फाइल', & lt; फ़ंक्शन एक और फाइल 0x028129B0 पर है & gt;), ('ihavefile नाम के लिए, getmembers में func (your_module, isfunction)

android - Open app menu item from webview -

I am trying to start an intention to open a zxing barcode scanner with a link in a webview. I have created a menu item which launches the Xxing scanner from the menu, when a person hits the menu button on their phone but some tablets do not have a menu button, so I have access to the webwaves Is required. I have no clue where to begin I thought that there would be a way to add a JavaScript code to the webview, when someone clicks on a link, then that Android: id = "@ + id / scanNow "Or equivalent says something. Or there is a way to launch for me: case R.id.scanNow: intent = new intent ("com.google.zxing.client.android .SCAN "); Intent.putExtra ("com.google.zxing.client.android.SCAN.SCAN_MODE", "QR_CODE_MODE"); StartActivityForResult (intent, 0); Back true; From HTML What you probably want There is some JavaScript in WebWebView and can link it to your Android application. For this, you will need to use. Check for more clar...