Configuring Xampp to host Python sites

  • Go to your xampp directory.
  • Then go to apache->conf folder.
  • There you can see httpd.conf file.Open it and look for,

“AddHandler cgi-script .cgi .pl .asp”

  • and add “.py” to it.
  • Now write a python program and place it htdocs folder.
  • Go to your browser and go the file in the localhost.

Eg python program is as follows,

#!C:\Python34\python.exe
import cgitb
cgitb.enable()
print (“Status: 200 OK\n”)
print (“<p><h1>It Works!</h1></p><h2><i>It Again Works!</i></h2>”)

Disney patents the idea of a piracy-free search engine

If a newly registered patent is anything to go by, Disney is building a search engine that ranks sites on authenticity and legitimacy rather than on popularity — in other words, if you search for “Dumbo” you’ll see Disney’s official site at the top of the results, with illegal streams and downloads of the movie nowhere to be seen.

Last month Google stepped up its anti-piracy measures by downranking sites hosting content without permission and promoting legal download sources for search queries instead (so a search for the title of a film would turn up a link to Google Play first, for example) — the company has been consistently pressured by international media corporations and governments around the world to do more to fight piracy.

Now it looks like Disney wants to go further, with a patent for an “online content ranking system based on authenticity metric values for Web elements” — in other words, Disney would decide which sites were authentic and which weren’t. The filing says that “undesirable search results, such as results referencing piracy websites” would be filtered out.

The majority of today’s search engines judge a site’s value by its popularity, but that can be unfairly gamed. “For example, a manipulated page for unauthorized sales of drugs, movies, etc. might be able to obtain a high popularity rating, but what the typical user will want to see is a more authentic page,” says Disney in the patent documentation, as TorrentFreak reports.

As Google knows only too well, trying to index everything on the Web and then present it in a way that’s fair and sensible is no easy task. We don’t know whether Disney plans to implement the idea on its own site or launch a Google alternative, but it looks like finding pirated material is going to get more difficult in the future.

 

Yahoo is shutting down its original Directory portal

In the mid-1990s, you didn’t type your online search queries into Google — you looked up sites in Yahoo’s Directory, a hand-picked, curated list of everything on the Internet. Such a concept seems ridiculous now, but it’s how Yahoo got started as a business. Now the company has announced its iconic Directory is going to be shuttered as it focuses on other areas.
“Yahoo was started nearly 20 years ago as a directory of websites that helped users explore the Internet,” explains a blog posting put up by Yahoo yesterday. “While we are still committed to connecting users with the information they’re passionate about, our business has evolved and at the end of 2014 (December 31), we will retire the Yahoo Directory. Advertisers will be upgraded to a new service; more details to be communicated directly.”
Yahoo was started by Stanford University graduates Jerry Yang and David Filo in January 1994. The pair’s fledgling directory service was called Yet Another Hierarchical Officious Oracle, and thus Yahoo was born.Being able to flick through a carefully compiled list of entertainment and news sites was seen as a much better option than the search engines of the day.

Of course the Internet soon exploded in size, and a Web directory service was no longer practical even before Google appeared on the scene in 1998. Old-time Internet users will still have fond memories of the original Yahoo, however, and today’s announcement marks another milestone in the evolution of the modern Web.

“At Yahoo, focus is an important part of accomplishing our mission: To make the world’s daily habits more entertaining and inspiring,” said Yahoo’s Jay Rossiter, SVP Cloud Platform Group. “To achieve this focus, we have sunset more than 60 products and services over the past two years, and redirected those resources toward products that our users care most about and are aligned with our vision. With even more smart, innovative Yahoos focused on our core products like search, communications, digital magazines, and video.we can deliver the best for our users.”

Dive Deep into CPP: Abstract Class and Pure Virtual Function

Pure virtual function are virtual function with no definition.

Syntax:

virtual void func()=0;

Class with atleast one pure virtual is made as abstract class. Classes that inherit the abstract class must provide the definition to the pure virtual function.

What happens when we create a pure virtual function ?

When we create a pure virtual function in abstract class, we reserve slot for that function in the VTABLE(virtual table, maintained by the compiler), but doesnt put any address in that slot. So the VTABLE will be incomplete.Since the VTABLE for the abstract class is incomplete, compiler will not allow the creation of the object and will throw an error.

Pure Virtual Definitions:

These pure virtual functions can have definition in abstract class, which we want all the derived class to have. These definitions should be provided outside the class definition.

What does pure virtual function mean ?

When a function is declared pure virtual function, it cannot be called dynamically through a virtual dispatch mechanism.But it can be called statically without virtual dispatch. So, yes. Pure virtual functions can have definition. But it makes the class abstract without completing the VTABLE.

Dive Deep into CPP: Copy Constructor

Copy Constructor is usually invoked by passing reference to the old object of a class to a newly created object of the same class. Compiler by default provide a copy constructor to a class even if you didnt provide one. When the Copy Constructor is invoked either by calling copy constructor during declaration or using an assignment operator, the constructor will get the reference and then it simply assigns it to the new object using the assignment operator.So Copy Constructor is implemented by overloading the assignment operator.

