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
func isValidPassword() -> Bool { | |
let regex = "\\b(?!.*?(?:0(?:12)|123|234|3(?:45|21)|4(?:56)|5(?:67)|6(?:78)|7(?:89)))(?!.*?(.)\\1{2})[0-9]{6,8}\\b" | |
let sequentialOrRepeated = NSPredicate(format: "SELF MATCHES %@", regex) | |
return sequentialOrRepeated.evaluate(with: self) | |
} |
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
package main | |
import ( | |
"log" | |
"net" | |
"google.golang.org/grpc" | |
pb "../employee" | |
) |
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
syntax = "proto2"; | |
// there's also "proto3" | |
package employeebook; | |
option java_package = "com.cnb.employeebook"; | |
option java_outer_classname = "EmployeeBookProtos"; | |
service EmployeeService { | |
// Get all employees |
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
// Code generated by protoc-gen-go. DO NOT EDIT. | |
// source: grpc_employee.proto | |
package employeebook | |
import proto "github.com/golang/protobuf/proto" | |
import fmt "fmt" | |
import math "math" | |
import ( |
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
// Generated by the protocol buffer compiler. DO NOT EDIT! | |
// source: people.proto | |
package com.cnb.employeebook; | |
public final class EmployeeBookProtos { | |
private EmployeeBookProtos() {} | |
public static void registerAllExtensions( | |
com.google.protobuf.ExtensionRegistryLite registry) { | |
} |
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
syntax = "proto2"; | |
// there's also "proto3" | |
package employeebook; | |
option java_package = "com.cnb.employeebook"; | |
option java_outer_classname = "EmployeeBookProtos"; | |
message Employee { | |
required string name = 1; |
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
/** ButterKnife Code **/ | |
@BindView(R.id.picture) | |
ImageView picture; | |
@BindView(R.id.name) | |
TextView name; | |
@BindView(R.id.gender) | |
TextView gender; | |
@BindView(R.id.company) | |
TextView company; | |
@BindView(R.id.email) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:orientation="vertical"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" |
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
-----------------------------------com.example.packagename.Friend.java----------------------------------- | |
package com.example.packagename; | |
import android.os.Parcel; | |
import android.os.Parcelable; | |
import android.os.Parcelable.Creator; | |
import com.google.gson.annotations.Expose; | |
import com.google.gson.annotations.SerializedName; |
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
[ | |
{ | |
"_id": "5a3d202a2c543f89e3a8fd39", | |
"index": 0, | |
"guid": "4867b1ad-504a-443b-96a6-04e4d4fd5b1b", | |
"isActive": true, | |
"balance": "$2,869.73", | |
"picture": "http://placehold.it/32x32", | |
"age": 33, | |
"eyeColor": "blue", |