Posts

Coin of the day _ NXS

Check out Nexus

Coin of the day: Watch Data Coin

Coin of the day: Watch Data Coin

Coin of the day: Buy IOTX Coin

Coin of the day: Buy IOTX Coin

Coin of the day: Buy sky Coin

Coin of the day: Buy sky Coin

Download 4scholars

#4scholars #App on Google Play Store

https://play.google.com/store/apps/details?id=frauntraiz.scholars.org

#4scholars #App Direct Download

https://4scholars.org/download/4scholars.apk

#Enjoy

Buy Sky Coin Now

Crypto Day Trade and Time Alert

Buy Sky Coin Now
Market : Binance


Php generate coupon or vouchers

function generate_promotion_code($no_of_codes=10, $exclude_codes_array="bb,hh", $code_length=4)
{

$characters = "0123456789 abcdefghijklmnopqrstuvwxyz";
$promotion_codes = array (); //this array is used to receive promo code generated

for ($j=0; $j <$no_of_codes; $j++)
{
$code="";
for ($i=0; $i <$code_length; $i++)
{

$code.=$characters [mt_rand (0, strlen ($characters) - 1)];

}//if the generated four random number is no longer we defined $promotion_codes function inside the

if (! In_array ($code, $promotion_codes))
{
if (is_array ($exclude_codes_array))//
{
if (! In_array ($code, $exclude_codes_array))//has ruled out using the coupon code in the
{
$promotion_codes [$j]=$code; //Will generate new promo code assigned to promotion_codes array

} else
{
$j --;

}}
 else
{
$promotion_codes [$j]=$code;//the promo code assigned to the array

}}
 else
{
$j --;

}}

return $promotion_codes;

}
echo ' Promotion/Discount Codes echo ';
print_r (generate_pro…

Group by reversible pair

You can use a UNION of two subqueries:
SELECT user_id, MAX(ts)AS last_timestamp, SUM(cnt)AS number_of_messages FROM(SELECT to_user_id AS user_id, MAX(timestamp)AS ts, COUNT(*)AS cnt FROM chat WHERE from_user_id =1GROUPBY to_user_id UNIONALLSELECT from_user_id AS user_id, MAX(timestamp)AS ts, COUNT(*)AS cnt FROM chat WHERE to_user_id =1GROUPBY from_user_id )AS tmp GROUPBY user_id ; Two indexes, on (from_user_id, to_user_id, timestamp) and (to_user_id, from_user_id, timestamp) would help efficiency of the subqueries.

Get same hash code

// Get same hash code
$user1 = 1;
$user2 = 2;

$hash1 = sha1(max($user1,$user2));
$hash2 = sha1(max($user2,$user1));

echo $hash1.'


';
echo $hash2.'


';


?>

How to write quiz for 4scholars.org

<br /> <br /> <?xml version="1.0" encoding="UTF-8"?><br /> <items> <br /> <item><br /> <question>first</question><br /> <option1></option1><br /> <option2></option2><br /> <option3></option3><br /> <option4></option4><br /> <option5></option5><br /> <option6></option6><br /> <answer></answer><br /> <description></description> <br /> </item> <br /> <item><br /> <question>second</question><br /> <option1></option1><br /> <option2></option2><br /> <option3></option3><br /> <option4></option4><br /> <option5></option5><br /> <option6></option6><br /> <answer></answer><br /> <description>&l…