Posts

Showing posts from June, 2011

php - Get Max value from db and add one -

मेरे पास एक टेबल है जिसमें एक B05 / FDH / CN / NM / 00001, बी 0 05 / एफडीएच / सीएन / एनएम / 00002 मुझे डीबी से अधिकतम मूल्य प्राप्त करने और अनुक्रम में 1 जोड़ने की आवश्यकता है I अगले संख्या B05 / FDH / CN / NM / 00003 होगी मैं यह कैसे करूँ SQL और अधिकतम मूल्य को सीओएनटी के रूप में कॉरनोटैननमोटर से अधिकतम MAX (`कवर नोटोट नॉन ') का चयन करें जहां users_idusers = 8 B05 / एफडीएच / सीएन / एनएम / 00002 परिणाम को स्ट्रिंग में सहेजें, फिर कोशिश करें $ string = 'b05 / fdh / सीएन / समुद्री मील दूर / 00002 '; $ Stringpart = substr ($ स्ट्रिंग, 0, -5); // "बी05 / एफडीएच / सीएन / एनएम /" $ संख्यात्मक = (पूर्णांक) उपस्ट्रस्ट ($ स्ट्रिंग, -5); // "2" $ numberpart = $ numberpart + 1; // "3" $ numberpart = str_pad ($ संख्यात्मक, 5, "0", STR_PAD_LEFT); // "00003" प्रतिध्वनि $ परिणाम = $ स्ट्रिंगpart। $ Numberpart; // "बी05 / एफडीएच / सीएन / एनएम / 00003"

c++ - What is the difference between STL containers iterator and C pointer iterator -

I am writing a reverse iterator as part of my own custom vector class. So far what I have written is the following. class MyVector {public: typedef T value_type; Typedef value_type * indicator; Typefifth console value_type * const_pointer; Typedef value_type & amp; Context; TypefifiControl viral_type & amp; Const_reference; Typedf Pointer Iterator; Type-tof config pointer controller; Typedef size_t size_type; Square reverse_title {Private: Iterator Iter; Public: Inline Reverse_title (Iterator A = 0): Iter (A) {} Inline Reverse_itator (Const Rivers_title and Reovitter): IAR (rev_iter.iter) {} Inline Reverse_Iterator & amp; Operator ++ () {--iter; Return * This; } // and the rest of the other operators}}; Inline Iterator Start (Zero) {Return (Iterator data_array); } Inline easter end and (zero) {return ((ifter) data_arra + number_of_edments); } Inline reverse_itator rbb (empty) {return end () - 1;} inline reverse_ititor shutdown (zero) {returns start () - 1;} // functi...

excel - Jump past special character once 2 characters entered VBA userform -

Image
Not sure that this is possible, but there is a code that says that when you enter 2 characters So it gets stuck past: or / symbol (for a date and for a time, need to enter manually. I feel that it is in the event of change of text box But should not be sure of the type of code to set the focus Tell you 2 text boxes ("Time for TextBox2 , Time for TextBox2 ) Sample UserForm1 is you are continuously You can check the length of the string typed in the text box and if it is equal to 8 for the date or 4 when you manipulate the value. Private sub text box 1_Change ( ) String current = text as slow current Box 1. Price if lane (text box 1) = 8 then current = left (text b oaks 1, 2) & amp; "/" & Amp; Middle (text box 1, 3, 2) & amp; "/" & Amp; Correct (text box 1, 4) text box = current end if the end sub sub sub text box 2_Change () turns the string current into the current = text box 2. Value if lane (text box 2) = 4 then current =...

Jenkins : Conditional build step -

I have to make many jobs in junkkin, which are inter-foreign. The process that I want to do is as follows - 1. Poll SVN for A If there is any change then test-suit does not have a performance test - suite A and nothing else, in the next step Continue Poll SVN for B If there is a change / test-suit B test - test -Soot Use conditional construction steps and this Pole SVN for one Works - If there is a change / test-suite, create an executable test-suit Other stop Can anyone help me here? What if changes in B are? Do not you want to make it? Usually you set up Jenkins's job either whole (i.e. the only thing that makes A, then B is in return) or you can build independent jobs. Dependency of the child I.e. A will always produce B and B will always make it).

Django QuerySet with filtered related objects -

वर्ग क्वार्टर (models.Model): ... वर्ग हाउस (models.Model): तिमाही = मॉडल। विदेशी की (क्वार्टर, संबंधित_नाम = 'मकान') कक्षा फ्लोररेन्ज (मॉडल.मॉडेल): घर = मॉडेल। फ़्रीविन्के (हाउस, संबंधित_नाम = 'फर्श_रंगे') is_commercial = models.BooleanField (डिफ़ॉल्ट = गलत) ऑब्जेक्ट घर के घरों प्राप्त करने का सबसे अच्छा तरीका ढूंढने में मेरी सहायता करें, जहां घर एक या अधिक floor_ranges is_commercial = true पहले एक चौथाई से संबंधित सभी घरों को प्राप्त करें घर = हाउस.ऑब्जेक्ट्सफिल्टर (तिमाही = तिमाही) फिर कम से कम एक मंजिल सीमा वाले is_commercial = सच । ऐसा करने के लिए, संबंधित नाम floor_ranges का उपयोग करें, और डबल अंडरस्कोर __ संबंध को विस्तारित करें। houses = houses.filter ( अंत में, अलग () का उपयोग करें is_commercial = true के साथ कई मंजिल वाले श्रेणियों वाले घरों के डुप्लिकेट परिणाम को रोकने के लिए। घर = houses.distinct ()

php - How to return error Message in Output from Trigger? -

Image
I am trying to create a trigger that ensures that the same shop_id 3 times, and If the user tries to add more than 3 records for the same shop_id , then it will throw an error message. I wrote the following trigger but giving me an error message if (totals (different (shop_id)) 3) SET MESSAGE_TEXT: = 'You can not insert more than 3 records; end if; This is giving me an error message. MySQL said: # 1064 - There is an error in your SQL syntax; Check the Manual related to your MySQL server version for the correct syntax to use the nearest 'SET MESSAGE_TEXT: =' check to force Please check this and guide me that I What's wrong here? signal SQLSTATE '45000' SET MESSAGE_TEXT = 'You can not insert more than 3 records;

android - What happens when an APK is installed on SD card? -

हम एक एंड्रॉइड फोन पर x.apk नामक एपीके स्थापित करना चाहते हैं। डिफ़ॉल्ट रूप से, कम से कम दो चीज़ें हो जाएंगी: x.apk को / डेटा / ऐप कॉपी करें हालांकि, अगर x.apk को एसडी कार्ड पर स्थापित किया जाना है, / डेटा / ऐप से संबंधित फ़ोल्डर्स क्या हैं और / एसडी कार्ड पर डेटा / डेटा उन्हें एक ही रास्ता रहना चाहिए लेकिन Sdcard पर घुड़सवार, इसके लिए आपको जड़ें डिवाइस की जरूरत है मुझे लगता है।

java - What would cause a Scanner to throw a NoSuchElementException when returning to a while loop from a method call? -

कोड का प्रासंगिक अनुभाग: स्कैनर kbd = new scanner (System.in); // उपयोगकर्ता इनपुट प्राप्त करने के लिए (जबकि!) {// प्रोग्राम चयन के लिए उपयोगकर्ता को संकेत देता है जब तक कि वे इसे बंद नहीं करते System.out.println (menu); // प्रिंट मेनू विकल्प = kbd.nextLine (); // उपयोगकर्ता से मेनू चयन हो जाता है यह केवल तभी होता है जब किसी विधि कॉल से जब लूप पर लौटते हैं, अगर मैं बिना किसी विधि कॉल के साथ I यहां त्रुटि संदेश भरा है: थ्रेड में अपवाद "मुख्य" java.util.NoSuchElementException: वर्ग पर जावा लाइन में कोई रेखा नहीं मिली। स्कैनर.नेंस्टेलाइन (अज्ञात स्रोत)। Class.java29) यह इंगित करता है कि रेखा selection = kbd.nextLine (); लाइन है। मुझे यहां मेरी समस्या का समाधान मिला! मेरे तरीकों में स्कैनर के अन्य उदाहरणों को मुड़ें मुख्य में स्कैनर के साथ एक समस्या पैदा कर रहे थे स्कैनर को कक्षा के ऊपर ले जाने से इस समस्या का समाधान हो गया!

css3 - Centered block in IE9 and/or earlier version -

Image
I can not fix a problem with focusing the block of contents in IE9. I tried different things from the web, did not work. If possible, I appreciate it that it can be hosted anywhere, where I am working on it. I have defined the principle: & Lt; Title & gt; Test & lt; / Title & gt; & Lt ;! - [if IE] & gt; & Lt; Meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE7" /> & Lt; [Endif] - & gt; I tried to add it to the head section, even after commenting instead of "emulet ii 7" with "izui" or "edge", did not work: & lt; Meta http-equiv = "X-UA-Compatible" content = "IE = Edges" /> Firefox / Chrome: IE 9: CSS: .zone {Width: 0; Height: 0; Border: Solid transparent; }. Container {boundary: 4px solid # 666; Status: Relative; Swim left; Margin: 2px; } .zone-label {background-color: # 666; White color; Font-size: 25px; font-weight: bold; Padding: 0 5...

Get formatted data in shell script which is read from file containing JSON data -

Write a shell script to get a list of names, current and latest available versions automatically from raw JSN data. I am trying to format the JSON data stored in the file using the shell script. I tried to use the command line JSON Porter. I have to format JSON data in script. There are advanced options available in JQ for their same choice. I am unable to use it properly. Example: The following JSON file is {"endpoint": {"name": "test-plugin", "version" "," dependency ": {" Plugin1 ": {" main ": {" name ":" plugin1name "," description ":" dummy text "}," pkgMeta ": {" name ":" plugin1name "," version ":" 0.0.1 "} , "Dependencies": {}, "version": ["0.0.5", "0.0.4", "0.0.3", "0.0.2" "" "", "Update": {"latest": ...

Teamcity document file size limit -

I have this issue, where unlimited loops are published until the time of publication, as shown below [Phase 3/3] Publishing artifacts [Publishing artifacts] Sending .... web.3196.01.nupkg [Publishing artifacts] Is being sent .... web.3196.01.nupkg [publishing artifacts] .... Web.3196.01.nupkg [publishing artifacts] Sending .... Web.3196.01.nupkg [publishing artifacts] Is sending .... Web.3196.01.nupkg [Publishing artifacts] Sending ... .Web.3196.01.nupkg [publishing artifacts] Sending .... Web.3196.01.nupkg I have found that it is due to multiple document files which is approximately 50 MB Question Do anyone know that document file size limit is team support? And the second question is, is there a way to increase the file size limit? Thank you in advance Most probably, you face this known issue In short, the IIS reverse proxy has the lower default file upload limit (30MB per file per file) and should be configured.

javascript - Set an item from localStorage in a protractor test -

वर्णन ( 'सुविधा', function () {beforeEach (function () {browser.executeScript ( 'localStorage .setItem ("कुंजी", "मान"); ');}); (' यह करना चाहिए ', फ़ंक्शन () {});}); लेकिन मैं निष्पादित जब परीक्षण chromedriver 2.10 और क्रोम 37 के साथ सेलेनियम के खिलाफ चलाया जाता है यह त्रुटि प्राप्त: [निष्पादित स्क्रिप्ट: window.localStorage.setItem ( "कुंजी", "मान") ;, []]) 15: 31: 29.747 चेतावनी - अपवाद फेंक दिया org.openqa.selenium.WebDriverException: & lt; अज्ञात & gt ;: 'विंडो' से 'localStorage' संपत्ति को पढ़ने में विफल: संग्रहण 'डेटा:' URL के भीतर अक्षम है (सत्र जानकारी: क्रोम = 37.0.2062.120) (ड्राइवर जानकारी: chromedriver = 2.10.267518, मंच = लिनक्स 3.11.0-26-सामान्य x86_64) (चेतावनी: सर्वर किसी भी स्टैकट्रेस जानकारी उपलब्ध नहीं कराई) किसी भी विचार कहाँ से समस्या कैम? पर जवाब में से एक के अनुसार, यह तब होता है जब आप ब्राउजर (कहते हैं, browser.get ) को मारने के बिना स्थानीय स्टोर...

javascript - Flux architecture misunderstanding in example chat app -

Image
I'm trying to understand. The authors mentioned this unidirectional data flow: However In the example, there are dependencies between the action creators () and store () in the app, and store (,) and Web API Utils (), which is against unidirectional data flow rule: Is it recommended to follow the given example? Has been done, or should it be designed in a better way? Update I found that ChatMessageUtils are not related to Web API utilities, so there should not be two arrows from the store pointing there, so they might be okay. However the relationship between action crews and the store is still weird. The example is a little compelling, and how it was designed to try to show how to wait () The WebAPI aspect of the works is very semi-baked and should actually be modified. However, MessageStore.getCreatedMessageData (text) A value passes in the store, it is still a gateer is not setting the data on the store. It is actually a utility system Is being use...

java - How to change the button upon click ,and revert back to normal upon release the button? -

I want my image to change the image until I press and hold down the button and when I I want to back it back to the original image, is there a way to do it? bTen.setOnClickListener (New View. OnClickListener () {@Override Public Zero is OnClick (see V) {bTen.setBackgroundResource (R.drawable.press); s1 + = "E"; TxtView.setText (s1);}}); I have used the above code, but when I release my finger, I do not return to the original. You can create your own selector example and add it as style for your button (xml ): & lt; XML version = "1.0" encoding = "utf-8" & gt; & Lt; Selector xmlns: Android = "http://schemas.android.com/apk/res/android" & gt; & Lt ;! - disabled - & gt; & Lt; Item Android: Dragon = "@color / ..." Android: state_enabled = "false" /> & Lt ;! - pressed - & gt; & Lt; Item Android: Dragon = "@color / ..." Android: state_pressed = "true" /...

extend - Extending Math object in JavaScript -

Since it is a poor practice to increase the built-in objects, I think of creating a local object It had been spread globally, e.g. With $ Expansion (obj, math) . Mathematics is an object, although you can not access it for any of your property such as: {console.log (obj)) . ; } Why? Because they're all defining non countable . Almost all the underlying properties of defined objects defined are non-calculable when you calculate the properties in the object (via for-in or Object.keys ) Non-numerical properties do not appear. Two ideas for you, though: You can make your object form your prototype with math Such as: with // meth compose the mimeth object as your prototype MyMath = Object.create (Math); // Check that Mameth has a math function on display (MyMath.floor (2.3)); // utility function function display (msg) {document.body.insertAdjacentHTML ("first", " "); ES5 introduced a new function, which can get names of all proper...

dql - SQL Fetching sessions based on an interval of 30 minutes -

The title probably leaves some questions, so I explain in detail. I have a Chatmate with a MySQL tablet, all these date-time columns of the date they were added to these messages. Now that I want to receive, it is that I get the number of sessions that I had. Now, what is a session? A new session begins when the last message is 30 minutes or longer. For example with data: 2014-01-01 00: 00:01 2014-01-01 00:20:01 2014-01-01 00 : 40: 01 2014-01-01 00:60:01 will be a session 2014-01-01 00:00:01 & lt ; - 2014-01-01 00:32:01 & lt; - 2014-01-01 00:35:01 2014-01- 01 01:00:01 2014-01-01 02:00:01 & lt; - 2014-01-01 02:20:01 In my session, two sessions will be started Arrow at the start. I do not need a DCL example, for example MySQL would be OK, I hope someone can help me. Edit: The answer given below is to work in Bela, but our MySQL server is running at 5.5.4, if this is a fixed setting or sqlFiddle is not working just as objective So, I'm thinking....

c# - Best way to resolve file path too long exception -

I have created an app that downloads all the document libraries in SP site, but at one point it is giving me this error (I tried but did not find anything by looking at Google, now if anyone knows any tricks to solve this problem, please thank me otherwise to see it) System .IO.PathTooLongException: The specified path, file name, or both are too long to be fully qualified Ail name must be less than 260 characters, and the directory name must be less than 248 characters. System.IO.FileStream.Init on System.IO.Path.NormalizePathFast (string path, boolean fullCheck) on system.IO.Path.GetFullPathInternal (string path) (string path, FileMode mode, FileAccess access, Int32 rights, boolean useRights On, fileshare share, int32 bufferSize, FileOptions option, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) on System.IO.FileStream..ctor (in system string path, FileMode mode, FileAccess usage, fileshare share, Int32 bufferSize, FileOptions option ). IO.File.Create (String...

css - html italic letters protrude from their container (and may be cut by the next container' background) -

To clarify the problem (for the presentation purposes in the background, an alpha is 0.2): & lt; Duration style = "font-family: effect; font-size: 500pt; font-style: italic;" & Gt; & Lt; Span style = "border: 1px dotted # 000; background color: RGBA (10, 10, 10, 0.2);" Gt; & Lt; Span style = "border: 1px solid red; color: red; background color: rgba (200, 0, 0, 0.2);" & gt; World & lt; / Span & gt; & Amp; Nbsp; & Amp; Nbsp; & Lt; / Span & gt; & Lt; Duration style = "border: 1px dotted green; background color: rgba (200, 0, 0, 0.2);" gt; & Lt; Span style = "border: 1 px solid blue; color: blue; background color: rgba (0,0,200,0.2);" & gt; World & lt; / Span & gt; & Amp; Nbsp; & Amp; Nbsp; & Lt; / Span & gt; & Lt; / Span & gt; Lack of breaks are deliberate: HTML code is back-end-generated and font-styles may vary. Unfortunately I can not post...

F# csv provider with different column order -

अगर मैं एक प्रकार प्रकार MyType = CsvProvider & lt; "schema.csv" को परिभाषित करता हूं, स्कीमा = "ए- & gt; मायए = इंट, बी- & gt; माइब = इंट" & gt; और अगर मैं सीएसवी की तरह लोड करता हूँ चलो csv1 = MyType.Load ("file1.csv") यदि "file1.csv" में सभी स्तंभ हैं जिसमें "स्कीमा। सीएसवी" है, लेकिन अलग-अलग ऑर्डर के साथ, और अतिरिक्त कॉलम हैं जो "स्कीमा सीएसवी" में प्रकट नहीं होते हैं। क्या मैं अभी भी इसे लोड कर सकता हूँ, बशर्ते मुझे केवल "schema.csv" में निर्दिष्ट कॉलम में दिलचस्पी है? "post-text" itemprop = "text"> इसका उपयोग केस समर्थित नहीं है। यदि कॉलम ऑर्डर भिन्न चीजें काम नहीं करेगा पूरे CsvProvider इस धारणा पर बनाया गया है कि आपके द्वारा दिया गया डेटा में आपके द्वारा प्रदान किए गए नमूने की समान संरचना है। आप हमेशा यहां एक समस्या सबमिट कर सकते हैं:

view - Alloy navigation between windows -

मेरे पास 3 स्क्रीन मिश्र धातु (ऐपसेलेरेटर) है: index.xml & lt; मिश्र & gt; & Lt; विंडो वर्ग = "कंटेनर" & gt; & Lt; छविदृश्य आईडी = "अभिनेता" छवि = "/ छवियां / एफ_लामो। जेपीजी" & gt; & lt; / ImageView & gt; & Lt; लेबल आईडी = "बिएनवे" onClick = "doClick" & gt; बिएनवे और लेफ्टिनेंट; / लेबल & gt; & Lt; लेबल आईडी = "एपोरोस" & gt; एक प्रस्ताव & lt; / लेबल & gt; & Lt; / विंडो & gt; & Lt; / मिश्र धातु & gt; welcome.xml & lt; मिश्र & gt; & Lt; विंडो वर्ग = "जीत 2 कंटेनर" & gt; & Lt; ImageView id = "bienvenue2" image = "/ images / f_logo.jpg" & gt; & lt; / ImageView & gt; & Lt; देखें आईडी = "टेक" पर onClick = "showTable" & gt; & Lt; लेबल पाठ = "औपचारिक ला सूची" & gt; & lt; / लेबल & gt; & Lt; / देखें & gt; & Lt; / विंड...

java - No view found for id ... for fragment (Android application) -

I'm struggling with the following error when I try to apply the slice layout. Here is the code MainActivity ;. PublicAction Extends MainActivity Activity {@Override Protected Zero OnCreate (bundled savedInstanceState) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_main); } Public Zero Show Fregon (see view) {Fragment Manager FM = Match-fragmentation (); Piece transaction FT = FM. BBT transactions (); Ft.edd (r.layout.frag_on, new freagon ()); FT.commit (); } } When click on button ativity_main layout called showFragOne. Frag_one FragOne piece slice is the layout for the class; public class FragOne extends Piece {@Override public view onCreateView (LayoutInflater inflater, ViewGroup container, bundle savedInstanceState) {// TODO Auto View Made method stub = inflater.inflate (R.layout .frag_one, container, incorrect); Return view; } } Please help me solve this. itemprop = "text"> The way you are calling add () is incorr...

c# Abstract Generic Class inheriting from Abstract Generic Class -

I am trying to create an intangible general square which is derived from another abstract general class. What I've done so far Public Intangible Class Base Class {Public Long ID} Private Set; } Public Base Class (long id) {this.Id = id; }} Public Essential Class Base Class & lt; T & gt; : Base Class where T: Base Class {Secure Base Class (Long ID): Base (ID) {} Get Public Stable T (Long ID) {T Object; TryGet Return (ID, Out Item)? Items: Default (T); } Public Stable Bull Triget (long id, out t item) {items = null; // This is where I call the cache, but for this example I have removed, so it will compile if (item! = Null) {back true; } Else {// Call TryGetFallback return method false; }} Protected abstract T TryGetFallback (long id); } Public Essentials DerivedClass: Base Class & lt; DerivedClass & gt; {Get public string name { Private set; } Public DerivedClass (long id, string name): base (id) {this.Name = name; }} Public class DerivedDerivedClass: Derived...

Rails full_messages missing label -

For any reason the rail is missing labels for full_messages and is just error in the field in which it occurs without any clue For related to: [3] pry (# & lt; spree :: CheckoutController & gt;) & gt; @order Errors => # & Lt; ActiveModel :: Errors: 0x007fce1caa8218 @ support = # & lt; Spree :: Order ID: 87, Number: "R442456123", ITEM_TOTAL: # & lt; BigDecimal: 7fce1c57a4a8, '0.6495E2', 18 (36)>, Total: # & LT; BigDecimal: 7fce1c5cd0e0, '0.6495E2', 18 (27) & gt;, state: "address", adjustment_total: # & lt; BigDecimal: 7fce1c5cd270, '0.0', 9 (27)>, user_id: 57, completed_at: zero, bill_address_id: zero, ship_address_id: zero, payment_total: # & lt; BigDecimal: 7fce1cb184a0, '0.0', 9 (27) & gt; shipping_method_id: zero, shipment_state: zero, payment_state: zero, email: "Nick @ 1- night.co.nz", special_directories: zero, created_at: " 2014-10-10 09:47:21 ", u...

agda - Equality testing without explicit proof that data constructors are injective -

Is it possible to define a simple syntax notion of equality (like GACC Eq ? In other words, what is a helpful work for the constellation of the data constructor per constructor Instead of starting, it is possible to take advantage more directly Uses natural numbers in the form of the following example. Module ek where open import function open import relationship. Binary open import relation. Binary.proptational Akwaliti open import relations. clear data. set where no one ???? Suc: a ???? a ???? a ???? how to eliminate these injection evidence? successful-functional: a ???? {NM} a ???? success N â ?? ¡successful M a ???? N â ?? ¡m suc-injective refl = refl _ÃÆ'à a € ™ ÃƒÆ '  € " ¡Ãƒâ € SA, a · decidable {A = A '}} _ÃÆ'à a € ™ Ã⠀,  ¢ à ¢ _ zero â ???? Suc _ = no (Î »()) suc_ a ???? Zero = no (Î »()) zero Zero = yes refl suc n a ???? Success M N success with N M success. En | | Yes refl = yes refl ... | Nobody ?? ¢ m = any (nå ?? ¢ m) "suc-i...

FFMPEG code (Not command) to stream audio to a Multicast address -

I need to stream an audio to a multicast address and I can decide: ffmpeg -i input -f mpegts udp: // hostname: port? Pkt_size = 188 and buffer_says = 65535 but I do not know how to do this through code? Thanks, can help me This is no different from any other video conversion ffmpeg - open input stream, open output stream, and Loop around av_read_packet, av_decode_video, av_encode_video, av_write_packet_interleaved The easiest way is to separate the ffmpeg utility source code, which is in ffmpeg source directory in ffmpeg.c . >

android - startActivityForResult is not recognized as function in AsyncTask -

I am creating a phonegap project. I have created an original plugin for this in Android. In it, the Ascend Task is also being called. In this, I have the context.startActivity (intent) function. I want to do one thing after this activity is completed. I found a solution to use context.startActivityForResult (intent, i) instead, but this function is not recognizable. Then I tried, (activity) reference) .startActivityForResult (intent, 1); According to But at the time of startActivityForResult , I found the file installation error. My code is as follows - Public category reaches MyPlugin CordovaPlugin {reference reference; Callback callback callback; @ Override Public Zero Start (Cordova Interface Cordova, Cordova web web view) {Super Interlise (Cordova, webview); } Override Public Boolean Execution (String Action, JSNARRA RGR, CallbackConnecte CallbackContacts) throws JSONException {reference = this.cordova.getActivity (). GetApplicationContext (); Callback = c...

shell - extract information from file based on conditions -

b Please, I have a log file "log1.txt" in which the character "|" I want to retrieve the rows according to the specific requirements and I have another configuration file "code.conf" or I have put the values ​​found in field 5. Here is the log file: +++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++ ABC | 2 | 11 | 3 | 1000 | 13. Scql | 0 | | | 0 | 0 | Plk | STV | 2 | 0 TRC | 2 | 20 | 3 | 1200 | 30 | Tkgl | 0 | Pajd | Jahd | 0 | 0 | Klm | Fdkl | 1 | 0 KLM | 2 | 0 | 3 | 1300 | 19 | Mlpo | 0 | | | 0 | 0 | Qnhd | Pkjs | 2 | 0 KLM | 2 | 20 | 3 | 1600 | 11 | Mlpo | 19 | | | 0 | 0 | Qnhd | Pkjs | 2 | 0 +++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++ And here the configuration file "code .conf "is ++++++++++++++++++++++++++++++++++++++++++++ +++ +++++++++++++++++++ 1000 1300 1200 1600 ++ ++++++++++++++++++++++++++++++++++++++++++++ + Now I want to get lines from the log file correspo...

javascript - Using iframe body as Region in Backbone Marionette -

I am trying to use the body of an iframe in the background as a backbone merrynet. The Marianette StandAud uses jquery selectors to determine which element is the field, like this: App.addRegions ({main: "# main-region"}); I want my area to be an integral part of an iframe, which normally I think: $ ('iframe'). ) .find ('body'); When it is above the field, such as: App.addRegions ({main: $ ('iframe') .fund ( 'the body')}); The following error has been thrown: Unwanted error: syntax error, unrecognized expression: iframe.contents () body Sizzle.error jquery.js? Body = 1: 4681 to counter jquery.js? Body = 1: 4742 choose jquery.js? Body = 1: 5114 I tried to put the selector directly: app .addRegions ({main: "iframe.contents () body "}); But this is giving me the exact same error. Edit: Also tried to create a psuedo-selector for this: $ Expr [":"] Content = $ Xp. Make Chaddo (Function (S...

Read Text file using Javascript -

इस सवाल का पहले से ही एक उत्तर है: 6 उत्तर क्या आप कृपया मुझे बता सकते हैं कि जब मैं HTML पृष्ठ को खोलता हूं तो जावास्क्रिप्ट का उपयोग करके पाठ फ़ाइल से मूल्य पढ़ने और प्रदर्शित करने का कोई तरीका क्या है? फ़ाइल स्थानीय सिस्टम में है और जब HTML पृष्ठ खुलता है, तो इसे स्वचालित रूप से उठाया जाना चाहिए ऊपर और परिणाम चेतावनी संदेश में प्रदर्शित किया जाना चाहिए साथ ही साथ HTML पृष्ठ। देखें सादा जावास्क्रिप्ट का उपयोग करके स्थानीय फाइलों को लोड करना संभव नहीं है। हालांकि, हम उपयोगकर्ता निर्दिष्ट फ़ाइलों को लोड करने की सुविधा के लिए उपयोग कर सकते हैं।

html - Bootstrap table in php i.e under -

I am trying to create a table in php but I think I am making a mistake in syntax. $ Data1 [$ num] - & gt; Find ('A', 0). '& Lt; / Td> '; Echo '& lt; Td> $ Data [$ num] - & gt; Find ('A', 0). '& Lt; / Td> '; Echo & lt; / Tr & gt; '; } Echo '& lt; / Tbody & gt; Echo '& lt; / Table & gt; ? & Gt; After each statement, you should use a semicolon ( ; ), you missed them on all your statements. Besides, you can mix HTML and PHP Which makes it very clean: & lt; Table class = "table-table-barred table-strip" & gt; & Lt; Colgroup & gt; & Lt; Col class = "col-xs-1" & gt; & Lt; Col class = "col-xs-7" & gt; & Lt; / Colgroup & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; Date & lt; / Th & gt; & Lt; Th & gt; Title and description & lt; / Th & gt; & Lt; / TR...

ldap - Adding groups as members to a Connections community through the API -

When I know the group name (from the directory server), then add a group as a member as a group Looking for the way. When I add a group to a group through the UI, I can choose from the existence groups, but I have not yet received the API equivalent of this call. Do not think that to become a profile, enter SNX: UserId & lt; Snx: userid xmlns: snx = "http://www.ibm.com/xmlns/prod/sn" & gt; AB16E3DF-D544-4984-94AE-FAAC7A5F2AA6 & lt; / SNX: userid & gt; At the profile service endpoint: https: //CONNECTIONSHOST/profiles/atom/profile.do? Userid = AB16E3DF-D544-4984-94AE- FAAC7A5F2AA6 No profile returns ... So the question is, as a member of a community How can I add a member (LDAP) when I don SIP: UIID but only group name? the following METHOD = POST AUTHORIZATION = {BASIC} {OAUTH} Content-Type Application / Atom + xml URL PATTERN = community / service / atom / community / members? Community UIId = $ {community uid} method post Where t...

c# - Does string.Replace(string, string) create additional strings? -

हमारे पास dd / mm / yyyy प्रारूप में दिनांक युक्त स्ट्रिंग को बदलने की आवश्यकता है ddmmyyyy प्रारूप (यदि आप जानना चाहते हैं कि मैं तारों में तारों को संग्रहीत क्यों कर रहा हूं, तो मेरे सॉफ़्टवेयर में थोक लेनदेन फाइलें होती हैं, जो कि एक बैंक द्वारा उपयोग की जाने वाली रेखा आधारित पाठ फ़ाइल स्वरूप है)। और मैं वर्तमान में यह कर रहा हूं: स्ट्रिंग पुराना फ़ॉर्मेट = "01/01/2014"; स्ट्रिंग newFormat = पुराना फ़ॉर्मेट। बदलें ("/", ""); ज़रुरत है, यह कनवर्ट करता है "01/01/2014" से "01012014" । लेकिन मेरा सवाल है, एक चरण में होने वाली जगह को बदलता है या क्या यह एक मध्यवर्ती स्ट्रिंग बनाता है (उदाहरण: "0101/2014" या "01/012014" यहाँ ये कारण है कि मैं यह कह रहा हूं: मैं कुछ किलोबाइट से सैकड़ों मेगाबाइट्स तक आकार में लेकर लेनदेन की फाइलों का प्रसंस्करण कर रहा हूं। अब तक मेरे पास एक प्रदर्शन / स्मृति समस्या नहीं थी, क्योंकि मैं अब भी बहुत छोटी फाइलों के साथ परीक्षण कर रहा हूं। लेकिन जब मेगाबाइट की बात...

java - Double class vs double primitive data type -

I have learned to see other references; So that there are many disadvantages in double . Double loss compared to double primitive data types: It is slow (reference :) More storage due to metadata associated with it Takes. Now, I know that there are some manipulations that we can do with double but most of these methods (85%) are static, before any big There is no profit. One more thing I know is that the double can not be zero. Double double class = zero; // valid double double type = zero; // Results in NPE After all these losses I do not understand why we will not use double in real life scenario and will not double. Some can give examples of a real world and can explain. Thanks There are several main reasons that you should use double In some cases you know that different data sources You can use the class. Note in most cases double D1, D2; // in some value D1 == D2; As you mentioned it double tap Can not be double and Think of a situation ...

c# - How to perform an ExecuteScalarAsync on several queries and manipulate data -

I am using ADO.NET and returning the boolean value to me in one of the ways Is required if any customer is using any product of the company, due to this reason I need to execute many questions because different products have separate compartments with different clients, so I terminate it: / P> SqlCommand firstProduct = new SqlCommand (firstQuery, connection); First product. Comma timeout = 300; IAsyncResult Number of Used Products = FirstProject Exclsar sarsink (); // second product SqlCommand secondProduct = new SqlCommand (secondQuery, connection); SecondProduct.CommandTimeout = 300; IAsyncResult Number of Used Products 1 = Second Product. XXSLLSINNCNC (); // Third rpoduct SqlCommand third product = new SqlCommand (third query, connection); Third product Comma timeout = 300; IAsyncResult numberOfUsedProducts2 = thirdProduct .ExecuteScalarAsync (); What exactly do I want to know about how to proceed and gather results from each query, so can I execute some extra argument...

php - PHPRedis - time() does not work -

I have a problem. In my project I have some servers that modify the same data in radis. All servers may have different times In other words, in some cases the app server can not trust the timing. So I would like to use the redis time as the normal base point. Everything can be alright, the PHPRedis documentation says that there is a function what I really want:. But here's a big surprise: // Create connections etc ... var_dump ($ redis- & gt; time ()); The output is: bool (false) The question is - what is it? Do you ever face such a problem? How can I retrieve the server time using my work? Note: Other radis functions work fine, I am able to read and write data is fine and properly created. No help found here. As well as anywhere else. So I need to invent a wararound ... It is, if anyone needs it // unique floating key Generate $ key = uniqid () post (); // Some random future TS $ future_ts = time () + 1000; $ Redis- & gt; Setx ($...

java - Unable to get version name in code after moving to Gradle -

I have so far taken one of my Android projects to Gradle, and according to the recommendations I All configurations (minimum / maximum sdk, version name / code etc.) have been moved to the Build.gradle file. Now a bug has been told that one customer could see the version name and code inside the product. After checking this, I came to know that the common method of removing those people is android: versionCode = "" and android: versionName = "" tags After deleting AndroidManifest.xml the values ​​have stopped working. I have verified that these values ​​occur when these are the values. Now I am looking for a way to remove these same values ​​for use in code, but I have not found any reference to this behavior and where (it is not working like this) I had to remove the code used to obtain these values ​​from the package manager, so try {PackageInfo pInfo = ctx.getPackageManager (). GetPackageInfo () Ctx.getPackageName (), 0); Return pInfo.versionNa...

assembly - Significant time spent in function call -

I have a function that is called multiple times during my code, it seems ~ 45% of the total time code Run (reported by Intel Vetuune), but, as the function is computational expensive, I am not very surprised at this. I am surprised that, however, the amount of time VTune tells me that I'm spending on overhead to call the function (i.e. the time reported next to the function announcement). The function declaration is as follows: Subroutine tempFunc (beg, matProp, timestep, matid) The parameter I am passing is just a , 100 real * 8 variable, other real * 8 , and 32 integer s like Fortran reference Everything passes away, and there are only 4 variables, I believe that this call should be very high. However, ~ 15% of the time spent in the ceremony has been called overhead. Looking at the assembly code, it all time is spent on the following instructions: mov dword ptr [rsp + rax * 1], 0xccccccc sub rax, 0x4 I know enough assembly to know that rsp is a stack pointe...

How to perform a 3-way visual diff on git? -

I want to differentiate the 3-way difference of a single file in 2 different branches, that is, the previous commitments in each branch Also consider the common ancestor I want to use an external device which allows 3-way comparison I was considering using git difftool but as far as I could see it was only given a given To compare any 2 versions of the file Nomination is that I can use mergetool, but it forces me to merge GIT first so that the base, remote and local variables are set. I do not want to run the git merge, I just want to do a 3-way difference, to see that the changes made on the file were made before considering the general ancestor in both the files. Do I need to use difftool or mergetool? Thanks A solution is a scene that works directly on GIT modification and supports N-ideas Does. / P> For example, you can open a three different difference between the different branches for the file: diffuse -r master -r HEAD -r upstream file .txt

android - Get the Theme value applied for an activity programmatically -

I want to know which themes are implemented for any activity in an app. Normally we are setting the theme by using settheme (android.r.style.Theme_Light); Here we are specifying style, such that we may be able to achieve a specific type of style for an activity in the program. Thanks called getThemeResId in the reference class There is a good method, although it is private so you need to use the reflection. / P> Here's an example: @ override protected form zero (bundle savedinstenstate) {super.New (savedinstenstate); SetContentView (R.layout.activity_my); Logs. E ("tag", "def theme:" + R. style. Aaptim); Logs. E ("tag", "light theme:" + android.r.style.me_Light); Logs. E ("tag", "current theme id:" + receivedTheme ()); SetTheme (android.R.style.Theme_Light); Logs. E ("tag", "current theme id:" + receivedTheme ()); } Int getThemeId () {try {class & lt ;? & Gt; Wrapper = ...

javascript - Show Directory Browse Dialog in Firefox Addon -

Image
I want to choose a folder by showing a dialog to my user. Is this possible with JavaScript in Firefox? Yes, an easy way to do this is to use the common method. The primary difference from the example on that page is that in the method passed to the parameter init, you specify nsIFilePicker. Mode Gatefolder as mode . Also, given that you are looking for a directory, you can only filter from nsIFilePicker.filterAll , and not. The example code would like to include a filter for a particular type of extension: MDN page, modified (and descriptive variable names given) to select folders: if (window === faucet = window type! == "object") {// If you do not already have any window reference, you need to get one: // your environment To comment on the appropriate version for "/" add / * E-on SDK environment: var window = require ( 'SDK / windows / UTI "). GetMostRecentBrowserWindow (); // * / / * Overlay and bootstrap environment (from almos...

node.js - npm install connect-redis errors finding debug@ ^1.0.4 ... but I have version 2.0.0... why? -

I hope the symbol '^' indicates the need for debug version 1.0.4 or greater. If I am correct, then install NPMM - redis should get debug @ 02.0.0 which is installed globally on my system. I have node version 0.6.12 installed and NPM-V 1.1.4. Here is the error message: npm ERR! Message no compatible version was found: debug@'^1.0.4 ' Here is a list of packages installed globally: A ???? One ???? One ???? Async@0.9.0 a ???? Line Line Debug @ 02.0.0 a ???? One ???? One ???? One ???? Ms@0.6.2 A "????" Line Passport-local @ 1.0.0 a ???? One ???? One ???? Passport -strotex @ 1.0.0 a "????" Formula ¬ restify@1.4.4 a ???? One ???? One ???? One ???? Async@0.1.22 a ???? One ???? One ???? One ???? Tunan @ 0.10.0 a ???? One ???? One ???? Byline@2.0.2 a ???? One ???? One ???? Dtrace-provider@0.0.9 a ???? One ???? One ???? One ???? Formidable@1.0.11 a ???? One ???? One ???? One ?? Http-signature@0.9.9 a ???? a???? One ???? One ???? One ???? Asn1@0.1...

java - how to take a generic JAXBElement as an input -

मेरे पास एक विधि है सार्वजनिक प्रतिक्रिया xyz (JAXBElement & lt; T & gt; अनुरोध) {। .....} दो अलग-अलग जगहों को इसे अलग जेएक्सबीएलेमेंट के साथ बुलाया जा रहा है। xyz (JAXBElement & lt; a & gt;) और xyz (JAXBElement & lt; B & gt;) के साथ अन्य मैं अपनी विधि का सेवन सामान्य कैसे बना सकता हूं ताकि यह दोनों विधियों के साथ काम करता है? कृपया प्रयास करें: xyz (JAXBElement & lt;? & Gt; माई एलेमेंट); कृपया जेनेटिक्स पर यह देखें: तो सभी प्रकार के संग्रहों का सुपरटेप क्या है? यह संग्रह & lt;? & Gt; (उजागर "अज्ञात का संग्रह") लिखा है, अर्थात, एक संग्रह जिसका तत्व प्रकार से मेल खाता है। इसे स्पष्ट कारणों के लिए एक वाइल्डकार्ड प्रकार कहा जाता है हम लिख सकते हैं: void printCollection (संग्रह & lt;? & Gt; c) {for (ऑब्जेक्ट ई: c) {System.out.println (e); }} और अब, हम इसे किसी भी प्रकार के संग्रह से कॉल कर सकते हैं।

Facebook Api me/accounts return error -

I want to get a list of user pages (where the user is the administrator), but I have an internal server error Is happening I also get permission for management_pages. Here's the code. Am I doing wrong? $ params = array ('appId' => APP_ID, 'secret' => APP_SECRET, 'cookie' => true); $ This- & gt; Load-> Library ('facebook', $ parameter); $ Data = $ this- & gt; Facebook- & gt; API ('/ m / account /'); Print_r ($ data); Place those two rows at the beginning of your PHP file and get detailed descriptions Error message instead: error_reporting (E_ALL); Ini_set ('display_errors', 'on'); You can try commenting on code parts instead, to know which line generates errors.

angularjs - How to test an Angular Factory which uses Parse SDK -

This is my first question here. I will try my best I have searched a lot before posting I am developing an angular JS application that is dependent on Javascript. I have assured myself to dive into the test recently, so I am making a start. I have this factory which wrap around the SDK so that everything is angled in a clean and modular way. That is: SDK is used only through factories (not controlling or directive). It comes like this: myModule.factory ('UserFactory', ['$ q', function ($ q) {var user = pars.USAR .inded ({// instance}}, {// static / class methods // overrides parse. User.} {Var deferred = $ q.defer (); var current user = pars.USIR. (); if (current User) suspended.Rolove (current user); and deferred.Disclaimed ("no current user"); delay is returned.;}}); Return user;}]); My question: UserFactory.current () How does it use an external service? I'm jokingly pars SDK, but it does not know how to do this because it is not r...

asp.net mvc - Import and further development of a Bootstrap 3.2.0 template in ASP .NET MVC 5 project @ Visual Studio 2013 -

I created a new ASP.NET MVC5 project in Microsoft Visual Studio 2013. I bought some bootstrap template (version based on 3.2) on the Internet, which I want to use in my project, I bought the license to use that template and downloaded the appropriate package with source, docs etc. There are several sections within this package: District-production files (merged .html files, css merged into 1 files, .js were merged into 2 files, etc. dev - development files (many layouts are divided into .html files, without split, split .js and so on) document - documents Because I'm not a very experienced web developer, how do I import this template into this property and And I feel the lack of information inside how to proceed in a better way using this template. There is a development setup guide section: To work with the included development files, you need to install the following: Node. Need to install JS, Kunj, Grunt, Jekyll. After the node, open command line / terminal ...

vb.net - VB 2010 Arrays from TXT file -

I need to create a program that opens the text document and the new array for a string from txt for any line adds up. I try with this code but it does not work: New IO.StreamReader ("c: \ * .txt") as new list (string of) in the form of dim x ) O for each string as a. X in redundant () Add (A) Next Can anyone help me? Thank you. ReadToEnd () reads the whole file in a string, so you Loop lines will not be able to loop. Make your life easier and string = file as the dim lines (). Read Line ("c: \" Myfile.txt ") It reads all the rows in a string array along with a line of code. slow line = Using new list (of the string) () reader = New Stream Reader ("C: \ MyFile.txt"), while not the reader. Add EndOffStream Lines (Reader. takes care of automatically shutting down the command reader.

asp.net - VB Single line with null values -

I have the following code that I do not believe is working properly and I can not understand why. Slow number in the form of decimals? = If (nothing is before or second, there is nothing, _ nothing, _ Math.Ebus (if (first, 0D)) - Math.Ebus (if (second, 0D)) before or second , then nothing should be kept in total . , If there are values ​​in both, then both of them must be converted into positive values ​​and first - second should be calculated. First and second are both qualified decimal (decimals?). / P> Expected Result: before = none = nothing = nothing: Actual results: first = nothing = nothing = 0d I do not understand if the statement is not going in the correct section and in the variable total Nothing is putting if () operator is typed strongly , But the compiler has been estimated that kind of result based on input In this case, it can not guess the type from the first option ( nothing ), because the self does not have any type, and not the...

c# - ViewModel becomes null when passed between actions -

I'm having trouble passing the visual model in one view. I have two ideas: a search and see a normalform . Passes the viewdown of search search code in normalform . Say that GeneralForm is a complex view-model in which two other view models: public class GeneralFormViewModel {public GeneralInfoViewModel GeneralInfo {get; Set; } Receive Public Notes Vision Model Notes { Set; }} Public Square GeneralInfoViewModel {[Required (ErrorMessage = "Please enter the name of the person.")] ​​[DisplayName ("name:")] Public string name {get; Set; } [Required (Error Message = "Please enter the person's ID.")] [DisplayName ("id:")] Received public ID { Set; }} Public class notes view model {// etc (I used this method to use multiple @ Html.BeginForm s on my GeneralForm view In this way, I hope that a small portion of the entire normal form will be posted and validated using the Knock OutJs and AJX at one go.) [http post] [Http po...