Search Results

Search found 15239 results on 610 pages for 'array population'.

Page 85/610 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • Find First Specific Byte in a Byte[] Array c#

    - by divinci
    Hi there, I have a byte array and wish to find the first occurance (if any) of a specific byte. Can you guys help me with a nice, elegant and efficient way to do it? /// Summary /// Finds the first occurance of a specific byte in a byte array. /// If not found, returns -1. public int GetFirstOccurance(byte byteToFind, byte[] byteArray) { }

    Read the article

  • How to pass array element one by one in text box in php

    - by trainee
    i am Reading the file contents and passed it in explod function("=",$string) ,it gives me two array parts[0].parts[1] seprated by = .parts[1] array displays all the values of the variable .now how can i use these values one by one to pass in the text box .The variable value comes in this way (value1 value2 value3 value4...) my code also throws the undefined offset :1 notice when i prints the parts[1]arrray

    Read the article

  • compare two following values in numpy array

    - by Billy Mitchell
    What is the best way to touch two following values in an numpy array? example: npdata = np.array([13,15,20,25]) for i in range( len(npdata) ): print npdata[i] - npdata[i+1] this looks really messed up and additionally needs exception code for the last iteration of the loop. any ideas? Thanks!

    Read the article

  • Android which button index from array was pressed

    - by Tim Wayne
    How do I set up a OnClickListener to simply tell me which index button was pressed from an array of buttons. I can change text and color of these buttons using the array. I set them up like this. TButton[1] = (Button)findViewById(R.id.Button01); TButton[2] = (Button)findViewById(R.id.Button02); TButton[3] = (Button)findViewById(R.id.Button03); up to 36.

    Read the article

  • Instantiate dynamic array Magento

    - by Tegan Snyder
    Kick me if I'm being silly but some some reason I'm having a heck of time building a dynamic array in magento. Example: $data = array(); $data[0] = 'test'; $data[1] = 'what'; I keep getting an ERROR: Notice: Undefined offset: 0 Any ideas? Do I need to handle these arrays differently since they are in a class?

    Read the article

  • Opening a file in c++ by using a string array of adress

    - by muhammad-aslam
    Hello guYz plz help me out in making it possible to open the files by the adress provided in an array of strings......... a way to open file is as given below... ifstream infile; infile.open("d:\aslam.txt"); but how can i open file providing an array of string as an adress of file..... like this infile.open(arr[i]); (but its not working) plz help me.........

    Read the article

  • Virtually shifting an array

    - by kmukund87
    Hi, I am using C#. I have an array of size 10. I want to pass it to a function, but only from the second element. In C, this is how I would implement it myfunc( myarray + 1 ) Effectively I am virtually shifting the array / deleting the first element. How do I implement this in C# ?

    Read the article

  • pass array by reference in c

    - by Yassir
    How can I pass an array of struct by reference ? example : struct Coordinate { int X; int Y; }; SomeMethod(Coordinate *Coordinates[]){ //Do Something with the array } int main(){ Coordinate Coordinates[10]; SomeMethod(&Coordinates); }

    Read the article

  • Iterating through list of keys for associative array in JSON

    - by Simon_Weaver
    I have an associative array in JSON var dictionary = {"cats":[1,2,37,38,40,32,33,35,39,36], "dogs", [4,5,6,3,2]}; Can I get the keys from this? I tried in Visual studio putting a breakpoint but can't see any property that represents keys. Is it not possible? I'm fine creating a separate array if necessary, but was just hoping it wasnt : var keys = ["cats", "dogs"];

    Read the article

  • Init array with bool values

    - by iFloh
    my attempt to init an array with a number of bool values using: [myArray initWithObjects:[NSNumber numberWithBool:YES], [NSNumber numberWithBool:YES], [NSNumber numberWithBool:YES], nil]; seems to fail since the debugger shows an empty array after this statement is carried out ... Any clues?

    Read the article

  • Mips, how to read array and print them??

    - by Leon
    okay, C++ and java i have no problem learning or what so ever when it comes to mips it is like hell okay i wanna learn how to read in the an array and print all the element out here is a simple array that i wrote int[] a = new int[20]; for(int i=0; i for(int j=0; j how do you do it in mips

    Read the article

  • issue when outputting an http:// address in a sub-array with json and php

    - by Patrick
    Im trying to achieve an output like this {"status":"ok","0":{"id":"11","title":"digg","url":"http://www.digg.com"}} but instead i am getting this {"status":"ok","0":{"id":"11","title":"digg","url":"http:\/\/www.digg.com"}} this is the php code im using to generate the json $links = array('id'=>'11','title'=>'digg','url'=>"http://www.digg.com"); $msg = array('status'=>'ok',$links); echo json_encode($msg); any idea what is causing this?

    Read the article

  • Cocoa JSON - Check whether array or dictionary

    - by Craig
    Hi, I am using the Cocoa JSON framework ( http://code.google.com/p/json-framework/ ) to communicate with an API. The problem is that the API returns a dictionary if there is an error but returns an array of the results if it works. Is there a good way to detect if the JSONValue is an array or a dictionary? Thanks.

    Read the article

  • inserting array into database table in single query

    - by Praveen Prasad
    iam having an array of items like [item1,itmem2,item3]; i have to insert these items at a particular userId: final results look like this UserId ItemId 2 || item1 2 || item2 2 || item3 currently iam looping through the array in php code and inserting each item one by one eg foreach($items as $item) { insert into items (UserId,ItemId) value (2,$item); } is it possible i can insert all entries in single query.

    Read the article

  • Change an array's value in x86 assembly (embedded in C++)

    - by VV
    I am messing around with assembly for the first time, and can't seem to change the index values of an array. Here's the method I am working on int ascending_sort( char arrayOfLetters[], int arraySize ) { char temp; __asm { //??? } } And these are what I tried mov temp, 'X' mov al, temp mov arrayOfLetters[0], al And this gave me an error C2415: improper operand type so I tried mov temp, 'X' mov al, temp mov BYTE PTR arrayOfLetters[0], al This complied, but it didn't change the array...

    Read the article

  • How to count JavaScript array objects?

    - by Nikita Sumeiko
    When I have a JavaScript array like this: var member = { "mother": { "name" : "Mary", "age" : "48" }, "father": { "name" : "Bill", "age" : "50" }, "brother": { "name" : "Alex", "age" : "28" } } How to count objects in this array?!I mean how to get a counting result 3, because there're only 3 objects inside: mother, father, brother?!

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >