• Breaking News

    Saturday, March 5, 2022

    How do people send DMs on discord without bot permission? Ask Programming

    How do people send DMs on discord without bot permission? Ask Programming


    How do people send DMs on discord without bot permission?

    Posted: 05 Mar 2022 05:17 AM PST

    As I understand, you need to have a 'manage server' permission in order to add a bot to any given server. However I still get messages from other members of a discord server inviting me to their discord servers (SPAM). I'm sure they won't be doing this manually since there are over 10k+ members. How do they write a script that essentially allows them to send a DM without having the right permission

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

    Alternative lists that include type soundness

    Posted: 04 Mar 2022 09:42 PM PST

    There's a really good page I've read a few times that had a break down of programming languages by various type system properties like: http://www.rosettacode.org/wiki/Language_Comparison_Table But it included soundness and completeness as well, does anyone know what it would be?

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

    Can someone please help me understand this beginner algorithm question?

    Posted: 05 Mar 2022 03:32 AM PST

    Given a singly linked list, we would like to traverse the elements of the list in reverse order. Design an algorithm that uses O(√n) extra space. What is the best time complexity you can get?

    Sample solution: We store √n cursors evenly spaced along the list. We traverse the span between two of these cursors by iteratively scanning the list until we find the node before the cursor. We visit the element at the cursor, and update the cursor to the previous node. Each of these segments is √n long, so each segment takes Θ(√n^2)=Θ(n) time to traverse. There are √n many such segments, so the total time is Θ(n^3/2).

    Sorry I'm very new to this topic. Would someone please help me understand:

    • What does the term "extra space" mean?
    • Is my understanding correct in that a "curser" points to a node, and is exists only temporarily throughout the duration of the traversal?
    • does "the node before the cursor" mean the node that the cursor is pointing at, or the node previous to that one?
    • why are each of these segments √n long?
    • does n refer to the number of nodes in the singly linked list?

    Thank you so much in advance

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

    SDL.h: No such file or directory

    Posted: 05 Mar 2022 03:05 AM PST

    I program in Visual Studio Code and I have a problem where I include SDL.h library and it doesn't find it even though I have it in my workspace folder. I tried watching multiple tutorials about SDL library in VS Code and I still get the same massage. I saw that some people online get the same error.

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

    Why did Ubuntu split from Debian?

    Posted: 04 Mar 2022 07:28 PM PST

    From wikipedia:

    Debian is also the basis for many other distributions, most notably Ubuntu.

    What causes other distros like Ubuntu to split from Debian?

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

    Any application specialists?

    Posted: 05 Mar 2022 02:01 AM PST

    Hi everyone! :) I don't know if I can ask this question here or not but I'll try. Are there any application specialists here and if there is, what do you guys really do? What are your tasks and what specific knowledge is required/good to have before applying? Anything that is good to keep in mind before applying for a job within that field?

    Thank you in advance!

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

    People to test my game?

    Posted: 04 Mar 2022 06:32 PM PST

    Hello! I recently "finished" a small/basic game using HTML canvas + Javascript. It started as a project for school, but even after turning it in, I still continued working on it. I am mostly looking for gameplay feedback however any feedback on the code is also welcome! What do you like/dislike, how does it feel, anything you would change, any important missing features, any bugs/errors/etc.

    The game is basically an "advanced" version of Frogger. The goal is the same, get as far as possible without dying but with some twists. A link to the zip folder is here: (https://github.com/Lord-Lelsers/Applied-Comp-Sci/raw/main/ZIPs/NEO%20CROSSER%20v1.1.zip).

    Note: You may not comment on my art (it's all hand drawn)

    Directions:

    • To start the game double click on 'NEO CROSSER.html'
    • It will open in a browser window

    Basic Info:

    • Use the mouse or the button keys to move navigate menus
      • 'New [G]ame' means pressing 'g' is the same as clicking the button
    • Saves work as checkpoints and can be retried from infinitely
    • The game will work on basically any screen size
      • It will not resize when you resize the window
      • It will only resize when you reload the page

    Basic Game Info:

    • WASD or arrow keys to move
    • Q or 1 teleports you in the direction you are facing
    • E or 2 is a togglable movement speed increase
    • R or 3 fires lasers in every directions
      • Lasers stun cars, buses, and ufos
      • Running into a stunned object still will kill you
    • Tanks can not be stunned
    • When you are shot at (later into the game) you will only be stunned
      • After getting stunned, you have temporary stun protection
    • Every once and a while a large 'force' might appear
      • It will push you and any cars in a certain direction

    Known issues/things todo:

    • Hitboxes can be sometimes very unforgiving because they are rectangular and the art is usually not

    Thanks so much in advance!

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

    How do you protect your idea, if you need to demonstrate it to gain interest?

    Posted: 05 Mar 2022 12:21 AM PST

    How do you protect your idea, if you need to demonstrate it to gain interest?

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

    First time programmer meeting a potential client. Any advice?

    Posted: 04 Mar 2022 08:13 PM PST

    Help for a first time freelance programmer.

    I am trying to find my first freelanced client. I know html, css and JavaScript.

    I just ordered some Chinese food. I noticed they had a bad website with no option for online ordering. I spoke to the owner when I picked up the food and set up a meeting on Sunday at 4pm.
    Any advice or things I should know. First timer here. Trying to get that first client. They use the aloha pos system. Is it easy to add an online order application?

    I'll do some research tomorrow but any help would be appreciated.

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

    Hard-coding a wardrobe into a program?

    Posted: 04 Mar 2022 08:06 PM PST

    Hi All,
    I am currently taking a beginner C++ course and we are working on our capstone projects throughout the semester. I am choosing to essentially have an automated wardrobe that asks for user inputs such as weather, color, and occasion to provide a full outfit.

    Rather than asking the user to input multiple articles of clothing, I want to have a set wardrobe programmed in. How would this be possible? Are there any references that I can be pointed towards as inspiration?

    Since I am in a beginner class, I am not familiar with a lot of terminology, so please explain as simply as you can if possible. Thank you!

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

    Beginner Advice

    Posted: 05 Mar 2022 02:58 AM PST

    As a beginner after finishing bachelor studies and starting an internship why do i need to read a documentation of a framework, that doesn't seems to help me to understand better the work I'm doing. In fact I'm feeling like I haven't done nothing at my studies. Any recommendations what should i do in these steps?

    submitted by /u/10xbooster
    [link] [comments]

    How to Add External Packages to C++ in VS and VS Code ?

    Posted: 05 Mar 2022 02:30 AM PST

    I tried many things : Added include path Modified .json files Changed project settings But none of them worked. Is there any source that I can learn how to add external package to my project ? And also when I add the files I added also gives same problem.

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

    How does commercial software using AGPL really profit?

    Posted: 05 Mar 2022 01:02 AM PST

    How does commercial software using AGPL really profit?

    The code is visible and there must be installation instructions. So why does one pay for software, which one can get for free?

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

    Integrating a UART Fingerprint Sensor into Windows Biometric Framework

    Posted: 04 Mar 2022 03:49 PM PST

    I have a fingerprint sensor that's connected to my computer via a USB to TTL module containing a Silicon Labs CP2102 chip. What's the best way to integrate a COM port connection into the Windows Biometric Framework? The sample USB driver UMDF code is rather useless to me at the moment.

    Also, can I load an unsigned or uncertified driver to test Windows Hello for my sensor?

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

    I want to call the function in module A from module B imported by module A. Could you help me to understand how to do that?

    Posted: 04 Mar 2022 10:20 PM PST

    Hi all,

    In the following Python code, is there any way to call fun() defined in main.py from sub.py?

    # main.py from sub.py import * def fun(): print('test') call_fun() # I want the output to be 'test' #sub.py def call_fun(): fun() # I want to call fun() in main.py. How can I write that?` 

    `I don't want to pass 'fun' in call_fun() such as call_fun(fun).

    I want the program to work if I change the name of main.py to main2.py.

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

    Best approach for rejecting HTTP requests generated outside of HTML form?

    Posted: 04 Mar 2022 02:48 PM PST

    I have a Node server that serves a HTML form. The HTML file submits a HTTP post request to the server, before the server extracts the information. Currently, the server assumes the post request comes from the form. If I was to make a request from Postman, with a different body, the server runs into issues as particular fields are not present.

    I was about to add a server function that first parses the request's body, to make sure all fields exist before anything is done. This seems like a good idea to do anyway, but I was wondering if any other steps can be done first to validate the request actually came from my form, before the server parses the body as a secondary check.

    My ideas: Have the HTML file add a particular header to the request, which is checked by the server. I know that someone could easily copy this, but I believe this would easily deal with bots making random requests. I'm not familiar with cookies yet but I might have read something about document cookies, but not certain this is what I need. Any other ideas? Thanks!

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

    Does this program exist?

    Posted: 04 Mar 2022 10:13 PM PST

    Whether it's something I download or is on a website I can use, preferably the latter.

    I'm looking for something that would transcribe the coordinates of wherever I click on an image, forming a list of coordinates that I can copy and then paste.

    (For hose curious, it's for use in MediaWiki's ImageMap extension. I don't want to manually transcribe pixel coordinates one by one in ms paint)

    submitted by /u/Fun-Guarantee996
    [link] [comments]

    Better Way to Classify Project Files

    Posted: 04 Mar 2022 03:56 PM PST

    I'm currently tasked to classify files in all projects in our system (~76k) and classify the files into specific document types (Document, Image, Programming, Configuration, etc). For every project, there is an export (.xls) of every filename contained within said project. Current process is to use a JSON file containing the list of document types and a regex filter to classify each file. Thought process was having a JSON/dict would allow me to quickly change the filter.

    Example (in total there's actually 189 regexes among 14 types)

    { "Image" : [ ".*\\.jp.g$" ], "Programming: [ ".*\\.py$", ".*\\.java$" ] } 

    Depending on the size of the project, it can take anywhere between 360 seconds (largest export) to .08 seconds (smallest). Using a super basic approximation of 180 secs per project (this could be grossly exaggerated), it'll take 180 secs * 76000 projects / 86400 = 158 days. For one pass over every project. If I need to change the filter (probability high since document types/filters are not set in stone yet), we need to run through all the projects again to update the files' classification. Is there a quicker way to go about this? Currently using Python.

    One thought would be some sort of hash. Currently, time complexity for each project (p), regex (r), filename(f) is O(prf)=O(n3) (I think). If there was some way to create a hash that combined each filter and apply to a file name, I could just run through it in O(pf)=(n2) (once again, I think, been a while since my algo class).

    EDIT:

    I could implement some threading to run through this in parallel. However I would like to fix the efficiency if possible before I look to threading. Just had a thought, I could possibly combine the regexes into one really long one for each document type ( ".*\\.py$|.*\\.java$" ) although readability is lost. Not sure if this would improve anything, just an idea.

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

    How I dynamically add a space in a function array:

    Posted: 04 Mar 2022 09:31 PM PST

    I'm answering a few short quizzes to practice my JS skills, but I'm having difficulty with a particular question:

    // words is an array of strings
    // return a string that is all of the words concatenated together
    // spaces need to be between each word
    // example: ['Hello', 'world!'] -> 'Hello world!'

    function wordsToSentence(words) {
    let result = "";
    for (let i = 0; i < arguments.length; i++) {
    result += arguments[i] + " ";
    }
    return result;
    }

    The above is my current code. However, when I call the function:

    wordsToSentence("Hello", "world!");

    I get:

    "Hello world! "

    I would like have it in a way that the space only appears in between the passed in arguments. How do I do this?

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

    Ideal method for including assets in Raylib-CS?

    Posted: 04 Mar 2022 03:23 PM PST

    I am currently creating a prototype using Raylib-CS, C#, and Visual Studio Community 2022.

    For Raylib in C/C++ I am aware of rres, though there doesn't appear to be a port for C#.

    My current method is to change the "Copy to Output Directory" property of each resource, though with a large amount of assets I'd imagine it would get to be tedious quickly. I'm not entirely confident in it as a long-term solution.

    What is the best way to package or include resources in a Raylib project, or by extension in C#/Visual Studio?

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

    How to securely connect to SQL database and socket connections?

    Posted: 04 Mar 2022 02:48 PM PST

    I am thinking of writing my own software which will require socketing, and to talk to an SQL database to verify whether the user has paid for the software, etc etc. Now I've already written the software, but I am not sure on its security. How do I prevent reverse engineering? I don't feel safe putting the credentials to SQL database in the code. They could reverse engineer the code and see the SQL credentials. Ok, what if I make it so it sends a message via socketing to a server to do queries? Well can't they decompile it and see what I am sending to the server, manipulate it to make their own queries? Or can't they use wireshark to see the IP of the server and what the software is sending to it? Maybe I can encrypt the queries while they are being sent via sockets so wireshark can't tell what's being sent but can they not just decompile the code and figure out the decryption key from there? I'm not sure where to start doing this securely. Any help would be appreciated. I want to prevent piracy and I want to prevent anyone from hacking into my database

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

    No comments:

    Post a Comment