NavController {
->ViewController
}
ViewController {
->Table {
Row {
Action->ViewController.OnClick
}
}
using UnityEngine; | |
public class ConfigCamera : MonoBehaviour { | |
public float Zoom = 1.0f; | |
float _pixelsPerUnit = 1.0f; //Set this to whatever you set for your texture | |
public float ScreenWidth; //For Debugging | |
public float ScreenHeight; //For Debugging | |
Rect _bounds; |
/* | |
Starting Speed Test for 100000000 iterations | |
Distance_Normal: 17187ms AvgErr: 0.00% MaxErr: 0.00% | |
Distance_Sqrt2: 585 ms AvgErr: 5.28% MaxErr: 8.24% | |
Distance_4142: 623 ms AvgErr: 5.28% MaxErr: 8.24% | |
Distance_4142_Cast: 3824 ms AvgErr: 5.28% MaxErr: 8.24% | |
Distance_4142_Int_Only: 584 ms AvgErr: 5.28% MaxErr: 8.24% | |
Distance_4142_Int_Only_Manual_Inlined: 666 ms AvgErr: 5.28% MaxErr: 8.24% | |
Distance_AShift1: 606 ms AvgErr: 8.84% MaxErr:11.80% | |
Distance_337: 613 ms AvgErr: 3.38% MaxErr: 5.52% |
NavController {
->ViewController
}
ViewController {
->Table {
Row {
Action->ViewController.OnClick
}
}
defaults write com.apple.CoreSimulator.IndigoFramebufferServices FramebufferEmulationHint 1
(1 = Metal, 2 = force use of OpenGL, 3 = OpenGL)
Comment or DM me to add to the list:
See: http://seriot.ch/parsing_json.php - Parsing JSON is a minefield. Notice how all of these json parsers are not up to spec. If they can't get it to spec then imagine the possible security issues with a format as simple as JSON.
JSON - Extremely Popular and Supported. Relatively easy to read.
XML - Old and Ugly. Widely supported. Useful if you need namespaces.
YAML - Popular format with Ruby and other server stuff. Apparently, a pain to implement and known to be insecure.
TOML - Simple configuration format. Some similarities to json. Complex arrays of objects suck tho.
HOCON - Extremely flexibile version of json.
JSON5 - Another flexible version of json. Not as flexible as others, but it has most of the important features.
package any | |
import android.util.Log | |
import any.model.AppException | |
import any.model.NetworkState | |
import any.LiveModelCallback2 | |
import retrofit2.Call | |
import retrofit2.Callback | |
import retrofit2.Response |
class VCExample: BaseViewController { | |
// IBOutlets | |
// MARK: - Public Vars | |
// MARK: - Private Vars | |
// MARK: - Init | |
// MARK: - View Lifecycle |
//https://github.com/git/git/blob/master/banned.h | |
/* | |
There are a few standard C functions (like strcpy) which are | |
easy to misuse. E.g.: | |
char path[PATH_MAX]; | |
strcpy(path, arg); | |
may overflow the "path" buffer. Sometimes there's an earlier | |
constraint on the size of "arg", but even in such a case |
Description | Command |
---|---|
Create New Solution | dotnet new sln |
Create New Library | dotnet new classlib -o library |
Add Project to Solution | dotnet sln add library/library.csproj |
Add Nueget Package to Project | dotnet add library package Newtonsoft.Json |
Fix Dependencies | dotnet restore |
Build Solution | dotnet build |
Create Unit Test Project | dotnet new xunit -o test-library |
Add P |
/* | |
Example Usage: | |
public int CalcScore(VideoResolution? itemResolution) { | |
if (Util.Guard(out VideoResolution res, itemResolution)) return 0; | |
if (res == VideoResolution._1080p) return 5; | |
return 1; | |
} | |
Alternatively you can do: | |
if (!(itemResolution is VideoResolution res)) return 0; |