Posts

Showing posts from September, 2011

html - Get iFrame to full width of website (not content!) -

Image
मेरा आइफ्रेम कोड ऐसा दिखता है: & lt; style type = "text / css" & gt; # बाएं {प्रदर्शन: कोई नहीं; बाईंओर तैरना; चौड़ाई: 212 पीएक्स; } # राइट {डिस्प्ले: ब्लॉक; सही नाव; चौड़ाई: 100%; } & Lt; / शैली & gt; & Lt; div align = "left" & gt; & Lt; iframe height = "1000" src = "https://secure.workbooks.com/process/=YjN4gDN/case_portal" width = "2000" & gt; & lt; / iframe & gt; & lt; / div & gt; हालांकि मैं आइफ्रेम क्षेत्र को पृष्ठ की पूरी चौड़ाई में विस्तार करना चाहता हूं, इसलिए यह एक ऐसा क्षेत्र भरता है जैसे: अगर मैं केवल iframe की चौड़ाई में वृद्धि करता हूँ निम्न के साथ: दूसरी छवि समस्याओं का सामना किए बिना मैं पहली छवि कैसे प्राप्त करूं? आप पृष्ठ देख सकते हैं। सबसे पहले, # content-sub से 100% की चौड़ाई बढ़ाएं ( यह अब 960px है; आपका फ्रेम उसके बच्चों में से एक है, इसलिए इसे पूरी चौड़ाई तक खींचने के लिए आपको माता-पिता नोड को उसी तरीके से फैलाया जाना है)। दूसरा, i...

java - Localizing numeric values in excel -

बिगडीकैमल myNumber = नया बिगडिस्किमल (1234.56); संख्याफ़ॉर्मेट उदाहरण = संख्याफ़ॉर्मेट.जस्टेशन (लोकेल.जेर्मन); स्ट्रिंग स्थानीयकृत संख्या = उदाहरण। प्रारूप (myNumber); System.out.print ("\ n प्रारूपण" + स्थानीयकृत संख्या); ओ / पी - & gt; 1.234,56 यहां तक ​​कि कोड ठीक काम करता है, लेकिन नीचे पंक्ति को संख्या स्वरूप देता है क्योंकि दिए गए स्ट्रिंग में इसमें अल्पविराम है। BigDecimal bigDecimal = new बिगडीस्केल (लोकलाइज्ड नंबर); मुझे स्थानीयकृत होने के लिए संख्यात्मक मान चाहिए, लेकिन मैं स्ट्रिंग के रूप में संख्या को डालने के रूप में स्ट्रिंग के रूप में नहीं लौटा सकता, इस सेल में एक्सेल नंबर में त्रुटि दिखाती है formatter के रूप में formatter या एपॉस्ट्रॉफी से पहले क्या कोई तरीका है जिसके द्वारा मैं स्थानीय प्रारूप में संख्यात्मक मान (बिगडीकल / पूर्णांक / बिगइंटेजर आदि) वापस कर सकता हूं ताकि मैं एक्सेल में त्रुटि से ऊपर नहीं पाउंगा और एक्सेल डेटा पर मैं फिल्टर संचालन कर सकता हूं। मैंने भी नए BigDecimalType () की कोशिश की है। ValueToString (मान, लोकेल); और नया ...

php - Limit list using a button -

I want to print the final use of your application for each user, but I'm limited to a specific number to the list I want (that will eventually be configured by the user) ATM I can print everything, but I want to apply a button which will allow 5 events to show and will move forward. Once it is implemented, there is also a backing. However, my code is as follows: $ min = 0; If (count ($ time)> 5) {$ aux = 5; } And {$ aux = count ($ time); } If (isset ($ _ POST ['button'])) {if ((calculation ($ time) - $ aux)> 5) {$ aux = aux + 5; $ Min = $ min + 5; } And {$ aux = count ($ time); If (calculation ($ time)> 5) {$ min = calculation ($ time) - 5; }}} For ($ i = $ min; $ i & lt; $ aux; $ i ++) {echo '& lt; Br> ($ I + 1). '' .Det ('Y-M-DH: I: S', $ Time [$ i] ['Time_Stamp']). "\ T". ' Por '. $ 'EPS [' IP '].' & Lt; Br> '; }? & Gt; & Lt; Input name = "button" type ...

angularjs - Difference between modelValue and viewValue -

