Posts

Showing posts from September, 2012

python - Is there a way to gray out (disable) a tkinter Frame? -

I want to create a GUI in the tanker with two frames, and frame graded down until something happens Ho. Some example code is: to tkinter import from * tkinter import ttk def enabled (): frame2.state (statespec = 'enabled ') # Error root = Tk () # top frame frame 1 = ttk.LabelFrame (root, padding = (10,10,10,10)) frame 1. Grid (column = 0, line = 0, padx = 10, padi) = 10) button 2 = ttk.button (frame 1, text = "it enables the bottom limit", command = enable) button2.pack () # Creations below frame frame 2 = T.T.Label Frame (root, padding = (10,10,10, 10)) frame 2. Grid (column = 0, line = 1, padx = 10, pd = 10) frame 2 State (statepak = 'disabled') # Error entry = ttk.Entry (frame2) entry.pack () button2 = Ttk.Button (frame2, text = "button") button2.pack () root.mainloop () Is it possible that all widgets in frame 2 are grayed out individually? I am using Tkinter 8.5 and Python 3.3. Of course this is not elegant, but I found a so...

Find physical coordinates of a pixel in a fits file with python -

I am stuck in a python script to get the physical sky coordinates of a given pixel from the wcs of astropy I would like to use, but I will do anything from within the dragon I have tried these two snippets of code. Astropy.io Import fits from to WCS def astropymethod1 (IMG) from ASTROP. WESSES: # from http://astropy.readthedocs.org/en/latest/wcs/w = WCS (IMG) lawn, lat = w.all_pix2world (100., 100., 1) Print Lawn, Let Df Astropaimeth 2 (IMG): # from http://astropy.readthedocs.org/en/latest/wcs/hdu = Fits.open (IMG) w = WCS (HDU [0] .hader) Lone, LET = w.wcs_pix2world (100., 100., 1) Print Lone, LET me The first time I get the error when I try to use WCS for the first time and the result is only pixel value at any time. I've gotten. Warning: FITSFixed Warning: WCS conversion is associated with more axes (2) images (0) [astropy.wcs.wcs] The problem is that you have a multi-extension FITS file. Here's an example session showing how you can gain access to the appr...

javascript - What's the difference between .clone() and .html()? -

Jquery के .clone () और .html () फ़ंक्शंस में क्या अंतर है? Jquery documentation राज्यों: .clone () विधि मिलान तत्वों के सेट की एक गहरी प्रति करती है, जिसका अर्थ है कि यह मिलान किए हुए तत्वों के साथ-साथ उनके सभी वंशजों और पाठ नोड्स की प्रतिलिपि बनाता है। एक HTML दस्तावेज़ में, .html () का उपयोग किसी भी तत्व की सामग्री प्राप्त करने के लिए किया जा सकता है। यदि चयनकर्ता अभिव्यक्ति एक से अधिक तत्वों से मेल खाता है, तो केवल पहले मैच में इसकी HTML सामग्री वापस आ जाएगी। मुझे इन परस्पर विनिमय करने योग्य लगता है, इसलिए ऐसी स्थिति है जहां एक का उपयोग किया जाएगा अन्य? .clone () एक jQuery ऑब्जेक्ट देता है जबकि .html () एक स्ट्रिंग देता है। .clone () का उपयोग करें यदि आप jQuery ऑब्जेक्ट की एक प्रति चाहते हैं और उपयोग करें .html () एक स्ट्रिंग प्रारूप में एक jQuery ऑब्जेक्ट के आंतरिक एचटीएमएल प्राप्त करने के लिए इसके अलावा, जैसा कि बताया गया है, " .clone () तत्वों के सेट की एक गहरी प्रति करता है, चयनकर्ता द्वारा पाया गया, जबकि .html () केवल पहले मिलान वाल...

html - No interaction posible after css card flip animation -

OK, I am creating a form so that when user register Link transforms form a : rotateY (180) , now flip is done correctly, but I have no interactivity on the other side of the form, and this data can not be solved for , It can be understood because it is a container that wraps both forms and this container is one that makes an animation, then Education is the solution? Thanks for any suggestions, here's the code: html-> & lt; Div id = "reg-login-wrapper" & gt; & Lt; Div id = "flip" & gt; & Lt; Div id = "login" & gt; & Lt; Input type = "text" class = "input" name = "user-login" id = "user login" placeholder = "name" /> & Lt; Br / & gt; Input type = "password" class = "input" name = "pass-login" id = "pas-login" placeholder = "password" /> & Lt; For label = "kept" & gt; Keep me logged ...

html - How to apply overflow:hidden;? -

Image
I need to hide the content-section at the time of going out of page #. I Need to Use Overflow: Hidden; But I'm not able to apply the desired result to #Page. How to fix any idea? & lt; Div id = "btn-up" onclick = "moveUp ();" & gt; UP & lt; / Div & gt; & Lt; Div id = "btn-down" onclick = "moveDown ();" & Gt; Down & lt; / Div & gt; & Lt; Div id = "page" & gt; & Lt; Div id = "bar-header" & gt; Header & lt; / Div & gt; & Lt; Div id = "content" & gt; & Lt; Div class = "content-section item 1" & gt; & Lt; One name = "anchor-1" & gt; & Lt; / A & gt; & Lt; H2 & gt; Content 1 & lt; / H2 & gt; & Lt; / Div & gt; & Lt; Div class = "content-section item 2" & gt; & Lt; One name = "anchor-2" & gt; & Lt; / A & gt; & Lt; H2 & gt; Conte...

shell - Why is the following bash script not working when called with nohup? -

