首页 文章 精选 留言 我的

精选列表

搜索[小尺寸模型],共10005篇文章
优秀的个人博客,低调大师

Java——小程序练习一

编写程序:由键盘输入给出一个百分制成绩,要求输出成绩等级’A’、’B’、’C’和’D’,90分以上为’A’,75~89为’B’,60~74为’C’,60分以下为’D’。 最开始写的方法:没有注意到百分制的限定,缺少条件分析,思考不到位。 public class Test01 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int score = scanner.nextInt(); if (score>=90) { System.out.println("A"); }else if (score>=75 && score<=89) { System.out.println("B"); }else if (score>=60 && score<=74) { System.out.println("C"); }else if (score<60) { System.out.println("D"); } }} 改正后: public class Test01 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int score = scanner.nextInt(); if (score>=90&&score<=100) { System.out.println("A"); }else if (score>=75 && score<=89) { System.out.println("B"); }else if (score>=60 && score<=74) { System.out.println("C"); }else if (score<60&&score>=0) { System.out.println("D"); }else{ System.out.println("很显然,这成绩是假滴!"); } }}

优秀的个人博客,低调大师

volley框架使用小Demo

MainActivity public class MainActivity extends AppCompatActivity { private static final String URL = "https://www.baidu.com/"; private RequestQueue mQueue; // volley的请求队列 @BindView(R.id.volley_get) Button btn; TextView textView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mQueue = Volley.newRequestQueue(getApplicationContext()); ButterKnife.bind(this); } @OnClick({R.id.volley_get}) public void onClick(View v) { get(); } /** * 创建一个请求,这里我们做一个最简单的通过GET方式请求网页源码的操作。请求成功后打印结果。 */ private void get() { StringRequest request = new StringRequest(Request.Method.GET, URL, new Response.Listener<String>() { @Override public void onResponse(String arg0) { //Toast.makeText(getApplicationContext(), arg0, Toast.LENGTH_LONG).show(); textView = (TextView) findViewById(R.id.text); textView.setText(arg0.toString()); //Log.d("onResponse", arg0); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError arg0) { //Toast.makeText(getApplicationContext(), arg0.toString(), Toast.LENGTH_LONG).show(); textView = (TextView) findViewById(R.id.text); textView.setText(arg0.toString()); } }); mQueue.add(request); } } activity_main.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.an.volleytest.MainActivity"> <Button android:id="@+id/volley_get" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="get请求" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:id="@+id/text" android:layout_marginTop="25dp" android:layout_below="@+id/volley_get" android:layout_centerHorizontal="true" /> </RelativeLayout> 捕获.PNG 点击按钮 hello world 替换为请求网址的html文件

优秀的个人博客,低调大师

Python的matplotlib小例

今天学习了Python语言的matplotlib库作数据可视化。 import matplotlib.pyplot as plt x_values = list(range(1,6)) y_values = [x**3 for x in x_values] plt.scatter(x_values,y_values,edgecolors='none',s=10) plt.title("Square Numbers",fontsize=24) plt.xlabel("Value",fontsize=14) plt.ylabel("Sauqre of Value",fontsize=14) #设置刻度标记的大小 plt.tick_params(axis='both',which='major',labelsize=14) plt.show() scatter函数用来绘画图表,定义表里的各项元素。 tick_params()函数用来设置刻度,axis表示x轴的刻度。

优秀的个人博客,低调大师

Android 开发实用小技巧

转载请标明出处:http://blog.csdn.net/zhaoyanjun6/article/details/75647437 本文出自【赵彦军的博客】 Android Studio 实用插件传送门:http://blog.csdn.net/zhaoyanjun6/article/details/75646540 1、查看依赖包的方法数 网址: http://www.methodscount.com/ 2、在线把 layout 布局文件转为Java代码 网址:http://android.lineten.net/layout.php 3、在线生成 shapes 代码 网址: http://shapes.softartstudio.com/ 4、在线生成 Button 的样式 网址:http://angrytools.com/android/button/ 5、根据 packname 下载 GooglePlay 上的应用 网址: https://apps.evozi.com/apk-downloader/ 个人微信号:zhaoyanjun125 , 欢迎关注

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

用户登录
用户注册