-
Posts
1903 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by fiveworlds
-
Oops didn't look to be honest I just saw the thread link on the main page.
-
Sometimes. Not really you have validators that do a pretty good job of making sure your code is correct. Also most integrated development environment have all sorts of error checking methods programmed in to highlight potential errors. Even notepad++ has error checking and code suggestion for tons of languages.
-
Where can I buy tiny push to make switches. The volume down switch fell off my android tablet's circuit board. Tried to solder it back onto the board but I melted it. Edit: Found the exact button online.
-
I have never even heard of one before.
-
No it isn't because there is no current at exchange current density. It is merely a description of a chemical reaction rates happening at equilibrium.
-
https://en.wikipedia.org/wiki/Tafel_equation Well if adding an electrocatalyst changes the reaction rate then logically adding/removing an electrocatalyst must change the exchange current density.
-
The same as for changes in reaction rate. Temperature for instance plays a major factor. Batteries that work well in the uk won't work well in the Sahara desert the battery life is shorter because the reaction occurs faster.
-
You calculate the cell emf. I am using an example from https://www.chem.wisc.edu/deptfiles/genchem/netorial/rottosen/tutorial/modules/electrochemistry/05potential/18_52.htm oxidation Zn(s)Zn2+(aq) + 2e–E° = 0.763 V reduction 2 [ 1 e– + Ag+(aq) Ag (s) ] E° = 0.337 V sum net Zn(s) + 2 Ag+(aq) 2 Ag(s) + Zn2+(aq) E° = 1.100 V Then you calculate the emf using a multi-meter. You would expect the emf to be the same as the theoretical value obtained from the chemical equation. However it turns out to be different and this difference is called the over-potential. So basically with over-potential they are talking about rates of reaction in over-complicated technobabble. So when talking about electrocatalysts are you need to remember what catalysts are. They speed up the rate of a reaction/control the reaction in some way. Also there are reasons for not adding catalysts which would slow down the reaction increasing battery life.
-
No religion means no spouting gibberish you have absolutely no proof of.
-
Everyone knows the Vatican is minted. But exactly how minted??.....
-
Aren't they 90% roman catholic??
-
Not annihilating just that they have to leave. There are plenty of religious countries that kick out other religions.
-
So you do get bothered by them then. I get various groups knocking on my door trying to convert me. I want one where religion is illegal and people are exiled for practicing it.
-
Is there any country in the world I can go to where I won't be bothered by religious people.
-
If your monitor has a 60hz display it is capable of running 60 frames per second. If you set your graphics card with a 30 frames per second limit it will not go over 30 frames per second and it will not display each rendered frame twice. For instance if you watch a movie at 60 frames per second you will only see a maximum of 30 frames per second only half of the frames will be displayed the movie does not increase in duration. So basically your graphics card would "discard" every second frame. Which is fine for most things however certain things require faster frame rate to look normal for instance a dropped ball bouncing.
-
According to http://www.geforce.com/hardware/technology/adaptive-vsync/technology when Vsync is on the frame rate is set just below your monitor's refresh rate. As you may or may not know your monitor may only be capable of running x frames per second. When Vsync is off the frame rate can go above the maximum frame rate of your monitor causing glitchy effects.
-
I'm not sure how to even start with 3D there isn't many tutorials on 3Dsvg I did manage to find one though http://www.lutanho.net/svgvml3d/ using a platonic solids.
-
Ok?? why would you use a pseudonym to hide your identity online anyway?? I only use one because I play a lot of video games and oftentimes they require using a unique username and lots of people have my name. Also as far as I am aware all I need to do to change my name here is just use the name so I can call myself anything I want. So basically you don't have freedom of speech where you are why not leave the country for somewhere that does???
-
Finally finished it. Getting the maths right was hard haven't done it in ages. Still a bit messy though but it works.. <script> function toFixed(x) { if (Math.abs(x) < 1.0) { var e = parseInt(x.toString().split('e-')[1]); if (e) { x *= Math.pow(10,e-1); x = '0.' + (new Array(e)).join('0') + x.toString().substring(2); } } else { var e = parseInt(x.toString().split('+')[1]); if (e > 20) { e -= 20; x /= Math.pow(10,e); x += (new Array(e+1)).join('0'); } } return x; } function closest (num, arr) { var curr = arr[0]; var diff = Math.abs (num - curr); for (var val = 0; val < arr.length; val++) { var newdiff = Math.abs (num - arr[val]); if (newdiff < diff) { diff = newdiff; curr = val; } } return curr; } var lookuparea= []; var angles = []; for(i = 1; i < 5001; i+=1){ angle= (i*360)/10000; percentage=i/100; radseg = angle * (Math.PI / 180); r=1; area=((1/2)*r*r)*(radseg-Math.sin(radseg)); lookuparea.push(toFixed(area)); angles.push(angle); } var arc=0; var width = 200; var height = width; var startx=100; var starty=100; var radius=90; var piechart=""; var percentages=[10,20,20,20,20,10]; var lastpercentage=0; var beginning = "<svg width='" + width + "' height='" + height + "'>"; var end = "</svg>"; var movex = 10; for (i = 0; i < percentages.length; i += 1) { arc=0; percentage=percentages[i]+lastpercentage; color = '#' + (0x1000000 + (Math.random()) * 0xffffff).toString(16).substr(1,6); if(percentage < 50 ){ area = Math.PI*(percentage/100); test = closest (area, lookuparea); radseg = (angles[test] * (Math.PI / 180))/2; y=Math.abs(Math.cos(radseg)*radius); x=Math.sin(radseg)*radius; y=starty-y; secondx=startx-x; x=x+startx; if(i==0){ piechart += "<path d=\"M" + x + "," + y; piechart += " L" +secondx + " , " + y; piechart += " A" + radius + " , " + radius + " 0 " + arc + " , " + " 1 " + x + " , " + y; piechart += " z\" "; piechart += " fill=\"" + color + "\" stroke=\"black\" stroke-width=\"1\" "; piechart += " fill-opacity=\"1\" stroke-linejoin=\"round\" />"; } else{ piechart += "<path d=\"M" + x + "," + y; piechart += " L" +secondx + " , " + y; piechart += " A" + radius + " , " + radius + " 0 " + arc + " , " + " 1 " + lastsecondx + " , " + lasty; piechart += " L" +lastx + " , " + lasty; piechart += " A" + radius + " , " + radius + " 0 " + arc + " , " + " 1 " + x + " , " + y; piechart += " z\" "; piechart += " fill=\"" + color + "\" stroke=\"black\" stroke-width=\"1\" "; piechart += " fill-opacity=\"1\" stroke-linejoin=\"round\" />"; } lastpercentage=percentage; lastx=x; lastsecondx=secondx; lasty=y; } else if(percentage == 100){ if(i==0){ piechart += "<circle cx="+startx+" cy="+starty+" r="+radius+" stroke=black stroke-width=1 fill="+color+" />"; } else{ piechart += "<path d=\"M" + lastsecondx + "," + lasty; piechart += " L" +lastx + " , " + lasty; piechart += " A" + radius + " , " + radius + " 0 " + arc + " , " + " 1 " + lastsecondx + " , " + lasty; piechart += " z\" "; piechart += " fill=\"" + color + "\" stroke=\"black\" stroke-width=\"1\" "; piechart += " fill-opacity=\"1\" stroke-linejoin=\"round\" />"; lastpercentage=percentage; lastx=x; lastsecondx=secondx; lasty=y; } } else if(percentage > 50 ){ lastpercentage=percentage; temppercentage=100-percentage; area = Math.PI*temppercentage/100; test = closest (area, lookuparea); radseg = (angles[test] * (Math.PI / 180))/2; y=(Math.cos(radseg)*radius)+starty; x=(Math.sin(radseg)*radius); secondx = startx - x; x= x + startx; if(i == 0 ){ arc=1; piechart += "<path d=\"M" + x + "," + y; piechart += " L" +secondx + " , " + y; piechart += " A" + radius + " , " + radius + " 0 " + arc + " , " + " 1 " + x + " , " + y; piechart += " z\" "; piechart += " fill=\"" + color + "\" stroke=\"black\" stroke-width=\"1\" "; piechart += " fill-opacity=\"1\" stroke-linejoin=\"round\" />"; } else{ piechart += "<path d=\"M" + x + "," + y; piechart += " L" +secondx + " , " + y; piechart += " A" + radius + " , " + radius + " 0 " + arc + " , " + " 1 " + lastsecondx + " , " + lasty; piechart += " L" +lastx + " , " + lasty; piechart += " A" + radius + " , " + radius + " 0 " + arc + " , " + " 1 " + x + " , " + y; piechart += " z\" "; piechart += " fill=\"" + color + "\" stroke=\"black\" stroke-width=\"1\" "; piechart += " fill-opacity=\"1\" stroke-linejoin=\"round\" />"; } lastpercentage=percentage; lastx=x; lastsecondx=secondx; lasty=y; } else if(percentage == 50 && i==0){ y=starty; secondx = startx - radius; x= radius + startx; piechart += "\n"; piechart += "<path d=\"M" + x + "," + y; piechart += " L" +secondx + " , " + y; piechart += " A" + radius + " , " + radius + " 0 " + arc + " , " + " 1 " + x + " , " + y; piechart += " z\" "; piechart += " fill=\"" + color + "\" stroke=\"black\" stroke-width=\"1\" "; piechart += " fill-opacity=\"1\" stroke-linejoin=\"round\" />"; lastpercentage=percentage; lastx=x; lastsecondx=secondx; lasty=y; } else if(percentage==50){ secondx = startx - radius; x= radius + startx; y=starty; piechart += "<path d=\"M" + x + "," + y; piechart += " L" +secondx + " , " + y; piechart += " A" + radius + " , " + radius + " 0 " + arc + " , " + " 1 " + lastsecondx + " , " + lasty; piechart += " L" +lastx + " , " + lasty; piechart += " A" + radius + " , " + radius + " 0 " + arc + " , " + " 1 " + x + " , " + y; piechart += " z\" "; piechart += " fill=\"" + color + "\" stroke=\"black\" stroke-width=\"1\" "; piechart += " fill-opacity=\"1\" stroke-linejoin=\"round\" />"; lastpercentage=percentage; lastx=x; lastsecondx=secondx; lasty=y; } } document.write(beginning + piechart + end); </script> <body>
-
The desktop vs laptop argument has been going for a while. Desktops 1. Generally have better cooling which can increase the life of a computer. 2. Tend to be easier to repair (without specialist tools) 3. Any old screen with a hdmi/vga port will work. 4. All in all can be far more powerful for instance my computer has 10 terabytes of hard drive (started with 1TB) space now and the maximum ram for a windows 7 machine. I can easily get a new part when I have the money or even when an old play-station goes bust (I am using 2 old play-station 3 hard drives). Laptops 1. Are portable. 2. Can be used in bed. 3. Have a battery and so can be taken anywhere. (You can usually replace the batteries 8 Duracell (AA) in the battery pack cheaply to buy the battery pack can be expensive) 4. Generally require specialist tools to repair (alienware etc) 5. Have bad cooling. As far as performance is concerned though for ordinary everyday tasks you won't notice much difference anymore. That is because computers are actually more than powerful enough to run most everyday tasks at the moment. What I mean is that in recent years programs haven't really been using much more power while cpus have gotten way faster. The evidence of this is where you have one computer running 8 or 9 instances of a game on multiple screens multiplayer. I would recommend getting a laptop with a graphics card though.
-
I explained what I am doing badly here. I am generating an array of values for area from 0 to pi and the angle associated with it. Using the array (lookup table) I can find the angle to a certain precision. Since it is an svg online I don't need it to be 100% correct so I just get the closest value I generated and use that for my angle. <script> function toFixed(x) { if (Math.abs(x) < 1.0) { var e = parseInt(x.toString().split('e-')[1]); if (e) { x *= Math.pow(10,e-1); x = '0.' + (new Array(e)).join('0') + x.toString().substring(2); } } else { var e = parseInt(x.toString().split('+')[1]); if (e > 20) { e -= 20; x /= Math.pow(10,e); x += (new Array(e+1)).join('0'); } } return x; } function closest (num, arr) { var curr = arr[0]; var diff = Math.abs (num - curr); for (var val = 0; val < arr.length; val++) { var newdiff = Math.abs (num - arr[val]); if (newdiff < diff) { diff = newdiff; curr = val; } } return curr; } var lookuparea= []; var angles = []; for(i = 1; i < 5001; i+=1){ angle= (i*360)/10000; percentage=i/100; radseg = angle * (Math.PI / 180); r=1; area=((1/2)*r*r)*(radseg-Math.sin(radseg)); document.write("percentage: "+percentage+" area: "+toFixed(area)+" angle: "+angle+"</br>"); lookuparea.push(toFixed(area)); angles.push(angle); } startx=0; starty=10; percentages=[25,25,25]; lastpercentage=0; for (i = 0; i < percentages.length; i += 1) { percentage=percentages[i]+lastpercentage; if(percentage < 50){ area = Math.PI*percentage/100; test = closest (area, lookuparea) document.write(test+"</br></br>"); document.write(angles[test]+"</br></br>"); radseg = angles[test] * (Math.PI / 180); y=Math.cos(radseg)-starty; x=Math.sin(radseg)+startx; document.write("x: "+x+" y: "+y+"</br>x: "+-x+" y: "+y+"</br>"); lastpercentage=percentage; } else if(percentage==50){ x=0; y=0; document.write("x: "+x+" y: "+y+"</br>x: "+-x+" y: "+y+"</br>"); lastpercentage=percentage; } else if(percentage < 100){ lastpercentage=percentage; percentage=100-percentage; area = Math.PI*percentage/100; test = closest (area, lookuparea) document.write(test+"</br></br>"); document.write(angles[test]+"</br></br>"); radseg = angles[test] * (Math.PI / 180); y=(Math.cos(radseg)*-1)+starty; x=Math.sin(radseg); //points document.write("x: "+x+" y: "+y+"</br>x: "+-x+" y: "+y+"</br>"); } } </script> So for this I know trig doesn't work for 180 degrees because there is no right angled triangle. Also greater than 50% i need to change things around.
-
It was a very cool solution to it too. This is how far I am at the moment. It is every other line i need to work out now.
-
Well you could but I am using svg or scalable vector graphics which doesn't use pixels.
-
Thanks I'll test that out tomorrow. What I found was the formula Area of Segment = ½ × ( (θ × π/180) - sin θ) × r2 I could also see from looking at the formula that it (A) Won't work over 50% of the area without some tweaking (B) I have to find θ which is going to be a pain because I need an exact value which wolfram gives multiple values for http://www.wolframalpha.com/input/?i=200%3D%28%CE%B8+%C3%97+%CF%80%2F180%29+-+sin+%CE%B8 If I work out how to find θ I can find the height of the triangle the segment makes with the circle centre. Given h I can draw the line at h.