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: 19,914
» Latest member: ThePropheC1
» Forum threads: 22,277
» Forum posts: 23,117

Full Statistics

Online Users
There are currently 1032 online users.
» 2 Member(s) | 1025 Guest(s)
Applebot, Baidu, Bing, Google, Yandex, riya199191, ThePropheC1

 
  Understanding Angle Brackets in Bash
Posted by: xSicKxBot - 01-25-2019, 12:48 AM - Forum: Linux, FreeBSD, and Unix types - No Replies

Understanding Angle Brackets in Bash

Bash provides many important built-in commands, like ls, cd, and mv, as well as regular tools such as grep, awk, and sed. But, it is equally important to know the punctuation marks — the glue in the shape of dots, commas, brackets. and quotes — that allow you to transform and push data from one place to another. Take angle brackets (< >), for example.

Pushing Around


If you are familiar with other programming and scripting languages, you may have used < and > as logical operators to check in a condition whether one value is larger or smaller than another. If you have ever written HTML, you have used angle brackets to enclose tags.

In shell scripting, you can also use brackets to push data from place to place, for example, to a file:

ls > dir_content.txt

In this example, instead of showing the contents of the directory on the command line, > tells the shell to copy it into a file called dir_content.txt. If dir_content.txt doesn’t exist, Bash will create it for you, but if dir_content.txt already exists and is not empty, you will overwrite whatever it contained, so be careful!

You can avoid overwriting existing content by tacking the new stuff onto the end of the old stuff. For that you use >> (instead of >):

ls $HOME > dir_content.txt; wc -l dir_content.txt >> dir_content.txt

This line stores the list of contents of your home directory into dir_content.txt. You then count the number of lines in dir_content.txt (which gives you the number of items in the directory) with wc -l and you tack that value onto the end of the file.

After running the command line on my machine, this is what my dir_content.txt file looks like:

Applications bin cloud Desktop Documents Downloads Games ISOs lib logs Music OpenSCAD Pictures Public Templates test_dir Videos 17 dir_content.txt

The mnemonic here is to look at > and >> as arrows. In fact, the arrows can point the other way, too. Say you have a file called CBActors containing some names of actors and the number of films by the Coen brothers they have been in. Something like this:

John Goodman 5
John Turturro 3
George Clooney 2
Frances McDormand 6
Steve Buscemi 5
Jon Polito 4
Tony Shalhoub 3
James Gandolfini 1

Something like

sort < CBActors # Do this
Frances McDormand 6 # And you get this
George Clooney 2 James Gandolfini 1 John Goodman 5 John Turturro 3 Jon Polito 4 Steve Buscemi 5 Tony Shalhoub 3

Will sort the list alphabetically. But then again, you don’t need < here since sort already expects a file anyway, so sort CBActors will work just as well.

However, if you need to see who is the Coens’ favorite actor, you can check with :

while read name surname films; do echo $films $name $surname > filmsfirst.txt; done < CBActors

Or, to make that a bit more readable:

while read name surname films;\ do echo $films $name $surname >> filmsfirst;\ done < CBActors

Let’s break this down, shall we?

  • the while ...; do ... done structure is a loop. The instructions between do and done are repeatedly executed while a condition is met, in this case…
  • … the read instruction has lines to read. read reads from the standard input and will continue reading until there is nothing more to read…
  • … And as standard input is fed in via < and comes from CBActors, that means the while loop will loop until the last line of CBActors is piped into the loop.
  • Getting back to read for a sec, the tool is clever enough to see that there are three distinct fields separated by spaces on each line of the file. That allows you to put the first field from each line in the name variable, the second in surname and the third in films. This comes in handy later, on the line that says echo $films $name $surname >> filmsfirst;\, allowing you to reorder the fields and push them into a file called filmsfirst.

At the end of all that, you have a file called filmsfirst that looks like this:

5 John Goodman 3 John Turturro 2 George Clooney 6 Frances McDormand 5 Steve Buscemi 4 Jon Polito 3 Tony Shalhoub 1 James Gandolfini

which you can now use with sort:

sort -r filmsfirst

to see who is the Coens’ favorite actor. Yes, it is Frances McDormand. (The -r option reverses the sort, so McDormand ends up on top).

We’ll look at more angles on this topic next time!

Print this item

  News - Dead Or Alive 6 Devs Want To Make The Jump To The Larger Esports Stage
Posted by: xSicKxBot - 01-24-2019, 02:32 PM - Forum: Lounge - No Replies

Dead Or Alive 6 Devs Want To Make The Jump To The Larger Esports Stage

Though the Dead or Alive series hasn't reached the same heights as Mortal Kombat or Street Fighter, it's still a fighting game series that's carved out a place for itself alongside the others since its debut nearly 23 years ago. With Dead or Alive 6 slowly approaching its March 1 launch--releasing on PC, PS4, and Xbox One--the developers at Team Ninja plan for the next game to offer more single-player and online content, with the aim that this will attract greater interest for large-scale competitive play.

While attending a recent hands-on session for the soon-to-be-released fighter, we talked with game director Yohei Shimbori, who spoke about the lessons learned from the free-to-play experiment with DOA5, and what the series hopes to accomplish in 2019.

