• Breaking News

    Saturday, September 21, 2019

    What have you been working on recently? [September 21, 2019] learn programming

    What have you been working on recently? [September 21, 2019] learn programming


    What have you been working on recently? [September 21, 2019]

    Posted: 21 Sep 2019 09:04 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]

    It seems like no matter how hard i try, i just can't learn to code, it doesn't "click" for me?

    Posted: 21 Sep 2019 01:23 PM PDT

    I've been trying on and off for many months now to learn to code, i've been switching between Python and Lua, and while i really want to learn it, and i have passion for it, it just doesn't seem to click for me, i can understand the very basics such as print("Hello world"), which can barely be called coding, i just can't seem to grasp my way around anything more complicated, while i'm 19, i thought this would be a fine time to learn it, and while i really wanna use it in my everyday life, i just can't wrap my head around it.

    Has someone else been in the same position? I've tried downloading books, watching youtube tutorials, using codeacademy, and it just seems like i don't retain any information and i can't actually learn anything.

    It's really demotivating, and it's really hard for me to sit down for an hour a day, watching guides, reading a book and trying to make something, and realize that i learned nothing.

    I really don't know what to do, i'm so motivated to code, but it's so demotivating to feel like i'm not learning anything, i've been through so many resources, yet the best i can do is a simple print.

    I'm also on the edge whether to learn python or lua, while lua is something i actually wanna use for coding add-ons for a game, python seems more accesible with a wealth of content, where lua seems like scarce regarding resources.

    I just don't know what to do, is coding just not for me?

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

    Minimal length of a code

    Posted: 21 Sep 2019 10:47 AM PDT

    I have this quirk, that I always want to write code as elegant as possible - knowing that there is a way to shorten something by clever use of class inheritance (in C#), or moving some repetitive parts of code to isolated function, I need to do that. Sometimes I rewrite large parts of code, not only because of their 'bad smell', but just to have clever structure of the whole project.

    In fact, I always believe that the all big 500 LoC project I could actually write in 20 lines if I would be good enough. On the other hand, I know that if I have some complexity of description, there is a some complexity of code required. Is there actually any theory, or some rule of thumb for predicting required size of a project?

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

    Cool Python Projects with Source Code

    Posted: 21 Sep 2019 04:13 AM PDT

    Projects are the best way to gain expertise in any programming language. They help you to deal with the problems that you might face while working for a company. So spending time on personal projects ultimately proves helpful for your career.

    Here's a list of Amazing Python Projects with source code –

    https://data-flair.training/blogs/python-projects-with-source-code/

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

    Problems with C pointers and chars

    Posted: 21 Sep 2019 12:56 PM PDT

    I needed user input for a program I'm making, and since it was a school assignment I had to use getchar. The problem is that it just prints random stuff rather than what I entered.

    int main()

    {

    char *input, c;

    int cont = 0;

    printf("Please enter a sentence: "

    while((c = getchar()) != '\n'){

    input = malloc(sizeof(char));

    input[cont] = c;

    cont++;

    }

    input = malloc(sizeof(char));

    input[cont + 1] = '\0';

    printf("%s", input);

    return 0;

    }

    Any help will be greatly appreciated

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

    Which programming language runs natively on the most operation systems?

    Posted: 21 Sep 2019 11:05 PM PDT

    Hello!

    This is a question, which is maybe not as easy as it sounds.

    Till today, I worked with many programming languages like Java, Python, Javascript, .NET, etc.

    Now I want to write a library with many possibilities like read/write files, doing http requests, reading out system infos, etc.

    For the most languages, I need a compiler installed like Java or Python to run this.

    For Windows, I could write .bat files or for Linux, I could write .sh files.

    But I want to write it once to run everywhere WITHOUT a compiler to be installed. It would be okay, if I need a compiler to generate the scripts.

    Is there any way out there? Maybe I am just crazy and it is not possible due to different operation system/architecture and the machine code behind it. But maybe anyone knows more about that. :)

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

    Can I see the changes I do to my code in real time with Visual Studio Code?

    Posted: 21 Sep 2019 07:29 AM PDT

    Hey! So I have recently started to do the #100daysofcode challenge because I wanted to learn about web development (Html, Css, JavaScript...)

    I started with freecodecamp, so I didn't need to install any code-editor because I can do everything in their website. Everytime I changed something in the code I saw automatically the changes of what I was coding.

    I'm used to program with Java and C++ (I use Eclipse and Codeblocks respectively) so everytime I wanted to see how my code was working I had to compile and run it.

    I want to know if I can see in real time all the changes that I do to my Html files with Visual Studio Code (instead of refreshing my browser everytime) In that case how do I enable this option?

    If anybody could send a good video explaining the main things that I should know about Visual Studio Code for web development would be awesome!

    Thanks in advance 💜🙌

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

    To what extent is do you know about electricity and electrical components of computers?

    Posted: 21 Sep 2019 11:04 AM PDT

    I guess in a more direct sense my question is

    How much do you know about the electrical components of computers and how much is necessary to be an effective programmer?

    I'm asking this because I want to learn programming but I want to understand the abstractions of it such as how the code is interpreted by the machinery etc. I want to know how much is necessary to effectively do this.

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

    How important is understanding/writing assembly language and/or computer architecture?

    Posted: 21 Sep 2019 09:49 AM PDT

    I'm currently taking a computer architecture class for my computer science degree and am having a hard time understanding a lot of the concepts. To be fair, it's online and the professor is just having us read from the text with no additional resources, so it's not exactly a well constructed class.

    But part of the class involves writing assembly code and understanding binary, registers, etc and it's just challenging me. When it comes to high level programming, I'm certainly no expert, but it comes much easier to me, whereas these concepts in regard to low level language and the architecture of a computer are tough. My question is, for those of you who are already software engineers or work in that world in general, how often do you use this knowledge on a daily basis?

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

    Coding Boot Camp VS Intership

    Posted: 21 Sep 2019 07:02 PM PDT

    Hello! I'm a sad college student who is stressed!

    Credit wise, I am a Junior. I took a lot of common core while in High School, so all my core are complete HOWEVER I'm technically a sophomore due to this being my second year in college. Due to this, I feel like I have to be on my A-game and start to get internships because experience in the field is extremely important! Now, this is where my "drama" starts, unlike the majority of my peers that brags about knowing three languages and having prior experience, I feel as if I'm bearly a master of the one lanague (Java) that we went over. I fear that I am not ready for an internship simply because I lack the skill set to function in the real world and fear that I would get fired.

    This is when someone asked me if taking a semester off from school and doing coding bootcamps would help me gain confidence and learn more languages. I don't think that it's a bad idea, but I worry that taking a semester off from school might hurt me more than help me since I'm more likely to forget information from my previous classes.

    So instead of solving this problem by myself, I turn to Reddit and to people who know better than me.

    Should I jump straight into internships or take some time off and go to coding bootcamps?

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

    Jupyter Notebooks

    Posted: 21 Sep 2019 02:43 PM PDT

    I recently started using Jupyter notebook on a server for writing python and love it. I typically write code for data science or machine learning. Does anyone else use Jupyter for other purposes? I figure IDEs are better for most software development purposes.

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

    Any vods of C# + Unity programmer I can watch in my free time?

    Posted: 21 Sep 2019 07:47 PM PDT

    Been learning C# & Unity for a few months now, and while I'm making great progress, I find that I'm lacking in real-world application, as in everything I'm learning, I don't know how to use it for an actual, real project.

    Those tutorials that show how to build games are pretty cool but they're too... "cleaned out". The teacher obviously knows by heart how to code this game, so I don't get to see the trial & error aspect of coding. I don't get to see how to debug a problem and come up with a solution. That kind of stuff.

    Are there streamers out there that codes games on Twitch or something? Like a game jam or other small project that I can follow through the vods from start to finish.

    Thanks!

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

    Multiple Modal not working. Help me please.

    Posted: 21 Sep 2019 11:22 PM PDT

    Hi. Im an IT student and im currently doing a certain project. So just to make it short, there is a page that has 2 button and each button has a modal on it. But i cant make it work. Im using bootstrap. The change password modal is working fine. but the change number modal is not working. Help me please

    Heres the important part of the code i guess.

    Buttons:

    <li><a style="color:blue;" data-toggle="modal" data-target="#changepassword"><img src="../images/password.png" style="width:100%;"></a></li>

    <li><a style="color:blue;" data-toggle="modal" data-target="#changenumber"><img src="../images/number.png" style="width:100%;"></a></li>

    modals:

    <div class="modal fade" id="changepassword" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">

    <div class="modal fade" id="changenumber" tabindex="-1" role="dialog" aria-labelledby="changenumbertitle" aria-hidden="true">

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

    Am I doing this right?

    Posted: 21 Sep 2019 03:29 PM PDT

    I've been learning python for about a month, with the last week tracking my time and really taking this seriously. I seem to generally understand new concepts but have trouble implementing them in new exercises. I tend to get sort of close to the solution, have no idea how to fix it, do lots of research, and then usually figure it out. Occasionally, I find myself unable to solve the problem and look at the solution.

    I'm taking Colt Steele's python class on Udemy and just finished loops. I feel like I should be more competent than I am.

    Is this normal, or does it mean that I don't really understand this? I'm thinking about starting my python course over, hoping to get a good grasp the second time.

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

    How to change the Default WordPress Audio player's progress bar color which by default is blue when playing.

    Posted: 21 Sep 2019 10:56 PM PDT

    I'm trying to figure out how to change the color of the default Wordpress audio player's progress bar. The bar that is by default: blue. I would like to change the blue color to another color.

    Here is what I have so far but can't find any code for the current progress bar when listening to the audio file.

    .mejs-container, .mejs-container .mejs-controls, .mejs-embed, .mejs-embed body { background: #FEE084 !important; } /* change the color of the lettering */ .mejs-currenttime, .mejs-duration { color: #4d1ba4 !important; } .mytheme-mejs-container .mejs-controls .mejs-time-rail .mejs-time-loaded { background-color: rgba(219, 78, 136, 0.075); } 
    submitted by /u/lalamanicer
    [link] [comments]

    Free Video Tutorials ....

    Posted: 21 Sep 2019 10:52 PM PDT

    www.anyvideotutorial.com all software languages , Accounting , Photography , Free lancing , Video editing courses

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

    Python Or Statement Help

    Posted: 21 Sep 2019 08:44 AM PDT

    If I am trying to test a variable to see if it is three specific numbers (ex: trying to test if x is -6, 4, or 2)

    If i put:

    If x== -6 or 4 or 2

    Return True

    it returns True for any value of X. How do I fix this.

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

    I need help understanding a method definition using a method from a gem and a block in Ruby

    Posted: 21 Sep 2019 09:51 PM PDT

    I'm looking at this repo and file specifically and need a hand understanding the #colorize method.

    The Colorize gem is required.

    The method is giving me fits, because I don't understand what is happening with two methods chained together in the method definition. Like this...

    def colorize(set, is_color_code) colors = [] text = is_color_code ? "0" : "." set.colors.each { #block.... 

    I don't understand what the last line is doing. (I left it incomplete on purpose)

    How can I call the #colors method (from the colorize gem) on the 1st parameter, and then call #each right away? What element is being passed to the yield block?

    Knowledge of the Colorize Gem is required.

    Hopefully this isn't too specific or too off-topic...

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

    Setting up new database, hoping for some validation or pointers

    Posted: 21 Sep 2019 09:48 PM PDT

    Hi everyone, this is the first time I've set up a DB by myself with no instructors to say right or wrong, so if you guys can give me a heads up on if it is set up correctly or not, that would be very kind of you.

    https://imgur.com/Ro7DTx6

    So to explain the application, it is a very simple set up, its a grade book for a single teacher who teaches several classes each quarter of every year.

    My thought process is each year will need many semesters, each semester will need many classes, each class will have a name and many students, each student will have an Id, an email, and a class (they can only be in one class per semester), then each grade will need a type of grade (for total grade calculation), points possible, points earned, and the student that the grade correlates to.

    submitted by /u/-whoKnowsMan-
    [link] [comments]

    Learning SQL

    Posted: 21 Sep 2019 09:35 PM PDT

    Hey Reddit

    I'm having a lot of difficulty learning SQL. We have it as part of our core curriculum and I don't know why but I just can't seem to make head or tail when it comes to nested queries. The resources provided by our college just make it worse. Most of the others don't seem to be having a problem because it's "coming naturally" to them or have studied it previously in high school.

    At this point I don't know if I'm doing something wrong or not seeing something right in front of me

    Any advice is welcome Thanks in advance

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

    Discord for this sub

    Posted: 21 Sep 2019 09:00 PM PDT

    Is this sub doesn't have discord?

    Any recommended discord for beginners?

    submitted by /u/Prince-Otter
    [link] [comments]

    Get the folder ID of newly created folder (via Box API)

    Posted: 21 Sep 2019 08:57 PM PDT

    I'm using Box API to 'Create Folder' and it's successfully creating the folders! I want to then get the 'folder ID' - is there a way to 'return' the folder ID somehow? Or would I have to make a second API call to determine it?

    Code so far:

    function Box_NewFolder(folderName){ var data = { 'name': folderName, "parent":{"id":"87710499100"} }; var boxurl = "https://api.box.com/2.0/folders/"; var options = {muteHttpExceptions: true, 'method' : 'post', 'contentType': 'application/json', 'payload' : JSON.stringify(data), headers: {"Authorization" : "Bearer 000000000000000000000"} } var response = UrlFetchApp.fetch(boxurl, options); Logger.log(response.getContentText()); } 

    It returns this in the console (and I need that first "id" attribute):

    {"type":"folder","id":"87832644501","sequence_id":"0","etag":"0","name":"02000","created_at":"2019-09-21T20:55:45-07:00", *[...... etc]* 
    submitted by /u/freelance3d
    [link] [comments]

    Relearning Math in my computer science degree.

    Posted: 21 Sep 2019 08:24 PM PDT

    So a little bit of background info about myself. I started college in 2013 as a business major, took my geneds and some required math classes including Calc 2.

    Fast forward a bit of time and I change to computer science, then took two years off of school.

    I returned last year and now have all my geneds and other university requirements done so I am starting to dive more into my major. Im in a Data Structures class right now and after taking the first quiz I'm thinking "crap I forgot how some math works" when working with logs.

    Does anybody have some online course or YouTube series that I could browse over to refresh myself more? Thank you.

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

    Help Updating a Image in Python using matplotlib/pyplot

    Posted: 21 Sep 2019 08:22 PM PDT

    This post will be kind of long, but I'm hoping someone experienced with python/matplotlib/pyplot can lend me a hand here. This also my first time posting here so let me know if I missed any sub/formatting rules.

    My goal is to create a display window to show the board for a battleship game I've been working on and decided it would be a good opportunity to familiarize myself with matplotlib/pyplot. The plan was to display an image of a blank board (10x10 numpy array of zeros), prompt the user for X and Y coordinates to fire at, then update the board with the coordinates. I found some sample code to with here: https://www.scivision.dev/fast-update-matplotlib-plots/ and below (Test 1) is a modified version of it that is a step in the right direction towards what I want:

    # # Test 1 # import numpy as np from matplotlib.pyplot import figure, draw, pause, subplots, ion ion() # Create alternating image stack im1 = np.eye(10) # image 1 im2 = np.flip(np.eye(10),0) # image 2 imgs = np.array([im1, im2, im1, im2, im1, im2, im1, im2, im1, im2, im1, im2]) # Initialize figure boardWindow, ax = subplots(1, 2, figsize=(14, 12)) h1 = ax[0].imshow(imgs[0]) # set initial display dimensions h2 = ax[1].imshow(imgs[0]) # set initial display dimensions # Cycle through images and prompt user for input for img in imgs: # Update image data h1.set_data(img) h2.set_data(img) # Draw new data to plot draw() pause(250e-3) 

    Test 1 changes 2 images being displayed on the figure every 250ms with no issues. Below, I modified it further to start with a single blank array (empty board), prompt the user to pick a location to fire at, write a 1 to the user selected location on the array, then display the updated array board to the figure.

    # # Test 2 # import numpy as np from matplotlib.pyplot import figure, draw, pause, subplots, ion ion() # Create blank board im = np.zeros((10,10)) # Initialize figure boardWindow, ax = subplots(1, 2, figsize=(14, 12)) h1 = ax[0].imshow(im) # set initial display dimensions h2 = ax[1].imshow(im) # set initial display dimensions # Prompt user for input and update image while True: # Get X and Y from user X = int(input('X = ')) Y = int(input('Y = ')) # Place new mark im[Y,X] = 1 # Update image data h1.set_data(im) h2.set_data(im) # Draw new data to plot draw() pause(250e-3) 

    Unfortunately, none of what I described above actually happens and I just end up displaying a bunch of blank (zero's) 10x10 arrays, with no 1's to be found. I'd greatly appreciate any explanations of what my code is actually doing, and/or suggest.

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

    No comments:

    Post a Comment