• Breaking News

    Sunday, May 9, 2021

    If I wanted to create an app but I know nothing about developing or designing such a thing. What would be your recommended order of operations? Ask Programming

    If I wanted to create an app but I know nothing about developing or designing such a thing. What would be your recommended order of operations? Ask Programming


    If I wanted to create an app but I know nothing about developing or designing such a thing. What would be your recommended order of operations?

    Posted: 09 May 2021 06:17 PM PDT

    I have an app idea but don't know the first thing about app making. I'm assuming I'd need a developer and a designer but where would I find such people?

    Should I patent the idea and secure domain names first?

    I appreciate the advice in advance!

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

    Remote whiteboarding solutions

    Posted: 09 May 2021 04:48 PM PDT

    Remote work has become more common at my company over the last year, but the one thing we're missing is the collaboration we gain from whiteboarding our work. This is encouraging our team lead to want to go back into office.

    So I'm looking for some options for whiteboarding that are actually good. I've tried ms teams and it's just difficult to draw with a mouse. Right now Vizio is kinda our only solution but I'm too slow at using it to keep up with our conversations.

    I'm open to new programs or even hardware like drawing pads. What has worked for your teams?

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

    How does querying work for sharded database?

    Posted: 09 May 2021 07:21 PM PDT

    Hi,

    I was reading about system design. I came by an example for instagram like app. The requirements are

    1. A user can upload photos
    2. A user can follow other user.

    The author explains that since millions of users would be uploading photos, we can have sharding in place. Author starts with 10 shards. The partition should be based on photoid. Have two seperate databases just to generate ids. One generates even ids and the other odd ids. Round robin between the two to generate new ids. Use these ids as photoids. PhotoId % 10 decides which shard the data goes in.

    I would like to understand, lets say a users photos are distributed among 5 different shards. Lets say you want to query all photos uploaded by this user. Wouldn't querying from 5 different shards cause the query to be slower?

    Also would like to understand how does the database engine know which shard the data belongs to. How does it understand which shard to query? Can we have foreign key constraints to rows from other shard?

    Thank you in advance

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

    rest api calls with flask?

    Posted: 09 May 2021 04:22 PM PDT

    Apologies if this is a dumb question, it's my first time working with flask.

    If my goal is to build a website that is able to make rest api calls, grab data, and then update periodically, could I build this with flask? (I know this is possible for django) Any references/articles you could point to would also be greatly appreciated.

    Thanks!

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

    how to get rid of white space between background images

    Posted: 09 May 2021 08:15 PM PDT

    Whenever i do a background image in css, the image leaves a little blank space between the edges of the screen and it's edges. Other websites don't seem to have this and I want to know how to remove this little blank space. For example, in this website: https://www.wedler.com/ it seems to not have the white space between the background image and the edges of the screen

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

    Python or C++ for a MP4 project on a rpi zero w?

    Posted: 09 May 2021 08:34 AM PDT

    Hi!

    I am currently thinking about making a project with a raspberry pi zero w, and transform it into an mp4 player. I've been doing a lot of architecture and found out there will be a load of classes (and a load of instances running at the same time...), but I can't decide on which programming language to use.

    I'm already familiar with Python, C++, and Java. My first idea was to build it with Python because you know the benefits (easy to code, big community, loads of libraries, etc), but I am afraid that it will be too much for the rpi...

    I will need a GUI for the menus, load some images for the albums, have music playing in the background, run the music through Bluetooth, be connected to the wifi, have a database, and indexers because my goal is to have a lot of music on it (20k music files something like that ?).

    I don't have a rpi zero yet, but I installed RaspberryOS lite on my rpi3, and it only uses 47 Mb of RAM, so it leaves me about 450 Mb of RAM.

    So my question is...could this run on the rpi zero w and its single-core / 512 Mb of ram? Would Python be too much? Should I switch to C++ or another compiled language?

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

    Can you recommend a tech stack for a cross-platform music-pedagogy application?

    Posted: 09 May 2021 08:48 PM PDT

    Hi all,

    Sorry in advance for the essay. Just want to give as much context as I can. Really appreciate anyone who gets through it all.

    I'm a 4th year undergrad working under a PhD student this summer in a music technology lab. We are looking to develop a music pedagogy app that would allow users to analyze the quality of their instrument technique using timbral analysis and music-information-retrieval algorithms.

    Without getting too into the details of the app, the current proposal is to have users use a particular bluetooth microphone which clips on to their instruments for audio input. Various aspects of the audio input would then be analyzed through MIR algorithms to assess the quality of the user's technique. We will also want to draw some basic features of the audio signal to the screen in real time, such as the audio waveform or spectrum. At the moment we are hoping to deploy to mobile, but I've been thinking about pitching Mac/PC as the primary target since most students would have a laptop to run it on as well, and the extra mobility isn't a huge advantage when the app requires that you have both your instrument and a specialized mic on hand anyway. But I'm expecting that both the PhD and the prof will be reluctant to de-prioritize mobile - they are quite keen on it.

    The PhD student is not a super experienced programmer outside of doing DSP stuff in MATLAB. I myself have a reasonable amount of experience in Java, C# and C++, and a little bit experience with js/css/html and python. However, none of my projects have been this complex and I've got no experience with cross-platform development/deployment.

    For this tech stack I can think of two main components: a cross-platform framework for building a UI with support for animated elements and audio i/o as well as a library for music information retrieval.

    For the MIR side of things, Essentia seems to be quite promising. A few people in our lab have vouched for it. That said, I'm open to other suggestions here as well - the library doesn't need to be totally exhaustive as we expect to be implementing a lot of our own algorithms anyway. Essentia just seems nice for this because there is good documentation on extending the library and it is cross-platform.

    As for the UI and all that, I've investigated a few possiblities:

    Juce - As someone interested in VST plugin development I've used this before, but I've never tested its cross-platform features. It seems to be the industry standard for audio apps and includes a lot of powerful audio processing. However, if we have an MIR library that is well featured, we don't actually need a lot of that processing except for the basic I/O (for instance, Essentia already has a good FFT algorithm). I've heard that its UI development capabilties are somewhat barebones, but I dont know for sure since any apps I've made with it were all just a single view. Our app will have a few different "minigames" embedded into it so the UI will be a bit more complex than that.

    qt - our prof has a decent amount of experience with this and has recommended looking into it for the good UI builder, but he has not developed anything for mobile with it. I am also unsure about its audio i/o capabilities, as my prof always used it alongside RtAudio, which doesn't support mobile. I would love to hear about people's experience with this because it does look promising.

    We are by no means dead-set on Essentia and C++. I am open to java, python, c#, or even other languages if they have appropriate tools for this project.

    I have also investigated going the web app route and tested this out by making a basic cordova-browser app using this MIR library and p5.js to make a simple animated spectrum analyzer/pitch tracker. For the real thing i'd assume that we'd be using a more sophisticated UI library, but the p5 mockup was nice just to see if javascript/webaudio was a viable tool for realtime audio analysis. Obviously this route has the advantage of being able to deploy straight to web-browsers, which is a nice bonus and might negate any need for desktop apps. But here I have no idea what the idea tooling might be for both the UI and the MIR (Essentia has js bindings, but the documentation is pretty thin).

    If anyone has any insights on the tools i've mentioned or has any other recommendations for this sort of app I'd love to hear! I am aware that this is a pretty ambitious project given the small scope of my experience, but I've got the whole summer to work on it full time and honestly I'm looking forward to doing something a bit more serious :)

    tldr: I need a cross-platform framework for UI and realtime audio i/o as well as a music information retrieval library that will play nice with it.

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

    noob programming question! please help thanks

    Posted: 09 May 2021 08:18 PM PDT

    Hi reddit programmers

    I'm a student trying to learn to start a business. I have a decent sales background.

    I have an idea where I want to build a program where all my text messages on my phone can also be accessed on my computer, and I can send the text by typing on my computer. I know an app like this already exists, but I want to make one on my own because there are a lot of other features I want to incorporate, and then I want to sell this program/app.

    I don't have a programming background.

    What is your advice on starting this business?

    Should I just find a partner who has the programming background and he does the programming and I do the sales?

    Or would you encourage that I learn all or most of the programming skills on my own so I can do it myself?

    If I learn these programming skills on my own, what specific things should I learn? like java? Please tell me exactly what language and skills you would learn to build an app that can take your text messages from phone onto your computer and allows you to text from your computer.

    Please help thanks!

    submitted by /u/88student88
    [link] [comments]

    need help with disassembly and assembly language pm me please

    Posted: 09 May 2021 07:41 PM PDT

    What type of hardware would be well suited to do programming on?

    Posted: 09 May 2021 03:49 PM PDT

    So obviously I'm just starting out, and I'm trying to figure out what type of laptop to get. Just wondering what would be sufficient for someone learning coding, that could hopefully last them throughout school, and longer if possible. Like what specs it needs to have, ideal screen size. Then as a follow up I'm wondering what operating system and any special programs I might be needing. Basically I'm just trying to get an idea of everything I will need to get started and have some nice equipment to do it with. Sorry if this is silly to ask. But please humor me

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

    why does whatapp limit file types?

    Posted: 09 May 2021 02:44 PM PDT

    You can't upload gif, or some video types

    submitted by /u/2mbili
    [link] [comments]

    Anyone have tips for programming anxiety?

    Posted: 09 May 2021 12:18 PM PDT

    Anyone have tips for programming anxiety?

    I.e. anxiety that is produced by viewing code or having to think programs.

    It's not that I find programming anxiety in itself, I enjoy it. But there's perhaps something in the text or the screen that makes it anxiety provoking. Or the amount of screen time.

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

    Iterated Local Search on graph coloring

    Posted: 09 May 2021 10:26 AM PDT

    I'm helping a friend out on his project to implement Iterated Local Search on graph coloring, and I'm having some trouble with some concepts. Basically everything you find on this topic are academic papers that doesn't explain the basics quite well. I know there are many ways to do either the local search and the perturbation, but nothing was specified so we can do the simplest way. I know how to find the neighborhood of a solution, but I don't know exactly how to choose which solution to go after the search. I've seen some papers talk about reducing the number of conflicts, but that doesn't make sense for me, because I see no correlation between having no conflicts and a good coloring of the graph (after all, each vertex with a different color has 0 conflicts and is the worst coloring possible). So, my first question is: starting with a valid coloring calculated using a greedy algorithm, what is the simplest way to use local search to go to another coloring on the neighborhood of the first solution?

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

    How can I make an auto buy bot?

    Posted: 09 May 2021 01:33 PM PDT

    I'm a complete programming noob and I want to make a bot so I can get a gpu from the upcoming Best Buy drop. How can I go about doing this?

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

    Javascript - Problems with retrieving data from Firebase

    Posted: 09 May 2021 05:58 AM PDT

    I have this code below to retrive data from firebase and turn into an array but whenever i call it it stops other functions from being called inside the code even tho I can perfectly call them in the console.

    https://imgur.com/a/zChrY1a

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

    I'm 16 going into college for a diploma in IT and need advice

    Posted: 09 May 2021 09:06 AM PDT

    So basically I want to be prepared to go into the course and I don't wanna walking like a fool. The things I'll be doing in the course are

    • Information Technology Systems
    • Creating Systems to Manage Information
    • Using Social Media in Business
    • Programming
    • Website Development
    • Data Modelling

    Any websites or things I can do to practise.

    BTW... The reason I don't wanna search this up on youtube is that I would rather have someone actually give me advice, I don't know, I just like this.

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

    How does an application bound memory usage?

    Posted: 08 May 2021 11:48 PM PDT

    Let's say I have a ruby application that creates a trillion objects, how does this not crash the computer by filling up the computer's memory?

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

    How to run a function and just run the next line without waiting for the function to end using python?

    Posted: 09 May 2021 12:10 AM PDT

    multi-tasking

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

    [Java] Do someone -have/know where to find- code regarding category theory?

    Posted: 09 May 2021 03:09 AM PDT

    I'm struggling to 'translate' from the theoretical concept to the actual code... I've already checked various sites and youtube videos, but there is slim to none material. This site is the most practical one, but is still lacking.

    Don't want to bother, just if someone know where to learn it would be helpful.

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

    Is there any way to evade Windows Safe Mode for a Windows Application?

    Posted: 09 May 2021 01:36 AM PDT

    I want my application to run in safe mode or disable the safe mode entirely. The app is a file, app, and windows feature lock application that basically locks apps with a password. But, I am afraid any user can bypass the whole thing by starting windows in safe mode. Although there are not many apps available in safe mode, I still want my application to run with it.

    Any help will be appreciated.

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

    Vector subscript out of range in C++ SFML

    Posted: 09 May 2021 12:59 AM PDT

    So, guys, I was trying to make a copy of the game "Asteroids" in C++ SFML. This is my first time making a game in c++. Occasionally when I run the game, I get the vector subscript error and I don't know what's causing that. I have shared all my code below. I would really appreciate if you guys could help me find out the problem.

    Main.cpp

    #include <SFML/Graphics.hpp> #include <iostream> #include "Player.h" #include "Asteroid.h" using namespace sf; const unsigned int width = 800; const unsigned height = 600; RenderWindow win(VideoMode(width, height), "Game", Style::Close); bool moveUp = false; bool moveDown = false; bool moveRight = false; bool moveLeft = false; int main() { Player player(Vector2f(width/2 - 15, height/2 - 15), Vector2f(20.f, 65.f), 0.f, Color(16, 16, 16)); std::vector<Asteroid> asteroids; asteroids.push_back(Asteroid()); Clock clock; Time deltaTime, currentTime, previousTime, spawnTime; int maxSize = 0; win.setFramerateLimit(60); while (win.isOpen()) { Event event; while (win.pollEvent(event)) { if (event.type == Event::Closed) { win.close(); } if (event.type == Event::KeyPressed) { auto key = event.key.code; if (key == Keyboard::Up) moveUp = true; else if (key == Keyboard::Down) moveDown = true; else if (key == Keyboard::Right) moveRight = true; else if (key == Keyboard::Left) moveLeft = true; else if (key == Keyboard::Space) { if (currentTime.asMilliseconds() >= previousTime.asMilliseconds() + 200.f) { previousTime = currentTime; player.spawnBullet(deltaTime.asSeconds(), player.rect.getRotation()); } } } else if (event.type == Event::KeyReleased) { auto key = event.key.code; if (key == Keyboard::Up) moveUp = false; else if (key == Keyboard::Down) moveDown = false; else if (key == Keyboard::Right) moveRight = false; else if (key == Keyboard::Left) moveLeft = false; } } win.clear(Color(16, 16, 16)); player.update(moveUp, moveDown, moveRight, moveLeft, deltaTime.asSeconds(), &win); player.draw(&win); for (int i = 0; i < asteroids.size(); ++i) { asteroids[i].update(deltaTime.asMilliseconds()); asteroids[i].draw(&win); asteroids[i].body.move(10, 0); if (asteroids[i].isSafe == false && (asteroids[i].pos.x > 800 || asteroids[i].pos.x < 0)) { asteroids.erase(asteroids.begin() + i); } else if (asteroids[i].isSafe == false && (asteroids[i].pos.y > 800 || asteroids[i].pos.y < 0)) { asteroids.erase(asteroids.begin() + i); } for (int j = 0; j < player.bullets.size(); ++j) { if (asteroids[i].body.getGlobalBounds().intersects(player.bullets[j].getGlobalBounds())) { if (j < player.bullets.size() && i < asteroids.size()) { asteroids.erase(asteroids.begin() + i); player.bullets.erase(player.bullets.begin() + j); player.positions.erase(player.positions.begin() + j); player.directions.erase(player.directions.begin() + j); } } } } if (currentTime.asMilliseconds() >= spawnTime.asMilliseconds() + 1000) { spawnTime = currentTime; asteroids.push_back(Asteroid()); } win.display(); deltaTime = clock.restart(); currentTime += deltaTime; } return 0; } 

    Player.h

    #pragma once #include <iostream> #include <vector> #include <SFML/Graphics.hpp> using namespace sf; class Player { private: const float speed = 100.0f; const float rotationAngle = 150.0f; const float bulletSpeed = 400.0f; public: ConvexShape rect; Vector2f pos, size, direction, velocity; Color color; float rotation; bool bulletSpawnTime = false; std::vector<RectangleShape> bullets; std::vector<Vector2f> positions; std::vector<Vector2f> directions; Player(Vector2f pos, Vector2f size, float rotation = 0.0f, Color color = Color::White); void draw(RenderWindow* window); void update(bool moveUp, bool moveDown, bool moveRight, bool moveLeft, float deltaTime, RenderWindow* window); void spawnBullet(float deltaTime, float rotation); }; 

    Player.cpp

    #include "Player.h" #include <cmath> double toRadians(float angle) { const double pi = 3.14159265359; return (angle * (pi / 180)); } bool notInBounds(Vector2f pos) { if (pos.x > 800 || pos.x < 0) return true; if (pos.y > 600 || pos.y < 0) return true; return false; } Player::Player(Vector2f pos, Vector2f size, float rotation, Color color) : pos(pos), size(size), rotation(rotation), color(color) { rect.setPointCount(3); rect.setFillColor(color); rect.setOutlineThickness(2.f); rect.setOutlineColor(Color::White); rect.setOrigin(Vector2f(size.x, size.x + size.x * (3.75f / 2.f))); rect.setPosition(pos.x + rect.getOrigin().x, pos.y + rect.getOrigin().y); rect.setPoint(0, Vector2f(size.x, size.x)); rect.setPoint(1, Vector2f(0.f, size.x * 3.75f)); rect.setPoint(2, Vector2f(size.x * 2.f, size.x * 3.75f)); } void Player::draw(RenderWindow* window) { window->draw(this->rect); rect.setPosition(pos); } void Player::update(bool moveUp, bool moveDown, bool moveRight, bool moveLeft, float deltaTime, RenderWindow* window) { direction.x = cos(toRadians(rect.getRotation() + 90)); direction.y = sin(toRadians(rect.getRotation() + 90)); velocity.x = direction.x * speed * deltaTime; velocity.y = direction.y * speed * deltaTime; if (moveUp) { pos.y -= velocity.y; pos.x -= velocity.x; } else if (moveDown) { pos.y += velocity.y; pos.x += velocity.x; } else if (moveRight) { rect.setRotation(rect.getRotation() + rotationAngle * deltaTime); } else if (moveLeft) { rect.setRotation(rect.getRotation() - rotationAngle * deltaTime); } for (int index = 0; index < bullets.size(); ++index) { window->draw(bullets[index]); positions[index].x -= directions[index].x * bulletSpeed * deltaTime; positions[index].y -= directions[index].y * bulletSpeed * deltaTime; bullets[index].setPosition(positions[index] - Vector2f(-40 * direction.x, -40 * direction.y)); if (notInBounds(positions[index])) { if (index < bullets.size()) { bullets.erase(bullets.begin() + index); positions.erase(positions.begin() + index); directions.erase(directions.begin() + index); } } } } void Player::spawnBullet(float deltaTime, float rotation) { bullets.push_back(RectangleShape(Vector2f(size.x / 4.5f, size.y / 4.5f))); bullets.back().setFillColor(Color::White); bullets.back().setRotation(rotation); positions.push_back(Vector2f(pos.x - direction.x * speed, pos.y - direction.y * speed)); directions.push_back(direction); } 

    Asteroids.h

    #pragma once #include <SFML/Graphics.hpp> using namespace sf; class Asteroid { private: float velocity = 0.5f; Vector2f positions[4] = {Vector2f(380.f, -40.f), Vector2f(380.f, 640.f), Vector2f(-40.f, 280.f), Vector2f(840.f, 280.f)}; public: RectangleShape body; Vector2f pos, size, direction; Texture smallTexture, bigTexture; bool isSafe = true; Asteroid(); void draw(RenderWindow* window); void update(float deltaTime); }; 

    Asteroids.cpp

    #include "Asteroid.h" #include <SFML/Graphics.hpp> #include <iostream> #include <ctime> using namespace sf; int getRandomNumber(int start, int end) { int number = start + (rand() % end); return number; } Asteroid::Asteroid() { int index = getRandomNumber(0, 4); pos = positions[index]; size = Vector2f(96.f, 96.f); switch (index) { case 0: direction.x = (getRandomNumber(0, 100) - 50) / 100.f; direction.y = getRandomNumber(0, 50) / 100.f; break; case 1: direction.x = (getRandomNumber(0, 100) - 50) / 100.f; direction.y = getRandomNumber(0, 50) / -100.f; break; case 2: direction.x = getRandomNumber(0, 50) / 100.f; direction.y = (getRandomNumber(0, 100) - 50) / 100.f; break; case 3: direction.x = getRandomNumber(0, 50) / 100.f; direction.y = (getRandomNumber(0, 100) - 50) / 100.f; break; default: std::cout << "Nope" << std::endl; break; } smallTexture.loadFromFile("asteroid-small.png"); bigTexture.loadFromFile("asteroid-big.png"); body.setSize(Vector2f(96.f, 96.f)); body.setPosition(pos); body.setRotation(getRandomNumber(0, 36000) / 100.f); } void Asteroid::draw(RenderWindow* window) { body.setTexture(&bigTexture); window->draw(body); } void Asteroid::update(float deltaTime) { pos += Vector2f(direction.x * velocity * deltaTime, direction.y * velocity * deltaTime); body.setPosition(pos); if (pos.x > 0 && pos.y > 0) { isSafe = false; } } 
    submitted by /u/Aggressive_Ad_209
    [link] [comments]

    Need some advice on making my xml parser more robust in C++?

    Posted: 08 May 2021 11:34 PM PDT

    So, I'm using a bit of a hybrid style of programming between C and C++. Basically, just using classes and minimizing my use of the stl. I'm using a data oriented paradigm for designing my class structure. So, I'm managing a bunch of cstrings, and have to get rather creative to work with them. I might switch to the EA stl eventually. But, still want to try to minimize stl usage if possible for compilation speed.

    So, I'm using strstr to grab the replacement character for HTML character codes for a few specific characters, and need to add full support now. My current code makes that rather hard to implement by being too complex. Is a lookup table of HTML charcter codes that scans for a match what I need?

    Scan the table for a match, and then loop through all occurrences of that character, and replace them is what I'm thinking. Have any other advice on solutions?

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

    No comments:

    Post a Comment