Posts

Showing posts from April, 2012

ember.js - Emberjs - Create 'Edit' action that edits a model without leaving '/models' url -

I need help creating an 'edit' action which selects a specific model from the list of models, and In that table, editing ideal. A quick-editing of types & lt; Tbody & gt; {{#each}} & lt; Tr square = "people-list" & gt; & Lt; TD & gt; & Lt; Input type = "checkbox" class = "toggle" & gt; & Lt; Label class = "category-text" & gt; {{# LinkTo 'category'}} {{name}} {{/ linkTo}} & lt; / Label & gt; & Lt; Img class = "table-img" src = "picture / x.png" & gt; & Lt; Img class = "table-img" {{action 'edit}' src = "picture / pencil-gray page" & gt; & Lt; / TD & gt; & Lt; / TR & gt; {{/ Every}} & lt; / Tbody & gt; By clicking on {{action} 'edit'}}, {{name}} is created and gets editable input. All this is done without leaving the 'categories' url. Thanks guys: D & lt; Tbody ...

android - Can't set SharedPreferences In AsyncTask? -

I'm trying to set the preferences shared in my asynctask but it does not seem to work Can anyone help me I tried already talking a billion button / ASYNC code: button.setOnClickListener (New OnClickListener () {private ProgressDialog cancelDialog = null; int valid ; @Override see public void onClick (arg0) {new AsyncTask & LT ;, zero zero, zero & gt ;. () {@Override protected void doInBackground (zero ... parameter) {valid = api.validateLogin (username.getText () toString (), password.getText () .toString ()); return null;} @Override protected void onPreExecute () {cancelDialog = new ProgressDialog (LoginActivity.this); cancelDialog.setMessage ( "valid username & amp; Password "); cancelDialog.s How (); Super .onPreExecute ();} protected void (no results @OverridePostExecute) {cancelDialog.cancel (); if (valid == 2) {saved share options were sessions = get Krenalpakontekst (). Received references ( "Aksdiaaf" activity. MODE_PRIVATE); SavedSe...

microcontroller - CAN message read error -

I am using the problem if occurs on line with the statement 'uudspeed' of motor The speed is what I am getting from the external tax bus. When the code reaches this line, it does not turn on P10_6 and P10_7. How can I fix this problem? Zero is read () {stCAN_SWObj SW_obj1; Ubyte i; ADC0_vStartSeq0ReqChNum (0,0,0,0); Uwbesch = ADC0_uwGetResultData (RESULT_REG_0); // Read gasolineCAN_vReleaseObj (1); CAN_vGetMsgObj (1, and SW_obj1); Uwspeed1 = SW_obj1.ubData [0]; // High Byte Uddspeed 2 = SW_obj1.ubData Receiving [1]; // Getting low byte IO_vSetPin (IO_P10_8); // The initial motor chain is connected to the 10.8 pin if ((uwspeed1 & lt; 0x0b & IO_P10_8 == 1)) // If the speed is less than 0x0b and the chain connected to IO_vResetPin (IO_P10_8); // disconnect series IO_vSetPin (IO_P10_6); // Here the pin is 10.6 IO_vSetPin (IO_P10_7); // Here the pin is 10.7 CAN_MODATA3LL = 0x00; // Send 0 torque for hybrid kit CAN_vTransmit (3); }

Excel VBA getElementsByTagName() only returning the last input -

My company will require more than 1000 people to reset the username and password, and instead it is emanually To do this, I want to do VBA to automate it for me. I have the IE window connected properly, but getElementsByTagName ("Input") only gives the final input tag below. My code is: Dim shellWins ShellWindows as slow IE InternetExplorer dim htmldoc HTMLDocument as slow objElement As Object Dim objCollection as IHTMLElementCollection retarded name string as dim Val string, val2 string dim Selvans as the Selvins = new Selvevando as if a set. Account & gt; Then go to IE = Set IE = shellWins.Item (0) or else 'IE set IE = Create new InternetExplorer IE.Visible = true end then set objCollection = IE.Document.getElementsByTagName ("Input") for I = 0 objCollection for. Length name = objCollection (i) .name then left (name, 6) = user name then val = objCollection (i) .value a = split (val, "@") if left (a (1), 1) Lt; & Gt; "S" then...

Android text size really different on 2 different "normal" screens -

I specify the size of the text like 12sp and in the text box of 100dp . In one case (3.2in, 320x480 mdpi) the thing looks good, in the second (Nexus 4) text is too big and it does not fit in the box Why is it so? I thought that 'SP' was independent of the density. dp or dive density-free pixel It is, alias, automatically enhanced on the pixel density of the device's screen. sp is a scale-independent pixel - essentially similar to a DP, but also factor in users' font-size settings (which can change in system settings). It may be that your other testing tool, compared to a different font-size setting in your Nexus 4, if you do not scale with the user's font-size setting If you want, you can simply use DP as your font-size value.

C# switch case how to calculate -

He is trying to add two numbers simultaneously through the I'am switch number I have 3 inputs, numbers 1 and number 2. The third input is a method that I want to calculate 1 and 2 (like + , - , * , / , etc ...) The problem now is how can I create "this"? I have tried this way, but it does not work ... Is it possible to make switch case: case%: ??? thanks string first number; String second number; String method; // Mill number console.light line ("get first number"); FirstNumber = Console.ReadLine (); Console.light line ("get 2 numbers"); SecondNumber = console. Readline (); Console.light line ("method to calculate"); Console.light line ("1: \" * \ ""); Console.light line ("2: \" / \ ""); Console.light line ("3: \" + \ ""); Console.light line ("4: \" - \ ""); Method = Console.ReadLine (); // Convert Into Method New = Convert. ToInt32 (method); In...

layout - Android onFling method of SimpleOnGestureListener not olways called -

मुझे SimpleOnGestureListener के फ़ेलिंग विधि पर उपयोग करने की आवश्यकता है। निजी वर्ग जेस्चर लिस्टनर सरलऑनगेस्टरालस्टनर {सार्वजनिक जेस्चर लिस्टनर () {सुपर (); } @ ओवरराइड पब्लिक बूलियन ऑनस्क्रोल (मोशन एवेंट ई 1, मोशन ईवत्ता ई 2, फ्लोट दूरी एक्स, फ्लोट फाइनल वाई) {// कुछ करें ... सुपर रिटर्न करें। ऑनस्कॉल (ई 1, ई 2, स्पेस एक्स, फाइनल वाई); } @ ओवरराइड पब्लिक बूलियन ऑनफलिंग (मोशन एवेंट ई 1, मोशन एवेंट ई 2, फ्लोट वेल्सीटीएक्स, फ्लोट वेल्सीटी वाई) {// कुछ करें ... सुपर.नफ़लिंग (ई 1, ई 2, वेल्सीटीएक्स, वेग यू); } @ ओवरलाइड पब्लिक बूलियन ऑन सिन्लिंगटैप कन्फर्म किया गया (मोशन ईवेंट ई) {// कुछ करें ... सुपर रिटर्न करें। ऑनसिंगटैप कन्फर्म (ई); } @ ओवरराइड सार्वजनिक शून्य ऑन लँगप्रेस (MotionEvent e) {// कुछ करें ...} @ ओवररेइड सार्वजनिक बूलियन ऑन onDoubleTap (MotionEvent e) {// कुछ करें ... सुपर पर वापस जाएं। OnDoubleTap (e); }} ऑनस्क्रोल पद्धति को हमेशा कहा जाता है! ऑन-फलिंग हमेशा नहीं कहा जाता है क्या मुझे कुछ भी लागू करना है? एक निश्चित दूरी के बाद और वेग पर पहुंचने के बाद इशा...

c# - Removing specific items in an Appointment List -

I have a list of calendar items that I have recovered using EWS: Code> list & lt; Placement & gt; Apts = tApts.Items.ToList & lt; Placement & gt; (); I am trying to remove all the appointments in the list, which is a topic in which "cancel" at the beginning of the title: apts RemoveAll (apt = & gt; apt.Subject.StartsWith ("Canceled:")); This is throwing me a "object is not set for an instance of reference object."} System.Exception {System.NullReferenceException} . I am assuming that this is happening because the appointment topic is zero. However this is my solution: foreach (Appointment apt in appetts) {if (Apt.Subject == zero) released; If (apt.Subject.StartsWith ("Canceled:")) apts.Remove (apt); } However this also throws an error because I am changing the size of the list, while I am turning it on again. What will be the best way to get rid of all items whose topics start with "canceled...

json - Wget windows and multiple --header switches -

I try to use wget 1.11.4 with a web site that runs on some Windows Server 2003 JSON I am doing I can fix the information but I can not send anyone. I'm not positive that my JSON has been formatted correctly but there may be a more fundamental problem. If I do: wget - header = "authorization: bearer " --no-check-certificates - past-data = "{'Workspace': {'title': 'CMC regulatory support', 'creator_all': 'maven'}}" https://api.mavenlink.com/api/v1/workpaces.json I get a JSON error from the site "Error 422: usable unit." But if I add another --holder: wget -S --header = "Authorization: Bearer & lt; redacted & gt;" --header = "content-type: application / jsn" - no-check-certificate - post-data = "{'workspace': {title ':' CMC regulatory support ',' creator_all ':' maven ' }} "Https://api.mavenlink.com/api/v1/wo...

objective c - Numbers into words issue C -

I am trying to write a program that will take an integer input, and then convert it into words. For example: 123, one two three plus 398, negative three nine zero eight, my code works 90% of the time, the only issue is coming up when I put one or more zeros at the end of the integer I am like. 70800 will come in seven void eight as it completely misses the end zero. I understand why this is happening, but someone knows that there is no way around it. PS (I do not have permission as part of this function because the input is accepted as string and divided into array, it would be best if answer is based on this code). Int main (Int'Argic, Const four * AGRV []) {@autoreleasepool {float abNumber; Int i = 0; float number; Float result; Float first number; Printf ("Type a Type:"); Scanf ("% f", and first number); Abnumber = abs (first number); If (first number & lt; 0) {printf ("negative"); } Number = ABNumber; Whereas (number> = 10) {number = ...

java - unable to resolve static method junit assert -

I have tried to use both Junit 3.8 and 4 June 4. After reading in the Android docs, Android is not updated for Junit4 I. I am constantly getting this error for the I 3.8: 02-17 16: 37: 27.40 9: W / Delwick (32014): VFY: Unable to resolve static method 3467: Lorg / Junit / Asset; Conditional (Ljava / lang / String; Z) V AndroidManifest.xml: & lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; Manifest xmlns: Android = "http://schemas.android.com/apk/res/android" package = "com.kronosDev.nodeMud" Android: versionCode = "1" Android: versionName = "1.0" & gt; & Lt; Usage-permission Android: name = "android.permission.WRITE_EXTERNAL_STORAGE" /> & Lt; Use-sdk android: minSdkVersion = "8" Android: targetSdkVersion = "17" /> & Lt; Instrumentation Android: name = "android.test.InstrumentationTestRunner" Android: targetPackage = "com.kronos...

Processing Dynamically generated rails form -

After I am trying to process the following input parameter:. {"UTF8" = & gt; "✓", "authenticity_token" = & gt; "OgwCJx5J03kvFrve1B / BQ5jBlqsGaqP2En7sAe5XcBA =", "contact_attempt_id" => "79", "3" => "8", "7" => "22"} I can easily obtain contact_attempt_id and response_code. The last two parameters are proven to be elusive. The key is the database id for a query, while the value is the database id for the answer I have tried the loop through the questions that find the ID in the parameter hashes. questions.each do | Q | if! Params [q.id] .nil? C = contact_responses.create c.question_id = q.id c.answer_id = params [q.id] end c.save However I am not able to get the answer id. Your id will be an integer from the database parameter Hash keys are wires / symbols ( HashWithIndifferentAccess ) Change your code for this questions Each do | Q | ...

java - Trying to change title of JFrame from a Thread? -

When I'm trying to set the title of my function to a thread, then I will say my JF: / P> Public Zero Setitude (String Nutital) {this.setTitle (newTitle); } In my thread, I try to use the function by doing this: Main.settail (schar1 + schar2 + "-Restation- "+ Schar3 + bhara 4); (main is the name of my class, and schar1, shcar2, schar3, and schar4 variables that are first shown in the thread) When I do this , It says that I can not create a static reference for non-static method (strings) from type frames, so I changed the function to: Public static zero set theTitle ( String NewTel) {this.setTitle (newTitle); } And it now gives me an error that I can not use it in a constant context. Can anyone tell me how to fix this? This is my best bet - - Try setting GeFrom instead of expanding it Private JFrame jf = New JFram ("First Title"); and access the title from that method jf.setTitle (newTitle);

MongoDB update: Generate new field based on existing field, or update in place -

I am currently messing up for a while and no examples and explanations about the completion of this work is. / P> I have a collection of documents, each document has a date / time zone. Ideally, I will have to prepare a new field for each document, where the value is based on the time from the date / time zone, which is connected with a constant factor. Alternatively, updating the value in place will be enough. I could not figure out how to reference the current document in a Mongo Shell update statement. Is this stupid? Should I quit and write applications to eliminate this simple operation? Thank you! Sometimes by simply writing the question, you are brought to a solution, it's a bit, and of course Strange, but seems to work: db.actuals.find (). ForEach (function (d) {var dt = d.date; var ndt = new date (D.date) .setHours (dt.getHours () - 8); db.actuals.update ({_id: d._id}, {$ Set: {Local: New date (ndt)}}}}})

sqlite - Grouping with multiple record values required per group? -

डीबी का सरलीकृत संस्करण: fkey | count1 | count2 | count3 | सुविधा 100 | 0 | 1 | 0 | सुविधा 1 100 | 0 | 1 | 0 | सुविधा 1 100 | 0 | 1 | 0 | सुविधा 2 101 | 0 | 1 | 0 | सुविधा 3 101 | 0 | 1 | 0 | सुविधा 4 102 | 1 | 0 | 0 | सुविधा3 102 | 1 | 0 | 0 | सुविधा 4 103 | 0 | 0 | 1 | सुविधा 1 103 | 0 | 0 | 1 | सुविधा 2 104 | 0 | 0 | 1 | सुविधा 1 104 | 0 | 0 | 1 | सुविधा 1 104 | 0 | 0 | 1 | सुविधा 2 104 | 0 | 0 | 1 | फीचर 3 मुझे पता है कि फीचर 1 और फीचर 2 से जुड़े हैं (वास्तविक जीवन पर सुविधाओं की सूची पहुंच सकती है 10 या 20)। मैं भी feature1 और feature2 दोनों के लिए काउंटरों का योग चाहता हूं। अपेक्षित परिणाम है: 100 | 0 | 3 | 103 103 | 0 | 2 104 | 0 | 0 | 3 ध्यान दें कि परिणाम की अंतिम पंक्ति पर भरोसा 3 और 4 नहीं है क्योंकि परिणाम में फीचर 3 के साथ लाइन से जानकारी शामिल नहीं होनी चाहिए। मैंने ग्रुप बाय और होविंग को जोड़ने की कोशिश की, लेकिन कोई भाग्यशाली नहीं है क्योंकि इसका प्रभाव है या, के बजाय और। ऐसा लगता है कि एक ही एफकी के साथ विभिन्न पंक्तियों के लिए चुनौती और व्यवहार होना ...

algorithm - Strategy to create BBST when we know that most of the inserts are in order? -

I have a situation where I need a balanced binary search tree. I have used the AVL tree, but it requires multiple rotation to make the height of the balance while inserting. I have noticed that most inputs are in the order of pre-order: 8 9 10 11 12 13 2 14 15 16 17 4 18 19 20 etc ... Is there a better strategy to make a BST, when we know that most of Input is already in sequence? O (n + d) / code>, where D is the number of reversal). Of course, you do not want to do this, if the array is not sorted at all, then in that case it takes O (n 2 ) , as opposed to the other Sorting algorithm which take o (n log n) After running it, you can: If you select an array element to become the root of BST, which element will you choose? The root of a balanced BST should be the middle element with the array array. You will choose the middle element from the order array in each walk. Then you make a node in the tree started with this element. After choosing the element, what ...

python - Reorder lines in a file -

I would like to know there is a way to reorder rows in a file: I Some atomic coordinates, one file with each atom in one line, and I need to write some molecules before others: Atomic C1 atom C2 atom C3 I need to rearrange the lines something like this: Atomic C2 builds C1Aat C3 Is there any way to do this without the list? Even a list made, I did not succeed, the last test was: i = open ("input.pdb", "r") o = For line in Open ("output.pdb", "w") l = [] I: Attach line (line split ()) to line in line: if in the "atom c2" row: a = l Index (line) b = int (a) -1 l [a] = l [b] for line in l: 0.write ("{} \ n" .format (line)) o.close () os. Remove ("input.pdb") Any ideas? Suppose, because you do not give any other indication, you already know in which order lines should be written. "post-text" itemprop = "text"> / P> atom c1 # line 0 atom c2 # line 1 atom c3 # line 2 ...

javascript - Doing event.preventDefault() on $stateChangeStart creates a duplicate state -

एक और दो ui के साथ बनाए गए राज्य हैं यूआरएल / एक और / दो के साथ -उपकरण करें । मान लीजिए कि मैं निम्नलिखित राज्यों को नेविगेट करता हूं: दो -> एक (ब्राउज़र बार में मैं -> / एक ) फिर मैं वापस बटन पर क्लिक करता हूं, लेकिन वापस दो मैं जानबूझकर इस तरह के राज्य में परिवर्तन को रोकता हूं: $ scope.firstTime = true; $ RootScope। $ ('$ StateChangeStart', फ़ंक्शन (ईवेंट, toState, toParam, fromState, पारामों से) {if ($ scope.firsttime) {event.preventDefault (); $ scope.firsttime = false;}}); अब मैं फिर से वापस पर क्लिक करता हूं, इस बार राज्य का परिवर्तन नहीं रोका जाता है, लेकिन दो पर वापस जाने के बजाय राइटर राज्य एक ( / एक ) पर रहता है .... अब अगर मैं वापस फिर से क्लिक करता हूं तो मैं वापस राज्य पर जा सकता हूं ( / two )। मैं कैसे यूआई-राउटर को राज्य एक को पहली बार क्लिक करने से रोकूं पीठ ?

sumifs - Sum the values in Excel cells depending on changing criteria -

I have three columns of data in an Excel spreadsheet, the first column A is a unique identifier. Column B is a number and column C is either a tick or a place: ABC 1-45 150 √ 2D-46 200 3D -45 80 4D-46 20 √5 D-45 70 √ Now, I would like to add values ​​present in Ticket B, being present on Tick and related to unique ID in column A. In this case using row 1 and 5. I use = IF (ISTXT (C1), CONCATENATE (A1)) & Amp; = IF (ISTEXT (C1), CONCATENATE (B1)). This leaves me with two arrays of data: D1D-45 150-4D-4620D-45 70 Now I want to add values ​​in column D based on the ID in column E, in this position in line 1 and 5. I can directly use the SUMIFS statement to specify d-45 as the criterion, however this unique ID will always change. Can SUMIFS be used? I also want to keep every new variation of the ID number in the different title with the equivalent sum, which is: AB 1 d-45 d-46 2 220 20 etc ... you can try it To write different identificati...

uiscrollview - iOS 7 ScrollView Not Scrolling -

I have a problem that I have seen some reasonable comments / answers - I have tried to do this but I still have some There is no luck. I am using iOS 7 and a scene on which I have a UIScrollView . I set a UIScrollView above using a IBOutlet , then set the content code to viewDidLoad . Although it does not seem to scroll. I have autoline and I do not want to turn it off (if I turn off, I get some answers but I think that is not the right solution in my case). Any thoughts? As I said in my comment, instead of the size of the content in viewDidLayoutSubviews Try setting viewDidLoad - the way you set the ScrollView content size, it is no longer affected by the automatic layout because AutoLayout already does "layout [sub]" layout is.

c++ - Extra output when adding trailing spaces and using eof -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब मैं निम्नलिखित कोड संकलित कर रहा हूं माइक्रोसॉफ्ट विज़ुअल स्टूडियो 2013 के अंतर्गत #include & lt; iostream & gt; # शामिल करें & lt; fstream & gt; नेमस्पेस एसटीडी का उपयोग करना; Int main () {ifstream in ("filename.txt"); Int n; जबकि (! In.eof ()) {in & gt; & gt; n; Cout & lt; & lt; N & lt; & lt; endl; } वापसी 0; } filename.txt में शामिल है: 4 नोट : दूसरी पंक्ति खाली रेखा है। मुझे यह आउटपुट प्राप्त हो रहा है: 4 4 मेरा प्रश्न है: जब मैं फ़ाइल के अंत में रिक्त स्थान या रिक्त पंक्ति जोड़ता हूं, तो आउटपुट में क्यों 4 दोहराया जाता है? और इस मामले में क्यों eof ठीक से काम नहीं कर रहा है? ! Eof () , ! / कोड>, ! Bad () , या ! अच्छा () , आपका इनपुट कंडीशन करने के लिए हमेशा गलत तरीके से है बिंदु निष्कर्षण पहले करने के लिए है, और उसके बाद जांचें अगर सफल हो यदि आप पूर्व करते हैं, तो आप लगभग हमेशा उन समस्याओं को प्राप्त करेंगे जो आप अनुभव कर रहे हैं। धारा से...

Modifying custom Wordpress pages -

Sorry if this question is very basic (it would be nice if someone could recommend to me to start a good resource / tutorial with i wordpress development) I am new to WordPress development and I Working on a Mac I downloaded the MMP, installed WordPress, and installed a custom theme that I bought online. So far, I am using the WordPress wp-admin interface to customize the theme. I created a new page named "MyPage" I am interested in making some design changes in my page but the WP-Admin Tool is limited and I realized that I have to start seeing / modifying the code. I am using Netbeen, and a new project is created in my local WordPress folder, which includes wp-admin, wp-content, wp-include folders. However, I'm not sure that in order to maintain the "my page" in the code, in order to modify it I searched all the codes but I did not get any mention of this. Do I think my custom page is somewhere else? In the database? Thank you! drub through WP-con...

How to Edit Jump Style in LongListSelector Window Phone 8 and Blend 2012 -

Image
I'm trying to use Blend 2012 to edit the root list area that you can now use in long lists. has been made. I had no problem doing this with the Windows Phone Toolkit, but now I have a big problem. I have a copy of the template I try to make it and then see it I have no clue what to do next. I want to add a text block and style to it Looks like a jump menu style. It seems that the blend is a template Instead of a style . The value here is an example JumpListStyle which can be used ... & lt; phone: LongListSelector.JumpListStyle & gt; & lt; Style Targe TType = "Phone: Longlist Selector" & gt; Setter property = "grid cell size" value = "113,113" /> gt; Setter property = "layout mode" value = "grid" /> Lt; Setter Property = "Item Template"> Setter.Value & gt; DataTemplate & gt; & lt; border background = "{binding converter = {static resource background co...

Recursion through a linked list in Java -

I need a method code that prints the contents of the linked list repeatedly, though my method Not working. Public Linkedist Reverse () (Linked List List = New Linkedist); List = reverse reactions (list, 0); Return list; } Public Linkedlist reverse reactions (linked list, int pauses) {if (pos! = Size ()) {rotate (); List.add (find ()); Pos = Pos + 1; Reverse curling (list, position); } Return list; } Public string toring () {string result = "list list: {"; Result = toStringRecursion (result, 0); Return result; } Private string toStringRecursion (string result, int pos) {if (pos! = Size ()) {rotate (); String Temporary = Results + (Received) GetData () + ","; Pos = Pos + 1; ToStringRecursion (Temp, pos); } Return results; } The reverse function is working fine, however, even though my toString passed the previous result as only a parameter, the initial result was "List of list: {"} Showing in If I print the result passed through toStringRecursion e...

