C# Dictionary get item by index

If you need to extract an element key based on an index, this function can be used: If you need to extract the Key where the element value is equal to the integer generated randomly, you can use the following function: Make sure that you added reference to System.Linq in your class. Side Note: The first element … Read more

Import existing source code to GitHub

If you’ve got local source code you want to add to a new remote new git repository without ‘cloning’ the remote first, do the following (I often do this – you create your remote empty repository in bitbucket/github, then push up your source) Create the remote repository, and get the URL such as [email protected]:/youruser/somename.git or https://github.com/youruser/somename.gitIf your local … Read more

Why is 1 Byte equal to 8 Bits? 

I’ts been a minute since I took computer organization, but the relevant wiki on ‘Byte’ gives some context. The byte was originally the smallest number of bits that could hold a single character (I assume standard ASCII). We still use ASCII standard, so 8 bits per character is still relevant. This sentence, for instance, is 41 bytes. … Read more

Android Debugging Failing With “Couldn’t connect to logcat, GetProcessId returned: 0” FFImageLoading.Platform.dll.so Not Found

This is a known issue with Oreo and Xamarin Android on Visual Studio for Windows. It works on Visual Studio for Mac apparently. It will be fixed in an upcoming release. In the mean time there is a work around down near the bottom of the bug link above (comment 20).

Running time of algorithm A is at least O(n²) – Why is it meaningless?

T(n): running time of Algo A. We just care about the upper bound and lower bound of T(n) The statement: T(n) >= O(n^2) Upper bound: Because T(n) >= O(n^2), then there’s no information about upper bound of T(n) Lower bound: Assume f(n) = O(n^2), then the statement: T(n) >= f(n), but f(n) could be anything that is “smaller” than n^2 , Ex: constant, n,…, So there’s no conclusion … Read more