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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define BOOL int | |
| #define TRUE 1 | |
| #define FALSE 0 | |
| void bubbleSort(int arr[], int a); | |
| void selectSort(int arr[], int len); | |
| void quickSort(int arr[], int left, int right); |
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
| colorscheme ir_black | |
| " 解决打开之后主题显示会是红色的问题 | |
| set nospell | |
| nnoremap <F4> :make!<CR> | |
| " Move to the start of line | |
| nnoremap H ^ | |
| " Move to the end of line | |
| nnoremap L $ |
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
| Here are the instructions to installing Docker CE on Linux Mint 18.1 Serena. | |
| Step1. `sudo apt-get install apt-transport-https ca-certificates curl software-properties-common` | |
| Step2. `curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -` | |
| The following line in the SOURCE automatically determines the distribution, which is Serena, | |
| but there are no Linux Mint packages for Docker. You have to change it to the matching Ubuntu distribution. | |
| FYI Linux Mint Serena is based on Ubuntu 16.04 Xenial. |
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 void checkOnlineState() { | |
| ConnectivityManager CManager = | |
| (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); | |
| NetworkInfo NInfo = CManager.getActiveNetworkInfo(); | |
| if (NInfo != null && NInfo.isConnectedOrConnecting()) { | |
| if (InetAddress.getByName("www.xy.com").isReachable(timeout)) | |
| { | |
| // host reachable | |
| } | |
| else |
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
| import android.os.Bundle; | |
| import com.google.android.youtube.player.YouTubeBaseActivity; | |
| import com.google.android.youtube.player.YouTubeInitializationResult; | |
| import com.google.android.youtube.player.YouTubePlayer; | |
| import com.google.android.youtube.player.YouTubePlayer.OnInitializedListener; | |
| import com.google.android.youtube.player.YouTubePlayer.Provider; | |
| import com.google.android.youtube.player.YouTubePlayerView; | |
| public class MainActivity extends YouTubeBaseActivity implements | |
| OnInitializedListener { |
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 class Installation { | |
| private static String sID = null; | |
| private static final String INSTALLATION = "INSTALLATION"; | |
| public synchronized static String id(Context context) { | |
| if (sID == null) { | |
| File installation = new File(context.getFilesDir(), INSTALLATION); | |
| try { | |
| if (!installation.exists()) | |
| writeInstallationFile(installation); |
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
| set nocompatible " be iMproved, required | |
| " filetype off " required | |
| "定义快捷键 | |
| let mapleader="," | |
| let g:mapleader="," | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " alternatively, pass a path where Vundle should install plugins |
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
| <style name="DefaultLightTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
| </style> | |
| <style name="PopupWindowTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
| <item name="android: ">true</item> | |
| <item name="android:windowBackground">@color/transparent</item> | |
| <item name="android:windowIsTranslucent">true</item> |
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 class ArithUtils { | |
| /** | |
| * 提供精确的加法运算。 | |
| * | |
| * @param v1 被加数 | |
| * @param v2 加数 | |
| * @return 两个参数的和 | |
| */ | |
| public static double add(double v1, double v2) { |
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
| <android.support.design.widget.TabLayout | |
| android:id="@+id/home_tab_tab" | |
| style="@style/customTabLayout" | |
| app:tabMode="scrollable" /> | |
| <style name="customTabLayout" parent="Widget.Design.TabLayout"> | |
| <item name="android:layout_width">match_parent</item> | |
| <item name="android:layout_height">45dip</item> |
NewerOlder