"There's many different kinds of fans for fighting games," said the director. "Some play it for the story, some play it for esports. We saw that when Street Fighter 5 came out, it didn't have a story mode, and there was a lot of controversy around that. Once we saw that, we knew that people really wanted a story mode in their fighting games. There are also a lot of fans who really gravitate to certain characters. We focused more on that in DOA5 and the free-to-play versions, and with the expanded customization in DOA6, we wanted the fans to create their own personal versions of that character."

No Caption Provided
Gallery image 1Gallery image 2Gallery image 3Gallery image 4Gallery image 5Gallery image 6Gallery image 7Gallery image 8Gallery image 9Gallery image 10

Recently, the game's launch was delayed till March 1, away from its original release on February 15. According to the developers, this was to ensure that the game would be in stable shape for its debut. While the DOA series has had a particular reputation for blending fast, fighting action with characters that leaned heavily into fan-service territory, the developers want the series to be taken more seriously as a contender with DOA6, which they hope will push the franchise further into the spotlight.

"I'm very proud of how we're able to release this game after DOA5, as there was a pretty long gap when that game launched," Shimbori said. "Also, I'm very happy to see that the esports movement has gotten bigger in recent years. I really want to work with fans to help DOA expand and reach that type of stage. My dream is for the DOA fanbase is for it to grow even larger than from what it is today."

For more on Dead or Alive 6, such as the current roster and what to expect from the comprehensive customization options, be sure to check back with GameSpot.

Print this item

  News - Surprise! Goat Simulator: The GOATY Is Available On Switch Right Now
Posted by: xSicKxBot - 01-24-2019, 02:32 PM - Forum: Nintendo Discussion - No Replies

Surprise! Goat Simulator: The GOATY Is Available On Switch Right Now

Goat

Among the surprise announcements during today’s Nintendo Indie Highlights presentation was Goat Simulator: The GOATY. It’s available to play on Switch as we speak.

That’s right, everyone’s favourite game about possessing the body of a goat, exploring an open, suburban world, bashing into everything in sight, and occasionally giving things a good lick is now on Switch. As the small clip from the presentation states, it’s bringing “next-gen goat simulation” to a console near you.


The trailer shows you the exact kind of madness you can expect to find in the game, and the Switch version includes all DLC released for the title on other platforms.

You can pick the bundle up right now from the Switch eShop for £26.99 / $29.99.

Are you snapping this one up immediately? Is Goat Simulator perhaps not your thing? Tell us below.

Print this item

  Embedded Linux Conference North America
Posted by: xSicKxBot - 01-24-2019, 02:32 PM - Forum: Linux, FreeBSD, and Unix types - No Replies

Embedded Linux Conference North America

Embedded Linux Conference

August 21, 2019

Hilton San Diego Bayfront

San Diego, CA 92101

United States

Embedded Linux Conference (ELC) is the premier vendor-neutral technical conference where developers working on embedded Linux and industrial IoT products and deployments gather for education and collaboration, paving the way for innovation. Attend, and join 800+ technical experts paving the way for transformation in these key areas from across the globe for education, collaboration and deep dive learning opportunities.

For the first time in 2019, Embedded Linux Conference North America will co-locate with Open Source Summit North America. Learn More

Click Here!

Print this item

  Microsoft - Scientists discover how bacteria use noise to survive stress
Posted by: xSicKxBot - 01-24-2019, 02:32 PM - Forum: Windows - No Replies

Scientists discover how bacteria use noise to survive stress

January 22, 2019 | By Microsoft blog editor



Noisy expression of stress response in microcolony of E. coli.

Mutations in the genome of an organism give rise to variations in its form and function—its phenotype. However, phenotypic variations can also arise in other ways. The random collisions of molecules constituting an organism—including its DNA and the proteins that transcribe the DNA to RNA—result in noisy gene expression that can lead to variations in behavior even in the absence of mutations. In a research paper published in Nature Communications, researchers at Microsoft Research and the University of Cambridge have discovered how bacteria can couple noisy gene expression with noisy growth to survive rapidly changing environments.

“We have taken advantage of advances in microfluidics technology, time-lapse microscopy, and the availability of libraries of genetically modified bacteria that have happened in the past decade or so to provide unprecedented detail of how single cells survive stress,” says Microsoft PhD Scholar Om Patange. “We hope this will help fellow researchers see that studies of bacteria at the single-cell level can reveal important aspects of how these organisms live and contend with their environment.”

Cells stochastically turn on their stress response and slow down growth to survive future stressful times. A montage of E. coli grown in a microfluidics device illustrates this phenomenon.

Using a microfluidic device, Patange—together with colleagues and cosupervisors Andrew Phillips, head of Microsoft Research’s Biological Computation group, and James Locke, research group leader at Cambridge’s Sainsbury Laboratory—observed single Escherichia coli cells grow and divide over many generations. They found that a key regulator of stress response called RpoS pulsed on and off. When these happily growing cells were exposed to a sudden chemical stress, the few cells ready for the stress survived. This is a striking example of a microbial population partitioning into two populations despite being of the same genetic makeup. The researchers further discovered that the surviving population was paying a cost to survive: They grew slower than their neighbors.