vb.net - Paging Extension Method for IQueryable(Of T) -

मैंने जेनेटिक पेजिंग प्रदान करने के लिए IQueryable & lt; T & gt; बढ़ाने का प्रयास करते हुए निम्नलिखित विधियां लिखी हैं मेरे कस्टम पेजर नियंत्रण के साथ लेकिन, जब मैं IQueryable & lt; खाता & gt; पर विधि को कॉल करने का प्रयास करता हूं, तो मुझे निम्नलिखित कंपाइलर त्रुटि मिलती है: बीसी 30456: 'पेज' का सदस्य नहीं है 'System.Linq.IQueryable (OrgName.ProjName.Account के)'।। स्रोत: आयात सिस्टम। रनटाइम। कॉम्पलरसर्विसेस मॉड्यूल पेजिंग & lt; एक्सटेंशन () & gt; सार्वजनिक फ़ंक्शन पृष्ठ (टी के रूप में) (स्रोत के रूप में IQueryable (टी के), पृष्ठ सूचकांक पूर्णांक के रूप में, पूर्णांक के रूप में पेजसिस्टम, बायरेफ़ रिकॉर्ड, पूर्णांक के रूप में) IQueryable (टी के) रिकार्ड के रूप में = source.Count () लौटें स्रोत। स्किप करें (पेज इंडेक्स * pageSize )। (पृष्ठसिज़) एंड फ़ंक्शन एंड मॉड्यूल मॉड्यूल फ़ाइल एक ही विधानसभा और नाम स्थान में खाता व्यावसायिक वस्तु ( OrgName.ProjName) के रूप में है )। (निर्दोषों की रक्षा के लिए नाम बदल दिया गया है।) मुझ...

