java允许在一个程序中定义多个名称相同的方法,但是参数的类型或个数必须不同,这就是方法的的重载。 1 public class Example { 2 public static void main(String[] args) { 3 //下面是针对求和方法的调用 4 int sum1 = ad ...
分类:
编程语言 时间:
2020-06-25 15:46:46
阅读次数:
51
一、静态注册实现开机启动 1.在之前的连载中,我们编写的是动态注册,用到了内部类等。动态注册只能在程序启动之后才能生效。接下来我们将要使用静态注册的方式进行注册。(可以举例开机启动项) package com.example.broadcasttest2; ? import android.cont ...
分类:
移动开发 时间:
2020-06-25 15:37:23
阅读次数:
89
Reversing Linked List Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, give ...
分类:
其他好文 时间:
2020-06-25 14:13:09
阅读次数:
56
description Given a positive integer N, return the number of positive integers less than or equal to N that have at least 1 repeated digit. Example In ...
分类:
其他好文 时间:
2020-06-25 14:09:06
阅读次数:
65
Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1, ...
分类:
其他好文 时间:
2020-06-24 23:53:58
阅读次数:
104
Exception-Handling Overview Example Snippet for try-throw-catch (踹扔抓示例) try { Code to try; throw an exception (1) with a throw statement (2) or from f ...
分类:
其他好文 时间:
2020-06-24 22:08:41
阅读次数:
67
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re ...
分类:
其他好文 时间:
2020-06-24 19:28:08
阅读次数:
55
1. $.ajax() 1.1 $.ajax()方法概述 作用:发送Ajax请求。 $.ajax({ type: 'get', // 请求方式 url: 'http://www.example.com', // 请求地址 data: { name: 'zhangsan', age: '20' }, ...
分类:
Web程序 时间:
2020-06-24 11:57:31
阅读次数:
58
1、概览 当多线程帮助我们提高应用性能的同时,它同时也带来一些问题,本文我们将借助几个小例子看下两个问题,死锁和活锁。 2、死锁 2.1、什么是死锁 死锁发生在当两个或多个线程一直在等待另一个线程持有的锁或资源的时候。这会导致一个程序可能会被拖垮或者直接挂掉,因为线程们都不能继续工作了。 经典的哲学 ...
分类:
编程语言 时间:
2020-06-24 00:24:55
阅读次数:
92
一、nginx+phpnginx配置文件中增加以下内容 cat /usr/local/nginx/conf/nginx.conf server { listen 80; server_name www.example.com; location / { root html; index index. ...
分类:
数据库 时间:
2020-06-23 19:38:22
阅读次数:
57