-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I need to encrypt a number and I and this encrypted value will be given to a customer ask a key so I want to minimize the number of digits and make them all printable.
So I'd like the result to be either all number or all Hex characters.
The current encryption method I'm using (for non numbers)…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a table:
'objects' with few columns:
object_id:int, object_type:int, object_status:int, object_lati:float, object_long:float
My query is :
$stmt = $db->query('SELECT o.object_id, o.object_type, o.object_status, o.object_lati, o.object_long FROM objects o WHERE o.object_id = 1');
$res =…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
can someone help with this?
I need the following function to do this...
$x = 'AAAABAA';
$x2 = 'ABBBAA';
function foo($str){
//do something here....
return $str;
}
$x3 = foo($x); //output: A4B1A2
$x4 = foo($x2);//output: A1B3A2
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
How can I find the least prime number greater than a given number? For example, given 4, I need 5; given 7, I need 11.
I would like to know some ideas on best algorithms to do this. One method that I thought of was generate primes numbers through the Sieve of Eratosthenes, and then find the prime…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
What's the simplest way of changing a negative number to positive with ruby?
ie. Change "-300" to "300"
>>> More