Posts

Showing posts from May, 2015

javascript - How to Parse Facebook Graph API "hours" response -

I am working with the Facebook Graph API to get some data from the Facebook page but I do not know how the results "Hour" is something like this: {"wed_1_open": "17:00", "wed_1_close": "02:00", "thu_1_open": "17:00", "" 02: 00 "," 2_1 "," 1/2 "," 1/2 "", "1/2", "Free_1_close": "02:00", "Sat_1_pennon": "12:00", "sat_1_close": "02:00", "So I wonder how to parse this result to get some human-readable text like one from the info bar: / P> Wedding - Venus: 17:00 - 2:00 Saturday: 12:00 - 2:00 Sun: 12:00 - 20:00 ago Thanks! One way to do this is:. Note: Something I have just written in a few minutes. If you are working with large amounts of data, then you have to customize accordingly. var rawFbData = {"wed_1_open": "17:00 "," Wed_1_close ":" 0...

string - Extract the file name and its extension in C -

तो हमारे पास पथ स्ट्रिंग /home/user/music/thomas.mp3 है। फ़ाइल स्ट्रिंग निकालने का आसान तरीका कहां से है (एक्सटेंशन के बिना, "थॉमस") और इसका एक्सटेंशन ("एमपी 3") इस स्ट्रिंग से है? फ़ाइल नाम के लिए एक फ़ंक्शन, और विस्तार के लिए। और हमारे हाथों में केवल जीएनयू लिबसी। #include & lt; stdio.h & gt; # शामिल करें & lt; stdlib.h & gt; #include & lt; string.h & gt; #define MAX_FILENAME_SIZE 256 char * filename (char * str) {char * परिणाम; चार * अंतिम; अगर ((अंतिम = strrchr (str, '।'))! = नल) {if ((* last == '।') & Amp; amp; amp; & amp; (अंतिम == str)) वापसी str; Else {परिणाम = (चार *) मॉलोक (MAX_FILENAME_SIZE); Snprintf (परिणाम, आकार के परिणाम, "%। * S", (int) (अंतिम - str), str); वापसी परिणाम; }} और {वापसी str; }} Char * extname (char * str) {char * परिणाम; चार * अंतिम; अगर ((अंतिम = स्ट्र्रर्चर (str, '।'))! = नल) {if ((* last == '।') & Amp; amp; amp; (अंतिम == str)) "" वापस...

ios - How to implement a UINavigationController for modal presentation, not for popover, with an adaptive segue -

Using a universal storyboard and adaptive segues, how can a current popover apply segue, which will have a navigation bar A title and a close button) only when presented as a model on the iPhone, and when presented as a popover, will there be no navigation controller on the iPad? I believe the proper setup does not include a NAV controller in the storyboard, control-over the new view controller and select the current Popostar Segue. After this, one will need to create a navigation controller in the prepareForSegue and embed the destination controller in it, then add the title and button, but only if this framework is presented if this approach is correct, then the code How can I do this? Rdelmar is correct, you can type such a Destination View Controller in ' prepareForSegue Has already been set in. In iOS 7 and earlier you need to add that navigation controller to the storyboard and then you can navigate the navigation controller and its root view in separate seg...

javascript - Finding Specified Object Index in Array -

मेरे पास यह कोड है: var आइटम = [{मूल्य: 1, पाठ: "एक"}, {मूल्य: 2, पाठ: "दो"}, {मूल्य: 3, पाठ: "तीन"}]; Console.log (items.indexOf ({मान: 2, पाठ: "दो"})); और मुझे यह परिणाम कंसोल में मिलता है: -1 लेकिन मुझे ऑब्जेक्ट इंडेक्स प्राप्त करने की उम्मीद है , मुझे क्या करना चाहिए? जावास्क्रिप्ट का अर्रे.इंडएक्सऑफ़ इसकी तुलना नहीं करता है वस्तुओं के गुण यह बिल्कुल । और === ऑपरेटर उस ऑब्जेक्ट पर विचार नहीं करेगा जो आप दूसरी पंक्ति में बना रहे हैं, जिसकी आपको आइटम सरणी में मिलती है, बस क्योंकि वे दो हैं विभिन्न वस्तुओं शायद यह आपकी मदद करेगा: यदि ({"a": 1} === {"a": 1}) अलर्ट ("बराबर"); अन्य अलर्ट ("बराबर नहीं"); दो ऑब्जेक्ट बराबर नहीं हैं इसलिए केवल एकमात्र समाधान सरणी के सभी मदों पर पुनरावृत्त होना और प्रत्येक एक के गुणों को अपने नए ऑब्जेक्ट की तुलना करना होगा (टिमजेवी के उत्तर में प्रदान किया गया है)। फ़ायरफ़ॉक्स में केवल एक अंतर्निहित है जो यह बनाता है कार्य आसान है।

Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects -

