码迷,mamicode.com
首页 >  
搜索关键字:string+    ( 95377个结果)
java 截取后缀名,截图某一个字符之后的字符串
在处理文件后缀名,或者或者最后一个逗号之后等情况,可用下面方法。 String str = "我爱你,中国";suffix = str.lastIndexOf(".") + 1);//suffix 输出结果为 中国//以此类推,逗号个换为. 一般用于截取word、execl、图片格式、后缀名的操作 ...
分类:编程语言   时间:2021-01-29 11:42:44    阅读次数:0
1680. Concatenation of Consecutive Binary Numbers
Given an integer n, return the decimal value of the binary string formed by concatenating the binary representations of 1 to n in order, modulo 109 + ...
分类:其他好文   时间:2021-01-29 11:41:16    阅读次数:0
byte转换为十六进制时,Integer.toHexString需要&FF的原因
查看如下代码: String mac_no_ff = ""; for (int i = 0; i < 6; i++) { mac += Integer.toHexString(card[i] & 0xff).toUpperCase(); mac_no_ff += Integer.toHexStrin ...
分类:其他好文   时间:2021-01-28 12:25:52    阅读次数:0
java里面嵌套执行python脚本
方法一:通过RunTime.getRuntime().exec(shellScript) //方式1 不带参数 String classpath = Thread.currentThread().getContextClassLoader().getResource("").getPath(); S ...
分类:编程语言   时间:2021-01-28 12:14:40    阅读次数:0
Java中的static关键字
关于Java中的static关键字的说明 我们先来看代码: 1 package com.hw.static0127; 2 class Person{ 3 public String name; 4 public int age; 5 public static String country; 6 p ...
分类:编程语言   时间:2021-01-28 12:06:49    阅读次数:0
C#生成二维码,返回Base64字符
using ThoughtWorks.QRCode.Codec; public static string GetQrCodeImage() { //二维码生成对象,需引用DLL QRCodeEncoder qrCodeEncoder = new QRCodeEncoder(); qrCodeEnc ...
分类:Windows程序   时间:2021-01-28 12:02:48    阅读次数:0
go flag.Parse() expect
package mainimport ( "fmt" "flag" gexpect "github.com/ThomasRooney/gexpect")func main() { cmdStr := flag.String("cmd", "", "cmds") hostStr := flag.Str ...
分类:其他好文   时间:2021-01-28 12:00:57    阅读次数:0
队列(c++容器queue实现)
#include<iostream> #include<queue>//队列容器 #include<string> using namespace std; class person{ public: person(string name,int age){ m_name=name; m_age=a ...
分类:编程语言   时间:2021-01-28 11:59:27    阅读次数:0
10. CSS属性书写顺序(重点)
生活中衡量一个人有气质:穿着打扮举止言行等等,编程中如何衡量一个人的代码能力?规范标准优雅高质量等等一个词形容专业从代码中看出是否有经验.. 建议遵循以下顺序: 布局定位属性:display / position / float / clear / visibility / overflow(建议 ...
分类:Web程序   时间:2021-01-27 14:06:31    阅读次数:0
Java基础之异常
异常 try。。。。catch public class Demo02Exception { public static void main(String[] args) { //创建int类型的数组,并赋值 int[] arr = {1,2,3}; int e = getElement(arr,3 ...
分类:编程语言   时间:2021-01-27 14:06:09    阅读次数:0
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!