Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 20,946
» Latest member: blackopsdlc
» Forum threads: 21,997
» Forum posts: 22,964

Full Statistics

Online Users
There are currently 1185 online users.
» 0 Member(s) | 1179 Guest(s)
Applebot, Baidu, Bing, Facebook, Google, Yandex

Latest Threads
[WoW Retail News] Fixed C...
Forum: World of Warcraft
Last Post: xSicKxBot

» Replies: 0
» Views: 6
[PS.Blog] Fading Echo mak...
Forum: Sony Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 9
[Steam Release] Cowbots a...
Forum: New Game Releases
Last Post: xSicKxBot

» Replies: 0
» Views: 13
[Dev News] September Free...
Forum: Game Development
Last Post: xSicKxBot

» Replies: 0
» Views: 10
Marvel Rivals Venom guide...
Forum: PC Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 15
[WoW Retail News] Midnigh...
Forum: World of Warcraft
Last Post: xSicKxBot

» Replies: 0
» Views: 21
[Steam Release] Kodon
Forum: New Game Releases
Last Post: xSicKxBot

» Replies: 0
» Views: 21
[WoW Retail News] Downloa...
Forum: World of Warcraft
Last Post: xSicKxBot

» Replies: 0
» Views: 18
[PS.Blog] (For Southeast ...
Forum: Sony Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 17
[Steam Release] RAILGRADE...
Forum: New Game Releases
Last Post: xSicKxBot

» Replies: 0
» Views: 25

 
  (Free Game Key) Shadow of the Tomb Raider Def. Ed. and Submerged: Hidden Depths
Posted by: xSicKxBot - 10-08-2022, 08:06 AM - Forum: Deals or Specials - No Replies

Shadow of the Tomb Raider Def. Ed. and Submerged: Hidden Depths

Grab these games on the Epic Games Store

❤️ Shadow of the Tomb Raider: Definitive Edition
https://store.epicgames.com/p/shadow-of-the-tomb-raider

❤️ Submerged: Hidden Depths
https://store.epicgames.com/p/submerged-hidden-depths-6065a1

Knockout city has some items that are free too

The games is free to keep until Thursday, September 8, 2022 5:00 PM.

Next week's freebies:
Hundred Days - Winemaking Simulator
Realm Royale Reforged Epic Launch Bundle

We are welcoming everyone to join our discord[discord.gg]. We are more active there on finding giveaways, small or large, and there are daily raffles you can participate.

?GrabFreeGames.com ?Twitter ?Steam Curator ?Facebook[fb.me]?Discord[discord.gg]
❤️Support us: HumbleBundle Partner[www.humblebundle.com] Fanatical Affiliate[www.fanatical.com]


https://steamcommunity.com/groups/GrabFr...5115666075

Print this item

  PC - Serial Cleaners
Posted by: xSicKxBot - 10-08-2022, 08:06 AM - Forum: New Game Releases - No Replies

Serial Cleaners



New York City, New Year's Eve 1999. An unlikely team of four professional cleaners for the mob gathers to drink and reminisce about their careers at the turn of the millenium. As the details of their stories stop matching up, the ugly truth behind their cooperation begins to reveal itself. What starts as a celebration of a decade of shared history slowly turns into a tense and dangerous standoff.

An homage to 90s cinema - from Tarantino's classics through cult crime thrillers to B-movie action favorites and more - Serial Cleaners remixes those familiar places, characters and scenes into its own unique spin on a decade full of brightly colored optimism... and the grime underneath it all.

Choose your path through the non-linear story by picking the part of the narrative you want to hear next, and then approach each mission as carefully or brazenly as you like. Utilize stealth, exploration and speed as the situation and your preferred experience warrants it. Get rid of the bodies and other damning evidence to wipe the decade's slate clean before the new millenium comes!

Publisher: 505 Games

Release Date: Sep 22, 2022




https://www.metacritic.com/game/pc/serial-cleaners

Print this item

  [Tut] Python Print List Without Truncating
Posted by: xSicKxBot - 10-07-2022, 12:21 PM - Forum: Python - No Replies

Python Print List Without Truncating

5/5 – (1 vote)

How to Print a List Without Truncating?


Per default, Python doesn’t truncate lists when printing them to the shell, even if they are large. For example, you can call print(my_list) and see the full list even if the list has one thousand elements or more!

Here’s an example:


However, Python may squeeze the text (e.g., in programming environments such as IDLE) so you would have to press the button before seeing the output. The reason is that showing the whole output could be time-consuming and visually cluttering.

Here’s an example:


How to Print a NumPy Array Without Truncating?


In many cases, large NumPy arrays when printed out are not truncated as well on the default Python programming environment IDLE:


However, in the interactive mode of the Python shell, a NumPy array may be truncated, unlike a Python list:

>>> np.arange(10000)
array([ 0, 1, 2, ..., 9997, 9998, 9999])

To print the NumPy array without truncating, simply

>>> import sys, numpy
>>> numpy.set_printoptions(threshold=sys.maxsize)
>>> np.arange(10000)

The output shows the full array without converting it to a list first:


Not all output is shown to save some space. ?

Of course, you could also convert the NumPy array to a Python list first.

? Recommended Tutorial: How to Print a NumPy Array Without Truncating It?


Feel free to check out our Python cheat sheets and free email academy:



https://www.sickgaming.net/blog/2022/10/...runcating/

Print this item

  [Tut] Web Push Notifications in PHP
Posted by: xSicKxBot - 10-07-2022, 12:20 PM - Forum: PHP Development - No Replies

Web Push Notifications in PHP

by Vincy. Last modified on October 6th, 2022.

Web push notifications are a promising tool to increase traffic and conversions. We have already seen how to send web push notifications using JavaScript.

This tutorial is for those who are looking for sending web push notifications with dynamic data using PHP. This is an alternate method of that JavaScript example but with server-side processing in PHP.

It gets the notification content from PHP. The hardcoded notification content can be replaced with any source of data from a database or a file.

If you want a fully PHP solution to send custom notifications, the linked article will be useful.

web push notification php

About this example


This example shows a web push notification on the browser. The notifications are sent every 10 minutes as configured. Then, the sent notifications are closed automatically. The notifications display time on a browser is configured as 5 minutes.

The notification instances are created and handled on the client side. The JavaScript setTimeout function is used to manage the timer of popping up or down the notifications.

AJAX call to PHP to send the web push notification


This HTML has the script to run the loop to send the notifications in a periodic interval.

It has the function pushNotify() that requests PHP via AJAX to send notifications. PHP returns the notification content in the form of a JSON object.

The AJAX callback handler reads the JSON and builds the notification. In this script, the createNotification() function sends the notification to the event target.

It maps the JavaScript Notification click property to open a URL from the PHP JSON response.

index.php

<!DOCTYPE html>
<html>
<head>
<title>Web Push Notifications in PHP</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="style.css" type="text/css" rel="stylesheet" />
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
</head>
<body> <div class="phppot-container"> <h1>Web Push Notification using PHP in a Browser</h1> <p>This example shows a web push notification from PHP on browser automatically every 10 seconds. The notification also closes automatically just after 5 seconds.</p> </div> <script> // enable this if you want to make only one call and not repeated calls automatically // pushNotify(); // following makes an AJAX call to PHP to get notification every 10 secs setInterval(function() { pushNotify(); }, 10000); function pushNotify() { if (!("Notification" in window)) { // checking if the user's browser supports web push Notification alert("Web browser does not support desktop notification"); } if (Notification.permission !== "granted") Notification.requestPermission(); else { $.ajax({ url: "push-notify.php", type: "POST", success: function(data, textStatus, jqXHR) { // if PHP call returns data process it and show notification // if nothing returns then it means no notification available for now if ($.trim(data)) { var data = jQuery.parseJSON(data); console.log(data); notification = createNotification(data.title, data.icon, data.body, data.url); // closes the web browser notification automatically after 5 secs setTimeout(function() { notification.close(); }, 5000); } }, error: function(jqXHR, textStatus, errorThrown) { } }); } }; function createNotification(title, icon, body, url) { var notification = new Notification(title, { icon: icon, body: body, }); // url that needs to be opened on clicking the notification // finally everything boils down to click and visits right notification.onclick = function() { window.open(url); }; return notification; } </script>
</body>
</html>

PHP code to prepare the JSON bundle with dynamic content of the notification


This code supplies the notification data from the server side. Hook your application DAO in this PHP to change the content if you want it from a database.

push-notify.php

<?php
// if there is anything to notify, then return the response with data for
// push notification else just exit the code
$webNotificationPayload['title'] = 'Push Notification from PHP';
$webNotificationPayload['body'] = 'PHP to browser web push notification.';
$webNotificationPayload['icon'] = 'https://phppot.com/badge.png';
$webNotificationPayload['url'] = 'https://phppot.com';
echo json_encode($webNotificationPayload);
exit();
?>

Thus we have created the web push notification with dynamic content from PHP. There are various uses of it by having it in an application.

Uses of push notifications


  • Push notification helps to increase website traffic by sending relevant content to subscribed users.
  • It’s a way to send pro ads to create entries to bring money into the business.
  • It helps to spread the brand and keep it on the customer’s minds that retain them with you.

Download

↑ Back to Top



https://www.sickgaming.net/blog/2022/10/...ns-in-php/

Print this item

  News - Logitech Announces New $1000 Gaming Chair With Herman Miller
Posted by: xSicKxBot - 10-07-2022, 12:20 PM - Forum: Lounge - No Replies

Logitech Announces New $1000 Gaming Chair With Herman Miller

Logitech has announced a new high-end gaming chair made in partnership with Herman Miller. The new chair is called Vantum, and Logitech says it's the company's first "performance" chair designed specifically for gamers.

"Driven by extensive research, design expertise, and a unique understanding of gaming performance, we’ve developed a seat that provides superior ergonomic support and adjustability so every player can do what they love for longer," Logitech said

The Vantum chair promises "total support" through the head, neck, and shoulders. It has an adjustable headrest and thoracic support. The suspension system promises "lasting, breathable" comfort. The chair is 36.8 pounds and has dimensions of 44.25" H 30.5" W 29" D.

Continue Reading at GameSpot

https://www.gamespot.com/articles/logite...01-10abi2f

Print this item

  (Indie Deal) FREE Robot Robert, POSTAL Sale, MythBusters is out
Posted by: xSicKxBot - 10-07-2022, 12:20 PM - Forum: Deals or Specials - No Replies

FREE Robot Robert, POSTAL Sale, MythBusters is out

Robot Robert FREEbie
[freebies.indiegala.com]
Your mission begins in a cave full of riddles, hostile creatures, and dangerous plants.

https://www.youtube.com/watch?v=WKkWVV4IbvM
Running With Scissors Sale
[www.indiegala.com]
https://www.youtube.com/watch?v=ZAbnDdnD2qM


https://steamcommunity.com/groups/indieg...7940535579

Print this item

  PC - Gundam Evolution
Posted by: xSicKxBot - 10-07-2022, 12:20 PM - Forum: New Game Releases - No Replies

Gundam Evolution



GUNDAM EVOLUTION is an online free-to-play FPS title in which players take control of Mobile Suits from the hit Gundam anime and challenge other players online in six-versus-six objective based battles.

Featuring fast-paced action and immersive controls, players can switch between many different Mobile Suit Units to suit the ever changing battle conditions. Utilize their unique characteristics and cooperate with teammates to secure the win.

Publisher: Bandai Namco Games

Release Date: Sep 21, 2022




https://www.metacritic.com/game/pc/gundam-evolution

Print this item

  [Tut] About Me – When The Going Gets Tough, Keep Going
Posted by: xSicKxBot - 10-06-2022, 04:07 PM - Forum: Python - No Replies

About Me – When The Going Gets Tough, Keep Going

5/5 – (1 vote)

Welcome to the Finxter blog! My name is Chris, and I started this coding venture a couple of years ago.



Over the years, I have chatted with tens of thousands of Finxters who shared their stories and struggles with me.

? See here and here to read a lot of feedback from the community.

Today, allow me to share my story about why I started teaching freelancing.

It may inspire you to take control of your life if you’re in a tough spot right now – for example, struggling with the economic, military, and energy crises that are happening right now.

If you’re not interested in my personal story, now would be the time to stop reading. I won’t blame you!


~~~

Once upon a time, when I was a timid and naive 20-year-old dreamer, my 18-year-old girlfriend unexpectedly got pregnant. 🤰

She was still in high school, and I had just started studying computer science.

At the time, we had zero income and maybe $900 in savings.

I was living in a cheap 15-square-meter room with a desk and a bed and not much else.

As young and poor parents without any education or degree, we constantly felt judgment and pity from society.

We couldn’t even rent a flat because no landlord was crazy enough to take us in.


During all the struggle, we had love and dreams and the belief that everything would get better eventually: I was going to be a computer scientist in five years.

That is if I found a way to support my family on a shoestring – and avoided screwing up my education.

The first ten years, money was tight as hell. Little time. Lots of hard work. No TV. No Games. No Saturday night partying.

Well, maybe a little…


I am not a wunderkind. But I have good work ethic, and long-term goals, and I don’t give up easily. Finally, after ten tough years, I got my Ph.D. in computer science “summa cum laude”.

I now had a steady paycheck from my government job. But I eventually learned that the academic degrees didn’t help in improving our financial situation.

People made far more money and had far more free time coding in the private sector and without academic degrees.

I decided to take matters into my own hands again by creating my own coding business as a freelance developer.

In little time, I reached six-figure income levels. And I had much more free time compared to my government job that I held before.

My second child – now five years old – knows his father to have infinite time playing soccer, video games, or watching the Tesla Bot taking his first steps on YouTube.


(He plans to become CEO of Tesla – stay tuned @Elon).

~~~


Becoming a freelancer was a pivot point in my life.


To share all I know about creating a thriving coding business online, I have set up our freelancer course.

It focuses on the fundamentals:

  1. find your niche,
  2. build your skills,
  3. create value for your customers, and
  4. take massive action.

Simple, but sometimes not so easy…


If you want more from life and you love coding, feel free to subscribe to my free email academy, I’d love to have you in our community of ambitious coders who have not yet lost their ability to dream of a better life! ❤




https://www.sickgaming.net/blog/2022/10/...eep-going/

Print this item

  [Tut] How to Generate PHP Random String Token (8 Ways)
Posted by: xSicKxBot - 10-06-2022, 04:07 PM - Forum: PHP Development - No Replies

How to Generate PHP Random String Token (8 Ways)

by Vincy. Last modified on October 5th, 2022.

Generating random string token may sound like a trivial work. If you really want something “truly random”, it is one difficult job to do. In a project where you want a not so critical scrambled string there are many ways to get it done.

I present eight different ways of getting a random string token using PHP.

  1. Using random_int()
  2. Using rand()
  3. By string shuffling to generate a random substring.
  4. Using bin2hex()
  5. Using mt_rand()
  6. Using hashing sha1()
  7. Using hashing md5()
  8. Using PHP uniqid()

There are too many PHP functions that can be used to generate the random string. With the combination of those functions, this code assures to generate an unrepeatable random string and unpredictable by a civilian user.

1) Using random_int()


