Switching CSS classes based on screen size

CSS Media Queries are definetly the way to go. You can easily separate your CSS based upon the browser size, pixel density, etc. Here’s a list of examples from CSS-Tricks. /* Smartphones (portrait and landscape) ———– */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { /* Styles */ } /* Smartphones … Read more

Debugging automatic properties

Using Visual Studio 2008, 2010, 2012, 2013: Go to the Breakpoint window New -> Break at Function… For the get, type: ClassName.get_Counter() For the set, type: ClassName.set_Counter(int) You’ll get a “No Source Available” when the breakpoint is hit, but you’ll get the calling location in the call stack. I found this solution here on MSDN

Android Studio IDE: Break on Exception

To break on all exceptions, caught or uncaught: Open the Breakpoints window via Run -> View Breakpoints. The Breakpoints dialog appears. In the left pane, scroll to the bottom. Select Any exception under Java Exception Breakpoints With Any exception selected, on the right pane, configure as follows: Suspend: checked All: selected Condition: !(this instanceof java.lang.ClassNotFoundException) … Read more

Is there any way to set a breakpoint in gdb that is conditional on the call stack?

Update: There is now a better answer to this question: use GDB _is_caller convenience function. The need you describe comes up quite often, usually in the context of some_utility_fn being called a lot, but you only are interested in the call which comes from some_other_fn. You could probably script this entire interaction using the new … Read more