Create an account


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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 20,134
» Latest member: jax9090nnn
» Forum threads: 21,936
» Forum posts: 22,806

Full Statistics

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

 
  PC - Betrayal At Club Low
Posted by: xSicKxBot - 09-23-2022, 02:19 PM - Forum: New Game Releases - No Replies

Betrayal At Club Low



Tonight you're on a surprise mission at the inimitable Club Low. This former coffin factory-turned-nightclub has, for years, been a beacon of nocturnal energy, a haven for wild-limbed dancing, mind-altering music and shady characters aplenty. It's also a place to prove your skills as an undercover agent.

An old colleague is trapped in the club, caught up in an intel-gathering mission with a notorious business captain. Your mission is to sneak into the club incognito and get him out before he blows his cover. Can you do it?

Publisher: Cosmo D Studios

Release Date: Sep 09, 2022




https://www.metacritic.com/game/pc/betrayal-at-club-low

Print this item

  [Tut] Solidity File Layout – SPDX License ID and Version Pragmas
Posted by: xSicKxBot - 09-22-2022, 03:30 PM - Forum: Python - No Replies

Solidity File Layout – SPDX License ID and Version Pragmas

5/5 – (1 vote)
YouTube Video

In the previous articles, we looked at some of the representative examples of smart contracts representing possible real-world scenarios.

Our main focus was on capturing the essence of each case, without particular attention given to the general structure, i.e. layout of the respective source files.

However, in this mini-series starting with this article, we will focus particularly on the source file layout.

The articles will continue with our tradition of going hand in hand with the official Solidity documentation, with the particular topic of our current interest available here.

Info: As we’ve reached such a nice, round number of articles on Solidity, I have a small foreword for my faithful audience.

For those of us who missed or skipped previous articles, the intent behind the content is to supplement and clarify the original documentation and even present it in a style that I find to be more appropriate to us as the audience.

Given that we come from various backgrounds, some less and some more technical, it is my permanent goal to soften the material and make it as close as possible to each reader. Sometimes, completely unannounced and unprovoked, I’ll even try and sprinkle some humor onto the content.

Will I succeed in making it funny and engaging? That’s whole another story ?

SPDX License Identifier


Smart contracts are somewhat a mystery to unfamiliar folks, and a mystery usually implies a certain amount of distrust. Even so, the more sensitive the subject is, the greater the amount of distrust. The best way to turn distrust into trust is to make the content in question open and available.

When we’re talking about smart contracts, the openness of a smart contract means the availability of its source code. However, making the source code available frequently triggers legal problems regarding copyright.

To alleviate these problems, the Solidity compiler instigates the use of SPDX license identifiers.

ℹ Info: SPDX stands for the Software Package Data Exchange, which is “An open standard for communicating software bill of material information, including components, licenses, copyrights, and security references. SPDX reduces redundant work by providing a common format for companies and communities to share important data, thereby streamlining and improving compliance.

Yes, I agree, it’s a lengthy sentence, but the main takeaway ideas are a communication standard, an instrument of compliance, and a data exchange format:

  1. SPDX is a standard used for communicating the information about the software contents;
  2. SPDX reduces redundant work and improves compliance;
  3. SPDX provides a common format for data sharing between companies and communities;

An SPDX license identifier should be included at the beginning of the source file, e.g.

// SPDX-License-Identifier: GPL-3.0-or-later

Although SPDX license identifiers are machine-readable, the compiler does not check if the license part of the comment is in the list of licenses allowed by SPDX.

Instead, the compiler will just include the string in the bytecode metadata.

We will touch on the subject of contract metadata in future articles, but until then, let’s just remember that there is a thing called metadata.

ℹ Info: Metadata can be loosely defined as “data/information about data”, meaning it provides more information or description of certain data.

We don’t have to specify a license or if the case is that the source code is closed-source (opposite of open-source), the recommendation is that we use a special value UNLICENSED.

The UNLICENSED value implies that usage is not allowed, i.e. there is not a corresponding item in SPDX license list; it differs from the value UNLICENSE which grants all rights to everyone.

Solidity documentation authors note that Solidity adheres to the npm recommendation.

If we as developers supply the UNLICENSE comment, we are still tied by the obligation related to licensing, i.e. we have to mention a specific license header or the original copyright holder in the source files.

Although the compiler recognizes the comment placed at any location in the source file, the recommendation, and good practice is to put it at the top of the file.

Pragmas


We’ve mentioned the pragma keyword somewhere in the first few articles, but now we’ll use the opportunity to say a few more words about it.

Pragma keyword is the element of the Solidity programming language that enables specific Solidity compiler (remember solc) features or validations, i.e. checks.

As the pragma keyword scope is its source file, we’d have to add the pragma to all our files to enable it in our whole project.

? Note: A pragma from an imported file does not apply to the importer file, i.e. the file that imports the imported file.

Version Pragma


We always use a version pragma for limiting the source file(s) compilation to a specific range of compiler versions.

The intention behind this step is the prevention of incompatible changes introduced with future versions of compilers.

According to the Solidity authors, occurrences of incompatible changes are reduced to an absolute minimum, meaning that in all other cases i.e. cases of compatible changes, the changes in Solidity language semantics visibly coincide with the changes in language syntax.

To stay on the safe side, the recommendation is to study the changelog at least for releases that carry breaking changes, marked x.0.0 (major releases) or 0.x.0 (minor releases).

ℹ Info: semantic is relating to meaning in language or logic.

As in every our example so far, we’re using the version pragma as:

Note: pragma solidity ^0.x.y; allows changes that do not modify the left-most non-zero digit in the [major, minor, patch] tuple (docs).

The following line instructs the compilation process to use a compiler with the lowest version of 0.5.2 and with the highest version not exceeding 0.6.0 (this condition is incorporated by a ^ symbol):

pragma solidity ^0.5.2;

By recalling the article about semantic versioning, we’ll remember that no breaking changes are introduced until a minor version of 0.6.0 (in this specific case), therefore we can be sure that our code will compile just as we expect it to.

Also, by using the line above, we didn’t lock on the specific version, so the last part of the version label, i.e. the patch number can increase, leaving enough space for the compiler bug fixes.

Besides this most common way of expressing the allowed versions of the compiler, even more, complex rules are available by using the syntax available here.

? Note: version pragma just instructs the compiler to self-check if it is compliant with the version required by the source file. In case of a mismatch, the compiler will throw an (in)appropriate error. I mean, who ever saw an appropriate error, anyways?

Conclusion


With this introductory article to the topic of the layout of a Solidity source file, we covered a few very light concepts, including SPDX license identifier, reintroduced the pragma keyword, and retouched the version pragma.

In the next article, we will continue with the next two pragmas and other, very interesting topics.

In the SPDX License Identifier section, we were asking around inconspicuously about the SPDX. We wanted to find out what it is, how and when it is used, and how it can make our developing life easier.

In the Pragmas section, we proudly reminded ourselves of the knowledge from long ago, why do we have to slam a pragma at the beginning of each source file?

If at least they looked nice… Starting our coding masterpieces with a dangling comment seemed like a skewed joke (like most of mine do) – until we learned why ?




https://www.sickgaming.net/blog/2022/09/...n-pragmas/

Print this item

  (Free Game Key) ARK: Survival Evolve and Gloomhaven - Free Epic Games
Posted by: xSicKxBot - 09-22-2022, 03:30 PM - Forum: Deals or Specials - No Replies

ARK: Survival Evolve and Gloomhaven - Free Epic Games

Grab these games on the Epic Games Store

❤️ ARK: Survival Evolved (repeat)
Store Page[store.epicgames.com]

❤️ Gloomhaven
Store Page[store.epicgames.com]

The games is free to keep until Thursday, September 29th, 2022 15:00 UTC.

Next week's freebies:
- Runbow
- The Drone Racing League Simulator

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...0287448402

Print this item

  PC - Steelrising
Posted by: xSicKxBot - 09-22-2022, 03:30 PM - Forum: New Game Releases - No Replies

Steelrising



Paris, 1789. The French Revolution has been suppressed with bloodshed by Louis XVI and his merciless mechanical army. Aegis, a mysterious automaton masterpiece, must confront the king's army alone to save history in this challenging action-RPG.

