Jump to content

Karaethon

Members
  • Content Count

    68
  • Joined

  • Last visited

Everything posted by Karaethon

  1. Karaethon

    Regex huh?

    Hmm, you're right. I tried it with my password and it did not match it, but as I understood it I thought it would. Ugh.
  2. Karaethon

    Regex huh?

    Ok, so I've been reading about regex and I think I get it. I have one question that I think will prove I do or shoot me in the gut... ^([A-Z]+ [a-z]+ [\?\,\.!@#\$]+)${8,50} means the entire string must include at least 1 capital letter, at least 1 lowercase letter, at least one symbol, and be between 8 and 50 characters (inclusive). Is this correct? And if i wanted min 8 max infinity I'd just use 8 dots ( ........ ) in place of the {8,50}, correct?
  3. Karaethon

    Regex huh?

    Ok... umm now I'm a little confused.... that site (rocks btw) says that my pattern will do exactly what I thought it would do.... (when i flip the $ and {8,50}) Edit Of course now I'm on past that, I'm trying to figure out how to use this password stuff on this site... https://nulab-inc.com/blog/nulab/password-strength/
  4. Karaethon

    Getting numeric value of data

    I can't find the answer to this on Google because i don't even know what to ask as search keywords. I have a chunk of data, uploaded file data, and for each byte I need to get that byte of it and find the numeric value (0 - 255) of that byte. I can't find anything about data or file manipulation with javascript, I think I'm asking big G the wrong way.
  5. Karaethon

    Getting numeric value of data

    Ahhhh. Okay. Havent tried casses in php yet either, good to know.
  6. Karaethon

    Regex huh?

    Ok. Hmmm. Well at least the space issue isnt there, i added those for readability when i put it here, but its good to know not to do in production. The rest ... arghhhhh ill re-read and try again..... 😓
  7. Karaethon

    Getting numeric value of data

    Ok, i accidentally fixed it.... I changed 03 var pivotTable = [162,1,53,...,93,91,16];04 var passKey = ""; to 03 this.pivotTable = [162,1,53,...,93,91,16];04 this.passKey = ""; if anyone knows why this worked, I'd appreciate the explanation.
  8. Karaethon

    Getting numeric value of data

    ok.... I'm having an odd problem here... This code fails at line 16 because pivotTable is undefined there (line 15 is test for content), but not at line 5. But passkey at line 14 is not a problem... 01 class PivotValueEncryption{ 02 constructor(){ 03 var pivotTable = [162,1,53,...,93,91,16]; 04 var passKey = ""; 05 alert(pivotTable); 06 } 07 set key(value){ 08 this.passKey = value; 09 } 10 get key(){ 11 return this.passKey; 12 } 13 Pivot(character){ 14 alert(this.passKey); 15 alert(this.pivotTable); 16 var charValue = this.pivotTable.indexOf(character.charCodeAt(0)); 17 for (var i = 0; i<this.passkey.length-1; i++){ 18 var pivotValue = this.pivotTable.indexOf(this.passkey.charCodeAt(i)); 19 charValue = charValue + (pivotValue - charValue); 20 21 } 22 return charValue 23 } 24 } 25 var pve = new PivotValueEncryption; 26 pve.key="test"; 27 alert(pve.key); 28 alert(pve.Pivot("A"))
  9. Karaethon

    Getting numeric value of data

    Ok. Thank you for your help.
  10. Karaethon

    Getting numeric value of data

    Ok, I have an array, table by name, it contains the numbers 0 through 255 (inclusive)in a random order. I am looping through the file data one byte at a time and i need the table's index of the numeric value that byte is equal to. So I need a way to get the numeric value of a byte so I can find it in table using .indexOf
  11. Karaethon

    Getting numeric value of data

    Yes android and yes javascript, using droidscript as my ide. Uses js as the language. Im having trouble with AIDE and java, im still learning the proper way hut also want to practice using js way.
  12. Karaethon

    Getting numeric value of data

    Doesnt that work on string data? Or will it work with the full ascii values? Btw, this is not browser based, is android app.
  13. Karaethon

    Strech to fit height...

    I am wanting my page to fill the browser window even when the contents are less than big enough. I'm using bs4 and I know that this can be done somehow... Anyone know how?
  14. Karaethon

    AJAX ADuh?

    Ahh, there's a jQuery Ajax ability... jQuery does my heavy lifting for me... Shifting gears.
  15. Karaethon

    AJAX ADuh?

    So I am following the w3schools AJAX toutorial to learn AJAX and I've got something wrong somewhere but I can't find it. The alert is my telltale, it won't fire unless I comment out the rest of the the function contents. Did I misread, mistype, or miscognate? <!doctype html> <html> <head> <script type = "text/javascript"> function clicked(){ alert("You clicked!"); var pidgin = new XMLHttpRequest(); pidgin.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("test").innerHTML = this.responseText; } }; pidgin.open("GET", "test.txt", true); pidgin.send(); } </script> </head> <body> <div id="test"></div> <a href="#" onclick="clicked();">click me</a> </body> </html>
  16. Karaethon

    AJAX ADuh?

    Error
  17. Karaethon

    Do I have the right idea here?

    Fixed, I just added && navigator.cookieEnabled() function CookiesEnabled() { alert("Cookie Check!"); var result = false; try { document.cookie = 'cookietest=1'; result = document.cookie.indexOf('cookietest=') !== -1 && navigator.cookieEnabled(); document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT'; } catch (e) { //do nothing.. } Or maybe not... Now opera and every other browser except firefox always fail even with cookies on....
  18. So if I wanted to make sure my users were logged in, and had cookies & JavaScript enabled would this work...? Users enter site at index.php which sets a test cookie and calls itself (header location self in other words) if the test passed the user is redirected to the main page, if not then redirected to a page that has a we need cookies enabled page. Once in the main pages the cookie is checked and if present all good if not send back to index. Then I use session variables to track user data. I see this in my head but I'm not sure it works like I think and I am not sure how to code it. Your feedback would be greatly appreciated, and any pointers in how to code it would be prized as it would help me learn more so I don't have to ask next time.
  19. Karaethon

    Do I have the right idea here?

    Ok, so after all the discussion, after all the time I spent writing, I turn off cookies and.... Drumroll please.... It loads. Without popping up a need cookies warning... I tested and it is firing, but even though opera has disabled cookies it still passes the test.... Is there an error I don't see in my code that makes it return true? function CookiesEnabled() { alert("Cookie Check!"); var result = false; try { document.cookie = 'cookietest=1'; result = document.cookie.indexOf('cookietest=') !== -1; document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT'; } catch (e) { //do nothing.. } return result; } Testing with other browsers after this post.... Firefox: check Chrime: check Samsung Internet: fail Duck duck go: fail So I guess my code is ok, the browsers are f'd up...
  20. Karaethon

    Strech to fit height...

    😫 OMG... Ok so I've been out of the loop for a while (12 years, or 6 with good behavior [which I apparently cannot do]) when I was designing up to 2006 I never knew that css could do what it does now.... I'm needing to catch up.
  21. Karaethon

    Strech to fit height...

    I'm realizing that quite fast. BTW, what's an auto-prefixer? (I mean what's it do)
  22. Karaethon

    Strech to fit height...

    I am trying to use Bootstrap's flex but it just mashes my divs together. I am learning as i go and using w3schools' info as a reference, but some of the examples they use don't work once i transfer the code to my page....
  23. Karaethon

    Strech to fit height...

    Well, I'm not personally worried a out browser support, I want to use the best practices I can and if the user is stuck in the past... well not my concern. I am doing development on an android device and testing using opera, firefox, chrome, duck duck go, and samsung internet as my test browsers. Mostly because that's what I have.
  24. Karaethon

    So... I don't know squat about AJAX....

    Yeah I've been trying to learn via w3schools and big G but I've always had difficulty learning by studying, I have excelled at learning hands on and asking actual application type questions. School sucked because I needed real world examples of the work to learn from, the abstract fake scenario's that school used just gave me a headache. But I am making progress
  25. I know what AJAX is (I think) and I know that A is asynchronous and J is JavaScript, but that's the extent of my knowledge. So now if I understand correctly AJAX is able to fetch data from the server to display on the page without flushing and reloading the page content, correct? How do I use it, I am writing a webgame page that is supposed to submit the user input to a webservice then recieve the response. I want to do this without updating the entire page every time, I only need to update the play area. Can this be done? Can you print me in the right direction?
×

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.