• Breaking News

    Monday, June 11, 2018

    Is there a beginners guide to using Github somewhere? learn programming

    Is there a beginners guide to using Github somewhere? learn programming


    Is there a beginners guide to using Github somewhere?

    Posted: 10 Jun 2018 06:41 PM PDT

    I just finished taking APCSA, and I want to utilize Github to create and share projects. I barely know what it is.

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

    Are there any (active) Discord servers for beginner programmers?

    Posted: 10 Jun 2018 05:18 AM PDT

    Hey everyone :) I'm a computer scientist in the making and I was wondering if there are any chill, fun and active Discord servers out there for people who are learning to code and where you can ask others for help. I wouldn't mind if it's also about other fun topics. Currently, I'm trying to program a RESTful web app with node.js and Express but I'm struggling a bit with it. I will probably get back into Java programming later on as well. So yeah, looking forward to your replies!

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

    Yin Yang with a twist - 4 circles and 20 lines of pure JavaScript

    Posted: 10 Jun 2018 09:11 PM PDT

    Question about Methods! C#

    Posted: 10 Jun 2018 07:41 PM PDT

    Hey guys! I Have a question. So I have been checking out some codes from big programs, and I see a lot of methods and I think, Where do you find all those methods?? is there like a website that lists all the methods with their descriptions and what they do?

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

    So school is soon over and I want to create a game over the summer

    Posted: 10 Jun 2018 01:35 PM PDT

    I have set a challenge to myself to create a simple game for android over the summer(talking something along the lines of flappy bird), but I do need some help and some guides. What programming languages/programs will I have to learn? I thought about either Unity or Unreal. I know absolutely nothing about either of them. Thank you!

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

    Can I pull certain information from an email message and put it into firebase database?

    Posted: 10 Jun 2018 11:57 PM PDT

    So I am a handyman, I work for property managers, I own a mobile app that uses firebase database. I am trying to automate the process of adding new jobs to my app. here is an example of the work order emails I get This is sent automatically by property managers invoicing software. I am wondering if I can pull certain information from these emails and either save them in firebase database. If there is a specific bit of code that does this, I'd appreciate it if you could point me in that direction.

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

    Name of tool/extention that gives you the definition of a highlighted function or Code

    Posted: 10 Jun 2018 10:58 PM PDT

    Im looking for the name of a plugin I used a while back. The program allows you to lookup functions and other language specific things. There is an option to also import libraries so that it works with the particular language you may be working with at the time. I cant remember if it was an Atom or Sublime package. Any help in finding the name would awesome.

    Thanks

    *Edit - Found it. It's called Dash for anyone else who's interested.

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

    I made a website for planning and keeping to your programming session! Let me know what you think about it

    Posted: 10 Jun 2018 12:46 AM PDT

    JavaScript learning paths?

    Posted: 10 Jun 2018 04:16 PM PDT

    Hello everyone,

    I recently started to learn JavaScript and with no past coding experience besides HTML and CSS (Markup Languages) I'm a complete noob programmer. I was just wondering if there are any hand holding routes to take, say a github repo that will take me from absolute beginner to being quite understanding of the language. If there is, thank you, from a very frustrated learner who has tried a few resources but they are too difficult at the moment.

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

    C++ help (classes)

    Posted: 10 Jun 2018 05:22 PM PDT

    so i made a class and i cant get it to work in my main, im using atom ide so maybe thats why?

    i declare my class like this:

    class Homework { void aMethod() {} void anotherMethod() {} }; 

    and in another code file:

    #include "Homework.h" int main() { Homework h; return 0; } 

    but it doesnt work? any ideas? here's the error: D:\jakejdb1999\Documents\cpp\homework 3\Main.cpp:10:2: error: 'Homework' was not declared in this scope Homework h;

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

    [JavaScript] doubt in modules, what does module returns ?

    Posted: 11 Jun 2018 12:43 AM PDT

    [JavaScript] doubt in modules, what does module returns?

    object or function or anything it wants, how does it exports function if it exports function (i know it exports objects) it looks like object but apparently it is a function , i don't know how.

    my Code :

     // Import events module var events = require("events"); console.log(typeof events); //! whats inside of this console.log(events); //! whats inside of this console.log("\n\n\n"); var fs = require("fs"); console.log(typeof fs); //! whats inside of this console.log(fs); //! whats inside of this 
    submitted by /u/prashantkr314
    [link] [comments]

    Can an average joe like me learn programming and be good at it? What do programmers need?

    Posted: 10 Jun 2018 06:30 AM PDT

    To start things off, I'll introduce myself

    I am a G11 student who will soon reach his G12 year, and it is time I start thinking on what career path should I pursue in university. In the end I decided I should pursue a path of computer programming, since I am already taking robotics and computer science and I did a bit of arduino on the side (along with my love for games), however I've been constantly mocked by my peers as I am not as smart as them in my programming related courses. So, tell me wonderful reddit people, what can a guy like me expect to do in university if I do continue my path to computer programming

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

    Javascript discord bot issue but more of a JS issue. I have a command that modifies an array but changing the array changes it for all servers. Need a simple way to make it sort of object oriented.

    Posted: 10 Jun 2018 11:38 PM PDT

    Shoddy title aside, here's my issue at length.

    I basically have a discord bot that deals and shuffles cards from a standard 52 deck which is stored in an array. I have a feature in which you pull from the deck, you can keep pulling until you run out of cards, where you'll need to shuffle manually.

    The issue resides in that this bot is being used in multiple servers, and so the way I have it set up is that if I pull cards from this deck while on one server and run out, trying to pull cards on another server will prompt that I'm out of cards, and I don't want that, hence wanting to try and make it object oriented with each server being the object.

    Now I was told a way to try and solve this using maps, where the server ID (which can be attained using discordjs code) is the key and the array is the value, however I hadn't heard of maps until yesterday and so I'm not sure if I'm doing it right. I managed to set it up so that it uses maps but it seems that it modifies the array globally anyways.

    Here's the important parts of my code:

    var cards = ["♠1", "♠2", "♠3", "♠4", "♠5", "♠6", "♠7", "♠8", "♠9", "♠10", "♠K", "♠Q", "♠J", "♣1", "♣2", "♣3", "♣4", "♣5", "♣6", "♣7", "♣8", "♣9", "♣10", "♣K", "♣Q", "♣J", "♥1", "♥2", "♥3", "♥4", "♥5", "♥6", "♥7", "♥8", "♥9", "♥10", "♥K", "♥Q", "♥J", "♦1", "♦2", "♦3", "♦4", "♦5", "♦6", "♦7", "♦8", "♦9", "♦10", "♦K", "♦Q", "♦J"]; var cardMap = new Map(); var localCards = new Array; var globalTempCards = cards.slice(); bot.on("message", msg=>{ //activates when a message is sent on discord. if(message.startsWith(prefix + "sdeal")){ //the command itself. var temp = ""; cardMap.set(msg.guild.id, globalTempCards); //msg.guild.id is simply a special string of numbers specific to the server. localCards = cardMap.get(msg.guild.id); var temp2 = message.split(" "); //splits the message to see the number of cards to be dealt. Not that important to my issue. if(temp2.length == 1){ msg.reply("Please specify a number of cards to be dealt."); return; } var numDealt = parseInt(temp2[1]); for(i = 0; i < numDealt; i++){ var randIndex = rand(0,localCards.length); //random number between 0 and the length of the array. temp += "\n" + localCards[randIndex]; //temp is simply the string holder for all the cards being dealt. localCards.splice(randIndex, 1); //crux of issue. deletes items from the array. seems to be deleting from the global array. } msg.reply(temp); } 

    I hope the information provided is pertinent. I know this isn't a discordbot subreddit, but I felt the issue I'm having is more of a javascript issue than it is a discordjs issue. If there's any question regarding what any of the discordjs specific stuff does, let me know.

    And yes, I did try finding an answer, which led me to using maps, but I've tried and I can't seem to wrap my head around it. Thanks in advance.

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

    Collection of Jupyter Notebooks for learning/teaching Python 3

    Posted: 10 Jun 2018 11:26 PM PDT

    Hello!

    I have created a bunch of Jupyter Notebooks for teaching/learning Python 3: https://github.com/jerry-git/learn-python3. Most of the topics include also exercises. I think that the beginner section starts to be quite complete and have also drafted a plan for the intermediate section.

    After/during creating the intermediate section, I'll focus also on domain specific materials (see use cases section). I've added a couple of examples for domain specific topics and I'm open for suggestions. So, if there's some topic you'd like to see a notebook about, let me know!

    Some notes about the materials in general:

    • The idea is to be rich with examples rather than rich with theory/explanations

    • The content may be a bit heavy for people who don't have any prior programming experience. If you know what's a variable and have heard about functions, you should be good to go :)

    I'd appreciate any kind of feedback!

    Ps. I posted a similar post to /r/learnpython and it started to get some attention until mods removed it because apparently they don't allow tutorial posts there.

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

    What are libraries?

    Posted: 10 Jun 2018 11:49 AM PDT

    I recently downloaded jsoup and don't quite understand everything. I tried to run it and nothing happened, they're JAR files so why didn't they open with my IDE(IntelliJ). I then found a tuitorial to add them to IntelliJ and it ended up working. So my question is what are libraries, in this case, for Java. Also, how is jsoup free to download and use? I'm guessing the people who made jsoup free put a lot of work and time into so why did they make it free to download? Is jsoup free to use for commercial purposes as well?

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

    I need some crash course resources to learn how to prove algorithm's running time complexities, where should I look?

    Posted: 10 Jun 2018 09:30 PM PDT

    Prove as in by induction

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

    Running into an issue I do not understand in VS Code: 'Timeout waiting for debugger connection"

    Posted: 10 Jun 2018 08:50 PM PDT

    Hello, I am very new when it comes to programming and I have decided to give Visual Studio Code a try as a text editor. I accidentally clicked on "open configurations" and I was brought into a new window called 'launch.json'. Since then, I cannot run my code as I could before and I get an error that states "Timeout waiting for debugger connection." I've been looking online to see what I can do but I don't think people are having this specific issue.

    This is the the message that is displayed in the terminal:

    PS C:\Users\jdelc\Desktop\Crash Course> cd 'c:\Users\jdelc\Desktop\Crash Course'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; ${env:PYTHONPATH}='c:\Users\jdelc.vscode\extensions\ms-python.python-2018.5.0\pythonFiles\experimental\ptvsd'; & 'python' '-m' 'ptvsd' '--nodebug' '--host' 'localhost' '--port' '56353' 'c:\Users\jdelc\Desktop\Crash Course\Notes\uiwhilenotes.py' Traceback (most recent call last): File "C:\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Python\Python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "c:\Users\jdelc.vscode\extensions\ms-python.python-2018.5.0\pythonFiles\experimental\ptvsd\ptvsd\main.py", line 202, in <module> main(args.address, args.name, args.kind, extra, nodebug=args.nodebug) File "c:\Users\jdelc.vscode\extensions\ms-python.python-2018.5.0\pythonFiles\experimental\ptvsd\ptvsd\main.py", line 195, in main run_main(addr, name, kind, extra) File "c:\Users\jdelc.vscode\extensions\ms-python.python-2018.5.0\pythonFiles\experimental\ptvsd\ptvsd_main.py", line 24, in run_main no_debug_runner(address, name, kind == 'module', extra, *kwargs) File "c:\Users\jdelc.vscode\extensions\ms-python.python-2018.5.0\pythonFiles\experimental\ptvsd\ptvsd\runner.py", line 31, in run if not start_message_processor(address): File "c:\Users\jdelc.vscode\extensions\ms-python.python-2018.5.0\pythonFiles\experimental\ptvsd\ptvsd\runner.py", line 54, in start_message_processor start_client(daemon, host, port_num) File "c:\Users\jdelc.vscode\extensions\ms-python.python-2018.5.0\pythonFiles\experimental\ptvsd\ptvsd\pydevd_hooks.py", line 68, in start_client pydevd, start_session = daemon.start_client((host, port)) AttributeError: 'Daemon' object has no attribute 'start_client' PS C:\Users\jdelc\Desktop\Crash Course>

    I don't know what it means, and I don't know what to do. Thank you for your help!

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

    [Java] How to read a java fatal error log

    Posted: 10 Jun 2018 08:48 PM PDT

    Point me in the right direction if this is the wrong place for this question.

    My program has come across a fatal error (Exception_Access_Violation) causing java to crash and producing a lengthy error log. Before resulting to having someone just telling me what the log is pointing to - I'd like to learn to read and understand it myself.

    The log has several sections of info, Heap, Heap history, compilation events, dynamic libraries, etc. I'm looking for any tips or guides for breaking down all this information so I can try and find the root of the problem.

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

    A relatively simple recursive algorithm in O(n^2) time that gives the Nth permutation of an array of numbers?

    Posted: 10 Jun 2018 08:47 PM PDT

    https://imgur.com/SDe69Hw

    I can't think of a way to handle this problem with a relatively short recursive algorithm, if that's even possible. I can somewhat write a function that gives all the permutations of an array but as far as modifying it to print out the kth permutation, I'm lost.

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

    [swift] table view cell's label is null when dequeuing

    Posted: 10 Jun 2018 08:11 PM PDT

    In TableViewController.swift I am trying to fill in the label with a test value. When I run it that label in nil and I can't do it. I have no idea what is wrong and most of my googleing turned up very little. Any help would be appreciated.

    Source: https://github.com/gwoplock/unnamed

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

    Null Terminated String ?

    Posted: 10 Jun 2018 08:08 PM PDT

    How do I read in a sequence of strings from the keyboard and terminate by the null string. So far I have this;

    cin >> string; while(string != '\0' ){ cin >> string; } 

    The error I get is

    error: invalid operands to binary expression

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

    OLA Interview question- what is the logic of this program

    Posted: 10 Jun 2018 08:00 PM PDT

    There are two kinds of bots A and B in a 1-D array. 'A' bot can only move left while 'B' can only move right. There are also empty spaces in between represented by '#'. But it's also given that the bots cannot cross over each other. Given the initial state and another state, we should tell if the transformation is possible.

    Sample Input-

    2

    B#A# ##BA

    B#A# #A#B

    Sample output-

    Yes No

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

    Need help understanding what all is happening in this code (javascript)!

    Posted: 10 Jun 2018 04:11 PM PDT

    Hey! So I've been coding for a little over four months now. I'm digging deeper into concepts and practical javascript, but I am having a hard time understanding what this code is doing. Basically, it's part of an Instagram style site built with html, css, js, jquery and underscore.

    class CommentsController { constructor() { this.$addCommentForm = $('.add-comment') } init() { this.addCommentFormListener() } addCommentFormListener() { var _this = this $('form').each((i, el) => { $(el).submit((event)=> { event.preventDefault() let imageId = $(el).attr('data-id') let input = $(`#comment-description-${imageId}`) let commentContent = input.val() var comment = new Comment(commentContent, imageId) _this.render(comment) input.val('') }) }) } render(comment) { $(`#comments-${comment.image.id}`).append(comment.commentEl()) } } 
    submitted by /u/AaronDenham
    [link] [comments]

    Small differences from what I was taught in class and what I’m reading from Bjarne Stroustrup‘s book c++

    Posted: 10 Jun 2018 11:09 AM PDT

    So I know this might sound petty but it's just a few minor things (so far) that iv notices are way different from what I was taught in school and what I'm reading in the creators book.

    1.) I see sometimes Bjarne will declare variables in places besides the top of main. I've seen a couple examples now where they are declared mid body right before being used. In class we were told over and over that everything must be declared at the top, which one is preferred in the real world? As I can see reasons for both...

    Second and the big one is using doubles.

    If we learned anything it was hammered into us everyday to never ever use doubles or we would fail the class. The reason being is that the professor says we have absolutely no reason to have such precision after the decimal(makes sense) instead we were to use floats.

    I have yet to see Bjarne use a single float in any of his examples even a number with 1 place after the decimal like 2.5 he declares as a double... is this a issue?

    Sorry for the minor petty questions but I'm just so curious.

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

    No comments:

    Post a Comment