Wednesday, 15 August 2012

c++ - Replacing text in a string with hyphens -


I am trying to write a program which is a game of executioner.

  #include & lt; Iostream & gt; #include & lt; String & gt; #include "assn.h" using namespace std; Int main () {clearScreen (); Cout & lt; & Lt; "Enter words or phrases:"; String phrase; Std :: getline (std :: cin, phrase); Cout & lt; & Lt; Andal & lt; & Lt; "Your phrase:" & lt; & Lt; Phrase & lt; & Lt; Endl; Cout & lt; & Lt; Endl; }  

Currently I can get the input string and get the empty space, but I want to create another string where all the letters have been replaced with hyphens and Spaces are preserved. I have tried to see it and how it can not be ascertained.

Here one is for example algorithm replace_if

  #include & lt; Iostream & gt; #include & lt; String & gt; # Include & lt; Algorithm & gt; Int main () {namespace std; String input {"This is an exam"}; String censored {input}; Replacement_if (censored. Bg (), censored.ed (), :: iislifa, '-'); Cout & lt; & Lt; Sensor & lt; & Lt; Std :: endl; }  

Output:

  ---- - - ----  

call above Replace_if replaces the ones with a dashed to iterative on a container (in this case, a string of characters) and alphabetically, leaving the blank space.


html - Jinja2 Accessing an specific index in List of Lists -


I'm new to Jinja and Python and I'm having trouble printing my table. I had to prepare this work and table (though it would not always remember the index).

  & lt; Table & gt; {% Table in% for}} & lt; Tr & gt; {% Line in line%} & lt; Td> {{Cell}} & lt; / Td> {% Endfor%} & lt; / Tr & gt; {% Endfor%} & lt; / Table & gt;  

But I want to do something like this so that I can apply individual attributes on different columns. There will be a column link, a blue, etc. Although this code is empty I & lt; Td> & Lt; / Td> Gives a bunch of lines. Is not I using the index properly?

  & lt; Table & gt; {% Table in% for}} & lt; Tr & gt; & Lt; Td> {{Line [0]}} & lt; / Td> & Lt; Td> {{Line [1]}} & lt; / Td> & Lt; Td> {{Line [2]}} & lt; / Td> & Lt; Td> {{Line [3]}} & lt; / Td> & Lt; Td> {{Line [4]}} & lt; / Td> & Lt; Td> {{Line [5]}} & lt; / Td> & Lt; Td> {{Line [6]}} & lt; / Td> & Lt; Td> {{Line [7]}} & lt; / Td> & Lt; Td> {{Line [8]}} & lt; / Td> & Lt; / TR & gt; {% Endfor%} & lt; / Table & gt;  


Initializing 2d array in Ruby -


मुझे एक 2d सरणी प्रारंभ करना है, जैसा कि निम्न है

  1 0 0 0 2 2 0 0 0 3 0 0 0 0 4  

जब इनपुट स्ट्रिंग "1234" दिया जाता है

ऐसा करने के लिए मेरा कार्य इस प्रकार है:

  डीईफ़ मज़ेदार (str) maxlength = Array.new (str.length, Array.new (str.length, 0) ) (0..स्ट्रेट। लैंप -1) .ईच करो | मैं | Maxlength [i] [i] = str [i] .to_i अंत प्रिंट अधिकतम लार्ंन्थ अंत प्रिंट मज़ा ("1234")  

यह मुझे देता है

  1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4  

जो मुझे नहीं चाहिए।

मुझे जो आउटपुट प्राप्त करना चाहते हैं ?

यहाँ सबसे बड़ी समस्या यह है कि आप दो आयामी सरणी नहीं बना रहे हैं आपको लगता है कि आप हैं, लेकिन इसके बजाय आप दो सरणियां का निर्माण कर रहे हैं इसका कारण यह है कि आप एक एकल सरणी में एक डिफ़ॉल्ट के रूप में गुजर रहे हैं, एक ब्लॉक नहीं जो उन्हें उत्पन्न कर सकता है।

आप जो उम्मीद कर रहे थे वह यह था:

  array1 = [ Array1, array22, array23, array24]  

आप वास्तव में क्या प्राप्त कर रहे थे यह है:

  array1 = [array2, array2, array2, array2]   

यह एक आखिरी तर्क को एक ब्लॉक में परिवर्तित करके आसानी से तय किया जाता है:

  def मज़ेदार (str) maxlength = Array.new (str.length) {Array। नया (str.length, 0)} str.chars.collect (और: to_i) .each_with_index करना | v, i | Maxlength [i] [i] = v अंत प्रिंट अधिकतमलेलग एंड प्रिंट मज़े ("1234")  

मैंने भी वर्ण का उपयोग करने के लिए स्विच किया है जो कि स्ट्रिंग जैसे आप चाहते हैं।

तो समस्या यह थी कि आप सही ढंग से स्थितियों को स्थापित कर रहे थे, लेकिन जैसा कि सभी दूसरे स्तर के सरणियों का एक ही सरणी था, आपको वह परिणाम नहीं मिला जिसकी आप उम्मीद कर रहे थे।

अपडेट: क्रिस के जवाब से प्रत्येक_वि इन_इनडेक्स जो मनमानी संख्याओं के साथ यह काम करता है।


javascript - get value from dynamic added text input -


I need to add some text input dynamically to my page:

  $ table =  

""; $ N = 0; $ Arrayform = array (); Forex currency ($ rslt $ as rows) {$ table = $ table "& Lt; div class = 'img-rounded row' style = 'margin-bottom: 2%' & gt; & lt; div class = 'col-lg-1' & gt; & lt; / div & gt; & Lt; div class = 'col-lg-4' & gt; & lt; input id = 'cap -' $ N. "'type =' text 'class =' ​​form-control 'value ='". $ Rows ['caption']. ' 'Gt; & lt; / div & gt; & lt; div class =' ​​col-lg-1 'id =' rightarrow '& gt; & lt; img id =' img- "$ N. '' Src = 'img / right-arrow.png' width = '45 'height =' 30 'alt =' '/ / gt; & Lt; / Div & gt; & Lt; Div class = 'col-lg-4' & gt; & Lt; Input id = 'val -'. $ N "" type = 'text' class = 'form-control' value = ''. $ Rows ['value']. '' & Gt; & Lt; / Div & gt; & Lt; Div class = 'col-lg-1' & gt; & Lt; Input type = 'button' id = 'btn -' $ N. '' \ ", \" ". \", [\ '\', $ '[' Caption ']. "\", \ "". $ Rows [' value ']. ]. "$ \ ['Id'] $ rows. \") 'Class =' ​​btn btn-danger 'value =' remove column '& gt; & lt; / div & gt; & lt; / div & gt; ; & Lt; div id = 'divrslt -'. $ N. "'class =' ​​line text-success 'style =' margin-left: 10%; Margin-bottom: 2% '& gt; & Lt; / Div & gt; "

The form element's ID is determined by the $ n variable and other strings.

I have written the following code to create the parameter list of the input code Javascript Function.

  $ array [$ rows ['caption']] = "cap -" $ N. "value, value -". $ N. ". Value, "; $ N ++;}  

and with the following code, I use the array built in the previous line as the parameters of the updatechartval () javascript function.

  $ table = $ table. "& Lt; Div square = 'line' style = 'margin-left: 4%' & gt; & Lt; Button type = 'button' class = 'btn btn-success' onClick =' updatechartval (".implode (", $ enthusiast). "\" ". $ _GET ['id']." \ ") 'Value =' Update '& gt; update & lt; / button & gt; & lt; / div & gt; ";  

And then I resonate it:

  counterattack $ table;  

The button code provided is:

  & lt; Button type = "button" class = "btn btn-success" onclick = "updatecharwall (cap-0.value, val-0.value, cap-1.value, wall-1.value, cap-2.value, val -2.value, cap-3.value, val-3.value, & amp; quot; 126 & amp; quot;) "value =" update "& gt; Update  

/ Div >

You are suffering from JavaScript equivalents of a SQL injection attack:

  [Kikot .. ] Onclick = "updatechartval (cap -0 .value, val-0.value, [.. snip ..] ^^^^^^^^^^^  

In the function call You need to quote your parameters, because the code is currently being interpreted / executed:

