1. package com.example.alimjan.hello_world.Utils;
  2.  
  3. import android.graphics.Bitmap;
  4. import android.graphics.BitmapFactory;
  5.  
  6. import java.io.BufferedInputStream;
  7. import java.io.BufferedOutputStream;
  8. import java.io.File;
  9. import java.io.FileInputStream;
  10. import java.io.FileOutputStream;
  11. import java.io.FilenameFilter;
  12. import java.util.ArrayList;
  13. import java.util.Locale;
  14.  
  15. public class FileUtil {
  16.  
  17. public static void saveText(String path, String txt) {
  18. try {
  19. FileOutputStream fos = new FileOutputStream(path);
  20. fos.write(txt.getBytes());
  21. fos.close();
  22. } catch (Exception e) {
  23. e.printStackTrace();
  24. }
  25. }
  26.  
  27. public static String openText(String path) {
  28. String readStr = "";
  29. try {
  30. FileInputStream fis = new FileInputStream(path);
  31. byte[] b = new byte[fis.available()];
  32. fis.read(b);
  33. readStr = new String(b);
  34. fis.close();
  35. } catch (Exception e) {
  36. e.printStackTrace();
  37. }
  38. return readStr;
  39. }
  40.  
  41. public static void saveImage(String path, Bitmap bitmap) {
  42. try {
  43. BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(path));
  44. bitmap.compress(Bitmap.CompressFormat.JPEG, 80, bos);
  45. bos.flush();
  46. bos.close();
  47. } catch (Exception e) {
  48. e.printStackTrace();
  49. }
  50. }
  51.  
  52. public static Bitmap openImage(String path) {
  53. Bitmap bitmap = null;
  54. try {
  55. BufferedInputStream bis = new BufferedInputStream(new FileInputStream(path));
  56. bitmap = BitmapFactory.decodeStream(bis);
  57. bis.close();
  58. } catch (Exception e) {
  59. e.printStackTrace();
  60. }
  61. return bitmap;
  62. }
  63.  
  64. public static ArrayList<File> getFileList(String path, String[] extendArray) {
  65. ArrayList<File> displayedContent = new ArrayList<File>();
  66. File[] files = null;
  67. File directory = new File(path);
  68. if (extendArray != null && extendArray.length>0) {
  69. FilenameFilter fileFilter = getTypeFilter(extendArray);
  70. files = directory.listFiles(fileFilter);
  71. } else {
  72. files = directory.listFiles();
  73. }
  74.  
  75. if (files != null) {
  76. for (File f : files) {
  77. if (!f.isDirectory() && !f.isHidden()) {
  78. displayedContent.add(f);
  79. }
  80. }
  81. }
  82. return displayedContent;
  83. }
  84.  
  85. public static FilenameFilter getTypeFilter(String[] extendArray) {
  86. final ArrayList<String> fileExtensions = new ArrayList<String>();
  87. for (int i=0; i<extendArray.length; i++) {
  88. fileExtensions.add(extendArray[i]);
  89. }
  90. FilenameFilter fileNameFilter = new FilenameFilter() {
  91. @Override
  92. public boolean accept(File directory, String fileName) {
  93. boolean matched = false;
  94. File f = new File(String.format("%s/%s",
  95. directory.getAbsolutePath(), fileName));
  96. matched = f.isDirectory();
  97. if (!matched) {
  98. for (String s : fileExtensions) {
  99. s = String.format(".{0,}\\%s$", s);
  100. s = s.toUpperCase(Locale.getDefault());
  101. fileName = fileName.toUpperCase(Locale.getDefault());
  102. matched = fileName.matches(s);
  103. if (matched) {
  104. break;
  105. }
  106. }
  107. }
  108. return matched;
  109. }
  110. };
  111. return fileNameFilter;
  112. }
  113.  
  114. }
  1. package com.example.alimjan.hello_world;
  2.  
  3. /**
  4. * Created by alimjan on 7/5/2017.
  5. */
  6.  
  7. import android.content.Context;
  8. import android.content.Intent;
  9. import android.graphics.Bitmap;
  10. import android.os.Bundle;
  11. import android.os.Environment;
  12. import android.support.v7.app.AppCompatActivity;
  13. import android.view.View;
  14. import android.view.View.OnClickListener;
  15. import android.widget.AdapterView;
  16. import android.widget.ArrayAdapter;
  17. import android.widget.EditText;
  18. import android.widget.LinearLayout;
  19. import android.widget.Spinner;
  20. import android.widget.TextView;
  21. import android.widget.Toast;
  22. import android.widget.AdapterView.OnItemSelectedListener;
  23.  
  24. import com.example.alimjan.hello_world.Utils.DateUtil;
  25. import com.example.alimjan.hello_world.Utils.FileUtil;
  26.  
  27. public class class_4_3_3 extends AppCompatActivity implements OnClickListener {
  28.  
  29. private LinearLayout ll_info;
  30. private EditText et_name;
  31. private EditText et_age;
  32. private EditText et_height;
  33. private EditText et_weight;
  34. private boolean bMarried = false;
  35.  
  36. private String mPath;
  37. private TextView tv_path;
  38.  
  39. @Override
  40. protected void onCreate(Bundle savedInstanceState) {
  41. super.onCreate(savedInstanceState);
  42. setContentView(R.layout.code_4_3_3);
  43. ll_info = (LinearLayout) findViewById(R.id.ll_info);
  44. et_name = (EditText) findViewById(R.id.et_name);
  45. et_age = (EditText) findViewById(R.id.et_age);
  46. et_height = (EditText) findViewById(R.id.et_height);
  47. et_weight = (EditText) findViewById(R.id.et_weight);
  48. tv_path = (TextView) findViewById(R.id.tv_path);
  49. findViewById(R.id.btn_save).setOnClickListener(this);
  50.  
  51. ArrayAdapter<String> typeAdapter = new ArrayAdapter<String>(this,
  52. R.layout.item_select, typeArray);
  53. typeAdapter.setDropDownViewResource(R.layout.item_dropdown);
  54. Spinner sp_married = (Spinner) findViewById(R.id.sp_married);
  55. sp_married.setPrompt("请选择婚姻状况");
  56. sp_married.setAdapter(typeAdapter);
  57. sp_married.setSelection(0);
  58. sp_married.setOnItemSelectedListener(new TypeSelectedListener());
  59.  
  60. mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/";
  61. }
  62.  
  63. private String[] typeArray = {"未婚", "已婚"};
  64. class TypeSelectedListener implements OnItemSelectedListener {
  65. public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
  66. bMarried = (arg2==0)?false:true;
  67. }
  68.  
  69. public void onNothingSelected(AdapterView<?> arg0) {
  70. }
  71. }
  72.  
  73. @Override
  74. public void onClick(View v) {
  75. if (v.getId() == R.id.btn_save) {
  76. String name = et_name.getText().toString();
  77. String age = et_age.getText().toString();
  78. String height = et_height.getText().toString();
  79. String weight = et_weight.getText().toString();
  80. if (name==null || name.length()<=0) {
  81. showToast("请先填写姓名");
  82. return;
  83. }
  84. if (age==null || age.length()<=0) {
  85. showToast("请先填写年龄");
  86. return;
  87. }
  88. if (height==null || height.length()<=0) {
  89. showToast("请先填写身高");
  90. return;
  91. }
  92. if (weight==null || weight.length()<=0) {
  93. showToast("请先填写体重");
  94. return;
  95. }
  96.  
  97. if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) == true) {
  98. Bitmap bitmap = ll_info.getDrawingCache();
  99. String file_path = mPath + DateUtil.getCurDateStr("") + ".png";
  100. FileUtil.saveImage(file_path, bitmap);
  101. bitmap.recycle();
  102. tv_path.setText("用户注册信息图片的保存路径为:\n"+file_path);
  103. showToast("图片已存入SD卡文件");
  104. } else {
  105. showToast("未发现已挂载的SD卡,请检查");
  106. }
  107. }
  108. }
  109.  
  110. @Override
  111. protected void onStart() {
  112. super.onStart();
  113. ll_info.setDrawingCacheEnabled(true);
  114. }
  115.  
  116. @Override
  117. protected void onStop() {
  118. super.onStop();
  119. ll_info.setDrawingCacheEnabled(false);
  120. }
  121.  
  122. private void showToast(String desc) {
  123. Toast.makeText(this, desc, Toast.LENGTH_SHORT).show();
  124. }
  125.  
  126. public static void startHome(Context mcontext){
  127. Intent intent = new Intent(mcontext,class_4_3_3.class);
  128. mcontext.startActivity(intent);
  129. }
  130.  
  131. }
  1. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2. android:layout_width="match_parent"
  3. android:layout_height="match_parent"
  4. android:focusable="true"
  5. android:focusableInTouchMode="true"
  6. android:orientation="vertical"
  7. android:padding="10dp" >
  8.  
  9. <LinearLayout
  10. android:id="@+id/ll_info"
  11. android:layout_width="match_parent"
  12. android:layout_height="wrap_content"
  13. android:background="#f9f9f9"
  14. android:orientation="vertical" >
  15.  
  16. <RelativeLayout
  17. android:layout_width="match_parent"
  18. android:layout_height="50dp" >
  19.  
  20. <TextView
  21. android:id="@+id/tv_name"
  22. android:layout_width="wrap_content"
  23. android:layout_height="match_parent"
  24. android:layout_alignParentLeft="true"
  25. android:gravity="center"
  26. android:text="姓名:"
  27. android:textColor="@color/black"
  28. android:textSize="17sp" />
  29.  
  30. <EditText
  31. android:id="@+id/et_name"
  32. android:layout_width="match_parent"
  33. android:layout_height="match_parent"
  34. android:layout_marginBottom="5dp"
  35. android:layout_marginTop="5dp"
  36. android:layout_toRightOf="@+id/tv_name"
  37. android:background="@drawable/editext_selector"
  38. android:gravity="left|center"
  39. android:hint="请输入姓名"
  40. android:inputType="text"
  41. android:maxLength="12"
  42. android:textColor="@color/black"
  43. android:textColorHint="@color/grey"
  44. android:textCursorDrawable="@drawable/text_cursor"
  45. android:textSize="17sp" />
  46. </RelativeLayout>
  47.  
  48. <RelativeLayout
  49. android:layout_width="match_parent"
  50. android:layout_height="50dp" >
  51.  
  52. <TextView
  53. android:id="@+id/tv_age"
  54. android:layout_width="wrap_content"
  55. android:layout_height="match_parent"
  56. android:layout_alignParentLeft="true"
  57. android:gravity="center"
  58. android:text="年龄:"
  59. android:textColor="@color/black"
  60. android:textSize="17sp" />
  61.  
  62. <EditText
  63. android:id="@+id/et_age"
  64. android:layout_width="match_parent"
  65. android:layout_height="match_parent"
  66. android:layout_marginBottom="5dp"
  67. android:layout_marginTop="5dp"
  68. android:layout_toRightOf="@+id/tv_age"
  69. android:background="@drawable/editext_selector"
  70. android:gravity="left|center"
  71. android:hint="请输入年龄"
  72. android:inputType="number"
  73. android:maxLength="2"
  74. android:textColor="@color/black"
  75. android:textColorHint="@color/grey"
  76. android:textCursorDrawable="@drawable/text_cursor"
  77. android:textSize="17sp" />
  78. </RelativeLayout>
  79.  
  80. <RelativeLayout
  81. android:layout_width="match_parent"
  82. android:layout_height="50dp" >
  83.  
  84. <TextView
  85. android:id="@+id/tv_height"
  86. android:layout_width="wrap_content"
  87. android:layout_height="match_parent"
  88. android:layout_alignParentLeft="true"
  89. android:gravity="center"
  90. android:text="身高:"
  91. android:textColor="@color/black"
  92. android:textSize="17sp" />
  93.  
  94. <EditText
  95. android:id="@+id/et_height"
  96. android:layout_width="match_parent"
  97. android:layout_height="match_parent"
  98. android:layout_marginBottom="5dp"
  99. android:layout_marginTop="5dp"
  100. android:layout_toRightOf="@+id/tv_height"
  101. android:background="@drawable/editext_selector"
  102. android:gravity="left|center"
  103. android:hint="请输入身高"
  104. android:inputType="number"
  105. android:maxLength="3"
  106. android:textColor="@color/black"
  107. android:textColorHint="@color/grey"
  108. android:textCursorDrawable="@drawable/text_cursor"
  109. android:textSize="17sp" />
  110. </RelativeLayout>
  111.  
  112. <RelativeLayout
  113. android:layout_width="match_parent"
  114. android:layout_height="50dp" >
  115.  
  116. <TextView
  117. android:id="@+id/tv_weight"
  118. android:layout_width="wrap_content"
  119. android:layout_height="match_parent"
  120. android:layout_alignParentLeft="true"
  121. android:gravity="center"
  122. android:text="体重:"
  123. android:textColor="@color/black"
  124. android:textSize="17sp" />
  125.  
  126. <EditText
  127. android:id="@+id/et_weight"
  128. android:layout_width="match_parent"
  129. android:layout_height="match_parent"
  130. android:layout_marginBottom="5dp"
  131. android:layout_marginTop="5dp"
  132. android:layout_toRightOf="@+id/tv_weight"
  133. android:background="@drawable/editext_selector"
  134. android:gravity="left|center"
  135. android:hint="请输入体重"
  136. android:inputType="numberDecimal"
  137. android:maxLength="5"
  138. android:textColor="@color/black"
  139. android:textColorHint="@color/grey"
  140. android:textCursorDrawable="@drawable/text_cursor"
  141. android:textSize="17sp" />
  142. </RelativeLayout>
  143.  
  144. <RelativeLayout
  145. android:layout_width="match_parent"
  146. android:layout_height="50dp" >
  147.  
  148. <TextView
  149. android:id="@+id/tv_married"
  150. android:layout_width="wrap_content"
  151. android:layout_height="match_parent"
  152. android:layout_alignParentLeft="true"
  153. android:gravity="center"
  154. android:text="婚否:"
  155. android:textColor="@color/black"
  156. android:textSize="17sp" />
  157.  
  158. <Spinner
  159. android:id="@+id/sp_married"
  160. android:layout_width="match_parent"
  161. android:layout_height="match_parent"
  162. android:layout_toRightOf="@+id/tv_married"
  163. android:gravity="left|center"
  164. android:spinnerMode="dialog" />
  165. </RelativeLayout>
  166. </LinearLayout>
  167.  
  168. <Button
  169. android:id="@+id/btn_save"
  170. android:layout_width="match_parent"
  171. android:layout_height="wrap_content"
  172. android:text="保存图片到SD卡"
  173. android:textColor="@color/black"
  174. android:textSize="20sp" />
  175.  
  176. <TextView
  177. android:id="@+id/tv_path"
  178. android:layout_width="wrap_content"
  179. android:layout_height="match_parent"
  180. android:textColor="@color/black"
  181. android:textSize="17sp" />
  182.  
  183. </LinearLayout>

  1. package com.example.alimjan.hello_world;
  2.  
  3. import java.io.File;
  4. import java.util.ArrayList;
  5.  
  6. /**
  7. * Created by alimjan on 7/5/2017.
  8. */
  9.  
  10. import android.content.Context;
  11. import android.content.Intent;
  12. import android.graphics.Bitmap;
  13. import android.os.Bundle;
  14. import android.os.Environment;
  15. import android.support.v7.app.AppCompatActivity;
  16. import android.util.Log;
  17. import android.view.View;
  18. import android.view.View.OnClickListener;
  19. import android.widget.AdapterView;
  20. import android.widget.ArrayAdapter;
  21. import android.widget.Spinner;
  22. import android.widget.ImageView;
  23. import android.widget.Toast;
  24. import android.widget.AdapterView.OnItemSelectedListener;
  25.  
  26. import com.example.alimjan.hello_world.Utils.FileUtil;
  27.  
  28. /**
  29. * Created by ouyangshen on 2016/10/1.
  30. */
  31. public class class_4_3_3_1 extends AppCompatActivity implements OnClickListener {
  32.  
  33. private final static String TAG = "ImageReadActivity";
  34. private ImageView iv_image;
  35. private Spinner sp_file;
  36. private String mPath;
  37.  
  38. @Override
  39. protected void onCreate(Bundle savedInstanceState) {
  40. super.onCreate(savedInstanceState);
  41. setContentView(R.layout.code_4_3_3_1);
  42. iv_image = (ImageView) findViewById(R.id.iv_image);
  43. sp_file = (Spinner) findViewById(R.id.sp_file);
  44. findViewById(R.id.btn_delete).setOnClickListener(this);
  45. mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/";
  46. if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) == true) {
  47. refreshSpinner();
  48. } else {
  49. showToast("未发现已挂载的SD卡,请检查");
  50. }
  51. }
  52.  
  53. private void refreshSpinner() {
  54. ArrayList<File> fileAlllist = FileUtil.getFileList(mPath, new String[]{".png", ".jpg"});
  55. if (fileAlllist.size() > 0) {
  56. fileArray = new String[fileAlllist.size()];
  57. for (int i=0; i<fileAlllist.size(); i++) {
  58. fileArray[i] = fileAlllist.get(i).getName();
  59. }
  60. ArrayAdapter<String> typeAdapter = new ArrayAdapter<String>(this,
  61. R.layout.item_select, fileArray);
  62. typeAdapter.setDropDownViewResource(R.layout.item_dropdown);
  63. sp_file.setPrompt("请选择图片文件");
  64. sp_file.setAdapter(typeAdapter);
  65. sp_file.setSelection(0);
  66. sp_file.setOnItemSelectedListener(new FileSelectedListener());
  67. } else {
  68. fileArray = null;
  69. fileArray = new String[1];
  70. fileArray[0] = "";
  71. ArrayAdapter<String> typeAdapter = new ArrayAdapter<String>(this,
  72. R.layout.item_select, fileArray);
  73. sp_file.setPrompt(null);
  74. sp_file.setAdapter(typeAdapter);
  75. sp_file.setOnItemSelectedListener(null);
  76. iv_image.setImageDrawable(null);
  77. }
  78. }
  79.  
  80. private String[] fileArray;
  81. class FileSelectedListener implements OnItemSelectedListener {
  82. public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
  83. String file_path = mPath + fileArray[arg2];
  84. Bitmap bitmap = FileUtil.openImage(file_path);
  85. iv_image.setImageBitmap(bitmap);
  86. }
  87.  
  88. public void onNothingSelected(AdapterView<?> arg0) {
  89. }
  90. }
  91.  
  92. @Override
  93. public void onClick(View v) {
  94. if (v.getId() == R.id.btn_delete) {
  95. for (int i=0; i<fileArray.length; i++) {
  96. String file_path = mPath + fileArray[i];
  97. File f = new File(file_path);
  98. boolean result = f.delete();
  99. if (result != true) {
  100. Log.d(TAG, "file_path="+file_path+", delete failed");
  101. }
  102. }
  103. refreshSpinner();
  104. showToast("已删除临时目录下的所有图片文件");
  105. }
  106. }
  107.  
  108. private void showToast(String desc) {
  109. Toast.makeText(this, desc, Toast.LENGTH_SHORT).show();
  110. }
  111.  
  112. public static void startHome(Context mcontext){
  113. Intent intent = new Intent(mcontext,class_4_3_3_1.class);
  114. mcontext.startActivity(intent);
  115. }
  116.  
  117. }
  1. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2. android:layout_width="match_parent"
  3. android:layout_height="match_parent"
  4. android:focusable="true"
  5. android:focusableInTouchMode="true"
  6. android:orientation="vertical"
  7. android:padding="10dp" >
  8.  
  9. <Button
  10. android:id="@+id/btn_delete"
  11. android:layout_width="match_parent"
  12. android:layout_height="wrap_content"
  13. android:text="删除所有图片文件"
  14. android:textColor="@color/black"
  15. android:textSize="20sp" />
  16.  
  17. <RelativeLayout
  18. android:layout_width="match_parent"
  19. android:layout_height="50dp" >
  20.  
  21. <TextView
  22. android:id="@+id/tv_file"
  23. android:layout_width="wrap_content"
  24. android:layout_height="match_parent"
  25. android:layout_alignParentLeft="true"
  26. android:gravity="center"
  27. android:text="文件名:"
  28. android:textColor="@color/black"
  29. android:textSize="17sp" />
  30.  
  31. <Spinner
  32. android:id="@+id/sp_file"
  33. android:layout_width="match_parent"
  34. android:layout_height="match_parent"
  35. android:layout_toRightOf="@+id/tv_file"
  36. android:gravity="left|center"
  37. android:spinnerMode="dialog" />
  38. </RelativeLayout>
  39.  
  40. <ImageView
  41. android:id="@+id/iv_image"
  42. android:layout_width="match_parent"
  43. android:layout_height="wrap_content"
  44. android:scaleType="fitCenter" />
  45.  
  46. </LinearLayout>

