• Breaking News

    Friday, October 11, 2019

    Apple just changed the default terminal from bash to zsh in their new OS Catalina update learn programming

    Apple just changed the default terminal from bash to zsh in their new OS Catalina update learn programming


    Apple just changed the default terminal from bash to zsh in their new OS Catalina update

    Posted: 10 Oct 2019 12:14 PM PDT

    As a relatively new web developer, is this something I should care about? I really only know the very basic git and bash commands for navigating files and pushing to GitHub. I'm just not sure if this will have an impact on me, as I know next to nothing about different terminals. I typically just use the default bash terminal in VSCode when I'm working on websites.

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

    Does Codewars get better?

    Posted: 10 Oct 2019 09:05 PM PDT

    I have tried Hackerrank, Leetcode and now codewars. I am enjoying Codewars since it is easy to understand and I am learning new basic stuff, tips and tricks during every kata. I am currently at 6 kyu.

    But my question is, do the problems get complex as the level goes up? because I feel they have been of a similar level so far.

    Thanks and Regards

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

    Just started learning javascript today via freecodecamp and youtube university, wish me luck

    Posted: 10 Oct 2019 10:47 PM PDT

    Wish me luck in my journey

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

    Application of C programming

    Posted: 10 Oct 2019 11:32 PM PDT

    I understand that C is written on a lot of embedded systems stuff (which makes sense because you can control things very intricately from the system) but I don't understand how it can be used for anything else.

    I read that you can design applications like Word/Excel but how? C doesn't have any viable GUI libraries, does it? I'm nearing graduation and would like to improve my C but I'm finding very little reason to when there are other languages which seem more applicable to continue improving on.

    Can anyone help me with some insight on what C is usually used for and how? Thank you!

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

    Hello! I'm currently enrolled and fundamentals of programming class and i'm having some trouble with a question. (JAVA)

    Posted: 10 Oct 2019 06:34 PM PDT

    Q: At a coffee shop, a coffee costs $1. Each coffee you purchase, earns one star. Seven stars earns a free coffee. In turn, that free coffee earns another star. Ask the user how many dollars they will spend, then output the number of coffees that will be given and output the number of stars remaining.

    I got the code started but i'm having a lot of trouble with getting a counter to reset back to one after the max amount of stars is reached or do I even use a counter for that? Any help is appreciated!

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

    Need help understanding JavaScript higher order functions and callbacks, any really good resources out there?

    Posted: 10 Oct 2019 10:06 PM PDT

    Hi,

    I need help understanding "higher order functions" and "callbacks" in JavaScript. I read some documentation and watch some videos on YouTube about it, but I still don't fully get it.

    I understand how functions and helper functions.

    Can someone here explain to me in simple basic terminology how order functions and callbacks work or provide some REALLY good videos or reading material I can look into to help me understand it.

    What is the difference between a higher order function vs a helper function when you call function that returns a value that is needed for the "other" function it's connected to?

    I want to "master" this higher order function and callback thing this weekend.

    Million thanks in advance.

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

    At what point does code optimization become wasteful/inefficient?

    Posted: 10 Oct 2019 10:01 PM PDT

    Particularly , when you've reached a point in a program where you are trying to shave seconds off of run time. Say you are automating a task that takes 5 mins manually every day when does "good enough" code become preferable?

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

    Which IT path is better? Network engineering or software?

    Posted: 11 Oct 2019 01:22 AM PDT

    Question lang po for IT industry veterans and alike; Which IT path is better here in PH in terms of salary, job security, mas madaling mapenetrate for newbies or fresh grads or yung mga self taught individuals? Is it Network Engineering or Software Engineering (programming jobs,web dev). Or kung may iba pang IT path like cyber security or cloud

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

    C, Python, Something else? Trying to start my first project

    Posted: 11 Oct 2019 01:09 AM PDT

    Hey guys, Im in the middle of my intro to programming course that is taught in C. For reference, this is pretty much the only programming experience I have. I've had a few ideas for little programs or applications that I'd jot down in my notes on my phone over time, and told myself I'd come back to them when I know how to get it done

    I decided today that I should just jump in and see what I can learn on my own. What I want to create is a program that renames and sorts my media. I can go into more detail about my setup if necessary, but essentially I have three folders/directories: Movies, TV Shows, and Unsorted, where Transmission puts them upon completion of the download. I want to rename them from their messy names, for example: Joker.2019.1080p.etc into Joker (2019) and then move this from Unsorted to Movies.

    I figured I'd do it in C, since that's what I "know". I successfully renamed a folder in C as a little test (simple, but I was excited since previously I had only manipulated input from the terminal or hard coded values.) As I started to look into it more, I was wondering if I should use a different language. TheMovieDB has an API available but not for C. I found a different API that I could probably make work, but then I encountered another problem. It struggles to find movies using the titles I download them in, e.g. Joker.2019.1080p.etc. I then found a little tool someone made that parses these sort of file names, but it's for Python

    So I guess I'm just looking for a little guidance. Should I just use Python, try to figure out how to get the movie title from the file title (seems hard since titles are inconsistent, don't really know where to begin), or something else entirely? Also, bear with me if I used any terms incorrectly and feel free to correct me. Thanks

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

    Accessing objects of list type

    Posted: 11 Oct 2019 12:46 AM PDT

    How do I assign values to an object which is a list type and serialize to generate an xml fiel? For example, I have an object of type 'Container' which contains details about a Container. Now this object 'container' is inside an object of type ContainerList(). So I can have many objects of type Container, in object ContainerList().

    I tried to assign value in this way and generate xml in Visual Studio in VB.net but doesn't work. 'ContainerList' is within goodsitem

    Dim goods as goodsitem goods.ContainerList(1) = New AFRContainer goods.ContainerList(1).ContainerNumber = "1" 

    I get an error 'Object reference not set to an instance of an object.'

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

    [Python] What's the difference between __str__ and __repr_?

    Posted: 11 Oct 2019 12:31 AM PDT

    I'm heading towards my last weeks of my first semester of Computer science, we've been covering Object-Oriented programming in Python 3. We've asked to write two functions in our Class __str__(self) and __repr__(self), can somebody please explain the difference between the two to me?

    I'm really struggling to grasp the concepts.

    Thanks.

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

    App idea in mind, not much coding experience. Best way to start?

    Posted: 10 Oct 2019 02:32 PM PDT

    So I've tried learning some programming by taking online classes and such but I tend to lose interest and give up. I need to be working on an actual project that I'm interested in actually making or else I get bored and lose focus fast. So I decided to choose a simple app that I want to replicate and maybe add a couple of small features to in order to get the learning going, then build from there.

    The base app is an iOS app that creates a zooming-in-gif on a picture that you select. So for example, if I have a picture of a friend looking stupid in the background... I would open the app, select the picture, zoom in on my friends face, press OK, then the app would create a gif of the picture being zoomed in on my friends face.

    So my question is (and it may be a dumb one, sorry): are there any pointers someone could give me on how to create this app quickly without just "learning iOS development in general from the ground up"? Are there any shortcuts I can take to be able to skip directly to creating this app so I can get some momentum going with app development and then continue my learning from there? Or do I basically just have to learn iOS development from the ground up before I will have all the skills needed to create this? Thanks for the help.

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

    Okay, my programming teacher just dropped this assignment on us and im completely lost.

    Posted: 11 Oct 2019 12:09 AM PDT

    This is the assignment https://privatebin.net/?77b1b32d0fcd3e26#46xJnSzgJKLfBM1ouvHG5Phcf8LphZBy7FsLK9Ki3YAD

    This is what i have https://privatebin.net/?980c9e22790747ad#7n5LFCkpwwuP2yUpx1rfQ3Wehin2FULe54rXtHw3Noig

    what do i do, how do i do it, and am i even close to being right with what i have so far??????

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

    I cant figure out out what is wrong (Java)

    Posted: 10 Oct 2019 10:54 PM PDT

    package cst8284.shape;

    public class Circle extends BasicShape {

    public Circle() { super((double)2.0); } public Circle(double width) { 

    super(width);

    } public Circle(Circle circle) { this(circle.getWidth()); } @Override public double getArea() { return Math.PI\*Math.pow(getWidth(),2)/4; } @Override public double getPerimeter() { return Math.PI\*getWidth(); } public String toString() { return super.toString(); } @Override public boolean equals(Circle obj)//(error)The method equals(Circle) of type Circle must override or implement a supertype method { if(obj instanceof Circle) { return super.equals(obj); } else { return false; } } 

    }

    its giving me this error and i cant figure out why

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

    how do you get the string.includes() method to use special characters

    Posted: 10 Oct 2019 10:38 PM PDT

    im making a valid password checker that needs to have at least one of !@#$%^&* to pass but ive no clue how to go about adding them without it thinking the symbols are trying to do something

    let isValidPassword = function ( str5 ) {

    `if ( str5.length >= 7 && str5.includes()) {` `return true` 

    } else

     `return false` 

    }

    console.log( isValidPassword("password") );

    console.log( isValidPassword("pas$word") );

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

    How can I make an animated map using a time series of GPS coordinates?

    Posted: 10 Oct 2019 10:27 PM PDT

    I don't know if this is the right sub (please do let me know where else I should ask this). I recently moved from Michigan to Oregon and I want to do a timelapse of the dashcam footage of the entire trip. I do video editing all the time so that hasn't been an issue. What I want to do, though, is overlay a little minimap showing where I am along the route as the timelapse plays. The GPS coordinates are hardcoded into the video (example here: https://drive.google.com/open?id=1Yl_ZrrR3KVF3tqclf9WbKoejv8qIHqIG). So far, because I thought it would be useful, I cropped each north and west coordinate into their own separate videos because I figured that would make any image recognition I have to do easier (example of the isolated longitudinal coordinate here, bear in mind this is sped up significantly: https://drive.google.com/open?id=1Ht4Qx-keMXsbFBOdHfNJ09k6Ug9yI3wl)

    I have somewhat of a programming background but I don't even know where to begin here or if there have already been solutions to this kind of problem. What I'm thinking is that I could use image recognition to get a time series of each coordinate into a file and then pipe that into some map API and generate a corresponding frame for each frame of my video? I don't even know. If you can point me at all in the right direction, I'd super appreciate it.

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

    I started learning Ruby and Rails a couple years ago and stopped. Should I pick it back up or dive into something new?

    Posted: 10 Oct 2019 10:23 PM PDT

    I'm at the point where I understand fundamental programming concepts, which I've done in JS and Python before in addition to Ruby (variables and assignment, conditional logic, algorithms, etc). I had made it pretty far into Hartl's Rails Tutorial, and was about to pick it back up, but I know Rails has been seemingly on the outs these days.

    The other piece is I need to make a lightweight CRUD app with reasonably secure authentication and such in there, and i want to mess around with Google Cloud as part of this.

    Is Rails still a good choice because I'm halfway familiar with its syntax, structure and usage already? Or is there something worth learning instead that is equally beginner friendly with a large ecosystem like Flask and jump to Python land?

    I'd like something that plays nice with a front-end framework that is halfway modern. I'm not sure if Rails is competitive with React and other dedicated FE frameworks.

    I think there's probably value in sticking with Rails as it is what I'm most familiar with, so I can just start on something. But is there something else I should be considering?

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

    I want to write code to play music according to the output of the program. What language is best for this and how do you approach it?

    Posted: 10 Oct 2019 06:23 PM PDT

    I've been googling variations on this question for the past couple weeks and weirdly can't find a very straightforward answer. I currently write python which doesn't have great audio capabilities, so I'm willing to learn a new language to accomplish this. It comes stock with a library for playing .wav files which cannot play multiple at once. You can use a library (I don't remember which one) to write one .wav file on top of the other before playback but this is hacky and doesn't work for all use-cases (for example if I wanted to trigger different files on key input, ie; at arbitrary times). It also requires you to save the new combined sound as a file on the computer temporarily which I don't like as there could potentially be hundreds you need to generate for a given program. And as an alternative to that, some people online recommend multithreading which isn't a good idea if you plan to have more than a couple sounds going at once at any point.

    What I'm potentially looking for (alternative described below) is a way to reference existing audio files and be able to play them on top of one another, without the problems I outlined above. In pseduocode a successful program would look something like this, where "library.play" represents whatever function I write or get from a library to play the chords:

    A = A.wav B = B.wav C = C.wav D = D.wav E = E.wav F = F.wav G = G.wav chordList = [ [A, C, E], [A, D, F], [B, E, G], [A, C, E] ] for item in chordList: library.play(item) 

    End result should be the files A.wav C.wav E.wav playing on top of one another, then the same for A.wav D.wav F.wav, and so on. The chordList object would of course be determined programmatically, since I could obviously just write those chords into MIDI in a DAW and play them if I knew what they would be to begin with. I can already generate melodies/chords via an algorithm, I just want a way to play them inside of the program when I run it.

    Alternatively, I suspect there might already be either a DAW that supports coding like this internally or a library that allows you to send MIDI events to an external synth, sampler, or DAW. That would also be acceptable.

    tl;dr: I essentially want to write a very basic sampler/drum machine with polyphony, or take an existing sampler/drum machine and send it MIDI info via programming language. For some reason I'm having trouble finding existing info on how to accomplish this and I need guidance.

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

    i need to make a function that can return true even if the variable are exactly matching

    Posted: 10 Oct 2019 09:07 PM PDT

    let stringsPrettyMuchMatch = function ( str3, str4 ) {

    if (str3 === str4) { return true 

    } else if (str3 != str4) {

     return true 

    } else if (str3 !== str4) {

     return false 

    }

    }

    console.log( stringsPrettyMuchMatch("Oliver", "Oliver") );

    console.log( stringsPrettyMuchMatch("Oliver", " oliver ") );

    console.log( stringsPrettyMuchMatch("Oliver", "Oilvre") );

    how would i get the middle console.log to log true even though they aren't exactly the same, if possible point me in the right direction dont just give me the answer please

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

    Comparing elements of same array in Java?

    Posted: 10 Oct 2019 08:59 PM PDT

    Complete newbie to Java here! I'm coding a program that takes user inputs (type double, btw) and stores them in an array, then compares all of the numbers against each other to find the highest and lowest numbers. So far, I've managed to make it compare which number is larger than which, but it seems that the result is not permanently stored for the highest/lowest number in the array.

    Any tips on how to correctly fix it up? Many thanks!

    Edit: Included code snippet.

    /////Codes start here/////

    double highScore = 0.0; double lowScore = 0.0; double score[] = new double[8]; //Setting array size. for (int l = 1; l <= 7; ++l) //Loop 7 times { System.out.print("Please enter a number for comparision: "); Scanner scoreInput = new Scanner(System.in); score[l] = scoreInput.nextDouble(); //Assigning user's input to array. } //Loop to compare elements of array to find highest and lowest number for (int l2 = 0; l2 < score.length; ++l2) { for (int l3 = l2 + 1; l3 < score.length; ++l3) { if (score[l3] < score[l2]) { lowScore = score[l3]; highScore = score[l2]; } if (score[l3] > score[l2]) { lowScore = score[l2]; highScore = score[l3]; } } } 
    submitted by /u/DevilJoJo
    [link] [comments]

    Help with recreating TI-84 Plus CE Memory Management Menus

    Posted: 10 Oct 2019 08:59 PM PDT

    I recently got into TI-Basic as it is a simple language and am writing many programs to solve algebraic problems. Some teachers delete the programs at my school by going into "mem" on the calculator which where you can manage the data stored on the calculator. I wanted to recreate these menus in a program so it looks like I don't have any when the teacher checks.

    That's the back story. So far I have been using getKey and the Menu( functions to get around the menus but getKey has caused some issues. I would like to have the Memory Management/Delete Archive menu work but I've been unable to do that and I haven't been able to create another getKey so I can select programs in that menu.

    Here is my current code:

    ClrHome While 1 getKey→Z If Z=95:Then Menu("Memory","About",1,"Mem Management/Delete...",2,"Clear Entries",3,"ClrAllLists",4,"Archive",5,"UnArchive",6,"Reset...",7,"Group...",8 Lbl 1 Stop Lbl 2 Disp "RAM 72815" Disp "ARC 1684K" Disp "1:All..." Disp "2:Real..." Disp "3:Complex..." Disp "4:List..." Disp "5:Matrix..." Disp "6:Y-Vars..." Disp "7:Prgm...":End End While 1 getKey→Z If Z=72:Then ClrHome Disp "RAM 72815" Disp "ARC 1684K":End End 

    The Disp's are recreating the Mem Management/Delete... section of the menus. I want to select "7" which is where the programs are stored but when I try to select "7" when testing it doesn't do anything. What am I doing wrong and is there a better way to do this?

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

    How do I create a programming language?

    Posted: 10 Oct 2019 08:58 PM PDT

    I want to create a language(in my native language) and I don't know where to start.

    I'm asking what lines of code, where and with what do I need to run a little bit of the programmer???

    Edit: I already know to program and looked at a lot of tutorials but they didn't explain literally how to do it only that I need a parser lexer and such and such.

    Edit 2: I want to pretty much change just the syntax

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

    Feeling super overwhelmed. Technical Interview for AI Company Coming

    Posted: 10 Oct 2019 08:16 PM PDT

    Hi /r/. I'm a junior at a school in the states, I manage to get an interview for a summer intern position at an AI company. However I need some guide on where should I tackle to prepare for the interview. It will be in python. I'm a junior year, the position aimed for junior year as well. Below are the descriptions

    Software design problems. Graph theory, algorithms and data structures.

    Any help will be much appreciate thank you.

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

    I read all the FAQ's but I didn't really get an answer to where I can start learning to code for free?

    Posted: 10 Oct 2019 07:51 PM PDT

    Currently I work as an accountant so obviously that comes first but the possibilities with programming seem potentially limitless. I'm not looking to sink loads of money into a side project that could potentially lead to nothing but I would love to learn how to code but I can't seem to find a place to start that isn't going to cost me $30 a month. Honestly, I'm really interested in learning how to operate with Javascript so if you guys have any resources that will let me use Javascript for free I would really appreciate it.

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

    No comments:

    Post a Comment