• Breaking News

    Tuesday, October 30, 2018

    Machine Learning Algorithm for begiineers learn programming

    Machine Learning Algorithm for begiineers learn programming


    Machine Learning Algorithm for begiineers

    Posted: 29 Oct 2018 05:16 AM PDT

    Guys we are happy to share that we started creating Machine Learning Algorithms videos, in which we will explain each and every algorithm have a look and give your valuable feedback to us please.

    https://youtu.be/Zt83JnjD8zg

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

    I bought a whiteboard for easier brainstorming sessions, writing algorithms, equations, and pseudo-code

    Posted: 29 Oct 2018 09:22 PM PDT

    Here it is.

    I know I could use cheap paper, but why should I waste precious trees when I could use a whiteboard? It's already came to my aide once. I love it! I suggest you do the same, for your home, your office, your cave... in general, make a coding sanctuary. All I need is an RMS bubbly head. :p

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

    Is it normal to be Googling everything?

    Posted: 29 Oct 2018 01:06 PM PDT

    I feel stupid having to Google my program together, should I be trying to build my knowledge up and test myself? Should I just rely on Google?

    Doing TheOdinProject btw

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

    I told my brother to drop computer science because he's not learning anything in school and I don't think he could do it because of lack of effort. Am I right?

    Posted: 29 Oct 2018 08:43 PM PDT

    He took intro to CS, and one of his friends did it so gave him all the labs. Which I thought was just stupid. Now he's at a university that isn't that great (judging by what he's doing in his classes).

    To give you some context of the type of CS program the school he's going too is. One of his friends in class does 0 assignments himself and got an 90 on the midterm cause they quizlet'd everything.

    They've had only like 2 assignment so far, my brother didn't know how to do any of it. And he failed the java exam.

    I told him sure he can get the degree but at this rate he probably won't even have the skills necessary to get a job, and he will be exposed.

    He doesn't put the effort in, I personally think the school he's going too is a joke (Same teachers for each class, and they're all foreign and one of them is apparently hard to understand).

    He and his buddies think they can just graduate and then look everything up once they get jobs. Is this not the case? I dabbled into programming but it is not my major so I don't know as much as some of you would.

    To be honest, I think it is too late for him (once he moves on to higher level classes it will be too late I believe).

    Just now he is starting to teach himself java. Also... if he likes it shouldn't he have the motivation to do it?

    Probably not the most common post but I wanted advice from other people.

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

    What books did you study at university for Discrete Mathematics, Linear Algebra, and Calc II?

    Posted: 29 Oct 2018 08:17 PM PDT

    I have studied all these in high school, but I'm afraid I've forgotten all of them except for things like derivatives, which I doubt will have a use in computer graphics. Please tell me what books did you study for these subjects at university. I want to assess what's best for me. Also, do you recommend studying math books in English, or in my mother tongue? Thanks a lot.

    Edit: I can't just Google "book for x" here... Please don't pertain this to my laziness. I googled it indeed and was overwhelmed with the number of books out there. This way is definitely better.

    Edit 2: Also, please tell me the pace in which I should study these books. I'd say, ten pages from each everyday? Otherwise I'm afraid it might damage my programming learning path.

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

    [Python] How to sort this list in a particular way?

    Posted: 29 Oct 2018 08:33 PM PDT

    My class uses an autograder and wants a very particular form for our solution. I also feel as if this is a trivial problem but I can't quite figure it out. I currently have a list that contains some amount of a custom data structure (has a number and a list with characters), and I need to sort it such that:

    • every list is sorted with respect to these assigned numbers (I can do this)
    • every individual list in the list is sorted alphabetically (I can do this)
    • this lists are sorted alphabetically with respect to each other (I can't do this)
    • An example. My output and the expected output are different in a single spot because lists [B D], [B C], [B C D] are not alphabetical so to speak.
    submitted by /u/Remember2Flush
    [link] [comments]

    Question on how to best structure my learning plan

    Posted: 29 Oct 2018 07:49 PM PDT

    Having finished CS50x from edX, I have become very passionate about programming, and I would now like to find my niche. As a result I have pulled together some learning resources for the 3 primary types of software developing I know about and am interested in: game development, web development, and data science/A.I. Currently, My main question here is, is it best to take 2-3 at the same time, and as a result finishing 2-3 online-courses every 2 months, or rather taking 1 course at a time and finishing it at a rate of 1/3weeks. Which do you recommend?

    For those interested I am using a mix of

    Udemy [Web Development](https://www.udemy.com/the-web-developer-bootcamp/), [2D game development](https://www.udemy.com/unitycourse/)

    Coursera/edX [Machine Learning](https://www.coursera.org/specializations/deep-learning) and

    books [The Rust Programming Language](https://doc.rust-lang.org/book/second-edition/index.html) .

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

    What are common stereotypes for certain kinds of coders? (Front-end, back-end, mobile)

    Posted: 29 Oct 2018 11:25 PM PDT

    How to build and run in MonoDevelop?

    Posted: 29 Oct 2018 11:01 PM PDT

    I'm needing to teach myself C# and have installed MonoDevelop to do so. I'm having the issue that I'm unable to run scripts from within the program, as all the options to do so are greyed out. I'm wondering if there is some additional setup I need to do in order to make those options available?

    I threw together a HelloWorld.cs, which I managed to compile and run in the (system)terminal, but compiling and running in the terminal kind of defeats the purpose of having an IDE, as C# syntax is totally alien to me, and I'd be debugging in the dark if I continued with this method.

    Running MonoDevelop as root doesn't seem to change anything, so I'm fairly confident it's not an issue with permissions on the program itself.

    Any tips?

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

    How do Gameshark code encryptors like GSACrypt encrypt codes?

    Posted: 29 Oct 2018 10:25 PM PDT

    I mean literally, how does it do it? Does it use an algorithm of some sort to convert it? And what specific steps does it take to convert them? I don't understand much about encryption or decryption so I can't reverse engineer encrypted and unencrypted codes.

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

    Books/resources to learn about code structure

    Posted: 29 Oct 2018 07:27 AM PDT

    I feel like I have a good understanding of developing but am not very good at the structure of code. I have had a little experience mvc and that's something I want to look into more but are there any other good resources that go through how to structure your code properly. Even understanding some older architectural patterns would be helpful but learning some of the current ones would be better.

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

    I'm learning Vue.js and GraphQL and documenting it.

    Posted: 29 Oct 2018 10:49 AM PDT

    [Python]Mapping negative floats to non-negative integers.

    Posted: 29 Oct 2018 10:04 PM PDT

    Hey, just something I'm curious about. I have to use a program for a class project (the core program is not required to be made by me, due to the compressed timeframe and the purpose of the course being something else) to perform transformations on a set of non-negative integers. Basically: I'm creating a space-filling curve out of the ID, Longitude and Latitude values of objects.

    However, I'm using spatio-temporal data that has negative longitudes while the code I've found to do it (who I will give full credit) only works with non-negative integers. I'm trying to figure out a way to transform the values I have back and forth in a way that allows me to use the base program with minimal alterations.

    The Data looks like so:

    ID LONG Lat
    666943020 55.555555 -99.90993

    Looking over the test data the LAT is almost always positive, and the LONG negative (though I can't guarantee this over all the data) and the max number of decimal places is 5. I believe LAT ranges from -90->+90 and LONG from -180 to 180.

    I'm trying to figure out a way of transforming this data so I can create a space filling curve out of the values. Like...the best way to transform these values into non-negative integers while maintaining the information?

    Also, side question: if I do convert them to integers, do they then lose locality if I try to store them in a Hilbert curve (since, with a naive transformation (123,33,44) would be the same as (123,33,-44)? That's what I'm trying to figure out if there's a way to avoid. Is there a way to do a non-naive transformation where I can tell that some numbers are negative even when I convert them to non-negative integers?

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

    Embedded Software Engineering books?

    Posted: 29 Oct 2018 09:24 PM PDT

    So, as I go through college, I've decided that I want to go into embedded software development/computer architecture type stuff. I love low-level stuff; getting real in-tune with the hardware and whatnot with Assembly and C makes me happy.

    Anyways, creepy intro aside, does anyone know of the best embedded software/systems engineering books? I have "Low-Level Programming", and "Computer Systems - A Programmer's Perspective", along with the K&R book obviously. I really want to get Abrash's Black Book and a Compiler design book. Any recommendations? Thanks!

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

    I'm really new to programming and some feedback on this tictactoe program I wrote in python would be great.

    Posted: 29 Oct 2018 01:50 PM PDT

    C# Unit Tests expecting wrong result

    Posted: 29 Oct 2018 08:57 PM PDT

    I'm creating a simple tic-tac-toe game, and have a few unit tests set up for it. Running the tests, I've come across an interesting problem: when checking for draw or O victory as game states, it claims that the expected result is "XVICTORY" rather than the "OVICTORY" or "DRAW" that I have in the tests, and fails because it IS the result it's supposed to be. Code below.

    Edit: Issues I had to fix to solve:

    • Reverse order of test assertions (they're backwards)
    • Adjust tests to confirm O has been placed, and not just the move was successful (the turn control method I have elsewhere was still passing a temp variable as a bool instead of xTurn)

    [TestMethod] public void TestMethodXWins() { var board = Board.create(); board.move(0, 0, PieceType.PIECEX); board.move(0, 1, PieceType.PIECEO); board.move(1, 1, PieceType.PIECEX); board.move(0, 2, PieceType.PIECEO); board.move(2, 2, PieceType.PIECEX); Assert.AreEqual(board.getState(), GameState.XVICTORY); } [TestMethod] public void TestMethodOWins() { var board = Board.create(); board.move(1, 0, PieceType.PIECEX); //X O board.move(0, 0, PieceType.PIECEO); //XO board.move(0, 1, PieceType.PIECEX); //OX board.move(2, 2, PieceType.PIECEO); board.move(0, 2, PieceType.PIECEX); board.move(1, 1, PieceType.PIECEO); Assert.AreEqual(board.getState(), GameState.OVICTORY); } [TestMethod] public void TestMethodDraw() { var board = Board.create(); board.move(0, 0, PieceType.PIECEX); //OXX board.move(1, 0, PieceType.PIECEO); //XOO board.move(0, 1, PieceType.PIECEX); //XOX board.move(1, 1, PieceType.PIECEO); board.move(2, 0, PieceType.PIECEX); board.move(0, 2, PieceType.PIECEO); board.move(2, 2, PieceType.PIECEX); board.move(2, 1, PieceType.PIECEO); board.move(1, 2, PieceType.PIECEX); Assert.AreEqual(board.getState(), GameState.DRAW); } 

    And the portion that actually does the checking for victory conditions. Shouldn't be relevant, but I figure I'd include it just in case.

    private void checkAllRows() { int xCount = 0; int oCount = 0; for (int i = 0; i < 2; i++) { xCount = 0; oCount = 0; for (int j = 0; j < 2; j++) { if (squares[i, j].getPiece() != null) { if (squares[i, j].getPiece().getPieceType() == PieceType.PIECEX) { xCount++; } if (squares[i, j].getPiece().getPieceType() == PieceType.PIECEO) { oCount++; } if (xCount == 3) { state = GameState.XVICTORY; } if (oCount == 3) { state = GameState.OVICTORY; } } } } } private void checkAllDiagonals() { if (squares[0, 0].getPiece() != null && squares[1, 1].getPiece() != null && squares[2, 2].getPiece() != null) { if (squares[0, 0].getPiece().getPieceType() == PieceType.PIECEX) { if (squares[1, 1].getPiece().getPieceType() == PieceType.PIECEX) { if (squares[2, 2].getPiece().getPieceType() == PieceType.PIECEX) { state = GameState.XVICTORY; } } } if (squares[0, 0].getPiece().getPieceType() == PieceType.PIECEO) { if (squares[1, 1].getPiece().getPieceType() == PieceType.PIECEO) { if (squares[2, 2].getPiece().getPieceType() == PieceType.PIECEO) { state = GameState.OVICTORY; } } } } if (squares[2, 0].getPiece() != null && squares[1, 1].getPiece() != null && squares[0, 2].getPiece() != null) { if (squares[2, 0].getPiece().getPieceType() == PieceType.PIECEO) { if (squares[1, 1].getPiece().getPieceType() == PieceType.PIECEO) { if (squares[0, 2].getPiece().getPieceType() == PieceType.PIECEO) { state = GameState.OVICTORY; } } } if (squares[2, 0].getPiece().getPieceType() == PieceType.PIECEX) { if (squares[1, 1].getPiece().getPieceType() == PieceType.PIECEX) { if (squares[0, 2].getPiece().getPieceType() == PieceType.PIECEX) { state = GameState.XVICTORY; } } } } } private void checkForDraw() { int count = 0; foreach(Square s in squares) { if (s.getPiece() != null) { count++; } } if (count == 9 && state == GameState.ONGOING) state = GameState.DRAW; } public GameState getState() { return state; } } 

    Also probably relevant: code that actually calls the methods to check victory conditions:

    public bool move(int x, int y, PieceType player) { if (getState() != GameState.ONGOING) { return false; } if (!BoardUtils.turnControl(xTurn, player)) { return false; } if (!BoardUtils.inRange(new int[] { x, y })) { return false; } if (squares[x, y].isOccupied()) { return false; } executeMove(x, y); xTurn = !xTurn; return true; } private void executeMove(int x, int y) { var piece = new Piece(PieceType.PIECEX); if (!BoardUtils.turnControl(true, PieceType.PIECEX)) piece = new Piece(PieceType.PIECEO); squares[x, y].placePiece(piece); // checkAllRows(); checkAllDiagonals(); checkForDraw(); } 

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

    What is object oriented programming exactly? Should I take it with programming fundamentals or just skip it?

    Posted: 29 Oct 2018 08:32 PM PDT

    What is it exactly? I either have to take Programming fundamentals + object oriented programming or is that too much for a new programmer?

    Programming fundamentals + operating systems is the other option.

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

    [Java][Homework] RSA encryption and decryption

    Posted: 29 Oct 2018 04:39 AM PDT

    Hello everyone! I am working on an assignment with RSA encryption and decryption, that, while I have been able to get working with the appropriate standards (like 1024 bit, and random numbers) the particular part of the assignment I am working on requires very specific numbers which are effectively already computed based on some p, some q, the modulus, totient, and more. I've run calculations both by hand and verified through computer means, so I know the numbers themselves are good.

    I also know the program itself is good, as I have used it with a proper random setup and the outputs are OK (and I will provide that version of the program as needed). However, when I run it with the specified numbers in mind, actually getting it to output properly with the bytes it is supposed to be decrypting let alone the actual String decrypted, that's where it seems to fail.

    https://ideone.com/0BRyBT

    This is the code for the one that uses specific numbers as follows

    P = 137 Q = 131 E = 3

    Public keys (n,e) = (17947, 3) and private keys (n, d) = (17947, 11787).

    The output that I am getting with this is as follows--

    Enter the plain text: why the hell not Encrypting String: why the hell not String in Bytes: 119104121321161041013210410110810832110111116 Decrypting Bytes: 2432 Decrypting String:

    However, if I run it with true random numbers and without inputting my own personal p, q, etc--

    Enter the plain text: why the hell not Encrypting String: why the hell not String in Bytes: 119104121321161041013210410110810832110111116 Decrypting Bytes 119104121321161041013210410110810832110111116 Decrypted String: why the hell not

    I've tried so many things since then over the weekend and then some. I've played with making sure my BigInteger formats were good, and I know they're good at the point where we encrypt the String and turn it into bytes, but after that it fails for reasons I cannot deduce. I've tried a couple different canaries, I've made sure nothing actually changes in terms of my numbers, and as mentioned, I tried this with a true random codeblock here--

     r = new Random(); p = BigInteger.probablePrime(bitlength, r); q = BigInteger.probablePrime(bitlength, r); n = p.multiply(q); phi = p.subtract(BigInteger.ONE).multiply(q.subtract(BigInteger.ONE)); e = BigInteger.probablePrime(bitlength / 2, r); while (phi.gcd(e).compareTo(BigInteger.ONE) > 0 && e.compareTo(phi) < 0) { e.add(BigInteger.ONE); } d = e.modInverse(phi); 

    Bitlength here being 1024 or 2048 or even 512 if you were nuts enough to do that but I did it for testing purposes. Regardless, replacing that section with this above and it suddenly works so whatever's going wrong is beyond my ken right now. I honestly believe it may be how I set up my numbers in there that it's not actually decrypting the right numbers, but I don't know how or why that might be happening.

    EDIT: I've even hardcoded the last segment with the specific numbers, and no good.

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

    Can anyone help me figure out why my Jquery Ajax code isn't working?

    Posted: 29 Oct 2018 07:58 PM PDT

    Hey guys,

    I swear I have tried everything. I even went on youtube and followed the most basic of tutorials on a simple Ajax function and it still isn't working. I am not getting any error, the code simple doesn't work. None of the Ajax or Jquery code works on my site. This led me to believe that it might be something with my server and hosting company. Is that possible?

    You can test the code here or just look at it down below.

    https://zampi.io/SiteBuilder/test.php

    Here is my code.

    <!doctype html>

    <html lang="en">

    <head>

    <meta charset="utf-8">

    <title>Sample HTML</title>

    <!--I saw that someone else was having this problem on stack overflow and this was the solution that worked for him. It didn't work here.-->

    <link rel="stylesheet" href="{% static "bootstrap/css/bootstrap.min.css" %}" type="text/css" media="screen" />

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

    <script type="text/javascript" src="{% static "bootstrap/js/bootstrap.min.js" %}" ></script>

    <!-- I had this code originally to as a cdn to include Jquery and Ajax. -->

    <script src="https://code.jquery.com/jquery-3.3.1.min.js"

    integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="

    crossorigin="anonymous"></script>

    </head>

    <body>

    <script>

    $(document).ready(function(){

    $("#btn").click(function(){

    // the /setdata.php is in the same folder. I have even tried it without the / in front of setdata.php

    //Setdata.php is simply just <p> This is the new data!</p>

    $("#test").load("/setdata.php");

    });

    });

    </script>

    <div id="test">

    <p> This is some content </p>

    </div>

    <button id="btns">Click to change</button>

    </body>

    </html>

    Thanks in advance for any help!

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

    [Java]Boolean To Check If A Rectangle Is A Square

    Posted: 29 Oct 2018 07:54 PM PDT

    Hey folks,

    Might be because it's late or because we haven't dealt with Objects before in this regard but I'm kind of stuck.

    The relevant files are below but basically I'm at the home stretch (Or so I believe) basically I'm stuck at the method isSquare. I have the logic right I think but it's giving me an error and I can't figure out why

     public boolean isSquare(){ if(length==width){ boolean square=true; return square; } } 

    It's telling me I don't have a return statement, but it's there. If the length of a rectangle is the same as the width, then it's a square and therefore true.

    Once I conquer this I can move on to unit testing.

    Read Me With Instructions: https://pastebin.com/T1WS3SW1

    Unit Tests: https://pastebin.com/QP2TAX6L

    Main methods: https://pastebin.com/2JKyMfdV

    Rectangle Class: https://pastebin.com/b9h1zvXp

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

    Building a website for my idea need your suggestions.

    Posted: 29 Oct 2018 07:53 PM PDT

    I'm 18 yo and new to programming thou I have studied CS in my high school so I have done a bit of coding and database stuff.

    So, I have an idea and Me and my friend have also done some market research and we know there's some potential in it and can fill the gap.

    It's a complete tech startup and we are really excited and enthusiast about our idea and we know the learning plus the challenges will be immense especially as a beginner. We wanna start with a website and I'm thinking to go with python and its framework(Django).

    So, I'm looking for some initial guidance, to begin with. Here are some questions in my mind ->

    1. There is Data Structures & Algorithms should I learn and implement them while coding?
    2. There is ML, Data Science, Distributed Systems and a whole range of other things. Should I kinda ignore them and start building the first phase of the website? Or Should I learn them side by side? If yes, then please provide an order/list this will be of much help.
    3. Is there any other important thing I'm missing?

    Also, If you know some sources(podcasts, websites, books etc) which provide startup news or related and relevant stuff please add them too. Any other suggestions are most welcomed. Thank You.

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

    My journey through the Software Development Path

    Posted: 29 Oct 2018 07:26 PM PDT

    So many people want to be a software developer. Many people want to walk that path. But like me, they don't know or maybe some of them know how to be but can't accomplish it for lack of proper guidelines. In this article, I'd love to share my story of "How I started and get proper guideline".

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

    How to edit the legend text in ggbiplots? [R][ggbiplot]

    Posted: 29 Oct 2018 07:19 PM PDT

    I've been following along with tutorial on Youtube on using R for PCA and using ggbiplot and I'd like to customise a plot that I made to show more descriptive text in the legend. Is there a easy way I can edit the text that's used in the legend? Along the lines of axes.legend(['my list', 'of legend items']) in matplotlib?

    library(vegan) library(ggbiplot) my.pca <- prcomp(some.data) g <- ggbiplot(my.pca, obs.scale = 1, var.scale = 1, groups = some.data$Variable, ellipse = TRUE, circle = TRUE, ellipse.prob = 0.68) g <- g + scale_color_discrete(name = '') g <- g + theme(legend.direction = 'horizontal', legend.position = 'top') 

    I've tried using g <- g + geom_text(c('my', 'custom', 'names')), g <- g + aes(c('my', 'custom', 'names')), g <- g + geom_text(aes(c('my', 'custom', 'names'))) and reading through the documentation for the various function used in the snippet above but I can't find an argument where I can provide my list of keys (or I haven't provided my list in the correct format?).

    Thanks for any help you can offer!

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

    Thinkful Engineering Immersion Bootcamp Graduate Feedback

    Posted: 29 Oct 2018 11:44 AM PDT

    I'm about to enroll with Thinkful's online bootcamp for Engineering Immersion. Anybody graduate from the program willing to give their thoughts on their experience?

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

    No comments:

    Post a Comment