Posts

Showing posts from April, 2013

multithreading - How to identify a thread uniquely in Java? -

Is there any way, in Java, to identify specific threads? Using only thread.strust (). GetId () is not enough because one thread can die and the next one can get its ID. For me, these are not the same thread, so they need a way of recognizing them. The timestamp for creating threads will be useful if I can get it. What is wrong to use == ? Or if you need a real number, then maybe there is a safe bet.

- Where Developers Learn, Share, & Build Careers

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब एक सवाल के लिए क्षमा याचना मान लीजिए कि यह बहुत ही बुनियादी है। मुझे ऑनलाइन ऑपरेटर :: और सी ++ में मेरे पास सी # और जावा के साथ कुछ साल का अनुभव है, और उपयोग करने की अवधारणा से परिचित हूं। सदस्य पहुंच के लिए ऑपरेटर। क्या कोई ये समझा सकता है कि इनका उपयोग कब किया जाएगा और अंतर क्या है? आपके समय के लिए धन्यवाद अंतर पहला है स्कोप रेज़ोल्यूशन ऑपरेटर और दूसरा सदस्य का उपयोग सिंटैक्स है। तो, :: (स्कोप रिज़ॉल्यूशन) का उपयोग किसी नेस्टेड क्लास की तरह एक नेमस्पेस में कुछ और तक पहुंचने के लिए या एक स्थिर फ़ंक्शन तक पहुंचने के लिए किया जा सकता है। । अवधि ऑपरेटर केवल उस क्लास इंस्टेंस के किसी भी दृश्य सदस्य तक पहुंच जाएगा जो आप इसे प्रयोग कर रहे हैं। कुछ उदाहरण: class A {सार्वजनिक: कक्षा B {}; स्थिर शून्य foo () {} शून्य बार () {}}; // नेस्टेड क्लास का उदाहरण बनायें B. ए :: बी आईबी; // ए के उदाहरण सामान्य कार्य पर कॉल करें। ए ए; एक बार(); // क्लास पर स्थैतिक फ़ंक्शन को कॉल करें (कक्षा के उदाहरण के बजाय) एक :: foo (); ...

c++ - Checking if a number is NaN fails -

Looking at the following questions and for example I've written the following code: # Include & lt; Cstdlib & gt; # Include & lt; Iostream & gt; # Include & lt; Map & gt; #include & lt; Windows.h & gt; using namespace std; Bool isNonNan (float fVal) {returns (FLL == FVil); } Int main (int argc, char * argv []) {int nQuota = 0; Float fZero = 3 / (float) encoto; Cout & lt; & Lt; FZero & lt; & Lt; Endl; Cout & lt; & Lt; Eisonan (Fuzro) & lt; & Lt; Endl; System ("pause"); Return EXIT_SUCCESS; } Why is IsNonNan returning true? Why also int nZero = 3 / (float) nQuota; Output: -2147483648 ? 0/0 no, not> mathematical speakers, there is no numerical representation), infinity , That is, incompatibility, positive or negative to check if a float is endless or not, you can use it: Inline Bull ISF (Float Feeal) {Return (Faval == Faval) & amp; Amp; ((Pavil - fade)! = 0.0 f); }

- Where Developers Learn, Share, & Build Careers

I have been following these tutorials well and should say that they are great tutorials! I'm just confused about the full concept of Zend_Rest abstract methods. In examples, you can only see remove index post delete Although these functions are understood, I am trying to explain whether the entire architecture is limited to those abstract methods only. I am thinking about the use case where a consumer wants to use an API to update specific fields, which contains user tables, or other cases where the consumer wants to update the activity table. Business logic of these two tables is included in a Reciprocity API controller. I have to solve this problem by creating specific updates / post method for each table, and to determine which fields are updating This type of implementation is consistent with REST, and if so, how can you move forward in post, beyond, seamlessly? REST supports hierarchical relationships for architectural resources, and your resources in any way ...

javascript - Clienside validation before server side -

Image
My problems: 1) Postback is always 2) What This is The user clicks the visible click button. It says that is invalid (). If the page is valid then invoke the server side function. If the page is invalid, then the warning. & lt; Asp: button id = "btnSubmit" runat = "server" text = "send" tooltip = "send" CausesValidation = "true" CssClass = "blueNew buttonNew" OnClientClick = "if (); return false;" / & gt; & Lt; Div style = "display: none;" & Gt; & Lt; ASP: Button ID = Submit "hidden button" "runat =" server "OnClick =" btnSubmit_Click "/> & lt; script> function isalid () {if (Page_IsValid ) {Var button = document.getElementByID ("& lt;% = hiddenBtnSubmit.ClientID%>"); button.click ();} Else {if (! ReqFirstName.IsValid) {Warning ("The first name is invalid" );}}} No, you just To add validato...

- Where Developers Learn, Share, & Build Careers

