Search Results

Search found 1068 results on 43 pages for 'al nik'.

Page 12/43 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Can i upload my apk to SD Card instead of internal storage?

    - by Ahmed Al Khashab
    My APK is big, 70 MB. I don't have any problems when I install it in external storage, but when I upload it to phone before installing, the APK goes to internal storage and my testing phone doesn't have enough space in internal storage and a lot of android phones don't have enough internal space for 70 MB... Can I upload my APK straight to the SD Card instead of internal storage first? upload mean "upload from my eclipse while runnig , or download from market, apk will go to internal storage but i want apk go to external and start install from external"

    Read the article

  • Sort by values from hash table - Ruby

    - by Adnan
    Hello, I have the following hash of countries; COUNTRIES = { 'Albania' => 'AL', 'Austria' => 'AT', 'Belgium' => 'BE', 'Bulgaria' => 'BG', ..... } Now when I output the hash the values are not ordered alphabetically AL, AT, BE, BG ....but rather in a nonsense order (at least for me) How can I output the hash having the values ordered alphabetically?

    Read the article

  • How to find a programmer for my project?

    - by Al
    I'm building a web application to generate monthly subscription fees, but I've quickly realised I'm going to need some help with the project to finish it this century. I don't have any money upfront for a freelancer and every website I've found takes bids for project work. The tasks that need doing are flexible too because I can do whatever the other coder doesn't want to. I'm also happy to guide the developer and offer tips for performance/security/etc etc. My question is; how do I go about finding someone to work with on a profit-share basis? I'm sure there are a billion people like me with the "next killer app" but I genuinely believe in it. Can anyone offer some advice? Thanks in advance! EDIT: I guess the trick is to find someone passionate enough about the subject as I am. Where would I find someone? Are there websites that broker profit-share deals on programming work?

    Read the article

  • Is programming in PHP easy?

    - by nik
    PHP is considered as an easy language of all, Why? Being an php developer, I haven't use any other language that much. And I know with php we gotta learn so much other things also like javascript ajax xml database jquery + all the cms like joomla, drupal, phpbb etc etc. And in web worls u always had to learn injecting maps, calendars, payment gatewaysetc Do learning other languages have these much dependencies? And if php easy than isn't it good thing to have easy language. I can't imagine to built a website in assembly language(Is it possible?)

    Read the article

  • do's and don'ts for writing mysql queries

    - by nik
    One thing I always wonder while writing query is that am I writing most optimized query or not? I know certain things like: 1) using SELECT field1, filed2 instead of SELECT * 2) Giving proper indexes to the tables but I am sure there are more things that should be kept in mind for writing queries, since most of the database can only grow more and optimal query will help gr8 in execution time, Can u share some tips and tricks on writing queries?

    Read the article

  • Another IE Issue with AJAX

    - by Nik
    Alright, This code works in every browser except IE (again, to be expected). The code is supposed to refresh based on setInterval, and does so normally in all other browsers except IE, which just doesn't refresh. Can you spot the problem? var nick = document.getElementById("chatnick").value; var sessid = document.getElementById("sessid").value; var room = document.getElementById("roomid").value; function user_read() { $.ajax({ type: "GET", url: "methods.php", data: {method: "u", room: room}, dataType: "html", success: function (data, status, xhr) { $("#userwindow").html(data); setTimeout(user_read, 10000); } }); } function ajax_read() { $.ajax({ type: "GET", url: "methods.php", data: {method: "r", room: room}, dataType: "html", success: function (data, status, xhr) { $("#chatwindow").html(data); setTimeout(ajax_read, 400); } }); } function submit_msg() { var msg = document.getElementById("chatmsg").value; $.ajax({ type: "GET", url: "methods.php", data: {method: "w", room: room, m: msg, n: nick, sessid: sessid}, dataType: "html", success: function (data, status, xhr) { } }); document.getElementById("chatmsg").value = ""; } function keyup(arg1) { if (arg1 == 13) submit_msg(); } setTimeout(function(){ajax_read();}, 400); user_read();

    Read the article

  • Replace into equivalent for postgresql and then autoincrementing an int

    - by Mohamed Ikal Al-Jabir
    Okay no seriously, if a postgresql guru can help out I'm just getting started. Basically what I want is a simple table like such: CREATE TABLE schema.searches ( search_id serial NOT NULL, search_query character varying(255), search_count integer DEFAULT 1, CONSTRAINT pkey_search_id PRIMARY KEY (search_id) ) WITH ( OIDS=FALSE ); I need something like REPLACE INTO for mysql. I don't know if I have to write my own procedure or something? Basically: check if the query already exists if so, just add 1 to the count it not, add it to the db I can do this in my php code but I'd rather all that be done in postgres C engine Thanks for helping

    Read the article

  • a question about rails general practice with REST, json, and ajax

    - by Nik
    Hi all, I have this question concerning REST I think: I have read a few rest tutorials and the feeling I get from them is that each action in a restful controller tends to be lean and almost single purpose: "Index gives off a collection of a model show gives off one model edit/new a prep place for changing/create a model update/create changes and makes new model deletes removes one model" After reading all these tutorials, rest seems to be to be a means to create an interface for a model, much like active resource type of thing. the mantra seems to be "controller provides data and data only and is also pretty convention over configuration, so expect projects_path to return a bunch of projects" I can understand that, and I like the cleanliness. But here's when I run into some trouble in reality in applying these guidelines: say three models, Project with attrib title, User with attrib name, and Location with attrib address. Say in views/users/index.html.erb, I want to use Ajax to fetch and display a project in a div#project_display when the user clicks on a project element, I know that I can use views/projects/show.js.rjs like this: page.replace_html 'project_display' "#{@project.name}" where in the projects_controller.rb def show @project = Project.find(params[:id]) repsond_to do |format| format.js and other formats... end end I have no problem in doing that for a couple of years now. BUT doesn't that mean that my JS response for the project#show action is LOCkED to present data to div#project_display element and show only whatever I that rjs template says it should show? That's very limiting and doesn't sound very "interface" like. I have never used JSON before or much XML, so I thought, maybe the JS response should send back raw stuff, like JSON and somehow the page on which the ajax request was called has the instruction on what do to with these raw data. That sounds a lot more flexible, doesn't it? Because look back at that exmpale, what if in the views/locations/index.html.erb, I want to do the exact same thing except I want to put the response in div#project_goes_here and the response should be #{project.name} I know this is a trivial change but that's the point: the RJS only allows one template at a time. So I think the JSON route is the way to go, but how does the already loaded page, the one that the ajax call came from, know when or how to "look forward" to incoming data? I read that PrototypeJS has this template thing, I wouldn't mind using it with JSON, but if you can demonstrate this or other means for displaying received-from-ajax data, I am all attention. Thank You

    Read the article

  • Jquery fade and swap an element when clicked which will also relate to an accordian menu

    - by Nik
    You will notice when you click posture 1 the description drops down and images appear on the right. Now when you click posture 2 or posture 3 the images and description change as they should. What I need to do now is - If posture 1 has been clicked and then posture 2 is clicked the posture 1 menu needs to close so that there is only one posture description visible at one time. If I could also make it so that if the current open posture item is clicked so that it closes and there are no open posture descriptions that there also no images displayed on the right. Finally is there a way to make sure only one set of animation images is running, because just say the user goes through all 26 options and they continue to run in the background it may get sluggish (thanks to Nick Craver for bringing that up). At this stage only posture 1, 2 and 3 are available. Ok finally some code - //Description drop-down boxes $(document).ready(function(){ //Hide (Collapse) the toggle containers on load $(".toggle_container").hide(); //Switch the "Open" and "Close" state per click $("h5.trigger").toggle(function(){ $(this).addClass("active"); }, function () { $(this).removeClass("active"); }); //Slide up and down on click $("h5.trigger").click(function(){ $(this).next(".toggle_container").slideToggle("slow"); }); }); //Images on the right fade in and out thanks to aSeptik $(document).ready(function(){ $('#section_Q_01,#section_Q_02,#section_Q_03').hide(); $(function() { $('h5.trigger a').click( function(e) { e.preventDefault(); var trigger_id = $(this).parent().attr('id'); //get id Q_## $('.current').removeClass('current').hide(); //add a class for easy access & hide $('#section_' + trigger_id).addClass('current').fadeIn(5000); //show clicked one }); }); }); //Fading pics $(document).ready(function(){ $('.pics').cycle({ fx: 'fade', speed: 2500 }); }); Description boxes - <h5 class="trigger" id="Q_01" ><a href="#">Posture 1 : Standing Deep Breathing :</a></h5> <div class="toggle_container" > <div class="block"> <span class="sc">Pranayama Series</span> <p class="bold">Benefits:</p> </div> </div> <h5 class="trigger" id="Q_02" ><a href="#">Posture 2 : Half Moon Pose With Hands To Feet Pose :</a></h5> <div class="toggle_container"> <div class="block"> <span class="sc">Ardha Chandrasana with Pada-Hastasana</span> <p class="bold">Benefits:</p> </div> </div> <h5 class="trigger" id="Q_03" ><a href="#">Posture 3 : Awkward Pose :</a></h5> <div class="toggle_container"> <div class="block"> <span class="sc">Utkatasana</span> <p class="bold">Benefits:</p> </div> </div> and the images on the right - <div id="section_Q_01" class="01"> <div class="pics"> <img src="../images/multi/poses/pose1/Pranayama._01.jpg"/> <img src="../images/multi/poses/pose1/Pranayama._02.jpg"/> <img src="../images/multi/poses/pose1/Pranayama._03.jpg"/> </div> </div> <div id="section_Q_02" class="02"> <div class="pics"> <img src="../images/multi/poses/pose2/Half_Moon_Pose_04.jpg" /> <img src="../images/multi/poses/pose2/Backward_Bending_05.jpg" /> <img src="../images/multi/poses/pose2/Hands_to_Feet_Pose_06.jpg" /> </div> </div> <div id="section_Q_03" class="03"> <div class="pics"> <img src="../images/multi/poses/pose3/Awkward_01.jpg" /> <img src="../images/multi/poses/pose3/Awkward_02.jpg" /> <img src="../images/multi/poses/pose3/Awkward_03.jpg" /> </div> </div> It would be a bonus if images faded out when another element is clicked... but not a big deal. Thanks for having a look

    Read the article

  • Silverlight Player Blank When Changing ism file

    - by Al Katawazi
    I am trying to get silverlight smooth streaming going on a site I am bilding and it works fine with the big buck bunny sample code which looks like this: <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%" id="Object2"> <param name="source" value="SmoothStreamingBlackGlass.xap"/> <param name="onerror" value="onSilverlightError" /> <param name="initparams"value='autoplay=False,muted=False,stretchmode=0,displaytimecode=False, playlist=<playList><playListItems><playListItem title="Big%20Buck%20Bunny" description="" mediaSource="Big%20Buck%20Bunny.ism/Manifest" adaptiveStreaming="True" thumbSource="Big%20Buck%20Bunny_Thumb.jpg" frameRate="24.0000384000614" ></playListItem></playListItems></playList>' /> <a href="http://go2.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"><img src="http://go2.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /></a> </object> <iframe style="visibility:hidden;height:0;width:0;border:0px"></iframe> but if i change the code like this i only get a blank area when the page is rendered instead of the movie clip. <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%" id="Object2"> <param name="source" value="SmoothStreamingBlackGlass.xap"/> <param name="onerror" value="onSilverlightError" /> <param name="initparams"value='autoplay=False,muted=False,stretchmode=0,displaytimecode=False, playlist=<playList><playListItems><playListItem title="Robotica_1080" description="" mediaSource="Robotica_1080.ism/Manifest" adaptiveStreaming="True" thumbSource="Robotica_1080_Thumb.jpg" frameRate="24.0000384000614" ></playListItem></playListItems></playList>' /> <a href="http://go2.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"><img src="http://go2.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /></a> </object> <iframe style="visibility:hidden;height:0;width:0;border:0px"></iframe> Any ideas? I am using Encoder 3 to do the encoding set on microsoft smooth streaming for 720p with all the default settings.

    Read the article

  • Active User Tracking, PHP Sessions

    - by Nik
    Alright, I'm trying to work on a function for active user counting in an AJAX based application. I want to express the below SQL Query in correct syntax but I'm not sure how to write it. The desired SQL Query is below: SELECT count(*) FROM active WHERE timestamp > time() - 1800 AND nick=(a string that doesn't contain [AFK]) Now, I do understand that time() - 1800 can be assigned to a variable, but how is timestamp > variable and nick that doesn't contain a string written in SQL?

    Read the article

  • setting an ImageView to invisable inside a custom Adapter

    - by iyad al aqel
    i'm defining my own list adapter and i want an image inside it to be shown OR hidden based on a value what i've noticed that its always invisible or visible disregarding the value Here's my code , this code is inside the getView method singleRow=data.get(position); readit = singleRow.getRead(); Log.i("readit","" + readit ); //NotificationID=singleRow.getId(); holder.title.setText(singleRow.getAttach_title()); holder.date.setText( singleRow.getAttach_created()); holder.dueDate.setVisibility(ImageView.INVISIBLE); holder.course.setText(singleRow.getCourse_title()); if(readit==1) { //holder.read.setImageResource(IGNORE_ITEM_VIEW_TYPE); holder.read.setVisibility(ImageView.INVISIBLE); } else { holder.read.setImageResource(R.drawable.unread); }

    Read the article

  • Webapp: safetly update a shared List/Map in the AppContext

    - by al nik
    I've Lists and Maps in my WebAppContext. Most of the time these are only read by multiple Threads but sometimes there's the need to update or add some data. I'm wondering what's the best way to do this without incurring in a ConcurrentModificationException. I think that using CopyOnWriteArrayList I can achieve what I want in terms of - I do not have to sync on every read operation- I can safety update the list while other threads are reading it. Is this the best solution? What about Maps?

    Read the article

  • Setting up a web developer lab for learning purposes

    - by Saleh Al-Abbas
    I'm not a developer by profession. Therefore, I'm not exposed to real world technical problems that face professional developers. I read/heard about web farms, integration between different systems, load balancing ... etc. Therefore, I was wondering if there are ways for the individual developer to create an environment that simulates real world situations with minimal number of machines like: web farms & caching simulating many users accessing your website (Pressure tests?) Performance load balancing anything you think I should consider. By the way, I have a server machine and 1 PC. and I don't mind investing in tools and software. PS. I'm using Microsoft technologies for development but I hope this is not a limiting factor. Thanks

    Read the article

  • localtime_r supposed to be thread safe, but causing errors in Valgrind DRD

    - by Nik
    I searched google as much as I could but I couldn't find any good answers to this. localtime_r is supposed to be a thread-safe function for getting the system time. However, when checking my application with Valgrind --tool=drd, it consistantly tells me that there is a data race condition on this function. Are the common search results lying to me, or am I just missing something? It doesn't seem efficient to surround each localtime_r call with a mutex, especially if it is supposed to by thread safe in the first place. here is how i'm using it: timeval handlerTime; gettimeofday(&handlerTime,NULL); tm handlerTm; localtime_r(&handlerTime.tv_sec,&handlerTm); Any ideas?

    Read the article

  • unusual ternary operation

    - by nik
    Hi, I was asked to perform this operation of ternary operator use: $test='one'; echo $test == 'one' ? 'one' : $test == 'two' ? 'two' : 'three'; Which prints two (checked using php). I am still not sure about the logic for this. Please, can anybody tell me the logic for this.

    Read the article

  • AJAX Issue, Works in all browsers except IE

    - by Nik
    Alright, this code works in Chrome and FF, but not IE (which is to be expected). Does anyone see anything wrong with this code that would render it useless in IE? var waittime=400; chatmsg = document.getElementById("chatmsg"); room = document.getElementById("roomid").value; sessid = document.getElementById("sessid").value; chatmsg.focus() document.getElementById("chatwindow").innerHTML = "loading..."; document.getElementById("userwindow").innerHTML = "Loading User List..."; var xmlhttp = false; var xmlhttp2 = false; var xmlhttp3 = false; function ajax_read() { if(window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest(); if(xmlhttp.overrideMimeType){ xmlhttp.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState==4) { document.getElementById("chatwindow").innerHTML = xmlhttp.responseText; setTimeout("ajax_read()", waittime); } } xmlhttp.open('GET','methods.php?method=r&room=' + room +'',true); xmlhttp.send(null); } function user_read() { if(window.XMLHttpRequest){ xmlhttp3=new XMLHttpRequest(); if(xmlhttp3.overrideMimeType){ xmlhttp3.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp3=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp3=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp3) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp3.onreadystatechange = function() { if (xmlhttp3.readyState==4) { document.getElementById("userwindow").innerHTML = xmlhttp3.responseText; setTimeout("user_read()", 10000); } } xmlhttp3.open('GET','methods.php?method=u&room=' + room +'',true); xmlhttp3.send(null); } function ajax_write(url){ if(window.XMLHttpRequest){ xmlhttp2=new XMLHttpRequest(); if(xmlhttp2.overrideMimeType){ xmlhttp2.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp2=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp2) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp2.open('GET',url,true); xmlhttp2.send(null); } function submit_msg(){ nick = document.getElementById("chatnick").value; msg = document.getElementById("chatmsg").value; document.getElementById("chatmsg").value = ""; ajax_write("methods.php?method=w&m=" + msg + "&n=" + nick + "&room=" + room + "&sessid=" + sessid + ""); } function keyup(arg1) { if (arg1 == 13) submit_msg(); } var intUpdate = setTimeout("ajax_read()", waittime); var intUpdate = setTimeout("user_read()", 0);

    Read the article

  • acl9 and devise don't seem to work well together

    - by Nik
    I have a user model which is access controlled by ACL9 in userscontroller: ACL9 related stuff before_filter :load_user, :only = [:show] access_control do allow :owner, :of = :user, :to = [:show] end def load_user user = User.find(params[:id]) end in ApplicaitonController I have a rescue_from 'Acl9::AccessDenied', :with = :access_denied def access_denied authenticate_user! # a method from Devise end it is no problem to type in url for sign in page http://localhost:3000/users/sign_in but it is a problem when for example I type in the user page first, which I am to expect to be redirected to sign in page automatically thru the logic above http://localhost:3000/users/1 #= infinite redirect hell. it tries to redirect back to users/1 again(!?) instead of directing to users/sign_in Does anyone have an opinion as to what might be going wrong? Thanks!

    Read the article

  • Cast object to interface when created via reflection

    - by Al
    I'm trying some stuff out in Android and I'm stuck at when trying to cast a class in another .apk to my interface. I have the interface and various classes in other .apks that implement that interface. I find the other classes using PackageManager's query methods and use Application#createPackageContext() to get the classloader for that context. I then load the class, create a new instance and try to cast it to my interface, which I know it definitely implements. When I try to cast, it throws a class cast exception. I tried various things like loading the interface first, using Class#asSubclass, etc, none of which work. Class#getInterfaces() shows the interface is implemented. My code is below: PackageManager pm = getPackageManager(); List<ResolveInfo> lr = pm.queryIntentServices(new Intent("com.example.some.action"), 0); ArrayList<MyInterface> list = new ArrayList<MyInterface>(); for (ResolveInfo r : lr) { try { Context c = getApplication().createPackageContext(r.serviceInfo.packageName, Context.CONTEXT_IGNORE_SECURITY | Context.CONTEXT_INCLUDE_CODE); ClassLoader cl = c.getClassLoader(); String className = r.serviceInfo.name; if (className != null) { try { Class<?> cls = cl.loadClass(className); Object o = cls.newInstance(); if (o instanceof MyInterface) { //fails list.add((MyInterface) o); } } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } // some exceptions removed for readability } } catch (NameNotFoundException e1) { e1.printStackTrace(); }

    Read the article

  • White dialog theme

    - by Al
    I've noticed some apps have a dialog with white background, including along the title border, as opposed to the default black. I know how to make the background white but the whiteness doesn't extend to the dialog's title border. This image: http://localhostr.com/files/25bb19/tether.png is an example of how I want the dialog to look. Anyone know I can do this? I mainly use AlertDialog.Builder to make my dialogs so ideally something I can easily to that.

    Read the article

  • RECOVER A DELETED FILE WWW in ubuntu 9.04

    - by Al MUbarak
    Hai., i'm using unbuntu 9.04 and i had all web developing dump has been installed in www folder., today morning unfortunately i delete the www folder via terminal. but i'm afraid about that issue., i dont have any knowledge for how to restore the www folder and included files asap. IF anyone Could known the issue and how to rectify that issue., pls let me know., Thnaks in Advance.,

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >