Search Results

Search found 8286 results on 332 pages for 'defined'.

Page 48/332 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • How to detect unresolved symbol when creating a library ?

    - by Simon
    Hello everyone, Under Solaris 10, I'm creating a library A.so that calls a function f() which is defined in library B.so. To compile the library A.so, I declare in my code f() as extern. Unfortunately, I "forgot" to declare in A's makefile that it has to link with B. However, "make A" causes no warning, no error, and the library A.so is created. Of course, when executing A's code, the call of f() crashes because it is undefined. Is there a way (linker option, code trick...) to make the compilation of library A fail ? How can I be sure that all symbols refered to in library A are defined at compile time ? Thanks for any suggestions.

    Read the article

  • Java - Array's length property

    - by The New Idiot
    We can determine the length of an ArrayList<E> using its public method size() , like ArrayList<Integer> arr = new ArrayList(10); int size = arr.size(); Similarly we can determine the length of an Array object using the length property String[] str = new String[10]; int size = str.length; Whereas the size() method of ArrayList is defined inside the ArrayList class , where is this length property of Array defined ? Is it implemented by JVM or does it reside in any Java API class file ?

    Read the article

  • Why am I getting "too many include files : depth = 1024"?

    - by BeeBand
    I'm using Visual Studio 2008 Express edition, and keep getting the following error: "Cascadedisplay.h(4) : fatal error C1014: too many include files : depth = 1024. Obviously I'm doing something very wrong with include files, but I just can't see what. Basically, I have an interface class, StackDisplay, from which I want to derive CascadeDisplay in another file: #if !defined __BASE_STACK_DISPLAY_H__ #define __BASE_STACK_DISPAY_H__ #include <boost\shared_ptr.hpp> #include "CascadeDisplay.h" namespace Sol { class StackDisplay { public: virtual ~StackDisplay(); static boost::shared_ptr<StackDisplay> make_cascade_display(boost::shared_ptr<int> csptr) { return boost::shared_ptr<StackDisplay>(new CascadeDisplay(csptr)); } }; } #endif and then in CascadeDisplay.h: #if !defined __CASCADE_DISPLAY_H__ #define __CASCADE_DISPAY_H__ #include "StackDisplay.h" #include <boost\shared_ptr.hpp> namespace Sol { class CascadeDisplay: public StackDisplay { public: CascadeDisplay(boost::shared_ptr<int> csptr){}; }; } #endif So what's up with that?

    Read the article

  • MySQL load data null values

    - by SP1
    Hello, I have a file that can contain from 3 to 4 columns of numerical values which are separated by comma. Empty fields are defined with the exception when they are at the end of the row: 1,2,3,4,5 1,2,3,,5 1,2,3 The following table was created in MySQL: +-------+--------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+--------+------+-----+---------+-------+ | one | int(1) | YES | | NULL | | | two | int(1) | YES | | NULL | | | three | int(1) | YES | | NULL | | | four | int(1) | YES | | NULL | | | five | int(1) | YES | | NULL | | +-------+--------+------+-----+---------+-------+ I am trying to load the data using MySQL LOAD command: load data infile '/tmp/testdata.txt' into table moo fields terminated by "," lines terminated by "\n"; The resulting table: +------+------+-------+------+------+ | one | two | three | four | five | +------+------+-------+------+------+ | 1 | 2 | 3 | 4 | 5 | | 1 | 2 | 3 | 0 | 0 | | 1 | 2 | 3 | NULL | NULL | +------+------+-------+------+------+ The problem lies with the fact that when a field is empty in the raw data and is not defined, MySQL for some reason does not use the columns default value (which is NULL) and uses zero. NULL is used correctly when the field is missing alltogether. Unfortunately, I have to be able to distinguish between NULL and 0 at this stage so any help would be appreciated. Thanks S.

    Read the article

  • How to inline a function for only release build.

    - by Benjamin
    // common.h // This is foo funtion. It has a body. __inline void foo() { /* something */ } // a.cpp #include "common.h" // for foo function // Call foo // b.cpp #include "common.h" // for foo function // Call foo I would like to inline the foo function only when I build for release. -I dont want to inline functions for Debug build. I tried it but linker errors annoyed me. In this case, foo function's body is defined in common.h header file. so if I just do //common.h #if !defined(_DEBUG) __inline #endif void foo() { /* something */ } I will be met a link error in DEBUG build. Because two modules try to include common.h. I have no idea to solve it. Is it possible?

    Read the article

  • How to convert an Info.plist file from mac os project to iphone project?

    - by Tom Pace
    I am developing an app for the iPhone OS devices, and am using a third-party engine which is not well documented but I've made great progress with it anyway. The problem: The engine's developer strongly urges extending from the existing template projects bundled with the engine, but the engine's Info.plist files are Mac OSX project Info.plist files. This is an iPhone engine, and so I cannot understand why the Info.plist file is structured to take keys for Mac OS apps, but that's how it is. I did a FileMerge comparison to ensure there was nothing within the file itself that defined its use for one OS or the other, so I guess it's defined somewhere in the project settings. Edit - Opening the plist file in Xcode or Property List Editor and then trying to add a key such as "Icon already includes gloss and bevel effects" will not work in this iPhone project because it is not in the list. However, "Cocoa Java Application" and others are available!

    Read the article

  • Is it a good idea to use a computed column as part of a primary key ?

    - by Brann
    I've got a table defined as : OrderID bigint NOT NULL, IDA varchar(50) NULL, IDB bigint NULL, [ ... 50 other non relevant columns ...] The natural primary key for this table would be (OrderID,IDA,IDB), but this it not possible because IDA and IDB can be null (they can both be null, but they are never both defined at the same time). Right now I've got a unique constraint on those 3 columns. Now, the thing is I need a primary key to enable transactional replication, and I'm faced with two choices : Create an identity column and use it as a primary key Create a non-null computed column C containing either IDA or IDB or '' if both columns were null, and use (OrderID,C) as my primary key. The second alternative seams cleaner as my PK would be meaningful, and is feasible (see msdn link), but since I've never seen this done anywhere, I was wondering if they were some cons to this approach.

    Read the article

  • [PHP] strtr function OS-reltated problem

    - by Casidiablo
    Hello there! I have this funtion that converts all special chars to uppercase: function uc_latin1($str) { if(!defined("LATIN1_UC_CHARS")) define("LATIN1_UC_CHARS", "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝ"); if(!defined("LATIN1_LC_CHARS")) define("LATIN1_LC_CHARS", "àáâãäåæçèéêëìíîïðñòóôõöøùúûüý"); $str = strtoupper ( strtr ( $str, LATIN1_LC_CHARS, LATIN1_UC_CHARS ) ); return $str; } This function works fine in my development PC (which runs Windows XP)... but, when I test it in the production server (running Redhat Linux) it does not uppercase the string. The string is ISO-8859-1 encoded. How can I make it work in Linux too? Thanks for reading.

    Read the article

  • Self-referential ReferenceProperty in Google App Engine

    - by Ink-Jet
    I'm having a bit of trouble with ReferencePropertys in App Engine (Python). For a bit of fun, I'm trying to model a folder/file system, but having trouble getting folders to reference folders. My first attempt was this: class Folder(db.Model): id = db.StringProperty() name = db.StringProperty() created = db.DateTimeProperty(auto_now_add=True) folder = db.ReferenceProperty(Folder, collection_name="folders") But that fails as "Folder" isn't defined when "folder" is trying to be defined. I've also tried defining "folder" outside of the main declaration for "Folder", like so: class Folder(db.Model): id = db.StringProperty() name = db.StringProperty() created = db.DateTimeProperty(auto_now_add=True) Folder.folder = db.ReferenceProperty(Folder, collection_name="folders") But that fails with: AttributeError: 'Folder' object has no attribute 'folders' I'm kind of stumped. Does anyone have experience with this, or a solution to this problem? Thanks in advance.

    Read the article

  • AspectJ join point with simple types

    - by Jon
    Hi! Are there defined join points in arithmetics that I can catch? Something like: int a = 4; int b = 2; int c = a + b; Can I make a pointcut that catches any one of those lines? And what context will I be able to get? I would like to add a before() to all int/float/double manipulation done in a particular method on a class, is that possible. I see in the AspectJ docs that there are defined join points for object initialization and method calls. Is declaring an int an object initialization and does the + operator count as a method call? Thanks!

    Read the article

  • Shortest distance between a point and a line segment

    - by Eli Courtwright
    I need a basic function to find the shortest distance between a point and a line segment. Feel free to write the solution in any language you want; I can translate it into what I'm using (Javascript). EDIT: My line segment is defined by two endpoints. So my line segment AB is defined by the two points A (x1,y1) and B (x2,y2). I'm trying to find the distance between this line segment and a point C (x3,y3). My geometry skills are rusty, so the examples I've seen are confusing, I'm sorry to admit.

    Read the article

  • Can GraphViz be used for a graph editing GUI?

    - by user185420
    I am creating an application which will allow a developer to create a program flow-chart by selecting pre-defined functions from a ToolBox (which will show up as small graphical elements). In other words, developer will select one or more pre-defined functions (graphical elements) from ToolBox and drag-drop on the main work area. The application will then, based on the flow of functions selected, will auto-generate ready-to-compile-code. I looked a GraphViz, but am not sure whether it can be used to create a GUI IDE for editing graphical elements. I am looking for a functionality similart to Microsoft Visio, where users can add/remove/drag-drop/ various shapes to create a diagram. Does GraphViz fit in here? If yes, can you direct me to some examples showing how to do it? If GraphViz cannot be used, what are the other open source/free components available? I am intending to build the final application in .Net.

    Read the article

  • Link a sequence with to an identity in hsqldb

    - by Candy Chiu
    In PostgreSql, one can define a sequence and use it as the primary key of a table. In HsqlDB, one can still accomplish creating an auto-increment identity column which doesn't link to any user defined sequence. Is it possible to use a user defined sequence as the generator of an auto-increment identity column in HsqlDB? Sample sql in PostgreSql: CREATE SEQUENCE seq_company_id START WITH 1; CREATE TABLE company ( id bigint PRIMARY KEY DEFAULT nextval('seq_company_id'), name varchar(128) NOT NULL CHECK (name < '') ); What's the equivalent in HsqlDB? Thanks.

    Read the article

  • the problem only happens when i try create a release...

    - by ace
    I'm sorry if im not presenting this right, but i trully cannot understand what the problem is. i have a project to hand in, a code of 600 lines defined within a main, .cpp, and header file. if i compile the project with just a debugger and no release, it's fine. when i create it with the release, the following error occurs, for every function!!! 1st error: |36|multiple definition of `countLines(int&, std::vector const&)'| 2nd error: |36|first defined here| if someone will allow me and i can send them the entire code, that would be awesome - i have to have this done within 3 hours.

    Read the article

  • Accessing a JavaScript object property names with a "-" in it

    - by Anil kumar
    I have a requirement to read JSON data in my application. Problem is that the JSON data that I am getting from the service includes "-" and when I am trying to read it, I am getting "Uncaught ReferenceError: person is not defined ". e.g. I have below JSON object- var JSONObject ={ "name-person":"John Johnson", "street":"Oslo West 16", "age":33, "phone":"555 1234567"}; when I am writing below console log statement I am getting "Uncaught ReferenceError: person is not defined " error console.log(JSONObject.name-person); Can someone please help me how to read such data which includes "-" in it? I do not have control on the service and the DB so to modify source data is not in my hand.

    Read the article

  • PHP Value Object auto create

    - by JonoB
    Assume that I have a class value object defined in php, where each variable in the class is defined. Something like: class UserVO { public $id; public $name; } I now have a function in another class, which is expecting an array ($data). function save_user($data) { //run code to save the user } How do I tell php that the $data parameter should be typed as a UserVO? I could then have code completion to do something like: $something = $data->id; //typed as UserVO.id $else = $data->name; //typed as UserVO.name I'm guessing something like the following, but this obviously doesnt work $my_var = $data as new userVO();

    Read the article

  • Environment Variable to determine the OS type (Windows XP, Windows 7)

    - by Santhosh
    I want to differrntiate between Windows XP and Windows 7 in a XML file. Thought i will use an environment variable for it inside the XML. However I could not find any system environment variable defined in windows that gives this information. I see the %OSTYPE% variable but it is only available in Windows 7. It is not defined in XP. Is there anyway i could do this? Note that i would like a solution which purely depends on system environment variables. I do not want to create new variables based on executing some command, because i want to use this variable in a XML file.

    Read the article

  • Dependency issue in inheritance chain

    - by Razer
    I have a class in coffeescript a class layout like the following. class @A foo: -> console.log('foo') class @B extends A fooB: -> @foo() class @C extends B fooC: -> @foo() I tried this in interpreters, it works. However it raises errors, when executing this in the browser (all of them are in separate coffee files, and are used in a global context. Therefore the @ before the class): Uncaught ReferenceError: B is not defined application.js It seems that B is defined after the definition of C. How can this happen?

    Read the article

  • When is @uncheckedVariance needed in Scala, and why is it used in GenericTraversableTemplate?

    - by retronym
    @uncheckedVariance can be used to bridge the gap between Scala's declaration site variance annotations and Java's invariant generics. scala import java.util.Comparator import java.util.Comparator scala trait Foo[T] extends Comparator[T] defined trait Foo scala trait Foo[-T] extends Comparator[T] :5: error: contravariant type T occurs in invariant position in type [-T]java.lang.Object with java.util.Comparator[T] of trait Foo trait Foo[-T] extends Comparator[T] ^ scala import annotation.unchecked._ import annotation.unchecked._ scala trait Foo[-T] extends Comparator[T @uncheckedVariance] defined trait Foo This says that java.util.Comparator is naturally contra-variant, that is the type parameter T appears in parameters and never in a return type. Which begs the question, why is it also used in the Scala collections library: trait GenericTraversableTemplate[+A, +CC[X] <: Traversable[X]] extends HasNewBuilder[A, CC[A] @uncheckedVariance] What are the valid uses for this annotation?

    Read the article

  • Trouble compiling some decompiled C# code

    - by Colin O'Dell
    I was decompiling an open-source project (because the source for the latest version hasn't been released yet). Using RedGate's Reflector tool, it gave me this block of code: if(somecondition == true) { ref Vector3i vectoriRef; float num17 = length - num; Vector3i end = vectori3; (vectoriRef = (Vector3i) &end)[1] = vectoriRef[1] - ((int) num17); } somecondition is a boolean. length and num are floats defined outside the code. vectori3 is also defined outside the code and is of type Vector3i. The type Vector3i is essentially this code, but with x, y, and z stored as integers. When I try to compile this decompiled code, I get the following errors: Line 2: Only assignment, call, increment, decrement, and new object expressions can be used as a statement Line 3: ; expected Line 3: Invalid expression term 'ref' Line 6: 'Vector3i' is a 'type' but is used like a 'variable' Any thoughts on how I can fix this code so it compiles correctly and does whatever it was intended to do?

    Read the article

  • how can i acess a variable outside of an if statement in java

    - by themanepalli
    i have defined a variable inside an if statement and I am trying to access it outside of that if statement now. now the error is saying that it cannot find the symbol which is because its being defined as an intance variable, is there a way i can change it so i can access it outside the variable? heres the code if((e.getSource()==userOrder2)&& (orderType==1)) { String buyO= userOrder2.getText(); int buyOrder= Integer.parseInt(buyO); //variable im trying to access } // trying to use buyOrder in a different if statement if(orderType==1 && (stockPrice <= buyOrder)) { orderResult.setText("The Stock" + (stockName2.getText()) + "was bought at" + stockPrice); }

    Read the article

  • Can I make PDOStatement->fetchObject not use non-member variables?

    - by threendib
    Lets say I have a class like this: Class User { var $id var $name; } And I run a query using PDO in php like so: $stm = $db->prepare('select * from users where id = :id'); $r = $stm->execute(array(':id' => $id)); $user = $r->fetchObject('User'); If I vardump my user object it has all kinds of other fields in it that I have not defined in the User class. Obviously I could make my query specific so that it only gives me back the fields I need/want. But if I don't want to do that is there any way to make this work the way I want it to? I like the idea of fetchObject, because it's one line of code to create this object and set member variables for me. I just don't want it to set variables I haven't defined in my class.

    Read the article

  • Testing whether an event has happened after a period of time in jQuery

    - by chrism
    I'm writing a script for a form-faces xforms product that is keyed off an event built into form faces. The event is called 'xforms-ready'. I have define 'startTime' as happening as soon as the document in 'ready'. What I want the script to do is warn the user that it is taking too long before the 'xforms-ready' happens, say if it's been 6 seconds since 'startTime'. I can easily do things when the 'xforms-ready' event happens using the code below: new EventListener(document.documentElement, "xforms-ready", "default", function() { var endTime = (new Date()).getTime(); } ); however the warning will want to happen before 'endTime' is defined. So I guess I want something that works like this: If 6 seconds has passed since startTime and endTime is not yet defined do X or possibly more efficiently: If 6 seconds has passed since startTime and 'xforms-ready' has not yet happened do X Can anyone suggest a way of doing this?

    Read the article

  • VS2005 Compilation Problem with Settings

    - by vijay.j
    I am trying to integrate PJNSMTPCONNECTION CLASSES in my project; they say that those classes do not use MFC. My project is with the setting like MT, and using standard library linking. When I try to compile, I am getting CSTRING not defined and fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h> If I include afx.h and remove windows.h, I am getting iDLLMain already defined errors. How do I resolve these problems, please?

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >