Jump to content

fiveworlds

Senior Members
  • Posts

    1903
  • Joined

  • Last visited

Everything posted by fiveworlds

  1. That depends on how how quickly you need them if you make everything yourself then it will be less expensive. If not you can get suits that would work with a bit of alteration for about €2100 (they are kind of a niche product and only rich people buy them).
  2. Have you tried using a different keyboard or checking for malware running on startup/delayed start?
  3. That would definitely work. Yeah it appears as though alot of this is done by networking equipment. However most don't allow you to redirect the user to 127.0.0.1 or elsewhere they just deny the request.
  4. Hi, I was wondering is there any dns program that allows you to implement access control lists to only certain webpages or ban certain ip addresses so that the attacker recieves a random loopback address instead of my ipaddress?
  5. Unless you install something weird they can't most people don't have static ip addresses anyway.
  6. You could use 1 variable resistor which rotates when the bag is punched then a microcontroller to count the punches etc.
  7. C5 in this case refers to the fifth cervical nerve. Unlike spinal vertebrae C1-C7 cervical nerves go from C1-C8 with C8 being below C7(spinal vertebrae). In anatomy the posterior is always the back of a persons body. The Dorsal scapular nerve originates from the posterior aspect (facing your back) of the fifth cervical nerve (C5) which emerges above C5 (spinal vertebrae). I can't say because you haven't provided sufficient information about what the author was talking about.
  8. I remember people here saying before that we only need something like 40 digits of pi to calculate everything to 100% accuracy so I would assume that if something goes beyond a 40 digit decimal then it is fairly safe to call it zero.
  9. Since we are on the topic of grenades I thought up of a grenade with 360 degree cameras and a gun which when thrown into an enemy trench would randomly pick a path through the trench until it runs out of bullets or batteries. Would this work?
  10. Farming animals such as cows can lead to global warming however do fish contribute to global warming?
  11. Not true I can imagine many devices which would be secure on a network. For instance you can prevent data recieved via the network from ever being able to make changes to your device.
  12. Yeah I knew that before I posted just wanted to know if there was a solution to the xmlhttp problem I ran into. This project might be ok to put into php but I may run into other instances where I might need xmlhttp to be a bit more reliable. Only xmlhttp is unreliable so the less data you have to send with it the better so generating the html with javascript is ok what I should have done though is have the generator function in php, only print the 33 lines I need and use numbers for the classnames.
  13. I would definitely be using MySQL once it is finished this isn't anywhere near finished. file_put_contents is one line of code that makes it easy to see exactly what data I am getting. Other changes that could be made would be that the generator function is updating the dom alot and it should only really need to update it once. Also I probably don't need to send as strings xmlhttp allows you to send typed arrays of 8 and 16 bit integers which would be less data to send. Refresh then. Generator input the number 10000 wait for it open data.txt (I am using notepad++) and you should have at least one error in the file. Low numbers may not generate the error but 10000 should.
  14. It only needs to use php to scroll. It generates all values fine and console.log gives the correct value but when php saves the data it is messed up. The scrolling should work if the data saved in data.txt is correct. Javascript should send php the line number and get 33 lines back which then are used to update the table. That said the php does need to be updated to handle when you are near the end of the file. I haven't written that yet because of this problem. Also even if the data saved in the data.txt file is 100% correct it will still sometimes fail to retrieve the data correctly. It is supposed to be like that.
  15. Okay, that is no problem. Yeah maybe if I wrote changed the javascript to buffer the data and send in blocks of a fixed size like 100 lines or something. It shouldn't be hard to test. roulette.zip
  16. So I put all the data into a single request but that messes everything up just as much. document.getElementById("generatorform").addEventListener('submit', function (ev) { ev.preventDefault(); if (document.getElementById("generator").value % 1 === 0) { resetRepeats(); var spins; for (spins = 0; spins < document.getElementById("generator").value; spins = spins + 1) { generator(Math.floor(Math.random() * 37), spins); } formData = new FormData(); formData.append("formData", edata); request = new XMLHttpRequest(); request.open("POST", "request.php"); request.send(formData); request.onreadystatechange = function () { if (this.readyState === 4 && this.status === 200) { edata = ""; } }; fillRepeats(spins); } }); ​I'm guessing it is because TCP has a max packet size so therefore it is cutting the data into sections and reassembling it out of order. It is basically a slot machine which can generate loads of spins.
  17. Hey, I am generating a stream of data and using xmlhttp to send data to php backend to be saved on a new line. Each line is numbered incrementally sometimes I have instances where 6 is after 8 in my file and sometimes the line is missing entirely or has truncated data and messes up the whole program. Note that the xmlhttp requests are only sent locally and not over the internet so I am unsure why some lines would be weird like that. Has anybody here had a problem with this before? There could be maybe 100000+ requests but even one messing up is a problem. It seems to work fine in edge browser but chrome misses some requests and firefox is missing a lot of requests and I am not sure why there is zero errors being thrown. Below is an image of the problem as you can see the data is getting truncated which results in swapping numbers and class names and even one bug messes everything up. If it helps the data I am getting from php is in csv format number,classname,etc... so in the case of the above image number, and half of greys was missing.
  18. Just in america or worldwide? The college I am in at the moment has massive workshops and machines for making pretty much anything and garages for fixing vehicles and in secondary school technology (a mix of woodwork and metalwork) was mandatory for all first years.
  19. Vacuum tubes used high voltages which would fry the logic gates if the power source was hooked up to the computer directly. Vacuum tubes of the time were also rectifiers in that they could convert an alternating current radio signal into direct current which could then be used to record music onto tapes/records.
  20. Science is about understanding things. Computer science teaches you to understand how computers work. You could say computer science degrees aren't really science because at the end of the course you don't understand how a computer works or how to put a computer together yourself.
  21. It is even faster to not use a function for it at all. It only saves like 0.2 ms on my computer though. Anyway the addon passed review by mozilla https://addons.mozilla.org/en-US/firefox/addon/beallslist/ chrome webstore isn't accepting new addons at the moment for anything other than chrome OS. beallslist.zip
  22. Yeah that's a great idea. Okay so that is updated to use binary-search. beallslist.zip
  23. Firefox and Chrome plug-ins are mostly javascript. Anyway I have the plugins for firefox, chrome and micosoft edge. bealls_list-1.0-an+fx-windows.zip beallslist.zip
  24. I wrote an algorithm for the subset sum problem that writes a polynomial time algorithm to solve a single number set. It still takes a long time to write the algorithm though. It makes use of ranges. <script> var numbers = [1,2,-20,12,1,23,12,11,2,4,6,8,123,1298,141,211,12000,22222222,284871581091,849186386108689,9007199254740991]; var positiveEven = [],negativeEven = [], smallest; var positiveOdd = [], negativeOdd = [], largest; var sumarray = []; var ranges = [], useRanges = true, useArrays = false, useBinarySearch = false; var iterations = 0; function polynomialFunctionGenerator(){ function useRanges(){ var firstnumber = sumarray[0]; var k = 0; for(var i = 0; i < sumarray.length; i++){ if(sumarray[i]+1 === sumarray[i+1]){ } else { ranges[k]=[firstnumber,sumarray[i]]; if(sumarray[i+1] != undefined){ firstnumber = sumarray[i+1]; } k++; } } document.write(sumarray.length + "</br>"); } function useArrays(){ smallest = sumarray[0]; largest = sumarray.pop(); for(var i = 1; i < sumarray.length; i++){ if(sumarray[i]%2 === 0){ if(sumarray[i] < 0){ negativeEven.push(sumarray[i]); } else { positiveEven.push(sumarray[i]); } } else { if(sumarray[i] < 0){ negativeOdd.push(sumarray[i]); } else { positiveOdd.push(sumarray[i]); } } } } function sortfunction(a, b){return (a - b)} var array = []; for(var i = 0; i < numbers.length; i++){ array.push(numbers[i]); for(var k = i + 1; k < numbers.length; k++){ var length = array.length; for(var t = 0; t < length; t++){ var sum = array[t]+numbers[k]; array.push(sum); iterations = iterations + 1; } } for(var k = 0; k < array.length; k++){ if(sumarray.indexOf(array[k])== -1){ sumarray.push(array[k]); } } array = []; } sumarray.sort(sortfunction); document.write(sumarray.length); if(useRanges){useRanges();} else if(useArrays){useArrays();} } function binarySearch(searchElement, searchArray) { 'use strict'; var stop = searchArray.length; var last, p = 0, delta = 0; do { last = p; if (searchArray[p] > searchElement) { stop = p + 1; p -= delta; } else if (searchArray[p] === searchElement) { // FOUND A MATCH! return p; } delta = Math.floor((stop - p) / 2); p += delta; //if delta = 0, p is not modified and loop exits }while (last !== p); return -1; //nothing found }; function Sum(expectedsum){ if(expectedsum > largest){ return "Too Big";} if(expectedsum < smallest){ return "Too Small";} if(useBinarySearch){ if(binarySearch(expectedsum,sumarray) != -1){ return true; } }else if(useRanges){ for(var i = 0; i < ranges.length; i++) { if((expectedsum > ranges[i][0]-1) && (expectedsum < ranges[i][1]+1)){ return true; } } }else if(useArrays){ if(expectedsum%2 === 0){ if(positiveEven.indexOf(expectedsum) != -1){ return true; } if(negativeEven.indexOf(expectedsum) != -1){ return true; } } else if(positiveOdd.indexOf(expectedsum) != -1){ return true; } else if (negativeOdd.indexOf(expectedsum) != -1){ return true; } } return false; } polynomialFunctionGenerator(); document.write(iterations + "</br>"); document.write(ranges + "</br>"); if(useRanges){ document.write( "Number of Ranges:" + ranges.length + "</br>" + "Total Numbers:" + numbers.length + "</br>" + "Worst Case Runtime:" + (ranges.length/numbers.length) + "N</br></br>" ); } else if (useArrays){ document.write( "largest:" + largest + "</br>" + "smallest:" + smallest + "</br>" + "Positive Even Numbers:" + positiveEven.length + "</br>" + "Positive Odd Numbers:" + positiveOdd.length + "</br>" + "Negative Even Numbers:" + negativeEven.length + "</br>" + "Negative Odd Numbers:" + negativeOdd.length + "</br>" + "Total Numbers:" + numbers.length + "</br>" + "Worst Case Runtime:" + (Math.max.apply(Math,[positiveEven.length,positiveOdd.length,negativeEven.length,negativeOdd.length])/numbers.length) + "N</br></br>" ); } for(var x=-22; x<500;x++){ document.write(x+" :"+Sum(x) + "</br>"); } </script> This perticular case had the following results Number of numbers: 2588325883 Number of iterations: 2097130 Number of Ranges:4467 Total Numbers:21 Worst Case Runtime:212.71428571428572N I think the useArrays part can be made faster by using primenumbers.
  25. Chemistry is useful for a lot of things like cooking, how an internal combustion engine works, how much chlorine to put in a pool, testing if the tap water is drinkable, how much medication you should take and when etc. There is definitely uses for basic chemistry knowledge some of it I think everybody should know.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.