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
| cmake_minimum_required(VERSION 3.13) | |
| project(untitled) | |
| SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") | |
| set(CMAKE_CXX_STANDARD 11) | |
| set(BOOST_ROOT /home/user/boost_1_69_0) | |
| set(BOOST_INCLUDEDIR /home/user/boost_1_69_0) | |
| set(BOOST_LIBRARYDIR /home/user/boost_1_69_0/stage/lib) | |
| include_directories( | |
| /usr/local/include/mongocxx/v_noabi | |
| /usr/local/include/bsoncxx/v_noabi |
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
| public BaseJavaClass setInCircle(Boolean inCircle) { | |
| this.inCircle = inCircle; | |
| return this; | |
| } | |
| public BaseJavaClass setNeedFit(Boolean needFit) { | |
| this.needFit = needFit; | |
| return this; | |
| } |
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
| public static Observable<Response> getData() { | |
| StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); | |
| StrictMode.setThreadPolicy(policy); | |
| final OkHttpClient client = new OkHttpClient(); | |
| final Request request = new Request.Builder() | |
| .url("https://github.com/ar-android/panfic/raw/master/Panfic/gen/com/ocit/data.json") | |
| .get() | |
| .addHeader("cache-control", "no-cache") |
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
| https://habrahabr.ru/post/328512/ |
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
| //this is BAD! | |
| def buildDateTime = new Date().format(‘yyMMddHHmm’).toInteger() | |
| android { | |
| defaultConfig { | |
| versionCode buildDateTime | |
| } | |
| } | |
| Instead, disable this on development builds: | |
| def buildDateTime = project.hasProperty(‘devBuild’) ? 100 : new Date().format(‘yyMMddHHmm’).toInteger() |
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
| https://github.com/BrianOdisho/SimpleNewsReader | |
| https://github.com/vpaliyX/Melophile | |
| https://android-tools.ru/coding/otmena-zadachi-v-asynctask/ | |
| https://blog.aritraroy.in/20-awesome-open-source-android-apps-to-boost-your-development-skills-b62832cf0fa4 | |
| https://blog.mindorks.com/how-to-learn-android-development-f33dd6dba40d | |
| https://rongi.github.io/kotlin-blog/rxjava/rx/2017/08/01/error-handling-in-rxjava.html | |
| https://habrahabr.ru/post/332642/ Validator | |
| https://blog.aritraroy.in/20-awesome-open-source-android-apps-to-boost-your-development-skills-b62832cf0fa4 | |
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
| Multidex | |
| Рано или поздно разработчик сталкивается с проблемой в 65 тысяч методов. Но начнем сначала. Когда вы хотите установить приложение на телефон вам нужен apk файл. Основа любого apk файла dex файл. Dex файл — это ваши java классы собранные в один файл. Но у dex файла есть ограничение в 65 тысяч методов. И большая часть приложений превышает этот лимит и получает exception при сборке. Для таких случаев создан multidex. В gradle(app module) добавляете: | |
| ... | |
| defaultConfig { | |
| ... | |
| multiDexEnabled true | |
| ... | |
| } |
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 static Observable<Pair<Object, Integer>> observeSelect(Spinner spinner) { | |
| final PublishSubject<Pair<Object, Integer>> selectSubject = PublishSubject.create(); | |
| spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | |
| @Override | |
| public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { | |
| @SuppressWarnings("unchecked") Pair<Object, Integer> pair = new Pair<>(parent.getItemAtPosition(position), position); | |
| //Tuple tuple = new Tuple(parent.getItemAtPosition(position), position); | |
| selectSubject.onNext(pair); | |
| } |
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.Collections.Generic; | |
| using System.Data; | |
| using System.IO; | |
| using System.Text; | |
| namespace EncodeBanks | |
| { | |
| class Program | |
| { |
NewerOlder