Jump to content

jodunno

Members
  • Posts

    163
  • Joined

  • Last visited

  • Days Won

    2

jodunno last won the day on May 15 2020

jodunno had the most liked content!

About jodunno

  • Birthday 01/01/1973

Profile Information

  • Gender
    Male
  • Location
    Berlin, Germany
  • Interests
    Nature and Biology, Programming and Web Development, Forensic Science, sports

Recent Profile Visitors

3,388 profile views

jodunno's Achievements

Advanced Member

Advanced Member (4/5)

7

Reputation

  1. try the magical span 'shroom. It works for me in edge/chrome and ff: <style> .ripple { background: -webkit-linear-gradient(0deg,#7521ff 20%,#33b6f1 50%,#b8ff21 80%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .see { width: 400px; font-family: coolvetica; font-size: 6em; line-height: 0.8em; box-sizing: content-box; } </style> <div class="see"><span class="ripple">Big time hosting<wbr> Low cost design</span></div> <br> <div> <div class="see"><span class="ripple">Big time hosting</span></div> <div class="see"><span class="ripple">Low cost design</span></div> </div> and you should still be able to adjust the line height *warning: calculated line-height adjustments may also need to be added to parent elements in certain cases
  2. please learn html5 and css3. Such advice leads to lazy front-end coding. And div elements default to left alignment, which means that one has not read the dtd and browser defaults. One can align divs anyway that one desires using css3. I am not going to design a site for someone. I have no free time to spare. However, here is a quick example of aligning the divs the way that you want them using html5 and css3. Also responsive using @media. <html> <head> <title></title> <style> div { display: block; position: relative; margin: 0px; padding: 0px; border: none; outline: none; opacity: 1; box-sizing: content-box; } div.columnContainer { background: #dcdcdc; min-width: 308px; max-width: 100%; box-sizing: content-box; } div.leftColumn { display: inline-block; width: 30%; background: #a0a0a0; vertical-align: top; } div.leftColumnRow { max-width: 100%; margin: 2px; padding: 6px; background: #f0f0f0; text-align: center; } div.rightColumn { display: inline-block; width: 69%; background: #a0a0a0; vertical-align: top; } div.rightColumnRow { max-width: 100%; margin: 2px; padding: 6px; background: #101010; } img.rightColumnImage1 { display: block; width: 200px; height: 50px; } @media (max-width: 600px) { div.leftColumn, div.rightColumn { display: block; min-width: 99%; } div.leftColumnRow, div.rightColumnRow { display: block; min-width: 92%; } } </style> </head> <body> <div class="columnContainer"> <div class="leftColumn"><!-- browsers default is left align and div is a block element, so no need to float or use a grid or flex --> <div class="leftColumnRow">Hello</div> <div class="leftColumnRow">Hello again</div> </div> <div class="rightColumn"> <div class="rightColumnRow"><img class="rightColumnImage1" src="no_float_grid_flex_equals_good_html5_programming.png"></img></div> </div> </div> </body> </html>
  3. Hi everyone, bananaman: you really do not know how to set a session variable and unset it? you need to see that code? O.O good thing that i have solved the problem. session_start either continues a session or starts a new one. I learned PHP at home and using forums for help when needed. I was always told to use session_start() on every page that uses 'the' session. It seems as though this is not correct or a certain usage exists that is not described in the PHP manual. I decided to name my session cookies in the php.ini file, then add an if statement in the getImage.php file. so if mycookie isset then session_start(), else show image error. Meantime, i maintain multiple versions of browsers for html and css testing. The start a new session only happens in older versions of firefox (50, 51, 60). The curent 108 does not make a new session file. Anyway, my understanding of sessions is the problem here and that is a big problem since the official manual does not address proper session handling and usage in depth. I have to learn how to handle sessions properly before continuing to develop websites. Thank you for taking time to read this post. I hope that everyone has a lovely New Year's eve. Please be safe and do not drink alcohol and drive. I hate alcohol so it is not a problem for me but i am concerned about all of you. John
  4. Hi everyone, I am having a problem with a xampp php installation regarding session file generation using firefox browser. problem: i create a session variable which acts as a token on the server side. The token is used to display an image, then the token (session array key) is deleted. Thus, i am able to prevent access to protected images. Everything is working, in Edge and Chrome. Whenever i use firefox browser to test the site on xampp, i notice a session file creation in the tmp file. I go to Tools > Page Info > Media tab. My images do not appear in the media tab (which is good because they are protected.) However, every time that i click on one of the media links in the tab, a new session file is created in the tmp directory of my xampp installation (size 0bytes). It seems like PHP or xampp is not managing sessions correctly. A new session is started for each image requested from the firefox pageinfo media tab. Should i report this to xampp or is there another reason why this is happening? should i manually set session handlers? has anyone else noticed this problem? Thank you, John
  5. That is excellent advice, requinix. Thank you for taking time to help a non-programmer. I always appreciate this forum and its members despite my agression at times. LOL. what i can say, i'm a bit of a weight lifting pesky wasp. I have made a text file with your advice and i will read more about this subject. I always make an effort to better myself so i promise that your advice is well taken. I am going to shutdown my xampp for the day and relax a bit. I am still trying to feel normal after covid and the flu. I started playing Grim Tales games (not spamming here but how else do i describe the games?) I can just sit back and click my way through a game. I hope that everyone has a great day and i cannot stress enough the importance of well being. Take care of yourselves. John
  6. Hi requinix and anyone else reading this post, The code that uses this expression is as follows working directories: C:\xampp C:\xampp\htdocs\qs.php <?php declare (strict_types = 1); //example request: http://localhost/qs.php?legal_copyright function checkGetRequest(string $queryString = '') { if (preg_match("/^[A-Za-z]{3,16}+_[A-Za-z]{3,48}$/", $queryString) === 0) { return false; } (array) $queryString = explode('_', $queryString); (string) $path = dirname(__FILE__) . '/../system/paging/'; if (!file_exists($path) || !file_exists($path . $queryString[0] . '/definition.php')) { return false; } require_once $path . $queryString[0] . '/definition.php'; if (!function_exists('definition')) { return false; } unset($path); if (definition($queryString[1]) !== true) { return false; } return (array) $queryString; } if (!empty($_SERVER['QUERY_STRING']) && is_string($_SERVER['QUERY_STRING']) && function_exists('checkGetRequest')) { (array) $showPage = checkGetRequest(trim(htmlspecialchars($_SERVER['QUERY_STRING']))); if ($showPage !== false && is_array($showPage)) { print_r($showPage); exit; } unset($showPage); } echo 'index page'; exit; ?> C:\xampp\system\paging\ (outside root) C:\xampp\system\paging\legal\definition.php (array of acceptable page requests) <?php declare (strict_types = 1); function definition(string $validity = '') { $pages = (array) ['agb','copyright','datenschutz','impressum','kontakt','uberuns']; if (in_array($validity, $pages, true)) { unset($pages); return true; } unset($pages); return false; } ?> category exists to allow hundreds of possibilities. a switch with more than 10 cases is ridiculous, so i 'switched' to a category and page system. I am aware of everyone's attitude about exit and error handling and cleanup work but i am not open to changing the code. I always clean up after myself in reality and i do the same in my code (unset). I like it that way. I also like to handle foreseen errors (a file doesn't exist or a call to an array loads a string instead. I try to handle known possible erros, which makes me happy. So besides my coding methods, if you spot anything that could be done better, then offer an opinion. Happy Holidays everyone and please stay healthy and warm. We are living in difficult times. John
  7. oh wow! I missed that entirely. I honestly did not realize that i had that flag. I copied a similar expression from my form validation and changed the core of the expression. I'm not trying to make an excuse for overlooking this stupidity but my brain is a little foggy lately. I had covid immediately followed by the flu a few weeks ago. I was not well and i am still trying to feel normal. I cannot believe how many times that i have looked at this code and did not notice the i Honestly, Thank You for cleaning this up for me. Meantime, i will post my experimental code so that you can see how it is used. I need to copy the code from my non-internet connected work laptop, then i will post it. I have tried the restrictions in everyway that i can imagine and the regex is working as expected. So once again, Thank you, requinix. I appreciate and value your expertise.
  8. Hi requinix, I was hoping that you would offer an opinion, since you are an actual regex specialist. I actually learned the basics of regex from your posts at this forum. I don't want to say that i credit you entirely because i am prone to erroneous regex logic at times and you are not responsible for the bad regex solutions of mine. Anyway, the links are a beautiful addition to your reply. Thank you for posting 🙂 well, our viewpoint is obviously different. I only use index.php and accept requests for content that fits my definition of acceptable content requests. Thus, the location/resource/route is the same. Only the content changes. So i don't consider it to be routing traffic, rather fetching different content for display in the same location. Routers typically involve mvc or classes, functions and frameworks. You know, call a class, which calls a class, which loads a function, which loads another function to echo a message instead of using the built-in echo function. LOL. Please let's not start a router definition, i should be using mvc argument. I actually like and respect you, requinix. I hope that you can reciprocate that sentiment 🙂 either way, if you must see my usage, then i don't mind posting my code but it would not be open to discussion 🙂 Happy Holidays and please stay healthy and warm, John
  9. Dear members, I'm building a get request file handler (sometimes erroneously referred to as a router) and i need to restrict the query string to a particular format using regex. goal: restrict a GET query string format to: category_page (id est, http://localhost/file.php?category_page) so Alphabetic letters of length 3 to 16 characters followed by an underscore followed by alphabetic letters of length 3 to 48 characters my current regex is contained within a "checkGetRequest()": if (preg_match("/^[A-Za-z]{3,16}+_[A-Za-z]{3,48}$/i", $queryString === 0) { return false; } is this regex correct? or perhaps someone can stop laughing and correct me? the regex seems to be working but i'm not a regex guru. Happy Holidays, John
  10. okay, i see. you are the big php gorilla in the room and you want to pound your chest when someone is out of place challenging you. i didn't expect this behaviour from you. You are always right. You are omniscient and i should bow down to you. Fine, i kow tow your excellency. You are so much smarter than me. I'm have no iq. I no nothing about programming. Only Barand knows. I will add to my notes: modulus is defined in php with an illogical % symbol (per centum, 100). modulus only exists because of php. So when you see a ≡ b (mod n) it was invented by php developers. gotcha. I will be sure to find my place in stuporville. I know nothing so i should not contribute to this forum. I should only ask questions from the Wizard of Oz but never look behind the curtain. I will stay away from this forum and let you pound your chest.
  11. "The modulo operator was invented for situations like this" it was invented? it was invented to handle division? it was invented to handle division by 5? I'm pretty sure that remainders are as old as division. The term is simply a word to refer to them and the concept is a way to work with them.
  12. hmm. I didn't think about modulus so it is a better example of reducing the code but your definition of it is not correct. Modulus is simply remainder and calculating using remainder (hence, ==0 means no remainder.) I learned that years ago when i encountered modulus in a Microsoft QBasic Gorilla game. I never heard of it before since my Math teachers only used the word remainder. Then again, I never had a proper algebra or calculus education. I had to teach myself (using teach yourself books). Good contribution, Barand.
  13. I have tried scaling before and it failed because browsers seem to keep the space of the original size. Thus multiple scaled items will not adjust to the new size in proportion with the page. I cannot remember exact details but it was horrible. I don't think any changes have been made to the rendering engines, so the problem should still remain.
  14. Hi Lumana, You could reduce the comparison branching to a single comparison with a count . <?php $Count = 5; for ($j = 1; $j < 101; $j++) { if ($j == $Count) { echo $j . ' Boogie Woogies' . '<br>'; $Count += 5; continue; } echo $j . '<br>'; } ?>
  15. yes it is 12. i made an erroneous mental calculation and i saw it after i posted.. i didn't want to log back in to correct it. ixiiv is still nonstandard and i intend to filter it out. I'm working on the code...
×
×
  • 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.