Jump to content
Dante Unbound: Share Bug Reports and Feedback Here! ×

I'm Bored, Post Me An Applied Math Question.


Renegade343
 Share

Recommended Posts

Well, sometimes i need someone to think for me, when my brain turn off because its so tired and i cant think anymore even about very easy tasks, but i wanna go forward, so i get frustrated because i cant.

 

Its about programming, not so much about calculating using some math formulas to get result as a number, in fact math geeks arent required. Its more like to "figure out" current situations with lots of numbers, like 5 numbers where each one depends on another 5 calculations, find what is missing, create new numbers, probably make some new problems and create formula that can solve it.

 

I will give you some examples, you dont have to figure it out, just to get a picture.

 

 

Lets say we have video file, but we got only his total length in seconds and his frames per second.

Total Length = 5678 (sec)

FPS = 24

Selected Frame = 5555

And we need other informations, like length as HH:MM:SS, total numbers of frames in a whole video file, every how much milliseconds are new frame and usually all possible other things.

Numbers are not so important because they are changing all the time, so formulas for current task is:

 

HH = Length ÷ 3600

HH = 5678 ÷ 3600

HH = 1,5772

HH = 1 (Nearest integer below)

 

MM = (Length ÷ 60) / 60

MM = (5678 ÷ 60) / 60

MM = 34,6333

MM = 34 (Nearest integer below; Remainder - "/" is Modulus)

 

SS  = Length / 60

SS = 5678 / 60

SS = 38 (Nearest integer below; Remainder - "/" is Modulus)

 

Or 01:34:38 for current number (5678 sec).

 

Total Frames = Total Length × FPS

Total Frames = 5678 × 24

Total Frames = 136272

 

Selected MS = (Selected Frame ÷ FPS) × 1000

Selected MS = 231458.3333

Selected MS = 231459 (Nearest integer above)

With previous calculations for HH:MM:SS, selected frame (5555) was located at 00:03:51 as a 11th frame.

 

 

My another example is with GUI, easy user friendly things sometimes dont looks so easy to make, even its actually stupid. Eg. you open a window, in that window you have fill bar (doesnt matter for what it is, volume, time, red color from 0 to 255, etc.) that can be fill lets say from 0% to 100%, you aim your mouse in the middle of that bar, click, and it fill to 50%, because you click in the right middle of it.

 

Its easy for programmers to figure it out, height and width of current monitor/resolution/pixels (it can be run with any monitor size), current window position with top-left center (window is movable, can be anywhere), current window height and width size (window is resizable, can be any size), current height and width of a fill bar (because window is resizable, fill bar size is affected too), current offsets of fill bar for top/bottom/left/right (because fill bar is somewhere inside that window, on resize its also affected), get X and Y axis of current cursor/mouse position on the monitor, and X and Y mouse position inside of a window (it can, be, anywhere, i, think).

 

Anyone can figure it out with time, it can take days, if you enjoin in tasks like this, you are talented programmer, or maybe professional chess player, and maybe you can help me out sometimes, when i become stupid and unable to think.

Link to comment
Share on other sites

Well, sometimes i need someone to think for me, when my brain turn off because its so tired and i cant think anymore even about very easy tasks, but i wanna go forward, so i get frustrated because i cant.

 

Its about programming, not so much about calculating using some math formulas to get result as a number, in fact math geeks arent required. Its more like to "figure out" current situations with lots of numbers, like 5 numbers where each one depends on another 5 calculations, find what is missing, create new numbers, probably make some new problems and create formula that can solve it.

 

I will give you some examples, you dont have to figure it out, just to get a picture.

 

 

Lets say we have video file, but we got only his total length in seconds and his frames per second.

Total Length = 5678 (sec)

FPS = 24

Selected Frame = 5555

And we need other informations, like length as HH:MM:SS, total numbers of frames in a whole video file, every how much milliseconds are new frame and usually all possible other things.

Numbers are not so important because they are changing all the time, so formulas for current task is:

 

HH = Length ÷ 3600

HH = 5678 ÷ 3600

HH = 1,5772

HH = 1 (Nearest integer below)

 

MM = (Length ÷ 60) / 60

MM = (5678 ÷ 60) / 60

MM = 34,6333

MM = 34 (Nearest integer below; Remainder - "/" is Modulus)

 

SS  = Length / 60

SS = 5678 / 60

SS = 38 (Nearest integer below; Remainder - "/" is Modulus)

 

Or 01:34:38 for current number (5678 sec).

 

Total Frames = Total Length × FPS

Total Frames = 5678 × 24

Total Frames = 136272

 

Selected MS = (Selected Frame ÷ FPS) × 1000

Selected MS = 231458.3333

Selected MS = 231459 (Nearest integer above)

With previous calculations for HH:MM:SS, selected frame (5555) was located at 00:03:51 as a 11th frame.

 

 

