- 博客(23)
- 收藏
- 关注
原创 要求从键盘输入某班n个学生的考试成绩,输出该班级的平均成绩
C语言要求从键盘输入某班n个学生的考试成绩,输出该班级的平均成绩#include <stdio.h>int main(){ double sumScore; int n; printf("请输入班级的人数:"); scanf("%d",&n); float score; for(int i = 0;i < n;i++){ printf("第%d个学生的分数为:",i+1); scanf("%f",&score); sumScore +
2022-03-11 23:02:17
3996
原创 Javascript保留小数(四舍五入)
四舍五入toFixed(num)参考var num =2.446242342;num = num.toFixed(2); // 输出结果为 2.45var line_y = [{%for item in datas4%}{{item[1]}}.toFixed(3),{%endfor%}]
2021-11-23 11:21:54
553
原创 行业职位分析项目手册第一套-可视化
文章目录任务四:数据可视化4.1 新建 Flask4.2 新建 app/__init__.py4.3 新建 app/config.py4.4 新建 app/ extensions.py4.5 新建 app/models/表名.py表 hot_work表 bigdata_work表 avg_money_city表 avg_money_bigdata4.6 新建 app/models/__init__.py4.7 新建 app/static/js4.8 新建 ViewData/mamage.py4.9 新建 a
2021-11-18 14:57:31
98
原创 Sql-每日一练01
Sql-每日一练01建表语句和插入数据CREATE TABLE hot_work2 ( id INTEGER NOT NULL AUTO_INCREMENT, job_name VARCHAR(255) NOT NULL, job_salary DECIMAL(15, 2) NOT NULL, city VARCHAR(255), PRIMARY KEY (id))insert into hot_work2 (job_n
2021-11-16 20:50:38
285
原创 Flask框架可视化模板
目录结构models__init__.pyfrom app.extensions import dbfrom .hot_work import HotWorkfrom .bigdata_work import BigDataWorkfrom .avg_money_city import AvgMoneyCityfrom .avg_money_bigdata import AvgMoneyBigDatafrom .CityRestaurantNum import CityRestaur
2021-11-14 17:52:23
467
原创 echarts 南丁格尔玫瑰图
echarts 南丁格尔玫瑰图roseType: ‘radius’tooltip -> formatter: “{b}:{c}({d}%)” ,折线图,柱状图只有 "{b}:{c}”option = { title : { text: '所有城市招聘数据的平均工资 vs “大数据”相关职位所有城市招聘数据的平均工资', subtext: '南丁格尔玫瑰图', x:'center' }
2021-11-13 20:58:15
3034
原创 JavaScript将字符串转为整型(数组)
JavaScript将字符串转为整型parseInt()parseFloat() // 转成浮点型var arrString = ["10","20","30","5"] arrString.forEach(str=>{ console.log(parseInt(str) + 5);})javascript操作数组查用函数push() 添加到尾部pop() 删除尾部元素unshift() 在头部添加reverse() 反转查看:https://www.
2021-11-13 20:46:03
2524
原创 echarts-bar(line)
echarts柱状图和折线图设置option = { title: { text: '职位分析', //主标题 subtext: ' ---10大热门职位分析', //副标题 x: '45%' //设置标题位置 }, xAxis: { type: 'category', name: '岗位名称', // 在
2021-11-13 20:09:06
1115
原创 JavaScript获取数组中最大、最小值
JavaScript获取数组中最大、最小值Math.min()虽然能取到最小值,但是不支持数组。所以可以用Math.min.apply(null,arr)来获取数组中的最小值。var arr=[1,2,3,4,5,6,10,7,9,11,20,19];alert(Math.min.apply(null,arr));//获取数组中最小值alert(Math.max.apply(null,arr));//获取数组中的最大值详细信息:https://www.cnblogs.com/my12-28/p/
2021-11-13 19:41:51
638
原创 Flask框架学习笔记
pip list 查看安装了哪些库pip freeze > 文件名.txt 将已经安装的第三方库导入到本地文件(项目路径中)pip install -r 文件名 循环遍历导出的依赖库标准的flask目录static:下面存放静态资源templates: 用于存放要选渲染的资源,一般为html (路径在flask程序的同级目录中) (render_template)flask的helloworld快速上手分析:首先导入依赖初始化flask返回给变量app使用@ap
2021-11-11 10:49:38
2367
原创 Vue中使用echarts,json数据
Vue中使用echarts,json数据初始化vue项目vue init webpack 项目名安装依赖npm install echarts -Snpm install vue-axios -S导入依赖(在HelloWorld.vue中使用)import * as echarts from “echarts” // ehcarts5.x使用这种import axios from “axios”在static下创建目录目录结构如下;div1文件(折线图)示例
2021-11-03 11:37:48
2270
原创 srpingboot 跨域问题
srpingboot 跨域问题package com.jing.config;import org.springframework.context.annotation.Configuration;import org.springframework.web.servlet.config.annotation.CorsRegistry;import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;@Confi
2021-04-24 18:47:39
107
原创 springboot整合shiro连接数据库
springboot整合shiro连接数据库连接数据库认证实现注册和登录,注册保存到mysql密码进行md5加密和随机盐,登录连接数据库pom.xml<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</arti
2021-04-11 22:02:31
359
原创 shiro整合springboot(不连接数据库)
shiro整合springboot(不连接数据库)所有请求资源交给shiro的filter(ShiroFilterFactoryBean )访问公共资源时不需要进行认证和授权直接放行访问受限资源时filter调用SecurityManager SecurityManager 调用Realm查询数据库获取资源任何用户请求都可以访问公共资源,访问受限资源时认证成功后进行授权,访问受限资源要看是否有权限,有则访问无则拒绝。pom.xml<dependencies> &
2021-04-11 21:13:07
193
原创 shiro简单实现认证+授权(不连数据库)
shiro实现认证+授权简单实现(不连数据库)自定义realm继承AuthorizingRealm实现其中两个方法doGetAuthorizationInfo(授权),doGetAuthenticationInfo(认证),在方法中编写业务成需求返回值是SimpleAuthenticationInfo simpleAuthorizationInfo Simple**(授权,认证)package com.jing.md5;import org.apache.shiro.authc.Aut
2021-04-08 23:13:44
221
原创 shiro使用Md5加密
shiro使用Md5加密视频参考:https://www.bilibili.com/video/BV1uz4y197Zm?p=8shiro实现md5加密package com.jing.md5;import org.apache.shiro.crypto.hash.Md5Hash;public class TestMd5 { public static void main(String[] args) { // 创建md5,使用Md5Hash构造方法进行加密
2021-04-07 23:30:14
1483
1
原创 shiro-自定义Realm
自定义Realm若想自定义realm只需要实现AuthorizingRealm这个类这个AuthorizingRealm是个抽象类,其中它自己有doGetAuthorizationInfo(授权)这个方法,它继承的AuthentcatingRealm中有doGetAuthenticationInfo(认证)这个方法package com.jing.realm;import org.apache.shiro.authc.AuthenticationException;import org.apa
2021-04-07 00:58:01
200
1
原创 初识shiro
初识shiroshiro官网 https://shiro.apache.org/官方文档 https://shiro.apache.org/reference.html学习视频 https://www.bilibili.com/video/BV1uz4y197Zmshiro架构图快速上手案例创建个maven项目pom.xml<dependency> <groupId>org.apache.shiro</groupId> <artif
2021-04-07 00:44:09
174
4
原创 springboot-jsr303校验
jsr-303校验导入maven依赖。<!--jsr303 校验--><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId></dependency>@Validated:开启数据校验功能@AllArgsConstructo
2020-11-14 17:46:40
149
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人