Search Results

Search found 23968 results on 959 pages for 'tail call'.

Page 15/959 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Getting browser to make an AJAX call ASAP, while page is still loading

    - by Chris
    I'm looking for tips on how to get the browser to kick off an AJAX call as soon as possible into processing a web page, ideally before the page is fully downloaded. Here's my approximate motivation: I have a web page that takes, say, 5 seconds to load. It calls a web service that takes, say, 10 seconds to load. If loading the page and calling the web service happened sequentially, the user would have to wait 15 seconds to see all the information. However, if I can get the web service call started before the 5 second page load is complete, then at least some of the work can happened in parallel. Ideally I'd like as much of the work to happen in parallel as possible. My initial theory was that I should place the AJAX-calling javascript as high up as possible in the web page HTML source (being mindful of putting it after the jquery.js include, because I'm making the call using jquery ajax). I'm also being mindful not to wrap the AJAX call in a jquery ready event handler. (I mention this because ready events are popular in a lot of jquery example code.) However, the AJAX call still doesn't seem to get kicked off as early as I'm hoping (at least as judged by the Google Chrome "Timeline" feature), so I'm wondering what other considerations apply. One thing that might potentially be detrimental is that the AJAX call is back to the same web server that's serving the original web page, so I might be in danger of hitting a browser limit on the # of HTTP connections back to that one machine? (The HTML page loads a number of images, css files, etc..)

    Read the article

  • jQuery ajax call doesn't seem to do anything at all

    - by icemanind
    I am having a problem with making an ajax call in jQuery. Having done this a million times, I know I am missing something really silly here. Here is my javascript code for making the ajax call: function editEmployee(id) { $('#<%= imgNewEmployeeWait.ClientID %>').hide(); $('#divAddNewEmployeeDialog input[type=text]').val(''); $('#divAddNewEmployeeDialog select option:first-child').attr("selected", "selected"); $('#divAddNewEmployeeDialog').dialog('open'); $('#createEditEmployeeId').text(id); var inputEmp = {}; inputEmp.id = id; var jsonInputEmp = JSON.stringify(inputEmp); debugger; alert('Before Ajax Call!'); $.ajax({ type: "POST", url: "Configuration.aspx/GetEmployee", data: jsonInputEmp, contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { alert('success'); }, error: function (msg) { alert('failure'); } }); } Here is my CS code that is trying to be called: [WebMethod] public static string GetEmployee(int id) { var employee = new Employee(id); return Newtonsoft.Json.JsonConvert.SerializeObject(employee, Newtonsoft.Json.Formatting.Indented); } When I try to run this, I do get the alert that says Before Ajax Call!. However, I never get an alert back that says success or an alert that says failure. I did go into my CS code and put a breakpoint on the GetEmployee method. The breakpoint did hit, so I know jQuery is successfully calling the method. I stepped through the method and it executed just fine with no errors. I can only assume the error is happening when the jQuery ajax call is returning from the call. Also, I looked in my event logs just to make sure there wasn't an ASPX error occurring. There is no error in the logs. I also looked at the console. There are no script errors. Anyone have any ideas what I am missing here? `

    Read the article

  • JDBC call not executing

    - by dbyrne
    I am working on one of the DAOs for a medium sized web application. Unfortunately, it contains very convoluted logic, and makes hundreds of JDBC stored proc calls in loops. This is out of my control. I am working on a method inside the DAO which makes a single JDBC call. The simplified version of what this method looks like is this: DriverManager.registerDriver(new com.sybase.jdbc2.jdbc.SybDriver()); Connection con = DriverManager.getConnection((String)connectionDetails.get("DATABASE_URL") (String)connectionDetails.get("USERID"), (String)connectionDetails.get("PASSWORD")); String sqlToExecute = "{call " + STORED_PROC + "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"; CallableStatement stmt = con.prepareCall(sqlToExecute); //Maybe I should try calling clearParameters here? stmt.setString(1,someData); //....Set of parameters.... if (!stmt.execute()) { //execute method never returns false } stmt.close(); Its pretty much a textbook JDBC call. All this stored proc does is insert a single row. Here is where things get crazy: This code works when you run it through a debugger line by line, but fails when you run it "full speed". Not only does it fail, but it doesn't throw any exception! The execute method always returns true. It just breezes right through the JDBC call without inserting a row to the database. If you go through the log files, copy the stored proc call and run it manually, it works (just like it does in debug mode). Whats strange is that the rest of the DAO, with all its hundreds of looped stored proc calls, works fine. My thinking is that Connection or CallableStatement is caching some value behind the scenes that is screwing things up. Has anyone ever seen anything like this before? A JDBC call failing with no exceptions? I know it will be impossible to provide a complete solution to this without seeing the whole application, I am just looking for suggestions on possible issues to investigate.

    Read the article

  • adding a token onto a webservice or wcf call

    - by duncanUK
    I have an httphandler which I am using to log the http soap request and response for each webservice that is called from my application as a comms log. i would like to inject a token ont he 1st call (possibly the 1st call to invoke the service that is being logged) and then be able to track all subsequent webservice calls run in the same context with this token so i can tie the subsequent calls back up to the original call. so for example. main webservice -> 2nd web service -> another web service [token] [token] [token] -> nth web service [token] I would like to inject the token on the first call to the main webservice (http handler checks if no token, add it), I would like to use the same http handler to intercept each call to the subsequent webservices and pass on the token if it exists already (the job of the httphandler is to log the in/out soap with the token to reference with. I have managed to inject the first token, but my problem is how do I add the token on the subsequent calls.. can I make it stick on the same context or session? My worry is that when we call a new webservice, we create a whole new proxy/http request which will not inhrit the token... or will it?! Ideally I would like it to persist on the http header as I am setting the token as a header at the moment? has anyone got any ideas or a better way of doing this? I would be most greatful for you comments!

    Read the article

  • Question about CALL statement

    - by Bruce
    I have the following code in VC++ Func5(){ StackWalk(); } Func4{ Func5();} I am a Beginner in x86 Assembly Language. I am trying to find out the starting address of Func5(). I get the Func5()'s return address from its stack frame. Now before this return address there should be a CALL statement. So I extract out the bytes before the return address. Sometimes it's a near call like E8 ff ff ff d8. So for this statement I subtract the offset 0x28 from the function's return address to get Func5()'s base address (where it resides in memory). The problem is I don't know how to calculate this for a indirect NEAR call. I have been trying to find out how to do it for some time now. So I have extracted out the first 5 bytes before the return address and they are ff 75 08 ff d2 I think this stands for CALL ECX (ff d2) but I am not sure. I will be very grateful if someone can tell me what kind of CALL statement this is and how I can calculate the function's base address from this kind of call.

    Read the article

  • Interrupted system call during "hg convert"

    - by Aaron Digulla
    When I run "hg convert" to convert a Subversion repository to Mercurial, I get this error: fetching revision log for "/trunk" from 1538 to 0 run hg sink post-conversion action Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 46, in _runcatch return _dispatch(ui, args) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 454, in _dispatch return runcommand(lui, repo, cmd, fullargs, ui, options, d) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 324, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 505, in _runcommand return checkargs() File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 459, in checkargs return cmdfunc() File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 453, in <lambda> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 386, in check return func(*args, **kwargs) File "/usr/lib/pymodules/python2.6/hgext/convert/__init__.py", line 229, in convert return convcmd.convert(ui, src, dest, revmapfile, **opts) File "/usr/lib/pymodules/python2.6/hgext/convert/convcmd.py", line 398, in convert c.convert(sortmode) File "/usr/lib/pymodules/python2.6/hgext/convert/convcmd.py", line 312, in convert parents = self.walktree(heads) File "/usr/lib/pymodules/python2.6/hgext/convert/convcmd.py", line 109, in walktree commit = self.cachecommit(n) File "/usr/lib/pymodules/python2.6/hgext/convert/convcmd.py", line 267, in cachecommit commit = self.source.getcommit(rev) File "/usr/lib/pymodules/python2.6/hgext/convert/subversion.py", line 433, in getcommit self._fetch_revisions(revnum, stop) File "/usr/lib/pymodules/python2.6/hgext/convert/subversion.py", line 814, in _fetch_revisions for entry in stream: File "/usr/lib/pymodules/python2.6/hgext/convert/subversion.py", line 122, in __iter__ entry = pickle.load(self._stdout) IOError: [Errno 4] Interrupted system call abort: Interrupted system call Apparently, it is possible to restart a read on EINTR but how would I do that with pickle.load()? Also I wonder where that signal comes from? I suspect it's SIGCHILD but shouldn't popen() handle that?

    Read the article

  • Determine which user initiated call in Asterisk

    - by adaptive
    I had the following code in my extensions.conf file: [local] exten => _NXXNXXXXXX,1,Set(CALLERID(name)=${OUTGOING_NAME}) exten => _NXXNXXXXXX,n,Set(CALLERID(num)=${OUTGOING_NUMBER}) Now I want to change this code to set the CallerID and number based on the user/extension that is making the call. In fact I have four(4) users/extensions in my sip.conf and only one of them (the one I use for business) is supposed to send a different caller id/number. Everything is in the same context (for simplicity) since all lines need to be able to pick up an incoming call. The only difference is when line1 needs to make a call, it has to send a different caller id/number and use a different provider. This is what I have so far: [local] exten => _NXXNXXXXXX,1,Set(line=${SIP_HEADER(From)}) exten => _NXXNXXXXXX,n,Verbose(line variable is <${line}>) exten => _NXXNXXXXXX,n,Set(CALLERID(name)=${IF($[ ${line} = line1 ]?${COMPANY_NAME}:${FAMILY_NAME})}) exten => _NXXNXXXXXX,n,Set(CALLERID(num)=${IF($[ ${line} = line1 ]?${COMPANY_NUMBER}:${FAMILY_NUMBER})}) exten => _NXXNXXXXXX,n,Dial(${IF($[ ${line} = line1]?SIP/${EXTEN}@${COMPANY_PROVIDER}:SIP/${EXTEN}@${FAMILY_PROVIDER})}) I really don't know if this is correct and I'm afraid to commit these changes to my extensions.conf before validating. Any help will be greatly appreciated.

    Read the article

  • Make call with alternate provider if NOANSWER

    - by adaptive
    I have two voip providers, one free an the other paid. The free provider only allows local calls to certain area codes, so I need to fall back to the the paid provider if a call fails. At the moment, I have the following context in my extensions.conf file: [globals] ; freephoneline.ca PRIMARY_PROVIDER=fpl ; voip.ms SECONDARY_PROVIDER=voipms [local] exten => _NXXNXXXXXX,1,Set(CALLERID(name)=${OUTGOING_NAME}) exten => _NXXNXXXXXX,n,Dial(SIP/${EXTEN}@${PRIMARY_PROVIDER}) exten => _NXXNXXXXXX,n,Set(CALLERID(num)=${OUTGOING_NUMBER}) exten => _NXXNXXXXXX,n,Dial(SIP/1${EXTEN}@${SECONDARY_PROVIDER}) exten => _NXXNXXXXXX,n,Hangup() I checked the logs and noticed that the free provider responds with NOANSWER if a call is not allowed (Even though it plays a message). What I want is to: Try calling the ${PRIMARY_PROVIDER} first. If NOANSWER is returned by provider (not that the callee did not answer), then call with ${SECONDARY_PROVIDER} How can I modify my dial plan to get the desired results? EDIT : The primary provider is freephoneline.ca, and I'm using asterisk v1.8.2.3-2

    Read the article

  • Kernel panic when altering system_call in entry.S

    - by EpsilonVector
    I'm trying to implement a system call counter, and as a result I included an int value in task_struct, and a function that increments it in a separate file. This function is supposed to be called from system_call right before it actually calls the required sys_call (I have my reasons to call it before and not after). However, if I place it before the sys_call then after compiling and booting there's a kernel panic ("tried to kill init_idle"), and if I place it right after the sys_call, it works. What's the difference and how do I overcome this? Here's the relevant code ENTRY(system_call) pushl %eax # save orig_eax SAVE_ALL GET_CURRENT(%ebx) testb $0x02,tsk_ptrace(%ebx) # PT_TRACESYS jne tracesys cmpl $(NR_syscalls),%eax jae badsys call update_counter /*This causes a kernel panic*/ call *SYMBOL_NAME(sys_call_table)(,%eax,4) movl %eax,EAX(%esp) # save the return value

    Read the article

  • How to calculate unbound column value based on value of bound colum in DatagGridView?

    - by Wodzu
    Hi. I have few columns in my DataGridView, one of them is an unbound column and the DataGridVIew is in VirtualMode. When CellValueNeeded event is called, I want to calculate value of Cells[0] basing on the value of Cells[2] which is in bounded column to the underlaying DataSource. This is how I try to do this: private void dgvItems_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { e.Value = dgvItems.CurrentRow.Cells[2].Value * 5; //simplified example } However, I am getting System.StackOverflowException because it seams that call to dgvItems.CurrentRow.Cells[2].Value results in call to another CellValueNeeded event. And so on and so on... However Cells[2] is not an unbound column, so on common sense it should not result in recursive call unless getting value of any column(bound or unbound) firest that event... I can not use here SQL Expression and I can not precalculate e.Value in any SQL call. In real example Cells[2].Value is a key used in HashTable which will return a correct value for the Cells[0] (e.Value). What can I do?

    Read the article

  • how to save current state of application

    - by medma
    hi, I am making an iphone application in which after login we will go through some steps and then finally we make a call from within the app. As we know on making call our app quits so plz suggest me how to resume that state on relaunching the app? 1-login 2-some steps 3-list of numbers 4-call Any help will be appreciated. Thanx..

    Read the article

  • SFML: Monster following player on a straight line

    - by user3504658
    I've searched for this and found a few topics , usually they used a function normalize and using simple vector subtracting which is ok , but how should I do it in sfml ? Instead of using: Movement = p.position() - m.position(); p is the player and m is the monster I used something like this to move on a straight line: sf::Vector2f Tail(0,0); if((mPlayer.getPosition().y - mMonster.GetInstance().getPosition().y) >= (mPlayer.getPosition().x - mMonster.GetInstance().getPosition().x)){ //sf::Vector2f Tail(0,0); Tail.x = mPlayer.getPosition().x - mMonster.GetInstance().getPosition().x; } else if((mPlayer.getPosition().y - mMonster.GetInstance().getPosition().y) <= (mPlayer.getPosition().x - mMonster.GetInstance().getPosition().x)){ //sf::Vector2f Tail(0,0); Tail.y = mPlayer.getPosition().y - mMonster.GetInstance().getPosition().y; } if(!MonsterCollosion()) mMonster.Move(Tail * (TimePerFrame.asSeconds() * 1/2 ) ); It works ok if the the height = the width for the game window, although I think it's not the best looking game when it comes to a moving monster, since it starts fast and then it gets slower so what do you guys advise me to do ?

    Read the article

  • maemo - n900 - SIP call quality

    - by Walter White
    Hi all, I have been using SIP / VoIP on my n900 to make calls and my problem is after about 15 minutes of talk time, more recently 18 minutes exactly, my connection dies and I can no longer hear them or them me. I have tested this with various VoIP providers to confirm that it is not specific to any one provider, but instead my phone. I also have tested this on my laptop. I sent my phone to be tested at some place that tests hardware and no problems were found with the hardware. What can I do to rectify the 15 minute call barrier with SIP on my phone? The other problem I have too is that for the wireless broadband to start working again, I need to restart the phone, it appears the network driver gets overloaded. The one thing that appears to work fine is making cellular calls. I have yet to have call quality drop off after 15 minutes over a cellular connection. Thanks, Walter

    Read the article

  • Call issue with Freeswitch

    - by gbraad
    I am testing the following with Freeswitch and different devices (nokia n900, nokia e60, ekiga) and have similar results between them. On the Freeswitch server (1.0.4 in multi-tenant mode) I have several user profiles for a domain, e.g. 1000, 1001 for host.com The user are authenticated correctly and calls can be placede. When I place a call from a device registered as [email protected] to [email protected] it will show up at the other end (1002) as [email protected] I would expect this call to show up as [email protected]. The IP address is the one of from the Freeswitch server. Because of this, the calls are no correctly recognized by the address book on certain devices. Can the he domain FQDN of the callers domain/acount be used, instead of the IP address of the server in the SIP uri?

    Read the article

  • asterisk send mute command to jukebox on incoming call

    - by Jona
    Hi, We're trialling a Asterisk Now server to take over from our ageing PBX system. One of the "nice to have" features would be the ability to pause or lower the volume on the office jukebox if an incoming call is detected. We currently run a linux jukebox which plays music out of the speakers using mpd and can be controlled by the mpc client. We can manually issue the following command to achieve this: mpc volume 20 Does anyone know how to get asterisk to execute this command or some action that we could hook into when a phone call is incoming to specific extensions?

    Read the article

  • libvirt + ESX (HTTP response code 400 for call to 'Login')

    - by Coops
    I'm trying to connect to a vSphere cluster using the information from the libvirt documentation. $ virsh -c "vpx://[email protected]/dc1/dc1-cluster-e01/dc1-vsphere-e04/?no_verify=1" Enter root's password for 10.51.4.11: error: internal error HTTP response code 400 for call to 'Login' error: failed to connect to the hypervisor I seem to be able to establish a connection, but it fails with a "HTTP code 400". If I provide the incorrect password it fails with a 'login credentials' error, so it looks like I am getting a connection, but it's failing for another reason. Wireshark is no help as it's all done over SSL/TLS. Any thoughts folks? UPDATE: 15:21 28/02/11 FYI - I'm running libvirt-0.8.3 (the Ubuntu package recompiled with the ESX flag enabled). When I put virsh into debug mode it returns this: [snip] Enter root's password for 10.51.4.11: 15:19:09.011: debug : do_open:1249 : driver 3 ESX returned ERROR 15:19:09.011: debug : virUnrefConnect:294 : unref connection 0x98aa8f8 1 15:19:09.011: debug : virReleaseConnect:249 : release connection 0x98aa8f8 error: internal error HTTP response code 400 for call to 'Login' error: failed to connect to the hypervisor

    Read the article

  • Search for specific call in asterisk log files

    - by chiborg
    In my Asterisk log file, I have a line like this (truncated): Executing [123@mycontext:1] Set("SIP/myhost-b7111840", "__INCOMINGCLI=4711") Now I want to do the following filtering while looking at the log file with tail -f: Match lines with a specific value for "INCOMINGCLI", storing the call ID (the "SIP/myhost-b7111840" part) Output all subsequent lines that contain the call ID. As a bonus, having a grep-like option like -A would be nice. I could do that easily in various programming languages, but how would I do it with standard UNIX commands like sed or awk? Can it be done with these commands?

    Read the article

  • jQuery WCF Service MVC2 VS2010 .NET 4.0 call with parameters fails

    - by AUSTX_RJL
    In Visual Studio 2010 I created a new Ajax enabled WCF Service [ServiceContract(Namespace = "TestWCFAjax.Bridge")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class Bridge { [OperationContract] public string DoWork() { return "jQuery WCF call without parameters from MVC2 works." ; } [OperationContract] public string DoWork1(string parm) { return parm + " jQuery WCF call with parameters from MVC2 fails"; } In the Home Controllers Index.aspx view I add the jQuery: function CallWebMethod() { $.ajax( { type: "POST", contentType: "application/json; charset-utf-8", url: "http://localhost:1452/Bridge.svc/DoWork1", dataType: "json", data: '{"parm":"test"}', error: jqueryError, success: function (msg) { alert("back"); var divForResult = document.getElementById("test"); divForResult.innerHTML = "Result: <b>" + msg.d + "</b>"; } }) } function jqueryError(request, status, error) { alert(request.responseText + " " + status + " " + error); } (using the built-in Web Server in VS 2010) When I call DoWork, it works fine. When I call DoWork1 it always returns "error undefined" and the WCF call never happens. I've tried every combination of: [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] I can think of and it does not help. I must be missing something simple. There are MANY posting about how to make this work, and other than the "no parameter" version, none have worked for me. Can anyone post a sample MVC2 jQuery 1.4 .NET 4.0 WCF VS2010 working sample or spot the likely error? Thanks.

    Read the article

  • ajax call through cas

    - by manu1001
    I need to write a google gadget that reads feeds from google groups. Trouble is I'm making an ajax call to retrieve the feeds and our google apps domain is protected by CAS (central authentication service). So, I'm getting a 400 bad request on making the call. I suspect that the browser is not sending the cookie when making ajax call. How do I ensure that the cookie is also sent with the ajax call? OR if that's not supposed to be the problem, what do i need to do?

    Read the article

  • How do I call a super class method

    - by KandadaBoggu
    I have two classes A, and B. Class B overrides the foo method of class A. Class B has a bar method where I want to call the foo method of the super class. What is the syntax for such a call? class A def foo "hello" end end class B def foo super + " world" end def bar # how to call the `foo` method of the super class? # something similar to super.foo end end

    Read the article

  • Why is UIApplicationWillChangeStatusBarFrameNotification not sent when the in-call status bar is sho

    - by Sbrocket
    I've been trying to listen for changes in the status bar height – such as when the in-call status bar is shown or hidden – by listening for the UIApplicationWillChangeStatusBarFrameNotification notification to be sent. Fairly straightforward code here... [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statusBarWillChangeFrame:) name:UIApplicationWillChangeStatusBarFrameNotification object:nil]; But the notification never seems to be sent in that case, either on the Simulator by using the "Toggle In-Call Status Bar" option or on the device when a call ends with the application open. In addition, the similar UIApplicationDelegate method is not called. According to the documentation, UIApplicationWillChangeStatusBarFrameNotification Posted when the application is about to change the frame of the status bar. The userInfo dictionary contains an NSValue object that encapsulates a CGRect structure expressing the location and size of the new status bar frame. Use UIApplicationStatusBarFrameUserInfoKey to access this value. Can anyone explain why this notification is not being sent in response to the in-call status bar being shown or hidden? According to the documentation, it should be.

    Read the article

  • Global "ajax call" notification with asp.net mvc/jquery

    - by Joel Martinez
    I need to be notified any time a largeish asp.net mvc web application makes an ajax call to the server. We're using both jquery, and the built-in Ajax.* methods to do the remote calls, and I would like a global way of knowing when we make a call without having to manually inject some sort of "IsMakingCall" method to every request. The root problem we're trying to solve is session timeout. If the user leaves a page up and goes to lunch (for example), they get errors when they get back because the ajax call is returning the login page instead of the expected json or partial html result. My idea was to have a js timer which would be reset any time we make an ajax call. That way, if the timer runs out (ie. their session has now timed out) I can just auto-log them out. This is how sites like bank of america and mint.com work. Thanks!

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >