Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited



About Mr_KoKa

  • Title
  • Birthday 1993-01-19

Contact Methods

Profile Information

  • Gender
  • Location
  • Interests


  • CPU
    Intel Core i7 4770K
  • Motherboard
    Gigabyte GA-Z87X-UD4H
  • RAM
    16GB HyperX 1600MHz DDR3 CL9 Grey Series 4x4GB
  • GPU
    Gigabyte GeForce GTX 970 G1 Gaming
  • Case
    Cooler Master HAF XB (mesh top panel)
  • Storage
    SSD 256GB Samsung 840 PRO, SSD 500GB Samsung 850 EVO, Seagate 1TB (ST1000DM003)
  • PSU
    EVGA 750W SuperNOVA G2
  • Display(s)
    BenQ XL2420G, Eizo FS2333
  • Cooling
    Noctua NH-D14
  • Keyboard
    Cooler Master CMStorm QuickFire Ultimate Cherry MX Brown
  • Mouse
    Logitech G502
  • Sound
    Creative SoundBlaster X-Fi Xtreme Gamer
  • Operating System
    Windows 7

Recent Profile Visitors

1,911 profile views
  1. Very cool build Pan Ramirez
  2. Line is drawn at most recent data point so you don't need to specify any values. It takes the last value from dataset.
  3. Like vertical line over existing vertical line? The existing is x axis line with label "15:32" Edit: @.spider. Take a look at this one: https://repl.it/Krig/3
  4. Can you post your current minimal code that will contain some of data to fiddle with? Like canvas with chart code. Edit: nvm I thought the code you posted is from stack. Ok, @.spider.. I fiddled with it and came up with this: var horizonalLinePlugin = { afterDraw: function(chartInstance) { var data = chartInstance.data.datasets[0].data; if(data.length > 0){ var yScale = chartInstance.scales['L']; var ctx = chartInstance.chart.ctx; var height = yScale.getPixelForValue(data[data.length - 1]); ctx.lineWidth = 1; ctx.beginPath(); ctx.moveTo(chartInstance.chartArea.left, height); ctx.lineTo(chartInstance.chartArea.right, height); ctx.strokeStyle = 'rgba(0, 0, 0, 0.75)'; ctx.stroke(); } } }; Chart.pluginService.register(horizonalLinePlugin); It worked for me to paste it after and before your code, but I think before is best. Here is example https://repl.it/Krig/2 You may want to add some value (label and data) so last value won't be on bottom of y axis.
  5. do you received ssh login/password or key? you will need putty and with informations like host and port you can connect to your vps then log in with login password. after that you will want to see readme of the cms, there is a pip command to install requirements. I don't know how to run it, I cannot help you further.
  6. It seems that this cms is python based so not usual http server can host it. You would probably need a VPS to host it, or maybe there are some free python environment hostings, idk. Try to find something written in php.
  7. As far as it is not android specific question then I think that array of strings with file names and the slider value would be an index of the array, just make sure to check if the value is not out of array's bounds. Then you get a file name from the array by index (value of slider) and play it, so no ifs.
  8. It is called hook and I found this https://stackoverflow.com/questions/2067397/can-i-change-a-users-keyboard-input it looks like what you want to achieve.
  9. You need to connection.commit() after fetchall
  10. you read 128 bytes from socket, so even your example (295) will be fragmented and read after 3 fgets.
  11. See if your read buffer is not too small, There is not much to say about it when we don't see source code.
  12. $s = '@badges=moderator/1;color=#008000;display-name=joveice;emotes=;id=5e290206-79cf-45cc-83da-8d49a26fc152;mod=1;room-id=170536778;sent-ts=1503421860968;subscriber=0;tmi-sent-ts=1503421858315;turbo=0;user-id=30332954;user-type=mod :joveice!joveice@joveice.tmi.twitch.tv PRIVMSG #digitalarcbot :dassa'; $spacePos = strpos($s, ' '); if($spacePos !== false){ $s = substr($s, 1, $spacePos - 1); // Skipping first character (@) and not including found space $vars = explode(';', $s); $keyValue = array(); foreach($vars as $var){ $parts = explode('=', $var); if(count($parts) == 2){ $keyValue[$parts[0]] = $parts[1]; } else { echo 'Invalid variable: '.$var; } } var_dump($keyValue); } else { echo 'Space not found.'; } I used strpos to find first space and then substr to skip @ and extract string to the position of the space found. then I just explode string by ; and then each by = Result is associative array. You can enclosure it into a function and instead of echoing errors return false or throw exceptions. Here is working example: https://repl.it/KUo7/0
  13. Just be careful as if there is empty line at the end of your accounts file it will try to read it as it is not eof yet. It will fail to read it but will populate your array next index so if your array is made just to fit the data, then it will be written to the memory that is not your array, or that is not owned by your app, which will crash it. You can check if read operation succeeded by checking >> operator result like: if(!static_cast<bool>(inf >> arrayA[index])){ cout << "Read account id operation failed, stopping reading."; return; } if(!static_cast<bool>(inf >> arrayB[index])){ cout << "Read balance operation failed, stopping reading."; return; }
  14. The way you're reading from file seems to be ok, but the way you're populating arrays seems odd. You read first line of file, both account id and balance to accountID and accountBalance, and then in a loop you're reading accounts ids from file to arrayA with index of accountID and balances to arrayB of index accountBalance so respectively, arrayA[1] and arrayB[0] (the first line of accounts.txt which you read and written to accountID and accountBalance) So the array is mostly unchanged, you keep ovewriting index 1 of arrayA and index 0 of arrayB. Instead of that you should not read from the file before the loop, so you won't discard any data, and then make yourself another variable where you will keep last index you have written to, set it to 0 and as you read from file and write to array with index defined by that variable, increase the index variable. So ditch this line: inf >> accountID >> accountBalance; and make yourself this one before the loop: int index = 0; and then instead of: inf >> arrayA[accountID]; inf >> arrayB[accountBalance]; do: inf >> arrayA[index]; inf >> arrayB[index]; And don't forget to add index++ at the end of the loop. And if you want to print the values right away then fix the index for printing too. accountID and accountBalance seems to be unneeded in this function at all. You can set yourself some constant or pass another argument to your function for the max index of array so you won't go out of bounds. FYI, file can end between first inf >> and the second one. Also the last empty line will make your app to another loop iteration, as it is not end of file, but there are no more values, it won't succeed to read those, and will insert gibberish to 16th index of arrays, if your arrays are idnexed from 0 - 14 (15 cells) then it will write to somewhere where it shoudl not, and it will destroy some of the data or crash your application.
  15. Yup, it just works for me. Try again with fresh project.