Nguyen Huu Hai

159 Followers
25 Blog Followers
1 Blog Reviews
Following: 363
Following Blogs: 143

Latest Activity

Recursively traverse object in Objective-C

Nguyen Huu Hai posted an article on - Feb 8, 2012, 8:25 pm
I'm converting diverse JSON objects to structured objects and want to iterate over all the nodes to process each one hierarchically. JSON framework supports conversion to an NSDictionary, which I thought was unstructured. I want to recursively iterate through each item and pay respect to the...
Comment - Like

iPhone - How to handle errors at runtime

Nguyen Huu Hai posted an article on - Feb 8, 2012, 8:25 pm
When writing code, there are many situations that must be treated as runtime errors : an alloc/init returns nil, a resource is not found, a returns NO for an absolutely-needed feature where YES would be the natural answer, ... For all these situations, I have written an e...
Comment - Like

Convert an iPhone phone number format for a "dial-able” string

Nguyen Huu Hai posted an article on - Feb 8, 2012, 8:25 pm
I am building an iphone app that reads a phone number from the address book and dial it (with some other things of course...:)). When I load the phone numbers from the AB they are in this following format: "1 (111) 111-1111" which is not "dial-able" when using this: f...
Comment - Like

get ascii code from string in xcode for iphone app

Nguyen Huu Hai posted an article on - Feb 8, 2012, 8:25 pm
hey just a couple quick noob questions about writing my first ios app. Ive been searching through the questions here but they all seem to address questions more advanced than mine so im getting confused. (1) All I want to do is turn a string into an array of integers repr...
Comment - Like

What control should i use when doing this in objectice C

Nguyen Huu Hai posted an article on - Feb 8, 2012, 8:25 pm
following are my snapshot please look at it: http://bit.ly/y7U05k or below is the attached image in this snapshot i have to make the boot control like images when i click image#1 then image#1 show on the upper side UIImageView i also define on the image... image#1 .. imag...
Comment - Like

Developing a new app; is maintaining iOS 4 compatibility still worth it? [closed]

Nguyen Huu Hai posted an article on - Feb 8, 2012, 8:25 pm
I am currently in the starting phase of developing a new iOS app (for both iPhone and iPad) for a client. I'm really indecisive if I should still support iOS 4 or not. I tried to find some statistics about the adoption of iOS 5, one of the only fairly recent articles that I could find was th...
Comment - Like

How to return from "partial curl” type segue

Nguyen Huu Hai posted an article on - Feb 8, 2012, 8:24 pm
I am attempting to use a partial curl segue to reveal an options view underneath my main view. This is identical to touching the "page curl" button in the bottom right corner of the Maps app. I can successfully execute the segue to the option view, my problem is returning...
Comment - Like

Cocos2D iPhone - running actions on multiple targets + callback

Nguyen Huu Hai posted an article on - Feb 8, 2012, 8:24 pm
I have an array of objects (objArray) and an array of actions (actArray). Both arrays are in order, I mean, object at index 0 of objArray has to perform action 0 on actArray. To make the explanation clear, lets imagine both arrays have 3 objects, obj0, obj1 and obj2. ...
Comment - Like

Is there a way that I can get the SNR (Signal-To-Noise Ratio) using CaptiveNetwork?

Nguyen Huu Hai posted an article on - Feb 8, 2012, 8:24 pm
Is there a way that I can get the SNR (Signal-To-Noise Ratio) of a wifi AP using CaptiveNetwork? If there isn't, is the Wifi device on the iPhone capable of doing so? Also, I can't seem to get the signal strength of any wifi AP using CaptiveNetwork. It only gives me SSID, BSSID and SSIDDATA....
Comment - Like

Testing various versions of iPhone Safari

Nguyen Huu Hai posted an article on - Feb 8, 2012, 8:24 pm
I am developing a jquerymobile App, and things are looking good in IOS5 with the most up-to-date version of Safari, I really need to test some older versions of Safari and its Webkit to ensure things are looking good for most browser versions. I realise I can fire up an o...
Comment - Like

jquery $(selector).ready() code running even if no element was matched