Publisher: Nacon

Release Date: Sep 08, 2022




https://www.metacritic.com/game/pc/steelrising

Print this item

  [Oracle Blog] The Arrival of Java 19
Posted by: xSicKxBot - 09-21-2022, 10:33 PM - Forum: Java Language, JVM, and the JRE - No Replies

The Arrival of Java 19

Java 19 Blog

https://blogs.oracle.com/java/post/the-a...of-java-19

Print this item

  [Tut] Python Set to Tuple | Tuple to Set | 3 Easy Ways
Posted by: xSicKxBot - 09-21-2022, 10:33 PM - Forum: Python - No Replies

Python Set to Tuple | Tuple to Set | 3 Easy Ways

5/5 – (1 vote)

? Problem Formulation: Given a Python set. How to convert it to a tuple? And how to convert the tuple back to a set?

There are three main ways:

  • Method 1: To convert a Python set to a tuple, use the tuple(my_set) function.
  • Method 2: To convert a Python tuple to a set, use the set(my_tuple) function.
  • Method 3: To convert a Python tuple of mutable elements to a set, use the expression set(tuple(x) for x in my_tuple) to avoid a TypeError.

I’ll also give you a bonus method 4 that shows you what to do to retain the ordering information when converting a tuple to a set—so keep reading! ?

Method 1: Convert Set to Tuple with tuple()


To convert a set to a tuple, pass the set into the tuple() function. This is a built-in Python function, so you don’t need to import or install any library to use it. The return value is a new tuple from the values in the set.

? Here’s an example where you convert the set {1, 2, 3} to a tuple (1, 2, 3):

my_set = {1, 2, 3}
my_tuple = tuple(my_set)
print(my_tuple)
# (1, 2, 3)

By the way, here’s an explainer video on this function:

YouTube Video

Method 2: Convert Tuple to Set with set()


To convert a tuple to a set, pass the tuple into the set() function. This is a built-in Python function, so you don’t need to import or install any library. The return value is a new set from the values in the tuple.

? Here’s an example where you convert the tuple (1, 2, 3) to a set {1, 2, 3}:

my_tuple = (1, 2, 3)
my_set = set(my_tuple)
print(my_set)
# {1, 2, 3}
YouTube Video

⚡ Problem: However, the conversion process from a tuple to set doesn’t always work because if you try to convert a tuple of mutable values, Python will raise the TypeError: unhashable type!

Read on to learn more about this problem—and how to resolve it easily: ?

Method 3: Convert Tuple to Set with Set Comprehension


? A Python set is an unordered collection of unique immutable elements. Each element must define explicitly or implicitly the __hash__() dunder method, i.e., must be hashable.

If you attempt to convert a tuple of mutable elements (e.g., lists) to a set, Python will raise an error such as the TypeError: unhashable type: 'list':

my_tuple = ([1, 2], [3, 4], [5, 6])
my_set = set(my_tuple)
# TypeError: unhashable type: 'list'

In this case, you can use set comprehension to convert each inner tuple element to an immutable type. For example, the expression set(tuple(x) for x in my_tuple) converts each inner list to a tuple. The result is a set of immutable tuples.

Here’s the solution to this problem in a minimal code example:

my_tuple = ([1, 2], [3, 4], [5, 6])
my_set = set(tuple(x) for x in my_tuple)
print(my_set)
# {(1, 2), (3, 4), (5, 6)}

The final “bonus” section introduces another elegant way to retain the ordering information in a set:


Bonus Method 4: Enumerate Elements


Sometimes, you want to associate each set or tuple element with a specific numerical “index” value, i.e., a unique integer identifier. The enumerate() method to the rescue!

YouTube Video

  • Use tuple(enumerate(my_set)) to convert a set to an enumerated tuple.
  • Use set(enumerate(my_tuple)) to convert a tuple to an enumerated set.

The result is the respective container data structure with (identifier, value) tuples:

