Search Results

Search found 24900 results on 996 pages for 'call me steve'.

Page 24/996 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • NHibernate Session per Call in WCF - How to Rollback

    - by Corey Coogan
    I've implemented some components to use WCF with both an IoC Container (StructureMap) and the Session per Call pattern. The NHibernate stuff is most taken from here: http://realfiction.net/Content/Entry/133. It seems to be OK, but I want to open a transaction with each call and commit at the end, rather than just Flush() which how its being done in the article. Here's where I am running into some problems and could use some advice. I haven't figured out a good way to rollback. I realize I can check the CommunicationState and if there's an exception, rollback, like so: public void Detach(InstanceContext owner) { if (Session != null) { try { if(owner.State == CommunicationState.Faulted) RollbackTransaction(); else CommitTransaction(); } finally { Session.Dispose(); } } } void CommitTransaction() { if(Session.Transaction != null && Session.Transaction.IsActive) Session.Transaction.Commit(); } void RollbackTransaction() { if (Session.Transaction != null && Session.Transaction.IsActive) Session.Transaction.Rollback(); } However, I almost never return a faulted state from a service call. I would typically handle the exception and return an appropriate indicator on my response object and rollback the transaction myself. The only way I can think of handling this would be to inject not only repositories into my WCF services, but also an ISession so I can rollback and handle the way I want. That doesn't sit well with me and seems kind of leaky. Anyone else handling the same problem?

    Read the article

  • JAXB does not call setter when unmarshalling objects

    - by Yaneeve
    Hi all, I am using JAXB 2.0 JDK 6 in order to unmarshall an XML instance into POJOs. In order to add some custom validation I have inserted a validation call into the setter of a property, yet despite it being private, it seems that the unmarshaller does not call the setter but directly modifies the private field. It is crucial to me that the custom validation occurs for this specific field every unmarshall call. What should I do? Code: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LegalParams", propOrder = { "value" }) public class LegalParams { private static final Logger LOG = Logger.getLogger(LegalParams.class); @XmlTransient private LegalParamsValidator legalParamValidator; public LegalParams() { try { WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext(); LegalParamsFactory legalParamsFactory = (LegalParamsFactory) webApplicationContext.getBean("legalParamsFactory"); HttpSession httpSession = SessionHolder.getInstance().get(); legalParamValidator = legalParamsFactory.newLegalParamsValidator(httpSession); } catch (LegalParamsException lpe) { LOG.warn("Validator related error occurred while attempting to construct a new instance of LegalParams"); throw new IllegalStateException("LegalParams creation failure", lpe); } catch (Exception e) { LOG.warn("Spring related error occurred while attempting to construct a new instance of LegalParams"); throw new IllegalStateException("LegalParams creation failure", e); } } @XmlValue private String value; /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * @throws TestCaseValidationException * */ public void setValue(String value) throws TestCaseValidationException { legalParamValidator.assertValid(value); this.value = value; } }

    Read the article

  • Browser freeze while ajax call in action

    - by kaivalya
    I have a ASP.NET Web App. I notice that while a simple ajax call(see below) is in process, web application does not respond to any action that I try on a different browser. $.ajax({ type: "GET", async: true, url: "someurl", dataType: "text", cache: false, success: function(msg){ CheckResponse(msg); } }); This happens when I open two firefox or two IE. I run the function that does the ajax call on first browser and till the response of the ajax is returned, I cannot do anything on the second browser on the same site. No breakpoints are hit on the server from the second browser till initial ajax is completed. It hangs for any click etc.. The hang on the second browser ends immediately after the ajax call is completed on the first one. This behavior is not observed if I try the same on IE and Firefox side by side. Only happen with IE & IE or FF & FF side by side Appreciate if you can help me see what I am missing here.

    Read the article

  • jQuery ajax call failing with undefined error

    - by Groo
    My jQuery ajax call is failing with an undefined error. My js code looks like this: $.ajax({ type: "POST", url: "Data/RealTime.ashx", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", timeout: 15000, dataFilter: function(data, type) { alert("RAW DATA: " + data + ", TYPE: "+ type); return data; }, error: function(xhr, textStatus, errorThrown) { alert("FAIL: " + xhr + " " + textStatus + " " + errorThrown); }, success: function(data) { alert("SUCCESS"); } }); My ajax source is a generic ASP.NET handler: [WebService(Namespace = "http://my.website.com")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class RealTime : IHttpHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "application/json"; context.Response.Write("{ data: [1,2,3] }"); context.Response.End(); } public bool IsReusable { get { return false; } } } Now, if I return an empty object ("{ }") in my handler, the call will succeed. But when I return any other JSON object, the call fails. The dataFilter handler shows that I am receiving a correct object. Firebug shows the response as expected, and the JSON tab shows that the object is parsed correctly. So what could be the cause?

    Read the article

  • ios 4.1 doesn't call Phonegap API

    - by Johannes Klauß
    I'm working on a cross platform app for Android 2.2 and iOS 4.1 (dev devices). On Android everything works fine (accelerometer and geolocation) even if it's a little laggy. On iOS it's way more smooth, but he doesn't call the Phonegap functions. That's my JS code: var watchID = null; var shaking = { left: false, right: true }; function startWatch() { // Update acceleration every 100 ms var options = { frequency : 100 }; watchID = navigator.accelerometer.watchAcceleration(function(acceleration) { if(acceleration.x < -8) { shaking.left = true; } else if(acceleration.x > 8) { shaking.right = true; } if(shaking.left && shaking.right) { navigator.notification.vibrate(500); shaking.left = false; shaking.right = false; stopWatch(); } }, null, options); } I just call it with <a href="" onclick="startWatch();">start Accel</a> But iOS doesn't react at all. Is there any special call you need to do in iOS?

    Read the article

  • Starting a process in one HTTP call and getting results in another

    - by KillianDS
    Hi, I'm writing a very simple testing framework for my application, the design isn't perfect, but I don't have time to write something more complex. Essentially, I have a client and server-application, on my server I want a small python web server to start the server application with given test sequences on a GET or POST call. Also, the application prints some testdata to stderr which I'd like to catch and return in another HTTP call. At the moment I have this: from subprocess import Popen, PIPE from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer p = None class MyHandler(BaseHTTPRequestHandler): def do_GET(self): global p if self.path.endswith("start/"): p = Popen(["./bin/Release/simplex264","BBB-360","127.0.0.1"], stderr=PIPE) print 'started' return elif self.path.endswith("getResults/"): self.wfile.write(p.stderr.read()) return self.send_error(404,'File Not Found: %s' % self.path) def main(): try: server = HTTPServer(('localhost', 9876), MyHandler) print 'Started server...' server.serve_forever() except KeyboardInterrupt: print 'Shutting down...' server.socket.close() if __name__ == '__main__': main() Which 'works', except for one part, when I try to open http://localhost:9876/start/, it does not return before the process ended. However, the 'started' appears in my shell immediately (I added this because I thought the Popen call would only return after execution). I do not know the perfect inner workings of Popen and BaseHTTPRequestHandler however and do not really know where it goes wrong. Is there any way to make this work asynchronously?

    Read the article

  • Python: Catching / blocking SIGINT during system call

    - by danben
    I've written a web crawler that I'd like to be able to stop via the keyboard. I don't want the program to die when I interrupt it; it needs to flush its data to disk first. I also don't want to catch KeyboardInterruptedException, because the persistent data could be in an inconsistent state. My current solution is to define a signal handler that catches SIGINT and sets a flag; each iteration of the main loop checks this flag before processing the next url. However, I've found that if the system happens to be executing socket.recv() when I send the interrupt, I get this: ^C Interrupted; stopping... // indicates my interrupt handler ran Traceback (most recent call last): File "crawler_test.py", line 154, in <module> main() ... File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 397, in readline data = recv(1) socket.error: [Errno 4] Interrupted system call and the process exits completely. Why does this happen? Is there a way I can prevent the interrupt from affecting the system call?

    Read the article

  • When to call Dispose in Entity Framework?

    - by Abdel Olakara
    Hi All, In my application I am making use of Spring.Net for IoC. The service objects are called from the ASP.Net files to perform CRUD operations using these service object. For example, I have CustomerService to do all CRUD operations on Customer table. I use entity framework and the entities are injected .. my question is where do I call the dispose method? As far as I understood from the API documentations, unless I call Dispose() there is no guaranty it will be garbage collected! So where and how do I do it? Example Service Class: public class CustomerService { public ecommEntities entities = {get; set;} public bool AddCustomer(Customer customer) { try { entities.AddToCustomer(customer); entities.SaveChanges(); return true; } catch (Exception e) { log.Error("Error occured during creation of new customer: " + e.Message + e.StackTrace); return false; } } public bool UpdateCustomer(Customer customer) { entities.SaveChanges(); return true; } public bool DeleteCustomer(Customer customer) . . . And I just create an object of CustomerService at the ASP partial class and call the necessary methods. Thanks in advance for the best practice and ideas.. Regards, Abdel Raoof

    Read the article

  • Catching / blocking SIGINT during system call

    - by danben
    I've written a web crawler that I'd like to be able to stop via the keyboard. I don't want the program to die when I interrupt it; it needs to flush its data to disk first. I also don't want to catch KeyboardInterruptedException, because the persistent data could be in an inconsistent state. My current solution is to define a signal handler that catches SIGINT and sets a flag; each iteration of the main loop checks this flag before processing the next url. However, I've found that if the system happens to be executing socket.recv() when I send the interrupt, I get this: ^C Interrupted; stopping... // indicates my interrupt handler ran Traceback (most recent call last): File "crawler_test.py", line 154, in <module> main() ... File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 397, in readline data = recv(1) socket.error: [Errno 4] Interrupted system call and the process exits completely. Why does this happen? Is there a way I can prevent the interrupt from affecting the system call?

    Read the article

  • Identify server that made call to web service

    - by sleepybobos
    I am working within an intranet environment. We have both a production and development sharepoint server (WSS 3). We have a 3rd party workflow product which runs on top of sharepoint. It is installed on both the production and development sharepoint servers. The workflow product can call web services I have written which are hosted on our web server. How would I have the web services determine which sharepoint server made the call to the web service, be it the production or development server? I would then use this information to server specific information from web.config or database etc. Currently the site hosting web services is setup to allow anonymous access so code such as System.Web.HttpContext.Current.User.Identity.Name; returns and empty string. If windows authenticaion is used it returns the identity of the currently logged in user, which is no user in identifying the server the call was made from. I need a push in the right direction to address what I believe is probably a common scenario please.

    Read the article

  • Android, phone call audio stream via wlan

    - by moppel
    I am planning on developing my specific voip app for android. Here's the scenario: when a phone call occurs I want to hear the person who's calling on my local pc speakers and I want to speak to him via my own pc microphone / headset. So I need to send the audio stream of both me and the person I am talking to via the wlan network. Something like this: ... onCallStateChanged(int state, String phoneNumber){ while(state == PhoneListener.CALL_STATE_OFFHOOK){ //while phone call is happaning //send incoming speech via wlan to pc //receive audiostream from pc microphone and direct it to the phone call } } ... Is this possible with the current Android API? (Actually it should be since voip apps are available in the market) I did some research in the Android API and all I found was the AudioManager which has constant named public static final int STREAM_VOICE_CALL; //The audio stream for phone calls But I don't know how to use it our how it should give me access to the actual audiostreams which I can send via network. How do I manage to do this? The connection would be realised by TCP sockets.

    Read the article

  • How to bind to another event after ajax call in jquery

    - by robert
    Hi, I'm creating a graph using flot javascript library. I have enabled clickable event and the div is binded to plotclick event. So, when a datapoint is clicked, an ajax call is made and the result is used to replace the current div. After this i need to bind the div to a new event. I tried to call bind, but it is still bound to old callback. When i call unbind and bind, the new callback is not called. var handleTeacherClick = function( event, pos, item ) { if( typeof item != "undefined" && item ) { var user_id = jQuery( 'input[name="id' + item.datapoint[0] + '"]' ).val(); jQuery.ajax({ type: 'POST', url: BASEPATH + 'index.php/ajax/home/latest', data: { "user_id": user_id }, dataType: 'json', success: function ( result ) { jQuery.plot(jQuery('#stats_prog'), result.progress_data, result.progress_options); jQuery.plot(jQuery('#stats_perf'), result.performance_data, result.performance_options); jQuery('.stats_title'). html('<span class="stats_title">'+ ' >> Chapter '+Math.ceil(item.datapoint[0])+'</span>'); jQuery('#stats_prog')./*unbind("plotclick").*/ bind('plotclick', statClickHandler ); jQuery('#stats_perf')./*unbind("plotclick"). */ bind( 'plotclick', statClickHandler ); }, }); } }

    Read the article

  • How to call IronPython function from C#/F#?

    - by prosseek
    This is kind of follow up questions of http://stackoverflow.com/questions/2969194/integration-of-c-f-ironpython-and-ironruby In order to use C/C++ function from Python, SWIG is the easiest solution. The reverse way is also possible with Python C API, for example, if we have a python function as follows def add(x,y): return (x + 10*y) We can come up with the wrapper in C to use this python as follows. double Add(double a, double b) { PyObject *X, *Y, *pValue, *pArgs; double res; pArgs = PyTuple_New(2); X = Py_BuildValue("d", a); Y = Py_BuildValue("d", b); PyTuple_SetItem(pArgs, 0, X); PyTuple_SetItem(pArgs, 1, Y); pValue = PyEval_CallObject(pFunc, pArgs); res = PyFloat_AsDouble(pValue); Py_DECREF(X); Py_DECREF(Y); Py_DECREF(pArgs); return res; } How about the IronPython/C# or even F#? How to call the C#/F# function from IronPython? Or, is there any SWIG equivalent tool in IronPython/C#? How to call the IronPython function from C#/F#? I guess I could use "engine.CreateScriptSourceFromString" or similar, but I need to find a way to call IronPython function look like a C#/F# function.

    Read the article

  • Segfault when calling a method c++

    - by shuttle87
    I am fairly new to c++ and I am a bit stumped by this problem. I am trying to assign a variable from a call to a method in another class but it always segfaults. My code compiles with no warnings and I have checked that all variables are correct in gdb but the function call itself seems to cause a segfault. The code I am using is roughly like the following: class History{ public: bool test_history(); }; bool History::test_history(){ std::cout<<"test"; //this line never gets executed //more code goes in here return true; } class Game{ private: bool some_function(); public: History game_actions_history; bool local_variable; }; bool Game::some_function(){ local_variable = game_actions_history.test_history(); if (local_variable == true){ return true; } else{ return false; } } Any tips or advice is greatly appreciated!

    Read the article

  • Two AJAX asynchronus GET call: Only one get the xml file

    - by Woho87
    Hi! I have two AJAX GET calls that are set to asynchcronus = true; I want to obtain two XML files on my server. The two AJAX calls and rendering are defined in function foo & koo. And are called simultaneously. function foo(){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if(xmlhttp.readyState == 4 && xmlhttp.status == 200){ var xmlDoc = xmlhttp.responseXML; //Do something } } xmlhttp.open('get', 'url', true); xmlhttp.send(); } function koo(){ //Almost the same as function foo } foo(); koo(); I've noticed that inside the if statement in the first function call(foo), the code their will never compile. While in the second function call(koo). The code inside the if statement can be compiled. If I set both asynchronus to false, then there is no problem at all. If I remove the second function call(koo) from the code, than the code inside the if statement can be compiled. What can I do to have both asynchronus AJAX calls?

    Read the article

  • calling function in radiobutton group

    - by vijisai
    thank you very much. with your help, i am now able to call the function for each radio button. however, i get a error message Reference to non-existent field 'ics_si' ics_si is my function, which has the following code, i do not know where i am making a mistake i have created the edit box for user to input the values for bore and stroke. and vdisp is calculated and the result is displayed in the third edit box. function ics_si_Callback(hObject, eventdata, handles) b = str2double(get(handles.bore,'String')); s = str2double(get(handles.stroke,'String')); vdisp = (pi * b * b * s*10^(-3))/4; set(handles.vdisp,'String',vdisp); this code must be called when i press the first or second radio button. i.e. when the radio button is pressed, it should call the function ics_si, calculate it and display the result. how to get this.

    Read the article

  • How to call windows form from native cpp

    - by Jenuel
    I have an existing project using c/c++ .NET. Currently I have been given a task to create a windows form from my existing code. So i have add new project windows form application in the existing c/c++ projects.form.h, form.cpp has been automatically created. Now I am having problem to call the window from my c files. Even i could not call the form.h file from my c program. Is there any solution for this problem. Listed here is the coding.... login.c int LoginMain(int id,int task) { LoginClear(); LoginEntry(id,task); dp_in = 1; Rep(); //I WOULD LIKE TO CALL THE FORM AT THIS STAGE Cashier(); dp_in = 0; Login(); return(0); } form.cpp [STAThreadAttribute] int main(array ^args) { // Enabling Windows XP visual effects before any controls are created Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); // Create the main window and run it Application::Run(gcnew Form1()); return 0; }

    Read the article

  • call function inside a nested jquery plugin

    - by tchoesang
    There are many topics related to my question and i have been through most of them, but i haven't got it right. The closest post to my question is the following: http://stackoverflow.com/questions/1042072/how-to-call-functions-that-are-nested-inside-a-jquery-plugin Below is the jquery plugin i am using. On resize, the element sizes are recalculated. I am now trying to call the function resizeBind() from outside of the jquery plugin and it gives me error I tried the following combinations to call the function $.fn.splitter().resizeBind() $.fn.splitter.resizeBind() Any ideas, where i am getting wrong? ;(function($){ $.fn.splitter = function(args){ //Other functions ...... $(window).bind("resize", function(){ resizeBind(); }); function resizeBind(){ var top = splitter.offset().top; var wh = $(window).height(); var ww = $(window).width(); var sh = 0; // scrollbar height if (ww <0 && !jQuery.browser.msie ) sh = 17; var footer = parseInt($("#footer").css("height")) || 26; splitter.css("height", wh-top-footer-sh+"px"); $("#tabsRight").css("height", splitter.height()-30+"px"); $(".contentTabs").css("height", splitter.height()-70+"px"); } return this.each(function() { }); }; })(jQuery);

    Read the article

  • C#: Hijacking a near relative call

    - by Lex
    Alright, I'm trying to write a vary basic modification to a program NOT written by me. I DO NOT have the source to it. I also do not care if this only works for a single version of the program, so hard coding offsets is feasible. Anyways, I've found the function and where it is called in the compiled program. .text:1901C88F loc_1901C88F: ; CODE XREF: ConnectionThread+1A2j .text:1901C88F ; DATA XREF: .text:off_1901CC64o .text:1901C88F 8B C8 mov ecx, eax ; jumptable 1901C862 case 11 .text:1901C891 8B C6 mov eax, esi .text:1901C893 E8 48 C5 FF FF call ChatEvent According to IDA the full function signature is: char *__usercall ChatEvent<eax>(char *Data<eax>, unsigned int Length<ecx>) I already have all I need to patch the program during runtime, and do whatever other manipulations I need. What I need, is to be able to write a function like so: bool ProcessChat(char *Data, unsigned int Length); char *__usercall HijackFunction(char *Data, unsigned int Length){ if (ProcessChat(Data, Length)) Call OriginalChatEvent(Data, Length); } Get the jist of what I am trying to do? With stdcall function it's easy just replace the 4 byte address with my own function's address. But this is a near relative call, which is.. more annoying. So, anyone have any idea?

    Read the article

  • Which hosting will let me execute my own EXE with PHP?

    - by guitar-
    I have a task that PHP (or any server-side scripting language) isn't practical for. It involves a lot of file I/O, processing, etc. and it will execute a lot faster using the program I made in C instead of PHP. Do any hosts allow you to upload your own EXE files and run them on the server using PHP's exec, shell_exec, etc. functions? Do you need a dedicated server to do this? Also, I don't know if Facebook's PHP HipHop is out yet, but I really don't want to use that.

    Read the article

  • WCF net.tcp windows service - call duration and calls outstanding increases over time

    - by Brook
    I have a windows service which uses the ServiceHost class to host a WCF Service using the net.tcp binding. I have done some tweaking to the config to throttle sessions as well as number of connections, but it seems that every once in a while my "Calls outstanding" and "Call duration" shoot up and stay up in perfmon. It seems to me I have a leak somewhere, but the code I have is all fairly minimal, I'm relying on ServiceHost to handle the details. Here's how I start my service ServiceHost host = new ServiceHost(type); host.Faulted+=new EventHandler(Faulted); host.Open(); My Faulted event just does the following (more or less, logging etc removed) if (host.State == CommunicationState.Faulted) { host.Abort(); } else { host.Close(); } host = new ServiceHost(type); host.Faulted+=new EventHandler(Faulted); host.Open(); Here's some snippets from my app.config to show some of the things I've tried <runtime> <gcConcurrent enabled="true" /> <generatePublisherEvidence enabled="false" /> </runtime> ......... <behaviors> <serviceBehaviors> <behavior name="Throttled"> <serviceThrottling maxConcurrentCalls="300" maxConcurrentSessions="300" maxConcurrentInstances="300" /> .......... <services> <service name="MyService" behaviorConfiguration="Throttled"> <endpoint address="net.tcp://localhost:49001/MyService" binding="netTcpBinding" bindingConfiguration="Tcp" contract="IMyService"> </endpoint> </service> </services> .......... <netTcpBinding> <binding name="Tcp" openTimeout="00:00:10" closeTimeout="00:00:10" portSharingEnabled="true" receiveTimeout="00:5:00" sendTimeout="00:5:00" hostNameComparisonMode="WeakWildcard" listenBacklog="1000" maxConnections="1000"> <reliableSession enabled="false"/> <security mode="None"/> </binding> </netTcpBinding> .......... <!--for my diagnostics--> <diagnostics performanceCounters="ServiceOnly" wmiProviderEnabled="true" /> There's obviously some resource getting tied up, but I thought I covered everything with my config. I'm only getting about ~150 clients so I don't think I'm coming up against my "300" limit. "Calls per second" stays constant at anywhere from 2-5 calls per second. The service will run for hours and hours with 0-2 "calls outstanding" and very low "call duration" and then eventually it will shoot up to 30 calls oustanding and 20s call duration. Any tips on what might be causing my "calls outstanding" and "call duration" to spike? Where am I leaking? Point me in the right direction?

    Read the article

  • Simple jquery ajax call leaks memory in ie.

    - by Thomas Lane
    I created a web page that makes an ajax call every second. In Internet Explorer 7, it leaks memory badly (20MB in about 15 minutes). The program is very simple. It just runs a javascript function that makes an ajax call. The server returns an empty string, and the javascript does nothing with it. I use setTimout to run the function every second, and I'm using Drip to watch the thing. Here is the source: <html> <head> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('jquery', '1.4.2'); google.load('jqueryui', '1.7.2'); </script> <script type="text/javascript"> setTimeout('testJunk()',1000); function testJunk() { $.ajax({ url: 'http://xxxxxxxxxxxxxx/test', // The url returns an empty string dataType: 'html', success: function(data){} }); setTimeout('testJunk()',1000) } </script> </head> <body> Why is memory usage going up? </body> </html> Anyone have an idea how to plug this leak? I have a real application that updates a large table this way, but left unattended will eat up Gigabytes of memory. Okay, so after some good suggestions, I modified the code to: <html> <head> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('jquery', '1.4.2'); google.load('jqueryui', '1.7.2'); </script> <script type="text/javascript"> setTimeout(testJunk,1000); function testJunk() { $.ajax({ url: 'http://xxxxxxxxxxxxxx/test', // The url returns an empty string dataType: 'html', success: function(data){setTimeout(testJunk,1000)} }); } </script> </head> <body> Why is memory usage going up? </body> </html> It didn't seem to make any difference though. I'm not doing anything with the DOM, and if I comment out the ajax call, the memory leak stops. So it looks like the leak is entirely in the ajax call. Does jquery ajax inherently create some sort of circular reference, and if so, how can I free it? By the way, it doesn't leak in Firefox. Someone suggested running the test in another VM and see if the results are the same. Rather than setting up another VM, I found a laptop that was running XP Home with IE8. It exhibits the same problem. I tried some older versions of jquery and got better results, but the problem didn't go away entirely until I abandoned ajax in jquery and went with more traditional (and ugly) ajax.

    Read the article

  • Is it bad practice to call a controller action from a view that was rendered by another controller?

    - by marco-fiset
    Let's say I have an OrderController which handles orders. The user adds products to it through the view, and then the final price gets calculated through an AJAX call to a controller action. The price calculation logic is implemented in a seperate class and used in a controller action. What happens is that I have many views from different controllers that need to use that particular action. I'd like to have some kind of a PriceController that I could call an action on. But then the view would have to know about that PriceController and call an action on it. Is it bad practice for a view to call an action on a different controller from which it was rendered?

    Read the article

  • Is it bad practise to call a controller action from a view that was rendered by another controller?

    - by marco-fiset
    Let's say I have an OrderController which handles orders. The user adds products to it through the view, and then the final price gets calculated through an AJAX call to a controller action. The price calculation logic is implemented in a seperate class and used in a controller action. What happens is that I have many views from different controllers that need to use that particular action. I'd like to have some kind of a PriceController that I could call an action on. But then the view would have to know about that PriceController and call an action on it. Is it bad practice for a view to call an action on a different controller from which it was rendered?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >