• Breaking News

    Saturday, November 27, 2021

    What to study to get a deep understanding of C++? Ask Programming

    What to study to get a deep understanding of C++? Ask Programming


    What to study to get a deep understanding of C++?

    Posted: 27 Nov 2021 05:15 AM PST

    Hey everybody! I am currently new to programming and I am hoping to get a C++ developer job in one year(that is the plan anyway). I am currently wondering what y'all would recommend for online resources and books. I am currently taking a couple classes on Udemy but I am looking to really get into to C++. Please help! Thank you in advance for any responses. I really appreciate it!

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

    Best language for internet iterations and modifying html

    Posted: 26 Nov 2021 11:43 PM PST

    I'm working on an excel VBA project than opens a website, fills out a username and password, and signs in. On the next page name and date of birth. If successful it should save the resulting web page as some type of picture file.

    I have a feeling VBA is not particularly suited for this, and I'd appreciate recommendations.

    I work in the medical industry, so any third party applications would make me nervous, and I'd appreciate any advice on security.

    Thank you!

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

    SQL Server and C# Application - Slower Than Expected

    Posted: 27 Nov 2021 07:50 AM PST

    I realize there are a LOT of things that can be a factor when it comes to optimization and/or figuring out where a bottleneck exists, but I am trying to look at the "big picture" and see if there are any red flags that stick out to folks that I didn't realize.

    Context:

    I had originally developed an in-house C# desktop application (winforms) to manage certain requests within our office. Think of it like a ticketing system (it's not, but acts very similarly. Requests are created, assigned to someone, they work it, pass it to a stage 2 queue, eventually they are completed, etc). This application currently uses xml files as its "database". Each queue has its own file. Not ideal, but it has been working.

    I have now developed version 2.0, which uses a MySQL database and makes SQL calls, so I've stripped out all of the old xml related code. I chose to use a desktop pc we had in the office, with a static ip, to act as the server for this database. We will only ever have, max, 10-15 people using this application total, with max 3-4 simultaneously working in this program. I was really expecting switching from xml file based storage to a proper sql database to be much faster. To be honest, it's about the same speed. Hitting "Save" on a request, which then gathers each of the textfield data, puts them into an object, and sends to either the xml file or the DB takes, roughly, the same amount of time.

    Questions:

    1. Should I use a proper server rather than a desktop pc acting as a server? (keeping in mind how relatively small the scale is for this application and the # of people using it)
    2. Was MySQL, for some reason, the wrong choice for a database?
    3. Is it more likely the bottleneck is the code itself? (I know, hard to say without SEEING the code, but if no one sees issues with #s 1 and 2 above, I would think this is the next likely area for me to try to optimize)
    submitted by /u/Ryger48
    [link] [comments]

    SQL - Delete duplicates except one

    Posted: 27 Nov 2021 06:16 AM PST

    Hello everyone...i was wondering i can delete the duplicates except one...

    SELECT Code, Title, Price, COUNT(*) Duplicates FROM MyTable GROUP BY Code, Title, Price HAVING COUNT(*) > 1 

    from the code above i'm getting just the duplicates but i wanted to see the primary keys for each result.

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

    What's the proper way to make a tag system for web?

    Posted: 26 Nov 2021 06:58 PM PST

    I'm just thinking of creating a `tag` table and then setting up something to grab the records as they in a text field.

    1. is there a better way with native HTML / postgres?
    2. is there a good way to handle catcheing the tags for the backend so I'm not hitting the db every key down polling for the tags?
    submitted by /u/dikbummmm
    [link] [comments]

    How could I write a tool activated by a keyboard shortcut in command line (Mac / Linux)

    Posted: 26 Nov 2021 07:00 PM PST

    I just thought of a tool to implement, it would be alt+<char>+del, and it deletes characters from the cursor to the first matching char.

    I'm not sure where to start to implement this though

    Thanks

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

    When / how should I actually comment my code?

    Posted: 27 Nov 2021 03:13 AM PST

    I am an A Level CS student, so forgive me if this is a basic question. We're always encouraged to comment our code, however we have been given no guidance as to how and when we should do this. Does anyone have any rules of thumb that should be followed on how to comment code / when to comment code?

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

    Best language before C++

    Posted: 26 Nov 2021 02:51 PM PST

    I am new to programming, and i really like it, ik and i heard C++ is hard so i want some easier language which can help me get into things and to let me play for some time.(for now I only did python) I would like to switch to C++ later, so if you can take that in mind.

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

    How would you guys represent dynamic (html) table data in a database?

    Posted: 26 Nov 2021 09:36 PM PST

    My system is a little confusing to explain but to make it simple I want to store dynamic values to a key.

    I'm trying to figure out what the best way to set up dynamic table data <td> <tr> many to one on content.

    I have a dynamic system that I can't just add a db table and call it a day, I would have to have many with forign keys to represent one table. I can see that being an issue in a few months, so I've been looking towards json stored directly into the db. Thoughts?

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

    I want to learn front end web programming. I've never typed in any code in my life, where and how do I start?

    Posted: 27 Nov 2021 01:15 AM PST

    Is there anyone who did it alone, without school? But from scratch

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

    Please Help us guys!

    Posted: 27 Nov 2021 01:13 AM PST

    hey guys im in 12th grade and we have computer science as our option subject. we have been doing python close to a year now but our teacher teaches us absolutely nothing. all the knowledge i have about python is from youtube videos and freecodecamp.org. thanks to them otherwise i would be failing my exams rather than getting A's. so anyway we were told today to design an app in python on whatever topic we like. the problem is we havent been taught how to code in tkinter or how to use the tabulate module or any of those stuff. so it would be great if some1 could help us in making our project. we both would be very grateful to whoever can help us. thanks

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

    Coding Bootcamp Recommendations?

    Posted: 27 Nov 2021 12:42 AM PST

    Hello Everyone,

    I'm a coding beginner, who wants to make a serious commitment to acquire the necessary skills of becoming a developer. Based on my research, a coding bootcamp seems to be a great way to accelerate my learning curve without having to identify courses, materials, and a community on my own. While many enter a coding bootcamp to become a professional developer, I want to become a better CEO of a technology company, who can make better hiring decisions and have better conversations with the developers (I recently sold a tech company). My other objectives are to learn more about automation, API integrations, and develop a better technical understanding of the latest technologies such as blockchain, DeFi, and so on. I'm fully flexible and open to in-person (globally) or remote learning. I'd like to start the bootcamp in the first quarter of 2022.

    I'd very much appreciate your recommendations for coding bootcamps.

    Thanks in advance.

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

    Rank first k items of n elements where each comparison is an input by the user

    Posted: 26 Nov 2021 01:17 PM PST

    Hi, I'm a CS grad and bit of a self proclaimed nerd. I want to create a fun application where users can get a ranking of their favourite characters. Let me explain further.

    Suppose I want to find out my top 15 superheroes. From it's database of say 100 superheroes, the app would first ask me to choose between Superman and Batman. Then maybe between Spiderman and Black Panther and so on. Finally, it would give me a list with a final ranking based on my responses. I'd really appreciate it someone could point me in the direction of the best suited approach for this.

    Two problems that arise -

    1. I want to keep the comparisons to a minimum since the user might get impatient if I keep him sitting too long. Since I just want the first k results instead of the entire ranking, maybe there is an approach where I can eliminate a good chunk of the options quite soon?
    2. I want to account for cases where the user thinks A is better than B, B is better than C but also inputs that C is better than A.
    submitted by /u/TelekineticGuitar
    [link] [comments]

    What is the best degree for any job/occupation that involves coding?

    Posted: 26 Nov 2021 10:57 AM PST

    Hi! I'm currently a sophomore in High School who is going to do a program that my School Board has to do get my A.A degree in my Junior and Senior year. I'm curious about what the best degree for an aspiring coder is to get into a job/occupation that involves coding?

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

    Movement bases character script almost / How do you cancel out functions and change code while running script

    Posted: 26 Nov 2021 01:43 PM PST

    Dialog to what's happening:

    I've written a movement bases character script that works half well for a game im trying to make using python turtle. Although there is one problem with the up, down, left and right(arrow keys) functions and thats cancelling and changing the code as such while running the script.

    Problem:

    When my character/ball is heading at the right side, the up key's function is suppost to change the angle by -90, but with this if i go along the left side that would take me down so it would have to be 90 degrees. So I need help with detecting which side it starts going to and what function to change its script use to (so basically a detector system). I also need my down key to be disabled when travelling along the bottom of the tab but ill figure that out later on.

    Request in total:

    How do i detect a movement pattern and how do I block out / change a piece of code when its not doing the allocated task.

    Code:

    import turtle

    wn = turtle.Screen()

    wn.title("Movement Base")

    wn.setup(width=700, height=400)

    wn.bgcolor("black")

    #Ball

    Ball = turtle.Turtle()

    Ball.speed(0)

    Ball.shape("circle")

    Ball.color("red")

    Ball.shapesize(stretch_wid=1, stretch_len=1)

    Ball.penup

    Ball.goto(0, -170)

    #Ball's movement

    # Defining the functions to make the turtle turn

    def turn_left():

    Ball.color('light green')

    Ball.left(180)

    def turn_right():

    Ball.color('light blue')

    Ball.right(180)

    #Defining the functions to make the turtle go up and down

    def Go_up():

    Ball.color("cyan")

    Ball.right(90)

    def Go_down():

    Ball.color("red")

    Ball.right(180)

    # Create the key bindings

    wn.onkeypress(turn_left, "Left")

    wn.onkeypress(turn_right, "Right")

    wn.onkeypress(Go_up, "Up")

    wn.onkeypress(Go_down, "Down")

    wn.listen()

    while True:

    Ball.forward(2)

    wn.update()

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

    Anybody know about RSA Algorithm

    Posted: 26 Nov 2021 12:50 PM PST

    I created an app and website and am trying to use rsa algorithm using Java and PHP in order to Encrypt and decrypt chat messages. So it's like am able to generate public and private key using Java which is from the app (in case a user opens an account using the app) and then be able to use it to encrypt and decrypt both on the Java and PHP side (php is for the app website in case the user creates it using the website so I can use php to also create the private and public key for the user too). Please can someone help me out. Also if you need more explanation please let me know

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

    Hi, I could use some help!

    Posted: 26 Nov 2021 06:15 AM PST

    Hi, so me and a few friends are trying to create a game that is a turn based ctp game. How it works is by you playing your turn and then when its over after 10 - 15 seconds all their movements, direction change through mouse control, attacks and WASD inputs, are copied over to an ai that takes those and does those actions during the opponents turn.

    The opponent can then kill/destroy the ai, stopping that players action from the turn before to become invalid. When that player then ends their turn, the same happens, but now two turns worth of ai are doing what was done before. It keeps going like that for like 10 or 20 turns, making you have to keep track of everything.

    If I didn't explain it too well, i'm sorry but I don't know how to really explain it too well. Anyway, I hope you have some clue of how to program that or anyway to figure it out.

    Thanks in advance for any and all advice.

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

    Can INSERT rows even though foreign key doesn't match value in other table.

    Posted: 26 Nov 2021 10:56 AM PST

    Yeah the title pretty much sums up my problem.

    As I understand it, I'm not supposed to be able to INSERT a row in ActivityContribution unless the eID matches an eID that is in the Employee table. But I can, what is the cause of that problem, and how can I fix it?

    This is my two tables:

    %%sql DROP TABLE IF EXISTS ActivityContribution; CREATE TABLE ActivityContribution ( aID INT(255) NOT NULL, eID varchar(255) NOT NULL, startDate DATE NOT NULL DEFAULT '2000-12-31', endDate DATE NOT NULL DEFAULT '2000-12-31' CHECK (JulianDay(startDate) <= JulianDay(endDate)), FOREIGN KEY (aID) REFERENCES Activity(aID), FOREIGN KEY (eID) REFERENCES Employee(eID) ); 

    and

    %%sql DROP TABLE IF EXISTS Employee; CREATE TABLE Employee ( eID varchar(255) NOT NULL UNIQUE, name varchar(255) NOT NULL DEFAULT '', cost REAL NOT NULL DEFAULT 0, PRIMARY KEY (eID) ); 
    submitted by /u/Molnes
    [link] [comments]

    Azure WebJobs alternative?

    Posted: 26 Nov 2021 10:17 AM PST

    I want to host my console app that acts like a job for sending emails. I tried Azure WebJobs and I really like how easy it is to deploy and setup. However, the free tier causes the service to take a nap after 20 mins.

    Are there any free alternatives?

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

    How many tasks do you concurrently work on?

    Posted: 26 Nov 2021 05:49 AM PST

    I've been constantly swamped by work lately and it's making me question my time management skills, hence wanted to ask this to others.

    Im a lead dev in my team and Ive got 5 years of experience, we're part of a large product company where multiple teams are working on the same project across various streams. As the lead I know my dev team looks up to me for troubleshooting and general guidance, which is fair. However lately I've been having ad hoc requests from different teams for various things and its pushing my tasks to the side. Currently I'm working on 2 tasks of my own, assisting on 3 tasks to my own team, working on 2 issues from other teams and 1 analysis request from business. I have leeway for the tasks which are assigned to me as my manager knows I'm busy with other folks, however I can't help but notice that works getting piled on to me because I haven't protested maybe?

    Anyways, whats the general trend? Is this normal at this level of experience?

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

    Checking if date is between two dates in a TRIGGER SQLite

    Posted: 26 Nov 2021 04:37 AM PST

    Hello!

    I have recently asked a question about triggers and I've learned a lot. Still, I'm having a pretty tough time making my own triggers from scratch.

    I'm trying to create a trigger that doesn't let you add a row to the table ActivityContribution if there already is a row with same aID (activityID) and the startDate and endDate in the new entry is between the startDate/endDate in the existing row (with equal aID).

    Here is the trigger I've created, and this just adds the row anyways:

    %%sql DROP TRIGGER IF EXISTS trg_ins_activityContribution; CREATE TRIGGER trg_ins_activityContribution BEFORE INSERT ON ActivityContribution BEGIN SELECT CASE WHEN EXISTS ( SELECT 1 FROM ActivityContribution a WHERE a.aID = NEW.aID AND (NEW.startDate BETWEEN a.startDate AND a.endDate) AND (NEW.endDate BETWEEN a.startDate AND a.endDate) ) THEN RAISE (ABORT, 'Invalid dates') END; END; 

    Thank you for any comments on how I can fix this.

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

    Display output in certain format.

    Posted: 26 Nov 2021 03:17 AM PST

    https://imgur.com/a/KfbIlk3

    This is the question.

    My try-:

    item_name="Apple"
    item_qty=5
    print("**********BILL**********")

    print("Item Name\n",item_name,"\t Item Quantity",item_qty, "Item Price")
    print("**************************")
    total_amt=500
    print("Total Amount to be paid",total_amt)
    print("**************************")

    I am really worrying situation. This is supposed to be a really easy programming example and I am having issues with this. Are there some examples of similar type, which I can practice? Please guide.

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

    No comments:

    Post a Comment