Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
60 views

Consider the following OpenCL code in which each element in a vector-type variable gets its value via array lookup: float* tbl = get_data(); int4 offsets = get_offsets(); float4 my_elements = { ...
0 votes
1 answer
123 views

I am attempting at access a class that is like a multidimensional array through the operator[].. only to discover that a comma separated set of parameters is reduced to the first parameter only.. This ...
2 votes
1 answer
264 views

According to PHP documentation, Object Interfaces allow you to create code which specifies which methods a class must implement, without having to define how these methods are implemented. Hence, an ...
4 votes
1 answer
27k views

Trying to update to php 8.1 and noticed this deprecated notice showing up in the error logs I'd like to take care of. [14-Feb-2022 14:48:25 UTC] PHP Deprecated: Return type of TLDExtractResult::...
3 votes
2 answers
142 views

Why doesn't this code produce the same assembly? (g++ -O3) I know little of assembly but it seems case 2 accessing has less instructions, so should be preferred, right? I am asking this because I ...
0 votes
0 answers
49 views

I am studying radix sort and I can't understand why array accesses in radix sort is 11N+4R+1. The following is radix sort code written in Java. int n = a.length; String[] aux = new String[n]; //N int[]...
song's user avatar
  • 1
1 vote
2 answers
122 views

I would like to access an numpy array data via an index idx, but still preserving the order in data. Below is an example where the array is accessed with an order different from the one in the ...
zell's user avatar
  • 10.4k
0 votes
0 answers
50 views

I was wondering why accessing elements outside of array bound is allowed when it is clearly mentioned as undefined.
pasha's user avatar
  • 2,115
3 votes
1 answer
333 views

I am trying to run a 2 for loops to access 2 elements within an array, (e.g.) x = 100 for i in eachindex(x-1) for j in 2:x doSomething = Array[i] + Array[j] end end And often (not always) I ...
1 vote
2 answers
362 views

I need to iterate through every double in an array to do the "Laplacian Smoothing", "mixing values" with neighbour doubles. I'll keep stored values in a temp clone array update the original at the ...
3 votes
3 answers
962 views

This is my attempt at implementing https://www.php.net/manual/en/class.iterator.php for an ArrayAccess. Many examples use a container array as a private member variable; but I do not want to use a ...
12 votes
1 answer
177 views

I mostly can follow the syntax to 'drill down/slice' into an array with multiple dimensions (and flattening) on the docs page. A very cool feature. For example given: my @a=[[1,2,3], [4,5,6], ...
4 votes
1 answer
939 views

I wrote simple PHP class that implements ArrayAccess Interface: class MyArray implements ArrayAccess { public $value; public function __construct($value = null) { $this->value ...
Filip Š's user avatar
  • 756
1 vote
1 answer
523 views

So I'm working with some external PHP code that I don't have the full source for. I am using reflection to work out callable methods, etc. They have a class like so: class SpecialArray implments \...
2 votes
1 answer
1k views

Why we use ArrayAccess::offsetUnset() instead i hope unset() is enough to use. But php.net stated that: Note: This method will not be called when type-casting to (unset) Can anyone tell how we use ...

15 30 50 per page
1
2 3 4

AltStyle によって変換されたページ (->オリジナル) /