• Breaking News

    Wednesday, August 7, 2019

    Where do StackOverflow wizards come from? Ask Programming

    Where do StackOverflow wizards come from? Ask Programming


    Where do StackOverflow wizards come from?

    Posted: 07 Aug 2019 10:24 PM PDT

    I ask very highly specific and difficult questions on StackOverflow that I can't find the solution to anywhere online. But some random person gives me the code like it's nothing. Who are these programming wizards? Where do they acquire their knowledge from when it's not even available online?

    submitted by /u/Curious-Cat-2020
    [link] [comments]

    Need a coding language to learn

    Posted: 07 Aug 2019 12:39 PM PDT

    Hey guys, so I've been wanting to learn coding for a while and I've decided to start now. What would be the best the language for doing external things like reading information from other sources, processing it, and making graphs?

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

    How do I use the YouTube Closed Caption API?

    Posted: 07 Aug 2019 05:24 PM PDT

    I'm trying to develop a simple Express API that gets closed caption info for Youtube videos. I'm hoping that data is public and only requires an API key, but I can't seem to get it working in the API sandbox here.

    Does this require an OAuth token as well? I envisioning a use case where I create some app that uses my API to get CC info from Youtube and display it to the user (my express app will be doing something more than simply passing the CC info through, but that isn't relevant). Will I need to have each user of my app pass in their Youtube login credentials in order to do what I want?

    Thanks for any help!

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

    Lwjgl

    Posted: 07 Aug 2019 11:02 PM PDT

    Anybody know what kind of games I could make with lwjgl for my fyp

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

    Is this that bad of an idea?

    Posted: 07 Aug 2019 10:17 PM PDT

    I'm working on an iOS app with swift and Xcode. It has a feature that puts users into random chats of six. My backend is fire base as I know very little of making my own back end. For the random chats I needed like a queue that assigned users to chats that have less than six people in them. However since firebase has no built in feature and I have no idea how to code that for the backend I went with something else. Trough the client-side the client gets back how many people are in every chat and the first chat that has under 6 people it automatically joins. Is this a really shitty idea and should I spend time on coming up with a different solution?

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

    What are some good resources from where I can start studying reinforcement learning from scratch?

    Posted: 07 Aug 2019 10:12 PM PDT

    What is the name of websites like boredbutton?

    Posted: 07 Aug 2019 03:41 PM PDT

    I'm trying to make a website like boredbutton.com for learning purposes but I forgot the name of websites like this one to search for examples on github. Thanks

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

    Need Advice on Customizing Online Store

    Posted: 07 Aug 2019 05:16 PM PDT

    I have been trying to create a very specific online store for a while now but hit a block in the road. I have been messing around with Shopify and Squarespace but there are some features I need to customize in my store in a very specific way that is not offered there.

    - I need a way to get different sellers onto my store for different items. Once an item page is opened, it would allows you to buy from different vendors that have partnered with us. For example, you want to buy a water bottle, you choose the exact bottle and color and it would show different vendors that sell that bottle. Also need a way to send the ordered item information once the item is ordered so that vendor can start shipping. There is a "Custom order fulfillment" option on Shopify but no option on Squarespace (I'm still not 100% sure how "Custom order fulfillment" on Shopify works). There is a website, net32.com, that has something similar to my idea but for dental supplies when you open up each item. Another example would be this, where you can see the Amazon Fire tablet for sale and it gives you an option to buy from various different vendors (Best Buy, Target, and etc).

    - How do I implement the inventory of different brands that partner with us easily to my Shopify or Squarespace store? Like how would my website be updated live on the pricing, inventory, etc like their websites? Is there a 3rd party app that can do this? I've seen services like GoDataFeed and Zentail but I'm not 100% sure how they work either.

    I have only been using Shopify and Squarespace right now. I haven't tested the other website makers so feel free to recommend anything else that might suite my needs better.

    Thanks for any advice you may have. I'm feeling very lost since I don't have a programming background.

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

    Help me not use Unity WebGL

    Posted: 07 Aug 2019 06:39 PM PDT

    So I am looking to build a web application that has similar functionality to a video editor in which there is a timeline, dragging function from one window into the timeline and a play function that will play through the timeline and have a preview window. My plan is to have this based off of building a firework show where you drag a firework onto the timeline and it will correspond to 1 of 5 different video clips that can be overlayed, the only difference being the length of the clip since all fireworks have different durations but a small variety of effect. This would allow one to hit play and see a preview of the show they built in the timeline and export the times for each firework to spreadsheet. A bonus would be having account functionality where someone can login to their own account and save their firework show.

    My struggle is that I am not sure the best way to implement this, I don't consider myself to be a strong programmer, I've written in python, java, js. I am not sure what the easiest way to implement this idea is ranging from the language I write this in or even any web app frameworks that this is feasible. The only thing I can think of that I could see myself capable of doing is writing this as a 2d unity application into web gl where I build the interface and have scripts off of the objects within the interface. Is this a bad idea? I have never really seen someone build a non-game in unity, only reason I thought of this is cause I have some experience with unity.

    What is the best way of tackling this idea?

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

    [REACT] Help make sense of this piece of code

    Posted: 07 Aug 2019 12:37 PM PDT

    Hi all,

    I am trying to learn React and JS, so I did the tutorial on https://reactjs.org/tutorial/tutorial.html to build a tic tac toe game. I encounter a block of code that I cannot make sense at all, can someone help make sense of this code please?

    const moves = history.map((step, move) => { const desc = move ? 'Go to move #' + move : 'Go to game start'; return ( <li key={move}> <button onClick={() => this.jumpTo(move)}>{desc}</button> </li> ); }); 

    Here's the full source code: (line 87-96 is the block that I don't understand):
    https://codepen.io/gaearon/pen/gWWZgR?editors=0010

    Here's what I understand:

    1. moves is an array containing the list item
    2. history is an array that contains arrays that represent the game board
    3. so history needs to be mapped
    4. I read up on the arrow syntax and ES6, I think I understand that the array history is mapped using a function that accepts 2 parameters (step and move)

    What I don't understand:

    1. where are the parameter (step and move) are coming from?
    2. I think I get what 'move' is for, basically the function check if move is an empty array or not, then create a list item based on that.
    3. I don't understand what 'step' is for.

    Thanks for reading, I hope I am making sense. Otherwise, please let me know.

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

    Is server specific code a bad idea ?

    Posted: 07 Aug 2019 02:01 AM PDT

    So today I made a bad mistake at work. I migrated some code from the testing environment to production, however at some point the code in production had diverged from that elsewhere in source control, so I overwrote the production approach with the approach that was used in dev and testing which didn't work properly in the production environment.

    Yes it is confusing to have it set up this way. In some ways it is as much a systems failure as it is my mistake, but I probably should have checked everything more carefully.

    Discussing this with one of the managers he said, "elsewhere we deal with this problem of diverging code bases by having logic of the form if code is running on server A do this, else if it is running on server B do that". Just to be clear the servers aren't different operating systems or anything. This just seems like a bad idea, as it makes it impossible to test properly, and what if you want to migrate the code to a different production server ? For lack of a better term it seems like a code smell.

    Some of the managers are a bit surly and I hope this doesn't turn into a drama, but I think I will make the case that we need to just sort out the reasons for having different code running on the different servers.

    What do people think of this situation ? Thanks for any advice.

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

    What all does a cookie with a path of ".mywebsite.com" cover?

    Posted: 07 Aug 2019 02:09 PM PDT

    I'm trying to find a way to potentially set a cookie on a subdomain of a subdomain. For example, my staging domain is set up like mobile.staging.mywebsite.com. I would be setting this cookie from mobile.mywebsite.com in production but for the sake of testing in my staging environment I need to set the cookie on mobile.staging.mywebsite.com and have it apply to the whole domain (it's a Cloudflare cookie to prevent users from getting redirected back to the mobile site if they opt-out of it). So my ultimate question is: would setting a cookie with path=".mywebsite.com" apply to all subdomains (and subdomains of subdomains) or is there a limit to how far a cookie can reach despite the hostname? Thank you for any clarification here!

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

    [Help] How would you resolve the circular imports problem in this particular case (and just in general; as I seem to struggle with this kind of thing all the time)?

    Posted: 07 Aug 2019 06:05 AM PDT

    A video game. I'll simplify away things just to present the crux of the issue.

    There is a class; let's call it GameState. It contains information about things the player can observe, such as creatures. Among other things, it means that it contains references to the Creature class, as it must include a list of creatures in it.

    There is the Creature class. One of the things it needs to do is to pick an AI action to execute at a given time. It queries which other Creatures are nearby, the geometry of the level, etc, and returns the action. To access all the information that it needs to have to make the decision, it needs a reference to the GameState class.

    This is a circular dependency - GameState needs to import Creature, and Creature needs to import GameState. The language doesn't allow it.

    One solution I can think of is to make the GameState serialize itself in a nest of key-value pairs or something universal like that, and pass it to Creature, but that is very unsatisfactory for many reasons, such as losing the ability to query more complicated aspects of the GameState using its convenient accessor methods.

    So what should I do here?

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

    [Help] Simple message box?

    Posted: 07 Aug 2019 07:33 AM PDT

    Hey guys,

    I have an excel file that refreshes multiple pivot charts and then generates emails with the corresponding sheets attached to them automatically.

    Im looking to put a message box that pops up after the reports are updated, but before the emails get generated. Yes/no, yes would generate the emails and no would skip that sub and end the macro.

    I'm wondering what that string of code would look like, if you could help out that would be great!

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

    Help with System Specs Display Project

    Posted: 07 Aug 2019 08:24 AM PDT

    Hi all,

    This is my first post here, so bear with me on this. I am wanting to mount a Raspberry Pi to a small monitor that will display my system specs at (or near) real-time from a program like HWInfo. I realize I will likely have to code a program to pull the logs from HWInfo over to a server. I have two main questions that I cant seem to find the answer to:

    1. Is anyone familiar with a program for the Pi that could display these statistics in real-time? Similar to Rainmeter or something like that which is somewhat customizable. I don't want to have any wires connecting the Pi to my PC, as the monitor and Pi will be mounted on a wall away from it.

    2. Does anyone know what program I could use to pull generic log info from a server to the Pi via a wireless connection? Or would I have to create that myself? I am just not very sure where to start on this project.

    Thank you all in advance!

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

    Windows programming : Is it possible to have a background program catching and killing all focus stealing events?

    Posted: 07 Aug 2019 08:57 AM PDT

    I'm sick of Visual Studio stealing focus when build completes or a breakpoint hits.

    Everyday I'll be typing in another window then suddenly VS will come to the foreground, steal my focus and I begin typing grabage in the middle of my code.

    I know next to nothing about "low-level" Windows stuff but would it be possible to have a background program that prevents this stuff from happening?

    edit: this would be for Windows 10.

    Thanks.

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

    QA/QC Testing: How can I break a program?

    Posted: 07 Aug 2019 10:11 AM PDT

    I am a tester (relatively new one), not a programmer, although I have knowledge of systems and security at basic level, so I'm looking at all the many, many ways I could theoretically break a program that the team has been working on and force it do something it's not supposed to. I can' t really talk about the specifics of the program so I'm just looking to explore possibilities at a general level.

    If someone has a link to an semi-official guide, that'd be very helpful.

    Thanks.

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

    I need a Program that automatically sets a YouTube Video to Public once it has finished Processing all Quality Settings.

    Posted: 07 Aug 2019 06:17 AM PDT

    So to explain it a bit more:

    YouTube need to Process each Video uploaded to compress the Filesize/Quality a bit. This takes longer the better the Quality of your Video is. YouTube is basically publishing more than one Video for one Video uploaded in different Quality Settings; starting with the lowest Quality Setting first.

    If you have a 4K Video it takes Ages to process it. And you have to check manually if the Video has processed at 4K yet or not, if not you have to wait and update the Upload Page until it is available in 4K.

    Things would be much easier if we had a Program that can tell if a Video already reached the maximum Quality of Processing and if this is the Case set the Video to Public so it goes online for all.

    I don't know if this is possible but this would save alot of time in my workflow.

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

    Xcode school app project

    Posted: 07 Aug 2019 08:08 AM PDT

    Hey so this is a bit different from what usually gets asked on the thread but I decided to ask anyway. I'm currently a beginner programmer (learned through High School and self taught) and am trying to make a school app that would basically be able to show the bell schedule, school events, sports team practices and games/results, but am not sure how to be able to make these automatically update (without me having to go in and basically create it myself every time). Also, my friend from another district (who's school app was created by a student as well) was able to display grades in the app after logging in with school credentials, and I have no idea how he did that. Any tips/help in general would be appreciated!

    E1: I have something started in Xcode right now but I'm not sure that that's even the best way to create this?

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

    Writing to an excel file using C++?

    Posted: 07 Aug 2019 09:28 AM PDT

    I need to change the value of a calculation that I have on tab 4 of an excel file. This needs to be distributed to a few other people in my class to change their values as well. Any ideas?

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

    How do I automate food delivery orders through an app I'm developing

    Posted: 07 Aug 2019 08:43 AM PDT

    I plan to develop an Android app and I want it to automatically order a predetermined item from any food delivery service (Ubereats, DoorDash, GrubHub etc) at a certain time. I was wondering how to go about doing this or even just an example of a project that does this, and what the best platform to develop this on would be (Android Studio in Java/Kotlin, or React native). It would be nice to easily port this to iOS.

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

    What's the difference between an algorithm and a function?

    Posted: 07 Aug 2019 08:40 AM PDT

    What exactly does "semantic code" entail?

    Posted: 07 Aug 2019 06:19 AM PDT

    [Help] The taxi problem

    Posted: 07 Aug 2019 04:58 AM PDT

    Assume you are a cab driver on an airport and you're driving a cab with x seats. Taking a passenger to their destination takes t units of time one way (the trip back also takes t), you also know beforehand when your passengers arrive at the airport. The task is to finish transporting your n passengers as fast as possible (minimize the amount of time it takes for the last passenger to arrive at his destination.

    Input: First 3 integers are the n passengers, x seats and the time for a one-way trip t. Next follows n lines which tell when the passenger arrive at the airport.

    Output: Minimum time for the last passenger to arrive at his destination

    Example:

    Input:

    3 2 10

    10

    30

    40

    Output: 50

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

    Scheduling Cron Tasks within a Cron Task (Nodejs)

    Posted: 07 Aug 2019 03:39 AM PDT

    Hallo!

    So i am trying to practise writing scheduled events and cron tasks. To do this i have a function that runs once an hour, however within this function there is then a function that needs to be scheduled to run every 7 minutes.

    How should i handle killing this sort of task, since if i run this for multiple days each main task will schedule hundreds of its own smaller tasks and this cylcle will continually expand exponentionally.

    So my question is, how do server bots that run at certain intervals also schedule tasks?

    Thanks!

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

    No comments:

    Post a Comment