Search Results

Search found 9082 results on 364 pages for 'c functions'.

Page 159/364 | < Previous Page | 155 156 157 158 159 160 161 162 163 164 165 166  | Next Page >

  • Execute something on application startup?

    - by Nick Brooks
    I have a class in my application which handles all the controls and all the functions and variables are stored in it. How can I add a function which handles the application startup to it? So basically I need to handle 'applicationDidFinishLaunching' in my class as well as in the application delegate. How do I do that?

    Read the article

  • How to add ads to the end of RSS on wordpress?

    - by zeina
    I have added a function to functions.php on my theme. function insertAds($content) { $content = $content.' add goes here'; return $content;} add_filter('the_content_feed', 'insertAds'); add_filter('the_excerpt_rss', 'insertAds'); The problem is that I'm having the add displayed under each content, and not at the end of the rss page. How can I fix that?

    Read the article

  • Find out why Xcode has decided to link to a particular library

    - by andygeers
    I'm using the Unity 3D engine to build an iPhone app, and when I go to generate my Xcode project for compilation, it includes a few fairly large libraries: Mono.Security.dll.s, System.dll.s, System.Core.dll.s, etc. I don't know if this question is really an Xcode question or a Unity question, but I'm trying to figure out why each of those libraries is being linked - which functions / classes are being referenced - ideally so that I can rewrite my code to remove as many of the dependencies as possible. Does anybody know a way to find this information out?

    Read the article

  • iPhone - Change entity class (NSManagedObject) to make them initializable

    - by ncohen
    Hi everyone, I would like to use my custom NSManagedObject like a normal object (as well as its regular functions). Is it possible to modify the class in order to be able to initialize it like a normal object? [[myManagedObject alloc] init]; Thanks edit: to clarify the question, will it screw everything up if I change the @dynamic with @synthesize in the implementation?

    Read the article

  • Is it more efficient (Performance) to store the CFC in application variables OR instance the CFC on the page call?

    - by Mitchell Guimont
    Hello, I'm working on a ColdFusion dynamic website. For this website, there are a lot of CFCs and a lot of functions within each CFC. Would it be more efficient to store an instance of the CFC in an application variable, then to instance each CFC separately on each page load. For each page, at most 2 separate CFCs get called. I'm also interested in how performance will be effected when requests increase (Stress). Thanks!

    Read the article

  • JNA problem with char** (in dll)

    - by underline
    Hi, ok it is 'easy' to make jna wrapper solution for mapping exported functions within dll using jna: long f1(int x), just int long f2(char* y), just char[] but how to deal with long f3(char** z) ? I need f3's result(long) as well as z value on java side. Please don't say cpp code should be rewritten to avoid this:-)

    Read the article

  • Creating a small encrypted string in PHP

    - by JustJon
    I am looking to create a small encrypted string, like the referral strings used by Twitpic or bit.ly, for a website I am working on for referral purposes. Any of the built-in functions like MD5 and mcrypt each make strings that are too long for my purposes. Is there an easy way to create a string like this? Thanks.

    Read the article

  • C++ priority queue structure used ?

    - by John Retallack
    While searching for some functions in C++ STL documentation I read that push and pop for priority queues needs constant time. "Constant (in the priority_queue). Although notice that push_heap operates in logarithmic time." My question is what kind of data structure is used to mantain a priority queue with O(1) for push and pop ?

    Read the article

  • Nested Execution Flow Control

    - by chris
    I've read tens of answers related to callbacks, promises and other ways to control flow, but I can't still wrap my head around this task, obviously due to my lack of competence. I have a nested problem: In test_1() (and the other functions) I would like to ensure that the rows are added to the table according to the order in which the elements are in the object; I would like to execute either test_2 or test_3 (or both after each other) only after test_1 has finished completely. Actually the right sequence will only be known at runtime (there will be a switch with the possible sequences, like 1,2,3 or 1,3,2 or 1,2,1,3 or 1,3,3,2, etc...) Code: $(function () { // create table tbl = document.createElement('table'); tbl.className = "mainTbl"; $("body").append(tbl); }); function test_1() { $.each(obj, function () { var img = new Image(); img.onload = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "loaded"; }; img.onerror = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "not loaded"; }; img.src = this.url; }); } function test_2() { $.each(obj, function () { var img = new Image(); img.onload = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "loaded"; }; img.onerror = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "not loaded"; }; img.src = this.url; }); } function test_3() { $.each(obj, function () { var img = new Image(); img.onload = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "loaded"; }; img.onerror = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "not loaded"; }; img.src = this.url; }); } I know that calling the functions in sequence doesn't work as they don't wait for each other... I think promises are they way to go but I can't find the right combination and the documentation is way too complex for my skills. What's the best way to structure the code so that it's executed in the right order?

    Read the article

  • Use a Datamodule in a Service Application

    - by O Engenheiro
    I wrote my Win32 App to test and debug. I've created a datamodule with all functionality needed to run the TCP sockets and IBDatabase components. After successfully testing the Datamodule in the Win32 application environment I am trying to hook the Datamodule into a Service Application template that I created, I can get nowhere in getting it to run. Could someone indicate whether this strategy of using a Datamodule with Component functionality encapsulating the primary service functions is workable and give a simple template example of how to hook it up if it is??

    Read the article

  • How to combine query strings in PHP

    - by incrediman
    Given a url, and a query string, how can I get the url resulting from the combination of the query string with the url? I'm looking for functionality similar to .htaccess's qsa. I realize this would be fairly trivial to implement completely by hand, however are there built-in functions that deal with query strings which could either simplify or completely solve this? Example input/result sets: Url="http://www.example.com/index.php/page?a=1" QS ="?b=2" Result="http://www.example.com/index.php/page?a=1&b=2" - Url="page.php" QS ="?b=2" Result="page.php?b=2"

    Read the article

  • PHP: Where to place return 'false' value?

    - by Mike
    Is one of the following functions better than the other, in terms of where to place the 'return false' statement? Function #1: function equalToTwo($a, $b) { $c = $a + $b; if($c == 2) { return true; } return false; } Function #2: function equalToTwo($a, $b) { $c = $a + $b; if($c == 2) { return true; } else { return false; } } Thanks!

    Read the article

  • FileStream to save file then immediately unlock in .NET ?

    - by aron
    I have this code that saves a pdf file. FileStream fs = new FileStream(SaveLocation, FileMode.Create); fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length); fs.Flush(); fs.Close(); It works fine. However sometimes it does not release the lock right away and that causes file locking exceptions with functions run after this one run. Is there a ideal way to release the file lock right after the fs.Close()

    Read the article

  • having trouble with zooming in android webview

    - by Talha
    I'm new to android. I'm using webview in scrollview to display my local html page (html has text only). I created two buttons for zoomin and zoomout using behind function zoomIn() & zoomOut() respectively. These functions work fine. The problenm is, when I zoom in, some of the text goes out from both top and bottom and it doesn't appear when I scroll. How can I resolve this?

    Read the article

  • [NUnit+Moq] Guidelines for using Assert versus Verify

    - by emddudley
    I'm new to unit testing, and I'm learning how to use NUnit and Moq. NUnit provides Assert syntax for testing conditions in my unit tests, while Moq provides some Verify functions. To some extent these seem to provide the same functionality. How do I know when it's more appropriate to use Assert or Verify? Maybe Assert is better for confirming state, and Verify is better for confirming behavior (Classical versus Mockist)?

    Read the article

  • adding javascript events to freemind maps

    - by pri_dev
    I have created freemind maps using the tool, right now in the process of integrating the map with my web application. I have some questions on the usage of freemind maps 1) Instead of using the freemindbrowser.html and the jar file to integrate a map with a website/ web app, can we do an export to Javascript from the tool and then integrate that exported file (.html) with the web site? 2) I want to be able to add javascript functions on events like node click, how do I do that? Thanks in Advance

    Read the article

  • How do I use multiple arguments from an array to construct an execl() call in C?

    - by chucknelson
    I have a string array in C named args[] - now how can I use this list of arguments to construct a proper call to execl()? So if the array contains: {"/bin/ls","ls","-a","-l"} ...how can I eventually construct an execl() call that is: execl("/bin/ls","ls","-a","-l",NULL); I must be thinking about this wrong, as I can't find anything online, just talk about defining functions that can take a variable number of arguments.

    Read the article

< Previous Page | 155 156 157 158 159 160 161 162 163 164 165 166  | Next Page >