Search Results

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

Page 106/959 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • How to call operator<< on "this" in a descendant of std::stringstream?

    - by romkyns
    class mystream : public std::stringstream { public: void write_something() { this << "something"; } }; This results in the following two compile errors on VC++10: error C2297: '<<' : illegal, right operand has type 'const char [10]' error C2296: '<<' : illegal, left operand has type 'mystream *const ' Judging from the second one, this is because what this points at can't be changed, but the << operator does (or at least is declared as if it does). Correct? Is there some other way I can still use the << and >> operators on this?

    Read the article

  • What do you call the concept of dynamic data definition?

    - by DJTripleThreat
    Maybe this is simpler and more straightforward then what I'm thinking but I can't seem to find this concept on google anywhere. The concept is this: You have a table in a database and the table has a specified number of columns. However, it has been asked of me by previous clients that there also be a set of dynamic user defined columns that can be added on the fly. What is this concept called and is it considered a design pattern?

    Read the article

  • How to pass a method as callback to a Windows API call?

    - by Heinrich Ulbricht
    Hi, I'd like to pass a method of a class as callback to a WinAPI function. Is this possible and if yes, how? Example case for setting a timer: TMyClass = class public procedure TimerProc(Wnd:HWND; uMsg:DWORD; idEvent:PDWORD; dwTime:DWORD); procedure DoIt; end; [...] procedure TMyClass.DoIt; begin SetTimer(0, 0, 8, @TimerProc); // <-???- that's what I want to do (last param) end; Thanks for your help! Edit: The goal is to specify a method of this class as callback. No procedure outside the class.

    Read the article

  • About Web service ,how to use Ajax to call a specific member function of a class?

    - by Liu chwen
    I'm trying to build a web service by PHP. In my case, I called the getINFO(), but the return value on client side always null. Have no idea to solve this problem.. Here's the SOAPserver code(WS.WEB_s.php): require("WEB_s.php"); ini_set("soap.wsdl_cache_enabled", 0); $server = new SoapServer('wsdl/WEB_s.wsdl'); $server->setClass("WEB_s"); $server->handle(); Where the main Class is(WEB_s.php): final class WEB_s { public function getINFO(){ $JsonOutput = '{"key":"value",...}'; return $JsonOutput; } public function setWAN($setCommand,$newConfigfilePath){ $bOutput; return $bOutput; } } And Client side: $(document).ready(function(){ $('#qqq').button().click(function(){ var soapMessage = LoginSoap($('#uid').val(),$('#pwd').val()); alert('soapMessage'); $.ajax({ //url: 'libraries/WS.WEB_s.php/WEB_s/getINFO',//success , return null //url: 'libraries/WS.WEB_s.php/', //success , return null url: 'libraries/WS.WEB_s.php/getINFO',//success , return null type: 'GET', timeout: (10* 1000), contentType: "text/xml", dataType: "xml", success: function( data,textStatus,jqXHR){ alert('Server success(' + data+')('+ textStatus + ')(' + jqXHR + ')'); }, error: function (request, status, error) { alert('Server Error(' + status+')->'+error); }, complete: function (jqXHR, textStatus) { alert('Server success(' + jqXHR+')('+ textStatus + ')'); } }); }); }); The following is the corresponding WSDL file : http://codepaste.net/95wq9b

    Read the article

  • How do I call this function in CodeIgniter controller?

    - by Jason Shultz
    I've got this code, but I'm not sure I make it work: /** * Function: youtube data grabber * * @description : * @param $ : video code, url type (embed/url) * @return : data array * @author : Mamun. * @last -modified-by: Mamun. */ if (! function_exists('youtube_data_grabber')) { function youtube_data_grabber($video_code, $link_type = "embed") { if ($video_code != '') { if ($link_type == "embed") { $splited_data = explode("=",$video_code); $video_unique_code = substr(strrchr($splited_data[4],"/"),1,-strlen(strrchr($splited_data[4],"&"))); } else if ($link_type == "url") { $splited_data = explode("=",$video_code); $video_unique_code = substr($splited_data[1],0,-strlen(strrchr($splited_data[1],"&"))); } else { return; } // set feed URL $feedURL = 'http://gdata.youtube.com/feeds/api/videos/'.$video_unique_code; // read feed into SimpleXML object $sxml = simplexml_load_file($feedURL); return $sxml; } } } // End Youtube Function I'm not sure how to activate it is what I'm trying to say. I placed it in the controller and it's within a function for one of my pages. I don't have any syntax errors. I just don't know how to wake it up and make it work. I thought I could just put youtube_data_grabber('http://www.youtube.com/watch?v=LAcrFym10ZI', 'url'); but that didn't work. I got the code from here: http://bit.ly/b7YnDt and I have the zend functionality working. I tested it earlier and had no errors. I'm just having trouble with this youtube part. Any ideas?

    Read the article

  • What's the difference? eval() or just call the function directly?

    - by question_about_the_problem
    I'm not php expert and I don't know what's the difference(1) between a and b. a.)eval('return "'.base64_decode("encoded_text").'";') b.)base64_decode("encoded_text") -I THINK, a is php code and b is just string. And my other question is: What is the difference(2) between c and d? c.)eval('return "'.base64_decode("encoded_text").'";') d.)eval(base64_decode("encoded_text")) So I have 2 questions. Who can answer/help ? Thanks.

    Read the article

  • How to make every Class Method call a specified method before execution?

    - by norm
    I want to make my Python Class behave in such a way that when any Class method is called a default method is executed first without explicitly specifying this in the called Class. An example may help :) Class animals: def _internalMethod(): self.respires = True def cat(): self._internalMethod() self.name = 'cat' def dog(): self._internalMethod() self.name = 'dog' I want _internalMethod() to be called automatically when any method is called from an instance of animals, rather than stating it explicitly in the def of each method. Is there an elegant way to do this? Cheers,

    Read the article

  • How can I call a COM component using JavaScript in Mozilla?

    - by kumar
    I am calling a COM component in IE. Here is the code <object align="left" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="Winvideo-Silverlight2RTW-Hypervideo-Part1-WMVa.wmv"> <param name="FileName" value="Winvideo-Silverlight2RTW-Hypervideo-Part1-WMVa.wmv"> <param name="AutoRewind" value="true"> <param name="AutoStart" value="false"> <param name="ClickToPlay" value="true"> <param name="Mute" value="false"> <param name="ShowControls" value="true"> <param name="ShowDisplay" value="true"> <param name="ShowTracker" value="true"> <param name="PlayCount" value="1"> </object> It is working fine in IE, but not in Mozilla Firefox.

    Read the article

  • what happens when I don't manage to call `recv` fast enough?

    - by amn
    Hi all, I want to account for a possible scenario where clients of my TCP/IP stream socket service send data to my service faster than it manages to move the data to its buffers (I am talking about application buffers, naturally) with recv and work with it. So basically, what happens in such scenarios? Obviously, some sort of service beneath my service which is a user application, has to receive incoming stream and store it somewhere until I issue 'recv', right? Most certainly the operating system. I don't want to re-open old questions, but I can't seem to find an answer to this seemingly obvious one?

    Read the article

  • How do I call Matlab in a script on Windows?

    - by Benjamin Oakes
    I'm working on a project that uses several languages: SQL for querying a database Perl/Ruby for quick-and-dirty processing of the data from the database and some other bookkeeping Matlab for matrix-oriented computations Various statistics languages (SAS/R/SPSS) for processing the Matlab output Each language fits its niche well and we already have a fair amount of code in each. Right now, there's a lot of manual work to run all these steps that would be much better scripted. I've already done this on Linux, and it works relatively well. On Linux: matlab -nosplash -nodesktop -r "command" or echo "command" | matlab -nosplash -nodesktop ...opens Matlab in a "command line" mode. (That is, no windows are created -- it just reads from STDIN, executes, and outputs to STDOUT/STDERR.) My problem is that on Windows (XP and 7), this same code opens up a window and doesn't read from / write to the command line. It just stares me blankly in the face, totally ignoring STDIN and STDOUT. How can I script running Matlab commands on Windows? I basically want something that will do: ruby database_query.rb perl legacy_code.pl ruby other_stuff.rb matlab processing_step_1.m matlab processing_step_2.m # etc, etc. I've found out that Matlab has an -automation flag on Windows to start an "automation server". That sounds like overkill for my purposes, and I'd like something that works on both platforms. What options do I have for automating Matlab in this workflow?

    Read the article

  • Through Java, make a call to Javascript functions on networked device?

    - by stjowa
    I am doing device monitoring on a networked system. I need to know how to make Javascript calls on that device via its IP address to get certain status information (this device's status is only available through Javascript APIs, not SNMP, etc). I am working in Java. ADDED: The specific device is an Amino set-top-box. It has what it calls JMACX: JavaScript Media Access Control Extensions API specification. It allows you within an HTML document to use that API to get MUCH information about the device (cpu usage, channel info, remote-control options, etc.). I need to get this information within a Java program for specific monitoring purposes. Perhaps possible with HTTP requests? Any input would be greatly appreciated. Thanks, Steve

    Read the article

  • Can one extract model fit parameters after a ggplot stat_smooth call?

    - by Alex Holcombe
    Using stat_smooth, I can fit models to data. E.g. g=ggplot(tips,aes(x=tip,y=as.numeric(unclass(factor(tips$sex))-1))) +facet_grid(time~.) g=g+ stat_summary(fun.y=mean,geom="point") g=g+ stat_smooth(method="glm", family="binomial") I would like to know the coefficients of the glm binomial fits. I could re-do the fit with dlply and get the coefficients with ldply, but I'd like to avoid such duplication. Calling str(g) reveals the hierarchy of objects that ggplot creates, perhaps there's some way to get to the coefficients through that?

    Read the article

  • is there a flag "M_FAST" in FreeBSD kernel for Malloc Call ?

    - by KaluSingh Gabbar
    if you know there is one, can you let me know what its for ? if not please say so : ) thanks. Signature : void * malloc(unsigned long size, struct malloc_type type, int flags); for example. other flags are... M_ZERO Causes the allocated memory to be set to all zeros. M_WAITOK Indicates that it is OK to wait for resources. If the request cannot be immediately fulfilled, the current process is put to sleep to wait for resources to be released by other processes. The malloc(), realloc(), and reallocf() functions cannot return NULL if M_WAITOK is specified.** This is the root of my confusion EDIT: The clarification for M_FAST is made in my answer below.

    Read the article

  • CodeContracts: How to fullfill Require in Ctor using this() call?

    - by mafutrct
    I'm playing around with Microsoft's CodeContracts and encountered a problem I was unable to solve. I've got a class with two constructors: public Foo (public float f) { Contracts.Require(f > 0); } public Foo (int i) : this ((float)i) {} The example is simplified. I don't know how to check the second constructor's f for being 0. Is this even possible with Contracts?

    Read the article

  • jquery - How do i call the same function with different div ids?

    - by Nahom
    Hi, I have two divs with different ids (#washing,#bleaching). How can i use a function for different id's. I have tried adding both the ids together $("#washing, #bleaching"), but the function is not working correctly on the divs. Can anyone please help me... Here is the code $(function() { $("#washing").paginate({ count: 10, start: 1, display: 7, border: true, border_color: '#fff', onChange: function(page) { $('._current', '#paginationdemo').removeClass('_current').hide(); $('#p' + page).addClass('_current').show(); } }); });

    Read the article

  • how to call functions/methods within CMS block or page?

    - by latvian
    Hi, We are trying to make all our blocks and pages static so that designer or anyone else can easily change the content or design of the website, however. There is a feature that uses our own custom module. So, the template that we want to make static is calling methods out of our custom block, for example, <!--some html code--> ..... <?php $this->helpMeBePartOfCMS(); ?> ..... <!--some html code--> How do i incorporate these method calls inside cms block or page? Thank you

    Read the article

  • How do I call an upside down jQuery.slideDown()?

    - by Mark Rogers
    In the web app I'm working on I want to do a little slide up notification, like on twitter or your desktop. jQuery's .slideDown does exactly what I want, but it's upside down. The .slideUp doesn't execute an upside down version of slideDown. Instead it hides stuff, like after your cleaning up an old message you've displayed with slideDown. So what's the simplest code to do an upside down slideDown() in jQuery?

    Read the article

  • How to do Google Analytics for ajax call in Facebook?

    - by seatoskyhk
    I have a FBML game and need to track all ajax calls. At the bottom of the page, I have this: and in the javascript functions, I put this: Facebook.urchinTracker("/ajaxcallname/"); However, it doesn't work.. and what I found out is that the utmac (the google account id) is empty!!! _uacct is empty! even I set it in the FBML, it is still empty!! and I can't find a way to dynamically set _uacct be my google account ID.. any one has any idea?

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >