Skip to main content

Posts

Android ref links

  Library reference resources: MVVM Architecture :  https://developer.android.com/jetpack/guide Hilt:  https://developer.android.com/training/dependency-injection/hilt-android Coroutines:  https://developer.android.com/kotlin/coroutines Retrofit:  https://square.github.io/retrofit/ Moshi:  https://github.com/square/moshi Coil:  https://coil-kt.github.io/coil/ Leak Canary:  https://square.github.io/leakcanary/ Concept reference resources: Repository Codelab:  https://developer.android.com/codelabs/kotlin-android-training-repository Room and Coroutines Codelab:  https://developer.android.com/codelabs/kotlin-android-training-room-database Room and Flow Codelab:  https://developer.android.com/codelabs/basic-android-kotlin-training-intro-room-flow Hilt Codelab:  https://developer.android.com/codelabs/android-hilt Navigation Codelab:  https://developer.android.com/codelabs/jetpack-compose-navigation Theming Codelab:  https:...

Git - quick ref

This blog post from  Daniel Abrahamberg  explains different commands to deal with git commits.    https://www.abrahamberg.com/blog/git-remove-commits-from-branch-after-push-reset-revert-or-rebase/

Android onTouch or onClick

  The decision to use either   onTouch   or   onClick   in an Android application depends on the specific requirements of the application and the behavior that the developer is trying to achieve. onClick  is called when the user taps a view, and is similar to a button press in a traditional desktop interface.  onClick  provides simple click detection, but it doesn't allow for more complex gestures like swipes and pinches. onTouch , on the other hand, provides more detailed information about the touch event and can detect complex gestures like swipes and pinches.  onTouch  gives you a  MotionEvent  which contains information about the touch event, including the position of the touch, the time of the touch, and the action that occurred. If you need to detect simple click events, then  onClick  is sufficient. However, if you need to detect more complex gestures, like swipes and pinches, then  onTouch is a better cho...

LINQ - some useful links

I have mentioned below some useful links on LINQ. http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx http://weblogs.asp.net/scottgu/archive/2006/08/27/Slides-_2B00_-Samples-Posted-from-my-TechEd-LINQ-Talk.aspx http://blogs.msdn.com/b/ukadc/archive/2010/04/27/what-on-earth-is-a-lambda-expression.aspx Hope this helps.

Find Cultureinfo and RegionInfo from browser in ASP.NET

Get language and country from a browser in ASP.NET by Mads Kristensen I recently had the challenge of retrieving a country based on the browser language. It was used to pre-select a country in a drop down list so the user didn’t have to. I knew it wasn’t going to be 100% accurate but probably more like 80-90%. That’s because some people change the browser language instead of their native language and others use a non-ISO standard language. And last, some clients just don’t send language information. It wasn’t an option to use a database that mapped IP addresses to countries, so the country had to be resolved from the browser alone. Resolve the culture I decided to split the functionality up into two methods. The first one resolves the CultureInfo based on the browsers language.   public static CultureInfo ResolveCulture() {   string [] languages = HttpContext .Current.Request.UserLanguages;     if (languages == null || languages.Length == 0...

Receiving and processing a SOAP header

The basic steps to receiving and processing a SOAP header are: Create a class deriving from SoapHeader representing the data passed in the SOAP header. Add a member to the XML Web service class or XML Web service client proxy class of the type created in step 1. Apply a SoapHeaderAttribute to the XML Web service method or the corresponding method in the proxy class, specifying the member created in step 2 in the MemberName property. Within the XML Web service method or XML Web service client code, access the MemberName property to process the data sent in the SOAP header. [from msdn ]

This project is not supported by this type of installation.

Hi, Have you ever got this error "This project is not supported by this type of installation" while try to create a new project in VS 2008. If you have got this then here is simple solution (to try ) which would solve the issue. From the Start - > Run type devenv /ResetSkipPkgs and press enter. Now you see a new instance of VS 2008 IDE opened without any error. So what was the issue? While you open the VS 2008, it might have failed to load the necessary packages which are required to open some project templates. When you use the above mentioned switch it actually finds a package which was new / not loaded previously and load that packages and the error doesn't appear now. :)