The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
3answers
506 views

Is there a way to add unique items to an array without doing a ton of comparisons?

Please bare with me, I want this to be as language agnostic as possible becuase of the languages I am working with (One of which is a language called PowerOn). However, most languanges support for ...
0
votes
4answers
12k views

2 Dimensional Arrays in C++

I started learning arrays in C++ and came over a little side note in the book talking about 2D arrays in breif. I tested it out and i was amazed that it could give the programmer the ability to store ...
1
vote
2answers
549 views

Should I create specific classes for JSON Objects or only use the container(Array/Dictionary) for accessing Data?

I'm using Foursquare to get a List of Restaurants nearby inside an iOS app. The Result is stored in an Array which consists of Dictionaries and regarding how deep the Data is, each Dictionary contains ...
3
votes
3answers
2k views

C Flexible Arrays: When did they become part of the standard?

I learned to program in C many years ago, and used C steadily for about 10 years. These days, I occasionally have to look at C code, because our Informix 4GL RDS customized runners also contain C ...
0
votes
2answers
339 views

arrays format (Javascript)

I have a list of users, with minions, something like this: User52: minion10 minion12 User32: minion13 minion11 I've been keeping in an array where the "location" is the ...
6
votes
8answers
8k views

What is the difference between an Array and a Stack?

According to Wikipedia, a stack: is a last in, first out (LIFO) abstract data type and linear data structure. While an array: is a data structure consisting of a collection of elements ...
5
votes
6answers
794 views

why are both index[array] and array[index] valid in C?

For example consider: int index = 3; int array[4] = {0, 1, 2, 3}; then both index[array] and array[index] are valid expressions, much like *(index + array) and *(array + index). In C arrays why is ...
6
votes
2answers
610 views

How to remove the boundary effects arising due to zero padding in scipy/numpy fft?

I have made a python code to smoothen a given signal using the Weierstrass transform, which is basically the convolution of a normalised gaussian with a signal. The code is as follows: #Importing ...
1
vote
1answer
375 views

Is there a more efficient way to filter large arrays than preg_match()?

I have a log that our web application builds. Each month it contains around 16,000 entries of a string with about the average sentence worth of text. To filter/search through these in our admin panel ...
0
votes
2answers
1k views

Subscript binding and array categories

I am learning "Programming languages principles" and there is a lot of information about stuff which make up a programming language . Unfortunately every material I came across until now has a lot of ...
0
votes
4answers
1k views

What is the easiest way of viewing an RGB byte array as an image? [closed]

I have a byte array stored in a file. I want the quickest, easiest way of viewing the image whether it is writing code or using a utility or web page.
6
votes
3answers
2k views

Ordered enumeration: IEnumerable or Array (in C#)?

Typical context: I make an extension method for a collection which considers that the elements are ordered. The function starts at the beginning, at index 0, and the order has significance. Examples: ...
0
votes
2answers
6k views

Best practice Java - String array constant and indexing it

For string constants its usual to use a class with final String values. But whats the best practice for storing string array. I want to store different categories in a constant array and everytime a ...
2
votes
4answers
363 views

Algorithm design for comparing split times in a race

I need to determine the ranking of values in an array without altering their position, so that I can print the position of each split time next to the actual value of the split time in a table like ...
1
vote
6answers
876 views

Why isn't the line count in Visual Studio zero-based?

This just struck me as an oversight by Microsoft. Since arrays and other data-structures within the .NET framework begin from zero (zero-based) why don't we have a line 0 within the code view in ...
2
votes
3answers
476 views

What are pros and cons of using temporary “references”?

In C and C++ (and I guess other languages that allow taking a "reference" to an array element or something similar), when you have an array like type, accessing individual elements of such an array ...
4
votes
3answers
789 views

Lisp: Benefits of lists as code over arrays as code?

Question for lisp programmers: Lisp code is lisp data, usually lists. Is there an advantage to code being lists over code being arrays? Would macros be easier to write/faster to run? You can ...
0
votes
2answers
795 views

Question regarding LinkedList in Java

When I was reading a book for SCJP, I came across the following paragraph. A LinkedList is ordered by index position, like ArrayList, except that the elements are doubly-linked to one another. ...