Android 开发笔记___SD卡基本操作__图片读取写入的更多相关文章

  1. Android 开发笔记___SD卡基本操作

    package com.example.alimjan.hello_world; /** * Created by alimjan on 7/5/2017. */ import android.ann ...

  2. Android 开发笔记___SD卡文件操作

    package com.example.alimjan.hello_world.Utils; import android.graphics.Bitmap; import android.graphi ...

  3. Android 开发笔记___存储方式__共享参数__sharedprefences

    Android 的数据存储方式有四种,这次是[共享参数__sharedprefences] 听起来挺别扭的,平时看到的app里面,当用户删除了一些软件以后下次安装,发现原来的设置还在,这种情况就是把一 ...

  4. Android 开发笔记___图像视图__简单截屏

    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...

  5. 【转】Android开发笔记(序)写在前面的目录

    原文:http://blog.csdn.net/aqi00/article/details/50012511 知识点分类 一方面写写自己走过的弯路掉进去的坑,避免以后再犯:另一方面希望通过分享自己的经 ...

  6. Android开发笔记——以Volley图片加载、缓存、请求及展示为例理解Volley架构设计

    Volley是由Google开源的.用于Android平台上的网络通信库.Volley通过优化Android的网络请求流程,形成了以Request-RequestQueue-Response为主线的网 ...

  7. [置顶] Android开发笔记(成长轨迹)

    分类: 开发学习笔记2013-06-21 09:44 26043人阅读 评论(5) 收藏 Android开发笔记 1.控制台输出:called unimplemented OpenGL ES API ...

  8. Android开发笔记--hello world 和目录结构

    原文:Android开发笔记--hello world 和目录结构 每接触一个新东西 都有一个hello world的例子. 1.新建项目 2.配置AVD AVD 没有要新建个,如果不能创建 运行SD ...

  9. 【转】Android开发笔记——圆角和边框们

    原文地址:http://blog.xianqu.org/2012/04/android-borders-and-radius-corners/ Android开发笔记——圆角和边框们 在做Androi ...

