24,377 questions
0
votes
1
answer
38
views
Produce a slash in base64 string to test base64url encoding
I have a unit test for a Base64 URL safe function that I want to make sure that it is properly handling three things:
Replaces + with -
Replaces / with _
Trims = at end
I want my unit test to have a ...
0
votes
0
answers
69
views
How can I use a file .txt to store some passwords for many programs in python?
I have a file called password.txt and I want to store some passwords in it, I use it in a file of functions but I don't know how to make it usable for more than one file, every one having his specific ...
-4
votes
0
answers
26
views
how to get month wise total revenue for every teammember [closed]
const getTeamMembers = async (bisUserId, locationId = 0) => {
let whereCon = {
bisUserId,
};
if (locationId !== 0) {
whereCon.locationId = locationId;
}
const ...
0
votes
1
answer
44
views
Cyrillic str encoded in Mysql inside PHP script [closed]
I have the string "тест123" in Cyrillic and am executing a MySQL query with it inside a PHP script.
However, the string in the query gets encoded and instead of "test123", it ...
0
votes
1
answer
72
views
Base 3 chunked encoder off by 1 bug
I'm trying to write an arbitrary base N chunked encoder. This is different than a mathematical encoder where the entire buffer is converted to an integer and then that integer is converted into a ...
0
votes
0
answers
11
views
Enforce UTF-8 in Build Result of Sublime Text
When I run a standalone Javascript using nodejs in the Sublime Text Editor:
console.log("Hellø World!");
The output is displayed in the Build Result pane:
Hellø World!
[Finished in 54ms]
...
-1
votes
0
answers
25
views
how to add color in edges of a graph in texstudio
I just started learning to code using texstudio and I wan to know how to add color in the edges of a graph I would appreciate it if you explain and show it in the most simple way
0
votes
0
answers
47
views
Encoding problems with pytest
I have an error asserting equality between two string due to non-ASCII characters.
I am getting the table of contents (toc) of a PDF[1] with mymupdf.get_toc() function.
For the unit testing, I have ...
0
votes
2
answers
71
views
Replacing literal '\uxxxx' in string with corresponding unicode character
I don't want to convert things like \n \r so I can't use unicode_escape directly.
But my code is very slow now, is there any better way?
def only_transform_backslash_u(content):
...
0
votes
1
answer
37
views
Pyasn1 enumerated type encodes as hex, how do I get decimal
I'm trying to code the following using pyasn1
From RFC7906
KeyPurpose ::= ENUMERATED {
n-a (0), -- Not Applicable
A (65), -- Operational
B (66), -- Compatible Multiple Key
...
1
vote
2
answers
107
views
Maven ignores Encoding parameter and use Cp1252
I have a Spring Boot application with a Flyway Migration & Maven.
When running the JUnit tests via IntelliJ I get all tests as positive with UTF-8 encoding (check via System.getProperty(‘file....
0
votes
1
answer
26
views
Is there a character limit to encoded commands for VBS? [duplicate]
First of all I am a noob in terms of VBS. So of this question does not make sense, please bear with me.
I have created a PowerShell script that I wanted to be launched via .vbs file.
I have ...
1
vote
1
answer
69
views
How to correctly read and convert an ANSI encoded file to String in Dart? [closed]
I'm trying to read a text file saved with ANSI encoding on my system (Windows) using Dart. The content appears with strange characters (accents, cedillas, etc.). How can I read this file correctly and ...
0
votes
1
answer
87
views
GNU x86 assembler wrong jump encoding?
I create a file named "test.s" with the content "jmp -2". Then I execute "as --32 -o test.o test.s" and "objdump -D test.o".
(I don't want to discuss here that ...
-2
votes
2
answers
62
views
Does checking a prefix string by comparing to a byte slice fail?
I'm learning the book "Go Programing Language", when it introduce string, it says Go use utf-8 encoding system, so it's easy to check whether a string is a prefix/suffix of another base ...