Quantcast
Channel: User HoldOffHunger - Stack Overflow
Browsing latest articles
Browse All 51 View Live

Comment by HoldOffHunger on Get body element of site using only javascript

Hey, Zak, I know it's been 8 years, buuuuut, maybe think about changing the accepted answer? I hate downvoting old answers because they're essentially wrong. =\

View Article



Comment by HoldOffHunger on whats the alternate for alert function in...

There is another question that is seeking answers to a similar question, I have an answer there that should help: Javascript alert message Alternative

View Article

Comment by HoldOffHunger on What's the best way to make this icon wiggle.....

I have an answer elsewhere that I hope helps, with explanations on how to make your element shake, rotate, squish, or skew! Good luck!

View Article

Comment by HoldOffHunger on How do I make a DIV vibrate or buzz? (similar to...

I have an answer to a similar question, where I show how to make any element shake, rotate, squish, or skew. Hope this helps!

View Article

Comment by HoldOffHunger on How to hide style section in chrome dev tools?

Link rot. You linked to something to explain how it solves a problem, without ever saying what that thing is, and now that link doesn't explain anything anymore.

View Article


Comment by HoldOffHunger on How to hide style section in chrome dev tools?

2023; does not work anymore.

View Article

Comment by HoldOffHunger on How to Skip a Database in mysqlcheck for...

You are a brilliant, amazing person! Thank you so much. I needed this to solve skipping the mysql DB, which I think is just where DigitalOcean puts schema stuff. Thanks!

View Article

Comment by HoldOffHunger on How to Skip a Database in mysqlcheck for...

Hey, Stas! Any chance you've had a chance to review the answers posted and accept one of them? I believe the thing you said "seems like it doesn't work" actually does work, based on my own tests and...

View Article


Comment by HoldOffHunger on Composer install error - requires ext_curl when...

Updated the answer with the command line for PHP 8.1, thanks again!

View Article


Comment by HoldOffHunger on I have set up my domain and secret in my app...

Please mark the correct answer as accepted or, better yet, close this since it was just a typo?

View Article

Comment by HoldOffHunger on filectime vs filemtime for file modification time?

Where are you quoting from in these citations?

View Article

Comment by HoldOffHunger on Is it possible to use "/" in a filename?

I strongly believe this is the right approach! Anyone could choose any "delimiter", but the HTTP character-encoding approach is the right one, because it's already agreed-upon and to retrieve the '/'...

View Article

Answer by HoldOffHunger for Omit "Is a directory" results while using find...

Exclude directory warnings in grep with the --exclude-dir option:grep --exclude-dir=* 'search-term' *Just look at the grep --help page:--exclude-dir=PATTERN directories that match PATTERN will be skipped.

View Article


Answer by HoldOffHunger for How does the Linux command `file` recognize the...

TLDR: Magic File Doesn't Support UTF-8 BOM Markers(and that's the main charset you need to care about)The source code is on GitHub so anyone can search it. After doing a quick search, things like BOM,...

View Article

Answer by HoldOffHunger for wrong text encoding on linux

TLDR Quickest Solution: Copy/Paste the Visible Text to a Brand-New, Confirmed UTF-8 FileYour file is marked as latin1, but the data is stored as utf8.When you set set-enc=utf8 or set fileencoding=utf-8...

View Article


Answer by HoldOffHunger for Why can't I login to mysql with --login-path=local?

I had this problem, and thought I'd share my solution in my case:TLDR: Manually Connecting Works because the Default Host is Not Local, But You're Configuring MySQL_Config_Editor with LocalYour example...

View Article

Answer by HoldOffHunger for LinkedIn & Twitter, Share website image through URL

Twitter...https://twitter.com/intent/tweet?url={url}&text={title}&via={user_id}&hashtags={hash_tags}Source: Official Twitter Share URL...

View Article


Image may be NSFW.
Clik here to view.

Answer by HoldOffHunger for Paused in debugger in chrome?

The Chrome Debugger Pause Button -- international hide & seek champion!Here is what it looks like in 2022:

View Article

Answer by HoldOffHunger for Adding Line Numbers To HTML Textarea

TLDR: Use CodeMirrorSomeone else here recommended CodeMirror, and I can't hardly recommend it enough! But this answer didn't really provide any technical details.Other solutions: Everything else I...

View Article

Answer by HoldOffHunger for How do I get the current date and time in PHP?

Use date() and DateTimeInterface::format to format a date, i.e., date('Y-m-d H:i:s');, and you have these as your optional formatting:Source: DateTimeInterface:::format page.format...

View Article

Answer by HoldOffHunger for How to do fade-in and fade-out with JavaScript...

My answer is based on Gb01's answer (thank you!). I wanted to abstract out the logic so that we could simply pass an element to a function and have that element fade toggle, fade in, or fade out.PODTo...

View Article


Answer by HoldOffHunger for How to position text over an image with CSS

Quick solution: Set position: relative; on the container element and set position: absolute; on child elements in that container element, with the necessary top, left, bottom, right-adjusting...

View Article


Answer by HoldOffHunger for javascript - innerHTML with fade in

Try not to worry about fading in/out the innerHTML property. Instead, wrap the innerHTML in a span tag (or, alternatively, a div tag), and then simply fade that element in and out.Here it is with a...

View Article

Answer by HoldOffHunger for Javascript alert message Alternative

This can be done relatively easy, without too much code, and with the feature of fading in/out. The below example fades in and out at a rate of 3 seconds per fade, but this can be changed by modifying...

View Article

Answer by HoldOffHunger for Javascript shake html element

It's possible to have the animation done entirely with very simple CSS and JS. The strategy involves two things:transition: all 500ms;— This bit of CSS means that anytime we want to do a transition...

View Article


Answer by HoldOffHunger for URL encode sees “&” (ampersand) as “&” HTML...

Just to be clear, you should never be using encodeURI() and encodeURIComponent(). If you disagree, just look at its results...console.log(encodeURIComponent('@#$%^&*'));Input: ^&*.Output:...

View Article

Answer by HoldOffHunger for How to create a gravity effect with Javascript?

One other framework to consider: Matter.js —Demo: Easy Physics Sandbox in JavaScript.The PhysicsGravity is hard. That's because gravity is curved spacetime, and we can only make 2d representations of...

View Article

Answer by HoldOffHunger for Calling a JavaScript function in another js file

TLDR: Load Global Function Files first, Then Load Event HandlersWhenever you are accessing an element within a JS file or <script> block, it is essential to check to make sure that element...

View Article

Answer by HoldOffHunger for Responsive Web Design Tips, Best Practices and...

The answer by Steven de Salas is excellent! If you have the time, effort, and/or team available to do a hand-crafted mobile website, then go for it with his tips.But if you want just an automated,...

View Article



Image may be NSFW.
Clik here to view.

Answer by HoldOffHunger for send whatsapp message using php

The official documentation says to use their wa.me URL, so let's just check it out: http://wa.me/?text=mytest. What do you see? Do you see an error page? This is what I see:We couldn't find the page...

View Article

Answer by HoldOffHunger for Share website URL with image and description...

LinkedIn only supports one URL format...https://www.linkedin.com/sharing/share-offsite/?url={url}Source: Official LinkedIn Sharing Documentation.But if you want to populate things like title and image...

View Article

Answer by HoldOffHunger for MySQL: Setting sql_mode permanently

If you are using Digital Ocean, the mysql cnf files are emulated and don't actually really interact with the database. In this case, you set your sql-mode with (for a blank sql mode)...doctl databases...

View Article

Answer by HoldOffHunger for How to set onClick with JavaScript?

If you have a named function, i.e., function funcName() {...} already defined, then the process is simply to identify onclick with the name of the function:document.getElementById("myBtn").onclick =...

View Article


Answer by HoldOffHunger for PHP script to loop through all of the files in a...

There is a problem with using the accepted answer's suggestion of DirectoryIterator. After all, just load up the documentation page for the iterator and see if you can find any problems -- in fact,...

View Article

Answer by HoldOffHunger for How can I install ziparchive on php 7.4?

It depends on which version of PHP you have, actually. Generally, you would expect this to be all that is needed, especially since it runs: sudo apt-get install php-zip, but this didn't work for me....

View Article

Answer by HoldOffHunger for MySQL OPTIMIZE all tables?

It's possible for the highly-accepted answer to fail in several cases. mysqlcheck -o --all-databases is excellent, but you may find yourself in need of the --skip-database argument, in case you run...

View Article


Answer by HoldOffHunger for PHPUnit\Framework\Error\Warning: ini_set():...

Use the --stderr argument for phpunit.phpunit YourTestFile.php --stderrFrom the documentation:--stderr Write to STDERR instead of STDOUTPHPUnit is writing its own output (for instance, I see: "PHPUnit...

View Article


Answer by HoldOffHunger for PHP runtime class modification

Changing Object Class on the Fly - Use CaseHere's another use-case for changing an object's class on the fly: upgrading a class to a version that provides debugging and logging, so that developers can...

View Article

Answer by HoldOffHunger for filectime vs filemtime for file modification time?

TLDR Answerfilemtime: When the file's data was changed.filectime: When the file's metadata was changed (i.e., depends on your Linux system, it might just be permissions or it could be anything like...

View Article

Comment by HoldOffHunger on PHP: Is there a reason to put a newline at the...

@Yevgeniy Afanasyev: You quoted literally HALF of the requirement. Read the entire sentence, please! All PHP files MUST end with a non-blank line, terminated with a single LF., yes, TERMINATED with a...

View Article

Comment by HoldOffHunger on How to Check if an array is already sorted in php

Great question, upvoted, thanks! It's been a decade or so, maybe a different answer should selected as the correct one? Just speaking for the community, thanks!

View Article


Answer by HoldOffHunger for Remove BOM () from imported .csv file

I appreciate everyone's answers here, and I think they are all great work-arounds for what is clearly a problem with the PHP code itself. Its been listed in PHP Bug Tracker since 2003-02-07 08:46. Its...

View Article

Answer by HoldOffHunger for How to disable two factor authentication in GitHub?

As of 2024, you can't. To disable 2FA authentication requires that you enable 2FA Authentication first (using your personal phone), which is absolutely something you do not want to ever do with any...

View Article


Comment by HoldOffHunger on How to change the default number format in Excel?

I just followed this advice. The text "Dec 24, 2023" was converted to the number "435418". What does that number mean? Why would that be considered a correct format given the text entered?

View Article

Answer by HoldOffHunger for Paste without format within workbook and from...

To copy/paste into M$ Excel without copy/pasting the HTML format, try the following:Double click (or press F11) while the cell is selected. You'll know you did this correctly because your cursor will...

View Article

Browsing latest articles
Browse All 51 View Live




Latest Images