• Breaking News

    Thursday, October 31, 2019

    Reprogramming a receipt printer, to adopt Morse Code Ask Programming

    Reprogramming a receipt printer, to adopt Morse Code Ask Programming


    Reprogramming a receipt printer, to adopt Morse Code

    Posted: 31 Oct 2019 02:15 PM PDT

    Hello all,

    I have a pretty unique project going on and I'd love some assistance. I want to set up a telegraph line (yes, you read that correctly) from my house to my cabin. Mostly this is just for fun, but I do want it to be functional, and since I'm the only person I know that can listen to Morse and understand it, I figured text would be best. With that in mind I started thinking about receipt printers, like you find in any store, and how you could use that to convert dashes and dits into letters.

    I have exactly 30 minutes in Java, and 0 minutes in everything else. Speak in layman's terms :)

    submitted by /u/thomas-emard
    [link] [comments]

    I have to analyze an algorithm for school. What are your favorites that are off the beaten path?

    Posted: 31 Oct 2019 03:42 PM PDT

    I need something that isn't super common. More advanced than merge sort but I'm not cracking Google analytics here. I'm shooting for a ten minute presentation where I can dig into some details about good and bad use cases. Other than that, there are really no restrictions or guidelines.

    Are there any algorithms that you've come across that stick out to you as particularly interesting? Thanks!

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

    [Java] How do I inject some instantiated object in a class through annotation?

    Posted: 31 Oct 2019 12:07 PM PDT

    I am trying to understand how lombok's @Slf4j annotation manages to inject a static instance of the org.slf4j.Logger class in the annotated classes. The similar effect without the annotation would be,

    class ClassName { private static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(ClassName.class); } 

    I am trying to do something similar. Imagine I create some custom annotation @MyAnnotation, and upon using that it would inject a static instance of SomeCustomClass. However I am not sure where to start. I looked through the source codes of lombok slf4j and apache slf4j, but I feel i am lacking some basic concepts (most probably AOP stuff, I am not familiar with it yet), because of which I can't piece things together.

    So, I would like to know how I should proceed. What concepts would help me achieving this and if someone can link to some example/tutorial, that would be great.

    I would ask StackOverflow, but I'm sure some wise overlord would close it and mark as duplicate linking it to some unrelated question. So, I am relying on still humane reddit community.

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

    Help with a simple Prolog program?

    Posted: 31 Oct 2019 04:52 PM PDT

    I'm trying to create a Prolog program to solve a prompt I have been given:

    Hunter doesn't sleep in the 5th bedroom and Laura doesn't sleep in the first bedroom. Arnie doesn't sleep in the first or last bedroom, and he is not in an bedroom adjacent to Addiley or Laura. Ramey sleeps in some bedroom higher than Laura's. Who sleeps in which bedrooms?

    I was given some example code which from what I can tell I'm using the syntax correctly but yet my code doesn't return correctly.

    My code:

    rooms([bedroom(, 1), bedroom(, 2), bedroom(, 3), bedroom(, 4), bedroom(_, 5)]). %there are underscores

    adjacency(X, Y) :- X =:= Y+1.

    hallway(X) :- rooms(X),

    member(bedroom(Hunter, A), X), A\=5,

    member(bedroom(Laura, B), X), B\=1,

    member(bedroom(Addiley, C), X),

    member(bedroom(Ramey, D), X), D>B,

    member(bedroom(Arnie, E), X), E\=1, E\=5, +(adjacency(E,B)), +(adjacency(B,E)), +(adjacency(E,C)), +(adjacency(C,E)).

    My Result: X = [bedroom(_,1),bedroom(_,2),bedroom(_,3),bedroom(_,4),bedroom(_,5)]

    Desired Result: X = [bedroom(Addiley,1),bedroom(Laura,2),bedroom(Hunter,3),bedroom(Arnie,4),bedroom(Ramey,5)]

    Can anyone with Prolog experience explain where my error is? I feel like there is just some stupid syntax error somewhere but Im not sure.

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

    Python 3D Transformations

    Posted: 31 Oct 2019 06:53 PM PDT

    For my computer science class I have to solicit an angle from the user and rotate the point (3, 1, 2) the amount of degrees solicited. The angle could be positive or negative and I have to compute the (x,y,z) after the rotation. I know I have to use arrays and dot products but Im having a hard time wrapping my head around it and coming up with the code. Any comments on how to get started or good references/ videos to watch would be greatly appreciated.

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

    open source deep dive videos

    Posted: 31 Oct 2019 09:54 PM PDT

    Does anyone know any videos (free or paid) that show someone digging into some open source code project (like react, dot net, anything) and just kind of explains details of that framework design?

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

    Purpose of Maybe (Haskell)/Option (Rust) and Just/Some instead of None/Null

    Posted: 31 Oct 2019 11:41 AM PDT

    I've been learning a bit of Haskell and Rust lately and I don't really understand the purpose of these... things. I can't even figure out WHAT to call them (monads?).

    It seems they just take the ability of checking a return type for None-ness and wrap it in a container.

    But you still have to check if the container contains a value. In Rust you call 'is_none' and then have to "unwrap" the Some container to access the value inside.

    So what is the purpose of these containers if you still are required to check for a value or a non-value to define the behavior and then take extra steps to retrieve the value from the container?

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

    Hello! I want to pull new pages and updating amounts to a Google Sheet. Is this possible? Please read inside

    Posted: 31 Oct 2019 03:17 PM PDT

    Hi people! I have a somewhat interesting problem and one that requires y'all's expertise. Basically, I'm a fundraising leader on a non-profit, and I'm obligated to keep a workbook on a google sheet. In this workbook, I have to have a running list of people on my team who have set up their pages and their totals raised from a external website. The problem is I have to do this manually, and I don't want to, because I can be error prone and want to do this automatically, perhaps writing a program to this.

    Is this possible? If so, how could I do that? Thank y'all so much!

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

    How to deal with Aggressive Teammates?

    Posted: 31 Oct 2019 12:23 PM PDT

    So I recently switched to a new company (3 months ago) and finally feel back to confident in the Tech stack they are using and they're overall processes. I was brought onto the team as a senior dev to help support driving others in best practices and help lead the team as they old team lead is who I was replacing once he left. Two Mid level engineers are also on the team and IMHO feel annoyed they brought in someone new versus promoting one of them. One of the two is VERY opinionated and does not take criticism and advice very well at all. I recently got a task to refactor some of his code as it had some issues. I tried my best to give him a heads up as to the task, ask for his input on possible solutions and even run the overall solution I came up with only to have him throw a temper tantrum and demand that he should be the one to fix it. How do you guys deal with aggressive teammates?

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

    radix tree

    Posted: 31 Oct 2019 04:46 PM PDT

    I try long time to learn radix tree I search on internet examples but there is not so much good articles. I want to find some good explain how to do this because want make router based on radix tree

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

    Responsiveness Standards?

    Posted: 31 Oct 2019 04:37 PM PDT

    When I make a website I normally make a CSS trigger for the following screenport sizes:
    <576px Extra small
    ≥576px Small
    ≥768px Medium
    ≥992px Large
    ≥1200px Extra large

    Are there better industry standards out there? I am very concerned that my approach doesn't work well with mobiles, I imagine you have a lot of variation around the same low size... Not sure what to do here

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

    Best C++ library for an onscreen program?

    Posted: 31 Oct 2019 05:08 AM PDT

    Im currently in college, in my junior year, and i want to work a project for my portfolio. The project being an open source windows 10 dock. Im trying to make it specifically an "install it and it works" program, so that i can avoid the fact that the other docks require massive amounts of customization to make then look and work well, i just want to write something that you install once, it replaces the regular taskbar, and it just works.

    But as im a junior, my experience with actual onscreen programs is basically NULL. We've studied ncurses but for obvious reasons that isnt going to work. Any decent API or library for this?

    EDIT: incase anyone comes looking for the same thing, it seems like the general consensus is to use qt instead of mfc as qt is newer and crossplatform

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

    (C++) Change function behavior depending on template type?

    Posted: 31 Oct 2019 11:32 AM PDT

    I have to perform calculations based on an array of values; however, I don't know if these values are ints or std::strings. If they are strings, then there's a bit of extra work that needs to be done (just summing up all the chars in the string). So I thought I could just do something like this:

    int getValue(Type t) { int val = 0; if (std::is_same<Type, std::string>::value) { val = sumChars(t); } else { val = t; } // do more math 

    However, doing so throws a compiler error, as you can't assign a string to an int, EVEN THOUGH we aren't doing that if the template type is a string. I tried doing an overload of getValue(std::string) but that freaks out if you set the template type to string

    So how do I do this properly? Creating overloads for the specific types that I want to support doesn't seem like a very good way of handing this...

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

    Manual image annotation

    Posted: 31 Oct 2019 06:33 AM PDT

    Hi,

    I have a very basic html page that lists images of a person in order of how well they were recognized/classified.
    Each row is a different person, and each column is a image of the person that has been recognized. Some may have more, some may have less.

    I would like to be able to provide this page to a user so that he could look at the classified images and say which one is correct, incorrect or if he doesn't know. ( eg. 1,0,-1) Additionally, since they will be sorted best to worst, left to right, I would like to be able to offer the user select multiple images and say all of them are correct. eg. If I had 10 images for person A, the user could click a button (radiobutton?) below the 5th image that would say all the images from position #5 to the beginning are correct.

    And last, I would need to be able to save the users inputs somehow.

    I haven't ever really done any html before, so any directions or pointers would be great. But I honestly have no idea how to proceed.
    Also, the html page is not no a server, just run locally on the users machine, so saving the inputs into a text file would also be fine.

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

    Resources about making web applications - storing, loading, and presenting table data ?

    Posted: 31 Oct 2019 06:57 AM PDT

    Hello!

    I would like to know more about web applications. I kinda get HTML and CSS, but Js, JQuery, and other stuff I don't understand. I would like to know: 1. how to collect user inputs, and what are the best ways to do it
    2. how to store the inputs into a database
    3. how to load certain data and ranges form the database
    4. how to present it best to the user, and what approaches are there to generate tables
    5. is it better to use popup windows, or replace the whole screen with other stuff via javascript

    Thank you!

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

    Where to find out which technology is suited for certain project?

    Posted: 31 Oct 2019 05:41 AM PDT

    Image you have an idea in your mind what you want to develop, how do you find out what technologies tu use?

    like "i want to build an online website store". Where do you find out what technologies exist fot this already so that you have to do very little programming yourself? of course i can use the tools i already know (spring, angular), but i want to see alternatives and what pros/cons are. also maybe there are already libraries for specific things i want on the website (for example a certain graph or something). is it "just google"? is there a website to find apis? is there a sub that recomends tools for certain uses?

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

    Does this simplistic container have a name?

    Posted: 31 Oct 2019 01:45 PM PDT

    Say you had a fixed array of pointers:

    char* data[100] = {0}; 

    So to add a char* p to the container you would scan to find the first NULL position, the put p at that location. So the container "grows" by one.

    To remove a char* p from the container, you would scan until you found p, then set that element to NULL.

    Of course, the container has a maximum capacity of 100.

    Does this thing have a traditional name in programming?

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

    How did Leetcode/HackerRank/HackerEarth created their tests?

    Posted: 31 Oct 2019 04:24 AM PDT

    Do you guys think they hired a full time employee for doing so?

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

    Should I start my studies all over?

    Posted: 31 Oct 2019 04:11 AM PDT

    About two and a half years ago, I graduated from a basic college. During my time there, I didn't study nearly as hard as I could/should have. I just scarped by. After graduating, I left the states to teach abroad. Since then, I have barely coded at all, but now I want to get back into it. However, I know I won't be successful due to my lack of effort at college the first time. Now that I am getting older and realizing what's important, I want to be serious this time around.

    So that brings me to my question. Should I go back to school and try again from the beginning, taking my time to fully understand everything they teach me? Or is this just a waste of time and money?

    Thanks in advance for your opinions!

    If this is the wrong sub to post this, sorry.

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

    HELP! XML file output for data entry

    Posted: 31 Oct 2019 12:56 AM PDT

    I need a software that I can use to fill up reports in a certain format with clear values for yes/no at points and alphanumeric free texts at others, with still some that only take numerical values like age. This software would then need to export/save the file in XML format so I can upload it at an online database. Basically, I want to work offline at home, where there is no Internet, and come to work with my load already done so I can focus on things other than data entry.

    You'll understand if you google the sub I mod. Feel free to pm me if you like.

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

    Any good shows about programming?

    Posted: 31 Oct 2019 12:18 AM PDT

    No comments:

    Post a Comment