my_set = {'Alice', 'Bob', 'Carl'} my_tuple = tuple(enumerate(my_set))
print(my_tuple)
# ((0, 'Carl'), (1, 'Bob'), (2, 'Alice')) my_set = set(enumerate(('Alice', 'Bob', 'Carl')))
print(my_set)
# {(2, 'Carl'), (0, 'Alice'), (1, 'Bob')}

Especially in the case where you convert a tuple to a set, this makes a lot of sense because you can retain the information on the ordering of elements that would be otherwise lost after converting to a set.


Thanks for reading the whole article, my friend! You can join us here (we have cheat sheets too):



https://www.sickgaming.net/blog/2022/09/...easy-ways/

Print this item

  [Tut] How to Detect Mobile Device using JavaScript
Posted by: xSicKxBot - 09-21-2022, 10:33 PM - Forum: PHP Development - No Replies

How to Detect Mobile Device using JavaScript

by Vincy. Last modified on September 20th, 2022.

If you are looking for a client-side solution to detect a mobile device, your search stops here :-). There are properties to detect this on the client side by using JavaScript.

Two methods of detecting if a current device is a mobile device are listed below.

  1. By using JavaScript window.matchMedia() method.
  2. By using navigator.userAgent property.

Both are using JavaScript basic methods to create the mobile device detector code.

1) By using JavaScript window.matchMedia() method


This method is the best one compared to the one using JavaScript navigator.userAgent. Because the userAgent is a setting that can be configured by the end users. They can change it!

matchmedia.html

Quick example


function isMobileDevice() { return window .matchMedia("only screen and (max-width: 760px)").matches;
}
if (isMobileDevice()) { document.write("<b>Detected device is a mobile.</b>");
} else { document .write("<b>Detected device is not a mobile.</b>");
}

The matchMedia() JavaScript custom method is used to do this mobile device detection.

It accepts a media query string and returns an object. This object will contain the current device’s media property and its relevancy.

Then, this object is used to find the match between the current device’s media property with the media query passed.

This program sends the media query containing a max-width of a mobile device that is expected to have.

If the current device’s media screen properties are matched with this argument, then this JavaScript function returns a boolean true.

View Demo

This screenshot is taken from my computer that prints the result of the above quick example.

detect mobile device javascript output

Media match with CSS


It can also be done by CSS instead of JavaScript. Follow the below steps to implement this using CSS.

  • Keep two possible messages in the HTML markup with  style=’display:none’.
  • Write CSS media query section with @media screen and (max-width: 600px).
  • Show and hide the appropriate UI notification element according to the screen width.
<!DOCTYPE html>
<html>
<head>
<title>How to Detect Mobile Device using JavaScript</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.mobile { display: none;
} .not-mobile { display: block;
} @media only screen and (max-width: 600px) { .mobile { display: block; } .not-mobile { display: none; }
}
</style>
</head>
<body> <b class="mobile">Detected device is a mobile.</b> <b class="not-mobile">Detected device is not a mobile.</b>
</body>
</html>

2) By using a navigator.userAgent property


The alternate method is for checking the current userAgent to detect if it is a mobile device.

The isMobileDevice() function in the below example does the test with a regex pattern. The regex contains the most possible values of a mobile device’s userAgent.

We have already used regex pattern matching for a JavaScript email validation utility.

The script compares the current device’s userAgent property with the pattern. If a match is found, then this function returns true to print the appropriate result.

navigator.html

<!DOCTYPE html>
<html>
<head>
<title>How to Detect Mobile Device using JavaScript</title>
</head>
<body> <h1>How to Detect Mobile Device using JavaScript</h1> <p>Note: Browser users can change value of "userAgent" via UA spoofing. So be aware of that and do not use this feature to provide a critical function of your website.</p> <script> function isMobileDevice() { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i .test(navigator.userAgent); /* for a more detailed test /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i .test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i .test(navigator.userAgent.substr(0, 4)) */ } if (isMobileDevice()) { document.write("<b>Detected device is a mobile.</b>"); } else { document .write("<b>Detected device is not a mobile.</b>"); } </script>
</body>
</html>

Note: Browser users can change the value of “userAgent” via UA spoofing. So be aware of that and do not use this feature to provide a critical function of your website.

View Demo Download

↑ Back to Top



https://www.sickgaming.net/blog/2022/09/...avascript/

