• Breaking News

    Thursday, July 12, 2018

    Insane collection of 1000+ programming PDFs (books and articles) learn programming

    Insane collection of 1000+ programming PDFs (books and articles) learn programming


    Insane collection of 1000+ programming PDFs (books and articles)

    Posted: 12 Jul 2018 11:14 AM PDT

    I just found this collection of free PDFs while browsing Github. Have to admit - it's somehow discouraging to see a Github project with so much information that a lifetime of reading would not be sufficient to fully absorb it.

    1000+ programming pdfs

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

    Would anyone be interested in a Code Visualiser?

    Posted: 12 Jul 2018 09:05 AM PDT

    Dear fellow redditors, would anyone be interested in a code visualiser?

    This tool reads written code line by line and visualises the entire cycle of a program. We aim to provide an understanding of computer code by showing the underlining operations. Our platform should establish a visual intuition of data creation and flow to anyone wishing to learn programming.

    We are 3 Computer Scientists looking to demystify algorithmic building to empower new comers wishing to have a place in the industry and speak the language of the 21th century.

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

    [C++] Discrepancy Between Function Address and Value in DWORD

    Posted: 12 Jul 2018 07:05 PM PDT

    I am trying to save the address of a function into a DWORD, but the value stored is different from the function's actual address and I'm not sure why. This is the entire program, compiled in MSVS2017 as a 32-bit application:

    #include <Windows.h> void hello() { } int main(void) { auto address = (DWORD)&hello; return 0; } 

    Now hello's address is at 0x00A01690 which is 10491536 in base 10. But the value kept in address is 10489961. I don't think this has to do with ASLR, and DWORD is just a typedef for ulong, so I'm not sure why there is a discrepancy. Any help would be appreciated.

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

    So is there anything you can't do with a do while loop that you can do with a while loop or a for loop?

    Posted: 12 Jul 2018 09:28 PM PDT

    Title

    This a question my professor asked me in and this is my response:

    Yes and no? I'll try to explain it the best I can but it gets confusing...

    So. A while loop checks to see if the statement is true before the code is ran

    A do while loop checks to see if the statement is true after the code is ran

    A for loop does not check a true or false statement but runs code based on a "counter" or the number of times specified by a set number or variable

    To my understanding you can use whatever fits best. The for loop being the most restrictive loop. The while loops being the "jack of all trades".

    The main difference between the while loops being that the do while loop will always run the code, disregarding the statement on it's "first lap" and the while loop will only run if the statement is false.

    To answer your question more simply, no.(I think)

    Posting because I'm not sure I'll get a response before Monday and I'm really curious.

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

    [QUESTION] Could someone tell me how should I start to contribute to open-source ?

    Posted: 12 Jul 2018 03:27 PM PDT

    I am currently doing competitive coding but it seems to be all about data structures and algorithms ... How do i start to contribute to open source ... I am more than a begineer but less than an intermediate in C++ ... and just a little bit more than begineer in Rust,JavaScript,Python and PhP.

    I am trying to self learn and am not interested in Web-Development ... Are there any legit tips to increase my knowledge or is there a particular way that I should study ?

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

    Having trouble with java arrays, removing an element then returning a new size of an array

    Posted: 12 Jul 2018 11:40 PM PDT

    So guys i'm having trouble finding a solution for this question. I'm kinda frustrated that i didn't solve this kind of problem during my exam for employment.

    Problem: The task is to provide an implementation for the given function. int[] removeElem(int[] array, value), the objective is to find if the array contains the given 'value' inside it. if found then remove the element from the array then return an array with a new size, else return original array.

    So far this is what i got:

     public static void main(String[] args) { int[] myArray = {5,6,9,4}; int[] newArray = removeElem(myArray,9); for(int i=0;i<newArray.length;i++){ System.out.print(newArray[i] + " "); } } public static int[] removeElem(int[] array, int value){ int[] tempArray = array; int newArrayLength = 0; int[] newArray; for(int index=0;index < tempArray.length; index++){ if(tempArray[index] == value){ tempArray[index] = -1; newArrayLength++; } } newArray = new int[tempArray.length - newArrayLength]; for(int index=0;index < newArray.length; index++){ if(tempArray[index] != -1){ newArray[index] = tempArray[index]; } } return newArray; } 

    Unfortunately i can't get it right :/ Any help would be appreciated :)

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

    Few questions about Google Cloud platform

    Posted: 12 Jul 2018 11:18 PM PDT

    1) what is the purpose of Gcloud-App-Python-Extensions?

    2) What are the Gcloud-App-Python-Extensions(extra libraries)?

    I know there is an explanation on this page but i still dont understand without an example.

    https://cloud.google.com/sdk/docs/components#listing_components

    3) What is the Gcloud Library for python?
    https://googlecloudplatform.github.io/google-cloud-python/

    4)Is there any relation between Gcloud Library for python and the extensions??(examples please)

    Thanks in advance!

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

    How long should it take a junior developer to make a simple android app

    Posted: 12 Jul 2018 11:08 PM PDT

    Hi guys.

    So I got my first job in making apps for Android and iOS but I am running into an issue where my boss thinks I am "stupid" and that I don't learn fast enough. One thing that stuck out to me was that an app I was working has taken me so far 3 weeks to build but my boss who is a senior developer claims he could build everything I have done in the last 3 weeks in 2 days. And thinks I learn too slow.

    To give some idea of what the app does and is, it contains about 10 screens, uses fragments for much of its content, has a login and register system, login with Facebook, imports users contacts and filters them based on user input so that a user can then purchase a gift for them the data for that is pulled from an online API as JSON. Finally the user will be able to see these selected items in a basket and then checkout.

    I had no experience coming into this and while I personally feel I had learnt fairly quickly I am starting to question if I am right for this job.

    Any advice on my situation would be much appreciated.

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

    Creating my own mathematical algorithm

    Posted: 12 Jul 2018 07:21 PM PDT

    Trying to learn how I would go about creating an algorithm that would multiply, subtract, divide and add a group of random numbers in an attempt to equal or get as close as possible to another random number (x). Would you recommend any books, videos, course, etc that sheds light on this?

    For example: if given 10, 2, 8, 60 x = 102

    The algorithm would find numerous ways to equal 102 Option 1: (60 * 2 = 120 | 10 + 8 = 18 | 120-18 = 102 ) Option 2: .... Option 3:...etc

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

    Help me with functional programming (language choice: typescript)

    Posted: 12 Jul 2018 10:31 PM PDT

    I'm just messing around trying to learn more about functional programming. I'm using this TS library: https://github.com/gcanti/fp-ts

    I'm starting with some basic monads (jokes, I have no idea what the fuck that word is. One day..). I'm trying to use a Maybe or an Either or Option or whatever else I've seen it called. My test is to call a rest endpoint and see if I can write something that elegantly handles it success or failure. The imperative way I'd normally do it looks like this:

    try { let result = await axios.get('http://jsonplaceholder.typicode.com/posts/1') console.log('The result: ', JSON.stringify(result.data)) } catch (error) { console.log('Oh no.') }

    But that's kind ugly so with with those weird try/catches so I'm trying to write something that reads more like prose. I think the end goal is for it to be more declarative.

    ``` import { Either, left, right } from 'fp-ts/lib/Either';

    export async function getOrFail(): Promise<Either<string, Error>> { let result = await axios.get('http://jsonplaceholder.typicode.com/posts/1') if (result.status = 200) { return left(result.data.title) } else { return right(new Error('something')) } } ```

    Is this the proper usage of an either? I don't really get what I'm supposed to do with this.

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

    How to create a one-for-all XML template when the parser is available?

    Posted: 12 Jul 2018 10:23 PM PDT

    Hi, I am working on an interface that moves the info from txt file to XML. Txt files may contain more info than needed and XML files have a closed set of attributes. The names of "attributes" in 2 formats are slightly different and I cannot predict. Say "number_of_iteration" vs "num_of_iteration".

    So naturally, I think it would be a good idea to have a "dictionary" that maps the attributes' name from txt to XML.

    Now, I have the source code for XML parser that get info from XML for use later. Is it possible to generate a XML template based on this parser that includes every possible attributes, so I don't have to manually to write the XML structure ? I think I can manually fill in the txt attributes later.

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

    Why do you go to boot camps?

    Posted: 12 Jul 2018 10:13 PM PDT

    I'm curious why some of you chose to pay so much money ($10k+) to go to boot camps.

    Is it because of the job-guarantee thing? School-like environment?

    As far as I know, anything that they present to you are pretty much the same content you would find in online tutorial videos, any questions that you can ask you can ask them online too. I know that they pair you in teams and work on group projects, that you couldn't find online, but is it really worth $10k+?

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

    I feel so anxious to start doing actual projects on GitHub and independently but don't know where to start

    Posted: 12 Jul 2018 12:58 PM PDT

    I've been programming for over a year, I'm 17 and plan on going to college for Computer Science. However I'm just dying to start working on real and tangible projects doing cool stuff with what I can code. I'm by no means amazing at this but I feel I have enough problem solving ability to start; more specifically in Python I feel is my strongest but I can pick up anything roughly and I'm taking a class in Java this school year.

    I'm also taking CS50 right now for refining my skills. My goal is to get an internship in the Google Practicum after my Freshman year. (Big goal I know but can't achieve big goals if you never make them so who cares!)

    Where should I start, any advice is appreciated I'm hoping to complete my own project or be actively contributing on GitHub by the end of this year!

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

    Why are there three different ways to Initialize Variables in C++?

    Posted: 12 Jul 2018 09:09 PM PDT

    I have one year of CS experience and I'm trying to learn C++ after learning C.

    In C++, why is there 3 different ways to initialize variables?

    For instance

    int x = 0;

    int x (0);

    int x {0};

    Is this just a personal preference or are there cases when I should prefer one over the other?

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

    [Python] Grayscale to tri-color conversion

    Posted: 12 Jul 2018 08:40 PM PDT

    I would like to change the output PNG of this script:
    https://github.com/akapila011/Text-to-Image/blob/master/text_to_image/encode.py
    to tri-color (red, blue, yellow)
    Instead of its current grayscale format. I figure I need to change lines 34-45, but im not sure how to go about it.

    img = Image.new("L", size) # grayscale, blank black image ind = 0 for row in range(0, size[0]): for col in range(0, size[1]): if ind < text_length: # only change pixel value for length of text pixel_value = convert_char_to_int(text[ind], limit=limit) img.putpixel((row, col), pixel_value) ind += 1 else: # end of text, leave remaining pixel(s) black to indicate null break img.save(result_path) return result_path 

    Could use some advice. Thanks!

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

    Transaction::Transaction(int amt, std::string kind):amount(amt),type(kind) { } (what is the second part doing? c++

    Posted: 12 Jul 2018 08:32 PM PDT

    sorry sill question i think..am on classes and it wasnt really exsplained..

    Transaction::Transaction(int amt, std::string kind):amount(amt),type(kind)

    {

    }

    what exactly is

    :amount(amt),type(kind)

    mean/doing?

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

    Class, instances, and objects....

    Posted: 12 Jul 2018 08:19 PM PDT

    I am having great trouble understanding this.... does anyone have a good explanation? How do the relate and how do you manipulate them.

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

    What kind of machine should I get?

    Posted: 12 Jul 2018 04:08 PM PDT

    I wanna get into coding and I need a PC that is easy to carry around and that is able to play Euro Truck Simulator 2 @768p. Budget is 400€

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

    can't mute videoelement in rtc app

    Posted: 12 Jul 2018 07:35 PM PDT

    I'm making an rtc app with simplewebrtc(sadly depricated now). I simply want to mute peer videos from my side as seen in this: https://pastebin.com/cXaV1a5D (script can be run from client side on a browser of your choice, I'm using chrome for crossreference support) however, I can't set the status of the remote video to "muted" even though my breakpoints all call. any possible solutions? 175-189 is where this error mostly lies

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

    How can I make a post request on chrome on a page I'm currently on using fetch?

    Posted: 12 Jul 2018 07:08 PM PDT

    On a web page that I am currently signed on to, when I click a button, it makes a fetch post request. In chrome I copied the request I made into a fetch call. When I paste this into the console and run it, the post doesn't actually save the item. Is there something I am doing wrong here?

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

    Tips for taking your mind off programming?

    Posted: 12 Jul 2018 11:21 AM PDT

    I've been learning how to use Java the past few days (roughly 2 hours a day) as part of a course I'm undertaking, one issue I've been finding with it is that I constantly find myself thinking about everyday things in a programming sort of perspective, especially with boolean logic. It's starting to the point where it's affecting my sleep.

    Apart from not programming in the evenings, does anyone have any advice for taking your mind off of it?

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

    Help me with this Stack Overflow $h!t

    Posted: 12 Jul 2018 10:34 PM PDT

    Learning Python and Pygame, loot systems question?

    Posted: 12 Jul 2018 06:38 PM PDT

    I'm a hobbyist working on a little for-fun project while learning to use python and pygame. I plan for it to be runnable on a raspberry pi.

    It has RPG elements of loot, and I want to be able to have some loot tables and be able to store quite a lot of inventory. 500-2000? I don't know yet, but a lot since the main point of it is collecting.

    I was thinking that SQLite is the way to go but I don't really know what I'm doing so I was hoping someone could help me with what direction I should take! Maybe SQLite for saving loot but something else for creating loot tables? What would you do?

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

    I made an integer factorization algorithm. How efficient is it?

    Posted: 12 Jul 2018 02:26 PM PDT

    https://repl.it/@ddotquantum/Integer-factorization

    Edit: It returns the prime factorization of x, not the factors of x.

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

    No comments:

    Post a Comment