How to deploy Node.js application with deep node_modules structure on Windows?

just to add to this… another thing that helped me was listing out all installed modules with npm ls. which will give you a tree of modules and versions… from there it’s pretty easy to identify which ones are duplicates… npm dedupe didn’t do anything for me. I’m not sure if that’s a bug or … Read more

Validate a file name on Windows

Given the requirements specified in the previously cited MSDN documentation, the following regex should do a pretty good job: public static boolean isValidName(String text) { Pattern pattern = Pattern.compile( “# Match a valid Windows filename (unspecified file system). \n” + “^ # Anchor to start of string. \n” + “(?! # Assert filename is not: … Read more

How to rename a file on sdcard with Android application?

I would recommend using File.renameTo() rather than running the mv command, since I’m fairly sure the latter isn’t supported.. Have you given your application permission to write to the SD Card? You do this by adding the following to your AndroidManifest.xml: <uses-permission android:name=”android.permission.WRITE_EXTERNAL_STORAGE” /> If it doesn’t work once the permission is added check the … Read more

tech