Search Results

Search found 6079 results on 244 pages for 'define'.

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

  • GWT - How to define a Widget outside layout hierarchy in uibinder xml file

    - by mr_room
    Hello, this is my first post. I hope someone could help me. I'm looking for a way to define a widget in UiBinder XML layout file separately, without being part of the layout hierachy. Here's a small example: <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <g:Label ui:field="testlabel" text="Hallo" /> <g:HTMLPanel> ... </g:HTMLPanel> The compile fails since the ui:UiBinder element expects only one child element. In Java Code i will access and bind the Label widget as usual: @UiField Label testlabel; For example, this could be useful when you define a Grid or FlexTable - i want to define the Labels for the table header within the XML layout file, not programmatically within the code. Many thanks in advance

    Read the article

  • Checking when two headers are included at the same time.

    - by fortran
    Hi, I need to do an assertion based on two related macro preprocessor #define's declared in different header files... The codebase is huge and it would be nice if I could find a place to put the assertion where the two headers are already included, to avoid polluting namespaces unnecessarily. Checking just that a file includes both explicitly might not suffice, as one (or both) of them might be included in an upper level of a nesting include's hierarchy. I know it wouldn't be too hard to write an script to check that, but if there's already a tool that does the job, the better. Example: file foo.h #define FOO 0xf file bar.h #define BAR 0x1e I need to put somewhere (it doesn't matter a lot where) something like this: #if (2*FOO) != BAR #error "foo is not twice bar" #endif Yes, I know the example is silly, as they could be replaced so one is derived from the other, but let's say that the includes can be generated from different places not under my control and I just need to check that they match at compile time... And I don't want to just add one include after the other, as it might conflict with previous code that I haven't written, so that's why I would like to find a file where both are already present. In brief: how can I find a file that includes (direct or indirectly) two other files? Thanks!

    Read the article

  • define integer array fortran

    - by Praveen
    Hello friends, I am a newbie in Fortran. Can any1 tell me how to define an integer array in prior. E.g. I want to define an array with no.of days in 12 months. like... integer,allocatable(12,1) :: days days=[31,28,31,30,31,30,31,31,30,31,30,31] Is this syntax correct? If not, please let me know the correct one. Thanks Praveen

    Read the article

  • using #define in a .pch

    - by ML
    Hello All, If I define something in a pre-compiled header like: #define __BUILD_MAC__ and then in a header file do: #ifdef __BUILD_MAC__ typedef void* HINSTANCE; #endif This should work. But for some reason It isn't. I know because when I compile I get errors about HINSTANCE not naming a type. Do I need to do anything else to make these defines available?

    Read the article

  • How to define an alias in fish shell?

    - by armandino
    I would like to define some aliases in fish. Apparently it should be possible to define them in ~/.config/fish/functions but they don't get auto loaded when I restart the shell. Any ideas? p.s. if anyone is using or has used fish in the past I'd be interested to hear your comments as to whether it offers anything that bash does not.

    Read the article

  • Extracting fields from a define-type object in Scheme

    - by Mike
    Hi, I am trying to extract the field 'name' or 'named-expr' from the following object: (bind 'x (num 5)) ;; note that this is not a list, but a type Binding With the Binding definition: (define-type Binding (bind (name symbol?) (named-expr WAE?))) I have tried, but received the error "reference to an identifier before its definition: Binding-name." Here is what I tried typing: (begin (Binding-name (bind 'x (num 5)))) (begin (define x (bind 'x (num 5))) (Binding-name x)) Thank you!

    Read the article

  • how to use store define in store folder

    - by Kevin Morfin
    I'm new to sencha-touch. I was wondering how to properly use the file structure in sencha-touch. For example, under the app folder there's your controller, model, profile, store, view folders. If I define a store, for example under the the store folder I create a file named search.js Ext.define('Volunteer.store.search'{ extend: 'Ext.data.Store', requires: ['Volunteer.model.person'], config:{ model: 'Volunteer.model.person' } }); How do I use this store in a different file?

    Read the article

  • Define keys in temporary table creation

    - by imperium2335
    How do I define the keys for a temporary table that is being created from a SELECT statement? I have: CREATE temporary TABLE _temp_unique_parts_trading engine=memory AS (SELECT parts_trading.enquiryref, sellingcurrency, jobs.id AS jobID FROM parts_trading, jobs WHERE jobs.enquiryref = parts_trading.enquiryref GROUP BY parts_trading.enquiryref) But where do I define the keys?

    Read the article

  • How to define schema for an ActiveRecord model?

    - by Eric Stanton
    I can find how to define columns only when doing migrations. However i do not need to migrate my model. I want to work with it "virtually". Does AR read columns data only from db? Any way to define columns like in DataMapper? class Post include DataMapper::Resource property :id, Serial property :title, String property :published, Boolean end Now i can play with my model without migrations/connections.

    Read the article

  • #Define Compiler Directive in C#

    - by pm_2
    In C, I could declare a compiler directive as follows: #define MY_NUMBER 10 However, in C#, I only appear to be able to do this: #define MY_NUMBER Which is obviously useless in this case. Is this correct, or am I doing something wrong? If not, can anyone suggest a way of doing this, either at namespace or solution level? I thought of maybe creating a static class, but that seems to be overkill for one value.

    Read the article

  • [MSVC++ 2008] Using preprocessor directives to define command line options

    - by Gbps
    If I wanted to add, let's say, a new .lib to the build only if a particular #define was set, how would I do that? In the MSVC++ 2008 "Property Pages", you would simply add: Config Properties -> Linker -> Input -> Additional Dependencies, but I would like it if something like #define COMPILE_WITH_DETOURS was set, then the particular library would be added to the dependencies, otherwise it would be removed. Thanks!

    Read the article

  • How to define a class with variable properties?

    - by user1723326
    I'm making a database program. I want the user to be able to define their own columns, as many as they want. How would I then define each record in its class file?(Since the properties would be different user to user) EDIT: It's part of a school assignment-it's going to hold different scores and the likes for the teacher for different students they can add, but they will also be able to add a new assignment, test(a column) .

    Read the article

  • Define background Image with UIImage

    - by Wohoo Summer
    I am using header file to set the background for my application and I have something like #define backgroundImage [UIColor colorWithPatternImage:[UIImage imageNamed:@"background.jpeg"]] but I want use UIImageView instead of UIColor. I know I can do: UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480) [imageView setImage:[UIImage imageNamed:@"background.png"]]; self.tableView.backgroundView = imageView; but how do I use it with #define?

    Read the article

  • Define and send a JSON object array

    - by Eric
    I'm looking for a way to define and send a JSON object array. I've figured out how to define a single JSON object, turn it into a string and send it, but what about an array of this type? Probably something simple I'm overlooking... var myColumnSetting = { "ColumnName": name, "ColumnIndex": index } convert it to a string var myJSONText = JSON.stringify(myColumnSetting, false);

    Read the article

  • Can you use #defined values in if statements (In C programs)?

    - by Jordan S
    I am new at C programming. I thought when you type something like #define Const 5000 that the compiler just replaces every instance of Const with 5000 at compile time. Is that wrong? I try doing this in my code and I get a syntax error. Why can't i do this? #define STEPS_PER_REV 12345 ... in some function if(CurrentPosition >= STEPS_PER_REV) { // do some stuff here } The compiler complains about the if statement with a syntax error that gives me no details.

    Read the article

  • Typechecking macro arguments in C

    - by Rocketmagnet
    Hi all, Is is possible to typecheck arguments to a #define macro? For example: typedef enum { REG16_A, REG16_B, REG16_C }REG16; #define read_16(reg16) read_register_16u(reg16); \ assert(typeof(reg16)==typeof(REG16)); The above code doesn't seem to work. What am I doing wrong? BTW, I am using gcc, and I can guarantee that I will always be using gcc in this project. The code does not need to be portable.

    Read the article

  • Define custom escape sequences in terminal

    - by Ipkiss
    I would like to change the escape sequences used by some keys in my terminal. My goal is to define custom mappings in Vim (terminal version). In the following I use shift-space as an example, but I would prefer if the proposed solution could be generic. My current terminal (gnome-terminal) uses a simple space as escape sequence for shift-space, as can be seen by typing ctrl-v shift-space. A quick check with the true xterm shows the same behavior. I would like that the shift-space key combo generates another escape sequence (e.g., the one of shift-F30, which I would never use otherwise). So, how would I go about doing that? And is it really a good idea? Let me know if there are better alternatives... Note: I'm aware that this is only part of the problem: after the terminal sends a proper escape sequence for my keys, I still need to teach Vim what it means. But I think I know how to deal with that.

    Read the article

  • bond0:0 + define virtual IP

    - by yael
    hi all in my linux server I have the follwoing: Linux Version - RedHat-Linux- 5.3.0.0 (this linux server only only one LAN) more /etc/sysconfig/network-scripts/ifcfg-bond0:0 DEVICE=bond0:0 ONBOOT=yes BOOTPROTO=static IPADDR=10.10.10.12 NETMASK=255.255.255.0 ifconfig -a bond0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 UP BROADCAST MASTER MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) bond0:0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:10.10.10.12 Bcast:1.1.1.255 Mask:255.255.255.0 UP BROADCAST MASTER MULTICAST MTU:1500 Metric:1 eth0 Link encap:Ethernet HWaddr 00:0E:0C:C7:F8:92 inet addr:1.1.1.1 Bcast:1.1.1.255 Mask:255.255.255.0 inet6 addr: fe80::20e:cff:fec7:f892/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8600 errors:0 dropped:0 overruns:0 frame:0 TX packets:4764 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:717979 (701.1 KiB) TX bytes:598620 (584.5 KiB) Memory:b8820000-b8840000 my problems: why I get HWaddr 00:00:00:00:00:00 and not the real MAC address I cant ping to other server with 10.10.10.11 from my server is it posible to define bond0:0 when I have only one LAN (eth0) other info: more /etc/modprobe.conf alias eth0 e1000e alias eth1 e1000e alias eth2 e1000e alias eth3 e1000e alias scsi_hostadapter mptbase alias scsi_hostadapter1 mptsas alias scsi_hostadapter2 ata_piix alias bond0 bonding alias bond1 bonding

    Read the article

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