[Solved] How to check the option value in drop down with previous value? [closed]

$(document).ready(function(){ $(‘body’).delegate(‘#DropDown_Year’,’change’,function(){ var prev = $(this).find(‘option:selected’).prev().val(); if($(this).val() == prev ){ alert(‘Matched’); //your curent value and previous value are the same }else{ //not same } }); }); 3 solved How to check the option value in drop down with previous value? [closed]

[Solved] Run a shell script on boot in ubuntu [closed]

Probably you want it to run at the time of login. Put it in .bashrc If you want to see it before login to tty0-tty6, put the text “Welcome Davide, have a nice day” in /etc/issue. [Adition by fedorqui]: If you want it to be displayed on tty0-6 AFTER login, put it in /etc/motd. This … Read more

[Solved] I want to check if sq. root of a number is int

Do something like below : double a = 5, b = 25; short count = 0; for (double i = a; i <= b; i++) { double sqrut=sqrt(i); if ((int)(sqrut) == sqrut) { printf(“Perfect square %.0f found\n”, i); count++; } } printf(“Total number of perfect squares is %d\n”, count); or like below : double a … Read more

[Solved] Java static instance

This code reminds me of Singleton Class in java. public class Runa { private static Runa singleton = new Runa( ); /* A private Constructor prevents any other * class from instantiating. */ private Runa() { } /* Static ‘instance’ method */ public static Runa getInstance( ) { return singleton; } /* Other methods protected … Read more

[Solved] What’s the difference between following two scripts written in JavaScript? [closed]

Instead of submit, try using input type button… <input type=”button” class=”btn btn-primary” name=”submit” id=”submit” value=”Back” onclick=”javascript:window.location=”https://stackoverflow.com/questions/23087236/login.php”” /> solved What’s the difference between following two scripts written in JavaScript? [closed]

[Solved] Converting number to word

First of all take hundreds place digit by deviding by 100 and print corresponding number by calling method numberToWord((number / 100), ” HUNDRED”); since number / 100 would be in between 0 to 9 so it will print digit in word concatenated by HUNDRED. Now you left with two digit number for that you directly … Read more

[Solved] how to echo an onlick function in php [closed]

Try this foreach($people as $row){ echo “<form action=”https://stackoverflow.com/questions/23799703/.base_url().”some_controller/hideSingleApp_idx method=post>”; echo “<td>”.$row->description.”</td>”; echo “<td><input type=image src=”https://stackoverflow.com/questions/23799703/.base_url().”hidebutton_white.png height=17 width=17 onclick=’return confirm(\”You sure nigga?\”)’/><br></td></form>”; 1 solved how to echo an onlick function in php [closed]

[Solved] How to save data in mysql from cookies in php? [duplicate]

Your question is not clear, but it may be useful to you. You can iterate over php cookie array and insert it in your table. foreach($_COOKIE as $name => $cookie){ // you can check any conditions based on cookie name $name $query1 = “INSERT INTO table_name(field_name) VALUES(” . mysql_escape_string($cookie) . “)”; mysql_query($query1); unset($query1); } 3 … Read more