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

I have to send a png/jpg image to the server in the binary string form. It is also specified in the Swagger that content-type of the request has to be "multipart/form-data". I select images ...
Emre Turan's user avatar
2 votes
2 answers
924 views

I would like to produce lists of 0 and 1 in Julia using IterTools. For example, in Python I can do: for bits in itertools.product([0, 1], repeat=5): print(bits) This will produce (0, 0, 0, 0, 0) (...
MonteNero's user avatar
  • 153
1 vote
3 answers
738 views

we have byte string s = "1111000000000111000000000001000000000010010000000000000000000000"(this value equal -1150951111012646912), if we use Long.parseLong(s, 2), we got " java.lang....
 za1ra1za1 's user avatar
-2 votes
2 answers
81 views

I have a list of couple like this ('01 0 00 0',key0), ('01 0 11 0',key1), ('01 0 11 1',key2) and I would like to pick the elements with only the third and fourth bit equal to 1. So for example in this ...
DYLAN NICO AMBROSI's user avatar
0 votes
1 answer
73 views

observe the following signature = rsa.sign(str(message), private_key, 'SHA-1') see how message is being casti to a str would that decode a bit wise string? why I ask. the code snippet above is being ...
Christopher Jakob's user avatar
0 votes
1 answer
1k views

I have various variables of different numeric datatypes(int,u32,u64,f32,f64, etc) and want to convert them to an array of bytes. For example: a := 120 // int datatype a_bytes = some_function(a) // ...
impopularGuy's user avatar
0 votes
2 answers
2k views

I am not having any trouble getting the signed URL, and the file is actually getting uploaded to S3, but when I download the file I can't open it. I have tried PDF and image files. I get the file ...
Craig Nakamoto's user avatar
0 votes
1 answer
334 views

Python 3 I want to send a binary string over a socket. I am using socket.send(b"Hello from {0}",client_id) however I find the it is not properly substitution clientid. what am I doing wrong? ...
liv2hak's user avatar
  • 15k
1 vote
1 answer
2k views

Suppose that S is a string containing only 0 and 1. I would like to count the number of not null substrings of S in which the number of 0s is less than the number of 1s. Using brute-force method given ...
Adeeb HS's user avatar
  • 169
5 votes
4 answers
2k views

This was a question asked in the coding round for NASDAQ internship. Program description: The program takes a binary string as input. We have to successively remove sub-sequences having all characters ...
Bichu Ben's user avatar
0 votes
1 answer
115 views

I am trying to take a row of checkboxes in a table and for each TD in the table it needs to check if the checkbox is ticked, is so it is a 1 and else its 0. I need a for loop where I will be able to ...
Muckle Developer's user avatar
5 votes
2 answers
6k views

for (int i = 0; i < n; i++) { arr[i] = scanner.nextInt(); } String[] bin = new String[n]; for (int i = 0; i < n; i++) { bin[i] = Integer.toBinaryString(arr[i]); } The above code will ...
Rashid Raza's user avatar
1 vote
1 answer
3k views

Hi all am searching for a binary string in binary file using the python my binary file looks like a as follows. I want to find the bold text below. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...
Madhu's user avatar
  • 15
1 vote
1 answer
1k views

For example if s = "1000000111" and t = "0111000001" the output should be 11. Below is my solution but it gives a time limit exceeded error so I am looking for a faster method. The ...
Archit's user avatar
  • 37
-2 votes
2 answers
1k views

And Write a JS function that takes 2 arguments: 2 binary strings. The function will multiply these two arguments and return the result as a binary string. Note_: A binary string is a ...
rupesh raj's user avatar
0 votes
0 answers
577 views

I solved the problem below Binary String Problem in Hackerearth the problem which says "Given four integers x,y,a and b. Determine if there exists a binary string having x 0's and y 1's such that the ...
served_raw's user avatar
0 votes
1 answer
63 views

I'm trying to get int from String "11010001110011000000000111111110" with code: int n = Integer.parseInt("11010001110011000000000111111110", 2); but i get an error: Exception in thread "main" java....
Dmitry Kuznetsov's user avatar
0 votes
1 answer
555 views

How can I convert this binary string: b"iphonée@3,;= ÑÑñe x" To normal string? I really need to have that string as a normal string, and not as a binary string. I am having problems saving in MySQL ...
Joaquin Colella's user avatar
0 votes
1 answer
467 views

I am having lot of problems processing CSVs with ñ,é, and all of those non ASCII chars, and saving those words in MySQL. In order to solve this I created a CSV that contains in one cell this data: ...
Joaquin Colella's user avatar
-2 votes
1 answer
1k views

I wish to generate a random binary string of length N such that each of the possible 2^N strings is uniformly randomly chosen. Note that choosing 1 or 0 with equal probability to build a string doesn'...
Peaceful's user avatar
  • 5,560