Posts

Showing posts from January, 2011

string - Regex Replace Zero In Some Instances -

I am trying to write a regex statement that will change all 0 if the following conditions are true < P> Example string: 0,10,9 A, 0,0,20,0LD, 0 All zeros to T0 < / Code> If there is 1-9 in front of 0, then it does not change if the first letter or last letter is 0, then convert it to a T < / Li> If zero is the letter after zero, then change it as T0 in the same letter as before The above string can be in any order and account for possible changes in it should be Delims (,) then the above string should be: T0, 10, 9, A, T, T, 20, TLL, T This is what I've done so far: < / P> 0 (? = [AZ] | [1- 9]). 0 What this is what I get T0,1T0,9A, T0, T0,2T0, T0LD, T0 The problem is 10,20,30, 40,50,60,70,80,90 are being replaced, they do not want You can use negative lookbench to do this. (? Or moving away from your current pattern. (? & Lt;! [1-9]) 0 (? = [A-Z1-9]?)

How to use reset counter in kernel module programming every second? -

How can I use jiffies interrupt to reset some other kernel variable counters in the kernel module. I am trying to reset every counter in a few seconds ... just to check that I reach some limit in every second. Not sure how the kernel module reaches such a way in programming. Some clarifications will be highly appreciated with the example. Thanks You can do something like this: unsigned long after = JT + 5 * HZ; / * (Jiffies> later) * / if (jiffies> later) / / Alternatively, I would consider using some famous macros because the above code can be overflow. Time-time (J, T) Here the macro return is correct if the time is after JF's J times; Otherwise, it returns incorrectly from time to time (J, T), time-time_a (j, t), time-befier_aq (j, t)

How to Set Variables and Process Variable for MySQL in a Perl Script -

यहां मेरा सही उदाहरण है: Id | समय | पूर्वानुमानित | वास्तविक | उच्च ---- + ------------ + ------------ + ---------- + ------- - 1 | 01:00:00 | 100 | 100 | शून्य 2 | 02:00:00 | 200 | 50 | शून्य 3 | 03:00:00 | 150 | 100 | नल 4 | 04:00:00 | 180 | 80 | NULL मुझे भविष्यवाणी में उच्चतम मूल्य ढूंढना है और इसे 'उच्च' कॉलम में रखें (एक विशिष्ट पंक्ति में) ======== = निम्नलिखित SYNTAX का उपयोग कर रहा हूं मैं निम्नलिखित में एसक्यूएल में मैन्युअल रूप से प्राप्त करने के लिए सक्षम हूं: SET @ peak = (तालिका से चयन MAX (अनुमानित)); अद्यतन तालिका SET Peak = @ peak WHERE आईडी = '1'; Id | समय | पूर्वानुमानित | वास्तविक | उच्च ---- + ------------ + ------------ + ----------- + ------ --- 1 | 01:00:00 | 100 | 100 | 200 2 | 02:00:00 | 200 | 50 | शून्य 3 | 03:00:00 | 150 | 100 | नल 4 | 04:00:00 | 180 | 80 | NULL ======================================= हालांकि, जब मैं पर्ल लिपि में उपरोक्त सिंटैक्स का उपयोग करने का प्रयास करता हूं तो यह '@' या किसी भी वैरिएबल के प

Event handler in python serial port data received -

I was trying to write a code, every time a data was received in the serial port, an event was called. I'm using pyserial but I'm not getting a code that works. I have found that people are like for correct: inputb = ord (ser.read (1)) 'rest of code' But I'm looking for a way to add an event when a byte is read from a framework like a data frame () or similar function when triggering the event when valid data will be removed Thank you for your help.

c - Have I done this linked-list questin correctly? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 1 उत्तर मेरे पास निम्न 2 प्रश्न हैं मेरी अगली किताब में क्या कोई मेरी सहायता कर सकता है और मुझे बता सकता है कि मैंने इसे सही तरीके से किया है? 1 समस्या के लिए आपको बूंद को thr नोड के रूप में बनाने की जरूरत है जिसे आप हटाना चाहते हैं struct * oldp; Oldp = l- & gt; आगामी; L - & gt; अगला = oldp- & gt; अगला; नि: शुल्क (oldp); दूसरा एक सही है। इसके अलावा आपको फ़ंक्शन का उपयोग करना चाहिए deleteNextNode (struct linkedList * curr) addNode (struct Doublyll * curr) बेहतर समझने के लिए

how to upload images and links to facebook from android -

I have used this code to successfully upload to Facebook request uploadRequest = Request NewUploadPhotoRequest (session .getActiveSession (), BMP, new request, callback () {@ Override Public Wide On Compact (Response Response) (Toast.Mektext (Facebook Uploads), "Photo uploaded successfully", toast. LNNHT_LOG ) Show (); The problem is now that I want to add a link Because I upload images, how can I do this, the link has to show below the images, any help is appreciated You can upload it with a Facebook API or Intent. Try to share Facebook with intentions, to improve your code. The easiest way to do this is to view.

javascript - How to remove a null object from json -

Image
I'm new to bootstrap js. I have a table with Bootsrap JS, whose data came from the JS file. Here's the code - & lt; Div class = "container-fluid" & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "col-md-8" & gt; & Lt; Div class = "fixedscroll" & gt; & Lt; Table id = "user_table" class = "table-table-hover table-border table-striped responsive" style = "margin-down: 0;" Class = "display" & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; UID & lt; / Th & gt; & Lt; Th & gt; Name & lt; / Th & gt; & Lt; Th & gt; Address & lt; / Th & gt; & Lt; Th & gt; Tag & lt; / Th & gt; & Lt; Th & gt; Edit tag & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; / Table & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Di

c++ - Is it possible to run from Qt GUI application another GUI process modally? -

Is it possible to run another GUI process from Qt GUI application that will act as a modal dialog? You can disable your main window widget, while you "join" Wait for

javascript - How to count string occurrence in string? -

How often can I calculate a particular string in another string? For example, I'm trying to do this in JavaScript: var temp = "This is a string."; Warning (temp.count ("is")); // Regular in Output '2' g The expression (less for global ), instead of searching only the first event, searches the whole string: Var temp = "This is a string."; Var calculation = (temp.match (/ is / g) || []) Length; Console.log (count); This match is is twice and, if there are no matches, then this 0 returns. var temp1 =" Hello World! "; Var count1 = (temp1.match (/ is / g) || []) Length; Console.log (count1);

regex - removing weird double quotes (from excel file) in python string -

I am loading in Extile File using xlrd in Python 3. They are basically the lines of text in the spreadsheet, some quotes on these lines are, for example, a line can be: She said, "My name is Jennifer." When I'm reading them in Python and making them in the wire, then double quotes read as a strange double quote character, which looks like double quote in italics. I am convinced that somewhere on the way, Ajithan was described as some foreign alphabet, rather than some double quotation marks for some encoding issues or for some reason. So in the above example, if I provide that line as "text", then we would have the following like this (although in reality I do not actually type the line, so imagine that the "text" first Was already entrusted): text = 'She said,' My name is Jennifer. '' Text [10] = '' '' The second line will spit because it appears to be unidentified as a normal double coat character. I am w

Is it possible to identify if R is being run in unix or windows environment -

इस सवाल का पहले से ही एक उत्तर है: < / P> 4 जवाब मुझे अलग सेट अप करने की आवश्यकता है मेरे कोड के लिए पथ निर्भर करता है कि यह विंडोज़ या यूनिक्स में चल रहा है या नहीं मैं वर्तमान में इसे स्थापित किया है ताकि उपयोगकर्ता को चलाने से पहले एक चर "Renvironment" बदलना होगा, जैसा नीचे दिया गया है पुनर्निर्माण और लेफ्टिनेंट; - "खिड़कियां" (अगर पुनर्निर्माण == "खिड़कियां") {काम कर रही है मैं सोच रहा था कि क्या डिफ़ॉल्ट आर पर्यावरण चर कि मैं इसके बजाय उपयोग करने के लिए उपयोगकर्ता को मैन्युअल रूप से चर बदलने याद करने के लिए उपयोग कर सकते हैं? कमांड । प्लेटफ़ॉर्म प्लेटफ़ॉर्म का विवरण देता है। आप के साथ ऑपरेटिंग सिस्टम के बारे में जानकारी तक पहुंच सकते हैं। प्लेटफ़ॉर्म $ OS.type यह या तो "unix" देता है या "windows" ।

javascript - Remove ajax loader image after page load -

I have a form with the required fields and when the submit button is clicked, the loader image appears. : jQuery (document) .ready (function ($) {{$ $ .getElementById ('form'). Onsubmit = function () {$ .getElementById ('submit') .style .display = 'block'; $ .getElementById ('loading2'). Style.display = 'block';}}} (document)); )}; HTML: & lt; Input type = "submit" class = "button alt" onclick = "$ (\ '# loading)'. Show ();" Id = "place_order" /> I am having this problem when there are no required field fields and the submit button is clicked, loader images appear and when the required field errors are displayed, the loader image still shows. is . How do I stop displaying it? I do not like you using JPYPE in this way, I myself What do I do, to validate this form and post my own result with jquery, which means that everything is well controlled so that my code is like

java - Android SDK public void gets an error -

I have a problem by following the tutorial to create an app but now I get an error by adding an answer for a button . This gives an error on the public invalid sendMessage, but I can not see what is wrong. package com.example.myfirstapp; Importroid.os.Bundle; Import android.support.v7.app.ActionBarActivity; Import android.view.Menu; Import android.view.MenuItem; Import android.content.Intent; / ** is called when the user clicks on Send Button / Public Zero Send Message (View View) {intent intention = new intent (this, DisplayMessageActivity.class); } Public Class Main Activity Extends ActionBarrow Activity {@ Override Protected Zero on Crate (Saved from Bundle Interstate) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_main); } @ Override Public Boolean On Crate Option Menu (Menu Menu) {// Expand Menu; It adds the item to the Action Bar if it exists GetMenuInflater (). Fluo (R. menu menu, menu); Back true; } @ Override selected public boolean on option It

.htaccess - How do I 301 redirect - for all urls of my website to one single page -

मेरे पास वेबसाइट है: www.example.pro - जैसे पृष्ठों के साथ: www.example.pro/contact-us/ और Www.example.pro/about/ मुझे इस वेबसाइट से हर यूआरएल को पुनर्निर्देशित करना है: www.example.com उदाहरण: जब www.example.pro/about/ खोलते हैं - यह www.example.com (और www.example.com/about/ पर नहीं, जैसे आपको लगता है कि हो सकता है) पर रीडायरेक्ट होगा ..) यह मेरी वर्तमान HTACCESS है: < कोड> # वर्डप्रेस और लेफ्टिनेंट; ifModule mod_rewrite.c & gt; RewriteEngine On RewriteBase / RewriteRule ^ index \ .php $ - [L] रीव्रैटकॉन्ड% {REQUEST_FILENAME}! -f पुनर्लेखनकॉन्ड% {REQUEST_FILENAME}! -डी रीराइटरेबल /index.php [एल] & lt; / ifModule & gt; # END वर्डप्रेस रीराइटकॉन्ड% {HTTP_HOST} ^ उदाहरण \ .pro $ [OR] रीवर्टकंड% {HTTP_HOST} ^ www \ .example \ .pro $ RewriteRule ^ (। *) $ "Http \: \ / \ / www \। उदाहरण \ .com \ / $ 1 "[R = 301, L] कृपया मुझे इस एक को हल करने में मदद करें! WordPress भाग समस्या थी। कोई बात नहीं क्या htaccess कोड मैंने लिखा था यह गलत बात है।

c# - WrapPanel, break newline if my bind is very long -

Text after " I have a sheet of panel binding 3, the second tie is very low, and the third tie is very long, and the panel in the wrap (3 binds) We moved into a new line. How to stay in the same line A wrap panel is okay to fix a lot of possibilities. I can not use other panel thanks! & lt; WrapPanel x: name = "WrapPrvi" orientation = "horizontal" Grid.Row = "9" Grid.Column = "1" & gt; & Lt; TextBlock TextWrapping = "Wrap" text = "xxxxx" FontFamily = "Times New Roman" FONTSIZE = "16" /> & Lt; TextBlock TextWrapping = "wrap" text = "{binding information multilanguage 2.)" fontfamily = "times new roman" fontisystem = "16" fontweit = "bold" /> & Lt; Text Box X: Name = "Pream" TextWrapping = "WrapWithOverflow" text = "{Binding Register.Preambula, Mode = TwoWay, UpdateSourceTrigger = PropertyChanged}&q

vb.net - Not allowed to change the ConnectionString -

मेरे पास यह vb.net कोड है: conn6.ConnectionString = "server =" + global_variables.web_server_ip + ", उपयोगकर्ता आईडी =" + global_variables.web_server_username + ", पासवर्ड =" + global_variables.web_server_password + "; डेटाबेस =" + global_variables.web_server_database + "," conn6.Open () एसक्यूएल = "CALLTYPE से चयन CALLTYPE द्वारा बिलिंग समूह "myCommand6.Connection = conn6 myCommand6.CommandText = एसक्यूएल reader6 = myCommand6.ExecuteReader जबकि reader6.Read cdr_call_type = reader6.GetString (0) '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' 'वीओआईपी ब

c - Function pass by value with multiple string as parameter -

main.cpp #include & lt; stdio.h & gt; # शामिल करें & lt; stdlib.h & gt; #include & lt; string.h & gt; #include "function.h" extern शून्य CalcTax (फ्लोट सकल, फ्लोट डिफफेल्ड, फ्लोट * FedTax, फ्लोट * स्टेटटेक्स, फ्लोट * एसएसआईटीएक्स); Int मुख्य (शून्य) {फ्लोट FedTax, स्टेटटैक्स, एसएसआईटीएक्स, घंटों, पेडिट, डिफ्रेट; चार अंतिम नाम, प्रथमनाम; कर्मचारीडेटा (और अंतिम नाम, & amp; प्रथमनाम, & amp; घंटे, & amp; देनदारी, & amp; defr); Printf ("% s \ n", और अंतिम नाम); Printf ("% s \ n", और प्रथम नाम); कैलकटैक्स (कैल्शग्रास (घंटों, वेतनमान), डीफ्र, और फेडेटेक्स, और स्टेटटेक्स, और एसएसआईटीएक्स); Printf ("आपका सकल है:% f \ n", कैलक्रॉस (घंटे, वेतन देना)); Printf ("फेडरल टैक्स% एफ \ n", FedTax); Printf ("राज्य कर% एफ \ n", स्टेटटाक्स है); Printf ("एसएसआई टैक्स है% एफ \ n", SSITax); वापसी 0; } शून्य कर्मचारी डेटाबेस (चार * अंतिम नाम, चार * पहला नाम, फ्लोट * घंटे, फ्लोट * पेएटर, फ्लोट * ड

c++ - How to invoke pointer to member function from static member function? -

