Sunday, 15 August 2010

sap - How do I in Crystal Report sum data on a column where id is some number -


I am new to crystal reports and I am trying to understand this for a while. I'm running Crystal Reports XI Please help.

  Data: John respMonitor 5 ABE case MGMT4 cyst test 1 4 clair respmonitor 5 mb test 3 2 bob case mgmt 8 lyn respmonitor 4 rick test 2 33 ray test 1 31 al test 1 24 etc. .  

I want to create the following data:

  Group cost sumOfTests1_3 124.0 < ====== Only want a number of tests respMonitor 5.0 case 7.0 mmsmt 7.0 responitor 3 Responitor 2 caseMgmt 4 etc.  

That's why I want to be able to make the tests alone except for other groups alone.

  I have created a SQL expression field: {% testCM} (PatientTbl) "Select" from "PatientTbl" amount ("patient" "cost"). "Group" = 'test1' or 'patientTbl'. In my record selection I have: ["responitor", "case mgmt", "test1", "test2", "test3"] "group" = 'test2' or 'patientTbl' '"group" =' test3 ') In {PatientTbl.group} I have also created a formula field: {{test1 "," test2 "," test3 "] in {PatientTbl.group} then {% testCM}  

There should be another block in the formula area to print the rest? I do not think how to collect only the costs for the group "test", while other groups are being printed individually. Not sure where to go from here.

Thanks, John

not me It looks like you need a SQL expression just add this formula and use it as your group expression and then add value. A group with a value will still show the correct value.

 < Code> if {PatientTbl.group} in {"test1", "test2", "test3"] then "test1-3" other {PatientTbl.group}  

git - Simpler file type matching in .gitattributes -


We are setting up the line-ending encoding rules in a current GIT repo and it has been realized that it affects binary files When we do not want it.

I can not find any information as to which file-matching pattern is supported in this file. Instead of a list of all text file extensions (except for all binary files), do we have one way to match their type of files instead?


java - Handling custom server-side exceptions from server to GWT Client -


In what way (and the revised version) a GWT app can handle the custom server side exception and handle it with the GWT client side By using the ClientProxy interface such that the app can see that:

  if exception (example custom server exception) {// do UI stuff}  

2.3 Restart the use of the class Resource Express on the Client And an annotated exception that permits you to take advantage of transparent user-defined exceptions

For more information, you can see this link:

Hope this is your Will help, Thierry


version control - Git on mulitple networks/offline sites -


We have two teams who work on the same project. Each team is on a different network. Unfortunately, none of these networks is connected to the internet and due to the rules of the company, this project is not allowed to transfer any data over the Internet. We can only transfer files between the two periodically, which is the only connection.

Ideally, each team should be able to clone, commit and push a bare. Whenever we want to synchronize the repo on our network, we can transfer any kind of (binary) difference / patches between those sites which will be used to sync the repo.

The method that is currently being used: We have a single at-jet repo located on Network A. A. Team A is happy every time the developers want to sync their changes with Network B, they make series with random repo from previous sync, give them to Team A, team A network introduces patch on A repo. Sometimes we change the bare with network copy of a repo from Network A to A, so that the developer changes on Network B can be dragged.

What is wrong with this method? 1. We have "up to date" repo on site A. Team B needs to apply on site A to make patches and sync their work. 2. We periodically transfer the whole repo between the sites, not the only difference (whenever we want to draw on site B) 3. The developers of Site B are not putting pressure on the bare repo (only make patch for Team A).

Thank you!

OK, for a clear solution, a GIT repository will be hosted online, which will push / This is the standard way you can bridge, you can also use Geethhub.


authentication - Servicestack add field UserAuth table and check on login -


Text after "

I want to add new area (s) to the UserAuth table (for example: Blocked, verified) and when I check Want to log in. How can I do this?

Finally I did not find anotherway solution for my project ...

1) SessionsFeaute in pairs plugins:

  this.Plugins.Add (New SessionFeature () {SessionExpiry = TimespanFrames Minutes (15)});  

2) Register ICacheClient:

  container.Register & lt; ICacheClient & gt; (New MemoryCacheClient ()); 3) Certified method:  
  Public Zero Certified (ISession session, user user) {session.Set ("UserInfo", user); }  

4) Logout method:. Set session.GetSessionBag () & lt; Users & gt; ("UserInfo", tap);

