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,978
» Forum posts: 22,945

Full Statistics

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

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

» Replies: 0
» Views: 13
BO6 & Warzone devs promis...
Forum: PC Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 14
I Thought Block Blast Was...
Forum: Lounge
Last Post: starfishmil

» Replies: 0
» Views: 17
[PS.Blog] Silent Hill: To...
Forum: Sony Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 13
[Steam Release] Good Comp...
Forum: New Game Releases
Last Post: xSicKxBot

» Replies: 0
» Views: 16
[DevBlog MS] Performance ...
Forum: C#, Visual Basic, & .Net Frameworks
Last Post: xSicKxBot

» Replies: 0
» Views: 23
[WoW Retail News] Over 20...
Forum: World of Warcraft
Last Post: xSicKxBot

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

» Replies: 0
» Views: 27
[Steam Release] Raft, 15%...
Forum: New Game Releases
Last Post: xSicKxBot

» Replies: 0
» Views: 23
Marvel Rivals Ace icon ex...
Forum: PC Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 26

 
  PC - Marvel's Midnight Suns
Posted by: xSicKxBot - 12-17-2022, 03:17 PM - Forum: New Game Releases - No Replies

Marvel's Midnight Suns



After centuries of sleep, Lilith, Mother of Demons, has been revived by Hydra through a twist of dark magic and science. Lilith stops at nothing to complete an ancient prophecy and bring back her evil master, Chthon. Pushed to the brink, the Avengers desperately look to fight fire with hellfire and enlist the help of the Midnight Suns - Nico Minoru, Blade, Magik and Ghost Rider - young heroes with powers deeply rooted in the supernatural, formed to prevent the very prophecy Lilith aims to fulfill.

In the face of fallen allies and the fate of the world at stake, it will be up to you to rise up against the darkness!

Marvel's Midnight Suns is a new tactical RPG set in the darker side of the Marvel Universe, putting you face-to-face against demonic forces of the underworld as you team up with and live among the Midnight Suns, Earth's last line of defense.

Publisher: 2K Games

Release Date: Dec 02, 2022




https://www.metacritic.com/game/pc/marve...night-suns

Print this item

  [Oracle Blog] JDK 14.0.2, 11.0.8, 8u261, and 7u271 Have Been Released!
Posted by: xSicKxBot - 12-16-2022, 10:38 PM - Forum: Java Language, JVM, and the JRE - No Replies

JDK 14.0.2, 11.0.8, 8u261, and 7u271 Have Been Released!

The Java SE 14.0.2, 11.0.8, 8u261 and 7u271 update releases are now available. You can download the latest JDK releases from the Java SE Downloads page. OpenJDK 14.0.2 is available on http://jdk.java.net/14/. New Features, Changes, and Notable Bug Fixes For information about the new features, change...


https://blogs.oracle.com/java/post/jdk-1...n-released

Print this item

  [Tut] Python | Split String and Remove newline
Posted by: xSicKxBot - 12-16-2022, 10:38 PM - Forum: Python - No Replies

Python | Split String and Remove newline

Rate this post

Summary: The simplest way to split a string and remove the newline characters is to use a list comprehension with a if condition that eliminates the newline strings.

Minimal Example


text = '\n-hello\n-Finxter'
words = text.split('-') # Method 1
res = [x.strip('\n') for x in words if x!='\n']
print(res) # Method 2
li = list(map(str.strip, words))
res = list(filter(bool, li))
print(res) # Method 3
import re
words = re.findall('([^-\s]+)', text)
print(words) # ['hello', 'Finxter']

Problem Formulation


Problem: Say you use the split function to split a string on all occurrences of a certain pattern. If the pattern appears at the beginning, in between, or at the end of the string along with a newline character, the resulting split list will contain newline strings along with the required substrings. How to get rid of the newline character strings automatically?

Example


text = '\n\tabc\n\txyz\n\tlmn\n'
words = text.split('\t') # ['\n', 'abc\n', 'xyz\n', 'lmn\n']

Note the empty strings in the resulting list.

Expected Output:

['abc', 'xyz', 'lmn']

Method 1: Use a List Comprehension


The trivial solution to this problem is to remove all newline strings from the resulting list using list comprehension with a condition such as [x.strip('\n') for x in words if x!='\n'] to filter out the newline strings. To be specific, the strip function in the expression allows you to get rid of the newline characters from the items, while the if condition allows you to eliminate any independently occurring newline character.

Code:

text = '\n\tabc\n\txyz\n\tlmn\n'
words = text.split('\t')
res = [x.strip('\n') for x in words if x!='\n']
print(res) # ['abc', 'xyz', 'lmn']

Method 2: Use a map and filter


