Wednesday, February 26, 2014

The Samsung Galaxy S5




By:CNN.com

The Samsung Galaxy S5 probably isn't the reinvention of the smartphone. But unlike last year's Galaxy S4, there's a good chance some of the new features announced could be of actual use to normal human beings.

Of course, a few minutes with the Galaxy S5 wasn't enough time to reach a full verdict on the phone, but it was enough to get a basic feel for what Samsung's (SSNLF) latest offering can and can't do.
Display
The 5.1 inch display has the same 1080p resolution as last year's 5-inch screen, but due to some new technology, it's definitely brighter, which at the very least, makes everything look nicer. And according to Samsung, the special technology which makes that screen brighter also improves performance in direct sunlight. At the expense of your battery, of course.
Fingerprint Scanner
Like the iPhone 5S, the fingerprint scanner is probably the most eye-catching of the new features, which adds an extra level of security and/or convenience to the device. While it does require you to swipe your whole finger pad over the sensor (unlike the iPhone, which simply lets you place it on the sensor), it worked smoothly the few times I was able to use it.
Power Saver
Battery life matters! Samsung put a slightly bigger battery in the Galaxy S5, but the more important thing was to offer up a useful power saver feature which lets you know what parts of the phone to turn off, and how much battery life that will gain you. It's most extreme mode will actually shut down LTE, cut you off from the vast majority of your apps, and turn the screen grey scale, apparently allowing it to last for days without a charge
Camera
Samsung's new phase detection auto-focus means that the camera is now capable of a nice blur effect in the background when you photograph an object up close. The shutter was reasonably fast with bright indoor light, though it did seem to have trouble handling a couple of weird lighting situations and slowed down considerably. How much the image quality has or hasn't improved over the S4 is still to be determined, however.
Weatherproofing
There was no way to really test how worthy the water and dust-resistant features were (save for dumping a bottle of water on it?), but if the weatherproofing is half as good as Samsung claims it is, everyone wins.
Hardware Design
The hardware design of the phone isn't much better, or even different, than it has been in years' past. If you like it, you like it. (I don't.) The texture and material used on the back is much improved and makes the phone feel less cheap when you're holding it, but the colors to choose from are mildly depressing. And when it comes to size and pocketability, at this point, everyone should already know what they're getting into when they buy a 5-inch phone. The Galaxy S5 is big, but it's not completely unwieldy.
Software Design
Samsung's TouchWiz UI is back in its same fundamental form, but it does look better, visually speaking. Fonts and icons generally look cleaner, but everything is still organized in the same manner as past TouchWiz iterations. That said, it doesn't seem like a huge improvement over anything offered up by the likes of Google (GOOGFortune 500),Apple (AAPLFortune 500)Nokia (NOK), or even HTC. And Samsung still hasn't done much to improve the experience running two apps side-by-side.
Heart Rate Monitor
I mean, I guess it's cool Samsung put this on the phone? It doesn't detract from anything at all, but this sensor definitely seems more useful in its new Gear Fit wearable.
At the very least, many of the features included in the Galaxy S5 have more potential than the new features included in last year's model. To what extent that potential is realized will take a little more hands-on time however. To top of page

and from the technical View from GSMArean.com

GENERAL2G NetworkGSM 850 / 900 / 1800 / 1900
3G NetworkHSDPA 850 / 900 / 1900 / 2100
4G NetworkLTE 800 / 850 / 900 / 1800 / 2100 / 2600
SIMNano-SIM
Announced2014, February
StatusComing soon. Exp. release 2014, April
BODYDimensions142 x 72.5 x 8.1 mm (5.59 x 2.85 x 0.32 in)
Weight145 g (5.11 oz)
 - Fingerprint sensor
- IP67 certified - dust and water resistant
- Water resistant up to 1 meter and 30 minutes
DISPLAYTypeSuper AMOLED capacitive touchscreen, 16M colors
Size1080 x 1920 pixels, 5.1 inches (~432 ppi pixel density)
MultitouchYes
ProtectionCorning Gorilla Glass 3
 - TouchWiz UI
SOUNDAlert typesVibration; MP3, WAV ringtones
LoudspeakerYes
3.5mm jackYes
MEMORYCard slotmicroSD, up to 128 GB
Internal16/32 GB storage, 2 GB RAM
DATAGPRSYes
EDGEYes
SpeedHSDPA, 42.2 Mbps; HSUPA, 5.76 Mbps; LTE, Cat4, 50 Mbps UL, 150 Mbps DL
WLANWi-Fi 802.11 a/b/g/n/ac, dual-band, DLNA, Wi-Fi Direct, Wi-Fi hotspot
BluetoothYes, v4.0 with A2DP, EDR, LE
NFCYes
Infrared portYes
USBYes, microUSB v3.0 (MHL 2), USB On-the-go, USB Host
CAMERAPrimary16 MP, 5312 x 2988 pixels, autofocus, LED flash
FeaturesDual Shot, Simultaneous HD video and image recording, geo-tagging, touch focus, face and smile detection, image stabilization, HDR
VideoYes, 2160p@30fps, 1080p@60fps, video stabilization, dual-video rec.
SecondaryYes, 2 MP,1080p@30fps, dual video call
FEATURESOSAndroid OS, v4.4.2 (KitKat)
ChipsetQualcomm MSM8974AC Snapdragon 801
CPUQuad-core 2.5 GHz Krait 400
GPUAdreno 330
SensorsAccelerometer, gyro, proximity, compass, barometer, temperature, humidity, gesture, heart rate
MessagingSMS(threaded view), MMS, Email, Push Mail, IM, RSS
BrowserHTML5
RadioNo
GPSYes, with A-GPS support and GLONASS
JavaYes, via Java MIDP emulator
ColorsBlack, White, Blue, Gold
 - Wireless charging (market dependent)
- ANT+ support
- S-Voice natural language commands and dictation
- Smart stay, Smart pause, Smart scroll
- Air gestures
- Dropbox (50 GB cloud storage)
- Active noise cancellation with dedicated mic
- TV-out (via MHL 2 A/V link)
- SNS integration
- MP4/DivX/XviD/WMV/H.264/H.263 player
- MP3/WAV/eAAC+/FLAC player
- Organizer
- Image/video editor
- Document viewer (Word, Excel, PowerPoint, PDF)
- Google Search, Maps, Gmail,
YouTube, Calendar, Google Talk, Picasa
- Voice memo/dial/commands
- Predictive text input (Swype)
BATTERY Li-Ion 2800 mAh battery
Stand-byUp to 390 h
Talk timeUp to 21 h

Monday, February 10, 2014

Android: Loading files from the Assets and Raw folders

This post will explain how to load files from the res/raw and the Assets folder using a String to specify the file name. Yes, there are a lot of tutorials on this subject, but they all use the automatically generated integer IDs from the R class as inputs and not many of them even mention the possibility of loading files from the Assets folder. As a result of depending on the ID, the file reference must be known beforehand.
Instead, the code featured in this post will explain how to find the reference to the file and then load it at runtime based solely on its name. This means that the reference ID and the file don’t even have to exist in the first place, and can be acquired at run time.
Before looking into the code, it’s important to highlight the main differences between the raw folder and the Assets folder. Since raw is a subfolder of Resources (res), Android will automatically generate an ID for any file located inside it. This ID is then stored an the R class that will act as a reference to a file, meaning it can be easily accessed from other Android classes and methods and even in Android XML files. Using the automatically generated ID is the fastest way to have access to a file in Android.
The Assets folder is an “appendix” directory. The R class does not generate IDs for the files placed there, so its less compatible with some Android classes and methods. Also, it’s much slower to access a file inside it, since you will need to get a handle to it based on a String. There is also a 1MB size limit for files placed there, however some operations are more easily done by placing files in this folder, like copying a database file to the system’s memory. There’s no (easy) way to create an Android XML reference to files inside the Assets folder.
Here’s the code:


01. package fortyonepost.com.lfas;
02.
03. import java.io.ByteArrayOutputStream;
04. import java.io.IOException;
05. import java.io.InputStream;
06.
07. import android.app.Activity;
08. import android.content.res.Resources;
09. import android.os.Bundle;
10. import android.util.Log;
11. import android.widget.Toast;
12.
13. public class LoadFromAltLoc extends Activity {
14.
15. //a handle to the application's resources
16. private Resources resources;
17. //a string to output the contents of the files to LogCat
18. private String output;
19.
20. /** Called when the activity is first created. */
21. @Override
22. public void onCreate(Bundle savedInstanceState)
23. {
24. super.onCreate(savedInstanceState);
25. setContentView(R.layout.main);
26.
27. //get the application's resources
28. resources = getResources();
29.
30. try
31. {
32. //Load the file from the raw folder - don't forget to OMIT the extension
33. output = LoadFile("from_raw_folder", true);
34. //output to LogCat
35. Log.i("test", output);
36. }
37. catch (IOException e)
38. {
39. //display an error toast message
40. Toast toast = Toast.makeText(this, "File: not found!", Toast.LENGTH_LONG);
41. toast.show();
42. }
43.
44. try
45. {
46. //Load the file from assets folder - don't forget to INCLUDE the extension
47. output = LoadFile("from_assets_folder.txt", false);
48. //output to LogCat
49. Log.i("test", output);
50. }
51. catch (IOException e)
52. {
53. //display an error toast message
54. Toast toast = Toast.makeText(this, "File: not found!", Toast.LENGTH_LONG);
55. toast.show();
56. }
57. }
58.
59. //load file from apps res/raw folder or Assets folder
60. public String LoadFile(String fileName, boolean loadFromRawFolder) throws IOException
61. {
62.
63. InputStream iS;
64.
65. if (loadFromRawFolder)
66. {
67. //get the resource id from the file name
68. int rID = resources.getIdentifier("fortyonepost.com.lfas:raw/"+fileName, null,
69. //get the file as a stream
70. iS = resources.openRawResource(rID);
71. }
72. else
73. {
74. //get the file as a stream
75. iS = resources.getAssets().open(fileName);
76. }
77.
78. //create a buffer that has the same size as the InputStream
79. byte[] buffer = new byte[iS.available()];
80. //read the text file as a stream, into the buffer
81. iS.read(buffer);
82. //create a output stream to write the buffer into
83. ByteArrayOutputStream oS = new ByteArrayOutputStream();
84. //write this buffer to the output stream
85. oS.write(buffer);
86. //Close the Input and Output streams
87. oS.close();
88. iS.close();
89.
90. //return the output stream as a String
91. return oS.toString();
92. }
93. }



The first thing the code does is to create two private variables. A Resources object that will act as a handle to the app’s resources and a String, that will be used to output the content of the files to LogCat (lines 16 and 18).
Now let’s jump straight to line 60 where the LoadFile() method is defined. It returns a String and takes two parameters: the first one is the file name and the second is a boolean, that signals the method whether it should load from the res/raw or the Assets folder.
After that, the method creates a InputStream object (line 63). Streams are like handles to read files into buffers (Input Stream) and to write files from these buffers (Output stream).
Line 65 checks if the loadFromRawFolder parameter is true. Case it is, the code at lines 68 and 70  is executed. The former dynamically loads resources from the raw folder. The getIdentifier() method from the resources object returns a resource ID based on the path. This parameter is composed by:
package name:type of resource/file name
Package name is self explanatory; type of resource can be one of the following: raw, drawable, string. File name, in this example, is the fileName parameter, an it’s being concatenated to create one single String. Since all information that this method requires is being passed on the first parameter the other two can be null.
Finally, line 70 feeds this ID to the openRawResource() method, which will return a InputStream from a file located at the res/raw folder.
At the else block, the Assets folder is being opened, by first calling the getAssets() method to return a handle to the Assets folder and right after that, the open() method is called, passing the fileName as the parameter. All that is done to also return the InputStream, although this time, for a file at the Assets folder (line 75).
Now that we have the InputStream, we can create the buffer to read the file into. That’s accomplished by line 79, that creates a byte array that has exactly the same length as iS (the InputStream object). The file is read into the buffer at the next line (line 81).
With the file loaded into the buffer, it’s time to prepare a OutputStream to write the buffer contents into. First, a object of this type is created at line 83. Then, the write() method is called passing the buffer as the parameter (line 85). With that, a handle to the file’s content was created.
There’s nothing left to do with these two streams, so they are closed at lines 87 and 88. Finally, the return for this method is set, by converting the oS object to a String (line 91).
At last, the LoadFile() method is called at line 33 (don’t forget to omit the file extension) and at line 47 (don’t forget to include the file extension). Both method calls are surrounded by a try/catch block since they can throw an exception.
The returned String from the method calls are stored at the output variable. It’s then later used to print the contents of the loaded files into LogCat’s console (lines 35 and 49).
And that’s about it! The method that was declared in the Activity can be easily adapted to load and return anything from these folders, not just a String. Additionally, it can be used to dynamically to acquire a reference, and load files at run time.
Downloads
loadresourcesaltlocations.zip

Sunday, February 9, 2014

How To Increase Adsense Clicks

There is an entire science devoted to how humans interact when looking at a page.  Large advertisers have spent millions learning the exact wording for the ad, where to place it, how large it should be, and even what color. As a blogger, you don’t really care that much; nor do you have the time to become a psychology expert.  However you do need to experiment and test to learn how to increase Adsense clicks. After all, an ad spot on your blog is valuable real estate. If it’s not getting enough clicks, you need to rethink your strategy.

Some people smother their blog in ads. I have seen blogs with sidebars on either side and ads from top to bottom, most of them flashing messages.  I have even seen blogs still putting ads into their content stream.

Not The Best Adsense Strategy
Imagine if you go into a room to talk to someone and 15 people surround you; talking to you all at once.  After a few seconds, you would become so frustrated you would probably scream, “SHUTUP!”

What if you walked into a store and asked one clerk about the new fridge models and 10 other clerks surrounded you trying to tell you about other products you weren’t interested in?

Placing a ton of ads everywhere is not going to increase your click-through rate.  You will have a much better chance at getting people to click your ads if they are easily seen, not crowded, and are relevant to your readers.

How To Increase Adsense Clicks
Less is More (If done correctly)

Google allows you to put 3 Adsense ads on each page of your website.  Just because they allow it, doesn’t mean that you should do it.  If you do decide to put all three on your pages, you need to figure out what works best.

Sometimes having one dedicated, highly visible areas for ads can increase Adsense clicks easily.

If you’re not getting enough click-throughs, try removing all your ads except one.  Put it in a highly visible area of your blog.  See if you get an increase in clicks per impressions.

Put Your Ads Above the Fold

Forget about the big, long banner ads in your header.   Most of the time those go ignored and they make your site design look like an infomercial from the jewelry channel.  Making your website look like a cheap commercial is not how to increase Adsense clicks.

Don’t bury your ads on the bottom of the sidebar or surround them with clutter.  Allow them to stand out, and let your visitors see them when they get the first look at your site.

Try placing an ad high up on your sidebar, or above the content of you posts.

Forget Image and Flash Ads

This is the best advice anyone ever gave me.  I used to think that Google Ads made my site look more populated and that image ads were more attractive to customers .

I was wrong

The image ads are very pretty most of the time, but they display one product.  Text ads, on the other hand, display multiple products with eye-catching headlines.

When you setup your ads in Adsense, you can choose if you want media rich ads, text ads, or both. Someone told me how to increase Adsense clicks was to do away with the media rich ads and go with text ads only.

All I can say is, it works. If you want to know how to get more Adsense clicks, try going for one month with only text ads on your website.  Monitor the amount of clicks to the amount of impressions.

With text ads, you will see quite a bump in the click-through rate.

What Not To Do With Your Adsense Ads

Google protects its customers and, more importantly to them, their own interests from people who would game the system just to make a profit.  It’s in Google’s best interest to make sure the websites its software is promoting is legitimate, and valuable websites.

Practicing shady techniques may be how to increase Adsense clicks in the short-term, but it will stunt your real growth. If you practice shady behavior to increase your Adsense clicks, you will eventually be banned, and your website may be de-indexed by Google.  If you get de-indexed, or penalized, that means little to no organize searches coming to your website.

Don’t ask people to click on your ads.
Don’t suggest ad clicking for supporting your site.
Don’t exchange ad clicks with others.
Don’t click your own ads.
Don’t use bots and/or other software to click ads.
Don’t use scripts that automatically click the ads per so many impressions
Don’t get discouraged, Adsense success takes a while to build.

Monday, February 3, 2014

NSA reportedly using radio waves to tap offline computers


The National Security Agency is using secret wireless technology that allows it to access and alter data on computers, even when they are not connected to the Internet, according to a New York Times report.
Since 2008, the agency has been increasingly using "a covert channel of radio waves" that can transmit from hardware installed in the computers, according to NSA documents and experts interviewed by the Times. Signals can then be sent to briefcase-size relay stations miles away, according to the report.
The NSA has also installed surveillance software on nearly 100,000 computers around the world, according to the Times. The newspaper said the Chinese Army was a frequent target of such technology but said there was no evidence that the agency used either technology inside the US.
Repeating earlier denials that its data collection activities are arbitrary or unconstrained, the NSA rejected any comparison to Chinese attackers who have been accused to planting similar software on computers belonging to US companies and government agencies.
"NSA's activities are focused and specifically deployed against -- and only against -- valid foreign intelligence targets in response to intelligence requirements," the NSA said in a statement. "In addition, we do not use foreign intelligence capabilities to steal the trade secrets of foreign companies on behalf of -- or give intelligence we collect to -- U.S. companies to enhance their international competitiveness or increase their bottom line."
The surveillance agency also asserted that a complex web of laws, regulations, and policies governed its use of such tools and that "continuous and selective publication" of the agency's techniques was "detrimental to the security of the United States and our allies."
Last month, a Der Spiegel report detailed how the agency's Office of Tailored Access Operations intercepts deliveries of electronic equipment to plant spyware to gain remote access to the systems once they are delivered and installed. According to that report, the NSA has planted backdoors to access computers, hard drives, routers, and other devices from companies such as Cisco, Dell, Western Digital, Seagate, Maxtor, Samsung, and Huawei.
The German news magazine also described a 50-page product catalog of tools and techniques used by a program called ANT, which stands for Advanced or Access Network Technology, to send and receive signals to devices.
President Obama is expected to announce on Friday which changes to the NSA he is expected to adopt based on recommendations from a presidential task force. The panel, which was appointed by President Obama in the wake of disclosures made this summer by former NSA contractor Edward Snowden, has reportedly proposed stricter standards for NSA data searches and that a third party be responsible for storing phone records collected by the agency.