Search Results

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

Page 111/332 | < Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >

  • I have a following gcc compilation warning

    - by thetna
    symbol.h:179: note: expected ‘uintptr_t *’ but argument is of type ‘PRECEDENCE’ The corresponding code is : 176 void symbol_SetCount(SYMBOL, unsigned long); 177 unsigned long symbol_GetCount(SYMBOL); 178 179 size_t symbol_Ordering(uintptr_t*, SYMBOL); 180 181 void symbol_CheckIndexInRange(int); 182 void symbol_CheckNoVariable(SYMBOL); SYMBOL is defined as: typedef size_t SYMBOL Any effort will be highly appreciated.

    Read the article

  • A problem with compare item value

    - by Tony
    Hi, I have defined my class: public class Host { public string Name; } then a strongly-typed dictionary: Dictionary<string, Host> HostsTable; then I try to compare a value: if (HostsTable.Values.Where(s => s.Name == "myhostname") != null) { doSomething } and the problem is, nothing is found, even I'm sure the item is on the list. What I'm doing wrong ?

    Read the article

  • Managed C++ Error 2504 Error

    - by Major
    I'm new to managed c++ and I'm attempting to design a program for a presentation. I am attempting to have a class inherit from an ABC and I'm getting the Error C2504. The code in question is as follows: ref class Item : Auction //Error C2504 here { //More code for the class Auction is defined in a different .h file. Let me know if there are any other questions or if you need to see more of the code. Thanks

    Read the article

  • Prolog: declaring an operator

    - by B K
    I have defined ! (factorial) function and registered it as arithmetic function and an operator, so that I can execute: A is 6!. Now I'd like to define !! (factorial of odd numbers), but the same way - writing clauses, registering arithmetic_function and operator, calling A is 7!! - results in SyntaxError: Operator expected How should I, if possible, register !! operator ? Yes, I realize, ! is normally the cut.

    Read the article

  • How can I pass a C++ member function to a C API as a parameter

    - by michael
    Hi, In my C++ program, I need to call this c API: GConn* gnet_conn_new (const gchar *hostname, gint port, GConnFunc func); where GConnFunc is defined as: void (*GConnFunc) (GConn *conn); My question is if I have a C++ class and have a member function like Class A { public: A(); void my_func (GConn* conn); } In my A::A() Constructor, how can I pass this-myfunc to gnet_conn_new as the GConnFunc parameter? Thank you.

    Read the article

  • Issue Displaying/Hiding Views (Obj-C iPhone Programming)

    - by roswell
    All right all, So I've got a UITableView that is inited in applicationDidFinishLaunching like so: [self showForumList]; Said method does this: -(void)showForumList { ForumList *fl = [ForumList alloc]; [fl initWithNibName:@"ForumList" bundle:[NSBundle mainBundle]]; self.ForumList = fl; [window addSubview:[self.ForumList view]]; [fl release]; }where self.ForumList is previously defined in the interface as ForumList *ForumList;, etc. Now, in ForumList (itself an extension of UITableViewController obviously), I've got didSelectRowAtIndexPath: -- within it I have the following code: Forum *f = [Forum alloc]; NSArray *forums = [f getForumList]; NSDictionary *selectedForum = [forums objectAtIndex:[indexPath row]]; NSString *Url = [selectedForum objectForKey:@"url"]; NSString *Username = [selectedForum objectForKey:@"username"]; NSString *Password = [selectedForum objectForKey:@"password"]; NSLog(@"Identified press on forum %@ (%@/%@)", Url, Username, Password); [self.globalDelegate showForumListFromForumUsingUrl:Url username:Username password:Password]; [self.globalDelegate closeForumList]; NSLog(@"ForumListFromForum init"); Both of the NSLog calls in this function are executed and perform as they should. Now, here is where the issue starts. self.globalDelegate is defined as AppDelegate *globalDelegate; in the Interface specification in my header file. However, [self.globalDelegate showForumListFromForumUsingUrl:username:password] and and [self.globalDelegate closeForumList] are never actually called. They look like so: -(void)closeForumList { NSLog(@"Hiding forum list"); [[self.ForumList view] removeFromSuperview]; } -(void)showForumListFromForumUsingUrl:(NSString *)Url username:(NSString *)Username password:(NSString *)Password { NSLog(@"Showing forum list from forum"); ForumListFromForum *fl = [ForumListFromForum alloc]; [fl initWithNibName:@"ForumListFromForum" bundle:[NSBundle mainBundle]]; [fl initFromForumWithUrl:Url username:Username password:Password]; self.ForumListFromForum = fl; [window addSubview:[self.ForumListFromForum view]]; [fl release]; } The app does not respond to my press and neither of these NSLog calls are made. Any idea where I've gone wrong?

    Read the article

  • C# Linq - Cannot implicitly convert IEnumerable<string> to List<string>

    - by JL
    I have a List defined like this : public List<string> AttachmentURLS; I am adding items to the list like this: instruction.AttachmentURLS = curItem.Attributes["ows_Attachments"].Value.Split(';').ToList().Where(Attachment => !String.IsNullOrEmpty(Attachment)); But I am getting this error: Cannot implicitly convert IEnumerable to List What am I doing wrong?

    Read the article

  • why does my C# client that uses Library A need to have a using statement for Library B (which A uses

    - by Greg
    Hi, I have: Main Program Class - uses Library A Library A - has partial classes which mix in methods from Library B Library B - mix in methods & interfaces So in Library B when I include a partial Node class which implements INode (defined in Library B) I suddenly get an error in my main class where it uses Node from Library A. The error tells me in the Main Class I have to have a using statement to Library B. Any ideas?

    Read the article

  • How to print 5 byte integer values?

    - by lost soul
    I've just started reading C and have a question about a macro. How can I print a 5 byte integer value (that happens to be defined in a macro)? For example: #define MAX 0xdeadbeaf12 int main(){ printf(" 0x %2x \n", MAX); } This code prints adbeaf12 but not deadbeaf12. How do I get all the bytes printed?

    Read the article

  • Populating data in multiple cascading dropdown boxes in Access 2007

    - by miCRoSCoPiC_eaRthLinG
    Hello all, I've been assigned the task to design a temporary customer tracking system in MS Access 2007 (sheeeesh!). The tables and relationships have all been setup successfully. But I'm running into a minor problem while trying to design the data entry form for one table... Here's a bit of explanation first. The screen contains 3 dropdown boxes (apart from other fields). 1st dropdown The first dropdown (cboMarket) represents the Market lets users select between 2 options: Domestic International Since the first dropdown contains only 2 items I didn't bother making a table for it. I added them as pre-defined list items. 2nd dropdown Once the user makes a selection in this one, the second dropdown (cboLeadCategory) loads up a list of Lead Categories, namely, Fairs & Exhibitions, Agents, Press Ads, Online Ads etc. Different sets of lead categories are utilized for the 2 markets. Hence this box is dependent on the 1st one. Structure of the bound table, named Lead_Cateogries for the 2nd combo is: ID Autonumber Lead_Type TEXT <- actually a list that takes up Domestic or International Lead_Category_Name TEXT 3rd dropdown And based on the choice of category in the 2nd one, the third one (cboLeadSource) is supposed to display a pre-defined set of lead sources belonging to the particular category. Table is named Lead_Sources and the structure is: ID Autonumber Lead_Category NUMBER <- related to ID of Lead Categories table Lead_Source TEXT When I make the selection in the 1st dropdown, the AfterUpdate event of the combo is called, which instructs the 2nd dropdown to load contents: Private Sub cboMarket_AfterUpdate() Me![cboLead_Category].Requery End Sub The Row Source of the 2nd combo contains a query: SELECT Lead_Categories.ID, Lead_Categories.Lead_Category_Name FROM Lead_Categories WHERE Lead_Categories.Lead_Type=[cboMarket] ORDER BY Lead_Categories.Lead_Category_Name; The AfterUpdate event of 2nd combo is: Private Sub cboLeadCategory_AfterUpdate() Me![cboLeadSource].Requery End Sub The Row Source of 3rd combo contains: SELECT Leads_Sources.ID, Leads_Sources.Lead_Source FROM Leads_Sources WHERE [Lead_Sources].[Lead_Category]=[Lead_Categories].[ID] ORDER BY Leads_Sources.Lead_Source; Problem When I select Market type from cboMarket, the 2nd combo cboLeadCategory loads up the appropriate Categories without a hitch. But when I select a particular Category from it, instead of the 3rd combo loading the lead source names, a modal dialog is displayed asking me to Enter a Parameter. When I enter anything into this prompt (valid or invalid data), I get yet another prompt: Why is this happening? Why isn't the 3rd box loading the source names as desired. Can any one please shed some light on where I am going wrong? Thanks, m^e

    Read the article

  • Calling and writing javascript functions

    - by Ankur
    I think I have not got the syntax correct for writing a javascript function and calling it to assign its return value to a variable. My function is: getObjName(objId){ var objName =""; $.ajax( { type : "GET", url : "Object", dataType: 'json', data : "objId="+objId, success : function(data) { objName = data; } }); return objName; } I am trying to call it and assign it to a variable with: var objName = getObjName(objId); However Eclipse is telling me that "there is no such function getObjName() defined"

    Read the article

  • Where does Flash Builder Plugin seaches for dotted namespace names?

    - by Suzan Cioc
    I have the following text in my MXLM sample: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="com.infrared5.asmf.controls.flex.data.*" xmlns:ns2="com.infrared5.asmf.controls.flex.video.*" xmlns:ns3="com.infrared5.asmf.controls.flex.net.*" xmlns:ns4="jedai.controls.flex.data.*" xmlns:ns5="jedai.controls.flex.video.*" xmlns:ns6="jedai.controls.flex.net.*"> Last 6 namespaces are defined as some "dotted" name pathes. Where does compiler look for them and in which order?

    Read the article

  • Trouble with abstract generic methods

    - by DanM
    Let's say I have a class library that defines a couple entity interfaces: public interface ISomeEntity { /* ... */ } public interface ISomeOtherEntity { /* ... */ } This library also defines an IRepository interface: public interface IRepository<TEntity> { /* ... */ } And finally, the library has an abstract class called RepositorySourceBase (see below), which the main project needs to implement. The goal of this class is to allow the base class to grab new Repository objects at runtime. Because certain repositories are needed (in this example a repository for ISomeEntity and ISomeOtherEntity), I'm trying to write generic overloads of the GetNew<TEntity>() method. The following implementation doesn't compile (the second GetNew() method gets flagged as "already defined" even though the where clause is different), but it gets at what I'm trying to accomplish: public abstract class RepositorySourceBase // This doesn't work! { public abstract Repository<TEntity> GetNew<TEntity>() where TEntity : SomeEntity; public abstract Repository<TEntity> GetNew<TEntity>() where TEntity : SomeOtherEntity; } The intended usage of this class would be something like this: public class RepositorySourceTester { public RepositorySourceTester(RepositorySourceBase repositorySource) { var someRepository = repositorySource.GetNew<ISomeEntity>(); var someOtherRepository = repositorySource.GetNew<ISomeOtherEntity>(); } } Meanwhile, over in my main project (which references the library project), I have implementations of ISomeEntity and ISomeOtherEntity: public class SomeEntity : ISomeEntity { /* ... */ } public class SomeOtherEntity : ISomeOtherEntity { /* ... */ } The main project also has an implementation for IRepository<TEntity>: public class Repository<TEntity> : IRepository<TEntity> { public Repository(string message) { } } And most importantly, it has an implementation of the abstract RepositorySourceBase: public class RepositorySource : RepositorySourceBase { public override Repository<SomeEntity> GetNew() { return new Repository<SomeEntity>("stuff only I know"); } public override Repository<SomeOtherEntity> GetNew() { return new Repository<SomeOtherEntity>("other stuff only I know"); } } Just as with RepositorySourceBase, the second GetNew() method gets flagged as "already defined". So, C# basically think I'm repeating the same method because there's no way to distinguish the methods from parameters, but if you look at my usage example, it seems like I should be able to distinguish which GetNew() I want from the generic type parameter, e.g, <ISomeEntity> or <ISomeOtherEntity>. What do I need to do to get this to work?

    Read the article

  • java applet - array checking

    - by Dan
    OK so my code is here: http://www.so.pastebin.com/m7V8rQ2n What I want to know... let's say I have an image which I can redraw on tiles... is there a way to check for future tiles so I DON'T go out of bounds of my already defined tile map? Like if I were at the edge of a map... it would NOT let me go past it? Thanks.

    Read the article

  • Displaying validation control in a div tag

    - by JaiGanesh
    I have a div tag for which i have defined a border. i have given the validation control inside the div tag Now before clicking the "submit" i get to see the div tag and border. - how to avoid this Now after clicking the "submit" i get to see the div tag and border- which is exptected and correct. My question how to hide the border in the div tag before clicking the "submit" button or on the click of the "cancel" button

    Read the article

  • How can I enable a debugging mode via a command-line switch for my Perl program?

    - by Michael Mao
    I am learning Perl in a "head-first" manner. I am absolutely a newbie in this language: I am trying to have a debug_mode switch from CLI which can be used to control how my script works, by switching certain subroutines "on and off". And below is what I've got so far: #!/usr/bin/perl -s -w # purpose : make subroutine execution optional, # which is depending on a CLI switch flag use strict; use warnings; use constant DEBUG_VERBOSE => "v"; use constant DEBUG_SUPPRESS_ERROR_MSGS => "s"; use constant DEBUG_IGNORE_VALIDATION => "i"; use constant DEBUG_SETPPING_COMPUTATION => "c"; our ($debug_mode); mainMethod(); sub mainMethod # () { if(!$debug_mode) { print "debug_mode is OFF\n"; } elsif($debug_mode) { print "debug_mode is ON\n"; } else { print "OMG!\n"; exit -1; } checkArgv(); printErrorMsg("Error_Code_123", "Parsing Error at..."); verbose(); } sub checkArgv #() { print ("Number of ARGV : ".(1 + $#ARGV)."\n"); } sub printErrorMsg # ($error_code, $error_msg, ..) { if(defined($debug_mode) && !($debug_mode =~ DEBUG_SUPPRESS_ERROR_MSGS)) { print "You can only see me if -debug_mode is NOT set". " to DEBUG_SUPPRESS_ERROR_MSGS\n"; die("terminated prematurely...\n") and exit -1; } } sub verbose # () { if(defined($debug_mode) && ($debug_mode =~ DEBUG_VERBOSE)) { print "Blah blah blah...\n"; } } So far as I can tell, at least it works...: the -debug_mode switch doesn't interfere with normal ARGV the following commandlines work: ./optional.pl ./optional.pl -debug_mode ./optional.pl -debug_mode=v ./optional.pl -debug_mode=s However, I am puzzled when multiple debug_modes are "mixed", such as: ./optional.pl -debug_mode=sv ./optional.pl -debug_mode=vs I don't understand why the above lines of code "magically works". I see both of the "DEBUG_VERBOS" and "DEBUG_SUPPRESS_ERROR_MSGS" apply to the script, which is fine in this case. However, if there are some "conflicting" debug modes, I am not sure how to set the "precedence of debug_modes"? Also, I am not certain if my approach is good enough to Perlists and I hope I am getting my feet in the right direction. One biggest problem is that I now put if statements inside most of my subroutines for controlling their behavior under different modes. Is this okay? Is there a more elegant way? I know there must be a debug module from CPAN or elsewhere, but I want a real minimal solution that doesn't depend on any other module than the "default". And I cannot have any control on the environment where this script will be executed...

    Read the article

  • Where to initialize a NSMutableArray?

    - by eco_bach
    Hi having an issue using a NSMutableArray; In my implementation file applicationDidFinishLaunching method I have _imgArray = [NSMutableArray array]; and _imgArray is defined in my .h file as NSMutableArray *_imgArray; After populating it, it traces out correctly. The problem is, in another method in my implementation file, I can't seem to acces the _imgArray array. It traces out to _imgArray= ar.lproj What gives?

    Read the article

  • problem with selecting a rows in advanced datagrid using keydown event

    - by user365559
    Hi, I have advanced datagrid with list of items is displayed.I am using keydown for selecting the rows.But the actual problem is when i am selecting the items after the 2nd item it should move to the 3rd item but instead of that its moving back to the 1st item.I have defined selectionmode property to singlerows even then the result same to be same.can any one give me the soloution.

    Read the article

  • Calling a C function in a pro*C file

    - by Sachin Chourasiya
    I have these line in my pro*C program. The function initAerage is defined in a C language and I am trying to call this function in a .pcc (pro C++) file. I am getting an error Error: initAverage(int i);was declared before with a different language extern "C" { int initAverage(int i); } Please help

    Read the article

  • What do you call the concept of dynamic data definition?

    - by DJTripleThreat
    Maybe this is simpler and more straightforward then what I'm thinking but I can't seem to find this concept on google anywhere. The concept is this: You have a table in a database and the table has a specified number of columns. However, it has been asked of me by previous clients that there also be a set of dynamic user defined columns that can be added on the fly. What is this concept called and is it considered a design pattern?

    Read the article

  • CodeIgniter - Calling a function from inside a view

    - by Chris
    Hey, Is it possible to call a function which is located in a controller from a view. This is what i have in my controller, as an example function checkKeyExists($userid, $key){ } Then inside my view i have the following if(checkKeyExists($row->id, $role->key)){ } But when i run it, it says that checkKeyExists is not defined. If anyone can let me know how i could do this, that would be great. Cheers

    Read the article

< Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >