• Breaking News

    Sunday, December 30, 2018

    I want to create a webapp that takes the ingredients you have in your fridge, and comes up with recipes. Need a bit of guidance. Ask Programming

    I want to create a webapp that takes the ingredients you have in your fridge, and comes up with recipes. Need a bit of guidance. Ask Programming


    I want to create a webapp that takes the ingredients you have in your fridge, and comes up with recipes. Need a bit of guidance.

    Posted: 30 Dec 2018 01:21 PM PST

    I understand there's plenty of websites that do this. I'm writing it as an exercise.

    I'm currently going through Colt Steele's "Web Developer Boot Camp" on Udemy so I can get the fundamentals of web dev down. My question is: How can I get the app to "browse" the web and return links to recipes that include those ingredients? Is this the job of a web crawler? Can I use googles API to return results? What would be the most appropriate/efficient way of achieving this feature? Am I even asking the right question?

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

    Can't seem to set state in ComponentDidMount when using socketio

    Posted: 30 Dec 2018 04:23 PM PST

    I placed my socketio listener in componentDidMount to listen for any messages and set state to it but I can't seem to set state if only 1 client is sending the message even though when there are more than 2 clients connected. It only works if all the clients send at least 1 message then they'll be able to setState. I've no problem receiving the message just that it's unable to set the message to state

    submitted by /u/PewPaw-Grams
    [link] [comments]

    [Python] How to implement a switch-case type function where cases are ranges?

    Posted: 30 Dec 2018 05:12 PM PST

    It's kind of like a grading system. For example if

    90<=x<100 : "A grade" 

    then function(95) would return string "A grade".

    Need to do this for a bunch of range cases. I could use if-elseif but I am sure someone out there has thought of something better.

    Thank you for reading and any help would be appreciated!

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

    Learning Javascript

    Posted: 30 Dec 2018 01:55 PM PST

    I want to learn Javascript, as a I already know HTML and CSS, and have an existing website. But how do you learn all of the nuances of the language? When I watch tutorials how do these people know all the "right words" to use, and how do they remember all the functions? Is there a particular place I can look these up as I am coding? This is what is really holding me back. This also applies to other languages I am interested in like Python. Thanks in advance

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

    How do compilers know what OS the user is using?

    Posted: 30 Dec 2018 04:16 PM PST

    Learning Java need help on simple code

    Posted: 30 Dec 2018 04:54 PM PST

    For the output of this code I get

    David - Input

    Welcome David

    Please enter the passcode of David

    1001 - Input

    proceed

    These are the launch Code numbers

    7587

    Would u like to launch? Enter Yes or No

    Yes -Input

    yes

    Works

    I'm not understanding why the if statement which states if(userAnswer=="yes") is being skipped.

    public static void main(String[] args) { Random random = new Random(); Scanner in = new Scanner(System.in); System.out.println("Hello, please enter your name!"); String userName = in.nextLine(); System.out.println("Welcome "+userName); int passcode=1001; System.out.println("Please enter the passcode of " + userName); int passcodeInput = in.nextInt(); in.nextLine(); int launchCode =random.nextInt(10000); if(passcodeInput==passcode) { System.out.println("proceed"); System.out.println("These are the launch Code numbers"); System.out.println(launchCode); System.out.println("Would u like to launch? Enter Yes or No"); String userAnswer = in.nextLine(); userAnswer = userAnswer.toLowerCase(); System.out.println(userAnswer); if(userAnswer=="yes") { System.out.println("Enter the Launch Code"); int codeAnswer = in.nextInt(); if(codeAnswer==launchCode) { System.out.println("Launching Nuclear Missle..."); } } System.out.println("Works"); 
    submitted by /u/davchi1
    [link] [comments]

    Question about pastebin and ip's

    Posted: 30 Dec 2018 09:58 PM PST

    Please don't make fun of me as I am not a computer genius. I have this website.. someone signed up with an email and password and it shows me the ip addresses. This one caught my eye. I searched up the IP address and it says Google LLC. is the ISP I searched the ip address into google and I found a pastebin with the SAME EMAIL AND PASS! Is this a bot? If so what is it used for? Check out the paste bin link below. https://pastebin.com/ujRYYCT8

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

    I have (verbal) financial support for my program/service. What kind of guys do I need to interview and hire?

    Posted: 30 Dec 2018 11:03 AM PST

    My product is going to essentially be a heavily encrypted server that stores documents for individuals and businesses. The purpose of this server is so that these documents may be transmitted as soon as verification from the customer is received. The industry that this service is ultimately meant to serve will benefit immensely by receiving these documents thousands of times faster than normal.

    The documents I am talking about are already computer generated so I am going to need the buy in of the software companies that generate these documents, otherwise the consumer will have to send the documents themselves. Lets just say the best software to do this work for you as an individual is called MTV. The idea is that after I finish my research paper, MTV uploads the document to my heavily encrypted server after the customer gives permission.

    Lets say the end user is a company called VH1. When VH1 needs my research paper that I compiled in MTV and is now in MY heavily encrypted server, the associate at VH1 goes into MY encrypted server's web database and inputs their own credentials and then has access ONLY to the customers they work with. The associate selects the research paper and clicks "request approval". The customer receives a text message with a 6 digit code, goes to my secure servers website and inputs it and then the research paper is sent via secure e-mail to the sales associate at VH1.

    I hope that this is making sense. I just don't want to get into specifics; I even had to sign an NDA. I did create a chart that I will show you that I hope makes better sense of this. As someone with very little experience in programming I am here with my hat in hand asking you all what kind of people I should be looking for. Thank you.

    I couldn't figure out how to put an image in after I posted the original post so here is a link:

    https://drive.google.com/file/d/1MAHKzTZ5vRTeU8WDePiAXXoxKEAhQ2iZ/view?usp=sharing

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

    Need clarification on bitpacking and memory optimization

    Posted: 30 Dec 2018 05:44 PM PST

    Hi everybody. This might be a stupid question, but I was wondering if, given a program that has a bottleneck in moving values from main memory to the registers, would there be merit to compressing these values and then decompressing them in the registers.

    I apologize that I don't have a more concrete example; this is more me wondering if I could use this as a trick to speed up programs. A more concrete example:

    Given a program that performs operations on sets of four 16 bit values, would there be a possible gain in speed by packing these values into a 64 bit variable, moving this 64 bit variable to the registers, and then unpacking the original four values into their own registers in order to perform the needed operations?

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

    A couple of useful links for beginners to get started with small to medium projects. (See text section).

    Posted: 30 Dec 2018 12:28 AM PST

    I want to make a movie library application similar to netflix for my house

    Posted: 30 Dec 2018 02:37 PM PST

    I have been learning win32api. I was wondering if such a thing is possible here or if im barking up the wrong tree. I have a imagine showing what exactly I want to do.

    Im considering switching to pygame which i do some of already or trying my best to continue this route of learning win32api. Ill be entirely honest im not fully sure if I can have a window play a video file in win32api.

    https://imgur.com/a/rVw093s

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

    I need help importing a thing in Python.

    Posted: 30 Dec 2018 07:48 AM PST

    So I am using linux, completely new to it, Raspian specifically, but I can't import a thing I just installed with pip (honestly no idea what pip really even is)

    Anyways, I did:

    $pip install speedtest-cli

    It installed successfully, everything was fine

    $speedtest-cli --simple

    It runs correctly, and works fine

    Now I go into python, and try doing

    import speedtest

    and I get the error "ImportError: No module named 'speedtest'"

    I have spent ages trying to figure out this problem and I have no idea what else to do.

    Also, in an effort to find speedtest.py which I should be importing, I did a command thingy or whatever and got this: https://gyazo.com/64b5ccf94ee0bf09f493c92cca26d029

    Sorry for the picture of a screen with my phone it's on a raspberry pi and I don't know how to do screenshots and quickly share it.

    Anyways, from the above image, I couldn't even find the site-packages folder but I may be looking in the wrong spot.

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

    Is my use of a SQLite database in a desktop app correct?

    Posted: 30 Dec 2018 01:15 PM PST

    So, I'm building a desktop app and a web app.

    The data created on the web app will be stored in an appropriate database type like MySQL or Postgres.

    The desktop app will have the capability of working locally (offline) as well as pulling data down from the web app.

    Is it correct to use a SQLite database to store the data in the desktop app?

    What I'm worried about is having to manage the same data in two different types of databases. Maybe there is a better solution?

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

    Insert whole iFrame YouTube page

    Posted: 30 Dec 2018 12:00 PM PST

    Hello, i would like to know how to put whole YouTube page like this one: https://www.youtube.com/watch?v=eOstoSuCUrM info my website in small window? I don't need just the video embed, i need the whole good stuff. Any ideas?

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

    Looking for the correct type of inventory management software

    Posted: 30 Dec 2018 07:09 AM PST

    Hi reddit, might be the wrong subreddit but im struggling to put what I need in the correct terms so im not sure where to post.

    The idea is: Lets say I have a factory that prints clothes (these clothes have barcodes). Right now whenever a article of clothing goes out to be sold or comes back someone has to manually input the article number into our CRM (1C) in order to add it to the database. My question: is there any more modern way to do this? Perhaps an app that automatically updates after a photo of the barcode is taken?

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

    Java RMI help (desperate)

    Posted: 30 Dec 2018 06:31 AM PST

    Anyone here that have experience with java RMI? I'm stuck on a distributed project and really need help. I can tell you more in the chat if you are interested

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

    YouTube playlist of some mock interviews with real engineers from reputable companies (See text section for link).

    Posted: 30 Dec 2018 12:17 AM PST

    apache + php + memcached not storing session into memcached

    Posted: 29 Dec 2018 10:43 PM PST

    Hello,

    I have two apache servers both have memcached installed. I am trying to store session into memcached but apache is not storing it.

    Here is settings from phpinfo, both servers show the same data.

    I have try this way

    session.save_handler memcache memcache

    session.save_path tcp://xx.xx.xx.xx:11211?persistent=1&weight=1&timeout=1&retry_interval=15,tcp://yy.yy.yy.yy:11211?persistent=1&weight=1&timeout=1&retry_interval=15 tcp://xx.xx.xx.xx:11211?persistent=1&weight=1&timeout=1&retry_interval=15,tcp://yy.yy.yy.yy:11211?persistent=1&weight=1&timeout=1&retry_interval=15

    and this way

    session.save_handler memcache memcache

    session.save_path tcp://xx.xx.xx.xx:11211,tcp://yy.yy.yy.yy:11211 tcp://xx.xx.xx.xx:11211,tcp://yy.yy.yy.yy:11211

    And when I try manually store into memcached from both machines it works fine. but when I do thru php page the key is not saved into memcached

    echo -e 'stats items\r' | nc xx.xx.xx.xx 11211

    echo -e 'stats items\r' | nc yy.yy.yy.yy 11211

    Both work fine on both boxes and show no new key stored

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

    No comments:

    Post a Comment