With a custom command, a validation function is added to validate the integer input var INTEGER_REGEXP = / ^ \ -? \ D + $ / / App.directive ('integer', function) (return {required: 'ngmodel', link: function (scope, elm, attrs, ctrl) {ctrl. $ Validators.integer = function (modelValue, viewValue } {If (ctrl $ IsEmpty (modelValue)) {// Write a blank model for valid return;} (INTEGER_REGEXP.test (viewValue)) {// This valid return is true;} // This invalid return is false ;};}};}); Each function in the $ validators object receives the modelValue and viewValue. What is the difference between ModelValue and viewValue? $ formatter s and $ parser in your code s ViewView is a value that uses the rendering command to attract itself, the model is the value that is stored in the scope, once the value of the $ parser The list is used. If you change the value in the radius, then ngmodel will run that value through its $ formatters , which is then read as a visu...

shape - How to center a CSS Hexagon -

Not sure how to centrally focus this hexagon, setting margin: auto; Thank you in advance, if someone can help the whole shape is not grateful. .hexagon {position: absolute; Width: 300px; Height: 173.21 pixels; Background color: #fff; } .hexagon: First, .hexagon: after {content: ""; Status: Completed; Margin-left: auto; Margin-right: auto; Border-left: 150px solid transparent; Boundary-right: 150px solid transparent; }. Hexagon: first {bottom: 100%; Border Bottom: 86.60px solid #fff; Status: Completed; Margin-left: auto; Margin-right: auto; } .hexagon: after {status: absolute; top 100%; Width: 0; Border-top: 86.60px solid #fff; } margin: auto will not work if you use hexagon To fully integrate the devices, you need to add top: 50% , left: 50% and margins: -86.6px 0 0 -150px . -86.6 px is half of your hexagon and half of -150px width; apart from this, you have to make your original position relative to the height of 100%. HTML & lt; Div class = ...

cakephp - Cakephp2 pagination links with routing -

मुझे रूटिंग केकपैप के साथ एक समस्या है। यहाँ मेरा कोड है: राउटर :: कनेक्ट ('/ खोज-नौकरी / *', सरणी ('नियंत्रक' = & gt; 'TblJobs', 'क्रिया' = & gt; 'findJob'), सरणी ('पास' = & gt; सरणी ('आईडी'))); राउटर :: कनेक्ट ('/ *', सरणी ('नियंत्रक' = & gt; 'tbl_jobs', 'क्रिया' = & gt; 'अनुक्रमणिका'), सरणी ('पास' = & gt; सरणी ('आईडी'))); पहली पंक्ति पर, यह सामान्य काम कर रहा है ( localhost / find-job / page: 2 )। लेकिन दूसरी पंक्ति पर, मुझे इसके साथ एक समस्या है। जब मैं इसे चलाता हूं, मेरे पास कुछ पृष्ठ हैं: पृष्ठ 1, पेज 2, पेज 3, लेकिन इस तरह की लिंक: localhost / tbl_jobs / index / page: 2 लेकिन मुझे उस लिंक की आवश्यकता है: लोकलहोस्ट / पृष्ठ: 2 मुझे खेद है क्योंकि मेरी अंग्रेजी बहुत बुरी है। धन्यवाद! कोशिश करें: राउटर :: कनेक्ट ('/: पृष्ठ', सरणी ('नियंत्रक '= & Gt;' tbl_jobs ',' क्रिया '= & gt;...

web services - How to log in into Redmine using REST API -

I need to enter Radmin using the REST API. Is it possible to use REST API in redmin? How can I handle it? You can see the following: Most of the time, the API Requires authentication. To enable API-style authentication, you must check the Administration -> Settings -> Authentication API enabled. Then, authentication can be done in 2 different ways: Use your regular login / password via HTTP Basic Authentication do. Password in a script that is using your API key. The API key can be connected with each request in the following way: Close the "key" parameter Passed as a username with a random password via HTTP Basic authentication Passed an "X -admin-api-key "HTTP header (added to RedMine 1.1.0) You can access your API key from your account page (/ me / account) default layout Right hand Sector logged on panel. If you want to use you can use it: 1. HTML Basic Standards - P: // login: password@redmine.org/issues....

xml - save a tree as a key in a dictionary, Python 3.4 -

Image
I have hundreds of XML files I have been working to compare 2 XML trees and if they are the same Each XML tree has unique ID numbers which has been ignored in comparison. Now I can iterate and compare all XML files. But I want to save the trees in the data structure like dictionaries but the dragon does not allow me to save the tree as a key and its id as a value. Is there a way in the form of the dictionary key of a tree? If not, what kind of data structure can be used for this? Example: dic = {tree 1: [I1.i1.p1.m1, I1.i1. P1.m2], tree 3: [I1.i1.p1.m3]} thanks The dictionary is Hashmap, which means that the keys should be harmful, which usually indicates that the item is washed (Due to these lists are not valid keys, but Tuples are). What you need is a function that generates this hash to generate a hash on the data structure like tree for your objects. There is a trivial problem. But, since you can already create equality, you should have an idea about some featu...

gruntjs - compass socket hangup with grunt serve -

I was running grunt-contrib-compass@0.6.0 and it was aborted by error: node_module / grunt-content-comp / node_module / tmp / lib / tmp.js: throwing 261; ^ Error: TCP on Socket.emit (events.js: 95: 17) at Socket.Sat Cloessiston (http: js: 1526: 23). On the Close (NET JS: 465: 12) I have upgraded to grunt-contrib-compass@1.0.1 and now it exits now, but it is the following errors / Generate warnings (this does not come out when it happens, though it is fatal) Fatal error: dangling the socket Fatal error: The socket is hanging Which I can only assume is the problem with better error handling than throwing this error Area is a way to get better information? This is the compass part of my grunted file compass: {option: {sassDir: '

c++ - QGraphicsView and QGraphicsScene -

Image
I have a doubt with QGraphicsView. If I put the scenarios with coordinates: (0, 02,200,200), the view decreases with the top E 9px from the left side of 9px, such as in the image: QGraphicsScene * myScene = new QGraphicsScene (); Custom animation * ca = new custom animation (); // QGraphicsWidget comes from myScene->; AddItem (ca); MyScene-> SetSceneRect (0,0,200,200); UI- & gt; Gfx_animation- & gt; SetScene (myScene); UI- & gt; Gfx_animation- & gt; SetHorizontalScrollBarPolicy (QT :: ScrollBarAlwaysOff); UI- & gt; Gfx_animation- & gt; SetVerticalScrollBarPolicy (QT :: ScrollBarAlwaysOff); But if I use setSceneRect (9, 92,200,200), the view is positioned properly. Is something wrong?

How I can get data using background service in android? -

Image
मैं यह सेवा लिख ​​रहा हूं लेकिन यह काम नहीं करता मैं यह जानना चाहता हूं कि, जब मेरा एप्लिकेशन एंड्रॉइड डिवाइस पर इंस्टॉल होता है तो मैं अन्य एप्लिकेशन से डेटा प्राप्त करना चाहता हूं, जब अन्य अनुप्रयोग क्लिपबोर्ड का उपयोग करता है तो मुझे उस डेटा को प्राप्त करें जिसे क्लिपबोर्ड पर कॉपी किया गया है (लेकिन अन्य एप्लिकेशन में कॉपी करें)। जैसे कॉपी बबल आवेदन की तरह कृपया मुझे पृष्ठभूमि सेवा लिखने में मदद करें इस पर एक नज़र डालें: एक बार एक सेवा मैंने किस तरह लिखा है: सार्वजनिक वर्ग की पृष्ठभूमिसेवा सेवा [सूचना अधिसूचना; अधिसूचना कंपाट। बिल्डर बिल्डर; अधिसूचना प्रबंधक सूचना प्रबंधक; @ ओवरराइड पब्लिक व्हाइड ऑन क्र्रीट () {} @ ओवरराइड पब्लिक आईबींर ऑन ऑन बिंद (आशय का इरादा) {वापसी नल; } @ ओवरराइड पब्लिक इंट स्टार्ट कॉमांड (इंटेंट इन्टेंट, इंट फ्लैग, इंट स्टार्टआईडी) {बिल्डर = नया नोटिफिकेशन कॉमपेट। बिल्डर (यह); आशय अधिसूचनाप्रतिशत = नए आशय (यह, मुख्य वर्ग); लंबित लंबित लंबवत प्रत्याशित = लंबितइन्टेन्ट.गेट ऍक्टिविटी (यह, 0, अधिसूचना सूचना, 0); Builder.setContentIntent (लंबित...

c - fprintf() issues utf-8 linux -

Well, I've got to print UTF-8 encoded characters to the terminal. But the printing on the file is not working as I expected such as using wchar.h and locale.h: #include & lt; Locale.h & gt; # Include & lt; Wchar.h & gt; Int main () {catalocell (lc_ol, ""); Wint_t index = 0; FILE * fpinout = fopen ("UTF-8.txt", "w"); (; Index & LT; 0x200; index = 0 index ++) of {printf ( "% i: \ t% LC \ n", index, index) to; // works fine, print utf-8 characters for the terminal fprintf (fpinout, "% i \ t% lc", index, index); // does not work, output is quirky fclose (fpinout); } I tried to use the index, such as wint_t and wchar_t my UTF-8.txt file looks like this: and ㄀ C L㌂̉lah 㔄 ԉ term 㜆 ܉ Number 㤈 U〱 ਉ ㄱ ଉ㈱ ఉ㌱ ഉ 㐱 ฉ 㔱 ༉ 㘱 ဉ 㜱 ᄉ 㠱 ሉ 㤱 ጉ〲 ᐉ ㄲ ᔉ㈲ᘉ㌲ᜉ 㐲᠉ 㔲 ᤉ 㘲 ᨉ 㜲 ᬉ 㠲 ᰉ㤲 ᴉ〳ḉ ㄳ Ἁ㈳ ㌳ ℉ 㐳 ∉ 㔳 ⌉ 㘳 ␉ 㜳 ┉ 㠳 ☉ 㤳 ✉〴⠉ ㄴ ⤉㈴⨉㌴⬉ 㐴 Ⰹ 㔴 კ 㘴 ⸉ 㜴 ⼉ 㠴> 㤴 ㄉ 〵 ㈉ ㄵ ㌉㈵ 㐉 ㌵ 㔉 㐵㘉 㔵 㜉 㘵 㠉 㜵 㤉 㠵 㨉 㤵 㬉 〶 㰉 ㄶ 㴉 ㈶ 㸉 ㌶ 㼉 㐶 䀉 㔶 䄉 㘶 䈉 㜶 䌉 㠶 䐉 㤶 ...

Issue related to using Android attribute (attr) defined in other aar package -

मान लें कि attr को aar पैकेज में परिभाषित किया गया है ( Com.pack1 ) के रूप में & lt; attr name = "attr0" format = "string" / & gt; और दूसरे पैकेज में ( com.pack2 पर com.pack1 पर निर्भरता है, कहें)) मैं एक styleable के रूप में & lt; attr name = "attr2" format = "integer" / & gt; & Lt; घोषित-शैली योग्य नाम = "दृश्य 2" & gt; & Lt; attr name = "attr1" format = "string" / & gt; & Lt; attr name = "attr2" / & gt; & Lt; / घोषित-Styleable & gt; और मेरे पास com.pack2 के रूप में एक कस्टम दृश्य है सार्वजनिक वर्ग View2 LinearLayout {सार्वजनिक View2 (संदर्भ संदर्भ , AttributeSet attributeSet) {सुपर (संदर्भ, विशेषता सेट); View.inflate (संदर्भ, R.layout.view2, यह); कोशिश करें {टाइप किए गएअरे टाइप कियाअरेरे = संदर्भ। शौकीन स्टाइल गुण (विशेषतासैट, आर। स्टेलेबल.विवरण 2); {If (typedArray.hasValue (R.styleable.view2_attr1)) {String t = typedArray.ge...

sql - Inner join on tables not directly related -

Image
OK, I have three tables (these are definitely more relevant) with these fields: full_table attribute articleID main_table articleID other_table attribute Therefore there is a complete list of "article ID" and its related "specialty" in the main_table. There are only some articles in the main_table. Other_Table contains only some of those "attributes". What I want to do is to get articles which have specialty in other _table and whose article ID is in main_table. EDIT: Visual help of some details The problem is my query also gives them all those who are not in other_tables. The query is as follows: SELECT full_ table.attribute, main_table.articleID FROM main_table INNER full_ table on the full_ table .articleID = main_table.articleID INNER Other_tables in other_table on other_table. Attribute = full_table.attribute EDIT2: I have tested the sample photo and code on sql bella and works as desired, so the problem comes fr...

Tracking events in Universal Analytics only partly working -

Currently using Universal Analytics on my website which is already tracking PDF download and I Also trying to apply for a video, to see how often this video was played. & lt; P & gt; & Lt; Iframe width = "482" height = "271" src = "video url" scrolling = "no" frameborder = "0" allowable lixer = "onClick =" ga ('send', 'event', 'video', ' Play ',' eco-assistant ',' 10 '); " Gt; & Lt; / Iframe & gt; & Lt; / P & gt; This is real. Any ideas why video plays are not tracked? Many thanks, b. One more thing to keep in mind is that the value given for the event should be an integer, string No. Your onClick code should be: onClick = "ga ('send', 'event', 'video', 'play', 'eco-assistant', 10);" Hope this additional information is helpful. B. Keller

android - Button with span disappears of screen -

Image
I am using a table layout to keep the button Now the first button appears in the image that appears, but The one you can not see is the button next to it. This is the only button for the button that I used on Android: layout_span = "2" 'because I think the button wants to capture 2 columns in that row but for some reasons it disappears And the row (blue selection) is suddenly a big height. Does anyone know how to fix this? activity_main.xml & lt; Table layout xmlns: Android = "http://schemas.android.com/apk/res/android" xmlns: tools = "http://schemas.android.com/tools" Android: id = "@ + id / tablelayout1 "Android: Layout_width =" match_parent "Android: layout_height =" match_parent "tools: reference =" $ {relative package}. $ {ActivityClass} "& gt; & Lt; TableRow Android: id = "@ + id / tableRow1" Android: layout_width = "wrap_content" Android: layout_height = ...

active directory - How do I change AD password through Powershell while enforcing password complexity requirements? -

सेट- एडीएसीसीपैसवर्ड -आईडेंटिटी $ ntaccount1 -नएपासवर्ड $ पास- रीसेट सेट-एड्यूसर -आईडेंटिटी $ ntaccount1 -ChangePasswordAtlogon $ true उपरोक्त कमांड पासवर्ड बदलने का संकेत देता है और इसे समाप्त हो गई के रूप में चिह्नित करता है, हालांकि, अगर मैं पासवर्ड मापदंड से मेल नहीं खाती है, यह मुझे वैसे भी कर देगी। क्या मुझे यह बताएं कि यह प्रयोग करने के लिए एक मान्य पासवर्ड नहीं है? उदाहरण: कुछ पासवर्ड abc123 हो सकते हैं। और अधिक परिष्कृत खाते Abcd12345 एक मानक पासवर्ड रीसेट होने की आवश्यकता नहीं होगी जटिलता / नीति को लागू करें यदि आप पॉलिसी प्रवर्तन करना चाहते हैं, तो आपको एलडीएपी कॉल करने के लिए अतिरिक्त कोड का एक गुच्छा लिखना होगा जो कि नीति को लागू करने के लिए डीसी को बताता है। इस ब्लॉग पोस्ट में सी # कोड है जो आपको दिखाता है कि यह कैसे करें। आप इसे बहुत अधिक काम किए बिना PowerShell में अनुवाद करने में सक्षम होना चाहिए।

Ant regex replace without leaving blank lines -

I am using that regular expression in which to change rows -foo : ^. * (- foo \ b). * $ After the replacement, there is a bunch of empty blank rows where the lines were originally present. How can I change this to remove the line instead of leaving a blank line? The context that I am doing is an ant script and if it helps, then the whole line is: & lt; Replaceregexp file = "..." match = "^. * (- foo \ b). * $" Replace = "" byline = "true" /> Disable the line by line processing and replace the regular expression to include line separators, replace Every event with a new line.

Trying to extract value from my xml with namespace c# -

I'm Here I'm trying to get where I assume the XML paste. & lt; Soapenv: envelope xmlns: soap = "http://schemas.xmlsoap.org/soap/envelope/" & gt; & Lt; Soapenv: header / & gt; & Lt; Soapenv: body & gt; & Lt; Ship: Ship Configurable Response xmlns: ship = "http://www.ups.com/XMLSchema/XOLTWS/Ship/v1.0" & gt; & Lt; General: Response xmlns: common = "http://www.ups.com/XMLSchema/XOLTWS/Common/v1.0" & gt; & Lt; Common: ResponseStatus & gt; & Lt; Common: Code & gt; 1 & lt; / Common: Code & gt; & Lt; Common: Details & gt; Success & lt; / Common: Details & gt; & Lt; / Common: ResponseStatus & gt; & Lt; Common: TransactionReference & gt; & Lt; Common: CustomerContext / & gt; & Lt; Common: TransactionIdentifier & gt; Werqqa & lt; / Common: TransactionIdentifier & gt; & Lt; / Common: TransactionReference & gt; & Lt; / Comm...

bash - Faulty tail syntax or grep command? -

I have been given the following code: tail -fn0 / var / log / message | \ Read the line while; Repeat "$ Line" | Grep "test" if [$? = 0] "Running information to collect" etc. ... etc What to do, which constantly monitors the additional lines of "/ var / tmp / messages" file and if one In the word "test" is the word, then executes the rest of the script and goes out when it is done. The Any row is added to this message's file, as if the remaining script is executing the line content I have added the echo commands, and the new log file line in the line line is correct By the way I tried to change the test "$? = 0" to "$? = 1", but it does not matter. Can someone give me an indicator? Thanks @TomFrench I recommend that instead of using a loop, you can use things like grep You can make it very simple: tail-fn0 / var / log / messages Grep -q test exclamation "gathering information" # lef...

matlab - Why is isequaln(f, simplify(f)) false? -

I have a function f as defined in this form: Symfun symfun (c + t - (2 * (t - 2 ^ (1/2) * (a * t) ^ (1/2)) * (a - t / 2)) / ( 2 * A, however, check the similarity with the simplified version yield: isequaln (f, simplify (f)) ans = 0 Is not expected to return the exact equivalent uneven >> Probably use to test There is no suitable function for equality. sym / isequaln : For help with montage (A, B), iff A and B are equally true of NaNs As the guideline has been given to @ benoit1.1, the documentation is not completely clear, but, as it is numeric equivalent, the function ("the same" Despite the unfortunate use of the term) seems to be a test for simplified functions There is an identity for the unassumed function, but it is not an analogy, according to the documentation, can keep in mind the sym / isequaln account and possibly simple relations, but it is a change internally and It does not simplify, it is almost certainly because simpl...

javascript - Check if an object exists with a property set to a particular value in a nested object (array of objects) -

I am trying to create a JSON object from a data source that should look something like this: As I have worked through a data source, I have a nested object named 'allProduce' with related entries Want to add Bjekt are if and only if the object does not already exist. So if I have the following lines in my data source: ** Type of product is in the original stock of the country? * Apple Fruit Ireland Yes apple fruit France Yes apple fruit USA no cabbage vegetable UK cabbage cauliflower vegetable France Then all 'project' should be nested object as a result: / Pre> This is the place where I am confusing because I'm not sure how every time I (without looping through the whole nested object ) Check whether the record is present or not. I am doing something like this (using jQuery: $ ('source data test table T'). (I, line) {var fatal = $. Trim ($ (line) .find ('td: nth-child (1)'). Text ()) var type = $ .trim ($ (line) Find (...

cakephp - Sort table from image -

I have a table with the 'read' column I want to be able to sort with the graphic instead of the text, though it Can not seem to work out Whatever I have tried here: Sort ('read', $ this-> HTML- & gt; image ("read_no.png", array ('width' =>, '26px', 'alt' = & gt; "read", array ('Saved' = & gt; wrong)))); ? & Gt; & Lt; / Th & gt; & Lt; Th class = "read" & gt; & Lt ;? Php echo $ this- & gt; HTML-> Link ($ this-> HTML-> Image ("read_no.png", Array ("alt" =>) ;; & gt;; & lt; / th & gt ;;;;;; ; & Lt; th class = "read" & gt; php echo $ this- & gt; HTML- & gt; image ("read_no.png", array ('width' => '26px' , 'Alt' = & gt; "Read", 'URL' => $ the-> Paginator-> Sort ('Read'), array ('escape' = & gt; wrong));; ...

PHP multiple user level login page -

I'm new to PHP and I'm stuck with it, so any help is appreciated. I have 4 user_ levels in my DB: ID name 1 admin 2 member 3 cashier 4 unregistered user The problem is, when anyone If the user logs in, then it redirects to the page profile php. And I need other permissions, search results etc. for every user. How can I do this? login.php & lt ;; Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Login & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt ;? Include php 'connect.php'; ? & Gt; & Lt ;? Php included 'functions.php'; ? & Gt; & Lt ;? Php includes 'title_bar.php'; ? & Gt; & Lt; H2 & gt; Login: & lt; / H2 & gt; & Lt; Form method = 'POST' & gt; & Lt ;? Php if (isset ($ _ POST ['submit'])) {$ username = $ _ POST ['username']; $ Password = $ _ post ['password']; If (empt...

ios - Remove Tap gesture from UITextField inside a UITableViewCell -

What I basically want to achieve, if there is a UITextField inside custom UITlessViewCell, this text file should be triggered only on the long press, whereas So if the user taps on the textfield once, select the cell should be turned on with its delegate method. So far, I added a long press on my textfield and removed all the other gestures. So when I have a long press on it, my text file gets triggered properly, but the problem is that when I just tap on the textfield, the cell is not triggered and the selection method has been Not called. If I tap out of my textfield, then the method is correctly called I : (NSINXAP *) indexpath {Static NSSTING * cell identifier = "customcell"; Customcell * cell = [tableview dequreablecalevillidentifier: cellindex for indepaypet: indexpath]; If (cell == blue) {cell = [[custom CL light] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: CellIdentifier]; } Cell.nameTextField.gestureRecognizers = Zero; UILongPressGestureRecogni...

Can't connect to sql server from lan computer using windows authentication -

That is, I have a server that allows LAN connections, now for each other for maintenance purposes Setting up, but for some reasons I can not connect to it using windows authentication, but I can still use the first one or SQL Server login, but I do not know, I want to use Windows authentication ... error message me Is getting: login failed for user "user is not connected to a trusted SQL connection. (Microsoft SQL Server, Error: 18452) Update: Both are running under Windows 7 (they are not for slipping usage), they are both exactly configured. Update 2: I connect to the same computer But can not be from the network. something Aftermath, I know that the problem was in the eight layer (me), the best way is to configure a dome to use Windows authentication for SQL Server AIN server, then add those domains to SQL, from a database Give the desired privilege to connect, and 'It's all so easy (at least for me this was), after that I became a system DSN connecti...

Show/Hide text button position -

मेरे पास यह कोड है: & lt; style type = "text / css" & gt ; । टॉगल लिंक {रंग: # 000; पाठ-सजावट: कोई नहीं; }। टॉगल लिंक: होवर {कर्सर: सूचक; }। सहयोग {प्रदर्शन: कोई नहीं; } & Lt; / style & gt; & Lt; p & gt; मेलिंग डेवलपर्स डोलर एसट एमेट, मेल आईडी डोलोर श्रम प्रॉम्प्ट ... & lt; span class = "toggleLink" onclick = "टॉगल दिखाएं ('विस्तारित करें', यह)" & gt; & LT; अवधि & gt; अधिक से & lt; / span & gt; & lt; / span & gt; & Lt; span class = "elaboration" id = "elaboration_1" & gt; डेलाकाटा शब्द के रूप में परिभाषित किया जाता है क्लिटा ने मुझे बताया & Lt; / span & gt; & Lt; / p & gt; & LT; स्क्रिप्ट & gt; फ़ंक्शन टॉगलप्रदर्शन (आईडी, ए) {var विस्तार = दस्तावेज़.getElementById (आईडी); अगर (elaboration.style.display == "ब्लॉक") {elaboration.style.display = "none"; यदि (ए) a.innerHTML = "& lt; अवधि & gt; अधिक & lt...

Google Spreadsheet: Find last ocurrence based on match criteria -

I have a Google Docs spreadsheet that I use to run a test for a developed app. I have two sheets of Google Spreadsheets On the first sheet I have given the result for date (in DD / MM / YYYY format), test ID and test: "run" spreadsheet --- --- --------------------------- | | Date | Examination ID | Results | -------------------------------- | | 12/10/2014 | 1 | Passed | | 12/10/2014 | 2 | Passed | | 12/10/2014 | 3 | Passed | | 03/11/2014 | 4 | Passed | | 05/11/2014 | 1 | Unsuccessful ---------------------------------- In the second spreadsheet, all of me The following is expected output: "test", and then, when it was executed, there were results for them. Spreadsheet -------------------------------------- | | Test id Last run Results | ---------------------------------- | | 1 | 05/11/2014 | Unsuccessful | 2 | 12/10/2014 | Passed | | 3 | 12/10/2014 | Passed | | 4 | 03/11/2014 | Passed | | 5 | | | ------------------------------------ My problem is I ...

What's the Rust equivalent return value of a Java function that returns multiple exceptions? -

What is the proper return value of the function in Jungle, which looks like this in Java? Zero validation (string input) {if (!! Input)! Return exception 1 ("...."); If (check input 2 (input)) return exception 2 ("...."); If (check input 3 (input)) return exception 3 ("...."); } I think this should be the result or result To represent a enum result, being bool being "simplest" a option , complete the result To explain the present function in any form, A results & lt; R, E & gt; A unique challenge, it can be displayed as either: Results & lt; (), Error & gt; Error with option Error & gt; If you search for an error instead of evaluating inworld > function, either correct Feeling, results & lt; (), Error & gt; Being more easily responsive to ! and the like.

function - Set a javascript breakpoint in code - in chrome - how to know where the debugger was 1 step before? -

I put a breakpoint at the beginning of the javascript function, the execution code was stopped in the debugger. On that basis, how to find the place where the debugger jumped into that function, i.e. the previous line in the javascript file By clicking on the F10 or F11 button, how do I step back to set up a breakpoint before a phase? Thank you. You need to see it there, you can see which function calls towards your breakpoint were taken.

How to get help on specific methods in the interactive shell of MongoDB? -

In the interactive shell in MongoDB, db.help () list (all) methods that can The (current) database can be used for reference. But how do I method db.logout () ? Calling db can get information about using & Lt; CollectionName & gt; .help () list (selected) is available for archiving. But how can I do the method db & Lt; CollectionName & gt; .logout () ? Why db & Lt; CollectionName & gt; .exists () not listed? calling db & Lt; CollectionName & gt; (). Help () list (all) cursor-function. But I do not like the method db & Lt; CollectionName & gt; .find () Sort () ? If you just need to review limited details about the use of a fixed By method, you can type the method without brackets and enter the code to get the javascript For example, type db.c.find and enter (no archive name is available). If you need to get more details about the use of a certain method, then you should read them.

Handling MySQL BLObs in Python -

I'm accessing a MySQL database (V5.5), which is through a Python program for basic reports . Standard fields (int, vintage, datetime etc.) do not offer any problems - in general I'm putting them in the Python list for later processing. Although a table makes extensive use of blades; These are either binary / html / pdf / png / csv data. My problem is that how to handle them after returning them in a selection statement, binary data needs further processing and PNG may need to be included in a report. Thank you in advance ... I have tried various things on the basis of code: - T related snippets are: - the data = open ("/ home / mjh / document / demodata / sjp.bin", 'rb'). Read () SQL = "Include in results (idResults, idClient, TestDateTime, ResultBinary) \ Value (10, 7, '2014-11-05 14:09:11', '% s' cursor. (TheData ,)) comes back with this: - _mysql_exceptions.ProgrammingError: (1064, "There is an error in your SQL ...

html - Making element content toggle on h1 header click with pure Javascript -

I want to toggle some content while clicking on the h1 header. I want to be able to click on the h1 header and hide or show the section below it. Pre> & lt; On one hand & gt; & Lt; H1 & gt; & Lt; A href = "#" & gt; Title & lt; / A & gt; & Lt; / H1> & Lt; Section & gt; & Lt; H1 & gt; Foo & lt; / H1> & Lt; P & gt; Foo & lt; / P & gt; & Lt; / Section & gt; & Lt; Section & gt; & Lt; H1 & gt; Foo & lt; / H1> & Lt; P & gt; Foo & lt; / P & gt; & Lt; / Section & gt; & Lt; Section & gt; & Lt; H1 & gt; Foo & lt; / H1> & Lt; P & gt; Foo & lt; / P & gt; & Lt; / Section & gt; & Lt; Section & gt; & Lt; H1 & gt; Foo & lt; / H1> & Lt; P & gt; Foo & lt; / P & gt; & Lt; / Section & gt; & Lt; Section & gt; & Lt; H1 & gt; Foo & lt;...

Eclipse java built error - org.eclipse.jdt.internal.core.ClassFile incompatible with org.eclipse.jdt.core.ICompilationUnit -

मुझे एक वेब प्रोजेक्ट पर परियोजना को साफ करते समय निम्न ग्रहण त्रुटि हो रही है: त्रुटियाँ हुईं निर्माण के दौरान परियोजना 'MyAccount' पर बिल्डर 'जावा बिल्डर' चलने वाली त्रुटियां Org.eclipse.jdt.internal.core.ClassFile org.eclipse.jdt.core.ICompilationUnit के साथ असंगत कोई भी विचार जो इस कारण हो सकता था? धन्यवाद

jquery - Center aligned <li> with same height and width -

I am using jquery to sort letters in the word jumble game. I need a list item to display: I need to focus inline and in their container. I also want them all to have the same height and width (70px x 70px) so that they look like a scrabble tile. However, the only way I can get them the same height and width is if I leave them but are not centered in containers, if I adjust them to inline-block and padding, most of them Looks like a square, but no letter like "I" is enough and it does not look like a class. Here's my HTML: & lt; Div id = "container" & gt; & Lt; Div class = "letter" & gt; & Lt; Ul id = "sort" & gt; & Lt; Li class = "ui-state-default" & gt; L & lt; / Li & gt; & Lt; Li class = "ui-state-default" & gt; A & lt; / Li & gt; & Lt; Li class = "ui-state-default" & gt; T & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Di...

c++ - Debug Assertation Failed - Dont find bad code -

I wrote a class to use for C ++ when I try to delete an object, then debugger "Debug Essay Failed" with _BLOCK_TYPE_IS_VALID (pHead-> nBlockUse) throws. Perhaps someone can correct my mistake in debugging all memory addresses. Lines. H #ifndef LINES_H # Define LINES_H #include & lt; Stdio.h & gt; # Include & lt; Iostream & gt; using namespace std; Square lines {public: Lines (fuse): Fulexacon {'#'}, name {"Hans-Peter"}, llegence {_laenge} {}; Lines (int lelegages, four_fuelzechen): Fulezeken {_fuellzeichen}, will bring {_laenge}, name {"Hans-Peter"} {}; Lines (int lalejes, four _Fuillezichen, four * _name): Fuelezeken {_fuellzeichen}, llegence {_laenge}, name {_name} {}; Lines (Constant & amp; _l); ~ Lines (); Lines & amp; Operator = (Constant & amp; _l); Private: Charles Felixchenen; Will bring int; Four names; }; #endif // LINES_H lines CPP #include "lines." Lines :: Lines (Constant Li...

animation - SVG: Is it possible to use random or non-static values? -

I am animating a polygon shape inside a SVG (hence it can be used as a background in CSS ) I'm curious if there is any way to generate a value for random use, or any other way the animation is loaded (without the use of an external SVG library) always from the situation does not start? Current SVG: & lt; Polygon Style = "Stroke: RGB (255,0,0); Fill: Transparent;" Number = "0,0 121.5,150 600,0" & gt; & Lt; Attribute attribute name = "numeral" fear = "24s" value = "0,20 121.5,150 600,0 ;, 100571.5,150 306.5,0; 0,20 121,5,150 600,0" repeating points = " Uncertain "key time =" 0; 0.5; 1 "calcemode =" spline "keyplugins =" ​​.5 0.5 1; .5 0.5 / 1 "/> & lt; / Polygon & gt;

c - Invalid /bin/bash address while implementing return-to-libc -

I'm trying to apply return-to-library explanation according to the tutorial. Everything seems to work properly, but I can not get the correct address of $ BINSH It seems that the variable is stored on 0xffffecbb, but GDB says it can not access the address. Where can the mistake be? The system's address () is 0x7ffff7a5a530 and exit () 0x7ffff7a50180 and both are accessible by gdb.

javascript - Arithmetic operations in ember handlebars -

I am trying to calculate the difference between the two variables in handlers - how amber js can i get Am I Is Using a Script Tag a Good Idea? The following are my handbags file {{# everybody in view.block.infodata.weatherData}} & lt; Tr & gt; & Lt; TD & gt; & Lt; Div & gt; & Lt; Font size = "3" & gt; {{Data.name}} & lt; / Font & gt; & Lt; / Div & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Font size = "3" & gt; {{Data.currentValue.tempInFarenhiet}} & lt; / Font & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Font size = "3" & gt; {{Data.pastValue.tempInFarenhiet}} & lt; / Font & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Font size = "3" & gt; {{Data.currentValue.tempInFarenhiet - data.pastValue.tempInFarenhiet}} & lt; / Font & gt; & Lt; / TD & gt; & Lt; / TR & gt; {{/ Every}} Does the ...

mono - Delegate in C# attribute -

I want to place a static representative inside the custom attribute. What I'm running into is the catalyst. The creative is a major bottle neck and I want to avoid it. I am using Mono and running on iOS so that compiled lambda is made and out of the question of any JITD method. What I was hoping for is a stable factory manufacturer on each class that has the specialty. Some will do: [CustomAtt ( "cold", Factory Method)] public class of Class {public static some Class Factory mode () {new new client ()}}} it gives me a compile error a constant expression of a trait, must be the expression or array creation expression this is because That I am attributing it to that I am creating all the items which are already attributable And when I need to create an object then I have the attribute. Is it another way, or create objects and fastest way to meet looks like you want to assign names and types, like the method of reflection (once) and create a representati...

Green Stripe Artifacts When Encoding Video With FFMPEG & Python -

Image
I am trying to encode (VP8 codec) and FFMPEG (version 2.3.3) and Python I am writing a video using However, I have got these diagonal green stripe artifacts after completing my video encoding and why I am not able to. I have the sequence in the memory in the form of a indexed soft in memory, which I artificially generate by using the method test objectives: def _generate_test_images ( Self, Samples = 50): '' 'Turns an image array gradually from black to white' '' Pixel value = np.linspace (0, 255, samples) imageList = [np.full ((100, 100) , 3), pixel value, dtype = np.uint8) value pixel value in pixels] Return np.array (imageList) I then used Python Subpro Using the SESS module to use the pipe to open FFMPEG and write image data. I have tried using stdin.write and communication, but these two green strips cause problems. This is how I interact with FFMPEG: Import subprocessing as SP parameters = get_params () #provides Information such as threads,...

vb.net - Try Catch for displaying input error messages -

Hey I'm new to using the dictionary in VB.Net and trying to figure out how to try check the appropriate variable type is known about the use of the catch, as is not leaving empty entries about the hard work I'm confused, is an error handling message to the user. I hold it in every key and variable that is output right. For example, would not be like to dim dblTravel = new dictionary (string of, double) dblTravel. ( "Travel_Days", CDbl (txtTravelDays.Text)) dblTravel.Add ( "Private_Vehicle_Miles", CDbl (txtPrivateVehicleMiles.Text)) dblTravel.Add ( "Lodging_Per_Night", CDbl (txtLodgingPerNight.Text)) dblTravel.Add (Add "Travel_Total" , nothing) dim dblExpenses = new dictionary (string, double) dblExpenses.Add ( "airfare", CDbl (txtAirfare.Text)) dblExpenses.Add ( "Car_Rental_Fees", CDbl (txtCarRentalFees.Text)) dblExpenses. Add ( "Parking_Fees", CDbl (txtParkingFees.Text)) dblExpenses.Add ( "Taxi...

python - String explosion when using Dict(zip(fieldnames, data)) function and csv.DictWriter -

I am trying to run the following code, but I constantly get "Dict field names do not have fields: 's 'C', 't', 'd', 'e', ​​'v'. ') As out_file: writer = csv.DictWriter (out_file, delimiter =', ', field name = area name, quoting = csv.QUOTE_ALL) Author: .writeheader () data in line for print (public, field name, data) : Author. Author (line) set and speak = ['diff', 'min', 'max', 'mode', 'mean', 'steady', 'var']; DatSet = [2.88, 21.78, 24.67, 22.04, 23.06, 0.92, 0.85]; Second = Dictionary (zip (set endpac, dataset)); Csv_dict_writer (filePath + 'textFirst.csv, setAndSpike, second) I have done a search for a similar topic, and they have changed all the different answers - in the CSV quote Use modules do not use audits in the DictWriter module, my keys are not to raise a data set, to raise the data set - but the keys come in the form of a string that has exploded...

dns - BIND9 constant servfail -

I want to create a DNS server on my VPS and want to add it to a domain from another provider. In the domain provider's panel, DPS 1 and SDNSOVNET are set as VPS in the form of DNS 2. I'm excavating SERVFAIL again and since I'm new to this, since then I'm out of the trick, is it wrong? My zone file for domain.com: $ TTL 604800 @ IN SOA ns1.domain.com. Root.ns1.domain.com. (3; Serial 604800; Refresh 86400; Retrie 2419200; End of 604800;); Negative cache ttl; @in ns ns 1.domain.com @in ns ns 2.domain.com @ In A 176.31.189.10 N1, in the A 176.31.189.10 NS2 213.251.188.141 Named CheckJoone OK Nominated. The Controller Contains: area "domain.com" {type master; File "db.domain.com"; }; name.conf.options: options {directory "/ var / cache / bind"; Dnssec-Auto-Verification; Auth-nxdomain no; Sun-On-V6 Port 53 (Any;;); Port 53; (Any;};}; Port 53 Firewalls are allowed / blocked by the service activated . I have been going t...

solr fq without specifying field -

I am getting inevitable results in filtered queries. When entering "search string" fq specifies the fields w / o and many hits are found, schema.xml sets the "content" field as the default search field. However, when I enter the content, the returned result is different: instead of "SearchString", if I enter the URL then it is the same: "SearchString" How to make the URL in Default Search Is Solall configured for use in the form? I checked in schema.xml but how it came to know how it was set. Do anyone know? This is most likely as the default area in your solrconfig.xml. Just to ensure that which fields are searching by default in your environment, run the query with debug = true option and in the debug feedback you will see an entry with "parsed_filter_queries". This will provide the actual field on which it is filtering.

c++ - removing last elements from vector until condition -

I have a problem where I need to remove the last element of a certain condition, for example, this element is not zero ) I have written this code, this is the trick - auto next = vec.rbegin (); While (next! = Vec.rend ()) {auto current = next ++; If (* current == 0) vec.pop_back (); And break; } But I will use more than one STL algorithm which I can use (I can use find_if and then erase it, but I can loop once ) I want to remove the elements that I remove ...) Besides, I am afraid that I can use some UB here, should I worry? Your code can be simple: while (! .empty ()) & amp; Vec.back () == 0) Vec.pop_back (); By using std :: removal or std :: removal_if , all the elements will be removed depending on the criteria, so that you get the Std :: find_if As Vlad has been provided in its reply.

Visual Studio 2013 - NuGet loads Restsharp 105.0 with Twilio library. Twilio is dependent on 104.4 -

Image
What's a new twilio package? I have just signed up for your service and I'm getting an exception due to dependence on Sprap V104.4. Restsharp v105.0 with the Nuget Installation Tweeio Library. An error occurs when I suppress this line: var twilio = new twiliorroastclient (account syd, othetokan); Error: The file or assembly could not be loaded "RestSharp, version = 104.4.0.0 ..." You can avoid the problem by installing the correct package of RestSharp via the manager console. Make sure you have The correct default project selected in the dropdown and type: update-package rests-version 104.4.0.0 This should solve the problem.

url - Javascript Reload page with change in param values when params are in no particular order -

After updating the parameter values ​​I need to reload the page location, if paramomas were always in it then it is difficult There is a special order, but they are not. So if there was a fixed pattern, then I could target them through a regex match, for example URL: I was targeting it like this: window.location.replace (window.location.href.replace (sf_id = \ d + & amp; d + \. Survey = form and variation =, 'sf_id = 460 & Amp; 460.survey = form and variety = 25002_2 ')); But now the ultimate event is random, so these are all valid URLs: http: //www.example.html? 15041.survey = form & amp; Sf_id = 15040 & amp; Variation = 25002_1 http: //www.example.html? Variation = 25002_1 & amp; Sf_id = 15040 and 15041.survey = form http: //www.example.html? Param1 = value1 and variation = 25002_1 & amp; Sf_id = 15040 and param2 = value2 and 15041.survey = form I know that if I give more statements, but I do not think correctly, then there is no sp...

java - How to pass exchange ID and originating route ID to a bean? -

exchange getExchangeId () Gives the exchange. Is there any way of passing this value for the method of bean by any method of bean? The same question is about the ID of a route that was generated from an exchange. This value is given by the getFromRouteId () method exchange interface. I know that I can pass the Exchange object completely but it is undesirable to force beans from the camel API in my case. you @ sample ("exchange id") string id, @ simple ("route") String Marg Id, Object Body) {Simple Announcement Bean Parameter Binding public void foo (@imple).} some links

javascript - Uploading, saving, and displaying a user's chosen profile picture using the MEAN stack -

For a site coded in the MEAN stack, I want to allow users to upload an image And then the image is displayed on a user's profile page until it changes it. According to Project Lead, each user has to have a file (I'm assuming in a / user profile directory that is not yet ready). When a user uploads an image, it has to be uploaded in their file. In the html file for the profile page, the profile picture will be the location of the photo uploaded in the IMGRCR user's file. I have seen similar answers as to how to upload and display an image, but I am not sufficiently efficient to use the MEAN heap, to understand exactly how the questions Manipulation of the methods so that it helps my project. I have an answer that indicates in the right direction how can I learn to accomplish this task, if possible, then I can learn how to use the MEAN stack in a better way. In addition to this, many answers I have seen that have seen the state to use angular-file-upload , but again,...

python - How should method names be named in a send/receive environment? -

This question appears in a python context but spreads in other languages. What I'm doing is generating a simulation for the distribution system in a network and I have the ability to send other adjacent nodes in the message network from the nodes. For this I have written a node class. I understand how to overcome the problem of emulating the network, but my problem is this: If I want to send a node message to a node, then how best to readability Do I name the methods? I currently have something like this: class node: def send_message (self, other node, message): othernode.receive_message (self, message) def recem_message (self, other node, message ): Something with the message # but something about the word "receive_message" seems wrong, is there any standard for this situation?

Serve image in Go that was just created -

No image is present when I'm dynamically creating an image IE example_t500.jpg when requested. Will be made from jpg The problem I've encountered is displaying the created image, when the request is requested before the image is being hidden. Package main import ( "image / jpeg" "net / http" "Login" "OS", "strings" "Fmti" "Strenco" resizer "" Github.com/nfnt/resize ") func WebHandler (w http.ResponseWriter, r * http.Request) {var path = "../../static/img/photos/2014/11/4/test.jpg" ResizeImage (path, 500) http.Handle ( " / ", http.FileServer (http.Dir (" example_t500.jpg ")))} func ResizeImage (path string, width UIT) {var image = extension cords." .jpg ") var ImageNum = string.plit (ImageExtension [ 0], "/") var ImageName = ImageNum [len (ImageNum) -1] fmt.println (ImageName) file, err: = os.Open (path) that mistake! = null This is my f...

javascript - Backbone change model and change the properties of the new models -

There is a model of backbone that will change when a property is converted into a new model, also the default property They change them. / P> Recovery model and asset change var model = window.collections.elements.get ('c1'); // Change attribute css.background.value = red var vals = model.get ('css') ['background'] ['value'] = 'red'; Model .set (wal); Model.trigger ('change'); I also change a new property // Adds new model and inherits that model, which changes new_m = new Made maker. Model Widget.H2 (); Window.collections.elements.add (new_m); Console.log (window.collections.elements.get ('c2'). Get ('css')); // Change properties and new model change css.background.value = red console UPDATE solution 1 Thanks to MacGennell Solution 2 var model = window.collections.elements.get ('c1'); Var newModel = $ .extend (true, {}, model); So apparently the spine is not strong enough to clo...

Converting Dictionary to JSON in python -

r = {'is_claimed' है: 'ट्रू', 'रेटिंग': 3.5} r = json.dumps ( R) file.write (str (r ['रेटिंग'])) मैं json में अपने डेटा तक पहुंचने में सक्षम नहीं हूं। मैं क्या कर रहा हूं? प्रकार त्रुटि: स्ट्रिंग इंडेक्स्स को पूर्णांक होना चाहिए, स्ट्र json.dumps () एक ऑब्जेक्ट को डिक्शनरी बनाता है, एक जेसन (ऑक्स) नहीं है! इसलिए आपको इसे इस्तेमाल करने के लिए अपने स्ट्र विधि का उपयोग करके! json.dumps () एक सहेजने की विधि और json.loads () को पुनः प्राप्त विधि के रूप में देखें! यह कोड नमूना है जो आपको इसे और अधिक समझने में मदद कर सकता है आयात json r = {'is_claimed': 'true', 'rating': 3.5} r = json.dumps (r) loaded_r = json.loads (r) लोडेड_आर ['रेटिंग'] # आउटपुट 3.5 प्रकार (आर) # आउटपुट स्ट्र टाइप (लोडेड_आर) # आउटपुट डायस्ट

python - split a list of tuples based on the value in the tuple -

I have a list that looks like this: Each of the names of the name of Tuple, start, stop and a direction: major_list = [('a', 20,30, -1), ('b', 31, 40, -1), ('c', 41,50, -1) ('D', 51, 60, + 1), ('z', 90,100, -1), ('E', 61, 70, + 1), ('F', 71, 80, + 1)] which needs to be split in such a way: [[('a', 20,30, -1), ('b' 31, 40, -1), ('C', 41, 50, -1)], [('P', 51, 60, +1)], [('z', 90,100, -1]], [(There are two rules to divide in the e-list: 1) If the stomach (1), (1) between tuples 20> make a new list [or] 2) If imminent In the opposite direction of Tuple (say 'C', 41, 50, -1), ('D', 51, 60, + 1), create a new list after 'C' here As far as I have so far: for split list = [], enumerate (main_list) in tup: If I! = Len (major_List) -1: if i == 0: tmp_list = [] next_tup = key_list [i + 1] if (st (int (next_tup [1]) - int (tup [2])); 20 ) Or (next_tup [3]! = ...

swift - Xcode builds app correctly, but unable to launch? -

I'm running 10.10 with Xcode 6.1. And I'm having trouble getting an app. I was written to work, after a few hours and hours, I finally accidentally messed up with something to make it properly Got it, but now I'm getting an error, I do not have permission to view the file (if I open directly in Xcode) or if I try to open it, it tells the searcher that the app is damaged or corrupted and opencan not be done. If it means that it is written in Swift. I have really spent 6 hours on this (just trying to make it) so that any help would be appreciated! Austen Anyone needs to take a look if Xcode workspace, project, files, and a build: There are many problems here I can not help you with all of them, but I can keep you on the right track. The app will not launch because it was not created correctly. In particular, no actual binary executable is manufactured. APP You can choose it by right-clicking on server checker.app and selecting package contents . Contains a...