- 什么是JVM
GG编程
jvm
1.基本概念:JVM(JavaVirtualMachine,Java虚拟机)是一个用于运行Java程序的虚拟机。它是Java编程语言的核心部分,负责将Java字节码(bytecode)解释或编译成计算机可以执行的机器码,从而实现Java程序的跨平台特性。2.主要功能:(1).加载字节码:JVM将编译后的Java字节码文件(.class文件)加载到内存中。(2).字节码验证:验证字节码的正确性和安全
- dockerfile部署fastapi项目
hzw0510
dockerfastapi
dockerfile部署fastapi项目1、Dockerfile#使用Python官方镜像作为基础镜像FROMpython:3.8-slim#更新apt-get源并安装依赖#RUNapt-getupdate-y&&apt-getinstall-ygit#设置环境变量ENVPYTHONDONTWRITEBYTECODE1ENVPYTHONUNBUFFERED1#创建工作目录WORKDIR/app#
- 用Java手写JVM第五章——指令集和解释器
周周包
手写JVMjava
文章目录代码目录一、字节码和指令集二、指令和指令解码Instruction①InstructionNoOperands②InstructionBranch③InstructionIndex8④InstructionIndex16BytecodeReader三、九种指令的实现1、常量指令①nop指令:②const指令:③BIPUSH和SIPUSH指令:2、加载指令3、存储指令4、栈指令①pop和po
- Kotlin inline内联函数
linlinlinl
今天介绍下Kotlin中非常重要的内联函数,小伙伴系紧鞋带准备发车普通函数调用下面测试整数相加的情况funcalculate(){println(add(a=1,b=3))}funadd(a:Int,b:Int)=a+b反编译查看下java代码(AndroidStudio或idea下可以使用kotlin插件直接查看,路径是Tools→Kotlin→ShowKotlinBytecode→DECOMP
- java 中的虚拟机的介绍
慢慢成长的码农
java开发语言
Java虚拟机(JavaVirtualMachine,简称JVM)是运行Java应用程序的核心组件。它提供了一个平台无关的执行环境,使Java程序可以在各种硬件和操作系统上运行。以下是JVM的详细介绍:1.JVM的基本概念JVM是一种虚拟计算机,它能够执行以字节码(Bytecode)形式存在的Java程序。字节码是Java编译器将Java源代码编译后生成的中间语言代码。JVM负责将这些字节码解释或
- 通俗易懂:什么是Java虚拟机(JVM)?它的主要作用是什么?
大龄下岗程序员
mysqljavamysqlspring
Java虚拟机(JavaVirtualMachine,JVM)是一种软件实现的抽象计算机,它负责执行Java字节码(Bytecode)。Java程序并不是直接在物理计算机上运行,而是先由Java编译器将源代码编译成与平台无关的字节码,然后由JVM负责读取字节码并在实际硬件架构上运行。JVM的主要作用包括以下几个方面:1.跨平台性-JVM是Java语言“一次编写,到处运行”(WriteOnce,Ru
- 初识 eBPF,你应该知道的知识
Docker_
网络数据结构pythonlinuxjava
eBPF作为一颗在基础软件领域冉冉上升的新星,可谓前途大好,越来越多的基于eBPF的应用如雨后春笋般蓬勃涌现,这是eBPF展现出的惊人力量。本文就将带着大家了解eBPF。什么是eBPF与eBPF基金会?简单来说,eBPF是Linux内核中一个非常灵活与高效的类虚拟机(virtualmachine-like)组件,能够在许多内核hook点安全地执行字节码(bytecode)。很多内核子系统都已经使用
- Decompiled .class file, bytecode version:52.0 (java8)
hello_zzw
JavaIDEAjava源码注释
IDEA查了源码是出现以下问题:Decompiled.classfile,bytecodeversion:52.0(java8)在下载了对应的sources.jar和javadoc.jar后还是这个问题,方法上没有出现对应的注释,即使是在当前页面进行sources的下载以及下载后sources的选择,结果依旧。根据https://blog.csdn.net/qq_26558047/article/
- idea基础配置
他҈姓҈林҈
环境配置intellij-idea
配置jre【file】->【ProjectStructure】设置SDK设置Languagelevel【Settings】->【Build,Execution,Deployment】->【Compiler】->【JavaCompiler】设置Projectbytecodeversion:配置maven【Settings】->【Build,Execution,Deployment】->【BuildT
- LLVM实战之将.ll文件转换成bitcode文件
Aria_J
LLVM汇编LLVM编译器底层机器码
目录1.详细步骤2.原理3.扩展本文将介绍如何从LLVM的.ll文件来生成bitcode。LLVMbitcode(也称为字节码——bytecode)由两部分组成:位流(bitstream,可类比字节流),以及将LLVMIR编码成位流的编码格式。同样,这一步骤的前提是安装llvm-as工具,并添加到PATH环境变量中。1.详细步骤(1)首先创建LLVMIR文件作为llvm-as的输入:$cattes
- Java Javassist/ASM 框架比较
MicoCube
Javassist:Javassist(JavaProgrammingAssistant)makesJavabytecodemanipulationsimple.ItisaclasslibraryforeditingbytecodesinJava;itenablesJavaprogramstodefineanewclassatruntimeandtomodifyaclassfilewhentheJ
- Python代码混淆工具,Python源代码保密、加密、混
不写代码没饭吃
iPhone设备APP加固iOS加固python开发语言
引言Python作为一种高级脚本语言,便捷的语法和丰富的库使它成为众多开发者的首选。然而,有时候我们希望保护我们的Python源代码,避免被他人轻易获取和篡改。为了实现这一目标,我们可以采取代码混淆的技术手段。本文将介绍Python代码混淆的现状、优化方法和常用工具。正文1.使用pyc或pyo文件代替源码文件Python可以将源码编译为pyc(PythonCompiledBytecode)或pyo
- Python __pycache__文件
阿汤哥的程序之路
pythonpython
pycharm配置位置几个基本概念源代码(sourcecode)我们每天编写的Python、Java、C++等代码通常指的就是源代码,源代码的特点是人类可读。但是CPU只能读懂二进制,看不懂我们写的源代码,因此还需要进行编译(compile)字节码(bytecode)因为CPU读不懂源代码,因此需要对源代码进行编译:把源代码(原始语言)转换成另一种编程语言(目标语言)的过程称为编译。但是在Pyth
- Python代码混淆工具,Python源代码保密、加密、混淆
iOS学霸
混淆加固iPhone设备python开发语言
引言Python作为一种高级脚本语言,便捷的语法和丰富的库使它成为众多开发者的首选。然而,有时候我们希望保护我们的Python源代码,避免被他人轻易获取和篡改。为了实现这一目标,我们可以采取代码混淆的技术手段。本文将介绍Python代码混淆的现状、优化方法和常用工具。正文1.使用pyc或pyo文件代替源码文件Python可以将源码编译为pyc(PythonCompiledBytecode)或pyo
- 第1讲 | 谈谈你对Java平台的理解?
governlee
JRE(JavaRuntimeEnvironment):Java运行环境,包含了JVM和Java类库,以及一些模块等。JDK(JavaDevelopmentKit):JRE的一个超集,提供了更多工具,比如编译器、各种诊断工具等。Java是解释执行”,这句话正确吗?我们开发的Java的源代码,首先通过Javac编译成为字节码(bytecode),然后,在运行时,通过Java虚拟机(JVM)内嵌的解析
- Javassist之字节码级的API
bdqfork
Javassist提供了低级API来直接编辑类文件。为了使用这些API,你需要详细了解Java字节码和类文件的格式,这样你就可以通过这些API对类文件进行各种修改。如果你想要产生一个简单的类文件,javassist.bytecode.ClassFileWriter可能提供了最好的API。它提供了比javassist.bytecode.ClassFile更快的速度,尽管这个API更小一些。1.获取C
- IntelliJ IDEA的常用插件收集
hjc_042043
Java相关intellij-ideajavaide
AlibabaJavaCodingGuidelines:(代码质量检查)ChatGPTGPT-4-BitoAI(使用GPT4.0的AI工具)Tabnine:AICodeCompletion(使用AI自动完成代码编写)Translation(中英文翻译)jclasslibBytecodeviewer(字节码源文件查看,主要用来分析底层JVM的调用流程)FreeMyBatisTool(免费的数据库和m
- python的GIL
xhz的个人小屋
InCPython,theglobalinterpreterlock,orGIL,isamutexthatpreventsmultiplenativethreadsfromexecutingPythonbytecodesatonce.ThislockisnecessarymainlybecauseCPython’smemorymanagementisnotthread-safe.(However,
- Java中的常量编译
android_cai_niao
java常量常量编译字节码常量字节码
今天在查看自己之前写的代码时,突然发现有点不对劲,代码如下:if(Build.VERSION.SDK_INTKoltin>ShowKotlinBytecode,这样字节码就显示出来了,如下:可以看到”LINENUMBER11L0",L0是什么不知道,但是前面的英文按字面翻译就是第11行,正好就是对应我代码中的第11行(Log.i(“ABCD”,“Q=${Build.VERSION_CODES.Q}
- 【idea】几个不错的idea插件让我码速又快了
王果冻ddd
intellij-ideajavaide
目录前言Gradianto插件jclasslibBytecodeviewer插件GrepConsole插件GenerateAllSetter插件GsonFormat插件JRebelandXRebel插件leetcodeeditor插件mavenhelper插件SequenceDiagram插件Statistic插件Translation插件前言idea可以说是java开发者使用的最多的开发工具了,
- JVM Knowleadge-字节码文件的构造
time_hunter
JVM
本文参考了周志明的《深入理解Java虚拟机:JVM高级特性与最佳实践》,这本书写的非常好!极力推荐!字节码平台无关性:Java的一次编译到处运行即要求所载入的和执行同一种平台无关的字节码。各个平台的虚拟机与所有平台都统一采用字节码(ByteCode)存储格式。有很多语言可以在JVM上执行。而语言无关性的基础是:JVM和字节码存储格式。JVM不关心Class的来源是什么语言,之后要它符合Class文
- 深入理解Java的反射机制
@Autowire
Java基础面试题java开发语言经验分享
首先我们需要先了解程序的运行过程:从源文件创建到程序运行,Java程序要经过两大步骤:编译,运行;1、源文件由编译器编译成字节码(ByteCode);2、字节码由java虚拟机解释运行。第一步(编译):创建完源文件之后,程序会先被编译为.class文件。Java编译一个类时,如果这个类所依赖的类还没有被编译,编译器就会先编译这个被依赖的类,然后引用,否则直接引用。如果java编译器在指定目录下找不
- 第23天:WEB攻防-Python考点&CTF与CMS-SSTI模版注入&PYC反编译
My Year 2019
flaskpython后端
目录PYC文件反编译SSTIflask模板注入BUUCTF-shrine靶场题目SSTI考点-CMS源码-MACCMS_V8.X(苹果cms)执行PYC文件反编译介绍:pyc文件是py文件编译后生成的字节码文件(bytecode)。pyc文件经过python解释器最终会生成机器码运行。所以pyc文件是可以跨平台部署的,类似Java的.class文件。一般py文件改变后,都会重新生成pyc文件。但在
- 第二十三天:WEB攻防-WEB攻防-Python考点&CTF与CMS-SSTI模版注入&PYC反编译
新奇八
网络安全安全网络安全phppython
-python的pyc文件pyc文件是py文件编译后生成的字节码文件(bytecode)。pyc文件经过python解释器最终会生成机器码运行。所以pyc文件是可以跨平台部署的,类似Java的.class文件。一般py文件改变后,都会重新生成pyc文件。当然,生成的pyc文件也是可以通过网上一些在线平台反编译出来从而获得源码的反编译平台:1.https://tool.lu/pyc/2.http:/
- 【JVM专题】JVM从概述到调优图文详解,含思维脑图深度剖析!
前程有光
JVM概述JVM是一种用于计算机设备的规范,它是一个虚构的计算机的软件实现,简单的说,JVM是运行bytecode字节码程序的一个容器。它有一个解释器组件,可以实现JAVA字节码和计算机操作系统之间的通信,java程序只需要在JVM上一次编译,多出运行,因此JAVA具有跨平台性。内存结构方法区(常量池、静态变量、构造函数、类数据)堆(对象、类实例、GC的主要区域)新生区(MinorGC、FullG
- python跨平台的原理
eric_bai_bai
python开发语言
Python和C++是两种不同的编程语言,它们在运行方式和编译过程上存在根本的差异,这导致了它们在运行时的不同行为Python的解释执行Python是一种解释型语言,它的代码在运行时由解释器逐行解释执行。具体过程如下:解释器:Python解释器负责执行代码。它读取源代码,将其解释成字节码(bytecode),然后逐行执行。字节码:Python的编译过程是将源代码编译成字节码,这是一种中间代码,类似
- idea如何配置jdk1.8,java: 警告: 源发行版 17 需要目标发行版 17
比护隆佑
intellij-ideajavajdk
如题,在运行时提示:java:警告:源发行版17需要目标发行版17打开File——ProjectStructure——选择Project,如图把SDK和Languagelevel分别改为1.8和8然后选择Modules,确保Source和Dependencies的设置也都是8和1.8然后打开File——settings,在上面找到JavaCompiler,把Projectbytecodeversi
- 什么是pyc文件
泽文爱编程
原文链接:pyc和py文件的区别什么是pyc文件pyc是一种二进制文件,是由py文件经过编译后,生成的文件,是一种bytecode,py文件变成pyc文件后,加载的速度有所提高,而且pyc是一种跨平台的字节码,是由Python的虚拟机来执行的,这个是类似于Java或者.NET的虚拟机的概念。pyc的内容,是跟python的版本相关的,不同版本编译后的pyc文件是不同的,2.5编译的pyc文件,2.
- JVM-透彻理解字节码以及指令
milo.qu
Javajvmjava后端
一、字节码与指令概述packagech13_bytecode;publicclassHelloWorld{publicstaticvoidmain(String[]args){System.out.println("helloworld");}}生成字节码:cafebabe0000003100220a0006001409001500160800170a0018001907001a07001b010
- Java 反序列化 ysoserial Spring
编程小世界
知识点以下是两个payload中涉及到的知识点:使用TemplatesImpl的_bytecodes字段存储恶意字节码,利用newTransformer()方法触发恶意代码执行,具体可以参考Java反序列Jdk7u21Payload学习笔记中关于TemplatesImpl的说明利用AnnotationInvocationHandler控制代理方法调用的返回值。在invoke()方法中的,当prox
- C/C++Win32编程基础详解视频下载
择善Zach
编程C++Win32
课题视频:C/C++Win32编程基础详解
视频知识:win32窗口的创建
windows事件机制
主讲:择善Uncle老师
学习交流群:386620625
验证码:625
--
- Guava Cache使用笔记
bylijinnan
javaguavacache
1.Guava Cache的get/getIfPresent方法当参数为null时会抛空指针异常
我刚开始使用时还以为Guava Cache跟HashMap一样,get(null)返回null。
实际上Guava整体设计思想就是拒绝null的,很多地方都会执行com.google.common.base.Preconditions.checkNotNull的检查。
2.Guava
- 解决ora-01652无法通过128(在temp表空间中)
0624chenhong
oracle
解决ora-01652无法通过128(在temp表空间中)扩展temp段的过程
一个sql语句后,大约花了10分钟,好不容易有一个结果,但是报了一个ora-01652错误,查阅了oracle的错误代码说明:意思是指temp表空间无法自动扩展temp段。这种问题一般有两种原因:一是临时表空间空间太小,二是不能自动扩展。
分析过程:
既然是temp表空间有问题,那当
- Struct在jsp标签
不懂事的小屁孩
struct
非UI标签介绍:
控制类标签:
1:程序流程控制标签 if elseif else
<s:if test="isUsed">
<span class="label label-success">True</span>
</
- 按对象属性排序
换个号韩国红果果
JavaScript对象排序
利用JavaScript进行对象排序,根据用户的年龄排序展示
<script>
var bob={
name;bob,
age:30
}
var peter={
name;peter,
age:30
}
var amy={
name;amy,
age:24
}
var mike={
name;mike,
age:29
}
var john={
- 大数据分析让个性化的客户体验不再遥远
蓝儿唯美
数据分析
顾客通过多种渠道制造大量数据,企业则热衷于利用这些信息来实现更为个性化的体验。
分析公司Gartner表示,高级分析会成为客户服务的关键,但是大数据分析的采用目前仅局限于不到一成的企业。 挑战在于企业还在努力适应结构化数据,疲于根据自身的客户关系管理(CRM)系统部署有效的分析框架,以及集成不同的内外部信息源。
然而,面对顾客通过数字技术参与而产生的快速变化的信息,企业需要及时作出反应。要想实
- java笔记4
a-john
java
操作符
1,使用java操作符
操作符接受一个或多个参数,并生成一个新值。参数的形式与普通的方法调用不用,但是效果是相同的。加号和一元的正号(+)、减号和一元的负号(-)、乘号(*)、除号(/)以及赋值号(=)的用法与其他编程语言类似。
操作符作用于操作数,生成一个新值。另外,有些操作符可能会改变操作数自身的
- 从裸机编程到嵌入式Linux编程思想的转变------分而治之:驱动和应用程序
aijuans
嵌入式学习
笔者学习嵌入式Linux也有一段时间了,很奇怪的是很多书讲驱动编程方面的知识,也有很多书将ARM9方面的知识,但是从以前51形式的(对寄存器直接操作,初始化芯片的功能模块)编程方法,和思维模式,变换为基于Linux操作系统编程,讲这个思想转变的书几乎没有,让初学者走了很多弯路,撞了很多难墙。
笔者因此写上自己的学习心得,希望能给和我一样转变
- 在springmvc中解决FastJson循环引用的问题
asialee
循环引用fastjson
我们先来看一个例子:
package com.elong.bms;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
import co
- ArrayAdapter和SimpleAdapter技术总结
百合不是茶
androidSimpleAdapterArrayAdapter高级组件基础
ArrayAdapter比较简单,但它只能用于显示文字。而SimpleAdapter则有很强的扩展性,可以自定义出各种效果
ArrayAdapter;的数据可以是数组或者是队列
// 获得下拉框对象
AutoCompleteTextView textview = (AutoCompleteTextView) this
- 九封信
bijian1013
人生励志
有时候,莫名的心情不好,不想和任何人说话,只想一个人静静的发呆。有时候,想一个人躲起来脆弱,不愿别人看到自己的伤口。有时候,走过熟悉的街角,看到熟悉的背影,突然想起一个人的脸。有时候,发现自己一夜之间就长大了。 2014,写给人
- Linux下安装MySQL Web 管理工具phpMyAdmin
sunjing
PHPInstallphpMyAdmin
PHP http://php.net/
phpMyAdmin http://www.phpmyadmin.net
Error compiling PHP on CentOS x64
一、安装Apache
请参阅http://billben.iteye.com/admin/blogs/1985244
二、安装依赖包
sudo yum install gd
- 分布式系统理论
bit1129
分布式
FLP
One famous theory in distributed computing, known as FLP after the authors Fischer, Lynch, and Patterson, proved that in a distributed system with asynchronous communication and process crashes,
- ssh2整合(spring+struts2+hibernate)-附源码
白糖_
eclipsespringHibernatemysql项目管理
最近抽空又整理了一套ssh2框架,主要使用的技术如下:
spring做容器,管理了三层(dao,service,actioin)的对象
struts2实现与页面交互(MVC),自己做了一个异常拦截器,能拦截Action层抛出的异常
hibernate与数据库交互
BoneCp数据库连接池,据说比其它数据库连接池快20倍,仅仅是据说
MySql数据库
项目用eclipse
- treetable bug记录
braveCS
table
// 插入子节点删除再插入时不能正常显示。修改:
//不知改后有没有错,先做个备忘
Tree.prototype.removeNode = function(node) {
// Recursively remove all descendants of +node+
this.unloadBranch(node);
// Remove
- 编程之美-电话号码对应英语单词
bylijinnan
java算法编程之美
import java.util.Arrays;
public class NumberToWord {
/**
* 编程之美 电话号码对应英语单词
* 题目:
* 手机上的拨号盘,每个数字都对应一些字母,比如2对应ABC,3对应DEF.........,8对应TUV,9对应WXYZ,
* 要求对一段数字,输出其代表的所有可能的字母组合
- jquery ajax读书笔记
chengxuyuancsdn
jQuery ajax
1、jsp页面
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()
- JWFD工作流拓扑结构解析伪码描述算法
comsci
数据结构算法工作活动J#
对工作流拓扑结构解析感兴趣的朋友可以下载附件,或者下载JWFD的全部代码进行分析
/* 流程图拓扑结构解析伪码描述算法
public java.util.ArrayList DFS(String graphid, String stepid, int j)
- oracle I/O 从属进程
daizj
oracle
I/O 从属进程
I/O从属进程用于为不支持异步I/O的系统或设备模拟异步I/O.例如,磁带设备(相当慢)就不支持异步I/O.通过使用I/O 从属进程,可以让磁带机模仿通常只为磁盘驱动器提供的功能。就好像支持真正的异步I/O 一样,写设备的进程(调用者)会收集大量数据,并交由写入器写出。数据成功地写出时,写入器(此时写入器是I/O 从属进程,而不是操作系统)会通知原来的调用者,调用者则会
- 高级排序:希尔排序
dieslrae
希尔排序
public void shellSort(int[] array){
int limit = 1;
int temp;
int index;
while(limit <= array.length/3){
limit = limit * 3 + 1;
- 初二下学期难记忆单词
dcj3sjt126com
englishword
kitchen 厨房
cupboard 厨柜
salt 盐
sugar 糖
oil 油
fork 叉;餐叉
spoon 匙;调羹
chopsticks 筷子
cabbage 卷心菜;洋白菜
soup 汤
Italian 意大利的
Indian 印度的
workplace 工作场所
even 甚至;更
Italy 意大利
laugh 笑
m
- Go语言使用MySQL数据库进行增删改查
dcj3sjt126com
mysql
目前Internet上流行的网站构架方式是LAMP,其中的M即MySQL, 作为数据库,MySQL以免费、开源、使用方便为优势成为了很多Web开发的后端数据库存储引擎。MySQL驱动Go中支持MySQL的驱动目前比较多,有如下几种,有些是支持database/sql标准,而有些是采用了自己的实现接口,常用的有如下几种:
http://code.google.c...o-mysql-dri
- git命令
shuizhaosi888
git
---------------设置全局用户名:
git config --global user.name "HanShuliang" //设置用户名
git config --global user.email "
[email protected]" //设置邮箱
---------------查看环境配置
git config --li
- qemu-kvm 网络 nat模式 (四)
haoningabc
kvmqemu
qemu-ifup-NAT
#!/bin/bash
BRIDGE=virbr0
NETWORK=192.168.122.0
GATEWAY=192.168.122.1
NETMASK=255.255.255.0
DHCPRANGE=192.168.122.2,192.168.122.254
TFTPROOT=
BOOTP=
function check_bridge()
- 不要让未来的你,讨厌现在的自己
jingjing0907
生活 奋斗 工作 梦想
故事one
23岁,他大学毕业,放弃了父母安排的稳定工作,独闯京城,在家小公司混个小职位,工作还算顺手,月薪三千,混了混,混走了一年的光阴。 24岁,有了女朋友,从二环12人的集体宿舍搬到香山民居,一间平房,二人世界,爱爱爱。偶然约三朋四友,打扑克搓麻将,日子快乐似神仙; 25岁,出了几次差,调了两次岗,薪水涨了不过百,生猛狂飙的物价让现实血淋淋,无力为心爱银儿购件大牌
- 枚举类型详解
一路欢笑一路走
enum枚举详解enumsetenumMap
枚举类型详解
一.Enum详解
1.1枚举类型的介绍
JDK1.5加入了一个全新的类型的”类”—枚举类型,为此JDK1.5引入了一个新的关键字enum,我们可以这样定义一个枚举类型。
Demo:一个最简单的枚举类
public enum ColorType {
RED
- 第11章 动画效果(上)
onestopweb
动画
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/
- Eclipse中jsp、js文件编辑时,卡死现象解决汇总
ljf_home
eclipsejsp卡死js卡死
使用Eclipse编辑jsp、js文件时,经常出现卡死现象,在网上百度了N次,经过N次优化调整后,卡死现象逐步好转,具体那个方法起到作用,不太好讲。将所有用过的方法罗列如下:
1、取消验证
windows–>perferences–>validation
把 除了manual 下面的全部点掉,build下只留 classpath dependency Valida
- MySQL编程中的6个重要的实用技巧
tomcat_oracle
mysql
每一行命令都是用分号(;)作为结束
对于MySQL,第一件你必须牢记的是它的每一行命令都是用分号(;)作为结束的,但当一行MySQL被插入在PHP代码中时,最好把后面的分号省略掉,例如:
mysql_query("INSERT INTO tablename(first_name,last_name)VALUES('$first_name',$last_name')");
- zoj 3820 Building Fire Stations(二分+bfs)
阿尔萨斯
Build
题目链接:zoj 3820 Building Fire Stations
题目大意:给定一棵树,选取两个建立加油站,问说所有点距离加油站距离的最大值的最小值是多少,并且任意输出一种建立加油站的方式。
解题思路:二分距离判断,判断函数的复杂度是o(n),这样的复杂度应该是o(nlogn),即使常数系数偏大,但是居然跑了4.5s,也是醉了。 判断函数里面做了3次bfs,但是每次bfs节点最多