06 2017 档案
摘要:1. 给定一个字符串,找到第一个只出现一次的字符的下标,找不到输出-1。 sample: 输入:“abcdefcba” 输出:3 解法:先遍历字符串,用一个map记录每个字符出现的次数,再次遍历字符串,找到第一个只出现一次的字符,复杂度为O(n)。 #include <iostream> #incl
阅读全文
摘要:http://www.tuicool.com/articles/f2y2Az
阅读全文
摘要: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 ...
阅读全文
摘要:case TAKE_PICTURE: Intent openCameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); Uri imageUri = Uri.fromFile(new File(Environment.getExternal
阅读全文
摘要:byte[] data=SocketClientUtil.receiveData(bytes); //,result Bitmap bmp = BitmapFactory.decodeByteArray(data, 0, data.length); bmp.compress(Bitmap.Compr
阅读全文

浙公网安备 33010602011771号