The Following 14 Users Say Thank You to sixwheeledbeast For This Useful Post: | ||
Copernicus, DA5, DJJonosound, elros34, Estel, foobar, Half-Life_4_Life, mrsellout, OVK, pichlo, ranbaxy, Salmi, taixzo, vincr |
|
2013-03-20
, 06:27
|
Posts: 59 |
Thanked: 59 times |
Joined on Nov 2012
@ Philippines
|
#2
|
The Following User Says Thank You to n0x For This Useful Post: | ||
|
2013-03-24
, 15:34
|
Posts: 2,291 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#3
|
|
2013-04-01
, 16:22
|
Posts: 2,291 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#4
|
|
2014-03-28
, 00:59
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#5
|
~ $ /opt/bander/bin/bander Floating point exception
The Following 2 Users Say Thank You to Estel For This Useful Post: | ||
|
2014-03-28
, 15:01
|
Posts: 2,291 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#6
|
Have been playing with bander (no particular reason, just feelingdisturbance in the force) that there is bug hidding inside ) and found two glitches:
1. Bander crashes when something stupid is put into calculation fields. Like, when someone try to calculate current by providing something as voltage and 0 as resistance. It seems that it doesn't like dividing by 0 and just makes "bye bye" in a rude manner:
Code:~ $ /opt/bander/bin/bander Floating point exception
|
2014-03-28
, 15:40
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#7
|
|
2014-03-28
, 15:48
|
|
Posts: 6,450 |
Thanked: 20,982 times |
Joined on Sep 2012
@ UK
|
#8
|
The Following 3 Users Say Thank You to pichlo For This Useful Post: | ||
|
2014-03-28
, 17:51
|
Posts: 661 |
Thanked: 1,625 times |
Joined on Apr 2012
@ Croatia,Zagreb
|
#9
|
|
2014-03-28
, 19:22
|
|
Posts: 6,450 |
Thanked: 20,982 times |
Joined on Sep 2012
@ UK
|
#10
|
Actually, the whole thing can be implemented in a simple JavaScript. Let me dig out my HTML course material
<HTML> <HEAD> <SCRIPT LANGUAGE="javascript"> function calculate(form) { var n = (form.band1.value + form.band2.value) * form.multiplier.value; if (n >= 1000000) n = n / 1000000 + 'M'; else if (n >= 1000) n = n / 1000 + 'K'; form.result.value = n + form.tolerance.value; } </SCRIPT> </HEAD> <BODY> <H1 ALIGN="center">Resistor Colour Code Calculator</H1> The following calculator allows you to enter the colours of the bands on a given resistor, and it will then return the resistance value.<P> For each band set the corresponding colour. When all the colours are correct, the corresponding value will be displayed in the 'Resistance' box.<P> <FORM NAME="colour"> <TABLE ALIGN="center" WIDTH="80%" BORDER="2"> <TR ALIGN="center"> <TD>Band 1</TD> <TD>Band 2</TD> <TD>Multiplier</TD> <TD>Tolerance</TD> </TR> <TR ALIGN="center"> <TD> <SELECT NAME="band1" ONCHANGE="calculate(colour)"> <OPTION SELECTED VALUE="0" STYLE="background: black; color: white">Black</OPTION> <OPTION VALUE="1" STYLE="background: brown; color: white">Brown</OPTION> <OPTION VALUE="2" STYLE="background: red; color: white">Red</OPTION> <OPTION VALUE="3" STYLE="background: orange; color: white">Orange</OPTION> <OPTION VALUE="4" STYLE="background: yellow; color: black">Yellow</OPTION> <OPTION VALUE="5" STYLE="background: green; colour: white">Green</OPTION> <OPTION VALUE="6" STYLE="background: blue; color: white">Blue</OPTION> <OPTION VALUE="7" STYLE="background: purple; color: white">Purple</OPTION> <OPTION VALUE="8" STYLE="background: gray; color: white">Grey</OPTION> <OPTION VALUE="9" STYLE="background: white; color: black">White</OPTION> </SELECT> </TD> <TD> <SELECT NAME="band2" ONCHANGE="calculate(colour)"> <OPTION SELECTED VALUE="0" STYLE="background: black; color: white">Black</OPTION> <OPTION VALUE="1" STYLE="background: brown; color: white">Brown</OPTION> <OPTION VALUE="2" STYLE="background: red; color: white">Red</OPTION> <OPTION VALUE="3" STYLE="background: orange; color: white">Orange</OPTION> <OPTION VALUE="4" STYLE="background: yellow; color: black">Yellow</OPTION> <OPTION VALUE="5" STYLE="background: green; color: white">Green</OPTION> <OPTION VALUE="6" STYLE="background: blue; color: white">Blue</OPTION> <OPTION VALUE="7" STYLE="background: purple; color: white">Purple</OPTION> <OPTION VALUE="8" STYLE="background: gray; color: white">Grey</OPTION> <OPTION VALUE="9" STYLE="background: white; color: black">White</OPTION> </SELECT> </TD> <TD> <SELECT NAME="multiplier" ONCHANGE="calculate(colour)"> <OPTION SELECTED VALUE="1" STYLE="background: black; color: white">Black</OPTION> <OPTION VALUE="10" STYLE="background: brown; color: white">Brown</OPTION> <OPTION VALUE="100" STYLE="background: red; color: white">Red</OPTION> <OPTION VALUE="1000" STYLE="background: orange; color: white">Orange</OPTION> <OPTION VALUE="10000" STYLE="background: yellow; color: black">Yellow</OPTION> <OPTION VALUE="100000" STYLE="background: green; color: white">Green</OPTION> <OPTION VALUE="1000000" STYLE="background: blue; color: white">Blue</OPTION> <OPTION VALUE="0.1" STYLE="background: gold; color: black">Gold</OPTION> <OPTION VALUE="0.01" STYLE="background: silver; color: black">Silver</OPTION> </SELECT> </TD> <TD> <SELECT NAME="tolerance" ONCHANGE="calculate(colour)"> <OPTION SELECTED VALUE="Ω 5%" STYLE="background: gold; color; black">Gold</OPTION> <OPTION VALUE="Ω 10%" STYLE="background: silver; color; black">Silver</OPTION> <OPTION VALUE="Ω 2%" STYLE="background: red; color; white">Red</OPTION> <OPTION VALUE="Ω 1%" STYLE="background: brown; color; white">Brown</OPTION> </SELECT> </TD> </TR> </TABLE> <BR> <P ALIGN="center"> Resistance: <INPUT TYPE="text" NAME="result"> <P ALIGN="center"> <INPUT TYPE="reset"> </FORM> </BODY> </HTML>
Feel free to contribute more futures
It acts as an open-source, Qt portrait replacement for the offscr package in extras.
http://wiki.maemo.org/Bander
Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -
Before posting or starting a thread please try this.
Last edited by sixwheeledbeast; 2014-04-18 at 09:33.