Search Results

Search found 92 results on 4 pages for 'tahir hassan'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • How to horizontally sort divs using Sortable in JQuery

    - by Tahir Akram
    I am looking to sort my divs horizontally in a container div. I found an example on JQuery website but that is vertical sorting. I want it horizontal. I want to do it sorting in #sortable Div. Will you please guide me how can I convert this vertical sorting in horizontal manner. CSS <style type="text/css"> #draggable1 { width: 150px; height: 35px; padding: 0.5em; } #draggable2 { width: 150px; height: 35px; padding: 0.5em; } #draggable3 { width: 150px; height: 35px; padding: 0.5em; } #sortable { width: 700px; height: 35px; padding: 0.5em; } </style> JavaScript <script type="text/javascript"> $(function() { $("#sortable").sortable({ revert: true }); }); </script> HTML <div class="demo"> <div id="sortable" class="ui-state-default"> <div id = "draggable1" class="ui-state-default">Home</div> <div id = "draggable2" class="ui-state-default">Contact Us</div> <div id = "draggable3" class="ui-state-default">FAQs</div> </div> </div> Screenshot

    Read the article

  • MyEclipse builds workspace on saving JSP page every time

    - by Tahir Akram
    Whenever I save a jsp page, MyEclipse IDE start building the workspace. It should build when I change in any class file. Or if there are classes that not compiled. But why it start building whole workspace when I change in a JSP file. I am stuck on it. Please advise me on this problem. I am using MyEclipse 5.5 over Eclipse 3.2 Thanks.

    Read the article

  • How to scroll LI items in a fixed height UL?

    - by Tahir Akram
    Here is my example HTML. And I want to have scroll for my LI items. Which are of 2 levels. Means, I want to apply class on every UL. So how can I do that. By using JQuery or CSS tweaking. PS: I am using this example. <ul id="nav" class="dropdown"> <li class="dir"> Item_Root <ul> <li class="dir"> Item_1_Level <ul> <li>Item_Level_2</li> <li>Item_Level_2</li> <li>Item_Level_2</li> <li>.... up to N items</li> </ul> </li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>.... up to N items</li> </ul> </li> </ul>

    Read the article

  • Jquery ajax request error callback is called instead of success even after response recieved from server

    - by Muhammad Tahir Butt
    I am using jquery ajax funtion to get some content from my webservice. Response from the server is received but every time error callback is called instead of success callback. And this error is returned in xhr.error: function (){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this} Here is the screenshot of response from server: and here is the code i am using to make the request: function abcdef() { $.ajax({ url: "http://192.168.61.129:8000/get-yt-access-token/", type: "GET", contentType:"application/json", error: function(xhr, textStatus, errorThrown){ alert("its error! " + xhr.error); }, success: function(data){ alert(data); } }); }

    Read the article

  • Reusing OAuth request token when user refresh page - Twitter4j on GAE

    - by Tahir Akram
    Hi I am using Twitter4J API on GAE/J. I want to use the request token when user came to my page. (called back URL). And press refresh button. I write following code for that. But When user press refresh button. I got Authentication credentials error. Please see the stacktrance. It works fine when user first time used that token. HomeServlet.java code: HttpSession session = request.getSession(); twitter.setOAuthConsumer(FFConstants.CONSUMER_KEY, FFConstants.CONSUMER_SECRET); String token = (String) session.getAttribute("token"); String authorizedToken = (String)session.getAttribute("authorizedToken"); User user = null; if (!token.equals(authorizedToken)){ AccessToken accessToken = twitter.getOAuthAccessToken( token, (String) session .getAttribute("tokenSecret")); twitter.setOAuthAccessToken(accessToken); user = twitter.verifyCredentials(); session.setAttribute("authorizedToken", token); session.setAttribute("user", user); }else{ user = (User)session.getAttribute("user"); } TwitterUser twitterUser = new TwitterUser(); twitterUser.setFollowersCount(user.getFollowersCount()); twitterUser.setFriendsCount(user.getFriendsCount()); twitterUser.setFullName(user.getName()); twitterUser.setScreenName(user.getScreenName()); twitterUser.setLocation(user.getLocation()); Please suggest how I can do that. I have seen on many website. They retain the user with the same token. Even if user press browser refresh buttion again and again. Please help. Exception stacktrace: Reason: twitter4j.TwitterException: 401:Authentication credentials were missing or incorrect. /friends/ids.xml This method requires authentication. at twitter4j.http.HttpClient.httpRequest(HttpClient.java:469) at twitter4j.http.HttpClient.get(HttpClient.java:412) at twitter4j.Twitter.get(Twitter.java:276) at twitter4j.Twitter.get(Twitter.java:228) at twitter4j.Twitter.getFriendsIDs(Twitter.java:1819) at com.tff.servlet.HomeServlet.doGet(HomeServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5233) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363) at com.google.net.rpc.impl.Server$2.run(Server.java:838) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:536) at com.google.net.rpc.impl.Server.startRpc(Server.java:793) at com.google.net.rpc.impl.Server.processRequest(Server.java:368) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:448) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java:466) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:759) at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:205) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101) at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251) at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:394) at java.lang.Thread.run(Unknown Source)

    Read the article

  • Getting text values of li (even nested) in JQuery

    - by Tahir Akram
    Hi; <ul> <li class="item-i">AI</li> <li class="item-ii">AII <ul class="level-2"> <li class="item-a">A</li> <li class="item-b">B</li> <li class="item-c">C</li> </ul> </li> <li class="item-iii">III</li> </ul> How can I get values AI AII A B C III? What I tried so far is following: $(document).ready(function() { $('li').each(function(index) { alert($(this).text()); }); }); But it does not gave me required results. When it reaches "item-ii" it gave all result. I want item one by one.

    Read the article

  • How to get global variable in JQuery functions

    - by Tahir Akram
    I want to access my global javascript variable in JQuery methods. But I am unable to get it when I go to attach a click even to a div. As following. How can I do that? I mean do I need to rely on hidden fields for some state management? var divCount = 3; $(function() { //divCount is accessible here $("#sortable").sortable({ revert: true }); $("#new").click(function(){ if (divCount<7){ //divCount is not accessible here. why? and how? var thisCount = ++divCount; $("#draggable_"+thisCount).addClass("draggable"); } }); });

    Read the article

  • Techniques to avoid DeadlineExceededException in GAE/J?

    - by Tahir Akram
    I am developing an Twitter4J web application in Google App Engine/Java. I need to show two lists. One is Twitter friends and other is followers. With photo and screen name. It is working fine for people who have 20-30 followers and friends. But it gave me DeadlineExceededException when I try a user who has 150+ followers and friends. GAE throws this exception if web request take time more than 30 seconds. So what techniques I can adopt to avoid this exception. Should I generate two AJAX calls for each of my list. After page loads. So that every call will have its own 30 secs limit? Or what else you think? I am gone make it. Please help.

    Read the article

  • HttpSession problem in Google App Engine/J

    - by Tahir Akram
    I am writting a Twitter web app by using Twitter4J on GAE/J. I am saving Twitter and Request Token objects in session so that to be used after call back. I have two servlets. IndexServlet sets session and HomeServlet get from session (hits on call back by twitter oAuth). If I comment out session handling lines in both servlets then call backs works fine. Please suggest any workaround. I am sharing my code here. IndexServlet.java Twitter twitter = new Twitter(); twitter.setOAuthConsumer("<masked>", "<masked>"); RequestToken requestToken = null; try { requestToken = twitter.getOAuthRequestToken(); log.info("OAuth token has been taken"); } catch (TwitterException e) { log.warning(e.toString()); } HttpSession session = request.getSession(); if (session.getAttribute("twitter")==null){ session.setAttribute("twitter", twitter); out.println("-----------------------------> session is set"); } if (session.getAttribute("token")==null){ session.setAttribute("token", requestToken); out.println("-----------------------------> session is set"); } String authUrl = requestToken.getAuthorizationURL(); HomeServlet.java HttpSession session = request.getSession(); twitter = (Twitter)session.getAttribute("twitter"); r = (RequestToken)session.getAttribute("token"); twitter.setOAuthAccessToken(r.getAccessToken()); twitter.updateStatus("Hello World!"); Exception javax.servlet.ServletException: java.lang.ArrayStoreException: [Ljava.lang.String; at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:239) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4950) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4948) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359) at com.google.net.rpc.impl.Server$2.run(Server.java:823) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)

    Read the article

  • How do I send an email confirmation link to the user.

    - by adeel tahir
    I am developing a website where I need to send confirmation link to the user's e-mail account when he/she signs-up. When user clicks this link then a field userEnable in database changes from "false" to "true". How do I send a confirmation e-mail to a user when user clicks on the signup button. When user clicks on this confirmation link then how would the field UserEnable change from "false" to "true" I am using asp.net 4.0 with VB.NET as the language and SQL Server 2008 for my database.

    Read the article

  • how to redirect user depending on user type at time of login (codeignitor)

    - by Anam Tahir
    im facing problem while redirecting my user according to its type. how can do it here's my code plz suggest how to do it. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class VerifyLogin extends CI_Controller { function __construct() { parent::__construct(); } function index() { $this->load->model('user','',TRUE); //This method will have the credentials validation $this->load->library('form_validation'); $this->load->library('session'); $this->form_validation->set_rules('username', 'Username','trim|required|xss_clean'); $this->form_validation->set_rules('password', 'Password' 'trim|required|xss_clean|callback_check_database'); if($this->form_validation->run() == FALSE) { //Field validation failed.&nbsp; User redirected to login page validation_errors(); $this->load->view('error'); } else { //Go to private area basically here i want to redirect if user is admin then redirect to admin page else redirect to home how can i do this ??? redirect('home', 'refresh'); } } function check_database($password) { //Field validation succeeded.&nbsp; Validate against database $username = $this->input->post('username'); //query the database $result = $this->user->login($username, $password); if($result) { $sess_array = array(); foreach($result as $row) { $sess_array = array( 'id' => $row->id, 'username' => $row->username ); $this->session->set_userdata('logged_in', $sess_array); } return TRUE; } else { $this->form_validation->set_message('check_database', 'Invalid username or password'); return false; } } } ?>

    Read the article

  • Ctrl + right click opens mutiple items instead of selecting them. How do I fix this?

    - by Malik Hassan
    Something happened to my keyboard and or mouse controls. I have a Logitech T-BB18 trackwheel and an hp NY418AA Keyboard. When I use the mouse in Windows mail and click the delete button it deletes two emails instead of one and opens all the emails that I have selected when I ctrl + click on multiple emails to select them. When I'm in Windows Explorer ctrl + click and multiple select opens all of the files that I have selected instead of just selecting them. I really need to fix this behavior. Can someone help please?

    Read the article

  • Is there an Apache error log viewer for Mac?

    - by Hassan
    I need an app that reads log files to make it easier to look through the hundreds of lines of errors that apache outputs. I've found this nice log viewer app, but it's only available for Windows. It looks like exactly what I need, except for the fact that it doesn't run on OS X. I've also looked into GoAccess, but it can only view access logs, not error logs. I also tried the Console in the utilities folder. It shows the log just as TextEdit would, it does no parsing at all. Is there an app for Mac that parses and displays errors from the apache error log?

    Read the article

  • What are some alternatives to word processing with Markdown?

    - by Hassan
    I've used MS Word-style editors for a long time, but I never got used to how unintuitive and cumbersome they are. I'm not talking specifically about MS Word, but also other editors that seem to mimic Word, like OpenOffice, NeoOffice, etc. I've found myself preferring to write in Markdown (much like on this site). I've found a few good Markdown editors, and I like using them a lot more than using Word-style editors. Here is what they generally look like: As you can see, it works much differently than a Word-style editor. This is a generally cleaner way of writing, since formatting is done right in the text, and is extremely simple to use (no highlighting some text, then clicking a button in some menu you have to find). Although editing text this way is great, I've realized that the syntax can only be used for very specific needs (bullets, numbered lists, headings and sub-headings, bold, italic, and some other common ones). However, many features are missing. Here are some features that would be nice in a word processor: Tables. Indenting paragraphs. Good image support (you can link to images, but not add them, since Markdown is just text). More simple to use than Word and its cronies. Cross-platform. Some of these can be fixed with in-line HTML, but nobody wants to do that. It seems Markdown was designed for editing text on the internet. Is there a similar setup that works better for desktop word processors?

    Read the article

  • external SCSI tape drive DAT 72 problem Solaris 10

    - by Hassan
    Hi all, I have solaris 10 sparc running and working very well but i have problem with external SCSI tape drive DAT 72 problem it seems to me the tape drive is manufactured by SUN microsystems when i ran mt -f /dev/rmt/0 status it reveals the following output bash-3.00# mt -f /dev/rmt/0 status /dev/rmt/0: No such file or directory when i ran ls -l it reveals the following output ls -l /dev/rmt/0 lrwxrwxrwx 1 root root 43 Sep 20 2006 /dev/rmt/0 -> ../../devices/pci@8,600000/scsi@1,1/st@3,0: it seems to me everything is okay SCSI cable is connected properly to Tape device and to server as well the tape has SCSI termination dongle as well and connected properly to Tape device as well any ideas would be a great assist Thanks in advance

    Read the article

  • Securely executing system commands as sudo from PHP

    - by Aydin Hassan
    Is it possible? I have written a command line tool in PHP for creating new environments for our company. It creates system users, directories, databases, VHosts and restarts apache, amongst other things. These commands require sudo privileges. I thought it might be a nice idea to have a web-interface for it, to make it easier for other non-developers to use. The web app would be behind authentication. When running from the command line I just run sudo tool.php, obviously I can't do this from a web app. How could I do this securely? Giving the apache user sudo access seems silly, as this would means all sites hosted on the box (eg all our environments) would have sudo access. Is it possible to make this tool run under a different user? this user could have sudo privileges for only the commands I need? How do things like plesk and cPanel do this? Any thoughts?

    Read the article

  • Join domain in windows 7 [on hold]

    - by Hassan Ali Khan
    I have created a domain on server machine and when i am trying to join a domain through another machine of windows 7 through the following steps: Goto MY Computer Properties - Change settings - ComputerName - click on change button - click on radio button "Domain" and enter domain name. After that when i click on OK button and enter the username and password credentials. It show me the following error: An attempt to resolve the DNS name of a domain controller in the domain being joined has failed. Please verify this client is configured to reach a DNS server that can resolve DNS names in the target domain

    Read the article

  • OS X multiple use of same machine via VNC

    - by Hassan Syed
    I'm wondering if I can connect to my wife's mac via VNC while she is logged in herself. I wouldn't be surprised if this isn't possible, although the machinery should be there with "fast-user-switching" support. So, if I create a profile for myself and I log in (and enable the VNC server/sharing for my profile), and then my wife switches to her own account which she uses on the physical console. Will I be able to use the mac ?

    Read the article

  • Configuring squid as reverse proxy

    - by Hassan
    I am having trouble configuring squid to work as reverse proxy here is my scenario squid is installed on server with ip 10.1.1.139 I have another computer that is acting as my proxy server 10.1.85.106 which has access to 10.1.85.106/program I want 10.1.1.139/program to be redirected to 10.1.85.106 I have added cache_peer 10.1.85.106 parent 80 0 no-query originserver name=server_1 cache_peer_domain server_1 /program /program/ program when I go to 10.1.1.139/program I get "The following error was encountered while trying to retrieve the URL: /program Invalid URL" Since the error is not related to access denied I don't think it is due to access restrictions. Do I need to add anything else? Thanks for your time

    Read the article

  • Linux: set up media server to stream video via the Internet?

    - by Hassan
    How do I set up a media server in Linux which streams video over the internet? Is it easy to do this? I want a server that will actually encode video in real time to allow it to stream over sometimes slow or unreliable networks. Basically, I want a server that works on the internet. I have a directory with a bunch of video files, and want to make this accessible to myself remotely. For other situations, I found great and useful software (such as the PS3 media server). I'd like to find something equally as useful for streaming video over the internet.

    Read the article

  • Viewsonic VG2427wm detected max resolution too low

    - by Hassan
    So I have a Viewsonic VG2427wm, which supports max resolution of 1920x1080 and I had it working at this resolution from both windows and linux PCs. Now, I need to connect it to my Dell XPS17 (L702x), which has only DP mini and HDMI, so I'm trying to connect this monitor via HDMI-to-DVI adapter (doesn't work at all) and via DP-mini-to-DVI adapter. The later works, but is limiting my max resolution to 1680x1050. Using same two adapters to connect my dell monitor works fine, so I don't suspect any of the adapters to be faulty. The driver is the latest viewsonic driver (although it's been last updated 3 years back). Any ideas, how I can force it to display it's correct native resolution?

    Read the article

  • javascript complex recurrsion [on hold]

    - by Achilles
    Given Below is my data in data array. What i am doing in code below is that from that given data i have to construct json in a special format which i also gave below. //code start here var hierarchy={}; hierarchy.name="Hierarchy"; hierarchy.children=[{"name":"","children":[{"name":"","children":[]}]}]; var countryindex; var flagExist=false; var data = [ {country :"America", city:"Kansas", employe:'Jacob'}, {country :"Pakistan", city:"Lahore", employe:'tahir'}, {country :"Pakistan", city:"Islamabad", employe:'fakhar'} , {country :"Pakistan", city:"Lahore", employe:'bilal'}, {country :"India", city:"d", employe:'ali'} , {country :"Pakistan", city:"Karachi", employe:'eden'}, {country :"America", city:"Kansas", employe:'Jeen'} , {country :"India", city:"Banglore", employe:'PP'} , {country :"India", city:"Banglore", employe:'JJ'} , ]; for(var i=0;i<data.length;i++) { for(var j=0;j<hierarchy.children.length;j++) { //for checking country match if(hierarchy.children[j].name==data[i].country) { countryindex=j; flagExist=true; break; } } if(flagExist)//country match now no need to add new country just add city in it { var cityindex; var cityflag=false; //hierarchy.children[countryindex].children.push({"name":data[i].city,"children":[]}) //if(hierarchy.children[index].children!=undefined) for(var k=0;k< hierarchy.children[countryindex].children.length;k++) { //for checking city match if(hierarchy.children[countryindex].children[k].name==data[i].city) { // hierarchy.children[countryindex].children[k].children.push({"name":data[i].employe}) cityflag=true; cityindex=k; break; } } if(cityflag)//city match now add just empolye at that city index { hierarchy.children[countryindex].children[cityindex].children.push({"name":data[i].employe}); cityflag=false; } else//no city match so add new with employe also as this is new city so its emplye will be 1st { hierarchy.children[countryindex].children.push({"name":data[i].city,children:[{"name":data[i].employe}]}); //same as above //hierarchy.children[countryindex].children[length-1].children.push({"name":data[i].employe}); } flagExist=false; } else{ //no country match adding new country //with city also as this is new city of new country console.log("sparta"); hierarchy.children.push({"name":data[i].country,"children":[{"name":data[i].city,"children":[{"name":data[i].employe}]}]}); // hierarchy.children.children.push({"name":data[i].city,"children":[]}); } //console.log(hierarchy); } hierarchy.children.shift(); var j=JSON.stringify(hierarchy); //code ends here //here is the json which i seccessfully formed from the code { "name":"Hierarchy", "children":[ { "name":"America", "children":[ { "name":"Kansas", "children":[{"name":"Jacob"},{"name":"Jeen"}]}]}, { "name":"Pakistan", "children":[ { "name":"Lahore", "children": [ {"name":"tahir"},{"name":"bilal"}]}, { "name":"Islamabad", "children":[{"name":"fakhar"}]}, { "name":"Karachi", "children":[{"name":"eden"}]}]}, { "name":"India", "children": [ { "name":"d", "children": [ {"name":"ali"}]}, { "name":"Banglore", "children":[{"name":"PP"},{"name":"JJ"}]}]}]} Now the orignal problem is that currently i am solving this problem for data of array of three keys and i have to go for 3 nested loops now i want to optimize this solution so that if data array of object has more than 3 key say 5 {country :"America", state:"NewYork",city:"newYOrk",street:"elm", employe:'Jacob'}, or more than my solution will not work and i cannot decide before how many keys will come so i thought recursion may suit best here. But i am horrible in writing recurrsion and the case is also complex. Can some awesome programmer help me writing recurrsion or suggest some other solution.

    Read the article

< Previous Page | 1 2 3 4  | Next Page >