Search Results

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

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

  • Hyphen in Array keys

    - by Vincent
    All, I have an array with hyphens in the key name. How do I extract the value of it in PHP? It returns a 0 to me, if I access like this: print $testarray->test-key; This is how the array looks like testarray[] = {["test-key"]=2,["hotlink"]=1} Thanks

    Read the article

  • Declare java enum with a String array

    - by chama
    I'm trying to declare an enum type based on data that I'm retrieving from a database. I have a method that returns a string array of all the rows in the table that I want to make into an enumerated type. Is there any way to construct an enum with an array? This is what I tried, but from the way it looked in eclipse, it seemed like this just created a method by that name: public enum ConditionCodes{ Condition.getDescriptions(); } Thank you in advance!

    Read the article

  • Strange text when converting XML array to XML

    - by danit
    Im using the answer to this question to convert an array of XML to a single XML output: http://stackoverflow.com/questions/2554671/output-array-of-xml-to-plain-xml Im using the simpler solution of the two there (Marked as the answer) It all works for me, however at the start of the output I get: string(109960) " Can anyone shed any light on this? Output here: http://bit.ly/aoA3qY

    Read the article

  • Write string to fixed-length byte array in C#

    - by toasteroven
    somehow couldn't find this with a google search, but I feel like it has to be simple...I need to convert a string to a fixed-length byte array, e.g. write "asdf" to a byte[20] array. the data is being sent over the network to a c++ app that expects a fixed-length field, and it works fine if I use a BinaryWriter and write the characters one by one, and pad it by writing '\0' an appropriate number of times. is there a more appropriate way to do this?

    Read the article

  • Question regarding array reference

    - by Sachin
    Let us say that we have following array: my @arr=('Jan','Feb','Mar','Apr'); my @arr2=@arr[0..2]; How can we do the same thing if we have array reference like below: my $arr_ref=['Jan','Feb','Mar','Apr']; my $arr_ref2; # How can we do something similar to @arr[0..2]; using $arr_ref ?

    Read the article

  • Parallel computation of the median of a large array

    - by recipriversexclusion
    I got asked this question once and still haven't been able to figure it out: You have an array of N integers, where N is large, say, a billion. You want to calculate the median value of this array. Assume you have m+1 machines (m workers, one master) to distribute the job to. How would you go about doing this? Since the median is a nonlinear operator, you can't just find the median in each machine and then take the median of those values.

    Read the article

  • Indexing one-dimensional numpy.array as matrix

    - by Alain
    I am trying to index a numpy.array with varying dimensions during runtime. To retrieve e.g. the first row of a n*m array a, you can simply do a[0,:] However, in case a happens to be a 1xn vector, this code above returns an index error: IndexError: too many indices As the code needs to be executed as efficiently as possible I don't want to introduce an if statement. Does anybody have a convenient solution that ideally doesn't involve changing any data structure types?

    Read the article

  • How to convert a 2-d array into a dictionary object

    - by Nikron
    Hi, I have an array of type string that looks like this: "test1|True,test2|False,test3|False,test4|True". This is essentially a 2d array like so [test1][True] [test2][False] [test3][False] [test4][True]. I want to convert this into a dictionary<string,bool> using linq, something like: Dictionary<string, bool> myResults = results.Split(",".ToCharArray).ToDictionary() any ideas?

    Read the article

  • finding middle element of an array

    - by senthil
    Hi all, I came cross a question in my interview. Question: Array of integers will be given as the input and you should find out the middle element when sorted , but without sorting. For Example. Input: 1,3,5,4,2 Output: 3 When you sort the given input array, it will be 1,2,3,4,5 where middle element is 3. You should find this in one pass without sorting. Any solutions for this?

    Read the article

  • why the sexp has array in the end

    - by dorelal
    RubyParser.new.parse "1+1" s(:call, s(:lit, 1), :+, s(:array, s(:lit, 1))) Above code is from this link Why there is array after + in the Sexp. I am just trying to learn ruby parser and the whole AST thing. I have been programming for a while but have no formal education in computer science. So do point to good article which explains AST etc. Please no dragon book. I tried couple of times but couldn't understand much of that book

    Read the article

  • Convert DOMElement Array to jQuery Object

    - by Tim N
    I am using the DataTables plugin for jQuery and need to get one of the table rows. DataTables has a fnGetNodes function that returns an Array with all of the DOMElements of the table. I would like to use a jQuery selector to find that row (I know the id of the row), but I need to convert the Array to a jQuery Object, is this possible?

    Read the article

  • search substring from mutable array in iphone

    - by user566431
    how to search substring from mutable array? NSMutableArrray names having string values, searchText is a substring to search from name array values. for (NSString *sTemp in names) { NSRange titleResultsRange = [sTemp rangeOfString:searchText options:NSCaseInsensitiveSearch]; //NSLog(@"sTemp = %@, searchText = %@",sTemp,searchText); NSLog(@"%@",titleResultsRange.length); if (titleResultsRange.length > 0) [Items addObject:sTemp]; }

    Read the article

  • give preference to print array values in php

    - by Bharanikumar
    Hi , I have country table, i fetch all values and moved into array , these value i like to populate into combo/dropdown list , here i want to do some magic things, that is , for my site most of the users coming from uk,us,Australia,Romain and few, So i like to populate by my preference , is there any array will do this magic work, else is it possible mysql query , So final question is , Populate country name into combo based on my prefernce , Thanks

    Read the article

  • PHP array question.

    - by TaG
    How do I show the dates number format next to its name in the array using PHP? So that the number format is saved in the database and the month name is displayed? Here is the php code. $month_options = array("Month", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

    Read the article

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