5) RequestFilter:

  public class UserInfoFilterAttribute: RequestFilterAttribute {public UserInfoFilterAttribute () {} Public UserInfoFilterAttribute (applyTo applyTo): Base (applyTo) {} Public override zero executed (IRequest request, IResponse race, Object RequestDto) {var user = req.GetSessionBag (). & Lt; Users & gt; ("User Information"); If (user == tap) {res.StatusCode = (int) HttpStatusCode.Unauthorized; Res.EndRequest (); 6} Finally using a filter for a restricted service.  
  [UserInfoFilterAttribute] Public class AccountInfoService: ServiceStack.Service {}   

/ pre>

Thanks anyway ... < / P>


Difference between static variable of C and of C++? -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 3 जवाब

सी में यह एक त्रुटि है

  int x = 5; स्थिर इंट y = x; // त्रुटि  

सी ++ में यह मान्य क्यों है?

  int x = 5; स्थिर इंट y = x; // वैध  

क्योंकि सी और सी ++ अलग-अलग भाषा हैं।

प्रोग्राम शुरू होने पर सी ++ में एक गतिशील प्रारंभिकता चरण होता है, जिसमें स्थिर परिवर्तकों को गैर-तुच्छ कंस्ट्रक्टर या गैर-निरंतर प्रारंभकर्ताओं के जरिए प्रारंभ किया जा सकता है सी, निरंतर अभिव्यक्ति के साथ प्रारंभिक रूप से स्थिर चर की आवश्यकता नहीं है।


python - OSError: libtest.so: undefined symbol: g_tree_new -


When I try to open Python (dlopen () in Python) I get an error like the above.

Some functions in libtest.so that use g_tree_new

g_tree_new has been defined libglib-2.0.so.0

I have LD_LIBRARY_PATH where is libglib-2.0.so.0 , but it does not help!

Thanks

Did you link while building in libthest? That is, you need -lglib-2.0 in your link command line.


ruby on rails 4 - Capybara::NotSupportedByDriverError on integration test with capybara-webkit -


I am trying to write an integration test using Capybara and capybara-webkit. I am trying to confirm a warning dialogue. The document for Capibra-WebKit is asked to set the Capybara.javascript_driver =: webkit , but I do not know how this capacitor will affect :: PageWriter, which I understand. Answer to accept_alert :

  def test_update_key Capybara.javascript_driver =: Go to webkit account_path account (: pending_count) click_link "edit_account_key" page.accept_alert "Did you edit it The account key? "Because of the error on this line, this code gives me the following error:  

CAPIBARA :: NotSupportedByDriverError exception: CAPABRA :: driver :: base # accept_model

I am currently using Rail (4.0.13), Capibar (2.4.4), CapBar-WebKit (1.4.1)

< Div c Lass = "post-text" itemprop = "text">

I do not know what to do capybara.javascript_driver =: webkit , but it did nothing for me. In the end I did my tests On the top of this, solve this issue by putting Capybara.current_driver =: webkit .

However, WebKit was still unable to accept the warning; I have just changed the driver Selenium for now, because without problems, I wanted to use webkit because it is headless and is reportedly fast, but I do not have so many tests yet, so this Speed ​​at point is not an issue. Will have to come again later.


ios - ZSSRichTextEditor style buttons are not working -


के बारे में ZSSRichTextEditor 0.5.2.1 (कोकाओपोड्स कार्यान्वयन)

का उपयोग करके, बोल्ड, इटैलिक के लिए मेरे पास बटन हैं , स्ट्राइकथ्रू, अंडरलाइन, ऑर्डर किए गए & amp; अनॉर्डर्ड सूचियां, और इंडेंट एंड amp; आउटडेंट। बोल्ड, इटैलिक, स्ट्रीकथ्रू, और अंडरलाइन बटन मेरे टेक्स्ट पर अपनी शैली लागू करते हैं, हालांकि बाकी बटन कुछ नहीं करते हैं कार्यात्मक बटन हमेशा कंसोल आउटपुट में एक संदेश प्रदर्शित करते हैं, लेकिन गैर-कार्यात्मक बटन नहीं होते हैं। मैंने गैर-कार्यात्मक बटनों के तरीकों के ब्रेकपॉइंट को सेट किया है, और उन ब्रेकपॉइंट को कभी भी हिट नहीं किया गया है

डेमो ऐप में कार्यात्मक बटन के लिए भी, वे सक्रिय (या ब्लू अगर निष्क्रिय) में काले रंग में प्रदर्शित होते हैं, लेकिन मेरे कार्यान्वयन में रंग बदलता नहीं है।

मेरा उपवर्गा ZSSRichTextEditor डेमो ऐप में काम करता है, लेकिन मेरे प्रोजेक्ट में नहीं:

  - (शून्य) दृश्यडिडलोड {[सुपर व्यूडिडलोड]; self.enabledToolbarItems = @ [ZSSRichTextEditorToolbarBold, ZSSRichTextEditorToolbarItalic, ZSSRichTextEditorToolbarUnderline, ZSSRichTextEditorToolbarStrikeThrough, ZSSRichTextEditorToolbarUnorderedList, ZSSRichTextEditorToolbarOrderedList, ZSSRichTextEditorToolbarIndent, ZSSRichTextEditorToolbarOutdent, ZSSRichTextEditorToolbarViewSource]; Self.placeholder = @ "संपादित करने के लिए यहां टैप करें"; }  

प्लेसहोल्डर पाठ दोनों डेमो और मेरे ऐप में गैर-कार्यात्मक है।

किसी भी इस पुस्तकालय, या इन मुद्दों के साथ कोई भाग्य है?

< ZSSRichTextEditor पुस्तकालय में एक बग प्रतीत होता है, जिससे उपकरण पट्टी के खेत को कभी-कभी कम चौड़ा होना चाहिए हो। इसे पैच करने के लिए, ZSSRichTextEditor.m में मैंने बदल दिया है:

  self.toolbar = [[Uitoolbar alloc] initWithFrame: CGRectZero]; Self.toolbar.autoresizingMask = UIViewAutoresizingFlexibleWidth;  

के साथ:

  self.toolbar = [[Uitoolbar alloc] initWithFrame: self.toolBarScroll.frame];  

यह टूलबार के क्षैतिज स्क्रॉलदृश्य (सेल्फ बॉलस्क्रोल) को पहले से ही आपके द्वारा उपयोग किए जाने वाले दृश्य की चौड़ाई पर सेट किया जा रहा है, अब टूलबार को उस स्क्रॉल वीव्यू की जगह भरने की इजाजत देता है। < / P>


bash - writing a loop in Unix that reads user input yes or no -


I am trying to write a program that will display the running processes and ask the user if they are each process My code is here to kill

  #! / Bin / bash ps pid tte time cmd 1681 points / 1 00:00:00 tcs 1690 points / 00 00:00 bash 1708 points / 1 00:00:00 script 1710 points / 00 00:00 ps Ps | While reading the line; Id = $ (echo $ line | cut-d '' -f1) name = $ (echo $ line | cut-d '' -f 4) echo 'process id:' $ id 'name:' $ name echo - N 'Do you want to kill this process? Yes / No: Read the word & lt; / Dev / tty if [$ word == 'yes']; So kill $ id  

I have two problems ... One is that when I do not write I get an error line 10 [no: command not found . Second, it is that when I specify the variable for the ID and name, it automatically reads the first row that I

  process id: name: cmd  

If your if is incorrect:

  If [" $ Word "=" yes "] ^^^^^^^^ - Note the space around the quotes around var.  

Additionally, [ does not use == for parity testing. This is just = is.


javascript - reveal.js - Remote control -


appear. In Jeth, Github says that using a third party script is a way to activate the remote control without using a touch device

this is:

 Reveal  (Dependencies: [// Remote presentation using your touch device. Js render {src: 'plugin / remotes / remotes .js', async: true}]});  

I have put that code but to use my phone, what I have to do to work for it does not come forward.

I know that there is a way to do this through Node.js, but my server does not support it.

I appreciate any help thank you.

It appears that appears. Js A general support from the side.

Take action from here for a solid example of how it should be done.


ruby on rails - How to save my many-to-many relationship? -


I am trying to create a form to protect a very complex relationship. The models are for the relationship below.

  class target & lt; ActiveRecord :: base is_to: goal_status belongs_to: goal_type has_many: users, via: user_goals has_many: user_goals has_many: parent_goals, CLASS_NAME: 'GoalDependency', foreign_key: PARENT_ID has_many: child_goals, CLASS_NAME: 'GoalDependency', foreign_key: child_id has_many: Through children,:: child_goals is_maya: parent, through: parent_goals validates_presence_of: goal_status_id ,: goal_type_id end class GoalDependency & lt; ActiveRecord :: base is_to: parent, CLASS_NAME: 'target', foreign_key: is_to 'PARENT_ID': child, CLASS_NAME: 'target', foreign_key: 'child_id' end  

There are many parents who can target, or there may be many children, or both of them have tried to save these relationships and try to use a multiple selection drop down to save the child_id / parent_id, but it does not look like Is because the target_department of the two areas are required The need occurs - ie Bal_aidi and Perent_aidi rail only one set if I child_ids'm saving a set list, but this is PARENT_ID set with the current target and do not visa versa.

I have tried to use accepts_nested_attributes, but I'm not really sure how I can select it with multiple drop-down down downs.

How to reach any direction or direction will be appreciated.

The example of my current look.

.row .col-md-6 = simple_form_for (gool) do | F | - If @target.rors.ei? #error_explanation h2 = "# {pluralize (@ goal.errors.count, 'Error')} is prohibited from being saved:" ul -@goal.errors.full_messages.each | Message | Li = message = f.input: description = f.input: goal_status_id, collection: @goal_statuses, value_method: id, label_method: name, as: selection = f.input: goal_type_id, archive: @goal_types, value_method: Id, Label_method: name, as :: select = f.input: user_ids, collection: @users, as :: select, label: 'assigned to', input_html: {class: 'selected-select', multiple: true}, selected: @ Goal.user_ids = f.input: child_ids, collection: @goals, as :: select, label: 'children's target', input_high: {class: 'selected-select', multiple: true}, selected: @first After examining I was thinking another way to do this, but I am not happy with it. I can divide the concept of dependence into the dependence of parents and dependence of a child and divide them into different models. Then the relationship can be handled differently. See the code below for the child's dependence.
  class target & lt; ActiveRecord :: Base is_to: goal_status is_to: goal_type has_many: users, through :: user_goals has_many: user_goals has_many: child_goals, class_name: 'GoalChildDependency' has_many: children, through :: child_goals validates_presence_of: goal_status_id ,: goal_type_id end class GoalChildDependency & lt; ActiveRecord :: Base is_to: target is_to: child, class_name: 'target', foreign_key :: child_id end  

I have read that rail can not deal with composite keys and mine The case seems to be a case where an overall key is understood.

Anyway, if anyone can know how to do their initial code, which will be great.

It may be that the single target with itself parent_id column referenced on it Models will be easy to get from where you can

has_many: child_goals, CLASS_NAME: 'target', foreign_key: PARENT_ID

belongs_to: parent_goal Additionally, if you need any kind of childhood model, you can get a single table succession model, in the target table column type < / Code> can add Cildagoal & lt; Follow the analog approach according to the target and above.


java - Counting numbers in a line -


मैं अपना गेम मैप पढ़ रहा हूं

  FileHandle file = Gdx.files.internal ( "डेटा /" + स्तर + ".txt"); स्ट्रिंगटोकनाइज़र टोकन = नया स्ट्रिंगटोकनाइज़र (file.readString ()); जबकि (tokens.hasMoreTokens ()) {स्ट्रिंग टाइप = टोकन.नएक्सटोकन (); If (type.equals ("कार")) {carLiist.add (नई कार (पूर्णांक। पीआरआईआईआईएनटी (टोकन। एनएक्सटीकन ()), पूर्णांक। पीआरआईआईआईएनटी (टोकन। एनएक्सटीकन ()), फ्लोट। पीआरएसएफ़्लॉट (टोकन। एनएक्सटीकन () ), फ्लोट। पर्सफ़्लोट (टोकन। नेक्सट टोकन ()))); }  

और यहां मेरी पाठ फ़ाइल है

  ब्लॉक 0 0 ब्लॉक 64 0 कार 1 5 9 5 कार 1 5 2 ब्लॉक 1 कार 7  

क्या जावा में प्रत्येक पंक्ति में संख्याओं को गिनने में संभव है? संपादित करें: स्ट्रिंगटोकनाइज़र का उपयोग करके मुझे पूरी लाइन कैसे प्राप्त करने की आवश्यकता है? यहां मैं क्या करने की कोशिश कर रहा हूं, लेकिन मुझे प्रत्येक पंक्ति में केवल पहला शब्द मिलता है

  जबकि (tokens.hasMoreTokens ()) {स्ट्रिंग टाइप = टोकन.नएक्सटोकन (); Println (प्रकार); यदि (type.equals ("ब्लॉक")) {//System.out.println(type); List.add (नया ईंट (पूर्णांक। पीआरआईआईएनटी (टोकन। एनएक्सटीकन ()), पूर्णांक। पीआरआईआईआईएनटी (टोकन। एनएक्सटीकन ())));  

हाँ है जावा यह जांचने के लिए एक विधि प्रदान करता है कि कोई वर्ण अंक है या नहीं। चरित्र की जांच करें और गिनती में वृद्धि करें यदि इसका अंक इस तरह से:

  int digitCount = 0; यदि (आईडिगिट (चरित्र टोकेचेक)) {डिजिटकाउंट ++; }  

विधि: बूलीयन isDigit (char ch)

देखें

wpf - Binding within a control template -


मेरे पास निम्न टेम्प्लेट परिभाषित है टेक्स्टब्लॉक PART_TextBlock सही ढंग से बांधता है यदि StackPanel के बाहर है लेकिन जब StackPanel के अंदर रखा जाता है तो मुझे एक बाध्यकारी त्रुटि मिलती है। स्टैकपैनेल डेटाकॉन्टेक्स्ट एक कनवर्टर के लिए बाध्य है और आवश्यकतानुसार स्टोरीबोर्ड (फ्लैशिंग टैब) को लागू कर रहा है मुझे पाठ की पृष्ठभूमि में चमकता के साथ टैब हेडर में प्रदर्शित करने के लिए टैब को फ्लैश करने और पाठ की भी आवश्यकता है।

  & lt; डैशबोर्ड: EditableTabHeaderControl.Template & gt; & Lt; ControlTemplate TargetType = "{x: प्रकार डैशबोर्ड: EditableTabHeaderControl}" & gt; & LT; ग्रिड & gt; & LT; Grid.RowDefinitions & gt; & Lt; RowDefinition ऊँचाई = "ऑटो" / & gt; & Lt; RowDefinition ऊँचाई = "ऑटो" / & gt; & LT; /Grid.RowDefinitions> & Lt; StackPanel DataContext = "{बाध्यकारी पथ =।, मोड = वनवे, कनवर्टर = {स्टैटिक रीसोर्स निर्भरता ऑब्जेक्ट टॉफ़िलेटर कॉन्करर}}" ग्रिड। रॉ = "1" पृष्ठभूमि = "पारदर्शी" & gt; & LT; StackPanel.Style & gt; & Lt; शैली TargetType = "{x: प्रकार स्टैकपैनेल}" & gt; & LT; Style.Triggers & gt; & Lt; डेटाट्रिगर बाइंडिंग = "{बाध्यकारी पथ = हैहेरेर}" मान = "सत्य" & gt; & LT; DataTrigger.EnterActions & gt; & Lt; आरंभस्टोरीबोर्ड नाम = "स्टार्टबलिंकिंग" & gt; & LT; स्टोरीबोर्ड & gt; & Lt; ColorAnimation स्टोरीबोर्ड। TargetProperty = "Background.Color" To = "Red" अवधि = "00: 00: 00.4" दोहराएं Beehavior = "Forever" AutoReverse = "True" / & gt; & Lt; / स्टोरीबोर्ड & gt; & Lt; / BeginStoryboard & gt; & LT; /DataTrigger.EnterActions> & Lt; / DataTrigger & gt; & Lt; डेटाट्रिगर बाध्यकारी = "{बाध्यकारी पथ = हैजर त्रुटि}" मान = "गलत" & gt; & LT; DataTrigger.EnterActions & gt; & Lt; निकासस्टोरीबोर्ड आरंभस्टोरीबोर्डनाम = "स्टार्टबलिंकिंग" / & gt; & LT; /DataTrigger.EnterActions> & Lt; / DataTrigger & gt; & LT; /Style.Triggers> & Lt; / शैली & gt; & LT; /StackPanel.Style> & Lt; टेक्स्टब्लॉक टेक्स्ट = "कार्यक्षेत्रएलिन्मेंट =" शीर्ष "& gt; & Lt; / TextBlock & gt; & Lt; टेक्स्ट बॉक्स एक्स: नाम = "PART_TabHeader" टेक्स्ट = "{बाध्यकारी पथ = शीर्षक, मोड = दोवा, डायग: प्रस्तुतिट्रेस स्त्रोत.ट्रैसलेवल = उच्च}" दृश्यता = "संक्षिप्त" & gt; & Lt; / पाठ बॉक्स & gt; & Lt; TextBlock x: नाम = "PART_TextBlock" टेक्स्ट = "{बाध्यकारी पथ = शीर्षक, मोड = दोवा, डायग: प्रस्तुतीकरण संसाधन सूत्रों। TresLevel = High}" & gt; & Lt; / TextBlock & gt; & Lt; / StackPanel & gt; & Lt;! - यदि TEXBOX / TEXTBLOCK को सही शीर्षक में रखा गया है - & gt; & Lt; / ग्रिड & gt; & LT; ControlTemplate.Triggers & gt; & Lt; ट्रिगर प्रॉपर्टी = "इस्नइडिट मोड" मान = "सत्य" & gt; & LT; Trigger.Setters & gt; & Lt; सेटर लक्ष्यनाम = "PART_TabHeader" संपत्ति = "दृश्यता" मान = "दृश्यमान" / & gt; & Lt; सेटर लक्ष्यनाम = "PART_TextBlock" संपत्ति = "दृश्यता" मान = "संक्षिप्त" / & gt; & LT; /Trigger.Setters> & Lt; / उत्प्रेरक & gt; & LT; /ControlTemplate.Triggers> & Lt; / ControlTemplate & gt; & Lt; / डैशबोर्ड: EditableTabHeaderControl.Template & gt; & Lt; / डैशबोर्ड: EditableTabHeaderControl & gt;  

मैंने अंततः बाध्यकारी अभिव्यक्ति का पता लगाया, निम्नलिखित कार्य किया

पाठ = "{बाध्यकारी डेटा कंटैक्सटेक। टाइटल, रिलेटिव सोरस = {रिलेटिव सर्स पूर्वज टाइप = डैशबोर्ड: एड्यूबलटीबहिडर कंट्रोल}}"


json - Is there a a way to change the default content-type to all Bottle's error responses at once? -


I am making a small REST API in the bottle.

I only react to JSON, and although I can use error decorator @error (status_code) for every HTTP status code, it outputs to JSON, I am not quite long and practical looks like.

Does anyone know better how to do this?

OK, so I think I have managed a way to do this, though I know No how memory / programmatically efficient:

  import bottle. Error (http_code) def json_error (error): bottle.response.default_content_type = "application / json" returns json.dumps (dict (error = error.status_code, message = error.status_line))  
< / Div>

apigility - git ignore doesn't work -


This may look like a noob question, but I could not find any solution for this. I have a qualifying project to be cloned from the original repository. I have removed the .git directory and placed the .gitignore file:

  nbproject ._ *. ~ Lock * .buildpath .DS_Store .idea .project .settings composer.lock vendor / public / vendor / config / development.confiff.ppp config / autoload / local.phip config / autoload / *. Local / PDF! Public / Seller / Readme MD data / cache / *! Data / Cash / GTT  

I then made "git init" in the root folder and my GIT repository was created. I made a "git add.gitignore" and made an initial commitment with it. I tried to create a "git add" But adding all my files to the staging area, I do not understand why the .puppet directory has been added to .gitignore and it is still added. I have given a shot for this solution which does not solve my problem

If the structure is :

  yourrepo / .git / gitignore yourfiles  

Then a git add. .gitignore .
If not, a git rm --cached - incorrect file will remove it from the index, and ignore it due to git status .gitignore .


java - JSON deserialize only with at least 2 parameters -


मैं टॉमी प्लस 1.7.1 के साथ Jettison के लिए एक रसीला सेवा एप्लिकेशन को लागू कर रहा हूं डिफ़ॉल्ट json प्रदाता के रूप में उनमें से प्रत्येक के लिए सीआरयूड की कार्यक्षमताओं को प्रदान करने के लिए मेरे प्रवेश वर्गों के लिए कई मुखौटा वर्ग हैं I नेटबीन द्वारा सेवा का मुखौटा उत्पन्न किया गया है।

यह POST विधि है:

  @POST सार्वजनिक शून्य बनाने (कोर्स इकाई) {super.create (इकाई); }  

इस पद्धति का उपयोग करते समय (डेटाबेस में एक नया उदाहरण बनाने के लिए) मुझे निम्न त्रुटि मिली:

  अनुरोध के लिए कोई संदेश शरीर रीडर नहीं मिला है कक्षा ऑब्जेक्ट, कंटेंट टाइप: एप्लिकेशन / जेसन  

कोशिश करने के कई घंटों के बाद, मुझे यह काम करने के लिए मिला: मुझे विधि में एक और पैरामीटर जोड़ना पड़ा, जैसे:

  @ POST सार्वजनिक शून्य बनाने (@ कॉन्टेक्ट प्रसंग UuriInfo, कोर्स इकाई) {super.create (इकाई); }  

मुझे समझ में नहीं आया कि मुझे इस संदर्भ पैरामीटर को क्यों जोड़ना था। मुझे संदर्भ चर की ज़रूरत नहीं है, इसलिए वास्तव में मैं इसे निकालना चाहूंगा ...

क्या किसी को इसका कारण पता है?

ठीक है, मुझे लगता है कि मुझे समाधान मिला:

मेरे सभी आराम सेवाओं को मुखौटा कक्षाओं के रूप में लागू किया गया है। अमूर्त मुखौटा (सभी सेवाओं के सुपर वर्ग) में कई तरीके हैं:

  सार्वजनिक शून्य बनाने (टी एंटिटी) {getEntityManager ()। जारी रहें (इकाई); } सार्वजनिक शून्य संपादन (टी एंटिटी) {getEntityManager ()। मर्ज (इकाई);}  

ये विधियों को मुखौटा वर्गों द्वारा उपयोग किया जाता है:

  सार्वजनिक शून्य बनाने (कोर्स इकाई) {super.create (इकाई); } सार्वजनिक शून्य संपादन (@पाथपरम ("आईडी") पूर्णांक आईडी, कोर्स इकाई) {super.edit (इकाई); }  

(बेहतर देखने के लिए मैंने यहां एनोटेशन को निकाल दिया है)

इन दोनों विधियों के बीच का अंतर है, कि संपादन विधि में दूसरा पैरामीटर "id" और इसलिए सुपर वर्ग के संपादन () विधि को ओवरराइड नहीं करता है। लेकिन बनाने () विधि में केवल एक पैरामीटर है जो सुपर क्लास विधि "create ()" के ओवरराइड का कारण बनता है। मुझे क्यों नहीं पता है, लेकिन सीएक्सएफ अब दो समापन बिंदु बना रहा है:

  डाक http: // स्थानीयहोस्ट: 8080 / वेबप्रोग / एपीआई / कोर्स / - & gt; शून्य बनाने (कोर्स) पोस्ट http: // स्थानीयहोस्ट: 8080 / वेबप्रोग / एपीआई / कोर्स / - & gt; शून्य बनाने (ऑब्जेक्ट)  

यह भी एक कारण है कि मैं इसे एक सेकोन पैरामीटर के साथ काम कर रहा हूं: create () विधि अब ओवरराइड नहीं हो रही है।

मैंने अब क्या किया, केवल सुपर वर्ग में विधि का नाम बदलकर, उन्हें मुखौटा वर्गों में ओवरराइड न करने के लिए।

वैसे: सभी सेवाओं की कक्षाएं नेटबीन जनरेटर द्वारा बनाई गई हैं ... शायद इसमें एक बग है


excel - How to graph a specified range with VBScript -


I have Excel Sheet with 5 columns in it. I want to use VBSPTech in graph data from only one column A, D and E

Currently, using the code given below, I add all 5 columns. Please advise in advance and thank you.

 . With Active Chart. Ends with Setsource Data (Source: = ObjsLSworkSheet.Range ("A: A" and Ultimate RAOFOA, "D: D" and Final RowOff D, "E: E & amp; LastRowOfE)  Try to use  Union   

 < Code> ActiveCart with.SetSourceData.The application (objXLSWorkSheet.Range ("A1: A" and the final rouffa), objXLSWorkSheet.Range ("D1: D" and "Landroff"), objXLSWorkSheet.Range ("E1: E "And LastRowOfE))  

ruby - How to print the output on the console? -


I'm trying to display the output of "curl" on the console when I execute it. It prints the declared statement in puts for all hostnames I've written down, which is according to the design.

  desc "check_app_version  ;" checks ap / dev / info page "def check_app_version (environment, project) check_anerirement (Environment) Machine = `knife node list`. Espresso machine.each dot Hostname | Checking the app-version for the "# {Hostname}" system ("curl-syilent-m5 # {hostname}: 8080 / dev / info | grep 'app \ | build'") End End  

But I do not see anything for the next line which instructs me to curl on my server.

Use backtick notation to return a string, then puts Return

  to `curl --silent -m5 # hostname}: 8080 / dev / info | Grep 'application \ | Build ' 

eclipse - Android Studio - Hotkey for navigating to xml declaration is instead navigating to R file -


Original title: What is hotkey, if any, to navigate to the layout file or value of the resource?

(This question really did not tell the issue in hand and as you can imagine, it attracted some clear answer. Ask for forgiveness, this is the first question I have posted. )

I am using Android Studio version 1.1.0 on the Mac.

Say I have a code like this:

  setContentView (R.layout layout_main); In Eclipse, I could just use ' command + click ' on the resource ID and navigate to the related XML file, then string, view, Or color declaration, however, doing so in Android studios is navigating to me in the R File, which is absolutely useless 

Do I have a different hotkey that I remember, or a different event / action, can I tie the existing hotkey, so that more work like eclipse will be done like this?

Edit

After a few replies - which were right according to the original question - and some experimentation (a new new project was created - I think To do this before stupidity), it seems that Android Studio should actually navigate to the exact line in XML where the view, string, or color resource is declared, like eclipse Although in my situation, it is a matter of some strange reason New is not.

It is only speculation, but I think that the culprit can be a combination of one or three things:

  1. The project I was working on - this recently Was migrated to an Android studio project from an Eclipse project. This is most likely because it continues to update issue 2 and 3.
  2. JDK version - When I created a new project, AS complained that my compiler was outdated (1.6 was running, which was upgraded to 1.7).
  3. Target SDK - The reason I was asked to upgrade to JDK.

CTRL + B should do this. Otherwise you can create your own shortcut.


Printing the enum string values (not keys) in D -


I print "F" not "Fahrenheit" in this code. How can I not print the enum value key?

Import std.stdio; Flat ("% s", temperature unit F) written in zero main () {temperature temperature unit: string {C = "Celsius", F = "Fahrenheit"}; }

Just enter in a string:

  Listflone ​​("% s", cast (string) temperature unit. F);  

Note that it is not required when specifying cast string:

  string s = TemperatureUnit.F; // just works  

This only comes into play here because the family of std.stdio.write * function, as well as std. Conv For , look at the exact type given on it and try to be an expert on it when printing the name is useful when it is the enum color (red, green, blue) . But this behavior is less useful when the value is also a printable string, casting tells the function that you want to be treated as a plain string rather than an element.


sql - Error php and mysql - unexpected T_IS_EQUAL -


कोड है:

  & lt; php require_once ('connection.php') ; // चेक $ यूज़रनेम और $ पासवर्ड / * अगर (रिक्त ($ _ POST ['उपयोगकर्ता नाम'])) {गूंजती "उपयोगकर्ता नाम / पासवर्ड खाली है!"; विवरण झूठा है; } अगर (खाली ($ _ POST ['पासवर्ड'])) {गूंज "पासवर्ड खाली है!"; विवरण झूठा है; } * / / $ उपयोगकर्ता नाम और $ पासवर्ड निर्धारित करें $ username = $ _ POST ['उपयोगकर्ता नाम']; $ पासवर्ड = md5 ($ _ पोस्ट [ 'पास']); // MySQL इंजेक्शन की रक्षा के लिए (MySQL इंजेक्शन के बारे में अधिक जानकारी) $ username1 = स्ट्रिपस्लैश ($ उपयोगकर्ता नाम); $ Password2 = स्ट्रिपस्लैश ($ पासवर्ड); $ Username3 = mysql_real_escape_string ($ उपयोगकर्ता नाम); $ Password4 = mysql_real_escape_string ($ पासवर्ड); $ Sql ​​= "SELECT * FROM $ वेबसाइट यूज़रनेम WHERE यूज़रनेम = '$ यूज़रनेम' और पासवर्ड = '$ पासवर्ड'"; $ परिणाम = mysql_query ($ एसक्यूएल); // यदि परिणाम $ यूज़रनेम और $ पासवर्ड से मेल खाता है, तो तालिका पंक्ति 1 पंक्ति होनी चाहिए (mysql_num_rows ($ परिणाम) == 1) {// पंक्तियों का अंक $ पंक्ति = mysql_fetch_assoc ($ परिणाम); अगर ($ पासवर्ड 4) == $ पंक्ति ['पासवर्ड'] {session_register ("उपयोगकर्ता नाम"); session_register ( "पासवर्ड"); गूंज "लॉगिन सफल"; वापस सच; } Else {गूंगो "गलत उपयोगकर्ता नाम या पासवर्ड"; विवरण झूठा है; }} Else {गूंगो "गलत उपयोगकर्ता नाम या पासवर्ड"; विवरण झूठा है; }? & Gt;  

त्रुटि कह रहती है:

पार्स त्रुटि: सिंटैक्स त्रुटि, अप्रत्याशित T_IS_EQUAL /home/u771046626/public_html/IP/check-user.php पर लाइन पर 36

मैंने एक नज़र लिया है, और मेरी गलती नहीं पाई है इसलिए मुझे उम्मीद है कि यहां पर लोग यहां कर सकते हैं।

यह परिस्थितियों के आस-पास पैरों है ...

बदलें

  यदि ($ password4) == $ पंक्ति ['पासवर्ड']  

से

  अगर ($ password4 == $ पंक्ति ['पासवर्ड'])  

multithreading - Java Thread never receiving notify -


I am trying to create a simple Java thread application, where one thread waits, and another 3 seconds After awake. However, I can not seem to work for it and I still do not know.

  Expand the public class deadlock thread {Object lock = new object (); Public Static Zero Main (string [] algies) {// Vetra Thread Deadlock Hawker = New Deadlock () {@ Override Public Wired Run ({{System.out.println ("Better Start"); Synchronize (lock) {try {System.out.println ("Waiting to inform the battery ..."); Lock.wait (); System.out.println ("Pick!"); } Grip (Interrupted e) e.printStackTrace (); }}} // Run ()}; // Wakre Thread Deadlock waker = New Deadlock () {@ Override Public Wide Run ({{System.out.println ("Walker Start"); Synchronize (lock) {System.out.println ("Waker sleep for 3 seconds."); Try {Thread.sleep (3000); } Grip (Interrupted E) {} System.out.println ("Waker Notification ..."); Lock.notifyAll (); }} // Run}; Waiter.start (); Waker.start (); }  

}

The output I get is:

Waiter started - Batler will wait to inform ... < Start Waker - Waker sleep for 3 seconds.
Waker notified ...

... and is going on forever. I expect the waiter thread to wake me up and to end the program.

Thank you

Your main problem is that 'lock' is a class instance property , So two deadlock instances do not share the same 'lock'. Therefore, there is no effect on the caller (at all) in the call to inform because it is waiting on a different object. The easiest solution is to make 'Lock' stable:

Fixed object lock = new object ();

... I also make it private and last for good measure.

The second issue is that by starting two threads together you do not really guarantee that the waiter will run first - I will add a short delay before starting waker.


How to use multiple $timeout.flush() and $httpBackend.flush() calls in a Jasmine spec for AngularJS (with PhantomJS) without getting $digest error -


I am trying to write a unit test for the Angarius Association with the subject and Jasmine using the PhantomJes browser is. The service that I want to test uses nested promises (to read an indexed database, to get an answer from the server and to write the response back into the database).

This should be done while writing in the database (write local db, put post / server, update local db with server id) Testing except for tests to handle the connection loss to the server I am writing all the work.

When this happens, then the sync () method sets the online status incorrectly and creates $ timeout which repeatedly checks for a connection by making a recursive call if the connection comes again , All unaccented data will be synchronized (and the promise of the corresponding sync () call will be resolved).

  Description ('Hermaged', function () {var ... // setting all 'global' variable [...] Function () {// know that the service sends a ping so that it can check that online again pingGet = backend ('GET', 'http: // localhost: 2403'); pinggate. (0); testTablePut121 = Backend.when ('PUT', 'http: // localhost: 2403 / test_table / 121'); testTablePut121. (Function (method, url, data, header) {...} // 200 [...]} [...] Returns (should try to sync the saved element, but because of missing server's Which should fail from connectivity ', function () {var list; var timeoutCounter = 0; _checkOnline = harmonized._checkOnline; // harmonized is a service that should be tested. _checkOnline = function () {// only the original function Call twice if (timeout counter ++ & lt; 2) {_checkOnline (); // $ timeout and $ httpBackend timeout. Flush (2000) flush; backend.flush (1); // Progress causes error due to digest in console.log ('after tick'); }}; All.getList () Then (function (entries) {list = entries; testTablePut121. (0); pingGet = backend.expect ('GET', 'http: // localhost: 2403'); pingGet.sund (0), but detective (list [ 0], 'sync') and. CallThrough (); [0]. Saving (). Then (// resolution called when the server call was successful (task) (expect) [synchronize [0]. .toBeTruthy (); Hopefully (List [0] .sync.calls.count ()). ToBe (2); console.log ('done');}, // is rejected when any other than server 0 Other error (which is not the case in this test space) feedback, // indicate that B is the local DB save function () (Hopefully (list [0] .sync.calls.count ()) .toBe (1); Hopefully (list [0] ._ synchronize) .toBeFalsy ();}); Backend.flush (1);}); Backend.flush (1); });  

When the backend.flush () function is asked to flush the HTTP request made in the second time (save) function, I get an error that the $ digest before Except for the line, do not flush the request (and this also causes an error).

Is there any way to flush everything at the right time without getting $ digest error?


c# - Multiple queries on same connection using same T-SQL variables -


I am trying to create something similar to SQL Server Management Studio

I run multiple queries in the same tab in the same tab in the SSMS, though each with SqlCommand with the same SqlConnection Is executed so they can not see, for example: if you run two questions:

  DECLARE @ted varchar (100) = 'Ted A'; Each other  DECLARE  's 

example: Select [query 1] came in the form of; Ended in

and other

  SELECT {query2];  

If you want to run both of these, in a separate SSMS tab, you should get two correct results, one of each query.

Although I have a problem if I have a SqlConnection and I create two SqlCommand objects then they are @ted Does not appear even if they have the same connection.

How can I create a connection to a SQL Server database so that it behaves like an SSMS tab, after which each question is in the same area, and so I @variables all questions?

Note: Similar behavior of SSMS can also be found in the SQLCMD utility.

EDIT: I have realized what I said, it is not how SSMS works, it is really impossible you should be able to use the #tables etc. from the same connection, But do not have @variables

itemprop = "text">

You should think about it in a single query window in SSMS, almost a single SQLCommand Equivalent to and a single example equals approximately one SqlConnection of SSMS. In the TSQL variable, the batch scope is not the scope of the connection

A SQL command performs a batch of TSQL, possibly with many executable statements. You can put both of your questions in a single order.

Now, if you want multiple values ​​from your values ​​for returns , then you will use the NextResult method of SqlDataReader to transfer it to the next result of the next statement group. Process the results of each statement, then use NextResult to interact through the results set.

simple example

  queryText = "declare @tetvarchar (100) = 'ted a' SELECT @ted - or by using some other query @ted; select @ Bet - or yet another query has been used; command = new SQL command (query text); reader = command.ExecuteReader (); Do {// result set handling code goes here {// record level handling code Here reads} while reader. Read (); // more result set handling code goes here} while reader.extResult ();  

hopefully That it helps


emacs - move buffer to next subtree in org-mode when narrowed - C-x n s -


Is there a way to go to the next / previous title, at the same level when (CC CF / B) when the buffer is compressed Is done subtitle (cx ns)?

Say I have the following framework

  * first ** item a ** item b * second ** item a2 ** item b2  

and got me the * first and narrowed with Cx ns , now I only see:

  * First ** Item A ** Item B  

If I try CC CF / B with next / previous title Am i can't I would like to be able to move forward between sub-clauses in one joint (compressed) three. How can I do this?


java - Removal of override, not able to view fragment b -


I am going through this "Beginning Android Development" book. I go to the pieces section and I follow the code as show, but my compiler gives me an error MainActivity.java package com.example.fragmentsdemo;

  import android.app.activity; Importroid.os.Bundle; Import android.view.LayoutInflater; Import android.view.View; Import android.view.ViewGroup; Public class MainActivity activity {@Override public view onCreateView (LayoutInflater inflater, ViewGroup container, bundle saveInstanceState) {views = extends inflater.inflate (R.layout.my_frag, null, false); Return view; }}  

The error starts with "public view" and states "method ... main type of main activity. Java has to override or implement a super type method

To complete two XML files, below ...

  activity_main.xml & lt; RelativeLayout xmlns: Android = "http://schemas.android.com/ apk / res / android "xmlns: device =" http://schemas.android.com/tools "Android: layout_width =" match_parent "Android: layout_height =" match_parent "equipment manual =" MainActivity. "& gt; & lt ; Piece Android: id = "@ + id / fragment1 "Android: name =" ComkexamplekfragmentsdemokMyFragment "Android: Layout_width =" Wrap_content "Android: Layout_height =" Wrap_content "Android: layout_alignParentTop =" true "Android: layout_centerHorizontal =" true @ "Equipment: layout =" layout / My_frag "/> & lt; / relativeLayout & gt; my_frag.xml & lt; xml version =? 1.0 "encoding =" utf-8 "& gt; & lt; LinearLayout xmlns: android =" http://schemas.android.com/ Apk / res / android "android: layout_widt H =" match_parent "Android: layout_height =" match_parent "android: orientation =" vertical "& gt; & LT; TextView android: id =" @ + id / textView1 "Android: Layout_width =" Wrap_content "Android: Layout_height =" Wrap_content "android: text ="! Hello world with piece "Android: Text Appointment ="? Android: ATR / text Ahaparens Large "/ & gt; & Lt; / LinearLayout & gt;  

Now, when I'll have to override @'ll get, but I" Hello World Slice "does not appear! Are you present there? Any suggestions?

method OnCreateView accepts the following parameters in its original class:

  • see , string , context , AttributeSet
  • str , reference , AttributeSet

It looks like you have your activity_main.xml , Need to extend activity

instead of slice piece block, piece name your piece < / Code> must be the name of the class.


generics - In depth description of statically resolved type parameters -


I'm constantly looking for a very detailed review of the sort of sort parameters. What can be done with them, what are their limitations, the impact of using them, how they combine with the common type of parameters, and example-level inline members work.

The specification only offers very little on this subject, mentioning only in passing them, it is such a type of parameters (like type example ) Does not say anything about the ability to be type, how the keyword and and or complex members can be used when specifying the barriers, how much Members are in accordance with the signature barrier sign, and further.

I have actually only found introductory material and some very specific information, nothing as a detailed overview.


matlab - Error updating Text -


that I am using MATLAB to plot the waves of various earthquakes and a correlation coefficient between the waves . I am using the 2014 B edition. Initially when I ran the code, there was no error. However, this error has now started popping up.

The alert is as follows:

  Warning: Error updating text. The error of the following series of reasons: the string must be valid interpreter syntax: Master Event Waveform: Twaveforms \ 15 AAC3 SN Warning range of causes of error in updating the text is as follows: Must be a valid interpreter syntax string: Secondary Event wave: Twaveforms \ 15 AAC3 SE  

AAC3 is one of my 4 stations and SE is a step

I used the command:

  heading P1 = ['Secondary Event Wave:', '', Secondfile (57:70), '', Secondesta, '', Fiestype] ;   

I tried after the word ' after the word ' side ' but failed every time. Is there any good suggestion for someone to help fix this error?

This error is very apparent in the seconds file in the string contained in a \ . In the plots the title can explain latex syntax and you can prepaid a \ before the latex command. What is happening here is that it is trying to define the command \ 15 , which is an undefined latex command.

In this way, you should not include either the \ character, or if you really want secondfile , then second < / Strong> Add \ so that it means the form of a \ character while displaying the title (i.e. \\ ).

I believe that you want the latter option, so that you can try to add an additional \ for your title to something like this.

Get the string from the% x seconds file = secondsfile (57:70); Use regexprep to change any of the% // characters in which \ to \\ s = regexprep (s, '\\', '\\\\'); Use% // changed string and title title P1 = ['Secondary Event Wave:', '', S, '', Secondesta, '', Phagetepe];

c# - How to get a list of the connected vault workgroup users -


I have searched for all and I can not find the answer I needed. So all help is appreciated.

In the Volt workgroup from Autodesk, there are divided licenses on users who use the Walt workgroup. But when all licenses are used, it is difficult to know which is still logged in, it does not use the safe in that moment.

Then to solve this problem I got a code that shows a program that gives me a list of connected users yet to show me all the users from the Voltage workgroup, but This information is useless because I have all user accounts. I just need the currently connected users

I have found the code so far:

  public partial class MainWindow:. Window {Public MainWindow () {InitializeComponent (); } Private Zero PrintUsers (Object Sender, RoutedEventArgs e) {MyVault.AdminSample.PrintUserInfo (); }} Class MyVaultServiceManager: System.IDisposable {// We will implement WebServiceManager here. // WebServiceManager will be used for our Vault server calls Private WebServicesNapper _svcManager = null; {WebmasterGenerator Services {Receive} {return _svcManager; }} Public Enum mode {readOnly, ReadWrite}; // Preventing the use of the default constructor - made it Private Private MyValtsmanManager () {} // Constructor. // Parameters: - Login to read only, which does not consume / use a license // ========================= ======================================== Public MyVaultServiceManager (Mode i_ReadWriteMode) {Login for UserPasswordCredentials = New UserPasswordCredentials ("Local Host", "Walt", "Admin", "", (i_ReadWriteMode == Mode.ReadOnly)); // Yes, we must not hardcode the credentials here, // but this is just a sample _ s vcmnager = new webserver manager (login); } Zero system IDisposable.Dispose () {_svcManager.Dispose (); }} Category AdminSample {// All users are listed with their roles and vaults in which // has access // //===================== ========================================== public static void PrintUserInfo (try {try} Using {{MyVaultServiceManager MGR} = New MyVaultServiceManager (MyVaultServiceManager.Mode.ReadOnly)) // GetAllUsers method provides all users Info // ------------------ ----------------------------- -------------------------------------------------------------------- [User] = MGR.Services AdminServices.getAllwers (); TextWriter tmp = console.aut; Flamestream filestream = new filestream ("vault_ours.txt", fliemmod.creative); Var Streamline = New Streamer (Filmstream); Streamwriter.AutoFlush = true; Console.SetOut (StreamWriter); Forrest (user user in user) {User Infoda user Inc. = MGR Services. Admin service. GetUseer InfoBUUSIR ID (user.id); Console.WriteLine (user.Name); If (userInfo.Roles! = Null & amp; User Info.Roles.Length & gt; 0) {Console.WriteLine ("roles:"); Novel (role role in userInfo.Roles) {Console.WriteLine ("id:" + role.Id + "| Name:" + role.Name); }} If (userInfo.Vaults = Null & amp; userInfo.Vaults.Length & gt; 0!) {Console.WriteLine ("Vaults:"); Foreign Language (Knowledge Vilto Walt In User Info.) {Console. Videoline ("id:" + vault.Id + "| Name:" + vault.Name); }} Console. "Line" (""); } Console .SetAut (TMP); Streamwriter.Close (); Filestream.Close (); MessageBox.Show ("complete!", "Complete!"); } // use} hold (System.Exception e) {MessageBox.Show (e.Message); }} // printUserInfo ()}  

This time there is no way to do this is not. But there are programs that read AVFSlog files from the server, and filter the connected users.


knockout.js - How to get binded observable content inside a click function of a button? -


Well I was facing a difficult case here but to simplify things for everyone's understanding Let me explain your scenario.

I have a button with the related bindings, with two buttons like text: name1 and text: name2 click binding.

ViewModel:

  var viewModel = function () {var self = this; Self.arr = ko.observableArray ([1]); Self.name1 = ko.observable ("click1"); Self.name2 = ko.observable ("click2"); Self.clickme = function () {console.log (this) // this.name1 ('yoo') should be dynamic based on this.name1 or name2 btn click // clicked button}} ko.applyBindings (new viewmodel ());  

When a button is clicked, I have no way to get the clicked button text binded viewable inside the click function i.e. name1 inside my function if clicked by button1

I tried $ element , the value of the VM as the $ context parameter Passing it to function does not resolve it.

Demo Bella

Any help or ideas on this would be good. Simply pass them in the

function.

  & lt; Div data-bind = "foreach: arr" & gt; & Lt; Button data-bind = "text: $ root.Nname1, click: function () {$ root.clickme ($ root.name1)}" & gt; & Lt; / Button & gt; & Lt; Button data-bind = "text: $ root.Nname2, click: function () {$ root.clickme ($ root.name2)}" & gt; & Lt; / Button & gt; & Lt; / Div & gt;  

Then handle them in your visual model like this:

  self.clickme = function (val) {warning (val ()); }  

here is a


java - Why am I not seeing all of my in-app product details when doing an inventory check? -


I have seen similar posts on the type of problem, but it is where different My problem lies .. < / p>

I'm posted on the alpha channel your Apike, I investigated and I send all while your inventory Czech (see below) 6 in-app products.

  Public Zero getProductDetails () {If (mHelper == zero ||! StoreSetup) Return; ArrayList & LT; String & gt; SkuList = New Arrestist & lt; & Gt; (); & Lt; Issue & gt; IssueList = OrmLiteIssueDAO.getInstance (). GetAllIssues (wrong); (Issue issue: Issue list) {If (! Issue! ISFRIIUUU) & amp; Issues BBIID ()! = Null & amp;! Issue ITBILLING ID (). IT () & amp; Amp;! Issue ITiblingID () .equals ("null") {skuList.add (issue.getBillingId ()); }} List & lt; Membership & gt; Membership list = OrmLite SubscriptionDo.getInstance (). GetAll Subscriptions (); (Membership: Membership list) {if (subscription.getSubscriptionSku ()! = Null & amp; amp ;! Subscription.get Sdasytaankuki (). IsEmpty () & amp ;! equal membership Sdasytaansuku .get (). ( "Null" )) {SkuList.add (subscription.getSubscriptionSku ()); }} If (skuList.size () & gt; 0) {mHelper.queryInventoryAynync (really, skuList, mGotInventoryListener); } SkuList.clear (); IssueList.clear (); SubscriptionsList.clear (); }  

The problem is that I am only getting 3 products back, I bought 3 products.

I do not point the in-app was designed products and active 6 / 3/2015, it is now 10 days later, so this promotion and I could buy all 6 products in your app.

I can not find any details for those products that have not been purchased. / P>

Anyone have any ideas? In

Edit:

Inventory listener looks like:

  IabHelper.QueryInventoryFinishedListener mGotInventoryListener = new IabHelper .infoInventoryFinishedListener () {public void onQueryInventoryFinished (IabResult Results , Inventory inventory) {if (mHelper == null ||! StoreSetup) return; If (result. Failure ()) {return; } If (inventory! = Null) {list & lt; Points & gt; Issues = OrmLiteIssueDAO.getInstance (). GetAllIssues (wrong); (Issue Issue: Issues) {SkuDetails issueDetails = inventory.getSkuDetails (issue.getBillingId ()); If (issue details! = Null) {issue.setIssuePrice (issueDetails.getPrice ()); } OrmLiteIssueDAO.getInstance (). SaveIssueToDB (issue); } List & lt; Membership & gt; Membership list = OrmLite SubscriptionDo.getInstance (). GetAll Subscriptions (); (Membership membership: membership list) {SkuDetails subDetails = inventory.getSkuDetails (subscription.getSubscriptionSku ()) for; If (Sub details! = Null) {subscription.setSubscriptionPrice (subDetails.getPrice ()); } OrmLiteSubscriptionDAO.getInstance (). Saving membership membership (membership); } Issues.clear (); SubscriptionsList.clear (); }}};  


python - Loop and validation in number guessing game -


I have studied Visual Basic for the first application and slowly this week is happening with the dragon for speed That I am a new programmer, please stand with me I understand most of the concepts so far that I have faced, but am currently on a brick wall.

I have written some tasks that help me codify the game by guessing a number. User enters 4 digit number If it matches the programs generated by one (I have already coded it) then Y is added to the output list. If not, then an N.

Example I enter 4567, the number is 4568. The output printed from the list is YYYN.

  Import Random Diff A (): Points = Random. NumList = list (): numlist def x (): output = [] number = for numeric value (0, 9) return digit DEF (B): for counters in number (0,4) Input ("Please enter the first 4 digit number:") number2 = (I) in the range (0, lane (number)): If the number [i] == number 2 [i]: results.append ("Y") Second: results.append ("N") print (output) x ()  

I've coded all this but there are some things in it that cause it to be deficient:

< Ol>
  • I do not know how I can loop it So that I can ask it again. I just want to be able to guess that person 5 times, I'm imagining some type of loop with a counter like "1-5 counter, when I reach 5", but how unsure is it Program.

  • I have coded a standalone verification code snippet but I do not know how I can integrate it into a loop, for example if someone enters 444A So it should be said that this is not a valid entry and let them try again. I made an effort under it.

      while myNumber.isnumeric () == correct and lane (myNumber) == 4: for category (0, 4)): if myNumber [I] == progsNumber [i]: OutputList.append ("Y") and: outputList.append ("N")  
  • Trying to do some good effort, but it Everyone is struggling to patches together. Is anyone able to show me some direction to make me work together? I hope I've coded these basic elements that can help you to help!

    To answer your two questions:

    1. Loops, fortunately, are easy to do five times the loop on some code, you can set up tries = 5 , then try & gt; 0: and a attempts anywhere inside the loop - = 1 .

      If you want to get out of the loop before time (when the user answered correctly), you can simply use the break keyword for "brake" from the loop If you want, you can also do this, set tries = 0 , this loop does not release quickly.

    2. You probably want a if inside your loop (with the same statement the time you tried to loop) only check Make sure that the input is valid and otherwise continue to stop the current running of your loop and continue on to the next one (restart time).

    In the code:

      answer = [I try (4)] in the random (0, 9) category = 5 tries, while & gt; 0: number = input ("Please enter the first 4 digit number:") if the number is not. Numeric () or no lane (number) == lane (answer): print ('invalid input!') Continue = '' for I (in range (north)): outside + = 'y' if int [I]) == Answer [i] Other 'N' outside == 'Y' * Lane (Answer): Print ('Good job!') Print Print (out) Other: Print ('O, you fail' )  

    I still try to else added after some time to reach the zero to catch the failure (or maybe View)


    adobe brackets - Keyboard shortcut select the clicked word -


    In Brackets, it is possible to assign a keyboard shortcut to CTRL + LMB, where the clicked word is selected , As does Visual Studio? I can not find anything in the document.

    Click behavior will need to be overridden, but many built-in equivalents that can be good for you :

    1. Press Ctrl-B to select the cursor word (you can easily do but it needs to be triggered by the keyboard
    2. Selecting the word
    3. Add "Hidemates" to your: to highlight {{showToken: true} Div> any If you put your cursor on all the events of the event (no need to choose it)

    greatest n per group needed in compound Mysql join sql -


    After

    I am going to join 3 tables with this query

      DISTINCT a.number, Select c. Quantity, include `c.retail_price catalog.product_variation from catalog.product a.`` b` on a.id = b.product_id catalog.price_regular` join c` at b.id = c.product_variation_id where between 5 and 6 C.retail_price and a.number by a.status_id = 1 command, c.retail_price DESC  

    and I get this result set

      number | Volume | Retail_price - ------------------- 1007 | 288 | 5.750 1007 | 48 | 5.510 1007 | 576 | 5.460 1007 | 96 | 5.240 1007 | 576 | 5.230 1007 | 144 | 5.120 1006 | 200 | 5.760 1006 | 100 | 5.550 1006 | 200 | 5.040 1006 | 500 5.010  

    What do I need only to be the most spectacular retail_price quantity column and the highest value is also in line with / Code>. So my result set looks like this

      number | Volume | Retail_pris --------------------- 1006 | 500 5.010 1007 | 576 | 5.460  

    I have received some posts but no one was helpful in joining more than one of the tables.

    This is a simple group query

    p >
      select a.number, in the form of maximum quantity (c.quantity), include `A` catalog.product_variation from the maximum catalog.product` as the cost (c.retail_price) b` Include a.id = b .product_id catalog.price_regular at `c` b.id = c.product_variation_id where between 5 and 6 and a.number a.status_id = 1 group between c.retail_price;  

    ruby - Run gem from local source code -


    I am currently working on developing a gem and I want to run that gem from the command line and point it out My local source wants to be enabled before I specified this path in the gem file and in the rail but now I would like to run the gem on a non-rail app. So I would like to know how to call the gem from the command line and specify that I want to use the source code in a specific directory. For example, I can CD in the directory that I want to run it but do something like: ruby ​​my_gem - path = ~ / code / mygem

    Apart from this, do I have to make them gem or can I run it without the source of construction?

    From your gem's root directory, try it lib / MyGem.rb :

      Ruby - Eliib Lib / Meiji. RB  

    or test your gem interactive:

      irb-ilib> 'Mygem' true  
    is required

    php - Redirect after front end deleting post -


    I created a post to delete a post on front end for a Wordpress site, this deletes the post properly, but then again the post Tries to load with which 404 is generated. Do I redirect it after a specific URL is deleted? This is my code:

      function wp_delete_post_link ($ link = 'delete it', $$ = '', $ after = '') {global $ post; $ Link = "& lt; a href = '" Wp_nonce_url (get_bloginfo (' url '). "/wp-admin/post.php?action=delete&amp;post=". $ Post-> ID, Delete-post_ '. $ Post- & gt; ID). "'& Gt;" $ Link "& lt; / a & gt;" After $ $ per first $ link per dollar; Then  

    ; '); ? & Gt;

    I think you're looking for the wp_redirect function Are there.

    $ location = 'http://domainname.com/pagename/'; $ Position = '301'; Wp_redirect ($ location, $ position); Go out;

    Just keep it after your successful delete code.


    Rails upgrade from 3 to 4 broke the flash messages on redirect -


    <4> After any upgrade from Rail 3 to 4 Rail, any Flash message does not work after redirection.

    Here are some examples of redirects. Notice: "Your account has been updated"}) redirect_to (root_path, notice: "Your account has been deactivated"

    Has been. ") User_account_path (Anchor:" Network ") Redirect, Note:" Your primary network has been changed. "

    Any problem that could have caused the problem?

    View / layout / app here. Hmm

      - unless Flash.empty? - Flash.Each | Name, msg - Until the next: [Warning, error :, notice]. Include? (Name)% p.flash_message {id: name} = msg  

    By the way, without any redirect flash works fine. So, I know that the problem is not with the scene.


    linux - Ubuntu: How PHP can read Environment Variable -


    I am running on Ubuntu Server 14.04.

    I have a PHP file that is required to be read

    If you Run a PHP file on the Ubuntu server (like test.php) and you need to read and use an environment variable, you need to do the following:

    1. edit Bashrc file (if you run bash as a shell)

        # Export to the following: Export DB_NAME = "My database name "  Important   Do not forget the word export ! 

    2. Save the file and exit.

    3. Click on the following command:

        source ~ / .bashrc  
    4. Check that the Environment variable is valid

        $ DB_NAME echo  

      should print it:

        My database Name  
    5. Edit your PHP file:

      & lt ;? Php $ db = getenv ('DB_NAME'); // Name of database resonance "database name: $ db \ r \ n"? & Gt;
    6. Run the PHP file

        php test.php  

      should print it

        Database Name: My Database Name  

    jquery - not able to crop a link and ending it with three dots -


    I am trying to create a link to crop in my web page. After the link crop (it has some text after all), I want the link ends with three dots ( ... ).

    Below is my code, can you please tell me where the problem is

      .text-no-overflow {white-space: nowrap; Hidden flurry; Text-overflow: oval; Border: Solid 2px blue; }  
      & lt; Link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com /bootstrap/3.3.2/css/bootstrap.min.css"> & Lt; Script src = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js" & gt; & Lt; / Script & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "col-xs-4 text-no-overflow" & gt; & Lt; H3 class = "media-title" & gt; & Lt; A href = "#" & gt; It's too long, it's too long, it's too long, it's too long It's too long It's too long It's too long Long time it's too long & lt; / A & gt; & Lt; / H3 & gt; & Lt; / Div & gt; & Lt; Div class = "col-xs-4" & gt; & Lt; H3 class = "media-title" & gt; & Lt; A href = "#" & gt; It's too long, it's too long, it's too long, it's too long, it's too long, it's too long, it's too long, it's too long & lt; / A & gt; & Lt; / H3 & gt; & Lt; / Div & gt; & Lt; / Div & gt;  


    ios - Converting latitude/longitude doubles into MKMapItems for obtaining directions -


    I'm working on core data project and I searched MKMapItems not encoder < / code> I am obedient, so I'm MKMapItem s alignment as Dulles core data and find them again later to make directions to the destination.

    I had found out about how to generate the instructions to answer the posts below, but I do not know my Latitude & amp; Underlined Double in a MKMapItem . Can such a thing be done?

    @ Holeks a correct direction core data to tell me solution MKMapItem the latitude / longitude can be accomplished by the following code to change the coordinates:

      MKPlacemark * placemark = [[MKPlacemark alloc] initWithCoordinate: CLLocationCoordinate2DMake ([self.destinationLatitude doubleValue], [Self.destinationLongitude DoubleValue]) addressDictionary: zero]; MKMapItem * Destination = [[Mkmatmatum alloc] initWithPlacemark: placemark]; [MapItem setName: @ "The name of your location"];  

    javascript - Export list to excel using jquery -


    I am trying to export a dynamic list for the excel / notepad / notepad ++ / word. I looked at ways to ax the table, but it does not solve my problem. My list includes many lists (variable) and the value I want to export is the value of input from type text (value_to_export) How can I export the prices of all these lists? Thank you

    & lt; Ul & gt; & Lt; Li id = "0" square = "list" & gt; & Lt; Input type = "checkbox" class = "" id = "" value = "" & gt; & Lt; Input type = "text" id = "" title = "" class = "" value = "value_to_export" & gt; & Lt; / Li & gt; & Lt; / Ul & gt; Instead of li you can use the HTML table:

    .

    table2excel is a simple yet useful jQuery plugin which allows to export HTML table data into an Excel file.

      & lt; Script src = "//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "src / jquery.table2excel.js" & gt; & Lt; / Script & gt;  

    1. Create an 'Export' button to manually export table data to Excel file . Alternative.

      & lt; Button & gt; Export & lt; / Button & gt;  

    1. Call the plugin and it is done on the table.

      $ (" button ") (function () {$ (" # table2excel "). Table2excel ({// exclude the outgoing CSS class : ".noExl", name: "Excel document name"})}}  

  • You can add the CSS class 'noExl' to any trot tag, while ignoring specified table data.Lang = " JS "data-hide =" h TH ">
      & lt; tr class =" noExl "> & lt; th & Lt; / l & gt; & lt; th & gt; column header & lt; / th & gt; & lt; th & gt; column header & lt; / th & gt; & lt; th & Gt; column header & lt; / th> & lt; / tr & gt;  

  • jquery - What is the proper way to load JavaScript scripts in Atom Shell? -


    This is probably a completely stupid question but I have started working with the Atom shell.

    I have a index.html with a login code. I encourage jquery form validation in the document drawn in this way:

      $ (function () {$ ('# login-form') . ();});  

    This script loads before the body is finished:

      & lt; Script src = "global /js/dom-bootstrap.js"></script>  

    When I run the page with Atom shell, the form appears properly and verification works partially. This form does not submit, but it does not show any recognition then when I submit a form once on the same page (eg, reload the page) everything works well!

    Also includes tab.js of bootstrap, firstly it does not work, but it works just fine after reloading a page.

    What am I doing wrong?

    This is my main.js (based on the example of Atom shell from Gitb):

      Requires Var app = ('app'); // Modules Var BrowserWindow = Required to control application life ('browser-window'); To create the original browser window // module // report crashes on our server ('crash reporter') is required to start () .; // Keep a global context of the window object, if you do not, the window will automatically be closed when the Java / JavaScript object is GCII. Var mainWindow = null; // All windows close / close app.on ('window-all-closed', function () (if (process.platform! = 'Darwin') app.quit ();}); // This method Will be called when the atom-shell has started everything and is ready to create a browser window. App.on ('ready', function () {// Create a browser window. MainWindow = New browser window ({icon: ' Global / images / logo.png ', transparent: true, frame: wrong, "minimum-width": 520, "minimum-height": 850, fullscreen: true, resize: true, "usage-content-size": true }) ; Main window.webcontract.on (load 'index', 'function'), and load index.html of app.MainWindow.loadUrl ('file: //' + __dirname + '/ Index.html '); // emitted on window closure.MainWindow.on (' off ', function () {// window object, normally you will store windows // in the array if your app is multi window , It is the time when you should delete the same element. MainWindow = null;})}};  


    How can I read commands coming over serial port with openHAB? -


    ये सीरियल पोर्ट के लिए लिखने के निर्देश हैं:

    sendCommand (SendCOM3, "हलो \ आर \ R ") --- पाठ प्रारूप

    भेजें कॉमांड (सेंड कॉम 4," \ u0001 \ u0012 \ u0123 \ u000F \ r \ r ") --- बाइनरी प्रारूप

    और ठीक काम करता है।

    अब, कौन मुझे बता सकता है कि एक ही सीरियल पोर्ट पर प्रतिक्रिया संदेश प्राप्त करने के लिए मुझे क्या करना है?

    धन्यवाद सीयाओ मार्को

    चूंकि आप पहले से ही बंदरगाह पर लिख रहे हैं, मैं मान रहा हूँ कि आपके पास सीरियल बाइंडिंग एक एडऑन और सीरियल पोर्ट सक्षम है।

    एक नया आइटम बनाएं और इसे आने वाली डेटा आवंटित करने के लिए सीरियल पोर्ट पर बाइंड करें। उदाहरण के लिए,

      स्ट्रिंग hallo1 "हेलो [% s]" (hall0) {serial = "SendCOM3"}  

    डेटा एक स्ट्रिंग है जिसे आप को पार्स करने की आवश्यकता होगी OpenHAB को पुनरारंभ करें, लॉग को जांचें और आपको अपना आइटम अपडेट करना चाहिए।


    javascript - SAPUI5 draw google chart in newly created control (panel) by click -


    I do not have much experience with JS but at the moment I have a work in which I need to create an HTML page and There is a Google Chart (Sapu 5 control) displayed on the panels. Page created with SAPUI5 elements:

      vertical layout | - Panel # 1 (open) | | - Grid layout. | - Panel 1 with Google Chart | | - Panel 2 with Google Chart | | - Panel . . | | - Panel with Google Charts N | - Panel # 2 (closed / collapsed). - Panel # 3 (closed / collapsed). -. . . | - Panel #m (closed / collapsed)  

    I have no problem applying that argument. I page is loading and the charts are successfully drawing. The logic of the drawing chart of the next step is applied when the user opens any closed panels. I do this with the function:

      The collage buttons pressed (octrol event) {var panelID = oControlEvent.getParameter ("id"); PanelID = cutFromString (panel id, (panelID.length - sufixClpsBtn.length), panelID.length); Var oPanel = sap.ui.getCore (). ById (panelID); If (! OPanel.getCollapsed ()) {oPanel.setCollapsed (true); } And {oPanel.setCollapsed (wrong); If (oPanel.getContent (). Length == 0) {// A GridLayout in the main panel; Get data and new control $ Ax ({async: false, type: "GET", url: urlSAP, datatype: "Jason", Data: {"LT": "Extra", "TGID": Panel ID}, Get Success: Function (Odata) { Process Data 2 (OpenLine, Odata)}}); }}}  

    In the function "processData_2" I am creating grid layouts and some panels based on the data I received.

      Function Process Data (OTIL Group, ODAB) {Var arrayoffides = []; // chart id (index) and divi id (array element value) where the chart should be kept var oGridTiles = new sap.ui.layout.Grid ({hSpacing: 1, vSpacing: 1}); Var Oitle; // Create panel to create (var i = 0; i & lt; oDAB.elems.length; i ++) {switch (oDAB.elems [i] .type) {case ("TILE"): oTile = CrtElement_Tile (ODAB) .elems [i] .title); Arrayoffides [oDAB.elems [i] .id] = string (otile) .split ("#") [1] + "-c"; OGridTiles.addContent (oTile); break; }} OTileGroup.addContent (oGridTiles); StartChartDrawing (oDAB.user, oDAB.elems, arrayOfIDs, False); }  

    But the function "startChartDrawing" contains "unsolicited error in the script: the container for the line is not defined"

      chart1 = new google.visualization.ColumnChart ( "Document.getElementById (arrival [oCharts [i] .id]));  

    By the time I try to attract the chart there, I can not understand the new panels Please help find a solution. There may be some incident that occurs when all the controls are created entirely.

    I have found a solution that works fine for me. The last line of the methodology changed with Data_2 I

      oTileGroup.addContent; Var Handler = function () {Unbind ('DOMNodeInserted.myEvent'); StartChartDrawing (oDAB.elems, arrayOfIDs, incorrect);}; $ (document) .bind ('DOMNodeInserted.myEvent', handler);  

    c# - Overwrite Windows Maximize Tooltip -



    c# - Overwrite Windows Maximize Tooltip -

    this question has reply here:

    override tooltip text titlebar buttons (close, maximize, minimize, help) 2 answers change close button tooltip 1 reply

    is there way alter tooltip of maximize , restore downwards buttons in windows form?

    c# winforms

    javascript - Autocomplete returns an error on ajax request -



    javascript - Autocomplete returns an error on ajax request -

    i trying utilize jquery autocomplete on text box, it's not working.

    here script autocomplete list database gives me error , alerts error message.

    $(function () { $("#contentplaceholdersearch_txt_search").autocomplete({ source: function (request, response) { $.ajax({ url: "service/autocomplete.asmx/getcompletionlistname", data: "{ 'prefixtext': '" + request.term + "' }", datatype: "json", type: "post", contenttype: "application/json; charset=utf-8", datafilter: function (data) { homecoming data; }, success: function (data) { response($.map(data.d, function (item) { homecoming { value: item } })) }, error: function (xmlhttprequest, textstatus, errorthrown) { alert(textstatus); } }); }, minlength: 2 }); });

    here server code

    [webmethod] public string[] getcompletionlistname(string prefixtext, int count) { list<string> items = new list<string>(count); ga_userstableadapter uta = new ga_userstableadapter(); usercontrollar.ga_usersdatatable udt = uta.getdatabynameautocomplete(prefixtext); foreach (datarow row in udt.rows) { items.add(row["full_name"].tostring()); } homecoming items.toarray(); }

    i changed service path in script from

    url: "service/autocomplete.asmx/getcompletionlistname"

    to

    url: "../service/autocomplete.asmx/getcompletionlistname"

    and works now...

    javascript c# jquery asp.net ajax

    Adding Linux module: Can't do "make menuconfig" -



    Adding Linux module: Can't do "make menuconfig" -

    i'm trying install linux external kernel module. i've unpacked total source tarball: there source codes (.c), kconfig, , makefile.

    while adding options .config make menuconfig, got

    make: *** no rule create target `menuconfig'. stop.

    (i tried make menuconfig under /usr/src/linux-header-3.xxxx , did work; menu pops out!)

    i'm little confused make menuconfig mechanism. did have link kconfig linux top-level makefile (kconfig?) or add together kbuild file?

    several files listed below:

    kconfig:

    config pmfs tristate "persistent , protected pm file scheme support" depends on has_iomem select crc16 help if scheme has block of fast (comparable in access speed scheme memory) , non-volatile byte-addressable memory , wish mount light-weight, full-featured, , space-efficient filesystem on it, y here, , read <file:documentation/filesystems/pmfs.txt>. compile module, take m here: module called pmfs. config pmfs_xip bool "execute-in-place in pmfs" depends on pmfs && block help y here enable xip feature of pmfs. config pmfs_write_protect bool "pmfs write protection" depends on pmfs && mmu && have_set_memory_ro default y help y here enable write protect feature of pmfs. config pmfs_test boolean depends on pmfs config pmfs_test_module tristate "pmfs test" depends on pmfs && pmfs_write_protect && m select pmfs_test help y here build simple module test protection of pmfs. module called pmfs_test.

    makefile:

    obj-$(config_pmfs) += pmfs.o obj-$(config_pmfs_test_module) += pmfs_test.o pmfs-y := bbuild.o balloc.o dir.o file.o inode.o namei.o super.o symlink.o ioctl.o journal.o pmfs-$(config_pmfs_write_protect) += wprotect.o pmfs-$(config_pmfs_xip) += xip.o

    linux kernel-module kbuild

    visual studio - Run expression at compile time VS 2013 -



    visual studio - Run expression at compile time VS 2013 -

    imagine i'm writing code , want know current datetime... would:

    create new console project, put breakpoint right after main popup quickwatch and evaluate datetime.now...

    my question is: there way (invoke quickwatch) without having debug project???

    you can run c#/vb code commands visual commander.

    visual-studio visual-studio-2013 compile-time

    php - Wordpress contact form (404 not found) -



    php - Wordpress contact form (404 not found) -

    i created template on wordpress , made html form. works in html, doesn't work when used on wordpress. seems doesn't find contact-send.php page , displays 404 error page.

    my permalinks on default , didn't work.

    does know how prepare this? if of code needed, i'll post it. didn't because think it's not code error 1 time doesn't find contact-send.php.

    best regards.

    use absolute url target of form instead of action="contact-send.php".

    but unless have particularly unusual requirements contact form, have improve results using 1 of many popular contact form plugins contact form 7.

    using well-maintained plugin ensures stability, , more importantly, security. don't reinvent wheel if don't have to.

    php html wordpress forms

    mqtt - Maximum Inflight messages in mosquitto -



    mqtt - Maximum Inflight messages in mosquitto -

    how can increment inflight message count in mosquitto broker such way client can publish n number of messages saved in broker.

    thanks, rama

    you can set max_inflight_messages in mosquitto.conf file.

    http://mosquitto.org/man/mosquitto-conf-5.html

    mqtt mosquitto

    ios - Retrieve all guildmembers in the same guild as you using Parse -



    ios - Retrieve all guildmembers in the same guild as you using Parse -

    how retrieve guildmembers in guild using parse?

    here code:

    pfuser *currentuser = [pfuser currentuser]; pfquery *query = [pfquery querywithclassname:@"user"]; [query wherekey:@"connectedguild" equalto:currentuser[@"connectedguild"]]; [query findobjectsinbackgroundwithblock:^(nsarray *comments, nserror *error) { nslog(@"there %d guildmembers. error:%@", comments.count, error); }];

    my log:

    there 0 guild members. error:(null)

    connectedguild pointer guild class store guilds.

    queries of pfuser class must instantiated little differently. seek this:

    pfuser *currentuser = [pfuser currentuser]; pfquery *query = [pfuser query]; [query wherekey:@"connectedguild" equalto:currentuser[@"connectedguild"]]; [query findobjectsinbackgroundwithblock:^(nsarray *comments, nserror *error) { nslog(@"there %d guildmembers. error:%@", comments.count, error); }];

    for more information, see parse.com website here: https://www.parse.com/questions/get-pfuser-in-pfquery-using-ios-api

    ios objective-c parse.com pfquery pfuser

    configuration - In Orbeon Forms, when multiple persistence providers are configured for Oracle, versioning is not enabled -



    configuration - In Orbeon Forms, when multiple persistence providers are configured for Oracle, versioning is not enabled -

    i using orbeon forms 4.7 pe. configured multiple oracle persistence providers per documentation:

    http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/oracle-and-mysql-persistence-layers#toc-with-multiple-schemas

    when tested publishing same form definition multiple times, versioning not enabled. form builder did not inquire if wanted create new version.

    i tried single provider configuration documented here:

    http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/oracle-and-mysql-persistence-layers#toc-with-orbeon-forms-4.0

    with configuration, worked fine. versioning enabled.

    it should work multiple providers configured.

    i searched code base of operations , found there property enabling versioning each of predefined providers (except exist because doesn't back upwards it). example:

    <property as="xs:boolean" name="oxf.fr.persistence.oracle.versioning" value="true"/>

    see: https://github.com/orbeon/orbeon-forms/blob/master/src/resources-packaged/config/properties-form-runner.xml

    i able turn on versioning providers using similar property, e.g.,

    <property as="xs:boolean" name="oxf.fr.persistence.myprovider1.versioning" value="true"/> <property as="xs:boolean" name="oxf.fr.persistence.myprovider2.versioning" value="true"/>

    there doesn't seem documentation property. nice if mentioned in documenation regarding multiple providers.

    forms configuration orbeon

    html - How to change hover background on links in css? -



    html - How to change hover background on links in css? -

    when hover mouse on link, shows background this:

    but want this:

    i on maven/web application project jsf framework. , links generated <h:link>. in regular html/css easy create sec pic, wont work jsf. how should it?

    the css be

    element:hover{ background: none; text-decoration: underline;}

    replace element class or id of html element.

    html css

    vb.net - Conversion of Varchar to int -



    vb.net - Conversion of Varchar to int -

    need help! cannot retrieve info in sq l, because value 100-200 , says needs converted integer, var char info type. think problem "-", error in code in info table code, do?

    private sub retrivedata(byval id string) if sql.hasconnection() = true dim dt datatable = sql.executedatatable("select (empid varchar), firstname,midname,lastname,gender,birthdate,civilstat,address,contactnum employeetable empid=" & id) each info datarow in dt.rows empid_txt.text = data(0) firstname_txt.text = data(1) middlename_txt.text = data(2) lastname_txt.text = data(3) gender_cb.text = data(4) birthdate_dtp.value = data(5) civilstat_cb.text = data(6) address_txt.text = data(7) contact_txt.text = data(8) next else msgbox("system database cannot connected", msgboxstyle.information) end if end sub

    actually, assuming 100-200 values in table somewhere, error in cranium of developer decided utilize varchar store numeric value :-)

    either that, or developer decided take otherwise free-form text field , assume going single numeric value.

    as how prepare it, 1 of paragraphs needs worked around. if want single numeric value in table, should alter numeric type field, along way going through 100-200 style values , cleaning them (into, example, 150).

    if want able store ranges, code processes them going have more intelligent, such extracting lower , upper value column , running loop process values within range, or changing query (pseudo-codish query):

    where empid = ?value?

    into:

    where empid >= ?low? , empid <= ?high?

    we can't tell which best solution based on info provided, business decision rather technical one.

    if assumption wrong , it's id argument (being used in where clause) function retrivedata (sic), either need stop users entering that, or create code processes argument more intelligent (similar looping/changed-query suggestion above).

    vb.net sql-server-2008

    delphi - How can I access TCanvas.ClipRect? -



    delphi - How can I access TCanvas.ClipRect? -

    i'm trying port code delphi firemonkey (xe6).

    i've run problem function draws tcanvas supplied caller. canvas tpaintbox, tpanel, tform or tbitmap. function reads tcanvas.cliprect property avoid doing cpu-intensive drawing outside of it. (the cliprect represents invalidated areas of tform, tpaintbox etc.)

    unfortunately tcanvas cliprect property no longer seems exist. know how can access tcanvas.cliprect in firemonkey? did notice tpaintbox , tpanel have cliprect property, maybe utilize those, tform , tbitmap don't.

    please note, i'm not trying create or alter cliprect in canvas, i'm trying read it.

    the dobeginscene has parameter cliprects. there doesn't seem way retrieve value. in add-on there might additional clipping on canvas.

    in order clip rects, need dc or cgcontext of canvas. using rtti. here's illustration osx:

    function tcanvaschelper.getcgcontext: cgcontextref; var context: trtticontext; field: trttifield; begin // needs 1ms field := context.gettype(tcanvasquartz).getfield('fcontext'); // private field using rtti assert(field <> nil); result := ppointer(field.getvalue(self).getreferencetorawdata)^; end;

    unfortunately using rtti might not fast required. ended having create re-create of fmx.canvas.* classes expose cgcontext or dc. you'll need anyway if want more advanced things canvas fmx not implement.

    when have cgcontext or dc, can utilize functions of os cgcontextgetclipboundingbox or getclipbox retrieve cliprects if canvas supports them.

    delphi firemonkey

    Jquery and css references are blocking page rendering in Asp.net on IE7 compatibility -



    Jquery and css references are blocking page rendering in Asp.net on IE7 compatibility -

    my asp.net application designed work ie 7 compatibility (through x-ua-compatible). added latest jquery (1.11.1 version) , css inline references project include datepicker command in forms. working fine on random postbacks page rendering beingness blocked jquery , css references.

    if remove either of (jquery/css references or ie7 compatibility meta tag) master page works fine.

    <meta http-equiv="x-ua-compatible" content="ie=7" />

    or

    <link href="css/jquery-ui.min.css" rel="stylesheet" type="text/css" /> <script src="scripts/jquery.js" type="text/javascript"></script> <script src="scripts/jquery-ui.min.js" type="text/javascript"></script>

    i need ie 7 compatibility meta tag in master page render styles correctly designed render styles in ie7 , need jquery references utilize datepicker , few validations. both necessary project.

    i know weird issue have never experienced before. not sure how resolve issue.

    any help or suggestions appreciated.

    most using jquery version 2.x not supported in ie7. see browser support page more details.

    i recommend utilize lower version (1.x) or add together older ie versions using <!--[if lt ie 9]>.

    css asp.net jquery-ui jquery-plugins internet-explorer-7

    c++ - Nested folder structure in Visual Studio - including files -



    c++ - Nested folder structure in Visual Studio - including files -

    i have nested folder construction in project, each folder corresponds namespace. illustration have these 2 files:

    a::b::c::myclass.h util::otherclass.h

    the problem end include statements this:

    #include "../../../util/otherclass.h"

    how can avoid this, possible reference project root somehow? prefer reference include path #include "/util/otherclass.h";

    i'm using vs 2013 express

    you can add together root project folder include directory list (in project's options dialog in visual studio).

    then, relative files folder accessible, #include "util/otherclass.h" work (if util in folder listed in include directory list).

    c++ visual-studio visual-studio-2013

    angularjs - Function from angular js controlles is not executing when testing -



    angularjs - Function from angular js controlles is not executing when testing -

    i testing angularjs application jasmine , karma.

    my test looks this:

    describe('login test', function() { // mock our module in our tests beforeeach(module('project')); var ctrl, scope; // inject $controller , $rootscope services // in beforeeach block beforeeach(inject(function($controller, $rootscope) { // create new scope that's kid of $rootscope scope = $rootscope.$new(); // create controller ctrl = $controller('logincontroller', { $scope: scope }); })); it('should login success',function() { scope.loginclick('user', 'pass'); }); });

    i have login controller loginclick function, , within function have function making post request. problem inner function never executed, seek console.log() see if function called no success. function looks this:

    app.controller('logincontroller', ['$scope', '$http', '$route', function ($scope, $http, $route) { console.log('controller call'); // yes works ... $scope.loginclick = function (username, password) { console.log('controller call'); // yes works handler.reqpost('/login', userdata, function (result) { console.log('login request'); // no output sent console }); }; }]);

    the handler object include in karma configuration file @ start-up.

    first of all, unless have reason, $http way go in angularjs phone call back-end, makes more testable.

    in case should mock post call, in unit-test don't want rely on back-end

    in case, utilize spy (http://jasmine.github.io/2.0/introduction.html#section-spies):

    describe('login test', function(){ beforeeach(module('project')); var ctrl, scope; beforeeach(inject(function($injector) { var $controller = $injector.get('$controller'); var $rootscope = $injector.get('$rootscope'); scope = $rootscope.$new(); ctrl = $controller('logincontroller', { $scope: scope, }); })); it('test login', function () { spyon(handler, 'reqpost'); scope.loginclick('user', 'pass'); expect(handler.reqpost).tohavebeencalledwith('user', 'pass'); }); });

    angularjs jasmine karma-runner

    Changing HTML code with Javascript show/hide -



    Changing HTML code with Javascript show/hide -

    i have tried few different things, including switch statement, appending using jquery etc. , can't work button. trying alter words in p2 from:

    please force `<button id = "me" onclick = "toggle1('me');">this </button>` show more info me.

    to:

    please force `<button id = "me" onclick = "toggle1('me');">this </button>` hide more info me.

    i have same thing "courses" think if understand first one, how sec see/hide on own. confused :/

    i think has span tags, in first week of html , have not learned simple procedures things yet. appreciate , help can help me figure out.

    <!doctype html> <html> <head> <title>about me</title> <style> body { background-color:#add8e6; } #p3 { display:none; } #myimage { width:280px; height:280px; } #schedule { width: 100%; display:none; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script language = "javascript" > function changeimage() { var image = document.getelementbyid('myimage'); if (image.src.match("hrgswitch")) { image.src = "hrg.jpg"; } else { image.src = "hrgswitch.jpg"; } } function toggle1(obj) { if(obj == "me") { if(document.getelementbyid("p3").style.display == "none" || document.getelementbyid("p3").style.display == "") { document.getelementbyid("p3").style.display = "block"; } } else { document.getelementbyid("p3").style.display = "none"; } } else if (obj == "courses") { if(document.getelementbyid("schedule").style.display == "none" || document.getelementbyid("schedule").style.display == "") { document.getelementbyid("schedule").style.display = "block"; } else { document.getelementbyid("schedule").style.display = "none"; } } } </script> </head> <body> <h1> page </h1> <img id="myimage" onclick="changeimage();" src="hrg.jpg" /> <p title="about me"> stuff me <br> <a href="http://www.w3schools.com/" target="_blank">here link larn more html!</a> <br> <br> </p> <p id = "p2"> <br> <br> please force <button id = "me" onclick = "toggle1('me');">this </button> see more info me. <br> <br> please force <button id = "courses" onclick = "toggle1('courses');">this </button> see list of courses." </p> <p id = "p3" > more stuff me... <br> </p> <br> <table id = "schedule"> <tr> <td>course name</td> <td>date</td> <td>time</td> </tr> <tr> <td>programming paradigms</td> <td>tuesday / thursday</td> <td>11:00-12:15</td> </tr> <tr> <td>computer organization</td> <td>tuesday / thursday</td> <td>9:30-10:45</td> </tr> <tr> <td>linear algebra</td> <td>monday/wednesday/friday</td> <td>11:50-12:40</td> </tr> <tr> <td>combinatorics </td> <td>monday/wednesday/friday</td> <td>8:35-9:25</td> </tr> </table> </body> </html>

    you have syntax error in function toggle1. remove unwanted braces. seek this:

    <script language = "javascript" > function toggle1(obj) { if(obj == "me") { if(document.getelementbyid("p3").style.display == "none" || document.getelementbyid("p3").style.display == "") { document.getelementbyid("p3").style.display = "block"; } else { document.getelementbyid("p3").style.display = "none"; } } else if (obj == "courses") { if(document.getelementbyid("schedule").style.display == "none" || document.getelementbyid("schedule").style.display == "") { document.getelementbyid("schedule").style.display = "block"; } else { document.getelementbyid("schedule").style.display = "none"; } } } </script>

    but, if using jquery, toggle inbuilt function. simple as(inline js - although recommended seperate script): remove toggle1 function , alter 2 html onclick attributes:

    please force <button id = "me" onclick = "$('#p3').toggle()">this </button> see more info me. please force <button id = "courses" onclick = "$('#schedule').toggle()">this </button> see list of courses.

    javascript html