• Breaking News

    Monday, November 12, 2018

    What happened to r/dailyprogrammer ? learn programming

    What happened to r/dailyprogrammer ? learn programming


    What happened to r/dailyprogrammer ?

    Posted: 12 Nov 2018 10:17 AM PST

    The subreddit used to have around 3 puzzles each weeks and people submit their solutions in the comments. But recently, i noticed there isn't any activities in the subreddit anymore. The last puzzle can be seen was posted around 2 months ago.

    Does anyone know what happened ?

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

    If you are preparing for a Google Cloud Certification, start with one these Specializations

    Posted: 12 Nov 2018 08:13 PM PST

    What Are Your Thoughts On Using A Website As A Portfolio?

    Posted: 12 Nov 2018 01:45 PM PST

    Hi, I am considering creating a website that would house my projects and blog. I understand basic Python, SQL, CSS, and HTML. I would aim to utilize a Django Framework. I would still use a Github account.

    Goals: My goal is to eventually get a job in data analysis or working in a database administrator type role. Front-end Web development does not interest me as much but I do think the backend aspect would be something to consider. I like working with data to develop data visualizations. Well, I mainly like working on data visualization but the grunt work is necessary. I see the blog as more of a hobby than anything.

    What Would Be On The Website: The main use of the website would be to house my projects and blog. Sometimes they may go hand in hand. I like to analyze sports; specifically player evaluations using stats and videos. My writing ability should also improve. However, I am not sure how the blog would tie in. What I mean is, I'm not sure how I would showcase my knowledge of programming with a few graphs per post. I haven't looked at which projects I would attempt as I am in the preliminary stages. But a to do list application does seem important for me.

    1.) Did you ever use a website to house projects?

    2.) Did you find it beneficial? What issues did you have?

    3.) Any tips?

    4.) Any other tips on how I could incoporate a blog within a website?

    If you have any questions or require clarification, please do not hesitate to ask.

    Thank you for your time.

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

    My AP CS teacher (High School) is telling us that CS majors will have a high paying job lined up after 3 years at college. How accurate is this?

    Posted: 12 Nov 2018 07:17 AM PST

    Just Curious.

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

    Free 1980's Children's computing books, 'Machine Code For Beginners' and more

    Posted: 12 Nov 2018 11:58 AM PST

    Hopefully some of you will enjoy this: At the bottom of the page there are downloads.

    The 'Machine Code For Beginners' also has a bit on how computers work.

    https://usborne.com/browse-books/features/computer-and-coding-books/

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

    Is there a way to benchmark how fast your SQLite queries are to help you make your DB & the program that utilizes it more efficient?

    Posted: 12 Nov 2018 10:24 PM PST

    I'm curious as by the time i'm done with my program I'll have tens of thousands of rows for my table. Also, other than by eliminating the number of rows and columns, how can you make your DB consume less bandwidth?

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

    (VB.NET) Can I loop through TextBoxes and set their values into an array? I'm having a difficult time with this

    Posted: 12 Nov 2018 09:31 PM PST

    Hello!

    So I have a few asp textboxes set up where the user will put some data into. Here is what it looks like:

    <asp:TextBox ID="box\_1" Columns="4" runat="server" MaxLength="4" />

    <asp:TextBox ID="box\_2" Columns="4" runat="server" MaxLength="4" />

    <asp:TextBox ID="box\_3" Columns="4" runat="server" MaxLength="4" />

    Now, I want to store the data from these textboxes into an array through a loop, something like this:

    "<script>

    Dim boxArray(3) As String

    For i As Integer = 0 to 2

    Dim box As String = "box\\\_" + cstr(i)

    boxArray(i) = box.Text

    Next

    </script>"

    Ideally this would neatly put the values of the textboxes into the array so I could easily reference it later on. However, I get the following error upon compilation:

    Compiler Error Message: BC30456: 'Text' is not a member of 'String'.

    I imagine this is because I've created the "box" String, because it works if I just hard-code it to say something like:

    boxArray(i) = box_1.Text

    Is there a good way for me to loop through the textboxes and add their contents to an array?

    Thanks in advance for any help!

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

    [Feedback Needed!] Does structuring messy information into a comparison table better help you learn?

    Posted: 12 Nov 2018 09:21 PM PST

    Hi all! First and foremost, thanks for stopping by!

    We are researchers at Carnegie Mellon University that are developing new tools and systems that help developers work more effectively. One of the big problem you might have encountered when learning how to code is that there are millions of resources online and sometimes it feels overwhelming when trying to keep track of all of them and glean useful information from them.

    For example, this was a question originally asked on Stack Overflow (SO) for a lot of times (e.g. How to get image size (height & width) using JavaScript? ). There are a lot of different solutions to this problem, depending on different constraints and requirements. For example, img.naturalWidth/naturalHeight will always give you the intrinsic width/height; while the return value of img.width/height depends on whether the size of the image object is constrained by HTML attributes or CSS styles.

    As part of our ongoing research effort to help developers organize such messy information into a somewhat structured artifact, we constructed a comparison table using the answers found on the SO page mentioned above. (Unfortunately reddit doesn't allow me to include a screenshot, so please click the link to check it out!) You could check the individual evidence that backs up each of the thumbs-up/down with it. We'd like to emphasize that the content of the table is the collective effort of contributors of the SO page, and we would love to here your feedback on either the content or structure of this table! You could either directly reply to this thread or fill out the survey below the interactive table. Thanks in advance!

    PS: the table was made using an experimental chrome extension called UNAKITE we developed here at Carnegie Mellon University. If you are interested to become a beta tester, please don't hesitate to sign up! Again, we would really like to hear your feedback on this project!

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

    What are some nice tutorials to learn how to use GitHub?

    Posted: 12 Nov 2018 04:10 PM PST

    Just for portfolio stuff.
    Figured it would nice to share for the FAQ

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

    [python] check if list1 has all the characters in list2

    Posted: 12 Nov 2018 09:01 PM PST

    I trimmed this A LOT, so if something doesn't make sense, I can post a longer version. I'm new to programming, so excuse if this is an easy fix, but none of the solutions on google work.

    word = "ABC" user = [ "D", "A", "B", "C" ] def game(): if word in "".join(user) or set(word).issubset(user): print ("won") else: print ("lost") 

    I want it to print 'won', but right now it's printing 'lost.' How do I make it print 'won'? I have everything else working, it's just a problem with "if word in user"

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

    How would I go about implementing a "sandbox"-style front end?

    Posted: 12 Nov 2018 06:34 PM PST

    I'm trying to make a web app to solve simple electronic circuits (i.e. the kinds you'd see in a basic physics class.) I'm aiming for something where you can select and drag some parts together to form a circuit; the app would then solve for currents, voltages, etc. for you.

    I have a pretty good grasp on the actual backend solver code (in Python). But I have no clue where to start with the front end. I need some way to

    1) Give users an open-ended space to join parts together and

    2) Interpret the client's assembled circuit as a series of connections between parts.

    At that point, I'd use my backend code.

    Any tips on where to start with this? I'd prefer to use flask/django if possible because I'm not familiar at all with javascript, but I'm not sure if that's possible.

    Also, I have a basic idea of how html pages work, but I'm not sure how all the moving parts in this app would fit together.

    Advice would be greatly appreciated :)

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

    What colorscheme does George Hotz (Geohot, Comma.ai) use here?

    Posted: 12 Nov 2018 11:48 PM PST

    https://imgur.com/a/5hn0diS

    Kinda fanboying here, just wondering what colorscheme he uses for Python and the like, does anyone recognize?

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

    How do I Loop through an object of objects and change/update one value based on a key.

    Posted: 12 Nov 2018 05:42 PM PST

    I have a simple object:

    var bigObj = { firstOb: { "title": "mr", "name": "bob", "isMarried": false }, secondOb: { "title:": "mrs", "name": "sue", "isMarried": true } } 

    I'd like to loop through this object of objects find the object that contains the name "bob" and then return the object that contains "bob" and update the "isMarried" to true.

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

    [JAVA] Stripping HTML from a String but replace table rows with line breaks

    Posted: 12 Nov 2018 11:31 PM PST

    I got some input from a DB. It's HTML text, from a wysiwyg editor so it's full of redundant html. The text is being fed into another program which does not parse HTML so I need to strip it.

    So I'm using jsoup and stripping the HTML and that works.

    My problem is line breaks / table rows.

    Table Data
    Boy 5
    Girl 6

    gets parsed as

    Table Data Boy 5 Girl 6 

    and what I want is

    Table Data Boy 5 Girl 6 

    Same issue for things like <br>

    Is there an easy way to do this?

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

    OAuth with Spring Boot and React

    Posted: 12 Nov 2018 11:28 PM PST

    I am working on an assignment with Java Spring Boot(for my REST API) and React for my front end. I've never done authentication with React before(I've used passport.js for a MPA), and I want to use Oauth to allow users to authenticate via Facebook. I have no idea where to start; can someone please point me in the correct direction, of what I should be looking for? Is there any tutorial to set up something similar? I find a lot of tutorials to set up Oauth in Spring Boot, but my Spring Boot component only acts as an API so I'm guessing I need to do the Oauth and token retrieving part on the front end and somehow configure my backend to use that token, but I have no idea how to go about this.

    Any help would be appreciated,

    submitted by /u/An-Object
    [link] [comments]

    Question about hash functions

    Posted: 12 Nov 2018 11:26 PM PST

    https://imgur.com/a/lHrbQzP

    I do not understand this question, can anyone help me?

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

    [C++] How to print a vector's values into a text file?

    Posted: 12 Nov 2018 11:23 PM PST

    Hello, I'm trying to create a graph in C++. I managed to write functions that add nodes and edges to the graph but I am not trying to find a way to show if there's a path between two nodes and if there is to be printed in a text file. I managed to get to the part where I print the values but I only get the pointer value. Is there any way to do the thing I want?

    https://pastebin.com/bkB2QJte

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

    More accurate template matching in openCV

    Posted: 12 Nov 2018 11:05 PM PST

    Hi, I'm working on a project that looks at images of champ select screens in league of legends. Something like this: https://i.imgur.com/Ty0iAZ5.jpg and is able to identify the champions that have been picked. Currently, I have an image for each champion like this: https://imgur.com/a/sEOEVlc or https://imgur.com/a/0of02TQ

    I'm using openCV's template matching to try and find whether or not the champion is there but I'm having some issues. Right now I'm iterating over all the individual champion images that I have and am checking the max_val score given from template matching. Then based on that score, I conclude whether or not the champion is in the image or not. The issue is that it's not very consistent. Some champions it has a very difficult time finding and ends up with scores around .66 or so, and for some champions it seems to detect them in all the images regardless of whether or not they are there, getting scores as high as .7 or higher. Is there a better way to cut down on the false positives and negatives? I thought this would be a relatively easy project for openCV since the image will be almost a perfect match other than the name listed on the bottom and the two spell icons. The champions image itself is always the same

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

    Help with Programming a Spiral on a Two-Dimensional Grid

    Posted: 12 Nov 2018 07:08 PM PST

    As the title states, I'm trying to figure out how to spiral on a two-dimensional grid.

    Specifically, I'm trying to use the Google Places API to spiral coordinates, and getting information within the maximum radius of that coordinate, then moving to the next and repeating.

    I found this formula but have made little headway in figuring out what the equation actually does. I figured out what n signifies but, have been unable to determine what k is.

    Doing this is Python. Thanks for any assistance.

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

    Need help with c++

    Posted: 12 Nov 2018 10:38 PM PST

    I'm fairly new to c++ and programming in general. I've been wondering how I could enter two arguments into an if function. Where as if b > c then d = b, b= c , c= d, e= cc - aa - bb and then it should check it e's value is negative or plus, and then I'll print something based on that. My current code looks something like this: ..... if( b>c){ d= b; b= c; c= d; e= cc-aa-bb; } ...

    a b c are variables that I'll ask the user to enter.

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

    Help with homework!

    Posted: 12 Nov 2018 10:30 PM PST

    Hey, I'm a student in high school taking computer science A and I'm having trouble with my assignment and I was wondering if I could get some help.

    Create methods that perform binary and linear searches for an int value.

    public static int binarySearch(int value)//returns the number of comparisons to find value

    public static int linearSearch(int value)//returns the number of comparisons to find value

    Create an array with an ordered set of ints from 1 to 1000. Hint: use a loop.

    Run 100 searches for random numbers between 1 to 1000 using both the binary search and linear search methods (e.g. each method will be called 100 times..hint: use a loop)

    For both searches keep track of the number of comparisons each search takes to find the correct value.

    Provide the average as output.

    Example output:

    Binary search averaged 10 comparisons per search

    Linear search averaged 500 comparisons per search

    My Code for Binary:

    https://pastebin.com/NdhtihUA

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

    Majoring in Cs

    Posted: 12 Nov 2018 10:18 PM PST

    So I am a senior in highschool right now applying to colleges and I have yet to figure out what to major in. One of my options I have looking at is computer science because it truly interests me. I was just wondering if it were to be a good idea to start trying to learn how to code now, as well as what language to learn. I am interested in game devolving whether that be iOS games or anything really so I was just wondering what language is best to learn for that type of coding?

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

    Help with my C++ Program:

    Posted: 12 Nov 2018 06:26 PM PST

    For my computer class we are having a open discussion where we post scenarios and in turn someone has to go ahead and code a solution to the scenario that is posted. The one that I am doing is based off of fortnite and takes in different factors in order to determine whether or not to "push" someone (play offensively) in game.

    The following code is what I have so far:

    #include <iostream>

    using namespace std;

    int main()

    {

    int Health, Mats, EHealth, Ground; /* Health = 0; Mats = 0; EHealth = 0; Ground = 0; */ double percent; cout << "Enter your Health: "; cin >> Health; while (Health <= 99) { cout << "Advice: Do not Push " <<endl; system("pause"); cout << "Enter your Health: "; cin >> Health; } percent = .80 \* Health; cout << "Enter your Materials: "; cin >> Mats; while (Mats <= 199) { cout << "Advice: Do not Push " << endl; system("pause"); cout << "Enter your Materials: "; cin >> Mats; } cout << "Enter your Enemies health : "; cin >> EHealth; while (EHealth >= percent) { cout << "Advice: Do not Push " << endl; system("pause"); cout << "Enter your Enemies health : "; cin >> EHealth; } cout << "Do you have the High ground?(y or n): "; cin >> Ground; while (Ground = 'n') { cout << "Advice: Do not Push " << endl; system("pause"); cout << "Do you have the High ground?(y or n): "; cin >> Ground; } cout << "Advice: Push, Good luck. "; system("pause"); // Press z to return to the beginning at any time // loop choices into a flow chart, if health is under 100 do not push, //if health is over 100 but materials is under 300 do not push, //if enemy health is confirmed 40% less than yours then push, //if health is good and materials are under 500 but you hvae the high ground then push, //normal/full health but not a lot of materials and no high ground do not push, //maybe add maximums. return 0; 

    }

    The errors I am having so far:

    Each of my while loops work as intended but the final loop at the end is broken and will not loop to receive further input instead it just prints out everything inside of it.

    Things I would like to possibly add:

    I figured since my program is somewhat flawed in the sense that if you are told to "not push" a enemy until you meet the specific parameter for that loop you cannot go back and change any of the previous integers if they have changed during your game play therefore I would like to implement a code that allows for me to enter a specific character in order to return back to the first loop such as "Press z at any time to return to the beginning" but I would like to have this option available throughout the whole program.

    I may also like to add maximums to the program, for example one of the variables is "Health" and so I would like to put a cap on it since in game you cannot go past 200 health.

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

    Trying to find a good tutorial for restful Api (Java)

    Posted: 12 Nov 2018 02:34 PM PST

    Currently trying to learn how to use Restful Api in order to do a college assignment in Java. Can't really find any good tutorials for beginners when searching online. If anyone here knows any good resources a link to them would be greatly appreciated.

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

    No comments:

    Post a Comment