Big company has lots of ObjC code

class Person: NSObject {

var _name: String

init(name: String){

_name = name

}

function setName(name:String){

_name = name

}

}

run in playground

Person.setName(“Dancer”)

/##ObjC

@interface Person …


Big company has lots of ObjC code

Swfit -> ObjC

/##Swift

var name:String = Mario

print(name)

/## ObjC

@interface ViewController ()

@property (nonatomic, strong) NSString* userName;

@end

@implementation ViewController

NSLog(@”%@”…


ORM

make a model

php artisan make:model ModelNamecomposer dump-autoload

And Start test

php artisan tinker
>>> ModelName::all()
>>> ModelName::where('id','>',3)->get()


MySQL DB make Table

use Illuminate\Support\Facades\DB;

  1. getData from DB

Within Function

{

$data = DB::table(‘table_name’)-> getData();

}

2. make a table

Command

php artisan make:migration create_AAAAAs

Set your Column

public…

Basic move

Show all Route

>php artisan route:list
  • > ps.
RouteServiceProvider 
protected $namespace = 'App\Http\Controllers';

New a controller

>php artisan make::controller NewController --resource
  • (resource including CRUD)

9. Palindrome Number

Given an integer x, return true if x is palindrome integer.

An integer is a palindrome when it reads the same backward as forward. For example, 121 is palindrome while 123 is not.

Example 1:

Input: x = 121
Output: true

Example 2:

Input: x = -121
Output…

209. Minimum Size Subarray Sum

Given an array of positive integers nums and a positive integer target, return the minimal length of a contiguous subarray [numsl, numsl+1, ..., numsr-1, numsr] of which the sum is greater than or equal to target. If there is no such subarray, return 0 instead.

Mario tsai

Major in physical education. Football referee. And high interest in looking the world through the numbers.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store