Why program runs into an infinite loop , if copy constructor is invoked by value ?

If we didnt pass the old object by reference and if we pass by value, in the copy constructor it will be assigned to the new object by an assignment operator and the compiler will inturn call the copy constructor again and then assignment operator and so on in an infinite loop.

Computers that calculate data at the speed of light could arrive as early as 2020

Most folks know that data travels at much higher speeds and capacities over optical cables than it can over copper equivalents. A prime example is the tremendous transfer speeds available on fiber optic networks, as opposed to copper POTS (plain old telephone service) lines. We’re talking thousands, even millions more times the data.
If you think about it, there’s no reason that the technology (or something similar) that allows us to move massive data around from Point A to Point B shouldn’t help speed up our computers too.
To that end, an English technology company dubbed Optalysys says that in January 2015, it will demonstrate a prototype optical computer that performs calculations at the speed of light. If all goes well, the company says that we will see exascale supercomputers as early as 2020.

What is an optical computer?
The term optical computing can refer to many different types of technologies. Basically, it refers to computers that use light, rather than electricity, to perform many of its tasks.While Optalysys’ approach, which employs low-power lasers and a huge liquid crystal grid, is much different from most other competing optical-based models, the company’s results are very promising so far.
While highly complicated, the Optalysys approach projects low-power lasers onto the liquid crystal grid, which in turn initiates reactions within the grid. This generates sophisticated algorithms, accommodating thousands, even millions of calculations simultaneously. By using multiple grids, either in sequence or in parallel, you can significantly increase capacity and processing power.
In addition to providing massive computing oomph, the Optalysys’ system consumes very little power.The company provided the following statistic to demonstrate the incredible savings in electricity: An optical computer will use roughly $3,500 worth of electricity each year, while today’s most powerful supercomputer, when running at its peak power of 34 petaflops per second, sucks juice at an annual cost of about $21 million.
What could a company do with those kinds of power savings? The truth is that very few companies (Perhaps Google, Microsoft, Amazon, and so on) require supercomputers with that kind of processing oomph. Most of us, on the other hand, would have little use for anywhere close to that kind of computing power.
Still, in addition to reducing the power bill literally by millions, optical computers should also decrease the size of supercomputers themselves drastically, thereby reducing space requirements and a slew of other expenses associated with housing humongous machines. The ability to deliver supercomputer power in a desktop-size machine opens up possibilities in all kinds of areas, including medicine, digital video and other media editing, 3D modeling, CAD—the list goes on and on.If and when optical computers go mainstream, imagine what such a desktop machine would be capable of.

When will we see optical computers?
According to Optalysys, its optical computing technology has already met the NASA Technology Readiness Level (TRL) 4. This means that it’s ready for full-scale lab testing.As mentioned, the company says that we’ll see a prototype by January 2015, and that it hopes to have two commercial demo systems up and running by 2017.
A big data analysis system for augmenting conventional supercomputers, and a standalone “Optical Solver” supercomputer that, a company spokesman says, should start at 9 petaflops, with it scaling up to 17.1 exaflops could arrive by 2020.However, while the technology itself seems sound, Optalysys is just getting started. With this in mind, the 2020 time frame seems ambitious.If all works out as planned though, the next bunch of years could see some freakishly powerful computers.

This app will shut down everything on your phone until you call your mom back

Never underestimate your mom, kids — especially if she learns how to code. Sharon Standifird’s son knows this all too well. He didn’t always answer his mother’s calls as quickly as she might have liked, so she figured out a way to make sure he called her back ASAP when he missed a call. Standifird created her own Android app called Ignore No More, which gives your mom or dad the power to literally shut down every function on your phone — except the ability to call the parental unit back or 911 — until you cave and call them back.

Many teenagers can withstand 10 missed calls from mom without batting an eyelash, but when you take away Facebook, Instagram, Snapchat, and everything else in one fell swoop, most won’t last five minutes without calling dear old mom and dad to beg for their freedom back. Ignore No More does just that.
All parents have to do is set up an account, add their kids, and make sure the app is installed on each child’s device, so that they can remotely control their kids’ smartphones whenever the youngsters don’t answer their calls or messages. To shut down a kid’s phone, mom or dad just need to tap on their son or daughter’s name, enter an unlock code twice, and voila — the unresponsive kid’s phone goes dark. In order to unlock their device, the teen must call one of the people listed on the approved contacts list, which may include anyone the parent chooses.
The only difficult part is getting Ignore No More onto a kid’s phone. Assuming they’ve got a passcode, parents won’t even be able to unlock their kids’ phone, let alone install the app. Even if the kid’s phone is unsecured, parents still have to know the code for purchasing apps on the device to install Ignore No More on the device. This may be easy enough for parents whose kids are still in the house, but those with grown kids or ones in college may have a harder time of it.

Of course, sneaky and clever parents could just stick Ignore No More onto a brand new smartphone, so as to trick their unsuspecting kids into thinking the Trojan horse is a great present.

Ignore No More is available for download on the Google Play Store, but it will cost you $2 for each device you install it on. Standifird says she’s already working on an iOS version of the app, so don’t fret iPhone parents!