黑马程序员之java中命名规范(Naming Conventions)

天地图下载带审图号(审图号: GS(2024)0650号)的 “行政区划” 数据(含shp文件下载地址) 在科研投稿论文过程中,多数期刊杂志要求我们制作涉及国界的图件,必须使用自然资源部地图技术审查中心发布的标准地图底图。如地理学报、地理科学等期刊的投稿指南中写到:非标准底图本刊不予发表!(如图1.1所示)如果一定要用,凡涉国界图件(国内部分地区、全国、世界部分地区、全球)必须使用自然资源部标准地图服务系统标准地图底图(http://bzdt.ch.mnr.gov.cn/)(如图1.1所示)或国家测绘局地理信息局标准地图底图(如图1.2所示),所用底图边界要完全无修改(包括南海诸岛位置)。 阅读详情

^_^o~ 努力!—————————>android培训、java培训、期待与您交流!—————————> #^_^#~成功!

Java、Android、PHP、.Net视频下载 



更多请参见:Java语言编码规范(Java Code Conventions)

命名规范使程序更易读,从而更易于理解。它们也可以提供一些有关标识符功能的信息,以助于理解代码,例如,不论它是一个常量,包,还是类。

标识符类型命名规则例子
包(Packages)一个唯一包名的前缀总是全部小写的ASCII字母并且是一个顶级域名,通常是com,edu,gov,mil,net,org,或1981年ISO 3166标准所指定的标识国家的英文双字符代码。包名的后续部分根据不同机构各自内部的命名规范而不尽相同。这类命名规范可能以特定目录名的组成来区分部门(department),项目(project),机器(machine),或注册名(login names)。com.sun.eng

com.apple.quicktime.v2

edu.cmu.cs.bovik.cheese
类(Classes)命名规则:类名是个一名词,采用大小写混合的方式,每个单词的首字母大写。尽量使你的类名简洁而富于描述。使用完整单词,避免缩写词(除非该缩写词被更广泛使用,像URL,HTML)class Raster;

class ImageSprite;
接口(Interfaces)命名规则:大小写规则与类名相似interface RasterDelegate;

interface Storing;
方法(Methods)方法名是一个动词,采用大小写混合的方式,第一个单词的首字母小写,其后单词的首字母大写。run();
runFast();

getBackground();
变量(Variables)变量名不应以下划线或美元符号开头,尽管这在语法上是允许的。
变量名应简短且富于描述。变量名的选用应该易于记忆,即,能够指出其用途。尽量避免单个字符的变量名,除非是一次性的临时变量。临时变量通常被取名为i,j,k,m和n,它们一般用于整型;c,d,e,它们一般用于字符型。
char c;
int i;

float myWidth;
实例变量(Instance Variables)大小写规则和变量名相似,除了前面需要一个下划线int _employeeId;
String _name;

Customer _customer;
常量(Constants)类常量和ANSI常量的声明,应该全部大写,单词间用下划线隔开。(尽量避免ANSI常量,容易引起错误)static final int MIN_WIDTH = 4;

static final int MAX_WIDTH = 999;

static final int GET_THE_CPU = 1;


^_^o~ 努力!—————————>android培训、java培训、期待与您交流!—————————> #^_^#~成功!

Java、Android、PHP、.Net视频下载 

  


【Bug已解决】Codex CLI 报错 You‘ve hit your usage limit 解决方案 Codex CLI 密集使用时触发 You've hit your usage limit 限流报错,本质是订阅套餐额度机制在正常发挥作用。文中给出等待滚动重置、拆分大任务、主动管理上下文、升级套餐、团队排队机制等完整解决方案。 阅读详情

相关推荐

FPGA—ZYNQ_BD Block Design学习(一)

1.第一步:打开Vivado软件,创建或打开一个工程。2.第二步:在Block Design中添加arm核心,并将其配置为IP核。3.第三步:配置arm核心的外设信息,如DDR接口、时钟频率、UART接口等。4.第四步:完成Block Design中的模块互联,生成PL端的比特流。 5.第五步:导出PS端的硬件信息,包括arm IP核的外设、速度、引脚和地址等信息。1创建bd 需要有ddr以及uart和时钟配置外设io口,这里就是zynq的管脚规定好的,根据原理图用哪个个勾选哪一个。 对外设uart的配

m0_58129662的博客 1029

Sonar Java默认的扫描规则

Sonar Java默认的扫描规则

兴趣是最好的老师 6778

搜索引擎——ElasticSearch汇总

汇总——ElasticSearch篇 全文检索 问题1:什么是全文检索? 基本概念:对**非结构化数据/结构化数据**先建立**索引**,再对索引进行搜索**文档**的过程叫做全文检索。 什么是非结构化与结构化数据? - 非结构化数据:没有固定的格式的数据(html,word,excel)---没有固定长度,字段约束,描述,散列数据 - 结构化数据:有固定的格式的数据(如:数据库数据)---有固定长度(varchar(50)),字段类型,描述修饰数据 搜索算法:顺序扫描法、倒排索引法 - 顺序

alonewolf_99的博客 1840

SonarLint 默认扫描规则

请看原文:原文链接:https://blog.youkuaiyun.com/jiaomubai/article/details/116596868 在平时写代码的时候,为了代码规范和减少 bug 的数量,使用 SonarLint 插件进行代码检查无疑是一个很好的方法。Sonar 是一个用于代码质量管理的开源平台,用来管理源代码的质量,通过插件的形式支持包括 Java、C++、C语言等多种编程语言的代码质量管理与检测。 Sonar 从以下七个维度来进行代码质量的检测: 不遵循代码标准:Sonar 可以通过 PMD、

全盛 2万+

Rockchip开发板FUSB302快充调试避坑指南:从设备树配置到驱动修改全流程

本文详细解析了在Rockchip开发板上调试FUSB302快充功能的全流程,重点涵盖设备树配置、驱动修改及硬件设计避坑指南。针对PD协议协商失败、电流倒灌等常见问题,提供了从软件配置到硬件排查的实战解决方案,帮助嵌入式工程师高效完成快充功能开发。

weixin_28256233的博客 114

手把手教你设计T型和Π型衰减器:从理论计算到实际搭建(含误差分析)

本文详细介绍了T型和Π型衰减器的设计方法,从理论计算到实际搭建,包括电阻值推导、元件选择技巧及误差分析。通过实例演示如何设计50Ω系统中的10dB衰减器,并提供了高频应用和优化策略,帮助电子工程师掌握阻抗匹配与信号衰减的核心技术。

weixin_33737774的博客 398

Sonar代码规则之TOP30详解

构造函数不应用于实例化"String", “BigInteger”, "BigDecimal"和原始包装类。如果boolean表达式的值是已定的,那么boolean表达式是没有必要的可以移除。a、父类方法是static的而子类方法不是static的。b、子类方法的参数或返回值与父类方法不是同一个包。重写的和实现在方法要加Override标注。以父类方法名字命名的子类方法应该被覆盖。可合并的“if”语句应该合并。未使用的方法参数应该被移除。没用的私有方法应该被移除。无用的私有属性应该被移除。

蓝天⊙白云的博客 7749

Verilog基本代码结构及常用语句always、begin...end解读

Verilog基本代码结构及常用语句always、begin...end解读 线性反馈以为寄存器(LFSR)

weixin_62380586的博客 1万+

Sonarlint问题汇总

sonarlint代码检测

若阳丶的博客 8217

本地AI代码助手:智能解析大型代码库,实现自动化重构与理解

在软件开发中,大型代码库的理解与维护是常见挑战。传统方法依赖人工阅读和有限上下文工具,效率低下。通过结合检索增强生成(RAG)和多智能体(Multi-Agent)架构,现代AI工具能够智能解析代码结构,理解模块关系,并精准定位相关代码片段。这种技术不仅能提升代码探索效率,还能自动化执行重构、文档生成等任务,在遗留系统维护、快速上手新项目等场景中发挥关键作用。本文以blackboxaicode/cli为例,展示了如何利用其代码感知和Workflow Automation能力,高效处理复杂代码库。

weixin_30240349的博客 368

(OpenCV)图像目标尺寸检测

  本文翻译自pyimagesearch技术博客上的一篇文章,《Measuring size of objects in an image with OpenCV》,原文作者:Adrian Rosebrock 。 https://www.pyimagesearch.com/2016/03/28/measuring-size-of-objects-in-an-image-with-opencv...

明柳梦少的博客 7万+

Sonar Java默认扫描规则

规则如下: ".equals()" should not be used to test the values of "Atomic" classes:equals()方法不应该用在原子类型的数据上(如:AtomicInteger, AtomicLong, AtomicBoolean). "=+" should not be used instead of "+=":"=+"不可以替代 “+=”. "==" and "!=" should not be used when "equals" is ov

yiyijianxian的博客 9210

[特殊字符]用Python爬取中国裁判文书网案例信息:从爬虫到数据可视化全流程实战(附代码)

✅ 分析裁判文书网的网页结构;✅ 自动化爬取案件信息;✅ 解析加密参数并获取数据;✅ 数据可视化图表输出;✅ 模块化构建爬虫系统。

2201_76125261的博客 2824

【代码审查】C#常见错误提醒三

Synchronized classes Vector, Hashtable,Stack and StringBuffer should not be used 不要使用同步的Vector/HashTable/Stack/StringBuffer等。在早期,出于线程安全问题考虑,javaAPI 提供了这些类。但是同步会极大影响性能,即使是在同一个线程中使用他们。 通常可以这样取代: ArrayLi...

Jackey·Now 960

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

新版sonar代码审查问题总结

主要问题列表: 格式:问题名字+问题出现的次数 Resources should be closed2 资源未关闭,打开发现有两处用到的IO流没有关闭 Conditions should not unconditionally evaluate to "TRUE" or to "FALSE"1 if/else判断里出现了重复判断,比如在if(a>10)的执行体里面又判断i

邢超的博客 4万+

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

Java命名规范(Naming Conventions)

Java命名规范(Naming Conventions)命名规范使程序更易读,从而更易于理解。它们也可以提供一些有关标识符功能的信息,以助于理解代码,例如,不论它是一个常量,包,还是类。 标识符类型 命名规则 例子

szanjie的专栏 1295

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

Sonar 英文翻译

转发:https://blog.youkuaiyun.com/fyc__ios/article/details/53129133 格式:问题名字+问题出现的次数 Resources should be closed2 资源未关闭,打开发现有两处用到的IO流没有关闭 Conditions should not unconditionally evaluate to "TRUE" or to...

hi_zf的博客 1229

【sonar】sonar:默认的扫描规则

转自https://www.cnblogs.com/gcgc/p/11451125.html https://blog.youkuaiyun.com/liumiaocn/article/details/83550309 https://note.youdao.com/ynoteshare1/index.html?id=3c1e6a08a21ada4dfe0123281637e299&type=note https://blog.youkuaiyun.com/liumiaocn/article/details/..

coolcoffee168的专栏 1万+

formate JAVA_spring-javaformat

TipsFormatting and Checkstyle alone are not enough to produce truly consistent code.Here are some tips that we’ve found useful when developing Spring Boot.Excluding specific checksIf you want most Spr...

weixin_31290291的博客 800

Python Coding Guidelines

Python Coding Guidelines 12/14/07 Written byRob Knightfor the Cogent project Table of Contents Why have coding guidelines?What should I call my variables? What are the naming ...

weixin_34413103的博客 241

后端编码规范

一、命名规约 Rule 1. 【强制】禁止拼音缩写,避免阅读者费劲猜测;尽量不用拼音,除非中国式业务词汇没有通用易懂的英文对应。 禁止: DZ[打折] / getPFByName() [评分] 尽量避免:Dazhe / DaZhePrice Rule 2. 【强制】禁止使用非标准的英文缩写 反例: AbstractClass 缩写成 AbsClass;condition 缩写成 condi。 Rule 3. 【强制】禁用其他编程语言风格的前缀和后缀 在其它编程语言中使用的特殊前缀或后缀,如_name

wejack的专栏 3163

JAVA代码规则对照表

JAVA代码规则对照表 Try-with-resources should be used 应该使用带有资源的Try-with-resources Creating cookies without the “secure” flag is security-sensitive 创建没有“secure”标志的cookie是安全敏感的 Return values should not be ignor...

Anghung的博客 1万+

Java之命名规范

Java之命名规范

陆洋的博客 6800

Java 命名规范(非常全),收藏了!

Java 命名规范(非常全),收藏了!

浩浩的博客 1万+

Java命名规范【全】

Java命名规范【全】

严泽熠的博客 1万+

Java中的命名规范

Java命名

qq_65337539的博客 6470
上一篇: 黑马程序员之java环境变量配置方法
下一篇: 黑马程序员之java中一些小知识点(不断更新中)
Hinoone
博客等级 码龄15年 1粉丝 6原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值