The PHP random_int() function generates cryptographic pseudo random integer. This random integer is used as an index to get the character from the given string base.

The string base includes 0-9, a-z and A-Z characters to return an alphanumeric random number.

Quick example


<?php
/** * Uses random_int as core logic and generates a random string * random_int is a pseudorandom number generator * * @param int $length * @return string */
function getRandomStringRandomInt($length = 16)
{ $stringSpace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $pieces = []; $max = mb_strlen($stringSpace, '8bit') - 1; for ($i = 0; $i < $length; ++ $i) { $pieces[] = $stringSpace[random_int(0, $max)]; } return implode('', $pieces);
}
echo "<br>Using random_int(): " . getRandomStringRandomInt();
?>

php random string

2) Using rand()


It uses simple PHP rand() and follows straightforward logic without encoding or encrypting.

It calculates the given string base’s length and pass it as a limit to the rand() function.

It gets the random character with the random index returned by the rand(). It applies string concatenation every time to form the random string in a loop.

<?php
/** * Uses the list of alphabets, numbers as base set, then picks using array index * by using rand() function. * * @param int $length * @return string */
function getRandomStringRand($length = 16)
{ $stringSpace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $stringLength = strlen($stringSpace); $randomString = ''; for ($i = 0; $i < $length; $i ++) { $randomString = $randomString . $stringSpace[rand(0, $stringLength - 1)]; } return $randomString;
}
echo "<br>Using rand(): " . getRandomStringRand();
?>

