Search Results

Search found 5279 results on 212 pages for 'optional arguments'.

Page 4/212 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Passing arguments and values form HTML to jQuery (events)

    - by Jaroslav Moravec
    What is the practice to pass arguments from HTML to jQuery events function. For example getting id of row from db: <tr class="jq_killMe" id="thisItemId-id"> ... </tr> and jQuery: $(".jq_killMe").click(function () { var tmp = $(this).attr('id).split("-"); var id = tmp[0] // ... } What's the best practise, if I want to pass more than one argument? Is it better not to use jQuery? For example: <tr onclick="killMe('id')"> ... </tr> I didn't find the answer on my question, I will be glad even for links. Thanks.

    Read the article

  • Default Arguments in Matlab

    - by Scott
    Hello. Is it possible to have default arguments in Matlab? For instance, here: function wave(a,b,n,k,T,f,flag,fTrue=inline('0')) I would like to have the true solution be an optional argument to the wave function. If it is possible, can anyone demonstrate the proper way to do this? Currently, I am trying what I posted above and I get: ??? Error: File: wave.m Line: 1 Column: 37 The expression to the left of the equals sign is not a valid target for an assignment. Thanks!

    Read the article

  • How does R treat positional arguments

    - by inspectorG4dget
    I'm a python guy and very new to R (so far, all I've done is copy-paste code and screen-shot the resulting, graph). I would now like to actually learn the language so that I can draw useful plots (right now, I am trying to plot this). In attempting my first plot, I came across this function call: sets_options("universe", seq(from = 0, to = 25, by = 0.1)) Now, I would like to know if I can achieve the same result by calling sets_options("universe", seq(0, 25, 0.1)) The help page for seq doesn't speak to this specifically (or I'm not reading it correctly), so I was hoping someone could shed some light on how R handles positional arguments I tried calling the function that way in R and it worked (no syntax errors, etc), but I don't know how to test the output of that function, so I'm forced to ask here

    Read the article

  • c++: truth assignment warning with arguments?

    - by John
    I use the following to work with arguments in my programs, but it seems to just hand me a warning (just a warning): "warning: suggest parentheses around assignment used as truth value" The beginning of the code is as follows: enum{OPT_DISP_H = 0x2, OPT_DISP_W = 0x1}; int main(int argc, char *argv[]) { int opt = 0x00; char c; while((++argv)[0] && argv[0][0]=='-'){ while(c =* ++argv[0]) switch(c){ case 'h': opt |= OPT_DISP_H; break; //etc.. The while(c =* ++argv[0]) part being where the warning persists. The code works fine, but what does this warning mean opposed to what is used? I think the code is c = *++argv[0], using the pointer. So why does the single = work and what is really recommended to be used?

    Read the article

  • x86_64 Assembly Command Line Arguments

    - by Brandon oubiub
    I'm new to assembly, and I just got familiar with the call stack, so bare with me. To get the command line arguments in x86_64 on Mac OS X, I can do the following: _main: sub rsp, 8 ; 16 bit stack alignment mov rax, 0 mov rdi, format mov rsi, [rsp + 32] call _printf Where format is "%s". rsi gets set to argv[0]. So, from this, I drew out what (I think) the stack looks like initially: top of stack <- rsp after alignment return address <- rsp at beginning (aligned rsp + 8) [something] <- rsp + 16 argc <- rsp + 24 argv[0] <- rsp + 32 argv[1] <- rsp + 40 ... ... bottom of stack And so on. Sorry if that's hard to read. I'm wondering what [something] is. After a few tests, I find that it is usually just 0. However, occasionally, it is some (seemingly) random number. EDIT: Also, could you tell me if the rest of my stack drawing is correct?

    Read the article

  • Passing arguments and values from HTML to jQuery (events)

    - by Jaroslav Moravec
    What is the practice to pass arguments from HTML to jQuery events function. For example getting id of row from db: <tr class="jq_killMe" id="thisItemId-id"> ... </tr> and jQuery: $(".jq_killMe").click(function () { var tmp = $(this).attr('id).split("-"); var id = tmp[0] // ... } What's the best practise, if I want to pass more than one argument? Is it better not to use jQuery? For example: <tr onclick="killMe('id')"> ... </tr> I didn't find the answer on my question, I will be glad even for links. Thanks. Edit (pre solution) So you suggested two methods to do that: Add custom attributes to element (XHTML) Use attribute ID and parse it by regex Attribute data-* attributes in HTML5 Use hidden children elements I like first solution, but... I would like to (I have to (employer)) produce valid code. Here is a nice question and answers: http://stackoverflow.com/questions/994856/so-what-if-custom-html-attributes-arent-valid-xhtml And the second is not so pretty as the first, but valid. So the compromise is... The third is the solution for future, but here is a lot of CMS where we have to use XHTML or HTML4. (And HTML5 is the long process)

    Read the article

  • Cannot build digiKam

    - by Tichomir Mitkov
    I'm trying to compile digiKam 2.8.0. I have installed the required libraries but cMake seems to stuck without any meaningful reason. Here is the output of cMake: $ cmake -DCMAKE_BUILD_TYPE=relwithdebinfo -DCMAKE_INSTALL_PREFIX=/usr/local . -- Found Qt-Version 4.7.1 (using /usr/bin/qmake) -- Found X11: /usr/lib64/libX11.so -- Found KDE 4.6 include dir: /usr/include -- Found KDE 4.6 library dir: /usr/lib64 -- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler -- Found automoc4: /usr/bin/automoc4 -- Local kdegraphics libraries will be compiled... YES -- Handbooks will be compiled..................... YES -- Extract translations files..................... NO -- Translations will be compiled.................. YES -- ---------------------------------------------------------------------------------- -- Starting CMake configuration for: libmediawiki ----------------------------------------------------------------------------- -- The following external packages were located on your system. -- This installation will have the extra features provided by these packages. ----------------------------------------------------------------------------- * QJSON - Qt library for handling JSON data ----------------------------------------------------------------------------- -- Congratulations! All external packages have been found. ----------------------------------------------------------------------------- -- ---------------------------------------------------------------------------------- -- Starting CMake configuration for: libkgeomap -- Found Qt-Version 4.7.1 (using /usr/bin/qmake) -- Found X11: /usr/lib64/libX11.so -- Check Kexiv2 library in local sub-folder... -- Found Kexiv2 library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkexiv2 -- kexiv2 found, the demo application will be compiled. -- ---------------------------------------------------------------------------------- -- Starting CMake configuration for: libkface -- Found Qt-Version 4.7.1 (using /usr/bin/qmake) -- Found X11: /usr/lib64/libX11.so -- First try at finding OpenCV... -- Great, found OpenCV on the first try. -- OpenCV Root directory is /usr/share/opencv -- External libface was not found, use internal version instead... -- ---------------------------------------------------------------------------------- -- Starting CMake configuration for: kipi-plugins -- Check Kexiv2 library in local sub-folder... -- Found Kexiv2 library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkexiv2 -- Check for Kdcraw library in local sub-folder... -- Found Kdcraw library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkdcraw CMake Error at extra/libkdcraw/cmake/modules/FindKdcraw.cmake:137 (file): file Internal CMake error when trying to open file: /home/tichomir/Downloads/digikam-2.8.0/extra/libkdcraw/libkdcraw/version.h for reading. Call Stack (most recent call first): extra/kipi-plugins/CMakeLists.txt:123 (FIND_PACKAGE) -- Check Kipi library in local sub-folder... -- Found Kipi library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkipi CMake Warning at extra/kipi-plugins/CMakeLists.txt:139 (MESSAGE): libkdcraw: Version information not found, your version is probably too old. -- Found GObject libraries: /usr/lib64/libgobject-2.0.so;/usr/lib64/libgmodule-2.0.so;/usr/lib64/libgthread-2.0.so;/usr/lib64/libglib-2.0.so -- Found GObject includes : /usr/include/glib-2.0/gobject -- Check for Ksane library in local sub-folder... -- Found Ksane library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libksane -- Check for KGeoMap library in local sub-folder... -- Found KGeoMap library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkgeomap -- Check Mediawiki library in local sub-folder... -- Found Mediawiki library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libmediawiki -- Check Vkontakte library in local sub-folder... -- Found Vkontakte library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkvkontakte -- Boost version: 1.38.0 -- libkgeomap: Found version 2.0.0 -- Found X11: /usr/lib64/libX11.so -- CMake version: cmake version 2.8.9 -- CMake version (cleaned): cmake version 2.8.9 -- -- ---------------------------------------------------------------------------------- -- kipi-plugins 2.8.0 dependencies results <http://www.digikam.org> -- -- libjpeg library found.................... YES -- libtiff library found.................... YES -- libpng library found..................... YES -- libkipi library found.................... YES -- libkexiv2 library found.................. YES -- libkdcraw library found.................. YES -- libxml2 library found.................... YES (optional) -- libxslt library found.................... YES (optional) -- libexpat library found................... YES (optional) -- native threads support library found..... YES (optional) -- libopengl library found.................. YES (optional) -- Qt4 OpenGL module found.................. YES -- libopencv library found.................. YES (optional) -- QJson library found...................... YES (optional) -- libgpod library found.................... YES (optional) -- Gdk library found........................ YES (optional) -- libkdepim library found.................. YES (optional) -- qca2 library found....................... YES (optional) -- libkgeomap library found................. YES (optional) -- libmediawiki library found............... YES (optional) -- libkvkontakte library found.............. YES (optional) -- boost library found...................... YES (optional) -- OpenMP library found..................... YES (optional) -- libX11 library found..................... YES (optional) -- libksane library found................... YES (optional) -- -- kipi-plugins will be compiled............ YES -- Shwup will be compiled................... YES (optional) -- YandexFotki will be compiled............. YES (optional) -- HtmlExport will be compiled.............. YES (optional) -- AdvancedSlideshow will be compiled....... YES (optional) -- ImageViewer will be compiled............. YES (optional) -- AcquireImages will be compiled........... YES (optional) -- DNGConverter will be compiled............ YES (optional) -- RemoveRedEyes will be compiled........... YES (optional) -- Debian Screenshots will be compiled...... YES (optional) -- Facebook will be compiled................ YES (optional) -- Imgur will be compiled................... YES (optional) -- VKontakte will be compiled............... YES (optional) -- IpodExport will be compiled.............. YES (optional) -- Calendar will be compiled................ YES (optional) -- GPSSync will be compiled................. YES (optional) -- Mediawiki will be compiled............... YES (optional) -- Panorama will be compiled................ YES (optional) -- ---------------------------------------------------------------------------------- -- -- ---------------------------------------------------------------------------------- -- Starting CMake configuration for: digiKam -- Check for Kdcraw library in local sub-folder... -- Found Kdcraw library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkdcraw CMake Error at extra/libkdcraw/cmake/modules/FindKdcraw.cmake:137 (file): file Internal CMake error when trying to open file: /home/tichomir/Downloads/digikam-2.8.0/extra/libkdcraw/libkdcraw/version.h for reading. Call Stack (most recent call first): core/CMakeLists.txt:156 (FIND_PACKAGE) -- Check Kexiv2 library in local sub-folder... -- Found Kexiv2 library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkexiv2 -- Check Kipi library in local sub-folder... -- Found Kipi library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkipi -- Check Kface library in local sub-folder... -- Found Kface library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkface -- Check for KGeoMap library in local sub-folder... -- Found KGeoMap library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkgeomap -- PGF_INCLUDE_DIRS = /usr/local/include/libpgf -- PGF_INCLUDEDIR = /usr/local/include/libpgf -- PGF_LIBRARIES = pgf -- PGF_LDFLAGS = -L/usr/local/lib;-lpgf -- PGF_CFLAGS = -I/usr/local/include/libpgf -- PGF_VERSION = 6.12.24 -- PGF_CODEC_VERSION_ID = 61224 -- Could NOT find any working clapack installation -- Boost version: 1.38.0 -- Check for LCMS1 availability... -- Found LCMS1: /usr/lib64/liblcms.so /usr/include -- Paralelized PGF codec disabled... -- Identified libjpeg version: 62 -- Found MySQL server executable at: /usr/sbin/mysqld -- Found MySQL install_db executable at: /usr/bin/mysql_install_db CMake Warning at core/CMakeLists.txt:310 (MESSAGE): libkdcraw: Version information not found, your version is probably too old. -- libkgeomap: Found version 2.0.0 -- Found gphoto2: -L/usr/lib64 -lgphoto2_port;-L/usr/lib64 -lgphoto2 -lgphoto2_port -lm -- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig -- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig -- PKGCONFIG() indicates that lqr-1 is not installed (install the package which contains lqr-1.pc if you want to support this feature) -- Could NOT find Lqr-1 (missing: LQR-1_INCLUDE_DIRS LQR-1_LIBRARIES) -- Found SharedDesktopOntologies: /usr/share/ontology -- Found SharedDesktopOntologies: /usr/share/ontology (found version "0.5.0", required is "0.2") -- -- ---------------------------------------------------------------------------------- -- digiKam 2.8.0 dependencies results <http://www.digikam.org> -- -- Qt4 SQL module found..................... YES -- MySQL Server found....................... YES -- MySQL install_db tool found.............. YES -- libtiff library found.................... YES -- libpng library found..................... YES -- libjasper library found.................. YES -- liblcms library found.................... YES -- Boost Graph library found................ YES -- libkipi library found.................... YES -- libkexiv2 library found.................. YES -- libkdcraw library found.................. YES -- libkface library found................... YES -- libkgeomap library found................. YES -- libpgf library found..................... YES (optional) -- libclapack library found................. NO (optional - internal version used instead) -- libgphoto2 and libusb libraries found.... YES (optional) -- libkdepimlibs library found.............. YES (optional) -- Nepomuk libraries found.................. YES (optional) -- libglib2 library found................... YES (optional) -- liblqr-1 library found................... NO (optional - internal version used instead) -- liblensfun library found................. YES (optional) -- Doxygen found............................ YES (optional) -- digiKam can be compiled.................. YES -- ---------------------------------------------------------------------------------- -- -- Adjusting compilation flags for GCC version ( 4.5.1 ) -- Configuring incomplete, errors occurred! Actually this line shows a sign of error CMake Error at extra/libkdcraw/cmake/modules/FindKdcraw.cmake:137 (file): file Internal CMake error when trying to open file: /home/tichomir/Downloads/digikam-2.8.0/extra/libkdcraw/libkdcraw/version.h for reading. 'version.h' doesn't exists instead there is a file 'version.h.cmake' I have installed libkdcraw (64-bit) from sources. I'm using OpenSuse

    Read the article

  • Mathematica: get number of arguments passed to a function?

    - by dbjohn
    How do I get the number of arguments passed to a function, such as Plus[2,3,4,5] has 4 arguments passed to it. I was thinking it may involve the use of the function Length and getting the arguments into a list. The intention is to iterate an operation based on the number of arguments for a function. There is probably a simple solution or function but I haven't come across it yet. Any other ways or suggestions are welcome as well?

    Read the article

  • OWB 11.2.0.2: Managing Use of Optional OWB Features

    - by antonio romero
    Most OWB users know that parts of Warehouse Builder are covered with the database license and others require additional options (such as the Oracle Data Integrator Enterprise Edition license). Warehouse Builder 11.2.0.2 adds the ability to disable optional feature groups. This lets you avoid the inadvertent use of most licensed features at the repository level.  This capability is accessed through the 11.2.0.2 Repository Assistant. We’ll look at the basics here. There’s also a new whitepaper that details which features are in the different feature groups associated with licenses. Read on to find out more. In Repository Assistant in 11.2.0.2, in Step 2 (“Choose Operation”), you will see a new task, “Manage Optional Features.” This is where you choose which features to enable or disable.

    Read the article

  • null values vs "empty" singleton for optional fields

    - by Uko
    First of all I'm developing a parser for an XML-based format for 3D graphics called XGL. But this question can be applied to any situation when you have fields in your class that are optional i.e. the value of this field can be missing. As I was taking a Scala course on coursera there was an interesting pattern when you create an abstract class with all the methods you need and then create a normal fully functional subclass and an "empty" singleton subclass that always returns false for isEmpty method and throws exceptions for the other ones. So my question is: is it better to just assign null if the optional field's value is missing or make a hierarchy described above and assign it an empty singleton implementation?

    Read the article

  • SSRS optional parameters settings

    - by Natasa Gavrilovic
    Recently I had to create couple SQL Server Reports (SSRS) with optional parameters built in. It took me a while to refresh memory how this can be done. It was very simple to create reports and processes behind, but connecting these two were are little bit challenging – stored procedure was tested and worked fine, but when the report was passing optional parameters it didn’t returned expected results. After tweaking SQL stored procedures and reports parameter options, the following approach turn to be the winning one. 1) Defining report parameters: From Menu bar select ‘View’ and ‘Report Data’ Newly open window should have ‘Parameters’ folder display Right click on this folder and select ‘Add new parameter...’                             Default values need to be added from a query                 A query values need to include ‘’ (empty string) – as highlighted                   2) SQL stored procedure should have CASE statements inside WHERE and it was the only way that a report was getting correct results back.

    Read the article

  • How to use the AAA syntax to do an AssertWasCalled but ignore arguments

    - by Toran Billups
    I'm using the new AAA syntax and wanted to know the syntax to do the below and have the mock ignore the agruments. mockAccount.AssertWasCalled(account = account.SetPassword("dsfdslkj")); I think the below is how I would do this with the record/ replay model but I wanted to see if this could be done with AAA using 3.6 mockAccount.Expect(account = account.SetPassword("sdfdsf")).IgnoreArguments(); mockAccount.VerifyAllExpectations(); Thank you in advance

    Read the article

  • Xcode & passing command line arguments

    - by Brisco
    I just started working with C & Xcode and I've run into a little difficulty. All I want to do is read a file from the command line and see the output in the terminal. I think my problem lies with the path to the file that I want to read in. I'm using a Mac and the file is on my desktop, so the path should be Users/myName/Desktop/words.txt. Is this correct? This is my code: #import <Foundation/Foundation.h> int main (int argc, const char* argv[]){ if(argc == 1){ NSLog(@" you must pass at least one arguement"); return 1; } NSLog(@"russ"); FILE* wordFile = fopen(argv[1] , "r"); char word[100]; while (fgets(word,100,wordFile)) { NSLog(@" %s is %d chars long", word,strlen(word)); } fclose(wordFile); return 0; }//main

    Read the article

  • Invoke Java via Batch File with Filepath Arguments

    - by EricIdyll
    Hi there, I'm having an issue getting files loaded into an app called GCS, by dragging them onto the executable. GCS can be invoked on Windows with a bat file, which goes like this: @echo off start javaw -Xmx256M -jar "GURPS Character Sheet.app/Contents/Resources/Java/GCS.jar" %* If I hard code a filepath in place of the batch argument wildcard (with quotes), it works. If I run the debugger with a filepath argument it works. If I echo %, it gives me the correct filename with quotes around it. If I add quotes around % it still breaks. I have a disconnect here between DOS and Java, and I'm at a loss. Does anyone recognize this problem? Thanks in advance.

    Read the article

  • GCC, functions, and pointer arguments, warning behaviour

    - by James Morris
    I've recently updated to a testing distribution, which is now using GCC 4.4.3. Now I've set everything up, I've returned to coding and have built my project and I get one of these horrible messages: *** glibc detected *** ./boxyseq: free(): invalid pointer: 0x0000000001d873e8 *** I absolutely know what is wrong here, but was rather confused as to when I saw my C code where I call a function which frees a dynamically allocated data structure - I had passed it an incompatible pointer type - a pointer to a completely different data structure. warning: passing argument 1 of 'data_A_free' from incompatible pointer type note: expected 'struct data_A *' but argument is of type 'struct data_B *' I'm confused because I'm sure this would have been an error before and compilation would never have completed. Is this not just going to make life more difficult for C programmers? Can I change it back to an error without making a whole bunch of other warnings errors too? Or am I loosing the plot and it's always been a warning?

    Read the article

  • struct and arguments

    - by jay
    I am trying to modularize a function that used to add values to multiple structures in one call. Now I want to do one value addition per call, but I am not sure how to make a less specific argument reference. func ( [?] *val ) { }

    Read the article

  • Passing arguments to a C program

    - by Radhika
    Hi All, I was writing a C program where I use 6 variables a,b,c,d,e,f a,b,c are constant values which I should pass as an argument(command line) d,e,f are going to be size of arrays(which are a part of a structure) typedef struct { blah blah } ex; ex ex0[d]; I am very confused about how to pass all these as argument. Right now I have hard coded these values,which apparently I should not be doing.

    Read the article

  • Automatically open files given as command line arguments in Python

    - by mk
    I have a lot of Perl scripts that looks something like the following. What it does is that it will automatically open any file given as a command line argument and in this case print the content of that file. If no file is given it will instead read from standard input. while ( <> ) { print $_; } Is there a way to do something similar in Python without having to explicitly open each file?

    Read the article

  • Passing arguments to UILabel [ 2 ] *

    - by DesperateLearner
    I'm trying to call a method of the below (Scroll animation class) type from a viewcontroller class. -(void)CreateLabel:(CGRect )frame andLabel:(UILabel *[NUM_LABELS])label andview:(UIView *)view; I got some errors when I tried passing the argument. Any suggestion on how to call this? This is how I called that method ScrollAnimation *newAnimation = [[ScrollAnimation alloc] init]; [newAnimation CreateLabel:CGRectMake(0, 50, 300,30) andLabel:animateLabel[NUM_LABELS] andview:self.view]; I have the error /Volumes/Red Drive/CarTransition/CarTransition/ViewController.m:120:66: Implicit conversion of an Objective-C pointer to 'UILabel **' is disallowed with ARC /Volumes/Red Drive/CarTransition/CarTransition/ViewController.m:120:66: Incompatible pointer types sending 'UILabel *__strong' to parameter of type 'UILabel **'

    Read the article

  • drupal views block arguments

    - by slimcady
    I currently have a view (Drupal 6 using Views2) that properly aggregates a custom content type (videos) and filters them for a page display. When I create a block display, it previews the results in live preview just great, but when i go to the page expecting to see the block it doesn't appear. I'm fairly certain the argument I'm attempting to pass it fails because when I select "Display all results" for "Action to take if argument does not validate:" the block shows up on the page just fine. Any advice definitely appreciated.

    Read the article

  • bash tools for parsing arguments

    - by BCS
    I have a bash script that uses a few variables (call them $foo and $bar). Right now the script defines them at the top with hard coded values like this: foo=fooDefault bar=barDefault .... # use $foo and $bar What I want is to be able to use the script like any of these: myscript # use all defaults myscript -foo=altFoo # use default bar myscript -bar=altBar # use default foo myscript -bar=altBar -foo=altFoo An ideal solution would allow me to just list the variable that I want to check for flags for. Is there a reasonably nice way to do this? I've seen getopt and I think it might do about 70% of what I'm looking for but I'm wondering if there is a tool or indium that builds on it or the like that gets the rest.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >