ICode9

精准搜索请尝试: 精确搜索
  • python通达信,显示K线图2021-09-09 17:03:48

    import numpy as np from matplotlib import pyplot as plt # 显示K线 def show_k_lines(df) -> None: # 判断收盘价与开盘价 确定蜡烛颜色 colors_bool = df['Close'] >= df['Open'] colors = np.zeros(colors_bool.size, dtype='U5') c

  • Android ios渐变实现2021-09-05 20:59:44

    Android 1.最简单是使用xml实现渐变 2.使用LinearGradient LinearGradient一般使用在自定义view上 int [] colors = {Color.BLACK,Color.RED, Color.GREEN}; float[] position = {0f, 0.3f, 1.0f}; LinearGradient linearGradient = new LinearGradient(0,0,width,0,color

  • PAT (Advanced Level) 1045 Favorite Color Stripe(LCS,非降序)2021-08-22 13:04:10

    1045 Favorite Color Stripe (30 分)   Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off those unwanted pieces and sewing the remaining parts together t

  • oeasy教您玩转vim - 23 - 配置文件2021-08-21 06:32:21

    配置文件 回忆上节课内容

  • Flutter_03_画一个按钮和一根线2021-08-06 01:00:06

    import 'package:flutter/material.dart'; /// 一个按钮和一根线 class ButtonAndLine extends StatelessWidget { const ButtonAndLine({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBa

  • Python 单元格背景色设置2021-08-01 16:32:38

    单元格背景色设置 from openpyxl import load_workbook from openpyxl.styles import PatternFill, colors excel_address = r"E:\Coding\E_PythonWriting\Excel\openpyxl示例_4.xlsx" wb = load_workbook(excel_address) sht = wb.worksheets[0] sht["A1"]

  • 水平布局组件2021-08-01 12:34:00

          import 'package:flutter/material.dart'; import 'res/listData.dart'; void main() {   runApp(MyApp()); } class MyApp extends StatelessWidget {   @override   Widget build(BuildContext context) {     return MaterialApp(     

  • 垂直布局2021-08-01 12:31:45

        import 'package:flutter/material.dart'; import 'res/listData.dart'; void main() {   runApp(MyApp()); } class MyApp extends StatelessWidget {   @override   Widget build(BuildContext context) {     return MaterialApp(      

  • 水平列表2021-07-31 21:01:55

              import 'package:flutter/material.dart'; void main() {   runApp(MyApp()); } class MyApp extends StatelessWidget {   @override   Widget build(BuildContext context) {     return MaterialApp(         home: Scaffold

  • [Flutter-30] 子控件之间的相对布局012021-07-27 17:00:07

    子控件之间的相对布局 自定义ListView + separated 1. 相对间距设置 SizedBox(width: 20) // 设置间距为20 Spacer(), // 尽可能大的间距 mainAxisAlignment 设置对齐方式控制彼此间距 如果不用行的话,还可以使用Wrap并指定spacing 同样是使用Wrap,设置spaceA

  • Flutter Table的用法2021-07-21 21:30:18

     Flutter Table的用法 Widget build(BuildContext context) { return Table( border: TableBorder.all(), columnWidths: const <int, TableColumnWidth>{ 0: IntrinsicColumnWidth(), 1: FlexColumnWidth(), 2: FixedColumnWidth(64), },

  • [Flutter-23] 状态栏修改背景色2021-07-20 13:33:03

    状态栏修改背景色 AppBar中brightness 设置 brightness: Brightness.dark, // 设置状态栏的颜色,好像取反设置. class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: App

  • 《图解Vue3.0》- 第10节 组件注册与使用2021-07-11 23:00:51

    组件是vue中最推崇的,也是最强大的功能之一,就是为了提高代码重用性,减少重复性的开发。那么vue组件拥有哪些功能如何使用呢?以下是常用的功能点,也是最基础的。 数据管理组件其他属性(methods,watch,computed)生命周期组件的复用和组合组件间通信动态组件和异步组件 接下来的篇幅里

  • Leetcode 75:Sort Colors2021-07-11 09:52:09

    Leetcode 75:Sort Colors Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white, and blue. We will use the integers 0, 1, and 2 to represe

  • JFChart自定义柱体颜色(可自定义每个柱体为不同的颜色)2021-06-28 10:02:21

    一、实现:添加Renderer.java,继承BarRenderer.java     package com.gllic.workweixin.mqdto;import java.awt.*;/** * @program: workweixin-mobile-api * @ClassName Renderer * @description: 初始化JFreeChart柱体颜色 * @author: Marlo * @create: 2021-06-24 15:04 * @Versi

  • Flutter | Key的原理和使用2021-06-21 20:58:52

    概述 在几乎所有的 widget 中,都有一个参数 key ,那么这个 key 的作用是什么,在什么时候才需要使用到 key ? 没有 key 会出现什么问题? 我们直接看一个计数器的例子: class Box extends StatefulWidget { final Color color; Box(this.color); @override _BoxState crea

  • [Java]使用ArrayList类来把54张扑克牌发给3位玩家各17张,剩下3张是底牌2021-06-19 13:58:19

    import java.util.ArrayList; import java.util.Collections; public class Demo { public static void main(String[] args) { //扑克牌的花色 ArrayList<String> colors = new ArrayList<>(); colors.add("♦"); color

  • [flutter-19] Layout (多布局)2021-06-10 14:36:14

    1. Layout (多布局) 多布局组件常见的有: Row Column Stack 在使用过程中,也搭配学习: Expand(扩张组件) Positioned(只在Stack中使用) 1.1 Flex 组件 我们即将学习的Row、Column组件都是继承自Alex组件 Flex组件和Row、Column的区别就是多了一个direction 当direction = Axis.hor

  • flutter 主要weight学习(materialapp scaffold container text)2021-06-07 23:34:44

    flutter目录结构 其中有android和ios的建立目录,这里面可以先不关心,重要的是lib文件夹,里面有项目入口main.dart。还需要注意的是配置文件pubspec.yaml,里面的依赖项dependencies中可以写想要的依赖包,我们可以pubget来下载到本地。 接下来是写代码的事 main.dart的函数入口 import '

  • 动态规划 ---- 最长公共子序列(Longest Common Subsequence, LCS)2021-05-28 15:02:02

    分析:      完整代码: // 最长公共子序列 #include <stdio.h> #include <algorithm> using namespace std; const int N = 100; char A[N], B[N]; int dp[N][N]; int main() { freopen("in.txt", "r", stdin); int n; gets(A + 1);

  • 动态规划 ---- 最长不下降子序列(Longest Increasing Sequence, LIS)2021-05-28 15:01:50

    分析:     完整 代码: 1 // 最长不下降子序列 2 #include <stdio.h> 3 #include <algorithm> 4 using namespace std; 5 6 const int N = 100; 7 int A[N], dp[N]; 8 9 int main() 10 { 11 freopen("in.txt", "r", stdin); 12 int n;

  • 【unity2D】Light2D-学习记录3-代码控制光照颜色的分段连续渐变2021-04-29 19:04:44

    目标 在Light2D-学习记录2中的颜色渐变存在局限,它不能分段变化。现在着手解决颜色不能分段变化的问题。 前言 Light2D-学习记录2中的颜色变化是一段式的,如下图箭头所示 而当我们需要颜色分2段连续变化时,它应当这样变化 现在来解决“颜色分N段连续变化”的问题。 代码相关 using

  • 大乐透数据分析2021-04-23 18:01:41

    数据爬取 导包 import requests from lxml import etree import csv 爬取信息 def get_info(url): headers = { 'UserAgent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36'

  • python将图片转为矢量图2021-04-22 17:54:22

    import numpy as npimport matplotlib.pyplot as pltimport cv2 fig, ax = plt.subplots()plt.figure(1)image=cv2.imread("2.jpg")# you can specify the marker size two ways directly:# 这样一个一个像素太慢了故而要将同样颜色的坐标进行分类处理color_cl

  • python基础--7.简单的if判断2021-04-19 23:31:43

    ''' and 并且 or 或者 ''' colors = ['red','blue','black','green'] for color in colors: if color == 'black': print('black') else: print('not black') out: n

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有