• Breaking News

    Monday, April 13, 2020

    I need help with a calculator Ask Programming

    I need help with a calculator Ask Programming


    I need help with a calculator

    Posted: 13 Apr 2020 07:16 PM PDT

    I'm new to programming and this is one of my first projects, and I'm almost done with it I only need to get the calculator to calculate the answer.

    I'm using C# and I hope someone will help me with the program, I've made a live session, thanks

    https://pastebin.com/MN3GATJc

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

    How big of a deal is ageism? I'm 7 years late for college.I'm 25 and I should go to college now, am I too late for tech? Should I look into something else? Will any companies even want me since I started so late?

    Posted: 13 Apr 2020 02:26 AM PDT

    I always hear about ageism and how it creates huge problems if you are not young enough.

    How comapnies only want fresh minds and are always looking for youngest possible workers if they are only starting.

    So is it too late for me realsticlly to start now?

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

    [R] Implementing t-test Functions

    Posted: 13 Apr 2020 09:48 PM PDT

    Hello!

    So for an assignment, I've been tasked with creating three functions in R that correspond to t-tests "of different complexity". Here are the questions:

    1) Write a function tScore that takes in two arguments - a vector of samples and a mean under the null hypothesis - and returns a t-score, i.e the difference between the sample mean and null mean, scaled by the estimated standard deviation of the sample mean.

    2) Now, write a function called tTest1 that takes in three arguments - a vector of samples, the mean under the null hypothesis, and a character string that will either be 'greater', 'less', or 'equal' - and returns the p-value for the 1-sample t-test. The character string represents the null hypothesis, i.e. 'greater' means the null hypothesis is that the true mean is greater than or equal to the null mean.

    3) Ideally, your t-test function would provide the user with more information than just the p-value. Write a function tTest1better that is similar to tTest1 except for the following:

    * Takes in an extra argument, alpha, that is the 'size" of the test: if the p-value is below this level, we reject the null hypothesis.

    * Outputs a list (not a vector) with 3 named elements: pVal (the p-value), tScore (the t-score), and reject (a logical that tells the user whether or not the test rejects the null hypothesis at level alpha.

    So far, I have a solution for the first question that looks like this:

    tScore <- function(sample, null\_mean) { mean\_difference <- mean(sample) - null\_mean return(mean\_difference / sd(mean(sample))) } 

    I used the professor's hint in the question to come up with that, although I feel like I've seen conflicting formulas online for t-score. So, the biggest questions I have for this assignment as a whole revolve around **finding the correct t-score and p-value formulas.** For question 2, for example, how do I produce and return a p-value that changes depending on the 'greater', 'less', and 'equal' strings? I don't know how this could look in R. There should be a formula for it but all I can find online are automatic p-value calculators, maybe I'm just not looking hard enough.

    So, what are the true formulas for p-value and t-scores that I can implement in creating these functions? If anyone could point me to a great resource or walk me through this, that would be awesome. Thank you!! :)

    P.S. I understand this subreddit is more catered towards pure programming and this is more of a Statistics question, but I'm trying my luck in as many subreddits as possible

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

    Which tools should i use to develop a one-word at a time web corrector?

    Posted: 13 Apr 2020 09:40 PM PDT

    Hello, i'm a programming novice who needs advice on how to do this small project. I can investigate about programming languages and frameworks but i have no idea in which ones should i focus on.

    Has anyone here ever developed anything like this? please let me know your experience, i'm open to any advice. Thanks!

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

    I need help with an oracle sql project

    Posted: 13 Apr 2020 07:46 PM PDT

    Is there anyone who has time to help me with an oracle sql project. I need to arrange my dataset in a particular way, but I do not know how to achieve it. Anyone with experience want to make extra money and help me out via zoom or something?

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

    Need some Guidance

    Posted: 13 Apr 2020 07:44 PM PDT

    Hi all, I'm using Python to create a program that can take all the text in a PowerPoint file and then export it into a table in Excel.

    I'm honestly very lost in how to do this. I've seen tutorials on taking data from Excel to PowerPoint but nothing for the other way around. I use the PPTX module but python cannot read the PowerPoint properly when I input this file. Will somebody guide me?

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

    TextInput that needs to fetch results stored in database and display them on screen.

    Posted: 13 Apr 2020 05:58 PM PDT

    Hello all,

    I need some help please. I am using myadmin database with php code, and react native for my app. I am in the middle of creating an app that the user inputs a 3 digit number into the textinput box. That number then fetches the results that are already stored in the database (the results are attached to that number. I need for those results to render on my react native screen. Now my fetch method works, so does my php code. I have the results displaying on my screen. But the three problems that I am having is this. (I am using FlatList to render items)

    -When the results are displayed through my UI they are all on one line. so it will display 3 users. It displays the users like this.......userA<br>userB<br>userC. I want them to display like this....

    userA

    userB

    userC

    but they don't and I have tried everything.

    -Also when the users are displayed the line break is also displayed. I do not want the <br> in between each displayed user.

    -Lastly when the users are displayed like I have them in the first issue. They are displayed like that on every line of the FLatList....like so....

    userA<br>userB<br>userC

    userA<br>userB<br>userC

    userA<br>userB<br>userC

    userA<br>userB<br>userC

    Again I just want it to only display that actual number of users that are stored in the data that the user called for. And also I want them to be displayed like so

    userA

    userB

    userC

    Here is my code. It has both the react native javascript code and also my php code.

    Thank you so much!!!

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

    Will doing code challenges make me a better web developer?

    Posted: 13 Apr 2020 05:24 PM PDT

    Since JavaScript is quintessential for full-stack development, should I be practicing with some code challenges on the side?

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

    COVID Bluetooth Help

    Posted: 13 Apr 2020 05:22 PM PDT

    Hi all,

    I have some folks with memory issues, and was just wondering if this idea would be possible. I was thinking about creating an app or something to remind them to bring their PPE (glove/mask) when they had to leave their house to head to the store. If the car is new enough, and has bluetooth capability, would it be possible to send a notification to their phone to remind them to bring their PPE when they turn on the car/connect to the bluetooth? I'm not too familiar in this realm, and was just looking for any insight anyone could provide.

    Thanks!

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

    How would I make a program that detects when certain pixels on the screen change?

    Posted: 13 Apr 2020 05:00 PM PDT

    Hi, I have been playing a ddr style game on my computer that uses my arrow keys and I think it would be fun to work on a program that would play the game for me with 100% accuracy. I plan on doing this by reading some of the pixels on the screen and holding the correct arrow key until the in game arrow disappears. I guess I'm a bad googler, but I wasn't able to find any information whatsoever. I'm completely comfortable with using many languages, is anyone sure what I'm looking for?

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

    How does mouse highlighter software such as Pointer Focus, Cursor Pro work?

    Posted: 13 Apr 2020 04:41 PM PDT

    [PhP] Sign up forming not sending a data

    Posted: 13 Apr 2020 04:12 PM PDT

    Hello fellow coders, so Im in a project of a website and I need to do sign up form, but it doesnt send the data to the DB and I cant figure out why this is happening

    here's the code of the part of verifying if there exists a user registered aready and the part of inserting into the DB

    $encryptedpassword = md5($_POST['password']);
    $username = mysqli_real_escape_string($link, $_POST['username']);
    $email = mysqli_real_escape_string($link, $_POST['email']);

    if (mysqli_connect_errno()){
    echo "Failed to connect to database: ". mysqli_connect_error();
    }else{
    $queryusername = mysql_query("SELECT FROM users WHERE username = $username");
    $queryemail = mysqlquery("SELECT FROM users WHERE email = $email");
    if(mysql_num_rows($queryusername) >= 1 || mysql_num_rows($queryemail) >= 1){
    echo "Username and/or email have already been taken.";
    }else{
    $insert = "INSERT INTO `users`(`id`, `username`, `password`, `created_at`, `email`) VALUES ('', '$username', '$encryptedpassword', '','$email')";
    if (!mysqli_query($link,$insert))
    {
    die('Error: ' . mysqli_error($link));
    }else{
    mysqli_close($link);

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

    [assembly] array question

    Posted: 13 Apr 2020 03:59 PM PDT

    I'm supposed to write an array based off this:

    ; The name of the array is myArr. Each element is 8 bits and the values are unsigned.

    ;The value of first element is 10, the value of the second element is 13, the third element is 4.

    So would the answer be something like this:

    .data

    myArr BYTE '10', '13', '4', 0

    Use byte since this is 8-bit, and then list the elements?

    Or do I have to do a list like this:

    .data

    myArr BYTE 10

    myArr2 BYTE 13, etc?

    I'm pretty slow when it comes to this. Any help appreciated

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

    Is it a good idea to use an Abstractclass with properties and expect subclasses to fill in private variables?

    Posted: 13 Apr 2020 03:30 PM PDT

    in the Abstract class I return this private variable + additional stuff, for example.

    @property def myvariable(self): return _myvariable + 'additional text' 
    submitted by /u/EenAfleidingErbij
    [link] [comments]

    Need help choosing the JS framework / component for creating a timeline based application

    Posted: 13 Apr 2020 11:10 AM PDT

    Hi all,

    as the title said, I need to make a decision what JS framework/library will be used, as well as what timeline component.

    My requirements (simplified): I need a daily 24 hour timeline component, where I'll plot different team members, working on different projects. Don't want to bore you with business logic, but a usual 'project' lasts for a hour or so. So one employee will work on a few of those in their working time. I would know all the schedule already before making the application, but certain changes might happen 'on-the-fly', like one person might get transferred from a project to project. I need to accommodate that. Drag and drop stuff might not be required but I guess it's nice to have. So, simplified, that's basically it, a bunch of employees (~100) and plot their schedule for today, hour by hour, on which projects their working on.

    Similar to this:

    https://zconblog.files.wordpress.com/2017/02/vis-jstimeline.png?w=825

    except we don't use trucks, we use people, and different people might be working on same 'orders'.

    So 1st question: which JS framework to use? I assume the requirements will grow over time so I suppose using some versatile framework will be a help in the future. I was researching React and Vue.JS. Both seem fine, and offer a lot of customization options and possibilities for building a rich-UI web apps.

    I researched something like Vue vs React (since I know neither), and the finding is that Vue might be a better choice if the requirements are not that huge, and the app itself will be a small, or at the very worst, small-medium scale web application. Do you have any thoughts on this?

    Regarding the Timeline UI components, I've found google timeline charts and vis.js. Both look nice, but I think visjs offers more when it comes to customizing timeline itself. Again, any thoughts there? Any other libraries I should check out?

    Since I don't know JS that well, can certain libraries (like vis or google timeline) work with modern frameworks, like vue and react?

    Thanks for any input.

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

    Best approach to take RSS feed I made and: a) draft Tweet for my approval; b) email author and ask if they want to comment (tweet or website post); c) update author's publication page; d) simplify language and draft post to website(s); do similar thing with new Google search results?

    Posted: 13 Apr 2020 02:49 PM PDT

    Hello everyone,

    I'm happy to learn and try new things. I'm familiar with HTML and CSS on a basic level. I've done some Visual Basic for Applications (Excel) and other simple coding for specific applications. I am wondering if the problem I am trying to solve has already been solved, elsewhere, with slightly different parameters. Our organization uses Windows 365.

    Here is what I think is going on: there are a lot of divisions in the company, people aren't keeping track of their own publications, and the organization isn't tracking them either, therefore the website is out of date. They'd like more organization and to improve publicity with Tweets when something is published, for example.

    So far, I've put together an RSS feed to pull together all the publications (the other thing I'm wondering is if there is a way to notify me if someone new is hired (added to the webpage) so that I can update the RSS.). I can also do so for individual authors. The process I'd like to see happen is (bold means I'm not sure how to do this, but I'll take suggestions on all):

    1. Author(s) publish something.
    2. RSS feed detects it and I am notified.
    3. The author's webpage is updated with the new publication.
    4. The company's webpage is updated with the new publication.
    5. Keep a master list of annual publications, maybe?
    6. A simple Tweet is drafted for my approval. For example: "Title" was just published by "Author" see "Link"! @ author and #relevant things". I review and push to send.
    7. The abstract is simplified into layman's terms and drafted into a post for the website for my approval (maybe the author's approval, too?)
    8. An email to the author is drafted for my approval. Something like, "I see that "Title" was just published. We've sent out this Tweet: "xxx". Would you like to write a more detailed follow-up (Tweet or website post) or re-Tweet the announcement?" Maybe include, "Here's some example text we can post" (from 7)

    The part that I'm struggling with (above) is the drafting/pauses, instead of automatically sending. Potentially, I'd like to do a similar thing for non-publication stuff. For example, using Google, alert me when:

    • New deadlines come up for our professional organizations (draft email to remind everyone, maybe follow-up closer to deadline).
    • Employees do interviews, get awards, get promoted, publish a different type of material (something not picked up on the RSS feed above). Hopefully I would know, but if that were true, they wouldn't need someone doing this; I think everyone is just too busy to keep track. Follow a similar process to the above (draft Tweets and website posts, contact employees, etc).

    So what would be the best way to get started? Was RSS the right way for the first part? My web searches have turned up several paid options for some of this, but our volume will be so low (only one social media account and probably fewer than three events per week) and I'm not sure they'd cover everything.

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

    Guys I just needed some advice and help...

    Posted: 13 Apr 2020 02:43 PM PDT

    I graduated from University nearly 2 years ago but I've been struggling to find a job in this field... im not giving up hope but the only thing that's in the back of my mind thinking my age is going to put people off hiring me. I've applied to numerous grad and junior positions and I even have a github account where I put every bit of code I've ever written, may that be 4 line program or a 50 line program to show im still trying...

    I'm sorry if this sounds soppy I need some help and advice.

    Thank you

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

    Changes to database not reflected immediately

    Posted: 13 Apr 2020 06:24 AM PDT

    Alright so I know this question isn't exactly specific, but that's because I have no idea where to even start or ask. So I thought this reddit may be a good starting point.

    I have a web-application that uses a MySQL database, and a python back-end to serve pages on requests. This is hosted on a service called "pythonanywhere". It works great, perfectly. The database updates in batches every hour, and i've only just noticed that after the hour I occasionally have to wait a while to see changes reflected in the JSON API I have. Oddly, everything is committed.

    Firstly let me point out, this isn't a cache issue (at least I think). I hit Ctrl + shift + R in chrome to force it to load but not from the cache. Further, my phone or other browsers won't receive the changes to the database immediately.

    It's almost like it is reading from the database an hour old, which seems impossible since there is only one database isn't there? be interested to hear the theories and thankyou for any help, or anyone willing to point somewhere else to ask or receive help.

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

    what languages are used for web design?

    Posted: 13 Apr 2020 11:00 AM PDT

    hello,i know nothing about code and have started learning html.

    html to my knowledge is just for formatting websites so what other languages are needed and why?

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

    What are some good IDEs for c++ on Ubuntu?

    Posted: 13 Apr 2020 01:49 AM PDT

    how do i implement jwt with my own custom auth model in python django?

    Posted: 13 Apr 2020 05:25 AM PDT

    sources so far I found are able to generate jwt token but with the auth table predefined in django framework...and if you could tell me where to learn django from so that i feel less abstract(blind) of what is actually happening inside that

    submitted by /u/poker-_-
    [link] [comments]

    How to determine Big O notation of this algorithm?

    Posted: 13 Apr 2020 08:11 AM PDT

    I've been researching about the Travelling salesman problem and I've been analysing different algorithms that try to tackle it. However I've been stuck on trying to analyse the Big O notation on one of the algorithms(genetic) I've been researching. Can someone walk me through the steps on how to determine the Big O notation of this algorithm? Whole code can be found here - https://pastebin.com/iLxZxNwE

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

    Example about file pointers

    Posted: 13 Apr 2020 07:56 AM PDT

    #include <stdio.h>

    #include <stdlib.h>

    int main()

    {

    FILE *inp = fopen("indata.txt","r");

    FILE *outp = fopen("outdata.txt","w");

    double item ;

    int input_status = fscanf(inp,"%lf",&item);

    while(input_status==1){

    fprintf(outp,"%.2f\n",item);

    input_status = fscanf(inp,"%lf",&item);

    }

    fclose(inp);

    fclose(outp);

    return 0;

    I have a file which called "indata.txt" and i want to transfer my data to "outdata.txt" . But i couldnt understand that how input_status equal "1" .

    }

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

    Best programming practice for web scraping

    Posted: 13 Apr 2020 02:27 AM PDT

    Right now, there a lot of delivery services offered by grocery stores but a majority of them aren't able to deliver due to current demands. I wanted to create a tool that allows someone to be notified if a store in their area is accepting deliveries. I've tried figuring out if using some of their public APIs would work but it looks like web scraping is the best course of action. I am adhering to each websites robots.txt to make sure I am not crawling a page that isn't allowed. The main problem is that most of these sites require you to login to an account before you can check for available delivery times. The only option that I appear to have would be to create a dummy account for each site and have it login to check available delivery times for different people's zip codes. But I feel something like that isn't acceptable and wanted to know if anyone had any insight on this / any other ideas. This program will at most be used by a dozen people and I want it to constantly check every few minutes if deliveries are available. Any advice would be appreciated! Thank you!

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

    No comments:

    Post a Comment