Search Results

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

Page 92/959 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • How to call a php controller method using jquery?

    - by chandru_cp
    I am developing a web application and i am integrating jquery in it... Now looking for ajax calls with jquery to my controller function.... jquery.ajax() would be useful i think so... But how to call my controller method.... $.ajax({ type: "POST", url: "", data: "", contentType: "application/json; charset=utf-8", async: false, dataType: "json", success: function(jsonObj) { function loadbookdetails() { //Paging $college=$_SESSION['college']; $this->load->library('pagination'); $data['bookdetails'] = $this->librarymodel->selectbook($college); //$data['rackOptionData'] = $this->librarymodel->selectrack(); if(empty($data['bookdetails'])) { $data['comment'] = 'no record found!'; } $this->load->view('bookdetials',$data); } I am fetching this records here how to use it with jquery.ajax() function and how to convert $data to json and use it with jquery and iterate with a table...

    Read the article

  • Where is the best place to call the .tolist(); inside my controller classes or inside my model repository classes

    - by john G
    I have the following action method, inside my asp.net mvc web application:- public JsonResult LoadZoneByDataCenter(string id) { var zonelist = repository.getrealtedzone(Convert.ToInt32(id)).ToList(); //code goes here Which calls the following model repository method:- public IQueryable<Zone> getrealtedzone(int? dcid) { return tms.Zones.Where(a=> a.DataCenterID == dcid || dcid == null); } Currently I am calling the .tolist() which will interpret the Database from my action method, but my question is where is the best place to call the .tolist() inside the controller or inside the model classes and why ? thanks

    Read the article

  • How to configure Spring-DM OSGi service for new instance per call?

    - by Bhav
    I'm starting to delve into using Spring DM and OSGi services in an RCP application. I've created a service which is used by another bundle in the RCP application. It does a lookup of the service via calls to getBundleContext().getServiceReference() using the explicit bundle names and service class names. I'm not using DI anywhere yet. The issue I'm running into is that the service that is returned in the requesting bundle is a singleton. At times I notice a threading issue since it is a "stateful" service. How do I configure the application to get back a new service instance with each call? Here is my spring xml file contents which registers the service: <bean id="myServBean" class="com.xyz.ClassImpl"/> <osgi:service ref="myServBean" class="com.xyz.Class"/>

    Read the article

  • how to call 2 webmethods from a single webservice in a single activity in android?

    - by Jassi
    hello, I am new in android. i am able to called single webmethod from a .net webservice. i am usuing ksoap2 to implement soap. But in my .net webservice there are many web methods. I want to call more than one web methods. So please give some idea on this matter. Even i have tried by taking 2 soap_action and 2 method_name with single namespace then it works in first request but in 2nd request it gives xmlpullparserException error. thanx in advance,

    Read the article

  • How to pass a linc to class function and call it?

    - by Kabumbus
    So I have a class like class mySafeData { public: void Set( int i ) { myMutex.lock(); myData = i; myMutex.unlock(); } void Get( int& i) { myMutex.lock(); i = myData; myMutex.unlock(); } private: int myData; boost::mutex myMutex; }; its instance is running. Lets call instance A. I want to create a new class that would take as a start up argument some kind of link to Getter from A and would be capable to somehow save link to thet getter for calling it inside its private methods vhen needed. how to do such thing?

    Read the article

  • How to call a function though Control.BeginInvoke in a signal-slot-like fashion?

    - by Dimitri C.
    I'd like a delegate that calls a function in a different thread when it is invoked. Currently, I'm using the following implementation: delegate void someFunctionDelegate(); //... someFunctionDelegate callBackFunction = someForm.SomeFunction; someForm.Invoke(someFunctionDelegate); However, I'd like a more compact form, combining both the someForm instance and the SomeForm.SomeFunction member function. I'm thinking of something like this: var callBackFunction = new AsynchronousCrossThreadDelegate(someForm, SomeForm.SomeFunction); callBackFunction(); // Should call someForm.BeginInvoke(SomeForm.SomeFunction); Is there a way to do so in C#/.NET? Update I'm looking for a solution that will work for functions with 0 or more parameters.

    Read the article

  • how to call a function in c# which return type is array.

    - by Manoj Wadhwani
    public CD[] GetCDCatalog() { XDocument docXML = XDocument.Load(Server.MapPath("mydata.xml")); var CDs = from cd in docXML.Descendants("Table") select new CD { title = cd.Element("title").Value, star = cd.Element("star").Value, endTime = cd.Element("endTime").Value, }; return CDs.ToArray<CD>(); } I am calling this function on page load ie. string[] arr = GetCDCatalog(); but this is giving Error Cannot implicitly convert type 'Calender.CD[]' to 'string[]' Please suggetst how can i call function on page load which return type is array.

    Read the article

  • How do you remove the Bing Disambiguation Dialog via API call?

    - by Justin Dearing
    I am integrating bing maps into a web page. I am calling the GetDirections() method of my VEMap option. and setting the VERouteOptions.ShowDisambiguation property to true when I call VEMap.GetDirections(). So sometimes I get the following dialog: The problem is sometimes the user will enter a second set of directions into my form, and dialog remains. I've done the following to attempt to correct it: // In case the disambiguation dialog a.k.a "" is present from a previous direction search var disambiguationDialogElement = $('#myMap_veplacelistpanel')[0]; if (typeof (disambiguationDialogElement) == "object") { map.DeleteControl(disambiguationDialogElement); } It seems to work, but it feels like a suboptomial approach. Is there a better way to do it?

    Read the article

  • A Simple C# DLL - how do I call it from Excel, Access, VBA, VB6 ?

    - by divinci
    Hi all, I have a simple class library written in c#. using System; namespace TestDll { public class Test { public string HelloWorld { get { return "Hello World"; } } } } My question is how can I call this HelloWorld function from Microsoft Office Visual Basic (which I think is VB6)? My first step was to add the DLL as a reference - but on browsing and selecting the compiled DLL the message "Can't add a reference to the specified file." was thrown. Can anyone point me in the right direction as to why/how to get this working? Thanks in advance SO!

    Read the article

  • How do I call a method when all threads (backgroundWorkers) are done with their jobs in .NET

    - by claws
    Hello, I'm using C# .NET. Its a GUI application. When user clicks a button work is assigned to 4 different background workers. Each take different amount of time and the end result is they populate some variables. I need to call a method which operates on these end results of each bgwoeker and gives the final output. How to accomplish this? Problem here is to be sure that all bgworkers are done with their job.

    Read the article

  • How much effort does it take to spoof an Ip Address in a call to a webservice?

    - by Rory Becker
    I don't want to know how... Just how complicated.... I'm thinking of securing a webservice or 2 based on the incoming client ipaddress of the caller. Is this in any way secure? Surely if the IPaddress was being spoofed then the result would have to be sent back to the address that was being spoofed and therefore not reach the spoofer? Update: Ok so from what I can tell.... I should create a Gettoken() method which checks the IPaddress and passes out a cryptographically significant token with a timeout to any valid IP address. This is then required by any other method before any kind of side effect is allowed. Since an Attacker can't (likely) get the token without having a valid IP, he will be unable to validly call any of my "dangerous" webmethods ?

    Read the article

  • How to Call methods I see in a wsdl file someone linked me to?

    - by Derek
    Hi all, I am not a Java programmer by trade. C and Fortran mostly. However, I have this one-off project someone wants done. Connect to some web-based database and retrieve some data from it. I asked around, and someone finally linked me to a WSDL page. I click on this link, and I see a huge XML looking file. If I am writing a stand-alone java application, how do I go about calling these (promising looking) method names that I see in the wsdl. You know "getCoordinates" is there, but i have no idea how to call that method. After googling, I am finding a lot of different ways, and I am not sure what is the best way for my simple application. Thanks

    Read the article

  • How to create a splash activity , call a second activity via a button, simple data form 5 fields and 2 buttons

    - by Mike
    New to Android need help with one solid build that I can refer to and study for future projects. The first activity is a background image with a button,when clicked the it takes you to the second activity which is a form with 5 data fields and 2 buttons. One button calls an intent to take a picture within the app and one button that submits the data from the form along with the picture to URL. lastly a third activity that says complete thank you. I can make some of this but don't know how to link button or open and merge camera with the app to be sent as a package of data. I suppose I could also hook into GPS acquire location as well as the camera call?

    Read the article

  • How to programmatically insert call log entries WITH display name and photo?

    - by dchappelle
    I am able to programmatically insert an entry into the Android call log with a number, date, duration & type BUT I cannot figure out how to also include a photo, label and name? I do the following.. (didn't know what to even try for the photo) ContentValues values = new ContentValues(); values.put(CallLog.Calls.NUMBER, number); values.put(CallLog.Calls.CACHED_NAME, name); values.put(CallLog.Calls.CACHED_NUMBER_LABEL, label); values.put(CallLog.Calls.DATE, date); values.put(CallLog.Calls.DURATION, duration); values.put(CallLog.Calls.TYPE, myCallType); context.getContentResolver().insert(CallLog.Calls.CONTENT_URI, values);

    Read the article

  • Is there any reason for a blocking call to winsock send() function on Vista to return immediately ?

    - by ivymike
    Hi All, Is there any reason for a blocking call to winsock's send() function on Vista to return immediately ? It works with expected delay on XP and below. I'm wondering if this has got anything to do with auto-tuning feature of Vista. Code: char *pBuffer; // pointer to data int bytes; // total size int i = 0, j=0; while (i < bytes) { j = send(m_sock, pBuffer+i, bytes-i, 0); i+=j; } Thanks, Pavan

    Read the article

  • Why need to call NSTimer again in this code?

    - by Tattat
    - (void) applicationDidFinishLaunching:(UIApplication *)application { //set up main loop [NSTimer scheduledTimerWithTimeInterval:0.033 target:self selector:@selector(gameLoop:) userInfo:nil repeats:NO]; //create instance of the first GameState [self doStateChange:[gsMain class]]; } - (void) gameLoop: (id) sender { [((GameState*)viewController.view) Update]; [((GameState*)viewController.view) Render]; [NSTimer scheduledTimerWithTimeInterval:0.033 target:self selector:@selector(gameLoop:) userInfo:nil repeats:NO]; } This code is from a iPhone game development book. I don't know why the gameLoop method need to call the NSTimer again? in the applicationDidFinishLaunching, it set the NSTimer to do, why don't let it do every 0.033s, why add the same NSTimer code in the gameLoop method? thz.

    Read the article

  • Call load using a div id that has been passed into a function, div id is a parameter

    - by tittatty
    I am dynamically creating divs within a jquery accordion that are loaded with data as when the user clicks on the accordion title. I have this all working except that when I pass the div id into the load details method, the call to .load() does not work. What can I do to fix this? It seems like a simple javascript string eval would work but I can not find what I am looking for. Code: Here is the basic function: function loadDetails(div_id) { var load_string = "ajax/get_details.aspx"; $(div_id).load(load_string); } This function is called correctly on the click event and the div_id is passed in correctly but the load function is not working. If I use code like this it work correctly: $('#test').load(load_string);

    Read the article

  • Does C++ require a destructor call for each placement new?

    - by Josh Haberman
    I understand that placement new calls are usually matched with explicit calls to the destructor. My question is: if I have no need for a destructor (no code to put there, and no member variables that have destructors) can I safely skip the explicit destructor call? Here is my use case: I want to write C++ bindings for a C API. In the C API many objects are accessible only by pointer. Instead of creating a wrapper object that contains a single pointer (which is wasteful and semantically confusing). I want to use placement new to construct an object at the address of the C object. The C++ object will do nothing in its constructor or destructor, and its methods will do nothing but delegate to the C methods. The C++ object will contain no virtual methods. I have two parts to this question. Is there any reason why this idea will not work in practice on any production compiler? Does this technically violate the C++ language spec?

    Read the article

  • How can I call an executable to run on a separate machine within a program on my own machine (win xp

    - by Mr. H.
    My objective is to write a program which will call another executable on a separate computer(all with win xp) with parameters determined at run-time, then repeat for several more computers, and then collect the results. In short, I'm working on a grid-computing project. The algorithm itself being used is already coded in FORTRAN, but we are looking for an efficient way to run it on many computers at once. I suppose one way to accomplish this would be to upload a script to each computer and then run said script on each computer, all automatically and dependent on my own parameters. But how can I write a program which will write to, upload, and run a script on a separate computer? I had considered GridGain, but the algorithm is already coded and in a different language, so that is ruled out. My current guess at accomplishing this task is using Expect (wiki/Expect), but I have no knowledge of the tool. Any advice appreciated.

    Read the article

  • how to call a php class function directly using ajax?

    - by payling
    Is it possible to call a php class function DIRECTLY using ajax? Something like below... except ajax... myclass::myfunction(); I've been using the jquery library to work with AJAX. $.get('control.php', {func: funcName, arg1: arg1}); The above is similar to what I'm trying to achieve MINUS the control.php; I'm not sure if this is even possible, but I just thought it would be nice to skip the landing page (control.php) that recieves the funcName. I have a bunch of conditional statements that sort out what class function to run based on the funcName recieved. It seems kind of silly to do this, to have a separate page just to handle function calls. Is there a better way?

    Read the article

  • ASPNET MVC what do you call this, a partial view? Or something else?

    - by JK
    I'm trying to google for info on a situation, but I dont know what it is called, so its hard to find results :) I have a model with say 10 fields. But only some of those are shown on a particular view, lets say 3 of them: id, name, date. What do you call this kind of view that does not display the whole model? A partial view? The problem is that because 7 fields are not sent to the view, when the Update action is called on the controller, those fields are null, and the DB gets updated with those 7 fields set to null.

    Read the article

  • How do I load every UserForm without having to call .Show individually?

    - by Daniel Cook
    I wanted to figure out how you could load every UserForm without having to call Userform1.Show UserForm2.Show etc. This was inspired by comments on this answer: Excel VBA UserForm_Initialize() in Module. I found this method suggested in a few places: Sub OpenAllUserForms() Dim uf As UserForm For Each uf In UserForms uf.Show Next End Sub However, no Userforms display regardless of how many are attached to the workbook. When I stepped through the code I determined that the UserForms collection is empty! How can I load each Userform without having to explicitly show each one?

    Read the article

  • How do I produce an external URL as part of a replace_html call in Ruby on Rails?

    - by vlasits
    Basically, I am attempting to render an external website (the url of which is stored in the database) into a page in my Ruby on Rails app. I have a field in my model 'search' called 'search' that contains web addresses with the form 'www.example.com' or 'example.com'. I am trying to use a link_to_function call with replace_html to replace the 'maincontent' div with an iframe tag using the value of 'search' in the current instance as the src for the tag. My current attempt is the very ugly code below. I'd be grateful for either of the following types of responses: How can I rewrite the concatenation string to work correctly? How can I get the same effect (replacing the current content of the "mainContent" div with an iframe tag using a different method? (I had to modify the code before to remove the < from the iframe) link_to_function h(search.title) do |page| page.replace_html 'mainContent', 'iframe id="embedded" src="http://" + #{search.search} />' end

    Read the article

  • C++ - How to call a member function for an inherited object.

    - by Francisco P.
    Hello! I have a few classes (heat, gas, contact, pressure) inheriting from a main one (sensor). I have a need to store them in a vector<Sensor *> (part of the specification). At some point in time, I need to call a function that indiscriminately stores those Sensor *. (also part of the specification, not open for discussion) Something like this: for(size_t i = 0; i < Sensors.size(); ++i) Sensors[i]->storeSensor(os) //os is an ofstream kind of object, passed onwards by reference Where and how shall storeSensor be defined? Is there any simple way to do this or will I need to disregard the specification? Mind you, I'm a beginner! Thanks for your time!

    Read the article

  • How to call split(token) on a string that does not contain the token without causing an error?

    - by Vorinowsky
    I have two types of strings as the IDs of elements in my HTML markup: Dates: "april-23" "march-20" and season names: "springtime" "winter" The dates have a dash separating the month and the day. The seasons are a single word with no other tokens. I want to assign the month or the season to a new variable called: time_of_year If I do this: var time_of_year = $(this).attr("id").split('-')[0]; It will work on the months but if I call it on a season name which does not contain the token, will it generate an error? What's the safe way to do this?

    Read the article

< Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >