Search Results

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

Page 82/364 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • complex arguments for function

    - by myPost1
    My task is to create function funCall taking four arguments : pointer for 2d array of ints that stores pairs of numbers variable int maintaining number of numbers in 2d array pointer for table of pointers to functions int variable storing info about number of pointers to functions I was thinking about something like this : typedef int(*funPtr)(int, int); funPtr arrayOfFuncPtrs[]; void funCall( *int[][]k, int a, *funPtr z, int b); { }

    Read the article

  • Nested function in C

    - by Sachin Chourasiya
    Can we have a nested function in C? What is the use of nested functions? If they exist in C does there implementation differes from compiler to compiler. Are nested functions allowed in any other language? If yes then what is there significance?

    Read the article

  • Basic LaTeX questions

    - by bpc89
    Two (hopefully quick) questions about LaTeX: How do you number select functions? I'm working in a documentclass{article}, if that matters. I want to have certain functions numbered such as function1 function2 (1) function3 function4 (2) How do you make a sign to evaluate an integral? I know how to do brackets, but is it possible to only make one straight light to the right of the function with the bounds of integration? I can't figure out how to do that.

    Read the article

  • Is there a better way than a sequence of if's to handle events?

    - by Matt
    I recently ran across several objects implemented to handle events with a hard coded mapping using this pattern: public void handleEvent(Event event) { if(event.getCode() == SOME_STATIC_EVENT) doSomething(event); if(event.getCode() == ANOTHER_STATIC_EVENT) doSomethingElse(event); } where doSomething functions are implemented as methods of the same class. In hopes of striving for looser coupling, how would you suggest abstracting out this pattern? Also, what's the best approach for mapping 0..N functions to a fired event?

    Read the article

  • mathing string in python

    - by nani
    Write two functions, called countSubStringMatch and countSubStringMatchRecursive that take two arguments, a key string and a target string. These functions iteratively and recursively count the number of instances of the key in the target string. You should complete definitions forthe remaining problems, we are going to explore other substring matching ideas. These problems can be solved with either an iterative function or a recursive one. You are welcome to use either approach, though you may find iterative approaches more intuitive in these cases of matching linear structures

    Read the article

  • .DLL comments included in the .XML

    - by Lily
    I have a .DLL that i include in my Visual Studio 2008 project. The .DLL came with a .XML file that has all the comments for the properties and functions. How do i make it so that VS loads up these comments as Intellisense, so that i have a definition for the functions?

    Read the article

  • How to include js file in ajax call?

    - by Anubhaw
    Hi All, I am calling a ajax method to update a div. It contains links and functions which require java script files. But these methods and functions are not getting called properly as java script files are not getting included through ajax call. For example, i am trying to call a light box function, but it gets redirected to different page and not in light box. Thanks in advance, Anubhaw Prakash

    Read the article

  • Which button called the function?

    - by StoneBreaker
    I have two buttons which call the same function. That functions signature is - (IBAction)eraseTextField {...} I would like to figure out what button called the function. So I would like for the functions signature to be something like - (IBAction)eraseTextField: (id)sender {...}. Is there a way for the system to know to send the id of the calling object to a function that it calls? Thanks for the help.

    Read the article

  • CopyLzfileName/CreatLZFileName..what does LZ means?

    - by kiddo
    I am gathering small information regarding kernel dll functions..and I found this function called CopyLZFileName/CreateLZFileName and some other functions related to this LZ..I googled for it..I cant find a proper source for it.From the name I guess it copies/creates file but am not sure what kind of file..does LZ mean something to it.Please let me know.

    Read the article

  • KXML library Problem

    - by Hesham
    i'm working j2me with netbeans platform and i had a problem while i was trying to read a XML file and i added the library kxml.zip to my project's libraries and i used some of it's functions, there r no errors or red lines in the code, but the problem is that i cant run the project cos it come up with errors while compiling and all these errors are on the kxml functions, so any on can help me through this cos i really dont know what to do to make it run properly

    Read the article

  • R: getting a function name as a string

    - by HamiltonUlmer
    Say I have a bunch of functions, each with something likeMyFunction.1, etc. I want to pass these functions into another function, which prints out a small report. Ideally I'd like to be able to label sections of a report by which function is being used to generate the results. So are there any nice ways of getting the name of a predefined function as a string?

    Read the article

  • Best way to package a class for use in another app?

    - by Brad Hein
    I've written an Android app wich various abstract classes that perform useful functions. These functions could be leveraged in other apps. I want to share a class module with another programmer, but I don't want to share the source code. I would like to share a .class file but I'm not sure how to do the following: Compile an Android .java file into .class What does the receiver of the .class file have to do to use that .class in their project? (using Eclipse environment) Thank you very much

    Read the article

  • Call C (exposed) function from COBOL program

    - by Sunscreen
    Hi, Some time ago, I had created a DLL to be used in another C program. Basically I exposed specific functions by using the following within my dll: void __declspec(dllexport) MyFunc(myFirstArg, mySecondArg); Then I added an external file (MyExposedDll.h) with all exposed functions and structures to the new C program and included it: include MyExposedDll.h Now how can I use this dll (or mainly a dll) to a Cobol function? I need to expose a function that has two char* arguments and returns a boolean. Thanks, Sun

    Read the article

  • [jquery] e.which code for escape key

    - by Shishant
    I have two functions. When enter is pressed the functions runs correctly but when escape is pressed it doesn't. What's the correct number for the escape key? $(document).keypress(function(e) { if (e.which == 13) { $('.save').click(); } // enter (works as expected) if (e.which == 27) { $('.cancel').click(); } // esc (does not work) });

    Read the article

  • Thin down jQuery

    - by Taylor Satula
    Hi, I have been optimizing my website but the one problem that stands in my way is all the jQuery functions that I do not use. The only ones that I use are for a smooth page scroller. It just seems like such a waste of download time. My question is: Is there any script or program that will remove the jQuery code that I do not need and leave the 1 or 2 functions that I do need.

    Read the article

  • Accesing server control from withing app_code class

    - by OverSeven
    My question is about how to acces a server control (listbox) that is located in default.aspx. I wish to acces this control in Functions.cs (this class is located in the App_Code folder). My page structures: - 1 masterpage with 1 content holder - Default.aspx (all the controls are within the content place holder) - Functions.cs (located in App_Code) Now when i try to fill up the listbox elements i get the error "object reference not set to an instance of an object." What i have tried to gain acces to this control: (this code is located in Functions.cs in App_Code). This is basicly showing some items in the listbox that are located in the xml file private static string file = HttpContext.Current.Server.MapPath("~/App_Data/Questions.xml"); public static void ListItems() { XmlDocument XMLDoc = new XmlDocument(); XMLDoc.Load(file); XPathNavigator nav = XMLDoc.CreateNavigator(); XPathExpression expr; expr = nav.Compile("/root/file/naam"); XPathNodeIterator iterator = nav.Select(expr); //ATTEMPT to get acces to ServerControl(listbox) Page page = (Page)HttpContext.Current.Handler; ListBox test = (ListBox)page.FindControl("lbTest"); //control is called lbTest in Default.aspx test.Items.Clear(); while (iterator.MoveNext()) { test.Items.Add(iterator.Current.Value); } } Code from the default.apx file <%@ Page Title="" Language="C#" MasterPageFile="~/MasterFile.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="default" Debug="true" %> <%@ MasterType TypeName="Master" %> <asp:Content ID="Content1" ContentPlaceHolderID="cphContent" Runat="Server" > <asp:MultiView ID="mvTest" runat="server" > <asp:View ID="vCollection" runat="server"> <asp:ListBox ID="lbTest" runat="server" CssClass="listbox" ></asp:ListBox> </asp:View> </asp:MultiView> </asp:Content> The masterfile itself just has 1 placeholder. Then i call upon the funcion ListItems in the Default.aspx.cs file protected void Page_Load(object sender, EventArgs e) { Functions.ListItems(); } Regards.

    Read the article

  • undefined reference errors in C++

    - by Phenom
    I have files Record.h and Record.cpp. When I just include the Record.h file, I get several undefined reference errors to functions defined in those files. When I also include Record.cpp then the errors go away. Why is that? Record.h has the forward declarations for the functions it says are an undefined reference.

    Read the article

  • how to return NULL for double function with Intel C compiler?

    - by Derek
    I have some code that I am porting from an SGI system using the MIPS compiler. It has functions that are declared to have double return type. If the function can't find the right double, those functions return "NULL" The intel C compiler does not like this, but I was trying to see if there is a compiler option to enable this "feature" so that I can compile without changing code. I checked the man page, and can't seem to find it. Thanks

    Read the article

  • lambda vs. operator.attrGetter('xxx') as sort key in Python

    - by Paul McGuire
    I am looking at some code that has a lot of sort calls using comparison functions, and it seems like it should be using key functions. If you were to change seq.sort(lambda x,y: cmp(x.xxx, y.xxx)), which is preferable: seq.sort(key=operator.attrgetter('xxx')) or: seq.sort(key=lambda a:a.xxx) I would also be interested in comments on the merits of making changes to existing code that works.

    Read the article

  • Please Describe Your Struggles with Minimizing Use of Global Variables

    - by MetaHyperBolic
    Most of the programs I write are relatively flowchartable processes, with a defined start and hoped-for end. The problems themselves can be complex but do not readily lean towards central use of objects and event-driven programming. Often, I am simply churning through great varied batches of text data to produce different text data. Only occasionally do I need to create a class: As an example, to track warnings, errors, and debugging message, I created a class (Problems) with one instantiation (myErr), which I believe to be an example of the Singleton design pattern. As a further factor, my colleagues are more old school (procedural) than I and are unacquainted with object-oriented programming, so I am loath to create things they could not puzzle through. And yet I hear, again and again, how even the Singleton design pattern is really an anti-pattern and ought to be avoided because Global Variables Are Bad. Minor functions need few arguments passed to them and have no need to know of configuration (unchanging) or program state (changing) -- I agree. However, the functions in the middle of the chain, which primarily control program flow, have a need for a large number of configuration variables and some program state variables. I believe passing a dozen or more arguments along to a function is a "solution," but hardly an attractive one. I could, of course, cram variables into a single hash/dict/associative array, but that seems like cheating. For instance, connecting to the Active Directory to make a new account, I need such configuration variables as an administrative username, password, a target OU, some default groups, a domain, etc. I would have to pass those arguments down through a variety of functions which would not even use them, merely shuffle them off down through a chain which would eventually lead to the function that actually needs them. I would at least declare the configuration variables to be constant, to protect them, but my language of choice these days (Python) provides no simple manner to do this, though recipes do exist as workarounds. Numerous Stack Overflow questions have hit on the why? of the badness and the requisite shunning, but do not often mention tips on living with this quasi-religious restriction. How have you resolved, or at least made peace with, the issue of global variables and program state? Where have you made compromises? What have your tricks been, aside from shoving around flocks of arguments to functions?

    Read the article

  • How to remove strings from a compiled binary (.so)

    - by Stéphane
    How do I remove strings from / obfuscate a compiled binary? The goal is to avoid having people read the names of the functions/methods inside. It is a dynamic library (.so) compiled from C++ code for Android with the NDK tools (includes GCC) I compile with -O3 and already use arm-eabi-gcc -g mylib.so to remove debugging symbols, but when I do strings mylib.so all the names of the functions/methods are still readable.

    Read the article

  • Adding an additional click event to every element (JavaScript / jQuery)

    - by Gausie
    I'm developing a touchscreen application that, aside from everything else, records the amount of times the screen is used so that the user can be reminded to clean the screen after a predefined number of clicks. I've got the click functions written nicely, all I need now is make sure the function is called on a click. I imagine $('*').click(function() { //do something }); would accomplish my goal, but is that the best way? Also, would that overwrite other click functions assigned to the elements?

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >