鄙人为兴趣爱好,0基础入门学习Java,有些心得想法,记录于此,与君分享。 然毕竟新手,学识尚浅,错误之处,希望多多指正批评,也是对我最大的帮助! 前言:本篇文章,主要讨论在子类继承父类之后,各属性成员和方法的特征规律和差异,this和super的异同,已经一些内存构建的个人想法。 一、NEW一个孙 ...
分类:
编程语言 时间:
2019-09-02 23:43:22
阅读次数:
98
题目 设函数 $$log_a*(x) = \begin{cases}-1, & \text{ if } x < 1 \\ 1+log_a*(log_ax) & \text{ if } x \geq 1 \end{cases}$$ 求最小的正整数 $x$,使得 $log_a*(x) \geq b$ 分 ...
分类:
其他好文 时间:
2019-09-02 12:10:26
阅读次数:
261
题意:输入a,b,p,求(底数a的右上角有b-1个a) 思路: 广义欧拉定理: AC代码: #include<bits/stdc++.h> typedef long long ll; using namespace std; ll a,b,m; ll vis[1000005]; ll prime[1 ...
分类:
其他好文 时间:
2019-09-01 23:57:42
阅读次数:
269
题目: In Complexity theory, some functions are nearly O(1)O(1), but it is greater then O(1)O(1). For example, the complexity of a typical disjoint set i ...
分类:
其他好文 时间:
2019-09-01 23:30:34
阅读次数:
128
// 第一种public boolean onKeyDown(int keyCode, KeyEvent event) { } //直接退出程序@Override protected void onDestroy() { super.onDestroy(); // 或者下面这种方式 //System ...
分类:
移动开发 时间:
2019-09-01 12:17:11
阅读次数:
115
1.简单的使用 在类的继承中,如果重定义某个方法,该方法会覆盖父类的同名方法,但有时,我们希望能同时实现父类的功能,这时,我们就需要调用父类的方法了,可通过使用 super 来实现,比如: 在上面,Animal 是父类,Dog 是子类,我们在 Dog 类重定义了 greet 方法,为了能同时实现父类 ...
分类:
其他好文 时间:
2019-08-30 22:55:07
阅读次数:
201
如果调用okhttp工具类下载服务器文件报错 请按以下步骤检查: 1.动态申请权限,同时AndroidManifest.xml的application中添加 2.下载文件函数(downFile)在线程中调用 3.downFile的第二个参数文件路径写成相对路径(Environment.getExte ...
分类:
移动开发 时间:
2019-08-30 14:29:23
阅读次数:
183
线程组 线程组可以批量管理线程和线程组对象。 一级关联 例子如下,建立一级关联。 输出结果如下 每隔三秒输出两个线程名称,符合预期。 线程组自动归组属性 java public class ThreadDomain49 { public static void main(String[] args) ...
分类:
编程语言 时间:
2019-08-30 13:46:02
阅读次数:
107
一.线程的三种使用方法 1.新建一个类继承自Thread,然后重写父类的run()方法,在run()方法中编写耗时逻辑,如下所示: class MyThread()extends Thread{ @Override public void run(){ //耗时操作 } } 开启这个线程的方法:ne ...
分类:
移动开发 时间:
2019-08-29 23:41:46
阅读次数:
126
import 'package:flutter/material.dart'; import 'package:flutter_app/pages/SplashScreen.dart'; void main() => runApp(MyApp()); class MyApp extends Stat ...
分类:
其他好文 时间:
2019-08-29 23:18:37
阅读次数:
143