- https://github.com/VeryGoodOpenSource/very_good_cli (It will nicely genearate a project with all the basic setup, but with bloc state management, you can simply replace with any other state management library)
Riverpod or Bloc
Riverpod or Bloc
| # HTTP - redirect all requests to HTTPS | |
| server { | |
| listen 80; | |
| listen [::]:80 default_server ipv6only=on; | |
| return 301 https://$host$request_uri; | |
| } | |
| # HTTPS - serve HTML from /usr/share/nginx/html, proxy requests to /parse/ | |
| # through to Parse Server | |
| server { |
| [ | |
| { | |
| "name": "Afghanistan", | |
| "dial_code": "+93", | |
| "code": "AF" | |
| }, | |
| { | |
| "name": "Aland Islands", | |
| "dial_code": "+358", | |
| "code": "AX" |
rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-* && watchman watch-del-all && npm cache clean --force && npm cache verify && rm -rf ios/build && rm -rf node_modules/ && npm i watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro* && rm -rf $TMPDIR/hasterm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && watchman watch-del-all && rm -rf ios/build && rm -rf node_modules/ && npm cache clean --force && npm iwatchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cachewatchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
| 1. Open Terminal | |
| 2. cd to your Xcode project | |
| 3. Execute any following command: | |
| a) Including Pods: find . -name "*.swift" -print0 | xargs -0 wc -l | |
| b) Excluding Pods: find . -path ./Pods -prune -o -name "*.swift" -print0 ! -name "/Pods" | xargs -0 wc -l | |
| c) Swift and Obj-C: find . -type d \( -path ./Pods -o -path ./Vendor \) -prune -o \( -iname \*.m -o -iname \*.mm -o -iname \*.h -o -iname \*.swift \) -print0 | xargs -0 wc -l | |
| Alternative way | |
| # brew install cloc |
| extension Optional where Wrapped == String { | |
| var nilIfEmpty: String? { | |
| guard let strongSelf = self else { | |
| return nil | |
| } | |
| return strongSelf.isEmpty ? nil : strongSelf | |
| } | |
| }//USAGE | |
| //guard let title = textField.text.nilIfEmpty else { | |
| // // Alert: textField is empty! |
| import android.text.TextUtils; | |
| import io.realm.Case; | |
| import io.realm.Realm; | |
| import io.realm.RealmObject; | |
| import io.realm.RealmResults; | |
| public class RealmFullTextSearch { | |
| public static <T extends RealmObject> RealmResults<T> search(Realm realm, Class<T> modelClass, String query, String fieldName, boolean partialSearch){ |
| // | |
| // Extension.swift | |
| // Hadith | |
| // | |
| // Created by Sadman samee on 2/5/16. | |
| // Copyright © 2016 LoopsLab. All rights reserved. | |
| // | |
| import Foundation | |
| import Foundation |
| public class CalculatorOp { | |
| private int total; | |
| public CalculatorOp() | |
| { | |
| total=0; | |
| } | |
| public String GetTotalString() | |
| {return ""+total; | |
| } | |
| public void setTotal(String n) |