二进制水题~。 int n,m; int main() { cin>>n>>m; while(m--) { string s; cin>>s; int res=0; for(int i=0;i<s.size();i++) if(s[i] == 'n') res+=1<<(n-1-i); cout<< ...
分类:
其他好文 时间:
2021-04-22 15:39:34
阅读次数:
0
何谓方法? System.out.println(),那么它是什么呢? System是一个类,out是一个对象,println()就是一个方法,这句话的理解就是,调用System类里的一个out对象中的方法叫做println Java方法是语句的集合,它们在一起执行一个功能。(如果需要用到大量的a+ ...
分类:
编程语言 时间:
2021-04-22 15:16:19
阅读次数:
0
在/root/init.rc中添加下面内容, 开机就会执行/system/bin/boot-complete-script.sh脚本 service boot_complete_script /system/bin/boot-complete-script.sh class main oneshot ...
分类:
移动开发 时间:
2021-04-21 12:38:11
阅读次数:
0
##一、 //挂载路由导航守卫,控制页面访问权限 //to 将要访问的路径 //from 代表从哪个路径跳转而来 //next 是一个函数,表示放行 // next() 放行 next('/login') 强制跳转 router.beforeEach((to, from, next) => { if ...
分类:
其他好文 时间:
2021-04-21 12:30:59
阅读次数:
0
堆排序 public class HeapSort { public static void main(String[] args) { int[] arr = {1, 3, 519, 2, 10, 8, 0, 998}; heapSort(arr); System.out.println(Arra ...
分类:
编程语言 时间:
2021-04-21 12:26:45
阅读次数:
0
今天在.Netcore项目里增加了图片验证码功能,在windows部署下未发现问题,但是在Linux(Centos)下部署却出现了如下问题 查了下是因为用了System.Drawing.Common类库需要在linux下安装一下libgdiplus来支持图像处理,图片处理,因为我的环境是在Docke ...
分类:
Web程序 时间:
2021-04-21 12:05:44
阅读次数:
0
借鉴微博:https://blog.csdn.net/zhifeiya/article/details/42919047 核心代码: using System;using System.Collections;using System.Collections.Generic;using System ...
UDP 发短信 : 不需要连接但是需要知道对方的地址 发送消息 //不需要连接服务器 public static void main(String[] args) throws Exception { //1.建立一个socket DatagramSocket datagramSocket = ne ...
分类:
其他好文 时间:
2021-04-21 11:50:41
阅读次数:
0
前言 在学习算法很美课程的时候,学习到了一些位运算的奇技淫巧,收录在此 判断奇偶数 判断奇数1 & x == 1 System.out.println((1991 & 1) == 1); 判断偶数1 & x == 0 System.out.println((1990 & 1) == 0); 获取二进 ...
分类:
编程语言 时间:
2021-04-20 15:43:24
阅读次数:
0
该模式的作用就是复制对象,特别是复杂的对象。 1.浅克隆 两个要点:实现Cloneable接口,重写clone()方法 public class Product implements Cloneable{ private String name; private Date date; public ...
分类:
其他好文 时间:
2021-04-20 15:18:21
阅读次数:
0