06 2017 档案

摘要:1. 给定一个字符串,找到第一个只出现一次的字符的下标,找不到输出-1。 sample: 输入:“abcdefcba” 输出:3 解法:先遍历字符串,用一个map记录每个字符出现的次数,再次遍历字符串,找到第一个只出现一次的字符,复杂度为O(n)。 #include <iostream> #incl 阅读全文
posted @ 2017-06-25 07:39 code666 阅读(1627) 评论(0) 推荐(0)
摘要:http://www.tuicool.com/articles/f2y2Az 阅读全文
posted @ 2017-06-14 23:58 code666 阅读(116) 评论(0) 推荐(0)
摘要:final Button btn_gallery=(Button)findViewById(R.id.btn_gallery);btn_gallery.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ Intent intentgallery=new ... 阅读全文
posted @ 2017-06-08 21:23 code666 阅读(2517) 评论(0) 推荐(0)
摘要:case TAKE_PICTURE: Intent openCameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); Uri imageUri = Uri.fromFile(new File(Environment.getExternal 阅读全文
posted @ 2017-06-08 09:08 code666 阅读(221) 评论(0) 推荐(0)
摘要:byte[] data=SocketClientUtil.receiveData(bytes); //,result Bitmap bmp = BitmapFactory.decodeByteArray(data, 0, data.length); bmp.compress(Bitmap.Compr 阅读全文
posted @ 2017-06-06 12:40 code666 阅读(1046) 评论(0) 推荐(0)