‏إظهار الرسائل ذات التسميات value. إظهار كافة الرسائل
‏إظهار الرسائل ذات التسميات value. إظهار كافة الرسائل

الأحد، 5 يناير 2014

Check the Errorlevel value and process the if command

The "problem" with your code is that when the parser reach that line, the %errorlevel% variable is replaced with its value, and then the line is executed. So, any change to the value of the variable is not seen. The "usual" way of handling this cases is enabling delayed expansion and change the %errorlevel% sintax with !errorlevel! to indicate the parser that the value will change and need to be retrieved at execution time.

But, in this case, as you have the requirement of a "one liner", change the if test to

if errorlevel 1 (echo "SQL Not Installed") else (echo "SQL Installed")

A standard construct to check for errorlevel without reading the variable value.

You have also the posibility to code it as

reg query .... && echo Installed || echo Not Installed

This executes the reg command (with all your parameters, of course). On success, the command after && is executed. On failure the command after || is executed.


View the original article here

How can I submit value to javascript without submitting onclick

How can I submit an input value to a javascript function without submitting my onclick button? Here is the code:

I want to be able to submit the value to a javascript here is the code:

function myFunction() { var x = document.getElementById("demo").value;

Basically i want to submit my input value without having my submit button. Here is the code:

How can I submit my input without having a submit button?


View the original article here

Business rule fails to clear field value

I followed this tutorial to copy address field values. It works nicely but I got to thinking how can I make this better for my users..should have left well enough alone I know.

So I was thinking what if they selected the check box to copy the address1 fields by mistake out of habit. So I thought that it would be easy enough to just create a second business rule to clear the address2 fields.

Well the clear address rule is not working at all and yes it is activated. I mimicked the tutorial creating another custom field "clear address" then set my business rule that if that field has a value of true the set address2 fields value to "".

Doh it won't accept an empty value. Tried all sorts of gyrations no go. So I created another custom field (this is all in a development vm sandbox) called emptytext. It is a 1 char text field.

I then went back to my business rule and changed it to set the address2 fields to the emptytext field and that didn't work.

Ohh yes the field probably has to be on the form. So I put it on the form and hid it.

Now everything works but is this really the best way to set a text fields value back to empty?

Thank You


View the original article here

الجمعة، 20 ديسمبر 2013

Mysql - data monipulation - update part of value

Mysql table contain column with date type. There are some rows with different dates (i.e. 2008-01-20, 2007-02-25)

Is there some mysql queue syntax to update only values with 2007 year to 2010 without changing month and day.

And the same question about changing only month. Thanks


View the original article here

Getting value from dynamic table in Android

This was my code for creating table and appending the data dynamically

table = (TableLayout)findViewById(R.id.table); inflater = getLayoutInflater(); for(int i = 0; i < 5; i++) { row = (TableRow)inflater.inflate(R.layout.row,table, false); TextView text = (TextView)row.findViewById(R.id.text1); text.setText("sss:" + i); text1 = (EditText)row.findViewById(R.id.text2); `enter code here` text2 = (TextView)row.findViewById(R.id.text3); text2.setText(""); text1.addTextChangedListener(new MyWatcher(text2)); table.addView(row); }

this code is working fine but my problem is when i click the button i want to get the values from each row which is to be only filledenter code here

NxtBtn.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { } });

please help me out in this.


View the original article here