My another example is with GUI, easy user friendly things sometimes dont looks so easy to make, even its actually stupid. Eg. you open a window, in that window you have fill bar (doesnt matter for what it is, volume, time, red color from 0 to 255, etc.) that can be fill lets say from 0% to 100%, you aim your mouse in the middle of that bar, click, and it fill to 50%, because you click in the right middle of it.

 

Its easy for programmers to figure it out, height and width of current monitor/resolution/pixels (it can be run with any monitor size), current window position with top-left center (window is movable, can be anywhere), current window height and width size (window is resizable, can be any size), current height and width of a fill bar (because window is resizable, fill bar size is affected too), current offsets of fill bar for top/bottom/left/right (because fill bar is somewhere inside that window, on resize its also affected), get X and Y axis of current cursor/mouse position on the monitor, and X and Y mouse position inside of a window (it can, be, anywhere, i, think).

 

Anyone can figure it out with time, it can take days, if you enjoin in tasks like this, you are talented programmer, or maybe professional chess player, and maybe you can help me out sometimes, when i become stupid and unable to think.

I think I know how to solve your second question.
Link to comment
Share on other sites

Well, sometimes i need someone to think for me, when my brain turn off because its so tired and i cant think anymore even about very easy tasks, but i wanna go forward, so i get frustrated because i cant.

 

Its about programming, not so much about calculating using some math formulas to get result as a number, in fact math geeks arent required. Its more like to "figure out" current situations with lots of numbers, like 5 numbers where each one depends on another 5 calculations, find what is missing, create new numbers, probably make some new problems and create formula that can solve it.

 

I will give you some examples, you dont have to figure it out, just to get a picture.

 

 

Lets say we have video file, but we got only his total length in seconds and his frames per second.

Total Length = 5678 (sec)

FPS = 24

Selected Frame = 5555

And we need other informations, like length as HH:MM:SS, total numbers of frames in a whole video file, every how much milliseconds are new frame and usually all possible other things.

Numbers are not so important because they are changing all the time, so formulas for current task is:

 

HH = Length ÷ 3600

HH = 5678 ÷ 3600

HH = 1,5772

HH = 1 (Nearest integer below)

 

MM = (Length ÷ 60) / 60

MM = (5678 ÷ 60) / 60

MM = 34,6333

MM = 34 (Nearest integer below; Remainder - "/" is Modulus)

 

SS  = Length / 60

SS = 5678 / 60

SS = 38 (Nearest integer below; Remainder - "/" is Modulus)

 

Or 01:34:38 for current number (5678 sec).

 

Total Frames = Total Length × FPS

Total Frames = 5678 × 24

Total Frames = 136272

 

Selected MS = (Selected Frame ÷ FPS) × 1000

Selected MS = 231458.3333

Selected MS = 231459 (Nearest integer above)

With previous calculations for HH:MM:SS, selected frame (5555) was located at 00:03:51 as a 11th frame.

 

 

My another example is with GUI, easy user friendly things sometimes dont looks so easy to make, even its actually stupid. Eg. you open a window, in that window you have fill bar (doesnt matter for what it is, volume, time, red color from 0 to 255, etc.) that can be fill lets say from 0% to 100%, you aim your mouse in the middle of that bar, click, and it fill to 50%, because you click in the right middle of it.

 

Its easy for programmers to figure it out, height and width of current monitor/resolution/pixels (it can be run with any monitor size), current window position with top-left center (window is movable, can be anywhere), current window height and width size (window is resizable, can be any size), current height and width of a fill bar (because window is resizable, fill bar size is affected too), current offsets of fill bar for top/bottom/left/right (because fill bar is somewhere inside that window, on resize its also affected), get X and Y axis of current cursor/mouse position on the monitor, and X and Y mouse position inside of a window (it can, be, anywhere, i, think).

 

Anyone can figure it out with time, it can take days, if you enjoin in tasks like this, you are talented programmer, or maybe professional chess player, and maybe you can help me out sometimes, when i become stupid and unable to think.

For the UI thing, I think I've made some applets like that (using Java). I guarantee nothing but I can look if I got some useful code for you.. :)

Link to comment
Share on other sites

Yeah in that perfect example, but in future tasks maybe will not be that simple with all variables.

A general rule of thumb with solving these problems is thus: 

 

Set a reference point (preferably at a corner, or better yet, the bottom left corner, so that it would be easier for you to visualise a x-y axis system.). Do you know how to use vectors?

Link to comment
Share on other sites

Yeah, but it doesnt matter, other tasks can make it difficult sometimes and anyhow i dont need it anymore. I like top-left center.

What about vectors? Graphic or?

 

Edit: You mean with vectors to figure it out? Sure, thats a good way. In this easy tasks computers likes top-left center as default, making bottom, left, right, etc., center will bring only few lines of wasted code.

It was example with all informations in 2D to solve it, in future its usually with some information, or half of informations, and maybe some wrong information, then solving is more difficult, or unsolved until you find what information is wrong, and what else maybe you need (that can be also problem).

 

So you enjoining in tasks like this?

Edited by nVidiaContractor
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...