• Breaking News

    Saturday, June 30, 2018

    Does anyone know how those Snapchat filters are created? learn programming

    Does anyone know how those Snapchat filters are created? learn programming


    Does anyone know how those Snapchat filters are created?

    Posted: 30 Jun 2018 08:49 PM PDT

    Do they use opencv? Is it coded in python, c++, or multiple languages? I'm interested in how they made the graphics and how they interact with what's on camera.

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

    I'm having trouble transitioning from a class room environment to actually building a product on my own

    Posted: 30 Jun 2018 12:19 PM PDT

    I've been in school for 2 years now learning OOP, OS, Comp Arch, Data Structure, Algorithm, Computation Theory, all the related Math courses, etc. Programming in the context of school has always been easy, we have an assignment with a set of rules and we apply the concept we recently learned to write an algorithm or data structure. However, creating my own project seems impossible.

    This summer I downloaded Unity and got started on creating a simple mobile app game I always wanted to create. However, I'm struggling. I just can't seem to apply any of the stuff I learned in school to to write a script that will perform a desired task. Right now I'm trying to create randomly generated platforms that are spaced out enough to be jumpable but I can't for the life of my even get started on how to write the code. I'd probably be able to do it following some tutorial but I'm hoping to come up with the answer on my own.

    Anyone else struggled with transitioning from school assignments to actually building something on your own without step by step instructions? How did you get better?

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

    Is the Github OSSU page still a good resource?

    Posted: 30 Jun 2018 04:29 PM PDT

    https://github.com/ossu/computer-science

    Basically it brings together free courses online and puts them in a curiculum. It's been a while since the first commit and I was wondering if it's still a safe reference. Any recent users/experiences?

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

    Anybody else finding back-end languages more intuitive than learning HTML/CSS?

    Posted: 30 Jun 2018 12:23 PM PDT

    I'm sure I'll get better with front end with time and it'll probably come easier. Seems harder initially with CSS having so many rules especially with positioning that make it harder to remember. I know that a ton of creativity is still possible with markup languages and frameworks like Bootstrap will make it easier, just seems like starting from a blank slate is a lot easier from even vanilla back-end languages.

    If anybody wants to share good HTML/CSS resources in this thread other than Codecademy and FCC, that'd be cool.

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

    Learning C, would like to get into improving performance of projects in higher level languages

    Posted: 30 Jun 2018 02:28 PM PDT

    This just seems like a really cool thing to do. I have a lot of amateur programming experience behind me, but I'm finally wanting to go further with it. Not necessarily being paid to do this, but that would be a fine consequence. But more just diving deeper, I guess. Just a quick background: dipped my toes in a lot of languages, have a math degree that I've been wanting to use to edge into data science, love R, and recently gotten very into C (like every day all day, it's a really satisfying mix of simple/challenging.)

    I would love to take a look at some project in R or python or whatever, and have the skills to profile, identify bottlenecks, and improve performance by dropping into C.

    Is this a thing? If so, what are some resources I should look at? Do you know of any simple-ish projects that have such a thing that I could look at? I have a project in mind, it's really cool and in the past 3 days since I found it I've used it for many hours. But I think parts of it are a lot slower than they would be in C.

    This train of thought has always been in the back of my mind, but ever since finding out C is 1. not as scary as I thought, and 2. actually really fun, I've become more determined.

    Also I saw this video and though I'm not getting into assembly anytime soon, I found it very exciting.

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

    Pygame Error "This constructor takes no argument"

    Posted: 30 Jun 2018 08:34 PM PDT

    Here's my code:

    class Ball: def __int__(self, y, x, maxforce, force): self.y = y self.x = x self.maxforce = maxforce self.force = force gameDisplay.blit(ball,(self.x,self.y)) ball = [] ball.append(Ball(250,250,25,1)) 

    Here's the output:

    ball.append(Ball(250,250,25,1)) TypeError: this constructor takes no arguments 

    Anyone know why this is the case?

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

    Stuck completing a blood alcohol content calculation

    Posted: 30 Jun 2018 05:59 PM PDT

    Here is my code -

    gender = input("Enter your gender 1: for male and 2: for female:" ) if gender == 1: gConst = 0.68 else: gConst = 0.55 # take input from the user for remaining values N = float(input("How many drinks have you consumed?:" )) W = float(input("What is your weight (lbs):" )) t = float(input("Hours since your first drink?:" )) B = (-0.015) * t + (2.84 * N / W * gConst) print("Your BAC value is:", B) 

    i can't figure out how to add if BAC value is for example 0.1 or greater, display "over limit"

    thanks.

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

    Good source for developing android apps.

    Posted: 30 Jun 2018 05:12 PM PDT

    Looking into building some app to learn java. Show me a good source!

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

    What's the best protocol/technique to pass data back and forth at reasonably low latency between a Circuit Python Express and a PC?

    Posted: 30 Jun 2018 08:39 PM PDT

    I feel like I MAY be missing something - please forgive me if so. I would be most comfortable remaining in Python/CircuitPython, but I'm open to tutorials in whatever language is available - the biggest key would be that it shows both sides of the connection (from Circuit Playground Express to PC)

    Thank you!

    EDIT: Note - I muffed the name in the unchangeable title - it should read "Latency between a Circuit Playground Express". :)

    submitted by /u/vermont-homestyle
    [link] [comments]

    Advice on pacing through Programming Principles and Practices using C++

    Posted: 30 Jun 2018 03:28 PM PDT

    Hi everyone. I am a beginner in programming currently reading through the heavily suggested Programming Principles and Practices using C++ by Bjarne Stroustrup and I am loving how the book is structured. I enjoy the book's tone and feel it is overall a great book for beginners. However, I can't help but feel that I am dragging behind with the book because I can't finish one whole chapter (the sections, drill, 2-4 exercises) in one sitting, which can leave me disappointed sometimes. There are times where I rush through just to feel accomplished that I finished a chapter, but I am left confused over some of the concepts, such as the tokens and grammar from Chapter 6. Other times, I will take my time through the book, but it will take me about 3-5 hrs just to work through and understand everything in each chapter, including the drill and a couple exercises. How should I pace myself reading this book so I remain motivated while understanding the concepts?

    TL;DR How many pages of the book should I read per day?

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

    In the C sockaddr_in6 struct, what are possible values for sin6_scope_id?

    Posted: 30 Jun 2018 09:55 PM PDT

    I get that if I want it to be an address accessible from other computers, it should just be set to '0'. But, in other cases, what should I set it to?

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

    [NEED HELP] USING Selenium Library (Python) and JavaFX. Question is in Description.

    Posted: 30 Jun 2018 12:05 PM PDT

    Hello Guys, I have created a python script using Selenium Library and chromedriver. The Script when executed opens the chrome browser and after surfing through some pages it downloads a file that I wanted. When running from the python IDE or through command-line It is working fine and gets me the downloaded file. But The Problem is arising when executing it from JavaFX. I created a method in javaFX to run the script from it and It too is working well UNTIL the download gets start. Just as the download starts it is closing the chromedriver, and subsequently chrome browser. Resulting in fail to download.

    Can anyone help me here how can I avoid JavaFX to close them or atleast make it so closing chromedriver.exe won't close chrome browser.

    Excuse my poor grammer ^.^', Posted on /r/JavaFX and /r/learnpython but no help :'(

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

    [C++] Calculate the volume of a sphere. Why isn't it working?

    Posted: 30 Jun 2018 01:25 PM PDT

    Hello, sorry for the silly question, but I want to calculate the volume of a sphere but it isn't working. I get volume = 0. Could you give me a hint? Thank you!

    `#include <iostream> using namespace std;

    int main() {

    float pi = 3.1415926, radius; float volume = 4piradiusradiusradius/3; cout << "Enter radius of sphere \n"; cin >> radius; cout << endl << "Volume of sphere is " << volume;

    return 0; 

    }`

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

    Question about env variables and API keys

    Posted: 30 Jun 2018 11:07 PM PDT

    Sorry if this question seems dumb, but I'm still a beginner.

    Anyways, I'm working with Ruby On Rails and I currently have an API key for a museum (working on a project). I stored the API in my bash profile as export KEY_NAME= <my api key>

    I'm also using axios to make a get request so I can render the information I want to display from the API on my page.
    so I'm doing axios.get("LINK here " + ENV['KEY_NAME''] but getting a "env is undefined" error in my console log.

    I'm just trying to figure out what I'm supposed to.. how do I get the api information to show with ajax or axios.

    when I run rails console and check ENV['KEY_NAME'], it returns the correct api key. I just can't render it with JS..

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

    When is it Appropriate or Necessary to Change Default Thread Attributes in C?

    Posted: 30 Jun 2018 10:50 PM PDT

    Is it ever necessary? What cases would warrant doing so?

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

    what bachelor degree do i need to get a master in ML?

    Posted: 30 Jun 2018 03:01 PM PDT

    Hello Reddit, I am a high school graduate and i am planning to study in Germany for my bachelor's degree. I don't have great knowledge in programming and i studied a bit of calculus in school but not enough for machine learning. So could you recommend a suitable bachelor courses in computer science or data science to take a master later in ML. And could you recommend good universities for this case in Germany?

    submitted by /u/smeary-mallard
    [link] [comments]

    YouTube Auto-Generated Captions

    Posted: 30 Jun 2018 11:58 AM PDT

    Hello!

    Problem:

    I am a Computer Science student finishing up some of my general credits and found that online lectures are extremely dry. I realized I could just pull the transcript from YouTube's auto-generated captions to read instead of listening. While it is obviously not 100% accurate, my professors speak clearly enough that key information can be pulled from text. However, I have another class that has not uploaded the online lectures to YouTube, and while I could do that to use the caption system, I thought it would be interesting to pursue writing a program that does roughly the same thing.

    My Rough Solution:

    I just started researching this topic a couple days ago, but this is my understanding of what I could do.

    1. User inputs audio file
    2. Split audio file into short segments -> From my understanding automatic speech recognition can only handle short audio segments
    3. Utilize an open source pre-trained model such as Mozilla's Deep Speech to convert audio to text
    4. Take Deep Search's output (strings) and format it into something that can be read easier

    Does this sound like i'm on the right track? Or am I out in the parking lot instead of on the field?

    Thanks to anyone who takes the time to answer!

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

    Help calling an event listener on a website.

    Posted: 30 Jun 2018 01:57 PM PDT

    I'm making an app that scrapes a certain website that loads a webapp type thing that handles the loading in the app itself so I can't use my normal on webpage load function, so I'm having trouble finding a way to execute JS commands once the page has loaded. I noticed in chrome 's developer tools that it has an event listener called on page load or something like that. My question is, is that listener something that chrome uses, or is that some custom code that the page is using to tell when the page is done loading, and if so, can I use that to execute my scripts at the correct time?

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

    How can I simplify pixels of a BufferedImage in Java?

    Posted: 30 Jun 2018 08:32 PM PDT

    I have multiple jpg images with a sub image at an exact pixel location. The sub-image is roughly 12x12 pixels. I want to recognize what that subimage is, there are only two options.

    1sr subimage is three black circles forming a triangle, but with white spaces where the circles aren't touching 2nd is a solid triangle

    The subimage is rather "blurry" when it comes down to figuring out the color, but it's only supposed to be black and white.

    So I made a range of values, if it falls under a certain threshold, consider it white, otherwise consider it black.

    Then I took a couple sample points to figure out which of the two shapes it is. But between the different jpegs, the blurriness causes the pixel values to be different enough that sometimes my estimates of black or white aren't good enough. For example, the solid triangle will have a pixel or two as white inside of the black.

    My question is, am I over complicating it? Is there a totally different way I should go about it or is there a way to strip the extra colors off without loosing the image "quality". It doesn't have to be perfect, it just has to recognize consistently. Will someone guide me in the right direction of what I should do, please?

    I'm using Java.

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

    Path from scratch to Electron.js?

    Posted: 30 Jun 2018 02:26 PM PDT

    What would you recommend for a path from (almost) ground zero with Javascript (some very basic experience with one or two other languages, but nothing extensive or complex), to making a simple app with Electron.js (say for example, a basic CRUD type address book)? I've looked at the Electron.js tutorial, but there's a whole lot of stuff in there that goes right over my head at this point.

    Not looking to get a job or become employable as a programmer; I just have a sort of personal project I'd like to do, and electron.js seems to check most of the boxes for what I want.

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

    Looking to transition from data visualization and analytics to a solely analytics position, which language should I learn next? (R vs Python)

    Posted: 30 Jun 2018 02:10 PM PDT

    Basically, I only have experience in SQL (and programs that do not involve languages like Tableau).

    I keep seeing R and Python appear on things that I want to apply for, but I don't have those skills yet, my question is, which language should I learn first? R or Python?

    (Once I have one, I'll search for resources, but for now, does anyone have any resources for the language that you suggest?)

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

    Is there any efficient way to increase all elements in an array in a certain range in C++?

    Posted: 30 Jun 2018 12:29 PM PDT

    As the title suggests I am looking for an efficient method to increase the elements of an array in a given range. Any help would be appreciated.

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

    Creating a draggable "pop-up" style on a website?

    Posted: 30 Jun 2018 12:25 PM PDT

    Hey guys, I wanted to learn how to create a draggable element that mimics a Mac or Windows home screen, where when you click on a button, instead of a new page, a "GUI" comes out that a user can drag around on the website, only.

    I see that it can be done with JQuery, but I can't seem to find a tutorial on it with just pure vanilla JS. I'm not quite sure what to look up to find it. Any help would be greatly appreciated.

    Thank you!

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

    How much programming do I need to take a Data Structures and Algorithms class?

    Posted: 30 Jun 2018 03:47 PM PDT

    Hi all,

    I hope this is an appropriate question for this subreddit, but I am trying to take an online course in Data Structures and Algorithms that is taught in Java (an undergraduate course at University of Illinois - Springfield, to be more exact). Would you have any feel of how knowledgeable I would have to be in Java to take such a course? Would I be able to take a few MOOCs and be alright? Or would it be recommended to take the pre-reqs in Java courses?

    For more background, I graduated my Bachelor's and Master's in Aerospace engineering, and took a couple of CS courses during my time there. I mostly used Matlab while there for my non-CS courses, and have done data analysis in Matlab for my job this past year, but have also used some Python and a little bit C++ in the past. I am trying to apply for the OMSCS program to do a Master's in CS. And recently I have been self-teaching Python.

    Any insight would be helpful, thank you!

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

    No comments:

    Post a Comment