Posts

change json file by bash script -

I need your help to solve the following problem: I have a JSON file that looks like this: {"key1": "value1", "key2": "value2", "key3": "value3"} How do I create a new key Can I add "code4" to "code4": "value4" ) by Bash script? Thank you : Li> On Debian-based systems such as Ubuntu, you can call it sudo apt-get jq install on OSX, with a homebree, install Jq For example, depending on the following input string - output stdout : jsonStr = "{" Key1 ":" value1 "," key2 ":" value2 "," key3 ":" value3 "} ' Remove "key3": jq 'del (.key3)' & lt; & lt; "$ jsonStr" value with value "value4" Add the key "key4": jq '"{1 key4": "value4"}' & lt; & lt; "$ jsonStr" Change the value of the...

events - Check if Screen is Touched -

In Windows Phone 8.1, how can I trigger a method every time (with the command bar exception) or other button s)? I can use the button on a large scale, but it seems that ... horrible. I will have some TextBlock s on the screen and I still want to trigger those methods, even if these things are touching. So basically, I'm looking for a method which if any button is not touching, then it will fire. I'm seeing a large number of Windows Phone APIs, but it's challenging, because I'm not really sure what I'm seeing. I think the event of PointerEntered : // For example, the main page constructor: Window. Present. Core window Pointer + = core window pointer; Private Zero CoreWindow_PointerEntered (CoreWindow Sender, PointerEventArgs args) / / Debug your code here. WrightLine ("touch screen"); } Note that you have two more good events to play.

jquery - In jqGrid the Delete Icon is not Clickable -

itemprop = "text"> If I have a line result and try to hover over the deleted icon, then it will not get the focus (clicking Is not qualified)). I have the setting of the search icon next to the deleted icon and when I put it up, it will not respond until the cursor is at the extreme right of the icon, so I think that the deleted icon This is the case, but there is no place where I place the cursor will not react. It's like mouse's hover action offset offset. It depends on whether you are editing inline (cell editing) or editing dialog box Using If you are using the editing dialog, there are some things to check if you have the following: jQuery ("# ​​Grid"). JqGrid ({ 'cellEdit': incorrect, 'cell delete': wrong, 'cell-end': wrong, and then in the editing options, you can set del or edit and other icons Edit: {url: '@ Url.Action ("methodname", "controller"): jQuery ("# ​​grid"). JqGrid...

WSO2 ESB how to handle soap operations independently -

Image
I need to comfortably connect "every one of my soap service" to the service. In I Wso2-esb I With a predefined wsdl, a new proxy service is defined, so far so good, I have published the service and I can "see" the operations from Soap-UE. Now I need to define an implication (I think), my first problem is that I need to distinguish between op1, op2 and op3 because every soap action Goes to a different comfort service what kind of mediator does Thanks! This is very similar to Escannary where you have any message in the form of EOP No value, to use SOAP header value for routing. Well, what you are asked for the SOAP operation, you have to get the value of SOAP header, here's a sample proxy: & Lt; Property name = "MY_SOAP_ACTION" expression = "received-asset ('action')" scope = "default" type = "STRING" /> & Lt; Log level = "custom" & gt; & Lt; Property Name = "...

c# - How to Serialize a ListItem Stored in Session -

I have this code that works fine on my local server: if (Page. IsPostBack) {string [] Question = New string [20]; String [] answer = new string [20]; For (int i = 0; i & lt; lstQuestions.Items.Count; ++ i) {question [i] = lstQuestions.Items [i] Text; Answer [i] = lstQuestions.Items [i]. value; } Session ["question"] = question; Session ["answer"] = answer; If (session ["qalist"] == zero) {list & lt; ListItem & gt; Qalist = lstQuestions.Items.Cast & lt; ListItem & gt; (). ToList (); Session ["qalist"] = qalist; } And {list & lt; ListItem & gt; Qalist = (list & lt; ListItem & gt;) session ["qalist"]; LstQuestions.DataSource = qalist; }} And {if (session ["question"] = null & session ["answer"]! = Null and session ["checklist"] = null] {list catalogs> Qalist = (list However, when I go to a web server, I get the "System.Web.UI.WebControls.ListItem"...

Through bash shell script, i am trying to read yearmonth from file name -

एनबी: इस सवाल का पालन के माध्यम से bash shell script , मैं एक फ़ाइल नाम (FACT_PEOPLE_201401.txt) को पढ़ने की कोशिश कर रहा हूं। फ़ाइल के लिए `एलएस -1 $ {OFSR_IN} / FACT_PEOPLE _ *। Txt में file_name = 'basename $ {file} `एक्स्ट_ युयर =` प्रतिध्वनि $ {File_name} | कट-सी 13-16` # YEAR Ext_Month के लिए = `प्रतिधारा $ {File_name} | कट-सी 17-18 '# महीने के लिए - एक्सचेंज को निकालने का प्रयास $ {EXT_Year} गूंज $ {EXT_Month} EXT_YEARMTH_1 = $ {Ext_Year} $ {var} $ {Ext_Month} # सम्मिलन वर्ष और amp; माह गूंज "\ $ \ $ एचआर_आइरमॉनथ = $ {EXT_YEARMTH_1}" & gt; & gt; $ {OFSR_CFG} / pmserver_OfsrHRSPeople05Loa.prm # यहां मूल्य को आउटपुट करना मैं आउटपुट फ़ाइल config.prm में वर्ष महीना (EXT_YEARMTH_1) का मान प्रिंट करने का प्रयास कर रहा हूं गूंज "\ $ \ $ HR_YEARMONTH = $ {EXT_YEARMTH_1}" & gt; & gt; $ {OFSR_CFG} /pmserver_OfsrHRSPeople05Loa.prm लेकिन मैं सही वर्ष 2014/01 जैसे प्रिंट नहीं कर पा रहा हूं। इसके बजाय मुझे आउटपुट के रूप में $...

javascript - Why do some angular $scope functions "return" an operation? -

I've got some code that looks like this: $ scope.open = Function ($ event) {$ event.preventDefault (); $ Event.stopPropagation (); Return Scope Open = true; }; Why is this returning an assignment? What does it do? Is there any advantage of doing this or not? This is basically: $ scope.open = Function ($ event) {$ event.preventDefault (); $ Event.stopPropagation (); $ Scope Open = true; Return Scope }; The advantage is that it saves a line of code, probably not worth it. This can also be compiled with a cryptographic code, which was originally viewed: $ scope.open = ($ event) - & gt; $ Event.preventDefault () $ event.stopPropagation () $ scope.opened = true The coffee script always gives the result of the last line in a method, so it can return a value from those tasks You will normally expect nothing to happen again.