ICode9

精准搜索请尝试: 精确搜索
  • PowerDesigner中使用name生成comment2021-12-08 12:03:38

    PowerDesigner生成数据库脚本时,code转换为数据库中表名及字段,如果将将PDM中的name(一般为中文名称)转换为comment,则生成数据库备注栏显示name(中文名称),方便程序员的使用。将name转化为comment,可使用以下脚本批量完成。 Option Explicit ValidationMode = True InteractiveMo

  • python 文本分词后计算n-gram2021-12-07 22:31:07

    直接上代码 def n_grams(s, n): # 计算分词后的n-gram s:list tokens n: gram num result = [] for i in range(len(s)-n+1): res = "".join(s[i:i+n]) result.append(res) return result for each in data[:10].iterrows(): item =

  • python笔记精华一 1-30课2021-12-07 19:00:47

    笔记纲要 BIF 就是 Built-in Functions,内置函数。为了方便程序员快速编写脚本程序(脚本就是要编程速度快快快!!!),Python 提供了非常丰富的内置函数,我们只需要直接调用即可,例如 print() 的功能是“打印到屏幕”,input() 的作用是接收用户输入。在 Python 或 IDLE 中,输入dir(builtin

  • 【java细节】for循环,for-each(增强for循环),forEach以及Iterator迭代器对比2021-12-03 21:02:14

    【java细节】for循环,for-each(增强for循环),forEach以及Iterator迭代器对比 一、背景和结论 背景是这样的,产品开发过程中,有个字体json文件需要截取的接口开发,因为涉及到多层的json内容遍历,于是就和循环过不去了。这篇文章主要讨论java中for循环,for-each(增强for循环),forEach以及It

  • How to read a paper(Three-step method to read a paper)2021-11-30 17:33:28

    (1) Understand the structure of the paper   Generally, a paper consists of the following seven parts: 1. Title, 2. Author, 3. Abstract, 4. Introduction, 5. Related Work and Proposed Method, 6. Experiments, 7. Conclusion. (2) Read the paper for the first t

  • Juicer 轻量级javascript模板引擎2021-11-30 13:03:01

    Juicer 轻量级javascript模板引擎 juicer是一个javascript轻量级模板引擎。 使用方法 编译模板并根据数据立即渲染出结果   1 juicer(tpl, data); 仅编译模板暂不渲染,返回一个可重用的编译后的函数 1 var compiled_tpl = juicer(tpl); 根据给定的数据对之前编译好的模板进

  • stl使用中的经验(十四)--ptr_fun、mem_fun、mem_fun_ref2021-11-28 20:01:01

    首先我们看个例子。 #include <iostream> #include <vector> #include <algorithm> #include <iterator> using namespace std; class Widget{ public: Widget(int a) : m_a(a) { } int value() const { return m_a; } bool test() { retu

  • leetcode322.零钱兑换(中等)2021-11-24 21:34:47

    思路一:DP,类比完全背包 dp[i][j]表示前i个硬币 金额j 所需要的最少硬币数 dp[i][j]=min(dp[i-1][j],dp[i][j-coins[i]]+1); 边界:由于是取最小值,所以dp[-1][1…amount]设置为INT_MAX-1(防溢出) 金额0时需要0个硬币,也就是dp[-1][0]=0(有一个不为正无穷)!!! class Solution { publi

  • 【CorelDraw VBA 005例】 列出文档中的字体2021-11-24 09:00:54

    Sub ListDocumentFonts() '##列出文档中的字体 Dim p As Page Dim s As Shape Dim col As New Collection Dim sFontList As String Dim vFont As Variant For Each p In ActiveDocument.Pages For Each s In p.FindShapes(, cdrTextShape)

  • 计算机算法设计与分析 第四章 贪心算法 作业题2021-11-18 21:58:00

    文章目录 一、判断题1-11-21-31-41-5 二、单选题2-1 三、编程题7-1 汽车加油问题 (20 分)题目描述基本思路参考代码 7-3 排队接水 (15 分)题目描述基本思路参考代码 7-10 选点问题 (15 分)题目描述基本思路参考代码 7-4 程序存储问题 (90 分)题目描述基本思路参考代码

  • Just a Hook2021-11-17 21:03:19

    原题链接:https://acm.dingbacode.com/showproblem.php?pid=1698 Problem Description: In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the sa

  • A - Domino Disaster2021-11-14 11:58:00

     1. Problem Alice has a grid with 22 rows and nn columns. She fully covers the grid using nn dominoes of size 1 \times 21×2 — Alice may place them vertically or horizontally, and each cell should be covered by exactly one domino. Now, she decided

  • Python版的迷你程序——文本单词的统计2021-11-13 19:59:59

            昨天的代码里其实已经有了,一行Line24代码就解决了(Python版的迷你程序——文本内容的简单统计分析),今天来看看字典的使用,注意列表中的元素什么情况下才成为字典的键:  import re import sys filename = sys.argv[1] # 以不区分大小写的单词方式产生一个列表 list_o

  • 1009 Product of Polynomials (25 分)(模拟)2021-11-04 22:31:06

    This time, you are supposed to find A*B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial: K N1 aN1 N2 aN2 … NK aNK, where K i

  • 2021ICPC江西省赛 H Hearthstone So Easy2021-11-03 22:59:57

    H. Hearthstone So Easy 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K Hearthstone is a turn-based card game. The game flow of each round is: Player 1 draws card ⇒ player 1 plays cards ⇒ player 2 draws card ⇒ player 2 plays cards. We

  • 工作中关于this指向的一些问题2021-11-03 11:33:10

    普通函数调用 对于each函数传递一个参数是时  两个this都指向当前元素对象    // const that = this; $("input[name='ksxl']").each(function (index) { //遍历每个单选框 console.log(this); if ($(this).prop('checked')) { // co

  • 1109 Group Photo (25 分)2021-10-31 16:32:04

    1. 题目 Formation is very important when taking a group photo. Given the rules of forming K rows with N people as the following: The number of people in each row must be N/K (round down to the nearest integer), with all the extra people (if any) standing i

  • leetcode5916.转化数字的最小运算数(中等,周赛)2021-10-31 13:58:11

    思路:BFS 细节: 每次把到达的数字放入队列,按照nums.size() × 3进行扩散,扩散到的数字下次扩散的时候就不用继续放入队列了。 总结: 1.遇到从一个值,到另外一个值最小操作次数的题目,要想到BFS 2.难点在于判断广搜的终止条件:这道题是超过1000!!! class Solution { public: int

  • 1054 The Dominant Color (20 分)2021-10-29 13:03:17

    1. 题目 Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called the dominant color. A strictly dominant color tak

  • 1124 Raffle for Weibo Followers (20 分)2021-10-28 22:34:22

    1. 题目 John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers on Weibo -- that is, he would select winners from every N followers who forwarded his post, and give away gifts. Now you are supposed to help him gen

  • PHP 访问数组中的元素2021-10-26 22:32:16

    PHP 访问数组中的元素 1. 访问数组中的元素2. 改变元素内容3. 用 print_r() 函数输出整个数组4. 统计数组中元素的个数5. 逐个访问数组中的元素6. each() 函数结束语 1. 访问数组中的元素 数组元素和访问方法与字符串中单个字符的访问访问方法一样: <?php $ble=array("苹

  • pta甲级1002 A+B for Polynomials(AC)2021-10-21 23:00:50

    This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial: K N1​ aN1​​ N2​ aN2​

  • 9.模板引擎2021-10-16 17:00:17

    介绍 art-template 是一个简约、超快的模板引擎。 它采用作用域预声明的技术来优化模板渲染速度,从而获得接近 JavaScript 极限的运行性能,并且同时支持 NodeJS 和浏览器。在线速度测试。 通过跨域/ajax获取到数据后通过模板引擎方便遍历成html片段 安装 1.npm npm install art-te

  • DataWorks功能实践速览 05——循环与遍历2021-10-14 13:01:44

    简介:DataWorks功能实践系列,帮助您解析业务实现过程中的痛点,提高业务功能使用效率!通过往期的介绍,您已经了解到在DataWorks上进行任务运行的最关键的几个知识点,其中上期参数透传中为您介绍了可以将上游节点参数透传到下游节点的特殊节点——赋值节点,结合赋值节点和其他节点,可

  • PAT A10092021-10-05 22:07:18

    1009 Product of Polynomials (25 分) This time, you are supposed to find A×B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomia

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

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

ICode9版权所有