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,156
» Latest member: levlotus1998
» Forum threads: 21,839
» Forum posts: 22,714

Full Statistics

Online Users
There are currently 664 online users.
» 1 Member(s) | 657 Guest(s)
Applebot, Baidu, Bing, DuckDuckGo, Google, Yandex, ARJNxKDS

 
  PC - Young Souls
Posted by: xSicKxBot - 03-31-2022, 08:07 PM - Forum: New Game Releases - No Replies

Young Souls



As orphans, Jenn and Tristan's life path brought them to a mysterious scientist, who took them in and cared for them as his own children. But one day, he disappeared under very odd circumstances.

While searching desperately for him, the duo found a hidden cellar and the Moon Gate portal, transporting them to a dangerous parallel world where goblins thrive.

Your adventure begins as you fight to bridge these two very different worlds.

Young Souls is a gorgeous 2D brawler meets story-rich action RPG. Fight hordes of belligerent goblins, level up with hundreds of weapons and accessories, explore, and journey between worlds, as rebellious twins battle their way to save their foster father.

Publisher: The Arcade Crew

Release Date: Mar 10, 2022




https://www.metacritic.com/game/pc/young-souls

Print this item

  News - Will Smith Was Asked To Leave After Oscars Slap But He Refused, Academy Says
Posted by: xSicKxBot - 03-31-2022, 08:07 PM - Forum: Lounge - No Replies

Will Smith Was Asked To Leave After Oscars Slap But He Refused, Academy Says

The newest chapter of the Will Smith/Chris Rock drama at the Oscars has unfolded. The Academy of Motion Picture Arts and Sciences said that Smith was asked to leave the venue after he struck Rock on stage, but the Independence Day star refused, according to the Associated Press. TMZ's sources, meanwhile, say this is not the case and that Smith was told by a producer that he could stay. Some said Smith could stay and others wanted him gone, according to the report.

"There were various discussions during several commercial breaks, but they never reached a consensus," TMZ reported.

Smith, who has publicly apologized to Rock and the Academy, is facing potential disciplinary action. The Academy's board met this week to begin discussions about punishing Smith for violating its conduct standards. Smith could be suspended or expelled from the Academy, or face other sanctions, the group said. Harvey Weinstein, Roman Polanski, and Billy Cosby are among the very small group of people to have been expelled from the Academy.

Continue Reading at GameSpot

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

Print this item

  (Free Game Key) Total War: WARHAMMER & City of Brass - Free Epic Games
Posted by: xSicKxBot - 03-31-2022, 08:07 PM - Forum: Deals or Specials - No Replies

Total War: WARHAMMER & City of Brass - Free Epic Games

Visit the store page and add the games to your account:

Total War: WARHAMMER[store.epicgames.com] alongside its free DLC's[store.epicgames.com]

City of Brass[store.epicgames.com]

City of Brass is a recurring giveaway, being given once on the Epic Store on May 2019. The games are free to keep until Apr 7th 2022 - 15:00 UTC.

Next week's freebie:
Rogue Legacy
The Vanishing of Ethan Carter

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] Epic Tag: GrabFreeGames


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

Print this item

  [Tut] How to Swap List Elements in Python?
Posted by: xSicKxBot - 03-31-2022, 01:50 AM - Forum: Python - No Replies

How to Swap List Elements in Python?

Problem Formulation


Given a list of size n and two indices i,j < n.

Swap the element at index i with the element at index j, so that the element list[i] is now at position j and the original element list[j] is now at position i.

Examples:

  • Swapping indices 0 and 2 in list [1, 2, 3] modifies the list to [3, 2, 1].
  • Swapping indices 1 and 2 in list [1, 2, 3] modifies the list to [1, 3, 2].
  • Swapping indices 1 and 3 in list ['alice', 'bob', 'carl', 'denis'] modifies the list to ['alice', 'denis', 'carl', 'bob'].

Method 1: Multiple Assignment


