2,206 questions
3
votes
1
answer
96
views
How to find cut edges between two partitions in a graph using Python?
I am working with a graph of 11 nodes (representing friends) using NetworkX. I manually divided the graph into two groups, and I want to find the edges that connect these two groups (cut edges).
Here ...
Advice
1
vote
7
replies
106
views
Clarifying what an ADT is
I'm a bit stuck on the concept of an Abstract Data Type (ADT), what I know is that, and ADT is an idea (implemented through an Interface) that dictates how a program structures its data. But when ...
Best practices
0
votes
4
replies
107
views
What are the should-have implementations/functions for a new struct for a new library in rust?
I've got Display and FromStr, but what else?
I'm working on releasing my first general-use library in rust that creates a struct and implementation for general use to assist with integrating with some ...
Advice
0
votes
0
replies
93
views
Google FRP no pin only gmail
Android FRP asks for PIN or Google account
FRP Google account only disable PIN
Factory reset protection PIN vs Google
I want to set particular gmail to provisioned device through Qr enrollment. I am ...
Best practices
0
votes
4
replies
133
views
How to properly implement target requirements in game?
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.
...
0
votes
1
answer
56
views
Returning ENOSPC in write() operation in a FUSE filesystem
While implementing a simple filesystem for FUSE, I have arrived to the write() operation:
/** Write data to an open file
*
* Write should return exactly the number of bytes requested
...
1
vote
1
answer
138
views
call/cc and multiple values
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))
(...
1
vote
0
answers
106
views
How does Python represent slices in various cases?
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,...
2
votes
1
answer
87
views
How is SAVE-INPUT/RESTORE-INPUT implemented?
SAVE-INPUT should save the current state of the input source specification, but where?
It can't be saved to a fixed location, as SAVE-INPUT can be called multiple times before calling RESTORE-INPUT.
...
1
vote
0
answers
49
views
Could not find method implementation() for arguments [com.firebaseui:firebase-ui-auth:8.0.2]
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 ...
0
votes
1
answer
59
views
Does Android reuse device IDs for UsbDevice objects?
In the Android API reference, UsbDevice objects have a function, getDeviceId(), that returns a unique integer ID. The API reference notes that IDs are not persistent across disconnects.
However, the ...
-1
votes
1
answer
62
views
typical implementation of read/write permissions in file reading code
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 ...
4
votes
2
answers
181
views
How does PyPy implement integers?
CPython implements arbitrary-precision integers as PyLongObject, which extends PyObject. On 64-bit platforms they take at least 28 bytes, which is quite memory intensive. Also well-known is that it ...
-2
votes
1
answer
116
views
How should I implement Fuzzing techniques presented in "The Fuzzing Book"? [closed]
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, ...
1
vote
2
answers
186
views
Why does this arithmetic right-shift not produce the correct result?
I am working on K&R's exercise 2-8:
Write a function rightrot(x,n) that returns the value of the integer x rotated to the right by n positions.
The implementation I'm using appears to fill in ...