随机推荐

  1. java基础解析系列(七)---ThreadLocal原理分析

    java基础解析系列(七)---ThreadLocal原理分析 目录 java基础解析系列(一)---String.StringBuffer.StringBuilder java基础解析系列(二)-- ...

  2. SVG轨迹回放实践

    最近做了埋点方案XTracker的轨迹回放功能,大致效果就是,在指定几个顺序的点之间形成轨迹,来模拟用户在页面上的先后行为(比如一个用户先点了啥,后点了啥).效果图如下: 在这篇文章中,我们来聊聊轨迹 ...

  3. VC++:创建,调用Win32动态链接库

    VC++:创建,调用Win32动态链接库 概述 DLL(Dynamic Linkable Library)动态链接库,Dll可以看作一种仓库,仓库中包含了可以直接使用的变量,函数或类.仓库的发展史经历 ...

  4. 51nod 1270 数组的最大代价 思路:简单动态规划

    这题是看起来很复杂,但是换个思路就简单了的题目. 首先每个点要么取b[i],要么取1,因为取中间值毫无意义,不能增加最大代价S. 用一个二维数组做动态规划就很简单了. dp[i][0]表示第i个点取1 ...

  5. 【机器学习实战】第6章 支持向量机(Support Vector Machine / SVM)

    第6章 支持向量机 <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/lates ...

  6. Python selenium 文件自动下载 (自动下载器)

    MyGithub:https://github.com/williamzxl 最新代码已经上传到Github,以下版本为stupid版本. 由于在下载过程中需要下载不同文件,所以可以把所有类型放在Va ...

  7. zoj 1938 Binomial Showdown 组合数裸基础

    Binomial Showdown Time Limit: 2 Seconds      Memory Limit: 65536 KB In how many ways can you choose ...

  8. MySQL 高效查询

    在“现场加号&预约排队”项目中,“号贩子排查任务”在线下测试的时候没有问题,但是线上后,由于线上的数据量较大,导致在执行查询的时系统崩溃:后来经过查找,发现写的sql不合理,查出了许多用不到的 ...

  9. Android使用RxJava+Retrofit2+Okhttp+MVP练习的APP

    Android使用RxJava+Retrofit2+Okhttp+MVP练习的APP 项目截图     这是我的目录结构 五步使用RxJava+Retrofit2+Okhttp+RxCache 第一步 ...

  10. elasticsearch高级组合查询ava

    /**     * 高级检索(组合条件检索)must相当于sql and操作     * @param modelType 0为模糊查询,1为精确查询     * @param index 索引   ...