Search Results

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

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

  • 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

  • How to format given string using regex?

    - by icoolninja
    So I have defined variables in such a way in my file: public static final String hello_world = "hello world" public static final String awesome_world = "awesome world" public static final String bye_world= "bye world" I have many declarations like that. Is it possible to format them as(All '=' in a line): public static final String hello_world = "hello world" public static final String awesome_world = "awesome world" public static final String bye_world = "bye world" I can't even think of a way to do it. Any kind of help is appreciated. P.S If it matters, I use sublime text 2.

    Read the article

  • Does Entity Framework currently support custom functions in the Where clause?

    - by André Pena
    Entity Framework currently supports table valued functions and custom functions defined in the SSDL, but I can't find any example of it being used as a criteria, in the where clause. Example: var query = this.db.People; query = query.Where(p = FullText.ContainsInName(p.Id, "George")); In this example, ContainsInName is my custom function that I want to be executed in the where clause of the query. Is it supported?

    Read the article

  • Collision free hash function for a specific data structure

    - by Max
    Is it possible to create collision free hash function for a data structure with specific properties. The datastructure is int[][][] It contains no duplicates The range of integers that are contained in it is defined. Let's say it's 0..1000, the maximal integer is definitely not greater than 10000. Big problem is that this hash function should also be very fast. Is there a way to create such a hash function? Maybe at run time depending on the integer range?

    Read the article

  • Help using recursion in Java

    - by Mercer
    I have a class Group. In the class I have two fields, idGroup IdGroupGroup. Groups may be part of other groups. My class Group is defined in a HashMap<Integer,Integer>; the key is IdGroupGroup and value is idGroup. I want to search the map for a particular idGroup; can I use recursion to do this?

    Read the article

  • Create a new instance in a static function of an abstract class

    - by arno
    abstract class db_table { static function get_all_rows() { ... while(...) { $rows[] = new self(); ... } return $rows; } } class user extends db_table { } $rows = user::get_all_rows(); I want to create instances of a class from a static method defined in the abstract parent class but PHP tells me "Fatal error: Cannot instantiate abstract class ..." How should I implement it correctly?

    Read the article

  • [CakePHP] Dynamic fields on insert/edit form

    - by user198003
    hi all, let's say that i have 3 tables: books properties book_properties of course, i would like that when i want to insert new book (or update existing), to fill the form. fields that exist on form have to be defined as records in table properties. when i fill up those fields, data has to be saved in table book_properties. can you help me by giving some advices and references, how to achieve that? thank you very much in advance!

    Read the article

  • Mocking view helpers with rspec-rails 2.0.0.beta.8

    - by snl
    I am trying to mock a view helper with rspec2. The old way of doing this throws an error, complaining the template object is not defined: template.should_receive(:current_user).and_return(mock("user")) Am I missing something here, or is this not implemented in rspec2 (yet)?

    Read the article

  • C++ Pass a hidden arg to a class constructor?

    - by JP
    I would like to define a class that accept the pointer to it's parent class as an Argument, but would it be possible to somehow pass it without needing to pass it directly such as: class Child { public: Child(Parent* hiddenArg); }; class Parent { public: Child myChild; }; I know this is weird, but I am making my own Signal/Slot implementation and Child would be a signal defined, but I would like to get the parent so I can use it's Event Dispatcher...

    Read the article

  • Under what conditions will you get unresolved external symbol for __declspec(dllimport)?

    - by Mark
    I am converting an application to use .dlls and I'm riddled with linker errors stating unersolved external symbol"__declspec(dllimport) public: void __thiscall Rail::SetNextrail(class Rail *)" There is more gibberish at the end of this error message. Why should this happen and how do you fix it? __declspec(dllimport) is being placed with a macro defined as: #ifdef LUDOAI_EXPORT #define DECLSPECAI __declspec(dllexport) #else #define DECLSPECAI __declspec(dllimport) #endif

    Read the article

  • Haskell and random numbers

    - by John D.
    Hi, I've been messing with Haskell few days and stumbled into a problem. I need a method that returns a random list of integers ( Rand [[Int]] ). So, I defined a type: type Rand a = StdGen -> (a, StdGen). I was able to produce Rand IO Integer and Rand [IO Integer] ( (returnR lst) :: StdGen -> ([IO Integer], StdGen) ) somehow. Any tips how to produce Rand [[Int]]?

    Read the article

  • Is there a way to stop all javascript on the page?

    - by M28
    I need to stop all the javascript running on the page, but I have a limitation: I cannot control the tags content, I am editing the page after it's being loaded. Also, I need to remove all the variables defined by the old script that was running and stop all the intervals.

    Read the article

  • Lookups in Multi-Tenant Database

    - by Huthaifa Afanah
    I am developing a SaaS application and I am looking for the best way to design lookup tables, taking in consideration: The look-up tables will have predefined data shared among all the tenants Each tenant must have the ability to extend the look-up table with his own data e.g adding a car class not defined I am thinking about adding TenantID column to each lookup and add the predefined data with setting that column to some value which represents the "Super Tenant" that belongs to the system itself

    Read the article

  • What is DEFAULT_CC in function declaration?

    - by humoeba
    I'm relatively new to C, and am curious what this syntax means in a function declaration: int DEFAULT_CC foo(void) where DEFAULT_CC is probably defined somewhere else as: #define DEFAULT_CC "cc" Is this a direction to use a certain compiler or something?

    Read the article

  • VIM plugin for updating C++ function definition

    - by Sunny
    I'm looking for a VIM plugin that can do these kind of thing. Let's say I have a function in a .cpp file void myFunction(int arg1, int arg2, int arg3){ //code } The function definition is defined in the .h file. So every time I change the function name or add a new argument to the function, I have to go back the the .h file to do the same. Is there a VIM plugin that can automate this task?

    Read the article

  • What could be the Consequence of inserting "id" in any autoincrementing 'id' containing table?

    - by Parth
    What could be the Consequence of inserting "id" in any autoincrementing 'id' containing table? If I have a Tabe in which I have configured the column "id" as the auto incrmented, But still I am using an INSERT query in which id is defined, like wise INSERT INTO XYZ (id) values ('26'); How does it going to effect the table and the process related to it.. Is it "no issues" to do this? or it should be avoided?

    Read the article

  • Getting text boxes on a webpage

    - by C-UNIT
    So what I am trying to do is make an application (just for fun, not a lot of purpose), where when you launch it a interface comes up consisting of Username: textboxhere Password: textbox2here then a connect button, and when you fill out your information in the textboxs' then click Connect, it navigates to facebook.com and puts in your information that you defined in the textbox and logs you in. Any ideas guys?

    Read the article

  • Incompatible pointer type

    - by Boffin
    Hello. I have the function with following signature: void box_sort(int**, int, int) and variable of following type: int boxes[MAX_BOXES][MAX_DIMENSIONALITY+1] When I am calling the function box_sort(boxes, a, b) GCC gives me two warnings: 103.c:79: warning: passing argument 1 of ‘box_sort’ from incompatible pointer type (string where i am calling the function) 103.c:42: note: expected ‘int **’ but argument is of type ‘int (*)[11] (string where the function is defined) The question is why? Whether int x[][] and int** x (and actually int* x[]) are not the same types in C?

    Read the article

  • MySQL INSERT IGNORE not working

    - by gAMBOOKa
    Here's my table with some sample data a_id | b_id ------------ 1 225 2 494 3 589 When I run this query INSERT IGNORE INTO table_name (a_id, b_id) VALUES ('4', '230') ('2', '494') It inserts both those rows when it's supposed to ignore the second value pair (2, 494) No indexes defined, neither of those columns are primary. What don't I know?

    Read the article

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