ios - Not sure how to setup view object and connect with IBOutlet code -

Image
I am trying to copy all the functionality of this example app provided by Apple: AVCam: I have copied this code to 99%, but I have a final problem. I have an IBotlet statement that looks like this: @ property (non-monomitive, weak) IBotlet MediaCapturePreviewviews * Previewview ; According to Apple's sample code, this outlet is about to connect to an object placed at the top of the normal / default view. Here is a screenshot of Apple's example that looks like a connection inspector: You will see that the IBolet named "previewview" has been added to some name "Cam preview view". In addition, in this screenshot, you can see that I am able to choose this object from myself and it shows a reference outlet in the connection inspector for the same IBOutlet and view the object: My problem is that I see this view Can not get the IBOutlet code to connect to the object I can click and drag to create a connection Tried to behave but it just want...

Resize videos in android -

After saving in the SD card, I want to resize the captured video using MediaTest intent. I have done the same thing with C # and FFPAG and have thought of using it with Android, but I am not yet able to find a way to add to my eclipse running on my Windows 7 machine. I have all the solutions that I have found to build ffmpeg in a complete Android app completely Greek for me. Is there an alternative solution for FFPPE, which is probably already made for Android SDK for video resizing? I'm just looking for the path of least resistance ... No , there is no API in Android, which you have to convert to video in SD card. Because changing the size of the video means that you are adding the video, which is a complex task and currently the Android API is not available for this work. So you just have to use external libs like ffmpeg and *. So to use it in Android. *. You can keep an eye on the files. Hope it helps. Cheers. :)

