• Breaking News

    Friday, April 17, 2020

    Learning C++ and OOP by making a crappy console game! learn programming

    Learning C++ and OOP by making a crappy console game! learn programming


    Learning C++ and OOP by making a crappy console game!

    Posted: 16 Apr 2020 03:27 PM PDT

    Link to the videos

    Howdy friends,

    I've dived into the world of C++ and am attempting to make a crappy console game. I thought it might be fun to share my learning process and record myself programming. It'll also help me flesh out my soft communication skills and make me better at explaining my ideas. It feels kind of weird to self-promote, but I thought that some of you may enjoy these videos, and/or be willing to share feedback :)

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

    I have learned Python 3, now what?

    Posted: 16 Apr 2020 05:44 AM PDT

    Hey guys,

    I am just about to finish my Python 3 course and I feel I have a pretty good grip on the language, in that I know my way around the language. Choosing Python 3 didn't come with huge difficulty as it is most people go-to beginners language. However, I have absolutely no idea what to do now! Python is the only language I know and I was wondering what you all think I should do now. To be honest I don't know where I wanna go in the vast world of programming, Web development, data science, development? Tell me what y'all think.

    Thank you!

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

    Alison Offering Free Ethical Hacking Course

    Posted: 16 Apr 2020 10:06 PM PDT

    Alison offering this course for free contingent on you, one day, paying it back. The teach about the basics of ethical hacking, from what it is to how it's used in the real world to support business systems. They teach about administrative controls, technical controls, and physical controls. This module will also cover the confidentiality, integrity, and availability of data. Good luck and stay safe.

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

    I have a really hard time programming

    Posted: 16 Apr 2020 04:44 PM PDT

    ive been trying to program for years now (4ish years I believe), ive tried C# in unity, I made an entire game but all I did was follow multiple tutorials , worked in it for 2 1/2 years and got bored of it, I couldn't write a single piece of code on my own, I have tried JS, LUA, Python, GDscript, the only languages I know are HTML and CSS, I don't work with them that often so im pretty rusty at 'em.

    ive tried everything, video tutorials, freecodecamp.org, I have been taking a 1 on 1 programming class for years now, right now im on JS, I can understand it just fine along with other languages but I have a very very hard time writing it and I don't know why, I feel like ive just wasted my time with all this, maybe I should go onto other things computer related? its making me depressed

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

    CompSci: should I choose C# Programming & .NET class over a Web Design class?

    Posted: 16 Apr 2020 04:55 PM PDT

    This is my last semester to complete by BSc in Computer Science. I have one elective class left and dilemma between Web Design .... versus ... C# Programming & .NET. I work as Network Engineer with lots of Automation in Python. Would've preferred a scripting class but these are the options I have for this summer.

    CSC 452 - Web Design: ---- Learn basic principles of web design and use HTML, XHTML, XML, CSS (Cascading Style Sheets), design and critic a variety of templates, etc. Topics include elements of good design, fonts, and typography, how to use color, graphics, images, multimedia formats, web layout basics, tackling web navigation, accessibility and usability, web design software, and learn HTML, XML, and CSS. Course Information: Prerequisites: CSC 275 or equivalent computer programming experience.

    CSC 470 - C# Programming & .NET: ---- This is an introduction to the fundamental concepts and principles of C# programming and .NET framework. Topics include programming with the Visual Studio .NET Environment, variables, methods, decision statements, loops, exceptions, classes, arrays, collections, inheritance, components, events, Windows forms, WPF, ADO.NET, ASP.NET and advanced topics.

    Which class would you choose? Which one is more worth my time? More valuable?

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

    When do I know I’m “employable”

    Posted: 16 Apr 2020 06:45 PM PDT

    So 1.5 years in teaching myself web development - JavaScript HTML CSS and working on my second project - a React Chat application. I'm making projects so I can start building my portfolio. Question is: when will I be looked at as "employable"? I'm feeling more comfortable working through problems and understanding some more of the CS side of things - simple express server setup, command line, git, node, npm etc. I'm in no way am expert though.

    Sometimes I feel there is so much to learn, no one can know it all. What's the point that I know enough to be deadly?

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

    Why should or shouldn't I move on to a new code program?

    Posted: 16 Apr 2020 11:30 PM PDT

    I am about to graduate with my Associates degree in Math and will soon go for my bachelors. I've decided with two years of school left its best if I start learning to program. I am starting with python.

    I recently completed a beginners course on YouTube from free code camp. I completed novice programs that come with the course. (Guessing game)(mad Libs) & a(multiple choice quiz)

    Now I am moving on to complete 3 programs outside of the lecture before I move to another python course. My ideas were (Dice game), (Hangman), (short game)

    Below is my python code for the dice game. I planned on creating an array and looping through then selecting a random number from the loop. It's proving a little difficult.

    My question: Is this code good enough for me to move on to my next program or should I stick with it and code the dice game the way I originally planned. Thank you for the feedback.

    -------------------------------------------------------------------

    Create dice using matrix 9 sides

    Create function: Give user option to roll dice

    #Return random dice number 1-9

    from random import seed

    from random import randint

    dice = [ [[1],[2],[3]],

    [[4],[5],[6]],

    [[7],[8],[9]]

    ]

    def diceroll():

    start = input("do you want to play dice Y/N ")

    if start == "Y" or start == "y":

    print(dice[0]) print(dice[1]) print(dice[2])

    x = input("Do you want to roll the dice: Y/N ")

    while x == "y" or x =="Y": if x != "y" or x !="Y":

    for i in range(1):

    roll=randint(1,9) print(roll)

    x = input("Do you want to roll the dice again: Y/N ")

    else: print("GoodBye: ")

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

    Wireless sensor networks TDMA python programming

    Posted: 16 Apr 2020 11:29 PM PDT

    Any idea on how I could simulate TDMA (time division multiple access) on a list of nodes that send messages to a single node at given time duration.

    I've created a wireless sensor network with multiples nodes grouped into clusters with respective CHs

    So message is sent from each node to their respective CHs

    So I need an idea to send message from node to CH and this message has to be sent in TDMA pattern. I just need an idea.

    CH - Cluster head

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

    Programming partner needed!

    Posted: 16 Apr 2020 06:37 AM PDT

    I want to complete an operating systems course, and was wondering if there was anyone else who'd maybe wanna team up?Here's the class I'm thinking of doing. The class is quite challenging and heavy on programming.

    UPDATE- There are a few people who are starting the course this week. We have made a discord group. PM me if you wanna join!

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

    Literally wasted months studying something I don't think I can ever improve at.

    Posted: 16 Apr 2020 03:54 PM PDT

    I'm specifically having trouble with leetcode. I've been learning Java for a little over a year now (using leetcode for a few weeks) and I literally just can't solve the easiest problems on leetcode or implement Algorithms like quicksort nor am I learning anything from the patterns. Idk why I just can't figure out why I can't solve this and it's demoralizing with my friends telling me they breeze leetcode like problems. I have no idea what I'm going to do now. I've been considering just switching majors and giving up something I've been passionate about my entire life. I understand this is a rant but idfk anymore about programming. I really enjoy it, I'm just not bright enough to do it.

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

    Nested Directory - Need to Give Each Child a Unique Key

    Posted: 17 Apr 2020 12:01 AM PDT

    Hello I have a nested directory and need to provide each item a unique key based on its level and child position on that level. I want to create a dictionary mapping of the unique key and respective object. I have the level correct but can't get the child level. Any help is appreciated.

    Example of what I need:

    ├── level0_child0 ├── level0_child1 | ├── level1_child0 | | ├── level2_child0 | | ├── level2_child1 | | ├── level2_child2 | ├── level1_child1 | | ├── level2_child3 | | ├── level2_child4 ├── level0_child2 | ├── level1_child2 | ├── level1_child3 | | ├── level2_child5 | | ├── level2_child6 ├── level0_child3 | ├── level1_child4 | ├── level1_child5 

    Example of what I'm getting:

    ├── level0_child0 ├── level0_child1 | ├── level1_child2 | | ├── level2_child3 | | ├── level2_child4 | | ├── level2_child5 | ├── level1_child6 | | ├── level2_child7 | | ├── level2_child8 ├── level0_child9 | ├── level1_child10 | ├── level1_child11 | | ├── level2_child12 | | ├── level2_child13 ├── level0_child14 | ├── level1_child15 | ├── level1_child16 

    Code

    def getDirectoryMapping(directory, mapping, levelIdx, childIdx): for outer of directory: mapping['level' + levelIdx + '_child' + childIdx] = outer childIdx += 1 if outer.children: mapping = getDirectoryMapping(outer.children, mapping, levelIdx + 1, childIdx) return mapping directory = [ { parent: 'value', children: [ { parent: 'value', children: [ { parent: 'value' }, { parent: 'value' } ] }, { parent: 'value', children: [ { parent: 'value' } ] }, ] }, { parent: 'value', children: [ { parent: 'value', children: [ { parent: 'value' }, { parent: 'value' } ] }, { parent: 'value' }, ] } ] getDirectoryMapping(directory, {}, 0, 0) 
    submitted by /u/swe-alphie
    [link] [comments]

    someone teach me how to build websites and apps

    Posted: 16 Apr 2020 11:59 PM PDT

    i need some people to help me build a website and an app possibly the only problem is that im young and im broke but ive got a real good idea for these things to potentially make some good money if done correctly i just need some people to help me out let me know if interested(edit: it would be a mostly large project ,i also dont know much about programming at all only a little bit of html and css )

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

    React- What's the best practice for hiding API keys and how?

    Posted: 16 Apr 2020 11:47 PM PDT

    Am currently working with an API key that obviously I don't want to share with others. The way am trying to keep it hidden is that I have a React Function

    https://stackoverflow.com/questions/51575679/react-native-how-to-return-a-string-from-a-function

    like the example given above

    export const getLink = () => { const url = 'http://www.foo.com' return url; } import { getLink } from "/.link"; 

    and I have the file in a gitignore line so it won't get uploaded to Github. I was wondering if this is the correct manor to hide the API and also was wondering why when I try to console.log the getLink I get the entire function returned not just the string. Basically it prints out the code itself along with the api key.

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

    Should I keep my two python focused internships if I know that I’ll be interviewing in c++ for most of my potential jobs?

    Posted: 16 Apr 2020 05:31 PM PDT

    I have an internship managing an API and one robotic related internship coding real time object detection (computer vision). The company I am interviewing at soon is a self driving car company, so c++. I feel like I should drop one to focus more on c++, like a side project, at the same time they're good experience. Should I ask if there are any opportunities at the robotics internships, or keep them? My thing is, I learned python a year ago. My goal is to work in self driving cars or embedded, which is almost always c++, and Python sucks so what is the point of keeping it? I'm a senior in college.

    1. I don't like python. The layout of C++ is so much better and I know python is popular but I can't stand it.
    submitted by /u/ella78890
    [link] [comments]

    Return duplicate numbers in an array if it contains multiple duplicates?

    Posted: 16 Apr 2020 11:22 PM PDT

    If you were asked to return duplicate numbers and to count how many there are, is this a good solution:

    public class MultipleDuplicate {
    public static void main(String[] args) {
    int[] intArr = new int[]{1,2,1,2,4,3,4,6,5,9};
    String num = missingNum(intArr);
    System.out.println(num);
    }

    private static String missingNum(int[] intArr) {
    Integer res = 0;
    Integer counter = 0;
    List<Integer> list = new ArrayList<>();
    Arrays.sort(intArr);
    for(int i =0 ;i <intArr.length; i++) {
    if((i+1) < intArr.length){
    if(intArr[i] == intArr[i+1]){
    res = intArr[i];
    list.add(res);
    counter++;
    }
    }
    }
    return counter.toString() +" " + Arrays.toString(list.toArray());
    }
    }

    Will return:

    3 [1, 2, 4]

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

    When learning languages, what method do you guys use?

    Posted: 16 Apr 2020 03:43 PM PDT

    Which method do you think works the best?

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

    Project Structure & Packages | RESTful APIs Development using PHP & MySQL | Part 3

    Posted: 16 Apr 2020 11:14 PM PDT

    The tutorial video is about creating Rest APIs using PHP SLIM Framework, MySQL. You will learn - Building RESTful API using PHP MySQL Slim Framework - Testing APIs & performance test - Integrating APIs with Android/Web

    https://youtu.be/5qr9X1G57Qs

    Installing Composer & Slim Framework - slim3 skeleton GitHub https://www.youtube.com/watch?v=uS9iaAIvDLE
    GitHub project repository https://github.com/SilverFoxA/slim3Api-tutorial

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

    Best practice of storing book’s content in an app?

    Posted: 16 Apr 2020 10:55 PM PDT

    I am in the middle of creating of a English dictionary app in Java. The app works in a technical level, I've created nested buttons to store the title, the book's chapter's title, and the content in these chapters. But my app's structure seems convoluted and disorganized.

    What is the best practice of storing a book with certain chapters and its content design wise. Is this nested buttons with long even handlers the best way? Or there is another way?

    Thanks!

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

    First Implementation

    Posted: 16 Apr 2020 10:38 PM PDT

    I'm taking (and struggling with) a Data Structures course at the moment. I usually end up missing project deadlines and learning the material late, just enough to pass tests, maybe not enough to pass the class... No big deal, I'll try again until I get it.

    But this week is different! I just implemented my first sorting algorithm on a Linked List! I have finally earned my rightful place of power over dynamically sized ADTs! And I did it on time!

    Anyone else have similar memories of their first implementation of some powerful tool?

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

    Does any university offer the entire Computer Science masters program online for free, as long as you choose to not get the diploma and just want the knowledge?

    Posted: 16 Apr 2020 10:34 PM PDT

    I'm looking for a place I can start Computer Science 100 or 101 whatever it starts at and progress on a structured path that is all linked together instead of jumping from course to course. Does anyone offer this anywhere without paying if I choose to not get a diploma or any recognition or support? I realize I'm a little bit selfish but thought I'd ask. Thanks in advance for any help.

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

    frequency of set of dice

    Posted: 16 Apr 2020 10:24 PM PDT

    hi, I have found a way to check the frequency if we use 2 dice, but i do not understand rest of the homework to be honest. Maybe someone can teach me or give me some hints. I find it really difficult

    //Desc: Experimentally find out the probabilities of various outcomes of throwing a set of dice.

    //Input: The user supplies an integer which represents the number of dice the user wants to use.

    //Output:1. A table showing the number of occurrences of various outcomes of throwing a set of n

    // dice where n is the input integer

    // 2. The least likely outcome and the most likely outcome

    public static void main(String[] args)

    {

    Scanner f = new Scanner(System.in);

    System.out.print("How many dice? ");

    int n=f.nextInt();

    int size=________________

    int[] frequency = new int[size];

    for(int i = 0; i < 10000; ++i)

    {

    int outcome=throwDice(n);

    frequency[outcome]++;

    }

    printReport(frequency, n);

    }

    //Return: The sum of throwing n dice.

    public static int throwDice(int n)

    {

    }

    //Pre: frequency contains the number of occurrences of throwing a set of n dice. That is,

    // frequency[k] is the number of occurrences of the outcome k when throwing a set of n

    // dice.

    //Output:1. A table showing the number of occurrences of various outcomes of throwing a set of n

    // dice

    // 2. The least likely outcome and the most likely outcome

    public static void printReport(int[] frequency, int n)

    {

    }

    }

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

    If-Else declaration or statement expected

    Posted: 16 Apr 2020 10:19 PM PDT

    I'm working on making a rock-paper-scissors game for a discord bot. I'm using javascript, typescript, and MS, but this is a SyntaxError and I'm pretty sure its javascript related. I'm not entirely finished with it yet, but it starts to form a complete statement. on my "else" statements, I get the output:

    C:\Program Files\nodejs\node.exe --inspect-brk=27768 index.js

    Debugger listening on [redacted]

    For help, see: https://nodejs.org/en/docs/inspector

    Debugger attached.

    c:\Users\garre\Documents\funny bot\index.js:69

    }else{

    ^^^^

    SyntaxError: Unexpected token else

    at new Script (vm.js:85:7)

    at createScript (vm.js:266:10)

    at Object.runInThisContext (vm.js:314:10)

    at Module._compile (internal/modules/cjs/loader.js:698:28)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)

    at Module.load (internal/modules/cjs/loader.js:630:32)

    at tryModuleLoad (internal/modules/cjs/loader.js:570:12)

    at Function.Module._load (internal/modules/cjs/loader.js:562:3)

    at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)

    at internal/main/run_main_module.js:21:11

    Waiting for the debugger to disconnect...

    SyntaxError: Unexpected token else

    at new Script (vm.js:85:7)

    at createScript (vm.js:266:10)

    at Object.runInThisContext (vm.js:314:10)

    at Module._compile (internal/modules/cjs/loader.js:698:28)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)

    at Module.load (internal/modules/cjs/loader.js:630:32)

    at tryModuleLoad (internal/modules/cjs/loader.js:570:12)

    at Function.Module._load (internal/modules/cjs/loader.js:562:3)

    at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)

    at internal/main/run_main_module.js:21:11

    Here is the full file: https://pastiebin.com/5e9939c2ceb53

    Here is the concerned segment: https://pastiebin.com/5e993a1d99da2

    Pretty unfamiliar so I won't be surprised if its something stupid

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

    Understanding this.setState in React

    Posted: 16 Apr 2020 10:05 PM PDT

    In my code, when the function Uploading is called, a loading bar appears. The way I do this is shown below

     uploading() { this.setState({isUploading : true}); this.setState({showLoading: true}); 

    I tried combining the this.setState's into just one this.setState, for brevity. But when doing so, my loading bar does not show up anymore.

    this.setState({isUploading: true, showLoading: true}); 

    Is this due to a syntax error or logic error?

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

    Is it a good idea to go from Java to C?

    Posted: 16 Apr 2020 09:45 PM PDT

    So I grew bored of Java and I thought to myself that if C is what all other languages are built on. Why not learn it? I have no problem coding in it. My friend just tells me that I'm never going to get anything done if I keep switching languages. He's not a coder, but I'll pass this question over to the community to see what you guys have to say.

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

    No comments:

    Post a Comment