VSCode Integrated Terminal Doesn’t Load .bashrc or .bash_profile

Simply add shell arguments to the VsCode settings.json file. Paths to the settings.json file are as follows: Windows: C:\Users\<username>\AppData\Roaming\Code\User\settings.json` Linux: $HOME/.config/Code/User/settings.json Mac: $HOME/Library/Application\ Support/Code/User/settings.json Add one of the following: “terminal.integrated.shellArgs.windows”: [“-l”], “terminal.integrated.shellArgs.linux”: [“-l”], “terminal.integrated.shellArgs.osx”: [“-l”], This will launch your shell of choice with the login argument. This will thus execute any user profile that is … Read more

Where are user-mode .NET settings stored?

The setting files are stored in a different place for each user. To find them, click the start menu, click run, and paste: %USERPROFILE%\Local Settings\Application Data\ and press enter. There will be a folder with your “Company Name” (whatever it is set to in your assembly) and then some more subfolders. The settings are stored … Read more

Call the official *Settings* app from my app on iPhone

As noted in the comments below, this is no longer possible in iOS version 5.1 and after. If you are on iOS 5.0, the following applies: This is now possible in iOS 5 using the ‘prefs:’ url scheme. It works from a web page or from an app. example urls: prefs:root=General prefs:root=General&path=Network sample usage: [[UIApplication … Read more

When using a Settings.settings file in .NET, where is the config actually stored?

It depends on whether the setting you have chosen is at “User” scope or “Application” scope. User scope User scope settings are stored in C:\Documents and Settings\ username \Local Settings\Application Data\ ApplicationName You can read/write them at runtime. For Vista and Windows 7, folder is C:\Users\ username \AppData\Local\ ApplicationName or C:\Users\ username \AppData\Roaming\ ApplicationName Application … Read more

Java Swing save and load workspace/settings

In this case, the obvious solution, java.util.prefs.Preferences, is probably the correct one. RCPrefs from this game is a simple example that demonstrates saving a variety of data types, including enum. The exact implementation is highly dependent on the application. While tedious, it needn’t be especially complex. For expedience, the example uses static methods; frame and … Read more

Can’t apply system screen brightness programmatically in Android

OK, found the answer here: Refreshing the display from a widget? Basically, have to make a transparent activity that processes the brightness change. What’s not mentioned in the post is that you have to do: Settings.System.putInt(y.getContentResolver(),Settings.System.SCREEN_BRIGHTNESS_MODE, 0); Settings.System.putInt(y.getContentResolver(),Settings.System.SCREEN_BRIGHTNESS, brightnessLevel); then do WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.screenBrightness = brightness; getWindow().setAttributes(lp); And if you call finish() right … Read more

ConfigurationManager.AppSettings – How to modify and save?

I know I’m late 🙂 But this how i do it: public static void AddOrUpdateAppSettings(string key, string value) { try { var configFile = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); var settings = configFile.AppSettings.Settings; if (settings[key] == null) { settings.Add(key, value); } else { settings[key].Value = value; } configFile.Save(ConfigurationSaveMode.Modified); ConfigurationManager.RefreshSection(configFile.AppSettings.SectionInformation.Name); } catch (ConfigurationErrorsException) { Console.WriteLine(“Error writing app settings”); } } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)