To swap two list elements by index i and j, use the multiple assignment expression lst[i], lst[j] = lst[j], lst[i] that assigns the element at index i to index j and vice versa.

lst = ['alice', 'bob', 'carl']
i, j = 0, 2 # Swap index i=0 with index j=2
lst[i], lst[j] = lst[j], lst[i] print(lst)
# ['carl', 'bob', 'alice']

The highlighted line works as follows:

  • First, it obtains the elements at positions j and i by running the right-hand side of the assignment operation.
  • Second, it assigns the obtained elements in one go to the inverse indices i and j (see left-hand side of the assignment operation).

To help you better understand this code snippet, I’ve recorded a quick video that shows you how the generalization of multiple assignment, i.e., slice assignment, works as a Python One-Liner:




Method 2: Swap Two Elements by Value Using indexof()


Let’s quickly discuss a variant of this problem whereby you want to swap two elements but you don’t know their indices yet.

To swap two list elements x and y by value, get the index of their first occurrences using the list.index(x) and list.index(y) methods and assign the result to variables i and j, respectively. Then apply the multiple assignment expression lst[i], lst[j] = lst[j], lst[i] to swap the elements.

The latter part, i.e., swapping the list elements, remains the same. The main difference is highlighted in the following code snippet:

lst = ['alice', 'bob', 'carl']
x, y = 'alice', 'carl' # Get indices i and j associated with elements x and y
i, j = lst.index(x), lst.index(y) # Swap element at index i with element at index j
lst[i], lst[j] = lst[j], lst[i] print(lst)
# ['carl', 'bob', 'alice']

Do you need a quick refresher on the list.index() method?

? Background: The list.index(value) method returns the index of the value argument in the list. You can use optional start and stop arguments to limit the index range where to search for the value in the list. If the value is not in the list, the method throws a ValueError.

Feel free to also watch the following quick explainer video:




Python One-Liners Book: Master the Single Line First!


Python programmers will improve their computer science skills with these useful one-liners.

Python One-Liners

Python One-Liners will teach you how to read and write “one-liners”: concise statements of useful functionality packed into a single line of code. You’ll learn how to systematically unpack and understand any line of Python code, and write eloquent, powerfully compressed Python like an expert.

The book’s five chapters cover (1) tips and tricks, (2) regular expressions, (3) machine learning, (4) core data science topics, and (5) useful algorithms.

Detailed explanations of one-liners introduce key computer science concepts and boost your coding and analytical skills. You’ll learn about advanced Python features such as list comprehension, slicing, lambda functions, regular expressions, map and reduce functions, and slice assignments.

You’ll also learn how to:

  • Leverage data structures to solve real-world problems, like using Boolean indexing to find cities with above-average pollution
  • Use NumPy basics such as array, shape, axis, type, broadcasting, advanced indexing, slicing, sorting, searching, aggregating, and statistics
  • Calculate basic statistics of multidimensional data arrays and the K-Means algorithms for unsupervised learning
  • Create more advanced regular expressions using grouping and named groups, negative lookaheads, escaped characters, whitespaces, character sets (and negative characters sets), and greedy/nongreedy operators
  • Understand a wide range of computer science topics, including anagrams, palindromes, supersets, permutations, factorials, prime numbers, Fibonacci numbers, obfuscation, searching, and algorithmic sorting

By the end of the book, you’ll know how to write Python at its most refined, and create concise, beautiful pieces of “Python art” in merely a single line.

Get your Python One-Liners on Amazon!!



https://www.sickgaming.net/blog/2022/03/...in-python/

Print this item

  [Oracle Blog] Introducing Java SE 11
Posted by: xSicKxBot - 03-31-2022, 01:50 AM - Forum: Java Language, JVM, and the JRE - No Replies

Introducing Java SE 11

DOWNLOAD JAVA 11 How time flies! Over the last several months, Oracle announced changes to evolve the Java platform ensuring it continues forward with a vibrant future for users. Those advances included: Increasing the pace and predictability of delivery Since the release of Java 9, the Java platfor...

