• Breaking News

    Thursday, August 20, 2020

    hey everyone, just started learning c++ two weeks ago and i have some questions. Ask Programming

    hey everyone, just started learning c++ two weeks ago and i have some questions. Ask Programming


    hey everyone, just started learning c++ two weeks ago and i have some questions.

    Posted: 20 Aug 2020 05:22 PM PDT

    after finishing c++ course i started solving some problems in it , then started a data structures and algorithms course .

    first question: is this right ?? or i have to wait until being good in c++ to start data structures and algorithms course .

    second one: after finishing data structures and algorithms course i'll start making projects like snake, then i'll take a design pattern course and again is this right too??

    last one: how many problems i should solve to start my track (notice: i know that i shouldn't stop solving problems but i'm asking about what's the minimum number of problems i have to solve to start my track).

    and sorry for my English i'm not a native speaker.

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

    I'm bored and I'd appreciate some ideas

    Posted: 20 Aug 2020 08:12 PM PDT

    I know object-oriented programming and the language I master the most is Java.

    Recent days I've been resting 'cause I've had back pain and I want to return to program but I don't know what to do.

    What do you recommend me?

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

    People who do this for a living, how prepared were you going into the job?

    Posted: 20 Aug 2020 08:45 AM PDT

    For example, how big of a gap was there between your knowledge, skills, abilities and the actual role?

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

    How do programs draw to the screen?

    Posted: 20 Aug 2020 01:45 AM PDT

    I have already done a few operating systems classes and know a fair bit of coding, but in the process of writing a GUI program for learning purposes i realized that i have no idea how the GUI is drawn to the screen. There are a lot of libraries for java like swing and javafx that do a lot of the heavy lifting in the background and where most of the actual work of creating the window is abstracted away behind a few functions. But i'd like to know how that happens. How are those libraries build, are they written in opengl, ore something even more low-level? Do these window creations happen with a syscall by the operating system? I have no idea, but i'd like to know. My research did not come up with anything, so this is my last resort.I hope i have asked my question so that it can be understood and thanks for the answers in advance.

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

    Is nearly every dev job a dysfunctional feature factory?

    Posted: 20 Aug 2020 09:32 PM PDT

    This post seems better for CS career questions I moved it there

    submitted by /u/Inner-Panic
    [link] [comments]

    Getting some 404 nit found errors I don't know what to do with.

    Posted: 20 Aug 2020 11:21 AM PDT

    The program I am working on needed me to download a couple of files to work correctly mainly bootstrap and JQuery. The lectures I'm following had me set them up and store them in specific files and then I had to call them in different areas. I stored the files where I was supposed to but keep getting 404 not found errors that I need to resolve. The specific errors look like this:

    GET /Static/js/bootstrap.min.js" - 404 Not Found GET /Static/js/jquery-3.5.1.min.js" - 404 Not Found GET /Static/js/scripty.js" - 404 Not Found 

    In the task bar I can easily locate and open these files so I know at the very least they are present in the program but that kinda only makes it more confusing since they appear to be where they should be. I have included a picture of the taskbar so you can see the where the files are stored. I'm really stuck on how to resolve this especially since it appears that they are where they're supposed to be so I'm not sure if the error has to do more with the code than the location of the files. This is the main layout HTML file where these files are first called and their path is defined. https://i.stack.imgur.com/ncuvm.png

    $def with (page) $var js: /Static/js/bootstrap.min.js /Static/js/jquery-3.5.1.min.js /Static/js/scripty.js <html lang="en"> <head> <meta charset="UTF-8"> <title>CodeMage</title> <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script> <script src="Static/js/jquery-3.5.1.min.js"></script> </head> <body> <div id ="app"> <div class="navbar navbar-expand-lg navbar-light" style="background-color:#e3f2fd;"> <div class="navbar-header"> <a class="navbar-brand">CodeMage</a> </div> <ul class="navbar-nav mr-auto"> <li class="nav-item"><a class="waves-effect" href="/">Home Feed<div class="ripple container"></div></a></li> <li class="nav-item"><a href="discover">Discover<div class="ripple container"></div></a></li> <li class="nav-item"><a href="profile">Profile<div class="ripple container"></div></a></li> <li class="nav-item"><a href="settings">Settings<div class="ripple container"></div></a></li> </ul>&nbsp; <div class="pull-right"> <a href="/Login" class="btn btn-link waves-effect">Login</a>&nbsp; <a href="/register" class="btn btn-raised btn-default waves-effect">Register</a>&nbsp; &nbsp; </div> </div> <br /><br /> $:page </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.5.9/js/ripples.min.js" integrity="sha512-0GHGzq3KbbzUN1B+Vv0GFkvgEMYECMbMYH2MRpJYFTOBVi6w9qK6JvzND3AUf1k3lw8rQ/BX6XToXn12a5n8wg==" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script> $if self.js: $for script in self.js.split(): <script src="$script"></script> </body> </html> 

    This next section is the contents of the JQuery java script file called scripty.

    $(document).ready(function(){ console.log("loaded"); $.material.init(); $(document).on("submit", "#register-form", function(e){ e.preventDefault(); var form = $('#register-form').serialize(); $.ajax({ url: '/postregistration', type: 'POST', data: form, success: function(response){ console.log(response); } }): }); }): 

    The final section is the main controller Python file where the GET command is issued:

    import web from Models import RegisterModel urls = ( '/', 'Home', '/register', 'Register', '/postregistration', 'PostRegistration' ) render = web.template.render("Views/Templates", base="MainLayout") app = web.application(urls, globals()) class Home: def GET(self): return render.Home() class Register: def GET(self): return render.Register() class PostRegistration: def POST(self): data = web.input() reg_model = RegisterModel.RegisterModel() return data.username if __name__ == "__main__": app.run() 

    I've tried going over the lecture videos alot and tried a bunch of other tutorials to try and fix this issue so far nothing has really help. I'd really like to be able to fix this issue so I can move onto the next part of the project.

    submitted by /u/Wiseman-no
    [link] [comments]

    how do i stop autoplay on twitch embed?

    Posted: 20 Aug 2020 08:37 PM PDT

    <!-- Add a placeholder for the Twitch embed -->

    <div id="twitch-embed"></div>

    <!-- Load the Twitch embed script -->

    <script src="[https://embed.twitch.tv/embed/v1.js](https://embed.twitch.tv/embed/v1.js)"></script>

    <!-- Create a Twitch.Embed object that will render within the "twitch-embed" root element. -->

    <script type="text/javascript">

    new Twitch.Embed("twitch-embed", {

    width: 1080,

    height: 580,

    channel: "monstercat",

    // only needed if your site is also embedded on embed.example.com and othersite.example.com

    parent: ["embed.example.com", "othersite.example.com"]

    });

    </script>

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

    JavaScript: have many loops is gonna cause performance delay ?

    Posted: 20 Aug 2020 08:05 PM PDT

    I'm mapping json through the cloud. Let's say I have a Object that contains an array of objects that also contains an array of objects and I want to map all the information because I want to sterilize and verify each one. Let's say the limit is 100 objects for each array. Will I take a performance hit? As of now it's n2 but idk at what point will I start feeling the n2.

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

    Dynamic web pages with Embedded Ruby vs JavaScript?

    Posted: 20 Aug 2020 04:43 PM PDT

    Which do you prefer/use most in building dynamic web pages: Embedded Ruby or JavaScript?

    And why?

    When/how do you decided which to use?

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

    how to analyse csv file data in python without using any libraries but instead using data structures like list or maps?

    Posted: 20 Aug 2020 04:40 PM PDT

    How to get the moving average of a stock live in the market?

    Posted: 20 Aug 2020 03:24 PM PDT

    Hello, hope everyone is well?

    https://stackoverflow.com/questions/63501706/how-to-calculate-the-moving-averages-for-a-live-stock

    I have linked the code as I didn't want to clutter it too much. I am building a trading algorithm that iterates through 35 different etfs and calculates the moving average for it every however many seconds. I have made this originally using the close for a stock in set days but I don't really know how to convert it into a live paper trading strategy.

    Thanks!

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

    Advice on a 2D Automated Car Parking Maneuver Program

    Posted: 20 Aug 2020 03:11 PM PDT

    As a project to cement my learning on different kinds of search algorithms and AI, I am intent on creating an application in Java that would automatically (via the use of an A* search algorithm) maneuver and park a car in a given space, starting outside of it. See this diagram for a rough idea.

    I am having some trouble with deciding how best to represent the game world, the state of the car within the world and how I would create an action class that could be used to actually maneuver the car to the goal. If it's necessary to note, the car should be reversed parked, I suppose.

    If my post is too vague, apologies, I will try and clarify more. Even if you're able to point me in the direction of an example to base my idea on, that would be very much appreciated. Thank you.

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

    Am I a Programmer?

    Posted: 20 Aug 2020 03:10 PM PDT

    (18M) Started learning HTML, CSS, and JavaScript basics around last Christmas. Started learning more advanced JavaScript around January, using Udemy Courses and YouTube tutorials to help me along the way. I just made a web-based basic game. And didn't do much else afterwards.

    Then the virus hits and we all have to stay home. So I use this time to freshen up on my JavaScript (making more websites) and take a React Native course on Udemy. Afterwards I ended up making 2 apps (one the course guided me through and one on my own. I'm making another one on my own as well that's a bit more complex).

    Now while I'm coding another app, I'm taking a C++ game development course on Udemy. Where I've made 2 games so far coding in C++ using UE4.

    I understand how programming works and how to apply the logic needed to do whatever it is I need to do. But my lack of experience makes me feel weird about if I could even call myself a "programmer" or "developer" since I've only been doing this for not even a year.

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

    ESP32 and PHPMyAdmin

    Posted: 20 Aug 2020 03:06 PM PDT

    (Sorry for my English, it isn't my first language) I'm a beginner programming for microcontrollers, I'm doing this project with an esp32 in the Arduino IDE, where I have to retrieve a value from a MySQL table and show that value in a display every x amount of seconds, I honestly have no idea how. I've seen a lot of tutorials on how to get value through a sensor and save it in a database using the esp32 but I cannot find any on how to do get a value already stored. Any idea?

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

    How to build a long number in C++

    Posted: 20 Aug 2020 02:28 PM PDT

    So i have an array of 8 bytes say (0x10,0x21,0x32,0x43,0x54,0x65, 0x76, 0x87) I need to go through the array and build a number that at the end would be 0x8776655443322110. How do i build a long number? Will I have to loop through the array and then make a string and convert the string to a number?

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

    Just read a thread about CS bootcamps vs a college degree

    Posted: 20 Aug 2020 01:22 PM PDT

    As someone with no programming experience that wants to learn and get into that field, is a boot camp a good way to go about it?

    Lots of questions: Do you get a certificate at the end that interviewers actually value? How long do they take? What kind of job will completing a boot camp get me and how much should I expect to make? Can this be done during COVID? And lastly, what is a respectable one?

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

    What is a good place to ask about libraries within a specific technology?

    Posted: 20 Aug 2020 03:59 AM PDT

    I have found out stack overflow is not a good place and I am really frustrated where else to find help. Also, I have checked r/programming and could only post links there.

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

    Is there a tool for end users to show python charts? (examples inside)

    Posted: 20 Aug 2020 08:40 AM PDT

    I'm looking for something like Metabase or Superset that allows power users to plot charts using SQL and share them via dashboards with normal users.

    Same concept but with Python instead of SQL, in a way that each "container" would be python code that could plot matplotlibs charts on a 'modular' way. Would be nice if I could run my own instance as well.

    Have you come across something like this?

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

    Domain Drive Design Beginner Question - Persistence/Domain Events Order

    Posted: 20 Aug 2020 08:34 AM PDT

    I have tried to get my head around DDD for some time now but I still struggle with some concepts, I would like to know:

    If you have an Order domain entity which is an aggregate root. When an order is created I need to;

    1. Save it to the database

    2. Send an email to a customer

    3. Send a message to an external system to provision the order

    Does the behaviour in steps 2 and 3 go inside the Order.Create() method on the entity which is where I build the entity from passed in values? I can't do this if the order is not yet persisted, which is something I would do in the application layer not the domain layer. I imagine I would raise internal domain events to perform action 2,3 after persistence with Handlers that have single responsibility. This to me is good because the application layer then does not have the logic of what happens.

    One solution I thought would be do have the Order.Create() method return the domain model. Which I then pass to my repository and then I call a method on my Order such as Order.Saved() which could then trigger the domain events mentioned above. But this to me seems wrong as the calling code in the application needs to remember to call Saved() in order for business logic to kick in.

    I have found some examples, but they either don't save to the database or don't perform actions after the save (such as steps 2,3).

    Nb. I am using dapper and repositories to store the domain entities and not using entity framework.

    I really appreciate any helpful advice on this.

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

    SQL Constraint referencing 2 tables

    Posted: 20 Aug 2020 12:06 PM PDT

    Hello,
    I have 2 MSSQL tables "Reservation" and "Room" the room has an Availability value ( 0 - not available, 1- available) and RoomID, the Reservation table has a foreign key referancing that RoomID. I'd like to make a constraint when making a reservation that won't allow a RoomID that has Availability = 0.
    How can i do that ?
    It has to be an SQL constraint.

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

    How to pass session data to an SPA after OAuth completes?

    Posted: 20 Aug 2020 10:39 AM PDT

    I noticed after an OAuth process I wrote, cookies were not being saved for the domain (in my case localhost:port).

    Looking into it, a fetch request needs to be made with a header for credentials: 'include'

    Since this is incompatible with the OAuth flow, at least when triggered by button click, i would like to ask how you guys pass session information to an SPA after OAuth completes?

    If it's not doable, I am considering ditching sessions and trying to pass a JWT instead. But I think I might encounter the same problem. Unless I encode the JWT as a query parameter and have the SPA check for the query parameter.

    Additional context. The server is on Express.js. The front end uses React.js with React Router v5.

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

    How come I still can't see the branch created in Github?

    Posted: 20 Aug 2020 08:39 AM PDT

    Hi,

    Basically, I need help in uploading something to a new branch in Github.

    Since my last post doesn't quite match my question now, so I am posting a separate question here.

    git log xxx and here's what I get:

    commit 524fbaa355c98d1db36efffaa16244782bfa2e24 (HEAD -> xxx) Author: unknown <@yahoo.com> Date: Thu Aug 20 23:35:46 2020 +0800 upload 2016 work 

    I then check the github. Still I don't see the branch appear.

    Please let me know what should I do in order for the branch and my upload appear in github.

    Thanks alot.

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

    How does one exactly contribute to open source ?

    Posted: 20 Aug 2020 02:20 AM PDT

    I know this is a stupid question, and I did google it but didn't get a clear understanding.

    Does it mean I can just download source code from GitHub, add new features or fix bugs and re-upload it to them ? How does this help me, are my changes noted ?

    What are some beginner projects I can contribute to ?

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

    raspberry pi 2 model b

    Posted: 20 Aug 2020 07:32 AM PDT

    what programming language is best for programming a raspberry pi? (in my case im trying to make it respond to audio input at a certain level by playing a sound)

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

    No comments:

    Post a Comment