I need a regular expression to validate the mobile number up to 9 digits, if the telephone number starts with 8 otherwise 10 digits needs to be entered.
Each input field in the CKEditor dialogs are renamed with a unique number, but the number changes depending on what options are visible.
I need to reference 'txtUrl' which has an id something like #35_textInput.
So far I have discovered that something like this should work:
alert(CKEDITOR.instances.myElement.document.$.body.getId('txtUrl'));
But it doesn't. Please help.
i would like to update the numbers i've added to an array from variables, when those variables change. is it possible change these variables and have the array update automatically?
var first:Number = 1;
var second:Number = 2;
var myArray:Array = new Array(first, second);
first = 3;
second = 4;
trace(myArray) //outputs 1,2
I want to retrieve Name,Number,Company,and Designation so I am retrieving it using 2 cursor as follow
Cursor cursor1 = getContentResolver().query(Data.CONTENT_URI,
new String[]{Organization.COMPANY, Organization.TITLE}, Data.MIMETYPE +
"='" + Organization.CONTENT_ITEM_TYPE + "'", null, null);
Cursor cursor2 = getContentResolver().query(Phone.CONTENT_URI,
new String[]{Phone.NUMBER, Phone.DISPLAY_NAME}, null, null, null);
but How retrieve using one cursor or passing query one time only.
Write a recursive method that converts a decimal number into a binary number as a string. The method header is as follows:
public static String convertDecimalToBinary(int value)
I want to compare to variables, both of type T extends Number. Now I want to know which of the two variables is greater than the other or equal. Unfortunately I don't know the exact type yet, I only know that it will be a subtype of java.lang.Number.
How can I do that?
Thanks!
How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?
select * from Tags
where Name in ('ruby','rails','scruffy','rubyonrails')
order by Count desc
In this query, the number of arguments could be anywhere from 1 to 5.
I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some fancy SQL Server 2008 specific way of doing it elegantly, I am open to that.
My Python program does a series of things and prints some diagnostic output. I would also like to have a progress counter like this:
Percentage done: 25%
where the number increases "in place". If I use only string statements I can write separate numbers, but that would clutter the screen. Is there some way to achieve this, for example using some escape char for backspace in order to clear a number and write the next one?
Thanks
i would like to update the numbers i've added to an array from variables, when those variables change. is it possible change these variables and have the array update automatically?
var first:Number = 1;
var second:Number = 2;
var myArray:Array = new Array(first, second);
first = 3;
second = 4;
trace(myArray) //outputs 1,2
I have an orientation expressed with a quaternion and an angular velocity expressed as either a quaternion or a number (radians per second around the original orientation). I understand how to do this using conversion to axis-angle but that method is rather computationally expensive and is not a realistic option. How would I go about modifying the orientation quaternion given a time interval (in seconds)? I need a solution for both cases (the quaternion and the number).
write a program to find the sum of the logarithms of all the primes from 2 to some number n, and print out the sum of the logs of the primes, the number n, and the ratio of these two quantities in python
I have a simple array like:
var myArr=["one","two","three"];
an I have a counting loop, which increases the value of var "i" by one.
What I want to do is print the next value from the array each time the loop runs, next to a text string, like so:
alert('value number '+myArr[i]+);
But for some reason I can't get this to work.
The following code works, so I'm assuming I'm not calling the counter right:
alert('value number '+myArr[0]+);
I'm trying to write a regular expression which specifies that text should start with a letter, every character should be a letter, number or underscore, there should not be 2 underscores in a row and it should end with a letter or number. At the moment, the only thing I have is ^[a-zA-Z]\w[a-zA-Z1-9_] but this doesn't seem to work properly since it only ever matches 3 characters, and allows repeated underscores. I also don't know how to specify requirements for the last character.
my pattern is the following:
{(code)}
where code is a number (up to 6 digits), or 2 letter followed by a number.
For example:
{(45367)}
{(265367)}
{(EF127012)}
I want to find all occurrences in a long string, I can't just use pure regex , because I need to preform some action when i find a match (like logging the position and the type of the match).
I need to generate random integer between 1-n (where n is a positive whole number) to use for a unit test. I don't need something overly complicated to ensure true randomnesses - just an old fashioned random number.
How would I do that?
i know this connects to my original question but i put it here so it is seen by people afresh.
after passing each line of the code into a string,
how can i count the following things:
--the number of standalone functions and member functions per class
--the number of lines per function?
I need a little piece of advice.
I have a test page with 2 fields: word number and URL
Also i have a button Push.
When i push the button i want to open the specified URL (it's local html files) and highlight the word at the "word number" position
Of course the code must ignore element nodes (<p>,<b>,<table> and so on)
I have a MySQL query that:
gets data from three tables linked by unique id's.
counts the number of games played in each category, from each user
and counts the number of games each user has played that fall under the "fps" category
It seems to me that this code could be a lot smaller. How would I go about making this query smaller. http://sqlfiddle.com/#!2/6d211/1
Any help is appreciated even if you just give me links to check out.
The Django documentation gives en example like so:
b = Blog.objects.get(id=1)
b.entry_set.all()
Which from what I understand results in 2 queries. What if I wanted to get the blog, the blog entries and all the comments associated with that entry in a number of queries that does not depend on the number of entries? Or do I have to drop down to SQL to do that?
I have an asp.net web app storing user's cellphone number in Sql Server 2005.
I want to use C# to encode cellphone number for security reason.
Which encryption method should I use for cellphone Encode and Decode?
DES?AES?RC4 or something else?
I have an issue in the mind and that is since the jump instruction changes EIP register by adding signed offsets to it(if I'm not making a mistake here), on IA-32 architecture how would going upward in memory from location 0x7FFFFFFF(biggest positive number in signed logic) to 0x80000000(least negative number in signed logic) be possible? or maybe there shouldn't be such jump due to the nature of signed logic?
Hello!
How do i get the actual max length of a specified column in php?
For instance, this table:
id - int(11)
name - string(20)
I want in php to select the maximum number of characters that a field can have, like
SELECT length(name) from table1
and it should then return 20 (since its the maximum number of characters for that field).
Is there a function in php wherein you can convert the number 12 to its equivalent in a month.
For example if the mysql database stores digits and not words for dates.
how do you convert the number 12 into the word december?
How do I show the dates number format next to its name in the array using PHP? So that the number format is saved in the database and the month name is displayed?
Here is the php code.
$month_options = array("Month", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");