<input type='text' id='txt' name='txtName' size='20' value='testing'/>
<script type="text/javascript" language='javascript'>
var val = document.getElementsByName('txtName');
alert(val[0].value);
alert(window.txtName.value);
</script>
In above code we are using
alert(val[0].value);
alert(window.txtName.value);
these two ways ...
include("somefile.php");
include_once("somefile.php");
require("somefile.php");
require_once("somefile.php");
What is the difference between these?
...
I need to compare two dates to show an edit link if it is within 5 mins after the post was made, in php. If after 5 mins dont show anything.
$answer_post_date = get_the_time("Y-m-d");
$current_date = date("Y-m-d");
$formated_current_date = strtotime($answer_post_date);
$formated_answer_post_date = strtotime($current_date);
At this p...
What is the difference b/w these extentions.
1. *.htm or *.html //HTML
2. *.jpg or *.jpeg or *.jpe //Picture format
3. *.pl or *.plx //Perl
Thanks,
...
What is the difference between these code snippets?
1)
$f = 12.044545;
printf("%f",$f);
vprintf("%f",$f);
2)
echo("echo");
print("print");
Thanks,
...
Hi everyone,
I'm wondering why the Motorola Milestone with 2.1-update1 behaves differently from the Emulator or e.g. the Nexus One. I am trying to exit my app with:
@Override
protected void onPause() {
if(mayDestroyActivity) this.finish();
super.onPause();
}
This works well on either Emulator or Nexus One. onDestroy() gets ca...
I have made this function to calculate color differences in the CIE Lab colorspace, but it lacks speed. Since I'm not a Java expert, I wonder if any Java guru around has some tips that can improve the speed here.
The code is based on the matlab function mentioned in the comment block.
/**
* Compute the CIEDE2000 color-difference betwe...
Hi, since I started iPhone/iPod Development I have come across some differences between how the simulator and how real device react. Maybe I will come across some other differences I will have to figure out as well, maybe other people haven't met these problems here (YET) and can profit from the knowledge, and maybe you know some problem...
if (myFloat == nil){
\\Do Method
}
In the above situation, the method will run only if myFloat is nil. Will it also run if myFloat was set to 0?
...
I'd like to know the difference between string and StringBuilder and also need some examples for understanding.
...
hi there,
I found this post: http://stackoverflow.com/questions/118143/python-regex-vs-php-regex but I actually did not get if Python's REGEX syntax matches PHP's REGEX syntax.
I started to convert some of my old PHP code to python (due to g's appengine etc.), and now I would like to know whether the regex is 100% convertable, by simpl...
Hi
I need to generate two dates in the format YYYY-MM-DD example : 2010-06-09
for the last 30 days so end date is today and start date is today - 30 days
can you help me generate those two dates in the previous format YYYY-MM-DD
thanks folks
...
I need to find which id numbers are missing inside s.data compared to users.
Is there a better(smaller code) way to compare?
Thanks ;)
if(users.length != undefined)
{
for(y=0;y<users.length;y++)
{
var left = true;
for(y2=0;y2<s.data.length;y2++)
{
if(users[y].client_id==s.data[y2].client_i...
Recently I have read about hash-tables in a very famous book "Introduction to Algorithms". I haven't used them in any real applications yet, but wanted to. But don't know how to start.
Can anyone give me some samples of using it, for example, how to realize dictionary application (like ABBYY Lingvo) using hash-tables?
And finally wanted...
Dear reader,
I've got two vector<MyType*> objects called A and B. The MyType class has a field ID and I want to get the MyType* which are in A but not in B. I'm working on a image analysis application and I was hoping to find a fast/optimized solution.
Kind regards,
Pollux
...
how can i create an opposite of a hexadecimal color? for example, i'd like to convert 0x000000 (black) into 0xFFFFFF (white), or 0xFF0000 (red) into 0x00FFFF (cyan). those are rather basic colors, while variants of colors can have more complex hexadecimal values, such as 0x21B813 (greenish).
are bitwise operators required for this? m...
Hi,
Can someone describe the main difference between table data gateway (TDG) and data access object (DAO) ?
TDG can operate with all row for that table but so and DAO (DAO can save, delete the specified object, but also can do operations on entire table)
Regards
...
Possible Duplicate:
How do I calculate someones age in C#?
I want to calculate basically the age of employees - So we have DOB for each employee, So on
the C# Side I want to do something like this -
int age=Convert.Int32(DateTime.Now-DOB);
I can use days and manipulate then get the age...but I wanted to know if there some...
I have a client-server project and was searching for the better way to handle the requests from the clients so some people adviced that the Asynchronous mode is better than the synchronous one and the thread pool mode. My question is why ? and is there a disadvantages in the Asynchronous mode ?
...
This is what I need to do: I need to perform a PHP operation, then retrieve how long ago the last time the operation was performed was. I have it all figured out, except one thing - how do I find the difference between two date/times? Or, is there an easier way to do this? (This is based in Wordpress, so I'm using wp_options to store the...