Print this item

  (Indie Deal) Sniper Giveaways, 505 Games, Days Gone Deals
Posted by: xSicKxBot - 09-21-2022, 10:32 PM - Forum: Deals or Specials - No Replies

Sniper Giveaways, 505 Games, Days Gone Deals

Sniper Giveaways
[www.indiegala.com]

Days Gone at a NICE Crackerjack Deal
[www.indiegala.com]

505 Games Sale, up to 92% OFF
[www.indiegala.com]
https://www.youtube.com/watch?v=R8M3LjoGOXo
Happy Hour: Chicken Agents Bundle
[www.indiegala.com]
https://www.youtube.com/watch?v=_1UC_Uo2H-8


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

Print this item

  PC - Jack Move
Posted by: xSicKxBot - 09-21-2022, 10:32 PM - Forum: New Game Releases - No Replies

Jack Move



Jack Move is a unique blend of gritty cyberpunk story telling, turn based battles and beautiful modern pixel art. Take on the role of Noa, a vigilante hacker determined to rescue her kidnapped father and take down the overreaching Monomind corporation.

They whisper her name on the streets: Solares. A mysterious veteran of the Data Wars, Noa Solares keeps the fight against the Corporations alive as a vigilante hacker-for-hire, empowering the downtrodden and undermining those with power. When she receives an emergency message from her estranged father - the eccentric Dr. Abner Solares, whose wife's death spurred him to become the leading researcher of 'digital reanimation' - Noa is thrust into a world of murder, kidnapping, dark research, and the corporation that would steal it for their own ends: Monomind.

What starts as fight to save your father will become a fight for the future of mankind itself...

Publisher: HypeTrain Digital

Release Date: Sep 08, 2022




https://www.metacritic.com/game/pc/jack-move

Print this item

  News - Twitch Is Changing Its Revenue Split For Its Biggest Streamers From 2023
Posted by: xSicKxBot - 09-21-2022, 10:32 PM - Forum: Lounge - No Replies

Twitch Is Changing Its Revenue Split For Its Biggest Streamers From 2023

Streaming platform Twitch has announced changes to its revenue system that will kick in starting next year, with this new update affecting some of its biggest streamers. The current Twitch model for revenue works on a 50/50 split between partnered streamers and the platform when dealing with paid subscriptions, while bigger streamers get a more generous 70/30 split.

This will change in June 2023, as streamers will get to keep 70% of the subscription revenue on the first $100,000 earned, and the share will then revert to a 50/50 split. The new threshold will have an impact on Twitch's top 10% of streamers, and one of the reasons for the policy change is due to an increased cost in video hosting according to a blog post from Twitch president Dan Clancy.

"Delivering high definition, low latency, always available live video to nearly every corner of the world is expensive," Clancy wrote. "Using the published rates from Amazon Web Services' Interactive Video Service (IVS)--which is essentially Twitch video--live video costs for a 100 CCU streamer who streams 200 hours a month are more than $1000 per month. We don't typically talk about this because, frankly, you shouldn't have to think about it. We'd rather you focus on doing what you do best."

Continue Reading at GameSpot

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

Print this item

 
Latest Threads
௹©Ukraine Shein COUPON Co...
Last Post: udwivedi923
6 hours ago
௹©Morocco Shein COUPON Co...
Last Post: udwivedi923
6 hours ago
௹©USA Shein COUPON Code ...
Last Post: udwivedi923
6 hours ago
௹©Armenia Shein COUPON Co...
Last Post: udwivedi923
6 hours ago
௹©Brazil Shein COUPON Cod...
Last Post: udwivedi923
6 hours ago
௹©South Africa Shein COUP...
Last Post: udwivedi923
6 hours ago
௹©Moldova Shein COUPON Co...
Last Post: udwivedi923
6 hours ago
௹©Malta Shein COUPON Code...
Last Post: udwivedi923
6 hours ago
௹©Luxembourg Shein COUPON...
Last Post: udwivedi923
6 hours ago
௹©Kazakhstan Shein COUPON...
Last Post: udwivedi923
6 hours ago

Forum software by © MyBB Theme © iAndrew 2016