Prerequisite

  • The map() function transforms one or more iterables into a new one by applying a “transformator function” to the i-th elements of each iterable. The arguments are the transformator function object and one or more iterables. If you pass n iterables as arguments, the transformator function must be an n-ary function taking n input arguments. The return value is an iterable map object of transformed, and possibly aggregated, elements.
  • Python’s built-in filter() function is used to filter out elements that pass a filtering condition. It takes two arguments: function and iterable. The function assigns a Boolean value to each element in the iterable to check whether the element will pass the filter or not. It returns an iterator with the elements that pass the filtering condition.

?Related Read:
(i) Python map()

(ii) Python filter()

Approach: An alternative solution is to remove all newline strings from the resulting list using map() to first get rid of the newline characters attached to each item of the returned list and then using the filter() function such as filter(bool, words) to filter out any empty string '' and other elements that evaluate to False such as None.

text = '\n\tabc\n\txyz\n\tlmn\n'
words = text.split('\t')
li = list(map(str.strip, words))
res = list(filter(bool, li))
print(res) # ['abc', 'xyz', 'lmn']

Method 3: Use re.findall() Instead


A simple and Pythonic solution is to use re.findall(pattern, string) with the inverse pattern used for splitting the list. If pattern A is used as a split pattern, everything that does not match pattern A can be used in the re.findall() function to essentially retrieve the split list.

Here’s the example that uses a negative character class [^\s]+ to find all characters that do not match the split pattern:

import re text = '\n\tabc\n\txyz\n\tlmn\n'
words = re.findall('([^\s]+)', text)
print(words) # ['abc', 'xyz', 'lmn']

Note:

The re.findall(pattern, string) method scans string from left to right, searching for all non-overlapping matches of the pattern. It returns a list of strings in the matching order when scanning the string from left to right.


?Related Read: Python re.findall() – Everything You Need to Know

Exercise: Split String and Remove Empty Strings


Problem: Say you have been given a string that has been split by the split method on all occurrences of a given pattern. The pattern appears at the end and beginning of the string. How to get rid of the empty strings automatically?

s = '_hello_world_'
words = s.split('_')
print(words) # ['', 'hello', 'world', '']

Note the empty strings in the resulting list.

Expected Output:

['hello', 'world']

? Hint: Python Regex Split Without Empty String

Solution:

import re s = '_hello_world_'
words = s.split('_') # Method 1: Using List Comprehension
print([x for x in words if x!='']) # Method 2: Using filter
print(list(filter(bool, words))) # Method 3: Using re.findall
print(re.findall('([^_\s]+)', s))

Conclusion


Thus, we come to the end of this tutorial. We have learned how to eliminate newline characters and empty strings from a list in Python in this article. I hope it helped you and answered all your queries. Please subscribe and stay tuned for more interesting reads.




https://www.sickgaming.net/blog/2022/12/...e-newline/

Print this item

  (Indie Deal) ?December Delights Bundle & Alawar Sale
Posted by: xSicKxBot - 12-16-2022, 10:38 PM - Forum: Deals or Specials - No Replies

?December Delights Bundle & Alawar Sale

December Delights Bundle | 8 Adult 18+ Games | 94% OFF
[www.indiegala.com]
The cold season just got hotter, with a delightful selection of eroge titles that will keep you warm for the entire month of December. December Delights Bundle is LIVE!

https://www.youtube.com/watch?v=fGnOgktPvSo
Alawar Sale, up to 90% OFF
[www.indiegala.com]

https://www.youtube.com/watch?v=haMLxLbN2WI
Monster Spark Bundle Happy Hour is ON
[www.indiegala.com]


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

Print this item

  (Free Game Key) King of Seas - Free GOG Game
Posted by: xSicKxBot - 12-16-2022, 10:38 PM - Forum: Deals or Specials - No Replies

King of Seas - Free GOG Game

This giveaway is on gog.com gog is a platform for games that is dedicated to drm-free games (those are games that do not require login or registration to play the game)

How to grab King of Seas
- Go to the home page of https://gog.com/#giveaway
- Login and Register
- Go to the home page again
- Wait for 10 seconds then start searching for King of Seas
- on the home page look for "Deal of the Day" (above it there should be a banner)
- on the banner there is a button "Yes, and claim the game" click it
- Thats it


GOG Store link: https://www.gog.com/en/game/king_of_seas
Auto-claim link: https://www.gog.com/giveaway/claim

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

Print this item

  News - After 25 Years, The Pokemon Anime Series Is Saying Goodbye To Ash And Pikachu
Posted by: xSicKxBot - 12-16-2022, 10:38 PM - Forum: Lounge - No Replies

After 25 Years, The Pokemon Anime Series Is Saying Goodbye To Ash And Pikachu

