• Breaking News

    Sunday, March 15, 2020

    Looking for help - Not For Profit project to help those forced to self-isolate due to coronavirus Ask Programming

    Looking for help - Not For Profit project to help those forced to self-isolate due to coronavirus Ask Programming


    Looking for help - Not For Profit project to help those forced to self-isolate due to coronavirus

    Posted: 15 Mar 2020 01:08 PM PDT

    A lot of people around the world are now being forced to self-isolate, and in most countries this is only going to get more frequent over the coming months. People in isolation struggle to get vital resources such as groceries, hygiene items, and basic medical supplies. Delivery services are becoming steadily more overloaded and booked out. For example, in central London it's now not possible to get any food delivered to your house within the next 3 weeks. For someone showing symptoms, or a vulnerable/elderly individual, waiting 3 weeks to get supplies is not an option, and neither is leaving your house.

    However... a lot of people have shown their willingness to help these people! There are thousands of of volunteers ready to help, but no system to match them with those that need help.

    We want to build a pretty simple website that allows those in need of a volunteer to enter their address and get matched with the closest volunteers in their area. I've drawn up some wireframes for the web design, but am not a developer myself so need some help on this front. This is a not for profit project, and I will not be paying for help, but will personally pay for hosting, infrastructure costs etc.

    Can you help in any way? Do you have any thoughts or suggestions?

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

    Is hackerrank hard or am I just a bad programmer?

    Posted: 14 Mar 2020 10:59 PM PDT

    I've been working through HackerRank (for like almost a year now) and recently I've been focusing on the mathematics, functional programming, and algorithms sections (I've already completed python and regex). It's really demotivating to see a medium question with a 70% success rate and not being able to complete it without extensive googling, or even not being able to solve it with that. Is HackerRank actually that hard or am I just bad?

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

    On a phone keypad, how many paths can a knight take to move from 1 to 9 in exactly 10 moves?

    Posted: 15 Mar 2020 08:52 PM PDT

    Came across this question while practicing/studying, and can't seem to figure it out. Tried googling it too but couldn't find a solution.

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

    Need a few resources on Data analysis and Time series analysis.

    Posted: 15 Mar 2020 08:07 PM PDT

    What books, YouTube channel/videos would you recommend for somebody getting started with data analysis and time series analysis.

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

    Convert data from a React form to a XML file !

    Posted: 15 Mar 2020 08:06 PM PDT

    Hello , anybody know how or where I can learn it ?

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

    Noob here. Need help about programming in Visual Studio using WPF.

    Posted: 15 Mar 2020 07:38 PM PDT

    How do you add image on wpf and program it to move randomly? Like the desktop goose and flies.exe. Im really confused about it. Thank you in advance.

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

    .Net Core Migration Question

    Posted: 15 Mar 2020 07:37 PM PDT

    I have a site built in .NET Core 1.0 Preview 2. It's using the deprecated xproj file. I need to migrate the project to the lastest .NET Core 3.1.

    Would it be simpler to try and go through all the migration steps listed below for each new version one at a time or would it be easier to try creating a new site in 3.1 and trying to just move my code over?
    https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/?view=aspnetcore-3.1

    If the better answer is go through each migration one at a time, there are there any good walkthroughs on migrating from the preview version to .NET Core 1.0?

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

    Had an idea for a website, where should I start?

    Posted: 15 Mar 2020 06:27 PM PDT

    Hi, I'm 17 and had an idea for a website. I have recently become insterested in programming, but really don't know where to start in order to make it real. Any tips?

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

    Why hasn't touch replaced the mouse

    Posted: 15 Mar 2020 06:18 PM PDT

    Is the mouse simply a better tool or is it that we are still stuck in an old way of doing things. With say a stylus you can actually get more precision for say artists and architectures. Yet it hasn't translated to touch replacing the mouse

    What are you thoughts on the iPad/iPad OS. Do you see this as rivaling Mac OS/Windows or will it always be less capable.

    Also what about the future of computing. For example do you see computing going the way of AR with hand gestures?

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

    What can CSS/Js do that Wordpress or any Website-building software can't

    Posted: 15 Mar 2020 01:04 PM PDT

    I know Website builders use CSS/Js so they don't differ in that sense

    but I often hear that you are limited while using software like that to build Websites

    rather than coding it urself

    bonus question: Is it possbile and or reccommended to use Wordpress for all the simple yet tedious parts of web development and code the rest urself?

    any cons to this?

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

    What's the quickest way to write a very simple GUI program?

    Posted: 15 Mar 2020 04:24 PM PDT

    I want to write (or find!) a program that, in theory, is very simple. Feed it HTML on stdin, it takes that HTML and displays it in a GUI window (I know rendering HTML is far from simple, but there are widgets that handle that side of things ;-)), When the window is closed, the program terminates. I need to write the program for Windows, but I have no issue with it being cross-platform, if that's easier. Also, I don't really care what language it's written in (although I'd prefer it to be something that produces a self-contained executable, to ease deployment).

    I feel as though this should be relatively easy, but I've not managed to find a language/library that doesn't involve investing way more time than the project warrants. (For comparison, I'd expect to write a similarly complex command line utility - finding a few standard libraries to do the heavy lifting and bolting them together - in half a day at most, even in a language I was unfamiliar with).

    The "obvious" thought was to use C# (as this is a Windows GUI app) but all the "beginner" examples use Visual Studio, and I really don't want to learn a new IDE for a one-off project. Most C/C++ libraries need to be built, and that often seems non-trivial.

    Does anyone have any good suggestions on how best to tackle this?

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

    How do you define the minimal subset of functionality for a particular type of software?

    Posted: 15 Mar 2020 03:34 PM PDT

    Hi,

    I wonder what is the best approach to identify the minimal subset of requirements / functionality that constitute a particular type of software.

    For example if one wants to make a simple web server what is the approach that you would adopt in order to understand what are the minimum subset of functionality that a program should have in order for it to be regarded as a very simple web server?

    Regards!

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

    Need help solving this C exercise.

    Posted: 15 Mar 2020 02:39 PM PDT

    The exercise states:

    A 3000 lb vehicle travelling on a road at 100 ft/sec requires a force equal to its mass times its acceleration to stop ( F = ma).

    The acceleration is given by

    Where vi = 100 ft/sec

    vo = 0 ft/sec.

    Write a program that will calculate the retarding force needed to stop the car at distances of 10, 20, 30, 40, 50, …, 1000 ft. Display the distance value and the corresponding retarding force in tabular form. The units of force are Newtons (N). Your solution must include a user-defined function that returns the force and takes as input initial and final velocity and distance.

    double force(double velocityInitial, double velocityFinal, double distance, double mass);

    I need to solve this exercise using a for loop.

    I am getting 3 errors atm:

    26: 'mass' is used uninitialized in this function
    26: 'acceleration' is used uninitialized in this function
    30: 'distance' is is used uninitialized in this function

    My code right now is:

    #include <stdio.h>

    #include <stdlib.h>

    #include <math.h>

    double force(double velocityInitial, double velocityFinal, double distance, double mass);

    int main()

    {

    double forceFormula;

    int distance, mass, acceleration;

    forceFormula = mass * acceleration;

    printf("\nDistance:\t\tForce in Newtons:\n"

    "------------------------------------------\n");

    printf("%d\t\t\t%.2lf\n", distance, forceFormula);

    printf("------------------------------------------\n");

    return 0;

    }

    double force(double velocityInitial, double velocityFinal, double distance, double mass)

    {

    velocityInitial = 100;

    velocityFinal = 0;

    mass = 3000;

    double acceleration, forceFormula;

    for( distance = 10; distance <= 1000; distance += 10)

    {

    acceleration = ((velocityFinal * velocityFinal) - (velocityInitial * velocityInitial))/ 2 * distance;

    forceFormula = mass * acceleration;

    }

    return forceFormula;

    }

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

    Getting Calls From "Ghost Numbers"

    Posted: 15 Mar 2020 02:16 PM PDT

    I'm getting calls from several ghost numbers which have a different area code (= different providers).

    I call them "ghost numbers" because when I try to call them back they simply don't exist and wont show up in the call history provided by my provider on their webapplication.

    I'm a programmer so I assume one of my friends is trolling me.

    I get the calls even..

    • if I move to a different location (=using a different antenna)
    • if I switch my phone or reinstall the OS

    Some points which may help:

    • Once when I answered the call someone laughed at me (but usually if I answer the call it just stops)
    • When calling those numbers back I get the provider message "This number is unavailable"
    • Those numbers are not listed in the call history given by my provider (even if I call back the providers history doesnt list the calls I made to those numbers)
    • Blocking those numbers doesnt help because they are different and according to the area code they must be provided by different providers (living in Switzerland and usually the prefix identifies the provider e.g. 079=Swisscom;078=Orange/Salt etc.)

    Whats going on here? I feel like the guy who claims to see an alien and nobody believes him

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

    Gloves for hand and wrist pain

    Posted: 15 Mar 2020 08:17 AM PDT

    Does anyone use gloves for hand and wrist pain from programming?
    I know compression gloves are good for arthritis and carpal tunnel.

    Has anyone used compression gloves or something similar while programming to reduce the pain?

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

    What are good skills to learn that you probably won't learn in class?

    Posted: 15 Mar 2020 10:20 AM PDT

    I want to learn things to supplement the type of thing I learn in classes. For example, learning how to use vim well has been very useful to me. What have you guys learned on your own that have been helpful to your programming success?

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

    Merging 2 sorted Linked Lists

    Posted: 15 Mar 2020 08:00 AM PDT

    I'm trying to merge 2 sorted linked lists into a new linked list in C++. New list should also be sorted.

    For ex:

    If first two lists are :-

    1 -> 2 -> 4 1 -> 3 -> 4 

    Then new list should be :-

    1 -> 1 -> 2 -> 3 -> 4 -> 4 

    I've written a recursive approach like this :-

    ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) { if (!l1 && !l2) return nullptr; int v1 = l1 ? l1 -> val : 0; int v2 = l2 ? l2 -> val : 0; ListNode* l3 = new ListNode(v1 <= v2 ? v1 : v2); l3 -> next = mergeTwoLists(l1 ? (v1 <= v2 ? l1 -> next : l1) : nullptr, l2 ? (v1 <= v2 ? l2 : l2 -> next) : nullptr); return l3; } 

    Here, I'm trying to check if a value in 1st list is less than or equal to value in 2nd list then we will insert the value in 1st list into merged list & move forward in the 1st list. Otherwise we will stay at the current node in 1st list & move forward in 2nd list. You can find complete code here. For some reason, it is giving me Segmentation Fault / Internal Error. Don't know why.

    I've also written an iterative approach for merging these 2 lists. And that one is working fine. You can find iterative version here.

    I changed only merge function implementation in both versions. So rest of the code is same in both except merging. So I need help in figuring out that why my recursive merge function is not working.

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

    Python3: How to get FuncAnimation to not show the animation?

    Posted: 15 Mar 2020 12:30 PM PDT

    Hi!

    I have a simple simulation of a pendulum which I animated using matplotlib.animation.FuncAnimation. Since I need that animation, I saved it with ani.save(). When watching that video I have the framerate I want, but when I run the code to get a new animation, it pops up with a ridicously slow framerate. Then I have to close it and open the one I saved in .mp4. I tried removing the plt.show() but I get 'Source ID 7 was not found when attempting to remove it'. My code is(without the simulation)

    import matplotlib.pyplot as plt import matplotlib,animation as ani fig = plt.figure() ax = fig.add_subplot(111, autoscale_on=False, xlim=(-l,l), ylim=(-l, l)) ax.set_aspect('equal') ax.grid() line, = ax.plot([], [], 'o-', lw=2) def init(): line.set_data([], []) return line, def frame(i): line.set_data([0, x[i]], [0, y[i]]) return line, anim = ani.FuncAnimation(fig, frame, init_func=init, blit=True) writer = ani.FFMpegWriter(fps=1/dt) anim.save('pendulo.mp4', writer=writer) plt.show() 
    submitted by /u/FreierVogel
    [link] [comments]

    How is these default ssids generated ? TestF1E853 XX:XX:XX:f1:e8:5c

    Posted: 15 Mar 2020 12:16 PM PDT

    Test is the isp name...As you can see it contains the last three parts of the mac address but sometimes the last two or one characters are different... how are they Calculated ?

    TestF1E853 XX:XX:XX:f1:e8:5c

    Test71FAB0 XX:XX:XX:71:fa:b8

    Test975FB9 XX:XX:XX:97:5f:c0

    TestB3381C XX:XX:XX:B3:38:24

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

    Need some help with Java programming.

    Posted: 15 Mar 2020 08:27 AM PDT

    If you can send me towards any websites where I could get help for this specific question would help a lot. https://imgur.com/a/W0GOays

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

    What I need to read that?

    Posted: 15 Mar 2020 02:02 PM PDT

    What open-source projects can a graduate improve? Or how to earn a little bit of money?

    Posted: 15 Mar 2020 10:10 AM PDT

    Hello. As the title says, I am a graduate. I am a Computer Science Engineer. I know C# and .NET fairly alright, I know a bit about DBs, I know how to work both on an agile and waterfall projects, have a firm grasp of OOP. Are there any open source projects I can contrubute to? Or a way to earn a small amount of money without leaving home? (2 unrelated questions). I was supposed to start a job, but due to the outbreak, I am stranded sadly and feel pretty useless.

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

    [JS CSS] Have one element react to input, despite another one being focused?

    Posted: 15 Mar 2020 10:08 AM PDT

    Hello!

    I have some input elements on the left side, and on the right side, there is a big info div that changes data depending on which input element is focused.

    I want to be able to have one input element focused, and at the same time be able to scroll the info element up-down with keyboard up and down.

    Unfortunately, input type text itself reacts to up-down keyboard input by putting the cursor to the front/back of the text.

    I want the left-right to work, shifting between the letters, but repurpose up-down to control the un-focused info div.

    Is this possible?

    Bonus points if I can also determine the scroll speed/amount

    Thank you!

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

    Merging numbers using XOR and getting the outcome with the most occurrences of a number.

    Posted: 15 Mar 2020 08:02 AM PDT

    (JAVA) I have found this exercise and it fascinated me. However, I have no idea how to approach this problem.

    STORY

    So the story of this exercise is, John has created a new science called Xorchemy (based on the XOR operand). Xorchemy is a mix between Alchemy and Informatics. In Xorchemy you can merge two elements (each represented as a number between 1 and 5, including), by converting them into binary and comparing each of their numbers using the XOR operand. If for example, you would like to merge the number 2 with 1 it would go something like this. 2 = 010, 1 = 001, 0 and 0 gives us 0, 0 and 1 gives us 1, 0 and 1 again gives us 1, so the result is 011, thus 3. There are only 5 stable elements, so you can not merge elements whose output is greater than 5, or less than 1, for example, the numbers 4 and 2.

    INPUTS

    On the first line, you will get an Integer n. This represents how many elements you have, for example, 4. ( 1≤n≤1000 )On the second line, you will get n Integers, the elements, for example, 3 1 2 2. ( 1≤element≤5 )

    OUTPUT

    You need to find a process to merge the given elements in a way that results in you having the most possible occurrences of an element that you can get and output the number of occurrences. Let's take the numbers from before, 3 1 2 2. If we were to merge 1 and 2 we would get 3 3 2, so we have 2x the element 3 and 1x the element 2. If however, we merge 3 and 1 we get 3x the element 2, which is the most an element occurred. So we would output 3.

    Another example is 4 5 2 3 3, where the right answer is to merge 4 and 5 (100 and 101 gives us 001), and then 1 and 2 which gives us 3, so 3x the element 3, we output 3 as that is the number of occurrences.

    Also in the examples, in the end, there is always only one element left, however, the assignment does not say that this must always be the case, so for example, a solution where we are left with 2x the element 3, and 4x the element 5 is a right answer as well, and the output would be 4.

    QUESTION

    How would you go about finding the right way to merge the elements? Do I even need to find the right way to merge, as the output only asks for the number of elements we will have? I do not think that the right way is to go and try all the combinations, as that would be inefficient. Any ideas.

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

    What happens behind the scenes when C code is compiled

    Posted: 15 Mar 2020 12:02 AM PDT

    No comments:

    Post a Comment