To uncover the mechanism causing the cells to grow slowly and turn on their stress response, the researchers developed a stochastic simulation of biological reactions inside single cells. They found that a simple mutual inhibitory coupling of noisy stress response and noisy growth caused the pulses observed and also captured more subtle observations.

This study, for which single-cell datasets are available on GitLab, has both pure and applied implications. The stress response phenomenon may be related to persistence, a strategy used by bacteria to evade antibiotics without mutations. Understanding the connection between persistence and stress response may lead to more nuanced approaches to antibiotic treatments. The idea that bacteria have evolved a population-level phenotype governed by single-cell actions is also intriguing. Understanding the benefit gained by the population at the expense of single bacteria may yield insights into the evolution of cooperative strategies.

“The bacteria might teach us about cooperative strategies we haven’t already come up with,” says Patange. “We might also learn how to use and defend against bacteria better if we can see the world from their perspective.”


Print this item

  Microsoft - Open-source effort is helping map at-risk areas in the developing world
Posted by: xSicKxBot - 01-24-2019, 02:32 PM - Forum: Windows - No Replies

Open-source effort is helping map at-risk areas in the developing world

When disaster hits, be it a natural disaster, epidemic, poverty or other crisis, first responders rely on GIS data to access the areas impacted.

Missing MapsMissing Maps is an open-source collaborative effort founded by the American Red Cross, British Red Cross, Medicine Sans Frontiers, and the Humanitarian OpenStreetMap team where volunteers help to map areas in an effort to ensure that many of the places previously missing from maps can be located and reached.

Millions of edits are made to OpenStreetMap by thousands of volunteers and members of the OpenStreetMap community.


Moved by the Missing Maps objective, “To map the most vulnerable places in the developing world, in order that international and local NGOs and individuals can use the maps and data to better respond to crises affecting the areas,” teams at Microsoft are contributing time, resources and technical expertise to the project.

Since initiating the program at Microsoft, over four thousand employees have been trained in contributing to OpenStreetMap at hundreds of mapathons across the company. With the goal to “put 200 million people ‘on the map’ by 2021,” we hope you are inspired to get involved too! 


To learn more about Missing Maps and to start mapping, go to www.missingmaps.org


– Bing Maps Team


Print this item

  PS4 - Wandersong
Posted by: xSicKxBot - 01-24-2019, 03:51 AM - Forum: New Game Releases - No Replies

Wandersong



A musical adventure where you use singing to save the world! Play as a silly bard who embarks on a globe-trotting journey to learn about the mysterious Earthsong, said to prevent the universe?s imminent end. It?s up to you to sing your songs, unlock the world?s secrets and make new friends.

Publisher: Dumb and Fat Games

Release Date: Jan 22, 2019

Print this item

  PS4 - A Fisherman's Tale
Posted by: xSicKxBot - 01-24-2019, 03:51 AM - Forum: New Game Releases - No Replies

A Fisherman's Tale



Bend and twist reality in A Fisherman?s Tale, the mind-bending VR puzzle adventure game in which being turned upside down and inside out is not merely a play on words.

Publisher: Vertigo Games

Release Date: Jan 22, 2019

Print this item

  PC - Jon Shafer's At the Gates
Posted by: xSicKxBot - 01-24-2019, 03:51 AM - Forum: New Game Releases - No Replies

Jon Shafer's At the Gates



At the Gates is an indie strategy game from Jon Shafer, designer of Civilization 5. You are a dark age lord building a kingdom to replace the crumbling Roman Empire. Manage your clans, explore the landscape around you, harvest its resources, and build a mighty economic and military machine.

Publisher: Conifer Games

Release Date: Jan 23, 2019

Print this item

  PC - Slay the Spire
Posted by: xSicKxBot - 01-24-2019, 03:51 AM - Forum: New Game Releases - No Replies

Slay the Spire



We fused card games and roguelikes together to make the best single player deckbuilder we could. Craft a unique deck, encounter bizarre creatures, discover relics of immense power, and Slay the Spire!

Publisher: Mega Crit Games

Release Date: Jan 23, 2019

Print this item

 
Latest Threads
Apollo Neuro Coupon Code ...
Last Post: ThePropheC1
2 minutes ago
Apollo Neuro Promo Code $...
Last Post: ThePropheC1
7 minutes ago
Apollo Neuro Promo Code $...
Last Post: ThePropheC1
12 minutes ago
SHEIN Special Discount (S...
Last Post: riya199191
14 minutes ago
SHEIN Discount Promotion ...
Last Post: riya199191
15 minutes ago
Apollo Neuro Coupon Code ...
Last Post: ThePropheC1
16 minutes ago
Temu Coupon [ald911505] 3...
Last Post: codestar83
16 minutes ago
【$40 off】Shein Coupon ⇒["...
Last Post: riya199191
16 minutes ago
Temu Coupon Code 30% Off ...
Last Post: codestar83
17 minutes ago
Exclusive Temu Coupon [al...
Last Post: codestar83
19 minutes ago

Forum software by © MyBB Theme © iAndrew 2016