Posts

Showing posts from June, 2011

powershell - How do you test for parallel conditions in a switch statement? -

I have read in different sources that the SWIFCH statement receives better performance compared to multiple IF statements. Do I have the following blocks of IF statements that have parallel conditions? Is it possible to do this SWITCH block? if ($ statusCode -q "OK:") -and ($ messageOutput) {$ returnValue = 0 return $ returnValue} if ($ StatusCode -q "Warning:") - And ($ messageOutput) {$ returnValue = 1 return $ returnValue} Thanks in advance, You have a constant that is $ messageOutput , so conditions are not actually parallel you can: if ($ messageOutput) {switch ($ statusCode) {" OK: "{0}" warning: "{1} default {1}}} It will be more efficient because you have to There is no need to check each variable again.

monitoring - Hp Loadrunner / virtual user generator web click and script alternative -

Definitely if this is asking in the right place, do not be sorry! We currently make scripts through our HP Virtual User Generator (using WebClick and Script Protocol) to monitor our webpage, because we monitor it Javascript execution is required on the go. We import these scripts in Himachal Pradesh Sitascape, so when we come down we become alert. After upgrading the problem loader to 12.01, they have removed the Web click and the script protocol. I have run a protocol adviser and advised to use the trollquent Ajax-IE protocol. I've recorded a script using this and it works great, but it seems that it is not supported in the sitespot! Does anyone know about web clicks and scripts that are compatible with the sitoscope or the option of the sitoscope entirely? Thank you! Re-enable the javascript function in web virtual users java, which is like "javascript" Take advantage of the available tasks in the loader to execute

jQuery.post doesn't return any response -

I value using POST jQuery (API call) on my server. Prices have been successfully added to DB, but I have not received any response from the server. Here is my jquery for the post. $ (document) .ready (Function () {$ ('# signupConfirm') click (function () {if (validateSignUpForm ()) // // check the availability of username // All these Vars sign up in the API call var ServiceUrl = 'http: // xxxxxxxxxxxxxxxx'; var apiKey = 'xxxxxxxxxxxxxx'; var apiSecret = 'xxxxxxxxxxxxxxxxxxx'; var user name = $ ('# username'). Val (); var Email = $ ('# email1') .val (); var password = $ ('# password1'). Val (); $ .post (signUpServiceUrl, {'api_key': apiKey, 'api_secret ': ApiSecret,' Username ': Username,' Email ': Email,' Password ': Password}, ​​Function (data) {Par Result = JSON.parse (data);});}});}); Is there any mistake in this? You are sending cross-domain requests, use jsonp . Her...

node.js - For loop in Swig template engine -

I am using as a template engine for express.js and I have no way of making a loop with a variable Not found therefore: for (var i = 0; i & lt; 100; i ++) {// whatever} Is this also possible? As you have posted, such loops are not present in swig, But repeat again, though (see). Otherwise, you can make a range assistant, as discussed swig.setDefaults ({local: {range: function (start, len) { Return (new) (). Partition (','). Map (function (n, idx) {return idx + start;}}}}}});

c - How do I increment pointer in stringtable? -

I am filling a stringbabelsible four * data [500] with the pointer for different stars. four * data [500]; Int stringC = 0; Four printbuffers [200]; Zero data_desplay (zero); Zero print string tab (zero); Int main () {data_display (); // Fill buffer printstringtable (); Return 0; } Here I use another buffer so that I can store an index in the string: zero data_display (zero) {int index = 0; Sprintf (printbuffer, "a text% d \ n", index); Output (PrintBuffer); Index ++; Sprintf (printbuffer, "b text% d \ n", index); Output (PrintBuffer); Index ++; Sprintf (printbuffer, "C text% d \ n", index); Output (PrintBuffer); } While debugging, I can see that the indicator always indicates the same address. Zero Output (Four * Buffer) {Data [String C] = Buffer; Four * (* PTR) [500] = More data; String C ++; Ptr + = stringC; } Zero printStringTable () {int i; For (i = 0; i If I have another string using a buffer (printbuffer) without a separate add...

Trapping All Batch Job from MVS -

I am trying to trap all the batch jobs from MVS. For conducting further analysis, I want to send all the batch job information (start, end, error) to an external system. Anyone have any ideas on how to do this? Write an IEFACTRT exit (or whatever its modern day is equivalent to) and the system programmer installed it We do.

backgroundworker - The Best Way to Handle Big File Uploads in Azure -

We are hosting a VM our web application, where users upload large files to their profiles - in fact they 3D models are - Web APIs of Web API What I am working on is to find a way to efficiently manage these long-running uploading jobs / processes in place of this VM, where I am hosting the application. I know there are some blue ways but I want to make it right. Which is the most effective way to do this? Worker role, a web page can run for a script to store it in the queue or to upload to web jobs? File uploading function is also doing some other processes like generating thumbnails, accumulating SQL and etc.

javascript - ng-option with static link option -

To add a static option that shows links to other pages using the ng-options. & lt; Class = "form-control" ng-model = "person" ng-option = "person name for person in person" & gt; & Lt; / Select & gt; I am using selection element with NG-option with the predefined list of individuals, where the person is the object. I tried to use ng-repeat instead but this method Does not work: & lt; Select ng-model = "person" onChange = "window.location.href = this.value" & gt; & Lt; Option value = "# / home" & gt; Anywhere & lt; / Options & gt; & Lt; Option value = "# / current" ng-repeat = "person in person" & gt; {{Person.name}} & lt; / Options & gt; & Lt; / Select & gt; Varibale $ Opportunity. The value gets the value "# / current" works in this case, but the ng-model fails. The variable $ scope.person should represent the selecte...

ruby on rails - activeadmin can not upload images under nested model Unpermitted parameters -

Image
मैं activeadmin में छवियों को अपलोड नहीं कर सकता रिमोट फोकू में कई रिमोट फोकोल हैं class टूल :: Cvt :: RemoteFocu & lt; ActiveRecord :: बेस is_to: उपयोगकर्ता has_many: remote_focu_logs,: निर्भर = & gt; : नष्ट #,: आटोशेव = & gt; True accepts_nested_attributes_for: remote_focu_logs, allow_destroy: true admin / remotefocu # नई / फॉर्म फॉर्म फ़ॉर्म: html = & gt; {: बहुस्तृत = & gt; सच} क्या | एफ | F.has_many: remote_focu_logs do | p | P.input: स्नैपशॉट, के रूप में = & gt; : फ़ाइल अंत f.actions end permit_params: user_id,: ip,: मॉडल,: संस्करण,: सेटिंग,: टिप्पणी,: परिणाम_पाथ, स्थिति:: remote_focu_logs_attributes, utf8,: _method,: authenticity_token,: commit,: locale, : Id त्रुटि लॉग unpermitted पैरामीटर: remote_focu_logs_attributes unpermitted पैरामीटर: utf8, _method, प्रामाणिकता_टोकन, कमिट, लोकेल, आईडी (0.1ms) BEGIN (0.1 एमएस) रोलबैक अनुमति देने की कोशिश करें remote_focu_logs_attributes: [: id,: snapshot ,: _destroy] के बजाय : remote_foc...

actionscript 3 - User data within RTMP/RTMPT live stream -

Say, I have an RTMP live stream that has been sent from FDMPA to Red5. Flash client is a custom player that uses the AS3 Netstream API. And I want to put some extra data on the server side on that side, like this data must be synced well with the video in a snap. Please provide some tips or tutorials how can I get it. I know, the FLV is not the type of container, so that you can add additional data, MP4 is appropriate. Using custom player, I tried to play an MP4 video with an embedded subtitle, but onTextData was not found on the client-side Netstream client. Thanks To get the data within the rtmp live stream, You can use the onMetaData or onCuePoint event on the side. Take a look here: Surely you should send the data with your live encoder.

c# - System.Timer synchronization not working -

I have created a window service that will throw an event at every T interval. This event will consume a web service and call its web method. This windows service does not know how long the web method will take to complete the execution. What I see is that when the gap is over, more than one instance of the web method is going on. I am using the counter but it is not working. I do not want to overlap the web method execution. Public partial class autoconfiguration: servicebase {personal timer timer = zero; Private Bull is running counterfault = false; Public Autolocation () {InitializeComponent (); } Safe override zero start (string [] args) {timer = new timer (); String TimerInterval = Configuration Manager App Settings ["Time Interval"]; Timer Interval = convert Noon (timerinval); Timer Elapsed + = New System Timer EspladeeventHandler (this.TimerTick); Timer Competent = true; } Private Zero TimerTech (Object Sender, ElapsedEventArgs e) {if (runningCounter == false) ...

php - Mysql INSERT ... ON DUPLICATE KEY UPDATE responce -

Hello, I have a table A and I want to insert a new value (not updated) INSERT to that table. In Table B, I tried to play with the response to the query $ INSERT. No luck on the update of duplicates, it always returns 1. $ query = "Include in table" $ field. "value". $ Value "Duplicate Key Update Update = 1" $ response = $ dbc-> Query ($ query); If ($ response == 1) I have also tried a 'hack', it is to say that to put an update on INSERT, if the entry does not exist for failure , But he returns 1 each time again. $ query = "Update table SET update = 1;; $ response = $ dbc- & gt; query ($ query); if ($ response == 1) This should work: & lt ;? php $ Link = Mysqli_connect ("localhost", "my_user", "my_password", "world"); mysqli_query ($ link, "tableA" INSERT. $ Field. "Value". $ Value. "Duplicate Key Update Update = 1 "On); if (mysqli_affected_rows (...

go cd - Passing environment varibale from one go stage to another -

We have a pipeline job with 2 steps and we have announced an environmental variable. We are changing the value of the environmental variable in step 1 and now I want to use the converted values ​​of environment variables in step 2. But it is not using a changed value in step 2. We have tried to use the environment at the pipeline level, the level of the job and the environmental level. What stage level can anybody help? Step is no way to pass an environment variable from 1 to phase 2. This situation The only way to deal with is to echo the environmental variable in a text file and present the text file as an artifact between two steps.

Python dictionary key assign -

I have created a dictionary from a topless, but I think how will I switch without editing the original Tupal The keys and the value that I have done so far: Tulips = [('A', '1'), ('B', '1'), ('C' '2') This output returns: {'a': ('D', '3')] dic = dict (tuples ) I am looking for it: '1', 'B': '1', 'C': '2', 'D': '3'} {'1': 'a' 'b', '2': 'c', '3': 'd'} Simple code Land that could cause this? Create a dictionary in the loop, store your values ​​in lists: result = {} for value, key in tuples: result.setdefault (key, []) .andend (value) set and return will default value if key does not exist Here I used to set the default empty list value, if the key is not present, then .append (value) always applies to the list object. Don 'do not try to mix a single string and multi-stri...

c# - Access column name in a loop using GridViewRowEventArgs -

I have GridView , which adds hyperlinks to all the values ​​in the based on the data Is DataTable . This is being achieved using the "GridViewRowEventArgs" functionality but here I have to use the column names in the loop and I am unable to do this. Please help me with this. You can use this extension: public stable C GetColumnIndex (this gridview grid, string columnname) {return grid. Columns Cast & Lieutenant; Data Control Fields & gt; (). Select ((c, index) = & gt; new {column = c, index = index}). X = & gt; X.Column.HeaderText.Equals (column name, string commerment. Invent culture Ignore case). Select (x = & gt; x.Index). Default effect (-1). first (); } Then you can use it like this: Secure Zero GridView_RadataBound (Object Sender, GridViewEventErgus E) {If (E.O. Row Type = = DataControlRowType.DataRow) {GridView Grid = (GridView) Sender; Int Index of Column = Grid GetColumnIndex ("ColumnName"); // E. For example Ro Seals...

javascript - Treat all variables from HTTP request as as integer (with exception) -

I have an HTTP request in angular, which pulls all the data from a MySQL table. $ Http ({method: "POST", url: "framework / actions / league.php? Query = getDivision"}). Success (Tasks (Data) {$ scope.division = data;}); A snippet of data looks like this: [{name: "any", number: "4", game 1: "6" Score: "10"}, Game 2: "2", Score: "8"}, {name: "any other", number: "7", game1: "7", game 2: "3" ] When that data comes back from HTTP request and is assigned to $ scope.division , the numbers are considered as strings, from which I get problems using orderBy ngRepeat in . How can I count the numbers in the field without declaring each region in the forEach and use parseInt () ? Is it possible to do this in PHP? If it is not, then it would be OK to do it in Coonari Javascript. Of course I can not think of each field as a number due to the name field. ...

Mercurial: move MQ patch to shelve? -

Emacs VC mode shows changes in directory state but ignores MQ changes ... I remove Wish to patches from queue and apply it to the working directory. This is possible with the normal patch command, but it allows some arguments and paths to automate the utilities (which are not all environments). I hope hg is the underlying solution. Ideally - to move the patch to the shelves. Take a change in the tree working from the MQ and forget it: $ hg qgoto my.patch $ hg qpop $ hg qdel --keep my.patch $ patch -p1 Hg / patch / my.patch $ rm Hg / patches / my.patch To see the difference in the top MQ patch, I think the command Cu Cx v D Qparent RET qtip RET : $ hg diff -r qparent: qtip or small: $ hg diff -r qparent or: $ hg qdiff but the latest command does not exist in Emacs VC mode.

php - How to merge multidimensional arrays where only subarrays are affected? -

Here: I asked a lot from them, but the array was flattering. I tried to customize the code, but unfortunately without success How can I merge the following arrays so that the second array can not be added after the end of the first array, but get the correspondent value of each subahaha second suburb of the first array. In other words, I I want to merge the suburbs. Array01 ([0] = & gt; Array ([0] => 40292633 [1] => 412) [ARRE 01] 1] => Array ( [0] = & gt; 41785603 [1] = & gt; 382) [2] = & gt; Array ([0] => 48792980 [1] => 373) [3] = & gt; Array ([0] => 44741143 [1] = & gt; 329)) Array 02: Array02 ([0] = & Gt; Hey ([0] => 3460581 [1] => 1407424 B1 [2] => 951753) [1] => Array ([0] => 3484251 [ 1] = & gt; 1028325 B1 [2] = & gt; 15 9357) [2] = & gt; Array ([0] => 3519102 [1] => 0586365 A1 [2] = > 456654) [3] => Hey ([0] => 3529714 [1] => 1059876A1 [2] => 852258)) Final array: ...

How to resolve instance with Autofac and Asp.Net MVC -

I have just begun to try Autophack and I think I can solve the concrete classes with myself I am confusing. I managed to register my interface for my concrete sections in the form of builder.RegisterType & lt; TestClass & gt; () In form of. & Lt; ITest & gt; (); Var Container = Builder Build (); Dependency Resolver. SetsSolar (New Autofacked-Dependency Resolver (Container)); It makes sense that the problem I am having is that what is the example in my MVC controller? Most things I have read is that I need to create a new instance of ContainerBuilder and then call the scope. Resolve method, but of course it is bad behavior and every controller should not be needed? I think the confusion is when and how can you use the container so that I can call the solution method and when I need it, I can call it. I am a novice on this as you probably have guessed! One way to do this is to use the controller constructor because AutoFac will handle it for you: pub...

c - what is the purpose of pre-processor macros defined in files linux/compiler.h? -

I'm very new to the Linux kernel and I'm using the Sparse tool to clean the noise in the code. . I am experiencing these macros: # define __user __attribute __ ((Nodif, Pta_spes (1))) #define __krnl __tttw __ ((Address_space (0))) #define __saf __detait __ ((secure)) #define __force __attribute __ ((emphasis added)) #define __nocast __attribute __ ((Nocast)) #define __iomem __attribute __ ((Noderef, Address_space (2))) #define __must_hold (x) __attribute __ ((reference (x, 1,1))) # define __acquires (x) __attribute __ ((reference (x, 0,1)) # define __releases (x) __attribute __ ((reference (x, 1,0)) #define __acquire (x) __context__ (x, 1) #define __release (x) __context __ (x, -1) #define __cond_lock (x, c) ((c)? ({__acquire (x); 1;}): 0) # define __prkyu __detait __ ((noderef, address_space) My question: I Description want to alert report to the compiler and how sparse help. wha these address_space (x) References (X, X, X) and there is no purpose there? ...

parse.com - How to login and sign up through parse in ios -

I am using a parse server to log in and sending verification emails to iOS. The user registers itself on the pars server, the e-mail ID is the email and a link that is satisfied upon clicking on the email. My problem is not already existing user can log in again and I do not know whether the user has verified the mail or please help! Any help would be commendable thanks in advance. Documents are very clear on this issue. I will suggest a review and apply the investigation of the existing Pfusor if it is zero, then you should set the login view controller to fire. It's simple, and docs show this almost terminology. ;) Cheers!

regex - PHP - Replace exact match preg_replace -

I'm trying to implement an lot simple PDO bindValue () function. (For educational purposes only) So, in the first "frontend" code, I have a SQL query: Enter the log in value (: Referer ,: Id_cookie ,: id_cookie_com); And my code that looks like this: $ stmt-> gt; BindValue (': referer', 'test'); $ Stmt- & gt; Bind value (': id_cookie', 'test2'); $ Stmt- & gt; Byte value (': id_cookie_com', 'test3'); I'm dividing my query, and I'm getting all the parameters that start with ":" in an array that works well. array ([0] = & gt ;: Referrer [1] =>: id_cookie [2] = & gt ;: id_cookie_com) But, when I try to change the parameter query, I have to face a small problem. If I do this: Public function bundle ($ parameter, $ variable, $ type = zero) {$ this -> Sql = preg_replace ('/' parameter. '/', $ Variable, $ this- & gt; sql); } I'm rece...

matrix - itext correctly get each image position within page or document -

Using it with I'm removing text and images from PDF files for my purpose I use text and images Make an HTML file by doing Instead of putting the extracted images in the whole lesson in the whole lesson, the goal is to give them space, as I do in present. After some research, this renderInfo.getImageCTM () is what I only want, although the coordinates do not return the same as the posts of some images compared to the ads appearing in Adobe Reader. In the Matte imageRender listener class it is matrix matrix = renderInfo.get imjtm (); Float x = matrix.jet (matrix ii 31); Float y = matrix.get (Matrix.I32); I have understood correctly, so I should give the XY position at the top left hand corner of each picture. It is here that I is a 4 page PDF that has one or two images per page. Page XY Page 1 33.0 358.5 Page 2 1 321.7 41 9.92 Page 2 Second 41.2 182 Page3 First 43.1 307.5 Page 3 Second 417 58.5 Page4 292.5 457.5 The numbers in the actual document are not under...

android - I'd like to select multiple items in my listView, and send them to another listView in another activity with the click of a button -

I would like to select multiple items in my list, and send them to another list button. I provide some code, but I am not very clean right now and I can not find the answer anywhere. When I run my application I, then everything looks fine goes as UI id = "@ + id / beerProduct" Android: layout_width = "wrap_content" Android: layout_height =; ListView Android & lt: The file with the list view inside .xml "0 DP" Android: layout_weight = "0.28" & gt; & Lt; / ListView & gt; & Lt; Button Android "Android: attr / borderlessButtonStyle" id = "@ + id / addtolist" style = Android: Layout_width = "Match_parent" Android: Layout_height = "Wrap_content" Android: MinHeight = "75dp" android: onClick = "SendMessage" Android : Text = "@ string / addtolist" Android: textSize = "26sp" /> & Lt; / LinearLayout & gt; .java is calling list view: pac...

algorithm - Trapez Method in Java -

I found a formula in calculating Trapejhoid method, it works as it should, but I do not know Why should I have the following lines in the Trape method : yoga = 0.5 * bf + (h * yoga); First : tra [0] = 0.5 * done by the following command in I = i + 2 ((B - A) / N) * (function (A) + function (B)); // Calculates the first step value of Trape method for the next iteration: / ** * Next calculation step with Tripjh method * @param e-Louvre border * @param B. On the border * @ Param beef-Preepr step value * @param N -nmber of Divijning Rating * Return Integral area * / public static double Fajhej (Double a , Double b, double beef, int n) {double sum = 0; Double H = ((B - A) / N); For (int i = 1; i function will be accompanied by a driver loop doubles the number of which The refinement is less than the threshold criterion, refining the approximate integral to the subdivision on each iteration, from a repetition to the difference. By considering the function value...

Rails bundle nokogiri -

I am making a first attempt to learn to work with an API and I try to use gem urban I am doing My gem file looks like this Source 'https://rubygems.org' # Bundle Rail instead of leading edge: Mani 'Rail', Gitub: 'Rail / Rail' Mani ' Rail ',' 4.2.0.beta2 '# Use the sqlite3 as a database for the active record gem' sqlite3 '# # Use SCSS for the stylesheet Mani' Asus-Rail ',' ~ & gt; 5.0.0. Beta 1 'Use Eugplifier as Compressor for Javascript Properties' Mani' Ugrfire ',' & gt; Use coffee scripts for '1.3.0' # .js.coffee properties and scenes' coffee-rail ',' ~ & gt; 4.0.0 '# more supported runtimes # gem for' thermobraseer 'see https://github.com/sstephenson/execjs#readme, platform :: Ruby # JavaScript library gem' jquery-rails ',' ~ & gt; Use jQuery in; 4.0.0.beta2 '# TurboLines makes quick links in your web application as follows and re...

dart - Couldn't find `document._registerDartTypeUpgrader` -

My previously executed application now fails to run with the following stacktrace Exception: Unsupported operation: 'Document._registerDartTypeUpgrader' could not be found, please make sure that 'packages / web_components / interop_support.html' are loaded and available before calling this function. (Package: web_components / interop.dart: 24) What exactly does it mean? I have only one problem but only on my Windows machine with this exact same code on the MacBook works fine. Update: I compared my Windows machine with the versions of MacBook. They are both: DartSDK 1.7.2_r41096 Chromium 37.0.2062.120 (292122) Packages folder symbols point to the exact same version folder Update: This is working after changing any "version" for any version and "Pub Upgrade" to the packagepec. The package that was checked in the lock was upgraded. If you rely on any of these, then you can help if you upgrade them: Args Barback code...

vbscript - VBS conversion to VB.NET -

The I change how VB.net and even write your own using WMI code All the tools have been tried to try. I LOGOFF a remote computer I am trying does not work with the shutdown-L / M at VBS script that currently work. ? Can anyone show me how to enter into VB.net for strComputer = InputBox ( "machine name / IP address here ...") set objWMI = GetObject ( "winmgmts : {(shutdown)} \\ "+ strComputer +" \ root \ cimv2 ") set colOperatingSystems = objWMI.ExecQuery (" select colOperatingSystems ObjOperatingSystem.Win32Shutdown (0) for each objOperatingSystem in * ") from Win32_OperatingSystem Next I try to generate the WMI code Creator of: dim room as the new management (_ "\\ 192.168.1.105 \ root \ CIMV2") Scope.Connect () as a squared square E Mandnobjekt (Scope, _ New Manejmentpath ( "Win32_OperatingSystem.ReplaceKeyPropery = 'ReplaceKeyPropertyValue'"), _Nothing) in Mandnbejobjekt = _ classInstance.GetMethodParame...

git - GitLab CI Webhooks and Commit Hashes -

मैं निम्नलिखित स्थिति में हूं: मेरे पास दो GitLab repositories master और slave इस समय मैं निम्नलिखित दृष्टिकोण ले रहा हूं: मास्टर के लिए एक सीआई प्रोजेक्ट बनाएं जो कि खींचती है गुलाम एक बिल्ड चरण के रूप में और फिर परीक्षण चलाता है। अब जब भी कोई भी दास पर भी धकेलता है, तब मैं निर्माण को ट्रिगर करना चाहता हूं। ऐसा करने का उचित तरीका वेबहॉकों के माध्यम से लगता है, इसलिए मैंने निम्नलिखित कोड को गुलाम में जोड़ा: अब, जब बिल्ड द्वारा ट्रिगर किया जाता है गुलाम मुझे निम्न बिल्ड त्रुटि मिलती है: सीडी / घर / gitlab_ci_runner / gitlab-ci-runner / tmp / बिल्ड / प्रोजेक्ट-1 & amp; amp; जीआईटी रीसेट - हार्ड एंड amp; जीआईटी क्लीन -फडएक्स एंड amp; Git रिमोट सेट-यूआरएल मूल https: // gitlab-ci-token: 19c72c17f0e69@git.foo.com/slave.git और amp; amp; जीआईटी फ़ेच मूल सीडी / होम / जीटलाब_सीआईरनर / गिटलैब-सीआई-धावक / टीएमपी / बिल्ड्स / प्रोजेक्ट-1 & amp; amp; जीआईटी रीसेट - हार्ड एंड amp; Git checkout cc807f3023451165cd73a258b4e2b01edbc954a4 HEAD अब b38bd72 फिक्स्ड पट्टी घा...

ElasticSearch: Inserting an Element with a _parent field using JEST -

I am using elastic search for an application to store and search the data. Because it is also important to find relationships in my special case, I have recently changed the structure of my data and I am now using the parent field. () I have already designed the search query, which works perfectly well. However, I have a problem when putting a new hair entry in my database. It should work in this way: Without the parent field, when I wanted to get it $ curl - XPUT 'http: // localhost: 9200 / data / child / 1' -d ' I used the Zest API to put the data in such a way: Client.execute (new index builder (payload). Index ("data"). Type ("child"). Build ()); When I want to receive it: $ curl -XPOST localhost: 9200 / data / child? Parent = 154121-d ' How can I implement it using Zest-API? I have already searched an answer on Google / Stackoverflow, but come up with a solution. Thanks in advance! :) Finally I found a sol...

javascript - Is it possible to assign borders to an html table dynamically using CSS and the td value of the cell only? -

I have data from a database that is loaded into an HTML table. Because of this, I can not easily add different sections and IDs to TD. So I have a table of values ​​in a table, call it 1 table. Then I have a second set of values ​​in a different query, in which the values ​​of each "group" are loaded into an html variable which is loaded into a non-displayed table, call this table. I want to use group values ​​in table 2 to assign new boundaries to Table 1. Price does not matter in Table 1. Therefore, I want to use table 2 values ​​to assign boundaries to Table 2. The values ​​in Table 2 are in this way (if I do not want to change them): I will specify each group number (for example 1.1) with a fixed border style which is another table I will not be able to understand these things, but sometimes I do not know what to do or not. So please tell me if you have any ideas or if you think that it has not happened right now. I am able to include javascript, jquery, sql, ...

angularjs - Is it possible to use a dynamic file name for an ng-include? -

Is there a way to use dynamic filenames in ng-in? It does not seem that it is possible so that any option would be very welcome, I have a list of markings to display in different circumstances and I do not have too many if statements. Something I'm trying to achieve: & lt; Div ng-include = "{{file.name}}" & gt; & Lt; / Div & gt; Is this the only possible way to do this ?: & lt; Ng- included src = "file.name" & gt; & Lt; / Ng-included & gt; Thanks in advance for any tips / advice. Yes second code sample is the only way to do this. Why do you want to do it another way?

ios - How to make a designated initializer for NSManagedObject subclass in Swift? -

class alternative: NSManagedObject {@NSManaged on text: String isCorrect on @NSManaged: Image @NSManaged on Bull: NSData } feature init (text: string, isCorrect: Buhl, unit: NSEntityDescription, insertIntoManagedObjectContext reference: NSManagedObjectContext) {optionally = optional (unit: unit, insertIntoManagedObjectContext: reference) = text alternative.isCorrect = isCorrect return as alternative alternative.text Option} I want to create a method that lets me start new items with this call: But I get an error: Optional should be representative with the feature self.init P> Why do I need to convert my initalizer to work for my example? after" a feature Starter must Starter calls the designated self : utility init (text: st Banking, isCorrect: Buhl, unit: NSEntityDescription, insertIntoManagedObjectContext reference: NSManagedObjectContext) {self.init (unit: unit, insertIntoManagedObjectContext: Reference) self.text = text self.isCorrect = isCorrect}...

multipart/form-data support in ClojureScript -

मैं क्लॉज्योरस्क्रिप्ट में मल्टीपार्ट / फॉर्मडाटा कैसे जमा करूं? क्या कोई ऐसा पुस्तकालय है जो इस का समर्थन करता है? मैं उदास करने के लिए फ़ॉलबैक कर सकता हूं jquery.form.js पर एक सादे क्लोज़ोरस्क्रिप्ट समाधान पसंद करते हैं। लो पर एक नज़र: ;; पोस्ट अनुरोध में फ़ॉर्म पैरामीटर (सरल) (http / post "http://example.com" {: form-params {: key1 "value1": key2 "value2"}}) ;; POST अनुरोध (मानों की सरणी) में प्रपत्र पैरामीटर (http / post "http://example.com" {: form-params {: key1 [1 2 3]: key2 "value2"}})) ====== UPDATE ======= आपको कुछ आइफ्रेम हैक की आवश्यकता होगी। पढ़ें और: ;; आयात ([goog.events: as gev]) (: आयात [goog.net IframeIo] [goog.net EventType] (defn अपलोड [] (let [io (iframeIo।)] (Gev / listen io (aget goog) .net.EventType "SUCCESS") # (जेएस / अलर्ट "सफलता!")) (Gev / listen io (aget goog.net.EventType "ERROR") # (जेएस / अलर्ट "त्रुटि!")) (भू / सुनो IO (aget goog.net.EventTy...

deployment - Git deploy branch to server on commit/push -

I am working on a website and started using version control (GIT) and I have some branches ("Master" and "Development" for now). So I am often committed to "development" and push it into a bitbuck. What I have to do, our development web-server should always have the latest version of the "developed" branch, uploading it via FTP. I have full access to this web-server, Windows 2008 R2 (but if necessary, be able to use Linux), then I can install anything that I need. Any thoughts on how to do this? I am quite new to the song, please say what I want to do, is just plain mad. You use a received hook on the remote GIT repository to capture a commitment made in the demand branch And you can deploy this branch (or whatever you want). The received hook will be run on the remote whenever a push is done. You have to basically find out whether the development branch was pushed or not, if it would develop the branch in your deployment direc...

rails test email validation error due to password testing? -

After the latest version of Michael Hart's Rail Guide, I have the following test file in my test / test. model / user_test.rb is required 'test_helper' class UserTest & lt; ActiveSupport :: Test Season Def Setup # prevails # @ user = User.new (name: "example name", email: "example@example.com") # Password and password_conformation after has_secure_password in User.rb @user = User.new (name is implemented: "example name", email: "example@example.com", password: "foobar", password_confirmation: "foobar must be valid" @user claim ") end. ... # other tests # should be valid user testing. "Valid? Valid email address test for end # test first.last@foo.jp Alice + valid_addresses =% W [user@example.com USER@foo.COM A_US-ER@foo.bar.org "Email validation valid addresses Should accept "Bob@baz.cn] valid_addresses.each do | Valid_address | @ User.email = valid_address @ user.valid ?, "# {va...

file - Is Xcode 6.0.1 copying bundle resource into the wrong folder? -

Image
मैंने एक कमांडलाइन एक्सकोड प्रोजेक्ट बनाया है। PyRun_SimpleFile (फ़ाइल, "/ उपयोगकर्ता /pi/Desktop/test_simple.py ") ^ यह काम करता है, लेकिन मुझे अपने प्रोजेक्ट ट्री में test_simple.py होना है। यहां बताया गया है कि मैंने इसे कैसे तय किया : फिर कमांड लाइन से : & gt; लगता है / उपयोगकर्ताओं / pi / लाइब्रेरी / डेवलपर / Xcode / DerivedData / -iname "test_simple.py" / उपयोगकर्ताओं / pi / लाइब्रेरी / डेवलपर / Xcode / DerivedData / test_PyCXX-ewhsclbqmuqouofppbnxmqrnojrv / निर्माण / उत्पाद / डिबग / usr / share / आदमी / मैन ए / test_simple.py इस पथ के निष्पादन योग्य पर इसके द्वारा तैयार की जाती है: / उपयोगकर्ता / pi / library / developer / xcode / deriveddata / test_PyCXX-ewhsclbqmuqouofppbnxmqrnojrv / निर्माण / उत्पाद / डीबग और फिर कोड अनुकूलन: PyRun_SimpleFile (फ़ाइल, "./usr/share/man/man1 /test_simple.py "); ठीक है, यह काम करता है लेकिन / usr / share / man / man1 / के साथ क्या हो रहा है? स्क्रीनशॉट में 'उपपथ' फ़ील्ड ...

php - ERR_CACHE_MISS after migrating server? -

I have a lamp based server, with php as the main language, I recently had a better processor and RAM Together, your server is migrated to a new server. My website was being hosted by the old server for one year when my website was migrated today, for the first time I noticed that was unable to load the resource: net :: ERR_CACHE_MISS Https: //scriptname.php This error has never been shown on the old server. I tested it on 20 machines with chrome, and I find this error often on all pages. what might happen?

publish subscribe - Creating method dependency in java -

मेरे पास दो तरीके नाम हैं जैसे sendSData () और sendCCData () MyClass में। वर्ग MyClass {सार्वजनिक शून्य भेजना एसडीटा ()} {डेटाबेस से जवाब प्राप्त करना} सार्वजनिक शून्य भेजना सीडीटा () {// सी भेजें सी डेटा}} मैं इन दो तरीकों को मुख्य विधि से बुला रहा हूं सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग ... आर्ग्स) {MyClass obj = नया MyClass (); obj.sendSData (); obj.sendCData (); } मेरे लिए sendCData अनुरोध भेजना संभव है अगर और केवल अगर मुझे sendSData () विधि से सफलतापूर्वक उत्तर मिला। मैं इसे जावा में कैसे प्राप्त कर सकता हूं ? भेजेंडेटा () सर्वर पर डेटा प्रकाशित करना अगर मुझे सर्वर से सफलता की प्रतिक्रिया मिलती है तो मेरे लिए sendCData () भेजना संभव होगा। मैं यूसुंग पब / उप मॉडल हूं मैं किसी भी वेब सेवा या आराम सेवा को नहीं बुला रहा हूं रिश्वत प्राप्त करने के लिए मेरे पास अलग ग्राहक हैं सार्वजनिक बूलियन sendSData () {// कार्य सही या झूठे रिटर्न सही नहीं देता है; } सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग ... आर्ग्स) {MyClass obj = नया MyClass (); अगर (obj.sendSData ()) {ob...

.htaccess - asp htaccess 301 redirect -

I'm trying to redirect 3 pages but for some reason, this does not seem to work. The site is built with ASP & lt; IfModule mod_rewrite.c & gt; # Make sure the inactive directory listing + compliant SIM links -indaksjh with Riraitingin at rewrite PDF requests / pdf / IE not to have been the root pre-generation - prepaid / pdf / - Negative look-ahead Use - If the file does not exist, then you get 500 obstacles though it is sad. RewriteCond% {REQUEST_URI} ^ / (?! PDF /) (. *) \. (PDF) $ RewriteCond% {DOCUMENT_ROOT} / pdf / $ 1 -f RewriteRule ^ (. *) $ / Pdf / $ 1 [L] # are not in URI / images / pdf / CSS or / js handler Process this% {REQUEST_URI} to RewriteCond ^^ (/ images / | / PDF / | / CSS / | / js /)! RewriteCond% {REQUEST_FILENAME}! handler.php RewriteRule ^ (. *) $ handler.php / $ 1 [L] # URI in the directory, but the file handler as well RewriteCond% {REQUEST_URI} ^ through does not exist to run it (/ images / | / PDF / | / CSS / | !. / js /) RewriteCond% {REQUE...

java - Javamelody Counter instance taking up a lot of space -

Image
हम उत्पादन में tomcat 7 पर नियोजित एक मॉड्यूल और javamelody 1.49.0 का प्रयोग कर रहे हैं प्रदर्शन का विश्लेषण करने के लिए। हमारी बुनियादी संरचना टीम ने उत्पादन में एक समस्या की सूचना दी है, जहां Javamelody काउंटर को लगभग 900 MB स्मृति रिसाव। क्या यह जाना पहचाना हुआ मुद्दा है। यह हर दूसरे सप्ताह की तरह प्रयोग के कुछ दिनों के बाद होता है और हमें नहीं पता कि यह क्या कारण है। क्या किसी के पास इस पर कोई विचार है?

java - How to check if endpoint was used in a munit test -

I am trying to write the malfunction test (in Java) and I would like to check whether the message passed (or this case ), Through a specific outbound-endpoint, because the flow is routing and message can pass through different people depending on the conditions? My setup is actually using 2 different flow files, a flow logic that uses common end points such as and then the actual end address definition such as The following Java code works verifyCallOfMessageProcessor ( "Outbound-Endpoint"). Time (1); However I want to be able to specify the specific name of the endpoint I have tried the following but none ) withValue ("out.endpoint"). Time (1); .. VerifyCallOfMessageProcessor ("(" name ") with Verify callout message processor (" Outbound-Endpoint "). Outbound-endpoint ") withAttributes (. ("Out") withValue ("out.endpoint") times (1); VerifyCallOfMessageProcessor ("End Point") with...

Execute External Console Application From Dynamics CRM -

I need to execute a console application from Dynamics CRM. What is the best way to do this? The app should be executed on a daily basis. Thank you. If you still need to have a console application run on a program, then let me know the Windows Task Scheduler Should be excellent. Here's a link to MSDN: You can also use a SQL Server agent to run a console application but it requires a little more setup

java - cannot retrieve integer from intent in android broadcastreceiverclass -

I am new to Android development and am trying to create my first app. When I send an intent to a activity to broadcast recipient , then I need to get the addition, but the broadcaster will have to GetIntent not supported () .getExtras () . The broadcast receiver will give you the intent, you simply get additional from it as a parameter to obtain To override the on-method method: Override public null at @Receive (reference reference, intent to intent) {bundle extras = intestine. Gate extras (); // something with Extrasstras}

Ruby - escape a number leading variable name -

I'm already using () to insert a table that exists, but some table fields and With variable number starting at present, I am currently receiving a syntax error "unexpected tIDENTIFIER" in Ruby when I try to do something like the following - foo.each do | X | Object. Create (3pm: x.3pm, 3pa: x.3pa) and If I call it '3pm' = & gt; X.3pm , it gives me a syntax error on the x.3pm section. How can I survive to succeed it? The problem is that 3pm is not in Ruby, in Ruby, : Name With the syntax and the name of the method, the symbol symbols should be both valid identifiers. In the case of the key, instead of using the symbol literals for the syntax, or : 'name' as you've searched for: foo.each do | X | Object. Create (= '3pm' =>; x.3pm, '3pa' => x.3pa) end Unfortunately, this still is the problem of 3pm Leave and 3pa are not valid method names, generally, because these are not the names of valid met...

c# - Create instance of an unknown type and work with it -

I have a controller in MVC that checks the role of authenticated user. The basis of its role on the role of making an example of a class For example, if the role is "student", then I have to make an example of a student class. I am trying to do something like that but it does not work: Private user current user; Switch (roll) {case "student": current user = context.students. FirstOther Default (STD = & gt; STD.USIRID == WebSure.ContentUserIDID); break; . . . } But I can not define student properties, for example, when I want to get CurrentUser.firstname, no such property is available! How can I retrieve the current user? You defined CurrentUser as the object type. This will not have the properties of student , unless you insert it. Private User Current User; You can use an interface or common base class, e.g. public class person {public string first name {get; Set; }} Public class students: Add special properties for persons {// stude...

html - Possible to use "tbody data=" to provide custom bindings to only some of the td's in a tbody? -

I have entered a custom keybinding named name, which is to call the user a function such as data = I have: toggle TD ... TD ... TD ... TD ... I want to apply the data of this entry only to the bind of the last 2 TD. When I try to add myself to the TD database, it does not work for any of them. But when I keep entry in the bidding: Toddy data = to (Enter: 'save') This will hit every TD cell It's good to enter to save it, but I only want to work this functionality for the last 2 cells. Is there anything that I can force to ignore the first two cells? Sorry if I'm asking it in a difficult or wrong way "post-text" itemprop = "text"> I do this: to compulsivehandlers.centre = {init: function (element, value difference, sub binding, view modell) {var callback = value assor (;); $ (Element) .keypress (function) {var keyCode = (event.which? Event.which: event.keyCode); if (keycode === 13) {callback.call (viewModel); Return re...

html - Once an element has been clipped how to you un-clipp it -

I am working on a web page for a class and we have to clip an image so that only a small box will appear But when we finish it, it has to return to full size. .marker page {background color: RGB (70,76,222); Width: 150px; Height: 170px; White color; Status: Completed; Range radius: 15px; Overflow: visible; Z-index: 1; Clip: Rect (0 pixels, 20px, 20px, 0px); }. Marker P: Hover {} The original dimension is 150 x 170, then it is cut in 0,20,20,0 how do I return it to my full dimensions when the mouse is 20x20 . Marker page: Hover {width: 140px; Height: 170px; }

javascript - don't chang checkbox value -

I want to define the new role after adding the checkboxes in javascript (change the checkbox value when clicking on it). But this is my code: $ (document) .change ('add', function () {$ (". Activateuploadedpic") click (function () {if ( $ (This) .val () == 'true') {$ (this) .attr ('value', 'false');} and {$ (this) .attr ('value', 'true'); }}};}); You can change it: $ (".activateuploadedpic") (function () {$ (this) .attr ("value", $ (this) .prop ("checked"));}; & lt; Script src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Input type = "checkbox" value = "false" class = "activateuploadedpic" />

java - Regex to match string of unique characters -

This is my regular expression: ((AZ)) + ) I want every letter to be displayed most often, unfortunately it is not working properly, because this input: Go ABCC ^ (GO: ([AZ]) (?!. * * 2)) + $$

ffmpeg - Altnerative to Gnash -

I am currently using Gnash for my video conversion features - especially to pass it to FlashVars (SWF) Is capable of Although it is old and slow, is there a new fast alternative option that supports Flash Weir? Shamway is an HTML5 technology application for SWF file format without a loyal and native code support. Efficient Renderer

how do i assign constants on sqlite using ruby? -

Image
I am new on rail and I have a problem, I want to add entries with value 0 on my DB, but only Form values ​​are included. _form.html.erb & lt; Div class = "field" & gt; & Lt;% = f.label: name% & gt; & Lt; Br> & Lt;% = f.text_field: name% & gt; & Lt; / Div & gt; & Lt; Div class = "field" & gt; & Lt;% = f.label: league% & gt; & Lt; Br> & Lt;% = f.number_field: League% & gt; & Lt; / Div & gt; & Lt; Div class = "field" & gt; & Lt;% = f.label: Color% & gt; & Lt; Br> & Lt;% = f.text_field: Color% & gt; & Lt; / Div & gt; & Lt; Div class = "verb" & gt; & Lt;% = f.submit% & gt; & Lt; / Div & gt; & Lt;% end% & gt; Controller def make @ tam = team.New (team_most) enddef team_param parameter.quare (: team). Passit (: name, League, color, points: 0, owner: current_user.id) end CMD output: So m...

c++ - Count the number of occurrences in a string vector -

I have a type of string that contains the following: tpNums includes: 2 15 38 43 50 5 14 16 29 53 I am trying to take the contents of the vector and calculates the number of the number of vector in this number, in this case they all appear only once. ; The following code: std :: map & lt; Std :: string, std :: size_t & gt; result; Std :: for_each (start (tpNums), end (tpNums), [& amp;] (std :: string const & amp; s) {++ results [s];}); My question is, how do I output the contents of the resulting map? Is my problem easy to solve or is this the only way? Edit: I have tried to: std :: map & lt; Std :: string, std :: size_t & gt; result; Std :: for_each (start (tpNums), end (tpNums), [& amp;] (std :: string const ...) Results [s]; cout & lt; Output: 1112 I do not think I am doing the right thing, I have tried in different ways, but In order to dump the contents of the map, you can see the general / map :: Send "post-tex...

parsing - Can a table-based LL parser handle repetition without right-recursion? -

Image
I understand how an LL recurring root parser can handle the rules of this form: A = B *; With a simple loop that checks whether looping is to continue, depending on whether the letterhead matches the terminal in the first set of token B. However, I am curious about table based LL Parser: How can the rules of this form work? As far as I know, the only way to handle repetition in one way in this way is through correct-reaction, but in that case the partners are disturbed where a right-associative parse tree is not desired. is. Because I am currently trying to write an LL (1) table-based parser generator and I am not sure how to deal with such a case without changing the intending parse tree size Be controlled. > Grammar Let's expand your ENNF grammar into simple BNF and assume that b & lt; E & gt; is an empty string: A -> X-X - & gt; Bx x - & gt; & Lt; E & gt; B - & gt; B This grammar generates the string of the term b o...

sorting - Is there always a way to alphanumerically name something, so that it is ordered between two given places in a list? -

What do I mean ... say that you have files named 4A, 4B and 4C. If I want to create a file, which is alphanumerically sorted, then between 4A and 4B is kept? The key word in the question is "always" (this is what I believe) "file names Also for the set (wire) ". Not only two letters. I answered "yes" before, because it seems that you can add a letter to make a string between any given two strings. However, its answer is "no" in fact. In this "alphanumeric" sequence, there is actually a "next element" for each element, and you can not put anything between an element and this is the next element. There is no string between "4a" and "4a0" supplement : The question means that the alphabet for the filename is "alphanumeric", which means [0..9a..zA..Z], and the sorting should be alphanumeric (as commonly defined has gone) . In this case, the answer (as stated above) is "no...

javascript - Not able to create a new record -

I am trying to do this work for countless hours. I am not able to find an answer, which I can understand on the web. Other beginners like me can have an issue I have, so I am posting my question: I get this error in my Eber App: Unmute Error: Expiration failed: You can only add a 'user' record in this regard I am trying to create a new record of "Cond". But I'm unable to add the 'User' object to the newly created Cond instance attribute. However, with Chrome debug tool, I can see that 'User' is not zero or undefined. Here is the controller which is the accident: App.BookController = Ember.Controller.extend ({Requirements: 'User', User: Ember.computed.alias ("Administrator. User"), Frequency : ['Every minute', 'every day', 'every day', 'every week', 'every month', 'every quarter', 'every year', 'continuous'], desired: 'Every month' , Verbs: {Crea...

c++ - SDL_TTF header giving me trouble -

After a virus forced me to reset the factory condition, I was trying to install SDL on my computer Was there. It was easy to run SDLs with my IDE, CodeBlocks, but setting up the extension library is so low that CodeBlocks recognizes the existence of libraries, but I am giving a lot of errors inside the SDL_ttf header and the SDL_image header. The section of the code is: C / * Set for C function definitions, even if C ++ * / #ifdef __cplusplus extern "C" {# Endif first line error "generates error: expected The ineffable-id string before continuous ", and the third line generates the error above and error" error: 'before the end of the expected'} 'line. I guess there could be something in it that the SDL was written in C. And maybe my codeboxes have not been configured to recognize C. Edit: The test source code is: SDL_Surface * imageBlitingFunctions :: loadText ( Uint8 red, Uint8 blue, Uint8 green, std :: string fontname, int fontSiz...

c# - How to create a time based event in a MVC5 website? -

What is the best design for time-based events? For example, sending a reminder to users, for example, as 60 days after their last login or after that? The system is currently built on MVC 5 5, so I was thinking of adding some chronos to the action in the Base Controller that will trigger all investigations and stuff and all incident-based functions. I was thinking that another approach was to actually create a desktop app and it is running all the time and gets push notifications on the new user's registration on the SQL server and after that Just keep the list and ask the server to send email as soon as you send it to 60 days, or to get the last login date for every day and to send the required email to any user. I found it on another question: And wanted to ask if it would be a better option for the system? A better example would be that a newsletter should be sent to some users every month. How will this be implemented? So finally I ended up using quartz.net. ...

java - getDispatcherType() is undefined for the type HttpServletRequest -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैंने जावा गतिशील आयात किया है वेब प्रोजेक्ट को एक्लिप्स आईडीई में (जो कि ईक्लिप्स आईडीई में लागू किया गया था और ठीक से काम कर रहा था)। मुझे " getDispatcherType () प्रकार HttpServletRequest के लिए अनिवार्य है "प्रोजेक्ट चालू करते समय त्रुटि। मैंने हर फाइल की प्रतिलिपि के अनुसार आईडीई में कॉपी किया है और काम पूरा हो गया है। अब मुझे सिर्फ यह जानना है कि मैं क्यों मुझे इस त्रुटि मिल रही है जब मैंने इस परियोजना को आयात किया है क्या किसी को भी इसी मुद्दे का सामना करना पड़ा? कृपया मुझे बताएं कि मैंने क्या गलती की है। मेरे पास एक ही समस्या थी जब मेरे पास परस्पर विरोधी था Servlet-api संस्करण मैं IntelliJ में उपयोग कर रहा था जो टोमकैट 8.0.x में समर्थित था के साथ विरोधाभासी है ... मैं मैवेन का उपयोग कर रहा था, इसलिए मैंने इसे मेरी निर्भरता को बदल दिया, फिर मेरे वेबपेज का एक साफ तैनात किया और समस्या दूर चली गई । & lt; निर्भरता & gt; & LT; ग्रुप & gt; javax.servlet & lt; / ग्रुप & gt; & ...

command line - zsh alias open chrome with localhost port -

I am trying to create a nickname in my zsh alias to open Chrome with a local host: 9292 URL: How do I go about adding local hosts and ports? I have to do this work where it adds an application for my surname, but will not open correctly, what do I have here: / app / Google \ Chrome.app/Contents/MacOs / Google \ Chrome --port = 9292 When I the message mistake there may be someone Before I can help to understand how I can run my nickname surname devdocs = "/ application / Google \ Chrome.app/Contents/MacOs/Google \ Chrome" localhost and por With the loading? Thank you, Rob open Http: // localhost: 9292 If Chrome is your default browser or open http: // localhost: 9292 -a / application / Google \ Chrome.app if not . Or write a function that is a port function lh () {if [$ # -eq 0]; Then open http: // localhost: 3000 others open http: // localhost: $ 1 fi}

javascript - async call in jade template -

My web app contains a master jade template that contains all the main components to load on each page of the app. One of the novars I have divided into another template. This navbar has a dropdown that needs to be dynamically populated with DB. The problem I am experiencing is that I want to populate the dropdown at that time while the Nabar Bar is provided because I am using Express 4.0 with NodeJSS, I have a supporting function Which would populate the list directly inside the navbar template. Because this function is async, however, the drop-down item render itself nine times even before it is received from DB. I also thought to use AJAX on page loads or even just pre-templates the dropdown item, but I have to call each res.render () in my controllers on this Do not want to go to the list. What is the best way to go about doing this? sample templates master.jade: doctype html html (lang = n) head block title body # Navier block headerContent #content block content...

python requests api - http multipart post with file and form-data -

Use of Requests 2.4.3. I want to post a file and send some fields from one form to my flask server. I already have an angular app that confirms that the flask is working btw this topic But on the basis of various threads I have not tried to get some benefit. data = {'formfoo': 'whatever'} files = {'Test.csv': open (trappath, 'rb'), 'data': json.dumps (data) )} Resp = Super (session, auto) .post (url, files = files, verify = false, header = multipart) ## This error brings the ### file "../2.7/lib/python2.7/ Json / decoder.py ", value alière (" no JSON object can not be decoded ") in row 382, ​​raw_decode b) separate data and files from the post API data Pass = {'formfoo': 'whatever'} files = {'test.csv': open (fpath, 'rb')} resp = super (session, auto). Post (url, data = data, file = files, verify = false, headers = multipart) ## brings this error. Increase value error in "raw...

mysql - how to store null values in listbox c# -

Image
I am developing a window store app and there are several list boxes to get the data in the database, it is my MySQL Database screenshot is that null After value the database list box is not filled with the data shown in the form of the following screenshot I I want to keep blank values ​​blank and store other details How can I do this? Here is the C # code Private Zero Button_View_Click (Object Sender, RoutedEventArgs E) {listb0.Items.Clear (); Listb1.Items.Clear (); Listb2.Items.Clear (); Listb3.Items.Clear (); Listb4.Items.Clear (); Try {string query = @ "SELECT * FROM` bcasdb` .`tbl_results`;"; // This is the command class which will handle the query and the connection object. MySqlConnection conn = New MySqlConnection (BCASApp.DataModel.DB_CON.connection); MySqlCommand CMD = New MySqlCommand (query, conn); MySqlDataReader MyReader; Conn.Open (); MyReader = cmd.ExecuteReader (); // This query will be executed and the data will be saved in the database. W...