Skip to content

Tag: javascript

“emcc” command does not recognized

I’m having issue with building this demo. https://github.com/kakukogou/opencvjs_demo_segmentation When i cd into this folder and run make command i get this error message: This is how make file looks like. Is there any issue with my environment variables. What is the proper way to compile this ? Answer …

Redirect ranges of IPs in JavaScript (no .htaccess)

I’m trying to redirect anyone viewing my blog from certain IP addresses (or ranges of IP addresses) to a different page. I found something that works for individual IP addresses, but I can’t figure out how to block ranges of IP addresses – like 123.123.123.* Here’s the script: I’…

Javascript regex matching at least one letter or number?

What would be the JavaScript regex to match a string with at least one letter or number? This should require at least one alphanumeric character (at least one letter OR at least one number). Answer In general, a pattern matching any string that contains an alphanumeric char is However, a regex requirement lik…