• Breaking News

    Monday, August 2, 2021

    How do I fuzz my server? Ask Programming

    How do I fuzz my server? Ask Programming


    How do I fuzz my server?

    Posted: 02 Aug 2021 12:37 PM PDT

    I've written a server in C++ from scratch. It can survive the user input I can come up with but seems to segfault every few days. Postman has been suggested but it seems quite complex: I don't want to do anything fancy, I just want to chuck a selection of bad packets at my server. APL won't compile on my Mac or my raspberry pi.

    submitted by /u/XiPingTing
    [link] [comments]

    How to receive emails on my domain and display them?

    Posted: 02 Aug 2021 06:46 PM PDT

    Hey,
    I am building a project which has similar features to https://10minutemail.net/
    Where I generate a unique email address like [user1@example.com](mailto:user1@example.com) and this mail should receive emails from others and display them

    I am not sure how can I acheive that, I found ImprovMX but they require a gmail address and the emails are shown in GMail and not a custom dashboard.

    submitted by /u/ShubhamVerma18
    [link] [comments]

    matplotlib animation exponnetially slower the more points are plotted

    Posted: 02 Aug 2021 05:23 AM PDT

    Hi, title says it

    I have time series data and i'm trying to plot it using FuncAnimation, but after the first 400 points the saving time becomes rediculously high and it just keeps increasing. It takes around 300 seconds to plot/save the first 400 points, 10 minutes (15 total) for the second batch of 400, 17-22 minutes (37 total) for the thrid batch of 400 pints, etc

    is there no way to speed this up? I tried plotting and saving plots of 400 points, then later i would join them together using ffmpg, but unexplaniably, it still takes the same time. I tried closing the figure and opening a new one every time the loop is restarted, but this and all other attemps have been futile

    the time series has 6000 points, and i plan to do this process for time series with 12000 points. I don't want to leave my computer running for potentially one whole day.

    Yes, i am using blitting, my init function is passing the artists i want to animate (2d lines)

    here you can find the relevant parts of the code i use to generate the animation

    submitted by /u/gatosardina
    [link] [comments]

    Microsoft internship

    Posted: 02 Aug 2021 04:05 PM PDT

    Hello there reddit i come to you in a time of great need. Im a second year math student and somehow got to the testing stage of the microsoft internship applying program. I haven't done procedural programing in like a year and was wondering if anyone here had experience with internships like this so i know what im getting myself into. Also if there is any stuff i can check out that would be great too.

    Thanks in advance.

    submitted by /u/D00Mbear
    [link] [comments]

    Automatically accept download confirmations

    Posted: 02 Aug 2021 03:20 PM PDT

    Hey, first of all I wanna clarify that I know absolutely nothing about coding at all, so sorry if this is a dumb question. I'm using a program to download over a thousand files and each time a download starts it needs me to click on a button to start it, the program has a limit of 4 downloads at a time and each file I'm downloading can range from weighing 1kb to 10gb which means each file takes it's own different time to download. My question is: Can I automate this process so that I don't have to spend multiple days checking on the program every 5 seconds to confirm downloads? And is it possible for this to run in the background so I can do other things while the program downloads the files? Would really appreciate the help.

    submitted by /u/Worlf_
    [link] [comments]

    Why do platform agnostic file formats and protocols use \r\n (besides DOS and line printers)?

    Posted: 02 Aug 2021 06:34 AM PDT

    Hackerrank badge

    Posted: 02 Aug 2021 03:13 PM PDT

    I just got a gold badge for cpp(c++) on hackerrank. But i don't think I've done that much that they gave me a gold badge. Is it easy to get a gold badge on hackerrank? Because I've done only 17 problems out of 44 and already got gold.

    submitted by /u/wannabe_techy
    [link] [comments]

    How to move a shape in Javafx freely by itself?

    Posted: 02 Aug 2021 11:06 AM PDT

    Hi, so I am working on a project and want to make ghosts in a Pacman game. I do not know how to make a shape move by itself though. Let's say we had a Rectangle object in Java, how could I make it move by itself and how can I make it change direction if, for example, it hits a wall? Thank you.

    submitted by /u/ColdYakult
    [link] [comments]

    Having trouble importing a CSV I created to PSQL

    Posted: 02 Aug 2021 02:32 PM PDT

    I had a large CSV from IMDB from which I made a smaller one with only the columns I wanted using the script:

    def process_csvs(): with open('movie_file.csv', mode='w', encoding='utf-8') as movie_file: movie_writer = csv.writer(movie_file, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL, lineterminator='\n') with open('movie_basics.tsv', encoding='utf-8') as csv_file: csv_reader = csv.reader(csv_file, delimiter="\t") for row in csv_reader: etc. 

    I've tried a few configurations for the output, taking null values and writing them as NULL, null, and \N. The closest I got to PSQL accepting my copy statement was when I had the values as Null and wrote:

    COPY movies(movie_id, title, year, runningtime) FROM 'C:\Users\Public\Documents\movie_file.csv' DELIMITER ',' CSV HEADER NULL AS 'Null'; 

    However, that gave me an error saying that one of the lines had a character encoded as WIN1252 when the database is set to UTF-8. I'm pretty sure I configured the file to be in UTF-8, and if I open it in notepad, it says the encoding is UTF-8. I'm not sure how one of the characters is still encoded as WIN1252.

    So, I moved to pgAdmin, hoping to have some more luck there. The import tool in pgAdmin seemed to get past the line that threw the encoding error, but it was having trouble with null values. It doesn't like NULL, null, or \N in any instance, and when I configured the CSV I wrote to represent null as empty strings, it gave an error : ERROR: unterminated CSV quoted field for lines that ended with the empty string. The first line to throw the error was tt0000977,Mutterliebe,1909,.

    So, I'd love some ideas if anyone has any regarding the original encoding issue or configuring the writing of the CSV in a way that pgAdmin accepts lines that end with null values. Thanks!

    submitted by /u/Stevvvvvv
    [link] [comments]

    What are some ways you practice being a more time-efficient developer? Conversely, in what areas can the software processes be improved in your opinion?

    Posted: 02 Aug 2021 08:18 AM PDT

    Does anyone know how to use Excel/VBA with GitHub?

    Posted: 02 Aug 2021 10:24 AM PDT

    Question in title. For work, my supervisor has given me a project that entails using VBA/Excel with two other programmers. The current method involves using cloud as a repo with updates being documented through word. This is pretty inefficient and I've seen a few changes slip under the radar, so I want to set up a GitHub Repo so that we can all view the relevant commits and changes. However, from my research I haven't seen any method because of VBA being inside Excel.

    Does anyone have any method to use Git with VBA?

    submitted by /u/Xeno_Lithic
    [link] [comments]

    How to solve the boolean problem in golang?

    Posted: 02 Aug 2021 10:12 AM PDT

    In this code, I have an about function that is first verifying the email, and password from the database(MongoDB), and content from the about page form.

    When I print all the above variables, they show me the correct data. But when I give the if-statement to check if the email and password are true then the boolean does not work. I don't know why?

    How to solve this problem?

    db.go

    func Findaccount(myEmail, myPassword string) bool { collection := Connect.Database("webApp3").Collection("data") collection.FindOne(context.TODO(), bson.M{"email": myEmail}).Decode(&Account) err := bcrypt.CompareHashAndPassword([]byte(Account.Password), []byte(myPassword)) return err == nil } 

    handler.go

    func about(res http.ResponseWriter, req *http.Request) { if req.Method != http.MethodPost { tmpl.ExecuteTemplate(res, "about.html", nil) return } email := database.Account.Email password := database.Account.Password content := req.FormValue("content") match := database.Findaccount(email, password) tmpl.ExecuteTemplate(res, "about.html", nil) if match == true { database.Updatedata("about", content) } else { fmt.Fprintf(res, "<h1> Error </h1>") } } 
    submitted by /u/ibilalkayy
    [link] [comments]

    When & how should you request another access token for a Machine-to-Machine application

    Posted: 02 Aug 2021 01:29 PM PDT

    Hello r/AskProgramming, I'm currently working on making a web application that uses a M2M connection between an Azure Functions app using .NET Core 3.1/C# and Auth0, my chosen identity provider. I'm using some API endpoints to allow users to manage/create/delete roles for users within the application using Auth0's Management API

    I'm relatively new to authorization and authentication using JWT's/access tokens/etc, specifically for when I need to check and re-request an access token, and how to store the token in my Functions instance for re-use when another request is made that uses the management endpoints.

    According to Auth0's documentation on the topic, you can request an access token using your client ID and client secret, and in return you receive an access token in the following format: { "access_token": "eyJhbGciOiJSUzI1NiIsInR5cC...", "token_type": "Bearer" }

    That's all well and good, but do I need to get another token every single time I want to hit the management endpoint? I know that these tokens only expire once every 24 hours, but since there's no issued date that comes with the token, how do I check if it's expired? I'm really confused as to what the best practice is in terms of retrieving new tokens and storing them for later use.

    If anyone has any experience with this or is familiar with auth concepts and could chime in, I would really appreciate the help!

    Thank you!

    submitted by /u/Fluxriflex
    [link] [comments]

    I really need help picking my next project!

    Posted: 02 Aug 2021 01:10 PM PDT

    **TL;DR: I want to choose a project to develop, my goal is to pick a big project - with "technological depth" (I guess a project that has one main core that requires knowledge and research, I am not sure, sorry Lol), and after that, build a plan of the things I need to learn before I can go and do it, and all of the steps I need to take before approaching it. **

    Hi everyone! I'll start by telling you a little about myself. I have experience in c/c++, python, git, some knowledge of operating systems and also networking knowledge. (I also have a bit of experience with assembly x8086, and bash)

    I have developed 2 projects in the last year:

    *One project that was basically an attempt to make "Google photos" sort of a thing, which basically means a website where you can upload your photos, store them, see them & some analysis like the dominant color in the picture, and the closest color-name to that color, and the amount of faces in the picture.

    The original core of the project was supposed to be the analysis of the photos, but you know... It took something like 3 seconds with OpenCV and I didn't learn much from this part of the project. I mainly learned stuff from the web part, like HTML/CSS (bootstrap), some Javascript, Firebase and also React.

    So basically this project didn't have much depth, it was all over the place and in the end it took a little time and effort to create it. *

    *The other project was an Android app, something like a food tracker that can help you track your diet (calories, nutrition values, water) and calculate the recommended water and nutrients intake from the user's info.

    So I learned about Java Android Developement from this project. *

    Both of the projects looked good overall, but they were both shallow! I want to think and learn, I want to feel like I am hard-working and I mainly want to feel that I have actually learned something or did something difficult/that requires quite a bit of effort or knowledge. In addition, I really want to make use of my c/c++ experience (but I am rusty by now), and I really like networking and operating systems.

    Meanwhile, I started learning flutter, but I came to the conclusion that there's no point of learning it if I am not going to put it to use.

    My main goal now it to pick a project which would serve as an Ultimate goal, and from the project's idea I would know what I need to study and to what extent. (I also want to practice project-planning skills, and my got skills since I have used got only for one of the projects)

    submitted by /u/Geekplayer
    [link] [comments]

    How do you find a solution for a problem / question you don't know?

    Posted: 02 Aug 2021 12:43 PM PDT

    So basically my question is whenever you want to build a feature on one of your apps and you don't know what/how to write to create it, how do you solve it? because it's not just as simple as using google translate for example.. as the feature you're trying to add might be unqiue for your specific needs, so how you go ahead and finds the specific solution for your needs?

    submitted by /u/comeditime
    [link] [comments]

    Searching for resources/tips to get into kernel programming

    Posted: 02 Aug 2021 10:41 AM PDT

    Hi! I really want to get into kernel programming with C/C++ are there any good resources or a good advice to start with that topic? I already studied the man pages and have a knowledge about basic concepts like threads, processes, locking ect. but I dont know how to start.

    submitted by /u/mad_salamander
    [link] [comments]

    Center email template in HTML horizantally in the middle of the screen on web and keep it full width for mobile

    Posted: 02 Aug 2021 09:37 AM PDT

    Hi everyone. I have an email template and I want to make it half the width only for browsers or big screen and on small devices take the full width. The problem is, nothing modern work with email templates on email clients. Here is my approach which isn't centering. (It is written in pug templating lang. shouldn't be hard to read)

    table(width='100%' align='center' border='0' cellspacing="0" cellpadding="0") tr td div.container div.header ... 
    submitted by /u/Ur_Average_Introvert
    [link] [comments]

    Where to start when creating a mobile app for browsing a specific website?

    Posted: 02 Aug 2021 09:22 AM PDT

    Where exactly should I start when wanting to create an app like Clover (Link) or Tachiyomi (Link) for example?

    I want to do an app with which you can browse an already existing website & interact with the features of the site through the app, without visiting it directly through your browser.

    I have experience with Java & Python but have never done anything with websites & internet stuff. That's why I'd like to ask where I should start with this, what language I should use, some good tutorials, etc.

    I hope you could understand me :)
    Thanks for reading the post ^^

    submitted by /u/Kazuki-Nakamura
    [link] [comments]

    Error while writing to Excel in C#

    Posted: 02 Aug 2021 07:43 AM PDT

    Hi. I want to simply write something to specific cell, but my approach works only for the first column of my Excel sheet.

    for (int c = 1; c < 30; c++)

    {

    if (secondWorksheet.Cells[2, c].Value.ToString() == functions.ObtainTranslation(lclp))

    {

    secondWorksheet.Cells[CurrentRow, c].Value = ReadFromLine(reader.LineNumber, "value", "value_nt");

    }

    }

    CurrentRow is a positive integer, higher than 9.

    Whenever I would set column to a higher value than 1, debugger throws an exception "Row out of range".

    The problem occurs only when I am writing.

    Error : https://prnt.sc/1idw983

    Any ideas ? Thanks !

    submitted by /u/David39578
    [link] [comments]

    How to integrate video chat in Reactjs & Nodejs website using Daily.co

    Posted: 02 Aug 2021 01:27 AM PDT

    https://www.youtube.com/watch?v=EukhMNNosXw

    How to integrate video chat in Reactjs & Nodejs app using Daily.co In this video, I demonstrate how to create a simple video chat application using daily.co embedded option in under 10 minutes

    submitted by /u/Michael_Kitas
    [link] [comments]

    Reading enter key from raw terminal input in C++

    Posted: 02 Aug 2021 07:12 AM PDT

    I'm trying to read raw terminal input in C++ (on Linux), but can't get it to read anything from the enter key…

    I have the following simplified program:

    #include <iostream> #include <termios.h> int main() { struct termios buff; tcgetattr(0, &buff); buff.c_lflag &= ~(ECHO | ICANON | ICRNL); // Also tried without ICRNL tcsetattr(0, TCSAFLUSH, &buff); char c; while (true) { std::cin >> c; if (c == '\r') { // Also tried with '\n' // Never reached std::cout << "CR"; return 0; } std::cout << c; } return 0; } // Inputing "azerty" results in "azerty", inputing "azerty<ENTER>" results in "azerty" as well 

    I tried logging the key using printf("%x", c), but <ENTER> doesn't show anything. I tried running the program from XTerm, Kitty and Konsole, but it didn't work any better. I feel like the issue is in the terminal attributes, I think I'm misunderstanding something…

    submitted by /u/zeGolem83
    [link] [comments]

    Please review my resume for entry-level Web Developer Position

    Posted: 02 Aug 2021 10:50 AM PDT

    Here is the link to my Resume https://docdro.id/Gm4rQty

    I am looking for a job in Greater Toronto Area.

    submitted by /u/Strong_Badger98
    [link] [comments]

    how to extract data (values that are displayed in UI in an exe file)? (help)

    Posted: 02 Aug 2021 07:01 AM PDT

    Hi guys i need help with someone that im not sure where to find information on
    i want to extract/read data from logitech g hub software for a project
    what i need is to read the battery value of my gaming mouse that is displayed in the software UI
    my question is how can i extract such data or read it from exe file?

    thanks for any help in advance

    submitted by /u/yaniv382
    [link] [comments]

    No comments:

    Post a Comment