• Breaking News

    Wednesday, April 29, 2020

    Programming at young age. Ask Programming

    Programming at young age. Ask Programming


    Programming at young age.

    Posted: 29 Apr 2020 01:57 PM PDT

    Hello,

    I am now 17 years old and I now have 4 years experience with Java. I also can also Programm C, C++, C#, (HTML) and Javascript pretty good. My question is, can I do some small jobs online do get some money?

    I will go to college in a few years and I rly want some money saved up, so I need to care less then.

    Thank you in advance.

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

    Free/Cheap COVID-19 API by Location?

    Posted: 29 Apr 2020 08:10 PM PDT

    Are there any sites offering free/cheap access to localized COVID-19 data? Otherwise, any useful sites to scrape?

    Just intended for a personal project. Thank you!

    submitted by /u/1337InfoSec
    [link] [comments]

    How do I make a website in Java?

    Posted: 29 Apr 2020 10:04 PM PDT

    I am looking to learn Java. How do I make a website in Java and do I need any other experience beside knowing Java? Thanks in advance.

    submitted by /u/8blackears
    [link] [comments]

    How and where to host my app db cheap?

    Posted: 29 Apr 2020 09:48 PM PDT

    Hi, Non-tech guy here. Planning to create an ebook app by hiring a freelancer. The book database will be around 100gb. How and where should I host it? Is firebase a right choice? How much would it cost considering the database size and number of access requests. Is aws cheaper?

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

    Why aren't visual programming languages more popular?

    Posted: 29 Apr 2020 09:39 PM PDT

    Before the 1980s, most operating systems were completely text-based. Modern operating systems like Windows have a graphical user interface (GUI) with buttons, text fields, check boxes, mouse cursors, and drag-and-drop icons. Wikipedia says that "GUIs were introduced in reaction to the perceived steep learning curve of command-line interfaces (CLIs),[3][4][5] which require commands to be typed on a computer keyboard." Eventually the GUI became the dominant computing paradigm for everyone, not just beginners.

    Meanwhile, programming languages were also becoming more simplified and abstracted. Hand-coding 0s and 1s was replaced with assembly language in the 50s and 60s. Early high-level programming languages that used English language keywords to perform operations in a similar way to text-based operating systems also started to become popular at around this time.

    And yet, even after we ditched the command line and embraced the start button, the same shift did not occur in programming. All of the popular programming languages today are still text-based, with most dating back to the 70s, 80s, and early 90s. The programming language equivalent of something like Windows would be languages like Scratch) and Alice) - i.e. educational languages intended for children and beginners that are only meant to be a stepping stone towards "proper" languages like Python and Java.

    What do you think is the reason for this? Given that the drag-and-drop philosophy has been such a huge success for operating systems and computing in general, why hasn't it been more widely adopted by the programming community?

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

    Printing a reflected hollow right triangle pattern (*) in Kotlin

    Posted: 29 Apr 2020 09:14 PM PDT

    LibreOffice Calc Macro to Graph Data

    Posted: 29 Apr 2020 07:54 PM PDT

    I am working on a project to create a datalogger for my drag car. The goal will be to take a pass down the drag strip, have my datalogger recording various datapoints, and save the data as a CSV on an SD card. Then I will use Calc to analyze the data and create graphs. I know creating a graph isn't super difficult but there could be 5 or 6 or 10 graphs to create for each file as I increase the number of sensors I'm using.

    Is there a way I can program a macro that will allow me to click a button and that will load in the csv and create all the graphs I want?

    If someone has a similar macro I can use and adapt that would be great, but if I need to work on creating it myself I will. I have a little VBA experience and less Python experience, but have some experience in other languages.

    Thanks in advance!

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

    How do I put my C++ code into my website?

    Posted: 29 Apr 2020 03:30 AM PDT

    Edit: Thanks for all the replies. I realized I'm not yet proficient enough to do this. So I'll be learning JavaScript first, before doing anything else.

    Hey So I want to know how I can embed a program I wrote in c++ into my website.

    Like suppose I made a C++ program which takes in user inputs like name, salary for each month and total expenditure. And then it'll give me the total savings for each month. This is a fairly easy program to do in C++. But how can I transfer this to my website. So basically when I open my web page. I should have a form asking for my name. And salary for each month and expenditure for each month. And it should calculate the savings according to the code I wrote in c++ and display my savings in the website itself.

    I just know the c++ part of this and the html and css part. I know how I can make forms and take input from the user in html. But I don't know how the website will use the code and calculate the savings. How do I even get my website to use the code I've written in C++ in the first place.

    The program for the expenditure and savings was just an example, I'm planning on doing more complex programs so is the logic behind embedding c++ code into website/html same irrespective of my code?

    And is C++ the best option or should I write the same code in python to do the same?

    I don't know JavaScript. Is it necessary to do these types of websites?

    Mainly j just want to know how I can put my C++ code or code written in some other language into my website.

    Thanks a lot

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

    Make a shareable Dashboard to manage my property.

    Posted: 29 Apr 2020 07:33 PM PDT

    Hey all,

    I'm obviously pretty tech illiterate.

    I've got an apartment building and I'm looking to make a dashboard interface to help manage it.

    I'm envisioning a page that has a map of the floorplan where I'd be able to click on each unit and open a window that displays information about that unit. Name of Tenant, lease term, and such.

    I would have all permissions, and tenants would be able to view.

    Additional functionality desired would be for tenants being able to click on their unit and generate maintenance tickets.

    It doesn't have to be an app. Just an interactive web page would suffice.

    Is there a product/service you could recommend that would get me there?

    What would this type of software/service even be called so that I could look up providers?

    Thanks!

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

    is this piece of code creating a class object? if that so why using it this way

    Posted: 29 Apr 2020 01:29 PM PDT

    `ClassName *name = new ClassName()`

    this piece of code above is it creating a object in name of "name" and type of "ClassName"?

    if it is then why we can't use like this `ClassName name()`

    why we are using "new" word? it is because of we' re creating on the heap?

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

    Does GatsbyJS tree shake when building for production?

    Posted: 29 Apr 2020 02:11 PM PDT

    I've never really pushed anything out to production before, so this kinda thing is out of my realm of knowledge, but for TypeScript Gatsby, I've been doing something like:

    import * as React from "react"; 

    In other words, I've been doing a lot of asterisk imports, which, as you may guess, would make my project's file size stupidly large. Kind of concerned as to whether or not I'm building up technical debt by doing this, as I may just fuck myself over in the long run.

    Thus, I'm wondering if Gatsby tree shakes any unused methods / packages from my imported modules so that, when I do push out to production, it won't be a gargantuan Frankenstein of unused tech.

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

    Can someone explain to me why localStorage is dangerous, even for JWTs?

    Posted: 29 Apr 2020 05:27 PM PDT

    I've been reading about localStorage and cookies and the like - you know, which is the "better" place to store your JWT and all that. But one thing that nobody ever talks about is how it can be dangerous. For instance, let's say that I have a JWT whose payload only contains the following data:

    • The expiration date
    • The user's id

    How can an attacker use this to make a request on my user's behalf? Hell, how can an attacker use this data to even auth into my user's account (i.e. hack it)?

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

    Trying to setup an equipment tracking system.

    Posted: 29 Apr 2020 01:37 PM PDT

    This is an engineering company, we are thinking of setting up a database to lend our equipment. is it possible to do the below:

    Each piece of equipment we own has a QR code and we scan with cell phones when we take on jobs. Then we know where things are.

    It populates a raw database that has 2 settings

    1. Raw - shows entire history of every piece of equipment and can be filtered

    2. Present location (last scan)

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

    Feel like a fool for taking a SQL analyst role. Will this mess up my career?

    Posted: 29 Apr 2020 04:58 PM PDT

    Program to alert the kids when they are shouting on Discord etc.

    Posted: 29 Apr 2020 12:34 PM PDT

    Background: I have 2 teenage kids, who like most other teenagers, enjoy playing computer games with friends.

    Many days it feels like a regular shouting contest and even behind closed doors to their rooms, the wife and I are getting nuts in the living room.

    So, after countless times of asking them to keep it down, we came up with an idea for a program that will monitor their microphone input level and if they talk too loudly for x time, they will get a popup on the screen for y seconds that will overlap any game they are playing.

    We're thinking that in time that will make them learn to keep it down! We don't mind the occasional outbreak, we are both gamers and we know games can have that effect.

    I need your inspiration on how to do this. Or if such a program already exists?

    I'm a decent programmer myself, being an EE. I have lots of embedded C experience, a bit C++ and lots of Python and Matlab coding experience.

    The requirements to the program are:

    • Monitor active microphone inputs
    • Fill up a bar when microphone input is over a given threshold
    • When bar is nearly full, show it on screen as a warning
    • If the bar is full, create a pop-up in the center of the screen that overlaps all other games/screens for x seconds.
    • Bar is emptied slowly over time and fully emptied when the popup appears
    • Should run in the background and start up when windows starts up

    I'm thinking about programming it in python myself, if possible, but I could use some input on how to

    • Make a popup window overlap everything - is there a framework in python which could handle this?
    • Make it auto-run in the background when windows start
    • Monitor all active microphone input - can this be done if another application is using the microphone?

    Hope you guys can help!

    EDIT: Think in the lines of tools that shows whenever a classroom of students are being too loud, but implemented in a piece of software that uses the microphone as input.

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

    Please help me for CodeHS

    Posted: 29 Apr 2020 03:47 PM PDT

    5.10.4: Snake Eyes

    📷

    Assignment:

    "Write a program that rolls two dice until the user gets snake eyes. You should use a loop and a half to do this. Each round you should roll two dice (Hint: use the Randomizer!), and print out their values. If the values on both dice are 1, then it is called snake eyes, and you should break out of the loop. You should also use a variable to keep track of how many rolls it takes to get snake eyes.

    Sample Run:

    Rolled: 6 5 Rolled: 5 2 Rolled: 3 6 Rolled: 6 2 Rolled: 1 2 Rolled: 5 3 Rolled: 1 4 Rolled: 1 1 It took you 8 rolls to get snake eyes." 

    My code:

    var SENTINEL = 1;

    function start(){

    var diceOne; var diceTwo; while(true) { 

    println("" + diceOne + "," + diceTwo);

    diceOne = Randomizer.nextInt(1,6); diceTwo = Randomizer.nextInt(1,6); if (diceOne && diceTwo == SENTINEL){ 

    println("" + diceOne + "," + diceTwo);

    break;

    }

    } 

    }

    What am I doing wrong here?

    submitted by /u/0d3stroyer
    [link] [comments]

    Getting Null error in my SQL stored procedure

    Posted: 29 Apr 2020 03:45 PM PDT

    Here is my stored procedure. I am trying to add a sponsorship to a golfer.

    GO CREATE PROCEDURE uspAddSponsorGolfer @intGolferEventYearSponsorID AS INTEGER OUTPUT ,@intGolferID AS INTEGER ,@intEventYearID AS INTEGER ,@intSponsorID AS INTEGER ,@dblPledgeAmount AS FLOAT ,@intSponsorTypeID AS INTEGER ,@intPaymentTypeID AS INTEGER ,@blnPaid AS BIT AS SET XACT_ABORT ON BEGIN TRANSACTION INSERT INTO TGolferEventYearSponsors WITH (TABLOCKX) (intGolferID, intEventYearID, intSponsorID, monPledgeAmount, intSponsorTypeID, intPaymentTypeID, blnPaid) VALUES (@intGolferID ,@intEventYearID, @intSponsorID, @dblPledgeAmount ,@intSponsorTypeID, @intPaymentTypeID, @blnPaid) SELECT @intGolferEventYearSponsorID = MAX(intGolferEventYearSponsorID) FROM TGolferEventYearSponsors COMMIT TRANSACTION GO 

    When I try and execute the procedure, I am getting a null error for column 'intGolferEventYearSponsorID', for my table 'TGolferEventYearSponsors'. Even though I am manually inserting an ID for 'intGolferEventYearSponsorID' using the sproc, I cant figure out why i keep getting a null error.

    Here is my table from the database

    INSERT INTO TGolferEventYearSponsors ( intGolferEventYearSponsorID, intGolferID, intEventYearID, intSponsorID, monPledgeAmount, intSponsorTypeID, intPaymentTypeID, blnPaid ) VALUES ( 1, 1, 1, 1, 25.00, 1, 1, 1 ) ,( 2, 1, 1, 2, 25.00, 1, 1, 1 ) 
    submitted by /u/ButtholeSoup
    [link] [comments]

    Should I learn React Native or Dart/Flutter to build app MVP as a complete beginner

    Posted: 29 Apr 2020 03:28 PM PDT

    Hi All

    Hope you are well.

    I started learning Java on Udacity's Google series, but I wasn't particularly motivated and didn't get past the UI XML stuff.

    I am in a position now where I want to commit to building an MVP for my app idea and would appreciate some advice regarding the 'best' language to do so for me as a beginner.

    I had come to the conclusion that I would be best off using a cross platform language/framework - either React Native or Dart/Flutter.

    Are there any particular pros and cons of each in building an MVP? My priorities are be able to pick it up and build with it pretty quickly and something relatively decent.

    My thought was to use MbaaS such as Firebase as opposed to doing custom backend programming myself.

    Would appreciate any advice you can offer

    submitted by /u/2020Corp
    [link] [comments]

    Professor is "reluctant to respond" to my emails

    Posted: 29 Apr 2020 06:42 PM PDT

    Hey everybody! As the title states, my prof wont reply to my emails and I really need help with programming . I need help with 3 labs and another project for the class, my professor is refusing to respond and I have no idea what to do, I have less than a week to complete all this and I'm stressing so much I've barely been sleeping. I am desperate for help

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

    What are the best programming languages I should learn after finishing self-taught java. I am thinking c# because I wanted to master unity, or js just because it's cool. But it's always better to just listen to others opinions first.

    Posted: 29 Apr 2020 03:36 AM PDT

    What are some do and don'ts of writing documentation? Where can I learn about it?

    Posted: 29 Apr 2020 11:06 AM PDT

    Hi there. A little bit of context: I'm a junior backend developer that works with .NET Core building Web APIs as day to day job. The company I work for used to have the documentation in a Word doc, then moved onto Pandoc and Markdown. However, I feel that there must be a better way.

    We have what I believe to be a mix between a specification and documentation. If I understand correctly, a specification is more like a guideline/requirement for internal use, and documentation should be what the end-user refers to (this may be wrong, though).

    What I'm trying to learn, is how to write proper documentation. Let's say I build a whole new API with a bunch of endpoints, some sort of authentication requirement, and whatnot. How do I document all this? I feel like I should provide a document with each endpoint there is, with the action method/parameters/returns/etc they have, maybe some section to deal with the authentication? What would be a good format for this? What technology should I use?

    I am aware that there is probably no right answer for this, and each one of you will have a preference. However, what I'm looking for are some guidelines or examples to see how good documentation should look like.

    I don't really like to write documentation, but I believe it is part of my duties, and a skill I should have in my skill book.

    Thanks a bunch for any advice or hints you may have!

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

    Help to reverse this MergeSort Code in C#

    Posted: 29 Apr 2020 02:50 PM PDT

    Hey! Currently, this code sorts from low to high. I need it to sort from high to low. Thanks for any help in advance!

     private void button1_Click(object sender, EventArgs e) { label1.Text = ""; int[] x1 = { 3, 9, 6, 4, 1 }; int[] x3 = MergeSort(x1); for (int i = 0; i < x3.Length; i++) { label1.Text = label1.Text + Convert.ToString(x3[i]) + " "; } } public int[] MergeSort(int[] myarray) { if (myarray.Length <= 1) { return myarray; } else { int midIndex = myarray.Length / 2; int[] lower = new int[midIndex]; int[] upper = new int[myarray.Length - midIndex]; Array.Copy(myarray, lower, midIndex); Array.Copy(myarray, midIndex, upper, 0, upper.Length); for (int i = 0; i < lower.Length; i++) { label1.Text = label1.Text + Convert.ToString(lower[i]) + " "; } string t2 = " lower " + label1.Text; label1.Text = ""; for (int i = 0; i < upper.Length; i++) { label1.Text = label1.Text + Convert.ToString(upper[i]) + " "; } string t1 = " upper" + label1.Text; listBox1.Items.Add(t1); listBox1.Items.Add(t2); lower = MergeSort(lower); upper = MergeSort(upper); label1.Text = ""; //This is the only line added after class to get rid of the preceding 1 in the sort. return mergemyarrays(lower, upper); } } public static int[] mergemyarrays(int[] x, int[] y) { int lenx = x.Length; int leny = y.Length; int[] newarray = new int[lenx + leny]; int lenM = 0; int lenS = 0; int j = 0; string maxL = ""; if (lenx > leny) { lenM = lenx; lenS = leny; maxL = "x"; } else { lenM = leny; lenS = lenx; maxL = "y"; } int k = 0; int l = 0; if (maxL == "y") { for (j=0; j<lenM; j++) { if ((k < lenS) && (x[k] < y[j])) { do { newarray[l] = x[k]; k++; l++; } while ((k < lenS) && (x[k] < y[j])); newarray[l] = y[j]; l++; } else { newarray[l] = y[j]; l++; if (j == (lenM - 1)) { while (k < lenS) { newarray[l] = x[k]; l++; k++; } } } } } else { for (j=0; j<lenM; j++) { if ((k<lenS) && (y[k] < x[j])) { do { newarray[l] = y[k]; k++; l++; } while ((k < lenS) && (y[k] < x[j])); newarray[l] = x[j]; l++; } else { newarray[l] = x[j]; l++; } } } return newarray; } } 

    }

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

    Need help understanding Python libraries in this exercise

    Posted: 29 Apr 2020 02:24 PM PDT

    I am doing an assignment and there is one thing I dont get.

    number = int(input("Enter a number: ")) multiples_list = {} for n in range(1, 1000): if number * n <= 1000: multiples_list[n] = number * n else: break 

    I get that Python assigns in the line after the if function the different values to the library.
    But where in the code does it assign the corresponding keys, because in the the solution the keys are shown?

    Thanks in advance

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

    I keep getting Syntax error in my SQL stored procedure

    Posted: 29 Apr 2020 01:59 PM PDT

    Go CREATE PROCEDURE uspAddSponsorGolfer @intGolferEventYearSponsorID AS INTEGER OUTPUT ,@intGolferID AS INTEGER ,@intSponsorID AS INTEGER ,@blnPaid AS BIT ,@monPledgeAmount AS DOUBLE AS SET XACT_ABORT ON BEGIN TRANSACTION SET @blnPaid = 0; INSERT INTO TGolferEventYearSponsors WITH (TABLOCKX) (intGolferID, intSponsorID ) VALUES (@intGolferID, @intSponsorID) SELECT @intGolferEventYearSponsorID = MAX(intGolferEventYearSponsorID) FROM TGolferEventYearSponsors COMMIT TRANSACTION GO 

    This is my stored procedure, for adding a new sponsorship to a golfer. I keep getting en error on the 'AS' statement below the variable "@dblPledgeAmount". It says:

    " Incorrect Syntax near the keyword 'AS'."

    Now when I change "@dblPledgeAmount" to an integer, it fixes itself. I have no idea why

    When I highlight the error with my cursor in SQL, it also says:

    "Expecting ID"

    Here is the table that dblPledgeAmount is in

    INSERT INTO TGolferEventYearSponsors ( intGolferEventYearSponsorID, intGolferID, intEventYearID, intSponsorID, monPledgeAmount, intSponsorTypeID, intPaymentTypeID, blnPaid ) VALUES ( 1, 1, 1, 1, 25.00, 1, 1, 1 ) ,( 2, 1, 1, 2, 25.00, 1, 1, 1 ) 
    submitted by /u/ButtholeSoup
    [link] [comments]

    Question about moving a string into another string x86 assembly

    Posted: 29 Apr 2020 01:19 PM PDT

    I'm using intel x86 (nasm). I'm trying to move a string into a blank string but I can't figure out how to do it. This is what I have:

    section .text global string_mov string_mov: dec rdx ;rdx contains the length of the original string dec rdx xor r8, r8 jmp move_string move_string: ;moves the content of the old string into the new string cmp rdx,0 ;checks if we've made it to the end of the string je done add rdi, 1 ;rdi has the original string add rsi, 1 ;rsi has the blank string xor al, al mov al, [rdi] mov [rsi], al dec rdx jmp move_string done: ret 

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

    No comments:

    Post a Comment