• Breaking News

    Tuesday, November 27, 2018

    Amazon has opened their internal Machine Learning training for all learn programming

    Amazon has opened their internal Machine Learning training for all learn programming


    Amazon has opened their internal Machine Learning training for all

    Posted: 26 Nov 2018 06:16 PM PST

    Only AWS account is required. Havent taken the course yet so cant vouch for quality.

    https://aws.amazon.com/training/learning-paths/machine-learning/

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

    Need to learn SQL and Java for work

    Posted: 26 Nov 2018 06:17 AM PST

    Long story short, the company I work for uses an app for some things and it has some issues, along with the maker no longer being with the company. So I figured this could be a neat promotion.

    What would be some solid resources the tackle this task? I've already taken a free SQL class on CodeAcademy and told my boss about a 6 week course they also offer.

    Edit: Thank you many lots for the helpful suggestions. A bunch of classes on Udemy have been signed up for(not on my dime). This should be quite the interesting, hopefully fruitful marathon.
    Thank you again for the suggestions.

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

    Python for Data Science -- Free Learning Path

    Posted: 26 Nov 2018 06:02 PM PST

    Learning path that helps you pick up Python without cost with a focus on data science.

    https://www.absentdata.com/blog/python-for-data-science-free-learning-path/

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

    [Homework] Least number of searches to visit all vertices in a graph?

    Posted: 26 Nov 2018 07:08 PM PST

    There are n (1 <= n <= 2 * 105 ) vertices and m (0 <= m <= 2 * 105 ) edges in a directed graph. The graph can be connected or disconnected. I need to find the smallest number of searches so that every vertex in the graph has been visited. The time constraint is O(4*108).

    Example: Graph has 6 vertices

    5 > 1

    5 > 2

    5 > 3

    5 > 4

    4 > 5

    6 is isolated.

    The answer would be 2 searches. Searches are performed on 4 and 6. (Or performed on 5 and 6)

    Visiting all vertices is pretty easy. I simply need to keep track of which vertices I haven't visited and run BFS or DFS on the one's that haven't been visited. This doesn't guarantee that the number of BFS/DFS searches is the smallest though. If I run this on the above example, the result would be 5 searches, performed on 1, 2, 3, 4 and 6.

    The first method I thought of would be a complete search (do BFS/DFS with vertex 1, count how many searches I made, then do it with vertex 2 etc.) but that would take O(nm) time which is too slow, since O(2 * 1010 ) > O(4 * 108 ).

    Essentially, I'm lost as to how to efficiently choose which vertex to DFS/BFS. I can't think of any graph algorithm that can solve this problem within the time constraint. I tried choosing the vertex with the highest out-degree but that doesn't work either.

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

    Help with some adding up totals in 'for loops'

    Posted: 26 Nov 2018 02:34 PM PST

    Hi reddit!

    I've posted here before and y'all have been great in answering my questions in the past, so I was wondering if you might be able to help me figure out a problem in my program as it is now!

    So what I am trying to do, is make a program that counts the amount of rolls it takes to get a Yahtzee, and then counts the average amount of rolls it takes to get a Yahtzee over the course of 1,000 runs. Here's what I have so far

    import random def getRoll(): dice1 = random.randint(1, 6) dice2 = random.randint(1, 6) dice3 = random.randint(1, 6) dice4 = random.randint(1, 6) dice5 = random.randint(1, 6) return (dice1, dice2, dice3, dice4, dice5) totalRolls = 0 countyahtzee = 0 yahtzee = 0 numberofRolls = 0 totalOverall = 0 def isYahtzee(dice1, dice2, dice3, dice4, dice5): return (dice1 == dice2 == dice3 == dice4 == dice5) for yahtzee in range(1000): while (yahtzee == False): dice1, dice2, dice3, dice4, dice5 = getRoll() yahtzee = isYahtzee(dice1, dice2, dice3, dice4, dice5) totalRolls += 1 totalOverall += totalRolls 

    So what I want to do right now, is add the total number of rolls from the past 1000 runs, and then average them, but I'm not 100% sure how to go about doing that! Ideally it should look something like this

    Number of times rolled until Yahtzee = __________

    Average times rolled until Yahtzee = ___________

    any help/criticism would be much appreciated!

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

    Learn 3D Graphics Programming

    Posted: 27 Nov 2018 12:07 AM PST

    Hello Reddit,

    I'm currently interrested in learning to use a 3D graphics API for the sake of it. I'm not constrained by time, efficiency or anything else. I was wondering what API to learn : WebGl, OpenGl, Direct3D, Vulkan ?

    I heard Vulkan is like super hard but i don't know about the others. I tried to find well-documented and well-written tutorials for Direct3D but to no avail since most of them seems outdated.

    So, I would like to know if any of you has ideas considering where to start with a recent (or at least updated) tutorial or "Get Started" doc of any kind. Furthermore, I would like to learn this to do desktop C++ application (no WebGl i guess ?).

    Thanks in advance redditors!

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

    Help with making time for learning python.

    Posted: 26 Nov 2018 11:44 PM PST

    Hi there I'm trying to learn python, and found out that I can make good progress when I'm studying at nights on the weekends( I work nights on weekdays). Unfortunately, I won't be able to do that the rest of the year and I'm worried that I will forget all the stuff I learned so far. Does anyone who is studying in the daytime have a routine I could follow? I will have alot of free time in the day to study during Christmas break, but till then I'll be on day shift and won't have time to study. Except for maybe one hour before going to bed which isn't ideal. Should I just cut my losses and just go hard Christmas break?

    It's annoying because I really want to study but it is really hard to do so sometimes.

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

    [C++] no matching function for call to

    Posted: 26 Nov 2018 11:17 PM PST

    Hello

    I am having those two errors about some function calls that I am actually not doing. So I don't really get that. Could somebody explain what the issue is and how to solve this?

    .h file:

    using boost::asio::ip::udp; class srv_comm_uav { public: srv_comm_uav(); private: udp::endpoint m_endpoint; boost::asio::ip::udp::socket m_socket; }; 

    .cpp file:

    srv_comm_uav::srv_comm_uav(): m_endpoint( boost::asio::ip::address::from_string("192.168.1.100"), 8080) { m_socket.bind(&this->m_endpoint); } 

    errors:

    srv_comm_uav.cpp:4: error: no matching function for call to 'boost::asio::basic_datagram_socket<boost::asio::ip::udp>::basic_datagram_socket()' m_endpoint( boost::asio::ip::address::from_string("192.168.1.100"), 8080) ^ srv_comm_uav.cpp:6: error: no matching function for call to 'boost::asio::basic_datagram_socket<boost::asio::ip::udp>::bind(boost::asio::ip::udp::endpoint*)' m_socket.bind(&this->m_endpoint); ^ 

    Thanks

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

    Help me write code quicker/more efficiently

    Posted: 26 Nov 2018 10:53 PM PST

    My finals are coming up soon for CS and things are starting to get almost too complicated for me now. I bet if I had more time I could figure stuff out but with all my other classes I just don't have the time so I need to be more efficient when I'm doing assignments or studying or even writing the final (I ran out of time during the midterms because I take so long).

    When I look at a question on an assignment or exam I just take forever to do it so I was wondering if I can get help on writing code faster?

    Or maybe switching up the way I write code which in return makes the process quicker? Thanks!

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

    How do I print the variables of an object in a list? (Python)

    Posted: 26 Nov 2018 07:01 PM PST

    Hey guys, I'm new to coding in Python so sorry if I get the vocabulary mixed up and refer to something wrong. I'm doing a project where I have to have a deck of cards, with each card being an object and the deck itself being a list of each card. I know that in Java, if you want to print an element of an object in an array, you would make a "getter function," so if an array like "deckOfCards" is used as an array of "card" objects, you could use something like deckOfCards[0].getSuit() to call the suit variable of whatever "card" object is first in the array. In python, I know you can use .suit to call that variable if that's one of the variables used for the class, but if I use deckOfCards[0].suit, I get "AttributeError: 'tuple' object has no attribute 'suit'." Is there a way to call an objects variable using an object call through it's position in the list similarly to how you would in Java?

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

    Whoah a LOT of Packt Publishing books on OpenCV Python... Which is better?

    Posted: 26 Nov 2018 10:39 PM PST

    I would use C++ except it keeps giving me unresolved externals error. Anyways, there's a lot of Packt Publishing books on Python OpenCV, and experience has shown that Packt Publishing books are 1/5 good. Since all of them are available for download, which of them do you personally recommend? Thanks for your help.

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

    Programmers that created life-changing software

    Posted: 26 Nov 2018 09:58 PM PST

    Hey there folks!! I am doing a seminar on "Beyond Programming" at https://hourofcode.com/us in Armenia.
    And I want to collect inspiring stories about programmers, software that helped save human lives, push humanity forward, help solve unsolvable problems, etc. It's for kids, and I want to motivate them to study well and dig deeper into programming.

    Thanks in advance!

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

    What would you recommend? Doing Harvard's CS50 Course on EDx or combining the freeCodeCamp Youtube channel and their programming videos with projects I choose?

    Posted: 26 Nov 2018 01:05 AM PST

    Books just aren't for me, since I want to learn the full spectrum of things.

    So, does anyone have experience with the freeCodeCamp Youtube channels programming "courses"?

    I mean, their website is awesome.

    Are their videos any good? Should I combine them with random projects I choose or would it be better for a beginner to do the EDx CS50 course from Harvard?

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

    Is it worth it for a newbie to look at CTCI?

    Posted: 26 Nov 2018 09:24 PM PST

    I am learning web dev and some other tech concepts. I have some knowledge of programming, but not to the point of full confidence (granted, I know you're never done learning and that Aha moment may be a long time off).

    I do have a copy of CTCI while also looking at Leetcode, FCC, and Codecademy though. Is it worth taking a full read through even though I'm just a beginner?

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

    “Crash-course Python” like books for Java?

    Posted: 26 Nov 2018 11:41 AM PST

    Hey people,

    I've been on the self teaching route for a couple of months after starting this programming learning journey for Python using "Crash course Python" book, which I absolutely love.

    As I plan on starting the Princeton Algorithms course in Coursera in some time, I was wondering If you could recommend a book for learning Java from 0 which has a similar style and structure (with lots of exercises and clear explanations) as crash course python.

    Any recommendations?

    Thank you!

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

    D&D Inventory

    Posted: 26 Nov 2018 05:38 PM PST

    I would like to create an inventory management app for d&d. This is more of a personal project to get back into programming. Since I want to be able to use the program on my phone, what would the best language to write it in be?

    I have a bit of java experience previously, however I think javascript or html5 would be better to learn. Any advice or resources would be welcome!

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

    Help displaying scanned values from a file into the console in C?

    Posted: 26 Nov 2018 09:11 PM PST

    I am working on a hamming code program in C that reads the inputs from a file called "hc_data_2018.txt". I tried using fscanf to scan the value and printf to print it to the console; however, I keep seeing BS values that are random symbols in the console. How can I fix this/what is the right way to do it? Thank you.

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

    Company says I won't be able to leave and work at other companies. Red Flag?

    Posted: 26 Nov 2018 08:45 PM PST

    Hey Reddit,

    I'm relatively new to web development, and going through the paid courses at Codecademy. It's been about 2 months since i started and I've been passing my applications around for a Junior Front-end Dev. Had an interview with a small company but the founder told me if i started working there, i would have to work for 2-3 years as he isn't interested in people working short term. Also, he told me if i worked there, I wouldn't be able to leave for another web company.

    I'm not sure how to react to this, as the way the company pays its employees is how much money they bring in to the company, so if i bring in £10,000 for the month i would get a percentage of that (probably 10%). Which is a bit unsettling since right now i would prefer the base rate of a junior dev, which is normally £1000.

    People with more experience, what would you do if you were also given this offer when you were new?

    PS:

    They have 1 romanian web developer (4 years web dev experience) and they sat me down with him for a while. He doesnt seem like a good teacher to learn from (although i may be wrong). He spent about about 30 mins. trying to get a button to do slideToggle using php or something like that. Was a bit shy to tell him about it for a while, but asked him to try it eventually.

    Thanks in advance :)

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

    Help me set up OpenCV on Visual Studio 2017 (I'm desperate)

    Posted: 26 Nov 2018 08:45 PM PST

    At first, I downloaded the official release for Windows 10 that contained two files,

    C:\opencv\build\x64\vc15\lib\opencv_world400.lib C:\opencv\build\x64\vc15\lib\opencv_world400d.lib 

    But it gave me exactly one unresolved externals error when I added them to dependencies. Then I downloaded the prebuilt packages from NuGet, then I get 3 unresolved externals when I added them to dependencies. What does this library want from me? There are no more lib files! What's wrong? What should I do? Here's my code and my error:

    #include "stdafx.h" #include <opencv2/highgui/highgui.hpp> #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> using namespace std; using namespace cv; int main() { Mat image = imread("C:\\Users\\Chubak\\Pictures\\index.jpg"); if (image.empty()) return -1; imshow("TEST", image); waitKey(); return 0; } 

    1>------ Build started: Project: OpenCLTest, Configuration: Release x64 ------ 1>OpenCLTest.obj : error LNK2001: unresolved external symbol "int __cdecl cv::_interlockedExchangeAdd(int *,int)" (?_interlockedExchangeAdd@cv@@YAHPEAHH@Z) 1>OpenCLTest.obj : error LNK2001: unresolved external symbol "class cv::Mat __cdecl cv::imread(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?imread@cv@@YA?AVMat@1@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) 1>OpenCLTest.obj : error LNK2001: unresolved external symbol "void __cdecl cv::imshow(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class cv::_InputArray const &)" (?imshow@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV_InputArray@1@@Z) 1>c:\users\chubak\documents\visual studio 2017\Projects\OpenCLTest\x64\Release\OpenCLTest.exe : fatal error LNK1120: 3 unresolved externals 1>Done building project "OpenCLTest.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 

    Here's my error with the lib files downloaded from SourceForge:

     1>------ Build started: Project: OpenCLTest, Configuration: Release x64 ------ 1>OpenCLTest.obj : error LNK2001: unresolved external symbol "int __cdecl cv::_interlockedExchangeAdd(int *,int)" (?_interlockedExchangeAdd@cv@@YAHPEAHH@Z) 1>c:\users\chubak\documents\visual studio 2017\Projects\OpenCLTest\x64\Release\OpenCLTest.exe : fatal error LNK1120: 1 unresolved externals 1>Done building project "OpenCLTest.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 

    It can't be x64/x86 issue because I downloaded x64 libs, and I'm compiling x64. So what else could be the issue?

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

    I have no clue what I’m doing

    Posted: 26 Nov 2018 08:11 PM PST

    Hey Reddit,

    I'm a High school student who's just trying to get through my last year. I never had any interest in programming or even computers for that matter but for some reason I thought it'd be a great idea to sign up for Principals of Java G/T. And my dumbass thought it'd be even a BETTER idea to not pay attention during first quarter.

    Now I'm flooded with assignments that I don't know how to do. For example, I need to write a program on Eclipse (program) that calculates the percentage of votes in an election which gives you a "winner" when you run it.

    Simple lingos like "system.out.println" and "public static void" is hieroglyphics to me.

    So basically, where can I learn to catch up on these fundamentals of java programming? Which YouTube channels, websites, forums, and other resources can I use?

    (Note: I know these are things I can find out myself, but my assignments are due very soon and I'm literally submerged in other classes...)

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

    Ruby-a clean way to programme circular arrays?

    Posted: 26 Nov 2018 07:04 AM PST

    So I'm not sure how exactly to describe what I'm talking about but I'll try anyways. Basically, I was trying to write a programme based on the Josephus problem:

    N people (numbered 1 to N) are standing in a circle. Person 1 kills Person 2 with a sword and gives it to Person 3. Person 3 kills Person 4 and gives the sword to Person 5. This process is repeated until only one person is alive.

    I did, but it got me thinking about whether there was an in-built structure in Ruby where incrementing the index would always work the way it does in a circle. And you would still be able to index each element and delete from this structure based on index, the way you can with arrays. If such a structure doesn't exist in ruby, can someone help me think of the best way to write a class like this

    I know that I can just check the current index to see if it's the last and if so make it the first or whatever but that just doesn't seem very clean to me

    Most of this post prolly doesn't make sense, but irdk how to phrase it better. I hope you got what I meant

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

    Basic Pong game in JS

    Posted: 26 Nov 2018 07:49 PM PST

    Hi,

    I've made a JS game engine (which I've just finished re-writing in es6 hence the post) and I thought that I'd share the simple pong game that I made using it. I'm really excited to see what other (more talented developers) could potentially create with this.

    Link for the pong code - https://gitlab.com/DrRoach/Web-Engine/wikis/examples/pong

    Link for the engine repo - https://gitlab.com/DrRoach/Web-Engine

    If any of you have any feedback for me or any advice on what areas to focus on next (I have next to no game dev experience) I would really appreciate it!

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

    [Python] Any security issues and general tips when dealing with socket programming?

    Posted: 26 Nov 2018 07:36 PM PST

    I'm making a game (the card game Hearts, though exactly what doesn't matter too much here) for my friends and me to play remotely. I can implement the actual mechanics fine, but socket programming (to actually do the connection between my computer and theirs) seems a bit scary because you're doing something actually connecting to the public internet.

    So before I start futzing around with sockets and potentially exposing my computer, I just wanted to know if there are security concerns with basically blindly making or accepting connections from a port that faces the void of the internet (that seems to be how you're supposed to do it, right?). Also, your IP address is public, right; it's not like a password that you shouldn't tell your friends? (I assume so - that's why you normally connect via IP addresses to websites even if it's normally hidden behind domain names. But I'd rather ask explicitly than just assume and be wrong.)

    Also, some other questions:

    • Is there a good way to test sockets like this without having two computers? Like, does just running two instances of the program on the same computer/port work, or will one program be rejected because the port is occupied?
    • Are there style tips regarding how to gracefully handle disconnects/reconnects or generally keeping the computers robustly "in phase" with each other?
    • Are there libraries that make this sort of synchronization easier? (I'll probably do this project with pure Python without libraries for the experience anyway, but it's good to know for the future.)
    • Just generally, are there any common pitfalls I should be aware of?

    Thanks!

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

    Converting string to object js

    Posted: 26 Nov 2018 05:39 AM PST

    I'm trying to make a system that loads a saved level from a text file, originally the code for each object was written like this:

    return{ image: 3, blocking: true, position: [ { x: 32, y: 984 } ] } 

    That syntax has remained the same, but I am now loading that from a text file and returning it like this:

    return var;//(var contains the xhr-loaded level data) 

    Here's my xhr/return code: https://pastebin.com/D6cu2bj7 TL;DR how do I make my xhr data emulate the data that just used to be in the return section?

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

    No comments:

    Post a Comment