निम्न की तरह एक स्क्रिप्ट: #! / Bin / bash समारोह हैलो {echo "नमस्ते विश्व"} नमस्कार ठीक काम करेगा, लेकिन जब मैं इसे nohup। /myScript.sh के साथ कॉल करता हूं स्क्रिप्ट अब काम नहीं करता है और निम्नलिखित मुद्रित है: ./ myScript.sh: 5: ./myScript.sh: फ़ंक्शन: नहीं मिला हैलो वर्ल्ड ./myScript.sh: 9: ./myScript.sh: सिंटैक्स त्रुटि: "}" अप्रत्याशित मुझे पता है कि इस स्क्रिप्ट के लिए nohup का प्रयोग करने में कोई मतलब नहीं है क्योंकि यह काफी चलाता है जल्दी लेकिन मेरे पास एक और स्क्रिप्ट है जो चलाने के लिए कई घंटों तक ले जा रहा है और मैंने इसमें उस फ़ंक्शन सिंटैक्स का इस्तेमाल किया है क्या यह तय करने का कोई तरीका है? ध्यान दें कि, आप फ़ंक्शन नाम लिखकर सिर्फ एक लिखते हैं खाली कोष्ठकों की जोड़ी, और कर्ली ब्रैकेट्स में एक शरीर: #! / Bin / bash हैलो () {गूंजती "हैलो वर्ल्ड"} नमस्कार कुछ गोले, जैसे कि बाश, कार्यों को घोषित करने के लिए फ़ंक्शन कीवर्ड भी स्वीकार करते हैं, लेकिन आपके त्रुटि संदेश के आधार पर, ऐसा लगता है कि आप जिस शेल का ...

Use of size() in c++ -

This is the program I want to change "A" from "A" But when I pass a string of more than one word (example: very good) it only takes the first word I understand the use of the replacement (), but I want to try something from scratch I am very new in this #include & lt; Iostream & gt; #include & lt; String & gt; using namespace std; String asesToUpperCase (string word) {for (int i = 0; i & lt; word.size (;; i ++) if (word [i] == 'a') word [i] = 'a'; Return word; } Int main () {string aword; Cout & lt; & Lt; "Enter a word:"; Cin & gt; & Gt; One word; Cout & lt; & Lt; AsesToUpperCase (aword); Return 0; } I think the problem is that you have the operator & gt; & Gt; Use the standard function std :: getline instead of entering several words in a string. Keep in mind that standard algorithm std :: replace which works. For example #include & lt; Algorithm & gt; //...

javascript - Node Canvas/Resemble.js Error: Image given has not completed loading at load -

I'm trying to use in node. It was very far, but I hit a wall with this. function chisimimarity checker () {var resemble = require ("resemble"). Var FS = Requirement ("FS"); Var util = require ("use"); This.admitImage = function (imagePath) {fs.readFile (imagePath, function (error, Faildeta) {if (err) Gden; other {var api = resemble (fileData) .oncomplete (function (data) {console.log (ImagePath ); Console.log (util.inspect (data));});}}); }} New Impressability Checker (). AdmitImage (". / Public / images / test.jpg"); The result in this error: /Users/pcoghill/Projects/imgManip/auth/Servers/Farm/node_modules/resemble/lib/server.js : 38 context.drawImage (hidden image, 0, 0, width, height); ^ Error: Image by loading the load (/Users/pcoghill/Projects/imgManip/auth/Servers/Farm/node_modules/resemble/lib/server.js:38:15) on module.exports.loadImageData not completed the (/ user /pcoghill/Projects/imgManip/auth/Servers/Farm/node_mod...

php - Fast arbitrary-precision logarithms with bcmath -

