2014年5月18日 星期日

How to install NEO4j in CENTOS / REDHAT by using YUM

Neo4j Yum Repo

This is experimental and not considered safe for production. You have been warned.
First, you'll want our key:
cd /tmp
wget http://debian.neo4j.org/neotechnology.gpg.key
rpm --import neotechnology.gpg.key
Then, you'll want to add our yum repo to /etc/yum.repos.d/neo4j.repo:
cat <<EOF>  /etc/yum.repos.d/neo4j.repo
[neo4j]
name=Neo4j Yum Repo
baseurl=http://yum.neo4j.org
enabled=1
gpgcheck=1
EOF
Finally, install a package
yum install neo4j

2014年4月16日 星期三

Working converter from MYSQL to JSON in PHP

this is the source code to convert MYSQL query result into JSON in PHP, it is great for NOSQL data processing.


<?php
/*** mysql hostname ***/
$hostname = 'localhost';

/*** mysql username ***/
$username = '';

/*** mysql password ***/
$password = '';
$db = '';
try {
    $dbh = new PDO("mysql:host=$hostname;dbname=$db", $username, $password,array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"));
    /*** echo a message saying we have connected ***/
   

    /*** The SQL SELECT statement ***/


    /*** close the database connection ***/
   
}
catch(PDOException $e)
    {
    echo $e->getMessage();
    }
?>

<? $var = array();
  $STH = $dbh->query("SELECT * FROM u_user WHERE U_ID = '1'");
  $STH->setFetchMode(PDO::FETCH_OBJ);
 while($row = $STH->fetch()) {
$var[] = $row;
}
echo '{"users":'.json_encode($var).'}';
?>

2013年1月29日 星期二

15 OF THE BEST IPHONE 5 CASES…SO FAR (LIST)


The iPhone 5 is finally here! The much sleeker and thinner iPhone is touted to be the fastest to date. And because no iPhone should be left naked, we’ve compiled some cool-looking protective cases you’ll definitely want to protect your new phone in!

15. BASICASE Leopard Animal Print Case


The colorful leopard animal print case is very eye catching. It provides a full protection for your iPhone. Available at Basicase.com at USD7.4 only, worldwide shipping.

14. Belkin Grip Candy Sheer Case

Coming in a variety of colors, Belkin’s Grip Candy Sheer Case not only looks good, but its transparent, two-tone design adds quite an aesthetic punk of color. Its innovative and flexible material is easy to grip and isn’t bulky.  Amazon has it for $25.

13. Griffin Technology Graphite Form Case

Protect your iPhone 5 against life with this case that features a polyurethane outer layer and a polycarbonate inner shell for serious protection. Its play-through design allows easy access to all your phone’s features, too.  Available around the web for $30.

12. Case-Mate Artist Series Zebrawood

This case features exotic hardwood material that provides durability for maximum protection and a 2-piece design that has a raised bezel and silicone liner for defense against damage.  Available direct for $50.

11. iFrogz Ultra Lean Case

The ultra lean case will provide protection for you new phone without providing that bulk feeling other cases have. Its polycarbonate material allows for lasting protection, while the play-through design lets you access the iPhone 5’s features without having to remove the case.  Available around the web for about $25.

10. Platinum Series Kickstand Case with Holster

This case provides ultimate protection for when you’re on the go that features polycarbonate plastic material for durability, while its built-in magnetic kickstand allows for hands-free viewing and a felt-line holster ensures easy access.  Available at Best Buy for $40.

9. Otterbox iPhone 5 Commuter Series

Sleek enough to slide easily into your pocket, yet tough enough to toss in your bag, the Commuter Series cases are built with two-layers of protection and has an adhesive screen protector. They come in a variety of colors so you can choose your favorite color combo.  Available direct for $35.

8. Griffin Survivor Cases

These military-duty cases for you iPhone 5 will protectit from practically everything! Designed and tested to meet or exceed US Department of Defense Standard 810F, the Survivor Extreme-Duty case is built to protect from dirt, sand, shock, rain, vibration and more! Survivor is built on a shatter-resistant polycarbonate frame clad in rugged, shock-absorbing silicone. A built-in screen protector seals your Multi-Touch display from the outside environment, while hinged plugs seal the dock connector, headphone port, hold switch and volume controls.  Available direct for $50.

7. Han Solo Carbonite Case

Made from durable plastic and aluminum, this unique iPhone 5 case is great for Star Wars fans since it takes that famous scene where Han Solo is trapped in Carbonite and creates an awesome case for you to carry your precious phone around in! Available at Etsy for $14.

6. Sega Genesis Controller Case

Gamers will definitely want to pick up this iPhone 5 Sega Genesis Controller Case that looks exactly like the old school game’s controller! Made from white or black plastic, the case is made to order and can have colors, images or names added for that personal touch. Available at Etsy for $18.

5. iPhone 5 Leather Case and Wallet

Made from top grain soft brown leather, the simple case provides double function as a wallet, too! This is perfect for those who prefer a luxurious top-grain leather case that is stylish as it is protective. It has two slots for credit or business cards and one slot for cash, while a snap button keeps the case securely closed. Available at Etsy for $69.

4. Groove Bamboo Case

The Groove Case is hand sanded and oiled to a craftsman-like quality and designed for greater durability. It’s made from 100% post-consumer fibers and renewable bamboo, so this product is fresh and sustainable just as it is cool and stylish. Available direct for $79.

3. Speck CandyShell Grip

The hard-shell, soft center design with fingerpads for grip and thumb-bump for control come in a variety of fun colors that will match your personality! The dual-layer casing has a patented design that provides two layers of protection in a single-piece, pop-in construction. Available direct for $35.

2. Incipio Frequency iPhone 5 Case

The high-density polymer provides excellent shock absorption for the phone, while its smooth finish allows you to easily slide out of your pocket or purse. The new transparent pattern allows you to see you device, and you get complete access to all ports and controls while still maintaining full-coverage protection. Available from a wide variety of places for about $25.

1. Otterbox iPhone 5 Defender Series Case

The Defender Series iPhone 5 case protects against heavy use, random accidents and demanding conditions with its three layers of protection. One layer is a polycarbonate skeleton that cushions the iPhone while the built-in screen protector prevents smudges and scratches. The outer layer wraps around the solid inner shell like an epidermis, creating a practically indestructible iPhone 5 case. Available direct for $50.

2013年1月28日 星期一

Top 5 Apple iPhone Cases Review


Kensington BungeeAir Power Wireless

Extend the iPhone 4S’ battery life and never lose keys again.
Kensington BungeeAir Power
The Kensington BungeeAir Power Wireless is a great looking battery case for the iPhone 4S that adds in the ability to find keys and receive a warning for when the iPhone is left on a desk or in a cab. There is also a card holder that acts as a kickstand when watching movies.
The Kensington BungeeAir Power Wireless is my battery pack of choice and our top pick in theiPhone 4S Battery Case Showndown.
$59.19 @ Amazon

BASICASE Telescope 12X Long Focal Camera Lens Case

Great for long shooting! Amazing Zooming Effect!


This Basicase Camera lens case comes with a 12X fixed focal lens. The lens is made of metal and can be take out from the original case.

 $29.65 @ BASICASE

Tuneband iPhone 4S Running Case

A great case for running and working out with the iPhone.
TUneband iPhone 4s running case
The Tuneband is a great case for runners that straps the iPhone 4S right to an arm so there’s no need to carry the iPhone or run headphones up a shirt to keep the cord from flapping all over.
Pair the Tuneband with the Phillips Bluetooth workout headphones to go wireless free on workouts.
$19.99 @ Amazon

Speck Candyshell Card for iPhone 4S

Protection from drops and room for 3 cards.
Speck CandyShell Card
The Speck Candyshell Card for iPhone 4S includes room for three credit cards or folded cash and protects the iPhone from random drops and bumps and thanks to a lip offers some screen protection when placed face down or dropped face first.
The Candyshell Card is available in a number of colors and comes highly recommended.
$27.20 @ Amazon 

GelaSkins Hard Case for iPhone 4S

Everything we love about Gelaskins skins in a hardcase.
Gelaskins iPhone 4s hardcase
Gelaskins is best known for great looking customizable skins and licensed artwork that sticks to the iPhone 4S, but now GelaSkins offers hard cases with more protection.
The new GelaSkins hard cases are available with all the same great designs, and with a customizable look that lets users upload custom artwork and photos to truly personalize the iPhone 4S.
$34.95 @ GelaSkins

2012年11月11日 星期日

Samsung Galaxy Note II N7100 Full Specification

GENERAL2G NetworkGSM 850 / 900 / 1800 / 1900
3G NetworkHSDPA 850 / 900 / 1900 / 2100
 HSDPA 850 / 900 / 2100 - N7105
4G NetworkLTE 800 / 900 / 1800 / 2600 - N7105
SIMMicro-SIM
Announced2012, August
StatusAvailable. Released 2012, September
BODYDimensions151.1 x 80.5 x 9.4 mm (5.95 x 3.17 x 0.37 in)
Weight183 g (6.46 oz)
 - Touch-sensitive controls
- S Pen stylus
DISPLAYTypeSuper AMOLED capacitive touchscreen, 16M colors
Size720 x 1280 pixels, 5.5 inches (~267 ppi pixel density)
MultitouchYes
ProtectionCorning Gorilla Glass 2
 - TouchWiz UI
SOUNDAlert typesVibration; MP3, WAV ringtones
LoudspeakerYes
3.5mm jackYes
MEMORYCard slotmicroSD, up to 64 GB
Internal16/32/64 GB storage, 2 GB RAM
DATAGPRSYes
EDGEYes
SpeedHSDPA, 42 Mbps; HSUPA, 5.76 Mbps; LTE, Cat3, 50 Mbps UL, 100 Mbps DL
WLANWi-Fi 802.11 a/b/g/n, dual-band, DLNA, Wi-Fi Direct, Wi-Fi hotspot
BluetoothYes, v4.0 with A2DP, LE, EDR
NFCYes
USBYes, microUSB (MHL) v2.0, USB Host support
CAMERAPrimary8 MP, 3264x2448 pixels, autofocus, LED flash, check quality
FeaturesSimultaneous HD video and image recording, geo-tagging, touch focus, face and smile detection, image stabilization
VideoYes, 1080p@30fps, check quality
SecondaryYes, 1.9 MP
FEATURESOSAndroid OS, v4.1.1 (Jelly Bean)
ChipsetExynos 4412 Quad
CPUQuad-core 1.6 GHz Cortex-A9
GPUMali-400MP
SensorsAccelerometer, gyro, proximity, compass, barometer
MessagingSMS(threaded view), MMS, Email, Push Mail, IM, RSS
BrowserHTML5
RadioStereo FM radio with RDS
GPSYes, with A-GPS support and GLONASS
JavaYes, via Java MIDP emulator
ColorsTitanium Gray, Marble White
 - S-Voice natural language commands and dictation
- Smart Stay and Smart Rotate eye tracking
- SNS integration
- Active noise cancellation with dedicated mic
- Dropbox (50 GB storage)
- TV-out (via MHL A/V link)
- MP4/DivX/XviD/WMV/H.264/H.263 player
- MP3/WAV/eAAC+/AC3/FLAC player
- Organizer
- Image/video editor
- Document editor (Word, Excel, PowerPoint, PDF)
- Google Search, Maps, Gmail,
YouTube, Calendar, Google Talk, Picasa integration
- Voice memo/dial/commands
- Predictive text input (Swype)
BATTERY Standard battery, Li-Ion 3100 mAh
Stand-byUp to 980 h (2G) / Up to 890 h (3G)
Talk timeUp to 35 h (2G) / Up to 16 h (3G)
MISCSAR US0.23 W/kg (head)     0.95 W/kg (body)    
SAR EU0.17 W/kg (head)    
Price group
TESTSDisplayContrast ratio: 402 (nominal) / 2.307:1 (sunlight)
LoudspeakerVoice 70dB / Noise 66dB / Ring 80dB
Audio qualityNoise -90.2dB / Crosstalk -90.7dB
CameraPhoto / Video
Battery lifeEndurance rating 69h