Tech News is a blog created by Wasim Akhtar to deliver Technical news with the latest and greatest in the world of technology. We provide content in the form of articles, videos, and product reviews.
4.6 Million Snapchat Usernames And Phone Numbers Leaked
4.6 million North American Snapchat users have had their phone numbers and usernames leaked online. The revelation came from the unofficial site SnapchapDB, which allows open access to two files: an SQL dump and CSV text. These show details of the photo-sharing app’s users and their location.
SnapchatDB has said that it has censored the last two digits of phone numbers in order “to minimize spam and abuse,” but people can request the uncensored database. It has also said that those downloading the information can “find phone number information associated with Facebook and Twitter accounts, or simply to figure out the phone numbers of people you wish to get in touch with.”
It was only a week ago that Snapchat claimed to have addressed issues with a security problem raised by the research group Gibson Security, which discovered a security hole in the app’s “find friends with phone numbers” function back in August.
In a blog post last week, Snapchat admitted that if someone could upload a huge amount of phone numbers, it would be able to match usernames to telephone numbers. But it tried to downplay the issue, saying it was only a theory and that the company had “implemented various safeguards to make it more difficult” to carry out such an action.
When commenting on the leak, SnapchatDB has said that the 4.6 million usernames and passwords were obtained “through the recently patched Snapchat exploit,” and that the information “is being shared with the public to raise awareness on the issue.”
[Image via mobile.pro]
SOURCE: http://www.theverge.com/2014/1/1/5262740/4-6-million-snapchat-phone-numbers-and-usernames-leaked
The post 4.6 Million Snapchat Usernames And Phone Numbers Leaked appeared first on TechBeat.
via TechBeat http://techbeat.com/2014/01/4-6-million-snapchat-usernames-phone-numbers-leaked/?utm_source=rss&utm_medium=rss&utm_campaign=4-6-million-snapchat-usernames-phone-numbers-leaked
How to Remove “Security” Tab from Files and Folders Properties Windows?
Read rest of this article at AskVG.com
via AskVG http://feedproxy.google.com/~r/AskVG/~3/a-_h-RrnODw/
Lenovo launches four new phones, one of which doesn't seem horrible
via PCWorld http://www.techhive.com/article/2082977/lenovo-launches-four-new-phones-one-of-which-doesnt-seem-horrible.html#tk.rss_all
Samsung’s Enormous 110-inch Ultra HDTV Goes On Sale Monday
Last January at CES Samsung promised to deliver a 110-inch Ultra HDTV this year. Well the year is up and holding true to its promise, Samsung has delivered. Apparently the beast of a TV will be launched first in China, the Middle East and a handful of European countries, with a price tag of $142,000.
Measuring in at a whopping 2.6-meters by 1.8-meters, it is bigger than a king-size bed. I don’t think I even have a wall big enough for it to fit on in my house. But then little average me isn’t the target market. It’s more likely that the TV will appeal to VIPs and anyone else with a rather large wage packet.
It is available for custom orders, that is just before Samsung launch the new generation of Ultra HD TVs, which will include a 105-inch curved model.
It’s worth mentioning that the $142,000 price is only for the basic edition!
[Image via Digital Trends]
SOURCE: http://www.engadget.com/2013/12/29/samsung-110-inch-uhd-tv
The post Samsung’s Enormous 110-inch Ultra HDTV Goes On Sale Monday appeared first on TechBeat.
via TechBeat http://techbeat.com/2014/01/samsungs-enormous-110-inch-ultra-hdtv-goes-sale-monday/?utm_source=rss&utm_medium=rss&utm_campaign=samsungs-enormous-110-inch-ultra-hdtv-goes-sale-monday
Rainlendar 2.12
via FileHippo.com http://filehippo.com/download_rainlendar/ [[ We are also giving web service. Email:wasim.akh2@gmail.com]]
RAMDisk 4.4.0 RC 16
via FileHippo.com http://filehippo.com/download_ramdisk/ [[ We are also giving web service. Email:wasim.akh2@gmail.com]]
This solar-powered Ford C-MAX concept car can move itself to follow the sun
via PCWorld http://www.techhive.com/article/2083342/this-solar-powered-ford-c-max-concept-car-can-move-itself-to-follow-the-sun.html#tk.rss_all
Javascript Module Design Pattern
Javascript Module pattern provides a way to wrap public, private methods (and variable) into a single entity and exposing only the public members to the world outside of module. This allows faster namespace resolution, avoid collision of the methods/variables with other global APIs since the namespace isn’t populated with all many functions, and obviously provides cleaner code.
Implementing Basic JavaScript Module Pattern
Implementing a module is pretty simple, lets say we need to create a Calculator module.
To do so, we execute a function expression which returns an object containing all the public members as its properties.
CalcModule = (function(){
var pub = {};
pub.add = function(a, b) {
console.log('in add()', a, b);
return a + b;
};
pub.sub = function(a, b) {
console.log('in sub()', a, b);
return a - b;
};
return pub;
})();
Here we create and execute an anonymous function and assigns the return value of the function to the variable CalcModule
. Inside the function, we have created an object ‘pub‘ and then simply add properties to this object which needs to be exposed to outside world (functions ‘add’ and ‘sub’ in our case). Since the function is anonymously executed, any local variables declared inside the function can still be accessed inside the CalcModule
but will not be available outside of module.
Now to use this calculator, we can simple write:
CalcModule.add(5,2) //returns : 7
CalcModule.sub(5,2) //returns : 3
Demo
Note that as Javascript doesn’t provide any access modifiers, the private members inside a module were created using closures. And the module itself was created using anonymous function expression.
Adding private members to Module
Lets give our calculator the ability to store results in its memory. To do so we add a private variable ‘mem‘ and expose a function to retrieve data. Any declared function or variable will be private unless we add it as a property to the returned public object.
CalcModule = (function(){
var pub = {};
var mem = new Array(); //private variable
var storeInMemory = function(val) { //private function
mem.push(val);
};
pub.add = function(a, b) {
var result = a + b;
storeInMemory(result); //call to private function
return result;
};
pub.sub = function(a, b) {
var result = a - b;
storeInMemory(result); //call to private function
return result;
};
pub.retrieveFromMemory = function() {
return mem.pop();
};
return pub;
})();
Usage:
CalcModule.add(2,10);
CalcModule.add(5,15);
console.log(CalcModule.retrieveFromMemory()); //outputs 20
console.log(CalcModule.retrieveFromMemory()); //outputs 12
Demo
Importing Parameters in Javascript Module
Once the basic module is ready, we can pass parameters in the module during its initialization (effectively importing them inside the module). For eg, we would like to pass jQuery variable into our module so that resolving jQuery variable inside of module don’t have to search entire scope chain but is available locally. To do so we simply pass the ‘jQuery’ in the parenthesis used to execute the function expression. In this example, we use jQuery’s isNumeric()
function to check whether input provided is a number.
CalcModule = (function($){
var pub = {};
var INVALID = 'invalid input';
pub.add = function(a,b){
if($.isNumeric(a) && $.isNumeric(b)){
return a+b;
}
else{
return INVALID;
}
};
pub.sub = function(a,b){
if($.isNumeric(a) && $.isNumeric(b)){
return a-b;
}
else{
return INVALID;
}
};
return pub;
})(jQuery); //passed 'jQuery' global variable into local parameter '$'
Demo
Separating Module across different JS files: Augmentation
Let say, due to overly complex module we want our module to be defined in different js files. And that too in a way so that the implementation is independent of the order of execution of js files (It might happen that one JS file gets loaded before another). In our example lets separate out ‘add’ and ‘sub’ functions into one js-file, and memory implementation into another file.
File: calc.js
var CalcModule = (function($, pub){
//jQuery will still be available via $
var mem = new Array(); //private variable
pub.storeInMemory = function(val){
mem.push(val);
};
pub.retrieveFromMemory = function(){
return mem.pop();
};
return pub;
})(jQuery, CalcModule || {});
File: calc_functions.js
var CalcModule = (function($, pub){
//jQuery will still be available via $
pub.add = function(a,b){
var result = a + b;
pub.storeInMemory(result);
return result;
};
pub.sub = function(a,b){
var result = a - b;
pub.storeInMemory(result);
return result;
};
return pub;
}(jQuery, CalcModule || {}));
First things to notice in above code is passing of parameters into the module. We pass the same javascript module ‘CalcModule’ as argument into the anonymous function and which gets assigned to parameter ‘pub’. Inside the function, we add properties to this parameter ‘pub’, and then return the same variable which gets assigned back to CalcModule. Thus, we managed to extend the existing CalcModule with new properties.
Second thing to notice is the OR ( || ) condition in the call. This is what makes above files independent of each other with respect to order of execution. If the CalcModule doesn’t exists yet, a new object is created (using ‘{}’) and passed to the parameter ‘pub’ which is then assigned to CalcModule. This ability to allow loading of scripts in any order, converts a Strict Augmentation to Loosely Augmentation.
This functionality to extend the module with other members is called Augmentation. And if the order in which these modules are loaded is defined than its called a Strict Augmentation, or else if the order is not important as in example above, it is called Loose Augmentation.
A disadvantage of separating same module across different files is inability to share private variables between files. Above logic worked because we can pass the global variable CalcModule to different anonymous functions and add properties to it, but since CalcModule only exposes public APIs, different modules won’t be able share private members (remember private members are implemented using closures, and each anonymous function will have its own closure).
Revealing Module Pattern
A variation of the module pattern is the Revealing Module Pattern. As described earlier, for creation of a module it is required to return an object form anonymous function which has all the public properties. So lets change the implementation of the second example as below:
CalcModule = (function(){
var mem = new Array(); //private variable
var storeInMemory = function(val) { //private function
mem.push(val);
};
var add = function(a, b) {
var result = a + b;
storeInMemory(result); //call to private function
return result;
};
var sub = function(a, b) {
var result = a - b;
storeInMemory(result); //call to private function
return result;
};
var retrieveFromMemory = function() {
return mem.pop();
};
return {
add: add,
sub: sub,
popMemory: retrieveFromMemory
};
})();
Notice the changes here, we are not creating a separate ‘pub’ variable and then adding properties to it. But instead we define all the functions public or not in the same way, and then in the return statement create a new object and add properties to it.
Advantages of Revealing Module pattern
- Consistent coding style inside the module for both private and public members.
- Better control on the name of the public API, i.e., if it is required to change the name of add() method to addition(), all we need to do is change the name in the return statement without effecting the function name inside the module.
- Control on what to make public, just adding/removing the properties in return statement is sufficient.
- As always, cleaner code.
This concluded the basics of module design pattern.
The post Javascript Module Design Pattern appeared first on ViralPatel.net.
Related Articles
- Java Singleton design pattern tutorial.
- RPC in Javascript using JSON-RPC-Java
- Dynamic Property Loader using Java Dynamic Proxy pattern
- Object-Oriented programming with JavaScript
- How to:Set Maxlength of Textarea using jQuery/JavaScript
- Drag and Drop Example using jQuery JavaScript in HTML
- Sum HTML Textbox Values using jQuery / JavaScript
via ViralPatel.net http://feedproxy.google.com/~r/viralpatelnet/~3/W_AWKivQhq4/
Google Wants To Put Android In Audi Cars
As we all know, Google always some big plan or other. The latest news suggests that Google is planning to have Android installed in cars, starting with Audi.
According to The Wall Street Journal, the company will announce a joint venture with Audi next week at CES 2014. Sources say that Android will be used to power in-car entertainment systems for Audi, which will run on hardware built directly into the car, rather than on a smartphone.
NVIDIA is also in on the plans, with navigation also being included in the system, as well as entertainment and communication functions.
Audi recently annouced that LTE would be available with select models and it looks as though Google has got in before anyone else. EE Times suggested that Google had something up its’ sleeve as far as automobiles were concerned, especially because Apple too had announced its own initiative to put iOS in cars, with the help of BMW and Daimler.
There have been no product demonstrations yet but watch this space.
[Image via Whasapp]
SOURCE: http://www.engadget.com/2013/12/30/google-audi-to-announce-android-in-car/
The post Google Wants To Put Android In Audi Cars appeared first on TechBeat.
via TechBeat http://techbeat.com/2014/01/google-wants-put-android-audi-cars/?utm_source=rss&utm_medium=rss&utm_campaign=google-wants-put-android-audi-cars
Kingsoft Office Suite Free 2013 9.1.0.4480
via FileHippo.com http://filehippo.com/download_kingsoft_office_suite_free/ [[ We are also giving web service. Email:wasim.akh2@gmail.com]]
[Happy New Year] Best AskVG Articles of 2013
Read rest of this article at AskVG.com
via AskVG http://feedproxy.google.com/~r/AskVG/~3/fdJ_oU-zCow/
Google follows Apple in pursuit of in-car entertainment systems
via PCWorld http://www.techhive.com/article/2083346/google-follows-apple-in-pursuit-of-in-car-entertainment-systems.html#tk.rss_all
Microsoft 365 (Office) Insider Preview Build 17628.20006 (Version 2405) Released, Here is What’s New and Fixed
UPDATE: Microsoft 365 Insider (previously known as Office Insider) Preview build 17628.20006 (version 2405) is available for download and in...
-
Instead of joining the race to collect the newest and hottest content, Warner Bros . is taking a different approach in its attempt to get a ...
-
Flexible and easy software that converts from and to CSV, HTML, VCF (vCard) http://www.softpedia.com/get/Office-tools/Other-Office-Tools/...