यहां मुझे जो मिला है function bcln ($ n, $ scale = 10 ) {$ Iscale = $ scale + 3; $ परिणाम = '0.0'; $ I = 0; करो {$ pow = (1 + (2 * $ i ++)); $ Mul = bcdiv ('1', $ pow, $ iscale); $ Fraction = bcmul ($ mul, bcpow (bcsub ($ n, '1', $ iscale) / bcadd ($ n, '1.0', $ iscale), $ pow, $ iscale), $ iscale; $ अंतिम परिणाम = $ परिणाम; $ परिणाम = बीकैड ($ अंश, $ परिणाम, $ iscale); } जबकि ($ परिणाम! == $ अंतिम परिणाम); वापसी बीसीएमयूएल ('2', $ परिणाम, $ स्केल); } लेकिन यह bcln (100) (100, 10 दशमलव स्थानों का प्राकृतिक लॉग) चलाने के लिए 5.7 सेकंड लगते हैं। इसके अलावा, यह अधिक दशमलव स्थानों के लिए हमेशा सटीक नहीं होता है क्या कोई बेहतर एल्गोरिदम है? उस विशिष्ट चलाने के लिए, 573 पुनरावृत्तियों को परिणाम पर व्यवस्थित करने के लिए लेता है। क्या आपको उत्तर के रूप में एक मनमाना-लंबाई वाली स्ट्रिंग की आवश्यकता है? या क्या आपको मनमाना सटीक, या मनमाना एक्सपोनेंट आकार की आवश्यकता है? ओआरए ?? | एक डबल-सटीक फ़्लोटिंग-पॉइंट उत्तर (रिटर्न-वैल्यू) पर्य...

javascript - How can I get a function name when it is being called? -

I'm not sure whether this is a good idea or not, but I want to be able to get the name from within A function, while it's being called. The test code I wrote below seems to work, there is no conflict of name in it, but I can not find the name of the function without knowing it. function and () {return "test"; }; Var x = {and: function and () {this. And return the .name; }}; Document.write (X.And ()); Is there a way to get it which is not binding on the reference (or the value of 'this') on the function? Just this aggregation.callee.name; Try this example using: function MyFunc () {return arguments.callee.name; } Note that

javascript - $routeProvider.when(..) not catching all URLs -

सेटअप: जेड, कोणीय, एक्सप्रेस, नोड। मेरे मार्गप्रदाता में कोणीय की, मुझे कुछ समस्याएं आ रही हैं मैं एक पैरामीटर के साथ एक यूआरएल का अनुरोध कर रहा हूं जो इसे पकड़ नहीं रहा है var ऐप = कोणीय। मॉड्यूल ('myApp', ['ngRoute']); App.config (['$ routeProvider', '$ locationProvider', फ़ंक्शन ($ routeProvider, $ locationProvider) {$ routeProvider // ... कुछ यूआरएल / पृष्ठ छोड़े गए हैं // एसपीए की शुरुआत। जब ('/ डैशबोर्ड /' , ({TemplateUrl: 'partials / index', नियंत्रक: 'dashIndexCtrl'})। जब ('/ डैशबोर्ड / वर्ग /: आईडी', {templateUrl: 'आंशिक / वर्ग', नियंत्रक: 'classCtrl'}) अन्यथा ({ RedirectTo: '/'}); $ locationProvider.html5Mode (सत्य);}]);; जब मैं लोकलहोस्ट / डैशबोर्ड / क्लास / टेस्ट को कॉल करता हूं, तो मुझे रूट पर पुनः निर्देशित किया जाता है। मैं सर्वर मार्गों पर अपने मार्गों को निम्नानुसार घोषित करता हूं: app.get ('/ dashboard', routes.dashboard); App.get ('/ डैशबोर्ड / ...

Python Tkinter - Set Entry grid width 100% -

Image
जब मैं बटन + प्रविष्ट + बटन ग्रिड में, प्रविष्टि केन्द्रित था लेकिन स्तंभ को पूरी तरह से भरना नहीं था। मैं कैसे प्रविष्टि के माध्यम से कॉलम भर सकता हूँ? # पायथन 3.4 .1 आयात io आयात अनुरोधों को आयात के रूप में आयात करने के लिए टिंटर के रूप में आयात करें छवि, इमेजटेक डीएफ़ get_image (): im = requests.get ('http://lorempixel.com/' + str (random.randint (300, 400)) + '/' + Str (random.randint (70, 120)) '/') रिटर्न Image.open (io.BytesIO (im.content)) वर्ग छवि चयन (tk.Frame): def __init __ (आत्म, मास्टर = कोई नहीं ): Tk.Frame .__ init __ (स्वयं, मास्टर) master.resizable (width = False, height = False) master.title ('Image manager') master.iconify = False master.deiconify = False master.grab_set = True image = ImageTk.PhotoImage (get_image ()) self.image = tk.Label (छवि = छवि) self.image.image = image self.image.grid (पंक्ति = 0, कॉलम = 3) self.reload = tk.Button (text ग्रिड (पंक्ति = 1, स्तंभ = 1, चिपचिपा = 'हम') स्वयं। = 'पुनः लो...

SQLite, selecting a row by row index, not id -

I got a sqlite db with 100k rows, however, some of these lines have been removed over time, So that primary keys are not sequential. Now, they have been ordered like 3,569 9 00, n ... The problem is that I have them with the cellophore indexAvitIndEpath 0,1,2,3 etc. in a UITWview Want to make Is there any way i can sort the SELECT * table WHERE id = 0; But compared to ID = 0, I want to select index state like 0; from SELECT * table where table._ table_index = 0; // Do not try this at home Thanks! You can choose LIMIT and OFFSSE options to set a record to a specific location. EX: This statement will return a line at index status 10 SELECT * from the table range 1 OFFSET 10;

javascript - How force use "this" in coffeeScript? -

मुझे ऐसे मदर क्लास में एक स्थिर विधि को परिभाषित करना होगा: class @ motherclass @ परीक्षण = = & gt; Foo.bar (this) # @ @ के साथ, लेकिन अगर आप इसे कोशिश करते हैं :, आप देखेंगे कि यह "मदरक्लास" में स्वत: संकलन करता है। इसलिए, यह वही है, लेकिन वास्तव में नहीं! वास्तव में, मेरे पास मदरक्लास के साथ विरासत में बाल क्लास है @ChildClass @MoreClass तक फैलता है तो ChildClass.test () परिभाषित किया गया है लेकिन इस तरह से: फ़ंक्शन () {वापसी फूबार (मदरक्लास); }; मुझे फू.बार के प्रथम परम की आवश्यकता है ChildClass में ChildClass (और ChildClass2 अगर मैं ChildClass2 वर्ग बना देता हूँ ...), नहीं MotherClass इसलिए मुझे इस गतिशील की ज़रूरत है, स्थिर नहीं। कॉफी स्क्रिप्ट में "यह" कितनी ताकत लिखती है? thx। संपादित करें: मैंने पाया "बुर्क!" समाधान ^^ = & gt; "एवल ('यह')", लेकिन यह वास्तव में crapy तरीके है कैसे बेहतर है? वसा तीर के बजाय स्कीनी तीर का प्रयोग करें: वर्ग @ मार्थ क्लास @ टेस्ट = - & gt; Foo.bar (th...

sql - How do I drop Postgres column with name ["app_id"] -

मेरे पास कॉलम नाम ["app_id"] के साथ एक पोस्टग्रेस कॉलम है (हाँ [[ और " )। मैं इसे गलती से बनाया और इसे छोड़ना चाहता हूं। फिर भी मैंने इसे छोड़ने की कोशिश की लेकिन इसे प्राप्त करने के लिए प्रतीत नहीं हो सकता मैंने कोशिश की है: तालिका वस्तुएं ड्रॉप कॉलम बदलना '["एपीआईआईडी"]'; तालिका लेख ड्रॉप कॉलम ["एपीआईआईडी"]; तालिका लेख ड्रॉप कॉलम बदलना ["" एप_आईडी " दोहरे कोट्स में लपेटते समय (दोहरी करके) डबल कोट्स में लपेटें टेबल ऑब्जेक्ट्स ड्रॉप कॉलम बदलें "[" "एप_आईडी" "]";

Send a POST request with some data, including a file, using Curl -

How can I include my file in the curl request form? Below I need to add input to've got a POST request that includes data "first_name" and "last_name", but now I file. There are examples of where a person is only sending one file, but I am trying to send 1 or more files, and send other data. curl H "Content-Type: application / json" -d '{first_name: "Donny", last_name:' P ', my_file: ???? } 'Https://sender.blockspring.com/api/blocks/319bfef4aad7f3477745048a2da3ae6a?api_key=2e0ef0c216078d60630d1321e67b243a this can be done with a multipart is manually a multipart construction is complicated, so maybe curl is a built-F option Curl local host:. 8000 -f "my_file=@file.ext" -f "name = Daniel, last = P" -v curl man F, --form (HTTP) This allows curl simulation in a filled form in which the user presses the submit button. It enables you to upload to force file name prefix with an @ sign fo...

java - What would be an efficient design for this use case -

I have an experiment case, where I'm starting a timer on a particular method, to see that Does it take longer than X seconds? If so, then I am logging in our logs as fatal. Private boolean is DpxTimedOut (stopwatch stopwatch) {stopWatch.stop (); Long-term time = stopwatch. Jetaneo Time (); Double lasting time in Ascendo = Aided Time / Nano_DivaIoOr; Return (elapsedTimeInSeconds & gt; = DPX_TIMEOUT_VALUE); } Public Zero callDPX () {tryWatch stopwatch = new stopwatch (); // body of law} hold (exception e) {e.printStackTrace (); } In the end {// enter a check here to see if the DPX has expired and then to enter a FATAL if (isDpxTimedOut (stopwatch) {log.fatal ("[dpx timeout] request from 12 seconds Took more time. "); }} Now I have a usage case where I have to keep this stup clock in different classes in many ways. How should I design this? Timeout for different classes will be different and they should be read from the config file. Can someone tell me in a goo...

hl7 - FHIR: .Net Sample code for using extension & "Other" Resource -

Google search did not help but appreciate that you can share a sample code for how to use extensions ; "other resources. Using Net Hl7.fhir.api and Spark Server. You can take a look at several examples of preparations & amp; Resources are sent in FHIR tests, it is not particularly about other , but in the management of extensions on patient or other There really is no difference. To see how to put an expansion on any resource, see Extension Management () Unit Testing, which explains how to use the extension.NET API with.

Why won't eclipse switch the compiler to Java 8? -

Image
I examined a Java project from SVN in Eclipse and realized that it requires Java 8 because it is a pulldown Uses. Eclipse addon and retrieval eclipse for Java 8 and the project is set as: I saw that near bottom, it says that the default compiler compliance is 1.7, so I went to org.eclipse.jdt.core.prefs and According to the set compiler compliance variable 1.8 , however, in the project - & gt; Preferences - & gt; Java Compiler, it still looks like this: I have set up JRE in the project - & gt; Java Build Path: Still the compiler refuses Compile Lambda expression - I get an error that I think if I go ahead and type in Java 7 what will I get? This is the eclipse I am using Edition: Kepler Service Release 1 Build ID: 20130919-0819 Is it the only way to fix a fresh version of this, or is I missing something in the configuration? Secondly, in your screenshot above, your compiler compliance level Set to 1.7 This will treat all your code as if it is...

neo4j - Neo4JClient read all the properties of a node -

I am using neo4jClient on my ASP.Net c # project and receiving data from neo4j server. I can see that neo4j only allows us to define different nodes of different types of different properties. For example a person node may have {name, age, gender, country} as a common field, but in some of them additional properties like {occupation, education, title} May be. So I was wondering if I can read all the properties of the node in a single query, where it places the properties in a key-value pair or some other way so that each combination Do not define classes for. Regards Ray This is in the upcoming list of functions, Progress is not known to:

php - Any alternatives with Global Variables? I don't want to use Global Variables in phpunit testing -

I am using phpunit to create some tests and I have a small problem. I have a $ Json string and I'm using it inside the test tasks to avoid repeatable declarations because the same as $ json string I am now reading that we should not use global variables because this may face difficulties in code maintenance, so I am trying to explain another way to run the test. About creating parameters for the function I thought that when I run phpunit, then this function is being run automatically. This is my code: $ json = '{"name": "John", "age": "22",}'; $ Data = json_decode ($ json, true); $ Name = $ data ['name']; $ Age = $ data ['age']; Class User Test TestCase (Public Works) testCreateUserName () {Global $ json; Global $ name; $ This- & gt; Call ('POST', 'user', array (), array (), array (), $ json); $ This- & gt; AssertFalse ($ this- & gt; Customer & gt; GetResponse () - &...

Javascript: test regex and assign to variable if it matches in one line -

To check whether a regex matches and specifies it in a variable, or it has some default values If it does not, I am currently doing the following: var test = someString.match (/ some_regex / gi); Var result = (test)? Test [0]: 'default_value'; I was wondering if there is any way to do this with a line of code in JS. Explanation: I am not trying to shorten my code but make it cleaner at such places where I am defining several types of variables: var foo = 'bar', foo2 = 'Bar2', foo_regex =% I want just one row here Reggae evaluation result% You can use the operator to test and assign ( || ): var result = (someString.match (/ some_regex / Gi) || ['default_value']) [0]; This operator gives its first operator if that operand is true, and its second operator is someString.match (/ some_regex / gi) Falsei (i.e. Mail), instead of using ['default_value'] . However, if you want to remove the second capture group, for example,...

python - Function call with IP address as argument -

I am working on a scraper which checks for progress for file transfers, a spicy list of IP addresses Closes when a file is completed, then I want to be removed from the sweet list of IP address and taken to a different spicy list, "complete". Beginner: server = {"10.10.10.1": "", "10.10.10.2": "", "10.10.10.3": ""} skeys = Servers.keys () full = [] DEF Denith (server): If the server is in ski: full.append ("{0}". Format (server)) ServerPop ("{0}" .logging (server)) logging ('Server') to complete the list. '(Other than the' {}} to complete the list. 'Format (server) Other: logging.error (' \ '{0} \' unable to move to full list ' Format (Server)) Desired Results: Dehnihith (10.10.10.1) Server = {"10.10.10.2": "", "10.10. 10.3 ":" "} complete = [" 10.10.10.1 "] This is exactly what I get. The file ...

c# - How to access Video from Gallery in Windows Phone 8 -

I searched the whole net and found only photchristostas that works only for images. For the video I came to know that there is no way for the phone 8 and it comes in 8.1. Eg I got the app This app is for phone 8 and can play video from any storage. Is there any way and I'm missing something, any help. True, there is no API for video to choose from. With Windows Phone 8.1, they provided an API in it. And it looks a bit like this, but this string will not do the whole thing .. var.userVideoChoose = KnownFolders.VideoLibrary; I do not really know much.

simpleaudioengine - Why I play/preload soundEffect with error in cocos2dx (ios)? -

Image
चाहे ध्वनि या प्रभाव से पहले लोड हो। यहां कोड: CocosDenshion :: SimpleAudioEngine :: sharedEngine () - & gt; playEffect ( "debug.mp3"); मुझे यह त्रुटि मिल जाएगी: ExtAudioFileOpenURL एप में ध्वनि फ़ाइल मौजूद है और फ़ाइल सही है। अब मैं इसे ठीक करता हूं इसके कारण मैं "सभी सी + अपवाद" जोड़ता हूं।

image processing - OpenCV: Improving the speed of Cascades detection -

I have to find people to use OpenCV Cascades in real time. Currently I am using trained cascade files which come with OpenCV but later I would train my own LBP cascades to gain mobility. I have a question. What are the ways to speed up Cascade Detection? For example, see it is really fast, Higher Cascade and makes good use. What types of things can I do to achieve this speed, especially for a real-time application? Any trick and hacks? I'm not sure what to expect from "speed" in your video example It is difficult to understand how "speed" has been done there. In computer terms, when we talk about the "speed" of detections, we generally mean the frames per second (FPS) or millisecond run-time of the algorithm for each other or video set. If the FPS input received by the algorithm is similar to the FPS of the video, it is called real-time or 1x processing speed. If the process of FPS is more than input FPS, then you are faster than real-time p...

git - Moving from hg to github -

I found my search and found this link useful. I followed everything and it works fine, but how do I use my github now? Where is the new repo place on Jithub? I just found out that I'm wrong / path / to repo / It should have been local (I just read the error message carefully !!! - For a lot of fast reading ..) Path / Per / Repo is the location of your local store on your system. a????

java - Why is head.data = 0 when head.next == null? -

Working assignments on the HW assignment is to revert to a linked list repeatedly. I do not understand that my system.out.println (head.data) line head.data as always 0 Why does print Assuming that I enter 4,5,6 (For this work, enter fill and reading methods, if I put a print in my last, then it shows that the head is still 4 , 5, 6) and Head.next is zero , that does not mean that is head.data is equal to 6 ? I know that I am getting many other problems while trying to reverse it, but I do not understand why head.next is null the Head.data is 0. I thought head.next was the next item in the list, not currently. Reverse public fixed node (node ​​head) {node n = node node (); If (head == zero) {return n; } And if (head.next == faucet) {System.out.println (head.data); N.data = head.data; Head.next = null; N.next = reverse (head.next); Return n; } And {reverse (head.next); Return n; }} lower: node n = New node (); If (head == zero) {return n; } The r...

c# - How to pass ViewModel property as model to partial view? -

I have LogViewModel called ViewVodel, I have 3 properties that are shown below. public class loginwoman {public INIMERABLE & lt; Logs & gt; Logs {received; Private set; } Receive public endorsement helper endorsement; Set; } Public log filter filter {get; Set; }} The LogView model has been sent to look at the model. Now I have to pass the log filter (with data) with a partial view such as: @ html.partial ("_logsfilter", model.filter) I tried several methods, but always get the same error: The model item given in the dictionary 'Infrastructure' Presentation.Desk.ViewModals.LogvivodelModel's, but does this require a model in any dictionary idea? = "text"> Because the filter property is zero, the framework model will pass from the parent view to partial, which is the logwmimodal , whereas the partial view is logfilter . P> @ html.partial ("_logfilter", model.filters? New logfilter ()) ...

html - Is it safe to let PHP generate my stylesheet with file_put_contents? -

Trying to create a retaining website, I thought it would be good to call HTML in lines with PHP And only one stylesheet css required, in this way I can edit CSS once, for many goals. I manage it in this way: This essential element is PHP calling: So this is a checkbox-1pp file, which is said in HTML: This is the same php file, the required stylesheet is written in the stylesheet, which has not been done earlier: But I think it creates problems with security as well as many requests, because it is affecting the stylesheet on the server, which should be writeable and Trying to reach more than one person. Am I right or is this a safe way? If not, would it be possible to do it in another way? Create a new stylesheet per user? Temporarily? Thanks in advance! This solution is not good ... and this is the reason: As I can see, you are modifying the same CSS file. This will affect all users who are waiting for the site. With many refresh, file_put_conte...

javascript - CSS: z-index doesn't work prperly when i append the new div element -

I want to apply the website about attracting some rectangles and stickers configured by the devil element. Click the sticker or rectangle, user button. I want to arrange the div element in the sequence below (upper) sticker & gt; Rack & gt; Rectangle & gt; Canvas (bottom) So I used the Z index in the style sheet. #canvas {status: relative; Z-index: 1; ...}. [Position: Absolute! Important; Z-index: 2! Important; ...} .rack {status: complete! Important; Z-index: 3! Important; ...}. Sticker {status: complete! Important; Z-index: 4! Important; ...} This works well, when the elements are allocated by HTML code. & lt; Div id = "canvas" & gt; & Lt; Div square = "rectangle dragableable" style = "left: 0 px; top: 0 pixel; width: 200 px; height: 300px;" Type = "rectangle" id = "rectangle_org" & gt; & Lt; Div class = "rack dragableable size" style = "left: 0; above: 40px; width: 5...

javascript - How to pass a parameter from a link element to a modal window? -

I have a table with a link in a cell of the table like this: & lt; Data-Toggle = "Model" Data-id = "XIs" href = "# RemoteModel" Data-Target = "#Remote" and gt; SOME_TEXT & lt; / A & gt; . When I click on this link, then I should open a model here is an example: The modal should do some operations which depend on the value of the "Data-ID" attribute. To be accurate, I need to read this value in the Javascript code: & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('# remoteModal'). ('Show.bs.modal', function) {console.log (/ * How do I read the data-id value? * / );});}); I do not know how to read the value of this attribute in the JavaScript code of the model. Many thanks for your interest. Use the mentioned in event docs: $ (document) ) .ready (function () {$ ('# remotemodal'). ('Show.bs.modal', function (event)...

php - kashflow api script keeps failing to connect -

I have the problem with the script linked to Kashmir from our website, when a customer enters his order and checkout Lastly, the site is considered to be connected to Kashmir but instead the following error occurs. Notice: Undefined Index: $ name /home/expressn/public_html/ajax/kashflow/includes/kashflow.inc / P> What is needed to solve this problem? Include the public function ($ customer) {$ parameter ['custr'] = array ("customerID" =>, "code" => '= $ Client [' name '], "contact" => gt;' ',' telephone '= & gt; $ customer =' customer '=' address1 '], "address2" => ; $ Customer ['address2'], "address3" => $ customer ['address3'], "address 4" => $ client ['address4'], "postcode" => gt; ; $ Client ['postcode'], "website" => gt; "", "EC" =>, "ou...

java - CGLib Enhancer with anonymous class -

I am using CGLib for proxy classes. I have turned down a problem where I can not increase anonymous classes because they do not have any default constructor. My code looks like this: Enhancer enhancer = new enhance (); Enhancer.setCallback (new method interceptor () {....}); Enhancer.setSuperclass (type); // Type is the class that I am trying to increase .create (); However this throws the following exception if the enhanced category is anonymous (no default constructor). java.lang.IllegalArgumentException: There is no empty constructor in Superclass > The validator of a JVM assures you that you call a valid Constructor Series. The only way around this is to disable the verifier while starting the JVM with the command line and it is not something you usually want to do because it presents many insecurities for your application. In this way, you have to call a legitimate constructor of your anonymous class which has been emulated by the subclass created by cgl...

jquery - printing json data with combining whole data which is returned -

यह मेरा कोड है सार्वजनिक कार्यप्रदर्शन printBarcodeLabel1 (स्ट्रिंग डेटा) {zplstr = zplstr + पर्यावरण। नई लाइन + zpl; जेसन वापस लौटें (zplstr, JsonRequestBehavior.AllowGet); } यहां यह वापस आ जाएगा ^ XA ^ एफटी 90,85 ^ सीआई0 ^ A0N, 38,52 ^ एफडीएसेट नं .: ^ एफएस ^ एफटी 375,85 ^ ए 0 एन, 38,52 ^ एफडीएसएवे ^ एफएस ^ एफटी 90,173 sdfas ^ एफएस ^ XZ - पर्यावरण के माध्यम से नई लाइन। नई लाइन और नीचे ^ XA ^ एफटी 90,85 ^ सीआई0 ^ ए 0 एन, 38,52 ^ एफडीएसएसैट संख्या: एफएस ^ एफटी 375, 85 ^ ए 0 एन, 38,52 ^ एफडीएसएव ^ एफएस ^ एफटी 90,173 sdfas ^ एफएस ^ एक्सज़ ऐसा लेकिन जब मैं इसे किसी डिवा में जोड़ता हूं या जब मैं प्रिंट करता हूं तो डेटा बाध्यकारी होता है या इस तरह मुद्रण होता है ^ XA ^ FT90,85 ^ CI0 ^ A0N , 38,52 ^ एफडीएसेट संख्या: सनएफएस ^ एफटी 375,85 ^ ए 0 एन, 38,52 ^ एफडीएसएव ^ एफएस ^ एफटी 90,173 ^ ए 0 एन, 38,52 एफडीएसेट नाम: एफएस ^ एफटी 375,173 ^ ए 0 एन, 38, 52 ^ एफडीसएव ^ एफएस ^ एफटी 9 261 ^ ए 0 एन, 38,52 ^ एफ डीसियरियल नंबर: सनएफएस ^ एक्सए ^ एफटी 9...

android - How Picasso Actually Cache the Images -

I would like to know how Picasso Library is caching images inside the application. I know that the HTTP headers are used to check the weather to bring images from the network. But, is there a time limit that he is caching images? Discovery of cash in a day or a while? The problem is that my project is loading large numbers of small images from the network. Sometimes, new images appear in the next launch. But, it does not happen for some time. The worst part is, changes in some images are reflected, while others are not changed at the same time. , when I uninstall the app, the change in all images (exactly.) Picasso should have something about caching. And please do not tell me to use OHTPT to control the cache at Don Picasso. My project is using Async HTTu client from Apache and it is too big to update (not by me, of course.) Instead of implementing complete non-compliant HTTP client, a small network with URL connection Makes me a helper.) Anyway, any thought or sug...

node.js - Setting NODE_PATH from within NodeJS application -

We have a node project, for which our own submodules are not required from any relative path, but instead NODE_PATH Environment variables can be set to lib to find all the codes I want to handle this standard case within the program source code But it seems that it is impossible by now. I have found many solutions that do not work as expected at all. Module paths.push (". / Lib"); Another Stackworflow article was suggested but it refers to the developer to use an error message in the new node versions and NODE_PATH . Instead, I tried to do the following as the first line of my program. process.env ['NODE_PATH'] = "./ lib"; This is not the cause of an error message, but it does not work either. I think this variable is read on starting the app and does not read the lateron when the content is necessary. You can find all the information from the source: . .. NODE_PATH error is thrown only when reaching through need.paths . ...

c# - Linq query, select everything from one lists property that starts with a string in another list -

Hello I am new to linq and lambda I have two lists fl.LocalOpenFiles ... list & lt; String & gt; F. .... For example, there is a property to move an index fl.LocalOpenFiles [0]. Path I wanted to select everything from the first list fl.LocalOpenFiles where fl.LocalOpenFiles.Path to list & lt; String & gt; I finally got this ... list & lt; Local OpenFile & gt; Lof = new list & lt; Local OpenFile & gt; (); Lof = fl.LocalOpenFiles.Join (folders, first => first.path, seconds = & gt; second, (first, second) = & gt; first) .list (); But selecting the folders to select it is only first.Path == second and I can not find a way to get the data that I want This "brand" requirement is anything that is present: f [& lt; Any & gt;] == fl.LocalOpenFiles [and lieutenant; Any & gt;] path.Substring (0, f [& lt; any & gt;] length) Another example ... List & lt; String & gt; F = new ...

monaca - How to update onsen-ui states? -

I have a simple onsen-UI sample page. It is made in Onenan (UI) 1.0.4 with Maneka (). This page has two onsen-ui buttons (on-buttons), their visibility is bound by the JavaScript method via angular JS but the buttons are mutually exclusive, which means that button 1 is visible, Button 2 should be hidden - and on the other side. Whenever a button is clicked, an internal flag is changed and the second button is displayed. The problem is: When the page is first loaded, the visibility of the button is not implemented properly. This only works when a user clicks on a button manually. As a counter example, there are two general HTML buttons on the page - these buttons work properly when page loads. Can you give me some advice? HTML code: & lt; Div ng-controller = "AppCtrl" & gt; & Lt; Strong & gt; Click to toggle & lt; / Strong> & Lt; Br> & Lt; Button ng-click = "starttracking ()" ng-hide = "hatcockingering ()...

java - Regex match for a character without previous character -

मेरे पास निम्न स्ट्रिंग है: "स्थान-स्ट्रिंग: स्थान-स्ट्रिंग: स्थान -सी?: \ स्ट्रिंग " जिसे मैं निम्नलिखित तीन स्ट्रिंग्स में विभाजित करना चाहूंगा: स्थान-स्ट्रिंग String.split (regex) का प्रयोग करते समय क्या regex अभिव्यक्ति होनी चाहिए? असल में, मैं बृहदान्त्र पर विभाजित करना चाहता हूं: 'उन लोगों को छोड़कर जो कि' '?' अग्रिम धन्यवाद, प्रधान मंत्री। आप नकारात्मक नजरिए का इस्तेमाल कर सकते हैं यह बृहदान्त्र से मेल खाता है जो ? (? & Lt;! \?) द्वारा जारी नहीं किया गया था: जावा रेगेक्स हो सकता है, "(? & Lt;! \\?):"

JQuery Onchange when not changed -

मैं उपयोग कर रहा हूं: $ ('# input1')। परिवर्तन (फ़ंक्शन ( ) {$ ('# Input2')। Val ($ (यह) .val ());}); जब आप कुछ जोड़ते हैं या बदलते हैं, तो उपरोक्त काम ठीक होता है। मेरा प्रश्न यह है, जब मैं इनपुट 1 का मान प्राप्त करना चाहता हूं और इसे आवंटित करना चाहता हूं Input2 eventhough input1 परिवर्तित नहीं किया गया है? आपको इसे किसी तरह ट्रिगर करना होगा। उदाहरण के लिए एक बटन के साथ। $ ("myButtonSelector")। क्लिक करें (फ़ंक्शन () {$ ("# input2")। Val ($ ("# input1")। Val ( ));}); या फ़ोकस पर $ ("# input1")। फ़ोकस (फ़ंक्शन () {$ ("# input2")। Val ($ ( यह) .val ());}); या किसी भी अन्य ईवेंट पर आपको आवश्यकता होगी।

vb.net - Filling DataGridView from BackgroundWorker -

This is the case: I have a DataGridView form and when I started I should start filling the form DGV with the backgroundwalker . Private Sub FirstSub () adoconn () Me.Enabled = false bw.RunWorkerAsync () Me.Enabled = True End Sub Personal Sub-bw_DoWork (as the object, in the form of e DoWorkEventArgs ) BW handles. DoWork Retarder works as BackgroundWorker = CTYPE (Sender, BackgroundWorker) as DataGridView1.InvokeRequired Then for '// VB 10 you can use an anonymous sub-DataGridView1.Invoke (sub) (bw_DoWork (sender, e)) or else DataBaseLayer. Try FillDTwithSP ("ArticlesSelect", ds_Tables.Articles) Me.DataGridView1.DataSource = ds_Tables.Articles Me.DataGridView1.ClearSelection () Pre-Exception As an Exception Try the other end from the MsgBox (ex.ToString) end, then End Sub After Carlos giving me an example of what I should do, I did this, however Now I have a problem that when I do not even get place in BrakePoint bw_DoWork sub private sub FirstSub () a...

php - How to run htaccess rewrite code on localhost -

SecFilterEngine बंद DirectorySlash बंद विकल्प -Indexes ErrorDocument 404 /not-found.php ErrorDocument 403 /not-found.php RewriteEngine पर RewriteBase / RewriteCond% {HTTP_HOST} xyz.com.au $ [एनसी] RewriteRule ^ (। *) $ http://someurl.au/$1 [आर = 301, एल] # RewriteCond% {QUERY_STRING} ^। + $ # रेवर रायल ^ $? [आर = 301, एल] रीराइटरेबल ^ न्यूज_और_अवेंट्स.asp समाचार-और-विचार? [नेकां, आर = 301, एल] रीराइट्र्युल्यू ^ विवरणअनुप्रयोग। एस्प उत्पादों / अनुप्रयोग? [नेकां, आर = 301, एल] रीरमिट नियम ^ विवरण उत्पाद। उत्पादों / उत्पादों? [नेकां, आर = 301, एल] रीरमिट नियम ^ विवरण उत्पाद। उत्पादों / उत्पादों? [एनसी, आर = 301, एल] रीव्रेट नियम ^ products.asp उत्पादों / उत्पादों? [एनसी, आर = 301, एल] यह कोड को ठीक से सर्वर पर काम कर रहा है, लेकिन यह स्थानीय होस्ट पर काम नहीं कर रहा है। कृपया मुझे कोई आवश्यक परिवर्तन बताएं जो URL में है मुझे लगता है कि स्थानीय होस्ट के रूप में है कि यूआरएल में परिवर्तन की जरूरत है, मैं वहाँ स्थानीय होस्ट जोड़ने है, लेकिन अभी भी काम नहीं तो कृपया मुझे इस मुद्दे को ...

java - How to Junit test and expect an exception whilst maintaining code coverage -

Image
I am trying to write some Jyunet for its application would, I believe I have 80% code coverage But when I see my report as follows; This is a code coverage of I 52% Giving, which is not the idea. Is there any alternative way of writing ways to maintain my upgrade score? The Thank you only Test The code coverage Do not worry about code coverage of the source code (not the test code). If you can Emma are either using Jakao, you can use the filter only equipment or specific sections or report the results of directories. If P> It is very easy if you have src and test different folder

export to csv - Downloadable products in Magento -

Downloadable products in Magento: Export CSV content is not a download link and sample link? How to get in export CSV? Not sure if you are looking for an answer on this. Magento CSV import / export does not support the download link in the same way I wrote it at the end of a week that you should help in a little while.

python - Read geotiff files alttitude using GDAL -

I am using GOIT to read a GODF. I would like to read the Coordination Z "text "> I import OSGO import gdal gdal.UseExceptions () DS = gdal.Open ('test_data.tif') band = D. Eligible to read the Ilyvast from the Getterbund (1) Upgradation = Band. Redsear () print height Size print height

vba - remove data after aprticular key word from excel cells -

I like Some data in my Excel cells "35 xxxxxx, yyyy, zzzzz 1AA call 01234 567 899 01234 567 899 end_of_the_skype_highlighting free agents ideally bla bla bla bla in bla center xxxxxxxxxxxxx_highlighting, they ... and " I followed all data Call 01234 567899 . Here the number is not fixed How can I delete all the data in the phone number exchange in every cell? Thanks Narsapa You may have to rely on regular expression library or write a function, which is to find calls uses Instrr, above everything connects in a temporary string, then repeats the series of numbers later, once you read those lines - using central function on the original string from that point, essentially Leaving sub, "call" string It can be cumbersome, and this may be the possibility of errors To use my recommendation Regex, the following should work as:. sString = "35 xxxxxx, yyyy, zzzzz 1AA call 01234 567 899 01234 567 899 end_of_the_skype_highlighting free agents Ideall...

ios - Import Swift framework in Swift: "Use of undeclared type 'MyCustomView'" -

I have a swift project where I have a framework goal with the custom sub-category of UIView Inside the Xcode 6, you can use the new live view in the interface builder. But when I try to add a @Iboutlet to my project in my UIViewController , I get an "unknown type 'MyCustomView'" error Use and I can not build my project Here's my code UIViewController subclass: Import UIKit Import MyCustomFramework class MyViewController: UIViewController {@Iboutlet var myCustomView: MyCustomView? } And 'MyCustomView.swift' within the 'MyCustomFiewame' target is: Import UIKit @IBDesignable class MyCustomView: UIView {@ IBOutlet var ImageView: UIImageView? Init (coder aDecoder: NSCoder!) {Super.init (coder: aDecoder)}} Does anyone know what I forgot? Did I import it incorrectly? Am I missing something? You should mark the square as public because it has different frameworks Is part of the module @ IB Disableable Public Class MyCusto...

c# - Cannot deserialize the current JSON object..into type 'System.Collections.Generic.List`1[System.String]' -

पूर्ण त्रुटि मौजूदा JSON ऑब्जेक्ट को deserialize नहीं कर सकते (जैसे {"name": " मान "}) प्रकार 'System.Collections.Generic.List' 1 [System.String] 'में टाइप करें क्योंकि इस प्रकार के लिए एक JSON सरणी (उदाहरण [1,2,3]) की आवश्यकता होती है ताकि वह सही तरीके से deserialize हो। इस त्रुटि को ठीक करने के लिए या तो JSON को किसी JSON सरणी में परिवर्तित करें (जैसे [1,2,3]) या deserialized प्रकार को बदल दें ताकि यह एक सामान्य .नेट प्रकार (उदाहरण के लिए नहीं एक आदिम प्रकार की तरह पूर्णांक, एक संग्रह प्रकार की तरह एक सरणी या सूची) जिसे एक JSON ऑब्जेक्ट से हटाया जा सकता है JsonObjectAttribute को एक JSON ऑब्जेक्ट से deserialize करने के लिए इसे लागू करने के लिए प्रकार में भी जोड़ा जा सकता है पथ 'CEC1B0C9-A87A-4A9E-A017-AEFC3CEDCBD4', पंक्ति 2, स्थिति 42। कोड के इस बिट से पहले, एक है कि अच्छी तरह से काम करता है ... var हाइलाइट = जेसन कन्वर्ट। डायरेरिअलाइज ऑब्जेक्ट & लेफ्टिनेंट; ऑब्जेक्ट & gt; (jsonDeserialized ["हाइलाइटिंग"]। टूस्ट्र...

How to prevent edge labels from messing up the layout in graphviz? -

I have a simple vertical graph that looks nice and symmetric without any label using the following code: Diagram test_alignment {{rank = same; A - & gt; B;} A -> C; B - & gt; C; C -> D; D -> E D -> F; {Rank same =; E - & gt; F;}} I want to label the edge between A and B along the edge between E and F, for each Use the same string label. I'm expecting the same output, except that the A-> B and E-> The F edges are divided by the same label. Unfortunately, as soon as I add a label to one of these edges, the normal layout appears on the slightest side (the result is the same if I add a label on the E-> F edge): diagram test_alignment {{rank = same; A - & gt; B [label = "label"];} A -> C; B - & gt; C; C -> D; D -> E D -> F; {Rank same =; E - & gt; F;}} I am very new to grapeways and, following the many questions on stack overflow, I experiment with different combinations of ranks and constraints Try...

javascript - Jquery returns json as string -

मैं json ऑब्जेक्ट को PHP से Jquery AJAX भेज रहा हूं मैं json डेटा प्राप्त करने में सक्षम हूं, लेकिन ऑब्जेक्ट के बजाय स्ट्रिंग फ़ॉर्मेट में है PHP कोड $ userdata = json_encode (array ("प्रथमनाम" = & gt; $ fName, "LastName" = & gt; $ lName, "PhoneNumber" = & gt; $ फोन, "ईमेल आईडी" = & gt; $ ईमेल, "बैलेंस" = & gt; $ शेष)); प्रतिध्वन $ userdata; जावास्क्रिप्ट $ (दस्तावेज़) .ready (function () {alert (); $ .ajax ({type: "post", url: "Viewprofile.php", contentType: "json", डेटा: {"somedata": "anydata"}, सफलता: फ़ंक्शन (प्रतिक्रिया) {चेतावनी (प्रतिक्रिया); $ .each (प्रतिक्रिया, फ़ंक्शन (कुंजी, मान) {चेतावनी (कुंजी + '' + मान);});}, त्रुटि: कार्य (एक्सर, एजेक्स ऑप्शन, फेंका गया त्रुटि) {चेतावनी ("त्रुटि:" + xhr.status + "" + thrownError);}});}); मुझे सफलता समारोह के पहले अलर्ट में पूरे जेसन मिल रहा है लेकिन जब मैं जेसन स...