tagged [arrays]

Converting a Object[] array to an string[] array in c#?

Converting a Object[] array to an string[] array in c#? I have many ways to do it but still want to know is there any offical API to convert object[] to string[] With null checked? Thanks

10 Mar at 07:29

How do I assign ls to an array in Linux Bash?

How do I assign ls to an array in Linux Bash? I have three directories: `ww` `ee` `qq`. I want them in an array and then print the array.

19 Feb at 00:6

How do I create a numpy array of all True or all False?

How do I create a numpy array of all True or all False? In Python, how do I create a numpy array of arbitrary shape filled with all `True` or all `False`?

Populate list from array

Populate list from array if i have an array. can i populate a generic list from that array:

1 Apr at 01:53

Have Arrays in .NET lost their significance?

Have Arrays in .NET lost their significance? For every situation that warrants the use of an array ... there is an awesome collection with benefits. Is there any specific use case for Arrays any more ...

11 Sep at 18:14

Easy way to concatenate two byte arrays

Easy way to concatenate two byte arrays What is the easy way to concatenate two `byte` arrays? Say, How do I concatenate two `byte` arrays and store it in another `byte` array?

9 May at 11:40

How to check if a string contains text from an array of substrings in JavaScript?

How to check if a string contains text from an array of substrings in JavaScript? Pretty straight forward. In javascript, I need to check if a string contains any substrings held in an array.

How can I remove a specific item from an array in JavaScript?

How can I remove a specific item from an array in JavaScript? How do I remove a specific value from an array? Something like: Constraints: I have to use JavaScript. Frameworks are not allowed.

6 Feb at 14:23

How to get subarray from array?

How to get subarray from array? I have `var ar = [1, 2, 3, 4, 5]` and want some function `getSubarray(array, fromIndex, toIndex)`, that result of call `getSubarray(ar, 1, 3)` is new array `[2, 3, 4]`.

21 Mar at 17:14

equals vs Arrays.equals in Java

equals vs Arrays.equals in Java When comparing arrays in Java, are there any differences between the following 2 statements? And if so, what are they?

9 Jan at 22:38

Correct way to initialize empty slice

Correct way to initialize empty slice To declare an empty slice, with a non-fixed size, is it better to do: or: Just wondering which one is the correct way.

20 Jul at 14:3

C pointer to array/array of pointers disambiguation

C pointer to array/array of pointers disambiguation What is the difference between the following declarations: What is the general rule for understanding more complex declarations?

Most elegant way to convert string array into a dictionary of strings

Most elegant way to convert string array into a dictionary of strings Is there a built-in function for converting a string array into a dictionary of strings or do you need to do a loop here?

9 Jul at 06:28

Convert JSON string to array of JSON objects in Javascript

Convert JSON string to array of JSON objects in Javascript I would like to convert this string to array of 2 JSON objects. How should I do it? best

7 Dec at 10:21

convert string array to string

convert string array to string I would like to convert a string array to a single string. I would like to have something like "Hello World!"

30 Jan at 05:55

How to write a class that (like array) can be indexed with `arr[key]`?

How to write a class that (like array) can be indexed with `arr[key]`? Like we do `Session.Add("LoginUserId", 123);` and then we can access `Session["LoginUserId"]`, like an Array, how do we implement...

24 Jul at 14:25

How to split a String by space

How to split a String by space I need to split my String by spaces. For this I tried: But it doesn't seem to work.

17 Sep at 09:58

Laravel array to string conversion

Laravel array to string conversion I want to convert my array to comma separated string. my array I want result as `streaming,ladies bag`

21 Mar at 14:54

How to split a delimited string in Ruby and convert it to an array?

How to split a delimited string in Ruby and convert it to an array? I have a string `"1,2,3,4"` and I'd like to convert it into an array: How?

12 Jan at 02:39

Removing array item by value

Removing array item by value I need to remove array item with given value: Could it be done in shorter (more efficient) way?

10 Dec at 19:36

Convert string to array in without using Split function

Convert string to array in without using Split function Is there any way to convert a string (`"abcdef"`) to an array of string containing its character (`["a","b","c","d","e","f"]`) without using the...

1 Dec at 09:31

concatenate char array in C

concatenate char array in C I have a a char array: I want to add an extension to that name to make it How can I do this? `name += ".txt"` won't work

7 Feb at 21:48

How to initialize array to 0 in C?

How to initialize array to 0 in C? I need a big null array in C as a global. Is there any way to do this besides typing out ?

10 May at 18:51

Getting a union of two arrays in JavaScript

Getting a union of two arrays in JavaScript Say I have an array of `[34, 35, 45, 48, 49]` and another array of `[48, 55]`. How can I get a resulting array of `[34, 35, 45, 48, 49, 55]`?

24 Oct at 15:26

How is Python's List Implemented?

How is Python's List Implemented? Is it a linked list, an array? I searched around and only found people guessing. My C knowledge isn't good enough to look at the source code.