• Breaking News

    Friday, November 23, 2018

    Anyone else also struggles with deep rabbit holes in learning how to program? learn programming

    Anyone else also struggles with deep rabbit holes in learning how to program? learn programming


    Anyone else also struggles with deep rabbit holes in learning how to program?

    Posted: 22 Nov 2018 11:40 AM PST

    Let me give you an example. Someone proposed to me to implement MVP design pattern in my app's code. I didn't know what MVP was, so I started to read about and discovered you need to have inversion of control.

    To understand inversion of control I had to understand dependency injection.

    Inside the DI course I bought there was retrofit code and recyclerview code which I didn't understand.

    All the while reading about recyclerview, in order to understand retrofit I had to read up on what APIs are and what they do.

    Now this is one example. Sometimes the rabbit hole gets so deep you forget what the heck you were trying to understand in the first place.

    Do you also struggle with this problem?

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

    Datastructures for someone who works full time

    Posted: 22 Nov 2018 11:48 PM PST

    Hey people I currently work full time and Im a full time student whose currently struggling in a data structures class. We cover Arrays, linked lists, stacks, queues, bags, sequences using Java as the language. Basically im looking for tips as a full time worker to try and absorb as much information as I can on data structures with the little time I do have. Any helpful advice would be great! On mobile be friendly.

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

    Prepare for OOP and SQL interviews in a week's time

    Posted: 22 Nov 2018 08:08 PM PST

    I'll be interviewing for associate roles in a couple of firms a week from now. While both roles are primarily data science roles, I'll have four rounds of interviews, one of the rounds is expected to be on OOP and SQL concepts. I was wondering if going through Simon Allardice's introductory course on OOP will be enough. I would also appreciate it if someone could recommend an equivalent course in SQL. Any other tips for OOP interview preparation will also be highly appreciated.

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

    Binary Search Tree in C programming

    Posted: 23 Nov 2018 12:39 AM PST

    I'm trying to implement a binary search tree in C with each node holding a bunch of things about a certain sports team such as team name, wins, losses, etc. I know how to implement a BST when given data values but I have no idea how to implement it with this many things. How do I insert a new node? This is something I put together but it obviously doesn't work and I am completely lost.

    typedef struct node { char* name; // name of the team char* nickname; // nickname of the team int league; // name of the league int conf; // name of the conference int nwins; // number of wins int nlosses; // number of losses int ndraws; // number of draws int data; struct node* left; struct node* right; } node* addTeam(int data, char* name, char* nickname, int league, int conf, int nwins, int ndraws, int nlosses) { node *new_node = (node*)malloc(sizeof(node)); if(new_node == NULL) { fprintf (stderr, "Create a Node\n"); exit(1); } new_node->name = name; new_node->nickname = nickname; new_node->league = league; new_node->conf = conf; new_node->nwins = nwins; new_node->ndraws = ndraws; new_node->nlosses = nlosses; new_node->data = data; new_node->left = NULL; new_node->right = NULL; return new_node; } typedef int (*comparer)(int, int); // Don't fully understand how this works but know it's function node* insert_node(node *root, comparer compare, int data) { if(root == NULL) { root = create_node(data); } else { int is_left = 0; int r = 0; node* cursor = root; node* prev = NULL; while(cursor != NULL) { r = compare(data,cursor->data); prev = cursor; if(r < 0) { is_left = 1; cursor = cursor->left; } else if(r > 0) { is_left = 0; cursor = cursor->right; } } if(is_left) prev->left = create_node(data); else prev->right = create_node(data); } return root; } 

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

    Why DRUPAL Is Best CMS For Website Development| Advantages OF DRUPAL

    Posted: 23 Nov 2018 12:31 AM PST

    Let's find out why #Drupal is so #famous among #people and is considered the #bestCMS for #websitedevelopment. Check out the #advantagesofDrupal!

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

    How do big social media sites and apps prevent notification spamming when a user is constantly liking-disliking a post? What's the algorithm?

    Posted: 23 Nov 2018 12:28 AM PST

    Do they store the past likes on a database and check before creating a new notification or do they set a cooldown timer after each notification? I'm developing an app similar to Facebook but I don't know how I should handle this issue. Right now, each time a user likes the post, a new push notification is sent. If he keeps on liking/disliking rapidly, he can easily spam the post creator.

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

    Fantom Programming Language : Why no one use it ?

    Posted: 23 Nov 2018 12:23 AM PST

    Hello,

    Could you tell me why the Fantom programming language (https://fantom.org) is not used by more people ?

    Do you have any idea ?

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

    WPF Xaml using RadTreeListView with GroupedBy

    Posted: 23 Nov 2018 12:11 AM PST

    At this moment I'm trying to use two collections in a RadTreeListView. I have provided some code under, which I've used RadTreeView and managed to create something similar with what I want to achieve with RadTreeListView.

    Since the items in the collection that I want to view contains multiple columns, I thought it would be more clever to use RadTreeListView instead.

    You can see from the code under I've hard-coded two first items CategoryList1 and CategoryList2 it into the TreeView. This was done in order to make each item contain different items collection. What I've managed so far is to just populate one collection into the RadTreeListView, without any structure. I want to group this collection into a root level called CategoryList1. After expanding the CategoryList1 item in the RadTreeListView, I want to show all Items, but grouped by stores. The item has name and store as property. How can I achieve this in a RadTreeListView? My items is in a non-hierarchical, which means that all the items are just listed in the collection with each items properties.

    In short; I want to use a RadTreeListView and display the data like this:

    (Hard-coded item with header which hold the collection1 like shown in the code provided under) CategoryList1 -> expanding CategoryList1 -> returns GroupedBy stores from the Item Collection1 -> Expanding a store returns items the store contain.

    Thanks, sorry for such a bad explanation. Please tell me if something is still fuzzy about my explanation.

     <telerik:RadTreeView > <telerik:RadTreeViewItem Header="CategoryList1" ItemsSource="{Binding CategoryCollection1}" > <telerik:RadTreeViewItem.ItemTemplate> <DataTemplate> <TextBlock Text="{Items}" /> </DataTemplate> </telerik:RadTreeViewItem.ItemTemplate> </telerik:RadTreeViewItem> <telerik:RadTreeViewItem Header="CategoryList2" ItemsSource="{Binding CategoryCollection2}" > <telerik:RadTreeViewItem.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Item}" /> </DataTemplate> </telerik:RadTreeViewItem.ItemTemplate> </telerik:RadTreeViewItem> </telerik:RadTreeView> 
    submitted by /u/Lekowski
    [link] [comments]

    Java Noob Can't Resolve This Issue

    Posted: 23 Nov 2018 12:10 AM PST

    I'm new, this is literally day 2 of me in Java. I found a pretty neat website called codingbat.com that had some simple exercises. I am going through the string exercise now where the goal is:

    Given a string, return true if it ends in "ly".

    My code:

    public boolean endsLy(String str) {

    if (str.length() >= 2) {

    String lyend = str.substring(str.length() - 2);

    return (lyend == "ly");

    } else {

    return false;

    }

    }

    I have the if command to ensure that it has enough room to calculate lyend. However, it only captures when str = "ly" and not anything else ("ely","rely", etc.)

    Can anyone help guide me to the solution? I can't seem to figure this one out.

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

    I have a quick question regarding MIDI files for use with ML to create music.

    Posted: 22 Nov 2018 08:07 PM PST

    So, the past week or so I've been doing tons and tons of reading and watching videos about machine learning because obviously, it's fascinating. I came across this video by carykh where he trains an RNN to create baroque music given MIDI file data.

    The process as I understand it is:

    *Gather MIDI File *Convert MIDI File to CVS file using Midi > CVS *Convert CVS to TXT using Notepad.

    And then this is the part that is giving me trouble. In the video, he states he took the plaintext of the MIDI file and then runs it through a text handler he wrote in JavaScript to get rid of unnecessary characters in the file, in order to shorten it and reduce the file size, ergo optimize it.

    I've done quite a decent amount of research on the structure of MIDI Files, so I have a fair amount of understanding of what needs to be removed from the file, just not how to do so.

    Does anybody know how I might go about converting the text characters for optimization like in the video? I don't necessarily want to have to write my own, because I'm lazy, but if I have to I suppose I will if someone would kindly provide a place to start with that. Thank you for your time.

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

    Update to the struggle of Data Structures & Algorithms

    Posted: 22 Nov 2018 07:55 PM PST

    2 months has flew through, finals are coming up.. I've finally come to understand MOST of the stuff that we've learned / I was struggling with. Update on the situation.

    I was struggling HARD in my DS&A class, didn't understand that much of the topics that were being discussed at the start of the class, actually, I never really understood any of that new topics that were brought to me. I was struggling with the proofs, problems, the algorithms itself, etc.

    Now... since finals are coming up, I've been trying to re-learn and prepare myself with the topics all over again. I've relooked at every single homework and lecture notes / videos, and somehow, this time around everything immediately clicked. I was just able to understand majority of the concepts and actually understand the algorithm (not fully such as the thinking process and mathematical aspect during proofs on why it works) but I'm able to visualize it / draw it out / map it out when given such and such to call the algorithm on. The very first time I've came across those topics, I was more of trying to understand it but I just couldn't for the love of god. Now, I can really see where I struggle in and what I'm lacking, also thanks for everyone who commented/gave me suggestions in my older post. My current struggles are now dealing with code runtime with programs that has O(lg) running times and the actual programming itself dealing with certain topics.

    Here is the original post:

    https://www.reddit.com/r/learnprogramming/comments/9ekkzh/struggling_in_data_structure_algorithms/

    TLDR; Struggled massively with every single topics being introduced/covered in DS&A class, re-learned everything on my own the second time around, things start to click and fall in place one by one.

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

    How much personal information should you have on a web design portfolio?

    Posted: 22 Nov 2018 11:27 PM PST

    I know I should be asking this in /r/webdesign but its AutoModerator sucks and deletes everything you post. So basically, my main question is the title, but I'm also asking because I want to ask for feedback and ask some advice on stuff, but I also don't know how dangerous it is to link someone to a portfolio website which has stuff that shouldn't be public.

    Is it normal to have your address, working hours and areas you work on your website? Does anybody put their CV or Resume on their website in HTML5+CSS3, or do they just leave is as an external document to attach in job applications? Should there be a picture of myself somewhere in there? Because I don't think I have any that are intended for business purposes. Is it necessary to have a section talking about myself?

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

    Books on machine learning for an experienced programmer?

    Posted: 22 Nov 2018 10:10 AM PST

    I'm an experienced programmer but know next to nothing about machine learning. Does anyone have a recommended book that assumes you know how to program, but are just getting started with ML basics?

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

    Concurrent programming books (C)

    Posted: 22 Nov 2018 07:24 PM PST

    I am currently reading Unix practical programming: a guide to concurrency, communication and multithreading, but since it is a 1997 book, some (if not all) of the examples don't work anymore, would any of you recommend other books or courses. Thanks in advance.

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

    If I'm using both VPN and Virtual Machine, should I use the VPN inside or outside the VM?

    Posted: 22 Nov 2018 01:15 PM PST

    I'm running a Linux VM inside my Windows PC for easier development. I tend to start my VPN whenever my computer starts. What I'm not sure about is how the VPN works if I use it outside of my VM, since that's what I'm currently doing. Will only the data outside the VM get encrypted or the VPN encrypts the data both inside and outside the VM?

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

    Understanding the logic behind programming.

    Posted: 22 Nov 2018 09:46 AM PST

    Hey there,

    I am a new programmer and I am at the ES6 Javascript FreeCodeCamp course sector. Now I am learning syntax, and I am learning and understanding arrays, objects, variables all that stuff. How to manipulate them. But I wanna get to know like the logic behind programming to make it easier, or clearer in my mind and not just learn the concepts. So I came to the conclusion I should probaly look into computer science. Is this the right idea and would a course on udemy be a good way to start my journey ?

    https://www.udemy.com/computer-science-101-master-the-theory-behind-programming

    Anyway I am just taking all suggestions here on understanding the logic behind programming so I can wrap my head around it better and be a better programmer. I am still a rookie so don't give me to much advanced stuff.

    Thanks !

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

    Are there any challenge sites where you're given a design spec and have to recreate it in HTML/CSS?

    Posted: 22 Nov 2018 06:15 AM PST

    I recently had to do some front end dev and the HTML/CSS I had to work with was horrendus. So I found the design docs and redid some HTML and most of the CSS from scratch and I found it very fun. These design docs are made in something like Sketch and have all the colors, sizes, margins, padding etc.

    I found it very easy and straightforward to translate a design to an actual site feature but at work I'm always hearing people say it's hard or they're always talking about "hacks" for what seems to me like very basic CSS.

    So what I'm looking for is a site full of these design specs that I can follow and see whether CSS really is as straightforward as I think it is from the small amount of dev I did. And if it is then I'll make myself the resident CSS expert and stop terrible CSS from going public.

    I found some sites but they're more about fancy CSS animations and stuff which really isn't as important.

    Edit: like this https://i.imgur.com/JrenLzJ.jpg but perhaps more complex or for a specific site feature like a fancy nav bar or modal.

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

    Job requires finding errors in cvs. files; what to expect when coding and bidding price? [cvs.][python]

    Posted: 22 Nov 2018 06:21 PM PST

    edit: csv. not cvs. X

    help! I'm hurting for income and found an ad seeking someone to compare pairs of csv. files. I'm not new to programming but haven't implemented much in my days. Sounds simple right? They send me pairs of files, one to proof read against another right? Then send them a report listing any errors. I've written them asking how complex the files and how many pairs they expect to need checked, waiting for response.

    I'm looking at this stackoverflow for guidance. Using python.

    Questions:

    • How large or complex of files can I expect?

    • What kinds of errors should I anticipate?

    • what if they want a substantial number of files checked?

    • What to expect when making a bid offer? see next..

    • I figured about 2 to 4 hours setting up the file checking program, and only several minutes after that to enter file bundles, get the readout and send them the report. Should I expect it to take longer?

    • Given this approximate timeframe and my skill level, I was open to $20 - $40 hr depending if they are a small student studying or a business with higher workload and resources.

    • Secure payment before or after work completed? Some up front and the rest after work completed?

    Thank you

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

    Nodemailer how to use variables instead of constant

    Posted: 22 Nov 2018 09:56 PM PST

    Hi

    I am trying to set up nodemailer for one of my hobby application, my code for nodemailer looks something like this

    //module declarations var express = require("express"); var router = express.Router(); var bodyParser = require("body-parser"); var nodemailer = require("nodemailer"); var User = require("../database/users"); var email; router.post("/email",function(req,res){ User.findOne({'username':req.body.username},function(err,foundUser){ if(err){ console.log(err); res.send({"success":false,"message":err}); return; } //var tempEmail = '+foundUser.email+'; //email = "\""+foundUser.email+"\""; email = foundUser.email; email = email.toString(); console.log(email.toString()); }); const output = `<p>New Contact Request </p> <h3>Contact Details</h3> <li>Name: ${req.body.name}</li> <li>Phone number: ${req.body.phonenumber}</li> <li>Email: ${req.body.email}</li> <h3>Message</h3> <p>${req.body.message}</p>`; //nodemailer stuff var transporter = nodemailer.createTransport({ host: 'smtp.mail.com', port: 465, secure: true, // true for 465, false for other ports auth: { user: 'cpen321@mail.com', // generated ethereal user pass: 'Cpen321@' // generated ethereal password } }); // setup email data with unicode symbols var mailOptions = { from: '"Rental Tinder App" <cpen321@mail.com>', // sender address to: 'abc@mail.com', // list of receivers subject: 'New contact request', // Subject line text: 'Hello world?', // plain text body html: output // html body }; // send mail with defined transport object transporter.sendMail(mailOptions, (error, info) => { if (error) { return console.log(error); } console.log('Message sent: %s', info.messageId); // Preview only available when sending through an Ethereal account console.log('Preview URL: %s', nodemailer.getTestMessageUrl(info)); // Message sent: <b658f8ca-6296-ccf4-8306-87d57a0b4321@example.com> // Preview URL: https://ethereal.email/message/WaQKMgKddxQDoou... //redirecting to contact page saying message successfully sent res.send({"success":true, "message":"email sent"}); }); }); module.exports = router; 

    I want to use the variable email instead of constant, but if I do something like this

     var mailOptions = { from: '"Rental Tinder App" <cpen321@mail.com>', // sender address to: email, // list of receivers subject: 'New contact request', // Subject line text: 'Hello world?', // plain text body html: output // html body }; // send mail with defined transport object transporter.sendMail(mailOptions, (error, info) => { if (error) { return console.log(error); } console.log('Message sent: %s', info.messageId); // Preview only available when sending through an Ethereal account console.log('Preview URL: %s', nodemailer.getTestMessageUrl(info)); // Message sent: <b658f8ca-6296-ccf4-8306-87d57a0b4321@example.com> // Preview URL: https://ethereal.email/message/WaQKMgKddxQDoou... //redirecting to contact page saying message successfully sent res.send({"success":true, "message":"email sent"}); }); }); 

    I get an error like this

    Error: No recipients defined

    if i console log the variable email, it is same exact as [abc@mail.com](mailto:abc@mail.com), so email variable is not null

    I was wondering, how do I use a variable instead of constant in node mailer? I have been stuck with this problem for several hours now. Please help.

    Thanks

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

    Need some help with an anagram game in Python

    Posted: 22 Nov 2018 12:24 PM PST

    So I'm trying to make an anagram game, and I can't seem to figure out how to get it work. At this point everything runs without errors. The problem is that it doesn't actually do anything.

    import random #Imports the random function #The wordlist with the unscrambled words wordlist = ["rhythm", "incredible", "weird", "conscience", "concious", "pronunciation", "jewelry"] chosenword = random.choice(wordlist) #Makes a variable called chosenword that stores a random word from the wordlist def AnagramMaker(chosenword): charlist = list(chosenword) random.shuffle(charlist) scrambledword = "".join(charlist) print(scrambledword) userinput = input(str("The unscrambed version of this word is... ")) return(userinput) def UserInput(userinput, chosenword): if userinput == chosenword: print("Correct! You win!")#,points,"points") else: print ("Incorrect. Try Again. ") def main(userinput, chosenword): AnagramMaker(chosenword) UserInput(userinput, chosenword) #main(userinput, chosenword) 

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

    How do I assign an enum value in a function?

    Posted: 22 Nov 2018 08:59 PM PST

    I am wondering if it is possible to assign an enum value in a function. For context I'm trying to give an array a more friendly "sudo dictionary" access key. Code:

    class simple_file {

    private:

    uint8_t assigned_files = 0;

    enum : uint8_t file_access; //opaque enum deceleration

    char file_name[num_files][2][16]; //3d array to hold file names & directories

    //num_files is max number of remembered files

    public:

    simple_file(uint8_t number_files) : num_files(number_files) {};

    void add_file(QUESTION_SUBJECT, const char* directory, const char* fileName) {

    //need some way to assign some text to file_access here

    file_access { QUESTION_SUBJECT = assigned_files}; //assign QS name to assigned_files number

    assigned_files++;

    for(uint8_t x=0, x>16; x++) {

    file_name[<uint8\_t>this.QUESTION_SUBJECT][1][x] = directory[x];

    if(directory[x] == '\n') { break; }

    }

    for(uint8_t x=0, x>16; x++) {

    file_name[<uint8\_t>this.QUESTION_SUBJECT][2][x] = fileN[x];

    if(fileN[x] == '\n') { break; }

    }

    manipulate_file(simple_file::file_name name) {

    //use enum key to get correct filename and directory from name, then do stuff

    }

    };

    Sorry if that's a little long, but basically I don't know how to take an enum (parameter?) that doesn't exist yet and assign it, then populate my array at the same time. I can't give file_access any overloaded operators or class methods and i don't know what the parameters will be ahead of time so I'm at a loss. Any help would be appreciated!

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

    programming in asp.net (.net framework) and other platforms

    Posted: 22 Nov 2018 08:19 PM PST

    Hi everyone, I'm newer to programming. I am trying to make a web application for reading comics. My hope is to use the same server information, like usernames & passwords, and collection of comics, for a website, desktop application, and Android / IOS app if possible. My first thought was to use asp.net with visual studio because it uses C# and I am more familiar with it from messing around then PHP or any other language. Is this a smart move, is it possible, should I consider another solution? Any feedback is highly appreciated

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

    Do computer specs actually matter for software development?

    Posted: 22 Nov 2018 08:15 PM PST

    Many programmers I know have very powerful and expensive computers. But, I have always worked off old thrown away computers. I know Cyber Monday is coming up and was curious about shopping for one, or if it's even worth it.

    TL;dr is there any reason I'd need a powerful computer/anything important I'm missing out on?

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

    Up-to-date video series of live Java game/application program with good explinations as to the interworkings of the code?

    Posted: 22 Nov 2018 07:30 PM PST

    Hello, I'm a beginner/intermediate Java programmer. I'm very interested in having a free, up to date video series of someone programming a game or application in Java to follow along with in my free time. Does anyone know any good series with good explinations as to the interworkings of the code?

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

    No comments:

    Post a Comment