• Breaking News

    Friday, December 29, 2017

    The MIT Course: Structure and Interpretation of Computer Programs (SICP) presented to Hewlett Packard [1986] learn programming

    The MIT Course: Structure and Interpretation of Computer Programs (SICP) presented to Hewlett Packard [1986] learn programming


    The MIT Course: Structure and Interpretation of Computer Programs (SICP) presented to Hewlett Packard [1986]

    Posted: 28 Dec 2017 09:59 AM PST

    This course was also MIT's intro to CS course for many years before being modified ~ 2006, and follows the ground-breaking text-book: Structure and Interpretation of Computer Programs, aka SICP. Also, here is a map for lectures to text if you'd like to follow along on your own.

    Lectures

    SICP Online Text Book

    SICP Book

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

    Absolute beginner. Want to do interesting data visualizations for my job. Should I learn both Python and JavaScript? Which first? Does it matter?

    Posted: 28 Dec 2017 07:51 AM PST

    My job involves working with data visualizations on a regular basis, albeit indirectly. I want to learn how to manipulate data to create beautiful visualizations myself - it doesn't necessarily need to be interactive but it would live on a website. I would be using publicly available datasets in order to make my own analyses and present it in an aesthetically pleasing way. E.g. census, government reports, industry reports, etc.

    From what I gather the front end of this is JavaScript but Python is useful for data. I know both are recommended as beginner languages but I wanted to get advice as to whether there's a favoured order in which to learn the two, or maybe it doesn't matter at all?

    For context, I have a very basic understanding of html, am good at learning (i.e. googling), and also good with learning foreign languages too (assume being able to understand different grammar structures must help?!), so am confident about being able to learn a new language. I want to learn to code to further my aspects at my current job and if that fails, then at least I can go into programming elsewhere!

    Thanks in advance.

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

    Angular is making me hate my life. Should I quit my internship or quit web dev/programming altogether?

    Posted: 28 Dec 2017 09:08 AM PST

    I've been learning JavaScript part-time for about 1.5 years, took one intro to java class in college and completed a web dev bootcamp that lasted 12 weeks earlier this year. About a month or two ago I started a part-time unpaid "internship" where I'm working on an app that is in early stages. The first working copy of the app was outsourced and is built with Angular 4.

    I absolutely hate everything about this and want to quit. I loved JavaScript before and even enjoyed the projects we made using Vue. Even when I was stuck and couldn't figure something out for a week at a time, I enjoyed the struggle almost as much as the solution. My mom was a programmer about 15 years ago and thinks that I shouldn't quit programming, and attributes my hard time to being in isolation and not having anyone else working with me. This is partially true. The owner of the project has experience as a programmer but not with web development or javascript. He gives me projects and expects results obviously but can't help me when I get stuck. I had no previous experience with Angular so I spent the first couple of weeks learning what I could about it. The owner bought a couple of Udemy classes for me to learn, which were fine and gave me a light foundation but I hate that it's basically a completely different language even though it's a framework, and I am having a hard time finding resources for it and the other random packages added to this application. I've had no real results and feel hopeless.

    TL;DR: I hate programming ever since starting my internship. Could it be the internship or am I just not cut out for programming?

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

    What IS an algorithm?

    Posted: 28 Dec 2017 08:24 PM PST

    commonly I see it said, I understand the idea and how there's many different types, but what IS an algorithm? how do you explain it to the average person so that it doesn't sound extremely advanced like you're a super hacker, thanks

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

    Express JS res.send help

    Posted: 28 Dec 2017 10:50 PM PST

    Hello,

    Quick question. Working on my first express exercise where Im supposed to return a word x number of times depending on the path. For example if I went to localhost:3000/repeat/hello/5 the page would return hello hello hello hello hello. Here is what i have so far.

    app.get("/repeat/:word/:number", function(req, res){ let pathWord = req.params.word; let pathNumber = req.params.number 

    I've gotten stuck after this. I used a for loop like below. First I converted pathNumber to a Number type then tried using it in a function.

    function multiplyWord(){ let strNum = Number(pathNumber); for(let i=0; i < strNum; i++){ res.send(pathWord); } } 

    but i dont think this is correct. Tried also putting the for loop into the function then calling the function at res.send(pathWord + multiplyWord()); but that also did not work.

    Can someone steer me in the right direction?

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

    Languages for HPC/parallel optimization, 1 to 2^15 cores

    Posted: 28 Dec 2017 10:15 PM PST

    Hello all,

    I'm fresh out of university and idle due to being in between my undergraduate and graduate degrees. I'm dying. I need to get into a project. I've got a few ideas for projects involving optimization that would be fun, challenging, and look good on my resume. I need some guidance before I get into it.

    I have some experience with OpenMPI, OpenMP, and orchestrating Linux's PThreads library based on Peter Pacheco's "An Introduction to Parallel Programming". I enjoyed it, but I'm worried that the skills from it are out of date. I also have experience with single-threaded genetic algorithms and simulated annealing algorithms and would love to write another one. So I figured I'd combine the two as best as I could.

     

    So I have a few questions:

    -What languages are used in modern stupidly parallel optimization tasks?

    -What languages are used in slightly less stupidly but still parallel optimization tasks?

    -Are there any others that I should consider?

    -What's the best way to go about debugging in the languages you recommend?

    -Bonus question: I'm going to need to input a lot of parameters and they will need to be edited by the end user. Both to tweak, launch, run, report on progress, pause, and stop the algorithm as well as to add additional traits. What language has the most stupidly rapid GUI designer out there?

     

    Languages I'm familiar with in order of familiarity:

    Java

    C++

    Python

    C

    MATLAB

    C#

    MPI/C/OpenMP

    Random assortment of others not worth mentioning.

     

    I am, of course, comfortable diving into new languages.

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

    How to learn about project planning?

    Posted: 28 Dec 2017 07:02 AM PST

    Learning programming online has been great for making scripts and working with frameworks, but I really have not found anything that teaches how to plan for larger projects.

    Does anyone know of some good tutorials/classes on project planning or a githubs with beginner to intermediate projects I could look through?

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

    Can anyone link me a good resource for becoming better at complexity analysis

    Posted: 28 Dec 2017 09:59 AM PST

    Really struggling when given an algorithm, and determining what complexity class it is.

    O(N log N) or O(log N) etc, if some one has some layman material I'd really appreciate it.

    Side note I'm pretty bad at math... :(

    Edited: to make it more clear

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

    Andriod Development Basics

    Posted: 28 Dec 2017 10:11 PM PST

    I was told to learn Java before attempting to make an app. I went through an entire Java text book. Did many examples from each chapter. I feel like I have a very good grasp on the basics of java, generic classes, interfaces, inheritance etc...

    For my first app I chose to work with Twitter4j API. I am planning to make a very very basic app that reads a twitter user's follower's screen names and people they are following's screen names and prints all of them. Very simple.

    Alot of the twitter4j examples I have seen are using xml. When I researched XML and twitter API, I heard that all twitter API's no longer support XML, is this the truth?

    Thanks

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

    Data structure and Algorithm in C or Python?

    Posted: 28 Dec 2017 07:54 PM PST

    So, finally I decided to take course on DS&A. I want to do some competitive programming, but I read at most place that C and C++ are preferable for CP. So should I now move to C (I'm at kind of at beginner level in Python, and solving beginner Python problem ) for implementing DS&A? On a personal note, I don't want to quit learning Python. In future, if I need to implement DS&A in C, do I need to learn DS&A Again.

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

    Any good recommendations for learning SQL?

    Posted: 28 Dec 2017 09:43 PM PST

    I am working about to jump into databases with flask and SQLAlchemy, but want to learn the nuts and bolts of SQL first. Are there recommended, well rated resources?

    I eyed up codecademy and W3 schools. codecedamey was not my favorite resource for learning python though.

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

    What are the best courses and resources you've used to learn Swift/iOS Development?

    Posted: 28 Dec 2017 07:12 AM PST

    Curious as to what worked for everyone who uses swift and programs for iOS. can be paid or free, doesn't matter

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

    I created a bulk rename utility in Python and I have several questions.

    Posted: 29 Dec 2017 12:11 AM PST

    https://github.com/AffanIndo/python-script/blob/master/namer.py

    A simple demo: https://gfycat.com/UnsungClassicGoldenretriever

    The way this program works is, copy this script to the folder and just run it. The program will rename all files inside the folder. My questions:

    1. How do I run this program from another folder? For example the program is in ~/script/ and the file I want to change is in ~/example/. If I run python3 ../script/namer.py, the script will rename files inside ~/script/ because that's the location of the script. How to make that so the script will rename files in my pwd?

    2. Is it a good idea to separate each functions in its own files or should I just dump all functions inside a single files?

    3. On the bottom part there is:

      if options == "1": # calling the function name parentheses() print("Command " + options + " success!") elif options == "2": underscore() print("Command " + options + " success!") elif options == "3": hd() print("Command " + options + " success!") elif options == "4": replace() 

      print("Command " + options + " success!")

    How to make this part more efficient?

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

    What are the best libraries to use Python for parallel processing on a Rasberry Pi 3 B?

    Posted: 28 Dec 2017 10:09 AM PST

    If it depends on other factors , please explain the different scenarios where one would be better than the other.

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

    Taking Data Structures and Algorithms next semester. However, I fear my Java skills aren't up to snuff. What main skills should I have in Java before I take data structures and algorithms?

    Posted: 28 Dec 2017 11:31 PM PST

    See the title. I know basics like data types, functions, etc.What else should i know?

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

    Heroku CLI problem

    Posted: 28 Dec 2017 11:04 PM PST

    I have created my nodeJS app,pushed it to github.Now i'm trying to set it up so it works online.I installed Heroku CLI,navigated into my app folder,logged in,and when i run heroku create I get following:ENOENT: spawn git ENOENT.And when I try to add heroku remote I get following error:Git must be installed to use the Heroku CLI. See instructions here: http://git-scm.com.But Git is already installed.With the help of google I found out that something is wrong with environment.How do I fix that?Didn't find step by step fix just:"add it to environment variable"?Thanks guys and happy new year!

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

    SQL - Join table based on date ranges in rows?

    Posted: 28 Dec 2017 10:59 PM PST

    I have 2 tables:

    Table 1:

    Name, StartDate, EndDate 

    Ex:

    Timmy, 9/12/17 08:00:00, 9/13/17 00:00:00 Timmy, 9/13/17 05:00:00, 9/13/17 07:00:00 

    Table 2:

    Name, StartHour, Data... 

    Ex:

    Timmy, 9/13/17 06:00:00, Data1... Timmy, 9/13/17 04:00:00, Data2... Timmy, 9/13/17 07:00:00, Data3... Timmy, 9/12/17 14:00:00, Data4... 

    So, I need to get every record in Table 2 where that start hour is NOT inside of a date range in Table 1. This needs to be done for every name (so there can be multiple matching names in T1/T2 (see T2's data columns are different). It should be inclusive on the left side, exclusive on the right side.

    So for this query, I want to see

    Timmy, 9/13/17 04:00:00, Data2... Timmy, 9/13/17 07:00:00, Data3... (Inclusive on end date) 

    I don't mind if its joined; I can just remove extra columns. I don't want to see duplicates though. I also keep hitting problems where I'll check if NOT (StartHour >= StartDate AND StartHour < EndDate). So each row/startHour in Table 2 needs to be checked against every row with a matching name in Table 1. I can't deal with that; I think it needs a subquery, but I don't know.

    Checking if it is inside the ranges, but then negate because I don't want them if they are inside the range (inclusive,exclusive).

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

    Searching for a given image on facebook and instagram?

    Posted: 28 Dec 2017 02:09 PM PST

    Hello reddit! I want to make an anti catfishing program that will take in an image and tell me if that image exists on facebook or instagram. I've done some research, and as far as I can tell that's probably not possible. Facebooks robots.txt prevents even googles crawlers from getting into facebook pictures, and I'd imagine that it's the same with instagram.

    Is there any feesable way to collect images into a database? or does facebook have any kind of api for reverse image searching?

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

    VS2017 auto-restart problems

    Posted: 28 Dec 2017 09:35 PM PST

    Hi guys, having some problems with VS2017, im quite sure it has something to do with Visual Studio 2017 and was wondering if anyone here has encountered a similar problem.

    Anyways the problem goes like this, using VS2017 to program stuff, i have 2 instances of it open, one has a code that works which i refer to, the other im doing my code on, works fine when im using the laptop, used it from 1000 to around 1200 with no probs, left for lunch and a smoke for about an hour plus, locked the screen with <windows key + L>. Came back and realised the laptop has restarted itself. This happened for a week at least doubt it has to do with my laptop specs but here it is in case you guys need it:

    Windows 10

    Intel(R) Core (TM) i7-6700HQ CPU@ 2.60hZ 2.60HZ

    8.00GB RAM

    64bit operating system

    GeForce GTX 950M

    also my VS version : Visual Studio Community 2017 (15.5.2)

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

    Tagging images for a database

    Posted: 28 Dec 2017 09:34 AM PST

    Alright so I am making an image search application and for various reasons I CANNOT just pipe the searches through Google Images or something else. My plan is to create a SQL database using a 3 table setup one for the images, one for tags, and one to link the two other tables. like this.

    Is there an efficient way to tag the images in the database? I was thinking of feeding them through TensorFlow, Rekognition, or something of the sorts. Is there a way I can export the returned tag from one of the mentioned tagging programs to a SQL database or hell even a CSV?

    Also any other help is much appreciated. Thanks.

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

    [JS/React] I can't seem to use my own fonts in my create-react-app project. Would anyone be able to help?

    Posted: 28 Dec 2017 09:45 AM PST

    I used Facebook's create-react-app to create my project, and now I'm trying to include a particular font for ALL text. After looking at a few posts on Stack Overflow, this method seems to be the most popular, but doesn't work for me at all.

    This is my project structure, and my css looks like:

    @font-face { font-family: UniversCondensed; src: local('UniversCondensed'), url(./UniversCondensed.ttf) format('truetype'); } * { font-family: UniversCondensed; } 

    I also tried injecting it, which worked on my main PC but doesn't on my laptop.

    // set style and fonts import myfont from './style/UniversCondensed.ttf'; import './style/index.css'; injectGlobal` @font-face { font-family : 'UniversCondensed'; src: local('UniversCondensed'), url(${myfont}) format('truetype'); font-weight : normal; font-style : normal; } `; 

    Do you guys have any suggestions? Any help is appreciated.


    SOLUTION

    By converting my .ttfinto a .woff file, and changing the CSS accordingly, everything worked perfectly.

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

    How similar is open source contributions to actual development work?

    Posted: 28 Dec 2017 02:37 PM PST

    I'm looking to contribute to open source projects and was wondering if its similar to what you would do in an actual work environment.

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

    [C++] Getting MySQL 5.7 to work with Microsoft Visual Studio 2017

    Posted: 28 Dec 2017 09:08 AM PST

    I want to create a program that works with MySQL database. I downloaded and installed MySQL 5.7 from their official site. I created new project and input correct Include Directories, Library Directories and Additional Dependencies in the project's settings. My simpliest of codes, created to check if everything is working, doesn't compile though.

    Code:

    #include <my_global.h> #include <mysql.h> int main(int argc, char **argv) { printf("MySQL client version: %s\n", mysql_get_client_info()); exit(0); } 

    Errors that I get:

    1>c:\program files\mysql\mysql server 5.7\include\my_global.h(687): error C2011: 'timespec': 'struct' type redefinition 1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\ucrt\time.h(39): note: see declaration of 'timespec' 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(714): error C2027: use of undefined type 'timespec' 1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\ucrt\time.h(39): note: see declaration of 'timespec' 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(714): error C2227: left of '->tv' must point to class/struct/union/generic type 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(714): error C2228: left of '.i64' must have class/struct/union 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(719): error C2027: use of undefined type 'timespec' 1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\ucrt\time.h(39): note: see declaration of 'timespec' 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(719): error C2227: left of '->max_timeout_msec' must point to class/struct/union/generic type 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(745): error C2027: use of undefined type 'timespec' 1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\ucrt\time.h(39): note: see declaration of 'timespec' 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(745): error C2227: left of '->tv' must point to class/struct/union/generic type 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(745): error C2228: left of '.i64' must have class/struct/union 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(747): error C2027: use of undefined type 'timespec' 1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\ucrt\time.h(39): note: see declaration of 'timespec' 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(747): error C2227: left of '->tv' must point to class/struct/union/generic type 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(747): error C2228: left of '.i64' must have class/struct/union 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(759): error C2027: use of undefined type 'timespec' 1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\ucrt\time.h(39): note: see declaration of 'timespec' 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(759): error C2227: left of '->tv' must point to class/struct/union/generic type 1>c:\program files\mysql\mysql server 5.7\include\my_global.h(759): error C2228: left of '.i64' must have class/struct/union 

    Any ideas what might've gone wrong?

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

    So I decided to learn something new.

    Posted: 28 Dec 2017 06:18 AM PST

    I want to make a cool looking web page. I know it's based on HTML, JavaScript and CSS. I think this is a long-term project, but I want to be unique, and learn something new. Where should I start?

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

    1 comment: