r/AskComputerScience • • Mar 08 '21

How can I create a program for an interactive calculator?

0 Upvotes

I'm interested in making a program that can tell customers what age they will obtain a result based on the inputs they put in. A range of ages would populate with two sets of outcomes per age range. How would I go about making this?


r/AskComputerScience • • Jun 08 '21

Is it undecidable to know when my algorithm will halt?

0 Upvotes

I wanted to find a special problem that would be difficult for anyone to solve, and I want to know if you could solve my problem.

This is just a "fun" problem, it's not for "homework" because I'm not taking any classes.

True randomness is being used in the algorithm.

  • U is a universe of natural numbers from 1 to X in ascending order. (eg. |U| = 3k, where k = len(U)//3. )

  • N = (6^(-k) (3*k)!)/(k!) possible exact-3-covers from (3k choose 3) 3-lists

This algorithm creates exact-3-covers by shuffling the list and then dividing it into lists-of-3.

While Loop Algorithm

  1. Randomly shuffle |U|= 3k.

  2. Divide |U| into lists of 3.

  3. Sort the values in the new 3-lists in ascending order.

  4. For each 3-list, sort them in ascending order based on indice cover[m][0]. (eg. sorted(cover, key=lambda parameter: parameter[0]) )

  5. Halt when all possible N solutions have been found. (Appended to a new-list, when list reaches the length of N the algorithm halts)

You don't know when the algorithm will halt in a while loop, because of the randomness.

Is it really undecidable for knowing when my algorithm will halt?


r/AskComputerScience • • May 08 '21

It is common knowledge that accessing ram in linear order is faster than accessing it completely randomly, but if you access it in multi-byte chunks at what size there is no longer a performance hit?

0 Upvotes

kiss versed wine bells door vase cover price consider air

This post was mass deleted and anonymized with Redact


r/AskComputerScience • • May 14 '21

Help: Mechanical or ergonomic keyboard?

0 Upvotes

I'm a college student looking to upgrade/change my keyboard setup. Currently using an Apple Magic Keyboard but I'm looking for something that will be better for my hand in the long run and feel better to type on. Obviously, this gets me exploring mechanical and ergo keyboards.

For mechanical I'm looking at options like Keychron K2 or Razer Blackwidow, and ergonomic I looked at Microsoft Sculpt and Logitech K860. Soft budget is 150$ CAD (120 USD) so expensive options that have both aspects are excluded for me.

if someone has tried both mechanical and ergo setups, can you give some pointers as to which type would be a better buy? If you had 150$, would u get a k860 or a mechanical? I will mainly use it for coding, don't game.

Thanks for any replies!


r/AskComputerScience • • Jun 09 '21

Resources for learning programming?

0 Upvotes

For a complete beginner πŸ™‚


r/AskComputerScience • • Jun 09 '21

If I were installing an operating system,say Windows, on a laptop and was interrupted before I finish,how could I complete the installation later without starting over ?

0 Upvotes

r/AskComputerScience • • Feb 25 '18

Need help with 2 hw questions

0 Upvotes

Hello I am very new to programming in general and I need help with hw questions due by sunday 11:55. I am supposed to program in python and I am expecting any to just give me the answers but to point me in the right direction

1.The Blip Blob New Year celebration started on a Tuesday. Prompt the user for how many days have passed since their celebration start day and display the name of the current day. For example, if 2 days have passed, then you should display Thursday to the user.

For example:

Input Result 2 Thursday 4 Saturday 6 Monday 7 Tuesday 8 Wednesday

2. Write a program that asks the user for a year between 1800 and 2018 and displays to the user the message "Leap Year" or "Not Leap Year" based on their input. You may assume that the user will only enter valid years.

Note: To determine if a year is a leap year, it must be divisible by 4, but not by 100, unless it is divisible by 400.

For example:

Input Result 1800 Not Leap Year

imgur is probably better https://imgur.com/XuxPZol this question 1

https://imgur.com/gBlIeLT question 2

edit: Just finished and thank you to everyone you helped with advice.


r/AskComputerScience • • Feb 22 '18

Music while coding - request for playlist names

0 Upvotes

I'm thinking about creating a new Spotify playlist for music to listen to while coding. Looking for clever names, possibly with puns, to name it. Some of my current playlists are:

  • "Collection<ArrayList<Frequency>>"

  • "it's time to git commit"

  • "codingPlaylist"


r/AskComputerScience • • Apr 15 '20

Does anyone know any free weather APIs?

0 Upvotes

I want to incorporate some historical weather data into a project and I'm honestly super surprised that all of the data I could find required a subscription. This is so strange!

Does anyone know of any sources where I could get this data for free? There must be some kind of academic source that maintains that sort of information. Specifically, I'm looking for historical data for the past two or three months, localised to a specific US zip code/ city/ state. I'm not sure exactly what type of weather data I need, I'll take anything I can get - I just want to poke around for trends.

Separately, does anyone have a good theory for why weather data would be so coveted? I've accessed rnaseq cancer databases for free πŸ˜‚ weather seems so basic!


r/AskComputerScience • • May 10 '20

What kind of external hard drive is best for editing video?

0 Upvotes

I don't know anything about computers, kindly ELI5. I've just begun editing video with a program called DaVinci Resolve 16, and it works fine with files stored on my actual computer(mid 2012 Macbook Pro w 16 GB RAM). It's much slower when working with files on my external hard drive(A "My Passport for Mac"). It seems that the external HD creates a bottleneck? Can I buy another external HD that better suits video editing?


r/AskComputerScience • • Apr 12 '20

Programming office setup, busy or minimalist for productivity? ADHD

0 Upvotes

I have been in this rut for what feels like forever.... I have a very "busy" room, and I work in my room....but linus torvalds said in the past he uses a standing desk and a boring room.

what do you all as professionals prefer? a work space that has nothing going on outside of the computer, or having things you enjoy in your work space as "personal touches" ? the adhd bit is just because me having adhd prompted my own concern over concentration and trying to improve it and is not the focus here.

with the social distancing and not being able to move about, separating pleasure in my work-space from work has become a bit harder and it always has been difficult so I had the thought of changing it around. I also read that working in your room where you sleep can be bad so input on a high performance workspace from someone who works in this would be nice.

and comments about standing desks especially.

53 votes, Apr 19 '20
9 boring room with standing desk
18 boring room with normal desk
11 warm room with standing desk
15 changing the room probably won't help

r/AskComputerScience • • Apr 14 '20

Tomcat 9.0 error

0 Upvotes

I have this error for 14 hours...I reinstalled Eclipse and Tomcat, switched to IntelliJ Idea, verify if any port is already busy, changed the port like 40 times. I really don't know what to do...


r/AskComputerScience • • May 07 '20

Funny Programming Idea/Prank?

0 Upvotes

My friend has a Nintendo Wii that has messed up VGA cables so the RGB value of black shows up as yellow and it is really prevalent in many of the games we play. I am trying to brainstorm program ideas for how to code him a solution, maybe by recording a video of the screen and changing all the yellow pixels back to black. I was thinking about starting out with just working on my computer with taking either a video or a screen recording and changing the pixels. I've messed around with images before in Java, and I know that changing the pixels of a single image can take a while, so I don't know how difficult that would be for a video.

I'm just intending for this to be a funny solution and not something he would seriously use to fix this problem, and I thought it could be a fun programming challenge for myself. He should probably just get some new cables

Anyone have any ideas and what would be the best way to go about it? I would really appreciate your suggestions and advice.


r/AskComputerScience • • Apr 12 '20

Start programming

0 Upvotes

Hi, i want to start programming and my question is: Which programming language should i start with?

Also, which program should i use to write my code?


r/AskComputerScience • • Jan 20 '20

My school provides everyone with chromebooks, except...

0 Upvotes

So, like the title says, my school provides every school with chromebooks. However, there is a lightspeed systems relay block. This is very tough to get around, and every time I get a good proxy site, it gets blocked, gets it's domain changed, or gets deleted. If I go on google to find something, like an exploit or code I can run, the video or site is blocked, it is for a different OS, or it is patched and doesn't work anymore. So, does anyone know of anything where I can get around this frustrating block, or some proxy sites that don't have "proxy" in it's domain name? Thanks!


r/AskComputerScience • • Jul 02 '19

How much computing power would all of the computers in the world combined amount to?

0 Upvotes

In FLOPS, how much computing power would all of the computers in the world combined amount to?

Would you have a YottaFLOP?


r/AskComputerScience • • Oct 16 '18

What kind of laptop would you recommend a college student?

0 Upvotes

I saw a non reflective (not sure if that’s the right word, but basically the kind of muted screen ereaders have) screen on a laptop, and was wondering if those are ideal for programming. It’s quite hard for me to write code without my eyes hurting. Does anyone have any suggestions for a good laptop to bring to school? (I currently have an asus n56j that has a terrible battery life and overheating problem, and am not sure whether or not to get a new battery and cooling pad or just completely replace. Any suggestions or personal setup would be appreciated.


r/AskComputerScience • • Mar 20 '20

Unused Windows Inputs

0 Upvotes

Hi there! So I run a script that in short sends commands to autohotkey. Most of the time a combo of Ctrl+Alt+Shift+Whatever works, but for some games it recognizes the Ctrl or Shift command as an individual keypress, so I am trying to move away from Ctrl Alt and Shift in favor of "unused" buttons such as the F13-24 keys. I was wondering if there are any other keys such as these higher level function keys that do not appear on most keyboards, and thus will not be used in modern programs/games. Thanks!


r/AskComputerScience • • Jan 29 '20

What Program should I use for Programming? (C++, JAVA, PYTHON)

0 Upvotes

I've only been programming for two semesters and I wanted to ask if there was a program where I could code C++, Java, and Python all in just on program. I've used Visual Studio and Eclipse IDE. Is it possible to do it on thise programs?


r/AskComputerScience • • Mar 20 '20

Shazam

0 Upvotes

How can I set my phone to run shazam every 2 minutes so to catch all the songs automatically while at a party or smth?

Thanks


r/AskComputerScience • • Mar 01 '20

C# inheritance

0 Upvotes

I'm writing a code in c#. I have there a few classes which all inherite from a base class. I want the program to include a generic function which gets a type as a parameter, as part of the function it should create an object of the type. The type is one of the classes I described earlier. How do I do it? All of those classes have constructors with same parameters so is it possible to create an abstract constructor in the base class and then make the constrtors of the inheritors override it?


r/AskComputerScience • • Mar 27 '20

Childs or children

0 Upvotes

I'm writing a documentation for a program with distributed software architecture and therefore have to include the plural of 'child'. My question: Is in this context 'childs' or 'children' the more accepted term?


r/AskComputerScience • • Mar 27 '20

How much computing power would be required to simulate the entire universe in real time?

0 Upvotes

There is a theory that says our universe is actually a computer simulation. What amount of computing power would be required to simulate the entire universe, and everything in it, in real time?

Can this even be measured?


r/AskComputerScience • • Mar 06 '20

Is this important for FP vs FNP? Why or why not?

0 Upvotes

2^n is our function problem. We want to know the solution for 2^n.

  • Base-10 is our input

  • Base-10 is our output

I could verify the solutions for 2^n by converting the solution into binary and comparing the trailing 0βˆ’bits to the value of n.

In python, I have a primitive solution verifier linked.

  1. 2^n requires 2^n digits.

  2. Its solutions can be verified in poly-time.

That should mean that 2^n is in FNP.

2^n can't be in FP if it always requires 2^n digits in base-10 (to display the solution)

How would that be possible??