• Breaking News

    Sunday, April 7, 2019

    What have you been working on recently? [April 06, 2019] learn programming

    What have you been working on recently? [April 06, 2019] learn programming


    What have you been working on recently? [April 06, 2019]

    Posted: 06 Apr 2019 09:10 AM PDT

    What have you been working on recently? Feel free to share updates on projects you're working on, brag about any major milestones you've hit, grouse about a challenge you've ran into recently... Any sort of "progress report" is fair game!

    A few requests:

    1. If possible, include a link to your source code when sharing a project update. That way, others can learn from your work!

    2. If you've shared something, try commenting on at least one other update -- ask a question, give feedback, compliment something cool... We encourage discussion!

    3. If you don't consider yourself to be a beginner, include about how many years of experience you have.

    This thread will remained stickied over the weekend. Link to past threads here.

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

    At long last, my app is finally on the Google Play Store

    Posted: 06 Apr 2019 09:26 PM PDT

    I've been working on this project since the beginning of last summer. I was close to finishing it around September but once high school started I could never find the time to work on it some more. And whenever I tried to I would run into obstacle after obstacle after obstacle.

    After a while I just sort of lost motivation to work on it. But finally I stopped procrastinating and gave in and finished it.

    Today at long last i published the app. It's really not much but I'm proud of it nonetheless. It's called ClockWise if you're interested, if not that's fine.

    I'm sorry if this came across as self promotion. I don't really have anyone irl that has actually cared so I just needed a place to share it with people who might appreciate it.

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

    Good programming projects for Resume

    Posted: 06 Apr 2019 12:32 PM PDT

    I am MIS major graduate student interesting very much in data science and game development. I studied in Finance as undergrad and after the graduation I want to work in Finance as a data scientist.

    Unfortunately, due to illness I have a big gap in my resume almost 2 years between my last job and graduate school. And I am not able to work until the graduation because of visa issues.

    So I'm a bit worried that I will have a hard time getting a job after the graduation, so currently I'm focusing on learning Python and C++. (I am learning database related in school as my minor)

    I'm trying to build my portfolio with different projects, but I am not quiet sure what kind of projects would be good for data science. Currently, I am working on PyGame.

    Can you give me some suggestion? Especially I cannot work during this summer, I am wondering how I can use this time to develop myself and skills.

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

    Is TheChernoProject a good source for learning C++?

    Posted: 06 Apr 2019 01:47 PM PDT

    He has a youtube channel, here's the playlist for the C++ series: https://www.youtube.com/playlist?list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb

    I usually hear a lot of bad rep about online C++ tutorials and how you can only truly learn it from textbooks so that's why I'm asking.

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

    Sliding Windows?

    Posted: 06 Apr 2019 09:49 PM PDT

    Hello r/learnprogramming,

    i have been trying to improve my programming skills and stumbled upon a question on leetcode "maximum subarray products less than k" that i can not understand the solution to even after watching tutorials on it.

    can someone explain how sliding windows work in general? and what can i do to learn these new algorithm tricks

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

    Doing a Bootcamp at UCLA Extension and getting discouraged.

    Posted: 06 Apr 2019 10:47 PM PDT

    Hey guys! I know lots of people here don't like bootcamps, but I didn't want to really go back to school so I decided to take some very expensive classes - one at General Assembly for HTML/CSS - and now taking classes for Full Stack Developer at UCLA.

    I'm not really enjoying the program because all the promises made aren't being met and of course, as all of you know, learning to code ain't easy.

    I am getting discouraged because I feel like I can't really code anything without googling for answers. And I doubt whether or not I am really learning or just copying code.

    I also have access to Lynda.com through work and watch videos there when possible.

    I wonder if anyone has some work files you can share with exercises so I could try? Or any recommendations you think worked for you? Any tips would be greatly appreciated.

    This is my first reddit post and I'm looking forward to hearing from developers and future developers!!!

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

    Help choosing a udemy course

    Posted: 06 Apr 2019 02:54 PM PDT

    Hey guys, I'm looking for a Udemy course that teaches from beginner to advanced concepts, such as OOP, functions, recursion, classes, structs, etc.

    Preferably in cpp, python or java. I'm looking for something similar to beginner and intermediate college courses you would get on a specific language.

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

    What text editor should I use for python?

    Posted: 06 Apr 2019 12:54 PM PDT

    I want to learn python and was wondering what text editor you think I should use? I'd like it to be free and I use windows 10.

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

    Do I have a better chance at landing a job via bootcamp or self-teaching?

    Posted: 06 Apr 2019 05:46 PM PDT

    You go to bootcamp essentially for a curriculum and a job network. If someone is studying programming by themselves, would it be ideal for them to polish off their skills at the bootcamp? or would they be able to break into the job market either way?

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

    I just found out about Numba and feel like I've been living under a rock my entire college life.

    Posted: 06 Apr 2019 02:32 PM PDT

    Here's the website

    In brief, its a JIT style compiler thing that uses LLVM. You can handpick a function that you wanna optimise using numba and it'll use LLVM during runtime to compile just that function, instead of the python interpretor, from what I understand.

    Guys, idk if y'all even care about this, but this blew my mind. C LIKE SPEED! And all you have to do is add just ONE line of code.

    I was doing some edge detection using Sobel, wrote a pretty basic bitch convolve() function using numpy's element-wise multiply function. Its slow on images, not too much but takes a few annoying seconds. (Even though I heard numpy used Fortran at its base or something)

    Used Numba and boom, significant and very observable increase in speed, amazing!

    Thought I'd share it, since I was really impressed by it's ease of usability, and performance.

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

    [Firebase] How to allow one user access to another user's data and vice-versa

    Posted: 06 Apr 2019 10:35 PM PDT

    Hello,

    I would like to write a firebase rule that allows one user access to all data under another users UID.

    My current database structure is:

    root{ relation{ relation_1{ exampleUID1 : true exampleUID2 : true } } exampleUID1{ data{ thing : true otherThing: exampleValue } } exampleUID2{ data{ thing : false otherThing: exampleValue2 } } exampleUID3{ data{ thing : true otherThing : exampleValue3 } } } 

    My current database rules are:

     "rules": { "$uid": { ".read": "auth !== null && (auth.uid === $uid || root.child('relation').child('relation_1').child(auth.uid).exists())", ".write": "auth !== null && (auth.uid === $uid || root.child('relation').child('relation_1').child(auth.uid).exists())" } } 

    Currently this works on specific cases, so exampleUID1 can perform a read on exampleUID2. And ExampleUID3 can only read its own data. But I would like it to work in general cases. For example I would like to be able to replace the 'relation_1' with a unique id so I can have more than one relationship.

    Edit: If anyone knows of some in depth resources on firebase structure and rules I'd love to get a link from you.

    Any help would be greatly appreciated

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

    How to create a personal database for a new user upon account creation. PHP, MySQL

    Posted: 06 Apr 2019 08:34 PM PDT

    So, I've made an app to track my tutoring sessions. My database, and app seems to work fine for me. I can see my students, which class they are in, payments, etc.

    However, I would like for other people to use this too, obviously.

    I've googled many things like "create user database" but not much luck and not sure if I'm searching correctly.

    Should I just let users add into the database I am currently using for myself and just create views for their data?

    or

    Should they have a personal database created (a clone of the one I am using just empty) when their account is created?

    I feel as if the latter is the way to go but not sure how to go about it.

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

    [python] Suggestions for writing unit test to simulate SQLALchemy database relationships

    Posted: 06 Apr 2019 11:54 PM PDT

    Hi.

    I need to write a unit test for the following business logic:

    1. I read a row from a database view, referred to as View from now on. On of the sources of View is a table, referred ot as Table from now on, which has a column that toggles whether or not a particular row should be listed in View
    2. I process the row, and afterwards I update Table which implicitly makes the row not appear in View

    I use SQLALchemy for database integration, and during unit testing I populate an in-memory SQLite database with data. As the production database will handle the relation between Table and View, I don't need to define this is my code (i.e. I don't need to have my database models reference each other).

    I could use some advice on how to best write a test for this scenario. I'd prefer to test the entire business logic at once, without splitting it into two parts (which would make the testing easier).

    One approach I can think of is to patch (using the side effect functionality) the call that actually update Table, and "inject" a call which removes the corresponding row from View). In other word, I'll write a patch that when a call to update Table is made I'll update Table and remove the corresponding row from View.

    I'm sure there are better ways of writing unit tests for such scenarios, so input on alternative approaches will be appreciated.

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

    Backend Question

    Posted: 06 Apr 2019 11:22 PM PDT

    Hi everyone, I am new to backend and learning to use google's cloud platform to host a project. I am using hikari to connect to googles mysql database. I am writing all this in eclipse. I added the hikari jar file to my build path, and I think I correctly set up my pom.xml, but I get this error when I try to instantiate HikariConfig:

    java.lang.NoClassDefFoundError: com/zaxxer/hikari/HikariConfig

    at myGroup.HelloAppEngine.doGet([HelloAppEngine.java:59](https://HelloAppEngine.java:59)) at javax.servlet.http.HttpServlet.service([HttpServlet.java:687](https://HttpServlet.java:687)) at javax.servlet.http.HttpServlet.service([HttpServlet.java:790](https://HttpServlet.java:790)) 

    (many more error lines after this)

    Any help is greatly appreciated!

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

    Running AJAX locally. Do I need to create a server in order to use it?

    Posted: 06 Apr 2019 11:01 PM PDT

    Learning about AJAX request at the moment, and I am finding out that in order to use AJAX, you need to run it on a server? Excuse my amateurness, as this is the first time I'm learning AJAX.

    How would I create a local server on windows? Would AJAX work with browser-sync?

    This is the case, right? In order to use AJAX, you must run it on a server, correct?

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

    I want a search bar on my raspberry pi running raspbian stretch

    Posted: 06 Apr 2019 10:44 PM PDT

    Im rather new to this whole coding and programming stuff and have been messing around with a raspberry pi running raspbian. I want a search bar on my desktop like i have on my phone but i can't seem to find a tutorial anywhere. My main question is what is the process to create something like that? If i can figure out the process i can do some digging and figure out the specifics.

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

    [HOMEWORK]Python + mysql, searching mysql database with input(by user) in a python program?

    Posted: 06 Apr 2019 02:36 PM PDT

    [SOLVED]

    I can't for the life of me figure this one out, i don't know if it's because i lack a basic understanding(most likely),however i find kind of weird that none of the basic "mysql + python" guides i've gone through covers this?

    So i have this database i made in mysql feautering boats. My assignment is to have one function that adds boat and one that can search for them, all coded in python, pretty straight forward. The adding one is fine as mysql already have the INSERT INTO feature and is easy to implement/use in python, just add all the boats through input and chose which table i want em into, working fine and a bunch of guides that goes into this.

    What i have a problem grasping is the search function. So the program is suppose to be able to search any given table in the Boat database, but i don't really understand how i do this as SEARCH isn't a function in mysql and i always use SELECT to do "searches" in mysql? So i can't use SELECT * FROM Boat WHERE Boatcolor = 'Green' for instance because it's suppose to be user input, so the user should just be able to write "Green", then maybe "Pink", "Orange" etc all while the program is running and then python should get that information from mysql/the table and print it. In "my head" the logic should be something like this:

    search = Input ("Select your color:") user writes in 'Green'

    mycursor.execute("SELECT * FROM Boat WHERE Boatcolor ='search'")

    and then all green boats are printed (with their other stats, size, docking place etc)

    (https://www.w3schools.com/python/python_mysql_where.asp)

    I'm not necessarily looking for the code or 100% answer just a nodge in the right direction

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

    Learning programming

    Posted: 06 Apr 2019 09:58 PM PDT

    I want to learn programming. I'm in my college first semester currently learning on qbasic! But right now I don't have that much pressure to do it very hardly so I was just wondering to learn other languages. Which programming will be much more suitable for beginners like me ?

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

    How to spread out dates in dataframe visualization - Python

    Posted: 06 Apr 2019 09:50 PM PDT

    Hi everyone, I have a dataframe that im trying to visualize that has about 350 entries. Each of these entries have a price and date associated with them, but I cant seem to make the X-axis (Dates), look right. It seems as though it's displaying all of the dates on the x axis, when I would like it if it could instead show the month and year of each entry.

    This is what I have so far:

    date = GPUDATA["Date"] price = GPUDATA["Price_USD"] 

    plt.plot(date, price) 

    It might be important to note that the file I'm dealing with is a CSV file, and the date is in YYYY-MM-DD Format. I am super new to visualizations and can't figure out how to make this work.

    It outputs the correct Y axis, but it displays all the dates on the x axis and makes basically a solid black line on the bottom

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

    Distributed local desktop application with a single database server?

    Posted: 06 Apr 2019 09:41 PM PDT

    I'm planning to create a PyQt desktop application and using MySql for a local use in a Windows OS.

    I've done it before, using XAMPP and PyQt, but only for a single computer.

    What I wanna do is like how web apps works, just 1 server, then if other computers go to the hosted server or enter the url on their browsers, they could also use the web app.

    So if I create a single desktop app, then distribute it also to other computers, I want the other computers to connect on the main database server, and this is all Local only, no internet.

    I know it is possible, but I just don't know how to approach it.

    How do I connect to the database server dynamically (in PyQt) so that other computers may be able to connect in a local environment?

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

    Teaching a pre-teen programming who finds Scratch easy.

    Posted: 06 Apr 2019 11:55 AM PDT

    Just as the title says. I am trying to figure out what to do next. Unity seems to be still too complex with their 3D tutorials (Teaching math and such). Would something more like "Automate the Boring Stuff" be worthwhile?

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

    Unable to get modal window to pop up

    Posted: 06 Apr 2019 09:33 PM PDT

    Hello there, I am new to this subreddit. I am self-taught in HTML and CSS. I am trying to have multiple modal windows appear on one webpage. However, when I click on the 'read more' content, both modal windows pop up and overlap each other. I.e I can see the number '2' overlapping number '1' I only need one window to pop up when I click on one button as the content will be different. Thank you all for your help!

    HTML Code:

    <p class="text p1">

    text content

    <input type="checkbox" id="click" style="display:none">

    <label for="click">

    <a class="readmore">...Read more</a>

    </label>

    <div class="modal">

    <div class="modalcontent">

    <h3>Header 1</h3>

    <p>content 1</p>

    <label for="click">

    <a class="close">CLOSE</a>

    </label>

    </div>

    </div>

    <div class="overlay"></div>

    </p>

    <p class="text p2">

    text content

    <label for="click">

    <a class="readmore">...Read more</a>

    </label>

    <input type="checkbox" id="click" style="display:none">

    <div class="modal">

    <div class="modalcontent">

    <h3>Header 2</h3>

    <p>content 2</p>

    <label for="click">

    <a class="close">CLOSE</a>

    </label>

    </div>

    </div>

    <div class="overlay"></div>

    </p>

    CSS Code:

    .overlay {

    position: fixed;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    z-index: 99;

    background: black;

    pointer-events: none;

    opacity: 0;

    -webkit-transform: scale(0.5);

    transform: scale(0.5);

    }

    input[type="checkbox"]:checked ~ .overlay {

    pointer-events: auto;

    opacity: 0.9;

    -webkit-transform: scale(1);

    transform: scale(1);

    -webkit-transition: transform 0.5s ease, opacity 0.5s ease;

    transition: transform 0.5s ease, opacity 0.5s ease;

    }

    .readmore {

    color: black;

    }

    .readmore:hover {

    color: grey;

    }

    .modal {

    position: fixed;

    top: 50%;

    left: 50%;

    z-index: 100;

    -webkit-transform: translate(-50%, -50%) scale(0.5);

    transform: translate(-50%, -50%) scale(0.5);

    width: 100%;

    max-width: 640px;

    pointer-events: none;

    opacity: 0;

    }

    input[type="checkbox"]:checked ~ .modal {

    pointer-events: auto;

    opacity: 0.7;

    -webkit-transform: translate(-50%, -50%) scale(1);

    transform: translate(-50%, -50%) scale(1);

    -webkit-transition: transform 0.5s ease, opacity 0.5s ease;

    transition: transform 0.5s ease, opacity 0.5s ease;

    transition-delay: 0.1s;

    }

    .modalcontent {

    display: block;

    padding: 30px;

    background: white;

    border-radius: 10px;

    font-size: 20px;

    }

    .close {

    font-size: 15px;

    font-family: sans-serif;

    margin: 0% 45%;

    }

    I based it off the following tutorial:https://www.youtube.com/watch?v=GbWeRARcVBM

    Edit: Removed screenshots of the code

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

    Google Code Jam Qualification Round Question Doubt!

    Posted: 06 Apr 2019 09:30 PM PDT

    Link to the question

    https://codingcompetitions.withgoogle.com/codejam/round/0000000000051705/000000000008830b

    my attempt

    from math import gcd t=int(input()) st="ABCDEFGHIJKLMNOPQRSTUVWXYZ" for i in range(t): num1=[] final=[] d={} s='' n,l=map(int,input().split()) val=list(map(int,input().split())) k=gcd(val[0],val[1]) final.append(val[0]//k) final.append(k) for j in range(1,l): final.append(val[j]//final[j]) for j in final: if j not in num1: num1.append(j) num1=sorted(num1) for j in range(len(num1)): d[num1[j]]=st[j] print('Case #',i+1,':',sep='',end=' ') for j in range(len(final)): s=s+d[final[j]] print(s) 

    sample test case passes, but the rest of the test cases gives Runtime error...

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

    Is it a bad time to be learning Android?

    Posted: 06 Apr 2019 09:28 PM PDT

    My teacher told me not to learn Android because Google will replace it with Fuchsia by the time I finish college in 2021.

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

    What are some good reasons, with examples, to learn C and it's variants? Same for Java.

    Posted: 06 Apr 2019 09:17 PM PDT

    I'm a data analyst by profession. I'm self-taught so I didn't get the standard introduction to C or Java that many others have. I'm proficient in SQL, Python, JS, HTML and they're satisfying my needs professionally. I keep hearing about how great C is, and a split between absolute adoration and hatred for Java.

    I get that these languages are fast, versatile, have large libraries, and etc... (other things I can look up on Google). What are some interesting but useful things that C & Java can do that others can't?

    Extra imaginary points if the examples are relevant to work in the data field (which mostly involves extracting data data from API's, transforming it, storing it, than visualizing it online... occasionally some stats or machine learning if the data survives the previous steps).

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

    No comments:

    Post a Comment