Search Results

Search found 6928 results on 278 pages for 'calling'.

Page 101/278 | < Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >

  • PHP - Problem using file_get_contents

    - by shyam
    I have a problem while using the file_get_contents function. I am using it to get a response from a different web server, but it's not returning anything (shown as empty string using var_dump). Also, the problem is only while calling this specific server, because I got result when I used Google's address; and it's working fine in my local machine. I've tried cUrl too - but same result.

    Read the article

  • synchronously load html content in UIWebView

    - by mbg1987
    im using a UIWebView to show html content in my app, the app contains two arrows to navigate between topics just like a RSS reader app, but when the user hits up or down arrow, the next topic doesn't show up until the data come back and the user still able to interact with the UI which is a bit confusing, My question: how to block the UI when user moves to the next/back topic ? in other words how to make loadHTMLString:baseURL: works as a synchronous calling ? thanks !

    Read the article

  • Is it possible to restart the phone with Android SDK or NDK?

    - by J Andy
    Is it possible to programmatically restart the phone from a application (service) running on top of the Dalvik VM? If the SDK does not provide this functionality, then how about using the NDK and calling some functions provided by the kernel? I know this option is not preferred (not stable enough libs), but if it's the only option, I'll have to consider that as well.

    Read the article

  • In C# ,how do I terminate a thread that has had its call stack corrupted?

    - by Emil D
    I have a thread in my application that is running code that can potentially cause call stack corruption ( my application is a testing tool for dlls ). Assuming that I have a method of detecting if the child thread is misbehaving, how would I terminate it? From what I read, calling Thread.Abort() on the misbehaving thread would be equivalent to raising an exception inside it.I fear that that not be a good idea, provided the call stack of the thread might be corrupted.Any suggestions?

    Read the article

  • Ruby Dir.glob works on laptop not on desktop?

    - by Nick Faraday
    I have a ruby shell script that works perfectly on my laptop, but Dir.glob doesn't seem to work when I try and run it on my desktop. Here is the code: sFileTemplate = File.join("**", sResolutions, "**", "*."+sType) sFiles = Dir.glob(sFileTemplate) Both machines run OSX 10.5 and are running ruby -v 1.9.1. Am I calling glob wrong? Thanks

    Read the article

  • Given an array of arguments, how do I send those arguments to a particular function in Ruby?

    - by Steven Xu
    Forgive the beginner question, but say I have an array: a = [1,2,3] And a function somewhere; let's say it's an instance function: class Ilike def turtles(*args) puts args.inspect end end How do I invoke Ilike.turtles with a as if I were calling (Ilike.new).turtles(1,2,3). I'm familiar with send, but this doesn't seem to translate an array into an argument list. A parallel of what I'm looking for is the Javascript apply, which is equivalent to call but converts the array into an argument list.

    Read the article

  • Can you call FB.login inside a callback from other FB methods (like FB.getLoginStatus) without triggering popup blockers?

    - by Erik Kallevig
    I'm trying to set up a pretty basic authentication logic flow with the FB JavaScript SDK to check a user's logged-in status and permissions before performing an action (and prompting the user to login with permissions if they are not)... User types a message into a textarea on my site to post to their Facebook feed and click's a 'post to facebook' button on my site. In response to the click, I check user's logged in status with FB.getLoginStatus In the callback to FB.getLoginStatus, if user is not logged in, prompt them to login (FB.login). In the callback to FB.login I then need to make sure they have the right permissions so I make a call to FB.api('/me/permissions') -- if they don't , I again prompt them to login (FB.login) The problem I'm running into is that anytime I try to call FB.login inside a callback to other FB methods, the browser seems to lose track of the origin of execution (the click) and thus will block the popup. I'm wondering if I'm missing some way to prompt the user to login after checking their status without the browser mistakenly thinking that it's not a user-initiated popup? I've currently fallen back to just calling FB.login() first regardless. The undesired side effect of this approach, however, is that if the user is already logged-in with permissions and I'm still calling FB.login, the auth popup will open and close immediately before continuing, which looks rather buggy despite being functional. It seems like checking a user's login status and permissions before doing something would be a common flow so I feel like I'm missing something. Here's some example code. <div onclick="onClickPostBtn()">Post to Facebook</div> <script> // Callback to click on Post button. function onClickPostBtn() { // Check if logged in, prompt to do so if not. FB.getLoginStatus(function(response) { if (response.status === 'connected') { checkPermissions(response.authResponse.accessToken); } else { FB.login(function(){}, {scope: 'publish_stream'}) } }); } // Logged in, check permissions. function checkPermissions(accessToken) { FB.api('/me/permissions', {'access_token': accessToken}, function(response){ // Logged in and authorized for this site. if (response.data && response.data.length) { // Parse response object to check for permission here... if (hasPermission) { // Logged in with permission, perform some action. } else { // Logged in without proper permission, request login with permissions. FB.login(function(){}, {scope: 'publish_stream'}) } // Logged in to FB but not authorized for this site. } else { FB.login(function(){}, {scope: 'publish_stream'}) } } ); } </script>

    Read the article

  • c++, when do you need/have to pass data as (*&)

    - by ra170
    I came across people passing data objects as: declaration: DataObject * data = 0; calling it as: SomeMethod( data ); definition of Somethod: void SomeMethod(SomeObject * & object) My obvious question is, when and why do you have to do this (& *)? Is it passing the pointer as reference?

    Read the article

  • Is this correct about ajax POST?

    - by Tommy
    Could you confirm I understand this correctly. Using POST, the file specified in xmlhttp.open("GET","ajax_test.asp",true); will not be cached (sent to \Temporary Internet Files) ? It will stay on the server only? If this is true, is the updated html file after calling ajax POST, being updated in the \Temporary Internet Files ? Am I missing any other important information of this mechanism? Thank You.

    Read the article

  • Logger.setLevel() doesn't enable logging correctly

    - by ripper234
    Situation: I have this log4j logger: private static final Logger logger = Logger.getLogger(ThisClassName.class); And am trying to set it programatically through: Logger.getLogger(ThisClassName.class).setLevel(Level.DEBUG); Still, DEBUG level prints are swalloed (while INFO prints are printed successfully). Even this bit has no effect: Logger.getRootLogger().setLevel(Level.DEBUG); Calling logger.debug("foo") reaches Category.forcedLog() and ConsoleAppender.doAppend(), and then fails (quits) at: if(!isAsSevereAsThreshold(event.getLevel())) Any idea why this is happening?

    Read the article

  • why we can't initialize a servlet using constructor itself?

    - by Reddy
    Why do we have to override init() method in Servlets while we can do the initialization in the constructor and have web container call the constructor passing ServletConfig reference to servlet while calling constructor? Ofcourse container has to use reflection for this but container has to use reflection anyway to call a simple no-arg constructor

    Read the article

  • failed to load external entity error on SOAP

    - by hd
    i am call a web service which is locate on https protocol. and i get "failed to load external entity" error while calling it. as i search on google it is because in PHP5, SOAP class will not parse WSDL file located on a secure HTTPS connection. what is the solution? i don't want to use http instead of https.

    Read the article

  • Async webmethod without timeout

    - by phenevo
    Hi, I need a console app which will calling webmethod. It must be asynchronous and without timeout (we don't know how much time takes this method to deal with task. Is it good way: [WebMethod] [SoapDocumentMethod(OneWay = true)] ??

    Read the article

  • PHP alias @ function

    - by SyaZ
    I'm new to PHP and I'm confused seeing some examples calling a function with a @ prefix like @mysql_ping(). What is it for? Googling / searching is not much of a help since @ gets discarded and 'alias' is not good enough keyword.

    Read the article

  • Dojo treemodel- adding large number of items

    - by Ashley
    I am trying to add a large number of items (100+) to my tree via ForestStoreModel by calling newItem in a loop. This seems to be quite slow and locks up the browser. Is there any way I can do something similar to grid's beginUpdate & endUpdate? I want to basically 'turn off' my tree, add 100 items in a batch, then 'turn on' my tree. Any ideas? Thanks!

    Read the article

  • wxWidgets: Show a window that was marked hidden in the XRC

    - by jdwieber
    I'm new to wxWidgets and DialogBlocks. I have a form that is created using DialogBlocks and saved as an XRC file. Part of the form has a vertical wxStaticBoxSizer into which is placed two wxScrolledWindow elements. I want to only show one at a time based on what data is to be shown to the user, so I have one marked hidden and left the other one visible. In code (C++), when I try to switch the display and show the widget that was hidden in the XRC and hide the one that was not, the one that I hide goes away fine, but the one that I want to show is not visible. If I resize the window however, it appears. Once it has appeard then I can switch back and forth with no issues. I tried many combinations of showing, enabling, invalidating, getting the sizer and calling RecalcSizes, refresh, layout, and some others. I tried them in different combinations too. Simply calling Show will allow me to toggle between the two, but only after I switch to the one that does not show initially and resize the window. From what I see in the docs. the issue is that wxSizer doesn't allocate space for hidden windows, but there is a flag that can be set to override that behavor. My problem is that DialogBlocks does not expose that feature, so if I manually edit the XRC file the modifation will be lost when I, or one of the other devs. saves some changes. Is ther a sequence of calls that I can make to tell the sizer to allocate space? The default OnResize handler does something to cause the sizer to allocate space, but I don't know what that is, or how to do it. This is the flag I found in the docs: wxRESERVE_SPACE_EVEN_IF_HIDDEN Normally wxSizers don't allocate space for hidden windows or other items. This flag overrides this behavior so that sufficient space is allocated for the window even if it isn't visible. This makes it possible to dynamically show and hide controls without resizing parent dialog, for example. This function is new since wxWidgets version 2.8.8 Thanks in advance.

    Read the article

  • android activity callback

    - by sanju
    Hii'm begginer in android. i'm doing small apllication,i have mainscreen and calling next screen by main screen.in nextscreen by selecting image in gallery i wanted to go back main screen by getting image url how can do this please help me its urgent.

    Read the article

  • call_user_function_array() and __construct

    - by John
    I'm working on a simple framework, and I'm having a slight problem. I'd like to use call_user_function_array() to pass parameters to a function. That's fine, except the function I want to pass it to is __construct. I can't create an instance of an object with cufa(), and by instantiating an object, and then using cufa to call that instance's __construct(), I run into problems with a broken class because I'm calling the constructor twice (and one time it's called wrong.)

    Read the article

  • map view is struck in android

    - by Aswan
    Hi folks, i am developing android applicaiton disply user overlays on map.user values getting from webservices for disply overlays.when i tap on map and move it is calling draw method and connecting to webservices while connecting webservice and getting data my apps is struck show force close error .how can i resolve this problem

    Read the article

  • How do I call a non-public method of a public class in Clojure?

    - by sramsay
    I'm calling the twitter4j library using Clojure like so: (def twitter (. (TwitterFactory.) getInstance)) This works fine when I call it as a script. But when I use gen-class, I get: java.lang.IllegalArgumentException: Can't call public method of non-public class: public java.lang.Object twitter4j.TwitterFactoryBase.getInstance() Is there a workaround for this?

    Read the article

  • firebug and _moz_dirty

    - by shivesh
    I am developing Javascript app that will wrap every line of text entered inside iframe (designmode) with P (or div) like it happens by default in IE. For now I am not pasting my code because I just started, the first problem is when i type some text in firefox and even before I click enter or calling any function firebug inserts <br _moz_dirty=""> under the entered text. Why? How can I prevent it? If you still need my code please tell.

    Read the article

  • Python and MySQL

    - by omfgroflmao
    Is there an easy way (without downloading any plugins) to connect to a MySQL database in Python? Also, what would be the difference from calling a PHP script to retrieve the data from the database and hand it over to Python and importing one of these third-parties plugins that requires some additional software in the server.

    Read the article

< Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >