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
open -a Simulator | |
xcrun simctl uninstall booted <app_id> | |
(lldb) | |
e (void)[0x12345 setAlpha: 1.0] | |
e (void)[0x12345 setBackgroundColor: [UIColor redColor]] | |
e (void)[CATransaction flush] | |
po ((UIView *) 0x12345).layer | |
adb logcat | grep “” |
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
using System; | |
using System.Threading.Tasks; | |
using UIKit; | |
namespace interview_questions_ios | |
{ | |
public partial class ViewController : UIViewController | |
{ | |
public ViewController(IntPtr handle) : base(handle) | |
{ |
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
using System; | |
using System.Text; | |
namespace types | |
{ | |
public class ValRefTypes | |
{ | |
public ValRefTypes() | |
{ | |
var i = 10; |
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
$ git log --graph --oneline --all | |
$ git stash save "my_stash" | |
$ git stash list | |
$ git stash pop stash@{n} | |
$ git stash apply stash@{n} | |
$ git commit -m "Title" -m "Description .........."; | |
$ git checkout [name_of_branch] |
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
100% — FF | |
95% — F2 | |
90% — E6 | |
85% — D9 | |
80% — CC | |
75% — BF | |
70% — B3 | |
65% — A6 | |
60% — 99 | |
55% — 8C |
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
byte[] OpenImage() | |
{ | |
byte[] imageData = null; | |
var assembly = GetType().GetTypeInfo().Assembly; | |
string filePath = "AssemblyName" + ".FolderName.FileName.extension"; | |
using (Stream s = assembly.GetManifestResourceStream(filePath)) | |
{ | |
long length = s.Length; | |
imageData = new byte[length]; |
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
private byte[] ReadBytes(Android.Net.Uri uri) | |
{ | |
var stream = ContentResolver.OpenInputStream(uri); | |
var byteArrayStream = new ByteArrayOutputStream(); | |
byte[] buffer = new byte[1024]; | |
int i = Java.Lang.Integer.MaxValue; | |
while ((i = stream.Read(buffer, 0, buffer.Length)) > 0) | |
{ | |
byteArrayStream.Write(buffer, 0, i); |