3) By string shuffling to generate a random substring.


It returns the random integer with the specified length.

It applies PHP string repeat and shuffle the output string. Then, extracts the substring from the shuffled string with the specified length.

<?php
/** * Uses the list of alphabets, numbers as base set. * Then shuffle and get the length required. * * @param int $length * @return string */
function getRandomStringShuffle($length = 16)
{ $stringSpace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $stringLength = strlen($stringSpace); $string = str_repeat($stringSpace, ceil($length / $stringLength)); $shuffledString = str_shuffle($string); $randomString = substr($shuffledString, 1, $length); return $randomString;
}
echo "<br>Using shuffle(): " . getRandomStringShuffle();
?>

4) Using bin2hex()


Like random_int(), the random_bytes() returns cryptographically secured random bytes.

If the function doesn’t exists, this program then uses openssl_random_pseudo_bytes() function.

<?php
/** * Get bytes of using random_bytes or openssl_random_pseudo_bytes * then using bin2hex to get a random string. * * @param int $length * @return string */
function getRandomStringBin2hex($length = 16)
{ if (function_exists('random_bytes')) { $bytes = random_bytes($length / 2); } else { $bytes = openssl_random_pseudo_bytes($length / 2); } $randomString = bin2hex($bytes); return $randomString;
}
echo "<br>Using bin2hex(): " . getRandomStringBin2hex();
?>

