Categories
Linux Mastering Development Ubuntu

Trying to build Electric sheep from source

I am trying to build Electric sheep from source on Ubuntu 18.04.4 LTS following this page github electric sheep compiling for building in Linux. I ran into some errors at the end. I think the problem is my understanding of the instructions. I will present what I did: Installed the packages mentioned. Then I figured […]

Categories
Mastering Development

Tokenizing string from dynamic array into multiple lines in static 2D char array

I have a dynamic array that holds a string containing ‘\n’ characters, so this string is made up of multiple lines. I’m trying to extract the lines and put them all into a 2D char array and I’m getting segmentation errors. Here’s my code: char *input_lines = malloc(MAX_LINE_LEN*sizeof(char)); input_lines = extractInput(MAX_LINE_LEN, input_file); char inputLines_counted[lineCount_input][MAX_LINE_LEN]; char […]

Categories
Mastering Development

getline into char** yields only the last line

I’m trying to store the line from getline(…, line, …) into char** array. But when I iterate through the array to print the lines, it only prints the last line. I think there’s something in the man that I missed. the input file standard output int fill_map(t_args *args) { char *line = NULL; args->maze = […]

Categories
Bitcoin Cryptocurrency Development

How this bitcoin code works?(Fake transaction works?)

I dont know how this code works.Can someone tell me?Creator tell me it’s to use the p2sh to generate a “fake” transaction.But the code seems missing something to work.And i also cannot build it in the QT because there is something wrong with the code.So I started to modify the http://coinb.in/ to make it.I tried […]

Categories
Development

Different result of aes encryption c++ and php

I’m going to implement AES encryption between CPP and PHP. But the result of each of them is different with each other and therefore they cannot decode each other. I use the OpenSsl library for encryption. my php code: $key = ‘1234567890123456’; $iv = ‘1234567890123456’; $enc = openssl_encrypt(“hello wolrd”, ‘aes-256-cbc’, $key, OPENSSL_RAW_DATA, $iv); $decrypted = […]

Categories
Development

AES encryption between php and java

I want to encrypt the information that is transmitted between Android and the server (AES). But I don’t know exactly how this cryptography can’t be hacked. Anyone have experience in this field? What can I do to secure my encryption key on the Android side? I was going to use the Cpp using OPENSSL libraries […]

Categories
Development

Incremental offset in Api call

I need to obtain all results when calling an api. I’m only getting 100. I know I have to offset every 100 to obtain all. Don’t know how much results are in total. I guess I should use “while” till the api says there is no more results.. or something like that…but I’m a total […]

Categories
Development

R/Shiny: Changed from readOGR to read_sf and shiny leaflet popups broke

Shiny beginner here and I’ve got a slow shiny leaflet app, so I’ve been using profvis to find the bottlenecks. Using readOGR to load in shapefile data is the major issue. So I’ve made one change–using read_sf–and things are much, much faster. All of my points and polygons are showing up fine, however my popups […]

Categories
Development

R Populate multi-dimensional array with input from alternating vectors

I’m trying to populate a multi-dimensional array with two vectors of the same length. The input data should alternate between the vectors, so that the first input is the first object of the first vector, the second input is the first object of the second vector and so on. I searched for similar problems on […]

Categories
Development

How to compile sqlite3 extension – CSV virtual table

I am trying to use the CSV Virtual Table extension for sqlite3. I get stuck on the first step of compiling the extension on a Mac (MacOS High Sierra 10.13.6). I downloaded the source code for csv.c from this page. I also grabbed the sqlite source code amalgamation from here. I used the following command […]