├── AndCode ├── .gitignore ├── .idea │ ├── caches │ │ └── build_file_checksums.ser │ ├── codeStyles │ │ └── Project.xml │ ├── gradle.xml │ ├── misc.xml │ ├── runConfigurations.xml │ └── vcs.xml ├── app │ ├── .gitignore │ ├── CMakeLists.txt │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── ming │ │ │ └── com │ │ │ └── andcode │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── cpp │ │ │ └── native-lib.cpp │ │ ├── java │ │ │ └── ming │ │ │ │ └── com │ │ │ │ └── andcode │ │ │ │ ├── AndApplication.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── arouter │ │ │ │ ├── LoginInterceptor.java │ │ │ │ └── SaidInterceptor.java │ │ │ │ ├── dagger2 │ │ │ │ ├── DaggerActivity.java │ │ │ │ ├── component │ │ │ │ │ ├── DaggerActivityComp.java │ │ │ │ │ ├── FlowerComponent.java │ │ │ │ │ └── PotComponent.java │ │ │ │ ├── delo │ │ │ │ │ ├── Flower.java │ │ │ │ │ ├── Lily.java │ │ │ │ │ ├── OkHttpClient.java │ │ │ │ │ ├── Pot.java │ │ │ │ │ ├── RetrofitManager.java │ │ │ │ │ └── Rose.java │ │ │ │ ├── module │ │ │ │ │ ├── DaggeActivityModule.java │ │ │ │ │ ├── FlowerModule.java │ │ │ │ │ └── PotModule.java │ │ │ │ ├── qualifier │ │ │ │ │ ├── LilyFlower.java │ │ │ │ │ └── RoseFlower.java │ │ │ │ └── scope │ │ │ │ │ └── ActivityScope.java │ │ │ │ ├── dbbase │ │ │ │ ├── BaseDao.java │ │ │ │ ├── BasicEntity.java │ │ │ │ ├── BasicSQLHelper.java │ │ │ │ ├── Where.java │ │ │ │ └── dbcontact │ │ │ │ │ ├── ContactEntity.java │ │ │ │ │ ├── ContactEntityDao.java │ │ │ │ │ ├── ContactManager.java │ │ │ │ │ ├── ContactSQLHelper.java │ │ │ │ │ ├── ContactStore.java │ │ │ │ │ └── DBContactStore.java │ │ │ │ ├── jni │ │ │ │ └── JNIManage.java │ │ │ │ ├── lifebind │ │ │ │ ├── ActivityFragmentLifecycle.java │ │ │ │ ├── LifeUtil.java │ │ │ │ ├── Lifecycle.java │ │ │ │ ├── LifecycleDetector.java │ │ │ │ ├── LifecycleListener.java │ │ │ │ ├── LifecycleManagerFragment.java │ │ │ │ └── TestLife.java │ │ │ │ └── mvp │ │ │ │ ├── MVPActivity.java │ │ │ │ ├── base │ │ │ │ ├── Api.java │ │ │ │ ├── BasePresenter.java │ │ │ │ ├── IModel.java │ │ │ │ ├── IPresenter.java │ │ │ │ └── IView.java │ │ │ │ ├── callback │ │ │ │ └── CallBack.java │ │ │ │ └── getdata │ │ │ │ ├── GetDataContract.java │ │ │ │ ├── GetDataModel.java │ │ │ │ ├── GetDataModeli.java │ │ │ │ ├── GetDataPresenter.java │ │ │ │ ├── bean │ │ │ │ ├── ArticleListBean.java │ │ │ │ └── BannerBean.java │ │ │ │ └── utils │ │ │ │ ├── LogUtil.java │ │ │ │ └── RetrofitUtils.java │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ └── ic_launcher_background.xml │ │ │ ├── layout │ │ │ ├── activity_dagger.xml │ │ │ ├── activity_main.xml │ │ │ └── activity_mvp.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── dimen.xml │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── ming │ │ └── com │ │ └── andcode │ │ └── ExampleUnitTest.java ├── basemodule │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── ming │ │ │ └── com │ │ │ └── basemodule │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── ming │ │ │ │ └── com │ │ │ │ └── basemodule │ │ │ │ └── Books.java │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ │ └── test │ │ └── java │ │ └── ming │ │ └── com │ │ └── basemodule │ │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── modulerone │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── ming │ │ │ └── com │ │ │ └── modulerone │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── ming │ │ │ │ └── com │ │ │ │ └── modulerone │ │ │ │ └── ModulerMainActivity.java │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ └── ic_launcher_background.xml │ │ │ ├── layout │ │ │ └── activity_moduler_main.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── ming │ │ └── com │ │ └── modulerone │ │ └── ExampleUnitTest.java ├── modulertwo │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── ming │ │ │ └── com │ │ │ └── modulertwo │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── ming │ │ │ │ └── com │ │ │ │ └── modulertwo │ │ │ │ └── ModulerTMainActivity.java │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ └── ic_launcher_background.xml │ │ │ ├── layout │ │ │ └── activity_moduler_tmain.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── ming │ │ └── com │ │ └── modulertwo │ │ └── ExampleUnitTest.java └── settings.gradle ├── CCodes ├── .gitignore ├── .idea │ ├── CCodes.iml │ ├── encodings.xml │ ├── misc.xml │ ├── modules.xml │ ├── vcs.xml │ └── workspace.xml ├── CMakeLists.txt └── com.ming.code │ ├── blogcode │ ├── blogcodes.c │ ├── method.h │ ├── operatorhead.h │ ├── socket_client_tcp.c │ ├── socket_client_udp.c │ ├── socket_server_tcp.c │ ├── socket_server_udp.c │ ├── support.c │ ├── ycodes.c │ └── ycodes.h │ ├── easylogger │ ├── inc │ │ ├── elog.h │ │ └── elog_cfg.h │ ├── port │ │ └── elog_port.c │ └── src │ │ ├── elog.c │ │ ├── elog_async.c │ │ ├── elog_buf.c │ │ └── elog_utils.c │ ├── libcurl │ ├── request │ │ ├── cluster_curl.c │ │ ├── cluster_curl.h │ │ └── libcurlclient.c │ └── socket │ │ ├── externalsocket.c │ │ └── sendrecvheart.c │ ├── main.c │ └── tinyhttp │ ├── simpleclient.c │ └── smarthttp.c ├── CMakeDemo ├── .idea │ ├── CMakeDemo.iml │ ├── encodings.xml │ ├── misc.xml │ ├── modules.xml │ └── vcs.xml ├── CMakeLists.txt ├── License.txt ├── config.h.in ├── main.c └── math │ ├── CMakeLists.txt │ ├── MathUtils.c │ └── MathUtils.h ├── CppCodes ├── .gitignore ├── .idea │ └── vcs.xml ├── CMakeLists.txt ├── com.ming.codes │ ├── blogcodes │ │ ├── Cppblogcode.cpp │ │ ├── Cppblogcode.h │ │ └── googletest.cpp │ ├── codinginterview │ │ ├── ConstructBinaryTree.cpp │ │ ├── CopyComplexList.cpp │ │ ├── FindDuplicate.cpp │ │ ├── MinNumberInRotatedArray.cpp │ │ ├── NextNodeInBinaryTree.cpp │ │ ├── PrintListInReOrder.cpp │ │ ├── QueueInTwoStack.cpp │ │ ├── ReplaceSpace.cpp │ │ └── ReverseLinkedList.cpp │ └── res │ │ └── IntelGFXCoin.log ├── googletest │ ├── .gitignore │ ├── .travis.yml │ ├── BUILD.bazel │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── Makefile.am │ ├── README.md │ ├── WORKSPACE │ ├── appveyor.yml │ ├── ci │ │ ├── build-linux-autotools.sh │ │ ├── build-linux-bazel.sh │ │ ├── env-linux.sh │ │ ├── env-osx.sh │ │ ├── get-nprocessors.sh │ │ ├── install-linux.sh │ │ ├── install-osx.sh │ │ ├── log-config.sh │ │ └── travis.sh │ ├── configure.ac │ ├── googlemock │ │ ├── CHANGES │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── Makefile.am │ │ ├── README.md │ │ ├── cmake │ │ │ ├── gmock.pc.in │ │ │ └── gmock_main.pc.in │ │ ├── configure.ac │ │ ├── docs │ │ │ ├── CheatSheet.md │ │ │ ├── CookBook.md │ │ │ ├── DesignDoc.md │ │ │ ├── Documentation.md │ │ │ ├── ForDummies.md │ │ │ ├── FrequentlyAskedQuestions.md │ │ │ └── KnownIssues.md │ │ ├── include │ │ │ └── gmock │ │ │ │ ├── gmock-actions.h │ │ │ │ ├── gmock-cardinalities.h │ │ │ │ ├── gmock-generated-actions.h │ │ │ │ ├── gmock-generated-actions.h.pump │ │ │ │ ├── gmock-generated-function-mockers.h │ │ │ │ ├── gmock-generated-function-mockers.h.pump │ │ │ │ ├── gmock-generated-matchers.h │ │ │ │ ├── gmock-generated-matchers.h.pump │ │ │ │ ├── gmock-generated-nice-strict.h │ │ │ │ ├── gmock-generated-nice-strict.h.pump │ │ │ │ ├── gmock-matchers.h │ │ │ │ ├── gmock-more-actions.h │ │ │ │ ├── gmock-more-matchers.h │ │ │ │ ├── gmock-spec-builders.h │ │ │ │ ├── gmock.h │ │ │ │ └── internal │ │ │ │ ├── custom │ │ │ │ ├── README.md │ │ │ │ ├── gmock-generated-actions.h │ │ │ │ ├── gmock-generated-actions.h.pump │ │ │ │ ├── gmock-matchers.h │ │ │ │ └── gmock-port.h │ │ │ │ ├── gmock-generated-internal-utils.h │ │ │ │ ├── gmock-generated-internal-utils.h.pump │ │ │ │ ├── gmock-internal-utils.h │ │ │ │ └── gmock-port.h │ │ ├── msvc │ │ │ ├── 2005 │ │ │ │ ├── gmock.sln │ │ │ │ ├── gmock.vcproj │ │ │ │ ├── gmock_config.vsprops │ │ │ │ ├── gmock_main.vcproj │ │ │ │ └── gmock_test.vcproj │ │ │ ├── 2010 │ │ │ │ ├── gmock.sln │ │ │ │ ├── gmock.vcxproj │ │ │ │ ├── gmock_config.props │ │ │ │ ├── gmock_main.vcxproj │ │ │ │ └── gmock_test.vcxproj │ │ │ └── 2015 │ │ │ │ ├── gmock.sln │ │ │ │ ├── gmock.vcxproj │ │ │ │ ├── gmock_config.props │ │ │ │ ├── gmock_main.vcxproj │ │ │ │ └── gmock_test.vcxproj │ │ ├── scripts │ │ │ ├── fuse_gmock_files.py │ │ │ ├── generator │ │ │ │ ├── LICENSE │ │ │ │ ├── README │ │ │ │ ├── README.cppclean │ │ │ │ ├── cpp │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── ast.py │ │ │ │ │ ├── gmock_class.py │ │ │ │ │ ├── gmock_class_test.py │ │ │ │ │ ├── keywords.py │ │ │ │ │ ├── tokenize.py │ │ │ │ │ └── utils.py │ │ │ │ └── gmock_gen.py │ │ │ ├── gmock-config.in │ │ │ ├── gmock_doctor.py │ │ │ ├── upload.py │ │ │ └── upload_gmock.py │ │ ├── src │ │ │ ├── gmock-all.cc │ │ │ ├── gmock-cardinalities.cc │ │ │ ├── gmock-internal-utils.cc │ │ │ ├── gmock-matchers.cc │ │ │ ├── gmock-spec-builders.cc │ │ │ ├── gmock.cc │ │ │ └── gmock_main.cc │ │ └── test │ │ │ ├── BUILD.bazel │ │ │ ├── gmock-actions_test.cc │ │ │ ├── gmock-cardinalities_test.cc │ │ │ ├── gmock-generated-actions_test.cc │ │ │ ├── gmock-generated-function-mockers_test.cc │ │ │ ├── gmock-generated-internal-utils_test.cc │ │ │ ├── gmock-generated-matchers_test.cc │ │ │ ├── gmock-internal-utils_test.cc │ │ │ ├── gmock-matchers_test.cc │ │ │ ├── gmock-more-actions_test.cc │ │ │ ├── gmock-nice-strict_test.cc │ │ │ ├── gmock-port_test.cc │ │ │ ├── gmock-spec-builders_test.cc │ │ │ ├── gmock_all_test.cc │ │ │ ├── gmock_ex_test.cc │ │ │ ├── gmock_leak_test.py │ │ │ ├── gmock_leak_test_.cc │ │ │ ├── gmock_link2_test.cc │ │ │ ├── gmock_link_test.cc │ │ │ ├── gmock_link_test.h │ │ │ ├── gmock_output_test.py │ │ │ ├── gmock_output_test_.cc │ │ │ ├── gmock_output_test_golden.txt │ │ │ ├── gmock_stress_test.cc │ │ │ ├── gmock_test.cc │ │ │ └── gmock_test_utils.py │ └── googletest │ │ ├── CHANGES │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── Makefile.am │ │ ├── README.md │ │ ├── cmake │ │ ├── Config.cmake.in │ │ ├── gtest.pc.in │ │ ├── gtest_main.pc.in │ │ └── internal_utils.cmake │ │ ├── codegear │ │ ├── gtest.cbproj │ │ ├── gtest.groupproj │ │ ├── gtest_all.cc │ │ ├── gtest_link.cc │ │ ├── gtest_main.cbproj │ │ └── gtest_unittest.cbproj │ │ ├── configure.ac │ │ ├── docs │ │ ├── Pkgconfig.md │ │ ├── PumpManual.md │ │ ├── XcodeGuide.md │ │ ├── advanced.md │ │ ├── faq.md │ │ ├── primer.md │ │ └── samples.md │ │ ├── include │ │ └── gtest │ │ │ ├── gtest-death-test.h │ │ │ ├── gtest-message.h │ │ │ ├── gtest-param-test.h │ │ │ ├── gtest-param-test.h.pump │ │ │ ├── gtest-printers.h │ │ │ ├── gtest-spi.h │ │ │ ├── gtest-test-part.h │ │ │ ├── gtest-typed-test.h │ │ │ ├── gtest.h │ │ │ ├── gtest_pred_impl.h │ │ │ ├── gtest_prod.h │ │ │ └── internal │ │ │ ├── custom │ │ │ ├── README.md │ │ │ ├── gtest-port.h │ │ │ ├── gtest-printers.h │ │ │ └── gtest.h │ │ │ ├── gtest-death-test-internal.h │ │ │ ├── gtest-filepath.h │ │ │ ├── gtest-internal.h │ │ │ ├── gtest-linked_ptr.h │ │ │ ├── gtest-param-util-generated.h │ │ │ ├── gtest-param-util-generated.h.pump │ │ │ ├── gtest-param-util.h │ │ │ ├── gtest-port-arch.h │ │ │ ├── gtest-port.h │ │ │ ├── gtest-string.h │ │ │ ├── gtest-tuple.h │ │ │ ├── gtest-tuple.h.pump │ │ │ ├── gtest-type-util.h │ │ │ └── gtest-type-util.h.pump │ │ ├── m4 │ │ ├── acx_pthread.m4 │ │ └── gtest.m4 │ │ ├── msvc │ │ └── 2010 │ │ │ ├── gtest-md.sln │ │ │ ├── gtest-md.vcxproj │ │ │ ├── gtest-md.vcxproj.filters │ │ │ ├── gtest.sln │ │ │ ├── gtest.vcxproj │ │ │ ├── gtest.vcxproj.filters │ │ │ ├── gtest_main-md.vcxproj │ │ │ ├── gtest_main-md.vcxproj.filters │ │ │ ├── gtest_main.vcxproj │ │ │ ├── gtest_main.vcxproj.filters │ │ │ ├── gtest_prod_test-md.vcxproj │ │ │ ├── gtest_prod_test-md.vcxproj.filters │ │ │ ├── gtest_prod_test.vcxproj │ │ │ ├── gtest_prod_test.vcxproj.filters │ │ │ ├── gtest_unittest-md.vcxproj │ │ │ ├── gtest_unittest-md.vcxproj.filters │ │ │ ├── gtest_unittest.vcxproj │ │ │ └── gtest_unittest.vcxproj.filters │ │ ├── samples │ │ ├── prime_tables.h │ │ ├── sample1.cc │ │ ├── sample1.h │ │ ├── sample10_unittest.cc │ │ ├── sample1_unittest.cc │ │ ├── sample2.cc │ │ ├── sample2.h │ │ ├── sample2_unittest.cc │ │ ├── sample3-inl.h │ │ ├── sample3_unittest.cc │ │ ├── sample4.cc │ │ ├── sample4.h │ │ ├── sample4_unittest.cc │ │ ├── sample5_unittest.cc │ │ ├── sample6_unittest.cc │ │ ├── sample7_unittest.cc │ │ ├── sample8_unittest.cc │ │ └── sample9_unittest.cc │ │ ├── scripts │ │ ├── common.py │ │ ├── fuse_gtest_files.py │ │ ├── gen_gtest_pred_impl.py │ │ ├── gtest-config.in │ │ ├── pump.py │ │ ├── release_docs.py │ │ ├── upload.py │ │ └── upload_gtest.py │ │ ├── src │ │ ├── gtest-all.cc │ │ ├── gtest-death-test.cc │ │ ├── gtest-filepath.cc │ │ ├── gtest-internal-inl.h │ │ ├── gtest-port.cc │ │ ├── gtest-printers.cc │ │ ├── gtest-test-part.cc │ │ ├── gtest-typed-test.cc │ │ ├── gtest.cc │ │ └── gtest_main.cc │ │ ├── test │ │ ├── BUILD.bazel │ │ ├── googletest-break-on-failure-unittest.py │ │ ├── googletest-break-on-failure-unittest_.cc │ │ ├── googletest-catch-exceptions-test.py │ │ ├── googletest-catch-exceptions-test_.cc │ │ ├── googletest-color-test.py │ │ ├── googletest-color-test_.cc │ │ ├── googletest-death-test-test.cc │ │ ├── googletest-death-test_ex_test.cc │ │ ├── googletest-env-var-test.py │ │ ├── googletest-env-var-test_.cc │ │ ├── googletest-filepath-test.cc │ │ ├── googletest-filter-unittest.py │ │ ├── googletest-filter-unittest_.cc │ │ ├── googletest-json-outfiles-test.py │ │ ├── googletest-json-output-unittest.py │ │ ├── googletest-linked-ptr-test.cc │ │ ├── googletest-list-tests-unittest.py │ │ ├── googletest-list-tests-unittest_.cc │ │ ├── googletest-listener-test.cc │ │ ├── googletest-message-test.cc │ │ ├── googletest-options-test.cc │ │ ├── googletest-output-test-golden-lin.txt │ │ ├── googletest-output-test.py │ │ ├── googletest-output-test_.cc │ │ ├── googletest-param-test-invalid-name1-test.py │ │ ├── googletest-param-test-invalid-name1-test_.cc │ │ ├── googletest-param-test-invalid-name2-test.py │ │ ├── googletest-param-test-invalid-name2-test_.cc │ │ ├── googletest-param-test-test.cc │ │ ├── googletest-param-test-test.h │ │ ├── googletest-param-test2-test.cc │ │ ├── googletest-port-test.cc │ │ ├── googletest-printers-test.cc │ │ ├── googletest-shuffle-test.py │ │ ├── googletest-shuffle-test_.cc │ │ ├── googletest-test-part-test.cc │ │ ├── googletest-test2_test.cc │ │ ├── googletest-throw-on-failure-test.py │ │ ├── googletest-throw-on-failure-test_.cc │ │ ├── googletest-tuple-test.cc │ │ ├── googletest-uninitialized-test.py │ │ ├── googletest-uninitialized-test_.cc │ │ ├── gtest-typed-test2_test.cc │ │ ├── gtest-typed-test_test.cc │ │ ├── gtest-typed-test_test.h │ │ ├── gtest-unittest-api_test.cc │ │ ├── gtest_all_test.cc │ │ ├── gtest_assert_by_exception_test.cc │ │ ├── gtest_environment_test.cc │ │ ├── gtest_help_test.py │ │ ├── gtest_help_test_.cc │ │ ├── gtest_json_test_utils.py │ │ ├── gtest_list_output_unittest.py │ │ ├── gtest_list_output_unittest_.cc │ │ ├── gtest_main_unittest.cc │ │ ├── gtest_no_test_unittest.cc │ │ ├── gtest_pred_impl_unittest.cc │ │ ├── gtest_premature_exit_test.cc │ │ ├── gtest_prod_test.cc │ │ ├── gtest_repeat_test.cc │ │ ├── gtest_sole_header_test.cc │ │ ├── gtest_stress_test.cc │ │ ├── gtest_test_macro_stack_footprint_test.cc │ │ ├── gtest_test_utils.py │ │ ├── gtest_testbridge_test.py │ │ ├── gtest_testbridge_test_.cc │ │ ├── gtest_throw_on_failure_ex_test.cc │ │ ├── gtest_unittest.cc │ │ ├── gtest_xml_outfile1_test_.cc │ │ ├── gtest_xml_outfile2_test_.cc │ │ ├── gtest_xml_outfiles_test.py │ │ ├── gtest_xml_output_unittest.py │ │ ├── gtest_xml_output_unittest_.cc │ │ ├── gtest_xml_test_utils.py │ │ ├── production.cc │ │ └── production.h │ │ └── xcode │ │ ├── Config │ │ ├── DebugProject.xcconfig │ │ ├── FrameworkTarget.xcconfig │ │ ├── General.xcconfig │ │ ├── ReleaseProject.xcconfig │ │ ├── StaticLibraryTarget.xcconfig │ │ └── TestTarget.xcconfig │ │ ├── Resources │ │ └── Info.plist │ │ ├── Samples │ │ └── FrameworkSample │ │ │ ├── Info.plist │ │ │ ├── WidgetFramework.xcodeproj │ │ │ └── project.pbxproj │ │ │ ├── runtests.sh │ │ │ ├── widget.cc │ │ │ ├── widget.h │ │ │ └── widget_test.cc │ │ ├── Scripts │ │ ├── runtests.sh │ │ └── versiongenerate.py │ │ └── gtest.xcodeproj │ │ └── project.pbxproj └── main.cpp ├── LICENSE ├── README.MD └── SubHey ├── .gitignore ├── .idea ├── libraries │ └── asm_5_2.xml ├── misc.xml ├── modules.xml ├── uiDesigner.xml ├── vcs.xml └── workspace.xml ├── SubHey.iml └── src ├── com └── heng │ └── subhey │ ├── MainActivity.java │ ├── annotation │ ├── CheckOut.java │ ├── CheckOutTool.java │ ├── Chou.java │ ├── Liming.java │ ├── MaSaGei.java │ ├── NoUse.java │ └── Person.java │ ├── consumer │ ├── Chef.java │ ├── ConsumerPerson.java │ ├── Meal.java │ └── Restaurant.java │ ├── nio │ ├── FileIOUtils.java │ └── FileUtils.java │ ├── proxy │ ├── Animal.java │ ├── CgLibProxyFactory.java │ ├── IUserDao.java │ ├── PlaceForSell.java │ ├── ProxyFactory.java │ ├── Restaurant.java │ ├── SauerkrautRest.java │ ├── UserDao.java │ └── UserDaoProxy.java │ └── sigleton │ ├── Singleton.java │ └── StaticInnerSingleton.java └── libs ├── asm-5.2.jar └── cglib-3.2.5.jar /AndCode/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/libraries 5 | /.idea/modules.xml 6 | /.idea/workspace.xml 7 | .DS_Store 8 | /build 9 | /captures 10 | .externalNativeBuild 11 | -------------------------------------------------------------------------------- /AndCode/.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shanlovana/DailyCode/c05a60e1e15ed966950386cd547d2879c146f99d/AndCode/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /AndCode/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | -------------------------------------------------------------------------------- /AndCode/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | -------------------------------------------------------------------------------- /AndCode/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /AndCode/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AndCode/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /AndCode/app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # For more information about using CMake with Android Studio, read the 2 | # documentation: https://d.android.com/studio/projects/add-native-code.html 3 | 4 | # Sets the minimum version of CMake required to build the native library. 5 | 6 | cmake_minimum_required(VERSION 3.4.1) 7 | 8 | # Creates and names a library, sets it as either STATIC 9 | # or SHARED, and provides the relative paths to its source code. 10 | # You can define multiple libraries, and CMake builds them for you. 11 | # Gradle automatically packages shared libraries with your APK. 12 | 13 | add_library( # Sets the name of the library. 14 | native-lib 15 | 16 | # Sets the library as a shared library. 17 | SHARED 18 | 19 | # Provides a relative path to your source file(s). 20 | src/main/cpp/native-lib.cpp ) 21 | 22 | # Searches for a specified prebuilt library and stores the path as a 23 | # variable. Because CMake includes system libraries in the search path by 24 | # default, you only need to specify the name of the public NDK library 25 | # you want to add. CMake verifies that the library exists before 26 | # completing its build. 27 | 28 | find_library( # Sets the name of the path variable. 29 | log-lib 30 | 31 | # Specifies the name of the NDK library that 32 | # you want CMake to locate. 33 | log ) 34 | 35 | # Specifies libraries CMake should link to your target library. You 36 | # can link multiple libraries, such as libraries you define in this 37 | # build script, prebuilt third-party libraries, or system libraries. 38 | 39 | target_link_libraries( # Specifies the target library. 40 | native-lib 41 | 42 | # Links the target library to the log library 43 | # included in the NDK. 44 | ${log-lib} ) -------------------------------------------------------------------------------- /AndCode/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /AndCode/app/src/androidTest/java/ming/com/andcode/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("ming.com.andcode", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /AndCode/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /AndCode/app/src/main/cpp/native-lib.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern "C" JNIEXPORT jstring 5 | 6 | JNICALL 7 | Java_ming_com_andcode_MainActivity_stringFromJNI(JNIEnv *env, jobject /* this */) { 8 | std::string hello = "Hello from C++"; 9 | return env->NewStringUTF(hello.c_str()); 10 | } 11 | 12 | extern "C" 13 | JNIEXPORT void JNICALL 14 | Java_ming_com_andcode_jni_JNIManage_setNums(JNIEnv *env, jobject instance, jint i) { 15 | 16 | // TODO 17 | 18 | }extern "C" 19 | JNIEXPORT jstring JNICALL 20 | Java_ming_com_andcode_jni_JNIManage_getNums(JNIEnv *env, jobject instance) { 21 | 22 | // TODO 23 | std::string returnValue = "this is jnimanage text"; 24 | 25 | return env->NewStringUTF(returnValue.c_str()); 26 | } -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/AndApplication.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode; 2 | 3 | import android.app.Application; 4 | 5 | import com.alibaba.android.arouter.launcher.ARouter; 6 | 7 | import ming.com.andcode.dagger2.component.DaggerFlowerComponent; 8 | import ming.com.andcode.dagger2.component.DaggerPotComponent; 9 | import ming.com.andcode.dagger2.component.PotComponent; 10 | 11 | public class AndApplication extends Application { 12 | private PotComponent potComponent; 13 | @Override 14 | public void onCreate() { 15 | super.onCreate(); 16 | initializeARouter(); 17 | initializePotComponent(); 18 | } 19 | 20 | private void initializeARouter() { 21 | if (BuildConfig.DEBUG) { // 这两行必须写在init之前,否则这些配置在init过程中将无效 22 | ARouter.openLog(); // 打印日志 23 | ARouter.openDebug(); // 开启调试模式(如果在InstantRun模式下运行,必须开启调试模式!线上版本需要关闭,否则有安全风险) 24 | } 25 | ARouter.init(AndApplication.this); // 尽可能早,推荐在Application中初始化 26 | } 27 | private void initializePotComponent() {//PotComponent位全局变量,且只有一个 28 | potComponent = DaggerPotComponent.builder() 29 | .flowerComponent(DaggerFlowerComponent.create()) 30 | .build(); 31 | } 32 | 33 | public PotComponent getPotComponent() { 34 | return potComponent; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/arouter/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | package ming.com.andcode.arouter; 3 | 4 | import android.content.Context; 5 | import android.util.Log; 6 | 7 | import com.alibaba.android.arouter.facade.Postcard; 8 | import com.alibaba.android.arouter.facade.annotation.Interceptor; 9 | import com.alibaba.android.arouter.facade.callback.InterceptorCallback; 10 | import com.alibaba.android.arouter.facade.template.IInterceptor; 11 | 12 | @Interceptor(priority = 1) 13 | public class LoginInterceptor implements IInterceptor { 14 | private static final String TAG = "LoginInterceptor"; 15 | 16 | private Context mContext; 17 | 18 | @Override 19 | public void process(Postcard postcard, InterceptorCallback callback) { 20 | 21 | String name=Thread.currentThread().getName(); 22 | Log.i(TAG, "LoginInterceptor begain to process"+"thread name is"+name); 23 | if (postcard.getPath().equals("/moduleone/ModulerMainActivity")){ 24 | Log.i(TAG, "LoginInterceptor process is interceptor "); 25 | } 26 | } 27 | 28 | @Override 29 | public void init(Context context) { 30 | mContext = context; 31 | 32 | Log.i(TAG, "LoginInterceptor init"); 33 | 34 | } 35 | } 36 | */ 37 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/arouter/SaidInterceptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | package ming.com.andcode.arouter; 3 | 4 | import android.content.Context; 5 | import android.util.Log; 6 | 7 | import com.alibaba.android.arouter.facade.Postcard; 8 | import com.alibaba.android.arouter.facade.annotation.Interceptor; 9 | import com.alibaba.android.arouter.facade.callback.InterceptorCallback; 10 | import com.alibaba.android.arouter.facade.template.IInterceptor; 11 | 12 | @Interceptor(priority = 7) 13 | public class SaidInterceptor implements IInterceptor { 14 | private static final String TAG = "LoginInterceptor"; 15 | 16 | private Context mContext; 17 | 18 | @Override 19 | public void process(Postcard postcard, InterceptorCallback callback) { 20 | Log.i(TAG, "SaidInterceptor process"); 21 | } 22 | 23 | @Override 24 | public void init(Context context) { 25 | mContext = context; 26 | 27 | Log.i(TAG, "SaidInterceptor init"); 28 | 29 | } 30 | } 31 | */ 32 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/component/DaggerActivityComp.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.component; 2 | 3 | import javax.inject.Singleton; 4 | 5 | import dagger.Component; 6 | import ming.com.andcode.dagger2.DaggerActivity; 7 | 8 | import ming.com.andcode.dagger2.module.DaggeActivityModule; 9 | 10 | import ming.com.andcode.dagger2.module.FlowerModule; 11 | import ming.com.andcode.dagger2.scope.ActivityScope; 12 | 13 | 14 | @ActivityScope 15 | @Component(modules = {DaggeActivityModule.class},dependencies = PotComponent.class) 16 | public interface DaggerActivityComp { 17 | void inject(DaggerActivity daggerActivity); 18 | } 19 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/component/FlowerComponent.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.component; 2 | 3 | import dagger.Component; 4 | import dagger.Module; 5 | import ming.com.andcode.dagger2.delo.Flower; 6 | import ming.com.andcode.dagger2.module.FlowerModule; 7 | import ming.com.andcode.dagger2.qualifier.LilyFlower; 8 | import ming.com.andcode.dagger2.qualifier.RoseFlower; 9 | 10 | @Component(modules = FlowerModule.class) 11 | public interface FlowerComponent { 12 | @RoseFlower 13 | Flower getRoseFlower(); 14 | 15 | @LilyFlower 16 | Flower getLilyFlower(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/component/PotComponent.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.component; 2 | 3 | import javax.inject.Singleton; 4 | 5 | import dagger.Component; 6 | import ming.com.andcode.dagger2.delo.Pot; 7 | import ming.com.andcode.dagger2.module.PotModule; 8 | @Singleton 9 | @Component(modules = PotModule.class, dependencies = FlowerComponent.class) 10 | public interface PotComponent { 11 | Pot getPot(); 12 | } 13 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/delo/Flower.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.delo; 2 | 3 | public abstract class Flower { 4 | abstract String whisper(); 5 | } 6 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/delo/Lily.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.delo; 2 | 3 | 4 | import javax.inject.Inject; 5 | 6 | public class Lily extends Flower { 7 | @Inject 8 | public Lily() { 9 | } 10 | 11 | @Override 12 | public String whisper() { 13 | return "My lover Lily"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/delo/OkHttpClient.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.delo; 2 | 3 | public class OkHttpClient { 4 | private int timeout; 5 | 6 | public OkHttpClient(int timeout) { 7 | this.timeout = timeout; 8 | } 9 | 10 | public OkHttpClient() { 11 | } 12 | 13 | public int getTimeout() { 14 | return timeout; 15 | } 16 | 17 | public void setTimeout(int timeout) { 18 | this.timeout = timeout; 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/delo/Pot.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.delo; 2 | 3 | 4 | import javax.inject.Inject; 5 | 6 | import ming.com.andcode.dagger2.qualifier.RoseFlower; 7 | 8 | 9 | public class Pot { 10 | private Flower flower; 11 | 12 | @Inject 13 | public Pot(@RoseFlower Flower mRose) { 14 | this.flower = mRose; 15 | } 16 | 17 | public String show() { 18 | return flower.whisper(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/delo/RetrofitManager.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.delo; 2 | 3 | public class RetrofitManager { 4 | private OkHttpClient okHttpClient; 5 | 6 | public RetrofitManager(OkHttpClient okHttpClient) { 7 | this.okHttpClient = okHttpClient; 8 | } 9 | 10 | public OkHttpClient getOkHttpClient() { 11 | return okHttpClient; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/delo/Rose.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.delo; 2 | 3 | 4 | import javax.inject.Inject; 5 | 6 | 7 | 8 | public class Rose extends Flower { 9 | @Inject 10 | public Rose() { 11 | } 12 | 13 | @Override 14 | public String whisper() { 15 | return "My lover Rose"; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/module/DaggeActivityModule.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.module; 2 | 3 | 4 | 5 | import dagger.Module; 6 | import dagger.Provides; 7 | import ming.com.andcode.dagger2.delo.OkHttpClient; 8 | import ming.com.andcode.dagger2.delo.RetrofitManager; 9 | 10 | @Module 11 | public class DaggeActivityModule { 12 | private int timeout; 13 | 14 | public DaggeActivityModule(int timeout) { 15 | this.timeout = timeout; 16 | } 17 | 18 | @Provides 19 | OkHttpClient provideOkHttpClient() { 20 | OkHttpClient client = new OkHttpClient(); 21 | client.setTimeout(timeout); 22 | return client; 23 | } 24 | 25 | @Provides 26 | RetrofitManager provideretrofitManager(OkHttpClient client) { 27 | return new RetrofitManager(client); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/module/FlowerModule.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.module; 2 | 3 | 4 | import dagger.Module; 5 | import dagger.Provides; 6 | import ming.com.andcode.dagger2.delo.Flower; 7 | 8 | import ming.com.andcode.dagger2.delo.Lily; 9 | import ming.com.andcode.dagger2.delo.Pot; 10 | import ming.com.andcode.dagger2.delo.Rose; 11 | import ming.com.andcode.dagger2.qualifier.LilyFlower; 12 | import ming.com.andcode.dagger2.qualifier.RoseFlower; 13 | 14 | 15 | @Module 16 | public class FlowerModule { 17 | 18 | @Provides 19 | @RoseFlower 20 | Flower provideRose() { 21 | return new Rose(); 22 | } 23 | 24 | @Provides 25 | @LilyFlower 26 | Flower provideLily() { 27 | return new Lily(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/module/PotModule.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.module; 2 | 3 | import javax.inject.Singleton; 4 | 5 | import dagger.Module; 6 | import dagger.Provides; 7 | import ming.com.andcode.dagger2.delo.Flower; 8 | import ming.com.andcode.dagger2.delo.Pot; 9 | import ming.com.andcode.dagger2.qualifier.LilyFlower; 10 | 11 | @Module 12 | public class PotModule { 13 | 14 | @Provides 15 | @Singleton 16 | Pot providePot(@LilyFlower Flower flower) { 17 | return new Pot(flower); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/qualifier/LilyFlower.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.qualifier; 2 | 3 | import java.lang.annotation.Retention; 4 | import java.lang.annotation.RetentionPolicy; 5 | 6 | import javax.inject.Qualifier; 7 | 8 | @Qualifier 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface LilyFlower { 11 | } 12 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/qualifier/RoseFlower.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.qualifier; 2 | 3 | import java.lang.annotation.Retention; 4 | import java.lang.annotation.RetentionPolicy; 5 | 6 | import javax.inject.Qualifier; 7 | 8 | @Qualifier 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface RoseFlower { 11 | } 12 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dagger2/scope/ActivityScope.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.dagger2.scope; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | 6 | import javax.inject.Scope; 7 | 8 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 9 | 10 | /** 11 | * Identifies a type that the injector only instantiates once. Not inherited. 12 | * 13 | * @see javax.inject.Scope @Scope 14 | */ 15 | @Scope 16 | @Documented 17 | @Retention(RUNTIME) 18 | public @interface ActivityScope {} -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dbbase/BasicEntity.java: -------------------------------------------------------------------------------- 1 | 2 | package com.hengtong.henchat.dbbase; 3 | 4 | public interface BasicEntity { 5 | 6 | /** 7 | * Gets the object id. 8 | * 9 | * @return {@link Long}. 10 | */ 11 | long getId(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dbbase/BasicSQLHelper.java: -------------------------------------------------------------------------------- 1 | 2 | package com.hengtong.henchat.dbbase; 3 | 4 | import android.content.Context; 5 | import android.database.sqlite.SQLiteDatabase; 6 | import android.database.sqlite.SQLiteOpenHelper; 7 | 8 | 9 | public abstract class BasicSQLHelper extends SQLiteOpenHelper { 10 | 11 | public static final String ID = "_id"; 12 | 13 | public static final String ALL = "*"; 14 | 15 | public BasicSQLHelper(Context context, String dbName, SQLiteDatabase.CursorFactory cursorFactory, int dbVersion) { 16 | super(context, dbName, cursorFactory, dbVersion); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/dbbase/dbcontact/ContactStore.java: -------------------------------------------------------------------------------- 1 | package com.hengtong.henchat.dbbase.dbcontact; 2 | 3 | import java.util.HashMap; 4 | import java.util.List; 5 | 6 | public interface ContactStore { 7 | 8 | void add(ContactEntity contactEntity); 9 | 10 | List get(String date); 11 | 12 | HashMap> getContacts(); 13 | 14 | List queryByAll(String sql); 15 | 16 | List getContactIds(boolean all); 17 | 18 | boolean remove(long contactDetailId); 19 | 20 | boolean removeGroup(String dialerId); 21 | 22 | boolean removeAll(); 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/jni/JNIManage.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.jni; 2 | 3 | public class JNIManage { 4 | private static JNIManage instance; 5 | 6 | public static JNIManage getInstance() { 7 | if (instance == null) { 8 | synchronized (JNIManage.class) { 9 | if (instance == null) { 10 | instance = new JNIManage(); 11 | } 12 | } 13 | } 14 | return instance; 15 | } 16 | 17 | /** 18 | * A native method that is implemented by the 'native-lib' native library, 19 | * which is packaged with this application. 20 | */ 21 | public native void setNums(int i); 22 | 23 | public native String getNums(); 24 | } 25 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/lifebind/ActivityFragmentLifecycle.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.lifebind; 2 | 3 | import java.util.Collections; 4 | import java.util.Set; 5 | import java.util.WeakHashMap; 6 | 7 | public class ActivityFragmentLifecycle implements Lifecycle{ 8 | private final Set lifecycleListeners = 9 | Collections.newSetFromMap(new WeakHashMap()); 10 | private boolean isStarted; 11 | private boolean isDestroyed; 12 | 13 | 14 | @Override 15 | public void addListener(LifecycleListener listener) { 16 | lifecycleListeners.add(listener); 17 | 18 | if (isDestroyed) { 19 | listener.onDestroy(); 20 | } else if (isStarted) { 21 | listener.onStart(); 22 | } else { 23 | listener.onStop(); 24 | } 25 | } 26 | 27 | void onStart() { 28 | isStarted = true; 29 | for (LifecycleListener lifecycleListener : LifeUtil.getSnapshot(lifecycleListeners)) { 30 | lifecycleListener.onStart(); 31 | } 32 | } 33 | 34 | void onStop() { 35 | isStarted = false; 36 | for (LifecycleListener lifecycleListener : LifeUtil.getSnapshot(lifecycleListeners)) { 37 | lifecycleListener.onStop(); 38 | } 39 | } 40 | 41 | void onDestroy() { 42 | isDestroyed = true; 43 | for (LifecycleListener lifecycleListener : LifeUtil.getSnapshot(lifecycleListeners)) { 44 | lifecycleListener.onDestroy(); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/lifebind/LifeUtil.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.lifebind; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Collection; 5 | import java.util.List; 6 | 7 | public class LifeUtil { 8 | public static List getSnapshot(Collection other) { 9 | // toArray creates a new ArrayList internally and this way we can guarantee entries will not 10 | // be null. See #322. 11 | List result = new ArrayList(other.size()); 12 | result.addAll(other); 13 | return result; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/lifebind/Lifecycle.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.lifebind; 2 | 3 | public interface Lifecycle { 4 | 5 | void addListener(LifecycleListener listener); 6 | } 7 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/lifebind/LifecycleDetector.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.lifebind; 2 | 3 | import android.annotation.TargetApi; 4 | import android.app.Activity; 5 | import android.os.Build; 6 | 7 | public class LifecycleDetector { 8 | 9 | private static final String FRAGMENT_TAG = "com.bumptech.glide.manager"; 10 | 11 | private static volatile LifecycleDetector sInstance; 12 | 13 | public static LifecycleDetector getInstance() { 14 | if (sInstance == null) { 15 | synchronized (LifecycleDetector.class) { 16 | if (sInstance == null) { 17 | sInstance = new LifecycleDetector(); 18 | } 19 | } 20 | } 21 | 22 | return sInstance; 23 | } 24 | 25 | public void observer(Activity activity, LifecycleListener lifecycleListener) { 26 | // 获取当前activity的FragmentManager 27 | android.app.FragmentManager fm = activity.getFragmentManager(); 28 | // 注册无UI的fragment 29 | LifecycleManagerFragment current = getRequestManagerFragment(fm); 30 | 31 | current.getLifecycle().addListener(lifecycleListener); 32 | } 33 | 34 | 35 | @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) 36 | LifecycleManagerFragment getRequestManagerFragment(final android.app.FragmentManager fm) { 37 | LifecycleManagerFragment current = (LifecycleManagerFragment) fm.findFragmentByTag(FRAGMENT_TAG); 38 | if (current == null) { 39 | current = new LifecycleManagerFragment(); 40 | fm.beginTransaction().add(current, FRAGMENT_TAG).commitAllowingStateLoss(); 41 | } 42 | return current; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/lifebind/LifecycleListener.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.lifebind; 2 | 3 | public interface LifecycleListener { 4 | /** 5 | * Callback for when {@link android.app.Fragment#onStart()}} or {@link android.app.Activity#onStart()} is called. 6 | */ 7 | void onStart(); 8 | 9 | /** 10 | * Callback for when {@link android.app.Fragment#onStop()}} or {@link android.app.Activity#onStop()}} is called. 11 | */ 12 | void onStop(); 13 | 14 | /** 15 | * Callback for when {@link android.app.Fragment#onDestroy()}} or {@link android.app.Activity#onDestroy()} is 16 | * called. 17 | */ 18 | void onDestroy(); 19 | } 20 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/lifebind/LifecycleManagerFragment.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.lifebind; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.app.Fragment; 5 | 6 | public class LifecycleManagerFragment extends Fragment { 7 | private final ActivityFragmentLifecycle lifecycle; 8 | 9 | 10 | public LifecycleManagerFragment() { 11 | this(new ActivityFragmentLifecycle()); 12 | } 13 | 14 | // For testing only. 15 | @SuppressLint("ValidFragment") 16 | LifecycleManagerFragment(ActivityFragmentLifecycle lifecycle) { 17 | this.lifecycle = lifecycle; 18 | } 19 | 20 | 21 | public ActivityFragmentLifecycle getLifecycle() { 22 | return lifecycle; 23 | } 24 | 25 | @Override 26 | public void onStart() { 27 | super.onStart(); 28 | lifecycle.onStart(); 29 | } 30 | 31 | @Override 32 | public void onStop() { 33 | super.onStop(); 34 | lifecycle.onStop(); 35 | } 36 | 37 | @Override 38 | public void onDestroy() { 39 | super.onDestroy(); 40 | lifecycle.onDestroy(); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/lifebind/TestLife.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.lifebind; 2 | 3 | import android.util.Log; 4 | 5 | public class TestLife implements LifecycleListener { 6 | @Override 7 | public void onStart() { 8 | Log.d("TestLife", "onStart"); 9 | } 10 | 11 | @Override 12 | public void onStop() { 13 | Log.d("TestLife", "onStop"); 14 | 15 | } 16 | 17 | @Override 18 | public void onDestroy() { 19 | Log.d("TestLife", "onDestroy"); 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/mvp/base/Api.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.mvp.base; 2 | 3 | 4 | import ming.com.andcode.mvp.getdata.bean.ArticleListBean; 5 | import ming.com.andcode.mvp.getdata.bean.BannerBean; 6 | import retrofit2.http.GET; 7 | import retrofit2.http.Path; 8 | import rx.Observable; 9 | 10 | public interface Api { 11 | 12 | /** 13 | * wanandroid 首页文章列表 14 | * 15 | * @param curPage 当前第几页 16 | * @return 17 | */ 18 | @GET("article/list/{curPage}/json") 19 | Observable getData(@Path("curPage") int curPage); 20 | 21 | /** 22 | * 获取首页banner数据 23 | * 24 | * @return 25 | */ 26 | @GET("banner/json") 27 | Observable getBanner(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/mvp/base/BasePresenter.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.mvp.base; 2 | 3 | public class BasePresenter implements IPresenter { 4 | protected T mView; 5 | 6 | @Override 7 | public void attachView(T view) { 8 | mView = view; 9 | 10 | } 11 | 12 | @Override 13 | public void detachView() { 14 | mView = null; 15 | } 16 | 17 | @Override 18 | public boolean isAttached() { 19 | return mView == null; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/mvp/base/IModel.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.mvp.base; 2 | 3 | public interface IModel { 4 | } 5 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/mvp/base/IPresenter.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.mvp.base; 2 | 3 | public interface IPresenter { 4 | void attachView(T view); 5 | 6 | void detachView(); 7 | 8 | boolean isAttached(); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/mvp/base/IView.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.mvp.base; 2 | 3 | public interface IView { 4 | } 5 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/mvp/callback/CallBack.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.mvp.callback; 2 | 3 | public interface CallBack { 4 | void onSuccess(K data); 5 | 6 | void onFailed(V data); 7 | } 8 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/mvp/getdata/GetDataContract.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.mvp.getdata; 2 | 3 | import ming.com.andcode.mvp.base.IView; 4 | import ming.com.andcode.mvp.getdata.bean.ArticleListBean; 5 | import ming.com.andcode.mvp.getdata.bean.BannerBean; 6 | 7 | public interface GetDataContract { 8 | interface View extends IView { 9 | void showSuccessMsg(T bean); 10 | 11 | void showFaiedMsg(String msg); 12 | 13 | } 14 | 15 | interface Presenter { 16 | void getData(String url, int current); 17 | 18 | void getBanner(String baseUrl); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/mvp/getdata/GetDataModel.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.mvp.getdata; 2 | 3 | import ming.com.andcode.mvp.base.IModel; 4 | import ming.com.andcode.mvp.callback.CallBack; 5 | 6 | public interface GetDataModel extends IModel { 7 | void getData(String url, int current, final CallBack callBack); 8 | void getBanner(String url,final CallBack callBack); 9 | } 10 | -------------------------------------------------------------------------------- /AndCode/app/src/main/java/ming/com/andcode/mvp/getdata/GetDataPresenter.java: -------------------------------------------------------------------------------- 1 | package ming.com.andcode.mvp.getdata; 2 | 3 | import java.util.Random; 4 | 5 | import ming.com.andcode.mvp.base.BasePresenter; 6 | import ming.com.andcode.mvp.callback.CallBack; 7 | import ming.com.andcode.mvp.getdata.bean.ArticleListBean; 8 | import ming.com.andcode.mvp.getdata.bean.BannerBean; 9 | import ming.com.andcode.mvp.getdata.utils.LogUtil; 10 | 11 | public class GetDataPresenter extends BasePresenter implements GetDataContract.Presenter { 12 | private final GetDataModeli getDataModeli; 13 | 14 | @Override 15 | public void getData(String url, int current) { 16 | getDataModeli.getData(url, current, new CallBack() { 17 | @Override 18 | public void onSuccess(ArticleListBean data) { 19 | LogUtil.d("getData onSuccess data is " + data.toString()); 20 | mView.showSuccessMsg(data); 21 | 22 | } 23 | 24 | @Override 25 | public void onFailed(String data) { 26 | LogUtil.w(data); 27 | 28 | } 29 | }); 30 | 31 | } 32 | 33 | @Override 34 | public void getBanner(String baseUrl) { 35 | getDataModeli.getBanner(baseUrl, new CallBack() { 36 | @Override 37 | public void onSuccess(BannerBean data) { 38 | mView.showSuccessMsg(data); 39 | } 40 | 41 | @Override 42 | public void onFailed(String data) { 43 | mView.showFaiedMsg(data); 44 | 45 | } 46 | }); 47 | 48 | } 49 | 50 | public GetDataPresenter(GetDataModeli getDataModeli) { 51 | this.getDataModeli = getDataModeli; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /AndCode/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /AndCode/app/src/main/res/layout/activity_dagger.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | -------------------------------------------------------------------------------- /AndCode/app/src/main/res/layout/activity_mvp.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 |