After 25 years, the Pokemon anime series is shaking up its formula by saying goodbye to Ash and Pikachu. The new Pokemon series that is set to debut in 2023, once Pokemon Ultimate Journeys: The Series concludes, will star two new protagonists named Riko and Roy. The new show will also see the three Paldea starter Pokemon, Sprigatito, Fuecoco, and Quaxly, join the duo on their journey.

Ash and Pikachu's departure makes sense, as the pair finally reached the apex of the Pokemon world earlier this year during the World Coronation Series Masters Eight Tournament. After coming close to being recognized as the best (like no one ever was) Pokemon trainer in several regional conference tournaments, Ash finally achieved his goal and became the Pokemon champion after he defeated old rivals and new challengers across the globe.

Continue Reading at GameSpot

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

Print this item

  PC - The Callisto Protocol
Posted by: xSicKxBot - 12-16-2022, 10:38 PM - Forum: New Game Releases - No Replies

The Callisto Protocol



Set on Jupiter's moon Callisto in the year 2320, The Callisto Protocol is a next-generation take on survival horror. The game challenges players to escape the maximum security Black Iron Prison and uncover its terrifying secrets. A blend of horror, action, and immersive storytelling, the game aims to set a new bar for horror in interactive entertainment.

Publisher: KRAFTON Inc.

Release Date: Dec 02, 2022




https://www.metacritic.com/game/pc/the-c...o-protocol

Print this item

  [Oracle Blog] Oracle becomes an Ecma TC39 member
Posted by: xSicKxBot - 12-16-2022, 01:36 AM - Forum: Java Language, JVM, and the JRE - No Replies

Oracle becomes an Ecma TC39 member

Oracle is proud to announce that it has become an associate member of Ecma International and is participating in TC39, the working group responsible for the ECMAScript specification that defines the popular JavaScript programming language. Ecma International is an industry association that develops ...


https://blogs.oracle.com/java/post/oracl...c39-member

Print this item

  (Indie Deal) Vorax Open Alpha & Development Update #2
Posted by: xSicKxBot - 12-16-2022, 01:36 AM - Forum: Deals or Specials - No Replies

Vorax Open Alpha & Development Update #2

Vorax Open Alpha is now available
[freebies.indiegala.com]
The open alpha featuring our newest build is available for a limited time to download & play on Indiegala via our client or on Steam .Play Vorax alpha 0.3 today and experience true horror.

Video 1: Chainsaw - Woodcutting
In order to build your defenses and fortifications, raw material will be needed. In the sylvan section of the island wood is easily available, from small saplings, bushes to tall and majestic trees. There is a bountiful arborical selection.

However, harvesting and gathering wood isn't such a light task. Tools are needed. While punching a tree, with one's brute force, could, in some circumstances, offer a few splinters, an axe or a hatchet would do a slightly better job. But, we have evolved beyond such primitive methods, and have found a more efficient method: the chainsaw.

A fairly hefty tool but it gets the job done: trees, logs, evergreen, wild animals and more, as long as you have the space and strength to carry, with enough fuel in your tank, you can clear out an entire forest in a jiffy.

Video 2: Close & Personal - Chainsaw Combat
Chainsaws, hatchets, hammers, etc. There are plenty of melee options that allow you to get close and personal. But, did you know that chainsaws can be used for more than just cutting trees?

Yes. Originally, the first chain saws were being used in surgery, for the excision of diseased joints or simply cutting bone. Luckily nowadays on the island, you do not need a medical degree nor take the Hippocratic Oath in order to operate a chainsaw...and there are plenty of diseased specimens that need a check-up.

If "an apple a day keeps the doctor away", a chainsaw keeps everyone away, every day.

Video 3: Circuits - "Let there be light"
Fuses, diodes, resistors, capacitors and lots of wiring. While becoming an aspiring electrical engineer can be a great prospect for the future, getting back alive from the island must come as a priority.

Completing a broken panel requires the rotation of tiles of a network trying to connect power to the grid. Generation of the grid is entirely procedural so that no playthrought has the same puzzle.

By solving the electrical puzzles, mounting enough fuses and with the right parts, entire buildings, dark hallways or even sewer sections can be illuminated.

Remember: light may maintain your sanity...but may also attract unwanted visitors.

Wishlist now:
https://store.steampowered.com/app/1874190/Vorax/
[discord.gg]


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

Print this item

  (Free Game Key) Bloons TD 6 - Free Epic Games Game (24H Only)
Posted by: xSicKxBot - 12-16-2022, 01:36 AM - Forum: Deals or Specials - No Replies

Bloons TD 6 - Free Epic Games Game (24H Only)

Bloons TD 6 - 24 hours only
https://store.epicgames.com/p/bloons-td-6-bf95a0

This game is free to keep if claimed by December 16, 2022 5:00 PM or in a day

Next weeks freebies:
Mystery Game (15 days of charismas giveaways, a giveaway a day)

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

Print this item