5) Using mt_rand()


PHP mt_rand() is the replacement of rand(). It generates a random string using the Mersenne Twister Random Number Generator.

This code generates the string base dynamically using the range() function.

Then, it runs the loop to build the random string using mt_rand() in each iteration.

<?php
/** * Using mt_rand() actually it is an alias of rand() * * @param int $length * @return string */
function getRandomStringMtrand($length = 16)
{ $keys = array_merge(range(0, 9), range('a', 'z')); $key = ""; for ($i = 0; $i < $length; $i ++) { $key .= $keys[mt_rand(0, count($keys) - 1)]; } $randomString = $key; return $randomString;
}
echo "<br>Using mt_rand(): " . getRandomStringMtrand();
?>

6) Using hashing sha1()


It applies sha1 hash of the string which is the result of the rand().

Then, it extracts the substring from the hash with the specified length.

<?php
/** * * Using sha1(). * sha1 has a 40 character limit and always lowercase characters. * * @param int $length * @return string */
function getRandomStringSha1($length = 16)
{ $string = sha1(rand()); $randomString = substr($string, 0, $length); return $randomString;
}
echo "<br>Using sha1(): " . getRandomStringSha1();
?>

7) Using hashing md5()


It applies md5() hash on the rand() result. Then, the rest of the process are same as the above example.