I need to get a member function called by a standard function pointer, so I try to do abstract things like this Key: Sample of class {Public: Virtual zero; some (zero) = 0; }; Class A: Public Sample {Nil to do something (zero); // details skipped}; Class B: Public Sampling {Nothing less (zero); // details skipped}; Class executives {public: Examiner (sample * sample): func (and sample-> doSomething) {} Fixed zero * executed (zero * data) {executable * px = data; (PX- & gt; * function) (); // invalid usage of error from static function (pX-> * pX- & gt; fancy); // Error indicator member type 'zero (sample: :) ​​()' // Incompatible private with 'object type' executives: zero (sample :: * func) (zero); }; Int main (zero) {one myA; B IB; Executor x0 (& amp; MYA); Examiner x1 (& amp; myB); External Invoc (& Examiner :: Execution, & x0); External Invoc (& Executioner :: Execution, & amp; x1); } Externally invoke is a Linux sys

Classic ASP Loop Through XML -

I have an XML payload like & Lt; Projects & gt; & Lt; Project ID = "Project 1-ID" name = "Project 1-name" /> & Lt; Project ID = "Project 2-ID" name = "Project 2-name" /> & Lt; / Projects & gt; & Lt; / Site & gt; & Lt; Site id = "site2-id" name = "site2-name" contentUrl = "site2-content-url" /> & Lt; Projects & gt; & Lt; Project ID = "Project 3-ID" name = "Project 3-name" /> & Lt; Project ID = "Project 4-ID" name = "project-4-name" /> & Lt; / Projects & gt; & Lt; / Site & gt; & Lt; / Sites & gt; & Lt; / TsResponse & gt; I can loop through each site, collecting every site id, name and contentURL, as I go with the following OXML set = Server.CreateObject ( "Microsoft.XMLDOM") oXML.LoadXML (postResponse) 'sXML) Sid = oNode.GetAttribute ( "/ tsResponse

Tracking down youtube videos that are not available on mobile devices -

I am playing a YouTube video on my mobile app using an embedded url. The problem is that some videos are "content from WMG" and they are not available (i.e.) Can anyone track which videos are not restricted? thanks

c# - Issue locking the phone before the camera is fully initialized. When I unlock the phone it breaks -

I am developing a camera app and when I leave the app before the camera starts completely, then I have a problem is coming and I tried my to have them back to OnNavigatedFrom in the pattern I have this: protected override void on Nevigetifom (Nevigeshniventarj e) {try {if (Kmranit) {Dispacrkbegininvonke (() = & gt; {if (job! = null) {Kamkdiskpose (); Kamkkpturecompleted - = Kam_kpturecompleted; Kamkkptureimjavailable - = Kam_kptureimjavailable; Kamkotofokskpleted - = cam_AutoFocusCompleted; CameraButtons.ShutterKeyPressed - = OnButtonFullPress; cam = null; cameraInit = false;}}); }} Hold (Exception Pre) {Message Box. Show (ex.Message); }} This I have OnNavigatedTo Method: protected override void OnNavigatedTo (System.Windows.Navigation.NavigationEventArgs E ) {// To check if the camera is available on the device. If (photochemera.iskmiera type support (camera type primary) == true) {if (cam == empty) {cam = new Microsoft.Devices.photoCamera (CameraType.Primary); //

wpf - XAML: Make TreeViewItem using VS theme colors -

I'm creating a Visual Studio Extension with a tool window. There I use a TreeView. I have the current Visual Studio Theme I would like to see this tree to use Thanks for posting I had set the text set and Color Highlight enabled. The color is updated only on the start of Visual Studio (again), but when I change the theme How do I change the focus to highlight the colors? How do I change the expandable icon colors in the current theme colors? Any chance to complete the highlight, as it is in the solution Explorer window? This is my current XML code: & lt; UserControl x: class = "David Speak .crpdotOutline.DocOutline view" xmlns = "http: // Schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/ Winfx / 2006 / xaml "xmlns: mc =" http://schemas.openxmlformats.org/markup -compatible / 2006 "xmlns: d =" http://schemas.microsoft.com/expression/blend/2008 "xmlns: Shell = "clr-

android - Change a WebView Gif programmatically via spinner selection -

I put a web villa in one piece to show a gif animation. It works entirely webbie class: public class GifWebView view {Private Movie mmv; InputStream is; Long MovStart; Public GifWebView (Reference Reference, String gifName) {Super (Reference); Paint P = new paint (); P.setAntiAlias ​​(true); SetLayerType (LAYER_TYPE_SOFTWARE, P); If (gifName.startsWith ("acqua")) {= reference is. GetResources () OpenRawResource (R.drawable.water); } And if (gifName.startsWith ("aria")) {is = reference. GetResources () OpenRawResource (R.drawable.air); } MMovie = Movie. DecodeStream (is); } Draw over @ Override protected void (canvas canvas) {canvas entry color (color. WHITE); Super.onDraw (canvas); Longer = android.os.SystemClock.uptimeMillis (); //System.out.println("now="+now); If (moviestart == 0) {// moviestart = now for the first time; } //System.out.println("ttmoviestart="+moviestart); Int relatim = (int) ((now - možistart)% mMovie.duration ()); /

testing - upload test cases from excel to microsoft test manager 2013 -

In my current project, we are using Microsoft Test Manager 2013. We have prepared test cases in Excel. How can we upload test cases from Extra to MTM 2013? Reply addition @MrHinsh: Check the question and see Can I copy exam cases and test stages from an existing Excel worksheet? Question & amp; A section

hibernate - Set CENTOS 6 mysql character sets to UTF8 -

I have a website, and I realized that when you copy some letters ( *, '- _ ) Specific words like Microsoft Word, from a search box on your website, gives this error: error org.hibernate.util.JDBCExceptionReporter - collations (of invalid Mix 'latin1_swedish_ci', hidden) and 'choice' for (utf8_general_ci, compelled) operation Then I went to check my database and I Database wanted to see the use of UTF-8. mysql> Describe the characters '% character%'; + -------------------------- + -------- -------------- ------ + | Variable_name | Value | + ----------------------- --- + ---------------------- ------ + | Character_set_client | Utf8 | Character_set_connection | Utf8 | Character_set_database | Latin1 | | Character_set_file system | Binary | | Character_s_t_sults | UTF8 | | Character_set_services | Latin 1 | Character_set_system | UTF8 | | Character_sets_rate | / Usr / share / mysql / charsets / | + -------------------------- + ------------------

Issues with null value in Elasticsearch -

यहां मेरे डेटा का एक उदाहरण है: {"MOD_DATE_START": "2010-04 -20T15: 05: 49Z "," MOD_DATE_END ": रिक्त," MOD_ID ":" 123456789 ",} मुझे अपने लोचदार खोज क्वेरी से कुछ समस्याएं आ रही हैं I मेरे पास कुछ तारीख फ़ील्ड हैं, जहां मैं यह सुनिश्चित करने के लिए एक सीमा आधारित फ़िल्टरिंग कर रहा हूं कि मेरी तिथि प्रारंभ और समाप्ति तिथियों के बीच है। मेरी पहली क्वेरी (जो अच्छी तरह से काम करती है) इस पर फ़िल्टर कर रही है: कर्ल-एस -XPOST http: // server: 9200 / myindex / mytype / _search? Pretty = true -d '{"fields": ["MOD_ID", "MOD_DATE_START", " ("MOD_DATE_END": {"bool": {"must": [{"शब्द": {"MOD_ID": "123456789"}}, {"श्रेणी": {"MOD_DATE_START": {"lte": "2012-04-20T15: 05: 49Z"}}}}}}} ' MOD_DATE_START फ़ील्ड में हमेशा जानकारी होती है, इसलिए पहली क्वेरी अच्छी तरह से काम करती है। दूसरी तिथि फ़ी

css - How do I reselect/filter elements when I already have a jquery object? -

फ़ंक्शन initItems ($ आइटम, वर्तमान, गिनती) {$ items.removeClass ('z-item-current' ); $ Items.each (फ़ंक्शन (इंडेक्स) {var $ self = $ (this); $ self.data ('z-item-index', सूचकांक); अगर (सूचकांक === वर्तमान) {$ self.addClass (' Z-item-current z-item-show '); var pre = current - 1, next = current + 1; pre = pre & lt; 0? Count - 1: pre; next = अगला & gt; संख्या - 1? 0: AddClass ('z-item-previous z-item-show'); $ ($ आइटम [अगला]) addClass ('z-item-next z-item-show' );}}); // शोध या फ़िल्टर करें $ आइटम // यदि z-item-show class है, तो इसे दिखाएं; अन्यथा, इसे छुपाना }; ऊपर दिखाए गए कोड के रूप में, मैं एक jQuery ऑब्जेक्ट को पुनः खोज / फ़िल्टर करना चाहता हूं। विशिष्ट होने के लिए, मैं $ आइटम से $ आइटम z-item-show class और $ आइटम z-item-show class बिना विभाजित करना चाहता हूं । वर्तमान में, $ items.each एक दृष्टिकोण है, और $ items.parent ()। ढूँढें एक और है। < पी> कोई अन्य दृष्टिकोण (अधिक सुरुचिपूर्ण) आप बस का उपयोग कर सक

java - Store HashMap on MongoDB -

I need to rebuild the mongodibi object, I am saving, but it is not clear to me how How to save data to deliver data, later likely to ask Mongogabi The This class I is a prototype I'm using your Java code: public class UserProfile {/ ** UUID: Mongo certification / Shiro / MongoDB persistence Database * / private string for UUID; / ** user activation status * / private integer status; Private boolean administrator; / ** * All security features such as: password temporary password; Active; Token; * / Personal hashmap & lt; String, Object & gt; Security = new Hashmap & lt; String, Object & gt; (); / ** * To store information related to user such as Doketery, * Birthday, Area, Gender, etc. * Data structure * At this level * Not important * What is the content of this object / Private map & lt; String, string & gt; User Details; / ** Score confidence level: 0 default * / private-int score_ confidence_level; / ** * User model: Model / score list; The key i

extjs4.2 - extjs textarea returns field value as an array -

Image
I'm quite surprised by this. When I get my field value from my exts form, the value for a texture is not string, but there is an array. The first element in the array is empty, and the second element keeps text in text. I just click < Strong> getFieldValues ​​() calling: var fields = form.getFieldValues ​​(); My UI expression looks like this: {xtype: 'textarea', cls: 'packagedialog-info-textArea', name: 'description '}' In my Ext.data.Model : {name: 'description', type: 'String'}, should this work? I was expecting a string to return.

cron - How do handle Java runtime errors when running as a cronjob -

I am running Java standalone jobs as a kronobose. I noticed that in some rare instances, the job will fail with an outtime error like runtime exception. Crown's MAIL_TO handler does not appear to be taking a job failure and the Java application is unable to do anything explicitly, because of the memory error the execution stopped. What will be the best practice to complete such behavior is errors and cron alerts? The closest I could think was that every Java job writes a "success" -log record and then chains up a grap in the cronbage and returns an error code so that the MAIL_TO of the Kroon raises it. This is then clearly the chronology of clutter and obviously code change is needed to write a log entry. JVM, the process associated with it) exits the exit code 1, when an exception exception to the main Makes the thread its way, which does not handle it. So, all your exception exceptions to one option are caught in main () and using something like system.

Processing Shape Placement -

I'm new to processing and trying to figure out why this is happening under the draw (). On the basis that where I compose a rectangle, it does not reveal or appear. My goal is to get a dragable circle in front of the rectangle int x; Int y; Public Zero Setup () (Size (600, 600);} Public Zero Draw () {Background (255); // If Timeline () is given here, then Circle does not appear (); Time (); / If the timeline is given here, the circle appears behind the rectangle} Public Zero Chakra () {Oval (it x, height / 2, 10, 10);} Public Zero MouseDrag ged () {Translation (width / 2 , Height / 2); This.x = mouseX; This.y = mouseY;} Press Public Zero Mouse () {Translation (width / 2, height / 2); If (mouse you Height = 2 + 10 & amp; mcaia> height / 2 - 10) {this.x = mouseX;}} Public Zero Timeline () {translation (width / 2, height / 2); rectMode ( Rect (0, 0, 2, 20);} Your The problem is that you are translating (from timeline () pusMatrix () function without the use of

How to create a Google Hangout button for chat-only? -

मैंने अपने पृष्ठ पर एक Google Hangout बटन जोड़ा: & lt; script src = "Https://apis.google.com/js/platform.js" async defer & gt; & Lt; / स्क्रिप्ट & gt; & Lt; g: hangout render = "createhangout" topic = "cpp11" hangout_type = "moderated" invites = "[{id: '74838 920', आमंत्रण_प्रकार: 'PROFILE'}, {id: 'my.email@gmail.com' , Invite_type: 'EMAIL'}] "& gt; & Lt; / छ: hangout में & gt; जब मैं उस बटन को एक वीडियो Hangout प्रारंभ करता हूं (मुझे सूचित करना है कि मुझे वीडियो सक्षम करना चाहिए)। मुझे यह भी निश्चित नहीं है कि मेरे पास hangout आमंत्रण सही है, लेकिन बाद में मुझे पता चल जाएगा। बटन दबाए जाने पर चैट-केवल विंडो को कैसे छोड़ दें < / P> मैंने दस्तावेज को देखा और ऐसा करने का कोई तरीका नहीं है। < P> ऐसा करने का एकमात्र तरीका है कि वे hangout में प्रवेश करने के बाद प्रतिभागियों को शीर्ष पर "टर्न कैमरा ऑफ़" बटन पर क्लिक करने को कहें।

twitter - Python- twitterstream. filter tuple error -

I am trying to filter Twitter streams for related tweets related to emotion analysis ... Try: Tweet: * json.loads (data) print (tweet ['created'], tweet ['text']) alchemyapi = alchemyAPI () response = ['text']) print " ['Id'] = '[' id '] dictionary [' created '] [' Doctorcentant '] ["type"] dictionary = {} dictionary [' tweet '] = tweets [' text '] dictionary [' id '] =' '] = Tw SaveFile = open ('silverweetfeeed.json', 'a') = ['emotion'] = "[reaction] [" doctorcentant "] [" type "] json_data = json.dumps (dictionary) Add SaveFile. Write (json_data) saveFile.write ('\ n') saveFile.close () Exclude the true base exclusion, e: #base exceptions because no rate limit or internet drop print 'unsuccessful turnkey', string (e) time. Slip (5) can be DF on_error (self, status): print status auth = OAuthHandler (ckey, (tr

swift - Nested dictionary strange behavior -

I want to map data to code: Class statistics {var maps: [NSDISIS] INIT () {SELMMAX = [["map": [["X": -0.5, "Y": -0.5]], "color": UIcolor.reader () ["Map": ["X": 0, "Y": 0], ["X": 0, "Y": -1], ["X": -1, "Y": 0], [ "[X]", "Y": -0.5], ["X": -1, "Y": -1]], "color": UIColor.blueColor ()], ["map": [ This code is valid, but I have a 1 in this dictionary: 1, "Y": -0.5]], "Color": UIColor.yellowColor ()]]}} Add more data Do not want to: ["map": [["x": -1, "y": -0.5], ["x": 0.5, "Y": - 0.5], ["X": -0.5, "Y": -0.5]], "Color": UIColor.ScyanColor ()] And now I found the following error: But for the X in the previous version - 0.5 is substituted 0.5. It is valid then "again" ["map": [["

c - How To store user config for a gtk app -

I want to write a simple text editor with GTK + and I configure the user like font-size font-type etc. Want to .. I need a task to write like this: char * fontName = "Monospace bold 12"; Char * getFont (some); Zero set font (four * fontName); GTK + is using the default way of handling settings in the world. Be careful, it is not in the form of straight-forward as one would think If you want to do something simple, just store it in a directory.

iOS: Custom font size doesn't change -

I am trying to implement custom font, it works, but the problem I am facing is That whatever I set the font size, does not listen to it. I can also set the font size as 5000 and this font size will not change from 20. numberLabel.font = [UIFont fontWithName: @ "Dekar.otf" Size: 5000.0]; The font is properly implemented and loaded. It's just the size which has problems. The shape is set correctly ... away .otf ... < / P>

python - post_generation with factory boy gives ManyRelatedManager when I wanted list -

I'm obviously going numpty, I will accept that at the very beginning I have the following factory using the class DataSheetFactory (factory.DjangoModelFactory): class meta: model = model.model django_get_or_create = ('key_field',) key_field = factory. Equation (lambda n: N) ... & lt; Additional fields & gt; @ Factory. Post_generation def product_compressor (self, create, conclude, ** kwargs): if not created: removed if removed: For the person in the extracted: self.product_contributors.add (person) < P> When I make it with PDS = DataSheetFactory (product_contributors = (& lt; Users' Tupal & gt;)) A list of users in the field product_contributors Expecting, but a django.db.models.fields.related.ManyRelatedManager instead, so the test does not work Ga. What should I do, as I have followed "common recipes"? Just to clarify, I am asking that a sample to use the factory boy to create a list of users in many areas. What I sugge

objective c - Download images using core data in iOS 7 -

I have a requirement where I need to download images from web services at the time of loading core services. I can tell you the best way to download images try it NSMutableArray * al = [NSJSONRealization JSONObjectWithData: webData2 option: 0 error: zero]; (Nspection * Dictionary in Action * {NSString * geting = [dictionary valueForKey: @ "Delimage"]; Getdata = [NSDTA dataFramebaseErring: Receiving]; Data image = [Data with image image: gateata]; [Imager add object: dataimage]; } And then how do you stream this link to store array data in core data

javascript - cross domain request with ActiveXObject("Microsoft.XMLHTTP") in IE8 -

मैं IE8 से केवल ActiveXObject ("Microsoft.XMLHTTP") का उपयोग करके अनुरोध भेजना चाहता हूं, क्रॉस-डोमेन जो क्रॉस डोमेन अनुरोध की अनुमति देता है। var url = "127.0.0.1:9845"; XObj = नया ActiveXObject ("Microsoft.XMLHTTP"); यदि (xObj! = Null) {xObj.open ("GET", url, false); xObj.send (शून्य); } लेकिन, यह xObj.open ("GET", url, false) पर "अनुमति अस्वीकृत" प्रदर्शित करता है; । < / P> कोई भी इस समस्या को हल करने में मेरी मदद करता है?

python - Next Prime Number Generation -

I am trying to write a program that creates consecutive and prominent numbers, then you start it, Numbers are saved in a text file or as a string. So far I've got this code, but it does not know how to work continuously. Def primenumbers (): j = 2 chk = 1 f = open ("primes.txt", "w") primes = [] notprimes = [] Ask = input ("how many primes ? ") While len (primes) & lt; Int (ask): k = 2 while not (k == j) and not (j% k == 0): k = k + 1 if k == j: primes.append (j) f.write (str ( J) + "\ n") Other: notprimes.append (j) if lane (primes)> gt; = 1000 * chk: chk = chk + 1 print ("" + str (primes) "+" "primes.txt", "+ str (primes)" files written in "written" file F.close return ("") In your script, add it below ( Indent not) if __name__ == '__main__': while (true): primenumbers () the function is being called Useful Links:

ios - Init method for core data entity not available -

Image
I am on xcode 6.1 and developing for iOS 8.1. I have core projects coreattatest where I play with core data. Model: Import Corridata Class License: NSManagedObject {@NSManaged var name: string} and Now I want to create a license object. What I need to do before creating an item: App Deal: AppDelegate = UIApplication.sharedApplication (). Representative reference as AppDelegate: NSManagedObjectContext = appDel.ManagedObjectContext! Let Ent = NSEntityDescription.entityForName ("License", inManagedObjectContext: Reference) The problem is that the right constructor does not provide the xcode unit. When I start typing: var newLicence = License (.. I do not find any autocompletion like this example: / P> I'm just as self : Complete NSManagedObject (). Any ideas what is wrong :) It is important that the managed object is properly used for the use of core data I have implemented: ( I implemented in my class: override init If you

excel - vba check if value exists in column h and if month of date in column m is this month? -

I am trying to use VBA to count rows on sheet 2 ('log') where the column Matching the value entered in H. My cell at sheet 1 ('home') I am doing this using the following code: dim iVal = application as integer IVal. Worksheet Function. Range ("N"), Range ("N20") Value if the EERR (application) match (range ("log") column ("h"), range ("N10") (range ("N10"). Value, Sheets ("Log"), Columns ("H"), 0)) Then MSBBX "No Match" Els MSBBbox "Hi" & Range ("N10"). Value & amp; "," & Amp; VbNewLine & VbNewLine & "Your department has requested" & IVal2 & "Suppliers this month." You have "& 5 - Eyes &" Rest of the Request for This Month. " Amp; VbNewLine & VbNewLine & "Every Department Requires 5 New Supplier Requests Per Month "VbOKOnly + vbInformation, exit the" Im

javascript - jQuery - $.ajax returns other dataFormat as $post -

When I get data from server $ If I use Ajax, the format looks different than the $ .post request result. How can I change the $ .post request to get the same format with a $ .ajax request? Otherwise I can not use my loop to read the data: Working code with $ ajax: $ .ajax ({url: "/ fetchdata. Php ", type:" post ", data type:" jason ", data:" param = no ", success: work (data) {console.log (data); for (var i = 0; i & lt ; Data; lanf; i ++) {$ ('# dom'). ('& Lt; li & gt;' + data [i] .username '' ;);} }, Error: task (e) {console.log (e);}}); Console $ .get result: [object, object, object, object] no Work Code with $ Post: var jqxhr = $ .post ("/fetchdata.php", function (data) {console.log (data); for (var i = 0 ; & Lt; li & gt; '+ data [i] .username' ' ');}}) .done (function) ( () { }. .file (function () {}) .ways (function () {}); $ .post result in console:

javascript - White space in onclick value causes incorrect HTML -

मैं & lt; tr & gt; पंक्ति को & lt; तालिका & gt; : & lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; फ़ंक्शन addRow () {var filesName = 'Document Draft.png' var newRow = "& lt; tr & gt; & lt; td & gt; टीडी डेटा 1 & lt; / td & gt; & lt; td & gt; & lt; एक onclick = deleteDocument (यह, '" + filesName + "') & Gt; हटाएं & lt; / a & gt; & lt; / td & gt; & lt; / tr & gt;"; $ ( "# IdDocList") संलग्न (newRow)। } & Lt; / script & gt; यह कोड एक tr को तालिका जोड़ता है। समस्या: लेकिन मुद्दा यह है कि फाइलनाम में एक सफेद स्थान है जो गलत रूप से DOM पर नीचे दिया गया है: & lt; tr & gt; & Lt; td & gt; टीडी डेटा 1 & lt; / td & gt; & LT; टीडी & gt; & Lt; एक onclick = "deleteDocument (यह, 'दस्तावेज़' Draft.png ')" "& gt; हटाएं & lt; / a & gt; & Lt

swing - Java custom font -

As stated with the title, how do I set a custom font? I have already tried to enter the font in the graphical environment, setting up the getResourceAsStream method and a file inputstream to load four, but it still does not work. After searching through Stackoverflow on many similar queries, it has been said that I just need to set up a getResourceAsstream method and register the font and it will load. I can not help after asking questions and getting answers, but I can get it for a while. I used this method: create the font to make // to create a font. Specify the size! InputStream Custom = New FileInputStream ("C: / Users / HP / Document / Netbeen Project / PentiumMmer / SRC / ProVi / Fonts / Quickers Light-Regular .tft"); Font customfonts = font.create font (font .truetype_font, custom) .deriveFont (12f); Graphics Environment Ge = Graphics Environment. GateLocal Graphics Environment (); // font ge.registerFont (font .createFont (font. TRUETYPE_FONT, custom)) Registe

ios - Converting NSData to NSString in NSURLConnection = null -

I am sending data to the server and it is responding to my request and I am getting a text as shown below. Is the web ... where my problem will be NSString * newStr = [[NSString alloc] initWithData: responseData encoding: NSUTF8StringEncoding]; This is not responding to my NSData, while there is data in it feedback data . My response message: {ret> 0, msg: "& lt; B> your request has been submitted Your request number is 123 My code: NSString * link = @ "http: //example.jsp"; NSURL * url = [NSURL URLWithString: [NSString stringWithFormat: @ "first_name =% @ and last_name =% @ and phone =% @", link, nameField.text, surnameField.text, phoneField.text]]; NSMutableURL request * request = [NSMutableURL request request withURL: url]; [Set http system: @ "post"]; NSURLResponse * response; NSError * err; NSDT * responseData = [synchronous request to send NSUr connection: Response returning request: Response error: &

asp.net - Rowcommand does not trigger with update panel with datagridview -

I try to use an updated panel with my datagrid video on line command event to show a dialog box . When I remove the update panel it works fine, but does not work with it. I used the following panel with the update panel, but it does not work. & lt; Asp: UpdatePanel ID = "Update Pannaldgaon" runat = "server" updatemode = "conditional" children's estridge = "incorrect" & gt; & Lt; Trigger & gt; & Lt; Asp: AsyncPostBackTrigger ControlID = "dgvVehiclesType" EventName = "Roam Common" / & gt; & Lt; / Trigger & gt; & Lt; ContentTemplate & gt; & Lt; Div class = "tab-content" & gt; & Lt; Div class = "tab-pen fade in active" & gt; & Lt; Asp: gridview id = "dgvVehiclesType" runat = "server" gridlines = "none" onrev commm = "DGVVell type row-comand" PageSize = "10" & gt; & Lt; Columns &

playframework 2.3 - Play Framework 2.3.x: Force Run on errors -

Is it possible to implement your play app to run in the browser, even if there are errors? That's because I can easily see the errors in the browser rather than searching through them in the console. I am restructuring more than 300 errors, and thought they might be easy to see them once in the browser. Thank you! I'm afraid that you do not have any possible way of obtaining a desire Can not run application. It's like driving a car without wheels. The console and your IDE are your friends.

ios - How to adjust uiscrollview after adding view (autolayout) -

The main UIView has a UIScrollView. I have container UIView inside scrollview and its edges have been pinned to the scrollview. And this container scene has consistent width and height barriers because the scroll view does not work without them. When I add many sub views inside the container view, the sub-view becomes more than the limit below the container view. This is not a scrollable cause. The only predefined height in the container is how to make the container adjustable, it can match the sub-views height, which will scroll it. Also think that I am using myself. What do you really need to do is update the height barrier, okay? I will link the height restriction of the inside view as your IBoletlet ViewController: @ Property (Nonomatic, Weak) IBotatable NSLUT Contract * ContentviewHit; Drag normal and leave the file owner Then you will need to update your restriction with that call method once You add your subviews in: - (zero) Update contentview: (CGFl

chromium embedded - Cefglue, ChromiumEmbeddedFramework and PDF -

Currently I use Cefglue but I need to show PDF files, is it possible to add this plugin? I have read about pdf.js but how can I use it? New versions of CEF are already bundled with the PDF plugin. Then you might have the new CIF & amp; CefGlue. Currently supported version is 3.2171.1875.

arrays - Checking correct order of values -

I have a data set that looks like the bottom. Actually, I have current prices for three different sizes of an item type. If the size is correctly priced (i.e. small and lieutenant; big & lt; big ), I will call them "y" I want to mark and continue to use the current price if they do not have the right value, then I want to mark them with "n" and want to use the recommended price. I know that this is probably the time to use array programming, but my strength skills, of course, are a little weak. There are hundreds of places, but there is only one item type. Currently unique locations are loaded in the macro variable list. is the data; Input type space $ size $ cur_price rec_price; Leaves; X NYS 4 1 x NY M5 2 x NY L 6 3 x LA S 5 1 x LA M4 2 x LL3 3 x DC S5 1 x DC M5 2 x DC L5 3; Run; Proc sql; Select different location in: is loc_list; leave; Any help would be greatly appreciated. Thanks Not sure why you want to use an array here ... proc movemen

android - Protect View from continuous touch events -

I'm building a camera app like Bell, where you record the video while holding your finger on the screen My problem: If a person has a fast and continuous tube on the screen, then camera logic gets many events. It continually tries to write files, close the recorder, open a new connection, and so on. The camera looks very fragile when it has to start and stop recording in a very short time frame. I tried to set a flag which prevents new speed events from reaching the camera, while it is still busy on the previous operation. It is ugly but it works. The main problem is that, Motion events arise and rise after each other due to each other. I have speed events ACTION_UP and ACTION_DOWN to find out if the user has placed a finger on the screen or released it. Is there any good way to disable the dynamic events during the camera preparation and release process? Try this: // class variable timer timer; Public Boolean On-Touch (see View, Motion Event Event) {// Ch

ios - UINavigationController with unified background across all ViewControllers -

I have gone with an idea of ​​a UINavigationController which is an image in the background and Each view controller on the stack has a transparent background, so the background image of the UINavigationController appears in all of them. I tried to apply it in the most obvious way (see the controller with the root view controller and transparent background with full screen image, but it results in strange issues with the animation). The HotelTonight app has succeeded in implementing the recording of their user interface I have made: Does anyone have any suggestions on the right track to implement it? Perhaps the UIViewController subclass is better to do a special setup for its background and navigation controller style, for example: If your background is an image, you will still get strange animation effects when a new view controller is older than the slide; The slides will slide as well, depending on how you want to make your transition animation custom, there are th

Page paint time stays high after css filter is removed -

I use a div as a frame to add a CSS filter of the content. & lt; Div id = "blurbox_wholescreen" class = "blurbox" & gt; ... page content ... & lt; / Div & gt; The filter is activated through the CSS class. .blurbox {conversion: translation 3D (0,0,0); Transition: All .5s ease; } .blurbox.blur {filter: blur (4px) brightness (80%) contrast (130%); -Winkit-Filter: Blur (4px) Brightness (80%) Contrast (130%); } When I toggle the class, the contents of the Blblox blur. function menu_toggle () {... $ ("# blurbox_wholescreen") .toggleClass ("blured"); ...} The 'paint paint time' displayed by the Chrome Inspector is at least before (about 7m) and as the candidate jumps (up to about 25 mms) when the filter is applied So far it is so good. What bothers me is that it remains high when I change the "blond" class again. I hope FPS should go back to the default, because the display heavy filter has been

python - function that changes the position of 2 elements in a list -

I have to type a function that will work if I will write it: s = [ "John", "Bartha", "Jenna", "Daniel", "Emma"] change (S, 2,4) print (s) ["John", "Bertha", "Emma", "Daniel" "Jenna "] I basically have to define the function that changes the status of 2 elements in a list, where a, b are indexed by them. I have tried to do this, but I can not find any good solution: def change (s, a, b): a, b = S Index (A), S. Indicate (B) S [B], S [A] = S [A], S [B] It does not work clearly, I do not know that I How can I change the position of elements where a, b are indexed, I know how to switch 2 items, but there is no clue how to do this with functions. Grow? one and b Em> indexes are the ones you want to switch to. If you already know where they are, you can remove the call at list.index : & gt; & Gt; & Gt; S = ["John", "Bertha",

python - Need to call a calculated variable & a dataframe object into a sql command....syntax error -

I have a date input in the parameter dictionary, after that, I have created a calculated date field outside the date input in the dictionary . Now, I want to use both date fields to create an SQL command, which I want to send in the Pandas dataframe for further calculation. Below is the paragraph code - # Set parameters valueDict = {'Date': '2014-10-25'} # Fields calculated yr = pd.to_datetime (Dict ['date' ] - year - 1 mon = pd.Taw_tatime (dick ['date']) day of month = 01 calDattamp = sR (yr) + '-' + str (mon) + '-' + str (day) Pd.to_datetime (CalDateTemp) #create SQL command This is where I'm getting the error when trying to call the calculation field "CalDate". The error says - "Descriptor '__add__' requires 'datetime.datetime' object Is there le The table 1 where the X is obtained from "str" ​​"cmd1 =" SELECT A, B, C, where X> = '"+ CalDate +"' and X &a

groovy - Setting fields on a new HL7 Message wrapped in Terser -

ca.uhn.hl7v2.util का उपयोग करने का प्रयास करते समय। खाली क्षेत्र को ca.uhn के किसी विशिष्ट उपवर्ग पर सेट करने के लिए। .hl7v2.model.Message (इस मामले में ca.uhn.hl7v2.model.v251.message.ORU_R01), मुझे .each {} समापन के दौरान कोई त्रुटि संदेश प्राप्त नहीं होता है और इसके बाद संदेश ऑब्जेक्ट में कोई फ़ील्ड आबादी नहीं है। hl7Map क्लास तात्कालिकता पर आबादी है, जैसे मानों के साथ: def hl7Map = ["HL7MessageFields": ['PID-3-1': "आंतरिक क्रम मानचित्र कुंजी", 'पीआईडी ​​-3-4': "आंतरिक आदेश def तारीख = नई तिथि () def प्रारूप = नया SimpleDateFormat (hl7map ["dateFormat"])। प्रारूप (तारीख) // संदेश हैडर ऑब्जेक्ट पर सेट तिथि hl7Map ["MSH"] ["- 7"] = प्रारूप डीएफ़ संदेश = (context.getModelClassFactory)। GetMessageClass (Hl7Map ["MessageInstantianceMap"] ["संदेशप्रकार"], hl7Map ["संदेश इंस्टेंटियामामैप "] [" वर्जन "], सच) क्लास के रूप में) .न्यूइन्स्टेंस () टार्सर टार्सर = न्यू टीर्सर (