• Breaking News

    Wednesday, December 27, 2017

    Spent the last 6 months building a programming tutorial search engine, what do you think? learn programming

    Spent the last 6 months building a programming tutorial search engine, what do you think? learn programming


    Spent the last 6 months building a programming tutorial search engine, what do you think?

    Posted: 27 Dec 2017 12:20 PM PST

    Hi /r/learnprogramming,

    I spent the last 6 months building a programming tutorial search engine. The project started as a way to learn Ember JS and sort of snowballed from there. Here's the link:

    https://hacksource.xyz/

    If you have any feedback or content suggestions please let me know in the comments. Hope you find it to be a useful tool!

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

    What is the best Python course you ever studied from?

    Posted: 27 Dec 2017 12:18 AM PST

    No matter if it's for beginners or advanced programmers.

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

    Is it normal feeling like this while learning programming ?

    Posted: 27 Dec 2017 01:40 PM PST

    I started to learn programming close to a year ago and its been fine, having my own pace of learning and stuff, feeling generally comfortable.

    3 weeks ago I started working at a company mainly as a backend developer but i do some very minor stuff on the frontend (I do aim for fullstack, but my backend skills are much higher and backend suits me more).

    I started working off on stuff like real world stuff, dealiing with legacy code and other scary stuff i didnt encounter while learning myself.

    And the thing is ive been feeling very dumb. Like straight up stupid. When im given a task ill spend some time looking at it and thinking what to do and then i just do stupid mistakes, like trying to put a parameter inside a function that doesnt take any parameters, like general beginner mistakes. And when i finally get to finishing the task or whatever i just feel very stupid.

    Is this a normal feeling ? Am i just experiencing learning ?

    TL;DR Feel super dumb while realizing my mistakes, and generally feeling like a dumb mofo.

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

    How do you write a program, what's your process/approach?

    Posted: 27 Dec 2017 05:41 PM PST

    Hello,

    Wondering how you all write programs. When you write a program do you put a lot of time into what data structures and algorithms you are going to use. Are the methods the bulk of the work? What do you find most of your time goes into when programming an app/program? please show how its done and what you focus your time/attention on. Would love to see the general layout and nuts and bolts of the process.

    Thank you

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

    [Node.js/Js] Help with Juggling Async operations...

    Posted: 27 Dec 2017 10:50 PM PST

    I'm doing LearnYouNode via the FreeCodeCamp lessions, and here are the instructions:

    This problem is the same as the previous problem (HTTP COLLECT) in that you need to use http.get(). However, this time you will be provided with three URLs as the first three command-line arguments.You must collect the complete content provided to you by each of the URLs and print it to the console (stdout). You don't need to print out the length, just the data as a String; one line per URL. The catch is that you must print them out in the same order as the URLs are provided to you as command-line arguments

    ─────────────────────────────────────────────────

    ## HINTS

    Don't expect these three servers to play nicely! They are not going to give you complete responses in the order you hope, so you can't naively just print the output as you get it because they will be out of order.

    You will need to queue the results and keep track of how many of the URLs have returned their entire contents. Only once you have them all, you can print the data to the console.

    Counting callbacks is one of the fundamental ways of managing async in Node. Rather than doing it yourself, you may find it more convenient to rely on a third-party library such as async or after. But for this exercise, try and do it without any external helper library.

    The urls are provided via command line arguments by this package, as the first, second, and third command line arguments (ie. process.argv[2], process.argv[3], and process.argv[4]).

    Here's what I came up with:

    var http = require('http'), concatStream = require('concat-stream'), urls = [process.argv[2], process.argv[3], process.argv[4]], results = [], count = 0; function httpGet(index) { http.get(process.argv[2 + index], function(res) { res.pipe(concatStream(function(data) { results.push(data.toString()); //this is the line I am having trouble with. count++; if(count === 3) { printResults(); } })) ; }); } function printResults() { for (var i=0; i < 3; i++) { console.log(results[i]); } } for (var i=0; i < 3; i++) { httpGet(i); } 

    My problem is the line results.push(data.toString()). If I plug this in, instead of result[index] = data.toString(); my results array is not in chronological order; instead, they seem to get arranged randomly. I am having trouble understanding why. It seems to me that on every iteration, my version (results.push(data.toString())) should be adding it sequentially into the array, but only result[index] = data.toString(); seems to work.

    This is probably a terribly worded question, and I'm not sure if I got the point across, but if you are having trouble understanding, I'm more than happy to give more details on the issue.

    Basically, I'm just wondering why my method of pushing in the data to my array using .push doesn't work, but assigning the variables directly to the indices of the array DO work...

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

    What are languages bindings

    Posted: 27 Dec 2017 10:09 PM PST

    I heard about c bindings. Can someone explain what it is ?

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

    Machine learning in python

    Posted: 27 Dec 2017 09:31 AM PST

    What is the best resource/course for learning machine learning in python?

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

    Authentication and Authorization: Or "What the hell am I getting myself into?"

    Posted: 27 Dec 2017 01:20 PM PST

    I'm working on an application (for my own edification) that has two parts: a rest api on the backend and a frontend GUI. Frontend, for now, will be entirely web based.

    I'd like to offload my user management to a third party, say AWS' Cognito service, but I've never done much with A&A. My goal is to have the user auth on the frontend, get a JWT token that is passed to the rest API. The rest API validates the token, and by some hand wavey thing, validates that the token grants perms to do certain tasks.

    Does anyone have some good intro documentation to introduction of authorization and authentication, ideally python based?

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

    Intellij Themes, which one do you use?

    Posted: 27 Dec 2017 11:32 PM PST

    How do we not have a thread for this?

    I am sick of my old one, just isn't doing it for me. I am aware of http://color-themes.com/?view=index.

    What's everyone else using?

    Note: if you use a white background, I will comment and call you crazy.

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

    Checking a folder of images for a PIL decompress bomb

    Posted: 27 Dec 2017 02:43 PM PST

    So I have a folder of images that I'm running through an ML algorithm. At some point the ML algorithm hits an exception, throwing "Decompressed Data Too Large".

    As far as I can tell this is a specific feature of PIL to prevent files with large amounts of metadata from overloading the machine/server when decompressed. Great, glad you guys included it, but when it fires the whole ML algorithm exits. Try catches are not helpful. Image evaluater being used is keras preprocessing

    Here's the code that checks for decompression bombs

    # Maximum decompressed size for a iTXt or zTXt chunk. # Eliminates decompression bombs where compressed chunks can expand 1000x MAX_TEXT_CHUNK = ImageFile.SAFEBLOCK # Set the maximum total text chunk size. MAX_TEXT_MEMORY = 64 * MAX_TEXT_CHUNK def _safe_zlib_decompress(s): dobj = zlib.decompressobj() plaintext = dobj.decompress(s, MAX_TEXT_CHUNK) if dobj.unconsumed_tail: raise ValueError("Decompressed Data Too Large") return plaintext 

    It is part of this larger class

    If I check the s object out at runtime it looks like this

     b'\x08\x99\xe3JO\xcdK-\xcaLV((\xcaO\xcb\xccI\xe5R\x00\x03c\x13.\x13K\x13K\xa3D\x03\x03\x03\x0b\x03\x0804006\x04\x92F@\xb69T(\xd1\x00\x05\x98\x98\x9b\xa5\x01\xa1\xb9Y\xb2\x99)\x88\xcf\x05\x00O\xba\x15h' 

    I had the moderately clever idea of just checking every image in my input for decompression bombs. However, I have no clue how to modify this code to run on a plain ol PNG. Any ideas?

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

    Not sure what language to pursue.

    Posted: 27 Dec 2017 11:27 PM PST

    I have dabbled a bit in HTML/CSS with FCC but not sure if front end is the way i want to go, im not big into designing stuff due to me not being real artsy, should i look into learning python? i have only been practicing for about a month and a half now and just not sure if im headed down the right path for me

    Edit: im only 20 atm and would like to make a career out of this one day because i find it extremely fun and interesting but just having doubts

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

    A question on crediting code authorship in professional project

    Posted: 27 Dec 2017 01:40 PM PST

    I recently was hired at my first position as a developer working on the server side of an application. In the code base every single file starts with

    /* Licensed by PERSON'S NAME <name@email.com> */ 

    with the programmer I've replaced information filled in.

    My question is, is this normal practice? If so should I keep it there? It's a bit weird to me considering he was a regular employee and the code base does not belong to him at all. Why would he claim it and claim it's licensed by him?

    Like I said this is my first 'real' programming job so I'm not sure if this is normal, or if the person I've replaced was just trying to put his name everywhere.

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

    What is the best web development course you ever studied from?

    Posted: 27 Dec 2017 11:14 PM PST

    Which course/s or book/s you used to learn web development to a professional level.

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

    What are the advantages of a real classroom over a virtual classroom?

    Posted: 27 Dec 2017 11:07 PM PST

    So, I'm about to start developing a web app to create "virtual classrooms", my ultimate goal is to provide a similar(or even superior) learning experience to a real classroom.

    I'm trying to list everything that is currently impossible to do online or not convenient.

    The first things I want to implement are:

    -webcam+voice(shared by groups or by a whole classroom, it would probably be just voice sharing for large groups), muting people would be possible

    -courses could be displayed to everyone at the same time(or not), recorded when they're live, annotated by students, subbed, paused, students could ask questions in real time(or not)

    -sharing screens, keyboards, mouse, in a VM dedicated to programming, with an authorization from the user of course

    -drawing/writing on the same file in a cooperative manner

    Can you think of any other thing that would be needed to provide an (at least) equivalent to that of a physical classroom?

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

    [Python/Scrapy] Trying to scrape Indeed.com, however the Javascript content of the pages are inconsistent. Sometimes I am able to click on the job cards for an extended summary whereas other times I am unable to.

    Posted: 27 Dec 2017 09:40 PM PST

    Hi Guys,

    I'm trying to scrape indeed.com, however in some cases the job listings for indeed opens up with clickable job cards that give an extended summary or job description and in other cases it doesn't.

    Strangely, it doesn't come up when I open indeed with chrome, yet if i open indeed with Microsoft edge, it gives me the option.

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

    The right side is Edge with clickable job cards that give extended summary, The left side is chrome which doesnt.

    If i put https://au.indeed.com/data-scientist-jobs?vjk=46481d8a1e92cfc5 into chrome, it redirects to https://au.indeed.com/data-scientist-jobs

    And

    If i put https://au.indeed.com/data-scientist-jobs into edge, it redirects to https://au.indeed.com/data-scientist-jobs?vjk=46481d8a1e92cfc5

    Does anyone know how i can get Chrome to also show the extended summaries? Ultimately I just want to be able to scrape it, so if there are other ways around this, im all ears.

    Cheers

    Edit: I've also tried opening it with incognito, a fresh install of chrome and disabling my extensions. with no success.

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

    Where can I upload a project of mine for people to review it?

    Posted: 27 Dec 2017 11:41 AM PST

    Hello guys,

    I'm making my first application, soon it will be finished and I want to get some feedback from more professional developers. I'd like to upload the project code and ask for people to give me feedback telling me what could have been better. :)

    submitted by /u/5arg
    [link] [comments]

    [visual basics] (Word -> Excel) Apostrophe in data using INSERT TO

    Posted: 27 Dec 2017 08:54 PM PST

    To preface... I am not a programmer and I know absolutely nothing about program...

    In the word document, I created a "command button" with the following scripts. AAA is a field that pull a number from another set of Field codes. Once I press the command button, the data from the Word form is successful in adding to a new line in Excel. However, the data (a number) from MonthsOldField always contain an apostrophe. e.g. '24 - even though the field itself is only "24".

    I have searched the internet but I don't even know what to search for... Any advice would be appreciated!

    The Script:

    Private Sub CommandButton1_Click()

    'Transfer a single record from the form fields to an Excel workbook.

    Options.SendMailAttach = True

    ActiveDocument.SendMail

    Dim doc As Document

    Dim strChildLastName As String

    Dim strDOB As String

    Dim strMonthsOld As String

    Dim strSQL As String

    Dim cnn As ADODB.Connection 'Get data.

    Set doc = ActiveDocument 'ThisDocument

    On Error GoTo ErrHandler

    strChildLastName = Chr(39) & doc.FormFields("txtChildLastName").Result & Chr(39)

    strDOB = Chr(39) & doc.FormFields("DOB").Result & Chr(39)

    strMonthsOld = Chr(39) & doc.FormFields("MonthsOldField").Result & Chr(39)

    'Define sql string used to insert each record in the destination workbook.

    'Don't omit the $ in the sheet identifier.

    strSQL = "INSERT INTO [test1$]" _

    & " (ChildLastName, DoB, MonthsOld)" _ & " VALUES (" _ & strChildLastName & ", " _ & strDOB & ", " _ & strMonthsOld _ & ")" 

    Debug.Print strSQL

    'Define connection string and open connection to destination workbook file.

    Set cnn = New ADODB.Connection

    With cnn

    .Provider = "Microsoft.ACE.OLEDB.12.0" .ConnectionString = "Data Source=XXXXXXXXXXX\test.xlsx;" & _ "Extended Properties=Excel 8.0;" .Open 'Transfer data. .Execute strSQL 

    End With

    Set doc = Nothing

    Set cnn = Nothing

    Exit Sub

    ErrHandler:

    MsgBox Err.Number & ": " & Err.Description, _

    vbOKOnly, "Error" 

    On Error GoTo 0

    On Error Resume Next

    cnn.Close

    Set doc = Nothing

    Set cnn = Nothing

    End Sub

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

    My employer has offered to pay for coding classes. What are some good ones to take?

    Posted: 27 Dec 2017 08:25 PM PST

    I'm beginning a job working with digital marketing and PPC analytics. My employer will pay tuition and will allow 8 hours of work time per month of on the job study — a very exciting opportunity which I will certainly take advantage of!

    I've already completed CS50 and the University of Helsinki Java I MOOC. The courses my employer will pay for are through Coursera.

    What would you guys suggest I take? I know working with large amounts of data, using APIs, and data vis will be important to my career. I'm also interested in what machine learning can do for PPC marketing and analytics. I had no problems learning conditional statements, loops, and syntax with Java so I'm open to challenging difficulty levels.

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

    Help with preventing overflow on centered <ul>s and centering icons vertically.

    Posted: 27 Dec 2017 08:16 PM PST

    I have been working on a todo list and i was wondering whether there is a way to prevent overflow of text in my <ul> using CSS. Link to image. Also how do i center icons vertically, i tried some tricks from the internet but those don't work for me. Link to image.

    This is my associated HTML for the list

    <div id="container"> <h1> To-do <span> <i class="fa fa-pencil" aria-hidden="true"></i></span> </h1> <input type="text" placeholder="New task"> <ul> <li> <span class="delete"> <i class="fa fa-eraser" aria-hidden="true"></i> </span> <span class="task"> Internships </span> </li> <li> <span class="delete"> <i class="fa fa-eraser" aria-hidden="true"></i> </span> <span class="task"> Machine Learning </span> </li> <li> <span class="delete"> <i class="fa fa-eraser" aria-hidden="true"></i> </span> <span class="task"> Project Euler </span> </li> </ul> </div> 

    CSS

    #container { width: 33%; margin: 10% auto; } ul { margin: 0; padding: 0; list-style: none; } li:nth-of-type(even) { background-color: #f2f2f2; } li:nth-of-type(odd) { background-color: #f9f9f9; } li { font-size: 1.2em; line-height: 39px; box-sizing: border-box; height: 39px; margin: 0; color: #24213a; } 

    HTML for uncentered vertical icon

    <header class="w3-container w3-teal"> <span onclick="document.getElementById('id01').style.display='none'" class=" "> <!-- &times; --><i class="fa fa-times" aria-hidden="true"></i> </span> <h2>Settings</h2> </header> 

    CSS

    .fa-times { font-size: 35px; float: right; } 
    submitted by /u/SIR_TREX
    [link] [comments]

    Understanding a Rest API?

    Posted: 27 Dec 2017 04:31 AM PST

    I learned about APIs before I started programming, so forgive me if my knowledge is muddled.

    I understand when a company allows API access to fetch data. For example, amazon allowing API access to pull product data and best sellers rank.

    When would a rest API be used in my own application? Should it be used to communicate NodeJS backend to the front end?

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

    How to configure /etc/wpa_supplicant/wpa_supplicant.conf on rasperberry pi to connect to wifi

    Posted: 27 Dec 2017 08:08 PM PST

    Preface -- sorry if this isnt the correct subreddit for this question

    I have a raspberry pi model3 that I am trying to connect to my work's wifi via 802.11b/g/n 150 Mbps wireless USB adapter. My work's network require a login username/password and I have been a hell of a time trying to connect to the internet. So far this is what my conf file looks like, I am sure I am missing a whole bunch of other stuff but I am unfamiliar with the internet protocol lingo and everything else related to it.

    Conf:

    network={ ssid="<work_network>" identity="<my_username>" password="<my_password>" key_mgmt=NONE #idk whats supposed to go here } 

    and then i restarted with

    sudo /etc/init.d/network restart 
    submitted by /u/mrTang5544
    [link] [comments]

    Get New Variable

    Posted: 27 Dec 2017 07:58 PM PST

    public class baseClass { public bool something = false; } public class childClass : baseClass { public new bool something = true; } public static class Reader { static baseClass; public static bool getSomething { return baseClass.something; } public static void SetAction(baseClass act) { CurrentAction = act; } } 

    my problem is here, if i call

    Reader.SetAction(new childClass); print(Reader.getSomething); 

    i'd get false. how can i get true if i call Reader.getSomething? override and virtual seems to work on functions, but not new for variables

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

    Unable to use public function of type Node[C++]

    Posted: 27 Dec 2017 07:43 PM PST

    http://cpp.sh/6ipsg

    I created a struct Node in my private section (line 16). I created a function in line 13 that returns the node if it is in the BST.

    I get an error saying Node is an unknown type. Is it because Node can only be accessed by my private function? How do I go about using it in my public function?

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

    [JavaScript] What is a byte? How do the Uint8Array and TextEncoder/TextDecoder functions relate to it?

    Posted: 27 Dec 2017 03:42 PM PST

    Hello,

    I am trying very hard to understand these things, but the confusing articles online aimed at people with CS experience aren't helping.

    1.) I am told that a Uint8Array and similar data types contain a list of "bytes". How is this different than a normal list of numbers?

    2.) What does it mean to convert this "array of bytes" (which seems be just an array of integers) using TextDecoder.decode?

    • Going deeper, what even is a decoder/encoder? If I use TextDecoder.decode to decode an array of bytes as UTF-8 and get a string back, what in the world is actually going on? Does it look at every X numbers and perform an operation?

    Any resources on this would be much appreciate too.

    Thanks!

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

    Is Javascript really as popular as people say it is?

    Posted: 27 Dec 2017 03:37 PM PST

    I'm a CS student who learned C++ and Python through school and been thinking of picking up Javascript as I hear its a popular language and many bootcamps teach it.

    However, looking at the various job listings in NYC, it doesn't seem like Javascript is mentioned as much. Popular languages I see are C++/Java/Python. Javascript seems to be more of a "good to know" kind of language. I've been thinking of picking up Java instead.

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

    No comments:

    Post a Comment