How to generate a random string in C++ -

After a few hours of screwing around I can not know how to create a random string generator in C ++ Go. I was wondering if you could show me how you would go about doing this. I'm not sure enough what you are asking, but it seems that you have these lines Want something with: const std :: string VALID_CHARS = "abcdefghijklmnopqrstuvwxyz ABCDFGHIKLMNOPCRSTUVWXYZ 0123456789"; Std :: default_random_engine generator; Std :: uniform_int_distribution & lt; Integer & gt; Distribution (0, VALID_CHARS.size () - 1); Std :: ostringstream oss; (Std :: size_t i = 0; i & lt; SOME_SIZE; ++ i) for (oss & lt; VALID_CHARS [distribution (generator)];} Std :: string your_random_string = oss.str (); You can make a little simpler by changing the loop: const std :: string VALID_CHARS = "abcdefghijklmnopqrstuvwxyz ABCDFGHIKLMNOPCRSTUVWXYZ 0123456789"; Std :: default_random_engine generator ; Std :: uniform_int_distribution & lt; integer & gt; d...

ruby - Using .split on a string in an array -

इनपुट के लिए 12,34,56; 78,91; 50,60; I अर्द्ध-बृहदान्त्र सीमा से स्ट्रिंग को विभाजित करना चाहते हैं और फिर उन स्ट्रिंग को अल्पविराम से विभाजित करना ex: डालता है "इनपुट:" input = gets.chomp s_array = input .split (",") के लिए I में 0 ..s_array.size puts s_array [i] .split (",") यह सफलतापूर्वक साथ डालता है लेकिन मुझे एक त्रुटि मिलती है अपरिभाषित विधि शून्य के लिए 'विभाजन': NilClass & lt; NoMethodError & gt; इस त्रुटि का कारण क्या है? बदलें .. के लिए ... i में 0 ... s_array.size के लिए .. के साथ एक श्रेणी शामिल है, जबकि ... नहीं है, उदाहरण के लिए 1..5 # = & gt; 1,2,3,4,5 1 ... 5 # = & gt; 1,2,3,4 तो चर i आपके मामले में यदि आपके आकार में सरणी आकार 5 है, array_s [5] तो शून्य होगा ।

Biztalk got an error "A transport-level error has occurred when receiving results from the server" -

हमारे बिज़्टकॉक (2006 आर 2) को नीचे एक त्रुटि का सामना करना पड़ा: त्रुटि 1 इवेंट प्रकार: त्रुटि इवेंट स्रोत: ENTSSO इवेंट श्रेणी: एंटरप्राइज एकल साइन-ऑन इवेंट आईडी: 10514 दिनांक: 2/14/2014 समय: 5:02:27 PM उपयोगकर्ता: एन / ए कंप्यूटर: NINI-SSPP03 विवरण: एक त्रुटि SSO डेटाबेस तक पहुंचने का प्रयास करते समय हुई फ़ंक्शन: GetGlobalInfo फ़ाइल: infocache.cpp: 1349 सर्वर से परिणाम प्राप्त करते समय एक परिवहन-स्तरीय त्रुटि उत्पन्न हुई। (प्रदाता: टीसीपी प्रदाता, त्रुटि: 0 - निर्दिष्ट नेटवर्क नाम अब उपलब्ध नहीं है।)। SQL त्रुटि कोड: 0x00000040 त्रुटि कोड: 0xC0002A21, SSO डेटाबेस तक पहुंचने का प्रयास करते समय कोई त्रुटि आई। त्रुटि 2 निम्न संग्रहीत कार्यविधि कॉल विफल: "{admsvr_receiveLocation_GetAllInApp (?) कॉल करें } "। SQL सर्वर ने त्रुटि स्ट्रिंग लौटा: "[DBNETLIB] [कनेक्शन रीड (recv ())।] सामान्य नेटवर्क त्रुटि। अपने नेटवर्क दस्तावेजों की जाँच करें।"। लेकिन हमें SQL सर्वर इवेंट लॉग और SQL में कोई त्रुटि नहीं मिल सकती सर्वर लॉग। क्या इस त्रुटि के संभावित कारण पर...

python 3.x - Python3 access previously created object -

I'm new to programming in general and I need some help to reach an example of a class already created. I did some search but I could not find anything ... Maybe this is just because I should not try to do this. for servers in: c = rconprotocol.Rcon (s [0], s [2], s [1]) t = threading. Thread (target = c. Connect) t. Start () c. Messenger (All Messages, 10) Now, if I want to call the function "C", then what can I do? Thanks, Hugo You are creating several different objects, which you can summarize in the c As you go through the loop, if you want to be able to reach more than the last of them, you will need to protect them from somewhere that will not be overwritten. Perhaps the best way is to use a list to keep consistent values, but depending on your specific needs, any other data structure can also be used (for example, you can use a specific key with each value can see). This is a trivial adjustment for your current code which will save c in the list...

vb.net - Catch event from item stored in a dependency property -

How do you hold an event from an object raised in dependency property? For example, in general I get something like this foo _foo get returned as the public property foo1 get ready (value as foo) _foo = End price set End Property Private WithEvents foo Public Sub Foo_Handler as you want to write _foo () Handle_Foo. Some events' Sophoming & All Although you do not have a dependency property as evvavents Can declare. Any idea Here I came up with the solution. I really do not like it and it does not look right, but it works. If there is a better solution for a person, please provide it as an answer. To provide a little more information about the case of my use, I have a dialogue called Oakkenal diologue. It is basically just a placeholder to present the content to the end user when the user clicks OK, then stops The method is called as isawview, and when the cancel button is clicked on the other side, then cancel it, the method says the problem It was, that the meth...

python - global name not defined error -

itemprop = "text"> I am getting an error with my discount variable Name-error: The global name 'discount' is not defined Please look at your code and help me I do not want to modify the parameters of the function at all. def finddiscount (quantity): If the quantity & gt; = 1 more volume & lt; = 9: discount = 0 elif volume & gt; = 10 more quantity & lt; = 19: discount = .2 elif volume> gt; 20 more quantity & lt; = 49: discount = .30 elif volume> = 50 more volume if you access it in the multi block area You will have to declare discount globally. discount = 0 df search discus (quantity): ... global discounts # discount discount global Copy = 1 needs to be modified

java - AsyncTask error Android App crashes -

मेरा उकरा कोड: सुरक्षित बनाम क्रिएट (बंडल सहेजे गए इन्स्टैंसस्टेट) {super.onCreate ( savedInstanceState); setContentView (R.layout.board); ArrayList & LT; स्ट्रिंग & gt; पासिंग = नया अर्रेलिस्ट & lt; स्ट्रिंग & gt; (); नया AsyncTaskParseJson ()। निष्पादित करें (); } यह मेरा कोड है: सार्वजनिक वर्ग AsyncTaskParseJson AsyncTask को बढ़ाता है & lt; स्ट्रिंग, स्ट्रिंग, स्ट्रिंग & gt; {अंतिम स्ट्रिंग TAG = "असिनकाटाकार्सेजसन.जावा"; स्ट्रिंग yourJsonStringUrl = "मेरे यूआरएल यहाँ"; JSONArray डेटा JsonArr = null; @ ओवरराइड संरक्षित शून्य पर प्र्रेक्सिक्यूट () {} @SuppressWarnings ("null") @ ओवरराइड सार्वजनिक स्ट्रिंग करनाइनाबैकग्राउंड (स्ट्रिंग ... arg0) {अंतिम स्ट्रिंग [] values ​​= null; कोशिश {// हमारे जेसन पार्सर JsonParser jParser = नया JsonParser इन्स्तांत (); // यूआरएल से JSON स्ट्रिंग मिल JSONObject json = jParser.getJSONFromUrl (yourJsonStringUrl); // उपयोगकर्ताओं के डेटा की संख्या प्राप्त करें; जेसनएआरआर = जेसन। जेजेएसन...

ios - How to get rid of the line on top of my button in a UIToolBar -

Image
मैंने एक UIToolBar बनाया है और दो UIBarButtonItem s और सेट करें फिर self.navigationItem.rightBarButtonItem पर इस उपकरण पट्टी को सौंपा। सब कुछ पूरी तरह से काम करता है, लेकिन मेरे बटन के ऊपर एक पंक्ति होती है। कोड: UIBarButtonItem * addItem = [[UIBarButtonItem alloc] initWithTitle: @ "जोड़ें" शैली: UIBarButtonItemStylePlain लक्ष्य: स्वयं कार्रवाई: @selector (addNewRow :)]; UIBarButtonItem * editItem = [[UIBarButtonItem alloc] initWithTitle: @ "संपादित करें" शैली: UIBarButtonItemStylePlain लक्ष्य: स्वयं कार्रवाई: @selector (editRow :)]; UIToolbar * toolBar = [[Uitoolbar alloc] initWithFrame: CGRectMake (0, 0, 100, 30)]; [टूलबार सेट आईटम्स: @ [एड इटैम, संपादित करेंइटम]]; Self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView: टूलबार]; कृपया मेरी तस्वीर देखें: टूलबार से छुटकारा पाने के द्वारा आप लाइन से छुटकारा पा सकते हैं। UIBarButtonItem * addItem = [[UIBarButtonItem alloc] initWithTitle: @ "जोड़ें" श...

View file isn't completely displayed- Ruby on Rails -

I am trying to create a form using Ruby on Rail. However my code only shows content in the content and the rest of the content is not displayed. My code is as follows Controller: user_controller.rb class UserController & lt; ApplicationController def index enddif register @title = "signup" and end see: register.html ` & Lt;% form_for: User Tax | F | & Gt%; & Lt; Fieldset & gt; & Lt; Story & gt; Sigup & lt; / Narrative & gt; & Lt; Label = "name" & gt; Name: & lt; / Label & gt; & Lt;% = f.text_field: name% & gt; & Lt; Br / & gt; & Lt; Label = "email" & gt; Email: & lt; / Label & gt; & Lt;% = f.text_field: email% & gt; & Lt; Br / & gt; & Lt; Label = "password" & gt; Password: & lt; / Label & gt; & Lt;% = f.password_field: Password% & gt; & Lt; Br / & gt; & Lt;% = submit_tag "signup" ,: clas...

haskell - Profiling library via executable in cabal -

मूर्ख प्रश्न मेरे पास एक पुस्तकालय और निष्पादन योग्य के साथ एक कैबल फ़ाइल है जिसे मैं पुस्तकालय प्रोफ़ाइल में उपयोग करना चाहूंगा, लेकिन मैं अपने पुस्तकालय से लागत केंद्रों को देखने के लिए प्रबंधन नहीं कर सकता ( हालांकि मैं कुछ मॉड्यूल जैसे GHC.IO.Encoding ) से देखता हूं। यहां मेरे कैबल फ़ाइल का एक सरलीकृत संस्करण है flag dev default : झूठा मैनुअल: सच लाइब्रेरी उजागर-मॉड्यूल: फू जीएससी-ऑप्शंस: -वॉल सीजीसी-प्रॉफ ऑप्शनः -फाफा-ऑटो बिल्ड-निर्भर करता है: बेस एक्जिक्युटेबल डीव-उदाहरण यदि! फ्लैग (देव) बनाया जा सकता है: गलत जीएससी-विकल्प: - Ddump-to-file -ddump-simpl -dsuppress-module-prefixes -dsuppress-uniques -ddump-core-stats -addump-inlinings ghc- विकल्प: -O2 -rtsopts ghc-prof-options: -fprof-auto hs-source -dirs: dev-example, ./ main-is: main.hs build-depend: आधार कहां से मैं कर रहा हूं $ cabal कॉन्फ़िगर करें -fdev -w /usr/local/bin/ghc-7.6.3 --सक्षम-लायब्रेरी-प्रोफाइलिंग -सक्षम-निष्पादन योग्य- $ caba एल रन देव-उदाहरण - + आरटीएस -एच-पी उह, समस्या बस यह था कि मेरे...

Persistent undefined method `link' for nil:NilClass (NoMethodError) -

Continuous: undefined method to solve 'link': NilClass (NoMethodError) Many efforts have been made to this and many support articles but still stumped Error: Undefined method for 'zero' link: NilClass (NoMethodError) Code: Requires 'rubygems' 'watir-webdriver' @ browser.link (: href => '') .exist? HTML & lt; Back to my Chase Account Help is highly appreciated

java - can we use javafx instead of swing for developing desktop application? -

Is it a good idea to try to develop a desktop application using java fx instead of java swing? Java FX supports database functions? Please help me with your answers friends Of course you can do as you swing to communicate with a database with everything Will also work in Jawfix This is because none of them supports database communication by default, so you have to use a database library such as Hibernate. But I think you have already done this for swing. Swing and JavaFX are GUI-library and nothing else. Hope this helped: :)

c++ - Convert std::string to char * in c++11 -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब मैं एक पुस्तकालय के लिए लिख रहा हूँ मिश्रित-भाषाओं और इसलिए हमें सी इंटरफ़ेस पर रहना होगा। मुझे इस एपीआई फ़ंक्शन को कॉल करना होगा: शून्य getproperty (const char * key, / * में * / char * value / * out * /) { मुझे मान को std :: string की सामग्री के साथ सेट करना होगा। std :: string stdString = funcReturningString (); // सेट मूल्य stdString की सामग्री के लिए मैंने संभावित रणनीतियों पर बहुत सारे जवाब देख लिए हैं, लेकिन इस विशिष्ट उपयोग-मामले के लिए कोई नहीं है और न ही किसी भी "सर्वश्रेष्ठ" या "मानक" । " हम इसके मूल्य के लिए सी ++ 11 का इस्तेमाल कर रहे हैं। कुछ उत्तरों ने बफर को स्ट्रिंग की सामग्री की प्रतिलिपि बनाने और उस का उपयोग करने के लिए अस्पष्ट सिफारिश की है लेकिन इसे कैसे करें? मैं इस वार्तालाप पर कुछ और राय चाहूंगा ताकि मैं आखिरकार एक रणनीति चुन सकूं और इसके द्वारा खड़े हो जाओ। धन्यवाद! अद्यतनः यहां पर इसका समाधान है I मैं अन्य API फ़ंक्शंस के अनुरूप रखने के लिए uint32_t का उपयोग कर...

c# - Access Class Variable in XAML -

मेरे पास एक वर्ग परिभाषित है: class constants {public static string settingsToolTip = " सेटिंग्स"; } मैं इस स्ट्रिंग को एक बटन के टूलटिप के लिए सेट करना चाहता हूं: & lt; बटन नाम = "बटन सेटिंग्स" विंडो टूल टूल = "सेटिंग" टूलटिप सेवा .ShowDuration = "2000" / & gt; एक्सएएमएल में स्ट्रिंग "सेटिंग्स" हार्डकोडिंग के बजाय, मैं इसे स्थिरांक से स्ट्रिंग का उपयोग करना चाहता हूं। मैं इसे WPF XAML में कैसे कर सकता हूं? आप XAML में। बटन टूलटिप = "{x: स्थैतिक स्थानीय: Constants.settingsToolTip}" / & gt; सुनिश्चित करें कि आपने XAML फ़ाइल में नामस्थान जोड़ दिया है ( स्थानीय ) जहां लगातार वर्ग घोषित किया गया है: xmlns: local = "Clr-namespace: वास्तविक नाम स्स्पेस"

vb.net - Count data displayed on my datagridview with category -

I'm having trouble with the datas using the range on my data grid view, when I used the "department" The data on the same category filtered my dataset But let me tell you how many employees, supervisors and managers are involved in that category. I want this to be displayed in my text box, i.e. txtStaff, tstManagers, txtSups Thank you! This is my current code: New ODDB. Try DimCouf as ODDI Connection ("PROVIDER = Microsoft.ACE.OLEDB.12.0. Data Source =. \ Database \ IRMG TO.accdb") conF.Open () Dim query string as query = " Employee_Name, P_Level, Position_Title, Department, Team, Subteam1, Subteam2, Immediate_Head, CAREER_BAND, tblEmployees Where ("Select & amp; CAREER_ZONE; txtFilterType .text & amp;" like '%' & amp; txtFilter.Text & amp; "% ')" Dim order New OleDb.OleDbCommand (query, conference) Dim adapter New OleDb.OleDbDataAdapter dim DT New DataTable adapter.SelectCommand = Command as Adapter....

devise - Deleting a User record from rails console -

We have some test data inside our production database and I am trying to clean it. I was removing some test email addresses directly from the console user. ((Email = & gt; "asdf@example.com") here. First.delete This record has been deleted Now when I try to create another account with this email address, it says that Email has already been taken. I have done this many times in my Dev environment, and it has acted like a magic I know that I never get a record removed from the console directly Should, but this is a closed scenario and I'm curious why this is not working. Please help me with this. Are you using something like a gem in production, which will soften the user's record ? If so, try User.with_deleted.where (: email = & gt; "asdf@example.com") and if any result gives the user's email address in a non-existence change it.

Can't open video by OpenCv ErrorUnhandled exception at 0x7695c41f in moving movie.exe: -

I write a very simple program to test openCV to open a video, but I fail. Here is the code. #include "opencv2 / highgui / highgui.hpp" #include "opencv2 / imgproc / imgproc.hpp" using namespace cv; Zero Main (Zero) {Named Window ("Example 3", WINDOW_AUTOSIZE); Video capture cap; Cap.open ("D: \ AMP4"); Cv :: mat frame; While (1) {caps> & Gt; Frame; //cap.read(frame); Break (! Frames data); Cv :: imshow ("Example 3", Frame); WaitKey (33); }} It just flash windows, however, if I comment on breaking (! Frame data!); I'll get: Unwanted exceptions to 0x7695c41f in moving movie. Exe: Microsoft C ++ Exception: CV :: Exception at memory space 0x0045f968 Any ideas? cap.open ("D: \ a.mp4"); should be: cap.open ("D: \\ A.Mp4");

How to remove redis specific application cache via capistrano prior to a restart -

How to redesign a specific app cache via the cursoran before restart Radis is running a remote machine and the radis client There is no need to install on the machine which does the deployment. As long as any order can be run on capistrano deployment, simply press the red key with redis-cli Remove: Role: redisserver, "127.0.0.1" ... Namespace: Deploy ... "Deploy: Restart", "Deploy: Reset_Red_Key" before work: Reset_redis_cache ,: roles = & gt; : End Rediserver do "redis-cli DEL cachekey" ... UPD added role reference

how to iterate for loop using object oriented php -

ओओपी का प्रयोग करके पाश को कैसे पुनरावृत्त करें $ myobj = new number_ series_ class (10 ); $ Myobj- & gt; print_number (); और यह आउटपुट है आउटपुट 1-2-3-4-5-6-7-8- 9-10 आपका प्रश्न स्पष्ट नहीं है, लेकिन क्या आप यह चाहते हैं? वर्ग संख्या_सारे_ वर्ग {निजी $ अनुक्रमणिका; फ़ंक्शन नंबर_सरीस_सर्प ($ num) {$ this- & gt; अनुक्रमणिका = $ num; } फ़ंक्शन print_number () {for ($ i = 1; $ i & lt; = $ this- & gt; अनुक्रमणिका; $ i ++) {यदि ($ i! = $ This- & gt; सूचकांक) प्रति ईको $ i .'- '; Else प्रतिध्वनि $ i; }}} $ Myobj = नया नंबर_सिरीज_क्लास (10); $ Myobj- & gt; print_number ();

java - How to programmatically retrieve information like language, OS, Architecture, etc. regarding the current project -

I am very new to the intelliJ plugin development and I was wondering if there is a possibility to get some information about the current project ( or existing edited file better). Language (for example Java, Groovy, etc.) For Java projects, Where Intel is running the architecture of the machine (such as X86, X64, etc.) and OS (Windows XP, Linux Ubuntu, Mac OS X etc.) I am expanding a DumbAwareAction and in action (AnAEVEEVEVE event) method found me something like this: project project = event.getData (PlatformDataKeys.PROJECT); ... but I have not received such information here. Community version source code quickly helped write the following: SDK project Sdk = ProjectRootManager.getInstance (project) .getSdk (); For the module: SDK module SDK = ((Modularroot Manager Impulse) module Rootnener.stustinstance (module)). GetSdk (); Can not say anything about architecture or language

c# - I want to implement loading content page once masterpage is loaded -

When I load the master page content, I want to load the content page. I have tried some of this default Espacks & lt; Script type = "text / javascript" & gt; Function showprint () {setTimeout (function ()} {var modal = $ ('& lt; div / & gt;'); modal.addClass ("modal"); $ ('body'). Append (modal); Var loading = $ ("loading"); loading. Show (); var top = math.max ($ (window). Light () / 2 - loading [0] .offetset / 2, 0); var left = Math.max ($ (window). Wide () / 2 - Loading [0] .offetwidth / 2, 0); loading css ({top: top, left: left) });}, 200); } $ ('Form'). Submit ("submit", function () {shogrell ();}); & Lt; / Script & gt; & Lt; ASP: Button ID = "BTN Sebuit" Runat = "Server" Text = "Load Customers" OnClick = "btnSubmit_Click" / & lt; Div class = "loading" align = "center" & gt; It is loading. please wait. & Lt; Br /...

swing - Could I use gwt GUI in common java application? -

I want to use Google Web Toolkit's GUI in the normal Java application rather than swing. How can I apply it? Can anyone show the simplest example how to do this? I would like to use Google Web Toolkit in the Common Java application instead of swing in GUI. Not the same way, the GWT Java runs GUI code in JavaScript and browsers. then there is no answer

flash - How to continue animation after stopping it -

I have an animation in which a letter is playing, I also have a button that plays a rolling animation of the character . However, after completing the rolling action the character is stable and does not release the running animation. Here is the code package com.usmanzubairi.theAges {import flash.utils.Timer; Import flash.events *; Import flash.display. *; Import flash.geom.matrix; Import flash.net.SharedObject; Public Square Pegram Expands Movie Clip (Public Work Pegam) () {addEventListener (MouseEvent.CLICK, Rolling); } Private Function Rolling (Event: Event): Zero {if (event.target == roll_mc) {addChild (Roll) Roll. Visible = true; Runner_mc.visible = false; roll play(); Actually, I want to continue playing animation after the completion of the rolling animation. Thank you.

mysql - how to select rows of a table in 3th multiply order in sql like 3,6,9 etc -

My table contains 1024 rows and two columns. I 3,4,6, etc. Is this possible in the SQL query, if possible, what is the code for it .. A relational database Assume that you have a column by which you can "3" "Or" 4 ", you can order results to define a line, work with the following postgrad: choose (choose from col1, col2, col3, row_number ()) (order by your_sort_column) as rn from your_table) where rn in (3,4,6); Where your_sort_column defines those orders or rows, it can be an incremental ID or timestamp column that stores the time of the entry or update the time.

java - How to save String format? -

I am working with jsf 1.2 and richFaces 3.3, I need to save the text with a special format created by the user Is spaces, returns, etc. ... Is there a special tag to do this? Richfase has a & lt; Rich: Editor & gt; Tags: I do not know that this is in Richfase 3.3. If it is not, you can do this with the CKAditator & lt; H: inputTextarea & gt; . Ck Editor Demo: Download CK Editor: & lt; H: inputTextarea & gt; or & lt; Rich: Edit & gt; Follow the content: & lt; H: outputText value = "# {someBean.field}" escape = "false" /> gt;

How to use checkbox in ruby on rails -

I have a code in the checkbox at the bottom of the Ruby on Rail: "Monday"})%> However, it only shows the checkbox but its text does not show "Monday." So what should I do to display the text of the checkbox, please suggest me, wait for the answer. Thanks have you read this? Either you use check_box_tag or f.check_box inside a form builder, you must add a label to display it. You can use only & lt; Input type = "checkbox" value = "something" /> can not be generated, and not the label, which you like text or & lt;% = label_tag, whatever '%' .

rest - Apache CXF RS request and response sizes -

How can I get request and response size in bytes in Apache CXF Rest Service to log into Matrix DB? "Content-Length" is not an option, such a title can not be found on my messages. I need raw size, which can be obtained by wireshark from the nearest, for example, when I dump the TCP of my http session. The length of the message message in the link is 4.4: Content-Length VS Transfer- Encoding and HTTP / 1.0 VS HTTP / 1.1 To understand HTTP headers & amp; transportation. The w.r.t request message is set by content-length client side transport, therefore, whether or not the requestor decides to determine the content-length. The w.r.t response message is normally based on the server on which the cxf-rs endpoint is deployed. Tommak sends content-length by default, even if you manually set content-length manually for the retention header: Public response getData () { Address Data = New Address ("London", "UK"); // Domain Model / // Ad...

java.util.ConcurrentModification handling in java -

I am trying to read and write in a list in the same block as shown in the code below. DoerDao GetParentNode method will give me an integer number and I am storing it again in the same list. I know that this gives me a concurrent amendment error, but is there any way where I can lock the object, can I use the same list object to store the value and read it from the list at the same time? Or I will have to write a new method and then use it to get all the data in the list. int moduleId = 10; & Lt; Integer & gt; GetParentNode = New Arreelist & lt; Integer & gt; (); Try {getParentNode} {getParentNode.add (moduleId); (For int node: getParentNode) {int nodeId = doerDao.getParentNode (sessionFactory, node); GetParentNode.add (nodeId); }}} Hold (exception e) {e.printStackTrace (); Logs. Terror ("Error:" + E); } Keep in mind that concurrent modification this In case do nothing with threads and synchronization! In your case, an iterator is used for the ...

Translate javascript code to c# - help is needed -

I have a Windows application that is using .net4 I'm getting data from "WarGaming.Net" "API". I get much data from HTTP WebHive and HTTP Web Response Classes. My URL is Requested "" But I get "403 Prohibited". I read about how to do this post with a JavaScript script function getResp ($ parr) {$ ch = curl_init ()); Curl_setopt ($ c, CURLOPT_URL, "http://cw.worldoftanks.eu". $ Parr); Curl_setopt ($ CH, CURLOPT_VERBOSE, 0); Curl_setopt ($ CH, CURLOPT_HEADER, 0); Curl_setopt ($ CH, CURLOPT_USERAGENT, "Mozilla / 4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); Curl_setopt ($ ch, CURLOPT_HTTPHEADER, array ('Accept: Application / Jason, Text / Javascript, Text / HTML, * / *', 'With X-Requested: XMLHttpRequest')); Curl_setopt ($ CH, CURLOPT_REFERER, "http://worldoftanks.eu/"); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); $ Response = curl_exec ($ ch); $ C_type = curl_getinfo ($ ch, CURLIN...

amazon web services - Cannot install AWS toolkit for eclipse.How to fix these errors? -

I am trying to install the ADS Toolkit for eclipse in Eclipse Helius. I can not install it because I'm getting the following error, how to fix it? Missing Requirements: Identity Management 1.0.0.v201402141427 (com.amazonaws.eclipse.identitymanagement 1.0.0.v201402141427) is required 'bundle com. Mmozonops.clipse.ac2.1.0 'But this can not be found to be unable to satisfy the dependency: from: Eclipse core for the AWS Toolkit 2.0.1.v201402141427 (com.amazonaws.eclipse.core.feature.feature. Group 2.0.1.v201402141427) to: com.amazonaws.eclipse.identitymanagement [1.0.v201402141427] I got the answer to my question before going and installing database development. Then go and install the transaction management EC2 and finally install the ADS Toolkit for Eclipse.

c# - Is it possible to update the current IPrincipal without creating a new connection in SignalR 2.0.x? -

We use custom form authentication in MVC4. We create a FormsAuthenticationTicket with custom data (another authentication ticket for a backend sub-system) and store it in a cookie. This cookie is read and dectypted in Global.asax by the FormsAuthentication_OnAuthenticate method, from decrypted data, we create a custom i.purcted object that we set as the current user. We also use a sliding termination plan for the ticket and if it is about to expire, then we create a new ticket and update the cookie and make a new custom IPCR object. We have set the signal R to routinely ping the server, and the ticket is renenewd properly. The problem is that the update IPrincipal is never prompted (this is only set for the first time). Is it also possible or do we need to make a new connection to renew the ticket? Protected Zero form etiquette_onnect (object sender, formAdministrationAventEurge E) {var authCookie = Request.Cookies [FormsAuthentication.FormsCookieName]; If return (authCookie...

javascript - parsing json not working -

I'm new to JSON and I've used json_encode to create a JSON object that looks like this [{ "timestamp": "12 \ / 16 \ / 2013 0:00", "curr_property": "7211", "curr_property_cost": "123", "day_property": "48", " De_proprti_cost ":" 281 "," Kurr_solr_jnareting ":" 4958 "," Kurr_solr_aksport ":" 0 "," De_solr_jnareted ":" 33 "," De_solr_aksport ":" 0 "," Kurr_chanl ":" 1964 "," Kurr_chan2 " : "" "" "" "", "Day": "", "13", "day_chach 2": "33", "day_account 3": "1"}, {"timestamp": "12 \ / \ / 2013 12:00 "16" Kurr_proprti ":" 7179 "," Kurr_proprti_cost ":" 123 "," De_proprti ":" 72 ",...

Populate dynamic dropdown in Excel form with VBA -

I have a dropdown on Excel form that I want to populate with the items listed in the sheet "OR", but I Only it needs unique entries from this dynamic list & amp; Then populate the dropdown. has searched for many blogs, suggested categories are named as a riososource property, but there are duplicate items in my list & amp; Is dynamic. You can write this code: In, the integer as R, integer as NR, wr, v set wr = range ("A1: A10") NR = wr.Rows.Count R = 1 for NR V = wr (R, 1 ) If InStr, V & amp; ",") = 0 then S = S & amp; V & amp; With "," end if next s = left (S, Lane) - 1) range ("D1") Validation Delete. Add type: = xlValidateList, Alertstyle: = xlValidAlertStop, Formula 1: = s End with This data uses verification, I think the data combo box in A1: A10 and D1 is. Only A1: A10 will be the specific values ​​in the combo box. If you like the combobox exchange object, try this: as the demat s string,...

vb.net - Issues with SQL Query -

Speaking silly as , I have very little experience with SQL queries. Issues with the following questions that I am generating within my Vb.net application Update payment SET B1Code = '12345', ARInvoice = '54321', INV2Go = '00000' WHERE PatientID = '400' and product = 'consultation' and category = 'orthotics' (I have created a test record in the database matching the above information) It is being created in Vb.net with the following code: String = as the slow query = "Update payment SET B1Code = '"& Amp; TxtB1Code.Text & amp; "', Arnivice =' '& amp; TxtARInvoice.Text & amp;"', INV2Go = '& amp; TxtInv2GoCode.Text & amp; "' Where Patient Id = '" & Integer Purs (TSTITIT. Text) & amp; "'and Product ='" & TxtProduct.Text & amp; "'and Hierarchical =' & amp; TxtPatientType.Text & amp; Then...

c# - Execute several elevated commands in shell (or similar) -

I need to execute several commands with high rights, something like this: Start the net myservice (requires admin rights) Pure Stop MyService (Admin rights are required) / ol> All this dynamic, e. G. The first line may include proxy settings, including a username and password, or any other amendment in the setting file. (The settings file is in the program folder, the program is provided externally to modify the settings file. The actual information will be recorded through the user GUI.) I use a lot of CMD The idea is to create a flexible solution. Execution process with redundant studin and stadout but .. It looks like "ryas" (shalexetut is needed) and is redirected - / output are unique. (Also, I saw that redirection and CMD.XA is very difficult to handle. I write my own tasks as a substitute for lidlines, because readline is finally a new line Hope and waits, such as if a command prompt occurs (which means that you are in C: c: \ bla> but no Newline....

python - Differentiate current and new items in outliner -

Is it possible to store existing items as well as store new items in the outliner? def (setup): setupRenderGlobals () importItems () frameViewport () global app app = form QtGui.qApp global form = MainWindow () form.show () Example items in the outliner (default item, except for example camera): ['pCube1', 'pCube2', 'pSphere1'] then importing. Adding new items: ['pCube1', 'Pcube2', 'psphere1', 'man_rig01', 'pShere2'] Does anyone guide me in a way that I can create new items Can I separate? Currently my import window (imported in-house module) is used when popping up the prefix window (Men-Wando ()) when I am importing / stopping in any item. In this way I would like to write it in a manner where the prefix window will only pop up while adding new things. Message to stop voters: This question is not clear No Answers are waiting to post for Maya users, but questions are already answered Should be opened fr...