• Breaking News

    Saturday, June 2, 2018

    New to programming. Ask Programming

    New to programming. Ask Programming


    New to programming.

    Posted: 02 Jun 2018 04:20 PM PDT

    Hi I have just started taking basic programming classes and I was wondering if anyone knew of a place where i can post some school work and get help. I don't know if this is the correct place. I would go into school but I want somewhere that I have access to all the time. Thank you guys!

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

    How are some computer games able to edit other files, close themselves etc.?

    Posted: 02 Jun 2018 11:59 AM PDT

    Some games (usually horror games) edit your computer files for some unease. One game that I can't remember the name of changed your desktop background to some creepy picture. Undertale closes the game by itself at the Flowey fight. Doki Doki Literature Club deletes game files as a part of the plot and eventually deletes the whole script and you have to uninstall and reinstall the game to play it again. My question is how are they able to do this?

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

    Is a "hotlinking" API ethical?

    Posted: 02 Jun 2018 02:08 PM PDT

    Ok, so I wanted to create this API which is essentially an on-demand web scraper. You give it some parameters, and it then scrapes and processes data from a URL based on those parameters, and returns it back to you (similar to what Kimono Labs used to do). I understand there are a lot of ethical issues with hotlinking resources, so I am wondering if those issues and concerns would apply in this case.

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

    C vs C++ syntax?

    Posted: 02 Jun 2018 02:04 PM PDT

    I did a little bit of C last year, and started learning C++ this month. So far all I've noticed are similarities. Is there anything which is really different between the two languages when you're writing the code?

    Edit: aside from cout vs printf I haven't noticed anything :/

    (Background: I'm currently a student taking ICS in school though all we've done is Python and Pygame)

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

    Java Something<?,?>

    Posted: 02 Jun 2018 04:04 PM PDT

    I don't get generics. What is difference between array and generics ? Like int[] ar and ArrayList<Integer> ?

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

    Creating a search aggregation website?

    Posted: 02 Jun 2018 07:33 PM PDT

    How would you go about creating a site that aggregates search results from multiple websites for a given search term. And is such a thing even possible, if the sites don't have an API??

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

    Can someone edit this file to include a twitter user?

    Posted: 02 Jun 2018 07:07 PM PDT

    Hi, I am trying to monitor tweets from a specific twitter user indicated. in the configuration. I know I have to edit the config file and add it to the struct. But I am unsure how to implement the condition that the tweet must come from a twitter user.

    If the json == tweet.User.ScreenName then I will send it to my slack

    This is the file needing editing

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

    How do websites like Dominos/papa Johns have live images when selecting your pizza?

    Posted: 02 Jun 2018 02:40 PM PDT

    For example, when you click certain toppings, it will add them to the picture.

    My guess so far is overlapping PNG files over each other?

    Let me know you people think!

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

    Looking for elegant rate limit algorithm

    Posted: 02 Jun 2018 06:14 PM PDT

    Hello friends! This one has been bugging me, and I'd be happy with either "it can't be done" or some documentation towards an answer.

    Here's the scenario. Bot that sends messages. Service limits bots to 15 messages a minute. Violators instant banned. Limits are hard amounts (not average rate over time or anything).

    The straightforward solution is to keep a message log and a message queue. New message function will dump messages older than 1 minute from the log, check the size of the message log, and either send immediately or add to queue for delayed delivery.

    What I keep thinking (but can't get to work) is there has to be a way to track a rate as a time * count variable that decays over time. Something like, new message increments $rate by time(), and every second reduces $rate by something, then if $rate is higher than time() by limit you go to queue. Make sense? Think it could work?

    Thanks for humoring me. You all are the best.

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

    Trouble with reading/writing bytes from file in Java?

    Posted: 02 Jun 2018 12:09 PM PDT

    Hi, I'm just having trouble wrapping my head around what I should do.

    I have a simple server program written in java, a client can connect to the server and create accounts and whatever. Currently all client information is writen and read a text, I am trying to have the data be written as bytes intead, and be encrypted.

    I already have a simple encryption program working, so all I'm trying to do is figure out how to actualy read and write seperate parts of my file.

    How would I go about having my program read and write certain bytes from my file considering these sections could range is size (first section would be a string that the user can change and can be any size, second portion is any number greater than zero, though typically no larger than a few thousand).

    My input right now is a Scanner and is splitting my input at every new line, would something similar be possible with bytes?

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

    What is the best way to learn advanced algorithms?

    Posted: 02 Jun 2018 11:35 AM PDT

    I've done fine for the material that has tons of resources on it, but when it comes to some more advanced traversal algorithms like topological sorting or Djikstra's algo, I just don't even know where to start in learning. I tried watching youtube videos with no avail.

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

    Choosing between jobs

    Posted: 02 Jun 2018 02:28 PM PDT

    How do I make a 360 camera feed directly onto a smartphone

    Posted: 02 Jun 2018 02:01 PM PDT

    So, I want to reprogram a phone so that it's sole purpose is to be a screen which automatically displays the feed from a 360 camera in a vr format in real time. It's for a rather complex project. I also know nothing about programming.

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

    Best way to manage two very similar projects?

    Posted: 02 Jun 2018 05:15 AM PDT

    I have a mobile app I made with Xamarin, that I need to fork and mainly rebrand, and change a few of the ContentPages on it. I was just going to fork the git repo, and then pull from upstream to keep both projects in sync, but now I think I may be better off just creating new projects in the Visual Studio solution, and copying the existing files in as links so that updates affect both of them. In the case where the file needs to be changed, just use defines. Are there any down sides to doing it that way? Or does anyone have any other suggestions on how to best manage two very similar projects?

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

    GDB confusion- debugger won't continue to next break point.

    Posted: 02 Jun 2018 05:16 AM PDT

    I imagine there's a simple answer for this, but I'm very new to the gdb debugger (and writing/debugging C programs in general).

    I've got a program that look like this

    #include <stdio.h> #include <string.h> int main() { char str_a[20]; strcpy(str_a, "Hello, world!\n"); printf(str_a); } 

    And I compile it and run gdb.

    I set breakpoints on a couple of lines and on the strcpy function, but when I run gdb, I can't continue past strcpy to the next breakpoint.

    CODE HERE: https://imgur.com/cZNNlAt

    How do I get the debugger to continue past my breakpoint?

    I'm following a book and it seems to work for them, maybe it's because I'm using Cygwin/windows and they're on linux?

    Cheers!

    UPDATE: gdb seems to step inside the strcpy function, but in the book "continue" lets you step back into "main", but for me it doesn't do this :(

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

    Making a bot for summer project for my CS portfolio

    Posted: 01 Jun 2018 10:08 PM PDT

    Currently automating everything using selenium python. I am up the point where I am trying to find the xPath for the checkout button and I believe I got the correct xPath link. However, when I do action click on the xPath link, adidas gives me an error. If someone could point me in the right direction as to where to look for my next step, that would be awesome.

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

    Is there a way to search github for ReactJS projects only (omit other JS projects) and also sort by stars?

    Posted: 02 Jun 2018 01:20 AM PDT

    I tried to do this myself, but the biggest issue I ran into was filtering ReactJS projects from Javascript projects. I am looking to join or just look at some real reactJS projects. But 95% of what's on github is things like "Amazing ReactJS Project" and it just has a bunch of starter/blog how to make a reactJs project template in it only.

    Basically I need a good way to observe and see a lot of viable reactJS projects so I can find one to contribute to. Or, just observe. I may make my own but I would love to see others for 2 reasons: 1. Their code layout, blogs aren't good enough, real thing is best 2. their issues and how they resolve real encountered issues using ReactJs.

    Edit: Lastly, mostly interested in real apps that use ReactJS. There are so many "tetris" apps, but I don't feel that they provide good real life examples that people would produce under stress and/or more abstract problems which are difficult to pin-down due to changes.

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

    Good language instead of SAS for simple table merging, sorting and reporting?

    Posted: 01 Jun 2018 10:23 PM PDT

    Today I use SAS for some simple reporting tasks, where the actions are like: Open a couple of CSV files, merge them based on a few rules, sort them, exchange a few data with something else, filter based on simple rules, and make a set of PDF files with graphs and lists.

    Well SAS is expensive, and it gives so many different small errors and strange things over time, so I would like to change to something else. Preferably free / open source. But what?! I can code a little C and Python and PHP, but what would be a good/easy language for these tasks? Python? R? Excel macros?? Something else?

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

    No comments:

    Post a Comment