• Breaking News

    Sunday, September 1, 2019

    What have you been working on recently? [August 31, 2019] learn programming

    What have you been working on recently? [August 31, 2019] learn programming


    What have you been working on recently? [August 31, 2019]

    Posted: 31 Aug 2019 09:11 AM PDT

    What have you been working on recently? Feel free to share updates on projects you're working on, brag about any major milestones you've hit, grouse about a challenge you've ran into recently... Any sort of "progress report" is fair game!

    A few requests:

    1. If possible, include a link to your source code when sharing a project update. That way, others can learn from your work!

    2. If you've shared something, try commenting on at least one other update -- ask a question, give feedback, compliment something cool... We encourage discussion!

    3. If you don't consider yourself to be a beginner, include about how many years of experience you have.

    This thread will remained stickied over the weekend. Link to past threads here.

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

    Should i learn perl or ruby?

    Posted: 31 Aug 2019 04:25 PM PDT

    They seem really similar but i still dont know

    submitted by /u/masked-hacker
    [link] [comments]

    Worth The Money?

    Posted: 31 Aug 2019 02:44 PM PDT

    https://www.eventbrite.com/e/4-weeks-coding-bootcamp-in-milwaukee-wi-learn-to-code-with-c-c-sharp-and-net-dot-net-training-tickets-70420673129?aff=erellivmlt

    Is something like this worth the money? Or is there anyone who has feedback on something that might be similar to this?

    Work will reimburse for training such as this but I can't find any background on it or reviews from people.

    Sorry if this is a silly question but couldn't think of a better place to ask myself. Any feedback is appreciated.

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

    SQL Joins and Group By Explained

    Posted: 31 Aug 2019 12:16 PM PDT

    I've created a guide for SQL joins and group by that I hope someone fairly new to SQL can find useful. The posts have practical examples and sample data, which is how I learn best myself.

    SQL joins as a concept don't seem too complex, but there can be quite a bit of subtlety to them! I go over 5 different kinds of join, with examples for each:

    • JOIN
    • LEFT JOIN
    • RIGHT JOIN
    • FULL JOIN
    • CROSS JOIN

    The GROUP BY clause seemed like a natural progression from there, because that's often what you'll do next once you have your data joined together. I cover the basics there, as well aggregating on a function, and using the HAVING clause.

    SQL Join Types Explained

    SQL GROUP BY Explained

    I hope you enjoy! Please let me know if you have feedback or if there are other topics you'd like to see covered.

    Thanks!

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

    My trie takes 110 MB to store 180k strings containing 3.5m characters, is that normal? Can I cut down on this?

    Posted: 31 Aug 2019 04:49 PM PDT

    My implementation:

    struct Node { Node* operator[](wchar_t ch) { auto it = std::lower_bound(storage.begin(), storage.end(), ch, [](const auto& one, auto two) { return one.first < two; }); if (it != storage.end() && it->first == ch) return it->second.get(); return storage.insert(it, { ch, std::make_unique<Node>() })->second.get(); } std::vector<std::pair<wchar_t, std::unique_ptr<Node>>> storage; } trie; 

    ```

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

    Learning to use an API

    Posted: 31 Aug 2019 05:06 PM PDT

    Hi guys. I need your help. I am doing a personal project where I need to use an API but I never done it. I only know HTML, CSS and a little of JavaScript and PHP. I Google for help but here are a lot of resources. The thing is, where can I learn to use an API so that I can implement this on my project? Thanks in advance

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

    Advice on how to learn to be a backend developer?

    Posted: 31 Aug 2019 04:55 PM PDT

    Hi guys. I have some knowledge in Android development, and i've decided to make my own app. i have the idea and all, but i'm struggling with the backend part.

    i'm leaning toward using firebase functions since it can provide me with everything i need and it seems like it's relatively easier to learn.

    but i'm very much lost and stuck. all i want is to create a pretty simple database , but i have no idea where to start.

    i'm good with the front end part, and i'd love to get some advice on what's the best approach to develop and maintain a backend environment for an app and where do i even start ?? also, a recommended tutorial / course or something practical that i can use to create a simple server for my app? i'm so lost!

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

    [Beginner Project] Expecting feedback on my first Web Dev project. Hugely appreciated!

    Posted: 31 Aug 2019 02:31 PM PDT

    Hey everyone!

    I've recently started learning with Colt Steele's Web Developer Bootcamp. I've done HTML, CSS and basic JavaScript. Before I move to the DOM Manipulation, I wanted to create a web page purely coded in HTML & CSS.

    I've also finished Bootstrap sections in the course, but wanted to make things by myself as a starting point without using a framework.

    It's still in progress, but basically I've tried to create a portfolio site. Still nothing much in terms of content but will keep updating it as I learn and move on with the course.

    So here is the link; https://tarikceylan.github.io

    Please don't hold yourselves back. If you see something wrong or something that I could've done more efficiently. Please let me know. This is important to me and thank you so much in advance!

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

    Python replace element in namedtuple by percentage value

    Posted: 31 Aug 2019 03:05 PM PDT

    Hi, I've tried for the life of me to figure this out and I'm just feeling confused and stupid. Does anyone know how I can get the price to update by an inputted percent?

    Instructions: 1. Function that takes a pricePercent value and a list of Items. 2. Returns a list with updated Items in listOfItems with the original price changed by pricePercent. 3. Should take into account negative percentage values (like -50 returns 0.50 if the original price is 1.00)

    I'm trying to use the ._replace method, since it is the easiest.

    Code: https://pastebin.com/EgpkqyEQ

    But my code doesn't take into account any negative number values, how would I do that?

    Also, where am I returning errors and what can I do to change it?*

    submitted by /u/3ris_3ntropy
    [link] [comments]

    Reminder: 2 days left for a One Dollar Python book bundle on humble bundle

    Posted: 31 Aug 2019 09:20 AM PDT

    5 books for USD 1.
    14 books for USD 15.

    Link to the bundle

    I hope these kind of posts are allowed

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

    Learning to read/understand large code base

    Posted: 31 Aug 2019 06:11 PM PDT

    (I'm new and this is my first question so I might be asking at a wrong place) I need to learn how to read large code bases e.g LLVM / Linux Kernel / Chromium etc ..... Every time I try I get stuck in extremely minor details. I need to learn how to understand the big picture of a large project, how each components interact with each other etc.. (again if I am asking at wrong subreddit let me know)

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

    Best coding competitions out there?

    Posted: 31 Aug 2019 02:53 PM PDT

    Looking to enter a coding competition, finding a lack of resources. Know anything out there r/learnprogramming? I'm sure you do.

    (Specifically, I'm looking for app comps)

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

    Japanese Python Resources

    Posted: 31 Aug 2019 08:33 PM PDT

    Hey, y'all!

    One of my friends is an Japanese-American Studies Program student, and he's taking a CS course as part of his English-immersion courses. That said, learning something as complex as CS on top of improving his English skills is proving pretty difficult.

    That said, he really wants to stick it out, and I thought some Japanese-language python resources might help.

    I hoped that Automate the Boring Stuff would have a Japanese translation, but I can't find one. That said, I found this website of Japanese python resources, which links to this Japanese O'Reilly book. I also found Hitchhiker's Guide to Python, which has a Japanese translation.

    Would anyone advise against giving these resources to someone learning Python for the first time? Further, do y'all have any recommendations for other Japanese Python resources?

    Thanks!

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

    Ibm Assembly Language

    Posted: 31 Aug 2019 08:31 PM PDT

    I need to learn any Ibm assembly language for a class (enough to create a simple game). What is the best resource or easiest language to get started with?

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

    Is having a twitter account any useful as a programmer?

    Posted: 01 Sep 2019 12:01 AM PDT

    I was listening to a programming podcast (they do exist) and they highly recommended having a twitter account, specially for new into coding, and following tech related people, language creators amd such so you are "updated" and learn new things. How relevant for your life as a programmer is having a twitter account? Do you have any related stories to share?

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

    I do not understand how to link a HTML/CSS/JS website with Java

    Posted: 31 Aug 2019 11:49 PM PDT

    Hey guys,

    I have been coding for a while now, and I would say I have a fair grasp on the Java Fundamentals (About first year computer science student.) and HTML/CSS. I am currently trying to complete a project where I want to run variables inputted on my HTML/CSS GUI into my Java methods and I am pretty much stuck. I keep reading about Spring and all of these things such as AJAX and it is just confusing me even more as I do not understand much of things. I was wondering if there was a simpler way to do this, provided that I do not care about hosting this website (AKA everything is in the same project file and run periodically on my computer)?

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

    Python Script simulates Many-One Reduction of Subset-Sum in O(n) time. Critique with constructive intent please.

    Posted: 31 Aug 2019 11:12 PM PDT

    one = int(input('enter integer from subset-sum instance sequentially: ')) print('----------------------------------------------------------------') print('You can enter negative and postive integers') kape = "{0:b}".format(one) kapes = len(kape) # Everything is bounded by bit-length in the conversion script # Tallies bit length is either equal to the x in 1111 + X # or exceeds it. Hopefully, this problem is in P # Look for errors in my math smart = (one-len(kape)) smarts = "{0:b}".format(smart).lstrip("-") smartstwo = len(smarts) tallyMarksNumberone = "1" * kapes + "1" * 0 koko = len(tallyMarksNumberone) # if koko >= smartstwo measures that tallies >= bit-length # of smarts. tallies is bounded by the bit-length of kape # kapes = len(kape) # tallyMarksNumberone = "1" * kapes + "1" * 0 # So that the Many-One Reduction is O(n) time. if koko >= smartstwo: print('----------------------------------------------------------') print('Tallies bit length >= X as in 11111 + X') print('----------------------------------------------------------') print(tallyMarksNumberone, '+', smart) print('write down your converted instances') else: print('sorry, screwed') quit() while koko >= smartstwo: if smart + koko or koko + smart == one-smart: print('-----------------------TRUE EQUAL ----------------------------') one = int(input(' in sequence, enter subset sum integer instance: ')) kape = "{0:b}".format(one) kapes = len(kape) smart = (one-len(kape)) smarts = "{0:b}".format(smart).lstrip("-") smartstwo = len(smarts) tallyMarksNumberone = "1" * kapes + "1" * 0 koko = len(tallyMarksNumberone) if koko >= len(smarts): print('----------------------------------------------------------') print('Tallies bit length >= X as in 11111 + X') print('----------------------------------------------------------') print('write down your converted instances') print('Here is your Poly-time Conversion') print('---------------------------------------------') print(tallyMarksNumberone, '+', smart) else: quit() 

    Example

    tallies 1111111 + x = sum Manually written down after each iteration sequentially. {-7,-3,-2,5,8} Is there a subset that sums to zero? Converted into O(n) time [1111 + -11, 111 + -6, 111 + -5, 111 + 2, 1111 + 4] Is there a subset that sums to zero? 

    This is one of the best programs I've written so far. Its also one of my first versions of a while loop. Thankfully it works.

    Question

    Is my script truly O(n) being bounded by the bit-length? Also, what parts of this script would come off as confusing? What ways would you re-write my program? Are there better ways than mine?

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

    Help me out here someone please?

    Posted: 31 Aug 2019 11:00 PM PDT

    Im 19 and ive wanted to learn coding for a while but put it off, but now ive decided to stop doing that and get serious about it and ive chosen to start with C# but i dont have any money i could use to pay for tutorials, so would someone mind pointing me in the best direction of getting started? anything would be highly appreciated

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

    [c++]Is it possible to redirect input(using cmd or a terminal) once the program is already running?

    Posted: 31 Aug 2019 10:56 PM PDT

    I know I can redirect input in cmd by doing something like:

    file.exe<some.txt 

    However, let's say my file.exe has a menu when it is first run and I need to select an option and then input my data. How can I redirect input after I have selected that menu option? I may be a bit unclear on what I mean. Here's some rough code.

    int main() { char choice; while(true) { std::cout << "Input data? y for yes and n for no.\n"; std::cin >> choice; if(choice == 'y') { std::string myStr; std::cin >> myStr; } else if(choice == 'n') { break; } } 

    If I run file.exe<some.txt, it will placed into choice. I want the redirected input to placed into myStr but at that point, the program is already running. Is there a way around this? Thanks for the help.

    P.S: The reason I am using redirected inputs is because my OS teachers wants us to use it instead of opening files or using fstreams.

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

    I'm completely lost on polishing, user interface, and compiling in general.

    Posted: 31 Aug 2019 10:51 PM PDT

    This may seem basic or kind of dumb, but I've only ever written code for myself and I've always just ran it in whatever IDE I had handy; I'll just call the function as the last line and hit run.

    My question is what do I learn about to start making scripts and programs that other people can use or that I can package more cleanly? I'm using Python 3 right now, is this process very different for common languages? Thanks in advance.

    submitted by /u/Matt-ayo
    [link] [comments]

    What’s the best approach for my program?

    Posted: 31 Aug 2019 10:32 PM PDT

    TL;DR: I have a little bit of experience in Python. I want to create a program and I m not sure what language to use. It will be a program that modifies a database, with a users system with different permissions (some will be able to read only for example). Also I want it to have a GUI. The database won't be so long, so it could be a excel file.

    Hi!

    I don't have much programming experience. I'm about to finish automate the boring stuff with python, and that's all I know. My problem is that I came to a point where I really want to make my own project, I just don't know if python is the right language for it, or if I should use MySQL or another one.

    My idea es the following: I want a program (for Windows if that changes anything and I will be programming on MacOS) that will be able to add, delete, modify, view and search data inside a database that will be stored on a file inside the system, I don't want it to connect to internet or anything. The tricky part (at least for me) is that I want to create a user system, I mean create different users with passwords and some will have different permissions (not everyone will be able to modify the database, for example). I also want it to have a GUI for everything. The database won't be so long, so it could be a excel file.

    I don't know if this is a lot for a newbie, but I'm really inspired on making this program.

    Thanks for your help!

    submitted by /u/S-hylla
    [link] [comments]

    Is it a risky strategy to use smaller sized SQL column types thinking to upgrade later if needed?

    Posted: 31 Aug 2019 11:50 AM PDT

    for example starting with mediumint and running a modify query to modify it to int or bigint. Are these dangerous operations? Would you guys prefer to just set the column type to the theoretical maximum from the beginning?

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

    Where do I download C++?

    Posted: 31 Aug 2019 06:28 PM PDT

    (srry if this is a stupid question)

    Gathered some learning resources so I can learn C++. But when I search up C++ I cant find a reliable download file of the programming tool. Where exactly can i get it?

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

    Need to learn Java and Ruby

    Posted: 31 Aug 2019 02:37 PM PDT

    I most likely have an interview coming up at a place that uses these two languages. I mostly have a C++ background, and have never touched Java or Ruby in my life. What would you recommend I study/cram to be able to have a decent grasp of these languages by the time my interview comes around next week (if it does)?? Any quick projects I can do, resources, videos, anything would help.

    Thanks

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

    [node.js] [ejs] [mongoose] How can I get a variable from my script in my .ejs file into a route in my API?

    Posted: 31 Aug 2019 11:32 AM PDT

    So say this is my home.ejs file -

    <!DOCTYPE html> <html> <head> </head> <body> <h1>home page</h1> <script> var name = "bob"; </script> </body> </html> 

    and here is my api main.js file -

    var express = require("express"); var app = express(); app.get("/", function(req, res){ res.render("home.ejs"); }); app.post("/save", function(req, res){ var name = req.body.name; var newPerson = {name: name} Person.create(newPerson, function(err, newPerson){ if(err){ console.log(err); } else { res.send(name); } }); }); 

    How can I get the value bob from home.ejs give it to the main.js file save it to the database without using a form?

    Is this the right subreddit or would it be a good idea to post it to r/webdev or r/node?

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

    No comments:

    Post a Comment