How to detect if OS X is in dark mode?

Don’t think there’s a cocoa way of detecting it yet, however you can use defaults read to check whether or not OSX is in dark mode. defaults read -g AppleInterfaceStyle Either returns Dark (dark mode) or returns domain pair does not exist. EDIT: As Ken Thomases said you can access .GlobalPreferences via NSUserDefaults, so NSString … Read more

Why there are no themes for swagger-ui? [closed]

A late answer, albeit a good one. This is pretty awesome! A slick implementation, and he has customized many things that are easy to tweak yet again for your needs: https://github.com/jensoleg/swagger-ui. Credits go to this google group: https://groups.google.com/forum/#!topic/swagger-swaggersocket/oeMyayrvKRI. Strange that this has not been posted here yet. For an action demo, please check out this … Read more

Metro theme for website

This can help: https://github.com/mvalipour/jq-metro UPDATE (Sep 2011): The library is now becoming more complete towards supporting all metro-style controls and a jquery-mobile extension for developing metro-style HTML5 mobile apps.

Modifying the color of an android drawable

So after a lot of trial and error, reading different articles, and most importantly, going through the API Demos (ColorFilters.java — found in com.example.android.apis.graphics) I found the solution. For solid images, I have found it is best to use the color filter PorterDuff.Mode.SRC_ATOP because it will overlay the color on top of the source image, … Read more

How to set editor theme in IntelliJ Idea

OK I found the problem, I was checking in the wrong place which is for the whole IDE’s look and feel at File->Settings->Appearance The correct place to change the editor appearance is through File->Settings->Editor->Colors &Fonts and then choose the scheme there. The imported settings appear there 🙂 Note: The theme site seems to have moved.

Eclipse’s Package explorer background color follows windows theme. I want to change the color without changing windows’ theme. Possible?

Install the “Eclipse 4 Chrome Theme” from http://marketplace.eclipse.org/content/eclipse-4-chrome-theme Then you can customize a lot of the Eclipse UI widgets. But not what you want, at least not out of the box. For that you should go to the CSS tab (in Eclipse 4 Chrome Theme) and paste this: Tree, List, Table { background-color: #202020; color: … Read more

Apply a theme to an activity in Android?

You can apply a theme to any activity by including android:theme inside <activity> inside manifest file. For example: <activity android:theme=”@android:style/Theme.Dialog”> <activity android:theme=”@style/CustomTheme”> And if you want to set theme programatically then use setTheme() before calling setContentView() and super.onCreate() method inside onCreate() method.

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