• Breaking News

    Saturday, November 24, 2018

    Editing code on chip from bluetooth speaker. Ask Programming

    Editing code on chip from bluetooth speaker. Ask Programming


    Editing code on chip from bluetooth speaker.

    Posted: 24 Nov 2018 12:52 PM PST

    I know this may not be the right subreddit but idk where else to post.

    As the title says, I have a speaker but would like to change the startup sound. I took the chip out, and it has a micro USB port, but it won't connect to my computer. Anyone know how to fix this?

    Here's a picture of the chip: http://imgur.com/gallery/lwtQ9LQ

    (It's from a fake jbl speaker)

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

    How many hours in did you make your first big project/game?

    Posted: 24 Nov 2018 07:11 PM PST

    I'm probably close to 100 hours into Python and haven't really gotten into anything big. I've made a input based calculator and a couple smaller things.

    I'm thinking about a text based RPG and a Reddit bot.

    But what about you?

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

    Programming autodidacts of reddit: Did you struggle to teach yourself programming until you found a language you just clicked with?

    Posted: 24 Nov 2018 03:31 AM PST

    WildFly giving 403 when I try to launch a web application

    Posted: 24 Nov 2018 06:44 PM PST

    The teacher for my intermediate Java course has instructed us to use WildFly for the JSP portion of this class. I've now tried several times to get it running via his instructions and every time I try to launch the program I get a 403 error when logging in with the ApplciationRealm user credentials I set up. His only response to my prior email has been that I 'check [my] code very carefully and follow the instructions [he] wrote.' I'm at a loss here and google has not seemed to help. Does anyone have an idea as to why I seem to be getting this error repeatedly.

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

    How Can I Create A System To Automatically Merge PDFs Every Month

    Posted: 24 Nov 2018 05:57 PM PST

    Why is "LRU cache" called "LRU cache" and not "MRU cache"?

    Posted: 24 Nov 2018 05:17 PM PST

    If I'm reading https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)) correctly, an LRU cache with size N caches the N most recently used items.

    I wonder when, why, and how we got stuck calling them LRU caches?

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

    Do you think diversity is more important than hiring the best you can find regardless of race or gender for developer roles?

    Posted: 24 Nov 2018 11:10 AM PST

    What do you think and why?

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

    Can I learn the skills required to create an app in 3 months?

    Posted: 24 Nov 2018 04:03 PM PST

    If I wanted to make something graphic, but didn't wanted to use a window server ( like X11), how would I do it?

    Posted: 24 Nov 2018 06:52 AM PST

    Hi, to be honest I don't think I'd never be on that situation, but I was just wondering, If I had a linux system with only command line and I wanted to make something graphic without using the window server what do I do?

    I also was wondering if the GPU play a role in that, I know OpenGL but I don't know if it will be useful with 2D graphing.

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

    Handling variables in a stack-based Virtual Machine

    Posted: 24 Nov 2018 11:46 AM PST

    So i have written a basic virtual machine with a very small instruction set, cabable of performing jumps, basic math operations and pushing and popping literal values onto the stack. However, I now want to add instructions to handle variable assignment, and I was wondering how this was done.

    Do I use a seperate stack for variables and literal values, how do I remember where these variables are on the stack? Thank you

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

    clearTimeout()

    Posted: 24 Nov 2018 11:32 AM PST

    I have this code where i want to clear the Timeout after you press the correct button but the clearTimeout() isnt working. Ignore the color chooser things, this is part of a bigger project.

    here is the code:

    js:

    function colorChoose() {

    var colors = ["blue","red","green","yellow","orange","cyan","purple","teal","brown"];

    chooser = colors[Math.floor(Math.random() * colors.length)];

    document.getElementById("squareColor").style.backgroundColor = chooser;

    console.log(chooser);

    //skipper = document.getElementById('squareColor')

    timer = setTimeout(function() {alert('You Lose'); }, 4000);

    }

    function blueFunct() {

    if (chooser == "blue") {

    colorChoose();

    clearTimeout(timer);

    } else {

    alert('You Lose');

    clearTimeout(timer)

    }

    }

    function redFunct() {

    if (chooser == "red") {

    colorChoose();

    clearTimeout(timer);

    } else {

    alert('You Lose');

    clearTimeout(timer)

    }

    }

    function greenFunct() {

    if (chooser == "green") {

    colorChoose();

    clearTimeout(timer)

    } else {

    alert('You Lose');

    clearTimeout(timer)

    }

    }

    function yellowFunct() {

    if (chooser == "yellow") {

    colorChoose();

    clearTimeout(timer)

    } else {

    alert('You Lose');

    clearTimeout(timer)

    }

    }

    function orangeFunct() {

    if (chooser == "orange") {

    colorChoose();

    clearTimeout(timer)

    } else {

    alert('You Lose');

    clearTimeout(timer)

    }

    }

    function cyanFunct() {

    if (chooser == "cyan") {

    colorChoose();

    clearTimeout(timer)

    } else {

    alert('You Lose');

    clearTimeout(timer)

    }

    }

    function purpleFunct() {

    if (chooser == "purple") {

    colorChoose();

    clearTimeout(timer)

    } else {

    alert('You Lose');

    clearTimeout(timer)

    }

    }

    function tealFunct() {

    if (chooser == "teal") {

    colorChoose();

    clearTimeout(timer)

    } else {

    alert('You Lose');

    clearTimeout(timer)

    }

    }

    function brownFunct() {

    if (chooser == "brown") {

    colorChoose();

    clearTimeout(timer)

    } else {

    alert('You Lose');

    clearTimeout

    }

    }

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

    Building a database for a web app

    Posted: 24 Nov 2018 02:12 PM PST

    Hello!

    I am working on building my new idea into a website and possibly a mobile app. Right from the start I want to be able to scale this project correctly. Here is my question for you all:

    1. What's the best way to create a data base of user submitted information? (Info will include strings, numbers, attachments, geolocation, and optional photos.

    2. How can I then out put this info to a site or mobile app?

    3. How can this be scaled to automatically generate web pages with these submissions for each user response by pulling from the main database?

    Thank you all in advance for the help! If you need more details to answer feel free to comment below and I will provide more info. Thanks!

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

    Google Visiting My University

    Posted: 24 Nov 2018 02:08 PM PST

    Greetings fellow programmers.

    In the coming week the Google Data Center teams are visiting my university to share some ideas about the company and hire some staff. I am still a sophomore undergrad student, so I won't be applying for any jobs, but I managed to get a one-on-one appointment with them.

    Since it will be a Q&A focused meeting, what would you guys suggest I ask them ?

    Their staff consists of: Hardware Ops (HWops), Data Center Ops (DCops) or Data Centre Delivery & Engineering (DCDE).

    I'm looking forward to reading your suggestions, thanks in advace.

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

    Switching from a home server to AWS?

    Posted: 24 Nov 2018 12:40 PM PST

    First of all, forgive me for being a moron.

    I have a python script that scans twitter every minute and sends me an alert if a certain keyword is said. I use this for day trading. I paid someone else to write the script for me. It works well, but running it on my home computer is sometimes a problem. The WiFi can go out, the pc wants to update, blah blah blah. I end up missing a few alerts. Doesn't sound like a big deal but when day trading can cost me money.

    Would it be possible to have this script run on a cloud service like AWS? The script itself is kind of weird, it opens, scans twitter for the keyword, then closes. I have to use windows task manager to make it run every minute.

    So is this something I can get running on AWS? Would it be feasible to try as a beginner?

    Thanks

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

    Help with C needed to not make a automated door not kill chickens!

    Posted: 24 Nov 2018 04:48 AM PST

    So i have a small problem with my code, or my brain to be honest.

    The problem im trying to solve is to have a automated chicken coop door that i can control my home automation system (Hone Assistant).

    This is the code so far and it's ugly but it works ;) T

     if ( (char)payload[0] == 'U' ) { delay(100); digitalWrite(relayPinDown, LOW); delay(100); digitalWrite(relayPinUp, HIGH); limitState = digitalRead(limitPin); if (limitState == HIGH) { digitalWrite(relayPinUp, LOW); } 

    And my thinking is that i can nest a nother IF statement as seen above to break the digitalWrite but it refuses to work, and I tried to creaste a new if in the void loop but that just ended up looping in infinity.

    My last attempt was a to send a S payload when the limit switch changed state and add a else if statement that was

     else if ( (char)payload[0] == 'S' ) { delay(100); digitalWrite(relayPinUp, LOW); delay(100); digitalWrite(relayPinDown, HIGH); 

    But that did not relay work ether :(

    So reddit you are my only hope!

    All the code - the secrets :)

    #include <ESP8266WiFi.h> #include <PubSubClient.h> const int relayPinUp = D2; const int relayPinDown = D5; const int limitPin = D4; const int ledPin = D6; int limitState; WiFiClient espClient; PubSubClient client(espClient); void setup() { pinMode(D2, OUTPUT); // relayUP pinMode(D5, OUTPUT); // relayDOWN pinMode(D4, OUTPUT); // limitPIN pinMode(D6, OUTPUT); // ledPin Serial.begin(115200); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.println("Connecting to WiFi.."); } Serial.println("Connected to the WiFi network"); client.setServer(mqttServer, mqttPort); client.setCallback(callback); while (!client.connected()) { Serial.println("Connecting to MQTT..."); if (client.connect("ESP8266Client", mqttUser, mqttPassword )) { Serial.println("connected"); } else { Serial.print("failed with state "); Serial.print(client.state()); delay(2000); } } client.publish("chickencoop/door", "ChickenCoop door is Online"); client.subscribe("chickencoop/door"); Serial.print("Pin Status "); Serial.println(limitState); } void callback(char* topic, byte* payload, unsigned int length) { Serial.print("Message arrived in topic: "); Serial.println(topic); Serial.print("Message:"); for (int i = 0; i < length; i++) { Serial.print((char)payload[i]); } if ( (char)payload[0] == 'U' ) { delay(100); digitalWrite(relayPinDown, LOW); delay(100); digitalWrite(relayPinUp, HIGH); limitState = digitalRead(limitPin); if (limitState == HIGH) { digitalWrite(relayPinUp, LOW); } } else if ( (char)payload[0] == 'D' ) { delay(100); digitalWrite(relayPinUp, LOW); delay(100); digitalWrite(relayPinDown, HIGH); } else { delay(500); Serial.println("Error"); delay(500); digitalWrite(relayPinUp, LOW); delay(1000); digitalWrite(relayPinDown, LOW); } } void loop() { client.loop(); } 
    submitted by /u/_j0nas_
    [link] [comments]

    Is Middleware Dead?

    Posted: 24 Nov 2018 12:00 PM PST

    Hi Everyone,

    I am currently a fourth year Computer Science student, and am working on a research paper regarding Middleware architecture. The campus that I attend has an instructor that profoundly claims that Middleware is "dead", and that the typical monolithic-style approach to architecture has been replaced with microservices.

    This being said, during my time as an employed programmer, my organization has a dedicated middleware team of at least twenty people. However, I am attempting to avoid adding my own opinion to the article.

    In regards to middle-ware architecture, it definitely seems that there is a shift towards microservices. Do you believe there is still a use for Middleware, or should people start the permanent jump towards the new microservices on the cloud style architecture?

    Any input would be greatly appreciated.

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

    Why do modern games still use 255 as the max for some numbers?

    Posted: 23 Nov 2018 11:17 PM PST

    255 is obviously the size of a byte, which would have made sense as a memory size for older games that had to be really economical with memory. However, I assume that modern games would store these values in 64-bit ints. Does using 255 provide some convenience or optimization, or is it just a convention?

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

    P2P Start Connection

    Posted: 24 Nov 2018 11:17 AM PST

    I have a question. I want to implement a simple P2P-Chat in Erlang. With simple I mean sending only messages from one system to another. My first problem is, how to start the connection. Which kind of possibilities do I have to start the basic connection? I have heard of the gossip protocol. Are there other ways to start the connection. If yes, do you have some readings or links, or maybe Pseudocodes for this?

    I think it would be helpfull if I have some more informations.

    Thanks in advanced for your help!

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

    How are they combining map/chart with the heart design?

    Posted: 24 Nov 2018 05:15 AM PST

    I'm lost trying to figure out how they are combining the map with the heart shape https://www.underluckystars.com/designer/37b55baf-e408-4b7a-a1fc-25f8f0f752a7 any help will be appreciated.

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

    I want to add a QOL feature to my Windows 10 Action Center. I want a single button to toggle HDR on and off. Is this possible?

    Posted: 24 Nov 2018 11:09 AM PST

    Is there already a solution such as this? Is this even possible.

    I have a few games that support HDR but I have to enable it every time I open up those games. I just want to make it a little easier to navigate to.

    I have no programming experience so I don't even know where to start with this.

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

    Best Path for Getting a Entry Level Programming Job With No CS Degree?

    Posted: 24 Nov 2018 09:55 AM PST

    Hi,

    I picked up programming as a hobby about 6-7 months ago and since then it's turned into a full on passion for me. Recently I've started to think about becoming a professional programming, however, I'm quite afraid that my skills are nowhere near what they need to get a level entry job and my chances will be ever slimmer since I'm self-taught and didn't go to college for computer science.

    I've recently thought about applying to a local programming bootcamp, however, I've been quite timid to go through with completing my application due to the bootcamp's high price point and my own uncertainty on whether attending this bootcamp is the the correct path for me to land my very first programming job.

    If any readers would be willing to share their advice on what they think I should do next, I'd greatly appreciate your help.

    Thanks so much,
    Parker

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

    Question regarding app development

    Posted: 24 Nov 2018 09:54 AM PST

    Before I ask let me say that I'm in college developing a fake product for communications class. Our group decided on a app that recognizes food through your camera and builds recipes. My question is could you adapt some facial recognition software for food recognition? What kind of server would I need for it. Again this isn't something that I'm actually developing but I need to bs for two minutes.

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

    Looking to run Python scripts from a website on a hosting service - No idea how to start

    Posted: 24 Nov 2018 07:29 AM PST

    Hey guys, I'm an amateur/hobbyist Python programmer in my free time. I love to build little personal projects in Python. I'm aware of its flaws, but it's my favorite programming language.

    I'd like to set up a little website for one of my projects. I've always wanted to learn to build websites, and this was a good one to learn with. As a start, all I would like is a little input box on the site where you enter a string of text, the site then passes that string to a python script on the server, and prints the return somewhere on the screen. The problem I'm facing, is that I have absolutely no idea how any of this works. I'm probably way above my skill level here, but I would really like to learn how to do this but I don't know where or how to start.

    I followed a simple tutorial to set up a website. I used Hostgator to get the domain name and host the server. I then used Wordpress to make a fairly basic website. So far so good, this is all pretty easy. But now I don't know what I do next. I've read tons of conflicting things online: Hostgator doesn't allow python scripts, Hostgator does allow python scripts, you need to use CGI, you need to use WinSCP for shell access, you need to wrap your python in a webservice API.

    I don't know how to do most of these things, and I'm completely lost. I tried the webservice API suggestion, and that actually works wonderfully on my own computer, but I have no idea how to deploy that on the Hostgator server, nor do I know how to call it from the website.

    I've tried Hostgator support, but they can't help with this stuff, and their forums are dead. I've searched the internet but all of this stuff requires prior knowledge, and it's a maze to work backwards to figure out where I need to start learning.

    Is there anyone here who could help me out? I don't know what I don't know.

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

    How to print userinput continously in Javascript?

    Posted: 24 Nov 2018 02:46 AM PST

    Im writing a program to calculate calories for when users enter a name of the food and the total calories will add up. But how do I display the input continously? Eg; when the user enters Apple, it will show Apple, and when the user enters Pear, it will show "Apple,Pear"

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

    Help! Program which attempts to print out the the reverse of a word (orange --> egnaro) doesn't seem to work.

    Posted: 24 Nov 2018 08:43 AM PST

    import java.io.*;

    import java.util.*;

    public class Tester

    {

    public static void main(String args\[\]) { @SuppressWarnings("resource") Scanner kbreader = new Scanner([System.in](https://System.in)); //declares a scanner type with the name kbreader System.out.println("Enter your string here: "); //prints out instructions to the user String wordinput = kbreader.nextLine(); //declares the inputed word text as wordinput boolean conversion = false; //sets a boolean value to false which will be needed for the following code int lens = wordinput.length(); //declares with the variable name lens as the length of the wordinput String string\_converter = wordinput.substring(lens); //declares string\_converter as a variable in which the lens variable is placed into the .substring method while (!conversion){ if (kbreader.hasNext()); lens --; System.out.println(string\_converter); if (lens <= 0); conversion = true; System.out.println("Conversion Completed"); } 

    }

    } 

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

    No comments:

    Post a Comment