This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 'Basic' | |
CLR - Common Language Runtime (Memory management, Security, Performance optimization) | |
JIT - Just In Time compiler (Translate CIL into machine code at runtime) | |
CIL - Common Intermediate Language (Compiler convert the code into CIL instead of machine code, like Java Bytecode) | |
GC - Garbage Collector | |
Reclaim unused object in 3 steps - Marking, Sweeping and Compact (reorganise to reduce fragmentation) | |
.Net Framework - Windows only, WinForms, WPF, Older ASP.NET Web Form\ | |
.Net Core - Cross Platform, Support docker, Kubernetes, microservice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. Given two sorted arrays nums1 and nums2 of size m and n respecFvely, return the median of | |
the two sorted arrays. | |
The overall run Fme complexity should be O(log (m+n)). | |
Example 1: | |
Input: nums1 = [1,3], nums2 = [2] | |
Output: 2.00000 | |
Explanation: merged array = [1,2,3] and median is 2. | |
Example 2: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun bitmapToBase64(bitmap: Bitmap): String { | |
val byteStream = ByteArrayOutputStream() | |
bitmap.compress(Bitmap.CompressFormat.JPEG, 20, byteStream) | |
val b: ByteArray = byteStream.toByteArray() | |
return Base64.encodeToString(b, Base64.NO_WRAP) | |
} |