Problem How can I improve the following working SQL statement for better performance and consistency? SELECT if(roll is null,0,roll) as […]
Tag: null
Extension method to return a default value for any null value
Problem I’m creating an extension method that can be used on any type. The idea is that if this method […]
IsNullOrWhiteSpace check for Java
Problem I am needing to write my own IsNullOrWhiteSpace check for Java but am wondering if this is the best […]
Grabbing SQL records: Nullable bool to bool
Problem So I have a method that does a lookup in an existing List<T>, populated elsewhere by grabbing the records […]
Should I use setters with null or no setter when null value?
Problem I would like to know what are the drawbacks of setting values this way: class PersonFactory { public function […]
MySQL case statement with two tables
Problem How can I improve the following working SQL statement for better performance and consistency? SELECT if(roll is null,0,roll) as […]
Determining request status
Problem This code gets request status based on request type and some mapping info. I’m wondering if there is a […]
Using Common Table Expression and Outer queries
Problem In following query I’m use both Common Table Expression and Outer queries. Apparently both looks same to me. If […]
Simplify & Reduce steps in the IsDistinct function
Problem Because I often have to deal with two Variants that may or may not be Null, we need a […]
Null check when enabling Up navigation in Android
Problem This upvoted SO answer and this upvoted SO answer both check for null in a similar way: they call […]