I have a list of strings that look like this: xs = [ I would like to find only the string in the list, in which two b and any of the characters in a hose after a vowel, "xabbaua" bbaaqvi "," jigfahaha "," utatakaaka "," iabatb "] Is there a better solution to regular expressions like simple matches done? Can someone help me with an example? Thanks. They can also use the classic filter function in combination with the regexp library. Your pattern is very simple that it will work with any regexp library: filter (= ~ " Bibi. [AYUY] ") xs The part of regexps in deceptive Haskell is to use a very powerful general API in the same manner as all those typical libraries And many result types for (boole, string, inter ... ). For the basic uses, you should work most (TM) for your specific need, regex-posix should be enough (and come with the Haschle platform, so it is not necessary to set it normally). So do not forget to im...

java - Are GAE instances limited to 10 concurrent request? -

I've heard from many sources that there is a strict limit for 10 concurrent requests from Google App Engine instance. I was thinking that someone Explain what this means. Does the scheduler block any request beyond 10, or is it applied through a border on a concurrent thread? In particular, does this limit affect the affected instances in the same way that it is Python and Java? Edit: This feature is a request that will allow app engine instances to handle more than 10 concurrent requests / threads. . Please star it. This has been fixed on November 18, 2013. Runtime: go api_version: go1 auto_scaling: max_concurrent_requests: 80 controller: - url: /.* Script: _go_app The default is 8 and the maximum is 80. See for more information.

Insert element into XML using XQuery and Java -

I have to insert a new element into an XML document using an expression of XQuery. I am using saxon as a Java API. I'm new to XQuery so I'm not sure about the exact structure of the inserted expression. Please help me. Please My XML file looks like the following: & Lt; Food & gt; & Lt; Name & gt; Belgian waffles & lt; / Name & gt; & Lt; Price & gt; $ 5.95 & lt; / Pricing & gt; & Lt; Description & gt; Our famous Belgian Waffles with our original famous maple syrup & lt; Description & gt; & Lt; Calories & gt; 650 & lt; / Calories & gt; & Lt; / Food & gt; & Lt; / Breakfast_menu> And I have java code to insert enter the public zero () throws XQException {string queryString = // "$ doc declare variable $ As XS: String External; "+ Sep +" variable $ Store: = doc ("+" food.xml "+") / *; " + "Element value {\" brnj \ "}," +...

How to parse a String in Java? -

यह मेरा कोड है: import java.io. *; Import java.util। *; सार्वजनिक वर्ग परीक्षण {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {स्कैनर = नए स्कैनर (System.in); PrintStream आउट = System.out; स्ट्रिंग इनपुट = .next (); स्ट्रिंग आउटपुट = ""; चार सी = 0; Int count = 0; Int countInput = input.length (); के लिए (इंट i = 0; i & lt; countInput; i ++) {यदि (मैं == 0) {c = input.charAt (i); गिनती ++; } Else {if (c == input.charAt (i)) {count ++; } और {आउटपुट = आउटपुट + गणना + "" + c; गणना = 1; C = input.charAt (i); out.println (उत्पादन); }}} आउटपुट = आउटपुट + गणना + "" + c; out.println (उत्पादन); Blockquote> आउटपुट: 5A3n3f2k मुझे इसे किसी तरह ठीक करना होगा: स्ट्रिंग इनपुट = इन ।आगामी(); मुझे लगता है कि args को कहीं भी इस्तेमाल किया जाना है, मुझे यकीन नहीं है कि कहां कहां हैं। आपका प्रोग्राम तर्क ठीक है। लेकिन आप जो करना चाहते हैं उसके आधार पर, आपको स्कैनर वर्ग की आवश्यकता नहीं होगी। यदि आप अपना इनपुट आर्गेंसेस एरे से आना च...

- Where Developers Learn, Share, & Build Careers

I'm trying to work this function properly in JavaScript, okay it's working properly I can down console.log (work ("gallon water is extracted from carpet.")); I can not be removed from the "gallon water carpet." To show in the same line of code. // global variable var water gallon = 40 var function = function (total) {var water = 0; While (water and lieutenant; water gallon) {console.log ("carpet company was called to remove" + water + "gallons of water.) Water + = 4;}; Return Water Galon;} Console.log ( The work ("The gallon of water is extracted from the carpet.")); So what I am doing using the answers I have received has helped me because of the global variable I need to use I, my story will change by changing the global variable. var total = 40 var = Function (total) {var water = 0; while (water and lift; total) {console.log ("carpet company was called to" + water + "to extract from the water jum.) Wate...

internet explorer - jquery file upload - IE callback results in object Object -

However, there is already this question out there: However, I am coming to the same issue and do not know how to solve it I had some working code that (based on recommendation in other posts) looked like this: if (. $ Fn.wl_File) $ .fn.wl_File.defaults = {forceIframeTransport: true, onDone: function (e, data) {var results = jQuery.parseJSON (data.result); Var filename = Result [0] .name; }} Which removes completely callback information in Firefox, Chrome, etc. except for IE However, I still get an [object object] from IE. I get the following results back when I do a console.log (data.result) in Chrome: [{"Name": "1_3266_671641333369_14800358_42187036_5237378_n.jpg", "Size": 35,535, "type": "image \ / jpeg", "url": "\ / web \ / upload \ /1_3266_671641333369_14800358_42187036_5237378_n.jpg", "thumbnail_url ":" \ / Web \ upload / thumbnail \ / 1_3266_671641333369_14800358_42187036_52...

arrays - What does the declaration void** mean in the C language? -

I am starting to learn C and read the following code: public zero * * List_to_array (list * thiase) {int size = list_size (thiz); Zero ** Array = Molok 2 (size (zero *) * size); Int i = 0; List_rewind (thiz); For (i = 0; i I do not understand the meaning of zero ** . Can anyone explain this with some examples? Zero is an indicator indicator for zero (unspecified type). This means that there is no address for the memory space in the variable (memory location), where there is an address for another memory location, and that is not specified where it is stored. In the case of this question it is an indicator for an array of zero * pointsers. SidNote: A zero pointer can not be distinguished, but one can be zero. zero * one [100]; Zero ** AA = A; By doing this, AR must be able to do this [17] to achieve the 18th element of the array. You can use the tool to understand such announcements as well as examine any related ones.

php - Fat Free: Using complex SQL queries -

Question: Is there an easy / safe way to run more complex SQL queries in fat-free framework. I have to use the solution PDO, but it is messy and ugly because I can not throw exceptions easily. Background: Axon class provides a database of fat free "secure" manipulation, but I want to do another complex query that can handle Xenan. revealed the DB class, but I'll have to make queries to resort to "mysql_real_escape_string ()" which is not safe guarantee. So the highlighted PDO is being used. The exposed PDO is the default error handling, which is a pain and results in ugly code. $ pdo = F3 :: Received ('db') - & gt; PDO; $ Sql ​​= 'Enter the configuration (config_name, config_value, comments) in the value (: config_name ,: config_value ,: config_comments) on the duplicate key update config_value =: config_value2'; If (! $ Stmt = $ pdo- & gt; Create ($ sql)) {$ errorInfo = $ pdo- & gt; ErrorInfo (); Trigger_error ('PD...

ruby on rails - Using expire_page on Heroku Cedar? -

Has anyone managed to use expire_page with Serial Stack? I have backed up with support which is unproductive. By my trial, it works with a single witch, but when you have multiple dyons, only one page will end. Therefore, this will sometimes serve the old page. I know the varnish was an option in the previous stack but what is the HTTP cache solution for fir? Right now I'm just using expir_action with memcached, but it is not as good as it still kills the railroad stock. Thanks in advance. rack :: is the answer to the cache. Using the header, you can use last modified to end pages. I will probably use this except for expire_action. Here is the tutorial on this: This is not correct because I think the request will still be queued but it is better than nothing

String array to Hex Array (Java) -

I have a string array that actually consists of hex characters. We say that the content is - & gt; string array [] = {8C, D9, 26,1D, 69, B796, DB}; Now I want to define them as hex characters of 1 byte and not in the form of string, where each entry is 2 bytes. stringbuilder output = new stringbiller (); For (int j = 0; j & lt; array.length; j ++) {string tag = "\ u00" + array [j]; Output.append (temporary); } Tried to do something like that, but this is not possible because it complains about "illegal Unicode escape" to get around that error, "\ u00" Instead of "\ u00" (i.e. the first two backslashes in the UK, but the stack overflow shows only one), but then I do not see the real hex value in the array, instead see a bunch of strings like I do - & gt; "\ U008C", "\ U00D9" and so on .. I want 0x8C, 0xD9, 0x26 ... after conversion values, thanks. Edit: I have updated this question, just to mak...

- Where Developers Learn, Share, & Build Careers

I have set the time zone in /config/application.rb , and I expect every time I've been created in my app by default in this time zone, even when I create a new DateTime object (using .new ), Then call it GMT . How can I get it in my app's time zone? /config/application.rb config.time_zone = 'Pacific Time (US and Canada)' irb irb> Date time = now = & gt; Mercury, July 11, 2012 19:04:56 -0700 ERB & gt; Mydate = DateTime.new (2012, 07, 11, 20, 10, 0) => Mercury, July 11, 2012 20:10:00 +0000 # GMT, but I want to use PDT in_time_zone does not work because it's just GMT Time changes for PDT time, which is the wrong time: irb> Mydate.in_time_zone ('Pacific Time (US and Canada)') = & gt; Mercury, 11 July 2012 13:10:00 PDT-07: 00 # Wrong time (I need 20:10) You can use the ActiveSupport ( Time.zone ) object to create and parsize dates in your application's time zone: 1.9 3p0: 001 & gt; time. Zone....

- Where Developers Learn, Share, & Build Careers

I am trying to deploy Redina 2.0.3 on Heroko Cedar. There are so many problems in deploying me with the silky gem, so I removed all sqlite references from my gemphile, removed Gemfile.lock, installed the bundle, and happily pushed my lock. . I have myoku run rake dB: Migrate and I browse in my app () and I see the following: UPDATE !! - & gt; When I run myoku run rake db: Migrate I get the following warning message: running dc db: migrate connected to terminal ... up, run 1 Dispute Alert: You have the Rails 2.3-style plugins in the Vendor / Plugins! Support for these plugins will be removed in Rail 4.0. Take them out and bundle them in your Gemfile, or keep them in your app as lip / malplugin / * and config / initializers / myplugin.rb. For more information about this, see the release notes: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released (from & amp;; left; Top (required) & gt; On / App / Rackfile: 7) Depression Warning: You have th...

- Where Developers Learn, Share, & Build Careers

I have created a Facebook page (with wordpress) but I can not get it to work in Facebook. The original page is working properly: (Just add https to view the SSL version) http://copywriting.com/fb/fanpage/pueblito- Reserved / However, when I load it in Facebook, the SSL version works fine, but the regular HTTP version 500 returns the internal server error. Regular FB tab (with 500 error): (Add https and it works fine) http://www.facebook.com/PueblitoEscondido/app_382773098443040 How can this be resolved? How can this be resolved? To see if

jquery - Display an Map with out page refresh. -

I am using a load method on the page that has a map. The problem is that the page is full but the gray color screen is displayed in the map divi. When I refresh a page the map loads. I also call the map function in the document ready function. But no use. My code is & lt; Div class = "public-view" id = "map_canvass" & gt; & Lt; Script type = "text / javascript" & gt; // Onload function ... Start (); Function initialize () {var fenway = new google.maps.LatLng (& lt ;? php echo $ propertyValues- & gt; axis;; & gt ;, & lt ;? php echo $ propertyValues- & gt; lng ;; & Gt;); Var map option = {center: phenave, zoom: 15, map type eid: google.maps.MapTypeId.ROADMAP}; Var map = new google.maps.Map (document.getElementById ("map_canvass"), map options); Var circleOptions = {center: fenway, map: map, strokeColor: "# BB0A68", Stroke Opacity: 0.1, Fill Collar: "# BB0A68", Fillopity: 0.35, Rad...

- Where Developers Learn, Share, & Build Careers

I am trying to create Eclipse product with BackMinster. But when I start the operation and select create.product I do This is showing me the ingredient "The name of the plugin" was not found in Bakmanister and the organization. Eclipse.core.runtime.CoreException. How to solve these issues. No trolling, but you should switch to Tycho, the base basis of the CBI () Here are some resources: Regards

.net - Speech Recognition in C# with specific command -

I was developing an application that could only recognize a few words. I have many questions. 1) Can I develop something like if (command == browser) {// open default browser} 2) If so, how can I identify the system to understand the custom word ?? Any code sample or tutorial will be appreciated. You can do this by Microsoft Speech API System. Speech. Recognition View the article

javascript - copy form to Backbone.js model -

मेरे पास एक फ़ॉर्म है: & lt; form & gt; & Lt; इनपुट प्रकार = "टेक्स्ट" नाम = "ईमेल" & gt; & Lt; इनपुट प्रकार = "टेक्स्ट" नाम = "फोन" & gt; & Lt; इनपुट प्रकार = "बटन" मान = "ठीक" / & gt; & Lt; / प्रपत्र & gt; बटन पर क्लिक करते समय, मैं एक संगत मॉडल में प्रपत्र के मूल्यों की प्रतिलिपि करना चाहता हूं। मैंने पाया है कि स्वचालित रूप से जब मॉडल मान बदल जाते हैं, लेकिन ऐसा नहीं है कि मैं क्या चाहता हूं, मैं बटन क्लिक किए जाने के बाद मूल्यों की प्रतिलिपि बनाना चाहता हूं। "post-text" itemprop = "text"> एक कस्टम फ़ंक्शन को उस दृश्य में लिखें जहां फ़ॉर्म स्थित है और इसे ठीक पर क्लिक करें इवेंट: ईवेंट: {... 'इनपुट पर क्लिक करें [नाम = "ठीक है"] ':' CopyFormToModel '...}, ... copyFormToModel: फ़ंक्शन () {var ईमेल = $ (' इनपुट [नाम = "ईमेल"] ')। Val (); Var फोन = $ ('इनपुट [नाम = "फोन"]')। Val (); ...

c++ - sort 2d vector based on another 2d vector -

So I have two 2D vectors, where the first row of vector 1 has normal values ​​and in the second column of vector 2 Common values ​​are. I want to sort the rows in vector 2 according to the values ​​in the first row of vector 2. What is the best way to do this? This is what I have so far, although I wonder if there is any way to do better with such algorithms: (unsigned int I = 1; i & lt; vec2.size (); i ++) if (vec2 [i] [1]! = Vec1 [0] [i]) swap (vec2 [i], vec2 [i + 1] ]); A simple solution can be: Std :: vector & lt; Std :: vector & lt; Integer & gt; & Gt; V1 = {{3, 6, 4}, {1, 1, 1}, {1, 1, 1}}; Std :: vector & lt; Std :: vector & lt; Integer & gt; & Gt; V2 = {{1, 4, 1}, {1, 6, 1}, {1, 3, 1}}; Const std :: vector & lt; Int & gt; & Amp; Serial = V1 [0]; Std :: sort (v2.begin (), v2.end (), [& amp; order] (const std :: vector & lt; int & gt; & amp; r1, const std :: vector & lt; int & Gt; & amp;...

user interface - How do you smoothly move a graphics object 360 degrees in Java? -

I am trying to create a geometry war style style and I am on a roadblock. I'm trying to easily remove a way to move my graphics object. But it only walks in one direction, for example, if I press the up button it grows and then when I press the button on top of it, I move the diagonal upwards to the right but I want my Turn directly from top to top to move the object right from top to bottom This is my code yet: Public class Moovest implemented JPNL ActionListener, KeyListener {Timer T = New Timer (5, this); Double x = 0, y = 0, velax = 0, well = 0; Private set & lt; Integer & gt; Pressed = NewHashet & lt; Integer & gt; (); Private static id WIDTH = 800; Private stability HEIGHT = 600; Private double D = 0; Private Double Top Speed ​​= 0; Private boolean stop = wrong; Private double A = 0; PVector location; PVector velocity; PVector acceleration; Public MovStest () {place = new PV reactor (width 2, height / 2); Velocity = new PV reactor (0,0); Acceleration = ...

c# - Designing gui, how to update several controls from collection of variables -

I am now developing a GUI (or HMI) for a manufacturing machine for almost a year. I There are approximately 5000 parameters in the machine that Gui needs access to access. I currently have a daemon thread that collects all the variables from the machine in the form of all major datbones and parses them and put them in a list on Gui. I collect, update and parse everything in less than 40ms, which is less than the required update frequency of 1 second, so I understand it properly. How to update the problem in the actual GUI. Since I can only update the control on the thread on which it has been created. Im is currently using a different thread looping through all the controls and then using BeginInvoke (winform) or Dispatcher (wpf) to update everything for the user, it is very complicated for me. Is there someone who has done something similar or another great way to update Guy? Thank you! Try to use background worker DoWork collects data in the event and pass it t...

function - Trying to understand loop flow? -

I am trying to understand the loop to work in a particular case, if someone can explain it Will help me Well, what I am doing is downloading email from a mailbox (like 50 at a time) to Hotmail (I am using the MailBEE.NET object for that) on the download I am saving some things like sender's name, attachment name (if any) database and so on ... this is a fairly long process on which the fact is that the program must first log in to Hotmail server, then Download the message and then in DB Run a query to save the content. My question is, if the task is to be defined in a separate assembly (DLL) to do all this work and the calling program is a web based application that is using this assembly in context, So what if I keep this function in these calls for loop? Wait for the loop to end the function? Or will it keep calling this function at times? What better way to suggest you do this work? Thank you. It depends on how you write the code that downloads. If only one meth...

php - Notepad++ - Is it possible to use custom fonts? -

Since I use different languages ​​(Latin and non-Latin) in my work and some of them (for example Syrilic languages ​​for) are symbols that look similar to Latin people, sometimes I find those stupid mistakes that accidentally occur when I mistakenly use the syrilic symbol in my code instead of Latin. For example, the following variable names (PHP-style) look exactly the same, although the other name contains half of the letters Cyrillic symbols (and thus different codes): $ Iicuxiphametod vs $ Ñ ?? ??? Formula Line Line Line So I came up with ideas to use for style configurations, whose fonts have different forms of Latin and Cyrillic symbols. I have used several fonts like that - Simons. -Extbie, NSIMSon, Ming Liu-Exbbee - but the problem is that I want to use a font that I have created. Does anyone know what fonts are used in Notepad ++? Whether they are their own fonts or system fonts and whether it is possible to use different (non-system, user-built) fonts in Notepad ++ (...

javascript - how can i pass json from php to js and manipulate it? -

यहाँ मैं क्या करना चाहता हूं मैं codeigniter directory_map () का उपयोग करता हूं फ़ोल्डर को मैप करने के लिए इसे $ नक्शा के रूप में सहेजें; $ map = directory_map ($ this- & gt; rootdir। $ This- & gt; सत्र- & gt; userdata ('user_name')); फिर मैं $ नक्शा एन्कोड और इसे गूंज गूंज $ dir = json_encode ($ नक्शा); मुझे क्या चाहिए $ dir को किसी भी तरह से सहेजना है। जब उपयोगकर्ता फ़ोल्डर में से एक को खोलता है तो मैं सहेजी $ dir से फ़ोल्डर की सामग्री प्राप्त करने के लिए js का उपयोग कर सकता हूं Json फ़ाइल, सर्वर के साथ संवाद करने के बजाय। अगर यह समझ में आता है तो मैं $ dir json फ़ाइल कैसे बचा सकता हूं या इसे जेएस फ़ाइल में कैसे प्राप्त कर सकता हूं। वहां है ऐसा करने का एक बेहतर तरीका? मैं व्यक्तिगत तौर पर उल्लिखित विधि का उपयोग करता हूं, जो मूल रूप से निम्नलिखित रूपरेखा के साथ है : अपडेट: (मुझे लगता है कि मैं आपको थोड़ा भ्रमित करता हूं) निम्नलिखित जावास्क्रिप्ट कोड है // कैश कैश को संग्रहीत करने के लिए ग्लोबल ऑब्जेक्ट = {}; फ़ंक्शन मेकंडेस...

- Where Developers Learn, Share, & Build Careers

I created an HTML file that uses javascript to display randomly displayed images in 3D tags is. Click on the images to move left or right until I use a slide show in the page, but when I try several slideshows on the same page, it works fine. Here is the code for a slideshow: ** & lt; Script & gt; Current index = 2; MyImages = New Array (); MyImages [0] = '1images2.jpeg'; MyImages [1] = '1images3.jpeg'; MyImages [2] = '1images4.jpeg'; MyImages [3] = 'artwork.jpg'; MyImages [4] = '1images5.jpeg'; ImagesPreloaded = New array (4) for (var i = 0; i & lt; MyImages.length; i ++) {imagesPreloaded [i] = New image (120,120) uploaded images [i] .src = MyImages [I]} / * We create the task to move forward and return * / function Nexter () {if (current index gt; 0) {--currentindx; Warning ("if in the back"); Document.rightimg.src = document.middleimg.src document.mediimg.src = document.leftimg.src document.leftimg.src = imagesP...

Macports Selfupdate -

I am trying to selfupdate my macports, but I get the following message : Error: / opt / local / bin / port: Port auto-update failed: Error synchronizing MacPort sources: Command execution failed I have my / opt / Local / bin / macports and the directory does not exist; instead, it is in / opt / local / var . Can this be the problem? Edit: -dt is running, I get the following: [user / user] & gt; Self-promotion discounts: The location of the McPort sources: /opt/local/var/macports/sources/rsync.macports.org/release/base --- & gt; Updating base sources of MacPords using Rsync rsync: failed to connect to rsync.macports.org: Connection refused (61) rsync error: Error in socket IO (code 10) / sourcecache / rsync / rsync- 42 / rsync / clientserver.c (105) [receiver = 2.6.9] Command failed: / usr / bin / rsync -rtzv --delete-after rsync: //rsync.macports.org/release/base/ / opt / Local / var / macports / source / Rsync.macports.org/release/base Exit code: 10 Err...

iphone - Show keyboard in contenteditable UIWebView programmatically -

मेरे UIWebView एक contenteditable HTML सामग्री लोड करता है मैं UIWebView को ध्यान केंद्रित करने और UIWebView में कुंजीपटल दिखाने देना चाहता हूं। मैं [self.webview becomefirstResponder] का उपयोग करता हूं, लेकिन यह काम नहीं करता है। क्या विधि के आसपास कोई काम है? धन्यवाद। UIwebview संपादन योग्य नहीं है और आप इसे पहले उत्तरदाता नहीं बना सकते जहां आप उस प्रयोजन के लिए जावास्क्रिप्ट का उपयोग कर सकते हैं, इस उत्तर की कोशिश करें

javascript - how is document.form.submit() received in code behind? -

I have document.form1.submit () in javascript. I want to know how it got behind this code. In which class, in which method? something like that. Coz I want to get the value inside a text box to store it in one session. And do I need a real "submit" button for this? It really confuses me. If I keep it like this: function callSubmit () {var thetext = document.getElementById ('textbox1'). Value; Document.form1.submit (thetext); } Can I be able to pass the value of textbox1 to the code behind a specific method, if so, such as, a received variable? I mean, how can I get the value of textbox 1? By the way, I am trying to do this before landing the page. Because I need to store text from TextBox 1, so that I can allocate the value again after page refresh. You can get value back to post using 'form' as 'back'. request. Form ["textbox 1"] and if you request this . Read the form You get all the data from the post Comment...

c++ - How to find an error in a tcp server application having no source code -

itemprop = "text"> I send a data in a special format like a C ++ / CLI TCP client application L , 20100930033425093, -5.929958, 13.164021 For a main application on port 9000. The main application is actually done by another vendor and I do not have the source code for that. The programmer who developed it and has no one else with it. Now, I can communicate with the desired application using IP and port number. But the data appearing on main application GUI is not showing up. But I used a different Socket Server demo application with the same IP which was getting the data I'm receiving as the main application. It works perfectly well. Now I do not know where this error is and what stream is received on the other side. How can I solve this situation effectively? Any suggestion or discussion will be helpful on this? You can use packet sniffers to find out what data is being sent (for TCP I suggest Fiddler), if you can try to modify it in some medium appli...

java - Statistic in confluence or jira -

I have pages with attachments and I need statistics about counting this attachment that it is better to do this What's the way You can try the macro, which is available for free: {tracking - Info: [Attachment name] | Value = [view count | First View Date | Last seen date] | Format = [date format] | Number = [#]} Default text {tracking-info}

xaml - How to Change ToolTip Color -

मैं अपने कोड में टूलटिप रंग कैसे बदल सकता हूँ & lt; style x: key = "टेक्स्टबॉक्स" एरर "लक्ष्य प्रकार =" टेक्स्ट बॉक्स "& gt; & LT; Style.Triggers & gt; & Lt; ट्रिगर प्रॉपर्टी = "मान्यकरण। HesError" Value = "true" & gt; & Lt; सेटर संपत्ती = "टूलटिप" मान = "{बाध्यकारी रिलेटिव सोरस = {x: स्टेटिक रिलेटिव एसस। स्व}, पथ = (मान्यकरण.एरर्स) [0] .एयर्रॉंन्टेंट}" / & gt; & Lt; / उत्प्रेरक & gt; & LT; /Style.Triggers> & Lt; / शैली & gt; अपनी स्वयं की टूल टिप शैली बनाएं नोट करें कि स्टाइल को defult होना चाहिए & gt; शैली TargetType = "ToolTip" & gt; ... & lt; / style & gt; इसे "textbox इनर्रर" शैली लागू करना है।

regex - PHP preg_replace escaped plus sign not working -

यह preg_replace ("/ [^ a-zA-Z0-9 [: स्थान:] [: खाली:] + -] / "," ", $ val); और प्लस चिन्ह बच गए preg_replace ("/ [^ a-zA-Z0-9 [: अंतरिक्ष:] [: रिक्त:] \ + -] / "," ", $ वेल); जब मैं प्लस चिह्नों की अनुमति देना चाहता हूँ, तब से वैल के प्लस चिह्नों को निकाल रहे हैं, मैं प्लस चिह्न से ठीक से कैसे बचता हूं? मेरा सुझाव है: गूंज preg_replace ("/ [^ a-zA-Z0-9 [: space:] [: blank :] + \ -] / "," ", '::: परीक्षा +++ --- :::');

wpf - Link List(Of Structures) to DataGrid -

मेरे पास निम्न संरचना है सार्वजनिक संरचना मैट्रिक्सब्लॉग सार्वजनिक नाम के रूप में स्ट्रिंग सार्वजनिक पहले की सूची के रूप में संदर्भ मैं इन संरचनाओं का एक समूह दूसरी सूची में सहेजता हूं: सूची के रूप में मंद परिणाम (मैट्रिक्सब्लॉग के) मैं इस सूची को एक डाटाग्रीड में बाँधना चाहूंगा और कॉलम में होना चाहिए: एक कॉलम: नाम कॉलम दो: पहले रेफरेंस गणना कॉलम तीन: दूसरा संदर्भ। गणना क्या कोई मुझे यह सेट करने में मदद कर सकता है? धन्यवाद यदि आप मैट्रिक्सब्लॉक संरचना को सीधे बाँध लें, अगर कोई भी आइटम आंतरिक सूचियों में जोड़ दी गई हो, तो बाध्य गणना गुण अद्यतन नहीं होगा आप इसे एक वर्ग बनाने और INOTifyPropertyChanged इंटरफ़ेस को लागू करने से बेहतर होगा, और आप दो नए गुण जोड़ सकते हैं, जो कि सूची के गिनती गुणों को दर्शाता है। हालांकि, यदि आप ऐसा करते हैं, तो अभी भी जानने के तर्क को संभालना आवश्यक है जब सूची गिनती बदल गई थी, जब आइटम को सूची में जोड़ा या हटा दिया गया था आप इसका समाधान करने के लिए अवलोकन के विकल्पों का उपयोग कर सकते हैं। वास्तव में, आप सीधे वैसे भी संरचना या...

How to execute an action after event="uploadcomplete" in RichFaces <a4j:ajax> -

I need to call tester () after a method FileUpload event = "uploadcomplete" . Public Zero Checker () {fileProcessingEJB.checkInventoryToResolveAll ();} Uploads the following code file and I will execute some files after all Needs are uploaded, do I do that & lt; Rich: fileUpload & gt; & Lt; / Rich: fileUpload & gt; this? Or I can call method in execution in & lt attribute; A4j: ajax & gt; & lt; Rich: FileUpload fileUploadListener = "# {FileUploadBean.listener}" id = "Upload" Approved type = "xml" ontyperejected = "warning ('Only XML files accepted');" maxFilesQuantity = "50" & gt; & Lt; A4j: ajax event = "uploadcool" execution = "# @ none" render = "info" /> & Lt; / Rich: FileUpload & gt; itemprop = "text"> look at it You can use the listener as below Are there. & lt; Rich: FileUpload id = ...

Iframe based integration in Salesforce -

I want to show my site inside Salesforce iFrame, and when someone performs an activity within the iFrame on my site Do I want to update the Salesforce page as well? Can I do this, please suggest? A more recent approach, now GA, is this - it is equipped with additional protection and features like iframe-based , Which includes passing references in passphrine fields such as iframe. It enables the IFrame web app to use the credentials from the canvas framework, using Javascript or backend web app (Python, Java etc) to call the salesforce APIs based on that authentication. You can also use the new event feature inside the canvas to send a message to the framing Salesforce page. On authentication options: Canvas sign-in request authentication is recommended and easy, but keep in mind that it does not give you a fresh token OAuth2 - so if you continue to perform continuous background processing based on user authentication , You should use Canvas OAuth2 authentication instead...

database - How do I append a column to the end of another column in SQL -

I need to add columns from one column to another using the SQL command and need some help with syntax. I have an image column with 'http://i2.ytimg.com/vi/' as the value of all the fields in the table. I need to add at the end of this string, different values ​​for each entry in the Value Url field from one column, called "url", have different values. I was thinking something like this: SELECT image + url FROM 'movies'; Thanks for any help. Also, I need to rear the second column, where I need to add values ​​from one column to the beginning, in any other column. :) select image || From URL 'movies' as url;

How to add rank based on points in mysql -

I can use some help with this query. Here is my table: ID name point 1 Yogi 5 2 cm 10 3 white 5 4 black 8 my query The result is: Select point DESC The result is: id's name point 2 sasi 10 4 black 8 1 Yogi 5 3 white 5 But I would like the result as below please guide me. id's name point rank 2 sasi 10 1 4 black 8 2 1 yogi 5 3 3 white 5 4 is it possible SET @rank = 0; Select , such as the order DESC as a line query, @ rank: = @ rank + 1 rank , @ Rank: Rank from + 1R rank, (SELECT @Rank: = 0) point DESC

c# - Why does the menu strip white out when subscribing to a picture box paint event? -

I have a form with MenuStrip and PictureBox . I subscribe to PictureBox from Paint event with the following code: Private Zero ImageBox 1_Paint (Object Sender, PaintEventArgs e) {pictureBox1 . Image = new bitmap (picture box 1. wide, picture box 1.high); // Other code but above line reflects the problem} causes the menu strip to be white - I do not see the text till then I can move around it - even if PictureBox Menu does not overlap at all at the end of the above function I menuStrip1.Update () I can put it, but this can lead to other problems. to assign any drawing instead of specifying PictureBox Use the PaintEventArgs . Private Zero PictureBox 1_Paint (Object Sender, PaintEventArgs e) {e.Graphics.Clear (Color.Gray); }

ColdFusion autosuggest in text field is not responsive -

I have a text field that I want to automatically adjust values ​​based on a query. I have a separate file (getdata.cfc) in which my query is present This is the text field part of my main file: & lt; Cfinput name = "search_query" autosuggest = "url: getdata.cfc? Suggestvalue = {cfautosuggestvalue}" Maxxeltsdisplay = "10" shoetoscience loading icon = "true" size = "10" /> This is the code in getdata.cfc: & Lt; / Cffunction & gt; & Lt; / Cfcomponent & gt; The text field looks fine, but when I do not type a word in which no auto autosuggest value is displayed. nothing happen. The text is displayed just as visible to me. Any suggestions? Thanks! I have stopped using jquery plugins from a lot of CF stuff, but here's a For example, I have some old production code Also make sure that you have your cfform tag around your form, and make sure your / cfide folder is on your website Has bee...

- Where Developers Learn, Share, & Build Careers

संभव डुप्लिकेट: "आपको एक क्लास को कार्यान्वित करने की आवश्यकता होती है, जिसे अवधि कहा जाता है, जो समय की लंबाई का प्रतिनिधित्व करता है, घंटे, मिनट और सेकंड में व्यक्त करता है, उदाहरण के लिए सीडी पर एक ट्रैक की लंबाई या मैराथन चलाने के लिए लिया गया समय। एक उपयुक्त कन्स्ट्रक्टरों (त्रुटि जांच सहित) और एक्सेसर तरीके होना चाहिए। एक कंसल्टेंट्स को एक पूर्णांक का उपयोग करके एक अवधि ऑब्जेक्ट के प्रारंभ को अनुमति देनी चाहिए, जो सेकेंड में अवधि का प्रतिनिधित्व करता है। & lt; & lt; और & gt; & Gt; ऑपरेटरों को धाराओं के माध्यम से अवधि वस्तुओं के इनपुट और आउटपुट की अनुमति देने के लिए ओवरलोड किया जाना चाहिए। एक अवधि ऑब्जेक्ट प्रारूप में \ h: mm: ss "होना चाहिए, उदाहरण के लिए, \ 1: 39: 33", \ 0: 07:07 "और \ 1: 00: 08"। इसके अलावा, ऑपरेटर, +, को ओवरलोड किया जाना चाहिए ताकि दो अवधि ऑब्जेक्ट को एक नई अवधि ऑब्जेक्ट बनाने के लिए एक साथ जोड़ दिया जा सके, और इसी तरह से एक पूर्णांक संख्या सेकंड को एक अवधि ऑब्जेक्ट में जोड़ा जा सकता है। अंत में, क्लास को अ...

- Where Developers Learn, Share, & Build Careers

I want to write a program that has a given four ranges (for example, 10 characters for a user's string Checks)). If the entry in the string is more than 10 characters, then the user should re-sign again until the user enters a valid string (one word of 10 characters) until the user enters a valid string. I already have a piece of code for this, but it does not work yet, because I have no idea that the user will be prompted again or in another easy way. How to start the process can be started? System.out.print ("Input:"); String inputts = input Screenplay (); While (inputChars.length ()> 10) {System.out.print ("Input:"); String inputts = input Screenplay (); // Here is a mistake now} System.out.print ("Output:"); System.out.print ("10 characters in login"); I'm more than just 10 words, then check the entered word, then leave it and prompt the user to enter a word again which is more than 10 Not a character. I am not good in ...

javascript - document.getElementById() vs $() -

संभव डुप्लिकेट: मैं jQuery और जावास्क्रिप्ट सीख रहा हूं। मुझे आश्चर्य है कि क्यों $ () फ़ंक्शन jQuery का document.getElementById () जावास्क्रिप्ट का कार्य। क्या यह $ () ? यदि नहीं, तो $ () की भूमिका क्या है क्योंकि मुझे यह प्रश्न मिला क्योंकि $ ()। कोड> $ चयनकर्ताओं, HTML स्ट्रिंग्स और नियमित जेएस ऑब्जेक्ट स्वीकार करता है getElementById केवल एक तत्व का id विशेषता स्वीकार करता है वे अलग-अलग चीज़ें करते हैं। आप एक DOM ऑब्जेक्ट प्रॉपर्टी एक्सेस करने का प्रयास कर रहे हैं, लेकिन एक jQuery ऑब्जेक्ट से। JQuery ऑब्जेक्ट्स को लपेटें, लेकिन वे उन्हें प्रतिस्थापित नहीं करते। DOM ऑब्जेक्ट तक पहुंचने के लिए, आप $ (...) [0] (या $ (...)। प्राप्त करें (0) ) और आपका कोड ठीक काम करना चाहिए: $ (...) [0] .उटरहाइट

How to access adb directly from Android app? -

If the service is loaded via ABC, then it is possible to communicate with the Android Debug Bridge (ADB) from within the app is? Here's the case of use: I can take a screenshot of the framebuffer without ADB, which is a bit slow to broadcast on the phone with no problems, but to completely broadcast the raw buffer USB Especially if I want to take every 2 seconds more than one frame, what I would like to do is use the framebuffer from within an app on the phone, which can then transmit or watch on WiFi either Sector could further compression. Does not work on jellybin (they stop the way to set up native services on / data / local), so I would like to join the ADB service through some socket or whatever and the way framebuffer requests To be released. I am fine with connecting via USB to load ADB service, but once connected, I want to process the phone before transmission. ONLINEER: Is this possible? $ adb shell screen cap-p \ | Gzip -c \ & gt; /mnt/sdcard/s.png....

How do i insert or attached .sql file into my Excel.xls file? -

I am creating project projects, however I want to add several SQL files with columns in excel file. I tried insert object & gt; Create file but the file is not attached and is not capable of linking that file Instead of links to that file, I would like to attach only so that I will have all other attachment files using only one Excel.xls file How can I get it? There is no such thing as a SQL file standard. When you view such files, they can be fed into a vendor's SQL database product, in a vendor-specific version of the usually a series of commands in the vendor's database. ; The database engine will process them and update the database properly. You can see the file to see what you have, or do you have some other (possibly a binary) file that someone has done with a SQL extension (some people do not have a single file with a SQLite database Do, for example). The SQL vendor varies from seller to seller, so you may be able to apply a file of SQ...

php - Query every time keypress or a inital big query? Which is better in cakePHP and jquery? -

Hello, I have a site developed in the cakepap, I have an input type text in a page where a user creates a query to get the data to get the data "restriction" to get the string in which the string Is included (in the example: "banana", "restricted" ...). Every time the user takes the score of one more letter, I do another query to retrieve the data every time you argue the strat string. The query is made in jquery every time when a user presses a letter. For example, my table has a record of 1 million and I do not know if a user starts digitally, if this solution is fast. Another solution is: When I open that page, I ask a question to find all the records and keep them in the array. Every time a user marks a letter, I search for that string to get a sobre ray with the result. Which is the best solution in terms of speed, RAM? Consider that I can have 1 million records in that table, and many users can log on to that page simultaneously. My database is MYS...

sorting - Can anybody put up a neat implementation of Tim Sort in C++ and if possible algorithm link too -

Can anyone temporarily apply the sort of sort in C ++ and if possible, the algorithm link too. I could not find the basic steps for explaining Tim sort on the net. OK, search for more next time :) Here's not the basics: -

- Where Developers Learn, Share, & Build Careers

I have a bunch of txt files in a directory, which I want to merge into a file. At the end of each file I want to add a cart / return line. What is the best way to do this in C #? One-liner that is significantly worse on memory consumption: File. Merge all lines (targetFileName, Directory.GetFiles (srcFolder, "* .txt") .SelectMany (f => File.ReadLines (f) .Concat (new [] {Environment.NewLine}))); Hope you can stay in the end with additional Newline.

- Where Developers Learn, Share, & Build Careers

I have to draw a line through a mouse in JFRAM. Here's my method paints Kmpenennt: public waste Comonent paint (Graphics g) {Graphics2D g2d = (Graphics2D) g; If (pointCollection.get (0)! = Null & amp; amp; amp ;; & amp ;; PointCollection.get (pointCollection.size ())! = NULL) {g2d.setPaint (Color.BLUE); G2d.setStroke (new basicstok (1.5f)); G2d.draw (line2d); }} which is based on my implementation of methods which I have interface icons Monishn and Mauslestonr I public void Mausdrag (Mausivent Ajhbet) {PointCollection = New Arreelist & lt; Point & gt; (50); PointCollection.add (arg0.getPoint ()); For (Int index = 0; index and lt; Point Colekshns. Size (); index ++) {line 2D = New Line 2D. Double (Point Collection. Gate (Index), Point Collection.Gate (Index + 1)); // repaint (); }} The idea coach points than draw lines between them, so I get a curved line is not straight. Can you help me make a logical mistake, which I do? Thank you! You are go...

xcode - Add more UICollectionViewCell to an existing UICollectionView -

I am trying to add some other cells to an existing UICollectionView Only some cells filled up I tried to use CollectionView reload data but it looks like reloading the entire collection view and I just add more cells Wanted. Can anyone help me? UICollectionView There are ways to add / remove items in class. To put an item in some index (section 0 ), modify your model accordingly and then: int IndexPath = [NSINXPath IndexPathForFire Item: Index]; NSArray * indexPaths = [NSArray arrayWithObject: address in the index: 0]; [CollectionView insertItemsAtIndexPaths: Index Path]; This view will serve the rest.

- Where Developers Learn, Share, & Build Careers

Image
I have a UITextView that I want to change dependency on my content dynamically. For some reason textview is always less that its content! Here's the code: _textView.text = [NSString stringWithFormat: @ "Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test "] CGR Ect frame = _textView.frame; Frame.ize.height = _textView.contentSize.height; _textView.frame = frame; And here's the result: As you can see, the UITextView (in white) is very small. If I have more or less content there, then there is a slight decrease, i.e. I'm sure this is something easy but I work it I can not do this I was the only problem using the storyboard in iOS 7. My solution was to add this code: cgarte newtext wifreframe = self.textView.frame; NewTextViewF...

ios - UITextView Content Size too Short -

Image
I have a UITextView that I want to change dependency on my content dynamically. For some reason textview is always less that its content! Here's the code: _textView.text = [NSString stringWithFormat: @ "Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test "] CGR Ect frame = _textView.frame; Frame.ize.height = _textView.contentSize.height; _textView.frame = frame; And here's the result: As you can see, the UITextView (in white) is very small. If I have more or less content there, then there is a slight decrease, i.e. I'm sure this is something easy but I work it I can not do this I was the only problem using the storyboard in iOS 7. My solution was to add this code: cgarte newtext wifreframe = self.textView.frame; NewTextViewF...

- Where Developers Learn, Share, & Build Careers

संभव डुप्लिकेट: मैं डिक्लिकट कीज़ वाली एक सॉर्ट क्लास की तलाश कर रहा हूं। मैं इसके बारे में खोज करता हूं, और लुकअप क्लास को डुप्लिकेट कीज़ को स्टोर करने के लिए इस्तेमाल कर सकते हैं, लेकिन इसमें कोई डिफॉल्ट कन्स्ट्रक्टर नहीं है, इसलिए हम ' इसे किसी अन्य ऑब्जेक्ट के बिना लुकअप में इनिशियलाइज़ करना होगा। लेकिन मेरे पास ऐसा कोई ऑब्जेक्ट नहीं है, जिसमें से मैं लुकअप ऑब्जेक्ट को इनिशियलाइज़ कर सकता हूं। तो, मेरा प्रश्न यह है, क्या नेट फ्रेमवर्क 3.5 में कोई भी वर्ग है, जो कि डिक्शनरी की तरह व्यवहार करता है, लेकिन मुझे लुकअप की तरह डुप्लिकेट चाबियाँ देने की अनुमति है? परिभाषा के द्वारा एक शब्दकोश, एक ही मूल्य के साथ एकाधिक चाबियाँ कभी नहीं कर पाएगा। (यदि आप एक कुंजी को देखते हैं जो आप वापस करेंगे?) यहां तक ​​कि एक लुकअप, जिसे आप संदर्भित करते हैं, इसे अनुमति नहीं देता। आप सकते हैं कर सकते हैं कि प्रत्येक कुंजी एकाधिक मान (तार्किक रूप से तकनीकी रूप से नहीं) को संदर्भित करती है। यह एक ऐसा शब्दकोश जिसके द्वारा मूल्य किसी प्रकार की एक डेटा संरचना है (उदाहरण के लिए, एक...

- Where Developers Learn, Share, & Build Careers

I thought I'm Ruby huge when I wrote this: # this hash Hash = {'Portugal' = & gt; 1, 'France' = & gt; 2, 'USA' = & gt; 3} # country_id input comes from country_name =. (Hash .select {| k, v | v == country_id.to_i} .first || []). First This is to be removed in the right way, the country's name and if the country is not found then it does not fail. I am completely happy with it. Although my tutor says that according to readability it can be customized, length and performance! What can be more clear / sharp than this? Please give advice OK, it seems that your tutor is right :) You can do this: hash.invert [country_id.to_i] # will work on all editions Or, as suggested by @littlecegian hash (country_id.to_i) will work on # 1.9 or, as is done by @steenslag Recommended hash.index (country_id.to_i) will work on # 1.8 and 1.9, with a warning on 1.9 with / past> full example: hash = {'Portugal' = ...

get mac address from mobileconfig on iOS device -

I am trying to see if I like this post like the mobile conferencing OTA process through the Mac address of the iOS device I can get: I add the MAC_ADDRESS_EN0 with the DeviceAttributes key with a much more accurate set up that the other SO post is coming back null. Whether OA has received 1 hash of MacAd or MacAd via the Mobile Configuration Services Service Mitigation is a way? that feature was deprecated in iOS 4, and it was deleted in iOS 5 I went. There is no replacement for this.

jquery - Getting JS-variable from AJAX loaded content? -

I know that a .jax () is a jQuery plugin Calling is not possible, the only way is to write a function in the parent page and this function is called a part of the AJAX request in the function (data) . It works normally, but I'm stuck because my function needs a variable to work properly with loaded content and whichever I am trying to load, the original from the loaded content See my example: This is my job: function doPaginate (maxpage) {jQuery ("# ​​demo5") . Paginate ({count: maxpage}); }a???? This is my jQuery.ajax () request: function loadProfileTab (tab, owner info) {jQuery. Post ("./profile_ajax.php", {task: 'profiletab', v: tab, user_id: ownerinfo}, function (data) {jQuery ("# ​​profile_content_wrapper") .html (data); doPaginate (maxpage) ;}); }a???? Now I'm trying to get the variable maxpage from the PHP loaded content to function doPaginate (maxpage) I have some actions, for example to get the result...

draw flighroute on mercator map how to calculate polyline points with a given longitude -

I would like to draw a polyline between two cities on a Mercator map eg Start point: Location Berlin = new location (52.517, 13.40); Place tokio = new location (35.70,139.767); This should look like a flight route. So I wanted to go through all the longitude values ​​between two cities and calculate the respective latitude values: location location selection = new location compilation (); Location next = new location (Berlin.latitude, Berlin.languitud); // Startup (double X = Berlin.logram + 1; X & lt; Tokyo; lengthening; x ++) {locationCollection.Add (next); Next = new location (???, x); } The question is how can I calculate latitude for each latitude value for polyline? Thanks! to: This implementation is in C. #define PI 3.14159265358979323846 Double degree_didien (double D) {return D * PI / 180.0; } Dual Radius_Agre (double R) {Return R * 180.0 / PI; } Double latitude (double latte 1, double lawn 1, double latte 2, double lawn 2, double lawn) {return e...

android - Processing - error -

संभव डुप्लिकेट: मैं एंड्रॉइड मोड में प्रोसेसिंग का उपयोग कर रहा हूं। मुझे हमेशा निम्न त्रुटि मिलती है जिस पर मुझे कोई सुराग नहीं है कि कैसे ठीक करें। मेरे पास एंड्रॉइड इंस्टॉल का नवीनतम संस्करण है (16)। बिल्ड फ़ायरफ़ील्ड C: \ Program Files \ Android \ android-sdk \ tools \ ant \ build.xml: 517: परियोजना लक्ष्य को हल करने में असमर्थ 'android -10 ' दोहराएं कि आपके एंड्रॉइड एसडीके मैनेजर के जरिये आपके पास एपीआई 10 स्थापित है।

user interface - how to render a map defined by a matrix of cells using QT Gui? -

I have a map using QT that is defined by a matrix of cells in the observation mode (the GPS map looks like ). I want to be able to zoom it and each cell is defined by its color and some properties (bitmap to put on the cell). In order to be able to move the map in the direction of mapping (using the directional arrows) I also need a GPS. Right now, I'm thinking of drawing a matrix of QImages on my screen, and load each of them with information about all the cells I need, but it's a lot Do not feel like a good solution Thank you for every chance you provide. Your initial idea is justified, but all QImages and you have a custom QGraphicsItem and put them in a QGraphicsScene (and correct their position) - so you only need QGraphicsView to visualize everything In this way you get BSP painting and selection optimization, see the changes, and keep free animations (if necessary!) Free of charge.