Posts

Showing posts from January, 2010

php preg_split w/regex -

& lt;? Php $ str = '17: 30 फुटबॉल 18:30 भोजन 20:00 शांत '; $ Chars = preg_split ('/ ^ ([0-1] [0-9] | [2] [0-3]): ([0-5] [0-9]) $ /', $ str, - 1, PREG_SPLIT_OFFSET_CAPTURE); Print_r ($ अक्षर); ? & Gt; लौटा: अर्रे ([0] = & gt; अर्रे ([0] = & gt; 17:30 फुटबॉल 18:30 भोजन 20:00 चुप [1] = & gt; 0)) जब मैं उम्मीद कर रहा था: Array ([0] = & gt; Array ([0] = & Gt; फुटबॉल [1] = & gt; 7) [1] = & gt; ऐरे ([0] = & gt; भोजन [1] = & gt; 22) आदि क्या कर सकते हैं I आपको एंकर ड्रॉप करना होगा ^ और $ Regex के आसपास - $ अपने रिजक्स के आसपास - उनके साथ जगह नहीं मिल सकती क्योंकि वे स्ट्रिंग की शुरुआत से शुरू करने और स्ट्रिंग के अंत में समाप्त करने के लिए विभाजन स्ट्रिंग की आवश्यकता होती है - यह तब तक सत्य नहीं हो सकता जब तक कि आपके इनपुट $ chars = preg_split ('/ \ S * ([0-1] [0- 9] | 2 [0-3]): ([0-5] [0-9]) \ s * / ', $ str, -1, PREG_SPLIT_OFFSET_CAPTURE);

ASP.NET how to use __doPostBack from Custom JavaScript with Master/Content Pages -

In a simple ASPX page, I may have a custom JavaScript function postback as described in the normal page, using a link button Does: & lt; Asp: LinkButton id = "CreateFile" runat = "server" onclick = "CreateFile_Click" /> The VB sub-routine with the code behind it is: create subfile_kill (system like sub-sender, system, by value, like a. and a Javascript custom function that does: __doPostBack ('CreateFile', ''); Simple examples no longer work when I get the code taken to a content page with a corresponding page. I know that the server control id is being changed, the generated HTML when a master page is included, and I am using the correct ID in javascript. As an example, I use Javascript in the generated HTML for the LinkButton ID '.' = CreateFile.ClientID%> ' Never less, I still can not figure out how to get a postback from Javascript when the master page is included. More precisely, the code w

javascript - Background position image overlay (Works in IE, not in Mozilla/Chrome/Safari) -

I have been having an issue in the background image position using the following jquery background position commands in Firefox, Google Chrome and Safari The code works correctly in IE 8. $ ('# element'). CSS ({backgroundPosition: 'xpx ypx'}); The desired effect is a continuous stream, on the left side of the screen, the liquid on the left blurred behind the contents of the main page. It is obtained by using 2 fluid images, one completely sharp and one completely blurred. As the user changes the window size, a jquery function calculates the exact state of the blurred image (set as background image) and edits the background page css attribute. The X position of the image is dynamically calculated window size and position Y is constant. CSS is being corrected (note the background position on the right side in the most text box). However, the background image I am attempting to overlay is absent in Mozilla / Chrome / Safari. See jscript code below: $ (window).

Port a Rails App from Windows to Mac or Linux -

Hello, I've been a Rail Developer for Windows at some time, but I've recently completed my biggest project (this is). Is quite extensive, took me to build in a year), but I am having difficulty in deploying it. Combining its size, complexity and the atmosphere of a window, it is creating the complexity of the waste to deploy it. I'm thinking of getting the old Mac Mini and using it for rail development. Either install Unix or that on another box. Is there any way that I can shut my app on Mac or Linux machine without starting? I can not find any resources about this. Unless you have a very specific system call, your app does not have to do anything "port" There should be no need because it should work on Linux or OS X. Out of curiosity, what kind of problems are you running with deployment?

java - Accessing 'this' in anonymous methods -

I am trying to do a simple global exception handler in your Android app and I am having troubles: <> public class extends TicTacToe activity {/ ** when activity is created first. * / @ Override Crate on Public Zero (Bundle Saved Instantstate) {Super. Contents (Saved Instantstate); . Thread.currentThread () setUncaughtExceptionHandler (New UncaughtExceptionHandler () {@Override pre-qualified public void uncaughtException (yarn, throwing) {Toast.makeText (it, "toast", Toast.LENGTH_LONG);}}); SetContentView (R.layout.main); }} I'm a rather new one with both Android and Java but that will work in .NET. Can I access the local variables of unknown methods in Java? If so, how should I rewrite it? Thanks, Vitaly You can, but not in the way This UncaughtExceptionHandler object Replace > TicTacToe.this is known Also, you must have a compile-time error. It's not like this?

WPF layout calls MeasureOverride repeatedly in increments of 2? -

I have participated in a case where I have a custom panel (received from the panel) and I call it a A ListView in ItemsPanel. When I change the shape of that container, when I minimize it, then the major override function of my panel is called once, but if I change it bigger (let's move from 100 to 300 ), It calls for two o'clock in the pay scale of 2 and so 102, 104, etc. for each value between 100 and 300, to MajorOverAiride and OrangeRired. The strange thing is that the container immediately resizes (its size is 300 instant). It does not make any difference to me, returning from this major override - it just does this. I think I can do it in a very small application and I can post it here, but I am unable to reproduce it like this yet. Can anyone know what can be the reason for this? By dynamically setting the miniwon's property of my panel, I am able to achieve this behavior As it changed with the size of the container it prevented the unnecessary ca

osx - Java OS X - No app icon in dock -

संभावित डुप्लिकेट: मैं अपने .jar फ़ाइल से .app फ़ाइल बनाने के लिए जार बंडलर का उपयोग कर रहा हूं। जब मैं ऐप लॉन्च करता हूं, तो मुझे डॉक आइकन को बिल्कुल भी दिखाना नहीं चाहिए। मैंने पहले ही इसमें शामिल करने के लिए मेरी .plist फ़ाइल को संशोधित करने का प्रयास किया है: & lt; string & gt ; NSUIElement & lt; / स्ट्रिंग & gt; & LT; कुंजी & gt; 1 & lt; / कुंजी & gt; लेकिन यह काम नहीं करता है ... कोई मदद? मुझे लगता है कि आपके टैग पीछे हैं। & lt; key & gt; एनएसयूआईईलेमेंट & lt; / key & gt; & LT; 1 & lt; / स्ट्रिंग & gt स्ट्रिंग & gt; आप यह भी प्रयास कर सकते हैं: & lt; key & gt; LSUIElement & lt; / key & gt; & LT; 1 & lt; / स्ट्रिंग & gt स्ट्रिंग & gt;

php - Facebook Connect: Error when clicking the Facebook Connect button -

I get this error when I click the Facebook Connect button: API Error Code: 100 API Error Description: Invalid Parameter Error Message: Not Owned by Next Application I'm also not sure how to do this, but for Facebook connectivity All the documents have been read and come up with: & lt; ? Php date_default_timezone_set ("America / Toronto"); Define ('FACEBOOK_APP_ID', '##################'); Define ('FACEBOOK_SECRET', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' '); Function get_facebook_cookie ($ app_id, $ application_secret) {if (!! ($! COOKIE ['FBS_'. $ APIID]) blank return; $ Args = array (); Parse_str (trim ($ _cookie ['fbs_'. $ App_id], '\\' '), $ args; Ksort ($ args); $ Payload = ''; Foreach ($ args = & gt; $ value as dollar) {If ($ key! = 'Sig') {$ payload. = $ Key '='. $ Value;}} if (MD5 ($ payload. $ Application_secret)! = $ Args ['sig']) {return tap;} $ $ IAG

Using PHP to read a web page with fsockopen(), but fgets is not working -

I यहां इस कोड का उपयोग कर रहा है: सार्वजनिक फ़ंक्शन readHttpFile ($ strUrl, $ iHttpRedirectMaxRecursiveCalls = 5) {// वेब सर्वर का नाम / आईपी, पथ और पोर्ट प्राप्त यूआरएल को पार्स करना। $ Url = parse_url ($ strUrl); // यदि पथ $ strUrl में मौजूद नहीं है तो '/' के लिए पथ सेट करना यदि (isset ($ url ['path']) === गलत) $ url ['path'] = '/'; // सेटिंग पोर्ट को डिफ़ॉल्ट HTTP सर्वर पोर्ट 80 अगर (isset ($ url ['port']) === गलत) $ url ['port'] = 80; // सर्वर से कनेक्ट हो रहा है) // रीसेट क्लास डेटा $ this- & gt; सफलता = गलत; सेट नहीं ($ इस- & gt; strFile); सेट नहीं ($ इस- & gt; aHeaderLines); $ This- & gt; strLocation = $ strUrl; $ Fp = fsockopen ($ url ['होस्ट'], $ url ['port'], $ errno, $ errstr, 30); // लौटें अगर सॉकेट $ $ नहीं खोला-- सफलता सफलता के लिए झूठी है अगर (! $ एफपी) वापसी; $ हैडर = 'प्राप्त / HTTP / 1.1 \ r \ n'; $ हैडर। = 'होस्ट:'। $ Url ['host']। $ Url ['पथ']; If (

activerecord - Updating extra attributes in a has_many, :through relationship using Rails -

I have been able to establish many-to-many relationships between the following models Skills Player Player Skills, is a feature that is not normally in skill: A level. / P> Models look like this (edited for condensation): class player scale & lt; ActiveRecord :: Base is_to: Character is_to: Skill end class skills & lt; ActiveRecord :: Base is_maya: player_skills_images: characters ,: through = = gt; : Player_skills attr_accessible: Name, Description End Category Characters & lt; ActiveRecord :: Base is_mto: The user has_many: player_skills_im I: skill ,: through => : Player_skills end Then there is nothing fancy in the model ... The controller is also very basic at this point ... it is quite a stock update action. The form I'm modifying is the letter # edited. There is now a series of check boxes that allow characters to add / remove skills. It is very good, but the whole thing to use it was to track a "level" through the "medium

visual c++ - Problems encountered in changing a CRichEditCtrl selection color -

I wrote the following code after creating CRichEditCtrl // 06112010: The following code was added: CRichEditCtrl To highlight texts in black instead of the default blue color - 1311 { m_EditControl.SetSel (0,100); CHARFORMAT2 CF1; Cf1.cbSize = sizeof (CHARFORMAT2); M_EditControl.GetSelectionCharFormat (cf1); Cf1.dwMask = CFM_BACKCOLOR; Cf1.dwEffects & amp; = ~ CFE_AUTOBACKCOLOR; Cf1.crBackColor = RGB (0,0,0); M_EditControl.SetSelectionCharFormat (cf1); M_EditControl.Invalidate (); } After this I am adding text, but selection comes in blue rather than black. Can anyone tell me what I'm doing wrong? Thank you, DIV You can not do this by using SetSelectionCharFormat, which only reproduces the selected text Will do The person you are asking is the owner who attracts rich editing control, which is going to work more than creating your own custom window from the CWND and implementing your own WM_PAINT handler.

c# - ReSharper show warning with SqlDataReader -

When I type something like this: using (var connection = Using new SqlConnection ("(reader (read ()) {}}}}} Reverse shows that shows the warning on reader.Read () , and states that the reader can be null . < P> But in what cases can it be empty? As I know that the command returns no reader is empty It is not just anything. Given that it reports as a bug on YouTrack (Twice - more), it seems that empty annotation sent with RT is less in this regard. Your ReSharper_installation_dir \ Bin \ ExternalNnnations folder - this is The place where the annotation files are installed for me, with v5, here is a file in System.Data \ System.Data.Nullness.xml , which contains this annotation: < Pre> & lt; Member Name = "M: System.Data.SqlClient.SqlCommand.ExecuteReader" & gt; & Lt; Specialty ctor = "M: JetBin.Anotation.CanbanNL. Attribute. #Ctor" /> & Lt; / Member & gt; If you are satisfied with your own observatio

c# 3.0 - A better way of handling the below program(may be with Take/Skip/TakeWhile.. or anything better) -

I have a data table that has only one line but it has 44 columns. My job is to get the columns from the 4th row to the end. After this, I have done the program below which is in line with my requirement. (Please note that the dt is datable) list & gt; Decimal & gt; LstDr = new list & lt; Decimal & gt; (); Numerical (0, dt.Column.Count). List (). ForEach (i => {if (i> 3) lstDr.Add (convert toDecimal (dt.rows [0] [i]));}); There is no harm in the program. Okay, the works are fine. But I think there might be a better way for the program, take op or take or some other stuff. I am looking for a better solution Is this possible? I am using C # 3.0 Thank you. It should do this: list & lt; Decimal & gt; LstDr = dt.rows [0] .imare Skip (3). Selection (O = & gt; Convert. ToDecimal (o)) .Oolist ();

c# - MVC map to nullable bool in model -

फ़ील्ड युक्त एक दृश्य मॉडल के साथ: public bool? IsDefault {प्राप्त करें; सेट; } मुझे देखने में मैप करने का प्रयास करते समय एक त्रुटि मिलती है: & lt;% = html.CheckBoxFor (मॉडल = & gt; model.IsDefault) & gt%; निहित प्रकार 'bool' को रूपांतरित नहीं किया जा सकता है? 'बूल' के लिए एक स्पष्ट रूपांतरण मौजूद है (क्या आप एक कलाकार को नहीं छोड़ रहे हैं?) मैंने कास्टिंग, और .value का उपयोग करने की कोशिश की है और न ही काम किया है। मुझे वह व्यवहार ध्यान देना चाहिए जो फ़ॉर्म सबमिट करना चाहिए, IsDefault को मॉडल में सही या गलत सेट करना चाहिए। शून्य का मान का अर्थ है कि मॉडल अभी भी पॉपुलेटेड नहीं हुआ है। इस मुद्दे पर आपके पास तीन संभावित मूल्य हैं; सच, झूठी और शून्य, इसलिए चेकबॉक्स तीन राज्यों (केवल दो राज्यों) को संभाल नहीं सकते हैं। ब्राड विल्सन ने अपने ब्लॉग पर चर्चा की है वह नल बुलियन के लिए ड्रॉपडाउन लिस्ट का उपयोग करता है। यह स्टैक ओवरव्लो मेरे ऊपर की तुलना में स्थिति का वर्णन करने का एक बेहतर काम करता है। समाधान के नकारात्मक पक्ष कभी

c++ - Best approach to synchronising properties across threads -

I am looking for some advice on the best ways to synchronize access to the properties of an object in C ++. The application contains an internal cache of objects that has 10 properties. These objects should be requested in those sets whose properties can be modified and saved again. They can be reached at any time by 2-4 threads, but access is not so intense, so my options are: Using the important section, property accessories for each object Lock on It means a lot of important sections - one for each object. Return the copies of the objects to update the object properties and an update function that locks the same important section appropriate. I think option 2 seems most efficient, but I have to see if I remember a hidden 3 option which would be more suitable. Thank you, J First of all, I think that you Concerned about How do you know the barriers to your code due to locking or copying? Important sections are very light and do not cause too much ground, or

Detecting and changing programmatically data connection (GPRS/UMTS) on Android -

I know that unfortunately it is not possible to detect and replace programmatic data connection (GPRS / UMTS) on vanilla Android, And to edit common functioning APN settings is a very good solution. However on my device (Xperia X10), I have an additional setting with "Data roaming", which allows MMS and data to be enabled or disabled. I think this is a privatization created by Sony Ericsson, and maybe other vendors have something like this, is there any way to use this setting? I do not have a SE phone, but I was seen in my system dump and: Com in AOSP sources There are two internal methods in the Android. Internal.telephony interface: Enabled Data Connectivity () and Disabled Data Connectivity (). It is a part of the interface and its implementation system. Com.android.phone has two ways with the same names as above. PhoneInterfaceManager which is a part of the Phone.apk app. These methods only make calls with the above / system. Sony has modified the com.a

ruby on rails - redirect_to custom http header -

On my current project, http need to set the custom header header while redirecting to the default auth. Can I direct redirect_to for custom headers? Thank you. request to set custom HTTP headers within a controller of the object Header method can be used: request.headers ['foo'] = 'bar'

printing - Qt4.6: QTextDocument <HR> tag prints only very thin, almost invisible hair lines -

जब QTextDocument के साथ doc-> gt; प्रिंट () मैं लगभग & lt; hr & gt; द्वारा सम्मिलित क्षैतिज नियम नहीं देख सकता पीडीएफ़ को छपाई करते समय ये स्पष्ट रूप से दिखाई देते हैं लेकिन जब एक प्रिंटर पर मुद्रित किया जाता है तो ये लाइनें बहुत पतली रेखाएं हैं, कागज पर लगभग अदृश्य। मैं इसे कैसे ठीक कर सकता हूं? मैंने वर्तमान में एक ब्लैक पिक्सेल के साथ एक & lt; img & gt; डालने में मदद की है, लेकिन यह बहुत बोझिल है क्योंकि मुझे परीक्षण और त्रुटि से उचित पिक्सेल चौड़ाई का पता लगाना है। & lt; घंटा & gt; टैग चौड़ाई विशेषता का समर्थन करता है, जिसे एक पूर्ण या रिश्तेदार (% ) मूल्य उदा .: & lt; घंटा की चौड़ाई = 3 & gt;

c# - How to find out first character index in my Textbox -

I have a textbox, I just need to enter the alphabet at the beginning of the text box; There is no integer, no special character ... What should I do? If you are doing this customer, you can ASP: regular expression validator Can be used in the following ways. & lt; ASP: Text Box ID = "Input Box" Runat = "Server" /> & Lt; Br / & gt; & Lt; ASP: Regular Expression Validator runat = "server" controlToValidate = "inputbox" Validation Expression = "^ [A-JA-Z]. *" Error message "input should start with a letter" /> On the server side, you can only check the first letter using char.IsLetter . bool isValid = char.IsLetter (input box text [0]);

uinavigationcontroller - iphone - navigation controller - move to first view from last view without traversing all intermediate views -

I'm working on an iPhone app that will show 4 buttons in the first view. When clicking on a button, it will load a new view with the Navigation Controller, this Navigation Controller View allows you to travel up to 11 sub views. In the 11th sub-view, after I click on the Reset button Reset button, I have to go back to Navigation Controllers, all 11 views without any views? Is it possible to achieve this? If yes, how? If not, what can be the solution? You can also use it: [auto. Navigation Controller PopToRootViewControllerAnimated: Yes];

c# front-end GUI calling linux C++ functions -

I am working on a project that has written software in .NET C # and now requires new features Is that we have third party APIs built on C ++ in Linux. The files are given to us. What is the best way to achieve this? Is a JBis application server and JNI being developed the best way? Thank you. you mono applicable to ASP.NET Web service Can try with

java - What happens if an exception is thrown during finalize() -

What if an exception is made during execution of finalization ()? Is the stack open normally? Does it continue to last () and ignore the exception? Does it ultimately stop () and keep things going to GC? or something else? I am not looking for guidelines for final use From javadoc: An exception thrown by the method is stopped due to finalizing this object, but it is otherwise ignored.

handler - applescript click every element via gui scripting -

I want to redo through every element on an iTunes window and try to click on each element. I would also like to write a text file that I clicked. The code I have written is not working. In particular, I get an error The process "iTunes" click_an_element is not able to understand the message. What am I doing wrong? Thank you! ! application "iTunes" tell explaining how to activate the application "System Events" process "iTunes" tell "window iTunes set elements to the entire contents of" (I elements of length 1 repeat with) elements click_an_element I items (elephant) Show_what_you_clicked (elephant) end repeat end tell tell end elephant set ------- ------------ operators click_an_element the ( An_element) Tell the application to activate "iTunes" to show the application " The development system development process "tell" texte "application tell tell" iTunes "process to activate&quo

MongoDB Schema Design - Many small documents or fewer large documents? -

पृष्ठभूमि मैं हमारे RDBMS डेटाबेस से MongoDB को रूपांतरण के लिए प्रोटोटाइप कर रहा हूं। निन्दा करने पर, ऐसा लगता है कि मेरे पास दो विकल्प हैं, जो कई छोटे (लाखों) दस्तावेजों की ओर जाता है या जो कम (सैकड़ों) बड़े दस्तावेजों की ओर जाता है। अगर मैं इसे नीचे खींचना कर सकता हूं एक सरल एनालॉग के लिए, यह कम कस्टमर दस्तावेजों के साथ संग्रह (जैसे जावा में) के बीच अंतर होगा: class ग्राहक {निजी स्ट्रिंग का नाम; निजी पता पते; // प्रत्येक क्रेडिट कार्ड में सैकड़ों भुगतान उदाहरण निजी सेट हैं & lt; क्रेडिट कार्ड & gt; क्रेडिट कार्ड; } या इस तरह कई भुगतान दस्तावेजों के साथ कई संग्रह: वर्ग भुगतान {निजी ग्राहक ग्राहक; निजी क्रेडिट कार्ड क्रेडिट; निजी तिथि पेडेट; निजी फ्लोट पेएमाउंट; } प्रश्न क्या मोंगोडीबी को कई, कई छोटे दस्तावेज़ों या कम बड़े दस्तावेज़ों को पसंद करने के लिए डिज़ाइन किया गया है? क्या उत्तर में ज्यादातर प्रश्नों पर निर्भर करता है कि मैं क्या चल रहा हूं? (यानी ग्राहक एक्स के पास कितने क्रेडिट कार्ड हैं? बनाम पिछले महीने भुगतान किए गए सभी ग्राहकों की औसत रकम क्या

c# - How to check if a .NET DLL is registered? -

I have a .NET solution (written in C ++ COM, a project written in C #) on its libraries with. I would like to create some start-up tools that all C #, C ++ libraries will be registered correctly. How can I do that? How can I ask .net if something is regitered in C # or C + + COM library? Br In one way is to create an object using the estimated registered DLL if it works You can ensure that all other methods properly registered in it are a bit unreliable

regex - How can I create an acronym from a string in MATLAB? -

Is there an easy way to create a short word from a string in MATLAB? For example: 'Superior Temporal Gyurus' = & gt; Text after "STG" You want to put every capital letter in a short name .. . ... You can use the function: str = 'Superior temporal guerus'; % # Sample string abbr = str (regexp (str, '[A-Z]')); Get the capitalization on% # ... or you can work and use: abbr = str ((str == upper (STR); & amp; amp; ~ isspace (str)); Compare the #% stroke to its uppercase% # version and keep the matching account elements ignoring% white #% # or you can use capital letters instead: < Pre> abbr = str ((str & lt; = 90) & amp; (str> = 65)); % Big letters go one (65) to z (90) Every letter that you start a word in a short name Want to put it .. ... You can use the function: abbr = str (regexp (str, '\ w +')); Get the letter from starting% of every word ... or you could not use functions: s

php - Customizing setUp in PHPUnit -

I'm looking to run a bunch of tests with an object with different parameters in the set-up function. How can I do this? I tried to use the @Data Provider, but it does not work with set up. I quickly found out. What I want to do here (using @dataProvider): < / P> / * * @ Data Provider Provider * / Function Set Up ($ name space, $ args) {$ this- & gt; Tag = new tag ($ name space, $ args); } Function provider () {return array (array ('hello', array ()), array ('world', array ())); } Function testOne () {} function testTwo () {} The result of this is that testOne () and testTwo () run with the namespace "Hello" with an object And thanks, matte if you do not meet the test There is no need to assign the SUT in the member variable of the testcase instance. Create new tag examples in the bus provider and pass them instead of the test function / ** * provides different test tag examples * / function tag provider () {return array (a

Perl parsing ps fwaux output -

I am trying to understand the processes of children from a given parent's PS FYX (One of doing so The better way can be this). Actually, I'm running Daemon, which can not be processed at any time, or not. In another script, I want to see if there are any child procedures, and if you do something like this then error then. ps fwaux | Grep will show me the tree, but I'm not sure what any suggestions to do with it will be great. You can parse the results of the call: Usage Proc: ProcessTable; My $ process = PRO: processable-> new (enable_ttys = & gt; 0); My @Childen = Grape {$ _- & gt; CMDline = ~ / some_pattern_matching_your_children /} @ {$ procedures-> Table}; #or: My @Childon = GAP {$ _- & gt; Ppid == $ parent_pid} @ {$ processes-> Table}; But withdrawing the major problem of child tracking: Instead of displaying the procedure table, children should use PID files. Can help you

asp.net - How to kill a javascript async call to a .net webservice? -

My javascript code is calling an asp.net webservice, so I have to call the webservice in this way: MyWebservice.GetData (Ultimate, Response, Response Timeout, Response Error); When the webservice returns the data, then the answer-protected method is called. Although sometimes the user can navigate to another URL before the webservice call actually comes back, in such a scenario, Firefox says an error, 'An error occurred in the Orsysibube request server Method gatedown failed ' So my question is how can I kill async calls when a user navigates to another page or does another request for the webservice? I know in a general XMLHttpRequest that I could say the Abort method, but it is not sure how it works with the webservice proxy above. A good practice will keep your normal tasks in a common place, accessible from all your pages. Could. This will include the OnError function. This way you can safely refer to the same function from all your pages. If you need t

visual studio 2010 - Obtaining Nearby Wifi In C -

I am trying to identify a method to get WiFi access points nearby using C in Windows. I'm coding in Visual Studio 2010. I have read the required documentation, but I have lack of guidance about implementing this code. I have a special interest in getting the MAC addresses of nearby Access points or at least the MAC address of the connected WiFi access point at least on this WMI in Windows, especially Windows XP SP3 and Is it possible to do this later? Any indication on how to do this is greatly appreciated. See C / C ++, then in the library. XP SP2 or higher.

asp.net mvc 2 - Query String Routing with Nullable Types -

I have one of those encoded block days that I should know but instead I will ask for some help I have two routes: / log in /login?wa=wsignin1.0&wtrealm=http://localhost/MyApp action method access Gives the login page for the first with an HTTP GET - as in the other there is some federated authentication stuff. I have defined two controller methods: Public Performance Index (); Public sector index (string wa); Of course, routing is not like this because the empty type makes it obscure, if the value in the data is present in the data, if I say to execute the second method, how can I stop it? EDIT: I have temporarily solved the problem with an action method selector. Is this the best way? Public category QueryStringAttribute: ActionMethodSelectorAttribute {Public ICollection & lt; String & gt; Key {receive; Private set; } Public QueryStringAttribute (parameter string [] key) {this.Keys = new ReadOnlyCollection & lt; String & gt; (Keys); } Public overr

rpxnow - RPX abbreviation expansion? -

Do anyone know whether something is a short name or just a name? says: What stands for the RPX is? Trusted Party Accelerator is a release party from the OpenID 2.0 specification ...

jQuery cookie control -

To create cookies, which will work on all pages on the site ? The code must be added to "movie_check" with "none" value, which can be used on all pages of the site "www.site.com" (the script was implemented). Ends after 365 days. Try it (does not work): $ Cookie ("movie_check", "no", {expires: 365, domain: 'www .site.com'}); Thanks. Try: var date = new date (); Date.SsetTime (date.getTime () + (3 * 24 * 60 * 60 * 1000)); $ .cookie ('movie_check', 'no', {path: '/', expiry: date}); Your code sets an expiration date in the past.

linq - Can't get results from a IQueryable -

मेरे पास Linq में इकाई में निम्न कोड है: var policy = से pol in Conn.Policy जहां pol.Product.DESCRIPTION == "कुछ उत्पाद" चुनें pol; उसके बाद, तालिका नीति में एंटीटी नामक एक टेबल के लिए कुछ निर्भरताएं हैं अगर मैं ऐसा करता हूं: foreach (पॉलिसी पॉलिसी में) {if (! P.Entity.IsLoaded) p.Entity.Load (); IEnumerable & LT; इकाई & gt; Entities = p.Entity से ent में जहां ent.EntityType.DESCRIPTION == "SomeEntityType" Ent चुनें; Console.WriteLine (entities.ElementAt (0) .NAME); } यह कहते हैं, "ऑब्जेक्ट एक उदाहरण के लिए सेट नहीं है", लेकिन अगर मैं करता हूं: foreach (पॉलिसी पॉलिसी में) {if (! P.Entity.IsLoaded) पी। एंटीटी.लोड (); फोरहैक (इकाई एट ए पी। एंटीटी) कंसोल। लिखें (एट।); } यह काम करता है! मैं किसी को बता सकता हूं कि क्यों? डी कहते हैं, क्योंकि आपकी LINQ कथन किसी भी मान नहीं लौट रही है, इसलिए संस्थाएं शून्य है। आपका दूसरा उदाहरण काम करता है क्योंकि आप परिणामों को फ़िल्टर करने की कोशिश नहीं कर रहे हैं। क्या आपके पास कुछ स

php - Creating foreach loops using Code Igniter controller and view -

This is a situation I have found myself in some time and I want to clear it once and for all I am My Controller function my_controller () {$ Id = $ this- & gt; Yuri- & gt; Segment (3); $ This- & gt; Db- & gt; ('Cue_sheets'); $ This- & gt; Db- & gt; Where ('id', $ id); $ Data ['get_cue_sheets'] = $ this- & gt; Db- & gt; Find (); $ This- & gt; Db- & gt; From ('clip'); $ This- & gt; Db- & gt; Where ('sheet_id', 'qi sheet id goes here' ???); $ Data ['get_clips'] = $ this- & gt; DB- & gt; Find (); $ This- & gt; Load-> View ('show_sheets_and_clips', $ data); } My view & lt ;? Php if ($ get_cue_sheets-> result_are ()) {? & Gt; & Lt ;? Php foreach ($ get_cue_sheets-> as result_are ($ sheetRow)):? & Gt; & Lt; H1 & gt; & Lt ;? Php echo $ sheet row ['sheet_name']; ? & Gt; & Lt; / H1> & Lt; Br / &a

Updated: How to span multile tables in Django for a backwards relationship -

Django दस्तावेज़ीकरण एक उदाहरण देता है जैसे: b = Blog.objects.get (आईडी = 1) b.entry_set.all () 2 प्रश्नों में से जो परिणाम मैं समझता हूं। क्या होगा अगर मैं ब्लॉग, ब्लॉग प्रविष्टियों और उन प्रविष्टियों से जुड़े सभी टिप्पणियों को कई प्रश्नों में प्राप्त करना चाहता हूं जो प्रविष्टियों की संख्या पर निर्भर नहीं होती? या क्या मुझे ऐसा करने के लिए एसक्यूएल में ड्रॉप करना पड़ता है? blog.objects.select_related (...)। (आईडी = 1) प्राप्त करें

php - Get Wordpress sidebar from another Wordpress blog? -

I want to write a plugin that will drag a sidebar from a WordPress blog and put it in another blog's sidebar. Can help, please? I have to write a plugin, but in reality it does not know where to start with this idea. I believe he is saying that he recovered a sidebar from another website I want to write a plug-in to be able to and display it (potentially as a widget?) If I am not a question then I apologize; Otherwise, I take a shot on the answer. The first thing is that I have just one plugin (and some javascript not only) about any other widget plugin actually what you want Assume that you want the plugin, besides, you will need a recovery code which is either or I hope that helps any or all of you where you are going.

language features - Understanding Ruby Enumerable#map (with more complex blocks) -

Assume that I have a function def odd_or_even n if n% 2 == 0 Return: And also return: End of the weird end and I had a simple enumerable array simple = [1,2,3,4] , 5] And I run it through a map, with my work, using an end-end block: simple Map do | N | Odd_or_even (n) end # = & gt; [: Strange,: ,, strange, even:, weird] How can I do without it, say, define the ceremony in the first place? For example, # does not work smoothly. Map | N | | If n% 2 == 0 Return: More Return: Strange End End # Desired Results: # = & gt; [: Strange, even: weird, even: weird] is not a valid ruby, and to think about it the compiler gets mad with me . But how do I implement a similar type of work, which works? edit In fact, the solution to my problem is very low for me, compared to the motivation / logic behind it, helps me understand How the ruby ​​blocks work :) Then just close the return Remove s and you become golden. This is because the block has been sen

php - Submitting a URL into a Form without "http://", with "www.", or with neither -

(संपादित) हैलो, नीचे दिए गए फॉर्म में, फ़ील्ड & lt; div class = "urlfield" & gt; & lt; इनपुट नाम = "url" प्रकार = "url" id = "url" maxlength = "500" & gt; & lt; / div & gt; ठीक है जब एक URL सबमिट किया जाता है जिसमें इसकी शुरुआत "http: //" होती है। हालांकि, यदि URL केवल "www" के साथ सबमिट किया गया है, तो यह कार्य नहीं करता है। इसके सामने, या न ही "http: //" और न ही "www।" के साथ मैं इसे कैसे काम कर सकता हूं अगर सबमिट किए गए यूआरएल में इसकी शुरुआत में निम्नलिखित में से कोई भी या कोई भी नहीं है : http: // www। http: // www। echo '& lt; div class = " Submittitle "& gt; एक आइटम सबमिट करें। & Lt; / div & gt; '; एको '& lt; form action = "http: //www...com/.../submit2.php" method = "post" & gt; & Lt; इनपुट प्रकार = "छुपा" मान = "'। $ _ सत्र [' लॉगिन ']।" &q

c# - Extract dates from filename -

I have a situation where I need to remove the date from the filename whose normal pattern is [filename_] YYYYMMDD [.fileExtension] Example "xxx_20100326.xls" or x2v_20100326.csv The following program works Pigment 8 is set in the number pigment / YYYYMMDD length 8 public static string ExtractDatesFromFileNames (string filename) {return fileName.Substring (fileName.IndexOf ("_") + 1, 8); } Is there a better option to get the same? I am basically looking for standard practice. I am using C # 3.0 and edit the .NET Framework 3.5 : I have the solution and the answer to the LC. I used my program like string regExPattern = "^ (?:. * _)? ([0- 9] {4}) ([0- 9] {2}) Is (? [0-9] {2}) (: \\ .. *) $ "; String result = Regex.Match (filename, @regExPattern). group 1]. value; The input in the function is: "x2v_20100326.csv" But the output is: 2010 Instead of 20100326 (which is the expected one) I Regex, especially if

checkbox - In GWT-EXT checkboxtree how to handle single selection of tree nodes? -

I am working with Java on checkpoint in GGT-2.0. My goal is to get a selection model which allows me to select only one tree at a time. If I select another tree after selecting one, then the last one should be unchecked. I have tried to use DefaultSelectionModel with TreePanel, but either I have not used it properly or it is only working for selecting TreeNode, not checking for TreeNode whether someone help me in this Can do? Or even if someone can tell me how can I check if the checkboxes of the TreeNode have been checked or not, this would be OK too. Thanks in advance. Okay I got one thing to check if the check box for the tree view has been checked or not. Treeode [] TN = Trypanel.Tetected (); (Tree node node: TN) {tripanyal.jetnodebiid ("ABC"). GetUI () IShacked (); } & amp; treePanel.getNodeById ("Team-A") to toggle it. GetUI () ToggleCheck ();

c# - How to send ctrl+z -

मैं स्ट्रिंग के लिए ctrl + z कैसे परिवर्तित करूं? I मैं इसे किसी एडी COMMAND के रूप में इस कंप्यूटर पर संलग्न डिवाइस में भेज रहा हूं। असल में, मैं सिर्फ कुछ अक्षर एक स्ट्रिंग में डालूंगा और ctrl + z उस स्ट्रिंग में भी < / P> नीचे दिए गए प्रयासों को आपके लिए काम करेगा serialPort1.Write ("test कोडित प्रोग्राम से संदेश "+ (चर) 26); भी आपके लिए काम कर सकता है serialPort1.Write ("कोडित प्रोग्राम से परीक्षण संदेश"); SendKeys.Send ( "^ (z)"); भी जांचें:

Disable globbing in PHP exec() -

I have a PHP script, which calls the second script to add an IP address for a whitelist. I sometimes want to whitelist all the addresses, in which case I have called it exec ("otherscript *. *. *. *", Output, retal); This works fine, until the string "*. *. *. *" Is added to the whitelist, as long as I did not have another file in the directory of that php script, That pattern ("Foo.1.tar.gz"), was expanded to the wildcards at that point, and is there any way to disable globing in PHP exec in my white list that ends with the filename? This is not mentioned in the PHP docs, as far as I can tell. This will ensure that your strings are safe to use as shell logic, perhaps the manual of globbig Is not mentioned in it because it is dependent on shell, and it is also different between different shells. $ address = escapeshellarg ('*. *. *. *'); Exec ("$ script $ address", $ output, $ $);

wpf - How to force editing of a DataGridComboBoxColumn? -

I can expose a DataGridComboBoxColumn to a grid, but to show the user its drop-down list twice You must click (get first focus and enter editing mode). How do I implement a program to show the drop-down list? is not the exact answer to your actual question, but since the problem needs to be clicked twice The blog post can help, it includes a sample to enable single-click editing in a datagrid.

rails expiring cache -

I've used data in a table using the migration to add some data. When I update, add, delete the product from this table, I need to expire the page and piece cache. I made a clean worker for this. Class ProductSweeper & lt; ActionController :: Caching :: Sweeper Inspection Product Def expire_cache end afterwardscreate DEF expire_cache end after_save def expire_cache end after_update def expire_cache end personalized after_destroy def expire_cache expire_page (: Controller => 'ProductsController',: action => 'index' ) Expire_fragment 'listed_products' and end Then in the script / console I update the product name and save it. When I load my app again in the browser it still gives me a cache hit Hit the cached piece. Thoughts / listed_products (0.2ms) Can anyone tell me to end this cash? I will not be adding, updating, removing products through a controller action Thanks, ash More information: & lt; Div & gt; & Lt;% cac

Change hot spot color in HTML on mouse over -

माउस पर HTML में हॉट स्पॉट रंग कैसे बदल सकता है? यदि आप हॉवर-रंग का मतलब है, तो आप इसे इस तरह (: होवर-छद्म-वर्ग) कर सकते हैं: । Myelement : होवर {रंग: # एफएफ 0000; पृष्ठभूमि का रंग: # 00ff00; } (यह क्लास या टैग-चयनकर्ताओं के साथ काम करता है, लेकिन केवल a पर पुराने IE संस्करणों में) अगर कुछ और "हॉट स्पॉट रंग" का मतलब है: मुझे नहीं पता है कि आप किस बारे में बात कर रहे हैं ...

php - How to build a dynamic checkbox choices from database data? -

वर्तमान में, मेरा चेकबॉक्स एक स्थिर सरणी द्वारा बनाया जाता है: $ options = array ( 'Key_1' = & gt; 'नाम 1', 'कुंजी_2' = & gt; 'नाम 2', ... 'key_n' = & gt; 'नाम n'); के & lt ;? विदेशी मुद्रा (@ चाइसेस $ कुंजी = & gt; $ विकल्प के रूप में) {गूंज "इनपुट प्रकार =" चेकबॉक्स "नाम = 'कुंजी []' मान = '$ कुंजी' / & gt; $ विकल्प & lt; br / & gt;"; }? & Gt; और मैं रिटर्न मानों को इन तक पहुंचता हूं: $ _ POST ['keys'] अगर मैं तालिका डेटा से निर्माण करने के लिए $ विकल्प एरे चाहते हैं? मैं एक तालिका से कैसे एक PHP सरणी (जो चेकबॉक्स विकल्पों के निर्माण के लिए अच्छा है) का निर्माण कर सकता हूं? धन्यवाद अच्छा, आप यह कोशिश कर सकते हैं: $ options = सरणी () $ query = mysql_query ("चुनें फ़ील्ड 1, फ़ील्ड 2 से ..."); अगर (mysql_num_rows ($ query)) {जबकि ($ row = mysql_fetch_array ($ query)) {$ choices [$ row ['field1']] = $ row ['field2&

how to build sql server 2008 datetime object and insert it using perl DBI -

How can I create a SQL Server 2008 datetime object with parallel and to insert the DBI module into a specific table Can provide examples of when using ODBC: my $ sth = $ dbh- At the end of the millisecond, in the time of the millisecond, there can also be '.mmm'. If not using the ODBC, it will depend on which DBD you use .

java - Iterating over hashmap in JSP in struts application -

I have a hashmap object which I'm getting on a JSP page. HashMap & LT; Integer, gift_product & gt; Gift_hm = New Hashmop & lt; Integer, gift_product & gt; (); Gift_hm.put (17, new gift_product ("doll", 67)); Now I have to repeat it and display the content on JSP. There are two fields in the Gift_product category: names and values ​​ . JSP should be output serial number product name Price 17 Doll 67 67 How do I get it? View the Strates Tag When running on a Hashmap, each entry is a java.util.Map key and value to get the key (Gift_product object) and the value (Gift_product object) in this example: / P> First set the Hashket as a feature in your action class request.setAttribute ("gift_hm", gift_hum); and then jsp: & lt; Logic: iterate id = "mapEntry" name = "gift_hm" and gt; & Lt; Bean: defined id = "gift" name = "map entry" property = "value" &

html - set all nested li's to be width of widest li -

How do I get the same width of nested rhythm? When I use the following code of each code as detailed in text only + margin I want to extend all li in the form of comprehensive li under original UL. Example: & lt; Ul id = "menu" & gt; & Lt; Li & lt; A href = "#" headline = "menu A" & gt; Menu A & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & lt; A href = "#" headline = "menub" & gt; Menu B & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & lt; A href = "#" headline = "Nested Menu" & gt; Nested menu & lt; / A & gt; & Lt; Ul & gt; & Lt; Li & lt; A href = "#" headline = "menu item" & gt; Menu item & lt; / Li & gt; & Lt; Li & lt; A href = "#" headline = "tall menu item" & gt; Long menu item & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & l

jquery - Putting Javascript source, then immediately the page not working -

जब मैं अपने पृष्ठ पर निम्न कोड डालता हूं। & lt; script type = " पाठ / जावास्क्रिप्ट "src =" ../../ स्क्रिप्ट / jquery-1.4.1.js "/ & gt; तो नीचे कुछ भी कुछ नहीं हो सकता, क्या कोई मुझे बता सकता है कि क्यों? बहुत बहुत धन्यवाद। क्षमा करें, मैं वेब विकास में बहुत नया हूँ । धन्यवाद स्क्रिप्ट टैग को स्वत: बंद होने की अनुमति नहीं है: & lt; script type = "text / javascript" src = "../../ स्क्रिप्ट / jquery-1.4.1.js" & gt; & lt; / script & gt;

c# - ASP.NET logon and registration with browser password memory -

I have followed asp.net pages for registration and login. Everything works, except that the username / password is not remembered by the combo browser (i.e. the browser is full). This is an issue with all the browsers main fields seem to be appropriately named, I think: & lieutenant lieftlet> gt; & Lt; Div class = "formlayout" & gt; & Lt; P & gt; Enter your login details & lt; / P & gt; & Lt; ASP: validation protected runat = "server" DisplayMode = "bullet list" CssClass = "errors" /> & Lt; Div class = "b" & gt; & Lt; ASP: Regular Expression Videotator Runat = "Server" display = "dynamic" error message = "Invalid email address." ValidationExpression = "^ [\ w \\ -.] @ [One-zA-Z0-9 \ -] (\ [one-zA-Z0-9 \ -]. {1,}). * (\ [A- ZA-Z] {2,3}) {1,2} $ "ControlToValidate =" username "SetFocusOnError =" false "& gt; * & Lt;

java - Does YourKit report ReentrantLocks? -

I am trying to reduce the lock containment on a special code-path in my application. To identify the code with a high lock dispute, I connect my kit to my application and use the "Monitor" tab and see which tones have pointed me about blocking the thread My ultimate purpose is not a red dot in the "threads" tab in the YK GUI for this thread. Often the dispute arises from reading / reading by using an internal lock, so it can be improved using them instead of an ReentrantLock rather than an internal lock When I tried to do this, your kit told less controversy. Is this information reliable? Does your kit report correctly use reentron lock? I am using YourKit 8.0.24 on Solaris 10 with Sun 1.6u18 32-bit JVM. Your kit is now blocked in the "Thread" tab as ReentrantLock s Does not report.

c++ - STL iterators - purpose -

What is the purpose of STL iterations? Why did the programmer create this concept? The iterators allow you to separate the algorithm from the container. As long as you have a start and end iterator, and know the ability of the iterator (random access etc), you can work on the specified range by iterators. For example, see std :: for_each , std :: transform . In this way, you can apply only one version of the algorithm on which you want to operate it, instead of needing to write a new one for each container.

php - Restrict characters used in a string -

How can I restrict the string of characters in the whitelist? // "I understand how to do this; BAD" $ str = ban ($ str, "0- 9a-z."); // "I understand that this is", Does PHP have an inbuilt function which is close to something? I can not prepare a regular expression for this: ( OK, if you change the bus Use characters you want (note, you can add any letters with some cavities. If you want to add - Should be at the end If you want to add \ , then it is necessary to save it from any other \ if You can see the / , [ or ] \ ) This allows some characters and filters the rest: $ str = Preg_replace ('/ [^ a-za-z.] /', '', $ Str); If you want to reject any string that contains any characters Which does not match: if (preg_match ('/ [^ A-Za-z.], /', $ Str)) {// rejected string} < / Pre>

android - NullPointerException on Activity Testing Tutorial -

I am currently trying to perform an Activity Testing Tutorial, and there is a problem. It seems that whenever I try to make some calls inside UIThread, I have a Java. Lung Nullpointer exposure is available. Public Zero TestSpanerUI () {mActivity.runOnUiThread (New Runnabal) {Public Zero Run} {MSpinner.requestFocus ();}}); } This gives me: Incomplete: java.lang.NullPointerException And nothing else. I have tried it on two different samples, with the same result. I tried with an attempt / catch class around the mSpinner.requestFocus () call, and it seems that the mSpinner is zero inside the thread. I found this properly set up () function in the same sample, and a quick assertNotNull (mSpinner) shows me that mSpinner is not actually zero after the set up () function. What could be the cause of this? Edit; Okay, something else has been tested. It seems that the application for resetting between each trial is being tested. It is essential that I have to re-establish all t

Android hide soft keyboard from compound drawable -

I have a editing text, which is a mixed drawable on the right. When I press the drawables and clear the text, I want to hide the soft keyboard. For this, I have the following code: filterText.setOnTouchListener (new on-touchlistener) {public boolean on-touch (see V, Motion event event) {if (filterText.getCompoundDrawables ( } [2] = = null) {// cross is not being shown if there is no need to handle the return false;} if (event.getAction ()! = MotionEvent.ACTION_DOWN) {// Only type return return Answer:;} if (event. GetX ()> filterText.getMeasuredWidth () - filterText.getPaddingRight () - d.getIntrinsicWidth ()) {filterText.setText (""); Input Methanzer IRM = (Input Methodmanager) getSystemSe Rvice (reference. INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow (v .getWindowToken (), 0); return back;} and {back to true;}}}); But that does not work because the edit text seems to be in focus. I tried to filterText.clear focus but there is no way. Thanks Just a

c# - Keep row of datagridview clicked by user selected -

I need a snapet code for that code after that code with the DataGridView Selected is double clicked Right now I am displaying data from a dataset and selection mode select fuller . Any way to set it up? There are two scenarios to deal with this: Timer Tuck Always selected row always goes into the first line of the Data Grid view. Once selected, it is selected, but after the timer, the selected row goes to the first. Thank you for your help! A newbie programmer You get this function timer_tick Private zero timer 3 volts (object sender, eventarges e) {int rowIndex; If (dgvOrdini.Rows.Count == 0) // Here I check that DGV blank rowindx = 0; Else // I save the current row index in rowIndex rowIndex = this.dgvOrdini.CurrentCell.RowIndex; ....... ....... if (dgvOrdini.Rows.Count! = 0) // Now if DGV is not blank / I set my line index dgvOrdini.CurrentCell = dgvOrdini.Rows [rowIndex] Am. [0]; } The selected row will not change with this method.

python - Why can't easy_install find MySQLdb? -

यही मैंने कोशिश की: $ easy_install-2.6 -d / home / user / Lib / python2.6 MySQLdb पढ़ने के लिए खोज http://pypi.python.org/simple/MySQLdb/ 'MySQLdb' के लिए सूचकांक पृष्ठ नहीं मिला (संभवतः गलत वर्तनी?) सभी संकुलों के सूचकांक स्कैन किया जा रहा है (यह जबकि) http://pypi.python.org/simple/ पढ़ना नहीं है MySQLdb त्रुटि के लिए कोई स्थानीय संकुल या डाउनलोड लिंक नहीं मिले हैं: आवश्यकता के लिए उपयुक्त वितरण नहीं मिल सका.परसे ('MySQLdb') आपके पास गलत पैकेज नाम है। सही है: easy_install MySQL-Python या pip स्थापित करें MySQL-Python

java - Deserializing XML text elements with attributes in XStream -

Actually, I want to reverse. I see Microsoft's Bing Batch Geocode service, and some elements look like this (frowned): & Lt; Link role = "output" name = "successful" & gt; Https: //spatial.virtualearth.net/REST/v1/dataflows/Geocode/5bf10c37df944083b1879fbb0556e67e/output/succeeded< / Link> & Lt; Link role = "output" name = "unsuccessful" & gt; Https: //spatial.virtualearth.net/REST/v1/dataflows/Geocode/5bf10c37df944083b1879fbb0556e67e/output/failed< / Link & gt; & Lt; Details & gt; Xml & lt; / Details & gt; & Lt; Status & gt; Full & lt; / Status & gt; ... & lt; / DataflowJob & gt; Note that & lt; Link & gt; elements as well as text content is also relevant POJO classes which I am trying to deserialize: class DataflowJob {String Id; @ XStreamImplicit List & lt; Link & gt; Link; String description; Position status; ...} class links {@XStreamAs

Creating a new variable in C from only part of an existing u_char -

I am writing some code to parse the IEEE 802.11 frame, but I am trying to create a new variable whose length depends on the size of the frame. Here I currently have the code: frames_bab = len = pkt_hdr-> Lennon-radio_hdr- & gt; Lennon-wifi_hdr_len - 4; U_char * frame_body = (u_char *) (Packet + Radio_Hrit-> Lennon + Wifi_HDR_LN); Basically, the frame has a header, a body, and a checksum at the end. Calculate the length of the frame by taking the length of the packet and decreasing the length of the two headers, which appear before ( radio_hdr-> len and wifi_hdr_len respectively), plus At the end for 4 bytes checksium. However, how can I make the frame_body variable without the checksum of the rear? Right now, I'm starting with the contents of the packet starting with the status after two headers, but there is no way to start from that position and end the 4 bytes before the end of packet ? The packet is an indicator for U_Acher, if it helps. I am

database - How do I populate a table from an Excel Spreadsheet in Rails? -

I have a simple 4-column Excel spreadsheet that matches the ID code for the purposes of the university Is large (300k). I need to come up with a way to convert this data into a table that is populated in my Rail app. It is a document that has been updated now and later, therefore It can not be solved just once. Ideally, this will be some kind of ruby ​​script, which can read the file and automatically create entries, so that when we email a new version, we can update it automatically. I'm on everybody if it matters at all. How can I do something like this? If you can, save the spreadsheet as a CSV, to parse the Excel spreadsheet. In comparison, there are very good gems to parse CSV files. I have found an effective way to deal with this problem, which reads a sequi file and records all records properly. For example, how to read all the lines here from the old, but still effective file using the gem data = Faster CSV. Block ('lib / tasks / data.csv') column =

osx - Pretty Pixel-level Picture Painting, Programatically -

My Mac laptop has 1,024,000 pixels What is the easiest way to blacken my performance and my heart's Pleased with madness for writing a little program for pixels? To make it more concrete, say that I want to apply to attract a Sierpiński triangle, at the pixel level, on the screen, there are ways to do this with nothing else ? Maybe

time delay between 2 lines of code in javascript, not settimeout -

There is a function that will add a time delay between the two lines of code, not the set timeout, because settimeout is a function in its arguments / Object is required. I'm looking for something like this pseudo code Write "abc"; Delay (500); Write "xyz"; TIA Edit: In my second work, Jemar's solution worked for my purpose, and likewise of Robusto I'm just thinking that "sleeping" methods given by Robosto and CMS links are not liked, how will this set different from the timeout method because they start a break in both codes? (Prevents the set timeout before the execution of the function, the sleep method prevents the next line before execution.) The following is clutter and ugly and I can never do it in my code and I do not recommend it to everyone , but it shows that such a thing is possible. // time argument is in millisecond function delay (time) {var d1 = new date (); Var d2 = new date (); While (d2.valueOf () &am

reporting services - Can I get a tab to display in a rendered report? -

I have created an RDL report and do not appear in the reports generated after presenting any tab character within my returned data. Is it possible to display tab character? (Users want to show the basic formatting of their 'Comment' field.) The tabs added to RDL are retained, but the data was being snatched by those rendering engines. The problem is that SSRs are providing output like HTML, which constantly ignores white space And treats the tab as a single space. Perhaps the best you can hope for is either to replace the tab in your SQL query or to place it inline in your textbox. I had the same problem, where I had some HTML tags which were necessary to be stripped and I had to do it through inline substitution. You should be able to change the tab with non-breaking space. Perhaps the obvious replacement is: & amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; Your replacement will look something like this: = Change (MyTable.Fie

c# - MSDTC and Multiple Databases with Entity Framework -

In my code, I am trying to use a transaction using TransactionScope with Entity Framework i while this transaction In we are opening a regular SQL connection with a separate server and database. When conn.Open () is called, we get an error: "Network access for distributed transaction manager (MSDTC) has been disabled. Please provide security configuration for MSDTC Enable DTC for network access using the Componet Services Administration Tool. " However, MSDTC is enabled and running on the server. 1) Just to be sure, but you have actually confirmed that DTC is running. Right click on "My Computer" from your Component Service screen. The top menu item should be called "Stop DTC". 2) Have you checked that your configuration of MSDTC is the same on both ends (your Aperture Server that starts the connection with the database and on your database server)? Pay special attention to the security configuration under your MSTDC tab Good luck

osx - OS X Audio Queues in a 64-bit Environment Issues -

I recently placed my whole application on 64-bit and everything worked fine except for my audio recorder Even though the correct parameters (like sample rate) are being reported, when I see the result of the file in QuickTime, the file has frequent intervals, playing at very high speed, or playing at very low speeds Used to be. I should keep in mind that I clearly type all my variables, in which I have to type 'int' or 'instead of using long' descriptive types like UInt32 and SInt16

php - Jquery Sorting by Letter -

I'm using jquery to sort through the group of paragraph tags (Aaron Haroon's fate). This URL pulls the string "letter" (a letter) from the string and displays the paragraphs starting with that paragraph. It hides all others and consolidates the list so that no duplicate is displayed. See the code: var letter = '& lt ;? Php echo (strlen $ _GET ['letter']) == 1)? $ _GET ['Letter']: ''; ? & Gt; 'Function Finish () {var found_first = []; JQuery ('P'). Each (function () {if (jQuery (this) .text (). Substr (0,1) .toUpperCase () == letter) {if (found_first [jQuery (this) .text)]! = True {jQuery} (This) .addClass ('current-series'); Found_first [jQuery (this) .text ()] = true;} and {jQuery (it) .hide ();}} else {JQuery (this) .hide ();}}}} Working with this whole day and I have 2 questions on this: Is this the first time to ignore the word 'this'? For example, if a paragraph starts with 'Amazi