• Breaking News

    Friday, November 23, 2018

    Any assembly IDEs out there? Ask Programming

    Any assembly IDEs out there? Ask Programming


    Any assembly IDEs out there?

    Posted: 23 Nov 2018 12:40 PM PST

    Looking for one that has syntax highlighting and tab completion, possibly even a stack simulator.

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

    C programming: How to read spaces with scanf

    Posted: 23 Nov 2018 05:28 PM PST

    I am trying to read a string with 2 words such as "hello world" with the line scanf("%[ ^ \n]s", secMsg); but this is not working

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

    Do micro-services have a real application compared to monoliths? Are they worth the effort of using?

    Posted: 23 Nov 2018 05:25 PM PST

    Get number of intersecions of multiple ranges

    Posted: 23 Nov 2018 04:54 PM PST

    Hello. I am trying to figure out a good approach to an algorithm which counts the number of intersections a range is involved in.

    My first iteration was pretty straight forward where I did something like this:

    var testSubject = lines[0]; var intersections = 0; foreach(var line in lines) { if ((line.end - testSubject.start) * (testSubject.end - line.start) >= 0) { intersections += 1; } } 

    This works most of the time, but there is a situation which this approach doesn't cover.

    If I have three (or more) ranges like this, where the first line only intersects with the 2nd one (according to the first approach), but since the 2nd line intersects with the 3rd I also want this to count as an intersection.

    And that's the problem I'm having. I don't really know how what the best approach to this would be.

    Do you people have any good ideas I can try out?

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

    In A Pickle

    Posted: 23 Nov 2018 08:31 PM PST

    I want to start a website for selling some art I made out of resin and I thought it would be a fun project. How would I go about starting? I know html but that's about it. How does javascript, C++, PHP, Python and other programming languages come into play? Would I also run into copyright issues if I copy code or have the same code as someone else accidentally?

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

    C: need help with algorithm

    Posted: 23 Nov 2018 09:42 AM PST

    I am in desperate need of help... I just started taking programming classes in college and last week we got a task from out teacher to do following program.

    Basically I have to do this program, which gets certain set of numbers representing distances for billboard placement and then the user inputs number of billboards. When all this data is checked the program will imaginarily place all the billboards at given places so one would be as far from the next one and then return the shortest distance between any two billboards.

    So for example: Let's say these are possible locations for billboards

    { 250 , 300 , 550 , 750 }

    And number of billboards is: 3

    The program should return 200 as shortest distance between two billboards, because it should place them at positions 250, 550 and 750, because this solution has the biggest shortest distance between two billboards (that being 550 and 750 which has difference of 200)

    Now I don't want anyone doing this for me, I want to do it by myself, but I have no problem with programming it's just that I got stuck with the algorithm which should calculate this. I've tried several solutions and I wasn't able to figure it out for the past week and it's been really bugging me... So if anyone would know how to do this, I would really appreciate help with just pointing me in the right direction on how to solve it.

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

    How long would it take me to pick up Kubernetes for deploying a simple application?

    Posted: 23 Nov 2018 07:15 AM PST

    I'm building an Elixir + Phoenix application currently - when it's ready I want to host it somewhere and this looks like a good excuse to get some hands on experience with Kubernetes because I hear about it so much.

    How hard would it be to follow a tutorial + deploy my stack assuming it is literally just a CRUD app with a Postgres DB?

    I've used docker a little with docker-compose files to spin up easy dev environments.

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

    Need some help with API/database interaction

    Posted: 23 Nov 2018 04:06 PM PST

    Hi all!

    I've been stuck on this issue for a while now, so I've come to ask for help. I am currently working on a project where someone can find emergency numbers for whatever country they may be in. There is a search box where the user can look for the name of the country they're in (auto-complete search box via google maps/places API). I have a database created that lists all the countries and has the emergency number for police/ambulance/etc. My issue is I'm not sure where to begin with trying to match the data from the API with the database. So for example, if the user enters "Canada" and clicks it from the drop-down list from the google API, I want the website to match Canada to my database/sql file and then present the police/ambulance information. From researching, I know php code won't work inside my js file. I've been looking at AJAX, but I'm having trouble trying to connect everything. Can anyone help or maybe give me a push in the right direction as to how to get this going? Thank you!!

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

    A simple VBScript (for someone who knows what they're doing)

    Posted: 23 Nov 2018 03:43 PM PST

    I have a remote mouse app for my phone. The server that is running on the computer has an "add a custom button" option. You can execute pretty much anything with this option including a VBScript.

    I'm trying to simulate keyboard buttons Num 8 and Num 2 with this option. When I execute the script I want the computer to think Num 8 or Num 2 (respectively) was pressed on the keyboard. I have been trying to make this work for a few hours now and I'm starting to lose my mind because nothing is working, so I'm starting to doubt this is even possible.

    I have to add I have practically 0 experience with programing. If I didn't explain well enough let me know and I'll try to be more coherent.

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

    How to use variables in Python w/ SQL to write to Access Database?

    Posted: 23 Nov 2018 02:43 PM PST

    What do you think the most useful answer to fizzbuzz is?

    Posted: 23 Nov 2018 01:56 PM PST

    I came across the video Tom Scott did on fizzbuzz and before I watched it I decided to try and see what the best answer I could come up with would be. Obviously taken at face value fizzbuzz is an incredibly simple concept. A few if and else if statements and you have a fully functional example of fizzbuzz. But that's not really good for anybody, generally you don't want a piece of code that can only do one very specific thing. So this is what I came up with, and I wanted to know what everyone thinks the best answer is.

    I don't know why I did it in python since I'm definitely not a python programmer, but it works so I'm happy.

    #populate arrays with numbers to test and the result they should give outsN = [3.0, 5.0] outsW = ["fizz","buzz"] #Kill script if lengths of arrays don't match if len(outsN) != len(outsW): print("Arrays are mismatched") exit() #i2 is the highest number that should be tested i2=100 for i in range(i2): i+=1 output = "" for ii in range(len(outsN)): if i%outsN[ii] == 0: output = output+outsW[ii] if output == "": print(i) else: print(output) 
    submitted by /u/I-Downloaded-a-Car
    [link] [comments]

    Available technologies (.NET, Azure) compared to my current tech stack (Java), what do you use?

    Posted: 23 Nov 2018 03:27 AM PST

    I will change my employer and job in the next few weeks and start working with a pretty strong Microsoft tech stack on Azure (.NET with C# and native C++). Now I would like to know which technologies are available or state of the art compared to my current tech stack. I'm very interested in your opinion and curious about new technologies, tools or frameworks. For now, I work most of the time with Java 8 and Kotlin (in private projects). In detail I work with the following technologies:

    • Build tool: Gradle
    • Build pipeline: Jenkins, Kubernetes, Docker
    • Code formatter: Spotless
    • Static code analyses: SonarQube
    • Test framework: Junit 5, Testcontainers
    • Repository manager: Artifactory

    I started to write a small test library in .NET with Xunit and I will setup up an example build pipeline in Azure (stages: code format, build, test, sonar, deploy artifact).

    Which technologies, tools or frameworks do you suggest? I'm ok with Docker and SonarQube, but what should I use for the other tools and frameworks? Especially Gradle, I really love Gradle and will probably stick to it 😊.

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

    Writing a Java Bot for diep.io

    Posted: 23 Nov 2018 06:44 AM PST

    Hi everyone,

    just for the purpose of fun i'd like to write a little java bot for a game called diep.io. Its sandbox mode seems to be perfect to try some code.

    My problem however is that i don't know where to start, since all i get from the page after the login is bascially an html canvas. So is there an easy way to access an html canvas and get objects on it with java or do i have process it visually? And do you have any other advice on how to tackle this little project?

    Thanks in advance

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

    C++ help implementing time class

    Posted: 23 Nov 2018 11:41 AM PST

    //.h

    class Time {
    public:
    Time();
    Time(int day, int month, int year);
    private:
    time_t t;
    struct tm* timeptr;

    //.cpp

    Time::Time() {
    t = time(NULL);
    timeptr = localtime(&t);
    }
    Time::Time(int day, int month, int year){

    timeptr->tm_mday = day;
    timeptr->tm_mon = month;
    timeptr->tm_year = year;
    t = mktime(timeptr);
    }

    I think I'm doing something wrong in the second constructor, does anyone know what's the problem? Thanks

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

    (software help) Automated mouse like MouseRecorderPro2

    Posted: 23 Nov 2018 09:19 AM PST

    Hi there... I've been using MouseRecorderPro 2 for a few years already, and it really boosts my work everyday, but it lacks something: multiple scripts at same time. I can only use one each time, and I would like to have more with different shortkeys. I already searched all over the internet for a better software and couldn't find.

    If i were able to open 2 scripts at the same time, and set a different hotkey for each, i believe it would work...

    Anyone, help? This would boost even more my daily work. Thanks a lot.

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

    [Question] Exporting data from an Excel Sheet into a Payroll Template

    Posted: 23 Nov 2018 01:35 AM PST

    As Interning in a company that doesn't have a very large IT department. A classmate and I was wondering about the possibility of automating repetitive tasks

    The task as of right now would be to automate the creation of each staff's Salary Slip - This would be taking the right pieces of information from an Excel Sheet and placing it on the Salary Slip Template. Saving each slip till it has made one for each Staff - Ready for Printing

    (The current payroll system is able to do the necessary calculations in order to provide accurate information needed to be put into each Salary Slip, The system is able to output it's information into a Excel Sheet. - The company currently prepares Salary Slips by hand (written))

    Was wondering what approach we should take towards completing this task, What language to use and what not,

    Currently the idea is to research into using Python to automate the action of copying and pasting information into a template with set text boxes, The system would go through each ID on the Excel sheet, creating a Payslip for each staff, continue running till out of ID's (end of data in Sheet). Then the HR staff would be able to go through the motion of selecting all the created files and Printing.

    Thank You for any and all Input.

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

    Visualizing numbers

    Posted: 23 Nov 2018 07:22 AM PST

    Hello, I am working on a school project about pseudorandom numbers. I figured that the best way to test the numbers is by plotting it in some way but I don't have enough knowledge of programming to know how to do so. I would prefer making the code in C++ if possible.

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

    Which is the best book to learn Smalltalk programming for a person new to programming?

    Posted: 23 Nov 2018 01:16 AM PST

    Line Ending Character for Web Development

    Posted: 23 Nov 2018 06:17 AM PST

    I recently changed to Linux for web development. However, I encountered a question--since Linux uses LF as the line ending character, and Windows uses CRLF, then which should I use to create HTML?

    My problem:

    • My client might view the code, and if they use Windows, hopefully the software they use to look at my code supports LF line endings.
    • Once the website is uploaded to the (obviously Linux) server, will there be problems when a Windows machine accesses the website and gets the HTML in LF line endings? I know that in HTML, LF/CRLF doesn't matter, only <br>, but will there be other problems?

    TLDR; I use Linux for full stack web development. Should I use LF line endings when sending the HTML+CSS+whatever to my client, or should I convert them to CRLF first before sending? Should I upload files to the server in LF, or CRLF?

    Thanks in advance!

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

    Swapping on the Little Man Computer?

    Posted: 23 Nov 2018 02:05 AM PST

    Hi all,

    I'm a bit stuck. It's possible to swap the value of two variables WITHOUT creating a third variable with high level languages, but is this doable with the little man computer?

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

    If your time went back and decided to start studying programming?

    Posted: 23 Nov 2018 01:35 AM PST

    If your time went back and decided to start studying programming?

    1- Will you study one or two programming languages or study more than three programming language?

    2- If you decide to study one or two programming languages, what and why?

    3- If you decide to study more than three programming languages what are they and why?

    4- Will you study Python or focus only on the languages you need?

    5- What do you want to advise beginners

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

    No comments:

    Post a Comment