https://blogs.oracle.com/java/post/intro...java-se-11

Print this item

  [Tut] HTML Contact Form Template to Email with Custom Fields
Posted by: xSicKxBot - 03-31-2022, 01:50 AM - Forum: PHP Development - No Replies

HTML Contact Form Template to Email with Custom Fields

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

Why do we need a contact form on a website? It is to enable (prospective) customers to connect with you.

Elon Musk says, “…maximize the area under the curve of customer happiness…”.

So, increasing the possibilities of reading the customer’s mind will drive us forward to attain the goal. The contact form interface is one of the tools to know our customers.

Let’s design a simple and useful contact form component for your website. The below sections explain how to create a contact form from the scratch.

Uses of a contact form in a website


There are a few more advantages of having a contact form interface.

  1. It helps have conversions by knowing the requirement of the customers.
  2. It helps to know the scope of improvements.
  3. It helps to collect the end users’ ideas and opinions relevant to the business model.

About this example


This example code is for designing an HTML contact form with the following features.

  1. Contact form with custom fields.
  2. Add/Delete custom fields dynamically via jQuery.
  3. Send an email with the posted form data.
  4. Storing the form data into the database.

Application configuration


This HTML contact form backend code allows both send an email and the store-to-database action. But, The store-to-database feature is optional and disabled initially.

This configuration file has the flag to enable or disable the store-to-database feature.

By default, the ENABLE_DATABASE flag is set to false. Make it true to show the “store-to-database” control in the UI.

config.php


<?php const ENABLE_DATABASE = false;
?>

HTML contact form landing page code


This HTML code is to display a contact form on a landing page. The index.php file includes the following to make an HTML contact form dynamic.

  • It contains the form HTML.
  • It includes the application configuration file.
  • It requires the form action PHP file to process data submitted by the user.
  • It includes the form validation javascript and required jQuery dependency.

By connecting all the contact form example components, this file lets the HTML contact form be interactive.

It shows two controls to save to the database or to send an email. By default the save to the database control will be hidden. It is configurable to display this option.

index.php


<?php require_once __DIR__ . '/contact-form-action.php';?>
<?php require_once __DIR__ . '/config.php';?>
<!DOCTYPE html>
<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css" />
<title>HTML Contact Form with Add More Custom Fields</title>
<script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/contact.js">
</script>
</head>
<body> <h1>HTML Contact Form with with Add More Custom Fields</h1> <div class="form-container"> <form name="mailForm" id="mailForm" method="post" action="" enctype="multipart/form-data" on‌submit="return validate()"> <div class="input-row"> <label style="padding-top: 20px;">Name</label> <span id="userName-info" class="info"></span><br /> <input type="text" class="input-field" name="userName" id="userName" /> </div> <div class="input-row"> <label>Subject</label> <span id="subject-info" class="info"></span><br /> <input type="text" class="input-field" name="subject" id="subject" /> </div> <div class="input-row"> <label>Message</label> <span id="userMessage-info" class="info"></span><br /> <textarea name="userMessage" id="userMessage" class="input-field" id="userMessage" cols="60" rows="6"></textarea> </div> <div class="input-row"> <div class="custom-field-name"> <input type="text" class="custom-field" name="Fieldname[]" id="Fieldname" placeholder="Fieldname" /> </div> <div class="custom-field-value"> <input type="text" class="custom-field" name="Fieldvalue[]" id="Fieldvalue" placeholder="Fieldvalue" /> </div> <div class="col"> <div class="custom-field-col"> <div on‌Click="addMore();" class="plus-button" title="Add More"> <img src="./images/icon-add.svg" alt="Add More"> </div> <div on‌Click="remove();" class="minus-button" title="Remove"> <img src="./images/icon-remove.svg" alt="Remove"> </div> </div> </div> </div> <div class="col"> <input type="submit" name="send" id="send" class="btn-submit" value="Send email" /> <div class="col"> <?php if(ENABLE_DATABASE == true){?> <input type="submit" name="savetodatabase" class=btn-submit id="savetodatabase" value="Save database" /> <?php }?> </div> <div id="pageloader"> <img id="loading-image" src="./images/loader.gif" /> </div> </div> <div id="statusMessage"> <?php if (! empty($message)) { ?> <p class='<?php echo $type; ?>Message'><?php echo $message; ?></p> <?php } ?> </div> </form> </div>
</body>
</html>