Nguyen Huu Hai posted an article on - Jan 31, 2012, 10:14 pm
I am using this code to only run this js on certain pages. $("body#action_new").ready(function() { console.log($("body#action_new")); console.log($("body#action_new").length); console.log("code is running"); } E...
Comment - Like

how to use global variable with phonegap navigator.notification.confirm?

Nguyen Huu Hai posted an article on - Jan 31, 2012, 10:13 pm
i have this situation: click1 click2 click3 function submitNotification(cdata){ navigator.notification.confirm( 'do you like '+cdata+' option ', submit, 'notice', 'Yes,No' ...
Comment - Like

jquery events blocking default long press events using DroidGap class in phone gap

Nguyen Huu Hai posted an article on - Jan 31, 2012, 10:13 pm
I am using some jquery events in droid gap class but it will block default long press for selecting text and copy and paste .can anybody tell How to avoid this ? Thanks
Comment - Like

Functions in Jquery [closed]

Nguyen Huu Hai posted an article on - Jan 31, 2012, 10:13 pm
I have got many dropdowns in my site and i want to make a reusable function with jquery so i can save a lot of code just by a single function. Can any one help me out in this regard... For an example I am dropdown item ...
Comment - Like

How to find out whether an element is in a hidden iframe

Nguyen Huu Hai posted an article on - Jan 31, 2012, 10:13 pm
Using jQuery, one can easily find out whether a particular element is visible using $(element).is(':visible') While having some limitations (doesn't cover css visibility hidden or the actual visibility in the viewport, i.e. whether it's covere...
Comment - Like

jquery $(selector).ready() code running even if no element was matched

Nguyen Huu Hai posted an article on - Jan 31, 2012, 10:13 pm
I am using this code to only run this js on certain pages. $("body#action_new").ready(function() { console.log($("body#action_new")); console.log($("body#action_new").length); console.log("code is running"); } E...
Comment - Like

how to use global variable with phonegap navigator.notification.confirm?

Nguyen Huu Hai posted an article on - Jan 31, 2012, 10:13 pm
i have this situation: click1 click2 click3 function submitNotification(cdata){ navigator.notification.confirm( 'do you like '+cdata+' option ', submit, 'notice', 'Yes,No' ...
Comment - Like

How to find out whether an element is in a hidden iframe

Nguyen Huu Hai posted an article on - Jan 31, 2012, 10:13 pm
Using jQuery, one can easily find out whether a particular element is visible using $(element).is(':visible') While having some limitations (doesn't cover css visibility hidden or the actual visibility in the viewport, i.e. whether it's covere...
Comment - Like

How to scroll down with jquery when user reached a specific part of an image?

Nguyen Huu Hai posted an article on - Jan 31, 2012, 10:12 pm
It's hard to describe what exactly i was looking for and sorry for my english. What i want to do is, while user scroll down slowly, when user reached a specific point, starting to scroll down page like 1000px and then stop scrolling at the second specific point. Here is a...
Comment - Like

Lightbox and dynamic links - how and why does this work?

Nguyen Huu Hai posted an article on - Jan 31, 2012, 10:12 pm
I had a problem, was going to ask how to fix it, but then the answer popped up in a related question. Seeing I have little experience with jQuery, I would like to understand exactly "what" happens with what I'm doing. FYI: jQuery (latest) + jCarousel + Lightbox. ...
Comment - Like

Does storing large sessions slow down response time and server

Nguyen Huu Hai posted an article on - Jan 30, 2012, 9:57 pm
I am in the process of creating a Facebook App for my website which includes functionality that requires the users friends list. Retrieving the friends is no problem, what I am struggling to decide, is how to store them. Option 1 - Store the users in my ...
Comment - Like

process PHP on hitting URL & configuring PHP

Nguyen Huu Hai posted an article on - Jan 30, 2012, 9:57 pm
For my website, I want one of my PHP script to be executed on entering on URL before loading the page(before entering into my site, on hitting enter first this has to be executed), could you suggest me how. Secondly, I've configured PHP ini in localhost in order to includ...
Comment - Like

what this error is due to session_start

Nguyen Huu Hai posted an article on - Jan 30, 2012, 9:57 pm
My hosting sent me email saying I have set the session.save_path = /home/users/web/b1475/moo.youraccount/cgi-bin/tmp for your account then i found my website is giving me this error Warning: session_start(): open(/home/...
Comment - Like

Multi-Dimensional array count in PHP

Nguyen Huu Hai posted an article on - Jan 30, 2012, 9:56 pm
I have a multi-dimentional array set up as follows array() { => array() { => array(9) { // ticket details here } => array(10) { // ticket details here } ...
Comment - Like

Backup MySql Database?

Nguyen Huu Hai posted an article on - Jan 30, 2012, 9:56 pm
I have asked this question before but I haven't got an answer, so I'm rephrasing it. I want to back up a db using either: system("mysqldump -h DB_HOST -u DB_USER -p DB_PASS logindb > $location/$backup"); or: ...
Comment - Like

PHP cURL timeout is not working

Nguyen Huu Hai posted an article on - Jan 30, 2012, 9:56 pm
I'm having a server issue. I'm running a local server (for developing) and I've changed my local server from MAMP to XAMPP. However, on XAMPP, the cURL option CURLOPT_TIMEOUT_MS or CURLOPT_CONNECTTIMEOUT_MS gives me the next error: Warning: curl_setopt() expects p...
Comment - Like

YAML internationalization

Nguyen Huu Hai posted an article on - Jan 30, 2012, 9:56 pm
I'm working in a big project.I'm thinking of a new idea to create the best way of internacianalization to many languages. Solutions: 1.Store data as arrays - tree file system.. It's not a good way because i need to modify files "on air". 2.I18n table....
Comment - Like

ActionScript BEncoded XML file. Decoding same way as Flash:URLLoader in PHP

Nguyen Huu Hai posted an article on - Jan 30, 2012, 9:56 pm
Hope topic is relevant :) I have a class in Action script that loads and interpretes an XML File. What I want to do is to be able to decode this file using PHP (Probably some kind of Binary Decoding) private static function interpreteXML(j:Event):v...
Comment - Like

Having issue with substr function in PHP

Nguyen Huu Hai posted an article on - Jan 30, 2012, 9:55 pm
I have a string like this: $geometry = "POINT (1.5041909054501184 0.39827301781943014)" I have to split the two decimal values 1.5041909054501184 and 0.39827301781943014 based on space, into an array. For that, as expected, I have to chop-off ...
Comment - Like

Delete empty value element in array

Nguyen Huu Hai posted an article on - Jan 30, 2012, 9:55 pm
Array ( => 0 //value is int 0 which isn;t empty value => //this is empty value => //this is empty value ) I would like to make the above array to be as the following, Can anyone help me? Many thanks&#...
Comment - Like

UIImage Resize without loss of quality

Nguyen Huu Hai posted an article on - Jan 20, 2012, 2:19 am
Im looking for an external library (or a method using Apple frameworks that doesn't destroy the quality) which will let me scale down images. I have tried this 'simple-image-processing-library' but it only works for black and white - I don't know how to make it work for c...
Comment - Like

SQLCipher Working But Incorrect Password

Nguyen Huu Hai posted an article on - Jan 20, 2012, 2:19 am
I've just implemented SQLCipher in my app to encrypt one fairly simple database. I followed all of the setup instructions carefully on this tutorial and the project is building and the app is running successfully. However, when I use their sample code to encrypt my database, my password is s...
Comment - Like

error with scrollToRowAtIndexPath

Nguyen Huu Hai posted an article on - Jan 20, 2012, 2:19 am
I am getting an error when using my application that used tableviews, the error looks like this. 2012-01-19 10:19:51.442 bcode[1176:207] *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[UITableView scrollToRowAtIndexPath:atScrollPosition:an...
Comment - Like

Flex iOS app version has huge font size?

Nguyen Huu Hai posted an article on - Jan 20, 2012, 2:19 am
I have an Android/iOS app that is almost complete, my only issue is that my iOS version has a huge font size on TextFields, whereas the Android version works perfectly? Both apps work fine when I'm testing on my computer, but when I test on the devices (iPod 4G and Galaxy...
Comment - Like

Alert password field that stores password into the keychain and checks it against original login view controller

Nguyen Huu Hai posted an article on - Jan 20, 2012, 2:19 am
This is what I would like to happen I have screwed this up 60 times over now. Ok, I have a login View Controller that handles the login using the username and password and a remember me switch. The login view controller verifies against an API, checks the credentials then...
Comment - Like

How to go to the last page of a page control

Nguyen Huu Hai posted an article on - Jan 20, 2012, 2:18 am
i have a page control with 4 page, and in my navigationController I put a button to go directly to the last page of the page control. But I don't know how to tell the scrollview or the page control to go to the last page. thanks
Comment - Like

How safely cancel all requests in ASINetworkQueue on view deallocate

Nguyen Huu Hai posted an article on - Jan 20, 2012, 2:18 am
I have ASINetworkQueue with more than 1500 requests in it. Performing this number of requests takes for a while. If user leaves view controller while this queue is running the OS deallocates the view controller and I get "message sent to deallocated instance" error. I hav...
Comment - Like

How to share a variable between multiple Views/XIBs

Nguyen Huu Hai posted an article on - Jan 20, 2012, 2:18 am
I've read several similar threads, but can't seem to figure this out - sorry. I've got a project with multiple Views, including a ViewController, several "sub" views, and a NavigationController. I'd like to have an array that is accessible from any of the Views, so that I can populate a Tabl...
Comment - Like

Attempts to tap a UIButton in a UITableViewCell using UI Automation fail with "could not be tapped”

Nguyen Huu Hai posted an article on - Jan 20, 2012, 2:18 am
I have an iPhone app that I'm testing using UI Automation. I have a button in a UITableViewCell but when I try to tap on it using UI Automation I get the following error. Script threw an uncaught JavaScript error: target.frontMostApp().mainWindow()...
Comment - Like

Cylinder in OpenGL ES on iOS 5

Nguyen Huu Hai posted an article on - Jan 20, 2012, 2:18 am
I am pretty new in OpenGL ES and been searching the paste few days after some examples or tutorials about creating cylinders, but unfortunately without any luck! If anybody has some sample code or anything that might be of any use it would be highly appreciated. ...
Comment - Like

CCNA 2 Chapter 11 2011 V4.0 Answers 100%

Nguyen Huu Hai posted an article on - Oct 23, 2011, 9:29 pm
1. Refer to the exhibit. All routers are running OSPF. What cost would JAX put in its routing table for the 10.0.0.0/24 network? 2 156 1564 1785 ==>1787 2. Refer to the exhibit. Router1 and Router2 are running OSPF. The show ip ospf neighbor command reveals no neighbors. What is a possible cause? OS...
Comment - Like

CCNA 1 Final Exam 2011 latest (FULL Question and images)

Nguyen Huu Hai posted an article on - Mar 23, 2011, 11:38 am
Hi everyone! I have completed a test tonight. Now i post its here. Hope it will help you pass your exam. good luck. If you want to relax, click here http://news361.org all game in one site :) say thanks if it help you pass! Important: Pass to open document is: news361.org Link download here (news36...
Comment - Like

CCNA 1 Final Exam 2011 latest (hot hot hot)

Nguyen Huu Hai posted an article on - Mar 21, 2011, 12:00 pm
 Hi! I have been posted content of ccna1 final exam (latest and only question.) I will post the answer and insert image on sunday. If you care, please subscribe your email an become a first person have full test content. Subcribe now  Some question  have not content because this question have ima...
Comment - Like

CCNA Final exam

Nguyen Huu Hai posted an article on - Mar 11, 2011, 1:16 am
All CCNA Test Module, All CCNA Final Examhttp://news361.org
Comment - Like

CCNA Exploration 4 Chapter 6 Exam Answers

Nguyen Huu Hai posted an article on - Mar 1, 2011, 8:17 pm
1. Refer to the exhibit. A VPN tunnel has been established between the HQ Office and the Branch Office over the public Internet. Which three mechanisms are required by the devices on each end of the VPN tunnel to protect the data from being intercepted and modified? (Choose three.) The devices must ...
Comment - Like

CCNA 3 Final Exam => latest version

Nguyen Huu Hai posted an article on - Feb 21, 2011, 10:45 pm
1 . Which security protocol or measure would provide the greatest protection for a wireless LAN? WPA2 cloaking SSIDs shared WEP key MAC address filtering   2 . Refer to the exhibit. All trunk links are operational and all VLANs are allowed on all trunk links. An ARP request is sent by ...
Comment - Like

CCNA 2 Final Exam V4.0 Answers

Nguyen Huu Hai posted an article on - Feb 20, 2011, 8:18 pm
1 . Refer to the exhibit. Given the topology shown in the exhibit, what three commands are needed to configure EIGRP on the Paris router ? (Choose three.) Paris(config)# router eigrp 100 Paris(config)# router eigrp Paris(config-router)# network 192.168.6.0 Paris(config-router)# network...
Comment - Like

CCNA 1 Final Exam Answers 2011

Nguyen Huu Hai posted an article on - Feb 17, 2011, 10:37 am
copy from http://news361.org   1 . Due to a security violation, the router passwords must be changed. What information can be learned from the following configuration entries? (Choose two.) Router(config)# line vty 0 3 Router(config-line)# password c13c0 Router(config-line)# login The...
Comment - Like

Last test CCNA test module

Nguyen Huu Hai posted an article on - Feb 16, 2011, 1:32 am
Hi all! I have been transfer all data in this site to my new web. Now you can visit my new site in http://news361.org. In there have all latest version CCNA test module. All news of technology, health, sport, ccna will be updated every day http://news361.org
Comment - Like

CCNA 4 Final Exam V4.0 2010

Nguyen Huu Hai posted an article on - Dec 28, 2010, 8:20 pm
1. What functionality do access control lists provide in the implementation of dynamic NAT on a Cisco router? define which addresses can be translated define which addresses are assigned to a NAT pool define which addresses are allowed out the router define which addresses can be accessed from the i...
Comment - Like

About Me

Hi!
welcome to my blog http://p4s-ccna.blogspot.com and pass CCNA with 1000/1000. good luck!

Nguyen Huu Hai's Blogs:

Nguyen Huu Hai's Followers

Nguyen Huu Hai is Following

Invite Your Friends

Invite your contacts to blogged from:
gmail yahoo