• Breaking News

    Monday, July 30, 2018

    Looking for some podcasts where I can actually learn learn programming

    learn programming

    Looking for some podcasts where I can actually learn learn programming


    Looking for some podcasts where I can actually learn

    Posted: 29 Jul 2018 11:27 AM PDT

    I drive about an hour a day and would like to listen to some podcasts. The one ones I've found that people recommend are all just interviews of notable people or they talk about their daily life. I don't really care about them. I would love one that goes into detail about how some things work in lower level languages or explanations of lesser known algorithms. I want to learn about programming, not people who program. I'd love some suggestions!

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

    My Android development book "Android Development for Gifted Primates" free on Amazon for 24hrs!

    Posted: 29 Jul 2018 12:34 AM PDT

    The promotion is underway!

    You can get it HERE for 0 (that's zero) dollars for the next 24 hours. After that time, the free promo period will expire and it the book will go back to its normal price of $3.99.

    Be warned that it's unlike any other programming book you've ever read before. It's funny (people have even called it 'hilarious'), foul-mouthed, very opinionated and it goes on some weird tangents, like a treatise on King Kong's gastrointestinal system.

    Again, it'll stay free for the entire day of July 29th, 2018. Go get it!

    [Edit: for anyone getting the message that it is not available in their region, visit your locale's Amazon store, eg if you are in Germany go to amazon.de. If you're still having trouble downloading the book, let me know!]

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

    I made a Python reddit bot that also uses the Processing language!

    Posted: 29 Jul 2018 12:55 PM PDT

    Hey! I recently finished making a bot that takes images from random subreddits(mainly /r/pics and /r/art) and posts them to my subreddit: /r/processingimages.

    This bot uses the Processing language to run the images through a type of filter and creates a different picture from the original.

    It's still in the early stages but it's working and will be posting pictures every day to /r/processingimages.

    Here's the github repo Feel free to clone the repo and use it for yourself. The config.yaml file should have all the required config options.

    If you have any questions feel free to ask and any criticism is highly appreciated.

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

    Can someone be real with me please is 27 years old too old to turn my life around and become a programmer ?

    Posted: 30 Jul 2018 12:04 AM PDT

    So i am an ex tennis trainer injured my elbow and now i cant train anymore...plus i am tired of it and i was thinking about some time to change my life around and get into CS field since i always enjoyed computers. I was wondering can someone be real with me am i too old to become a programmer, i was looking this days into programming languages and i really enjoyed learning Python someone recommended a book called "automate boring stuff with Python" and i loved it. So please if anyone has some motivating words, or knows someone that started later in life and became a programmer, any recommendations, resources....or just be real with me if it is too late.

    Thanks for the answers !

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

    I want to create a modern looking GUI application but I'm not sure where to start

    Posted: 29 Jul 2018 09:09 AM PDT

    Hello all,

    I've been looking into creating a GUI for a while now. I've been learning python the last month and a half and from what I've seen, I can't seem to create what I want in this language.

    I know that many people will tell me that I should be looking into functionality over prettiness, but I have a certain vision for this application and would really like to create it the way I imagine it. When it comes to python, it doesn't look like the applications I can make look very "modern". They look very bland and basic.

    I could be completely wrong however and could be looking in the wrong place. This is an example of how I want my programs to look. UI_Video

    It looks beautiful and sleek but I don't know what this type of development is called or how I can start doing it myself. I'm very overwhelmed looking at this video and am looking for a sense of direction. Thank you for all your help!

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

    What is dependency injection and when/why should I use it? [Java]

    Posted: 29 Jul 2018 11:54 PM PDT

    I'm a Java developer and heard the term very often. I know basically nothing about it other than that it's a design pattern and it's used by some frameworks. I have absolutely no idea why and how I would use it. The things I found online about it weren't very helpful, but maybe I just looked at the wrong places. Can someone explain it to me?

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

    Two Swagger API Documentation in one project

    Posted: 30 Jul 2018 12:39 AM PDT

    I'm trying to document modules from my project, but it needs to be separated (one for users, one for admin) but when I tried to replicate the file that calls the api-docs.json (l5-swagger.php), it isn't working. I'm using Swagger 2.0 on Laravel 5.6

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

    Converting an expression to a cobegin/coend help

    Posted: 30 Jul 2018 12:36 AM PDT

    Im not sure where to post for help about this. I tried youtubing someone doing it but all I get are directed graph problems.

    I need to convert

    P(S(P(p3, S(p1, P(p6, p5))), p2), p4) 

    to a cobegin/coend program.

    the graph I came up with is: https://imgur.com/a/20saKOr

    Im pretty sure its correct. Now for cobegin/coend im struggling with the p4. I managed to capture the rest of it but not sure how to proceed. This is what I have so far:

    cobegin P3 // { P1; cobegin P6 // P5 coend } 

    Ideally id like to know if there is some trick to doing these? My professor just explained how one works without doing any actual example of conversion. So I dont know if Im missing some formula for this type of conversion?

    PS - sorry if this is a bad subreddit for this, but I literally dont know where to post this. If you do, please let me know.

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

    Need help "converting" this JS to python

    Posted: 30 Jul 2018 12:29 AM PDT

    Dear programmers

    I have always been interested in programming (but I'm awful at it) and a silent reader of reddit. Now the time has come that I need your help for a little project.

    Subject is the following code: https://github.com/anders94/blockchain-demo it is a little blockchain demonstration. What I am most interested in is the "mining" process, where the script guesses nonces to retrieve a set amount of zeros:

    function mine(block, chain, isChain) { for (var x = 0; x <= maximumNonce; x++) { $('#block'+block+'chain'+chain+'nonce').val(x); $('#block'+block+'chain'+chain+'hash').val(sha256(block, chain)); if ($('#block'+block+'chain'+chain+'hash').val().substr(0, difficulty) === pattern) { if (isChain) { updateChain(block, chain); 

    The issue with this javascript is that it runs too slow to set the var difficulty higher (it only has approx 66kh/s on my desktop). Now I want to adjust the function in this basic python blockchain https://github.com/howCodeORG/Simple-Python-Blockchain to exactly match the above hash input, so that I can get the identical output hash.

    def hash(self): h = hashlib.sha256() h.update( str(self.nonce).encode('utf-8') + str(self.data).encode('utf-8') + str(self.previous_hash).encode('utf-8') + str(self.timestamp).encode('utf-8') + str(self.blockNo).encode('utf-8') ) 

    So I have zero experience with javascript. How can I modify the .py file to match the input of the js? (The sha256 encryption should be the same right?).
    Up to now the obvious modification for me is to leave the timestamp away but I really have no clue how to make sense of what this input in the js is.

    I would be very happy for some help to understand this better :)

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

    [Kotlin] Inheritance, composition, delegation, and traits

    Posted: 30 Jul 2018 12:21 AM PDT

    I dont know what to learn and im worried

    Posted: 29 Jul 2018 10:30 AM PDT

    I just dont know what to do.. i have been learning c in school for about a year , then i wanted to try something new, and got into python. I learned more at home by myself in a month than i did in a year in school.. then i decided that i wanted to try game development and started learning c++, but soon after that i gave up on that too, i feel like developing desktop applications is more my thing. I just dont know what should i learn. I know that i need to learn one language very well instead of 6 different ones very bad, but i just cant decide which one. I just want to learn a language that will get me a somewhat decent job when i get out of school, and i just want to be somewhat succesfull in life. Helpp...

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

    I created a product for inventory management and deals creation for restaurants/shops/misc. businesses but its stagnant due to various reasons. I am deciding to open source it for

    Posted: 29 Jul 2018 05:58 AM PDT

    Hi there

    I along with my friends started to work on a startup idea which was meant to be an ad platform in cabs. We created the platform but couldn't get any leads for video content as it was a must to have thing for our product.

    Due to the high price of the licensing of the video content and fees for cabs , price of tablet, that we were seeking, we couldn't proceed further.We tried connecting with many people in industry but couldn't proceed as nothing worked out.

    Certain add-ons / features are not completed in this but can be done in 2-4 days.If you need a detailed walk through then pm me . I tried to explain it on the docs of github repo.

    So now the only thing that is left is a product. If anyone wants then can make use of it.

    Any suggestions are most welcome :)

    Here's the link to the Github Repo

    I wish to see the product in use :)

    Thank You

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

    Bootcamp grads, Besides the common ones (finding a job, working on projects) I'm curious to know, what were some of the benefits of going through the bootcamp?

    Posted: 29 Jul 2018 11:36 PM PDT

    I've been thinking alot of attending on these days

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

    What program should I use

    Posted: 29 Jul 2018 11:25 PM PDT

    Hello I am new to programming and want to know what is the best program for the functions I want. I want to create games and tools because I play a lot of tabletop games that I would like to make stuff for to make DMing easier.

    The app I am using (solo learn) has courses on python3, HTML, css,JavaScript,c++,sql,swift,python numPy,

    If you can please give me an idea of which one would be the best for me

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

    How is an asynchronous method created in java?

    Posted: 29 Jul 2018 11:18 PM PDT

    I keep checking online that events are called asynchronously. I know that asynchronous is that the compiler will move on to another task before the method finishes it's task. But how are asynchronous methods created? I know if we add a method that will be run in another thread, then that method will be executed asynchronously.

    But I saw that "Listeners" are asynchronous, how is that done, considering that "Listeners" are just interfaces that we implement in our classes? Example EventListener: http://developer.classpath.org/doc/java/util/EventListener-source.html or http://developer.classpath.org/doc/java/awt/event/MouseListener-source.html

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

    ASP.NET Core 2 vs Spring (Java EE) vs Django vs Android - Which will be better for doing real life, practical projects before studying MSc in Software Engineering?

    Posted: 29 Jul 2018 10:15 PM PDT

    I am going to University Putra Malaysia for MSc in Software Engineering. As I am an EEE graduate, I feel that I need to get involved with various intermediate level projects. It will allow me to dive deeper in the class lectures. I have learnt the basics of different frameworks, including ASP.NET Core 2, Spring, Django and Android, through Lynda and Udemy tutorials. However, I do not have any practical experience. Now, which one should learn more seriously and create real-life projects with it to make my knowledge more effective?

    And where can I make friends with the programmers who can always keep me motivated for awesome software projects? How about LinkedIn? I really need to get along with motivational people. ;)

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

    Vigenere Cipher question in C++

    Posted: 29 Jul 2018 06:26 PM PDT

    Perhaps you guys can make some sense of the problem I had for the longest time. So my programming skills are rustier than I would like so I decided to try my hand at basic fun ciphers. I managed to make a cipher, however for the longest time I was working with lower case characters and encryption/decryption never worked. So I made one switch to all upper case and encryption and decryption work like a charm. Why does the program not work when configured for lower case, but upper case is a breeze?

    //Upper Case Configuration - This Works #include <iostream> #include<string> using namespace std; // Encryption Magic Vigenère cipher string encrypt(string notSoSecureData, string key){ int oldCharValue; int keyCharValue; int cipherCharValue; for(unsigned int i = 0; i < key.length(); i++){ if(notSoSecureData[i] != ' '){ oldCharValue = int(notSoSecureData[i]); keyCharValue = int(key[i]); cipherCharValue = (oldCharValue + keyCharValue) % 26; cipherCharValue += 'A'; notSoSecureData[i] = char(cipherCharValue); } } return notSoSecureData; } // Decryption voodoo Vigenère cipher string decrypt(string superSecretData, string key){ int cipherCharValue; int keyCharValue; int originalCharValue; for(unsigned int i = 0; i < key.length(); i++){ if(superSecretData[i] != ' '){ cipherCharValue = int(superSecretData[i]); keyCharValue = int(key[i]); originalCharValue = (cipherCharValue - keyCharValue + 26) % 26; originalCharValue += 'A'; superSecretData[i] = char(originalCharValue); } } return superSecretData; } int main() { // Input and generate secrets and "proper" key // Only check being made is that the key is shorter than // the secret data to be encrypted string secrets = ""; string originalkey = ""; string finalkey = ""; string ciphertext = ""; bool validInput = false; while(!validInput){ cout << "Please enter the data to be encrypted." << endl; getline(cin, secrets); cout << "Please enter the key to use. If shorter than your data, it will be repeated until length matches." << endl; getline(cin, originalkey); if( originalkey.length() > secrets.length() ){ cout << "Please try again. Key length must not exceed data to be encrypted" << endl; } else{ validInput = true; } } finalkey = originalkey; // Ensure that lengths of key and secrets are same length if( originalkey.length() < secrets.length() ){ int keylen = originalkey.length(); for(unsigned int i = keylen; i < secrets.length(); i++){ finalkey += finalkey[i % keylen]; } } // Make all of secrets and the key upper case to make my life easier. for(unsigned int i = 0; i < secrets.length(); i++){ secrets[i] = toupper(secrets[i]); } for(unsigned int i = 0; i < finalkey.length(); i++){ finalkey[i] = toupper(finalkey[i]); } cout << "Data to Encrypt: " << endl; cout << secrets << endl << endl; cout << "Key to use: " << endl; cout << originalkey << endl << endl; cout << "Key changed to match length: " << endl; cout << finalkey << endl << endl; ciphertext = encrypt(secrets, finalkey); cout << "Data encrypted: " << endl; cout << ciphertext << endl << endl; cout << "Data decrypted: " << endl; cout << decrypt(ciphertext, finalkey) << endl << endl; return 0; } 

    Running it gets me this...

    Please enter the data to be encrypted.

    super secret data

    Please enter the key to use. If shorter than your data, it will be repeated unt

    il length matches.

    rambo

    Data to Encrypt:

    SUPER SECRET DATA

    Key to use:

    rambo

    Key changed to match length:

    RAMBORAMBORAMBORA

    Data encrypted:

    JUBFF SQDFVT EOKA

    Data decrypted:

    SUPER SECRET DATA

    However, if I change parts to...

    cipherCharValue += 'A'; --> cipherCharValue += 'a'; originalCharValue += 'A'; --> originalCharValue += 'a'; secrets[i] = toupper(secrets[i]); --> secrets[i] = tolower(secrets[i]); finalkey[i] = toupper(finalkey[i]); --> finalkey[i] = tolower(finalkey[i]); 

    I will get:

    Please enter the data to be encrypted.

    super secret data

    Please enter the key to use. If shorter than your data, it will be repeated unt

    il length matches.

    rambo

    Data to Encrypt:

    super secret data

    Key to use:

    rambo

    Key changed to match length:

    ramboramborambora

    Data encrypted:

    vgnrr ecprhf qawm

    Data decrypted:

    egbqd eqodqf pmfm

    Why?

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

    Need Help: Run Function On File Addition To Folder

    Posted: 29 Jul 2018 10:00 PM PDT

    So I have an assets folder that has let's say 10 images. I want the following functionality:

    When an administrator adds new images to this assets folder past the already 10 existing files, I want my app to run a function in a ts file that will create an entry for each newly added image in the database.

    How would you approach something like this? I'm not really sure how this would be done. I'm not that familiar with server actions. I had initially thought this was an Angular problem, but I posted on the Angular subreddit and they told me that this is a server problem. I know how to write the function that creates the new entries in the database, but I'm not sure how to trigger this function when new images are added to the folder. (I am using Angular and Firebase)

    Any and all help is greatly appreciated. Thanks! I've been stuck on this for like a week now.

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

    What's the term for words that Programming languages treats differently rather than just a word.

    Posted: 29 Jul 2018 09:50 PM PDT

    What's the general term for functions, methods, statements, etc. ?

    examples:

    else

    if

    for

    .get

    .withdraw

    .mainloop

    .geometry

    .title

    etc.

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

    Struggling to figure out how to structure a basic Rails app.

    Posted: 29 Jul 2018 09:49 PM PDT

    I'm trying to make a basic rails app that takes some input values in a form from a pre-populated list, concatenates them together, and stores the resulting value as a timestamped string, but also stores a record of the "configuration" of input values that could be used to recreate the string in the future such that if I had a separate form that let me edit the values in the pre-populated list, any previously stored concatenated result would have that particular part of it modified.

    So for example:

    Dropdown form with input options of:

    • Banana
    • Apple
    • Berry
    • Plum

    Concatenated String: "BananaAppleBerryPlum"

    Then edit the table containing the values of the dropdown to change "Apple" to "Orange."

    Snapshot of the original timestamped concatenated string still shows "BananaAppleBerryPlum" but that record also could be run through the concatenation again, and this time would read "BananaOrangeBerryPlum"

    Hopefully that makes sense. I think the approach is to create a table for the dropdown options so they have IDs associated with them, and then when I store the timestamped concatenated string, I also store an array of the input IDs so that I could concatenate the values by looking up their ID in the table, and any modified values would automatically populate.

    So, given that, how might I break out my models, controllers, and views for something like this? I'm not really grasping how to incorporate multiple models into a single view's form like that, and I'm not totally confident in how to structure my DB.

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

    Why do we get so tired when learning? Will it go away?

    Posted: 29 Jul 2018 09:37 PM PDT

    I'll be watching a tutorial or reading and I'll literally get tired to the point of almost passing out with my head still in the air. I hear it's like any other muscle, if you train for endurance, you'll get better at it, but there's some days where my body is just like "nope, we're gonna make you sleepy so you can't learn this!"

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

    did I do it right?

    Posted: 29 Jul 2018 09:33 PM PDT

    "Override the Student's OutputIdentity() pure virtual method to display the text "I am a student" to the console"

    "Override the Student's OutputAge() virtual method to display the text "I am a student" and then calls the Person class's OutputAge() method".

    or did I misunderstand something?

    main.cpp

    #include <iostream> #include "Person.h" #include "Student.h" #include "Teacher.h" using namespace std; int main() { Student obj("marcus","carcass",87654321); Person *student1 = &obj; student1->OutputIdentity();//step 8 student1->OutputAge(); cout<<endl; } 

    Person.h

    #ifndef PERSON_H #define PERSON_H using namespace std; class Person { public: Person(); //virtual ~Person(); string first_name; string last_name; virtual void OutputIdentity()=0; virtual void OutputAge(); protected: int phone; private: int age; }; 
    

    No comments:

    Post a Comment