• Breaking News

    Sunday, March 25, 2018

    I would like to share 500 Data Structure and Algorithms problems learn programming

    I would like to share 500 Data Structure and Algorithms problems learn programming


    I would like to share 500 Data Structure and Algorithms problems

    Posted: 24 Mar 2018 04:12 AM PDT

    You can find around 500+ data structure and algorithms problems here that are helpful to improve your algorithmic skills and also to crack coding interview of top tech companies.

    Here's another link that filters problems that are solved using STL.

    Hope this helps.

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

    So many skills to learn at once...losing motivation...

    Posted: 24 Mar 2018 06:39 PM PDT

    Hardly any skills I looked up online for programming stuff are standalone.

    For PHP, as an example, I am told that I also need to learn JavaScript, HTML, CSS, backend framework, Lavarel and so forth, JUST to do freelance work involving PHP. Even just PHP is not enough and I still need to learn object-oriented PHP it seems, and there are other skills that are tied in to object-oriented PHP and each of the tied-in skills have THEIR OWN tied-in skills and so on and so forth like a never-ending trail....

    I'm really losing motivation to study here...yeah I get it. Learning more is fun and exciting, but I'm actually studying to learn new skills to find work. What's the use of me studying something I can't even use because it's too 'beginner' and lacking all the other skills?

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

    What exactly goes into "scaling" a web application?

    Posted: 24 Mar 2018 11:02 PM PDT

    I've been reading about Firebase vs Express with self hosted database and my takeaway was that Firebase is "easier" to scale at the cost of less flexibility and querying options (Firestore may be a little better).

    What exactly does the extra scaling effort entail if I were to host on Digital Ocean or Linode, both who seem to be able to scale hardware quite easily? I don't have any idea of what goes into the software/programmer maintenance part of scalling.

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

    raspberry pi

    Posted: 24 Mar 2018 05:17 PM PDT

    Is raspberry pi good for helping me learn programming ? Have you had any experience with it(if so please share with me where it exceled and where it lacked)? Does it matter if i get a raspberry pi 1,2,or 3 ? Can it help me learn programming languages other than python ?

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

    Why does the function need to call its self in this factorial function in Python?

    Posted: 24 Mar 2018 10:39 PM PDT

    I don't understand why it's necessary to call its self. I also don't understand why it would need to start counting at 0 when you input an integer. I just can't wrap my head around the concepts in this function and I would be eternally grateful if someone would explain them to me.

    def factorial(x): if x == 0: return 1 else: return x * factorial(x-1) 
    submitted by /u/zeusophobia1
    [link] [comments]

    Help with setting up code::blocks with C++

    Posted: 24 Mar 2018 09:07 PM PDT

    I'm going through the C++ for dummies book, and early on the book tells me to select "have g++ follow the coming C++0X ISO C++ language standard" and the "have g++ follow the C++11 ISO C++ language standard" at the same time. The settings, however, only allow me to select one of the options at a time. What do I do?

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

    i just finished the first chapter of https://www.sololearn.com to learn C++, im super happy!

    Posted: 24 Mar 2018 10:51 AM PDT

    i dont have anyone i could talk with about it, but im soo happy to be done with the first chapter, it tooke me just about an hour and was really way easier than i thought, of course its just the basics, but i always had an F in java and to see what a difference a good explanation with good examples can make baffles my mind, i understood everything and already am testing a lot of small useless programs that calculate some useless stuff just to see if everything does what i think it does when i do this or that etc.

    i wanted to learn C++ to write my own cheats for a few games, just because i think it is really interesting to see how these games work and what you can do with it.

    im a bit scared i lose interest once the course gets harder, but if it keeps being fun like this im in for a goooood time :D

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

    [Pseudocode]Dirt simple backtracking?

    Posted: 24 Mar 2018 11:51 PM PDT

    Hey sub,

    I'm currently trying to learn backtracking, but everywhere I look are complicated examples with prime numbers and chess problems. I was hoping for a simpler approach, such as first a template, then a dirt simple example.

    To exemplify, here's what I need applied to recursion:

    Template:

    recurse() { if (condition) { // base case reached } else { // recursive case recurse(); } }; 

    Simple examples:

     i=0; recursiveWhile(i){ if(i==100){ // base case reached print(i); } else{ // recursive case print(i); recursiveWhile(i+1); } } fibonacci(n) { if (n==1) { // base case reached return 1; } else { // recursive case return fibonacci(n-1)+fibonacci(n-2); } }; 

    Thanks in advance.

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

    Is this level of nonsense to be expected in job postings?

    Posted: 24 Mar 2018 08:05 PM PDT

    So, I'm perusing the local job boards. I'm not quite finished with school yet, but I want to get an idea of what the local job market wants/needs. I've come across several postings that contain incorrect information.

    Here's an example, listed under "desired skills":

    "Experience with the following Object Oriented Programming Languages: JavaScript, CSS, HTML"

    Now, I'm guessing the listing was written by someone in HR, but presumably they got the information from a developer. Is it best to avoid/ignore listings like this, or could I be overlooking good job opportunities? If I found a junior position, I'd obviously like to work with more experienced developers. I don't want to end up working with someone who thinks HTML is an object oriented language, or even a programming language at all.

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

    So I've been trying to install nodejs express for a couple of days. It finally installed. Could MWB be what the problem was?

    Posted: 24 Mar 2018 11:42 PM PDT

    I had a free trial of malware bytes due to updating, and the only real difference between what I've been trying, has been that the real time protection expired. Was something in that possibly blocking me from getting express installed? Or, was it something else? It would always hang at the same point in the installation process. I am running on Windows 10.

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

    Javascript - Form validation not working

    Posted: 24 Mar 2018 11:38 PM PDT

    Hi,

    Working on a java servlet, but the form validation isnt really working. It lets all the values go through regardless of what they are.

    writer.println("<h3> SECURITY CODE: " + code+"</h3>"); writer.println("<form name=\"bookForm\" action=\"Booking\" method=\"post\" onsubmit=\"return validateBook("+code+");\">"); writer.println("<p>UserID - No Numbers:</p>"); writer.println("<input type=\"text\" name=\"userID\" id=\"userID\"> <br>"); writer.println("<p>Phone Number:</p>"); writer.println("<input type=\"text\" name=\"phoneNo\" id=\"phoneNo\">"); writer.println("<p>Home Address:</p>"); writer.println("<textarea name=\"address\" rows=\"10\" cols=\"30\"></textarea><br>"); writer.println("<p>Email Address:</p>"); writer.println("<input type=\"text\" name=\"emailAdd\" id=\"emailAdd\"> <br>"); writer.println("<p>Security Code:</p>"); writer.println("<input type=\"text\" name=\"securityCode\" id=\"securityCode\"> <br><br>"); writer.println("<button type=\"submit\" value=\"Submit\">Submit</button>"); writer.println("<button type=\"reset\" value=\"Reset\">Clear</button>"); writer.println("</form>"); 

    This is the form. This is the validation

    function validateBook(secCode) { var phone = document.forms["bookForm"]["address"].value; var user = document.forms["bookForm"]["userID"].value; var email = document.forms["bookForm"]["emailAdd"].value; var code = document.forms["bookForm"]["securityCode"].value; if (phone.IsInteger() == false) { alert("Phone number must contain letters only!"); return false; } var number = false; var regex = /\d/g; number = regex.test(user); if (number == true) { alert("UserID cannot contain numbers!"); return false; } var n = email; n = str.includes("@"); if (n != true) { alert("Email must include '@'"); return false; } if (secCode != code) { alert("Incorrect security code"); return false; } return true; } 

    and thats the validation. Currently its not validating, and letting all values go through, no matter what they are.

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

    Resources for learning javascript for someone who is already a programmer?

    Posted: 24 Mar 2018 11:12 PM PDT

    I'm proficient with languages such as c++ and python and have a good grasp of cs concepts. Recently I've been tasked with creating a webapp, so I was wondering if anyone could point me to any resources for learning basic javascript, as well as any angular or node resources.

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

    ELI5: What is Facebook's data breach of 50 million Indian users, by Trump's campaign consultatnt Cambride Analytica ?

    Posted: 24 Mar 2018 10:29 PM PDT

    So this is just happened to be in news these days and I'm learning programming so I am curious to understand that what kind of data breach is this and what is the role of Cambridge Analytica company/organisation in this? who also Consulted Trump's campaign.

    Please explain it with some data-structure/alogrithm analogy :D :p ;-)

    EDIT: some news posts I found : here

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

    How long did it take you to learn Javascript?

    Posted: 24 Mar 2018 04:23 PM PDT

    I'm not talking about mastering the language, more like when you felt comfortable enough to confidently use it in your own projects. And everyone is different, of course, but I'm interested in hearing the general consensus.

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

    Basic Python uses

    Posted: 24 Mar 2018 09:48 PM PDT

    I'm currently learning python (not far at all) and I'd like to try doing some exercises or some way to use what I've learned. If anybody has any suggestions that would be appreciated.

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

    Why is my 0/1 Knapsack implementation picking an item more than once?

    Posted: 24 Mar 2018 09:21 PM PDT

    Here's my Ruby implementation https://ideone.com/Fa3Sfx

    With a weight of 4, my final solution is 28 - only achievable by multiplying 4*7 - indicating that the fourth element has been picked four times.

    I've been looking at this for a little while, and it seems like the algorithm looks sound, but any insight into helping troubleshoot would be truly appreciated.

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

    [Python/R] Analyzing a data set

    Posted: 24 Mar 2018 09:19 PM PDT

    Which language should i use to analyze this Data Set . I'm very new to programming, i think this can be done through Python or R, but i'm not sure. Also can you please give me a heads up on the name of such kind of analysis. Are there any tools that are readily available online for such analysis?

    Thanks for taking the trouble to answer.

    submitted by /u/3ngin3
    [link] [comments]

    use facebook as a base for platform

    Posted: 24 Mar 2018 08:55 PM PDT

    I'd like to be able to make a platform that uses facebook profiles as a base. The idea would be that all facebook profiles are essentially copied (just their name and perhaps a few photos) onto a different platform, and from there people can sign in in order to make their account "active". These "active" users can make comments/notes regarding other users, but the important thing would be that these active users can comment on inactive users profiles, not just active ones. Is there any way to essentially link all facebook profiles to a new site, but without facebook or the users' permission? Let me know where I can elaborate to make what I'm asking more clear.

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

    Any good resources for programming on smartphones

    Posted: 24 Mar 2018 08:55 PM PDT

    Background: im 17 and close to graduating high school, im broke and dont have the cash for laptop until i start community college. I have been learning python by watching tutorials and interactive courses like udacity. It wont be in college for another 4 months and wanted any recommendations on good apps or youtube vids and channels to watch. I want to learn programming to hopefully break into the video game and interactive media field so anything in that direction will be useful. TLDR: Broke, only have an android, and i want to work on games

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

    Technology stacks for building a webapp?

    Posted: 24 Mar 2018 05:04 PM PDT

    Hi everyone!

    I've been doing research on what technology stacks do I need if I were to build a webapp, but still hasn't gotten anything useful other than knowing html5, css, and JavaScript are for the frontend. Can anybody explain the possible choices for the rest of the "stack"? It would be better if one can explain the advantages or disadvantages of using it.

    Thanks everyone!

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

    How much CSS and HTML before I dive into Bootstrap

    Posted: 24 Mar 2018 08:45 PM PDT

    Been playing around with HTML and CSS for about a combined week now. I think I have the very basics. I really dislike it and find it tedious (the CSS part, not the HTML part). How much do I really need to know before I should learn bootstrap?

    Thanks

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

    Architecture: Bundling stats for a web page.

    Posted: 24 Mar 2018 08:29 PM PDT

    This is really an architecture/design question.

    At my company we have an admin web page that summarises a lot of stats. The stats needed are across several tables with differing filters/groups. So an example might be users logged in in the last half hour. Number of user logins over time (to be shown in a chart), number of critical issues raised in the last week etc.

    We're using vuejs with vuex as a store. At the moment we create a single json responding endpoint in the backend that specifically services that page, so it will return

    { users_in_last_half_hour: 205, critical_issues_raised: 49, noncritial_issues: raised: 102, user_login_history: { 25/3/2018: 103, 24/3/2018: 90, 23/3/2018: 123 } } 

    etc. You get the idea. This is then put in a vuex store and consumed by various vue components.

    I'm not sure if this is the right way to proceed. I feel it might be better to have a more object based api and make individual calls for each piece of required data.

    Eg /users/count?filter=30_minute_ago, issues/count?type=critical, issues/count?type=noncritical and so on.

    NB there is no rest framework in place at the moment. It's very much roll your own.

    The concern expressed by others is that making multiple xhr requests is costly, and so a single munged endpoint is better. But I'm thinking if we add another stats page with slightly different data then we'll have to create another slightly different endpoint. And then a slightly different store. Or cannibalise off the first one.

    What would be the right way to design something like this that is maintainable and scalable? How would you structure any vuex store(s)? Tips and opinions welcome.

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

    Order of fields in C struct is changing program behavior. I know that certain orders of members cause problems, but I don't know why this does.

    Posted: 24 Mar 2018 08:01 PM PDT

    EDIT: Solved! Doing a full re-compile fixed the issue. Thanks to everyone for your ideas! Great community. I'll pay it forward.

    I inserted long explosions_vertical_push_percent; into the middle of this C struct definition, as you can see. When I compile (successfully), program behavior associated with unsigned short computer_chat_flags(a member that is further down in the list of struct members as you can see) changes and I have no idea why.

    If I instead put long explosions_vertical_push_percent; at the end, the odd behavior associated with computer_chat_flags` goes away again. Although that issue might just be visible, and whatever other issue it's now causing isn't readily apparent.

    I know that flexible members must be at the end of structs (and there's only supposed to be one of them), but this struct already was functioning fine with what looks to me like several flexible members: One at the beginning, and a few on the end. And what I added was not a flexible member anyway. Is this not true?

    Why might adding this single extra member (a long) to the struct be causing issues in my program? It compiles fine without any warnings.

    ```

    struct GameAdd { struct CreatureStats creature_stats[CREATURE_TYPES_MAX]; unsigned long turn_last_checked_for_gold; unsigned long flee_zone_radius; unsigned long time_between_prison_break; unsigned long time_in_prison_without_break; unsigned char prison_break_chance; unsigned short game_turns_unconscious; long critical_health_permil; long friendly_fight_area_damage_permil; long friendly_fight_area_range_permil; long explosions_vertical_push_percent; unsigned char torture_convert_chance; TbBool scavenge_good_allowed; TbBool scavenge_neutral_allowed; TbBool armegeddon_teleport_neutrals; unsigned short classic_bugs_flags; unsigned short computer_chat_flags; ThingModel cheaper_diggers_sacrifice_model; char quick_messages[QUICK_MESSAGES_COUNT][MESSAGE_TEXT_LEN]; struct SacrificeRecipe sacrifice_recipes[MAX_SACRIFICE_RECIPES]; struct LightSystemState lightst; }; 

    ```

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

    [npm] What does the @next terminal command do?

    Posted: 24 Mar 2018 07:55 PM PDT

    Is that a flag? Reactstrap (bootstrap for react) instructs typing 'npm i reactbootstrap@next react' on their page. I did that without react since I already had it, but the command erred. I removed @next and it worked.

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

    [homework][Assembly] How do I convert the user input (ASCII 0s and 1s) into actual binary?

    Posted: 24 Mar 2018 07:42 PM PDT

    It was originally a pebble calculator program like so:

    Input: +ooo

    Output: =ooo

    Input: +ooo

    Output: =oooooo

    The user inputs an operator and how many 'pebbles' to add and display a running total. It works just fine.

    I had to change it to where the user inputs binary and outputs binary. For example:

    Input: +11

    Output: =11

    Input: +1

    Output: =100

    Pastebin to full updated assembly program. You can ignore anything after the asterisks comment. I haven't updated that.

    Basically what's going on is that whatever the user inputs, it stays in the inBuffer location. So input of "+1010" is "+, 1, 0, 1, 0" in the buffer.

    So if you look in the section _readBinaryLoop: on line 70, it checks if the input is a 0 or a 1 in the entire inBuffer. I'm not sure what to do from here because the values are read left to right. if it was right to left, I would just be using simple math and multiply by a power of 2 for the next position.

    My professor said "...from ascii to actual binary: This is easy to do with "shift" operations as you read each digit." I'm not sure what to do with that information or by how much. If I input 10, the 1 will be read first. It's position value is worth 2. I'm not sure what to do with shifting. If it was read in right to left, I could do simple math with a power of 2 but not for this situation.

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

    No comments:

    Post a Comment