Search Results

Search found 3033 results on 122 pages for 'manual'.

Page 15/122 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Autoconf (newbie) -- building with static library

    - by EB
    I am trying to migrate from manual build to autoconf, which is working very nicely so far. But I have one static library that I can't figure out how to integrate. That library will NOT be located in the usual library locations - the location of the binary (.a file) and header (.h file) will be given as a configure argument. (Notably, even if I move the .a file to /usr/lib or anywhere else I can think of, it still won't work.) Manual compilation is working with these: gcc ... -I/path/to/header/file/directory /full/path/to/the/.a/file/itself (Uh, I actually don't understand why the .a file is referenced directly, not with -L or anything. Yes, I have a half-baked understanding of building C programs.) I can use the configure argument to successfully find the header (.h file) using AC_CHECK_HEADER. Inside the AC_CHECK_HEADER I then add the location to CPFLAGS and the #include of the header file in the actual C code picks it up nicely. Given a configure argument that has been put into $location and the name of the needed files are myprog.h and myprog.a (which are both in the same directory), here is what works so far: AC_CHECK_HEADER([$location/myprog.h], [AC_DEFINE([HAVE_MYPROG_H], [1], [found myprog.h]) CFLAGS="$CFLAGS -I$location"]) Where I run into difficulties is getting the binary (.a file) linked in. No matter what I try, I always get an error about undefined references to the function calls for that library. I'm pretty sure it's a linkage issue, because I can fuss with the C code and make an intentional error in the function calls to that library which produces earlier errors that indicate that the function prototypes have been loaded and used to compile. I tried adding the location that contains the .a file to LDFLAGS and then doing a AC_CHECK_LIB but it is not found. Maybe my syntax is wrong, or maybe I'm missing something more fundamental, which would not be surprising since I'm a newbie and don't really know what I'm doing. Here is what I have tried: AC_CHECK_HEADER([$location/myprog.h], [AC_DEFINE([HAVE_MYPROG_H], [1], [found myprog.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location"; AC_CHECK_LIB(myprog)]) No dice. AC_CHECK_LIB is looking for -lmyprog I guess (or libmyprog?) so I'm not sure if that's a problem, so I tried this, too (omit AC_CHECK_LIB and include the .a directly in LDFLAGS), without luck: AC_CHECK_HEADER([$location/myprog.h], [AC_DEFINE([HAVE_MYPROG_H], [1], [found myprog.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location/myprog.a"]) To emulate the manual compilation, I tried removing the -L but that doesn't help: AC_CHECK_HEADER([$location/myprog.h], [AC_DEFINE([HAVE_MYPROG_H], [1], [found myprog.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS $location/myprog.a"]) I tried other combinations and permutations, but I think I might be missing something more fundamental....

    Read the article

  • Long-running transactions structured approach

    - by disown
    I'm looking for a structured approach to long-running (hours or more) transactions. As mentioned here, these type of interactions are usually handled by optimistic locking and manual merge strategies. It would be very handy to have some more structured approach to this type of problem using standard transactions. Various long-running interactions such as user registration, order confirmation etc. all have transaction-like semantics, and it is both error-prone and tedious to invent your own fragile manual roll-back and/or time-out/clean-up strategies. Taking a RDBMS as an example, I realize that it would be a major performance cost associated with keeping all the transactions open. As an alternative, I could imagine having a database supporting two isolation levels/strategies simultaneously, one for short-running and one for long-running conversations. Long-running conversations could then for instance have more strict limitations on data access to facilitate them taking more time (read-only semantics on some data, optimistic locking semantics etc). Are there any solutions which could do something similar?

    Read the article

  • Module autoloader in ZF

    - by ChrisRamakers
    The manual on Zend_Application_Module_Autoloader states the following: When using module bootstraps with Zend_Application, an instance of Zend_Application_Module_Autoloader will be created by default for each discrete module, allowing you to autoload module resources. Source: http://framework.zend.com/manual/zh/zend.loader.autoloader-resource.html#zend.loader.autoloader-resource.module This requires me to create an empty bootstrap class for each of my modules or else resource autoloading per module won't work with the build-in autoloader. Now I have two questions What is a discrete module? Is there a way to have this resource autoloader registered by default for each module without the need to create a bootstrap file for each module? I want it available in each module and creating so many empty bootstrap classes is something i'd rather prevent.

    Read the article

  • What can cause legit MySql INSERT INTO command to fail?

    - by Makis
    I can't figure out what's causing my INSERT INTO's to fail to certain table in MySql. I can manage them to other tables. The table looks like: CREATE TABLE IF NOT EXISTS `Match` ( `id` int(11) NOT NULL AUTO_INCREMENT, `match_no` int(11) NOT NULL, `season` int(11) NOT NULL, `hometeam` int(11) NOT NULL, `awayteam` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `match_no` (`match_no`), KEY `season` (`season`), KEY `hometeam` (`hometeam`), KEY `awayteam` (`awayteam`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; And the command is INSERT INTO Match (`match_no`, `season`, `hometeam`, `awaytem`) VALUES (1, 1, 2, 3) All I get is: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Match (match_no, season, hometeam, awaytem) VALUES (1, 1, 2, 3)' at line 1 I have checked the manual and half-a-dozen examples from the web and whatnought and tried all sorts of changes to the syntax in case there is some MySql specific oddity, but nothing seems to work.

    Read the article

  • How can a test script inform R CMD check that it should emit a custom message?

    - by mariotomo
    I'm writing a R package (delftfews) here at office. we are using svUnit for unit testing. our process for describing new functionality: we define new unit tests, initially marked as DEACTIVATED; one block of tests at a time we activate them and implement the function described by the tests. almost all the time we have a small amount of DEACTIVATED tests, relative to functions that might be dropped or will be implemented. my problem/question is: can I alter the doSvUnit.R so that R CMD check pkg emits a NOTE (i.e. a custom message "NOTE" instead of "OK") in case there are DEACTIVATED tests? as of now, we see only that the active tests don't give error: . . * checking for unstated dependencies in tests ... OK * checking tests ... Running ‘doSvUnit.R’ OK * checking PDF version of manual ... OK which is all right if all tests succeed, but less all right if there are skipped tests and definitely wrong if there are failing tests. In this case, I'd actually like to see a NOTE or a WARNING like the following: . . * checking for unstated dependencies in tests ... OK * checking tests ... Running ‘doSvUnit.R’ NOTE 6 test(s) were skipped. WARNING 1 test(s) are failing. * checking PDF version of manual ... OK As of now, we have to open the doSvUnit.Rout to check the real test results. I contacted two of the maintainers at r-forge and CRAN and they pointed me to the sources of R, in particular the testing.R script. if I understand it correctly, to answer this question we need patching the tools package: scripts in the tests directory are called using a system call, output (stdout and stderr) go to one single file, there are two possible outcomes: ok or not ok, so I opened a change request on R, proposing something like bit-coding the return status, bit-0 for ERROR (as it is now), bit-1 for WARNING, bit-2 for NOTE. with my modification, it would be easy producing this output: . . * checking for unstated dependencies in tests ... OK * checking tests ... Running ‘doSvUnit.R’ NOTE - please check doSvUnit.Rout. WARNING - please check doSvUnit.Rout. * checking PDF version of manual ... OK Brian Ripley replied "There are however several packages with properly written unit tests that do signal as required. Please do take this discussion elsewhere: R-bugs is not the place to ask questions." and closed the change request. anybody has hints?

    Read the article

  • Simple object creation with DIY-DI?

    - by Runcible
    I recently ran across this great article by Chad Perry entitled "DIY-DI" or "Do-It-Yourself Dependency Injection". I'm in a position where I'm not yet ready to use a IoC framework, but I want to head in that direction. It seems like DIY-DI is a good first step. However, after reading the article, I'm still a little confused about object creation. Here's a simple example: Using manual constructor dependency injection (not DIY-DI), this is how one must construct a Hotel object: PowerGrid powerGrid; // only one in the entire application WaterSupply waterSupply; // only one in the entire application Staff staff; Rooms rooms; Hotel hotel(staff, rooms, powerGrid, waterSupply); Creating all of these dependency objects makes it difficult to construct the Hotel object in isolation, which means that writing unit tests for Hotel will be difficult. Does using DIY-DI make it easier? What advantage does DIY-DI provide over manual constructor dependency injection?

    Read the article

  • How can I specify the character encoding to be used by OLEDB when querying a DBF?

    - by Manga Lee
    Is it possible to specify which character encoding should be used by OLEDB when querying a DBF file? A possible work-around would be to encode the query string before the OLEDB call to the DBF file's character encoding and then encode all the results when they are returned. This will work but it would be nice if OLEDB or possibly ADO.NET could do this for me. UPDATE The suggestion by Viktor Jevdokimov does not seem to work automatically. But it made me investigate manual conversion of the strings. It is possible to use the TextInfo property of CultureInfo to find out the OemCodePage and the WindowsCodePage and use those to get the corresponding Encoding instances to perform manual conversion. But I can not get ADO.NET use these encondings to perform the conversion for me.

    Read the article

  • Selecting MediaTray in Java printing

    - by Rocket Surgeon
    I am trying to programmatically select a different media tray using Java Printing API. However, my document always gets printed to the default (TOP) media tray. I checked if the MediaTray attributes are supported using "isAttributeValueSupported()" method on javax.print.PrintService interface and I am getting the result as "true" for each MediaTray I pass. Here is my code: public void print( String printerName, com.company.services.document.transferobject.MediaTray tray, byte[] document) { String methodName = "print: "; logger.sendEvent(CLASS_NAME + methodName + "Start", EventType.INFO, this); if (printerName == null || "none".equals(printerName) || "?".equals(printerName) || "null".equals(printerName)) { logger.sendEvent("Please supply printer name, currently printerName is "+printerName, EventType.INFO, this); return; } DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE; AttributeSet attributeSet = new HashAttributeSet(); attributeSet.add(new PrinterName(printerName, null)); javax.print.PrintService service = getService(printerName); if (service.isAttributeValueSupported(MediaTray.TOP, flavor, null)) { System.out.println("---------->>>>>>>>>Yes TOP" + " : Value : " + MediaTray.TOP.getValue()); } else { System.out.println("---------->>>>>>>>>Nope"); } if (service.isAttributeValueSupported(MediaTray.BOTTOM, flavor, null)) { System.out.println("---------->>>>>>>>>Yes BOTTOM" + " : Value : " + MediaTray.BOTTOM.getValue()); } else { System.out.println("---------->>>>>>>>>Nope"); } if (service.isAttributeValueSupported(MediaTray.MIDDLE, flavor, null)) { System.out.println("---------->>>>>>>>>Yes MIDDLE" + " : Value : " + MediaTray.MIDDLE.getValue()); } else { System.out.println("---------->>>>>>>>>Nope"); } if (service.isAttributeValueSupported(MediaTray.MANUAL, flavor, null)) { System.out.println("---------->>>>>>>>>Yes MANUAL" + " : Value : " + MediaTray.MANUAL.getValue()); } else { System.out.println("---------->>>>>>>>>Nope"); } if (service.isAttributeValueSupported(MediaTray.SIDE, flavor, null)) { System.out.println("---------->>>>>>>>>Yes SIDE" + " : Value : " + MediaTray.SIDE.getValue()); } else { System.out.println("---------->>>>>>>>>Nope"); } DocPrintJob printJob = service.createPrintJob(); try { byte[] textStream = document; PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet(); pras.add(DocumentServiceConstant. DEFAULT_ONE_PRINT_COPY); pras.add(Sides.ONE_SIDED); Media standardTray= toStandardTray(tray); if (null != standardTray) { pras.add(standardTray); } Doc myDoc = new SimpleDoc(textStream, flavor, null); printJob.print(myDoc, pras); logger.sendEvent( " successfully printed ............ ", EventType.INFO, this); } catch (Throwable th) { logger.sendEvent(" Throwable : "+th.getLocalizedMessage(), EventType.INFO, this); ExceptionUtility .determineExceptionForServiceClient(th); } logger.sendEvent(CLASS_NAME + methodName + "END: ", EventType.INFO, this); } Any help will be greatly appreciated!

    Read the article

  • Is there a config option in PHP to prevent undefined constants from being interpreted as strings?

    - by mrbinky3000
    This is from the php manual: http://us.php.net/manual/en/language.constants.syntax.php If you use an undefined constant, PHP assumes that you mean the name of the constant itself, just as if you called it as a string (CONSTANT vs "CONSTANT"). An error of level E_NOTICE will be issued when this happens. I really don't like this behavior. If I have failed to define a required constant, I would rather the script fail so that I am forced define it. Is there any way to force PHP to crash the script if it tries to use an undefined constant? For example. Both of these scripts do the same thing. <?php define('DEBUG',1); if (DEBUG) echo('Yo!'); ?> and <?php if(DEBUG) echo('Yo!'); ?> I would rather the second script DIE and declare that it tried to use an undefined constant DEBUG.

    Read the article

  • IAR Embedded Workbench - setting endian-ness of variable

    - by Seidleroni
    I'm using IAR Embedded Workbench for ARM (ARM7TDMI-S) and the majority of my work is done using little-endian format. However, I saw in the manual that I can do something like : __big_endian int i, j; to declare those two variables as big endian (while the rest of the app as little endian). This seems like a fantastic feature, but when I try to compile, I always get the errror: Error[Pa002]: the type attribute "__big_endian" is not allowed on this declaration. The big endian line above is copied directly from the manual, but it does not work. This is a great feature of the compiler and would make life a big easier. Any ideas how to get it working? I have my language conformance set to 'Allow IAR extensions' on the C/C++ Compiler options tab on the IDE options.

    Read the article

  • how to automate / script processes like signups .

    - by silverkid
    which is the best tool for this - Automation of signup process to a website , e.g an email signup The tool should be able to take data from an external data file like an excel of csv file this data file would contain data such as first name , last name , username, password etc. basic data required during an email signup . I am imagining the data file to contain of each field in a seperate column and each row to contain data for different registration / user. At the places where manual intervention is required like image verification etc. the tool should be able to pause the script until manual bit is done then continue with the script. What is the best way to do this - an automation tool , or any scripting language - please suggest .

    Read the article

  • mySQL database password change now crashes Joomla.

    - by casim
    I have a mySQL database behind a Joomla install. I changed the database password because I forgot it but now Joomla crashes looking for the database. I guess joomla has the password written somewhere - if anyone knows I might be able to manual edit it and enter the new database password. Otherwise I'm hoping a manual install of a backup of the original database will work. I need to know does a backup include the database password. If yes, will reinstating my original database solve the problem for me by reverting the system back to it's original password? Please help. thx, s.

    Read the article

  • PHP - HTML Purifier - hello w<o>rld/world tutorial striptags

    - by JW
    I am just looking into using HTML Purifier to ensure that a user-inputed string (that represents the name of a person) is sanitized. I do not want to allow any html tags, script, markup etc - I just want the alpha, numeric and normal punctuation characters. The sheer number of options available for HTML Purifier is daunting and, as far as i can see, the docs do not seem to have a beggining/middle or end see: http://htmlpurifier.org/docs Is there a simple hello world tutorial online that shows how to sanitize a string removing all the bad stuff out of it. I am also considering just using strip tags: http://php.net/manual/en/function.strip-tags.php or PHP's in built data sanitizing http://us.php.net/manual/en/book.filter.php

    Read the article

  • Static classes in PHP via abstract keyword?

    - by Boldewyn
    According to the PHP manual, a class like this: abstract class Example {} cannot be instantiated. If I need a class without instance, e.g. for a registry pattern: class Registry {} // and later: echo Registry::$someValue; would it be considered good style to simply declare the class as abstract? If not, what are the advantages of hiding the constructor as protected method compared to an abstract class? Rationale for asking: As far as I see it, it could a bit of feature abuse, since the manual refers to abstract classes more as like blueprints for later classes with instantiation possibility.

    Read the article

  • How to organize asp.net mvc project (using entity framework) and a corresponding database project?

    - by Bernie
    I recently switched to vs2010 and am experimenting with asp.net MVC2. I am building a simple website and use the entity framework to design the data model. From the .edmx file, I generate the database tables. After a few iterations, I decided that it would be nice to have version control of the database schema as well, and therefore I added a database project into which I imported the script that is generated from the datamodel. As a result, I have to generate the sql every time that I change the model and redo the import. The database project automatically updates the database. Although the manual steps to generate the sql and the import are annoying, this works pretty well, until I wanted to add the standard tables for user accounts/authorization etc. I can use the framework tools to add the necessary tables, views etc. to the database, but as I do not want to have them in the .edmx model I end up with a third manual step. Is anybody facing similar issues?

    Read the article

  • Where do I put inline script in head with Zend Framework?

    - by Joel
    I'm reading the manual here: http://zendframework.com/manual/en/zend.view.helpers.html but I'm still confused. I have a script in my head that I'm converting to the layout/view for the Zend MVC: <script type="text/javascript"> var embedCode = '<object data="http://example.com" type="application/x-shockwave-flash" height="385" width="475"><param name="src" value="http://example.com" /><param name="allowfullscreen" value="true" /></object>' </script> I first tried to add it is an external file like this (in layout): $this->headScript()->appendFile('js/embeddedVideo.js')->appendScript($onloadScript); <head> <?php echo $this->headScript(); ?> </head> Didn't really work, but anyway, I'm wanting to just add the script and not add it as an external file. How do I do that? Thanks!

    Read the article

  • gcc, strict-aliasing, and casting through a union

    - by Joseph Quinsey
    About a year ago the following paragraph was added to the GCC Manual, version 4.3.4, regarding -fstrict-aliasing: Similarly, access by taking the address, casting the resulting pointer and dereferencing the result has undefined behavior [emphasis added], even if the cast uses a union type, e.g.: union a_union { int i; double d; }; int f() { double d = 3.0; return ((union a_union *)&d)->i; } Does anyone have an example to illustrate this undefined behavior? Note this question is not about what the C99 standard says, or does not say. It is about the actual functioning of gcc, and other existing compilers, today. My simple, naive, attempt fails. For example: #include <stdio.h> union a_union { int i; double d; }; int f1(void) { union a_union t; t.d = 3333333.0; return t.i; // gcc manual: 'type-punning is allowed, provided ...' } int f2(void) { double d = 3333333.0; return ((union a_union *)&d)->i; // gcc manual: 'undefined behavior' } int main(void) { printf("%d\n", f1()); printf("%d\n", f2()); return 0; } works fine, giving on CYGWIN: -2147483648 -2147483648 Also note that taking addresses is obviously wrong (or right, if you are trying to illustrate undefined behavior). For example, just as we know this is wrong: extern void foo(int *, double *); union a_union t; t.d = 3.0; foo(&t.i, &t.d); // UD behavior so is this wrong: extern void foo(int *, double *); double d = 3.0; foo(&((union a_union *)&d)->i, &d); // UD behavior For background discussion about this, see for example: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1422.pdf http://gcc.gnu.org/ml/gcc/2010-01/msg00013.html http://davmac.wordpress.com/2010/02/26/c99-revisited/ http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html http://stackoverflow.com/questions/98650/what-is-the-strict-aliasing-rule http://stackoverflow.com/questions/2771023/c99-strict-aliasing-rules-in-c-gcc/2771041#2771041 The first link, draft minutes of an ISO meeting seven months ago, notes in section 4.16: Is there anybody that thinks the rules are clear enough? No one is really able to interpret tham.

    Read the article

  • Autoconf -- including a static library (newbie)

    - by EB
    I am trying to migrate my application from manual build to autoconf, which is working very nicely so far. But I have one static library that I can't figure out how to integrate. That library will NOT be located in the usual library locations - the location of the binary (.a file) and header (.h file) will be given as a configure argument. (Notably, even if I move the .a file to /usr/lib or anywhere else I can think of, it still won't work.) It is also not named traditionally (it does not start with "lib" or "l"). Manual compilation is working with these (directory is not predictable - this is just an example): gcc ... -I/home/john/mystuff /home/john/mystuff/helper.a (Uh, I actually don't understand why the .a file is referenced directly, not with -L or anything. Yes, I have a half-baked understanding of building C programs.) So, in my configure.ac, I can use the relevant configure argument to successfully find the header (.h file) using AC_CHECK_HEADER. Inside the AC_CHECK_HEADER I then add the location to CPFLAGS and the #include of the header file in the actual C code picks it up nicely. Given a configure argument that has been put into $location and the name of the needed files are helper.h and helper.a (which are both in the same directory), here is what works so far: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"]) Where I run into difficulties is getting the binary (.a file) linked in. No matter what I try, I always get an error about undefined references to the function calls for that library. I'm pretty sure it's a linkage issue, because I can fuss with the C code and make an intentional error in the function calls to that library which produces earlier errors that indicate that the function prototypes have been loaded and used to compile. I tried adding the location that contains the .a file to LDFLAGS and then doing a AC_CHECK_LIB but it is not found. Maybe my syntax is wrong, or maybe I'm missing something more fundamental, which would not be surprising since I'm a newbie and don't really know what I'm doing. Here is what I have tried: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location"; AC_CHECK_LIB(helper)]) No dice. AC_CHECK_LIB is looking for -lhelper I guess (or libhelper?) so I'm not sure if that's a problem, so I tried this, too (omit AC_CHECK_LIB and include the .a directly in LDFLAGS), without luck: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location/helper.a"]) To emulate the manual compilation, I tried removing the -L but that doesn't help: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS $location/helper.a"]) I tried other combinations and permutations, but I think I might be missing something more fundamental....

    Read the article

  • Autoconf -- building with static library (newbie)

    - by EB
    I am trying to migrate my application from manual build to autoconf, which is working very nicely so far. But I have one static library that I can't figure out how to integrate. That library will NOT be located in the usual library locations - the location of the binary (.a file) and header (.h file) will be given as a configure argument. (Notably, even if I move the .a file to /usr/lib or anywhere else I can think of, it still won't work.) It is also not named traditionally (it does not start with "lib" or "l"). Manual compilation is working with these (directory is not predictable - this is just an example): gcc ... -I/home/john/mystuff /home/john/mystuff/helper.a (Uh, I actually don't understand why the .a file is referenced directly, not with -L or anything. Yes, I have a half-baked understanding of building C programs.) So, in my configure.ac, I can use the relevant configure argument to successfully find the header (.h file) using AC_CHECK_HEADER. Inside the AC_CHECK_HEADER I then add the location to CPFLAGS and the #include of the header file in the actual C code picks it up nicely. Given a configure argument that has been put into $location and the name of the needed files are helper.h and helper.a (which are both in the same directory), here is what works so far: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"]) Where I run into difficulties is getting the binary (.a file) linked in. No matter what I try, I always get an error about undefined references to the function calls for that library. I'm pretty sure it's a linkage issue, because I can fuss with the C code and make an intentional error in the function calls to that library which produces earlier errors that indicate that the function prototypes have been loaded and used to compile. I tried adding the location that contains the .a file to LDFLAGS and then doing a AC_CHECK_LIB but it is not found. Maybe my syntax is wrong, or maybe I'm missing something more fundamental, which would not be surprising since I'm a newbie and don't really know what I'm doing. Here is what I have tried: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location"; AC_CHECK_LIB(helper)]) No dice. AC_CHECK_LIB is looking for -lhelper I guess (or libhelper?) so I'm not sure if that's a problem, so I tried this, too (omit AC_CHECK_LIB and include the .a directly in LDFLAGS), without luck: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location/helper.a"]) To emulate the manual compilation, I tried removing the -L but that doesn't help: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS $location/helper.a"]) I tried other combinations and permutations, but I think I might be missing something more fundamental....

    Read the article

  • Doctrine inserts when it should update

    - by Goran Juric
    I am trying to use do the most simple update query but Doctrine issues an INSERT statement instead of an UPDATE. $q = Doctrine_Query::create() ->from('Image i') ->where('id = ?'); $image = $q->fetchOne($articleId, Doctrine_Core::HYDRATE_RECORD); $image->copyright = "some text"; $image->save(); I have also tried using the example from the manual, but still a new record gets inserted: $userTable = Doctrine_Core::getTable('User'); $user = $userTable->find(2); if ($user !== false) { $user->username = 'Jack Daniels'; $user->save(); } edit: This example from the manual works: $user = new User(); $user->assignIdentifier(1); $user->username = 'jwage'; $user->save(); The funny thing is that I use this on another model and there it works OK. Maybe I have to fetch the whole array graph for this to work (I have another model in a one to many relationship)?

    Read the article

  • Control webcam from C#

    - by Moulde
    Hi I have a Creative Life CAM Optia AF webcam, the software included in the package is able to control the camera in different ways, like set autofocus to auto or manual, and a bunch of gamma and brightness settings. I'm capturing the feed with the AForge Computer vision library, and it's working great. But i would like to be able to set the manual focus from inside my application. Ive been searching for a tutorial, but come up empty handed. Can i somehow either disassemble the included software, or is there some way to fetch the traffic / instructions being sent to the device? Thanks in advance.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >