Could not find a declaration file for module ‘module-name’. ‘/path/to/module-name.js’ implicitly has an ‘any’ type

That feeling when you are looking out for two days and find it like this: just remove .js from “main”: “dist/index.js” in package.json and everything works fine! UPD: this answer relative if you have your own npm package, if not – see my answer below. And if above answer not resolved import your module, try just add typings in package.json: Of course, here folder dist – it’s … Read more

Check if a string is palindrome

Just compare the string with itself reversed: This constructor of string takes a beginning and ending iterator and creates the string from the characters between those two iterators. Since rbegin() is the end of the string and incrementing it goes backwards through the string, the string we create will have the characters of input added to it in reverse, reversing the … Read more

Downloading a file with PowerShell

Invoke-WebRequest comes with a parameter to store its result in a file: -OutFile If you need authorization before you can send a request like this: To determine the layout of the form where the login happens, you can use Invoke-WebRequests return object. It’ll collect information about forms and fields on the HTML (might be Windows only). Mileage … Read more

Graphics Library for C++

Having learned the basics of OpenGL in a 10 week university course that was primarily focused on modeling statistical data, I would definitely think OpenGL would be a reasonable option for an easy to learn graphics package for 2D real time modeling. Although there’s certainly complexity available to OpenGL you don’t need to wrap your … Read more