text after "itemprop =" text "> I have problems with the session I described as ASPState and I can configure my webconfig but show that error Are unable to sort session state. "Stetsrhwar 'and Skyuelsrhwar' mode, Aspianiti session will Serial state objects, and as a result do not allow non-Sirijlaij usable objects or Marshlbiyrfeed object. The same restriction applies if the custom series is made by the state store similarly serialized in 'custom' mode. [SerializationException: Type 'System.ServiceModel.ClientBase1 [[Tourism.Plugin.BiletBank.BiletBankSRV.I_Shopping, Tourism.Plugin.BiletBank, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null]] assembly' 'System.ServiceModel , version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089 'is not marked as serializable.] the exception is that class give System.ServiceModel.ClientBase`1 [[ Tourism.Plugin .BiletBank.BiletBankSRV.I_Shopping but I serializabl...

Why does print line is invalid syntax? [python] -

इस सवाल का पहले से ही एक उत्तर है: 10 उत्तर #! / Usr / bin / python def create_table (): mailingTable = open ("mailingTable.txt", "r") लाइनों = lineTable.readline () पंक्तियों में पंक्ति के लिए: प्रिंट लाइन mailingTable.close () यह कहते हैं कि प्रिंट लाइन अमान्य सिंटैक्स है। क्यूं कर? मैं पायथन 3.3.5 का उपयोग कर रहा हूँ पायथन 3.x में, आपको इस प्रकार लिखना होगा, क्योंकि अब यह एक फ़ंक्शन है: प्रिंट (पंक्ति) पायथन 2.x में यह को छोड़ना संभव था () , लेकिन यह अब मामला नहीं है।

javascript - How can I use an extended jQuery function? -

मैं एक jQuery प्लगइन का उपयोग करते हैं। मैं जो स्रोत शामिल करता हूं। तो, मेरा कोड सिर्फ $ ("# some_id") है। ColorPicker (some_options) , जैसा कि डॉक्टर में बताया गया है और यह ठीक काम करता है। लेकिन अब, मैं चाहता हूं स्रोत से केवल एक फ़ंक्शन का उपयोग करने के लिए, फ़ंक्शन हेक्सतोहएसबी () , लेकिन मुझे नहीं पता कि इसका उपयोग कैसे करना है क्योंकि मैं पूरी तरह से jQuery प्लग इन आयात नहीं समझता। मैंने कोशिश की $। ColorPicker.HexToHSB () लेकिन यह कुछ भी नहीं था। आप ऐसा नहीं करेंगे ऐसा करने में सक्षम हो क्योंकि इन फ़ंक्शन मॉड्यूल ColorPicker के लिए निजी हैं और आपके पास उन तक पहुंच नहीं है। इस तरह से आप काम करने के लिए प्लगइन को समझ सकते हैं: // ColorPicker सार्वजनिक विधियों के साथ एक ऑब्जेक्ट है, लेकिन इसमें निजी वैरिएबल और फ़ंक्शन के लिए कोई एक्सेस नहीं है। // फ़ंक्शन को रनटाइम पर लागू किया जा रहा है, ऑब्जेक्ट var को बदलना ColorPicker = function () {var निजी व्हीरीबल्स; Var निजीफंक्शन = समारोह () {...}; ... वापसी {publicFunction1 = function () {...}, publicFun...

Is CUDA warp scheduling deterministic? -

I am thinking that the warranty scheduling order of the CUDA application is deterministic especially thinking I'm sticking to the sequence of execution execution on the same device with multiple runs in the same kernel as the same input data. If not, is there anything that can stress the order of execution of execution (if an order dependent is debugging algorithms then say in case)? Accurate behavior of scheduling CUDA taana has not been defined. So you can not depend on it. Specifically, if several warps are ready to be executed in a given issue slot, then there is no description that the taan will be selected by the warp scheduler. There is no external method for precise control, warrant execution orders. It is certainly possible that the code can be prepared which determines taane ID, something like this: #include & Gt; & Gt; (); CudaDeviceSynchronize (); CudaMemcpyFromSymbol (h_warp_order, warp_order, N_WARPS * sizeof (int)); For (int i = 0; i To ...

ember.js - Make Ember Route password protected -

I am trying to prompt the user with a model for which its password needs confirmation, The first route of transition (in this case my App.UserSettingsRoute ). I've got this to work normally (I'm opening the model and canceling the code in the hook before the model), and when the password is confirmed then the transition ), But I am facing the following problem: When the user enters the direct path (by typing in the URL directly into the address bar or by refreshing the browser in the path), I can not open the modal (I get an error) because I did not enter any route yet - this is the first route which was entered in the application. My question: How can I find out that the current path I am entering is first? Alternatively, is there a better way to do this? I have implemented this method with webcloud: You can also use it: App.ApplicationRoute = Ember.Route.extend ({before model: function (transition, query parameter) {// Auth here .. .}}); This route is a...

ios - UINavigationController Custom CATransition -

I'm trying to create a custom transition to push a view controller into the stack. I do not know that navigation bar is an easy way to "lock" on your position and transition under navigationbar. I am using the following code: CATransition * transition = [caterers animation]; Transition.duration = 0.3f; Transition.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]; Transition.type = kCatransitionMoveIn; Transition.subtype = kCatransitionFromBottom; [Self.navigationController.view.layer addAnimation: transit for: zero]; First of all, I tried the cakatanship, but I could see the navigation bar going down ... so I tested the Kakatrasionmovine and it looks a bit better, but still the way I wanted ... Is there any easy way to achieve this? What are you doing to how you transition custom navigation controllers using the iOS 7 Custom Animator Protocol (E.g., UIViewControllerAnimatedTransitioning).

hyperlink - jsviews table dynamic column -

Which column I am trying to create columns to enable columns to show, but I Use the link I want to be able to use, but I did it by using it, as I have decided, it does not update using Microsoft Setpropti. The one that I recently ended was generating a template based on the first column collection, and the table in that table. So I would like to know what is a way to do this in a template? & lt; Table id = "test" & gt; & Lt; Tbody & gt; ; & Lt; / Tbody & gt; & Lt; / Table & gt; & Lt; Script & gt; Var column = [{field: "id"}, {field: "name"}]; Var data = {rows: [id: 1, name: "a", blah "blay"}, {id: 2, name: "b", blah: "blay"}}}; Var tmpl = "{^ {for rows}} & lt; tr & gt; {^ {for} columns}} & lt; td & gt; {^: # parent.parent.data [field]}} & lt; / Td> {{/ for}} & lt; / tr & gt; {{/ for}} "; $ Templates (TMPL). Link ("#Test T...

sql - Oracle ORA-00902 Invalid datatype error -

I am trying to create two tables, which ORA -00 9 02 throwing error, not understanding it can What's wrong here .. Create tablespace Viacisieliaro (Model_ano VARCHAR2 (12) NOT NULL, description VARCHAR2 (1000) is not null, UNIT_PRICE NUMBER (10) taps, Krtrikstok number (5), CC number (3) Faucet, conservant vehicle_store_pike primary key (model_no)); Table VEHICLE_BOOKING Create (BOOKING_ID VARCHAR2 (12) No, CUSTOMER_NAME VARCHAR2 (30) NOT NULL, EMAIL_ID VARCHAR2 (30) NOT NULL, contact number (15) do not know VARCHAR2 (500) No, no, PINCODE NUMBER (10) NOT NULL , MODEL_NO VARCHAR2 (12) No, DATE_OF_BOOKING VARCHAR2 (12) No, zero, EXPECTED_DATE_OF_DELIVERY VARCHAR2 (12) No, Constructant vehicle_booking_pk Primary key (BOOKING_ID), CONSTRAINT vehicle_booking_fk FOREIGN_KEY (MODEL_NO) reference VEHICLE_STORE (MODEL_NO); Thanks in advance ... Replace FOREIGN_KEY (MODEL_NO) and foreign key (Modl_ano) (no underscore).

mysql - Medoo PHP Framework Using AND -

I'm using the Medoo Framework for a project, I've just started using it, I'm not at a faster pace than how it works. Anyway, I'm trying to run a simple query that uses SELECT and AND. However, as far as I can see, the Medu website did not say how to implement more part of the query. I have tried several ways, none of which does not work. I have currently in the code given below - it does not work though. If I enter a correct email address and a wrong password, then the query will still be returned to the user. Select Registered Users = $ database-> ("Administrator", "*", ["admin_email" = "" = $ ";;,,,,,,,,,,,,,,,,,,,, and" = & gt; [" Any help is greatly appreciated :) Post-text "itemprop =" text "> It looks like you've already understood it, but here's the answer for other people thinking about the same thing. Select $ registered user = $ database-> ("Admi...

javascript - Store Array to Cookie Jquery -

I am creating an array in my code that looks like this array [" Type When I save it in a cookie and read it again, it should be come ["type, year, week"] How do I keep the original form array ["type", "year", "week"] I think it is being snatched Thank you in advance My code: var myArray = ["Type", "year", "week" ] $ .cookie ('s Setup Cookie The cookies store the string values. You need to sort your array (with JSON) or with a predefined delimiter before it gets it in the cookie For example: // store cookie $ .cookie ('Setup', myArray.join ('|'), {Path: '/'}); Or $ .cookie ('Setup', JSON.stringify (myArray), {path: '/'}); Read from // cookie myArray = $ .cookie ('setup'). Division ('|'); Or myArray = JSON.parse ($ .cookie ('setup')); Note : The JSON versions are protected because they will work with any...

mysql - Should there be data in a relationship table(Many-to-Many) or should it be in a separate table? -

डेटा को संबंध तालिका से अलग किया जाना चाहिए। लघु पक्ष प्रश्न: यदि केवल 1 स्टॉक प्रति उपयोगकर्ता हो तो । क्या मुझे समग्र कुंजी को प्राथमिक कुंजी में user_stock तालिका में उपयोग करना चाहिए? यह एक रिलेशन टेबल नहीं होना चाहिए .. उपयोगकर्ता स्टॉक तालिका मास्टर टेबल के रूप में कार्य करेगी। उपयोगकर्ता कुंजी के रूप में यूजर आईडी और स्टॉक आईडी यूजर _id लेन-देन तालिका में अद्वितीय नहीं होगा

html - php variable change without doing anything -

हैलो, मुझे एक अजीब समस्या है, मेरे पास निम्न फ़ॉर्म है गूंज "& lt; td Class = 'contact-delete' & gt; & lt; form method = 'post' action = 'update_record.php' & gt; "; गूंज "& lt; बटन प्रकार = 'जमा करें' मान = ''। $ पंक्ति ['ID_PER'] "'नाम =' रिकॉर्डआईडी 'id =' recordID '& gt; संपादित करें & lt; / button & gt;"; गूंज "& lt; / form & gt;"; Update_record.php में मेरे पास निम्न कोड है $ id2update = $ _POST ['recordID']; गूंज $ id2update; session_start (); यदि कोड के इस हिस्से से ऊपर ("$! _ सत्र ['लॉग']) {हेडर (" ताज़ा करें: 3; url = start_page.php ")}} // सबमिट बटन के साथ एक अन्य रूप है अगर (isset ($ _POST ['सबमिट'])) {गूंज $ id2update; } समस्या यह है कि पहला इको आउटपुट को वैरिएबल के रूप में मानता है, लेकिन दूसरा इको आउटपुट किसी भी चीज़ को रिक्त नहीं करता है। कोई भी मुझे स्पष्टीकरण दे सकता है? ...

android - How do I treat a layout as a view? -

I am creating a chat-ask app and it works fine with a single view, e.g. An image view, but how do I use a whole layout? I tried to add an ID to the layout, but not I am trying to do something like this: windowManager.addContentView (R.layout.popup, params); You have to increase the layout. Like layoutInflator inflater = (layoutfile) context.getSystemService (reference. LEOUT_INFLATER_SERVICE); See myLayoutView = inflater.inflate (R.Lite.my_LAYOUT_ID, empty, incorrect); then see = myLayoutView.findViewById (R.id.your_view_id);

python - TypeError: set_linha() missing 1 required positional argument: 'uma_lista' -

जब मैं प्रोग्राम चलाऊँ तो त्रुटि संदेश इंगित करता है कि set_linha def interceta_triangulo (स्वयं, reta): # retorna # (True, pontoInterceca, t) # ou # (झूठी, कोई नहीं, कोई नहीं) xa = self.ponto1.x ya = self.ponto1.y Za = self.ponto1.z xb = self.ponto2.x yb = self.ponto2.y zb = self.ponto2.z xc = self.ponto3.x yc = self.ponto3.y zc = self.ponto3.z xe = Reta.origem.x ye = reta.origem.y ze = reta.origem.z xd = reta.vetor_diretor.x ## क्या आप अपने डायरेक्टर्स और वेक्टर_डिएटर के बारे में पता करें? सिम yd = reta.vetor_diretor.y zd = reta.vetor_diretor.z # डिनोमिनादोर डा रेग्रा क्र्रामर ए = मेट्रिज (3, 3) एसेट_लिहा ([[एक्सए-एक्सबी, एक्सए-एक्ससी, एक्सडी], [या-यूबी , Ya-yc, yd], [za-zb, za-zc, zd]]) detA = A.det_3x3 () # निर्धारक, डिनोमिनादॉर करते हैं यदि abs (detA) & lt; TOLERANCIA_ZERO: ## TOLERANCIA_ZERO वापसी (झूठी, कोई नहीं, कोई नहीं) # पैरामाटर टी टीएनयूएम = मैट्रिज (3, 3) टीएनएम.सेट_लिहा ([[एक्सए-एक्सबी, एक्सए-एक्ससी, एक्सए-एक्सई], [या-यूबी, या- Yc, ya-ye], [za-zb, za-zc, za-...

objective c - IOS 7 Singleton Problems -

Hi, I know this is not a new question, but I read a lot here and nothing was able to help me find the problem. I have a singleton class userfunction @interface userfunction: NSOWJs {NSUser Defaults * NSUser; / * NSString * name; NSString * Email; * /} + (Userfunctions *) shared person; @protecti (nanatomic, assign) NSString * name; @protecti (nanatomic, assign) NSString * email; On square meters: @ synthesis name; @ Synthesis email; + (UserFunctions *) Shared Instances {Static User Function * Shared Instance; Static transmission_expression; Sending & amp; (& amp; Future, ^ {shareInstance = [[User Functions alloc] init];)); Return Share Instance; } - (id) init {if (self = [super init]) {NSUser = [NSUserDefaults StandardUserDefaults]; Itself = [NSUser objectForKey: @ "UserFunctions"]; Self.name = @ "test"; } Healthy return; } I try to save to another class UserFunction = [UserFunctions shareInstance]; UserFunction.name = userjson.username; Use...

c++ - How to use a UNIX socket in a CGI program -

I want to write a web interface for a program that has a Unix Socket based server interface, but it seems that it is impossible To connect it successfully within the CGI program. I looked at the httpd.conf file and searched the web, but nothing was found. The CGI program C ++ is written in the Unix Socket path accessible by the httpd server. A customer to connect to a unix local socket, you first create an anonymous socket, like For TCP: int fd = socket (AF_LOCAL, SOCK_STREAM, 0); Then you create the appropriate struct sockaddr_un with the destination path: struct sockaddr_un addr; Addr.sun_family = AF_LOCAL; Strcpy (addr.sun_path, "/ path / to / server / socket / file"); and call connect () : connect (FD, (struct sockaddr *) & amp; addr, sizeof ( Addr)); However, it is widely documented on the pages of all humans and online. There is no C ++ specific method, unless you use third party libraries; These are the Nix-specific extensions for st...

Using Paypal IPN with website running on localhost -

I want to integrate PayPal Instant Payment Notification (Paypal IPN) in my ASP.NET website. The website is in development mode and it runs on the local host. After this tutorial () I created a script which is a symbol of IPN notification. This IPN notification hits the IPN handler of my website. However, when my IPN handler returns the information back to PayPal sandbox, PayPal always pays INVALID. I think this is expected because PayPal did not send the original IPN message. However, I want to test the code when the IPN message is verified by PayPal. I do not currently have any way to do this. PayPal Docs say that I should keep that code when the message is verified in the block, when the message is invalid. If (feedback == "verify") {// block any code here and below if put in another code} and if (response == "INVALID") {} This technique is very inauspicious and incomplete for me. When I am stationed on a live server, I have to change my code. I...

python - Pandas - GroupBy and then Merge on original table -

I am trying to write a function and I am trying to execute various data calculations on dataframes in pandas and Then the original dataframe to merge it though, I'm running on issues. This code is equivalent in SQL: select EID, PCODE, SUM (pvalue) as pvalue, SUM (SQRT (Scheduled Caste * exp (scheduled-1)) scheduled Join ASC, SUM (EE) AS EE in Foo_bar_grp, and then join the original table from ESI, PCOD, as caste, yoga (SI) SELECT * FROM Foo_bar_grp INNER foo_bar Join foo_bar.EID = foo_bar_grp.EID and foo_bar.PCODE = foo_bar_grp.PCODE Here are the steps: Data Load IN: >> pol_dict = {'P '[' GU ',' GR ',' GU ',' GR '],' pvalue ': [1,1,2,2],' EID ': [123,123,123,123],' PCODE ': [100, 50,150,300], 'SI': [400,40,140,140], 'Scheduled Caste': [230,23,213,213], 'E': [10000,10000,2000,30000],} pol_df = DataFrame (pol_dict) pol_df Out: >> EIDEE PCODE PID pvalue SC SI 123...

javascript - Ajax call does not invoked the controller -

The code is using the following code to make the call to action, and I have an Internet Server Error 500 I see, the path looks fine, what could be the problem. The value of entry is 1 ... Here is the AJAX call $. Ajax ({type: 'POST', url: "../ .. / user / deleted confirmation", Data type: "Jason", Content type: "Application / Jason; Charset = UTF-8", data : 'Id =' + entry id}); Here is the controller action code. [Http post, action name ("deleted confirmation")] Public Jasonstadt deleted confirmation (id) {.. is error Posts https://127.0.0.1/User / Deleted Confirm 500 (Internal Server Error) jquery-2.1 1.js: 8623 jQuery Ajaxtransport.send jquery-2.1.1.js: 8623 jQuery.extend.ajax jquery-2.1.1.js: 8152 (anonymous function) Index: 519 jQuery.event.dispatch jquery-2.1.1.js: 4409 jQuery.event .add.elemData.handle You are not creating your data Property right: You are sending a string like id = 3 , which can n...

list - Why is a default value set for a Python 3 function overwritten when the function gets called multiple times? -

इस सवाल का पहले से ही एक उत्तर है: 2 9 उत्तर क्या कोई मुझे समझा सकता है, जब मैं इस फ़ंक्शन को कई बार कॉल करता हूं, एल डिफ़ॉल्ट रूप से खाली नहीं होता है? लेकिन इसके बजाय किसी भी निम्न कॉल का परिणाम पिछले कॉल के सभी परिणामों में एल जोड़ता है? फ़ंक्शन डेटा को अंतिम दिनों ([:: - 1]) से शुरू करते हुए 7 दिनों के ब्लॉक में अलग करता है, प्रत्येक 7 दिनों के मतलब की गणना करता है और परिणाम को सूची में मान के रूप में जोड़ता है। अधूरे ब्लॉकों पर ध्यान न दें डेटा के लिए डिफ़ॉल्ट मान क्रमिक प्रारूप में तिथियों की एक सूची है। def अलग (डेटा = [i के लिए i] [:: - 1], एल = []): प्रिंट ("अलग कहा गया है, डेटा% s है और एल% s है"% (डेटा, एल)) अगर लेन (डेटा) & lt; 7: वापसी एल कुल = 0 दिनांक = डेटा में मूल्य के लिए 0: यदि w [value]! = "None": total + = float (w [value]) दिनांक + = 1 L.append (कुल / दिनांक) अलग वापसी (डेटा [7: ], एल) से लिया गया: डिफ़ॉल्ट मान का मूल्यांकन केवल एक बार है डिफ़ॉल्ट, एक सूची, शब्दकोश या अधिकांश वर्गों के उदाहरण जैसे एक अस्थायी वस...

sql - How do I merge two sqlite tables using a "where" condition? -

I have two tables, one of them has three columns "word", "count", and "value" Near two columns are "words" and "value" in the second table, each area of ​​the value column has an attached integer value. In the first table, the "Value" column is empty or with placeholder values. The values ​​of the second table column "value" in the first column column "value" in the "words" column. For one line, this command will update the table1 set 'value' = "valuefromTable2", where 'word' = "match wordfromTable2"; Since I have approximately 200k lines to update, I'll use a possible SQLite feature (merge) from the line from the line to the work queue of the code To know You can do this in with a correlated subquery update : update table1 set 'value' = (select from Table 2 T2 where the table 1.word = t2.word);

android - Custom Downloader using Picasso -

I need some headers (username, password) with the request to which to download an image from a URL . That's why I'm using that given code. But this function returns a call error java.lang.NoClassDefFoundError:. Com.squareup.picasso.OkHttpDownloader com.squareup.okhttp.OkHttpClient & LT; Init & gt; (OkHttpDownloader.java:72) I have been raised have been using Picasso 2.3.3 and Okteepi-URL connection-2.0.0-RC 2 libraries to this issue later, But changing to 2.3.2 does not work. Do you have OKHTP in your project? If not, the problem is that you are using OkHttpDownloader are you like in your project OkHttp library or just UrlConnectionDownloader down. This result was finished with me. public static Picasso GetImageLoader (Context ctx) {Pikasokbilder builder = new Pikasokbilder (Sitiaks); Connection.setRequestProperty ("X-header", "VAL") ;; Return connection builder.downloader (New UrlConnectionDownloader (ctx) {@Override protect HttpUR...

java - eclim android list targets command not found -

निष्पादित : ProjectCreate / path -n एंड्रॉइड देता है java.lang.RuntimeException: कमांड चलाने के दौरान कोई आदेश एंड्रॉइड सूची लक्ष्य नहीं मिला (पोर्ट: 9 0 9 1): - संपादक vim -command android_list_targets समस्या यह है कि आपको बता रहा है कि एंड्रॉइड कमांड नहीं मिला है, आपको क्या करना है (आप पहले से ही इसे हल कर चुके हैं लेकिन अन्य पाठकों के लिए ...) है: सुनिश्चित करें कि आपने एंड्रॉइड-एसडीके डाउनलोड किया है और पथ ठीक से सेटअप किया गया है (जब इसे स्थापित करने के लिए ईक्लीम इंस्टॉल किया गया हो, लेकिन आप इसे भी बदल सकते हैं आपका .vimrc)। सुनिश्चित करें कि 'एंड्रॉइड' कमांड आपके सिस्टम में उपलब्ध है, अर्थात आपके रास्ते में भरी हुई है। (लिनक्स में आप टर्मिनल में "एंड्रॉइड" टाइप कर सकते हैं यह देखने के लिए कि एंड्रॉइड सीएमडी पाया जा सकता है)। गुड लक!

passwords - Why don't the answers to "security questions" need to be stored securely? -

"postprint" itemprop = "text"> I have done some work on some places now where the password is salty and is divided into pieces in the database, but for the answer security The questions are stored in plain text Now, I have signed up for our hydro power company online portal, and in the Account Management section, the security question and answer is displayed to me. Given that security questions and answers often allow the use of the user, in an alternative way, without a password, in an account, why are they allowed to store them in plain text? Especially when people often have a limited pool of security questions to choose from, so they use the same answer in many sites. The problem with security questions is that the designs are completely insecure. Because they are stored in plain text, it is sometimes used by humans to confirm that they should be seen by humans and that some answer is correct. A user's answer to their favorite food is "cor...

pyramid - Making setup.py to point to local pypi repository -

Recently I found Pipe 2 PI, which is useful for installing a pip package from local PP repo. I follow it to post here But when I use the setup tool, I do not know how I can use it to my local repo. When I run "Python setup.py development", I do not want to download the package every time I am starting with the pyramid, and if I make a new VirtualNen every time I can avoid downloading the package. Thank you in advance Here's the solution: $ python setup.py egg_info The directory above creates the directory {PackageName} .egg-info and require.txt file in one, but nothing downloads. You can use the needs.txt file to install dependency: $ pip install -r {PackageName} .egg-info / require. After this, you can install your application without the Internet: Pre> $ python setup.py development

php - Is there an efficient way to search variable parameters in mySQL with different results? -

I have a very complex question and due to specifications, I have not had any luck with any help with this. I have to scratch for several months. Although in this question I will concentrate on only 3 Category ($ Cat) Subcategory ($ sub) Style ($ Normal) MySQL column: id | Category | Subcategory | Style | Account | Date_received | (Account assigned: 1-3) I have to return the result: If only category Has been offered: first line account = 1 , then date_failed followed by date_modified (no prioritization of accounts 2 & Amp;; 3 ) If only category and subcategory is offered: First line account = 1 and Li> If only category and subdue Categories and styles have been offered: First line account = 1 and account = 2 and account = 3 , then date_received , date_modified After this I have: if ($ cat and empty ($ Sub) and empty ($ General)) {$ run = mysql_query ("Select" by DB W here (category = '$ cat...

url - Yahoo Pipes Using Regex to change link -

Hi, I'm fairly new to regex. I can do some basic functions, but this is having trouble with. I need to change the link in the RSS feed. I have a URL like this: And to change it on an updated site: From where only the thing changed / Search / Propoditor Espx / Property Dupet / , I do not have access to the original RSS feed or I will change it there, so I have to use it pipe. Please, thank you! Use regex controls. In this, specify the domain name of the node (prefixed with "item") within the "In" field. "Replacement" field type (. *) // Search // PropDetail / .aspx and "with" field type to use: $ 1 // propertydetail //.* I have participated in the field with '/' character. However, I am not sure you '. * 'Need to do this before leaving it. Some tests and errors may be required. Hope this will achieve your desired result.

.htaccess - How to Remove .php Extension From Url and show 404 error when user try to enter url with .php extension -

I am able to remove the .php extension from the URL, but I need the user URL with the .php extension You should show the page You can insert this code. To hide the .php extension in the DOCUMENT_ROOT / .htaccess file: reriteagain on REVERASE / # externally /file.php To redirect / file / revoked code% {THE_REQUEST} \ s / + (?: Index)? (. *?) \. Php [\ s?] [NC] rewriting rule ^% 1 [R = 301, L, NE] # Internally forward / File to /file.php Rewrite angle% {REQUEST_FILENAME}! -d RecoveryCand% {DOCUMENT_ROOT} / $ 1 .php -f [NC] Rewritable ^ (. +?) /? $ $ 1.php [L]

api - Google Analytics with CakePHP -

I am trying to get data from my Google analytic account, I have been using a plugin for KPHP and its I am The plugin works, I can get a list of books from a specific author like the example. I want to display some information for cake from my Google Analytical Account. I have a few questions, how can I get Project_ID, IDs, secret? CorePPP of my plugin: $ Config = array ('GoogleAPI' => defines the option of array (/ ** * 'client' client) / 'Client' = & gt; array ('ApplicationName' = & gt; 'app', 'id' = & gt; '?', 'Secret' = & gt; '?', 'Developer key' & Gt; 'xxxxxxxxxxxxxxxxxxxx'),)); Test Controller: & lt ;? Php AP :: Usage ('app controller', 'controller'); Class Test Controller AppController {Public $ component = array ('GoogleAPI.GoogleAPI' => Array ('service' => array ('analytics')); Public function index...

android - Shared preferrence doesn't work -

I try to use shared preferences in my app to see if the question has been answered. I am using it every time I use it. It does not work, can anyone help me to change it into shared priorities? If the question has been answered then here is the activity of the situation: The public class extends question activity [Boolean answers; Int id; String reply; Public Intelligence (id = i; Answer = wrong; }} And when he gives the answer, it becomes true (answer = true) There is some work to not see here, // Activity Item = New ArrayList & lt; Question & gt; (); } Secure zero activation use (int requestcode, integer result code, int i) {int id = i.getExtras (). GetInt ("id"); If (question.gate (id). Answer) {// do something}}} I have tried to work in shared priorities, but it does not work. It works now, but I want to save and load it. You can use the following code to save an activity whithin: Shared shared references = PrefermentManager.getDefaultSh...

javascript - Passing variable value from one function to another in autocomplete with AJAX call -

I have a problem in using auto-complete jQuery with AJAX calls when the user types something in the input field, So I give that value to AJAX with the controller where I get values ​​from the database and then send all these values ​​to Javascript in the success message. But after that, I have a problem using these JSON values ​​to auto-complete, how to fix it? View file & lt; Link rel = "stylesheet" href = "// code.jquery.com/ui/1.11.0/ topics / lubricity / jQuery-ui.css" & gt; & Lt; Script src = "// code.jquery.com/jquery-1.10.2.js"></script> & Lt; Script src = "// code.jquery.com/ui/1.11.0/jquery-ui.js"></script> & Lt; Link rel = "stylesheet" href = "/ resources / demos / style.css" & gt; & Lt; Script & gt; $ (Function () {$ ("# tag"). Autocomplete ({source: function (request, response) {$ .ajax ({type: "POST", url: "& lt ;? php echo bas...

hadoop - How to enable timestamp in Hive -

हाइव में लॉग इन करने के बाद मुझे निम्न मिलता है। सूडो -यू hdfs hive [ चेतावनी और अधिसूचित कॉन्फ़िगरेशन के बारे में जानकारी] जार में कॉन्फ़िगरेशन का प्रयोग करके आरम्भ किया जा रहा है: फ़ाइल: /opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hive/lib/hive-common-0.12 .0-cdh5.0.0.jar! /hive-log4j.properties जब मैं एक टाइमस्टैम्प डेटा प्रकार के साथ हाइव में एक टेबल बनाऊं, तो मुझे निम्नलिखित मिलता है। हाइव & gt; टेबल आरटीएस (उपयोगकर्ता युग्मक स्ट्रिंग, यूज़रसिटी स्ट्रिंग, यूजरेंटमेंट इंट, ज़िपकोड स्ट्रिंग, स्कू स्ट्रिंग, निर्मित टाइमस्टैम्प, कैटेगरी स्ट्रिंग, प्राइस फ्लोट, काउंटी स्ट्रिंग, काउंटीकोड स्ट्रिंग, यूजरस्टेट स्ट्रिंग, कैटेगरीग्राम स्ट्रींग) निष्कासन: निष्पादन त्रुटि, org.apache.hadoop.hive.ql.exec.DDLTask से वापसी कोड 1। Java.lang.UnsupportedOperationException: टाइमस्टैम्प अभी तक लागू नहीं है हाइव टाइमस्टैम्प Hive 0.8 के बाद उपलब्ध है संस्करण। ऐसा लगता है कि आप सीडीएच 5 का प्रयोग कर रहे हैं, जो कि हाइव 0.10 से ऊपर आता है। मैं संस्करण प्रकार के अलावा क...

Storing output of nested loop in R -

I'm new to R, but I'm trying hard to know the ropes. In fact, I feel stupid because I have run many problems but are not able to get desired results. My code is shown below: ## Start the parameters fstart & lt; Start the frequency at 960 ## MHz fstop & lt; - 1240 ## MHz closed frequency in BW * & lt; - 5.44 # # If bandwidth offset in MHz & lt; - 100 ##Tod difference in maximum milliseconds f_dwell & lt; - # 1 # spent in millisecond iterations at each search frequency & lt; - # 100 ## Number of iterations to run ## Number of potential frequencies f & lt; - seq ((fstart + bw / 2), (fstop - bw / 2), by = bw) ## To start the frequency table, freq_table & lt; - Matrix (NA, Nero = (2 * offset + 1), ncol = offset) ## Enter the frequency table row (1: (2 * offset + 1) wise according to the random values ​​of possible frequency) {row_value & lt ; -c (sample (f), sample (f, offset-length (f))) freq_table [i,] & lt; - row_value} ## Assign a l...

php - magento customize quote collectTotals to show the updated totals -

Hey I'm implementing a custom discount system because the Magneto Discount System does not fit my needs, Discount on Code> Mage_Sales_Model_Quote_Item I have read something and I found the following function setOriginalCustomPrice , this thing is that it applies to the item, and if the user changes the volume then Discount on item with new quantity , So I'm trying to use a different method addOption on the item and only shows the calculation based on quantity in the option value on the cart page (array ('code' = & Gt; 'Promo', 'Value' = & gt; Serialize (['sum' => 10, 'qty' = & gt; 1]))); and in the cart page $ promo = $ item- & gt; GetOptionByCode ('promo'); Echo '& lt; Div class = "orig-price" & gt; $ Item- & gt; GetOriginalPrice () '& Lt; / Div & gt; '; Echo '& lt; Div class = "new-price" & gt; ' $ Item- & gt; Meet Basic...

UML Can a relationship be composition AND aggregation? -

I have a situation where Class A is B and B is not present without B, but from B Can be free. It is a composition relationship with A's perspective, but this is a holistic relationship with the perspective of B. What do I do? If A is made of B, then it is related to written endings on a square. Combination and aggregation ends on association, on the other hand it is possible to structure on one side and aggregation. You can identify the structure by answering the question. Is the class B is Class B? If so, then it is on the side of class A ... Example: Is computer made of memory, CPU etc.? All computer components are in the computer's structure. Example for aggregation: A special chair is placed in the room, it is a combination because the room is not a chair (room is made of walls, window etc.). But the chair can be in the room with the furniture.

html - Airbnb Video Header -

Airbank has recently launched its new design, which includes a video header, I did not understand how to get it The video title is always the same proportion of the browser window, while the video remains full-width and centered. Therefore, I have a 50% height video title in it, a vertically and horizontally focused video, no matter how big my browser window is. HTML & lt; Video loop = "loop" preload = "auto" id = "pretzel-video" class = "play video" & gt; & Lt; Source src = "// a0.muscache.com/airbnb/static/Paris-P1-1.mp4" type = "video / mp34" & gt; & Lt; Source src = "// a0.muscache.com/airbnb/static/Paris-P1-0.webm" type = "video / webm" & gt; & Lt; / Video & gt; CSS # Pretzell-Video {Down: 0; Status: Completed; Width: 100%; } Video {Display: Inline-Block; } I have received this little code, but it is being done completely, no matter what I am doing. Can any...

html - Scrollspy Implementation With MVC 4 -

मेरे पास बूटस्ट्रैप (ट्विटर) के साथ एक वेब अनुप्रयोग एमवीसी 4 पर आधारित फ्रेमवर्क है और मैं चाहता हूं मेरे पन्नों में से एक को एक स्क्रॉल स्पीड के साथ एक पृष्ठ नेविगेशन बनाएं: मेरी साइट पर शीर्ष पर एक निश्चित नौबार है और साइट के एक पृष्ठ में मुझे एक साइड बार ("nav nav- col-md-3 = बाईं ओर जो मेरी साइडबार को संग्रहीत करेगा col-md-9 = जो मेरे संदर्भ को संचित कर रहे हैं मैं अलग चीजों की कोशिश करता हूं और कुछ भी काम नहीं करता, एक बात जो मुझे पता है कि मुझे ज़रूरत है शरीर टैग में जोड़ने के लिए: & lt; body data-spy = "scroll" data-target = "# side-nav" & gt; लेकिन MVC में बॉडी टैग "_layout" पर है और मैं इस साझा आंशिक दृश्य को छूना नहीं चाहता। मैं क्या कर सकता हूँ ? शायद किसी ने इस सुविधा को एमवीसी में लागू किया है और मुझे इसका एक छोटा सा उदाहरण दे सकता है? यह मेरा कोड है: @ {ViewBag टाइटल = "डिज़ाइनर"; } & Lt; div वर्ग = "पंक्ति" & gt; & Lt; div class = "col-md-3" & gt...

android - Unable to sign apk using calabash -

I am unable to sign the cabs using my APK, when I eclipse it using my APK I try to sign and use it, but I do not have any luck. This is when verbose output happens when I am rescuing from cabass android. 2014 -07-27 19:30:43 - Found in JDK Path 2014-07-27 19:30:43 - JDK found: C: \ Java 2014-07-27 19:30:43 - Android SDK found: C Android 2014-07-27 19:30:43 - Resins APK 2014-07-27 19:30:43 - "Java \ bin / key avoids .exe" - List - V -alias androiddebugkey-eystore C: / Users / Scriptthay.android / debug.cheast -storepass android "- j" -file encoding = UTF-8 "" 2014-07-27 19:30:44 - Key store data: 2014 -07-27 19:30:44 - The name of the nickname: Androdibooki creation date: 27 July , 2014 entry type: PrivateKeyEntry certificate chain length: 1 certificate [1]: Owner: CN = Android Debug, O = Android, C = US Issuer: CN = Android Debug, O = Android, C = US Serial Number: 13 CF4 Valid from C 92: Sun 27 July 18:49:03 By CEST 2014: Sat Oct 25 18:49:03 CET 2...

node.js - how to read from a GPIO pin when it changes? -

I create an app that lights (LEDs) their position (on-> off or off->) Monitor on a site. I node this app in client side Build with JS and use it from the rpi.GPIO package. But I change event is my code in this package: var gpio = require ('rpi-gpio'); Function Alert () {console.log ("Search!"); } Gpio.on ('change', function (channel, value) {// send monitoring data to server for monitor on site});); Gpio.setup (7, gpio.DIR_IN, warning); Changes never called the event !! Even if I change the position of the LED. Is setInterval ? What is a way to do this without using it? Not sure why this is not working, but you can also consider the package.

Does dynamic type choice break strict aliasing in C? -

Say I have some code that looks like this: void foo (Zero * Obj, int type) {TypeA * a = (TypeA *) obj; TypeB * b = (TypeB *) obj; TypeC * c = (TypeC *) obj; If (type == 1) uses the {// code "a"} and if (type == 2) uses the {// code "b"} and if (type == 3) {// Code "C"}} I am curious to know that this function breaks tight aliasing from a priority or the validity of the function depends on that How exactly is this used? I want to expect a certain part of me that things will work properly if I only used the function as foo (& objectOfTypeA, 1) , foo (& objectOfTypeB, 2) Is , or foo (and Object Opti C, 3) . Still, I only know about aliasing for errors for a few days, and therefore I worry that the function foo () is broken right from the start because it will come in different velocities * Start with it in various types of cast. This does not break strict aliasing, because you can only type * obj Casting obj does not result in ...

c - Comparison operation being completely ignored -

I am trying to write a test program to create a library. This test program is supposed to test every possible value that goes into some functions. Here's the code: zero test_int8_smr () {for (int i = INT8_MIN; i & lt; = INT8_MAX; i ++) {int8_t testval = i; Int8_t Results = from_int8_smr (to_int8_smr (TESTAL)); If (testle! = Result) {if (testval == 0x80) // If this statement is ignored {continue}; } Printf ("test_int8_smr () failed: testwall = 0x% 02hhX, result = 0x% 02hhX \ n", test, result); Return; }} Printf ("test_int8_smr () succeeds for all possible values. \ N"); } Here is the output: test_int8_smr () failed: testval = 0x80, result = 0x00 If the statement appears to be ignored: if (testval == 0x80) {continue; } This is very confusing, why any thoughts are arising and how to fix it? testals type int8_t hence its possible values The range is -0x80 to 0x7f . It can never be equal to 0x80 and thus the relation of equalit...

How to connect to a LibreOffice database using PHP -

I want to write a single-use PHP code which will transfer all the records in all LibreOffice Database tables into a MySQL db table. My problem is that I can not work to connect to LOB DB using PDO, this is the code that connects to my MySQL database. & lt ;? Php $ user = "root"; $ Pass = "root"; $ Host = "Localhost"; $ Db = "asoiaf"; $ Table = "charlist"; Try {$ Conn = new PDO ("mysql: host = $ host; dbname = $ db", $ user, $ pass}; $ Conn- & gt; Set attribute (PDO :: atTRRMODE, PDO :: ERRMODE_EXCEPTION); } Hold (PDOException $ Failure) {echo $ e- & gt; Getmessage (); }? & Gt; How can I modify this code to connect to the LO database using PDOs? It is called ASOIAF.odb, and the table - inventively - is called CharList, I really do not care that the solution is fantastic or after good practice; It is only for me, therefore efficacy> efficiency.

Java remote debugging on linux target using Eclipse or otherwise -

Can someone tell me a good way to remote debugging on Java on Linux targets? What I'm doing After some methods of creating my Java project, deploy to target and then debug on target I know that the goal of starting a jar running with the Java debug flag Can debug on eg. java -xdebug -xrunjdwp: transport = dt_socket, address = 8001, server = y suspend = y -jar stockTradingGUI jar but I do not know How to trigger the deployment of a jar made to target and walk in the debug mode via ELIPS. Do anyone have any ideas? Thanks eclipse with oneself Generally, the target will not try to deploy the jar and it will be run in debug mode. Instead, after deploying a newly created jar, the remote debugging session will start in a Eclipse and it will allow it to connect remotely with several debug / suspended flag. There are several ways to deploy. The easiest to do is to create a regular in Eclipse (or ant on the command line or whatever device you are using Are be...

c# - Make Async Rest Request -

I am using RestSharp to request some rest on Windows Phone. But I am struggling to use private zero function () {var client = new RestSharp.RestClient ("https://exampleapi.com" ); Client.Authenticator = [....] var request = new RestSharp.RestRequest ("/ example.json", method GET); {Client.ExecuteAsync (Request, reponse => {{reponse.StatusCode ==} HttpStatusCode.OK) {// Operation with json ...} and {MessageBox.Show ("Error");}}) Do; } Hold (exception error) {MessageBox.Show (error.Message); } I tried to add the term async : private async zero restsharptest () {var client = New RestSharp.RestClient ("https://exampleapi.com"); Client.Authenticator = [....] var request = new RestSharp.RestRequest ("/ example.json", method GET); {Client.ExecuteAsync (request, reponse = & gt; {(reponse.StatusCode == HttpStatusCode.OK} {var timeline = JsonConvert.DeserializeObject & lt; list & lt; dynamic & gt; & gt; (rep...

syntax - Does an unused let binding have any effect in Haskell? -

I realized that it is actually legal to write: two = sum [1 ..100] "Hello" in There is no compelling absolutely anything to do this. But now I am thinking about words here precise is possible to write a program in which a _ is binding, and so far Removing clearly means the meaning of the program will change? Actually, I'm thinking, is it safe to remove automatic binding, as far as I can tell, the value of this bond is probably not affected by anything. Can do. However, it can be assumed that this type can affect anything else, can anyone make an example? Here's an example. With the _ binding, the output is 8.0 , but without it, this is 8 (of course, this is not a huge difference, but I Sure it can be used as a base for something more important.) main :: IO () main = let x = 5 _ = asTypeOf x 6.0 print $ X + 3

How to Increase Firefox Sidebar Width -

I have coded sidebar like Firefox and history sidebar in a fresh profile, if I add my add-on Installing and opening the sidebar, the sidebar's width is 216px as the default value. But if I pull the right side of the sidebar and pull it to the right, then its width can be 432 px but no more. How can I set the width of my sidebar width 432 px as the default sidebar width of my add-on? This is not really documented, but it can be obtained like this: var sidebar = UI sidebar ({...}); Sidebar.show (); Var window = requires ('windows / utilities'). GetMostRecentBrowserWindow (); Window.document.getElementById ('sidebar'). Style.width = "400px";

python - How to create an array of image objects to use in a FOR loop? -

मेरे कोड में मैं Image ऑब्जेक्ट्स का एक समूह खोलता हूं: image1 = Image.open (path + '\\ my_image_1.png') image2 = Image.open (पथ + '\\ my_image_2.png') image3 = Image.open (पथ + '\\ my_image_3 Png ') image4 = Image.open (path +' \\ my_image_4.png ') image5 = Image.open (पथ +' \\ my_image_5.png ') लेकिन ऐसा करने से छवि वस्तुओं के माध्यम से लूप के लिए ऑब्जेक्ट्स को पुनरावृति करना असंभव है। मैं कैसे या तो: 1) Image ऑब्जेक्ट्स को तब for loop में उपयोग करने में सक्षम हो सकते हैं? या यदि संभव न हो तो: 2) के लिए लूप में एक और तरीका है? चीयर्स। चित्र = [Image.open (os.path.join (पथ, 'my_image_% d.png'% x)) श्रेणी में एक्स (1 , 6)]

c++ - What data type should I use for a general purpose integer? -

What data types should be used for general-purpose integer in C ++? The obvious answer is int , and it was understood in the old time, where it was 16-bit on 16-bit machines and 32-bit was on 32-bit machines . But now the 64-bit code is getting more common, but int is often 32-bit on those compilers, so we can not assume that int is necessary for that system's The "fastest" or biggest type for Another problem is the spread of 64-bit values ​​by the size of the data. Structures and files I know that you can store these values ​​in 32-bit int and participate with it, if The size does not get very big but I want to write code which can handle the maximum size of the data, if that user wants what I do not want my code to die, if the user opens the 5 GB file and in memory Uri wants something, because size than is stored in a int 16 + GB of RAM system will stop someday, and I still want your code to work. I know that vector & lt; T & gt; :: size_type ...

javascript - redirect localhost instead of myserver.org:3000/login/callback -

My local host-server is being redirected all the time, myserver.org Instead of: 3000 / login / callback for localhost: 3000 / login / callback understand Why not come in Part of my code from here: app.get ('/', function (rik, ridge) {res.render ('index ', {User: req.user});}); App.get ('/ account', make sure authorized, function (rick, ridge) {res.render ('account', {user: req.user});}); App.get ('/ login', passport.authenticate ('saml', {failureRedirect: '/', failFlash: true}), function (req, res) {console.log ('worked so far - =) 2 '); Res.redirect ('/'); }); Console.log ('worked so far - =) 1'); App.post ('/ login / callback', passport.authenticate ('saml', {failureRedirect: '/', failureFlash: true}), function (req, res) {console.log ('worked so far - = 3)); // res.redirect (''); Res.render ('index', {user: req.user}); }); App.get ('/ m...

algorithm - Efficiently grouping a list of coordinates points by location in Python -

Given the list of X, Y coordinate points on the 2d grid, what is the most effective algorithm for creating a list of groups is imminent Index number? For example, a list of two non-adjacent squares (3x3) on the grid (15x15) has been given, the result of this algorithm will be two groups of two equal squared points I think you can do a flooded algorithm, but it seems to be more than very efficient for a larger 2D array of size 1024. You can add all coordinate points (for example, using the dictionary structure in Python) and Then for each coordinate point, find the adjacent adjacent adjacent points, find the adjacent neighbors near the point and "merge" them. Also, for each point, you can maintain a pointer to the connected component that is from that point (using the dictionary structure), and for each connected component you create a list of points related to the component. After that, when you are a neighbor of a point and find a match, then you merge the two...

Dart's streams equivalent for javascript -

I'm looking for a way to do something similar to Dart's stream API in JavaScript. Do you know how do I get something similar? Javascript does not have its own version of currents, but there are several libraries that have the same type of For example, adding functionality is a popular one created by Microsoft.

html - Angular change css of different directive -

I have a real problem of changing some simple css with corner and CSS. I have the code: & lt; Div class = "progress" & gt; & Lt; Div class = "progress-time progress-time-information" ng-square = "step one" & gt; 1 & lt; / Div & gt; & Lt; Div class = "progress-time progress-time-information" ng-square = "step-two" & gt; 2 & lt; / Div & gt; & Lt; Div class = "progress-time progress-time-information" ng-class = "stuptree" & gt; 3 & lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "well col-lg-12" & gt; & Lt; Applystepone ng-if = "step.one" & gt; & Lt; / Applystepone & gt; & Lt ;! - This is my instruction - & gt; & Lt; Applysteptwo ng-if = "step.two" & gt; & Lt; / Applysteptwo & gt; & Lt; Applysteptree ng-if = "step.tree" & gt; & Lt; / Applications...