• Breaking News

    Wednesday, October 2, 2019

    When learning, don't just type out the code... learn programming

    When learning, don't just type out the code... learn programming


    When learning, don't just type out the code...

    Posted: 01 Oct 2019 09:12 AM PDT

    Took me a while to realize that just typing out the code from the tutorial wasn't enough.

    You gotta PLAY AROUND with it, change some things here and there and see how it affects the program.

    This has helped me solidify my understanding of the concepts that the tutorials/textbooks toss at me.

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

    Can anyone ELI5 hard coding?

    Posted: 02 Oct 2019 01:08 AM PDT

    As the title states

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

    Get started with Open Source Contributions and earn a T-Shirt

    Posted: 02 Oct 2019 12:35 AM PDT

    This years Hacktoberfest started yesterday and lasts until the end of the month!

    It's a great opportunity to learn about Pull-Requests and get your first contributions to open source projects.

    For beginners there are special curated lists of easy pull requests to help get you started. I encourage everyone to sign up and get those 4 Pull Requests for the T-Shirt.

    All you need is a GitHub account and basic prior programming experience.

    Start here!

    *I'm in no way associated to Digital Ocean or the Hacktoberfest, I just think it's a great opportunity to learn and contribute.

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

    Ive been learning the basics of web development. Learned some HTML, then some CSS, got discouraged by how much I think it sucks, now learning and enjoying Javascript.

    Posted: 01 Oct 2019 11:26 PM PDT

    Is this a pretty common sentiment or not?

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

    Trouble grasping the concepts of how web applications work in java.

    Posted: 01 Oct 2019 03:57 AM PDT

    I recently started as a junior developer as a full stack developer having never used frameworks or built applications in school.

    The intricacies of how information is passed around and handled between services is daunting, and I feel I have no intuition. Yes, I know, I am new at this, but it sucks not knowing where to start to understand.

    I'd like advice on topics I could read about and projects that could help me practice.

    Please let me know what you need to know from me to help you help me.

    Thank you for reading.

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

    I'm a noob need help with python

    Posted: 02 Oct 2019 12:50 AM PDT

    Is it possible to grab a like from a txt example. bread:toast < (this is the line) i want to make it so it will read the line than automaticly do user = bread and pass = toast i want to make a mail service and also for the experience for future projects sorry for my bad wording

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

    Error: Type Specifier

    Posted: 01 Oct 2019 05:16 PM PDT

    In the following screenshot, I get an error that says c++ requires a type specifier. I thought that I declared car_info in line 54 of type Car pointer. How can I improve this code?

    https://i.imgur.com/zUcK983.png

    submitted by /u/2kfan
    [link] [comments]

    How do i pass value from menuItem() to executeMenuItem()

    Posted: 02 Oct 2019 12:39 AM PDT

    This is an java assignment, so I cannot change the methods or their parameters

    Here's the code:

    public void launch() 

    { displayMenu(); executeMenuItem((displayMenu())); } private int displayMenu() { System.out.println("Enter the selection from the following menu:"); System.out.println("1. Save appointments"); System.out.println("2. Get appointments"); System.out.println("3. Display schedule"); System.out.println("0. Exist program"); int choice = scan.nextInt(); 

    return choice;

    } 

    private void executeMenuItem(int choice) { 

    switch(displayMenu())

    {

    case 1:

    {

    System.out.println("ajsdjkavf");

    }

    }

    } 

    i have no idea what i've done is correct or not , some suggestions will help me along the way

    btw when i run the program and use the case 1, this is my output:

    Enter the selection from the following menu:

    1. Save appointments
    2. Get appointments
    3. Display schedule
    4. Exist program

    1

    Enter the selection from the following menu:

    1. Save appointments
    2. Get appointments
    3. Display schedule
    4. Exist program

    1

    Enter the selection from the following menu:

    1. Save appointments
    2. Get appointments
    3. Display schedule
    4. Exist program

    1

    ajsdjkavf

    I had to input 1 several times and if someone could explain why did this happen , that'll really help me

    Edit: what I really meant was displayMenu not menuItem

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

    Can building long projects tutorial be helpful ?

    Posted: 02 Oct 2019 12:33 AM PDT

    Should i watch tutorial that are long and clone apps like Uber, Snapchat, or some other apps that are made by the instructor themselves and not just clones but are also very long, will i gain any knowledge building aside with them, and i know for sure that if i am just typing what the instructor is saying without even giving it a second thought i for sure won't gain any knowledge and won't even know how "my" app even work, but i am talking about when you try to understand what the instructor is doing and taking notes alongside.

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

    Have I missed something while learning Java?

    Posted: 01 Oct 2019 06:29 PM PDT

    I'm currently in my freshman year of college and taking an introductory Java course. Up until last week I had been coasting on knowledge I gained in my three years of Java programming classes in high school (including AP Comp Sci I). When we hit TreeMaps and HashSets in college I was interested, but not worried, ArrayLists in AP hadn't posed too much trouble for me. But as recently as last week the projects we've been getting assigned in my Java course have just straight up stumped me. I feel like there's something I'm missing. Even though I understood the material in high-school, it's not like it just clicked with me like it did with some of my peers. I struggled to understand what I was doing back then but still did well besides major group projects in which I had to look to the internet and my group members to get through a program. I feel like I'm at a point where I can solve the java problems in my book and on my homework with little to some effort but as soon as I do a project, it's just line of faulty code after line of faulty code. So, is there something I might have missed along the way? Or am I just being stupid about the way I go about things?

    TL;DR: Despite 3 years of Java classes, I understand the technical side of what I've learned but can never seem to put it to practical use within projects. Is there something I'm missing.

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

    Front-End Framework for beginneres

    Posted: 02 Oct 2019 12:11 AM PDT

    What's the easiest Front-End Framework to learn for someone who has never programmed a web application before? I need to learn this for a small project for a course in collage (it's done in teams). We'll do the Back-End in Spring Boot and we'll also use HTML and Bootstrap. And just to mention, I have some experience with C, Python and Java.

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

    What Vi settings do you guys use?

    Posted: 01 Oct 2019 06:12 PM PDT

    Hey guys - so this is tangentially related to programming. Over the last few days at work, I've been moving from jetbrains products to Vim just to try to widen my skill set and maybe pick up some useful knowledge (actually has been kinda helpful, with learning how to write more intricate bash functions).

    What settings, extra functions, etc do you guys use? Trying to stay away from plugins at least at the start, because you never know when you'll remote into a box and only have stock Vi. Currently the few things I've written is a project wide grep (to imitate the search in project function of jetbrains), and customized the colors a bit.

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

    How to make an api call in cpp?

    Posted: 01 Oct 2019 11:51 PM PDT

    I'm new to c++ programming, I have an endpoint url and to which I have to post some values, for eg a count. How can I achieve this task. Any help would be appreciated. Thanks.

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

    What should I upgrade to from Access Database VBA?

    Posted: 01 Oct 2019 06:43 AM PDT

    I know this will make you actual programmers cringe but I have spent the last 2 years coding a huge variety of data management and collection tools, all of which are powered using Access VBA.

    Lately though, as things get more complex, Access starts having issues that I can't resolve other than closing and restarting.
    I know how to construct SQL queries so I know that can be switched to a dedicated SQL platform.

    My issue is that I don't know what to do about all of the reports, special functions, and exports I have created thus far?

    Would it be best to Keep Access as a front-end for these operations but move the actual database to a true SQL server OR is using Access in the first place a huge mistake.

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

    Should I Iinstall python packages only in venv?

    Posted: 01 Oct 2019 11:40 PM PDT

    Hello

    I was trying recently to get familiar with virtual environments and I was a little confused with it, and then I discovered that Pycharm can make virtual environments automaticly which would save me from missing with the terminal stuff, but my proplem is that when I wanted to run my script (which I wrote in pycharm) from terminal, I got an error about missing packages which then remined me that I only installed packages in PyCharm for the specific virtual environment.

    So my question is, if I shouldn't install packages loosely in the system, then how am I supposed to run the scripts which needs those packages? because running them always from the IDE doesn't look very efficent, and if someone uploaded his script to github and I downloaded it, how am I supposed to run it if I don't have the packages (and this quiestion applies to me too, if I uploaded a script that needs the requests package, how other people are supposed to run it)?

    Thanks.

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

    How to Work Through SCIP Structure and Interpretation of Computer Programs

    Posted: 01 Oct 2019 03:59 PM PDT

    I've started reading SCIP and watching Brian Harvey's CS61A Lectures as recommended here.

    What is my best option for a Scheme interpreter? I can either use Windows 10 or Debian Linux so really anthing is an option. I think I saw Racket recommended somewhere?

    Second, how did you check that your solutions to the exercises were correct?

    Thanks

    edit: so far I've just done the first few exercises with paper and pencil. I definitely need a scheme interpreter though right?

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

    Basic question on outline for java class

    Posted: 01 Oct 2019 11:10 PM PDT

    Here is the class in question.

    I know that the first line means a private string named testString. I know that the last line means a public method named isPalindrome that returns a boolean.

    What is the second line saying? Is that just the class? Why does it take an argument of String? Thanks in advance to anyone who can help. I've done programs off of these outlines before but its been a while.

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

    Tkinter waiting for button to be pressed

    Posted: 01 Oct 2019 11:04 PM PDT

    In my tkinter program, I have a game-playing computer. The user has to enter their move into an entry box, and that entry is collected when a button is pressed. How can I get my program to stop running until the user has pressed the button?

    class ChessEngine: def __init__(self): self.a = GameState() self.master = Tk(className='Chess Engine') self.canvas = Canvas(self.master, width=630, height=570) self.canvas.pack(side='top') def update_display(self, board): button = Button(master = self.master, text = 'Submit move', font = ('Helvetica', 20), command = self._on_button_pressed) button.pack(side='bottom') self.p = Entry(self.master) self.p.pack(side='bottom') self.d = Entry(self.master) self.d.pack(side='bottom') self.master.mainloop() def _on_button_pressed(self) -> str: origin = convert_move(self.p.get().strip()) destination = convert_move(self.d.get().strip()) return origin, destination def run(self): # here, I want to call a function on p.get() and d.get() pass # How do I collect what the user entered in self.p and self.d when button is pressed? if __name__ == '__main__': ChessEngine().run() 
    submitted by /u/rinseits
    [link] [comments]

    Cloning a form

    Posted: 01 Oct 2019 10:34 PM PDT

    So, I wrote a function in JS to clone an element with a button. However, I want to clone a form so I can have multiple forms but I only want 1 submit button that submits all the data in every form.

    How do I achieve this kind of result?

    So far, I tried to clone a div in a form so that there are multiple divs in one form with one submit button. But my colleague (backend dev) wants the data of something like a nested form where there are multiple forms inside one big form.

    Thanks.

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

    How to read really long error logs?

    Posted: 01 Oct 2019 10:26 PM PDT

    I tried running a complete web app I generated with yeoman. It has a frontend, backend, db - everything. It's bigger than everything I have ever built, and here is the extremely long error log.

    This monstrosity is just short of 600 lines long! My questions are:

    1. How do you figure out what is wrong in a reasonable time without skimming through the entire thing?
    2. How do you filter all the useless dependencies errors? If you screw up one method call the logs may list 100's of error stack traces of half the NPM repo. How do you make the IDE (intellij) show what you need?
    submitted by /u/BigBootyBear
    [link] [comments]

    Why does Oracle donate their code to open source?

    Posted: 01 Oct 2019 08:48 AM PDT

    I read that Oracle donated Java SE code as the basis of OpenJDK and Java EE code to make Jakarta EE. Why is it that Oracle would donate their code to create what appears to be Open Source competition?

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

    Need Help

    Posted: 01 Oct 2019 10:07 PM PDT

    Hello guys. I know this may sound stupid but my school just sent me to get some "job experience".

    Well the company has me building contact databases by hand from google and some other sites. Go on a site,find contacts,copy,paste,repeat.

    Rather easy, right ? Wrong. I will be doing this for 2 f*cking weeks 400 a day.

    So the question is. Is there any script or program that could make this easier ? Or even automatize it ?

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

    Noob question

    Posted: 01 Oct 2019 06:24 AM PDT

    Hi guys! Im just beginning to learn java and i came across an exercise with the line below:

     System.out.println(1 + 2 - (3 * (4 / 5))); 

    When i run it the result shows "3". In my mind this operation results in 0.6 (my maths are awful :D)
    I know im doing something wrong but i can't figure it out. Thanks for the help!

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

    Unexpected output from printf replacement in C++

    Posted: 01 Oct 2019 05:46 PM PDT

    using namespace std; string input; cout << "Hello World!\n"; cout << "Type something on the next line\n"; cin >> input; printf("This is your input: %s \nand now the number 33: %d", input, 33); 

    The output will look something like this:

    Hello World! Type something on the next line [input = "Something"] This is your input: $ⁿo and now the number 33: 1701670739 

    I decided I needed a refresher on coding and this is the first wall I've hit.

    • hard coding a string into the replacement character works
    • using cout and inserting the variable 'input' instead of using the printf statement also works

    I'm sure I'm forgetting something fundamental about something here, but I couldn't figure it out by looking at the docs for printf or cin.

    Hopefully something will stick out to someone here because I need to walk around for a few minutes or I'm going to get a headache.

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

    [Prolog] Creating classes for an inference engine

    Posted: 01 Oct 2019 09:30 PM PDT

    I'm currently working on an inference engine for an academic project. Based on the name of some of the variables, I'm going to clarify: my project is 100% legal. It is being done and conducted solely on my network and the school's network with their authorization. The project is an automated semi-intelligent cyber attacker within an isolated network against a vulnerable system. I'm using swi-prolog to create an inference engine (this is the intelligence aspect of my project). My biggest issue is that I've never used prolog in my life and it's quite different to learn. I'm asking for help understanding why my current code is not outputting what I think it should be outputting, and how I can improve it.

    So far, I've been creating initial classes for what the inference engine will be looking for. I have:

    data(msfpc,Files) :- password(Files), log(Files), network(Files), ipaddress(Files), filetype(Files), port(Files). password(passwordfile). password(shadowpasswordfile). password(locallysavedpasswords). password(browsersavedpasswords). log(syslogs). log(applogs). log(networklogs). log(firewalllogs). network(connections). network(firewallinuse). network(securityprotocols). network(routertype). network(packetprotocols). ipaddress(savedips). ipaddress(localhost). ipaddress(routerip). ipaddress(globalip). filetype(text). filetype(ppt). filetype(word). filetype(excel). filetype(c). filetype(py). filetype(pl). filetype(java). filetype(access). filetype(outlook). filetype(oneNote). filetype(tar). filetype(zip). port(openports). port(closedports). port(portsinuse). port(porttype). port(tcpports). port(udpports). 

    Calling ['InferenceEngine.pl']. returns true, meaning the file is being read properly. If I then type data(msfpc, X). it returns false. I don't completely understand why, and if anyone has any clue please let me know! Thank you in advance.

    EDIT: Code & post formatting

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

    No comments:

    Post a Comment