<?php
/** * * Using md5(). * * @param int $length * @return string */
function getRandomStringMd5($length = 16)
{ $string = md5(rand()); $randomString = substr($string, 0, $length); return $randomString;
}
echo "<br>Using md5(): " . getRandomStringMd5();
?>

8) Using PHP uniqid()


The PHP unigid() function gets prefixed unique identifier based on the current time in microseconds.

It is not generating cryptographically random number like random_int() and random_bytes().

<?php
/** * * Using uniqid(). * * @param int $length * @return string */
function getRandomStringUniqid($length = 16)
{ $string = uniqid(rand()); $randomString = substr($string, 0, $length); return $randomString;
}
echo "<br>Using uniqid(): " . getRandomStringUniqid();
?>

Download

↑ Back to Top



https://www.sickgaming.net/blog/2022/10/...en-8-ways/

Print this item

  (Free Game Key) Rising Hell & Slain: Back From Hell - Free Epic Games
Posted by: xSicKxBot - 10-06-2022, 04:07 PM - Forum: Deals or Specials - No Replies

Rising Hell & Slain: Back From Hell - Free Epic Games

Grab these games on the Epic Games Store

❤️ Rising Hell
Store Page[store.epicgames.com]

❤️ Slain: Back From Hell
Store Page[store.epicgames.com]

The games are free to keep if claimed by: Thursday, 13 October 2022 15:00 UTC.

Next week's freebies:
ToeJam & Earl: Back in the Groove!

We are welcoming everyone to join our discord[discord.gg]. We are more active there on finding giveaways, small or large, and there are daily raffles you can participate.

?GrabFreeGames.com ?Twitter ?Steam Curator ?Facebook[fb.me]?Discord[discord.gg]
❤️Support us: HumbleBundle Partner[www.humblebundle.com] Fanatical Affiliate[www.fanatical.com]


https://steamcommunity.com/groups/GrabFr...1773445922

Print this item