Contact form validation script using jQuery


Form validation can be done either on the server-side or client-side. But, validation on the client-side with Javascript is very usual. And it is quite easy and seamless also.

So, I created a jQuery-based validation script to validate the HTML contact form. It requires all fields to be mandatory except the custom fields.

The contact form custom fields are optional. But, in PHP, it checks the custom field name and value not to be empty. This server-side validation will be done before preparing the contact-form action parameter.

Other JavaScript handlers


This contact.js file does not only include the validation handler. But also, defines handlers to add, delete custom field rows in the UI.

It allows anyone row of custom field inputs to be in the HTML contact form. It is coded in the showHideControls() function of the below file.

contact.js


function validate() { var valid = true; $(".info").html(""); var userName = document.forms["mailForm"]["userName"].value; var subject = document.forms["mailForm"]["subject"].value; var userMessage = document.forms["mailForm"]["userMessage"].value; if (userName == "") { $("#userName-info").html("(required)"); $("#userName").css('background-color', '#FFFFDF'); valid = false; } if (subject == "") { $("#subject-info").html("(required)"); $("#subject").css('background-color', '#FFFFDF'); valid = false; } if (userMessage == "") { $("#userMessage-info").html("(required)"); $("#userMessage").css('background-color', '#FFFFDF'); valid = false; } handleLoader(valid); return valid;
}
function handleLoader(valid) { if (valid == true) { if ($("#savetodatabase")) { $("#savetodatabase").hide();// hide submit } $("#send").hide(); $("#loading-image").show();// show loader }
}
function addMore() { $(".input-row:last").clone().insertAfter(".input-row:last"); $(".input-row:last").find("input").val(""); showHideControls();
}
function remove() { $(".input-row:last").remove(".input-row:last"); $(".plus-button:last").show(); $(".minus-button:last").hide(); $(".input-row:last").find("input").val("");
}
function showHideControls() { $(".plus-button").hide(); $(".minus-button").show(); $(".minus-button:last").hide(); $(".plus-button:last").show();
}

PHP contact form action to send email or store to Database


Generally, the contact form action will send an email with the body of posted form data. This example gives additional support to store the posted message and the details in the database.

This will be suitable when the HTML contact form is used to collect the following.

  • Users’ feedback
  • Support request
  • Project inquiry
  • Comments

This PHP code handles the form submission by checking the posted action index. It uses the PHP mail() function to send the HTML contact form email. If you want to send an email via SMTP using the PHPMailer library, the link has the code for it.

Refer PHP.net manual to know more about this mail() function.

If the user clicks the ‘Save to database’ button, it connects the Database via the DataSource class. It triggers insert action by sending the form data in the query parameters.

contact-form-action.php


<?php
namespace Phppot; use Phppot\DataSource;
require_once __DIR__ . '/DataSource.php';
require_once __DIR__ . '/index.php';
if (! empty($_POST["savetodatabase"])) { $conn = new DataSource(); $query = "INSERT INTO tbl_contact_mail(userName,subject,userMessage)VALUES(?,?,?)"; $paramType = 'sss'; $paramValue = array( $_POST["userName"], $_POST["subject"], $_POST["userMessage"] ); $id = $conn->insert($query, $paramType, $paramValue); if (! empty($_POST["Fieldname"])) { $customFieldLength = count($_POST["Fieldname"]); for ($i = 0; $i < $customFieldLength; $i ++) { if (! empty($_POST["Fieldname"][$i]) && $_POST["Fieldvalue"][$i]) { $query = "INSERT INTO tbl_custom_field(fieldName,fieldValue,contact_id)VALUES(?,?,?)"; $paramType = 'ssi'; $paramValue = array( $_POST["Fieldname"][$i], $_POST["Fieldvalue"][$i], $id ); $conn->insert($query, $paramType, $paramValue); } } } if ($query==true) { $message = "Data Saved"; $type = "success"; } else { $message = "Problem in data"; $type = "error"; }
} elseif (! empty($_POST["send"])) { if (isset($_POST["userName"])) { $userName = $_POST["userName"]; } if (isset($_POST["subject"])) { $subject = $_POST["subject"]; } if (isset($_POST["userMessage"])) { $message = $_POST["userMessage"]; } $htmlBody = '<div>' . $message . '</div>'; $htmlBody .= '<br>'; $htmlBody .= '<div style=font-weight:bold;>More details:' . '</div>'; for ($i = 0; $i < count($_POST["Fieldname"]); $i ++) { if (isset($_POST["Fieldname"][$i]) && (isset($_POST["Fieldvalue"][$i]))) { $fieldname = $_POST["Fieldname"][$i]; $fieldvalue = $_POST["Fieldvalue"][$i]; $htmlBody .= '<div>' . $fieldname . '<div style=display:inline-block;margin-left:10px;>' . $fieldvalue . '</div>'; } } $htmlBody .= '<br><br><br>'; $htmlBody .= '<div>Thank You...!' . '</div>'; // Run loop
$recipient="recipient@domain.com"; if (mail($recipient, $subject, $htmlBody)) { $message = "Mail sent successfully"; $type = "success"; } else { $message = "Problem in sending email"; $type = "error"; }
} ?>

Database script


This .sql file contains the create a statement and required indices of the tbl_contact table.

Import this SQL after setting up this example code in your PHP environment.

Note: This is only required if you need the “Store to database” option.

database.sql


-- -------------------------------------------------------- --
-- Table structure for table `tbl_contact`
-- CREATE TABLE `tbl_contact` ( `id` int(11) NOT NULL, `userName` varchar(255) NOT NULL, `subject` varchar(255) NOT NULL, `userMessage` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- --
-- Table structure for table `tbl_custom_field`
-- CREATE TABLE `tbl_custom_field` ( `id` int(11) NOT NULL, `contact_id` int(11) NOT NULL, `fieldName` varchar(11) NOT NULL, `fieldValue` varchar(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; --
-- Indexes for dumped tables
-- --
-- Indexes for table `tbl_contact`
--
ALTER TABLE `tbl_contact` ADD PRIMARY KEY (`id`); --
-- Indexes for table `tbl_custom_field`
--
ALTER TABLE `tbl_custom_field` ADD PRIMARY KEY (`id`); --
-- AUTO_INCREMENT for dumped tables
-- --
-- AUTO_INCREMENT for table `tbl_contact`
--
ALTER TABLE `tbl_contact` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --
-- AUTO_INCREMENT for table `tbl_custom_field`
--
ALTER TABLE `tbl_custom_field` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

html contact form custom field

Conclusion


I hope this article gives you a useful contact form component for your website. It will be helpful to have a good idea to create a form like this on your own.

Custom field integration with contact forms a rare and tricky requirement. Share your thoughts in the comments section to continue posting useful codes.

Download

↑ Back to Top



https://www.sickgaming.net/blog/2022/01/...om-fields/

Print this item

  (Indie Deal) Anime Sale, Nacon, Raiser Deals
Posted by: xSicKxBot - 03-31-2022, 01:50 AM - Forum: Deals or Specials - No Replies

Anime Sale, Nacon, Raiser Deals

Anime Sale, up to 95% OFF
[www.indiegala.com]
Fusion! With the power of anime and gaming combined, the Anime Sale was born! Official anime/manga video games, anime-inspiring games, famous classic/modern Japanese franchises, otaku-favorite titles & more.

Nacon & Raiser Games Sale, up to 85% OFF
[www.indiegala.com]
[www.indiegala.com]
https://youtu.be/07stTeEzL2I
Stay Inside, Stay Safe and Enjoy Good Games.
Check out IndieGala on Twitter, YouTube & Facebook[www.facebook.com]


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

Print this item

  (Free Game Key) Thea 2: The Shattering - Free GOG Game
Posted by: xSicKxBot - 03-31-2022, 01:50 AM - Forum: Deals or Specials - No Replies

Thea 2: The Shattering - Free GOG Game

Visit the store page and add the game to your account:

Thea 2: The Shattering[www.gog.com]

The game is free to keep until April 1st 2022 - 13:00 UTC.

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] Epic Tag: GrabFreeGames


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

Print this item

  PC - Distant Worlds 2
Posted by: xSicKxBot - 03-31-2022, 01:50 AM - Forum: New Game Releases - No Replies

Distant Worlds 2



Distant Worlds, the critically acclaimed 4X space strategy game is back with a brand new 64-bit engine, 3D graphics and a polished interface to begin an epic new Distant Worlds series with Distant Worlds 2.

Distant Worlds 2 is a vast, pausable real-time 4X space strategy game. Experience the full depth and detail of turn-based strategy, but with the simplicity and ease of real-time, and on the scale of a massively-multiplayer online game.

Huge Galaxies with up to 2,000 star systems and tens of thousands of planets, moons and asteroids are yours to explore and exploit, whether peacefully through mining and diplomacy or by conquest! The complex process of generating a galaxy ensures that every new game will be different and the many galaxy setup options ensure incredible replayability as well as the ability to have your game be just the way you like it.

Publisher: Slitherine

Release Date: Mar 10, 2022




https://www.metacritic.com/game/pc/distant-worlds-2

Print this item

  News - Activision Is Going Hard On Call Of Duty With A New Studio In Montreal
Posted by: xSicKxBot - 03-31-2022, 01:50 AM - Forum: Lounge - No Replies

Activision Is Going Hard On Call Of Duty With A New Studio In Montreal

Beenox, an Activision-owned studio that supports the mammoth Call of Duty franchise, has today announced that it will be expanding into a new location in Montreal, in addition to its headquarters in Quebec City.

The second office will allow Beenox to increase its staff by over 20%, the studio said in a press release, continuing an expansion that has already seen it hire over 150 developers in the last year. As far as what the new studio will be focusing on, the press release states that the new studio will be able to "support the growth of the [Call of Duty] franchise and additional ambitious projects."

Many of the jobs currently listed for the new studio have a mobile focus, suggesting the Montreal studio will have a lot to contribute to the upcoming Call Of Duty: Warzone mobile port, which was confirmed earlier in March.

Continue Reading at GameSpot

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

Print this item

 
Latest Threads
Insta360 Coupon [INRSGY42...
Last Post: levlotus1998
1 hour ago
Insta360 Discount Code [I...
Last Post: levlotus1998
1 hour ago
Insta360 Coupon Codes | I...
Last Post: levlotus1998
1 hour ago
Insta360 Discount Code [I...
Last Post: levlotus1998
1 hour ago
Insta360 Discount Code | ...
Last Post: levlotus1998
1 hour ago
Insta360 Discount Code [I...
Last Post: levlotus1998
1 hour ago
Insta360 Discount Code [I...
Last Post: levlotus1998
1 hour ago
Insta360 Discount Code Ju...
Last Post: levlotus1998
1 hour ago
News - Love And Deepspace...
Last Post: xSicKxBot
2 hours ago
Temu Kod Promocyjny [ald9...
Last Post: lucas03215
4 hours ago

Forum software by © MyBB Theme © iAndrew 2016