Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
97 views

I have this memory buffer class: class Buffer { const size_t size; // size of one element const std::unique_ptr<char[]> data; // storage public: Buffer(const size_t &size, const ...
Kevin's user avatar
  • 2,725
0 votes
4 answers
346 views

I'm not familiar with modern JS and tooling to even try something. References: https://github.com/tc39/proposal-bigint
user894319twitter's user avatar
0 votes
0 answers
25 views

I've found this page. At the bottom of that page the author says he's giving a programmatic way of configuring so as to have a console logger component but also a rolling file logger component. I'm ...
mike rodent's user avatar
  • 16.1k
1 vote
1 answer
79 views

Microsoft's version history page mentions "auto-implemented properties" as one of the new features added to C# in version 6. Their page on auto-implemented properties gives the following ...
Jim Cullen's user avatar
0 votes
1 answer
160 views

I have been dabbling in experimental features lately and have been using them for a library I'm building. I am trying to reduce the size of an enum by using ThinBox<[T]> to store contents in a ...
AbsoluteNoob's user avatar
0 votes
3 answers
2k views

I wrote an extension function to add SizedBox between every child in Column or Row to add space between child, instead of putting SizedBox between every child, for which I didn't find any other way ...
Alraj's user avatar
  • 411
0 votes
1 answer
115 views

index.php <?php function bar() { try { $res = 'loading foo:'; include 'foo.php'; } finally { return $res . 'finally.'; } } $res = bar() . " Why it's ...
Ivan Kurziukov's user avatar
3 votes
0 answers
268 views

How to shift focus on the side bar of VSCode programmatically? Is there any specific command/end-point I can make use of? I have some custom contributes.viewsContainers, they are not getting over-...
ISHITA PRAMANICK's user avatar
0 votes
1 answer
258 views

As in the title, I would love to see this in C#. namespace PrivateStuff; //note: filescope namespace here! public class PartiallyVisibleOutside { public int A; namespace int B; } public class ...
Shpendicus's user avatar
1 vote
1 answer
184 views

One of the most powerful ways pattern matching and lazy evaluation can come together is to bypass expensive computation. However I am still shocked that Haskell only permits the pattern matching of ...
user avatar
0 votes
1 answer
100 views

According to this bug report one of my modules is generating this error on older Perls, Experimental "my" subs not enabled at <file.pm> ... What should I set my minimum perl version ...
Evan Carroll's user avatar
0 votes
1 answer
695 views

Since not everything from dart is an expression (Like Kotlin) I wonder how it is possible that the next code runs: Example 1 I do a for loop that returns somehow each array item, it's like a ...
Daniel Gomez Rico's user avatar
2 votes
1 answer
124 views

I find myself sometimes checking to see if an item already exists in a std::map, which I do with the following: if(myMap.find(item) != myMap.end()) ... I was wondering why there is not a function ...
fanoPaul's user avatar
1 vote
0 answers
54 views

I had a theory that casting from long to int with a value greater than int.MaxValue or less than int.MinValue would result in an exception. The issue I had at the time was identifying which type of ...
Taco's user avatar
  • 2,953
0 votes
1 answer
117 views

When either hashCode() or == operator is overridden in a class, the dart analyzer warns, saying that the other method should also be overridden. Can I implement a similar case on other methods? Or is ...
Midhunraj R Pillai's user avatar
0 votes
0 answers
796 views

Is there a clean way to implement a safe function g that mutates a mutable reference by applying f on its value without having to implement Clone or Default (or any other special trait) for T? If not, ...
Natrix's user avatar
  • 113
4 votes
1 answer
2k views

I'm trying to create an app using kivy and would like to add a language option. I was wondering whether that means that every word the app displays in English has to be manually translated. But that ...
Benjamin Safari's user avatar
8 votes
2 answers
874 views

Why are these not equivalent? show $ if someCondition then someInt else some double and if someCondition then show someInt else show someDouble I understand that if you isolate the if ... else part ...
Mehdi Saffar's user avatar
1 vote
1 answer
67 views

In some programming languages one can specify the function implementation for particular values of arguments: factorial[x] = x * factorial[x-1] factorial[0] = 1 Calling the function with 0 will use ...
Džuris's user avatar
  • 2,283
1 vote
1 answer
172 views

Python's file objects can now support end of line conventions other than the one followed by the platform on which Python is running. Opening a file with the mode 'U' or 'rU' will open a file for ...
user7610's user avatar
  • 29.9k
-2 votes
2 answers
147 views

According to Effective Go, the function math.Sin cannot be used to define a constant because that function must happen at run-time. What is the reasoning behind this limitation? Floating-point ...
Phlarx's user avatar
  • 134
3 votes
1 answer
610 views

So I've read the paper named Self-Governing Neural Networks for On-Device Short Text Classification which presents an embedding-free approach to projecting words into a neural representation. To quote ...
Guillaume Chevalier's user avatar
0 votes
0 answers
86 views

I tried to create vector of properties. This vector supposed to be kind of "mark" that would help distinguish between other tuples. This simple snippet works on clang 6.0 and does not work on any of ...
CapSel's user avatar
  • 46
0 votes
1 answer
357 views

In my case I used cucumber with Junit and in @WHEN i used logic for test.When my test is satisfied then my code goes to @THEN. But when my code is unsatisfied i use org.Junit.Assert.fail() to Fails a ...
AKA's user avatar
  • 638
0 votes
1 answer
65 views

The Code: ParentControl.ascx <%@ Control Language="C#" AutoEventWireup="true" CodeFile="ParentControl.ascx.cs" Inherits="ParentControl" %> <%@ Register Src="~/ChildControl.ascx" TagPrefix="...
Mir's user avatar
  • 2,559

1
2 3 4 5
13