Skip to main content
-1 votes
1 answer
86 views

In the below code line, if I am not mistaken, we are creating the object of the class layer.Dense from tensorflow.keras and then passing some arguments to the object in the parethesis. x = layers....
Sushodhan V's user avatar
4 votes
0 answers
232 views

This question originated in a discussion with a colleague and it is purely academic. Is there any programming language that has variable overloading? In Java and many other languages, there is ...
Dakkaron's user avatar
  • 6,306
4 votes
1 answer
293 views

You can lookup built-in functions by searching for e.g. PHPAPI(stream_copy_to_stream) and find the implementation in ext/standard/streamsfuncs.c. How to do that for a language construct like echo? I ...
cachius's user avatar
  • 2,015
0 votes
1 answer
46 views

Is there any way to avoid having to explicitly specify a class name in Dart, when using it multiple times? Let's say I have something like class VehicleType{ static const int BICYCLE = 0; ...
Magnus's user avatar
  • 19.1k
2 votes
2 answers
72 views

Consider writing the class below: class SomeClass { /** @var array */ private $files; /** @var string */ private $productName; /** @var bool */ private $singlePage; /** ...
Dennis's user avatar
  • 8,151
0 votes
1 answer
46 views

I'm learning PHP. While learning PHP, I noticed that there are few entities in PHP which are used in different fashion. Sometimes with the pair of parenthesis with the enclosing parameter/s between ...
PHPLover's user avatar
  • 13k
2 votes
2 answers
867 views

http://php.net/manual/en/control-structures.foreach.php Trying to better understand the foreach loop. In the documentation above it states "The first form loops over the array given by ...
Kohler Fryer's user avatar
2 votes
1 answer
1k views

I was trying to rewrite some C++ code I found on the internet in C# for my hexagon sphere project, but I ran into the following code: if((((*ti)->m_hexA) != tileNdx) && (find(nbrs. begin(),...
Jax's user avatar
  • 407
1 vote
0 answers
144 views

Inside boost/asio/coroutine.hpp there is case statement inside the definition of the macro yield which seems to be inaccessible: switch (_coro_value ? 0 : 1) \ for (;;) \ case -1: if (...
Oliv's user avatar
  • 18.2k
30 votes
6 answers
18k views

Suppose I have code like this: void f(int a = 0, int b = 0, int c = 0) { //...Some Code... } As you can evidently see above with my code, the parameters a,b, and c have default parameter values ...
Arnav Borborah's user avatar
1 vote
1 answer
801 views

In trait Expr case class Number(n: Int) extends Expr case class Sum(e1: Expr, e2: Expr) extends Expr object CaseExample { def eval(e: Expr): Int = e match { case Number(n) => n case Sum(...
Make42's user avatar
  • 13.3k
1 vote
2 answers
58 views

This is pretty basic. Let's say you define a variable in an if statement if($stmt = $db->prepare($sql)) { // do stuff } Can I access $stmt below the if statement? Or does $stmt need to be ...
Kellen Stuart's user avatar
1 vote
1 answer
109 views

This question here kinda address the issue. In my case I would like to call a function like empty() or is_int(). For example: <?php $foo = 'empty'; $test = NULL; $foo($test); This ...
Francisco Luz's user avatar
81 votes
4 answers
34k views

In JavaScript ES6, there is a language feature known as destructuring. It exists across many other languages as well. In JavaScript ES6, it looks like this: var animal = { species: 'dog', ...
Trevor Hickey's user avatar
0 votes
0 answers
105 views

Sometimes I need to preserve the original value of a variable, do stuff and then restore its original value kind of like this: def method original_value = @variable @variable = true result = # ...
e.nikolov's user avatar
  • 137

15 30 50 per page