Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
4 replies
105 views

I'm a self-taught beginner learning through trial and error. I'm working on a card game in Unity (C#), and I'm trying to design a clean and extensible system for validating targets during gameplay. ...
Parkhomovsky Oleksander's user avatar
1 vote
1 answer
102 views

I'm playing around with implementing looping using call/cc and wrote a map function like this: (define (map1 f l) ((lambda (state) (let ((cc (car state)) (l (cadr state)) (...
NateT's user avatar
  • 312
1 vote
0 answers
92 views

Consider l = [1, 2, 3, 4, 5] print(l is l[:]) t = (1, 2, 3, 4, 5) print(t is t[:]) print(t[1:] is t[1:]) print('aa'[1:] is 'aa'[1:]) print('aaa'[1:] is 'aaa'[1:]) The result is, somewhat surprisingly,...
ByteEater's user avatar
  • 1,201
1 vote
0 answers
44 views

First of all, I am new to developing applications with flutter. I am developing my project in android studio. When I select windows(desktop) as the flutter device, my application works without any ...
NonameNo's user avatar
-1 votes
1 answer
52 views

Every language I've done some form of file handling in has some form of read/write specification when interacting with a file, something like open_file(file_name, read=true) Is this typically ...
bhfelliot's user avatar
  • 667
-2 votes
1 answer
95 views

I am currently reading "The Fuzzing Book" and I am trying to determine how I should apply or implement the fuzzing techniques that I have learned from the book. For instance, in the book, ...
TylerMDGL's user avatar
0 votes
0 answers
85 views

I have a Play Console account since 2018, and I have implemented AdMob ads three times. Initially, the ads ran fine, but after some time, I started receiving the following message: Failed to load ad: {...
Soahil Karim's user avatar
1 vote
0 answers
87 views

I'm trying to write an ECS system that can query components by value, reference, or mutable reference. For this, I want a different implementation for various tuple types as an Archetype. trait ...
gjh33's user avatar
  • 121
0 votes
2 answers
102 views

I have some very big files (more than 100 millions lines). And I need to read their last line. As I 'm a Linux user, in a shell/script I use 'tail' for that. Is there a way to rapidly read the last ...
Tawal's user avatar
  • 111
1 vote
2 answers
283 views

I'm writing for an advice about a kNN implementation I made. I'm studying a dataset representing a multiple choice question exam and my variable are an identifier of the student, the course, the year ...
jacopoburelli's user avatar
0 votes
1 answer
215 views

solving simple nrzi python decoding. 0 bit means no changed occurred but 1 bit means a change occurred in digital signal sequence. "_": low signal '¯': high signal "|": pipe signal(...
ERJAN's user avatar
  • 24.6k
3 votes
1 answer
717 views

I'm reading through the documentation for boost::asio and came across this example: void foo(boost::asio::yield_context yield) { size_t n = socket.async_read_some(buffer, yield); // ... } I am ...
Jordan Bonecutter's user avatar
3 votes
1 answer
179 views

The DO ... LOOP execute always at least one time. If I want to skip execution when limit = index, I can put the loop inside a if ... then : 2DUP <> IF DO ... LOOP THEN The recommended ...
user avatar
2 votes
1 answer
96 views

I'm wondering about whether my implementation of the Builder pattern is wrong or not. Let's say we have a User class for which we want to have a Builder, my implementation would be: public class User {...
user avatar
0 votes
0 answers
47 views

Why is my code not working though I've tried dry running it 1000 times, but still I'm not able to find my doubt, maybe I'm short of the knowledge which will help me find the mistake, can anybody help ...
Shruti Kumari's user avatar
2 votes
1 answer
88 views

I’m trying to shift the elements of a 2D array to the right and down by one position without using an additional temporary array. Here’s the current implementation using a temporary array: public ...
satanmoo's user avatar
0 votes
0 answers
139 views

ENCRYPTBYPASSPHRASE in T-SQL takes a passphrase as a parameter. I'm wanting to encrypt some data in the same way outside of SQL server, in such a way as said data may be decrypted using the ...
Jayden's user avatar
  • 2,787
2 votes
0 answers
552 views

I have this gradle project with 4 subprojects inside. I use one of them as a library for the other 3. I can do a gradle build just fine, but IntelliJ doesn't detect it: Unresolved imports My root ...
ZimZim's user avatar
  • 21
0 votes
1 answer
549 views

I'm writing a tonic middleware to load application state into a gRPC handler, and I cannot get my app to serve with the middleware layer I've double-checked the types and looked at many examples and I ...
thomasmost's user avatar
  • 1,080
0 votes
1 answer
388 views

I am currently trying to use SetDisplayConfig from winuser.h to immediately apply a "Preserve aspect ratio" display scaling mode for the active display mode, but I can't seem to get the ...
Jonathan Miller's user avatar
-1 votes
1 answer
50 views

I was doing this leetcode question https://leetcode.com/problems/binary-tree-cameras/. Here is the solution that passes: # Definition for a binary tree node. # class TreeNode: # def __init__(self, ...
srm26's user avatar
  • 11
0 votes
0 answers
40 views

I am looking for a way to encapsulate certain properties in a Swift protocol to hide them from users of the protocol while making them available to types implementing the protocol. Here is a simple ...
Khawer K's user avatar
  • 115
0 votes
1 answer
161 views

the question goes like this We define sequences Sn ​as follows. S1 ​is a sequence of length 1 containing a single 1. Sn(n is an integer greater than or equal to 2) is a sequence obtained by ...
hyper's user avatar
  • 13
-1 votes
1 answer
90 views

The String constructor that takes a string literal argument has the following implementation. @IntrinsicCandidate public String(String original) { this.value = original.value; ...
kuruthi's user avatar
  • 11
3 votes
1 answer
230 views

As the following code shows: trait T2impl {} struct S4T2impl; impl T2impl for S4T2impl{} trait TimplMethod { fn f() -> impl T2impl; } struct S4TimplMethod; impl TimplMethod ...
Frank Schwidom's user avatar

1
2 3 4 5
45