• Breaking News

    Monday, June 3, 2019

    Learn Beginning JAVA in a FREE 6 hour Game Programming Course! Create Games like a Maze, FlappyBird, Snake, Piano, and Frogger. learn programming

    Learn Beginning JAVA in a FREE 6 hour Game Programming Course! Create Games like a Maze, FlappyBird, Snake, Piano, and Frogger. learn programming


    Learn Beginning JAVA in a FREE 6 hour Game Programming Course! Create Games like a Maze, FlappyBird, Snake, Piano, and Frogger.

    Posted: 02 Jun 2019 05:14 AM PDT

    HERE is a link to the video.

    This is a JAVA course for absolute beginners. We will not only create games but discuss vocabulary, notes, and have full explanations throughout. This is a fun way to cover basic JAVA programming concepts all while creating a Maze, FlappyBird, Snake, Piano, and Frogger using the Greenfoot software (Java learning software). I have taught HS Java Programming for the last 4 years and use these lessons in the classroom and wanted to share!

    NOT JUST TUTORIAL VIDEOS

    We will cover the following Java Programming concepts...

    Classes and Objects

    Methods

    If-Statements

    Variables and Data Types

    Java Operators (Assignment, Relational, Arithmetic, Logical)

    Void and non-Void Return Types

    Constructor Method

    Passing Parameters

    Greenfoot and Java API Libraries

    Inheritance

    Loops

    Arrays

    Please post any questions below and I hope you enjoy!

    HERE is a link to the video.

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

    Learning Python

    Posted: 02 Jun 2019 06:02 PM PDT

    Hi everyone, I've recently started learning Python from this course in Udemy.

    https://www.udemy.com/python-the-complete-python-developer-course/

    It suggests using IntelliJ IDEA as a IDE, do you think its good for a newbie or should I start using another IDE?

    Also any additional resources for learning Python would be greatly appreciated.

    Thanks a lot!

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

    I created a little voice recognition app in the browser that hates you.

    Posted: 02 Jun 2019 10:29 PM PDT

    Since we have access to these new apis I taught I would film a mini tutorial for those who are interested in how speech synthesis and voice recognition work in the browser.

    I added a small twist for it to generate sarcastic responses. https://youtu.be/lq7tFgvdf4k

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

    Should I switch from c# to a more hireable language?

    Posted: 02 Jun 2019 06:32 PM PDT

    I have a very basic understanding of c# from a module at university and also a coupe of years using it in the programs Unity and Fmod (gave up on a career being a sound designer due to an over saturated market)

    I really want to get a career in programming and I'm willing to invest a couple of years into learning. I'm wondering if I should switch to a language to that is more universally hireable? If so can anyone recommend a path for me to follow?

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

    Learn to code for machine learning with Java

    Posted: 02 Jun 2019 11:20 AM PDT

    I have been working on a book for past 6 months to spread the word about JVM based AI programming practices.

    This cookbook will help you to "code for enterprise" rather than just writing machine learning code for academics. It aims to build an intermediate knowledge on deep learning (an advanced machine learning approach) along with a recipe based practical approach to practice while you read. The book is still under construction and will be released on or before September 2019. However the codebase is available for you to learn and explore:

    https://github.com/rahul-raj/Java-Deep-Learning-Cookbook

    Feel free to clone and practice on your local. Codebase is regularly updated as the book progresses.

    If you wonder why Java for machine learning, then you may read here.

    You may need to have the following recommended learning curve to make the most out of it:

    • Basic/Intermediate knowledge on Java
    • Basic knowledge on deep learning
    • Basic knowledge on deeplearning4j(Deep learning library for Java)

    Their website have all the details you need in the form of tutorials, examples etc.

    Even if you dont intend to learn deeplearning4j, that's okay, they also teach you deep learning in their website!

    Any info that was missed to include in chapters, will be included in the GitHub README section sooner or later. It's time to move on from novice to intermediate programmer :)

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

    Created my first chrome extension, need feedback. (Search any website directly from the chrome address bar)

    Posted: 02 Jun 2019 06:27 PM PDT

    So i was really impressed by the bangs functionality on duckduckgo and decided to import it on google chrome. So lets say you wanted to search for eminem on youtube, what you would normally do is open youtube.com and then search on it but with this extension you can directly type ! y eminem and it will directly take you to youtube.com's eminem search. Now it is not only limited to youtube, you can see the list of all the available websites and their associated shortcuts in the description of the extension.

    Here is the link and source code of the extension. All the criticism/requests are more than welcomed.

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

    Schotastic Gradient Descent giving slightly wrong weight coefficients?

    Posted: 02 Jun 2019 08:06 PM PDT

    I am trying to make a model of the function 2f(x-1)+1 where f(x) is defined as the max of (0, x). The form of this equation is c f(ax + b) + d and my task is to recover these coefficients, which are a = 1, b = -1, c = 2, d = 1. I generated a dataset of 200 points from x: [-10, 10] and the corresponding y values and then ran stochastic gradient descent on it to recover these four coefficients. However, it resulted in these approximate values: a = 2.6, b = 1.4, c = 0.62, d = 0.7 which creates a similar graph but not close to exact. I have attached a picture of the dataset versus generated model which you can see, almost lines up. What can I do / how can I improve my method, while still using stochastic gradient descent, in order to recover the proper coefficients of 1, -1, 2, 1?

    Picture of graph: https://imgur.com/a/0cfBMCE

    Code:

    import numpy as np import matplotlib.pyplot as plt import warnings warnings.simplefilter(action='ignore', category=FutureWarning) def generate_data(): dataset = list() s = np.random.normal(0, 0.1, 201) x_vals = np.linspace(-10, 10, 200) count = 0 for i in x_vals: dataset.append([i, func(i) + s[count]]) count = count + 1 return dataset def func(x): return 2 * theta(x - 1) + 1 def theta(z): if z > 0: return z return 0 def stochastic_gradient_descent(data, alpha_rate = 0.01, step_num = 5000): coef = [0.0, 0.0, 0.0, 0.0] for step in range(step_num): sum_error = 0 for row in data: yhat = coef[2] * theta(coef[0] * row[0] + coef[1]) + coef[3] error = yhat - row[1] sum_error += error**2 coef[0] = coef[0] - alpha_rate * error * 4 * row[0] / 201 coef[1] = coef[1] - alpha_rate * error * 4 / 201 coef[2] = coef[2] - alpha_rate * error * 2 * (row[0] - 1) / 201 coef[3] = coef[3] - alpha_rate * error * 2 / 201 return coef def plot_points(data): x = list() y = list() for pair in data: x.append(pair[0]) y.append(pair[1]) plt.scatter(x, y) def plot_line(coef): x_bestfit = np.linspace(-10, 10, 200) y_bestfit = [coef[2] * theta(coef[0] * i + coef[1]) + coef[3] for i in x_bestfit] plt.plot(x_bestfit, y_bestfit) dataset = generate_data() coef = stochastic_gradient_descent(dataset) print(coef) plot_points(dataset) plot_line(coef) plt.show() 
    submitted by /u/CresentSkull
    [link] [comments]

    Cant get motivated enough to learn, anyone on the same boat?

    Posted: 02 Jun 2019 05:07 PM PDT

    Im learning through App Academys free program, I started back in December. 2 months go by and its February and I felt I needed to take a little break. So I stopped for a week, tried to get back into the rhythm and I did for a day or two but I kept getting distracted other things (I watched GoT, dbSuper, and binged other shows) . Now im I have no distractions, but I still can't get into it, reddit still distracts me. Recently I had to dig into my savings and im pretty broke right now and I don't have money to spend on anything so I feel its the perfect time to get back into it!

    Maybe its the vibe I get from where im working? I try working in my room but I feel claustrophobic since my room is really small, I also try doing stuff outside on my yard since I set up a tarp to block out the sun and have a comfy chair. How do you guys work?

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

    How to do dom manipulation in frontend loop?

    Posted: 02 Jun 2019 07:34 PM PDT

    I am not familiar with javascript/html and now I want to do a one-page app. It would get a list of data from backend and perform loop on them. In each iteration, the data would be put into some labels and buttons. After it fulfilled some criterias ( clicked the correct button ), fetch next value from the list and update the labels. How should I do it? JQuery?

    Thanks.

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

    How to send a string from servers to clients in python using json? (json.dumps(string))

    Posted: 02 Jun 2019 09:41 PM PDT

    I'm trying to send a specific string over from a server to a client (using sockets).

    I tried doing something like this:

    string = "randomtext" conn.send(json.dumps(string)) 

    However, I receive an error (on the server side):

    Unhandled exception in thread started by <function threaded_client at 0x0123B9C0> Traceback (most recent call last): File "C:/Users/mirak/PycharmProjects/JsonEncodedTicTacToe/server.py", line 46, in threaded_client conn.send(json.dumps(player)) # Sends either "X" or "O" to the client TypeError: a bytes-like object is required, not 'str' 

    I'm not sure why this isn't working. I'm pretty sure json allows you to serialise strings. Any help is welcome.

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

    Advice: Programming for Research -- beginner

    Posted: 02 Jun 2019 07:27 PM PDT

    Hey everyone!

    I will need to learn Python for a lab research internship this summer, and I had a few questions about learning to program as a beginner.

    1. Is Python a good first programming language? (What are other useful languages for scientific research / in general?)

    2. How quickly can someone master Python? (#hrs per day for a fast learner)

    3. Recommendations for quality (free) resources and general advice

    Thanks, any help would be greatly appreciated!

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

    Learn Games Programming in Unity3D (Free Tutorials with Videos)

    Posted: 03 Jun 2019 12:06 AM PDT

    All available at this link

    There are multiple instruction videos and exercises, with GitHub links in some of the descriptions.

    Contents include:

    1. Work-space Walk-through
    2. Creating GameObjects
    3. Creating the User Interface
    4. Importing Assets (and LeanTween)
    5. Easing with LeanTween
    6. Understanding Execution Order in Unity
    7. Creating your First Game
    submitted by /u/SammyStami
    [link] [comments]

    Where do you see the future of JS desktop development (electron, nw.js, etc.) going?

    Posted: 03 Jun 2019 12:01 AM PDT

    Electron seems to be the latest hot trend in GUI. The traditional ways of developing GUIs like Qt/GTK, WinForms/WPF, JavaFX/Swing, etc. have taken a back seat though they are actually more performance driven (and portable across platforms too with a little effort).

    But JS has the advantage that you can use your front-end skills in HTML/CSS/JS and bring it to desktop development. But the real question is will these JS apps thrive when the complexity/scalability increases and performance becomes a needed criteria?

    I think this question actually begs another question, where do we stand with respect to hardware affordability? Moore's law seems to be exhausting, hardware isn't getting cheaper and cheaper these days like it used to. And besides, vulnerabilities like spectre and meltdown are sending the Intel chips backward in time and performance. As hardware gets costlier and costlier, my thinking is that the "old ways" of Qt/WinForms/WPF might actually see a revival in the near term.

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

    Recommender System for a Car that Won't Start

    Posted: 02 Jun 2019 11:41 PM PDT

    I don't know if this is the right place to ask this or not. I need help/pointers in developing the above system. I am a college student and my supervisor switched my project.

    I was to graduate last year but I didn't because of that project. I have been searching everywhere but still I can't seem to figure out how to go about it.

    In my research I mostly got Recommender systems which e-commerce websites like amazon use but nothing like the above. I have to submit the project this month & I got nothing yet. I will appreciate any help.

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

    Im a beginner and have learned HTML/CSS but forgot a handful of information and would like to learn many more languages. I just had a few questions. Thank you :)

    Posted: 02 Jun 2019 05:01 PM PDT

    I learned HTML/ CSS summer 2018 and wanted to pick up programming again. Is there a specific order to learn a language? If so, what are all the languages and in which order should I learn? How do I retain what I learned, forgot a handful of what I learned from HTML/CSS. My end goal is to be able to learn swift to create mobile apps, I have a vision for a couple apps and learning how to code is one hindering obstacle.

    submitted by /u/BMTG-R3-19
    [link] [comments]

    [Windows Forms C#] How do I create a tool when an event occurs?

    Posted: 02 Jun 2019 10:56 PM PDT

    For example when a button is pressed, I want 4 panels to be made. I tried to like panel.create or something but that doesn't exist.

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

    Learn PHP in Under 15 Minutes!

    Posted: 02 Jun 2019 04:07 PM PDT

    Hello everyone! I uploaded a tutorial on how you can learn the very basics of PHP in just under 15 minutes provided you have minimal coding background.

    Specifically, it covers the following: string output and concatenation, variables, operators, if/else statements, loops (for, while, foreach), arrays (indexed, associative arrays) and basic GET/POST HTML form handling.

    I would like to ask for your genuine feedback regarding the video since this is my very first attempt at a well-planned tutorial video. If you feel like I missed something in the video or I didn't cover, feel free to let me know!

    The video is available here: https://www.youtube.com/watch?v=ysJjgzcZOPY

    Looking forward to your feedback guys!

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

    i need some help with my C program, there are logic errors but i cant find them

    Posted: 02 Jun 2019 09:58 PM PDT

    hello my fellow redditors. I've been working on a program as a side project, this program is supposed to accept the scores of ten students, and output the highest, lowest and average scores.Here is the code below.

    #include<stdio.h> main(){ int score, high, low, marks[10], total, i, j; float average; i = 0; j = 10; high = -999; low = 10000; for(i = 0;i <= j; i++){ printf(" please enter the score of the students from 25 - "); scanf("%d", &score); if(score< 0){ printf("that is an invalid value\n"); } else if(score>25) { printf("that is an invalid score\n"); } else { total = total + score; } } average = total/10; printf("the average score was %f",average); for(i = 0;i <=j; i++){ if (marks[i]>high){ high = marks[i]; } else { high = high; } } for(i = 0;i <=j; i++){ if(marks[i]<low){ low = marks[i]; } else { high = high; } } printf("the highest score was %d",high); printf("the lowest score was %d",low); 

    }

    when i run this code however, it always gives the wrong output. for example, if the test data was 21,23,25,19,1,13,16,22,17,18, & 12 then the average score is returned as 18, the highest score as 1464293792, and the lowest score is returned as -1291244144. can someone tell me what the issue is and how to fix it?

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

    [Bash][code review] Script to encode images in base64 and generate a CSS file

    Posted: 02 Jun 2019 05:57 PM PDT

    Hi, everyone. I've been lurking around here for a while, but never pulled the trigger and started seriously learning any language. But now I've been tinkering with some webdesign, and thought this might be a good opportunity to try to write a simple bash script that would automate this thing for me. So after a couple of days of furious googling, it's done, and it's working as expected.

    I'd greatly appreciate if someone could take a look at it and share their thoughts. What I'm mostly curious about is the overall logic and structure of the code. The whole script grew organically from me looking up the Bash constructs and figuring out how to combine them to do what I want, so I don't know how sensible it is from the programming standpoint.

    https://pastebin.com/U8RYvGER

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

    How do syscalls in OSes actually work?

    Posted: 02 Jun 2019 10:23 AM PDT

    Hey guys, I'm finishing up an OS class and have learned a ton. Something that's still weighing on me though is that I don't feel I fully get syscalls. The idea I learned behind them kind of makes sense - add a layer of abstraction, basically extend user applications an API that gives them "some" level of control of the OS. So things like forking, creating threads, etc. are "requests" a user app can make to the OS through a syscall. What I'm still not sure about is, how do the syscalls protect the OS from defiant user apps?

    When a user app makes use of a syscall and it traps into kernel code, are there just some common rules that will make the kernel either grant the request or deny it? AKA, what's to say a clever developer couldn't find a way to hack around what the OS allows? For example, we want address spaces per process to be separate and not allow another process to write to another's address space. However, we also want interprocess communication/shared memory sometimes. So, why does having syscalls resolve this issue? Can't a malicious process try to "communicate" with another but really read/write data from it?

    The common explanation of syscalls is that we can't let a process directly access disk, network card, etc. But how can the kernel know what would be safe to let the process interact with and what wouldn't? Nothing I've seen indicates the kernel is "smart" or can get a context of what an application needs/doesn't need to access.

    Thanks so much

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

    What is a practical use of abstraction?

    Posted: 02 Jun 2019 09:38 PM PDT

    Recently, a teacher asked me " What is abstraction?"

    I gave him the book definition. " Hiding of unnecessary information......"

    He asked for the practical use of it. I gave him the television example. We only care about the image that is displayed on screen, what goes behind that screen is hidden from us.

    He then asked me that this was the case with every gadget. What new did abstraction bring to the table?

    Just for the sake of answering i told him about getter and setter methods and access specifiers.

    what can java do with abstraction that C can't and what is the effect on the final product?

    I searched on the Internet and couldn't find any satisfying answer. Please explain.

    While you are at it, please explain the other OOP features also. ;-)

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

    What is a good way to get a head start on CS A-level after GCSE?

    Posted: 02 Jun 2019 05:35 AM PDT

    I just completed my computer science GCSE (python) and will be starting the A-level course in September.

    For the A level course we can choose what programming language we want to study and am up for suggestions

    I generally enjoy learning topics/programming and was wondering where I could get a head start on my Post-16 education?

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

    edX CS50 vs YouTube CS50

    Posted: 02 Jun 2019 06:48 AM PDT

    I've done a bit C enough to know the very basics, and I was thinking about trying out CS50. Which one should I use though, edX CS50 or YouTube CS50? And if YouTube, is there a difference between the 2018 one and the 2019 one?

    Thanks

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

    C# DataTable Search

    Posted: 02 Jun 2019 08:53 PM PDT

    private void btn_GetFile_Click(object sender, EventArgs e)

    {

    ofd.Filter = "DAT File|*.dat"; // only let user select DAT files

    if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) // if the user selects a file do code below

    {

    tbx_DatLocation.Text = ofd.FileName; // set the filename of the file as text to the textbox

    List<string> lines = File.ReadLines(tbx_DatLocation.Text).ToList(); //create a list of strings and store the all rows of text into "lines" List

    //headers

    DataTable dataTable = new DataTable();

    string headerRow = lines[0]; // get headers

    string[] headerNames = headerRow.Split('|'); // stores headers as split string delimited by pipe

    foreach (string headers in headerNames) { dataTable.Columns.Add(headers); } // stores headers as columns

    //rows that are not headers

    DataRow row = dataTable.NewRow();

    for (int i = 1; i < lines.Count; i++) // start at row[1] because row[0] are the columns

    {

    string rowValues = lines[i];

    dataTable.Rows.Add(rowValues);

    }

    //give me a row of documents where expression below

    string expression = "BEGDOC='ABC123'";

    DataRow[] rows = dataTable.Select(expression);

    for (int i = 1; i < rows.Length; i++)

    {

    string foundRows = rows[i][0].ToString();

    }

    }

    DAT file consists of

    BEGDOC|ENDDOC|BEGATT|ENDATT|GroupID

    ABC123|ABC123|ABC123|ABC123|

    ABC124|ABC124|ABC123|ABC124|

    ABC125|ABC125|ABC125|ABC125|

    Basically I have a DAT file. With the DAT file, I am creating a datatable and I need to search within it. My expression doesn't give me anything. My expected result from this expression is:

    ABC123|ABC123|ABC123|ABC123|

    In the long term goal, I need to populate the "GroupID" field with the "BEGATT" field. So something like:

    if BEGATT != BEGDOC then set GroupID = BEGATT. However, this is for the end goal and I am not here yet.

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

    No comments:

    Post a Comment