• Breaking News

    Tuesday, September 8, 2020

    Do you have to be a supergenius to create a social network? Ask Programming

    Do you have to be a supergenius to create a social network? Ask Programming


    Do you have to be a supergenius to create a social network?

    Posted: 08 Sep 2020 07:21 PM PDT

    All the documentaries about Zuckerberg make him out to be just some programmer who had the right mindset/idea at the right time. Obviously the guy is smart but you never get the impression that he's 10x smarter than you or me. However, I've looked up and have viewed a lot of questions / forum posts about starting your own social media site and the answers always end up being "to do so you'd have to understand 5000 different concepts and it's basically impossible to do on your own" or something along those lines.

    Obviously a social network is more advanced than writing hello world, and it'd be a while before someone with little experience to achieve, but is it really so out of the realm of possibility for one guy?

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

    I was asked to perform a Java assessment for an employer I applied for. I was rejected after submitting it with no explanation. Can anyone tell me if my code is wrong?

    Posted: 08 Sep 2020 09:16 PM PDT

    Hi everyone, first time poster here. I was recently asked by an employer to create a program that would take in a paragraph of text and output that same text but indented after every 13 characters. Their example -

    Four score and seven years ago our fathers brought forth upon this continent a new nation

    Becomes:

    Four score

    and seven

    years ago our

    fathers

    brought

    forth upon

    this

    continent a

    new nation

    Below is my fully submitted Java code to complete this problem. I am fully aware I am far from an expert and if this is poorly written code I would like to know, but when I tested it it worked fine. Can anyone please tell me what things I can work on as a programmer so that I can do better on coding assessments in the future? Thank you

    /* * TextWrapper.java allows the user to input a string of text, * and prints the wrapped text so that each line does not exceed 13 characters. * * @author Patrick Moore * @version 1.0 * Created on 07/14/2020 */ import java.util.Scanner; public class TextWrapper{ public static void main (String[] args) { System.out.print("Enter Input String: "); Scanner obj = new Scanner(System.in); //Scanner allows user to input text String[] input = obj.nextLine().split("\\s"); //splits the text at each space wrapText(input, 13); //sends String array of words to wrapText method, 13 being the maximum line width } /* * wrapText takes in the String array of words and an int for lineWidth * to print out the input text in wrapped lines that do not exceed the line width * * @param input The string array of words * @param lineWidth The maximum number of characters per line */ private static void wrapText(String[] input, int lineWidth) { for (int x = 0 ; x < input.length ; x++) { //for loop runs through each word in the array String currentLine = input[x]; boolean running = true; while(running) { //while loop runs until current line is printed if(x == input.length - 1) { running = false; System.out.println(currentLine); } else { if(currentLine.length() + input[x + 1].length() <= lineWidth - 1) { //main if statement checks if the length of the following words will exceed the limit or not currentLine += " " + input[x + 1]; //if the following word does not exceed the limit, it is added to the line and the loop runs again x++; } else { //if the line can not add another word, it is printed and the loop continues running = false; System.out.println(currentLine); } } } } } } 
    submitted by /u/Pataclysm1
    [link] [comments]

    Need college project ideas to build using Django.

    Posted: 08 Sep 2020 09:01 AM PDT

    Hello there, I'm consider myself a beginner to Django and DRF (have been learning/using Django for a year). Our college needs us to build a project for the final semester and I'm stuck.

    I feel I can manage most of the backend but suck shit in the front. So, here I am asking for ideas for the project which will let my teammates' and my skills shine.

    We are allowed to form team of 3 members, so what are the skill sets I'll need to find in teammates in order to get the project working. Thank you.

    submitted by /u/no-blyat
    [link] [comments]

    How do I install deepplantphenomics python package from github on Windows?

    Posted: 08 Sep 2020 10:52 PM PDT

    I've tried using this

    pip install ./deepplantphenomics 

    However, it comes up with this error.

    ERROR: Invalid requirement: './deepplantphenomics'

    After some research, I ended up trying this command

    pip install git+git://github.com/p2irc/deepplantphenomics.git 

    Instead, it was stuck on cloning even after left for hours

    Cloning git://github.com/p2irc/deepplantphenomics.git to c:\users\zaen\appdata\local\temp\pip-req-build-5oc6mfeo

    Any suggestions?

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

    How online classes work?

    Posted: 08 Sep 2020 10:25 PM PDT

    Hi

    As i see any app i want to know how they work and maybe create something like that, I am using Adobe connect for my online classes and I wanted to know how it works.
    how video is synced with everyone and how it plays.
    and how the voice sent to everyone in the room

    I don't know a lot about these stuff, but i just learned Websocket (maybe not related at all)

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

    Help in Coding

    Posted: 08 Sep 2020 07:55 PM PDT

    Hi, Can someone help me with my programming? I was just told that we werent allowed to use matches and regex yet, and I do not know what coding that I should use to get the same result. Can someone suggest stuffs that I can use?(Should be just basic and if else stataments).

    Here is the condition: When a user enters a 3 digit number, the first digit must be 1 0r 9, the second digit must be 5-9, and the third must be 1-9. If the condition is met, "Valid" must be the output, if not "Invalid.

    https://pastebin.pl/view/1a5f12bb

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

    How do I use this existing user database and implement user authentication in a new project?

    Posted: 08 Sep 2020 07:00 PM PDT

    I've taken over an existing project and in charge of creating a new frontend from scratch; I've decided to go with a simple Vue/Node.JS project.

    There is an existing Postgres DB that contains the users with all their crypted passwords and salts. I am extremely unfamiliar with user authentication, but I need to implement it into our new project.

    The previous developer used Ruby on Rails to create the existing project, and used something called OmniAuth, and also the basic [Ruby on Rails authentication].(https://api.rubyonrails.org/classes/ActionController/HttpAuthentication/Basic.html) .

    My question is: is there a Node.JS equivalent library in which I can use to authenticate the existing users?

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

    Custom email and spam folder. How do they work?

    Posted: 08 Sep 2020 05:58 PM PDT

    The tld of my email is .codes and I am with soverin.net I've got in the spam folder many time. how can I ensure that futur customer doesn't get in the spam folder? If I go with privacy invading provider like gmail.com and give it the domains name will it be whitelisted at all time? do I need a .com too?

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

    Is making a auto-checkout bot illegal?

    Posted: 08 Sep 2020 09:12 PM PDT

    I'm a freelancer. One of my clients is paying top dollar for making a auto-checkout bot for an online-store.

    The website itself has bot protection in place. Therefore, I'll have to implement some anti-evasion techniques.

    After the bot is complete, my client intends to sell it.

    Can you please tell me if this is illegal and if its legal to take up this job?

    Thanks!

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

    How to optimize code that processes several large csv files in pandas?

    Posted: 08 Sep 2020 01:26 PM PDT

    Since I am self taught I have spent a lot of time digging through APIs and Medium articles, but I'd love to hear some personal experiences and tips. It can be hard to even know what to google or how to ask questions.

    I am writing some python to process several large csv files (3-8GB) from an Agent-Based Model. For most of the programming I have done in my degree, performance was largely irrelevant. However, I need to process anywhere from 2-6 of these files for a single plot so the programming choices I make actually matter now, which is intimidating but exciting!

    These data I am working with usually have inconsistencies in formatting. Normally there are 4 attributes but occasionally I get 7-10 rows with 6 attributes, and I need to ignore these entirely. There is no consistency on where these additional lines appear. What is the best way to get rid of them? Is it worth the processing time to scan the db and drop these rows? It seems awfully expensive to check all 60+ million lines...

    On the topic of dropping, these files also contain a couple attributes I don't want, as well as many duplicate entries that I don't need. Since I'll need to do several split/apply/combines on each of these csv files, is it recommended to 'clean up' the data first, and if so, what is the convention on doing so? I was thinking about a script to read in, clean up, then write out the data. This seems like a lot of read/writes to endure... but I do have to SCP the files onto a server to run the plotting code, so maybe I should?

    Any heads up on operations to avoid or performance optimization tips would really help me out. Unfortunately I am on my own with this project so I don't have anyone to ask except internet strangers.

    Help me internet strangers, you're my only hope!

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

    in search of methods to hard coding a specific sequence of commands to a ps4 controller

    Posted: 08 Sep 2020 08:41 PM PDT

    I want to automate some monotonous tasks on a ps4 game i play and was wondering if anyone had any methods for me to do this?

    i basically want to be able to hard code a given set of tasks to my ps4. like for example: press x 5 times in a given amount of time followed by other tasks i preset to be done

    the point of this post was not to make anyone do it for me, just looking for some type of resources or suggestions for me to make a program for what im trying to do.

    Appreciate any and all feedback

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

    Understanding the relationship between php and html and other high level concepts

    Posted: 08 Sep 2020 04:06 PM PDT

    I am just starting to learn php. I've worked a bunch with html and javascript for making single page applications but now I'm trying to make a server connected app with multiple pages and am having trouble understanding where the php fits in and how I should be delivering the pages. Writing the code itself is not really giving me any trouble, but the higher level structure and interaction between the html and php are eluding me. There are plenty of guides about the various concepts and functions in php in isolation but I can't find any guides online that talk about how to actually apply those concepts.

    Probably the biggest question is whether I should be using .html files or .php files for delivering the pages in general. Currently I've been making html files which use javascript to call php scripts which fill in data but I know that I could also be delivering the pages via php from the start by just changing the current html files extensions to .php and including any other php code I'd need in the same file.

    How do people typically deliver/format pages in an application with a php backend? Should I be assembling and sendiing everything via php? Should I do everything with html and javascript and just use php to fetch data (as opposed to formatted html) from the server? Should I write the pages in .html files but call a php script (in the url) which just unpacks and sends those files or modifies them as needed?

    Secondly, when I want to use php for scripting purposes instead of for delivering a page, what is the best way to go about that? The case I have in mind is submitting a form. I want to get the values, do stuff with them server side, and then send the user to some other page with dynamic content based on their input or to different pages based on input. What is the best way to do that sort of thing? Should I use header() to redirect them to another html/php file? Do I put the html for the next page in the same file as the script which reads the form?

    Sorry if this all seems pretty obvious or overly simple, or if any of my assumptions are totally wrong, but people only ever make guides saying how things work, not how to use them. I'm sure there are multiple approaches to everything too, but some basic advice on what is typically done / what options are available to me or some good resources to read would be very helpful.

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

    C++ Help, Finding matching element in vector

    Posted: 08 Sep 2020 09:10 AM PDT

    Hi, I have a vector containing instances of a class named Item inside a new class called ShoppingCart. The vector is named items. I have to compare a name pulled from an instance of the Item class and compare it to the elements in vector items, if there is a match, i only update quantity, if there's not. i pushback the name, price, and quantity.

    void ShoppingCart::add(Item item) { std::string name = item.get_name(); if (std::find(items.begin(), items.end(), name) != items.end()) //This line seems to cause the error { quantity += quantity; } else { items.push_back(Item(name, price, quantity)); } } 
    submitted by /u/SocialBus
    [link] [comments]

    What is the best way to store images for my web app?

    Posted: 08 Sep 2020 12:44 PM PDT

    Hello,

    I'm making a very simple web app where I take photos of beers I tasted and give them I rate so I remember if I liked them or not.

    I'm using nodejs for the backend, react for the frontend and mongodb for my db. I have the basic functionality for posting the name and a description for the beer send the data in a json format. But now it's time for the actual photos. Mongo atlas provides me with half a TB of space so I first thought of saving my photos in it. However it will make the app slow if every time it has to download the images, so I thought it should return a url. But the url will then reveal my database.

    So what is the most "correct" way of doing this? What are they using in like e-shops and other websites? The project is personal but I want it to be as robust as possible.

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

    In react native where do we write the "logic" code for what is displayed in the UI?

    Posted: 08 Sep 2020 04:18 PM PDT

    Im new to react native. I need to get data from a server, populate a table with that data and what data I get is dependant on other data.

    In angular you have a .js file and .html file of which separate the logic and view respectively. If your familiar with angular what would be the equivalent for react native?

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

    Program to use for developing app/website???

    Posted: 08 Sep 2020 04:14 PM PDT

    Hey y'all, I'm looking for a program that will let me develop and app/website that will help me with a construction company. My hope is that I'll be able to run with an admin side and a user side. Then be able to do things like organize jobs and help calculate invoices and quote and such, if there is a program that can help me make something like that (I remember using Visual Basic wayyyy back in the day) or I remember using quick books back in school. If anyone knows of a program to help me make what's described above that would be helpful, I don't mind spending a little bit of money. Thanks!!

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

    Picture to Database to Count Technology?

    Posted: 08 Sep 2020 03:55 PM PDT

    Hi everyone, I'm an entrepreneur with only basic knowledge of programming and I had a question that hopefully, someone should be able to answer or at least provide a lead that could help me get closer to a potential answer for my research.

    I have seen a lot of technology floating around that involves taking a picture of an object (i.e. receipt from a purchase) and some basic information from the receipt was gathered and posted on a webpage (ex. https://myblackreceipt.com/upload-receipt/).

    I was wondering what is the correct terminology for this technology and would it be possible to do something similar to this but would perform this action pathway stated below?

    Person takes picture of receipt > Name of business is found within said database in > The count/tally for the respective database increases by 1 (+1) > Count is displayed on a webpage in numerical order from most to least.

    If someone could answer this question that would surely be helpful :). Thank you all and have a wonderful day.

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

    Need advice: framework recommendations for Python/Drag&Drop

    Posted: 08 Sep 2020 03:23 PM PDT

    Need Framework recommendations for Python/DragDrop.

    I have developed PythonFunctionality What framework works good for end users where they will drag and drop, create on the fly "work flows" - that will be connected to backend Python or Java. Node-REDish but less "geeky" than node-red (for nonTech)

    Something similar to Node-RED - but not as "geeky" as node-red for developers.
    I showed what I developed to a few friends and they did not like node-red look and feel.
    so looking for more of a "non-techy" users's perspective.

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

    Noob needs help with makefile

    Posted: 08 Sep 2020 07:04 AM PDT

    Hello there folks. My professor sent some codes we should refactor and complete. all cpp with some libraries. The problem is: For the first time he sent them with a makefile each associated to this external library deal with the dependencies and honestly I dont wanna go the "open ubuntu in windows and command line my way" for the rest of the day, too many individual small exercises. Is there a way to create a project in an IDE, in codeblocks per se, and include the makefile to make things fast and easy? Sorry if its a stupid question.

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

    need some help deciding what to learn

    Posted: 08 Sep 2020 02:14 PM PDT

    hello Reddit programmers.i don't know about your country school's system but in mine i'm in 3rd grade.I study computer science.anyways my question is that in school they teach us python,data base,html/CSS and some network stuff and I've been learning game development for year now and i really love it so what should i focus on learning i will keep learning both but which one should i give more time.i'm really confused i would really use an advice.

    and another thing does learning game development c# in my case will improve my programming skill. Will i see an improvement when write a python code

    ps: i'm 17yo

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

    Gatsby Shadowing - how do they implement it?

    Posted: 08 Sep 2020 10:06 AM PDT

    Hi all - if anyone is familiar with Gatsby shadowing, it's very useful. I know that it in some way involves an API, but how did Gatsby implement such a feature? I am curious in implementing one of my own so that others may use my creations easily.

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

    How do you pronounce “BSON”?

    Posted: 08 Sep 2020 01:27 PM PDT

    Programming a path around the globe in Google Earth?

    Posted: 08 Sep 2020 09:41 AM PDT

    Hey there!

    I am a bit new and dont know if this is the right place for my question or if anyone can help me with this - so if not, maybe suggest a different subreddit?

    So here I go: For an art project I want to record the earth (topview) while it is rotating along one particular latitude (which crosses my city) The idea is to show the earthrotation by making people imagine that they would suddenly stand still, not moving with the pace of the globe.

    Therefore I want to use Google Earth, the record setting, but I found out that it is rather difficult to make the circle around the globe with a path, because it doesnt follow the latitudes. You would have to place a placemark every 100km to make it accurate and that would cost days.

    So my question is if anyone knows a simple solution and/or knows if you can programme this somehow? does someone has experience with Google Earth?

    I hope you understand what I mean! Thanks a lot for your help :)

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

    React Native (with Redux) go back to previous screen without fetching data

    Posted: 08 Sep 2020 07:19 AM PDT

    I am using react native to develop a mobile app with the use of redux. I navigate to a screen where I want to be able to click the back button and not have to load all the data again.

    The data at the bottom most component, which fetches most of the data, is not stored in the global store, but is there a way to go back to the previous page almost like state jumping without having to re-fetch data?

    It may be that I have to store the data in order to do this, but its almost like I actually just want a pop-up my current screen and remove it when I hit the x or back button. But I was hoping I could still do this same functionality with navigating to a different screen.

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

    No comments:

    Post a Comment