Posts

Showing posts from August, 2012

python ElementTree xml: parsing fromstring vs building elements -

Given a large array of numbers where: [1, 2, 3 , 4 ...] = & gt; & Lt; Tag attrib = "1" /> & Lt; Tag attrib = "2" /> & Lt; Tag attrib = "3" /> & Lt; Tag attrib = "4" /> ... Which is more efficient / fast: a) Make them scratched using the element ("name", attributes) or b) from fromstring (str) where str is the string representation of those tags in the instance Update Test: to xml.etree.ElementTree import element, XML, tostring Elit: eroot ERR = Element ('Route') for .append (element ("tag", {"attrib": "antib"): time for import from time to time in estist = [xchange (1000) E for test_normal () Elit E for AIT test_list (): eroot = Element ('root') [eroot.append (element ("tag", {"attrib": "% s"% e})) ] Print "etree:% .6f"% timeit (test_normal, number = 1000) from xml.etree.cElementTree import el...

Cmake errors of installing ccons -

After executing cmake cmakeLists.txt , which gives no error, Returns the following error: : / usr / local / src / llvm-3.1.src / tools / ccons $ sudo create [7%] Building CSF object CMakeFiles / ccons.dir / ccons. Cpp.o /usr/local/src/llvm-3.1.src/tools/ccons/ccons.cpp:1x: Error: Bad Value (x86_64) -march = to make swi tch [2]: *** [CMakeFiles / Ccons.dir / ccons.cpp.o] making error 1 [1]: *** [CMakeFiles / ccons.dir / all] Make Error 2: *** [All] Error 2 Is there any way to solve it is? First of all, why are you building software using sudo Are you He is asking for trouble when you are installing, then you should only need sudo (i.e., install sudo ). For whatever reason, your compiler flag -march = x86_64 , which thinks it is invalid. To see if I'm trying to compile with the blanket, do the following: Run edit . t> Code> Allows you to see additional cache variables to switch to advanced mode. Search for variables starting with CMAKE_CXX_FLAGS...

html - I can't get background image to show up on Internet Explorer -

body {मार्जिन: 0 पिक्सेल; गद्दी: 0; पृष्ठभूमि: # 777 url (foodwine.png) केंद्र तय; पृष्ठभूमि दोहराने: नहीं दोहराने; text-align: केंद्र; } मुझे इस पृष्ठभूमि की छवि को आईई 7 पर दिखाने के लिए प्रतीत नहीं हो सकता (मुझे अन्य आईई के बारे में निश्चित नहीं है)। मैंने सभी की कोशिश की है विभिन्न प्रकार के भिन्नरूप और spacings लेकिन यह सिर्फ IE में दिखाना नहीं चाहता है। किसी भी मदद की सराहना होगी! संपादित करें: मैं छवि का उपयोग करने के लिए रेल का उपयोग कर रहा हूँ और यह फ़ायरफ़ॉक्स / क्रोम में काम करता है। मैंने '/images/foodwine.png' के साथ निर्देशिका निर्दिष्ट करने की कोशिश की लेकिन अब यह किसी भी ब्राउज़र पर दिखाई नहीं देता है। यह वह पृष्ठ है जिस पर मैं काम कर रहा हूं। इसे आज़माएं: शरीर {मार्जिन: 0; गद्दी: 0; पृष्ठभूमि: # 777 url (foodwine.png) नहीं-दोहराने केंद्र तय; text-align: केंद्र; }

android - When should I start and stop my notification service? -

I do not want the user to be in the application during the notification service application. As of now, I'm starting it in Creative and Reissue methods and stopping it in on pause method. Is it true? Also, is it enough to specify the intent to stop and implement the stop service (intent)? There is no direct connection between the methods of opening and stopping, except that they refer to the same class. Thanks for any help. The activity is lifecycle. As you will see, onCreate () and onResume () activity is said to be said before so that you do not start your information service there Want to do You should stop it instead. It is a good idea to do this at onResume () because it is the entry point of your activity. is OnPause () where users move away from the activity, so this is where you want to start the service again.

Draw line on map when button is clicked (using Google Maps API 3, Javascript) -

I am using Google Maps API3. I have a map and a button. On the map, I have two markers when I click on the button, then I want to draw a line between the two markers. Not sure why you need Ajax with 2 markers and Google Maps API v3 Can draw a straight line between the two. Something like this (play on the button click) should work with the correct names of marker 1 and marker 2: var polyline = new google.maps.Polyline ({Path: [marker1.getPosition (), marker2.getPosition ()}); Check it in IE In the address bar with: Javascript: {var polyline = new google.maps (Path: [gunners [0] .getPosition (), gmarkers [1] .getPosition ()], map: map}}}

Rubymine Close File Shortcut (Mac or Windows) -

How can I turn off the current file (in Rasmin)? I do not want to click on the 'X' because I hate the mouse, and I do not want to "turn off all the modifications", just want to close the current file with focus, like I would command in any other program Mack by pressing W I'm sure you've missed. The shortcut depends on the keymap and can be customized, but the default one Ctrl + F4 on Windows and CMD + F4 on Mac Verify the shortcut in settings keymap , make sure that it does not conflict with other apps, for a separate shortcut Close Try to map the operation. It works fine, I have checked it twice.

- Where Developers Learn, Share, & Build Careers

I am trying to apply an HTTP request response from the Android to GAe Servlet. Requesting from Android is the normal http post request. It's working fine The problem is that I'm sending back Android to Jason's response. I created Jason Ojjest using GSN (GSN v2.2.2) When I tested in the browser, it shows the GSN format correctly. Jason, {"data1": 100, "data2": "hello", "list": ["string 1", "string 2" , "String 3"]} I tried to send this json / * Json is my Jason format / response.getWritet () . Println (json); and system.out.println (json); When I try to read Jason object in Android then I'm getting an exception, value Please suggest some other ways or help me fix it, thanks. Your page is inserting the HTML code ( & lt; html & gt; & lt ; Head & gt; ) Either enter all the HTML and then process JSON (perhaps you can find it easy by putting a JSON in a sp...

php - Which fields get persisted to database if I extend from FOSUserBundle User entity -

I am pushing my UserBundle with FOSUserbundle I see that in model / user.php Is a full user class and Entity / User.php I have my class namespace MYS coreBundle \ Entity; Use FOS \ UserBundle \ Entity \ User as BaseUser; Use the theory / ORM \ mapping as an ORM; As the Symfony \ Component \ Validator \ Constraints use; / ** * @ORM \ unit * @ORM \ table (name = "fos_user") * Expands / Class User BaseUser {/ ** * @ORM \ column (type = "string", length = "255" ) * @Assert \ NotBlank (message = "Please enter your name.", Group = {"registration", "profile"}) * @Assert \ minLength (range = "3", message = "name is too small . ", Group = {" registration "," profile "}) * @Assert \ MaxLength (limit =" 255 ", message =" name is too long ", group = {" registration "," profile "}) * / Protected $ firstName; My questions are: Are there any d...

How to adjust sizes of x-axis in dendrogram (R)? -

Image
I would like to adjust the X-X in a denorder, where all the labels can be seen for large data sets. For example, I use iris data here: & gt; Iris.data = subset (iris, select = - space) & gt; D & lt; - dist (iris.data, method = "euclidean") & gt; HC & lt; - HClLost (D, "Ward") & gt; After using the plot function, the dendrogram will be like this: Plot (HC, hang = -1, main = "dendrod of the method of ward", label = iris $ species) / P> So, how are I going To accommodate X-X, all the species are clearly seen. Like: @ Roman Lua Trik said: You can do this: png ("plotdendogram.png", width = 1600, height = 800) plot (cex = 1, font = 3) plot (hc, hang = -1, main = "dendrod method of ward", label = Iris $ species) dev.off () You will be able to see the names of the species, although in small font sizes Hope it helps.

- Where Developers Learn, Share, & Build Careers

जब मैं इसे Portrait या लैंडस्केप । window.addEventListener ("अभिविन्यास", फ़ंक्शन (इवेंट) {rotateScreen ();}, झूठी); फ़ंक्शन रोटेटस्क्रीन () {चेतावनी (विंडो। औचित्य) चेतावनी ($ (खिड़की)। हल्की ())} जब मैं इसे पोर्ट्रेट पर घुमाने के लिए, मुझे मिल जाता है 0, 294. जब मैं इसे लैंडस्केप पर घुमाने के लिए, मुझे 90, 41 9 मिलता है। यह आंकड़ा उलट है, मैंने इसे $ (document) में लपेटने का प्रयास किया है .ready () लेकिन यह काम नहीं करता है। $ (दस्तावेज़) .ready (फ़ंक्शन () {चेतावनी ($ (विंडो)। हाइट ())}) ऐसा लगता है कि जब मैं मोबाइल को पोर्ट्रेट पर घुमाऊं, तो मुझे लैंडस्केप की ऊंचाई मिलती है, और जब मैं मोबाइल को लैंडस्केप पर घुमाने देता हूं , मुझे पोर्ट्रेट की ऊंचाई मिलती है क्या कोई इसे ठीक करने का सुझाव दे सकता है? धन्यवाद आकार बदलना अभिविन्यास परिवर्तन ईवेंट के बाद ईवेंट शुरू हो जाता है हालांकि आकार बदलना अन्य चीज़ों जैसे वर्चुअल कीबोर्ड दिखाने से भी शुरू हो सकता है। इस प्रकार गोल करने के लिए हम पहले अभिविन्यास परिवर्तन के लिए सुन सकते ...

design patterns - Square and Rectangle can subclass Shape, but can Square subclass Rectangle? -

You have a super class size, square and two rectangular kids, but can you square subclass be rectangle because Square is a special Rectangle is equal to four sides? I have tried to use the theory to check that whenever a superclass is used, it should be able to replace it by its child's class, but if the use of a child class It can not be able to replace it by its super class, it looks like it's ok, but I always feel that squire is not a child of rectangle for any reason Awareness is? Can someone give me some light? You The colonial capacity is a principle in object-oriented programming. . It states that, in a computer program, if TT is a subtype, then T-type objects can be replaced with type S objects (i.e., the type type of the type type T Can be substituted for the object) that desirable property of that program (purity, execution, etc.) Specific to your question: A common example of a violation of LSP is the square class that comes from a rectangle, it i...

visual c++ - HEAP CORRUPTION DETECTED after upgrade the project from vc6 to vc9 -

फ़ंक्शन जो vc6 में लिखा गया था। bool CProductionTestDlg :: GetVariables (सीएसटीिंग strFilename , CMapStringToOb * cVariableMap) {int iMaxEntryLen = 1000; // चार आरजीबीएन्ट्रीनाम [1000]; // पिछले चार * rgbEntryNames = (चार *) malloc (iMaxEntryLen * sizeof (int)); // अब CString strEntryName = ""; CString strEntryValue = ""; यूआईएनटी ui सेपरेटर = 0; उलोंग dwRetCode, dwSizeOfReturn; DwSizeOfReturn = GetPrivateProfileString (cszVariables, NULL, "", आरजीबीएन्ट्रीनाम, आईमैक्सएन्ट्रीलेन, स्ट्रफिलनैम); जबकि (ui सेपरेटर और लेफ्टिनेंट; dwSizeOfReturn) {strInntryName.Format ("% s", और आरजीबीएन्टीरीनाम [uiSeperator]); Uiसेपरेटर + = strEntryName.GetLength () + 1; CString * strValue = नया CString (); DwRetCode = GetPrivateProfileString (cszVariables, strêntryName, "", strEntryValue.GetBufferSetLength (strEntryValue.GetLength ()), आईमैक्सएन्ट्रीलेन, स्ट्रफिलैनैम); StrValue- & gt; प्रारूप ("% s", strInntValue); CVariableMap- & g...

git - Restore original file which was deleted during patch creation -

I have just started using git for some reason I have to make a patch of my changes which will be modified by file revision + 4 new file creation) included. I have been able to successfully make a patch but in the process how some of these have been made, the files that I have created have been removed. I want those files again how can I get it? "post-text" itemprop = "text"> If those files were committed, then a simple git checkout - # or GIT checkout -f head The contents of the working directory should be sufficient to checkout again (but this should be any Present - can override non-now-committed work), so be careful (a git stash is useful first ).

vector - EMA computation using filter function in R -

मैं vectorized संकेतन में इस कोड को पुन: उत्पन्न करना चाहूंगा getEMA2 & lt; -function (x , जीत) {k & lt; -2 / (win + 1) v & lt; -vector () के लिए (i में 1: लंबाई (x)) {if (i == 1) {v [i] & lt; -x [i ]} और {v [i] & lt; -k * x [i] + (1-k) * v [i-1]} वापसी (v)} टेस्टऑप्टपुट & lt; -getEMA2 (rnorm (100,0,1) , 5) मैंने फिल्टर फ़ंक्शन का उपयोग करने की कोशिश की है, लेकिन यह प्रकट नहीं होता कि पुनरावर्ती / कनवर्लिशन विधियों को यह प्राप्त कर सकता है प्रतिक्रियाओं के लिए धन्यवाद, चूंकि फ़िल्टर computes y [n ] = X [n] + अल्फा * y [n-1] आपको परिणाम rescale की आवश्यकता है। f & lt; - function (x , जीत) {अल्फा और एलटी; - 2 / (जीत + 1) फिल्टर (एक्स, 1-अल्फा, विधि = "रिकर्सिव", पक्ष = 1, init = x [1] / अल्फा) * अल्फा} x & lt; - 1 : 10 के & lt; - 3 getEMA2 (x, k) f (x, k) # समान अधिकांश फिल्टर पहले से ही TTR पैकेज में परिभाषित किए गए हैं ।

- Where Developers Learn, Share, & Build Careers

यह काम नहीं करता है: [buildout] extends = buildout.cfg अंडे - = प्येथोन-एलडीएपी अंडे + = psycopg2 व्यवहार हमेशा ऐसा लगता है जैसे कि अंडे + psycopg2 लाइन मौजूद नहीं थी। यह कोई फर्क नहीं पड़ता कि किस क्रम में दो पंक्तियाँ हैं। क्या यह एक बग है? क्या इस परिणाम को प्राप्त करने का कोई तरीका है? दुर्भाग्य से, zc.buildout संस्करण 1.5.2 तक नहीं है इस उपयोग-केस का समर्थन करें प्रत्येक कुंजी के लिए, इनहेरिटिंग सेक्शन में परिभाषित मूल्य युग्म, या तो या कम से कम सफल होगा। : यदि कुंजी + = का उपयोग कर रही है, तो इनहेरिट किया गया मान लें, चीजें जोड़ें, और उसे नया मान के रूप में संग्रहीत करें। यदि कुंजी का उपयोग हो रहा है - = , इनहेरिट किया गया मान ले, चीजें निकालें, और उसे नया मान के रूप में संग्रहित करें। अनुभाग को कॉपी किया गया है, नए मानों के साथ अद्यतन किया जाता है और इसे अंतिम परिणाम के रूप में प्रयोग किया जाता है। आदेश सामान्य अजगर मानचित्रण शब्दों द्वारा परिभाषित किया गया है, इस प्रकार अपरिभाषित; या तो जोड़ या घटाव पिछले चलाता है। क्योंकि दोनों ऑपरेशन उ...

Ruby - the simplest way to read a text file inside a zip file -

What is the easiest way to read a text file inside a zip file in Ruby? Some is required 'zip / zip' zip :: zip file.New ("archive.zip"). Read ("article.txt")

Java Heap Space Error in tomcat -

I am using tomk 7.0.28. I've deployed a war file. There is a structure in this file of war where we can upload files. Now that I am working on that web page, but when I try to upload large files it shows the error of Java as heap space. How can I solve it? You are probably trying to put the whole file in the memory Your first shot in Tomcat JVM startup options - The Xmx parameter should be changed so that it can get more memory In addition, you will have to read one part of the file at a time, and write it on the hard drive so that the memory can be freed.

- Where Developers Learn, Share, & Build Careers

I have tried to fall into a temporary directory and it's running as a remix: Sudo Ruby bz2redmine.rb ... but I get an error: /usr/lib/ruby/1.9.1/ Rubygems / custom_require .rb: 36: `Requirement ': Can not load such a file - /usr/lib/ruby/1.9.1/rubygems/custom_require/1/1/1/rubygems/custom_require.rb36: bz2redmine From rb: Setting from 'Requirement' (Load Errone): 29: `& lt; Main & gt; 'In the settings.rb file is in the same directory as the bz2redmine script. What am I missing? to be a bug in the migration script:

sql - Using SubString when not knowing position or length -

Can someone help me as I need to remove the number after "code =" reference = "? It is not possible to know the number of characters before or after the number as well as the number of length (can also be letters and numbers), but it is always "Reference =" first ", description" object = CTSENORaanG, reference = 0000021357, description = test, currency = EUR, Initial_Date = 15Aug2011 .... The string is from a table with a large amount of rows and I must include the reference of each row in another table SQL Server declare @str varchar (1000) set @ Str = 'object = ctsnorang, reference = 0000021357, description = test, currency = EUR, Initial_Date = 15Aug2011 ....'; Select from substring (col, 1, charindex (',', col) -1) (select substring (@ str, charindex ('references =', @ str) +10,100);; MySQL set @str: = 'object = ctsnorang, reference = 0000021357, description = test, currency = EUR, Initial_D...

wso2 - Message relay for JSON data in wso2ESB -

I am trying to create a simple POC using wso2ESB. I have made a simple pass through Alfaro service with proxy service The problem is that I can not find the full JSON data I have read that it has something to do with axis2-JSON and this problem Generates when JSONArray is in a root, so I decided to use message relay. I have edited axis2.xml as described in the document, thus adding the following lines and & lt; MessageBuilder contentType = "application / xml" class = "org.apache.axis2.builder.ApplicationXMLBuilder" /> But when I try to use a proxy server through the Firefox REST plugin, ESB throws the following exception after restarting the server [2012 -07-12 10: 02: 29,125] Warning - Client worker received unexpected response. HTTP response co Day: 405 HTTP status: not allowed pattern exceptions: SOAP message must not contain a Documen t type declaration (DTD) [2012-07-12 10: 02: 29,125] error - did not NativeWorkerPool exception...

- Where Developers Learn, Share, & Build Careers

I understand that the total roots are the only objects that will be loaded by the client and all the operations total for the objects within the total route The root is done by the same conference, a repository interface should be defined for a root route and any firmness within the aggreate root should be done by "Aggreate Root Repository" corresponding to the total route for any firmness operation. Does this mean that only the only root object in the "Gross Root repository" should be passed for the tasks related to the sub-objects of the total root object gross route? Let me give an example. Suppose you have a school object and student object. Since the student can not exist without any school (you can say that a student can leave school, in this case he is no longer a student), then we have class school {string SchoolName; IList & LT; Students & gt; Students; } Class student {string StudentName; String grade; School miscals; } The school is ...

- Where Developers Learn, Share, & Build Careers

I want to work with PayPal's report When users enter their PayPal email and password If you sign up then I need storage, to use it later, yes? I found this gem - & gt; . How do I use it? I need 'paypal / report' in my business manager . And the documentation says: 'paypal / report' api = paypal :: report.new (user, password, vendor, partner) is required api .daily.inspect I want to add to my merchants. Show.erb, Something like this: & lt;% = api (@ user papo__mail, @ user.paypal_password) .daily.inspect% & gt; So I can not call from the scene? If the user has messed up the account (this gem is used) is it easy or should I only collect PayPal login data? I think the better solution is to complete all the actions within the controller and assign the result frequencies Which you can use in your view. Caching & amp; Examination will be very easy Example: requires 'PayPal / Report' Class MerchantsController de...

javascript - How do I open a jQuery dialog and auto-set its title to the attribute in the HTML tag? -

मेरे पास एक div है, जिस पर मैं title विशेषता सेट कर रहा हूं: & lt; div id = "test" title = "टेस्ट डायलॉग" & gt; कुछ परीक्षण & lt; / div & gt; तब मैं इसके साथ एक संवाद खोलता हूं: $ ('# test')। संवाद ({title: $ (this) .attr (' शीर्षक ')}); पहली बार यह संवाद खुलता है, शीर्षक सफलतापूर्वक सेट हो जाता है हालांकि, अगर मैं संवाद बंद कर देता हूं और उसे पुनः खोलता हूं, तो शीर्षक रिक्त होगा। इसका कारण यह है, पहली बार jQuery ने संवाद खोल दिया है, यह तत्व की प्रतिलिपि बनाता है और title टैग को हटा देता है Itemprop = "text"> मैं इसे open ईवेंट में ऐसा करना चाहता हूं: $ ("# test") .संवाद ({ खुला: समारोह (घटना, यूआई) {$ (यह) .dialog ("विकल्प", "शीर्षक", $ (यह) .attr ('title'));}});

symfony1 - Left join not work in symfony using doctrine -

I am using Symphony 1.4 with theory. I want to create a query with the left join: SELECT * Table 1 to right on table 2 table 1.id = table2.table1_id ... I did this like: Doctrine_Query :: create () - & gt; Select ('*') - & gt; From ('Table 1T') - & gt; Bayangon ('Table 2T2'). Between Table 1 and Table 2, my schema.IML is in relationship. Table 2: Class: Table 2 Local: Id Exotic: Deliver on Table 1_d: Cascade Type: A Foreign Type: An Alien Alius: Table 1 Table 2 In the end, Receives: SELECT * to Table 1, Table 2 ... Adding any left is not a section Do anyone know why? About this, you should give the table of the associated leftJoin ). : $ q = Doctrine_Query :: create () - & gt; Select ('*') - & gt; From ('Table1t') - & gt; LeftJoin ('t.Table2 t2')

- Where Developers Learn, Share, & Build Careers

I have queries and I have executed the query .. The first TXN_HEADER table is from TXN_HEADER select * where txhd_receipt_id = 'receipt_id_val' and while_short_desc = 'to_no_val' From the TXN_HEADER table, we get transaction_no values ​​(such as txhd_txn_nr) that use TXN_DETAIL The table is used to get the transaction details. Select * from TXN_DETAIL where txhd_txn_nr = 'transaction_no_val' and while_short_desc = 'till_no_val My question is that I write these questions illustratively Please, you guys can advise, through which I can add them in a single question in any way, I mean that through the medium of subcategories, through joining Please advise. Join version: select from TXN_HEADER inside TXN_HETER_desc .txt.htm_nr = TXN_HEADER.txhd_receipt_id = 'receipt_id_val' and TXN_HEADER.till_short_desc = 'to_no_val' at TXN_DETAIL.txhd_txn_nr and TXN_DETAIL.till_short_desc = 'to_no_val'

cmd - Automatic download of mp3 file -

I need some help. I run a radio station which uses downloadable news feeds. At the moment I download it manually every hour. I like a script, preferably CMD, anything is not fancy to run like this, which will once download the file (using Windows Task Scheduler) and put it in a fixed folder . The download user / PW is not protected, it is free and thus copyrighted. Will some kind of spirit kick me? Thank you. Use a Windows version is available as part of the package. It is easy to use: wget http://www.example.com/myfile.mp3

tmux start search by typing -

When I type something (like in vim) how can i start searching tmux? Actually, I have (vi mode for tmux): Enter the copy mode: [ Enter search mode: / I type something, then "enter". After every change of search pattern it is "Enter" every very boring type. tmux does not support incremental search at this time, but has been filed.

css - CSS3 smart border colors -

I have run into a small problem with a jQuery UI webpack which I am currently creating. In the app I am showing one of the many preview screens in which the elements are - images, spans, paragraphs - which can be changed when the mouse exceeds the changing elements, I use the class to show a dotted red border. Hover so that the user can know that they can click on the element to change the element. Trouble begins because some preview screens use color schemes that include a red background, which makes me: Hook dotted red border is all but invisible. Maybe there is a smart CSS3 method to use the border color to show in spite of the underlying background color? Any suggestions would be appreciated. I tried something but could not find a satisfactory solution. So I thought that in some way the element meant something to make "touch". Finally I set up {-moz-transform: scale (0.75); -o-transform: scale (0.75); - WebKit-conversion: scale (0.75); Opacity: 1; Filter: Al...

mysql query issue for olympic medal tally -

मेरे पास mysql ओलंपिक में तालिका है और फ़ील्ड नाम हैं देश वक्रार, सोना (इंट), रजत (इंट), कांस्य (इंट) कृपया मुझे ऑलंपिक पदक सूची की तरह आरोही क्रम में डेटा की व्यवस्था करने के लिए क्वेरी करें। `स्वर्ण 'डीईएससी,` रजत` डीईएससी द्वारा `ओलंपिक` के आदेश से, कांस्य डीईएससी;

jaxb - How do I get Json generated by MOXy to understand when model are numbers -

To solve another problem I have gone using JASAB to generate Jasonon from the object model created by (Created by Sun JAXB 2.1. 12). I've noticed a difference that the numeric attribute in the object model is defined as XxLSchemaType (name = "nonNegativeInteger"); BigInteger calculation; jersey converts to "count": 1, but MOXy returns How can I get it to realize a numerical field and not to quote it? UPDATE Eclipse link 2.4.1 and A fix has been checked in streams 2.5.0. July 13, 2012 > Marshall numeric types to JSON without quotation marks. In this case the presence of @ XmlSchemaType annotation is causing a problem. This is a bug and you can use the following links to track our progress on this issue: The external mapping document of Maxie can be used to override mapping at the area / property level. P> & lt ;? XML version = "1.0"? & Gt; & Lt; Xml-binding xmlns = "http:/...

integration - Design: Exposing user interface behaviour to external systems -

I am working on a web application (JavaEE backend) which has a very complex input modal. Allows to capture data, but there is a bunch of mandatory fields such as areas (javascript) restrictions, fields can only be available when a specific value is entered. I want to expose this functionality for external systems and allow them to submit this data to their server. These external systems can be based on both web or client (but I can assume that Customers will use the internet). My first thought is to provide such things as mandatory for these systems through definitions and services of any kind in the field, and they have to present the input modal, though they want it to be mixed with resistance, because the next few months of development During the time the possibility of the types of fields and restrictions will be greatly reduced. These external systems have different deployment deadlines, and for this to work, we have to duplicate all the arguments controlling these restricti...

- Where Developers Learn, Share, & Build Careers

I have participated in some problems while using Nested Enclosure, and I want to know that it is a bug in my coding , Or if I'm trying, it is not basically supported. Like the content: & lt; Wicket: Babysitter = "Primary" & gt; & Lt; Wicket: Message key = "Primary." & Gt; Primary server & lt; / Wicket: message & gt; & Lt; Select ID = "Primary" Wicket: id = "Primary" & gt; & Lt; / Select & gt; & Lt; Wicket: children of the enclosure = "backup" & gt; & Lt; Wicket: Message key = "backup.label" /> & Lt; Span id = "backup" wicket: id = "backup" & gt; & Lt; / Span & gt; & Lt; / Wicket: enclosure & gt; & Lt; / Wicket: enclosure & gt; The question is: Is it ok to use HTML this way, before I want to ensure visibility controllers before I start looking for issues. I have diged some documents and search engines for a ...

javascript - jQuery plugin template -

I'm getting this template to build a jQuery plugin but I do not understand the code, Why declare the plugin as a method of jQuery object, and then we declare the plugin as a method of object $ .fn, why did we do this? Adding the plugin to $ enables you to write: var $ el = $ ("myselector"); $ .myplugin ($ el, {something: "options", second: "one"}); Writing the plugin in $ .fn enables you to write: $ (".myselector"). Myplugin ({some: "options", second: "one"});

postgresql - Postgres SSL error -

I am trying to run a Drupal migration via SSH and Dash (a command line shell), Postgrease Database Copying data from SQLSTATE [HY000]: General error: 7 SSL [Error] SYSCALL error: EOIF detected Postgreres database connection seems , And I only get errors: SQLSTATE [HY000]: common error: 7 [error] connection to server It works well at the local level, so I think the problem should be with postgres and run a script on the SSH - but canceling these errors does not return anything useful. Does anyone know what this can be? A time may expire, check log for the first time (perhaps ssl_renegotiation_limit may change) BTW: IIRC, renigination does not occur after a certain time, but after some transmitted characters (2 GB?)

regex - Regular Expression for email subdomain match -

Does anyone detect regular expressions that match those emails in which they contain a sub-domain? For example, name@subdomain.domain.com or name@subdomain.domain.edu .au preferably to use. I tried to do this: ^ [- +. 0-9A-Z-AZ] + @ [- + 0-9A-ZAED] + \. [E-za-z] {2,4} $ but it also matches name @ Test.org . Do not do anyway for recognition purposes. It will only end in pain. The only appropriate regular expression to validate an email address that searches for "@" sign and at least one period. Nothing; Even the arrival of alphanumerics does not make any sense. At the minimum, you need to really define "subdomain". Everything subdomain is a subdomain? What is included and what is included in it? How do you define "subdomain" by making "top level"? Do you mean "a subdomain"? "Subdomain of a subdomain of a domain that is open for public registration"? At what level of the delegation does it b...

c++ - How to add time based restrictions to prevent a Windows user from logging in? -

I am trying to add some modifications to the Windows login screen which allows the user to log in They have time remaining on that day. I also want to allow time to increase the connection through the wireless device. I have done the same thing, with Asus Face Login, and Bluetooth login, and I will not have any problem writing code, but how can I ban the login screen? Am I correct in assumption that this can only be done using C ++? If so, I mainly program in Java, so when you recommend the environment for C ++? Any suggestions and links to resources are appreciated! Thank you I'm not sure much at all, but this can be done: The task scheduler in the window is The user gives a facility to run a special program on logon. So you can develop a program that will run on logon. The program may be something like this: First of all, it will be available to the current user, check the time available with the user. This can be done by the user by saving the time spent in the ...

Check if element contains another one in jQuery -

I found many related things on stack overflow but are not applicable to my case. For all this example, I need to see that there is an element in another element, and if yes, then add something. $ (".bt_repondre"). Click (function () {comment = $ (this) Parent (). Parent (). (); // I want to comment whether the comment should be a .comment_full element, if not, Attach the comment .append ('add');}); Hope you can help me, I tried many things ... just use the .find () and check whether the element returns, such as: $ (".bt_repondre" ). Click (function () {Comment = $ (this) .Parent () .Parent (); if (! Comment.find ('. Comment_full') length) {comment.append ('add'); }});

django - Occasional IntegrityError on m2m fields using PostgreSQL -

I can not detect any patterns, perhaps in every 1,000 edits of a specific model, at 1 one M2M field Gives an Integrity Arrayer Most of the time this area was not modified too. When a model is saved, I believe that the DJgo always wipes the M2M field and then adds the item again, right? I looked at the clear () call to Dijena and then show the plus () s item. My code then fails: Integrity: Duplicate key value violates unique obstacle "app_model_m2m_field_key" extension: key (model 1_id, model2_id) = (597) , 1009) already exists. It seems that the items are added before adding items, which is very strange. I have tried to reproduce it but it is very difficult, only sometimes it happens, by any idea what can this be? Maybe you can set yourself to solve this problem? Thank you in advance Most likely, you have two requests Request 2 starts a transaction and removes M2M lines with the same block where the blocks for the transaction of 1 request Waiting. ...

gem - Exception LoadError in PhusionPassenger::Rack::ApplicationSpawner (no such file to load -- bundler) -

I get this error message when I browse the Ruby on Rail app running on Rebate. I suspect a path problem but I am unable to understand it. I read the proposed solution in this forum for a similar issue, but most of them are again for MacOS I tried to set up a bundler, tried to do this work, but this issue is now There is also user1@company.com [~] # gem install bundler Successfully Installed Bundler -1.1.1 1 Installing Re-Documentation for Mani Installed Bundler -1.1.1 ... Bundler Installing RDOK document for 1.2.1. User1@company.com [~] # user1@company.com [~] # Bundle install error: Gem Bundler is not installed, first run 'Mani Install Bundler'. User1@company.com [~] # Here's my environment user1@company.com [~] # gem list -d bundler ** * Remote Jams *** Bundler (1.2.1) Author: Andro ?? Æ ?? One ?? A © Arco, Terence Lee, Carl Lerche, Yehuda Katz Rubyforge: http://rubyforge.org/projects/bundler Homepage: Http://gembundler.com Dependence of your application ...

- Where Developers Learn, Share, & Build Careers

== DropLogic project: Migrate ================================== ===== = Rack aborted! An error occurred, this and later the migration was canceled: Runtime Error: Failed to execute the statement for this reason: [IBM] [CLI driver] [DB2 / LNUX 8664] SQL0104 N An unlikely token "LIMIT" Was found after. The expected token may include: "First select FETCH & lt; n & gt; ROWS only" SQLSTATE = 42601 SQLCODE = -104: Select projects. Projects with WHERE projects.id & lt; 17 LIMIT 1 How can I fix this? DB2 LIMIT x does not support keywords. An error message says, the proper way to do this is to use FETCH FIRST x ROWS ONLY .

google maps - kmllayer overlay markers? -

Sorry the noob question, but ... I'm adding a km lost layer to my GMAP. Kml is on my webserver and the new Google Map is being brought. I get the default blue icon so far so good, but I want a customer icon and ultimately the ability to change the style based on an event later everything indicates this method. Var marker = new google.maps.marker ({status: new google.maps.LatLng (56.8848, 14.7730), map: map, title: 'my workplace', clickable: wrong, icon: 'http: // google -maps-icons.googlecode.com/files/factory.png '}); It seems that it only controls the marker determined by the wave length. In other words only one point How do I create a custom marker for all my sites? Define within km. Specify an icon style: & lt; Style id = "mm_orange_hd2" & gt; & Lt; IconStyle & gt; & Lt; Symbols & gt; & Lt; Href & gt; Http: //missouristate.info/images/2010/homecoming/mm_orange.png< / Href & gt; & L...

Formatting data to .csv using python -

मेरे पास निम्न स्ट्रिंग है string = "प्रथम नाम | अंतिम नाम | आयु" जब मैं इसे मुद्रित करता हूँ तो यह इस तरह दिखता है: प्रथम नाम | अंतिम नाम | जब मैं सीएसवी फ़ाइल को प्रिंट करता हूँ writer.writerow (datac [0]) ऐसा दिखता है यह: एफ, आई, आर, एस, टी और इसी तरह ... मैं एकल पंक्ति में कैसे प्रिंट करूं? इस तरह रो 1 प्रथम नाम | अंतिम नाम | आयु writer.writerow () अनुक्रम की अपेक्षा कर रहा है । चूंकि तार पात्रों के अनुक्रम हैं, इसे इस तरह व्याख्या की जा रही है। यदि आपकी पंक्ति में केवल एक तत्व है, तो आप ऐसा संकेत कर सकते हैं: writer.writerow ([datac [0]]) या लेखक। लेखक (डेटाक [0: 1])

database - Web application to organize and serve a library of PDF files -

I have a large library of PDF eBooks, and I want to host my web site to host the web app I am searching for the database of files, as well as the ability to add comments by adding data such as publishers, year published, keywords, authors, etc. I have a great hosting provider (such as Drupal, Django, Rails, node, etc., as well as MySQL and Postgres servers, so language and back-end are not important, though .NET is out. I have searched everything and can not find anything fit for the bill, although it seems that someone should be open before this, I am not interested in services like Mendeley (http://www.mendeley.com) Instead, I can host myself, for both To overcome the size limits and privacy issues, but from this I can see the source and modify it if necessary. You need a document management system. Check out or

html - make the 'this' keyword refer to the calling object (javascript) -

I have read some topics about this, however, I still can not understand it. Just what I want what is giving 'this' statement gives context to the object that is calling the function, while it talks about the window .. My function looks like this: function bckClr (clr) {var elmnt = this; Elmnt.style.background color = clr; } And I call it like this: & lt; Div & gt; Onmouseover = "bckClr (# ff0000)" & gt; Lorim Advertising Dolter Site Atom .. Do this like this: & Lt; Div onmouseover = "bckClr (this, '# FF0000')" & gt; Lorim Ipsum Dollar Ast Amit .. & lt; / Div & gt; And then: function bckClr (elmnt, clr) {elmnt.style.backgroundColor = clr; } Update: Update: Updated by using Camel Sees for the surplus property noted by Pranav Kapoor.

- Where Developers Learn, Share, & Build Careers

It's been taking more than a month trying to get help for my site, Can not help. I believe if anyone has to go to the backend of my site, then maybe it can be decided quickly. My problem I have is an article showing 1 on each page. I believe '1' was replaced by a former developer, which was probably the title of the article. When I enclose it with Firebug, it looks like this: & lt; Div class = "item-page" & gt; 1 & lt; P & gt; & Lt; / P & gt; & Lt; / Div & gt; I've spent about 9 hours myself who is trying to find it. I have been suggested to look at the template area several times. While switching 1 templates 1 still appears in the text does not seem to be that it is, I am using Rockettheme Please do not recommend that I just go to the article manager and fix it Let me do it Remember that I saw the first place, it is showing for each single paragraph. I appreciate any help; I am in a disappointing situation here ...

flex4 - FlasCC SWC within Mobile AIR Project -

I am writing barcode scanners for iOS and Android via Flex Mobile and JackXing. The more I have optimized ZXing, however, it is still very slow for continuous scanning on some older devices. I removed some big things using FLASCC in SWIG and received some very good speed during scanning. Although testing on an actual device, I get errors during my app startup. Debug Console "Mutex can not be started" and crashes. Removing a call for my SWC, the app just looks fine. Firstly, it is possible to use this kind of SWC on a mobile device? If so, what am I doing wrong? Also, the size of the generated library is very large (400KB +) Is there any way to reduce the size except all the extra flowering? When you can use FlasCC on mobile, Do not recommend: Your code can run at the original speed and you have access to the OS API. have you visited?

android preferences - CheckBoxPreference group that act like Radio -

I had to launch more than one checkbox on the same screen which would act like a radio list, I saw some implementation of it, But finally I wrote some of my own. Maybe it will help someone. 1) Create a group class, such as: public class Checkbox field group {Private list & lt; Checkbox presentation & gt; MGroup; Public Checkbox PrefricaSGroup (Primary Manager Manager, String [] key) {mGroup = New Arrestist & lt; Checkbox projection & gt; (Keys.length); For (int i = 0; i & lt; keys; lamps; i ++) {last checkbox presentation cbx = (checkbox presentation) manager.findPreference (key [i]); Cbx.setOnPreferenceClickListener (New OnPreferenceClickListener () {public boolean onPreferenceClick (Priority Priority) {onCheckBoxClick (cbx); Back to True;}}); MGroup.add (cbx); }} Private zero on checkbox, checkbox (new checked) {checkbox checked checked = zero; (Checkbox presentation item: mgut) {if (item! = New check & item checked ()) {old che = item; break; }} I...

php - wkhtmltoimage centos 6 error -

I am trying to work on my CentOS 6 server, I have unexpected files, but when I run the command I am getting an error. I'm running wktmltoimage-i386 --load Ignore Terror-Handling /var/www/vhosts/website.com/httpdocs/img/example. Jpg I am getting the error Wkhtmltoimage-i386: Error while loading the shared library: libfontconfig.so.1: does not open the shared object file Could not: Do not have such a file or directory I have followed several tutorials but I'm not fortunate enough to have my background with Windows servers, so Will greatly appreciate any help. I have only one error when I used wkhtmltoimage-i386 I started using this version Did it and it worked. Try it Updated: Regarding this error, you can install the missing directory by the following command: CentOs: yum install libfontconfig.so.1 or on other: apt-Libfontconfig Install .so.1

php - Show MySQL data in table with subsets of data -

Image
I'm trying to retrieve the records from a mysql table and display them in a table. I can do this for individual queries with such personal questions: $ sql = "SELECT Sum (combined_data.List value ') as a total_dollar_mount, calculation (combined_data.sysid) Combined_Administrative_devices where combined_data.`zip code` = 07675 and combined_data 'Office Primary Board ID' = 'W' and combined_data 'list price between 0 and 99 99'; $ result = mysql_query ($ sql, $ link) ); While ($ row = mysql_fetch_array ($ result)) {// these stars cells $ res_07675_0_99999_amount = $ Resize ['total_dollar_amount']; $ Res_07675_0_99999_total_units = $ line ['total_units']; $ Res_07675_0_99999_parent = ($ res_07675_0_99999_mount / $ total_value) * 100; $ Res_07675_0_99999_parent = round ($ res_07675_0_99999_paint, 2);} However, I would like to see if it can be done in a query. By dragging all the records from Zip 07675, then using the subset o...

- Where Developers Learn, Share, & Build Careers

version used: 1.2.3 I have my tiapp.xml: ag.calendar here This is a link to look at: I've ensured that there is no real stable width set. The strange thing is that the calendar is starting to go full width, but not quite. The top part of the calendar and the footer section is not just going to the full width. I used to link to the module used: Replace the line 196 with: CGRact recessed = CGRactam (0, 0, window RX.Width, WindowWrite) .size.height); // CGRCact Rack = CGRactMake (0, 0, minute (popoverrise.width, windowsrequate sequence.With), min (popoverrcod.yes.ite, windowsautactsquiz.height));

- Where Developers Learn, Share, & Build Careers

I am trying to use the following code to get a pie chart for the latest Teneralt from a particular testet . pieconfig = {type: 'TestCaseResult', attribute: 'Verdict', query: rally.sdk.util.Query.and (['TestSet =' '+ testetDropdown.getValue () + '' ',' Date & lt; "2012-11-01" '])}; Var piechart = new rally.sdk.ui.PieChart (pyphonng, rallydesource); PieChart.display ("pieChartDiv"); In this code I have kept today's date manually, but I want to make this query as a normal type which should draw the latest testtrack from a specific testet. Any signals ...? Thank you. Rally has a good datetime format that formats for whatever you want . Reference can be used here:. If you always want the current day in the year-month format, you can: var dateQuery = 'date & lt; '+ Rally.sdk.util.DateTime.format (new date), "YYA-MM-DD"); Then your query will look something like this: qu...

- Where Developers Learn, Share, & Build Careers

Shoppe Gurus! I would like to know that any of these could be possible: Take action in the checkout process and submit some user input for recognition using the 3rd party API Submit some specific details for the same third-party API for recognition from the management panel (for example, the store decides to start processing it) Using the verification result in any case Basic input power will need to be changed. Short answer: Not for both. Long answer: There is a black box for steps 1 and 2 of checkout, no external content is allowed. So you can not add extra stuff to one of those pages. Post-checkout You can send details to a third party for verification, but on the general orders are irrevocable Shopify Order notes: You can add notes to notes through the API None of these options Updating customer information (shipping / billing addresses, payment information, etc.) is allowed. . You can however notify the trader that the order is invalid for an...

header - CSS: bottom margin of H2 directly after H1 -

In H1 and margin-bottom (or H2 higher margin-top) case H1 and H2 directly interchangeably So the normal margin should be applied in the # 1 case, but in case # 2, I want to change some margins (to give more "air" between H1 and H2) H1 h2 {margin ...} and h1 & Gt; Tried by h2 {margin ...} but no success yet. Case # 1 & lt; H1 & gt; Title 1 & lt; / H1> & Lt; P & gt; Text & lt; / P & gt; & Lt; H2 & gt; Title 2 & lt; / H2 & gt; & Lt; P & gt; Text & lt; / P & gt; Episode # 2 & lt; H1 & gt; Title 1 & lt; / H1> & Lt; H2 & gt; Title 2 & lt; / H2 & gt; & Lt; P & gt; Text & lt; / P & gt; h1 + h2 {margin: whatever; } The + selector is the adjacent selector. This will only affect components that are around the preceding element.

ruby - getaddrinfo error with Mechanize -

I wrote a script that will go through all the databases in our database, verify that their website URL works , And find a Twitter link on your homepage. We have more than 10,000 URLs to verify, after a fraction of the URL verification, we begin to get getaddrinfo errors for each URL. Here is a copy of the code, which scraps a URL: def scrape_url (url) url_found = false twitter_name = zero start agent = Mechanize.new do | A | A.follow_meta_refresh = true end agent.get (normalize_url (url)) what to do Page | Url_found = true twitter_name = find_twitter_name (page) end @ er & lt; & Lt; "[# {@ Current_record}] Success \ n" Rescue exception = & gt; E @ er and lt; & Lt; "[# {@ On_runcord}] error (# {url}):" @ er and lt; & Lt; E.message @err & lt; & Lt; Note: I have also run a version of this code that creates a single mechanize instance which is shared in all calls to Scrap_Arl. It failed in the exact same way. When I run it on EC2, ...

- Where Developers Learn, Share, & Build Careers

How do I present a form in a controller (not in a template)? I look like something: $ form = $ this- & gt; CreateForm (... $ output = $ form-> render); $ will be html for the output form. The form is only an object, it is not known what the layout should be --- this is That's what the template is for. If you are expanding a controller with the default controller, then you can get the HTML of a rendered template like this: $ Html = $ this-> Renderview ('YourAppBundle: Blah: form.html.twig', array ('form' = & gt; createView ()); Form markup / rendering code in that template.

jpa - Try to use EmbeddedId in Superclass -

I have the following problem: I have a composite with a composite class (as a superclass Used) primary key. And now I'am trying to setup subclasses correctly from base class, but it does not work! Can somebody help me out? Thanks BasePK.java @ Embedded public class applies the bespoke serializeable {secure string base1; Protected Timestamp Base 2; ..} Base.java @MappedSuperclass @ Inheritance (strategy = inheritance type.TABLE_PER_CLASS) Public Intangible Class Base Tools Serializable {@EmbeddedId Safe BasePK ID; ..} SubClassA.java SubClassB.java Sub-class c. Java When I open the project, the public class sub-class C subclass implements the serialacable (protected string atris c1; protected string atris c2; If you try to run, the following excaseions are made: [EL information]: 2012-11-01 23: 31: 18.739 - ServerSession (+2063330336) - EclipseLink, Version: Eclipse Hatha Services - 2.4.1.v20121003-ad44345 [EL Alert]: Metadata: 2012-11-01 23...

jquery - Different behavior on onclick event executed from image area shape and an html button -

I have a sample to describe my problem. If you scroll to line 41 then you / show a fixed box. It works as expected: the semitransparent hides the box and the page remains cool. But if you click on the image below, the box also hides, but the page scroll is at the top. How can this be avoided and the page is fixed where the user has scrolled it out? & lt; Div id = "container" & gt; & Lt; Div id = "box" class = "oculto" & gt; Box box & lt; / Div & gt; 1 & lt; Br> 2 & lt; Br> 3 & lt; Br> 4 & lt; Br> 5 & ​​lt; Br> 6 & lt; Br> 7 & lt; Br> 8 & lt; Br> 9 & lt; Br> 10 & lt; Br> 11 & lt; Br> 12 & lt; Br> 13 & lt; Br> 14 & lt; Br> 15 & lt; Br> 16 & lt; Br> 17 & lt; Br> 18 & lt; Br> 19 & lt; Br> 20 & lt; Br> 21 & lt; Br> 32 & lt; Br> 23 & lt; Br> 24 & lt; Br> 25 &...

- Where Developers Learn, Share, & Build Careers

I am creating a blog using the Foundation for CSS and I should be able to post the code (php , Js, and html mostly) without executing it within the posts Right now I & lt; Pre & gt; Posting code inside the tag. I have found that there are some styling examples of their code in the documentation for the Foundation, but I do not understand if there is something that is involved in the Foundation framework or if they are using some external Are there. You can see an example here: It seems that they are using the JavaScript Library named Rainbowush. Here is a link

sql - Find uniqueidentifier in varbinary -

I'm very weak on SQL, but working with fixing the existing functionality is basically a number of unique brains I have tried myTable WHERE CONVERT (varbinary, [fieldId]) from SELECT *, which are stored in a diverse (maximum) and I want to exclude the appropriate one IN (FieldVarabeine) With other simple questions - but do not take any proper records back Since each unique identifier (GUID) has a fixed 16 bytes in length, write a table-value function, which is a verbbombini in the table of 16 byte values Divide and then join this table.

Automatically close of Dialog box without any click in Android app -

Can we create a warning dialog box that will appear after performing some activity and after no close of the click Will automatically turn off or click outside the warning dialog box)? For example, if we can add some delays in the dialog box to close after certain specified seconds The better way to turn off the warning automatically is to use the handler to delay the dialog box dialog box. Example: New Handler (). PostDelayed {New Runnabal} {Public runs zero () {Dialog.dismiss ();}}, 2000); Specifies the number of milliseconds delay in the 2000 alert dialog box.

- Where Developers Learn, Share, & Build Careers

There is a very large heritage CVS repo (66 GB) in our decade and is increasing. Now we have some sub-contract companies, who have to work on some modules and branches. We have to make some branches for them and send them to the branches. Apart from this, we need to merge our changes in our main branches from time to time. We are concerned: We can not repay them completely, mostly We need to send them some history information, not the "Head" code version. We are still doing some development work, so we need to send changes from time to time. Is GIT and Mercurial a good option for displacement with CIS? GIT / MERSUREAL can satisfy our needs? EDIT: I think we need a centralized revision control with multi-site facility, with the ability to make off-site repos based on the part of the Central Repo. And can be easily merged between sites. With GIT, you can use the command "cut" to subdirectories you Subcontractors can, and then easily ad...

python - Basic Pygame Program Not Executing -

An animation test was typed into this Python code, I was expecting some errors, but this program only executes / P> > pygame.init () to load the phantom image files and later , Sound class processes (object): @staticmethod Def load _image (imagefile): image = pygame.image.load (imagefile) Return image, image.get_rect () Sprite class class Sprite (Pygame .sprite.Sprite): def __init__ (self): pygame.sprite.Sprite .__ init__ (self) self.image, self.rect = Processes.load_image ('frame1.jpg') Simple animation function - To make life easier Def animation (self, key_evolution): If key_event == K_DOWN: self.rect.centery = self.rect.centery - 10 Key_event == of_UP: self right. Centry = self.rec T.centery + 10 if key_event == K_RIGHT: self.rect.centerx = self.rect.centerx + 10 if key_event == K_LEFT: self.rect.centerx = self.rect.centerx - 10 return self . Main job: def main (): mecha = sprite () allsprites = pygame.sprite.RenderPlain...

c# - HttpWebRequest the underlying connection was closed -

I HttpWebRequest to POST byte array image via the web I am using the services, the size of the picture is something like byte [4096] code: http webbrand webquery = ( HTTP WebBurm) WebRequest.Create (wsHost); WebRequest.Headers.Add (HttpRequestHeader.AcceptEncoding, "gzip, deflate"); WebRequest.Headers.Add (HttpRequestHeader.KeepAlive, "true"); I get an error: The underlying connection was closed. Is there a server problem or is there a posting problem? This can be a large number, can you connect to the server otherwise? If this is the case, try to keep the anticipated 100 (before doing your post) System.Net.ServicePointManager.Expect100Continue = False; According to the HTTP 1.1 protocol, when this header is sent, the form data is not sent from the initial request. Instead, this header is sent to the web server that responds with 100 (continued) if it has been implemented correctly. However, not all web servers handle this corre...

xaml - Detect which child control received a Pointer* event -

I have a container control that is controlling pointers and pointer moved events. There is a set button in the container. At the point of handling the incident, how can I decide which button is actually received? mainpage.AddHandler (PointerPressedEvent, New PointerEventHandler (PointerPressedHandler, true); Private Zero PointerHandler (Object Sender, PointerUp Event Events E) {var p = e.GetCurrentPoint (null); // Perhaps situation information can be used? Var s = e.OriginalSource as the boundary; // The original source is a border, not a button, and I do not find the button from the border / todo - to determine which button was clicked} This works: Private Zero PointerHeadler (Object Sender, PointerUrited Event ARGS E) {var p = E GetCurrentPoint (zero); Var Element = VisualTriehler.Fund Elements Innhohost Coordinates (p. Post, main page, wrong); Button found Button; Foreign objects (various objects in elements) {foundButton = buttons in the form of objects; If (fou...

- Where Developers Learn, Share, & Build Careers

I am implementing a standard MPI Master / Slave system: a master who delivers work, and is a slave For those who ask chunks and process data. However ... if implemented in a naive manner (rank == 0 is master, the remaining slaves), gurus are not doing any real work, but still for a core that Actually no real computing power is required. So I tried to apply a different "scheduler" thread to the master, but it was involved in sending MPI messages to myself, and actually did not work ... Do you have any The idea is how to solve it? As I felt after some Googleing: You can use tags . The tag is a type of filter: If you do RQ for tag == 1, then you will only receive those people, who will be able to carry people with the earliest in later messages. Are there. So, for the solution: Tag "Worker to Scheduler" and "Worker to Scheduler" with a different ID if Rank == 0: Start In this way, Rank 0 workers will not receive "Give me work...

- Where Developers Learn, Share, & Build Careers

Is there a specified area that we specify? Programmically? For example: - record (my_record, {foo = 0, bar = 0}). Modify_record (record, field, value) - & gt; Record # my_record {field = value} so that any modify_record (#my_record {foo = 1}, bar, 42) , or, modify_record (Some_method_that_returns_a_my_record () can do something, foo, 3.14) Errors like some such compilation I field is not an atom or The record is in my_record I know that there are some examples how to convert to a propellist / but I was hoping something more straightforward. If you pass field number (instead of field name) it is possible. Meaning of modify_record phone instead of modify_record (MyRecord, # my_record.foo, 3.14) (MyRecord, foo, 3.14) (# my_record.foo returns the number of Fu fields in the record). In that case your record may be recorded modify_record (r, fieldano, val) - & gt; Setelement (FieldNo, Research, Val)