ITalianBadBoy 35 Posted March 25, 2017 Report post Posted March 25, 2017 3 hours ago, MightyHoot said: yyy you don't have that data The line graph at the top center was calculated with the "Average In A Battle" multiplied per battles. The line graph at the bottom left and bottom right were calculated with the frequencies of "Average Time For" multiplied per hours. Spoiler What's the average kill in one hour? TimeFor1Kill = TotalBattleTime / TotalKill XKill : TimeForXKill = 1Kill : TimeFor1Kill number : time = number : time X : 1Hour = 1 : TimeFor1Kill number : time = number : time X = 1 / TimeFor1Kill * 1Hour number = number / time * time X = 1 * 1Hour / TimeFor1Kill number = number * time / time KillIn1Hour = 1Hour / TimeFor1Kill number = time / time myObj.data.pvp.HK = (3600000 / myObj.data.pvp.KillTime).toFixed(2); Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted March 26, 2017 Report post Posted March 26, 2017 Added the "Average Probability For" and the relative chart. In the chart you'll find the probability of kill, die and assist 0/5, 1/5, 2/5, 3/5 , 4/5 and 5/5. The graph's values are calculated using a binomial distribution. Spoiler function DoBi(n, x, p) { return binomial(n, x) * Math.pow(p, x) * Math.pow(1 - p, n - x); } function binomial(n, k) { var x, coeff = 1; for (x = n-k+1; x <= n; x++) coeff *= x; for (x = 1; x <= k; x++) coeff /= x; return coeff; } Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted March 29, 2017 Report post Posted March 29, 2017 Added 95 custom images of the corp. The Img are uploaded in a Imgur Album available to anyone. The ID is i8Q2q If there's any problems with your custom logo write it here, i'll fix it as soon as possible. Improvements of code and layout afterwards. Spoiler function GetImg() { TextArea = document.getElementById("TextArea"); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4) { TextArea.value +="\n- Img Corp loaded and ready."; TextArea.scrollTop = TextArea.scrollHeight; ImgCorp = JSON.parse(this.responseText); console.log(ImgCorp); } }; xmlhttp.open("GET", "https://api.imgur.com/3/album/i8Q2q/images", true); xmlhttp.setRequestHeader("Authorization","Client-ID xxxx"); xmlhttp.setRequestHeader("Accept","application/json"); xmlhttp.send(); return; } 2 Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted March 30, 2017 Report post Posted March 30, 2017 How to download the world in an instant XD Wonderful! :3 Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted March 31, 2017 Report post Posted March 31, 2017 Implemented the locally store of the image's index for 1 day. For to improve the loading of the corporations images and decrease the requests to the Imgur server. Spoiler function LoadIDImgCorp() { var ImgTime, TimeNow = new Date().getTime(), Day = 24 * 60 * 60 * 1000; if (typeof(Storage) !== "undefined") if (localStorage.IDImgCorp && localStorage.IDImgTime) { ImgTime = Number(localStorage.getItem('IDImgTime')); if (ImgTime + Day > TimeNow) { ImgCorp = JSON.parse(localStorage.getItem('IDImgCorp')); TextArea.value +="\n- IDImgCorp loaded from memory."; return; } TextArea.value +="\n- IDImgCorp not loaded, older than a day."; } TextArea.value +="\n- IDImgCorp not found in memory."; GetImg(); return; } function GetImg() { var TimeNow, xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { ImgCorp = JSON.parse(this.responseText); TextArea.value +="\n- Img Corp loaded and ready."; if (Tag) PrintImgCorp(); if (typeof(Storage) !== 'undefined') { TimeNow = new Date().getTime(); localStorage.setItem('IDImgTime', TimeNow); localStorage.setItem('IDImgCorp', this.responseText); TextArea.value +="\n- Img Corp uploaded in local storage."; } TextArea.scrollTop = TextArea.scrollHeight; console.log(ImgCorp); } }; xmlhttp.open("GET", "https://api.imgur.com/3/album/i8Q2q/images", true); xmlhttp.setRequestHeader("Authorization","Client-ID xxx"); xmlhttp.setRequestHeader("Accept","application/json"); xmlhttp.send(); return; } Share this post Link to post Share on other sites
Johnnynator1 147 Posted March 31, 2017 Report post Posted March 31, 2017 Why did you added a captcha, they are just stupidly annoing since it takes like 1min to solve them since the solution is never what it should be. Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted March 31, 2017 Report post Posted March 31, 2017 The reCAPTCHA protect the site against spam and other types of automated abuse. I can try to add a new version: "Invisible reCAPTCHA" does not require the user to click on a checkbox. Share this post Link to post Share on other sites
Johnnynator1 147 Posted March 31, 2017 Report post Posted March 31, 2017 46 minutes ago, ITalianBadBoy said: The reCAPTCHA protect the site against spam and other types of automated abuse. I can try to add a new version: "Invisible reCAPTCHA" does not require the user to click on a checkbox. I don*t have a problem with clicking a box, I have only the problem that the box always says I'm a robot and I have to solve a puzzle. And do you really think that anyone would spam this site by making autonatic player stats requests? Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted April 1, 2017 Report post Posted April 1, 2017 12 hours ago, John161 said: And do you really think that anyone would spam this site by making autonatic player stats requests? I don't think that there is anyone with this interest. And even if it happens, a request every 10 seconds, would not be a problem. I must to implement in the client a system that prevents at a botnet to make a Distributed Denial of Service (DDoS) at the Star Conflict API. 12 hours ago, John161 said: I don*t have a problem with clicking a box, I have only the problem that the box always says I'm a robot and I have to solve a puzzle. However, several players have informed me that they have the same discomfort in solving this puzzle. We are working on a system that demands solving the reCAPTCHA after 10 inputs or that requires only once at the beginning. Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted April 1, 2017 Report post Posted April 1, 2017 Changed the comportment of the reCAPTCHA. Now after the first check it will hide. Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted April 2, 2017 Report post Posted April 2, 2017 Tool will be unavailable for a few hours. The reason is because we are changing the content management system (CMS) ... Enabled the FTP, database with phpmyadmin, the protections of CloudFlare and a personal site API for verifying the user's response of the reCAPTCHA . Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted April 4, 2017 Report post Posted April 4, 2017 Performed a modification to the upper part of the layout, added a checkbox for to display the advanced information: Several improvements to the code, in particular a filter was added at the nickname for to remove special characters: (In order to prevent illegitimate requests: Cross-site Scripting attacks) NickName = document.getElementById('NickName').value.replace(/[^\w\s]/gi, ''); Then write "ItalianBadBoy" or "@It*a%lian(Bad)Boy!" is the same. Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted April 7, 2017 Report post Posted April 7, 2017 Implemented CryptoJS and improved the storage of the images index: The data are saved to gether the checksum for to verify its integrity. (SHA3) Before of saving the data are encrypted with a public key. (AES) So the ID and URL of the corporations images will be kept in local memory for a week, when it's possible. Spoiler /* <script src='http://it4ly.altervista.org/CryptoJS/core.js'></script> <script src='http://it4ly.altervista.org/CryptoJS/x64-core.js'></script> <script src='http://it4ly.altervista.org/CryptoJS/sha3.js'></script> <script src='http://it4ly.altervista.org/CryptoJS/evpkdf.js'></script> <script src='http://it4ly.altervista.org/CryptoJS/cipher-core.js'></script> <script src='http://it4ly.altervista.org/CryptoJS/aes.js'></script> <script src='http://it4ly.altervista.org/CryptoJS/enc-base64.js'></script> <script src='http://it4ly.altervista.org/CryptoJS/ObjFormatter.js'></script> */ function LoadIDImg() { var Now = {Time: new Date().getTime()}, Days = 7 * 24 * 60 * 60 * 1000, key = CryptoJS.enc.Base64.parse('xxxxx'), // 256 bit iv = CryptoJS.enc.Base64.parse('xxxxx'); // 256 bit AdvText.value +='\n- Tool: '; try { if(typeof(Storage) === 'undefined') throw "Can't access to the memory."; if(typeof(localStorage.IDImgCorp) === 'undefined') throw 'IDImgCorp not found in memory.'; var IDImgCorp = JSON.parse(localStorage.getItem('IDImgCorp')); if (IDImgCorp.Time + Days < Now.Time) throw 'IDImgCorp not loaded, older than a week.'; Now.Data = CryptoJS.AES.decrypt(ObjFormatter.toCipher(IDImgCorp.Data), key, {iv : iv}); Now.Data = Now.Data.toString(CryptoJS.enc.Utf8); Now.Checksum = CryptoJS.SHA3(Now.Data).toString(); if (IDImgCorp.Checksum !== Now.Checksum) throw 'IDImgCorp not loaded, damaged.'; } catch(err) { AdvText.value += err; return(false); } ImgCorp = JSON.parse(Now.Data); AdvText.value +='IDImgCorp loaded from memory.'; return(true); } function UpLoadIDImg(JSONData) { var key = CryptoJS.enc.Base64.parse('xxxxx'), // 256 bit iv = CryptoJS.enc.Base64.parse('xxxxx'); // 256 bit AdvText.value +='\n- Tool: '; try { if (typeof(Storage) === 'undefined') throw "Can't access to the memory."; var IDImgCorp = { Time: new Date().getTime(), Checksum: CryptoJS.SHA3(JSONData).toString(), Data: ObjFormatter.toObj(CryptoJS.AES.encrypt(JSONData, key, {iv: iv})) }; localStorage.setItem('IDImgCorp', JSON.stringify(IDImgCorp)); } catch(err) { AdvText.value += err; return; } AdvText.value +='IDImgCorp uploaded in memory.'; return; } Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted April 21, 2017 Report post Posted April 21, 2017 Made several improvements: Changed the layout with a two-column for adaptation to the next update... The corporation logo has been slightly enlarged. Enlarge the graphics and add their titles. The graphics have been brought closer to the source data. Improved data loading for charts. The calculation weight of the binomial distribution has been reduced by 2/3. Enabled HTTPS protocol for secure access to CMS. Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted April 23, 2017 Report post Posted April 23, 2017 To increase the speed and lighten the page loading we remove the link that led to the iFrame in the Italian forum. Now the link goes directly to the tool. Added an anti-brute force plugin. Fixed some HTML writing errors. Share this post Link to post Share on other sites
MightyHoot 137 Posted April 26, 2017 Report post Posted April 26, 2017 As you like graphs... you should add something like this 1 Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted April 28, 2017 Report post Posted April 28, 2017 It's really a good suggestion, i really like this radar chart! (Note taking) I would use only the charts provided by google and I don't see it in the Gallery. But maybe I can do it with the Area Chart and some trigonometry equation... I'll read and try some things Share this post Link to post Share on other sites
MightyHoot 137 Posted April 28, 2017 Report post Posted April 28, 2017 3 minutes ago, ITalianBadBoy said: It's really a good suggestion, i really like this radar chart! (Note taking) I would use only the charts provided by google and I don't see it in the Gallery. But maybe I can do it with the Area Chart and some trigonometry equation... I'll read and try some things I have no idea how those internet stuff are working but I'd love to get more pilot names coz 2k is not enough to make proper rating Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted April 28, 2017 Report post Posted April 28, 2017 Make various improvements and implementations to the code. Implemented the request, the calculation and the printing for n players. Added the second layout to make the comparison between two players. Entering two valid names will start the comparison function that will color green the best, red the worst and orange the same values. Added a scoring system: +1 for green; -1 for red; 0 for orange. Implemented the control and the block for blank or equal input. Added a progressing bar for when the tool is waiting for to run the second request. Reduced the functionality of some plugins to improve the page loading. Specifically when the tool will make a request for two players, it'll wait 3 seconds before sending the second request at the same API. it'll wait 3 seconds for blank or equal input too. If one of the two names is invalid, the comparison will be skipped. Activate Always Online™, If the server goes down, Cloudflare will serve the page. P.S. It's in preparation a third layout for to compare N players. Share this post Link to post Share on other sites
MightyHoot 137 Posted April 28, 2017 Report post Posted April 28, 2017 Anyidea why it doesn't work? Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted April 28, 2017 Report post Posted April 28, 2017 Good question! I tested the tool with Mozilla Firefox and Google Chrome and It works properly without giving any errors on the console. I just deleted the cache of AlterVista and of Cloudflare... Try to delete the temporary browser files and try to use the direct link to the tool: https://it4ly.altervista.org/ If the problem persists, could you make a screen of the error that pops up on your browser console? Or in the Adv.TextArea is there "- Google API: Verification unsuccessful."? Share this post Link to post Share on other sites
MightyHoot 137 Posted April 29, 2017 Report post Posted April 29, 2017 15 hours ago, ITalianBadBoy said: Good question! I tested the tool with Mozilla Firefox and Google Chrome and It works properly without giving any errors on the console. I just deleted the cache of AlterVista and of Cloudflare... Try to delete the temporary browser files and try to use the direct link to the tool: https://it4ly.altervista.org/ If the problem persists, could you make a screen of the error that pops up on your browser console? Or in the Adv.TextArea is there "- Google API: Verification unsuccessful."? Well didn't work for me btw If you like radar u can find this useful: Spoiler {'Assist/Death': {0.52084140270714152: 1, 1.041682805414283: 2, 1.8831543514908833: 3, 2.3837380845781917: 4, 3.3165866290018835: 5, 4.2494351734255753: 6, 4.7500189065128833: 7, 5.5914904525894826: 8, 6.8790701445793196: 9}, 'Assist/Game': {2.4308200681349801: 1, 3.9315302496469462: 2, 4.9122888966695788: 3, 5.4957332532533911: 4, 6.582994350282485: 5, 7.6702554473115789: 6, 8.2536998038953922: 7, 9.234458450918023: 8, 10.735168632429989: 9}, 'Cap points/Game': {0.034557026898883958: 1, 0.069114053797767916: 2, 0.13822810759553583: 3, 0.27645621519107166: 4, 3.1360546139359697: 5, 5.9956530126808678: 6, 7.5301662518675823: 7, 10.109653243763587: 8, 14.056661412967816: 9}, 'Death/Game': {0.68605485872486427: 9, 1.2132982706944038: 8, 1.5578674898182887: 7, 1.7628485694759859: 6, 2.1448352165725049: 5, 2.5268218636690238: 4, 2.7318029433267208: 3, 3.076372162450606: 2, 3.6036155744201457: 1}, 'Dmg/Game': {16737.810060766322: 1, 33475.620121532644: 2, 77508.304195756078: 3, 103702.94556479689: 4, 152517.222693032: 5, 201331.49982126712: 6, 227526.14119030791: 7, 271558.8252645313: 8, 338935.54175853543: 9}, 'Dmg/min': {3418.8081753865181: 1, 6837.6163507730362: 2, 12482.549924362744: 3, 15840.669321830981: 4, 22098.596986817327: 5, 28356.524651803673: 6, 31714.644049271912: 7, 37359.577622861616: 8, 45997.186185949118: 9}, 'Eff rating': {208.18091698839908: 1, 2131.4347136154315: 2, 3388.3381548652769: 3, 4136.0585260230873: 4, 5529.4515065913374: 5, 6922.8444871595875: 6, 7670.5648583173979: 7, 8827.468299567241: 8, 9000: 9}, 'Fleet Strength': {3.8031801963544218: 1, 7.6063603927088437: 2, 15.212720785417687: 3, 36.919492229900889: 4, 77.370527306967986: 5, 117.82156238403508: 6, 139.52833382851827: 7, 176.01699560557782: 8, 200: 9}, 'Heal/Game': {1660.4385197670263: 1, 3320.8770395340525: 2, 6641.7540790681051: 3, 12119.819814581471: 4, 22328.313039309684: 5, 32536.806264037896: 6, 38014.871999551266: 7, 47223.394249249875: 8, 61313.836519378863: 9}, 'Karma': {-155167.54600604234: 1, -87902.524093490516: 2, -43942.835743514443: 3, -17791.618863766853: 4, 30941.735795454544: 5, 79675.090454675941: 6, 105826.30733442353: 7, 149785.99568439956: 8, 217051.01759695139: 9}, 'Kill/Death': {0.070309292762993775: 1, 0.14061858552598755: 2, 0.2812371710519751: 3, 0.61142999289757005: 4, 1.2267514124293788: 5, 1.8420728319611874: 6, 2.1722656538067824: 7, 2.7273133829613121: 8, 3.576620988758112: 9}, 'Kill/Game': {0.29794280028037179: 1, 0.59588560056074358: 2, 1.2285857209851014: 3, 1.6049732407812651: 4, 2.306379472693032: 5, 3.0077857046047987: 6, 3.3841732244009624: 7, 4.0168733448253198: 8, 4.9850009422185755: 9}, 'Kills/min': {0.032051274658081524: 1, 0.064102549316163049: 2, 0.16990981146268583: 3, 0.23285358480832949: 4, 0.35015065913370996: 5, 0.46744773345909041: 6, 0.53039150680473413: 7, 0.63619876895125671: 8, 0.79810000333061404: 9}, 'Total assists': {771.86674847497125: 1, 1543.7334969499425: 2, 3087.466993899885: 3, 6174.93398779977: 4, 31021.364032697547: 5, 55867.794077595325: 6, 69200.846672378044: 7, 91613.449478421724: 8, 125908.14708554593: 9}, 'Total cap in CTB': {2363.1462036321482: 1, 4726.2924072642963: 2, 9452.5848145285927: 3, 18905.169629057185: 4, 37810.339258114371: 5, 79757.985285743052: 6, 102267.86576768989: 7, 140106.53825974953: 8, 198005.47316704519: 9}, 'Total deaths': {394.33793551374367: 9, 788.67587102748735: 8, 1577.3517420549747: 7, 3154.7034841099494: 6, 10268.026054590571: 5, 17381.348625071194: 4, 21198.488704530981: 3, 27615.027141455699: 2, 37433.308725399365: 1}, 'Total dmg': {1555640.7891735733: 1, 3111281.5783471465: 2, 6222563.156694293: 3, 12445126.313388586: 4, 710169784.52919018: 5, 1407894442.7449918: 6, 1782306362.1981213: 7, 2411685536.7642708: 8, 3374731580.9366684: 9}, 'Total games': {95.901289193075627: 1, 191.80257838615125: 2, 383.60515677230251: 3, 2278.2868023755254: 4, 5809.0667666916734: 5, 9339.8467310078213: 6, 11234.528376611044: 7, 14419.451473923571: 8, 19292.869142969368: 9}, 'Total heal': {6423045.9567875713: 1, 12846091.913575143: 2, 25692183.827150285: 3, 51384367.65430057: 4, 102768735.30860114: 5, 218183824.67519632: 6, 280117690.18326604: 7, 384227316.84284014: 8, 543530910.2353003: 9}, 'Total kills': {164.21821635968922: 1, 328.43643271937844: 2, 656.87286543875689: 3, 1313.7457308775138: 4, 13507.138304652644: 5, 25700.530878427773: 6, 32243.73021133805: 7, 43242.721379097537: 8, 60072.853932021106: 9}, 'Total lost': {209.44636584722673: 1, 418.89273169445346: 2, 837.78546338890692: 3, 1707.8105955909125: 4, 3329.1211267605636: 5, 4950.4316579302149: 6, 5820.4567901322207: 7, 7282.9521624934932: 8, 9520.792942566728: 9}, 'Total won': {132.10998694673219: 1, 264.21997389346438: 2, 528.43994778692877: 3, 1627.0971356385021: 4, 3674.4684159378039: 5, 5721.8396962371062: 6, 6820.4968840886795: 7, 8667.3183074855697: 8, 11493.236510643845: 9}, 'User ID': {99048.015404821024: 1, 198096.03080964205: 2, 727875.99906618707: 3, 1043037.2608595783: 4, 1630347.0451977402: 5, 2217656.829535902: 6, 2532818.0913292933: 7, 3062598.0595858376: 8, 3873242.1408154746: 9}, 'Win Ratio': {0.32990132659516402: 1, 0.38872597171200907: 2, 0.42716962330252334: 3, 0.45003940032162132: 4, 0.49265772128060265: 5, 0.53527604223958392: 6, 0.5581458192586819: 7, 0.59658947084919611: 8, 0.65541411596604127: 9}, 'Win/Loss': {0.035000941632330751: 1, 0.070001883264661502: 2, 0.42062392929425152: 3, 0.62920578036521446: 4, 1.0179025423728814: 5, 1.4065993043805483: 6, 1.6151811554515112: 7, 1.9658032014811009: 8, 2.5023083609681329: 9}} Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted April 29, 2017 Report post Posted April 29, 2017 Enabled debug mode for to understand some problem. (Stopped now) Bug Fix: Fixed a small error generated by an invalid database request of a plugin. Bypassed an issue of the automatic Js code replacement in the CMS editor. For to avoid code's replacements the JavaScript has been moved to the file: StatisticsToolCore.js Share this post Link to post Share on other sites
ITalianBadBoy 35 Posted May 6, 2017 Report post Posted May 6, 2017 If I should name this update probably I'll call it the quality update. Considering the positive tool's use feedback of the first two months of life, we decided to give a professional touch to the site. With this we decided to conclude the test phase and provide a well done version. Changes applied: Deleted all site files, the CMS and the database contents. The site has been rebuilt from 0 with a dynamic layout depending on the screen size. (for mobile, tablet and desktop) The player data displayed will be temporarily stored, encrypted, for one day. (This will generate the instant printing for already searched data) Implemented the dynamic site link generator eg: https://it4ly.altervista.org/?ply1=Gizmomac&ply2=OwnageMaster All JavaScript variables and functions was put under closures (security improvement) and improved some function and controls. Added the W3Data library, the W3.CSS framework, the minified version of Crypto-Js and some simple CSS animation. The handwritten code, HTML and CSS, has been tested with W3 Unicorn, markup validator, and the JavaScript was put under strict mode. (Test passed) A control was also added at the protocol used, Http or Https. For a structural factor are only allowed Https connections. Incorrect protocols will be alerted to the user. Share this post Link to post Share on other sites
Johnnynator1 147 Posted May 6, 2017 Report post Posted May 6, 2017 1 hour ago, ITalianBadBoy said: If I should name this update probably I'll call it the quality update. awesome color choice Share this post Link to post Share on other sites
Recommended Posts