August 2017 - All About Technology! "

All About Technology!

All About Technology! A complete guide to latest technology and science.

Monday, August 28, 2017

August 28, 2017 0

What Is a Regular Expression, Regexp, or Regex?

A regular expression is a special text string for describing a search pattern. You can think of regular expressions as wildcards on steroids. You are probably familiar with wildcard notations such as *.txt to find all text files in a file manager. The regex equivalent is .*\.txt.

But you can do much more with regular expressions. In a text editor like EditPad Pro or a specialized text processing tool like PowerGREP, you could use the regular expression \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}\b to search for an email address. Anyemail address, to be exact. A very similar regular expression can be used by a programmer to check if the user entered a properly formatted email address. In just one line of code, whether that code is written in Perl, PHP, Java, a .NET language or a multitude of other languages.

Since "regular expressions" is a mouthful, you will usually find the term abbreviated as "regex" or "regexp". We prefer "regex", since it can be easily pluralized as "regexes".

What is a regular expression in programming?

Short for regular expression, a regex is a string of text that allows you to create patterns that help match, locate, and manage text. Perl is a great example of a programming language that utilizes regular expressions.



Save Time and Effort with Regex's

Basically, a regular expression is a pattern describing a certain amount of text. That makes them ideally suited for searching, text processing and data validation.


Searching with regular expressions enables you to get results with just one search instead of many searches. Searching for the word "separate" and all of its common misspellings is easy with the regex s[ae]p[ae]r[ae]te. If you forgot the phone number of your friend who moved to Anguilla, search your past correspondence for \b1?[-( ]*264[-) ]*\d{3}[- ]*\d{4}\b and get a handy list of all phone numbers in area code 264, regardless of the notation style used.
Update large amounts of data by searching and replacing with regular expressions. The benefit of using regular expressions to update data is that with a single regex pattern, you can dynamically update a variety of data. E.g. search for (copyright +(©|\(c\)|©) +\d{4})( *[-,] *\d{4})* and replace with \1-2014 to update all copyright statements to 2014, regardless of the style of copyright symbol and the current copyright year. "copyright (c) 1996-2002" is replaced with "copyright (c) 1996-2014", while "Copyright © 2009" is replaced with "Copyright © 2009-2014", etc. This takes only a few minutes to set up and a dozen seconds to run with RegexBuddy's built-in GREP tool. Imagine making those changes by hand.


The Uses of Regex (Regular expressions) 

Regex is the gift that keeps giving. Once you learn it, you discover it comes in handy in many places where you hadn't planned to use it. On this page, we'll first look at a number of contexts and programs where you may find regex. Then we'll have a quick look at some regex flavors you may run into. Finally, we'll study some examples of regex patterns in contexts such as:

 File Renaming
 Text Search
 Web directives (Apache)
 Database queries (MySQL) 

Learn thousands of uses of regex from here Uses of The Regular Expression (Download PDF).


Quick-Start: Regex Cheat Sheet


The tables below are a reference to basic regex. While reading the rest of the site, when in doubt, you can always come back and look here. (It you want a bookmark, here's a direct link to the 
regex reference tables). I encourage you to print the tables so you have a cheat sheet on your desk for quick reference.

The tables are not exhaustive, for two reasons. First, every regex flavor is different, and I didn't want to crowd the page with overly exotic syntax. For a full reference to the particular regex flavors you'll be using, it's always best to go straight to the source. In fact, for some regex engines (such as Perl, PCRE, Java and .NET) you may want to check once a year, as their creators often introduces new features. 


Download and use regex cheat sheet and start learning regular expression  Regular Expression Cheat Sheet (Download PDF).
Read More

Saturday, August 26, 2017

Artificial Intelligence : Autonomous Sky Gliders tested by Microsoft

August 26, 2017 0

Auto Gliding: Making Self-Decision on Air

Microsoft develops their auto pilot system (Auto gliders) by using Artificial Intelligence. While other competitors developing self-driven cars, Microsoft recently conducted a successful test flight of their auto pilot system (Auto gliders) which can take decision during the flight.

Indian-origin researcher Ashish Kapoor, head researcher of Microsoft leading his team in Microsoft’s autonomous sky glider project and the team already designed two self-navigated gliders and tested them. (New York Times)

The report also said that “"Guided by computer algorithms that learned from onboard sensors, predicted air patterns and planned a route forward, these gliders could seek out thermals - columns of rising hot air - and use them to stay aloft.”"


Actually Microsoft has planned to develop auto-gliders that are able to fly on the air for hours or even days with the minimal use of power. Microsoft also plan to use the gliders in scientific research to help the scientists to monitor weather patterns, crops, delivering products and even delivering internet into certain areas where it is not available.  

According to Mykel Kochenderfer, Stanford University professor of aeronautics and astronautics, Microsoft's project is a step towards self-driving vehicles "that are nimble enough to handle all the unexpected behavior that human drivers, bicyclists and pedestrians bring to public roads".

"With a glider, you can test these algorithms with minimal risk to people and property," Kochenderfer was quoted as saying.

In the Nevada desert, the team led by Kapoor launched two gliders with help from a hand-held remote control.

Once airborne, the gliders were left to their own devices. They were forced to fly with help from the wind and other air patterns.

With the help of algorithms, the gliders analysed the activities surrounding them and then changed directions as need be. They learned from their environment and made educated guesses.

Microsoft wanted to set record with the flight but after two days of trial, due to problems with radios and other equipment, it did not happen.Using similar methods, google has built high-altitude Internet balloons that can stay aloft for months on end. Several companies, including tesla, Google, uber and apple are designing cars that can not only drive on their own but also keep people in the surrounding safe.


 

Read More

Monday, August 21, 2017

Warning about Killer Robot (Robotic Weapons)

August 21, 2017 0

AI Experts Warn the UN About Killer Robots 

US, Russia, China and other supers powers are in a silent competition of building various robotic weapons. Specially automatic weapons like satellites,   submarines, drones etc. These weapons are extremely  dangerous for the world. Worlds need to be aware of the automatic robotic weapons. 


More than 100 robotics and artificial intelligence leaders including US businessman Elon Musk are urging the United Nations to take action against the dangers of autonomous weapons, known as "killer robots."
"Lethal autonomous weapons threaten to become the third revolution in warfare," warned the letter signed by 116 tech luminaries, including Musk, the chief of Tesla, and Mustafa Suleiman, cofounder of Google's DeepMind.


"Once developed, they will permit armed conflict to be fought at a scale greater than ever, and at times scales faster than humans can comprehend," the letter read.
"These can be weapons of terror, weapons that despots and terrorists use against innocent populations, and weapons hacked to behave in undesirable ways."
They added: "We do not have long to act. Once this Pandora's box is opened, it will be hard to close."



A UN group focused on these types of weapons was set to meet Monday, but it was canceled and postponed until November, according to the international body's website.
In 2015, thousands of researchers and personalities launched an appeal to ban "autonomous weapons."

Both Musk and well-known British astrophysicist Stephen Hawking regularly warn of the "dangers" of artificial intelligence, citing in particular "robot killers."
Read More

Sunday, August 20, 2017

Udemy Free Coupons.

August 20, 2017 0

Udemy free coupons and discount offers.

Hey guys you can find all 100% free courses and discounted courses on udemy.com. This will help you lot in your learning field.  Find Your free course
Udemy
Read More

Post Top Ad