• Breaking News

    Tuesday, September 25, 2018

    Can people that are good at math be bad at programming? Ask Programming

    Can people that are good at math be bad at programming? Ask Programming


    Can people that are good at math be bad at programming?

    Posted: 25 Sep 2018 05:47 PM PDT

    Im not talking about myself but I had a Java professor who also taught Calc 2 and 3 who was absolutely horrendous. He was often corrected by our assistant and his teaching and understanding of java (which is pretty simple to grasp) was laughably bad. It was basically his only programming class though so il give him that. Apparently he had some experience in the industry years ago.

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

    Having trouble thinking of programming projects

    Posted: 25 Sep 2018 12:15 PM PDT

    I'm a third year college student trying to figure out what projects I should try and work on to develop myself as a programmer. I've always heard that "real programmers" create programs to make elements of their lives easier, but, I don't know what I want to make easier. I want to get a deeper understanding of several different languages like java, c++, javascript, python and html/css - I know some of those are scripting languages and not programming languages, but I want to learn them too.

    I have some experience in the field, but I just don't know what to work on in my free time or where to go to find projects of varying degrees of difficulty.

    Any thoughts?

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

    An assignment that asks us to convert Binary into Signed Integers, One's Complement, Two's Complement, and Excess 7, but in decimal.

    Posted: 25 Sep 2018 05:49 PM PDT

    It's a weird problem, I didn't mind it too much. It would have been easier to manage if we had more than 4 bits though. I think I did it right for the most part though? Just want to double check, i already turned it in.

    https://imgur.com/a/o2oVb3d

    So basically we're ignoring the decimal on the left, and taking the 4 bit numbers in the second leftmost column. And using the rules of each subset to convert them over. So for a signed 4 bit magnitude, 1011 instead of being 11 in decimal, becomes -4 because the left most bit is reserved for the sign.

    I put a disclaimer at the bottom for our teacher, it should explain itself.

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

    What should I code my first back-end service in?

    Posted: 25 Sep 2018 02:25 PM PDT

    I have a working iOS app that, as a prototype, worked with a dev database and does all processing on the client. I'd like to scale out the app to a web back-end and then strip the client down so the processing is not done on each mobile device. I have a few options for what I could write it in. I'm choosing a language based on (a) what will be easiest to scale, (b) what will be most applicable to other projects in the future, and (c) what I already know vs. how much I have to learn:

    • Swift (with Vapor - would be nice because then client and back-end would be in the same language, but worried I might pigeon-hole myself into Apple/Swift)
    • Ruby + Rails (already know a little bit, will have to learn more)
    • JavaScript (already know some from front-end projects, but will have to learn more for back-end)
    • Python (know well but don't know Django/other frameworks)
    • Java (know well but don't know any frameworks)

    I've never written a back-end service before and would love any advice y'all have to give :)

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

    What are some Software Engineer versions of Loot Crate?

    Posted: 25 Sep 2018 07:28 PM PDT

    I seen people use notepad to create a picture file, is the same thing possible to create a sound file?

    Posted: 25 Sep 2018 02:50 PM PDT

    Help with a weird error in C++?

    Posted: 25 Sep 2018 06:35 PM PDT

    https://gyazo.com/6f455d0e163c60d2392ef45dba8d44ea

    Above is a picture of the code I have so far. I have an error on line 15 saying 'z' was not declared in this scope. To me it looks like z is definently declared as int z=0; but why isn't it working?

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

    what is a cms, and how does it relate to databases?

    Posted: 25 Sep 2018 05:47 PM PDT

    How to update state of an array?

    Posted: 25 Sep 2018 07:04 AM PDT

    I'm working on a game project that requires the use of arrays.
    I want to be able to create a method that gets the current state of the array and then update it.

    I'm struggling. It's making me feel dumb.

    Lets say my array is room[] (has 5 rooms)

    I want to get the room location, print it out and then update the location(either + or -).

    I'm using c# btw

    Update:

    Thanks for all the help, I got it to work by using a global variable. Then increment or decrement by 1 and assigning it to the index of array when calling it.

    For now I;m not allowed to use classes or objects, so this is the best I could come up with.

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

    “Unknown option to `s’”

    Posted: 25 Sep 2018 04:53 PM PDT

    Trying to run a sed script but running into: "sed: file minor3.sed line 3: unknown option to `s'"

    Minor3.sed is "#!usr/bin/sed -f Sed '/412/d' phone.txt > phones.txt"

    Phone.txt just has a few lines of numbers and I'm trying to delete one of them using a sed script.

    I'm running it by entering "sed -f minor3.sed phone.txt" into the terminal.

    Thanks for your help.

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

    How to properly structure a C++ project in Visual Studio?

    Posted: 25 Sep 2018 12:14 PM PDT

    I've got used to the C# way of structuring, that is, I place folders that become namespaces and within one project I can neatly separate and encapsulate stuff.

    In my C++ project I tried this using different projects but I realised that two projects cannot depend on each other, so this becomes a no-go.

    What should I do? How do you structure your C++ projects using VS?

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

    Python GUI doesn't recognize 'Enter' keystroke

    Posted: 25 Sep 2018 11:51 AM PDT

    I have a raspberry pi set up to a screen, which displays a graph of live data from a sensor. I am making a timer function so that the user can initiate a timed test using the sensor data. My program for graphing the data and getting the input for the timer is written in Python. The problem I am having is that Python will not recognize the 'Enter' keystroke after the user enters the input into the GUI. I have the number pad shown here connected to the Pi. Although the screen is a touchscreen, I would like to avoid having the user actually use the touchscreen function since they will be using gloves for the testing, which is the reason for the number pad. Is there any workaround to this, or is the user going to be forced to use the touchscreen since the 'Enter' keystroke is not being recognized? I have googled this issue to no avail. Here is my code:

    inputTime = easygui.integerbox(msg="Enter the time for the test in seconds: ", title="set time", default="",lowerbound=0, upperbound=1000) 

    and here is another way I tried using TKinter:

    def printtext(): global e string = e.get() print string from Tkinter import * root = Tk() root.title('Name') e = Entry(root) e.pack() e.focus_set() b = Button(root,text='ok',command=printtext) b.pack(side='bottom') root.mainloop() 

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

    How to avoid duplicate random number?

    Posted: 25 Sep 2018 09:30 AM PDT

    Welp... from one problem to the next.

    I have this:

    int mobChance = randomNum(); int weaponChance = randomNum(); int treasureChance = randomNum(); int potionChance = randomNum(); 

    and the method:

    private int randomNum() //used for genral % chances for drop/spawn rates { Random random = new Random(); int number; number = random.Next(0, 100); return number; } 

    every time they all get the same # (from what I've read it's because they generate the random number at the same time giving it the exact same seed)

    How do I avoid this?

    Solved: I moved the create new random object outside of the method.

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

    How is pointer arithmetic done in C? Being a beginner, I am struggling to get a hold on this concept. The addition and subtraction done on a pointer leads to the values according to the data types. How are those values achieved? Please someone explain to me

    Posted: 25 Sep 2018 09:27 AM PDT

    Overloading base class functions in C++

    Posted: 25 Sep 2018 09:24 AM PDT

    Here is the question on my assignment I am struggling to understand. I am not entirely sure what they're asking me to do on part b:

    class base { public: void print() const; void set(int, int); void get(int&, int&); base(); base(int, int); private: int a; int b; }; class derived: public base { public: . . . . . private: int c; }; 

    a) Suppose that class derived overrides the function print of the class base. What is the heading of the function print in the class derived?

    b) Suppose that the class overloads the functions set and get of the class base. What are the headings of these functions in the class derived.

    Thanks in advance!

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

    what technologies to use for a words learning app ?

    Posted: 25 Sep 2018 08:12 AM PDT

    i'm gonna build a simple language app,mostly for children . the main task is to show a picture of somethig and make sure that the user knew the name of that thib by voice . what APIs, programming languages and services ( such voice to text ) to use ? and if what platform is the best for that ? thank you

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

    File with CRLF, LF line terminators? How does that even make sense?

    Posted: 25 Sep 2018 08:09 AM PDT

    So I'm working on a bigger project with multiple people, all commits coming from one guy (the project lead, who btw makes no commit messages (maybe just empty strings, I didn't even know that was possible, but I'm getting sidetracked)) have files with CRLF, LF line terminators.

    Please do correct me if I'm wrong, but Unix based systems uses LF as line terminator, and Windows uses CRLF, so how does this whole CRLF,LF work? Is that a standard anywhere? I can handle CRLF (or vim can for me), but I'm getting all these "lovely" ^M endings in the CRLF,LF files.

    I tried rewriting the line endings in one commit to just CRLF, and got the CRLF,LF right back in the next one..

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

    How to check if ActiveMQ is working properly?

    Posted: 25 Sep 2018 07:35 AM PDT

    What would be the simplest way to test if ActiveMQ is functioning properly?

    Would it be by putting a message in a queue and remove from the queue?

    Say with a programming language like python? Or would there be simpler methods that already do this?

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

    C++ Coding Assignment Help

    Posted: 25 Sep 2018 12:06 AM PDT

    https://imgur.com/TkKQpDm

    I have this coding assignment and I am stuck on how to continue.

    This is what I have so far; but I don't think I went in the right direction!

    #include <iostream>

    using namespace std;

    int main()

    {

    int population, 

    population_remainder;

    population=2; population\_remainder=population%2; 

    while (population<100000)

    {

    if (population\_remainder=1) { 

    population=(population*3)(+1);

    } 

    if (population_remainder=0)

    {

    population=population/2;

    }

    if (population<=1) { 

    cout<<"The organism is dead"<<endl;

    } 

    population=population+1;

    cout<<"The population is: "<<population<<endl;

    }

    return 0;

    }

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

    Best way to create program that periodically reads an online calendar and emails/texts me events?

    Posted: 24 Sep 2018 11:41 PM PDT

    Hi all!

    I'm looking to create a small program to solve a simple inconvenience of mine. I'm wanting to write a program to periodically (weekly) read a yoga class schedule from an online website, parse/format the information, and email (preferably SMS) me the results.

    This is the website:

    http://www.gaiaflowyoga.com/yoga-class-schedule-uptown-dallas-studio/

    It's a very simple website for a local yoga studio. The class schedule changes weekly (with different class levels/instructors), so I'd like to build a simple program to parse the entire weekly schedule, find specific class/instructor matches, and relay the information to myself in a concise way (such as email or text).

    I'm fluent with OOP languages such as C# and Java, however I feel there is probably a lighter-weight method to solve this. What do you guys think?

    Cheers!

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

    Any idea how live audio implementation could be made from mobile to backend?

    Posted: 24 Sep 2018 11:16 PM PDT

    Right now I have a mobile app which relies on cordova and Ionic (Angular) implementations. I can capture raw PCM audio. Backend is on Java, but we could also run a parallel software on Debian to receive said audio from mobile.

    Simple way of sending raw audio through web sockets (Socket.io) to Java server didn't work for us, since audio quality is very bad if we want lower latency. Latency can be as high as 1s, but quality wise it should be understandable.

    Do you know any open source implementations that could help us? Since we are very low on time. Thank you!

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

    No comments:

    Post a Comment