Posts

Showing posts from February, 2010

javascript - Set ReactJS state asynchronously -

If you perform an asynchronous action which converts state to componentWillMount (such as Docs ), But that component has been unmounted (user has navigated) before the async call is complete, now you are trying to set the state with unmountable callback on unmounted components, and one "Invoire violation: Replacement (...): Only a mount or mounting component The date can. " error. What's the best way around this? Thank you. Update 2016 isMounted because it will be removed from the response. Perhaps the best solution for problems arising from the async call from cmomponentWillMount is to move things to componentDidMount . How to solve this problem properly and how to use not is mounted here:

php - Unable to loop array elements in an object -

Then I have a class in which I have to open an array of files, here is the relevant part of the code: private functions unzipFiles () {$ this- & gt; FileNames = array ("file1.zip"); $ This- & gt; TerminalPrint ("The file is starting to open ..."); Forex Currency ($ this-> File Name as $ file) {$ this- & gt; Terminal print ("unzip $ file"); ..... // other operations} $ this- & gt; TerminalPirrent ("Finishing Files ..."); My problem is that when I call this function it prints the files start to unzip ... but unzipping file1 never goes to print. Zip . Neither this abnormally or anything goes out, it just leaves the feature to the foreach loop and prints to end the files ... I have a multi-index table like array ("File1.zip", "file2.zip", "file3.zip"); But this is not just inside the loop! Maybe there is something small, but I've gone for so long that I thought maybe I can ask ...

node.js - Strategies for maintaining dependencies across multiple node modules in separate repos -

I have a situation that is described in fact, I'm developing 2 node modules, A and B , where A depends on B . For Local Dev I add both projects and lever npm link at global level then by adding npm link B / Code> cloning node_modules . Now any change in B is automatically used by A . However, the problem is that sometimes forgetting the npm link while doing local development, and installing the latest official release of B I conclude . Often, it only has to work since the B , sometimes not very significant, but sometimes it fails in a subtle way and we get invalid bug reports and confusing developers Are there. How do I configure a for my package.json , such as using devs to the latest B Are they forced to clone A ? After making a release, there is an idea to counter the version number of B, and then it is necessary, which can not be established with NPM. Although this can work, it means that you will have to come up with arbitrary version nu...

Android: pass current activity to other with function and use it as target for back button -

I have a base activity class that increases activity like this: class base activity Enhances activity {public zero recipient (see V) {intent list = new intent (getApplicationContext (), list.class); String pkg = getPackageName (); List.putExtra (PKG + ".cat", v.getContentDescription ()); StartActivity (list); Override pending transition (R. Enem. Right_slide_in, R. NIM. Write_slide_out); }} I see that you want to use the code in the template file: android: contentDescription = "32" Android: onClick = " Friendly " Question: I want to send the actual activity information to list.class (activity) so that when I click on the custom button in the list, I set it back to the original Can I Activity I am quite new on Android and OOP, so I need help :) Thanks for reading. Best Relationship You can use the method startActivityOnResult; A good example:

Python networkx graph appears jumbled when drawn in matplotlib -

Image
I am testing to create a network graph on "network x"; My problem is that when I try to plot these articles using "matplotlib", nodes, edges, and labeled hips appear. I want to connect labels to the right node, and I want to see the edges as they are adding nodes. code import as NX try networkx: import as plt except Matplotlibkpyplot: G = nx.MultiGraph () strList = [ "Rick James "take," will smith "," Steve Miller "," rackem Willy "," little tunechi "," Ben Franklin "] strList2 = [" Jules Cesar "," Atticus Finch "," Al Capone "," Abe Lincoln "," Walt White "," Doctor Seuss "] i = 0 while i & lt; Lane (strList): g.add_edge (strList [i], strList2 [i]) i = i + 1 nx.draw_networkx_nodes (g, status = nx.spring_layout (g), nodelist = g.nodes ()) nx.draw_networkx_edges (g, status = nx.spring_layout (g), edgelist = g.edges ()) nx.draw_networkx_...

javascript - Mimicking results of form element outside of form -

Image
मेरे पास यह फ़ॉर्म है: & lt; form name = "dateChooser" id = " dateChooser "& gt; & Lt; चयन करें नाम = "चुनिएमोथ" आईडी = "कैलोच मोथ" & gt; ... & lt; / select & gt; & Lt; चयन करें नाम = "चयन करें" id = "calchhoose year" & gt; ... & lt; / select & gt; & Lt; / प्रपत्र & gt; तो किसी फ़ंक्शन के मापदंडों के रूप में # कैलचूज़मोथ / # कैलचुईयुयर मैं पास (this.form) बदलता हूं। कंसोल लॉगिंग (this.form) मुझे यह देता है: & lt; फ़ॉर्म का नाम = "तिथि चुनेर" id = "dateChooser" & gt; & Lt; चयन करें नाम = "चुनिएमोथ" आईडी = "कैलोच मोथ" & gt; ... & lt; / select & gt; & Lt; चयन करें नाम = "चयन करें" id = "calchhoose year" & gt; ... & lt; / select & gt; & Lt; / प्रपत्र & gt; मैं ' प्रपत्र के बाहर उसी फॉर्म डेटा को पास करने की कोशिश कर रहा हूं, इसलिए मैं 'इस' का उपयो...

javascript - ng-repeat does not update table display when changed -

My HTML does not display table values ​​in the form when it is updated here is the code: & lt; Div ng-controller = 'PersonalActionFieldController' & gt; & Lt; Table & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; Private Action Field (From Inform-Lawson) & lt; / Th & gt; & Lt; Th & gt; Form field & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; & Lt; Select ng-model = "name" ng-options = "parameters for items in item action action" & gt; & Lt; / Select & gt; & Lt; Tr ng-repeat = "Action in action" field "& gt; {{Action.actionParam}} And here is Javascript: Function PersonalActionFieldController ($ Range, $ http, $ rootScope) {$ rootScope. $ Watch ('actionTypeName', function (newActionTypeName) {Warning ('hey, myVar has changed!'); $ Scope ActionFields = null; $ scope.httpData...

image - Create custom content type and set up fields by module -

I am working on a custom module and I would like to define a custom node type with some fields such as image fields. I do not like to use the features this great module but I do not like to use it. My question is, where can I find some information about the special settings of the image area? 'Job_Post_image' = & gt; Array ('field_name' = & gt; 'Job_post_image', 'label' = & gt; $ t ('Image related to this job post.'), 'Type' = & gt; 'image', 'cardinality' = & Gt; -1, What are the more options? For example the file path, alt tag and etc. I do not understand why you will not use the FEATURES module for this. Your use case is actually the reason that the module is present, however, if you do not want to use the module in production, To test the type and code, export it to be exported as a facility to see how all this is put together. Programming an image field But there is a very broad form....

javascript - Mouseout handler gets triggered even if my mouse is not out -

Jquery mouseout handler is triggered even though my mouse is not basically my device looks: & lt; Ul class = "dropdown menu" role = "menu" aria-labelbedby = "dLabel" & gt; & Lt; Li & gt; & Lt; A role = "menuitem" tabindex = "- 1" href = "#" & gt; Category 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A role = "menuitem" tabindex = "- 1" href = "#" & gt; Category 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A role = "menuitem" tabindex = "- 1" href = "#" & gt; Category 3 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A role = "menuitem" tabindex = "- 1" href = "#" & gt; Category 4 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; And my javascript looks like th...

java - Some function texts appear crossed by a line on netbeans ide -

Image
I am using Netbeen to develop simple Android applications and I'm looking at several short tutorials online. I had a similar tutorial downloaded, some text is crossed by one line. SmsManager This is a small screenshot I made What could be done with that? This usually indicates an exclusion class or method that you should not use. Image in your missing category: This class was deprecated in API level 4. Android Etlephony has been replaced by SMSManager which supports both GSM and CDMA. ()

Javascript click event fired twice, already stopping proagation -

I have a very strange problem, but I can not repeat it here, because I do not know what it is, and This is a 200+ line part of the JS file, I will explain it at its best: My problem is in relation to the DOM manipulation, I am just using vanilla javascript. I have an element a , when you click on it, a function is triggered to show the content of a divis, I just addEventListener ('Click', function () {...}, false) . Does it work. On the same page, I have the same status, B . Problem here: Once I clicked on B , whenever I click on A , the click element is removed twice, on Google Have searched, but I found that only the results were talking about the need to stop the promotion of the event. I am doing this already. This is strange, that the problem is only once when I first click on B , otherwise it works perfectly. Any thoughts? Please ask any questions you need to understand the problem better. Thanks to everyone for the comments ideas. @ Stefanby su...

Correct syntax/format for MySQL Trigger with Date Criteria -

I am trying to prepare a trigger that checks the test if a 'request' is made before a specific date And if it sets 'yes' to the flag, and 'no'. But PHPMyAdmin just tells me that there is an error, the full trigger is already activated and working, so I did not include it in the rest. This is just the snippet that needs to be improved. Is: I think if there is a problem with the formatting of IF statement / date criteria: IF NEW.RequestDate & lt; '2012-07-12 00:00:00' then set new FlagRPRU Towel Twenty Toub = "Yes"; ELSE SET NEW.flagReqPreJulyTwelfthTwentyTwelve = "no"; end if; I think you can not change NEW.flagReqPreJulyTwelfthTwentyTwelve. Why do not you use local variables and enter that value in your table like this: if new '2012-07-12 00:00:00' then set myvar = "YES"; Either set = "no"; end if;

Rails view is printing certain values we want from a hash and then the full hash - WHY? -

We are trying to make a feed of comments and articles submitted, calling and showing only certain attributes of each We are able to get a type of feed, but the page is also returning a hash of all the attributes of the articles and comments. See below: Controller: def show @ user = user.fund (param [: id]) # @ feed = (Article + all + comment.) .sort {|! A, B A.updated_at & lt; = & Gt; B.updated_at} .reverse.take (10) Comment = Comment.All comments_are = [] Comments.Each | F | Comment_info = {} comment_info ['feed_text'] = f.commenter + comment_info ['TIME_STAMP'] = f.updated_at comments_array & lt; presents a goal '; & Lt; Comment_info end articles = Article.all articles_array = [] is articles.each. | F article_info = {} article_info ['feed_text'] = 'A new goal has been created:' + f.title article_info ['TIME_STAMP'] = f.created_at articles_array & lt; & Lt; Article_info end @feed = (comments_array + articles_...

JavaScript: variable = variable || variable -

इस सवाल का पहले से ही एक उत्तर है: 11 जवाब मुझे बिल्कुल नहीं पता है कि कैसे यह कहा जाता है कि यही वजह है कि मेरी खोजों में बुरी तरह से विफल रहे। इस कोड का मतलब क्या है var a = b || सी; मेरा मानना ​​है कि ऐसा कुछ है जो a के बराबर होता है जिसे कभी भी परिभाषित किया जाता है परन्तु मुझे यह सुनिश्चित करना होगा कि इसका उपयोग करने से पहले यह बिल्कुल क्या होता है।

c# - How to correctly check database connection with mysql in a .NET application? -

First of all I would like to be precise that I am searching on the internet to solve my problem and I think all the classic if (connection.open) is true; The solution which does not work for my needs in my case. I am working on an application. Before I run, I have to check the connection in the MySQL database, if the connection is not made, the user has been opened to open a new window for connection settings (username, server address, password ...) . In this window I have a Connection Connection button, to see if the connection is established, this is the code of button_click event: Private Zero Button_Click_1 (Object Sender, RoutedEventArgs e) { ApplicationSettings applicationSettings = New Application Settings (); ApplicationSettings.ServerDatabase = tbdbName.Text; ApplicationSettings.ServerIp = tbServer.Text; ApplicationSettings.ServerUserName = tbUsername.Text; //applicationSettings.ServerPassword = pbPassword.SecurePassword; ApplicationSettings.MakeConnectionString...

properties - Powershell Get property 2 levels down -

How it's going to flackoverstow, I'm new to powershell and the properties seem to be re There is a problem obtaining two levels below the source (aka: I can get the property property like $ foo.bar, but said property is not property such as $ foo.bar.soap) I have $ Code = [param (mandatory = $ incorrect)] $ output = ".. OrphanedGPTs.txt", [parameter (mandatory = $ incorrect)] $ domain = [system. DirectoryServices.ActiveDirectory.Domain] :: GetCurrentDomain ()) $ strGCPath = "LDAP: //" + $ Domain.Name $ oCmd = new-object -ComObject ADODB.command $ oConnection = new-object -ComObject ADODB.Connection $ oConnection .Provider = "ADsDSOObject" $ oConnection.Open ("Ad Provider") $ oCmD.ActiveConnection = $ oConnection $ strADOQuery = "& lt;" + $ StrGCPath + "& gt ;; (objectCategory = group); distinguishedName; subtree" $ oCmd .CommandText = $ stradOQuery $ TopLevel = $ oCmd.Execute () # This works $ fields =...

set intersection - Trouble with set_union and set_intersection - C++ -

I am currently working on a project related to set calculations. I am using the function set_inien and set_insecure to calculate the union and intersection of sets. My variables are: int AunionB [8]; Int Annian Sea [7]; // defined AunionC en BunionD [9]; // Define BunionD int AintersectB [4]; // Define intercact with antentec [3]; // Define Antareskect Set & lt; Int & gt; FinalUnion; // The final team of A, B, C, D set & lt; Int & gt; FinalIntersection; The last interval of A, B, C, D // These sequences of these four sets are respectively union and intersection: set A, set B, set C, and seti my set_union function are as follows: Set_union (AunionC, AunionC + 7, BunionD, BunionD + 9, finalUnion.begin ()); And my set_intersction function is as follows: set_intersection (entersexteb, entersect b +4, antterspectac, extractor + 3, final intrusion. )); When I compile, I get the "Required from here" error, which means I'm not sure. Can someone ...

javascript - Advanced Custom Field data not showing in Fancybox in Wordpress -

I'm using the Advanced Custom Fields plugin in Wordpress to output an image with the link (for this embed code Is also being used to add a custom video player) in posts on a store page. The output code for the custom field is placed in a diva that is hidden and then loaded in the faxbox when it is loaded. The watchlist link is clicked. The problem is, ACF material does not load when called into the fancybox, if I show the code outside the hidden divis it shows. I'm not sure where I went wrong code below! Cheers, & lt; Article id = "post- & lt ;? php the_ID () ;? & gt;" & Lt ;? Php post_class (); ? & Gt; & Gt; & Lt; An id = "fancybox-button" href = "# fancybox-content" class = "clock session" title = "& lt ;? php the_title () ;? & gt;" & Gt; Clock & lt; / A & gt; & Lt; Div style = "display: none;" & Gt; & Lt; Div id = "fancybox-content" style...

Syntax error on Java PreparedStatement.setBytes with mysql -

I am trying to install the Blob MySQL area with the PreparedStatement.setBytes method. The problem is that the question ends with having a string bytes. To insert it is more or less Then, here is the code where it is about:. created account stmt = this.getStatement ("update table user SET logintoken =? WHERE qrid =?"); Stmt.setBytes (1, token); Stmt.setString (2, times .getId ()); Stmt.execute (); For the record, the token is a byte [] always generated by 20 SecureRandom and herebytes the error: Com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: There is an error in your SQL syntax; The manual that matches the correct version of the correct syntax to check 'Tables users' SET logintoken = x'6DA9D5137B059AE6BCFE7F170693A76CA6484FFB24963BF88AA' on line1 You can see, It breaks into the beginning of an X locations' data logically since this query is not contained within the part of the data string. I assume that PreparedStatement.s...

pylint - why does Python lint want me to use different local variable name, than a global, for the same purpose -

Looking at the Python code such as def func (): for category i ( 10): Near pass for the border (10): pass pylint complaint redefining the name 'I' from outer area What is the insignificant way to write above? Use a different variable locally, j ? Say, but why, when the meaning of the variable is exactly the same in both cases (for the i index) assume that I will assign all the local index to j And later I think I want to use j as the second index in the global scope. Have to change again? I can not disable Lint Alerts, I do not want them, I want to write Pithanik, and still I want to use the same name as the same name, in the simple case above. Is this not possible? linter warns because i remains after the loop, if it Run at least once. This means that if you are using it without restarting it, then it will still be the value during the last iteration of the loop. The way you use it is ok because i will always be restarted. A useful pract...

c++ - Why string concat macro doesn't work for this "+" case? -

संक्षिप्त प्रश्न: क्या इसे विशेष संकेत जैसे " + , - स्ट्रिंग कॉकटालेनेशन मैक्रो ## के लिए? उदाहरण के लिए, #define OP (var) ऑपरेटर ## var ओपी (+) को विस्तारित किया जाएगा ऑपरेटर + ? सटीक समस्या: #include "z3 ++। H" #include & lt; unordered_map & gt; नेमस्पेस z3 {z3 :: एक्सपीआर ऑपरेटर + (z3 :: एक्सपीआर कंसल्ट & amp;, ज़् 3 :: एक्सपीआरआर & amp;;); } टाइप-फेड ज़ 3 :: एक्सप्र (* माइऑपरेटर टी) (ज़् 3 :: एक्सपीआरआर & amp ;, ज़्ज़ेई :: एक्सपीआरआर कंस & amp;;); #define STR (var) #var #define z3Op (var) static_cast & lt; MyOperatorTy & gt; (& amp; z3 :: ऑपरेटर ## var) #define StrOpPair (var) \ {STR (var), z3Op (var)} शून्य परीक्षण ( ) {Std :: unordered_map & lt; std :: string, MyOperatorTy & gt; StrOpMap1 {{"+", स्टेटिक_कास्ट & lt; MyOperatorTy & gt; (& amp; z3 :: ऑपरेटर +)}}; // fine std :: unordered_map & lt; std :: string, MyOperatorTy & gt; strOpMap2 {StrOpPair (+)}; // त्रुटि} s...

tsql - How to pivot a table to a view on matching-length delimited cells -

Image
Disclaimer: I am working with an old legacy system, so any comments I have made about poor design are meaningless. , Although I really appreciate this kind of feeling a new version that solves most legacy problems, but we still have to retain the old system, so basically, we have to manage now . I have a table that looks like this (yes, it is a single column, I know): and I need to see a report (which is for the reporting purpose) which is dynamically said in the table Process the data and it will return: Values ​​\ n- Delimited (shuddering) and you can always assume that each In the same number of values ​​in El (9 example, although maybe 4 or 12 or any number of other databases), but I think that could not be hurt no entry in the event of missing values. They will always be in a matching order (for example, 'AUD', 'Australian Dollar', and '$' are the first values ​​in their respective cells, and so on). I have discovered different ways to di...

java - null-pointer exception when coding bellmanFord algo -

In my computePaths () method I have an empty indicator exception, please help me find the reason below is my code And under my code I have output Vertex class: applies square vertex Comparable & lt; Vertex & gt; {String name; Double minestration = double. POSITIVE_INFINITY; Vertex last; Edge [] adjacencies; Public string toasting () {return name; } Public Vertex (String Arrangement) {name = argName; } @ Override Compare Public Ent (Vertak Other) {Return Double Computer (Min Distant, Other Min Distance); }} Edge class: square edge {double weight; Vertex target; Public Edge (Vertex Aggregates, Double RRGite) {target = argTarget; Weight = argued; Class for algorithm: Public class BellmanFord {public static zero computePaths (Vertex source, vertex [] corner) {source.minDistance = 0.0; PriorityQueue & LT; Vertex & gt; Vq = new priority question & lt; Vertex & gt; (); Vq.add (source); For (int i = 1; i & lt; vertices.length - 1; i ++) {while (! V...

Get the index ,while inserting a element into php numeric index array -

यहाँ जैसे उदाहरण कोड। & lt;? Php $ new_room_result = array () ; $ कमरे = सरणी ('सिंगल रूम', 'डेल्क्स रूम', 'प्रेसिडेंट रूम', 'सीवेि रूम'); विदेशी मुद्रा ($ कमरे $ कमरा) {$ new_room_result [] = $ कक्ष; // अगले चरण - आखिरी प्रविष्टि के सूचकांक के बाद मैं सूचकांक प्राप्त करना चाहता हूं I }? & Gt; क्या किसी के पास कोई विचार है? foreach ($ कमरे $ कमरा) {$ new_room_result [] = $ कक्ष; अंत ($ new_room_result); // सरणी $ key = key ($ new_room_result) के अंत में आंतरिक सूचक को स्थानांतरित करें; var_dump ($ कुंजी); }

ios - Dismiss PresentedViewController while present from UIPopoverController -

Presented Week Controller from PopOverview, this is the code I'm using SearchPropertyVC * SearchPropertyVC * CenterViewController = (SearchPropertyVC *) [board instantiateViewControllerWithIdentifier: @ "vcSearchPropertyID"]; UINavigationController * ConDetVC = [[UINavigationController alloc] initWithRootViewController: centerViewController]; Kondavevy Model Presentation Style = Presentation page sheet for UIImail; CondetWalk.Model Presentation Style = Presentation Sheet; Cognitivka Model Transition Style = UIModal TransactionCilterCrossDisolve; [Self-present ViewController: Animated ConDetVC: Yes Complete: Zero]; ConDetVC.view.superview.bounds = CGRectMake (0, 0, 700, 670); The controller is open when I was trying to shut down the controller so I am getting this warning "Warning: Dismissed by the View Controller Presenting or rejecting, trying to do is in progress! " After that I will click on any button to crash the app. This code which I am ...

node.js - Node: Error in installing npm package -

Trying to install node.js package with npm but giving me this error. error: ENOENT, stat 'C: \ Users \ Zain \ AppData \ roaming \ npm There was a problem today that was installed by you. Manually C: \ user \ MySpace \ appadata \ roaming \ npm to resolve the directory. Hope this is

python - Import rpy2.robjects gives error -

I have a data that has 10 million records, I have an R code in which the coefficient of a model using 3000 graphs Need to guess. Running an R code on this data takes a lot of time and sometimes my system is hanging. I'm using the Windows 8.1-64 bit version with 4GB RAM to reduce the time, I want to integrate R with Python. Although I have medium knowledge in R, but I am completely new in Python. I came to know that rpy2 can be used to call RAd from Python (I have Python version 3.4.1). As the robjects import rpy2 import rpy2.robjects but giving the following error: I have done the following Traceback (most recent call last): file "C: \ Python34 \ lib \ site-package \ rpy2 \ rinterface__init __ py.", In line 29, 0, win32con.KEY_QUERY_VALUE) pywintypes.error: (2, 'RegOpenKeyEx' ' Traceback (most recent call final): File "", line 1, import into rpy2.robjects as file "C: \ Python34 \ lib \ site-package \ rpy2 \ robjects__init __ py. ...

Move onclick="touch(event) from .html to Javascript file -

मेरे पास .htlm फ़ाइल में एक div है: & lt; div id = "स्पर्श" ऑनक्लिक = "टच (इवेंट)" & gt; & lt; / div & gt; मैं इस div को .html फ़ाइल में इस तरह कैसे बना सकता हूं: & lt; div id = "touch" & gt; & lt; / div & gt; और फिर मेरी .js फ़ाइल में मैं इसे "क्लिक" पर एक "if" कथन के भीतर बनाना चाहता हूं: (मैं "enableTouch" के लिए config.js फ़ाइल में एक स्विच है) ) यदि (enableTouch == सच) {document.getElementById ('स्पर्श') ... मुझे क्लिक करने पर सक्रिय करने के लिए यहां क्या करना होगा? एनिमेशन कोड यहाँ। } धन्यवाद। फिर भी काम नहीं करता: यह काम करता है अगर मैं बाहर ले जाता हूं: "document.getElementById (' स्पर्श ')। Onclick = स्पर्श; " और .html में div को परिवर्तित करें: & lt; div id = "touch" onclick = "touch (event)" & gt; & lt ; / div & gt; धन्यवाद फिर से। // यदि ((EnableTouchToDisplayHourlyForecast == सच) ...

regex - Loggly. Using regexp for search -

I can not understand how to use regexp in logging. For example, log what I want to see using the expression / 24nonstop. + 7554 / . "" "" "", "Extra": "" "": "", "http:": {"SERVER": {"REQUEST_URI": "/ 24nonstop / Result? ACT = 1 & SERVICE_ID = 7554 & pay_ACCOUNT = maxudov% 40ukr.net% D0% 9C% D0% 90% D0% A0% D0% 9 A% D0% A3% D0% A1.777 and PAY_ID = BA56136B-93C8-4715- AA 5 F-5169 9305C6F2 and TRADE_POINT = 11057 and signature = A77D6B3B4CF84CA1B97C8FA5D9E7688D ", ... But in this case, logging does not find anything. If I use the / 24nonstop / then the logger finds the logs. Am I searching properly? According to Regular expression works only on single tokens when you go to full text search But a regex> can not do that which is divided into many tokens due to special characters or other rules, for example, this will not work because it is token, even i...

mysql - CakePHP counterCache joining irrelevant tables to update counter -

I have a user model and message model. The message model is connected to the user model twice this way: public $ associTo = array ('UserSender' = & gt; array ('className' = ' & Gt; 'user', 'foreign key' = & gt; 'sender_id', 'counter cache array (' class_name '= & gt; array (' message_sent_count '= & gt; array (' is_deleted '= & gt; wrong )), 'UserRecipient' = & gt; array ('className' = & gt; 'user', 'foreign key' '> array' array ('is_deleted' => array ('is_deleted' = & gt; ; Incorrect), 'messages_unread_count' = & gt; array ('is_deleted' = & gt; wrong, 'is_read' = & gt; recipient_id ',' counter cache '=> FALSE)),' operator '= & Gt; Array ('className' = & gt; 'operator', 'foreign key' = & gt; 'operator_id')); ...

How to use same Facebook app id in many ios applications -

How to use the same Facebook app for a different iOS application I am using the Facebook Graph API 2.0 To be re-submitted. How to redirect iOS application from Facebook application using optimized urlcheme such as fb39877767662comcompanynamegame

php - facebook api no longer working -

& lt;? Php session_start (); // शामिल फ़ाइल और $ app_id = 'xxx' का उपयोग करें; $ App_secret = 'xxx'; FacebookSession :: setDefaultApplication ($ app_id, $ app_secret); $ सहायक = नया FacebookRedirectLoginHelper ("` http: //example/facebook4.0`/ ", $ app_id, $ app_secret); {$ Session = $ helper-> प्रयास करें; getSessionFromRedirect (); } पकड़ (FacebookRequestException $ ex) {} पकड़ (अपवाद $ पूर्व) {} $ loggedIn = false; यदि (isset ($ सत्र)) {if ($ सत्र) {$ logIn = true; {// यहाँ लॉग इन करें और डेटा प्राप्त करें user_profile = (नया FacebookRequest ($ सत्र, 'GET', '/ me')) - & gt; निष्पादित करें () - & gt; getGraphObject (GraphUser :: className ()); print_r ($ user_profile); // प्रिंट डेटा} पकड़ (FacebookRequestException $ e) {गूंज "अपवाद हुआ, कोड:"। $ ई & gt; getCode (); "संदेश के साथ" गूंज: "। $ ई & gt; getMessage (); }}} अगर (! $ LoggedIn) // यदि उपयोगकर्ता ऑनलाइन नहीं है // लिंक प्राप्त करें ...

c# - System.IO.Packaging.PackagePart.GetStream() does not work if the package is hosted on a webserver (URL) -

I have a package hosted on a webserver (URL) (System.IO. Packaging.Package) and, if I feed the Package URL in the web browser I can download the package. My requirement is to remove a file from the package (the section attached to the file) without downloading the entire package. System Io There are classes for manipulating the packages in packaging. If this package is located on an SMB share, this class works well, but if the package is hosted on a web server, then fails to remove the file. When I call the PackagePart.GetStream () method, an exception that says that the stream is written only and therefore a reading action can not be taken. I have tried to use overload of the package. The Open () and PackagePart.GetStream () method pass through allowing reading / writing, but still does not work. If I correctly understand the stack trace, MS.Internal.IO.Zip.ZipIOLocalFileBlock._blockManager does not have permission to promote from PackagePart.GetStream () call. Is this a...

python - Parsing large XML file to find data linked to another piece of data -

I have a 9 MB XML file that contains information about the system in which I am writing scripts. The small files named system symbols each have a tick type in each symbol and related to a property . Data stored in this format. & lt; Symbol symbol name = "name" property = "property" tick type = "type" /> I currently write 3 files by parse the file, each contains a list of three things. What I need to do is a list or a dictionary in the dictionary that all the symbols can be written in a file and their related type and property are written on any other part of the file. The result of the result is an html file with a dropdown where you select and property and it displays symbols and each symbol the type . My current method of parsing is using the xml.dom.minidom module and then using getElementsByTagName it's all about 3 lists that I want but do not link them with related members of other lists follwing Insta...

objective c - Creating NSShadow makes an error -

I am making a white shadow in Objective-C and using the code NSShadow * MyShadow = [[NSShadow alloc] init]; [MyShadow Set Shadowdoor: [UIColor whiteColor]]; And it works fine, but when I'm trying to minimize it NSShadow * myShadow = [[[nsahona alloc] init ] SetShadowColor: [UIColor whiteColor]]; I get an error message in introducing 'NSShadow * __ Strong' with an incompatible type 'zero' expression. "Anyone knows what's happening here?" What's happening, the compiler will be NSShadow * to zero Assigning.> (Return type of setShadowColor and that whole expression). You have to use your two-line approach, which is to read and maintain it's easy / P>

google app engine - Install maven 3.1.1 plugin for eclipse juno -

I want to install maven 3.1.1 for eclipse. I use Eclipse Marketplace to search for Maven after installing, I have version 3.0.4 of Maven. How can I set up Maven with version 3.1.1? Setting up Maven separately , And then link my eclipse installation to it I have worked with Eclipse Kepler, but it should also work with Juno. Here are the instructions for setting up and configuring Maven 3.1

android - Error During installation Cordova 3.5 from Command Line interface -

Image
I found an error during the installation of Cordova 3.5 with the command line interface. I also You have to see the full path variable name path for ANT bin folder, edit it, edit it. Add one of the following at the end of its value. Add it to your path variable % ANT_HOME% \ bin or C: \ ant \ bin

jsp - getInputStream in PHP -

Do I have JSP a page written in (I do not know) that I need Understand and analyze whether the page can be written in the second format (PHP / ASP etc.). I came across the following file: BufferedReader myRequest = new BufferedReader (new InputStreamReader (request.getInputStream (), "UTF-8")) after searching I believe that getInputStream method is requested to read the request body in binary format achieving "Post-body text" itemprop = " text"> actually getInputStream () access request Thus, you get the request of the body only with the whole thing can do. Please please check you requested can be used for the purpose of the body as a string type to learn more about your work in php.

c# - Mocking Domain Model & Building Tests Without Repetition -

In my service layer looking for some explanation in the test, I have the following method: IDomainModelRepository Domain Model Repository Read Only; Edit Public DomainModelDataData (Int DomainModiDind, IPRinational User) {DomainModel myDomainModel = domainModelRepository.Find (DomainModelID); If ((myDomainModel == zero) || (! MyDomainModel.UserCanEdit (user))) throw new UnauthorisedException (); // Other stuff here ...} Now I am creating a test suite, but have hit some snaps. Code> myDomainModel.UserCanEdit (user) can not be switched because DomainModel is not implementing any interface. This becomes even more complicated because the logic contained in UserCanEdit actually checks the fields on other domain models of your domain. So how can I set it easily to return a set value to allow me to test the service? I'm testing the method correctly responds if repo domainmodel does not search for items, then I test it properly if the user can not be edited (okay i When ...

Cordova PushPlugin - Can't receive GCM notification on android if app is not running -

This is my first message here. I am using Cordova to develop a web application and I would like to receive push notifications to use GCM under Android. I tried this plugin: I tried the given example and the app is running when it is working fine: - The information received is shown inside the app if it is running in the foreground - The notification received within the Android Notification Bar has shown that the app is running in the background. My problem : If I restart my smartphone, or if the app is not running, I can not get a notification. Is there something special for displaying information in the Android Notification Bar, when the app is not running or after the phone is restarted? Thank you very much for your help. To approve the notification service, your app must have a broadcast receiver or you can use it Are

how to read binary file as a struct in c#? -

I am working on a project on C #. I want to read a binary file of 64k in length, which is the only 16 bytes. Each 16 byte is a context in which the form is: #pragma noalign (trace_record) typedef struct trace_record {BYTE char tr_id [2]; // 2 byte WORD tr_task; // 2 byte word tr_process; // 2 byte WORD tr_varies; // 2 bytes KN_TIME_STRUCT tr_time; // 8 bytes} TRACE_RECORD; I think I can read the file using the binaryreader class, but how can I read this by multiplying 16 bytes in this form. Later, I will get some 16 byte marks for further processing. Therefore, I would be grateful for any help. Please assume that I'm getting started in C # :) The easiest work example is below Probably though improvement can be done. If you have large endian data, you can use a library for example. public structure trace_record {// You can create an array here, but you can manually create a public byte tr_id_1; // 2 byte public byte tr_id_2; Public UInt16 tr_task; // 2 bytes public...

java - How to fix NullPointerException? -

इस सवाल का पहले से ही एक उत्तर है: 12 जवाब मैं थोड़ा काम कर रहा हूं परियोजना और बड़ी समस्या है .... मुझे जावा में NullPointerException के खराब पक्ष का सामना करना पड़ा। यहां कोड है: निर्देशांक [] बिंदु = नए निर्देशांक [26]; (इंट आई = 0; आई और एलटी; पॉइंट्स. लैंगटी; आई ++) के लिए {if (points [i]> gt; 0) {char ch = (char) (i + 65); बिंदु [i] .setName (ch); बिंदु [i] .setX (अंक [i]); }} // निर्देशांक है जिसमें 3 फ़ील्ड / setName () विधि होती है केवल नाम फ़ील्ड // सेटएक्स () विधि सेट करता है एक्स समन्वय सेट करता है मैं वर्णमाला में प्रत्येक अक्षर के लिए बिंदु बनाना चाहता हूं , लेकिन जब मैं setName () विधि का उपयोग करता हूं, तो मुझे NullpointerException मिला.मैं इसे कैसे ठीक कर सकता / सकती हूं, कृपया मदद करें: ( "post-text" itemprop = "text"> आप अपने निर्देशांक उदाहरण को प्रारंभ नहीं कर रहे हैं, केवल सरणी को पकड़े हुए हैं। परिणामस्वरूप, बिंदु [I] फेंकता है NullPointerException जैसा कि यह एक null निर्देशांक के लिए इंगित करता ह...

java - How to create zip target instead of jar in maven? -

Can someone help me create zip targets instead of jar in the Major? I tried several methods but Did not progress. The descriptor file given in the assembly path is as follows: & lt; Assembly & gt; & Lt; Formats & gt; & Lt; Format & gt; ZIP & lt; / Format & gt; & Lt; / Formats & gt; & Lt; Fileset & gt; & Lt; Fileset & gt; & Lt; Directory & gt; Src / main & lt; / Directory & gt; & Lt; / Fileset & gt; & Lt; / Fileset & gt; & Lt; / Assembly & gt; & lt; Plugins & gt; & Lt; Plugin & gt; & Lt; ArtifactId & gt; Maven-assembly-plug-in & lt; / ArtifactId> & Lt; Configuration & gt; & Lt; Descriptor & gt; & Lt; Descriptor & gt; Src / assembly / descriptor.xml & lt; / Narrator & gt; & Lt; / Narrator & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt; & Lt; / Creat...

python - SQLAlchemy bulk insert failing -

I am bulk compositing using a SQLAlchemy in a loop as follows: table For batch, pending inert: self.conn.execute (table.insert (), batch) Where batch list dict and the table is a SQLAlchemy table before the batch is successfully executed but with the inserting on the same table, the following error fails later in the recurrence Statement error: parameter for parameter parameter 'security_exchange' parameter 45 (original reason: invalidRequestError: parameter value 45 in bind parameter 'security_exchange' is required for a value 45) UNSERT In ......... Here is the security_exchange blank column in DB (PostGraceQL), so it is not mandatory and omitted in all the entries in the batch. I'm confused why this is the first successful for bulk inputs, but fails to put another in the same table. Also for the same table, the number of columns always available for all the names in all batches is the same. To batch, all the bits in the batch are all set...

How would i wrap each image I added with jQuery with a link also -

With some help, I was able to change some text with an image for each member $ ("#chatscroll") .html ($ ("#chatscroll") .html (). Replacement ('combat falter', '& lt; img src = "http://larryvasta.com/football / Img / icon / mood_icon page "/>);); $ ("#chatscroll") .html ($ ("#chatscroll") .html (). Replace ('Grundle Goblins',' & lt; img src = "http://larryvasta.com/football/img/ Icons / Goblins_Icon.png "/> ')); $ ("#chatscroll") .html ($ ("#chatscroll") .html (). Replace ('Commissioner', '& lt; img src = "http://larryvasta.com/football/img/icons / Commish_Icon .png "/> ')); I need to direct links to each image on their profile page How can just add links to your existing code? $ ("#chatscroll") .html ($ ("#chatscroll") .html (). Change ('combat falter', ' & lt; / a & gt; ...

jquery - Exclude widget's input fields from being submitted in parent form -

I've created a widget using & lt; Input & gt; elements are added by this required by this widget can be initialized within a form element, which can result in depositing fields added to the parent form submission. I do not want to specify the specified input, and it should be done inside the widget because it is the same as the input elements Knowing about Re-enable this idea before submitting the form form format before, and afterwards. It is important to disturb the code outside the widget Unfortunately , During the _create widget, it. Element has not been added to DOM , so there is no way to add the handler to the submission event of the form. Sample code: $ (function () {$ .widget ("Foo.Widget", {_create: function} (this.element.append ($ ( "Input type = 'radio' & gt;"). Attr ("name", "the input")); // Force the submission of the included form var form = this.elemeng.closest ( "...

twitter bootstrap - Creating Thumbnails from json -

I have a Jason object of such places: {"places": [ {"Name": "idiot 1", "late": "41.6504", "tall": "-0.879137", "IMG": "http://link1.com}, {" name ":" idiot 2 " , "Lat": "41.6049", "Long": "-0.899137", "IMG": "http://link2.com}]} How do I create custom bootstrap thumbnails? Can I (with names and pictures) be dynamically? I know how to use json, for example, I show a location on Google Maps using javascipt. So now I will populate thumbnails dynamically with json My code is: Any suggestions? Not sure if it's okay how you copied it Your quotation marks for sections within .append () are required, either a single quotation mark is required or an escape from the backslash (\). The following worked for me ... html js var data = {"location": [{"name": "idi...

android - Build Robotium Test Project from command line -

I am looking for the Android Build system and want to take everything on the Jenkins server, I want to create projects on Jenkins and make the instrumentation The test has been successful in running the test (white box test) and now the integration is stuck in the test. I followed an eclipse to create an Android test project and run the test successfully but let me command it Shall not be able to run so that I can test on Jenkins. If I run the project on the first eclipse, and later I will be able to use the command: ADB Shell AMS Tool- w com.example.uitests / Android.test.InstrumentationTestRunner However, if only want to start everything from the command line. I do not know about making the project ... It seems that created by eclipse There is no build file .. Do I need to use ant or gradeel? If so, what is the right way to do this? Edit: To list all instrumentation information, call ADB Shell Evening List Tool I am able to find my test package: instrum...

vba - autocad 2008 - copy object between two open drawings -

I'm trying to copy a polyline from a drawing 'context Save ADDocument Set Source DWG = ADDODOG Set Destination DWG = APDAG = Application to draw the source as adidrying. Documents 'Ad' users have selected Polyline, Dim Poli as the Double Digitization in the form of Object Dim Picture (0 to 2). GateNTty Polly, Pint, "Please, select Pollyline" Copy Object Source from DWG Destination DWG Deem Objects (0 to 0) Object Set Objects (0) = Poli Source DWG Copobjects Objects Here The problem indicates SourceDWG current with the last line Drawing - Destination drawing, not drawing source. This code is typed inside the stack overflow editor so that Resolve: source document poli .document is the destination hydraounding. ModelSpace PolyDocument.Copyobjects object, this drawing. ModelSpace

android - How to maintain instance of fragment -

I have made several pieces in the menu. I called the piece using the switch case. That's why a new example has been made every time. The same example? My code here: piece slice = null; Switch (position) {case 0: piece = new piece 1 (); break; Case 1: section = new piece 2 (); break; Case 2: section = new piece 3 (); break; Case 3: Section = New Piece 4 (); break; Case 4: Section = New piece (5); break; } Piece Manager Piece Manager = getFragmentManager (); Fragmentation manager BBT transactions () Replace (R.id.content_frame, fragment) .commit (); instead of piece slice = null; Fragment = new fragment1 () fragment = new fragment2 () Store pieces in different variables: piece slice 1 = faucet; Piece volume 2 = faucet; Fragment1 = new fragment1 () fragment2 = new fragag2 () ... And if only the variable null

java - Getting 2 or more values then Checking them to be integer -

How can I get a user's 2 or more integer values ​​with the scanner class, then check them out; If they are all integers, then to run some statements and if only a warning is not shown that there is an accident! I have written this code but with java it can not be right! Of course I know that from where there is a problem I only want something like this: scanner sc = new scanner (System.in); System.out.println ("Enter the first value:"); String v1 = sc.nextLine (); System.out.println ("Enter second value:"); String v2 = sc.nextLine (); If (v1.hasNextInt () and v2.hasNextInt ()) {} Change your code: scanner sc = new scanner (System.in); System.out.println ("Enter the first value:"); Int v1 = sc.nextInt (); // This line can be used before hasNextInt () System.out.println ("Enter second value:"); Int v2 = sc.nextInt (); // You can also use hasNextInt () before this line // You have 2 integer values.

java - partially mapping the result of a NamedNativeQuery to a class -

मेरे पास एक @ एंटीटी वर्ग व्यक्ति है, जिसमें एकाधिक फ़ील्ड और मैं कई @NamedNativeQuery से व्यक्ति वर्ग के परिणाम को मैप करना चाहता हूं, लेकिन मैं जो प्रश्न पूछ रहा हूं वह में प्रत्येक फ़ील्ड के लिए मूल्य नहीं लौटाता है व्यक्ति वर्ग जब मैं कोई क्वेरी चलाने की कोशिश करता हूं तो मुझे निम्न त्रुटियां मिलती हैं: [त्रुटि] o.h.u.JDBCExceptionReporter - अमान्य स्तंभ नाम बार [त्रुटि] खेल - कार्रवाई का आह्वान नहीं कर सकता, आखिरकार एक त्रुटि मिली: javax.preistence.PersistenceException: org.hibernate.exception.SQLGrammarException: क्वेरी को निष्पादित नहीं कर सका मेरी कक्षा को समान रूप से सेट किया गया है इसे करने के लिए: = Person.class), नाम @NationalNativeQuery (name = "getBar", // {idnumber, नाम, बार} क्वेरी = "EXEC dbo.proc_get_bar: name", resultClass = person.class के लिए मूल्य लौटाता है}}) @ एंटीटी सार्वजनिक वर्ग व्यक्ति {@Id @Column (name = "idnumber") निजी आईआईएनएनम्बर; @ कॉलम (नाम = "नाम") निजी स्ट्रिंग नाम; @ कॉलम (नाम = "जन...

ios - Apply same vertical position as sibling view with autolayout -

class = "text"> I am creating a custom UITableViewCell , but I do not think it makes a difference - My question stands alone I'm adding a scene, subclassing one of the existing cell styles, and a scene in the Superclass (a UILabel ) that is within the cell Adjusts its vertical position, depending on whether the content in other labels is present or not. If the second label contains content, the first label is centered vertically between the second label and the top of the cell view. If there is no content in the second label, the first label is centered between the upper and the bottom of the vertical panel view. I like this behavior. I'm trying to add a third label horizontally horizontally to the first label, I have used the lack of autoletech to pin a new label that I have previously labeled like: [Visual format with NSLUET content restrictions: @ "[first label] - (5) - [third label]" option: 0 metric: zero view: view]; This is working f...

node.js - Node "req is not defined" -

जब मैं निम्नलिखित स्क्रिप्ट शुरू करने का प्रयास करता हूं: var http = need ("http" ); Http.createServer (फ़ंक्शन (अनुरोध, प्रतिक्रिया) {response.writeHead (200, {"सामग्री-प्रकार": "पाठ / सादे"}); प्रतिक्रिया। लिखें ("हैलो वर्ल्ड"); response.end ();}) .listen (8000); Var ip = req.headers ['x-forwarded-for'] || req.connection.remoteAddress; Console.log (ip) मुझे निम्न त्रुटि मिलती है: नोड। Js: 201 throw e; // process.nextTick त्रुटि, या पहली त्रुटि पर 'त्रुटि' घटना ^ संदर्भ त्रुटि: req ऑब्जेक्ट पर परिभाषित नहीं है। & Lt; अनाम & gt; (मॉड्यूल। Js: 459: 10) मॉड्यूल.लोड पर (मॉड्यूल।) (मॉड्यूल।) में मॉड्यूल._कंपाइल (मॉड्यूल। जेएस: 441: 26) पर (/home/ubuntu/IPDeliverer/server.js:9:10) EventEmitter._tickCallback (node.js: 192: 41) पर Array.0 (module.js: 479: 10) पर फ़ंक्शन ._लोड में (module.js: 308: 12) / Pre> मेरा पहला अनुमान था, कि कुछ मॉड्यूल लापता है, इसलिए मैंने निम्न मॉड्यूल को इस तरह स्थापित किया है: npm...

javascript - Google Maps: Change infoWindow's Frame -

Image
I have created a marker and added a listener on this marker which opens an info window. My problem is that I can not understand how to change the default frame of information. Is it possible? Here is my code: var marker page = new google.maps.LatLng (lat, lng); Var shopMarker = new google.maps.marker ({position: markerPosition, map: map, icon: iconshop, title: "shop", dragable: incorrect}); Var content = '& lt; Ul class = "shopmaplist" & gt; & Lt; Li & gt; Text & lt; / Li & gt; '+' & Lt; Li & gt; & Lt; Period & gt; Read & lt; / Span & gt; Text & lt; / Li & gt; ' + '& Lt; / Ul & gt; & Lt; Ul class = "shoplistel" & gt; Text & lt; / Ul & gt; & Lt; / Br & gt; + '& Lt; Div class = "buttonShop" & gt; Input type = "submit" class = "btn continue" value = "text" tabindex = "3" & gt; ...

javascript - AJAX or Socket.IO make more sense in my situation? -

I am working on something using AJAX, which sometimes needs seconds per second . Each post returns the JSN object (generated by PHP file, generated by ~ 11,000 bytes), and the average latency is between 30 MMS and 250 MMS, if I'm on WiFi or wired, but every broadly 1 / In the 15 calls it is about 4000 meters of spikes, I'm trying to find a way around it, because I see two options now: throw timeouts on AJAX calls, and It is asaf Make a call to L post still continue, it's a journey back as usual) or ... Cut everything down, node Learn JS to repair this problem so that I can possibly use the website. The solution as far as I can see, is based on why the original call is failing if it is something wrong with the AJAX call, then one There is a possibility to go through the new GET, and resolve this issue. But if this is something with the server then logically GET time comes along with time, it is an issue with the server, and I'm dead in water. I have no e...

reporting services - Report Percentage formatting -

I am currently using SSR 2012 and issuing a small release with percentage, my current Calculation profit / loss is divided by total Sell the customer and sell the warranty It is only for the purpose of the background of readers, usually when I have a calculation in the cell which I want to be just format with letter P. The problem I have is / is the figure of profit - should be divided by £ 6284.31 and £ 237.00, which should give me a figure of -26.51%, but using the same option, I have done everywhere and I have been -2,651.61% I have been left with Hopefully enough information is there. Thank you Phil format you want to use P2 When using one percent format, the value automatically multiplies by 100 (-26.51 * 100 is -2,51.61 which you are seeing). Basically, you only have to divide the result of your profit / loss by 100.

ios - linker command failed with exit code 1, framework and library errors -

I recently received the source code for the app (last year) created in 2013. However, when I try to run it, I get 3 warnings: ld: warning: option '-l / user / cheapm / ios / apn name / apnm_sterster' Directory not found: Alert: Options not available for '-f / user / cheapm / ios / apiname / apnme_chaster' directory: option '-l / users / cheapm / ios / apn name / apnme_cherster / jbrsdk' / pre > Another error Library for ld: -lzbar not found clog: error: failed with linker command failure code 1 (Use -V to see invitations) Something Additional points: 1) The name of the previous developer is chess, and / user / chess is not on my computer, or locatable in finder. 2) The other linker flag is empty, the framework search path is empty, the library search path is empty. 3) It appears that the app was made in xCode 4, while I am using encoded 5. Any help will be appreciated, Thank you in advance, - nick UPDATE: 3 warnings are by Droppy E...