updateCharval (unknown / undefined variable "cap" zero 0.value, ...

form an integer There is no .value attribute, and since you are trying to reduce the undefined value attribute from that undefined variable, you are going to get a full back of stuff blowing in your face.

Your generator function should look even more:

  $ array [$ rows ['caption']] = "'cap' - $." Value ',' Val - '. $ N ", value' etc ... ^ --------------- - ^ ^ ---------------- ^  

Note additional quotes.


javascript - jquery email extractor live from textarea -


OK, so I have a 2x text with a different ID. I was trying to remove the pasted email in Texaria I am then shown in another Textera. I know my junkie work for removing e-mail from a text in a page and sorting, but I can not seem to work with Textera.

My code for texterrage is as follows:

  & lt; Textarea id = "email-extractor" class = "email-extractor-textray" & gt; & Lt; / Textarea & gt; & Lt; Textarea id = "email-extracted" class = "email-extractor-textray" & gt; & Lt; / Textarea & gt;  

My code is as follows:

  & lt; Script & gt; Remove function (text) {return text. Match (/ ([a-zA-Z0-9 ._-] + @ [a-zA-Z0-9 ._-] + \. [A-zA-Z0-9 ._-] +) / gi) ; } Performance Duplicate (ARR) {var i; Var len = arr.length; Var Out = []; Var obj = {}; For {I = 0; i    

Your code only works It seems that you were not adding text other text Field correctly:

Demo :

  $ ('# email-extractor') keyboard (work (index) {Var email = Quote email ($ (this) .val ()); console.log (email); if (! Email) {$ ('# email-extracted'). Text ('** no email in comment'); } And if (emails.length & lt; 3) {var text = ';; (var i = 0; i & lt; email length; i ++) {text + = email [i] +', ';} $ (' # -Ex-extracted '). Text (text);} and {$ (' # email-exit Mr. went "). Text (" ** to ignore the comments, a lot of email addresses ( '+ emails.length +'). ');}});  

jsp - how to configure root folder for jquery file tree? -


I used the following code to configure my jquery file tree.

  & lt; Script & gt; Jquery ($) ($ {document} .ready (function () {$ ('# loadFolderTree'). FileTree ({root: '/', script: 'assets / plugins / jquery_file_tree / connectors / jqueryFileTree.jsp' , Multifolder: wrong}, function (file) {warning (file);});});}); & Lt; / Script & gt;  

Its working fine, script is loading, facing only one problem, I can not find the root folder of my web-application < Instead, it is giving me (i can not upload the image,

  • c:
  • / Li>
  • CSS
  • Database-Dump
  • Dev
  • li
  • Home
  • js
  • Cart
  • Log
  • Log
  • Lost + found
  • Media
  • Meta-INF
  • mnt (The list of directories is on and on)
  • I do not know exactly how to set the path to my web-application root folder. How can I direct it to my actual web-application server folder?

    "/" is the full root You can try the path of the file system with "." To get the current folder of the web-application.


    storing random numbers in database in php? -


    I have some code that generates random numbers like some discount coupon codes. Each time a list of new codes is prepared and I want to save it to the database, the new list is prepared every time and so I want to save it to the database.

      & lt;? Php $ db = new mysqli ('localhost', 'root', '', 'store'); If (mysqli_connect_errno ()) {echo 'could not connect to the database: plz try sometime time ..'; Go out; } $ Coupon = 8; Number of coupons $ size = 10; ($ I = 0; $ i & lt; $ coupon; $ i ++) // number of the characters {$ code = copy stripupper (substrate (MD5 (time (.) Rand (100009999) ), 0, $ size); echo "<$"> $ Qry = "Enter code (code) values ​​('$ coupon')"; $ result = $ db-> query ($ Qry);}  

    I assume that this code does not run for you Trying below - I've made some changes:

      $ coupon = 8; Number of coupons $ size = 10; ($ I = 0; $ i & lt; No. of characters for $ coupon; $ i ++) Well, // is not a very good random generator (at that time) ... $ code = strtoupper (substr (md5 (time () .rand (1000099999)), 0, $ size); $ qry = "Enter code (code) values ​​('$ code')"; $ result = $ db-> query ($ qry);}  

    javascript - How to vertically stack navbar elements on collapse expansion -


    जब मैं navbar-collapse बटन पर क्लिक करता हूं, navbar से तत्व < / कोड> विस्तृत लेकिन वे खड़ी गठबंधन नहीं कर रहे हैं। आप link5 और Link6 को navbar पर दायां-संरेखित करके कैसे रख सकते हैं?

    यहां JSFiddle है:

    संपादित करें: नेवि-गोलियां समस्या होने लगता है। अगर मैं इसे navbar-nav से बदलता हूं, तो यह स्वचालित रूप से खड़ी हो जाती है I उस स्थिति में nav-pills प्रभाव को पुनः बनाने का एक तरीका है?

    <पी > आप फ्लेक्सबॉक्स प्रॉपर्टी का उपयोग कर सकते हैं फ्लेक्स-दिशा: कॉलम इसे ऊर्ध्वाधर आशा से ढकने के लिए यह आपकी मदद करेगा

      शरीर {width: 100% margin: auto; पृष्ठभूमि रंग: # f7f7f7; } .navbar {background: #FFFFFF} .nav {width: 100%} .nav {font-family: 'Raleway', sans-serif; रंग: # 5a5a5a; फ़ॉन्ट आकार: 13 पीएक्स; फोंट की मोटाई: बोल्ड; टेक्स्ट-ट्रांस्फ़ॉर्म: अपरकेस; } उल {प्रदर्शन: फ्लेक्स; फ्लेक्स-दिशा: स्तंभ; } .nav li {display: inline; }। सामग्री {मार्जिन-टॉप: 100px; }  
      & lt; title & gt; नेवाबर टेस्ट & lt; / title & gt; & Lt; link href = 'http: //fonts.googleapis.com/css? परिवार = रैलीवे: 400,100' rel = 'स्टाइलशीट' प्रकार = 'टेक्स्ट / सीएसएस' & gt; & Lt; link href = "http://s3.amazonaws.com/codecademy-content/courses/ltp/css/bootstrap.css" rel = "स्टाइलशीट" & gt; & Lt; link rel = "स्टाइलशीट" href = "texthover_test.css" & gt; & LT; बॉडी & gt; & Lt; div class = "navbar navbar-default navbar-fixed-top" & gt; & Lt; div वर्ग = "कंटेनर" & gt; & Lt; div class = "navbar-header" & gt; & Lt; बटन प्रकार = "बटन" वर्ग = "नेविबार-टॉगल" डेटा-टॉगल = "पतन" डेटा-लक्ष्य = "# उदाहरण" & gt; & Lt; span class = "icon-bar" & gt; & lt; / span & gt; & Lt; span class = "icon-bar" & gt; & lt; / span & gt; & Lt; span class = "icon-bar" & gt; & lt; / span & gt; & Lt; / बटन & gt; & Lt; / div & gt; & Lt; div वर्ग = "पतन नवबार-पतन" id = "उदाहरण" & gt; & Lt; ul class = "nav nav-pills" & gt; & Lt; li & gt; & lt; a href = "#" & gt; लिंक 1 & lt; / a & gt; & Lt; / li & gt; & Lt; li & gt; & lt; a href = "#" & gt; लिंक 2 & lt; / a & gt; & Lt; / li & gt; & Lt; li & gt; & lt; a href = "#" & gt; लिंक 3 & lt; / a & gt; & Lt; / li & gt; & Lt; li & gt; & lt; a href = "#" & gt; लिंक 4 & lt; / a & gt; & Lt; / li & gt; & Lt; li वर्ग = "पुल-दायें" & gt; & lt; a href = "#" & gt; लिंक 5 & lt; / a & gt; & Lt; / li & gt; & Lt; li वर्ग = "पुल-दायें" & gt; & lt; a href = "#" & gt; लिंक 6 & lt; / a & gt; & Lt; / li & gt; & Lt; / ul & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" & gt; & lt; / स्क्रिप्ट & gt; & LT; स्क्रिप्ट src = "http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; / body & gt; & Lt; / html & gt;  


    search engine - Google indexed a page that doesn't exist -


    There is something strange that website I'm working on. When I do a research on Google about a product on a website, the return result is a page that does not exist, but it does not return a 404 error.

    "page.html" exists, but it is not on the path that Google has found, the URL has not been created anywhere else, and since it is inside Joomla, it has some visual errors

    I have done some research, and many people have this kind of error, but usually there is page 404 or duplicate version. In my case, the page opens normally, the only thing is that "page.html" is being used in some way that is not right. I have already checked the folders inside and there is not a duplicate page inside them.

    What's going on?

    Thank you very much in advance.


    css - CakePHP & Bootstrap - date field layout -


    I start with both Bootstrap and Cake PHP 2.x. I baked my thoughts but there is a problem with the date field layout. The scene looks like this

      & lt; Div class = "form-group" & gt; & Lt ;? Php echo $ this- & gt; Form- & gt; Input ('booking_date', array ('class' => 'form-control', 'placeholder' = & gt; 'booking date')) ;; & Gt; & Lt; / Div & gt;  

    But the problem is that the KPHP selects three from a date field, which is all 100% width, which corrupts the form and the fields look like this, while it has selected three Should be side-by-side:

    see

    apparently As such, bootstrap 2 had classes for small selections, but Bootstrap 3 does not do anymore. Any idea how it should look like it should?

    In the date kppp for input of type you div < Using the / code> option, standard tags can not wrap each selected element, but there are 3 options that can handle it - between, separator and later on is the example that selects your inline. is.

      & lt; Div class = "form-group" & gt; & Lt ;? Php echo $ this- & gt; Form- & gt; Input ('booking_date', array ('class' = & gt; form-control', 'placeholder' = & gt; 'booking date', 'div' = & gt; array ('class' => Form-inline '),' between '= & gt;' & lt; div class = "form-group" & gt; ',' separator '= & gt;' & lt; / div & gt; & lt; Div class = "form-group"> after ',' followed by '= & gt;' & lt; / div & gt; '));) ;? & Gt; & Lt; / Div & gt;  

    If you use the bootstrap grid, you can get better results by using classes to select it inline.


    visual studio 2013 - The 'Provider Package' did not load correctly -


    वी.एस. 2013 व्यावसायिक - संस्करण 12.0.31101.00 अपडेट 4

    सभी अचानक, जब भी मैं एक परियोजना (एमवीसी प्रोजेक्ट या पायथन प्रोजेक्ट) खोलने की कोशिश करता हूं, तो मुझे मिलता है:

    'प्रदाता पैकेज' पैकेज ठीक से लोड नहीं हुआ था

    समस्या एक कॉन्फ़िगरेशन परिवर्तन या किसी अन्य एक्सटेंशन की स्थापना के कारण हो सकती है। आप फ़ाइल 'सी: \ उपयोगकर्ता \ xxxx \ AppData \ roaming \ Microsoft \ VisualStudio \ 12.0 \ ActivityLog.xml' का परीक्षण करके अधिक जानकारी प्राप्त कर सकते हैं।

    मेरे ऐपडाटा \ रोमिंग में, वहां कोई 12.0 फ़ोल्डर नहीं है! ऐपडाटा \ लोकल में, एक 12.0 फ़ोल्डर है लेकिन इसमें कोई ActivityLog.xml फ़ाइल नहीं है।

    जब मैं संदेश को अनदेखा करता हूं और चलाने के लिए F5 दबाता हूं, बहुत सारी डिस्क आक्रमण के बाद, दृश्य स्टूडियो बस बंद हो जाता है और गायब हो जाता है।

    मैंने कुछ समय की मरम्मत की है और सटीक एक ही व्यवहार रहता है।

    जब मैं devenv.exe / setup या devenv.exe / resetuserdata को चलाने की कोशिश करता हूं, बिल्कुल कुछ भी नहीं होता। कोई त्रुटि नहीं, कोई भी प्रक्रिया शुरू नहीं हुई है, कुछ नहीं। किसी भी पैरामीटर के बिना रनिंग डेवेंव। एक्सईएस वीएस लॉन्च करता है।

    गलत क्या हो सकता है? मैं किसी अन्य समाधान के लिए स्थापना रद्द करने और पुनर्स्थापित करने में संकोच करता हूं।


    1 दिन बाद: विस्थापित किया गया वी.एस. 2013 और फिर से इंस्टॉल किया गया, और उसके बाद अद्यतन 4 लागू किया गया।

    समस्या अभी भी है एमवीसी परियोजना के लिए ही: प्रदाता पैकेज सही तरीके से लोड नहीं हुआ, और जब प्रोजेक्ट वी.एस. चल रहा है तो बंद हो जाता है और गायब हो जाता है।

    ActivityLog.xml में अंतिम रिकॉर्ड कहते हैं:

      & lt; प्रविष्टि & gt; & LT; रिकॉर्ड & gt; 1120 & lt; / रिकॉर्ड & gt; & Lt; समय & gt; 2015/03/17 06: 38: 43.882 & lt; / समय & gt; & LT; प्रकार & gt; त्रुटि & lt; / प्रकार & gt; & LT; स्रोत & gt; VisualStudio & lt; / स्रोत & gt; & Lt; description & gt; एक अपवाद पैकेज के तत्काल होने के दौरान फेंका गया था और पैकेज प्रबंधक [प्रदाता पैकेज] & lt; / description & gt; & LT; GUID & gt; {5F2E5E42-4192-4D79-A0D8-1D881E808829} & lt; / GUID & gt; & Lt; घंटा & gt; 8000ffff - E_UNEXPECTED & lt; / hr & gt; & LT; errorinfo & gt; & lt; / errorinfo & gt; & Lt; / प्रविष्टि & gt;  

    घटक मॉडेल कैश से हटाना

    सी: \ उपयोगकर्ता \ YourUserName \ AppData \ Local \ Microsoft \ VisualStudio \ 14.0 \ ComponentModelCache

    वीएस 2015 के लिए ठीक काम करता है।

    नोट: आपको इस फ़ोल्डर को हटाने से पहले वी.एस. को बंद करना होगा। वीएस 2013

    के लिए फ़ोल्डर पथ में 12.0 के साथ 14.0 को भी बदलें

    javascript - AngularJS - Inherit ngModel in custom directive -


    मेरे पास इस तरह एक कस्टम निर्देश है:

    myText.html:

      & lt; div & gt; & LT; लेबल & gt; {{}} लेबल & lt; / लेबल & gt; & Lt; इनपुट प्रकार = "टेक्स्ट" वर्ग = "फॉर्म-नियंत्रण" & gt; & Lt; / div & gt;  

    जावास्क्रिप्ट:

      app.directive ("myText", फ़ंक्शन () {वापसी {प्रतिबंधित: 'ई', प्रतिस्थापित करें: सही, टेम्पलेटउरेल: " साझा / फ़ॉर्म / myText.html ", गुंजाइश: {लेबल:" @ ",}};});  

    मैं एक इनपुट लपेट करना चाहता हूं और एक विशेषता को लेबल के रूप में संभाल करना चाहता हूं।

    मेरे विचार में मैं इस तरह से निर्देश का उपयोग करता हूं:

      & lt; my-text label = "नाम" एनजी-मॉडल = "person.firstname" & gt; & lt; / my-text & gt;  

    समस्या यह है कि एनजी-मॉडल मेरे इनपुट के लिए मॉडल बाध्यकारी नहीं है।

    इस परिणाम को प्राप्त करने का सही तरीका क्या है? धन्यवाद

    रखो ng- मॉडल इनपुट पर और इसे अलग करने के लिए बाँध लें गुंजाइश।

      & lt; my-text label = नाम मॉडल = person.firstname & gt; & lt; / my-text & gt; & Lt; इनपुट प्रकार = "टेक्स्ट" वर्ग = "फॉर्म-नियंत्रण" एनजी-मॉडल = मॉडल & gt; वापसी {प्रतिबंधित करें: 'ई', प्रतिस्थापित करें: सच, टेम्पलेटउत्तर: "साझा / फ़ॉर्म / myText.html", क्षेत्र: {लेबल: "@", मॉडल: "=",}};  

    scala - Install SBT on Linux -


    I am trying to establish SBT for the development of Scala. I follow the grid in

    Errors are shown as follows

      :: Problem Summary :: :::: Alert Module Not Found: org.scala-sbt # Sbt; 0.13.7 ==== Local: tried /home/nan/.ivy2/local/org.scala-sbt/sbt/0.17.7/ivys/ivy.xml - artifact org.scala-sbt # sbt; 0.13 7! Sbt.jar: /home/nan/.ivy2/local/org.scala-sbt/sbt/0.13.7/jars/sbt.jar ==== Taiterafe-IV-Release: Trying https: // repo. Typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.7/ivys/ivy.xml ==== Maven Central: https://repo1.maven.org/maven2/org/scala Tried -sbt / sbt / 0.13.7 / sbt-0.13.7.pom - artifact org.scala-sbt # sbt; 0.13.7! Sbt.jar: https://repo1.maven.org/maven2/org/scala-sbt/sbt/ 0.13.7/sbt-0.13.7.jar :::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::: :: Unbearable states :: ::::::::::::::::::::::::::::::::::: ::::::::::::::::: :: Org.scala-sbt # sbt; 0.13.7: Not Found :::::::::::::::::::::::::: :::::::::::: 0.13.7 :::::::::: Error: server access error: connection denied url = https: //repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.7/ivys/ Ivy.xml server access error: connection denied url = https: //repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.7/sbt-0.13.7.pom server access error: reject connection Given url = https: //repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.7/sbt-0.13.7.jar :: USE Verbose or Debug Message Level Unsolved Dependency for more information: org .scala-sbt # sbt; 0.13.7: Did not get error during SBT execution: error in retrieving the required libraries (see /home/nan/.sbt/boot/update.log for full log) Error: SBT could not be retrieved 0.13. 7  

    The link can not be used in "" browser too. Is there a solution? As commentator said, it seems that you are currently experiencing a network connection problem.

    However, if you are not using a package manager, then I recommend to use the "sbt-extras" script. IE

      Curl -S https://raw.githubusercontent.com/paulp/sbt-extras/master/sbt \ & gt; ~ / Bin / sbt & amp; Amp; Chmod 0755 ~ / bin / sbt  

    Is there an alternative to pickle - save a dictionary (python) -


    I need to save a dictionary in a dictionary, the dictionary contains strings, integers, and dictionaries.

    I did it myself and it is beautiful and good for the user not .

    I know about pickle but I know that it is not safe to use it, because if the file using file and I (or someone else) And) will replace the file , it may be running and doing some things. It's not safe yet.

    Is there any other function or imported thing that does it?

    Pickles are not safe when transferred by an untrusted third party . Local files are okay, and if some files can change files on the system then you have a different problem.

    That word says that if nothing is in your dictionary, but the string key and value are nothing, but use the JSON through the Python list, number, strings or other dictionaries.


    osx - How to click UI element using JXA -


    Please tell me how do I click in point coordinates in the application window? I am trying to automate my application on UIX 10.10 using JXA technology. In the documentation I found that this is possible by clicking on the event. IX introduces the initial Jaxa and Khachdi language how to call. The code snippet I tried to do in the script editor:

      var app = application ('my_application_path') app.window.click.at ('{100,100}')  < / Pre> 

    Thanks for the help

    You can access an application using the system events application Users can interact with the interface. Here's a script that clicks on some coordinates in Safari:

      // Activate the Safari so that you can click as a user application ("Safari"). Activate () // Access System Events Safari Processing System Systems Avis = Application ("System Events") var Safari = System events. Process ["Safari"] // Call Call Command, click the coordinates [X, Y] Safari. : [300, 100]})  

    If you want to click on a specific button (or other elements of the user interface), then clicking that particular element is more appropriate. For example:

      // Safari.windows [0] Click on the third button of Safari's first window to reduce the .buttons. [2]. Click ()  

    to see how the user can interact with interface elements and how to read the system events scripting dictionary in the Processes suite. To open a dictionary, in the menu bar of the script editor, select Window> Library, then select System Event in the Library window.


    c# - How to receive toast notifications when the application is closed in windows phone 8 -


    I've developed an MVVM window phone application that has toast notification capability in my application's navigation sequence login page -> home page -> message page The message page is where all the notifications will be displayed. When the application stops and when toast notification is received, the message page will be opened and the user will be shown.

    When an application stops and when I click on any one, only the instant message text is displayed to them.

    When I closed the application, and when a user clicks on a toast message, how are all toast messages displayed? If this is not possible, then can I use it so that I can not remember any of those messages?


    Download data to Excel from a web widget in icCube -


    It is possible to add additional information to the table which is downloaded from the ICCW widget to Excel.

    Now, only labels are displayed on columns and rows, including - with the formatted data - of course.

    Is it possible to show that label in the WHERE / SUB QUERY statement? This will give the user user in the context of downloaded data. Pivot table in ICQ,

    Reporting on IcCube 5.1.3 You have to select a button from the Tools / Utilities option and edit it in the Item Wizard tab, edit it, click + and add a new item, "Caption" and "Events Name " Field, now go to edit your icCube objects and events tab, "Do Export to enter the name of the event in its button (" Event Name ") in Excel" field.


    python - string column manipulation in Data Frame in pandas -


    I have string column (time) in a data frame like this, I put underscore between digits and want to remove months

      Time 2 - 3 months 1 - 2 months 10-11 months 4 - 5 months desired product:. 2_3 1_2 10_11 4_5  

    What I'm trying here but does not seem to be working

      DEF Function (string) :. A_new_string = string.replace ('-', '_') a_new_string1 = a_new_string.replace ('-', '_') a_new_string2 = a_new_string1.rstrip ('of the month) a_new_string2  

    Applying the function to frame more data

      DF ['time']. (Func)  

    is an option 3 [code] str To change , call :

     In  [18]: Use df ['time'] = df ['time']. ('-', '_') df ['time'] = df ['time']. Str.replace ('-', '_') df ['time'] = df ['time'] .str.replace ('month', '') df out [18]: time 0 2_3 1 1_2 2 10_11 3 4_5  

    I think your problem (you may specify the result of your apply back:

     ) Are not: [21]: def func (string): a_new_string = string.replace ('-', '_') a_new_string1 = a_new_string.replace ('-.', '_') A_new_string2 = a_new_string1.rstrip ( 'Of the month) return a_new_string2 df [' time '] = df [' time '] apply (function) df outside [21]: time 0_3 2 1 1 2 2 10_11 3 4_5  

    Also one can do one liner:

     in  [25]: Def Maroh (string): .. in place of return string.replace ('-', '_') ('-', '_') rstrip ('of the month) df [' time '] = df [' time '] .apply (func) df out [25]: time 0 2_3 1 1_2 2 10_11 3 4_5  

    angularjs - How to let angular $asyncValidator fire on blur but normal validators on input -


    Is it possible that angular 1.3 $ asyncValidators not only in the form of blurring and user input? I want $ validators to behave according to the default.

    I know that I can use ng-model-options to update the model on bluetooth, but then all assumptions are removed at blurring. / P>

    There is currently no mechanism (angular version 1.3) to do this.

    In the end, I added the Blur Event to set the Valuators to fire and then set the validity

      element.on ('blur', function () {if (ngmodel. Dirty) {doServerSideValidation ();} and {ngModel. $ SetValidity (key, true);}});  

    will do the validity of ngModel after requesting the doServerSideValidation () function.


    DevExpress XAF how to add a control to popup window of an action -


    I am having a very difficult time trying to understand how to do it, what it looks like That's a DevExpress XAF application

    I have come to know how to add a custom action item at the top of a detailed view of a business object. I only need to display a popup window in which a DevExpress Web UI control (ASPxUploadControl, but it There may be some control, even a simple ASPxButton) It is not necessary to be a platform-atheist, only need to work in the web UI app and it can be used in web modules and web pages. The project can be implemented in projects.

    DevExpress documents are none of these parties simple things together, and I can not understand it DevExpress support is not very helpful - to be clear, they tried to help me but so It seems that I can not really get to understand my exact scenario (they point me out on the basis of the document, which seems to be more complicated than what I'm trying to do).

    What else has been done within the DEA Express XAF? Can anyone with DevExpress XAF experience give me some tips to accomplish this?

    The tutorial shows the properties of the popup window note objects in that example An object with a property needs to upload for your file. (Make sure you have added the file attachments module.)

    Create an XPO object (or EF object if you prefer) similar to the one described:

    Now follow, but use resume instead of note .

    Note that resume is marked [nonpersistent] , so it will not be able to save the database, but you can get content in the Execute event (Of course, if you prefer saving the attachment to the database instead, use [DefaultClassOptions] for example).

    One more thing - make sure the popup is opened in editing mode instead of scene mode, otherwise upload it Button will not appear.


    java - Why compiler do not set serialVersionUID automatically? -


    यदि सीरियलाइज़ेबल वर्ग में कोई serialVersionUID परिभाषित नहीं है, तो एक जोखिम है कि (! वही वर्ग के लिए!) जेवीएम जो सीरियलायजेशन करते हैं, वे जेवीएम की तुलना में अलग संस्करण की गणना करेंगे, जो deserialization करते हैं। अनुशंसित समाधान सीरियलवर टूल के साथ संस्करण आईडी की गणना करता है और मैन्युअल रूप से स्रोत कोड में डालता है।

    यह बेवकूफ आईएमएचओ है I यह बेहतर होगा कि javac स्वचालित रूप से धारावाहिक वीर्सयूआईआईडी की गणना करता है और स्रोत कोड में परिभाषित नहीं होने पर बाइटकोड को डाल दिया जाता है।

    क्या संकलन समय में स्वचालित गणना से कोई समस्या है?

    मुझे पता है कि कंपाइलर प्लगिन javac -Xplugin की तरह कुछ है। क्या यह प्लग-इन बनाना संभव है जो स्वतन्त्रकरण करता है? या शायद ऐसा प्लगइन पहले ही बनाया गया है?

    कृपया मुझे गलत डुप्लिकेट न दें। मामले पर चर्चा की जाती है जब सीरियललाइज़ेशन के लिए कक्षाओं के विभिन्न संस्करण संगत हैं। मैं दिलचस्प हूँ एक केस जब एक ही कक्षा से हमेशा सीरियलाइजेशन की अपेक्षा होती है और वर्ग के अलग-अलग संस्करणों को असफल होना चाहिए।

    यदि सीरियलिज़ेबल क्लास में कोई सीरियल वीरियोनयूआईडी परिभाषित नहीं है, तो एक जोखिम होता है (!! उसी क्लास के लिए!) जेवीएम जो सीरियलाइजेशन करते हैं, वे जेवीएम की तुलना में अलग संस्करण की गणना करेंगे जो deserialization करते हैं।

    < पी> एपीएआईके ने निर्दिष्ट किया है कि कैसे डिफ़ॉल्ट सीरियल वर्जन यूआईडी की गणना की जानी चाहिए और हर संगत JVM को यह सही ढंग से लागू करना चाहिए:

    आप लिंक किए गए डॉक्टर में एक वाक्य है: नोट - यह अनुशंसा की जाती है कि सभी सीरिजलाइज करने योग्य वर्ग स्पष्ट रूप से घोषित करें SerialVersionUID मान, क्योंकि डिफ़ॉल्ट सीरियलवर्सियोनयूआईडी गणना क्लास विवरण के प्रति अत्यधिक संवेदनशील है, जो कि संकलक कार्यान्वयन के आधार पर अलग-अलग हो सकती है, और इस तरह deserialization के दौरान अप्रत्याशित सीरियलVersionUID विरोधाभास में परिणाम हो सकता है, जिसके कारण deserialization को विफल हो सकता है। इसलिए यदि 'हर अनुवर्ती जेवीएम को यह सही ढंग से लागू करना चाहिए' तो अनपेक्षित सीरियल वर्जन यूआईडी टकराव नहीं होगा। लेकिन

    नहीं, यह वर्ग विवरण के प्रति अत्यधिक संवेदनशील है जो कि संकलक कार्यान्वयन के आधार पर भिन्न हो सकते हैं , लेकिन किसी दिए गए वर्ग फ़ाइल के लिए वर्ग विवरण इसे संकलित होने के बाद बदलना नहीं है लेकिन अगर आप एक ही जावा फ़ाइल को दो अलग-अलग कंपाइलर के साथ संकलित करते हैं, तो आप एक अलग डिफ़ॉल्ट सीरियल व्हीरियोनयूआईडी के साथ दो क्लास फाइलों के साथ समाप्त हो सकते हैं।

    यह इस संबंध में कुछ भी नहीं बदलेगा यदि कम्पाइलर डिफ़ॉल्ट सीरियल वर्जन यूआईडी को क्लास फ़ाइल में जोड़ देगा।


    ios - Share User Object between App and App Extension in iOS8 -


    I am using and authenticating the user on the app.

    In detail, while I want to use the logged-in user to run ways to call different ending points. The only option for sharing data between the app and its extension is NSUserDefaults as I look at different threads, but NSUserDefaults can not save NSObjects of user logs.

    How can I use the logged in user?

    I am logging in to the user like this ..

      [[PocketAPI shared API] Login with handler: ^ (PocketAPI * API, NSER * error) (If (Error! = Zero) {ns log (@ "user login in");}}];}  

    and I want to use it in detail:

      [[PocketAPI sharedAPI] saveURL: url handler: ^ (Pocket API * API, NS URL * URL, NSER * error) {if (error) {NSLog (@ "There was an error saving the URL:% @", [ Error description]);} other {NSLog (@ "URL was saved successfully");}}];  

    How to dynamically save [PocketAPI sharedAPI] to use any method How can I share the same example of the object?

    Save better user credentials in the keychain For this, it is more secure and you can also reach in detail.

    1. You can use the kSecAttrAccessGroup The bunch can share.
    2. Other options will be to share the shared data or sqlite file in shared data. I have made a sample description that will explain the sharing of data between apps and extensions.

    python - Syntax error in a single line if statement -


    I am new to Python script on Unix. I am trying to create a directory but this leads to error:

      & gt; & Gt; & Gt; Import OS, sys & gt; & Gt; & Gt; Path = "/ u / home / user / survival" & gt; & Gt; & Gt; If not os.path.exists (path): os.mkdir (path) ... print "directory does not exist." File "& lt; stdin & gt;", line 2 print "directory does not exist. ^ Syntax error: invalid syntax & gt; & Gt; & Gt;  

    The error is that you need to exit the secondary prompt . .. Before printing:

      & gt; & Gt; & Gt; If not os.path.exists (path): os.mkdir (path) # Enter one here !!! ... & gt; & Gt; & Gt; The print "directory does not exist. A created directory" does not exist.  

    This is the reason why Python Gods have always started avoiding using a line if condition

      & Gt; & Gt; & Gt; If not use os.path.exists (path): ... os.mkdir (path) # indent here !!! ... & gt; & Gt; & Gt; The print "directory does not exist. A created directory" does not exist.  

    This is another readable way.

    Note : Reading from your code should be a part of print your if block. Please, please use:

      & gt; & Gt; & Gt; If not os.path.exists (path): ... os.mkdir (path) # indent here !!! ... print "directory does not exist. Created one ... ... & gt; & gt; & gt;  

    cocoa - How to render text in a CALayer using NSLayoutManager? -


    मैं त्रिकोणीय का उपयोग कर रहा हूं NSLayoutManager, NSTextStorage & amp; NSTextContainer एक परत बैकड NSView में पाठ प्रस्तुत करने के लिए

    मैं इस धारणा के तहत हूं कि यदि मैं overdate < / कोड> सही लौटने के लिए और इस प्रकार परतों का अधिक पूर्ण रूप से इस्तेमाल किया जा रहा है क्या यह सच है?

    हालांकि, सभी उदाहरणों में मैंने NSLayoutManager का उपयोग करने के बारे में देखा है कि आपको निम्नलिखित कोड को drawRect < / Code>:

      layoutManager.drawGlyphsForGlyphRange (glyphRange, पर पॉइंट: NSMakePoint (0, 0))  

    आप समकक्ष कॉल कैसे करेंगे इसके बजाय updateLayer के भीतर या कुछ अन्य परत-उन्मुख जगह?

    < P> मैंने एक कस्टम CALayer बनाया और ड्रॉ इनकॉन्टेक्स्ट विधि को नीचे दिया गया है:

      ओवरक्राइड फ़नक ड्राइनकॉन्टेक्स्ट (सीटीएक्स: सीजीसीन्टेक्स्ट!) {एनएसजीफ़िक्स कंसटेक्स .saveGraphicsState () var nsgc = NSGraphicsContext (CGContext: ctx, flipped: false) NSGraphicsContext.setCurrentContext (nsgc) NSColor.whiteColor ()। SetFill () NSRectFill (NSMakeRect (0, 0, 84, 24)) lm.drawGlyphsForGlyphRange (glyphRange , परपॉइंट: एनएसएमकेपॉइंट (0, 0)) // टेक्स्ट कंटनीयर का स्थान NSGraphicsContext.restoreGraphicsState ()}  

    यह काम हो गया है, लेकिन

    1. मुझे यकीन नहीं है कि अगर बचत और बहाल करने के लिए कोई निष्पादन प्रभाव है ऊपर के रूप में ग्राफिक्स संदर्भ।
    2. मुझे यकीन है कि एनएसवीयूज़ के updateLayer पद्धति में इसका उपयोग कैसे किया जाएगा, इसका उपयोग करने के लिए कोई संदर्भ नहीं है।

    compilation - Unable to compile Firefox OS -


    Sorry about the ambiguity of the question in the title, but I'm having problems compiling Firefox OS and I do not know where the current address (

    I know that there is a Bugzilla but I'm not sure whether the bug I'm experiencing is a bug or not)

    Actually, I use the source from the latest Firefox OS I am trying to compile. I am trying to create a system that has the language en-GB , en-US and tr ( en-GB supports with) as the default) exported 4.6 VARIANT = user # GAIA l10n GAIA_DEFAULT_LOCALE = "N -

      export = export cc = gcc -4.6 export CXX = G ++: My  .userconfig  thus -GB "export LOCALE_BASEDIR =" $ PWD / places "export LOCALES_FILE =" $ PWD / places / Languages_somekjson "export GAIA_KEYBOARD_LAYOUTS =" N, TR " # Ipakli l10n export Ll0NBASEDIR = $ PWD / lizard-like export MOZ_CHROME_MULTILOCALE = "N -GB TR" export PATH = "$ PATH: $ PWD / comparison sites / scripts" export PYTHONPATH = "$ PWD / comparison sites / lib" The content of  "English (GB)", "N-US": "English (US)", "Try" ":" Türkçe "}   

    compare_locales , and are included in lizard sites clones and locations repository 'N' or 'N-US' is not a repository).

    Now, I'm not 100% sure that the error is where I have tried to do a Google search for any suspicious lines, but nothing has come.

    I posted a full output as one. As far as I can tell it is the first time to compile Firefox or mobile phone OS:

      2015-03-16 16:43:12: stackwalker.cc: 125: Information: Could not load symbols for: | 2015-03-16 16:43:12: basic_code_modules.cc:88: Info: 0x2ab95ac94aa0  

    There is no module (again a lot of 'no module ...' errors After)

    also

      system js: error file: ///opt/src/B2G/gaia/b2g_sdk/34.0a1-2014-08-12-04 -02 -01 / B2G / components / nsHandlerService.js: 120 - NS_ERROR_FAILURE: component failure code returned: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]  

    this error is a fair period of time It is not a duplicate code, but I can not tell whether it is harmless or if it stops the build Used to be.

    There are a few lines about missing translations, but I think they are just harmless. I have tried to cut them as little as possible (by adding missing translations) but the problem persists.

    Oh, and if someone says I was walking with my phone, and it appears on ADB devices . I have also tried to remove the outside and backup-inari directories.

    System specs, PC:

    • Debian Sides, mostly up-to-date, but with the older version of creating Build new version from build 3.8)
    • GCC 4.6 and 4.9 Export CC = GCC-4.6 set .userconfig
    • G + 4.6 and 4.9 Export> CSGE = G ++ - 4.6 set .userconfig

    Phone:

    • The original ZTE open . It originally came with FFOS 1.0, but since then I have been upgraded to 1.1.


    sql - special characters oracle -


    See that I put a special character "μ" in my table on the Oracle database:

      Insert in ABBVV (ABBVV, Definition) values ​​('migration', 'microgram (10 grams of one gram, 10-6 grams)'); Include in abbrev (abrev, definition) values ​​('μmole', 'micromole');  

    When I select the data that I get:

      SQL & gt; * Select from ABBEV where definition like '% Micro%'; Abrevé Definition -------------------------------------------------- -------------------------------------------------- ------------ Omi other micro organisms ¿μg microgram (10 grams of one gram, 10-6 grams) ¿μmole micromole SQL & gt;  

    Why do I get "¿" before "μ" and how to save it in the included statement?

      Oracle Database 11g Enterprise Edition Release 11.1.0.6. 0 For a proper solution, you must set your  NLS_LANG  Environment variable according to your local codepage  

    It looks like:

      C: \ & gt; CCP Active Code Page: 850C: \ & gt; Set NLS_LANG = .we 8pc 850c: \ & gt; Scllips .. SQL & gt; Include in abbrev (abrev, definition) values ​​('μmole', 'micromole'); 1 row created sql & gt;  

    Another solution to use the function UNISTR :

      ABBVV (ABBREV, definition) values ​​(INIST ('00B5mole') , 'Micromole');  

    opencv - Comparing feature descriptors of large set of images -


    I have a set of thousands of images, and for each image I have drawn a set of SIFT feature descriptor (current Is binding in 200 per picture).

    I need to create a whole graph of the distance between each picture. I.e., I need to work through every metric through every metric, through every second image of the distance.

    So far, I have tried to use FLANN to calculate 20 neighboring descriptors between two nodes, and then the average distance between all calculations matched, unfortunately, this process is executed It's taking too much time to do.

    Is there any way to compare these images more efficiently to the detail?

    You can use your SIFT decoder by the Think-Vis-Visual Word (BV) or locally consolidated descriptor ( VLAD) can be considered for collecting in vector. Originally:

    1 - Calculate a textbook (K SIFT descriptor) such as - K-Earth

    2 - For each image, remove the SIF descriptor, then each See the closest neighbor in the codebook, so calculate the histogram of the image shift according to the codebook. This is the easiest way (hard coding, even pooling), but there are alternatives (and often give better results for computer vision problems) <3> - Therefore, the size of each image is shown with a unique peculiar K histogram) . After this, you can calculate the distance between the images between the histogram (example Euclidean).


    python - imp.load_source another file than .py , but a .py also exist in that directory -


    मेरे पास यह सेटअप है:

    फ़ाइल: a.ext1 a.py

    A.ext1 किसी कारण के लिए a.py को लोड करता है, लेकिन एक इंजन के रूप में मुझे फ़ाइल a.ext1 लोड करने की आवश्यकता है।

    मैं इसे py3 में ठीक काम कर सकता हूं, लेकिन मैं इसे पी 2 में काम नहीं कर सकता।

    यहां मेरा अजगर 2 प्रयास है: ** यह मुख्य प्रवाह है, निश्चित रूप से इसके चारों ओर अधिक कोड।

      फ़ाइल = os.path.abspath (os.path.expanduser ('a.ext1') निर्देशिका = os.path.dirname (फ़ाइल) sys.path.append (निर्देशिका) fullname = 'My.name.space.a' sys.modules ['my.name.space'] = imp.new_module ('my.name.space') x = imp.load_source (पूर्णनाम, फ़ाइल)   

    अब, यदि मैं करता हूं; x, यह मुझे बताएगा:

      मॉड्यूल 'my.name.space' से '& gt; पथ & gt; /a.ext1'  

    लेकिन अगर मैं dir (x) करता हूँ, तो यह मुझे a.py से सामान देता है। मैं इसे मुझे a.ext1 फ़ाइल से सामान देना चाहता हूं।

    कैसे कर सकते हैं मैं इसे py2 पर काम कर रहा हूं?

    यहां पीए 3 पर यह काम करता है:

      file = os.path.abspath (os.path.expanduser ('a.ext1 ')) निर्देशिका = os.path.dirname (फ़ाइल) sys.path.append (निर्देशिका) fullname =' my.name.space.a 'लोडर = importlib.machinery.SourceFileLoader (fullname = fullname, path = file) x = Loader.load_module ()  

    अब एक्स बिल्कुल वही है जो मैं चाहता हूँ, a.ext1 फ़ाइल, और नहीं .पी

    कोई भी विचार है कि मैं कैसे Py2 के लिए यह काम करना है?

    (बीटीडब्लू मैंने पढ़ा है सब मैं इस विषय पर स्टैक ओवरफ्लो पर मिल सकता है, लेकिन यह ऐसा कभी नहीं था जहां एक .पी भी अस्तित्व में था)

    रिक्त मॉड्यूल और ऐपिंग पथ बनाने के साथ मोंबो जंबो के बारे में पता नहीं, लेकिन 2.7 पर मेरे लिए यह बिल्कुल ठीक काम करता है। निश्चित रूप से एक सरल स्टैंडअलोन उदाहरण के साथ कोई समस्या नहीं होनी चाहिए।

    मैं कह सकता हूं कि आपका a.py my.name.space.a में लोड किया जा रहा है के रूप में भी, कार्यक्रम में कहीं और, उस स्थिति में यह सामग्री संघर्ष जो भी आप एक ही मॉड्यूल नाम के अंतर्गत लोड करते हैं केवल एक ही समय में एक दिए गए नाम के एक एकल वैश्विक मॉड्यूल उदाहरण हो सकते हैं, जैसे:

    a.py:

      py_stuff = 1  

    a.ext1

      ext1_stuff = 1  

    test-ok.py:

    <पूर्व> आयात छोटा सा भूत = Imp.load_source ('a', 'a.ext1') प्रिंट (x) # & lt; मॉड्यूल 'ए' से 'a.ext1' & gt; प्रिंट (डायर (x)) # ['__builtins__', ..., 'ext1_stuff']

    test-not-ok.py:

      आयात आयात आयात कुल्हाड़ी = imp.load_source ('a', 'a.ext1') प्रिंट (x) # & lt; मॉड्यूल 'ए' से 'a.ext1' & gt; प्रिंट (डायर (एक्स)) # ['__बिल्टिन्स__', ..., 'ext1_stuff', 'py_stuff']  

    doxygen - group hierarchy - automaticly add to base group? -


    आप doxygen में एक समूह पदानुक्रम बना सकते हैं:

      / *! * \ Defgroup बेस * / / *! *  

    इसे

    • बेस
      • के रूप में दिखाया जाएगा < अब अगर मैं एक उपसमूह \ ingroup सब 1 में कुछ जोड़ता हूं तो < इसे उपसमूह में जोड़ दिया जाता है मैं इसे मैन्युअल रूप से किए बिना भी Base में कैसे जोड़ सकता हूं?


    ios - Query users by name or email address using Firebase (Swift) -


    Firebase and Swift and I 'd come to inquire if there is some problem. So basically there are two things I want to do:

    1. Ask questions from my users and search only for a certain string in their name (or email address) And add them to an array.
    2. Find all your users and add them to an array.

    The relevant portion of my data for this query looks like this: here image details enter

    as you can see, I am using Saidlagin of Fayrbej (Later I also want to add Facebook) and I can store its users by UID I am here.

    One part of my rule file looks like this:

      "registered_users": {".read": True, ".write": True, " .indexOn ": [" name "]}  

    So everyone should read and write access to this should have been part of my data.

    I've read part of "recovery data" Fayrbej iOS guide on its website and in accordance with the Guide, the user name and must work my address to receive e-mail address at least I think so but it is not here is my code:

      getUsersFromFirebase function () {go registeredUserRef = firebaseRef.childByAppendingPath ( "registered_users") registeredUserRef.queryOrderedByChild ( "name") observeSingleEventOfType (.Value, withBlock : {Snapshot in? If known as email = snapshot.value ["email"] String {println ( "\ (snapshot.key) Email: \ (email)")} If the name = snapshot.value [ "name"] as string? {Println ( "\ (snapshot.key) name : \ (name) ")}})}  

    I saw that firebase guides, they always utilize ChildAdded and value, but value for me makes more sense is. Output is nothing but the output and the child's output is only one user, i.e. which is currently logged.

    So my questions are:

    1. Do I do it with my existing data structure or do I have to get rid of the story by the UID users?
    2. If yes, how do I have to change my code to do this work?
    3. If not, what would be the best way to store your users and possibly name inquiries?
    4. How can I query for example "hardworking" and only user get simple login: 1 (Max Masterman)?

    I hope my description is detailed enough to help you thx in advance.

    Supplement :

    The weird thing is, that says "Guide to recover" data, it is possible that data from the query and sorting height.

    Data:

    Enter image details here

    Inquiry code: Enter image details here

    And do not do that at all What i want to do

    I have participated in situations where I wanted to draw data from child nodes.

    They are like a light duty query.

    Secondly, if you want to query, you have to adjust your data, because one query is only one level depth (can not actually query data in child notes) < / P>

    Lastly - if you do not want to scale your data, a conceptual choice to answer your question;

    1. If possible, ObserveSingleEventOfType: FEventTypeValue on registered user node. All of the users registered as this snapshot will be read.
    2. Repeat the snapshot and read each user (as dictionary objects) in an array
    3. Then use NSPredicate to remove an array of users that you want.

    I have run according to many tests and demonstrations, unless you have thousands of users.

    Hope that helps!


    Reading multiple inputs in python -


    अजगर में एक जगह से अलग 3 इनपुट कैसे लें, scanf के बराबर ("% d% d% d ", & Amp; a, & amp; बी, & amp; एन); में सी।

      a, b, n = नक्शा (int, इनपुट ('तीन मान दर्ज करें:') .split ())  

    उदाहरण

      तीन मान दर्ज करें: 3 5 6 & gt; & gt; & gt; एक 3 & gt; & gt; & gt; बी 5 & gt; & gt; & gt; N 6  

    यह समाधान पायथन 3.x में है, जो कि इनपुट को raw_input के साथ बदलता है।

    / div>

    javascript - Chrome print blank page -


    I have an old javascript code to print pictures, if a user clicks the thumbnail it just works fine There was an empty page in the preview, but recently (only in Chrome!).

    Here's a demonstration in Jsbins: Click on the printer icon Now try it in Firefox; It will work as expected.

    Chrome: 41.0.2272.89 m

    Firefox: 30.0, 36.0.1

      New Window (source) function {win = Window.open ( "", "", "Width = 600, height = 600"); Var doc = win.document; // init head var head = doc.getElementsByTagName ("head") [0]; // title vs title = doc.createElement ("title"); Title.text = "hair window"; Head.appendChild (title); // scripts var code = "function print function () {window.focus (); window.print ();}"; Var script = doc.createElement ("script"); Script.text = code; Script.type = "text / javascript"; Head.appendChild (script); // init body var body = doc.body; // image doc.write ('& lt; img src = "' + src + '" width = "300">'); // Chrome if (Navigator.UzGent.LolverCase). Indexoff ('chrome') & gt; -1) {win.printFunction (); } And {win.document.close (); Win.focus (); Win.print (); Win.close (); }}  

    It looks like this & lt; Img & gt; before trying to print; has been loaded, opens the link as a data URI and calls to print within an event handler for the event load window Move, Em> or Blocks , for example

      var code = '\ & lt; Html & gt; \ & Lt; Head & gt; \ & Lt; Title & gt; & Lt; / Title & gt; \ & Lt; Script & gt; \ Function print function () {\ window.focus (); \ Window.print (); \ Window.close (); \} \ Window.addEventListener (\ 'load \', printfunction); \ & Lt; / Script & gt; \ & Lt; / Head & gt; \ & Lt; Body & gt; & Lt; Img src = "'+ src +'" width = "300" & gt; & Lt; / Body & gt; \ & Lt; / Html & gt; '; Window.open ('data: text / html,' + code, '_blank', 'width = 600, height = 600');  

    Do not forget code

    P> You might on for ; Img & gt; , but if you ever do anything more complex than triggering to print an image you can find it again in the future.

      Doc.write ('& lt; img onload = "printFunction ();" src = "' + src + '" width = "300">);  

    Where printfunction is the print function for all browsers


    System.Data.OleDb.OleDbException: Not a valid password. in MS Access database ASP.NET/C# Web app -



    I'm stucked within a brain-crunching problem. Developed an ASP.NET / C # web app with MS Access 2007 database. DB is in the same server (Windows Server 2008 R2), which I developed the app. It has a simple gridview to show search results when it runs on a local host then it works perfectly and is not giving any error. When it is deployed on the server in IIS, it starts giving the following error while searching the gridview.

      Server error '/' No valid passwords in the application Description: An uncontrolled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where the code originated from it. Exception Description: System.Data.OleDb.OleDbException: Not a valid password. Source error: An unrestricted exception was encountered during the execution of the current web request. The information about the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [Oledboksepshn (0x80040e4d): Not a valid password.] Sistmkdetakoldibikoledibiconveninanlkkclatr (Oledibikyunekshn string Contret, Oledbokvekshn connection) +337 Sistmkdetakoldibi. Olebey BB Connection Factine Create Connection (DBCNation Option Objects, Object Pool GroupProvirInfo, DbConnectionPool Pool, DbConnection Proprietary Object) +86 System.Data. Provider Base.DbConnectionFactory.CreateNonPooledConnection (DbConnection Proprietary Connection, DbConnectionPoolGroup Pool Group) +31 System.Data.ProviderBase.DbConnectionFactory.GetConnection (DbConnection OwningConnection) +76 System.Data.ProviderBase.DbConnectionClosed.OpenConnection (DBcnection External Connection, DBC Connection Factory Connection Factor ) +126 System.Data.Oldibi Olendi Connection Open () +43 System.Data. Communication. Dibeedataadaptrkfilinanl (DataSet dataset, Datatebl [] Detaatbl, Introstraks Artikord, Intros Maksrekshns string Shertebl, IDB Command command, Kmmandbavyr behavior) +123 Sistmkdetaksng. Dibeedeta Adaptrkfil (Detas et datasets Int32 startRecord, Int32 maxRecords, string srcTable, IDbCommand order, CommandBehavior behavior) 319 System.Data.Common.DbDataAdapter.Fill (datasets datasets string srcTable) +92 System.Web.UI.WebControls.SqlDataSourceView .ExecuteSelect (DatasourceActorgement Arguments) +1618 System. Web.u.data Sourceviewview Select (Datasource Integrated Aggregates Arguments, Datasource SoftwareClock Callback) +21 Systems Web. UI. WebControl.DataBound Control. Performance Selection () +143System. Web. UI. Vebkantrolkbibesdatabaund control Kdetaind (74 System.Web.UI.WebControls.GridView.DataBind (4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound ())) +66 System.Web.UI.WebControls.GridView.OnPreRender ( EventArgs e) +26 System.Web.UI.Control.PreRenderRecursiveInternal (103 System.Web.UI.Control.PreRenderRecursiveInternal () 175 System.Web.UI.Control.PreRenderRecursiveInternal ()) 175 System.Web.UI.Control.PreRenderRecursiveInternal () +175 system Web. UI. Control Prerender Riskivi I nternal () 175 System.Web.UI.Page.ProcessRequestMain (Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 2496 is causing the error, while it runs on localhost  

    Try for 3 days and try a lot of solutions on the internet, but there is no progress PLS help.

    "itemprop =" lesson ">

    This related issue.You must update the web.config identity tag with valid username. / Password or change Group Policy. Please see the links below for more details.

    More useful.


    c - reader-writer :how could this code lead to deadlock -


      शून्य एक्स () {ताला (& amp; m); जबकि (एक्स || वाई) रुको (एंड फार्पर, एंड एम); X ++; (मी & amp) अनलॉक; // डू एक्स सामान लॉक (& amp; m); एक्स --; प्रसारण (& amp; farpar); (मी & amp) अनलॉक; } डबल वाई () (लॉक (एंड एम); जबकि (x) रुको (और थर्पर, & amp; m); वाई ++; (मी & amp) अनलॉक; // डू वाई सामान लॉक (& amp; m); वाई -; प्रसारण (& amp; farpar); (मी & amp) अनलॉक; }  

    उपरोक्त कोड में, m एक म्यूट एक्स है, और फ़ॉर्पर हालत चर है मुझे बताया गया है कि यह गतिरोध की स्थिति पैदा कर सकता है, लेकिन मुझे नहीं पता कि यह कैसे हो सकता है। बीटीडब्लू, एक्स लेखक, वाई रीडर

    <पी > आप मानसिक रूप से कार्यक्रम को आसानी से चला सकते हैं:

    • ताला m
    • एक्स लूप करते समय रहता है, y के लिए वाई
    • Y द्वारा लॉन्च करना m लेकिन म्यूट एक्स पहले से ही X
    • वाई के द्वारा स्वामित्व में है y
    • एक्स हमेशा के लिए लूप

    Calling activity intent in Fragment in Android -


    I'm trying to call an activity class from one segment. I have implemented the OnClickListener and this is also the method.

      if (v.getId () == sortbutton.getId ()) {// callSorting (); Intent = intent (getActivity (), EMB_SortList.class); // startActivityForResult (intent, REQUEST_CODE_LEVEL); StartActivity; }  

    Here is my java file:

      Public class ListViewFragment extends the fragment fragmented OnClickListener {@Override Public View onCreateView (LayoutInflater Inflator, ViewGroup Container, Bundle SavedInstanceState) {If (rootView! = Null) {ViewGroup parent = (ViewGroup) rootView.getParent (); If (parent! = Null) parent.removeView (Routeview); } Try {RootView = inflater.inflate (R.layout.list, Container, False); } Catch (InflateException e) {} sortbutton = (TextView) rootView.findViewById (R.id.sortText); Sortbutton.setOnClickListener (this); Return root view; } @ Override Crate on Public Zero (Bundle Saved Instantstate) {Super.Nought (Saved Instantstate); }  

    But I'm getting a strange error

      03-16 19:40: 20.620: E / Android Random (1346): Quite Exception: Main 03-16 19: 40: 20.620: E / Android Random (1346): Android. SuperNotCalledException: Activity {com.ylg.Link/com.ylg.Link.SortList} did not call via super.onCreate () 03-16 19:40: 20.620: E / AndroidRuntime (1346): android.app.ActivityThread On .performLaunchActivity (ActivityThread.java June259) 03-16 19:40: 20.620: E / AndroidRuntime (1346): android.app.ActivityThread.handleLaunchActivity (ActivityThread.java jun349) on 03-16 19:40: 20.620: E / AndroidRuntime (1346): 40 :: 20.620: E / AndroidRuntime (1346): android.app.ActivityThread.access $ 700 (ActivityThread.java:159) on 03-16 19 android.app.ActivityThread $ H.handleMessage (ActivityThread .java: 1316) 03-16 19: 40: 20.620: E / Android Time (1346): Android.OS. Handler Dispose Message (Handler. Java: 99) 03-16-19: 40: 20.620: E / Android Time (1346): Android.OS Looper Oops (Looper.java:176) 03-16 19: 40: 20.620: E / Android Time (1346): yThread.main (ActivityThread.java:5419) on Android.app.activate 03-16 19:40: 20.620: E / AndroidRuntime (1346): java.lang.reflect.Method.invokeNative (Native Method) on 03-16 19: 40: 20.620: E / AndroidRuntime (1346): at java.lang.reflect.Method.invoke (method. Java 2525) 03-16 19:40: 20.620: E / Android time (1346): MethodandArgsCaller.run at com.android.internal.os.zygoteInit $ (ZygoteInit.java:1046) 03-16 19:40: 20.620: E / AndroidRuntime (1346): com.android.internal.os.ZygoteInit.main (ZygoteInit.java:862) on 03-16 19:40: 20.620: E / Android Random (1346): Dalvik.system.NativeStart.main (Basic method)  

    I'm not sure that What's wrong? Can somebody help me out?

    Thank you!

    It is clear that this class

      EMB_SortList.class  

    You have to quench it by checking

      @ override crate on public null (bundle saved instanestate) {super.naught (savedinstenstate); }  

    In fact, you need to change it with one of our answers and make sure that you are expanding the activity.

    ---------- -----------> God thinks that you put this code in your pieces.

    Override public null on @Create (bundle saved instenstate) {super.onCreate (SavedInstanceState); }

    If you needed to remove it

    This code does not go into your piece, it goes into the activity that you want to create.


    pointers - Python edit modify dict values by reference -


    I am creating an application with a Python 3 and PyQt5 where I have to generate tree view with any word. The preview will contain the data items in which the rows are created which are made from the dot value and the key pair. Value should be editable in the UI Now, it was easy enough to generate items from Dict with code:

      def createTreeFromDict (self, data, guardian, top = false): ifinstance (data, dict): key Value in Value.items (): If isinstance (value, dict): node = tree ([key, ""] parent) parent.appendChild (node) self.createTreeFromDict (value, node) elif isinstance (value) , List): Node = treeItem ([key, ""] parent) parent.appendChild (node) self.createTreeFromDict (value, node) Other: print (key) print (value) node = TreeItem ([key, value ], Parent) Parent.appendChild (node) ifinstance (data, list): indicator Value for calculation (data): If isinstance (value, dict): node = triitum ([index + 1, ""], parent) parent.appendChild (node) self (image, value, list) : Node = treeitem ([index 1, ""], parent) parent.appendChild (node) self.createTreeFromDict (value, node) Other: node = tree (["juttu", value], parent) parent.appendChild (Node) if top: self.layoutChanged.emit ()  

    However, I am thinking that how should I basically pair it multilayer dictionary so that the user stops the value of an item Per can, it changes the value of the original term problem could that be hair Daikts and lists dict, so I could not keep the keys of the items with reference to the original dict.

    I think I can do a frequent search through the original dictionary to find the right dick key-value pair, but first I would like to know the following would be possible:

    < P> When I'm making items in the code at the top, you can see how I pass the new TreeItem key and value: node = TreeItem ([key, value], parent)

    This reference contains a reference / no for this specific key-value pair in the original dictionary Etk also possible to pass? So if I edit the value of the reference, will it update the value in the original word? Or in other words how can I pass ["mykey"] as a "cowboy", which is in reference to the original thing?


    javascript - Comparring Arrays with For Loops -


    OK, so I'm working on it for a while. I am comparing the values ​​of two arrays using for loop. Every time the array known as a cart hits the number that can be found in the product array, it displays the information of the product array, every time it hits, I think my code is okay. (Although I may be wrong), but it is not displaying the values, so I think there is something wrong with the execution of the process there. Enter the code

      as follows () {var txt = "" var products = new Array (); Products [0] = {Name: "refrigerator", Price: 88.99, IMG: "IMG / refrigerator. JPG"}; Products [1] = {Name: "Microwave Oven", Price: 76.99, IMG: "IMG / Microwave. JPG"}; Products [2] = {Name: "Dishwasher", Price: 276.67, IMG: "IMG / Dishwasher. JPG"}; Var cart = new array (); Cart [0] = 2; Cart [1] = 0; Cart [2] = 1; Cart [3] = 1; Cart [4] = 0; Cart [5] = 1; Cart [6] = 2; Cart [7] = 2; For (var i = 0; i & lt; carts.length; i ++) {for (var j = 0; j & lt; products.length; j ++) {if (cart [i] == j ) {Txt + = products [J] .name + '' + products [j] .price + "img src = '" + products [j] .img + "'> & gt; Document.getElementById ("answer"). InnerHTML + txt}}}  

    You You should compare j with the cart [i] otherwise you will not get anything

     for  (var i = 0; i & lt; Carts.length; i ++) {for (var j = 0; j & lt; products.length; j ++) {if (cart [i] == j) {txt = products [j] name + '' + Products [J.] .price + "& lt; img src = '" + products [J] .img + "' & gt;" Document.getElementById ("answer"). InnerHTML + txt}}}  

    Your txt variable should be modified with = and no + = < / Code>

    You should customize your code document.getElementById ("Answer") for example can be started globally.


    javascript - Java Selenium 2.0 - handle z-index (navi) when using builtin scroll before WebElement .click() -


    Selenium 2.0. Click () with automatic scrolling until the element is not visible and it is allowed to click on:

      WebAngel box = driver.fix element (BID (box idid) ); Box.click ();  

    It usually works fine, Selenium will scroll until the box appears and then clicks ().

    Anyway it org.openqa selenium. WebDriver Exposure If an element containing high z-index is present. This scrolls the element, but due to the low Z-index it is not visible. In my case, a navigation bar at the top of the page.

    I thought of solving it at the top of the page with the javascript scroll, so the element would appear at the bottom of the page, but this can not be the best (or even a good) solution. .

      JavaScript Expert JS = (JavaScript Extractor) driver; // Scroll to Top will make the box on the bottom of the page jse.executeScript ("scroll (0, -10000);");  

    Is there a great way to handle it through a whole test suite without a hack like Javascript scroll?

      string scripts = string Format ("$ ('. Item-Container'). ScrollTo ($ ('Li #% s'))", currentId);  

    To run your script with this script, you must have CSS or Xpath


    java - convert bitmap to 1bit bitmap -


    I am trying to print the Russian text on the printer, but it is not supported, so I replaced the image with the text Decided to print. Here's how to create an image with text:

      public bitmap textAsBitmap {paint color = new paint () (string text, textSize, integer textcolor floats); Paint.setTextSize (textSize); Paint.setColor (textcolor); Paint.setAntiAlias ​​(right); Paint.setTypeface (Typeface.SANS_SERIF); Paint.setTextAlign (Paint.Align.LEFT); // Intensity width = (int) (paint. Major text (text) + 0.5 F); // round full width = 200; // round float baseline = (int) (-paint.cent (+ 0.5F); // acent () is negative / intensity = (int) (baseline + paint. Descent (+ 0.5f); intensity height = 60; Log.e ("height", height + ""); Log.e ("width", width + ""); bitmap image = bitmap.centbitmap (width, 2 * height, bitmap config.argb_8888); Canvas canvas = new canvas (canvas.drawColor (Color.WHITE); canvas left text (text, 0, baseline, paint); base + = 20; canvas left text (text, 0, baseline, paint); returnV;}  

    This works fine but the problem is that Chinese printers are printing only 1 bit bitmap. That's why I have a method of converting this image to 1 bit bitmap I tried the solution but I found: Enter image details here

    But this image is bad (

    No solution found I answered myself, see below

    It is a miracle people, I got it working. After bitma crating [I changed it to 32bpp so the last bit

      Paint color = each set to pixel or white (depending on the new paint); Paint.setTextSize (textSize); Paint.setColor (textcolor); Paint.setTextAlign (Paint.Align.LEFT); Paint.setTypeface (Typeface.MONOSPACE); Integer width = (int) (paint.measureText (text) + 0.5f); // round name baseline = (int) (-paint.ascent () + 0.5f); // climb + 0.5f) () negative integer height = (int) (baseline + paint.descent); bitmap image = bitmap.createbitmap (width, height, bitmap.config.ARGB_8888); canvas canvas = new canvas ( Image); canvas.drawColor (Color.WHITE); canvas.drawText (text, 0, baseline, paint); bitmap BMPMonochrome = bitmap.creditbetaMap (width, height, bitmap.sf. ARGB_8888); canvas canvas1 = new canvas ( BMPMonocrome); color matrix = new color matrix (); ma.setSaturation (0); paint paint 1 = new paint (); Paint.setColorFilter (new ColorMatrixColorFilter (ma); Canvas1.drawBitmap (Image, 0, 0, Paint 1); Int width2 = bmpMonochrome.getWidth (); Int height2 = bmpMonochrome.getHeight (); Int [] Pixel = New int [width 2 * height 2]; BmpMonochrome.getPixels (pixels, 0, width 2, 0, 0, width 2, height 2); // for altitude (intestine y = 0; y and lt; height2; y ++) on intrate {int Offset = y * height2; // Width (int x = 0; x & lt; width 2; x ++) for greater than intensity {int pixel = bmpMonochrome.getPixel (x, y); intcombied = pixels & amp; ; 0xff; If (lowest bit & lt; 128) bmpMonochrome.setPixel (X, Y, Color. Black); And BMPMonochrome.SetPixel (X, Y, Color. WHITE); }}  

    thanks


    c++ - Visual studio 2013 platform toolset v120 performance is slower then when set to v100 -


    We recently switched from Visual Studio 2010 to Visual Studio 2013, we are running a mathematical algorithm after a few measurements, It seems that the fast toolset = platform toolset = v100 (in Visual 2013) time running 7-15% V120 , does anyone know about it, we expected that v120 will not be reality and slow?

    Enter image details here


    shell - How to get the data from a ShellLink even when the Link Target does not exist anymore? -


    In Delphi XE7, I want to use the following code to change the link target of a shell link file (.lnk),

    < P> Even if the link target is not present:

      uses JclShell; ... process ShellLinkReplaceLinkTarget (Const. AShellLinkFile, ANewTarget: string); Var This Shihal Link: Jensey Shell link; Start (JclShell.ShellLinkResolve (AShellLinkFile, ThisShellLink, SLR_ANY_MATCH or SLR_NO_UI) = S_OK) then start this link. Goal: = ANETarget; JclShell.ShellLinkCreate (This Shell Link, AShellLinkFile); And Seedite End ('shell link revolve fail!'); End; Obviously, it is not possible to get the link from the link code with the  ShellLinkResolve , when the link target no longer exists, as explained by Dawood, please. 

    So how can I get the data from the link file in this case?

    Why do not you want to use very simple code like this:

    < Pre> process ShellLinkReplaceLinkTarget (CONST ASHEL LINKFile, ANEETTAG: UnicodeString); Var Shell Link: ISL Links; PersistFile: iPhones File; OleCheck (CoCreateInstance (CLSID_Shell Link, Zero, CLSCTX_INPROC_SERVER, IShellLinkW, ShellLink)); Try OLECheck (ShellLink.QInterface (iPharfsFile, Persistfile); Try OderCheck (ShellLink.SetIDList (Zero)); OleCheck (ShellLink.SetPath (PWideChar (ANewTarget) Finally, the persist file: = zero; finished; shell link at the end: = zero; finished; end;

    And there is a very important description in some lnk files, such as various properties Background color (in Windows 8) and if you want to recreate the lnk file properties will be lost.


    Css attribute not changing (javascript) -


    I am trying to create a piece of code that will change the content of my webpage by clicking on the link. It hides the div now and alters it with any other.

    This is html:

      & lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" id = "Overview_button" & gt; Overview & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "javascript: changecontent ('background');" & Gt; Background & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" id = "box_button" & gt; Boxes & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" id = "color" & gt; Color & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" id = "navigation_button" & gt; Navigation and lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" id = "posing_button" & gt; Positioning & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" id = "text_button" & gt; Text & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Conclusion & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;  

    The function is only applied to another element, because I'm testing it on it. The ID refers to a div later in the 'background' text.

    Javascript is:

      var currentContent = 'observation'; Function TransformationNews (New Resource) {document.getElementById (Current Resource) .style.display = "none"; Document.getElementByID (newContent) .style.display = "block"; CurrentContent = newContent; };  

    It successfully hides old content, but does not show new ones.

    should be document.getElementByID

      document.getElementById  

    Anyway, you should check the errors in your console before posting such questions.


    how to include php variable in mysqli statement -


    My question is how to include the $ value in the MySQL statement, for example

     < Code> $ value = "1" $ sql = "Enter the table (value 1) value ('value_');  

    I want to add $ value after Value_. Is it possible? If possible, can you show me that please? Thanks a lot ...

    < P> Sure, you wrap the variable name with curly braces:

      $ sql = "table (value 1) values Insert ('value_ {$ value}');  

    But at this level of learning you should learn and should be used for PDO statement to avoid the risk of mysql injection.


    database - Is there any datatype that can store data more than 2 gb in sql server -


    I need to store more than 2 gigabytes of data in columns. Is there a way I can ? I need the data that I store, should not be in the computer, as a result when using the file stream concept

    No is not there. NVRAR (max) is a datatype which can be used to store 2 GB of data in a column. But you can not store more data than 2 GB in its data, so that the datatype has the upper limit.

    On one side, note that due to you storing such a large amount of data in the column, there may be a lot more to it than on the display and can not be a worthy thing to move forward with it. I'm sure you can find the options.

    Potential options may be to split the data and store it in multiple rows. As has been commented by Malden Prasadik, you can use to store more than 2GB of data.


    mysql - CSV vs databse? -


    I have read some CSV vs database debates and in many cases people have recommended DB solution on CSV. Although this has never happened to me a single setup.

    So here's the setup - Approximately 50 CSV files representing approximately 50 hostels per hour are from 20 to 100 counters per display group - I have several predefined reports (like some counter and nodes Need to extract data to create a daily) - It should be relatively static - based on variable date duration, host, counter - I need to add data if needed Need to find (in total of 50 files) about 100 MB per day - possible

    possible solution?

    1) Keep it in CSV - To create a master CSV file for each display group and simply attach the latest CSV file every hour. Shell command (grep, sed, cut, awk)

    2) Load it into database (like MySQL) - To create display tables to mirror display groups and load those CSV files in the table. To generate your report using SQL query

    When I tried to simulate and used only shell commands on CSV files and it was very fast I worry that database queries will be slowed ( On the amount of data Four) I also know that the database does not like too much tables - in my scenario I will need 100+ columns in some cases, it will only be read for most of the time (only adding new files) I would like to keep data for the year so that it is about 36 GB. Database solution is still fine performance (1-2 core VM, 2-4 GB memory expected) I did not simulate database solution, so I want to ask you if you have any view / experience of similar scenario.

    Thanks


    c# - Get Two List from single list based on partial match -


    I've got a list of strings like this.

      MainItem.Item1.AssetID_0 MainItem .Item1.AssetID_1 MainItem.Item1.AssetID_2 MainItem.Item1.AssetID_3 MainItem.Item1.AssetID_4 MainItem.Item1.AssetID_5 MainItem.Item2.AssetID_1 MainItem.Item2.AssetID_2 MainItem.Item2.AssetID_3 MainItem.Item2.AssetID_4 MainItem.Item2.AssetID_5  

    two separate lists of me this list should based on different "MainItem.Item". Will answer

      MainItem.Item1.AssetID_0 MainItem.Item1.AssetID_1 MainItem.Item1.AssetID_2 MainItem.Item1.AssetID_3 MainItem.Item1.AssetID_4 MainItem.Item1.AssetID_5  

    and

      MainItem.Item2.AssetID_1 MainItem.Item2.AssetID_2 MainItem.Item2.AssetID_3 MainItem.Item2.AssetID_4 MainItem.Item2.AssetID_5  

    This is what I have tried so far. But it is not returning the desired output

      var resultsLists = mainList.Select (GetPathFromKey). Undoubtedly (); Public static string [] Splitkey (string keyfroiding) {Return keyfroiding. Split ('.'); } Public Stabilized String GetPathFromKey (string keyfroiding) {string [] splittedStrings = Splitkey (keyFromReading); Return string.joint (".", Split strings [0], split strings [1]); }  

    You can use ....

      From the list & lt; String & gt; & Lt; allLists = wire .Select (str = & gt; new {str, token = str.Split () '.'}) .Where (x = & gt; x.token.Length & gt; = 2) .GroupBy (X = & gt; string.Concat (x.token.Take (2))) .Select (g = & gt; g.Select (X = & gt; x.str) .ToList ()) .ToList ();  

    This list is from the list & lt; String & gt; The first item contains 6 lines with 1 and the other has 5 lines with ITEM2,


    vb.net - The HTTP request is unauthorized with client authentication scheme 'Negogiate'. The authentication header ... was 'Negotiate,Kerberos,NTLM' -


    We are trying to get data from an external web service using VB.Net.

    We have our code to get to prove Dbluesdiel added a service reference, right

    data:

      dim MyClient New ExtConn.GetConnectorSoapClient as () MyClient.ClientCredentials.UserName.UserName = "AOL \ 12345.abcde" MyClient. Client Credentials User name Password = "Pass 123" as Dim Myrake New ExCon. GateDetivore dim MERSsons such as New Exacton Microd demand as gateadata response new system. Service model. Description. Client credentials () Dim MyReqBody as new extension. GETDataRequestBody ("Environment123", "AOL \ 12345.abcde", "pass123", "12345.abcde", "GetData", "") MyReq.Body = MyReqBody MyResponse = MyClient.ExtConn_GetConnectorSoap_GetData (MyReq) MSBbox (MyResponse.Body. GetDataResult)  

    Our app.config is:

      & lt; XML version = "1.0" encoding = "utf-8" & gt; & Lt; Configuration & gt; & Lt; Startup & gt; & Lt; Supported serial version = "v4.0" sku = ".NETFramework, version = v4.5" /> & Lt; / Startup & gt; & Lt; System.serviceModel & gt; & Lt; Binding & gt; & Lt; BasicHttpsBinding & gt; & Lt; Compulsory name = "GetConnectorSoap" & gt; & Lt; Safety Mode = "Transportation" & gt; & Lt; Transport customer credential type = "NTLM" realm = "" /> & Lt; Message client CredentialType = "UserName" /> & Lt; / Safety & gt; & Lt; / Binding & gt; & Lt; / BasicHttpsBinding & gt; & Lt; / Binding & gt; & Lt; Customers & gt; & Lt; endpoint address = "https://ota.externalservice.nl/ourservices/getconnector.asmx" binding = "basicHttpsBinding" bindingConfiguration = "GetConnectorSoap" contract = "ExtConn.GetConnectorSoap" name = "GetConnectorSoap" / & gt; & Lt; / Customer & gt; & Lt; /system.serviceModel> & Lt; / Configuration & gt;  

    Answer:

    HTTP request client authentication schemes from unauthorized authentication server with the "NTLM" header "Negotiate, Kerberos, NTLM was' < / P>

    My questions are:. Are we doing wrong? If NTLM is accepted as the authentication mode, then why do we get this error?

    "itemprop =" text ">

    You can try to add it as a web reference (Add Service Reference> Advanced. .> Add Web Reference)

      GetConnector Connector = New GetConnector (); Connector Credential = new network credentials ("username", "password", "domain"); String reaction = connector. GateData ();  

    php - Codeigniter routes not working, possibly because of internationalization? -


    Working on the codeigniter project stuck with the routes I N / Company / Login to En / login , how do I define routes?

    Right now the code looks like this:

      // '/ en / about' - & gt; About 'controller' '$ route [' ^ (N | LV) / (. +) $ '] = "$ 2"; // '/ en', '/ lv' URI - & gt; Use Default Controller $ route ['^ (N | LV) $'] = $ route ['default_controller']; $ Route ['company / login'] = "login"; Tried  

    :

      $ route ['^ (en | lv) / company / login'] = "login";  

    Obviously, I did not get anything, can you please help?

    Your problem is (I have the same) that it:

      $ Route ['^ (en | lv) / (. +) $'] = "$ 2";  

    Overrides your rule for:

      $ route ['^ (en | lv) / company / login'] = " Login ";  

    Try this:

      $ route ['^ (en | lv) \ / (company) \ / (. +) $'] = " log in";  

    It is possible that you should first help to override the pattern.

    And if not, first edit the pattern:

      $ route ['^ (N | LV) \ / (?! Company). + $ '] = "$ 2";  

    perl - Failing to compile DBD-Oracle-1.74 | Can't locate DBI.pm -


    Please help me try to compile the DBD-Oracle -174 Perl module and fail because it clearly Pearl DBI can not locate PMM . But DBI.pm is there ... I used to compile and insert the module inside

      / ag / smartcube / perl / bin / perl  

    I am doing this:

    / ag / smartcube / perl / module

    directory. This system has been disconnected from the Internet, so there is no such permission for CNN or something like this. Only manual compilation

      CD-DBD-Oracle-1.774 [Root @ dcpscp20907234 DBD-Oracle-1.74] # / AG / smartcube / pearl / bin / perl Makefile.pl INSTALL_BASE = / AG / smartcube / DBI.pm can not detect in Pearl / Module @INC (@INC includes: /ag/smartcube/perl/lib/5.10.0/x86_64-linux/ag/smartcube/perl/lib/5.10.0 / AG / Smartcube / pearl / lib / site_perl / 5.10.0 / x86_64-linux /ag/smartcube/perl/lib/site_perl/5.10.0) on Makefile.PL line 21. initially failed. Compile makefile.PL line 21. [root was aborted @ dcpscp20907234dbd-oracle-1.74] #search / ag / smartcube / -iname DBI.pm / ag / smartcube / perl / modules / lib / perl5 / x86_64-linux / Bundle / DBI.pm / ag / smartcube / perl / module / lib / perl5 / x86_64-linux / dbi.pm /ag/smartcube/perl/modules/DBI-1.633/lib/Bundle/DBI.pm / ag / smartcube / Perl / modules / DBI-1.633 / DBI.pm / ag / smartcube / pearl / module / dbi-1.633 / blib / lib / bundle / dbi.pm /ag/smartcube/perl/modules/DBI-1.633/blib/lib/ DBI.pm  

    Please help, how "tell" perl is that there is DBI.pm

    thanks

    you

     / ag / smartcube / pearl / bin / pell makefile.p. Test to make 

    so that the module you created will go to those places where / ag / smartcube / perl / bin /

    , besides 5.10 in Priority 5.10.1. There is no good reason to use 0. From

    to: @_ The parameter is used to specify. .

    Html>

    NUnit- How to ensure a version of software is installed in a system? -


    I have written a code to install a special code in the machine or not. When I test this codebie debugging, it works as if I expect it.

    But, when I argue and urge through the N-Unit, then getting the wrong output I suspect that the N-Unit is not reaching the registry entry.

    Can someone provide your suggestions on this and guide me to go along with the right path?

    The following is my EN-Unit code

      [Examination] public isiDistalled () {Assert.IsTrue (GetInstalledDetail.IsInstalled ("1.4.0.2")); Assert.IsFalse (GetInstalledDetail.IsInstalled ("1.4.0.3")); }  

    Here is the method code installed:

      Public static Bull Installed (string version) {string path = string.Empty; Bull results = False; String sLocation = "software \\ a \" installed version "; String sLocation64bit = "software \\ WOW6432Node \\ a \\ installed version"; Registry key, version key; Key = Registry.LocalMachine OpenSocial (SOLOCTION); If (key == null) {key = Registry.LocalMachine.OpenSubKey (sLocation64bit); Slocation = sLocation64bit; } If (key! = Null) {foreach (string isVersion in key.GetSubKeyNames ()) {ifVersion == version} {versionKey = Registry.LocalMachine.OpenSubKey (sLocation + "\\" + version); Try {path = versionKey.GetValue ("") as a string; If (Directory.EnumerateFiles (path, "*", SearchOption.AllDirectories). Any ()) {Results = true; break; } And {result = false; }} Hold (exception exception) {result = false; }}}} Return result; }  

    Thanks in advance!


    c - Cuda factorial value invalid -



    c - Cuda factorial value invalid -

    i'm starting larn cuda. wrote programme calculate factorial. code working when calculate factorial more 12 getting wrong values. why cuda getting invalid value? how prepare this? code.

    #include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <conio.h> #define cuprintf cuprintf __device__ int silnia(int n) { if (n<2) homecoming 1; //silnia z 0 1 wynosi 1 homecoming n*silnia(n - 1); } __global__ void kernel(int *a) { *a = silnia(15); } int main() { cudaevent_t start, stop; float elapsedtime; cudaeventcreate(&start); cudaeventrecord(start, 0); int *dev_a,a; cudaeventrecord(start); cudamalloc((void**)&dev_a, sizeof(int)); kernel << <1, 1 >> >(dev_a); cudamemcpy(&a, dev_a, sizeof(int), cudamemcpydevicetohost); cudaeventcreate(&stop); cudaeventrecord(stop, 0); cudaeventsynchronize(stop); cudaeventelapsedtime(&elapsedtime, start, stop); printf("elapsed time : %f ms\n", elapsedtime); printf("%d", a); getch(); homecoming 0; }

    thx help.

    12 factorial 479001600 fits in int variable.

    13 factorial 6227020800 not fit in int variable.

    if alter int unsigned long long (everywhere, including printf format specifier) you'll more range, run out of range.

    c cuda

    php - Updating/Creating Additioanl .profile for laravel -



    php - Updating/Creating Additioanl .profile for laravel -

    i'm trying create life easier adding path instead of having type in ~/.composer/vendor/bin/laravel everytime terminal access laravel installer menu can type in laravel bring same laravel installer commands. have .profile file set point mamp pro's php module i'm unsure if have update additional line or if should creating new .profile page in different directory allow sense or happen.

    file located here: ~/ .profile

    export path=/applications/mamp/bin/php/php5.5.3/bin:$path

    edit: have composer residing in ~/usr/bin/composer directory because when set within of ~/usr/local/bin/composer directory cannot type composer commands says don't exist. running on os x mavericks installation on mac. composer in directory in able run composer commands. have .profile file has above path within pointing mamp's php installation. i'm wanting able type in "laravel" terminal laravel installation tool instead of having type in

    ~/.composer/vendor/bin/laravel everytime saw on video have add together path everytime overwrites 1 have.

    is there additional ideas pertain exporting situation.

    curl -ss https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer

    remove current composer.phar or composer file , run 2 commands above.

    if you're still getting command not found, wrong operating system.

    php laravel composer-php mamp mamp-pro

    function - Handling PHP Bit Flags -



    function - Handling PHP Bit Flags -

    i have php class method prints out instance table row. want row printed out without name @ start, want row items printed, , on.

    i have decided utilize bit flags in order create code more readable, handling of flags looks horrible. first time using bit flags.

    i have defined flags @ top of class follows;

    define('bat_table_row_player', 1); define('bat_table_row_noplayer', 2); define('bat_table_row_field', 4); define('bat_table_row_all', 7);

    the function uses flags looks this;

    function tableline($flag=bat_table_row_all) { if(in_array($flag,[1,3,5,7])) // homecoming player cell if(in_array($flag,[2,3,6,7])) // homecoming other cells (except fielding) if(in_array($flag,[4,5,6,7])) // homecoming fielding cells homecoming $rtn; }

    so can see, if bat_table_row_all set, options execute planned.

    the problem is, if add together flag reason (therefore setting 8, , 15 - although trivial stands), have rewrite entire function. can't right.

    is there improve way write function above have update flag definitions, add together flag execution function?

    bitwise operators

    function tableline($flag=bat_table_row_all) { if($flag & bat_table_row_player) // homecoming player cell if($flag & bat_table_row_noplayer) // homecoming other cells (except fielding) if($flag & bat_table_row_field) // homecoming fielding cells homecoming $rtn; }

    also, can avoid having bump all flag just:

    define('bat_table_row_all', -1);

    which has bits set 1.

    php function bitflags

    php - Redirect only one page to http htaccess -



    php - Redirect only one page to http htaccess -

    i utilize codeigniter , utilize redirection urls https. want redirect 1 page (https://www.example.com/campaign/pprtasshs-dhshs_fd5656dfhdh/web/surf) http.

    i got lots of reply in so. not implement properly. each time got error "this webpage has redirect loop".

    my htaccess

    <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewritecond %{https} off # first rewrite https: # subsequent rule grab it. rewritecond %{server_port} 80 rewriterule ^(.*)$ https://%{http_host}%{request_uri} [l,r=301] # now, rewrite request wrong domain utilize www. rewritecond %{server_port} 443 rewritecond $1 (web\/surf|surf) rewriterule ^(.*)$ http://%{http_host}%{request_uri} [r=301,l] rewritecond %{http_host} !^www\. rewriterule ^(.*)$ https://www.%{http_host}%{request_uri} [l,r=301] rewriterule ^about-us / [l,r=301] options -indexes rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /index.php/$1 [l] </ifmodule> <ifmodule !mod_rewrite.c> errordocument 404 /index.php </ifmodule>

    links on tried not working me.

    codeigniter: check , forcefulness 1 page https://

    redirect single page http https

    thanks in advance

    you have alter status @ https redirection.and check status @ https://www redirection.just seek next code. may help you.

    <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewritecond %{https} off # first rewrite https: # subsequent rule grab it. **rewritecond $1 !(web\/surf|surf)** rewriterule ^(.*)$ https://%{http_host}%{request_uri} [l,r=301] # now, rewrite request wrong domain utilize www. rewritecond %{server_port} 443 rewritecond $1 (web\/surf|surf) rewriterule ^(.*)$ http://www.traffictraject.com/$1 [r=301,l] rewritecond %{http_host} !^www\. **rewritecond $1 !(web\/surf|surf)** rewriterule ^(.*)$ https://www.%{http_host}%{request_uri} [l,r=301] rewriterule ^about-us / [l,r=301] options -indexes rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /index.php/$1 [l] </ifmodule> <ifmodule !mod_rewrite.c> errordocument 404 /index.php </ifmodule>

    php .htaccess codeigniter redirect