Search Results

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

Page 140/364 | < Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >

  • recipe for adding Drupal node records.

    - by bert
    I am looking for a recipe for adding Drupal node records. I have identified three tables. node_revisions nid=249 - vid + 1? vid=248 - auto-increment node: nid=250 - vid + 1? vid=249 - auto-increment content_type_my_content vid=248 - from node_revisions table? nid=249 - from node table? Am I on right track? Is there some helper functions for this?

    Read the article

  • Volume Control in android application

    - by rantravee
    Hi, I'd like to know how to control my application's volume from the volume keys ( contrary to my belief , I've read they control only the ringer volume). Should I overwrite the onKey Down/Up ? , or is there other way to accomplish this ? . I'm asking because if I overwrite the upper mentioned function for an activity, then the functions will receive the event only if a view associated with the this activity has the focus, and I looking for something "Globaly" ( to work no matter what activity is running now)

    Read the article

  • libevent buffered events and half-closed sockets

    - by Vi
    It is simple to implement a port mapper using bufferevent_* functions of libevent. However, the documentation states that "This file descriptor is not allowed to be a pipe(2)". Will libevent work correctly if I shutdown the socket in one direction shutdown(socket, SHUT_WR);? I expect it to discard remaining data in the buffer and not write there anymore, but continue reading from socket and calling a read handler.

    Read the article

  • Is there such a tool for testing

    - by kjack
    Say one has a structural codebase where lots of the code is in GUI control events and has no tests. So such code, to my knowledge is not suitable for unit testing Is there a tool that can test each routine automatically replacing references to code elements external to the routine (be they functions, variables or GUI controls) with appropriate mocks(?) and record the results in a database for later comparison after code changes? So the testing program would have the duty of writing, running and reporting tests with minimal intervention?

    Read the article

  • JavaScript autocomplete upon typing

    - by James
    Right guys, all autocomplete plugins and functions that I've found, they only update upon keyup/down, etc. This is fine but the search only begins occurring once the user has stopped typing and if they are typing a phrase or word, the script is unable to instantly start suggesting, etc. I know this'll be a very simple fix or suggestion for some of you guys, so any help would be greatly appreciated as to how I can convert it to be instantly as a key is pressed. Thanks!

    Read the article

  • Generic function that accept a table and column name and returns all the primary key values that mat

    - by nashr rafeeg
    i have functions that look like this that is littered through out the code def get_M_status(S): M_id = merital.select(merital.c.marital_status_description == S).execute().fetchone() if M_id == None: print "Warning: No Marital id found for %s Merital status to Single" % S M_id = merital.select(merital.c.marital_status_description == "Single").execute().fetchone() return M_id[0] i was wondering if their is a way to write a generic function where i can pass the relevant values ie: table name primary key column filter column and filter value cheers

    Read the article

  • CGPath and Quartz 2D

    - by iphonedevnoob
    I want to create a triangle using Quartz 2D functions. The 3 edges of the triangle should be in different colors. I am able to create the triangle but not able to set the color of each edge or subpath separately. Any suggestions or sample code are much appreciated.

    Read the article

  • Computational complexity of Fibonacci Sequence

    - by Juliet
    I understand Big-O notation, but I don't know how to calculate it for many functions. In particular, I've been trying to figure out the computational complexity of the naive version of the Fibonacci sequence: int Fib(int n) { if (n <= 1) return 1; else return Fib(n - 1) + Fib(n - 2); } What is the computational complexity of the Fibonnaci sequence and how is it calculated?

    Read the article

  • Do any JS implementations currently support (or have support on the roadmap for) fast, vectorized op

    - by agnoster
    I'd like to do a bit of matrix/vector arithmetic in JavaScript, and was wondering if any browsers or other JS implementations actually have support for vectorized operations, for instance for quickly summing the entries of two Arrays (or summing, or whatever). Even if that currently doesn't mean it compiles down to vectorized operations, at least some language support would be nice for when it does get implemented - I'd take the existence of functions or syntax to support it as a step in the right direction. (Understandably, "vectorization javascript" searches are pretty much all about graphics and SVG.)

    Read the article

  • Detect marker with opencv and python

    - by Mitch
    Hi im trying to detect a marker in a webcam video feed and overlay it with a 3d object - pretty much exactly like this: http://www.morethantechnical.com/2009/06/28/augmented-reality-with-nyartoolkit-opencv-opengl/ i know artoolkit is the best module for this, but i was hoping to just use opencv in python since i dont know nearly enough c/c++ to be able to use artoolkit. im hoping someone will be able to get me on the right track towards detecting the marker and determining its location and orientation etc since i have no idea how best to go about this or what functions i should be using thanks mitch

    Read the article

  • Need to lookup function arguments (in/out) from pdb by dbghelp

    - by Usman
    I need to lookup function parameters(their types infact) from PDB file From dbghelp, we can parse any pdb and can get info like how many functions,addresses function names and others etc. My problem is I am also interested to get function parameters as well. As SYMBOL_INFO structure in callback function only contains symbolName,Addresses and Size. How can we lookup PARAMETERES(in/out Types/names)of any function. Regards Usman

    Read the article

  • Pros and Cons of automating Excel using VBA vs .Net

    - by Andy
    I've been tasked with creating a financial planning tool in Excel that would benefit from some custom functions/macros. My initial reaction was to use VBA. I've used it to drive Excel before (say 5 years ago). But I then began to wonder if I would be better off using VSTO. Has anyone has experience using both techs and can list the pros and cons so that I can evaluate which course would be best.

    Read the article

  • convert a number to the shortest possible character string while retaining uniqueness

    - by alumb
    I have a list of digits, say "123456", and I need to map it to a string, any string. The only constraint on the map functions are: each list of digits must map to a unique character string (this means the string can be arbitrarily long) character string can only contain 0-9, a-z, A-Z What map function would produce the shortest strings? Solutions in JavaScript are preferred. note: Clearly the simplest solution is to use the original list of digits, so make sure you solution does better than that.

    Read the article

  • Best way to fetch remote RSS through authenticated proxy and parse it

    - by grajea
    I'm trying to get a remote RSS through proxy and parse it. I'm using magpierss, but it doesn't allow reaching internet through a proxy (or I don't know how to do it). I assume the option is to, first, fetch the rss with curl functions, that allows proxy authenticating, but .... are there any class to do this in a easy way, or ... does magpie support using proxy, and how? Thanks in advance.

    Read the article

  • elisp macro to write function?

    - by aaa
    hello I have written few functions, which nearly identical, save for names. For example ; x is name, such as function/paragraph/line/etc. (defun my-x-function (interactive) (mark-x) (do-more-stuff) (modify-x)) is there a way to put it automatically? I have a feeling this is what macros do, but I am not sure how to use them. you help/maybe small example would be great Thanks

    Read the article

  • Need helping creating a loop in R. Have many similarly named variables I have to apply the same func

    - by user335897
    I am using a dataset w/variables that have very similar names. I have to apply the same functions to 13 variables at a time and I'm trying to shorten the code, instead of doing each variable individually. q01a.F=factor(q01a) q01b.F=factor(q01b) q01c.F=factor(q01c) q01d.F=factor(q01d) q01e.F=factor(q01e) q01f.F=factor(q01f) q01g.F=factor(q01g) q01h.F=factor(q01h) q01i.F=factor(q01i) q01j.F=factor(q01j) q01k.F=factor(q01k) q01l.F=factor(q01l) q01m.F=factor(q01m) Suggestions?

    Read the article

  • Repetitive content in docstrings

    - by Morgoth
    What are good ways to deal with repetitive content in docstrings? I have many functions that take 'standard' arguments, which have to be explained in the docstring, but it would be nice to write the relevant parts of the docstring only once, as this would be much easier to maintain and update. I naively tried the following: arg_a = "a: a very common argument" def test(a): ''' Arguments: %s ''' % arg_a pass But this does not work, because when I do help(test) I don't see the docstring. Is there a good way to do this?

    Read the article

  • Getting 256 colors out of ruby-ncurses

    - by push.cx
    I've got 256 colors working great in my terminal (test scripts here), but it stops working when I use ncurses (via Ruby-ncurses). Printing the escape sequences given on that page works fine, but when I initialize ncurses 'puts' stops working and I can't output the colors with any of the various ncurses color changing/string output functions I've found. What gives?

    Read the article

  • What are the benefits of using Boost.Phoenix?

    - by Denis Shevchenko
    Hello all! I can not understand what the real benefits of using Boost.Phoenix. When I use it with Boost.Spirit grammars, it's really useful: double_[ boost::phoenix::push_back( boost::phoenix::ref( v ), _1 ) ] When I use it for lambda functions, it's also useful and elegant: boost::range::for_each( my_string, if_ ( '\\' == arg1 ) [ arg1 = '/' ] ); But what are the benefits of everything else in this library? The documentation says: "Functors everywhere". I don't understand what is the good of it?

    Read the article

  • Trim a string in C

    - by Orion Edwards
    Briefly: I'm after the equivalent of .NET's String.Trim in C using the win32 and standard C api (compiling with MSVC2008 so I have access to all the C++ stuff if needed, but I am just trying to trim a char*). Given that there is strchr, strtok, and all manner of other string functions, surely there should be a trim function, or one that can be repurposed... Thanks

    Read the article

  • Ruby on Rails function grapher

    - by Hock
    Hi, I'm looking for a function grapher that I can use in a small Rails application I'm working on for my university. Is there anything out there? If it needs the values (points) is not a problem but it would be better if it just parsed the equation. The functions will be 100% in ruby format (for example Math.exp(3*x))... Thanks a lot! Nicolás Hock

    Read the article

  • Is there any way to find unreferenced code in Flex Builder?

    - by Andrew Aylett
    We've got several Flex projects, one of which has just been refactored. I'm wondering if there's an easy way to tell which classes and functions (if any) aren't being used any more? I've discovered that we've definitely got some unused code, because running ASDoc on the entire project reports some compilation errors which don't get reported by Flex Builder (implying that those classes aren't being used any more). I'm hoping to find a more robust and complete method, and preferably one which can work at function level too.

    Read the article

  • What are all the instances of syntactic sugar in Scala?

    - by Jackson Davis
    I decided to create this question to have a single source for all things syntactic sugar in Scala. I feel these details are some of the things most frustrating to starting users and are hard to search for since most/all of them are purely symbols and are thus hard to search for without knowing the name of the concept. TODO: implicit conversions _ syntax for anonymous functions Extractors(Unapply/UnapplySeq) Other things I'm forgetting

    Read the article

< Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >