each

BK: Data mining, Chapter 2 - getting to know your data

佐手、 提交于 2020-02-11 03:13:54
Why: real-world data are typically noisy, enormous in volume, and may originate from a hodgepodge of heterogeneous sources. mean; median; mode(most common value); distribution; Knowing such basic statistics regarding each attribute makes it easier to fill in missing values, smooth noisy values, and spot outliers during data preprocessing. 来源: https://www.cnblogs.com/dulun/p/12293674.html

PowerDesigner 把Comment/name 互转

岁酱吖の 提交于 2020-02-11 01:11:53
转载:https://www.cnblogs.com/cxd4321/archive/2009/03/07/1405475.html 在使用PowerDesigner对数据库进行概念模型和物理模型设计时,一般在NAME或Comment中写中文,在Code中写英文。Name用来显 示,Code在代码中使用,但Comment中的文字会保存到数据库Table或Column的Comment中,当Name已经存在的时候,再写一次 Comment很麻烦,可以使用以下代码来解决这个问题: 代码一: 将Name中的字符COPY至Comment中 Option Explicit ValidationMode = True InteractiveMode = im_Batch Dim mdl ' the current model ' get the current active model Set mdl = ActiveModel If (mdl Is Nothing) Then MsgBox "There is no current Model " ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then MsgBox "The current model is not an Physical Data model. " Else ProcessFolder

powerDesigner 把name项添加到注释(comment),完美方案!

拈花ヽ惹草 提交于 2020-02-10 23:58:21
第一次写博客,分享一点经验吧,平时大家用powerDesigner的时候,pd是不会把name项默认添加到comment的,所以生成的数据库表里面也没有中文字段的注释. 我在网上查了一下.有解决方案了. 以下是网上的解决方案,我把它完善了一下. '使用方法使用方法 'PowerDesigner->Tools->Execute Commands->Edit/Run Scripts 可以保存该脚本为:name2comment.vbs ' 把pd中那么name想自动添加到comment里面 ' 如果comment为空,则填入name;如果不为空,则保留不变,这样可以避免已有的注释丢失. Option Explicit ValidationMode = True InteractiveMode = im_Batch Dim mdl ' the current model ' get the current active model Set mdl = ActiveModel If (mdl Is Nothing ) Then MsgBox " There is no current Model " ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then MsgBox " The current model is not an Physical Data

PowerDesigner中NAME和COMMENT的互相转换,需要执行语句

谁说我不能喝 提交于 2020-02-10 23:56:44
原文: http://www.cnblogs.com/yelaiju/archive/2013/04/26/3044828.html 由于PDM 的表中 Name 会默认=Code 所以很不方便, 所以需要将 StereoType 显示到表的外面来 打开[工具]->[显示属性](英文:Display Preferences) ->Content->Table->右边面板Columns框中 勾选: StereoType ,这样再在 StereoType中填入code字段相同内容就会显示在图形界面上了 使用说明: 在【Tools】-【Execute Commands】-【Edit/Run Script】 下。输入下面你要选择的语句即可,也可以保存起来,以便下次使用,后缀为.vbs。 需要注意的问题是:运行语句时必须在Module模式下,如果是导出报表时执行会出现错误提示。 1.Name转到Comment注释字段。一般情况下只填写NAME,COMMENT可以运行语句自动生成。 将该语句保存为name2comment.vbs 原地址的代码有一些格式上的错误,现已修正。 ' 把pd中那么name想自动添加到comment里面 ' 如果comment为空,则填入name;如果不为空,则保留不变,这样可以避免已有的注释丢失. Option Explicit ValidationMode =

PowerDesigner使用方法小结

这一生的挚爱 提交于 2020-02-10 23:55:49
PowerDesigner多用来进行数据库模型设计,具有SQL语句自动生成等功能。当然,也有不少缺点,比如团队分享。 一、设置PowerDesigner模型视图中数据表显示列 1、Tools-Display Preference… 2、窗口左边Category中General Settings下选择Table 3、窗口右边Advanced… 4、窗口左边选择Columns 5、窗口右边List columns中,选择要显示的列 二、设置PowerDesigner设计表时,自动将name列值中的一部分复制到code列 1、把name/code自动复制功能打开。默认是打开的。 Tool-Genneral-Options Dialog-Name to Code mirroring 2、Tools->Model Options....->Naming Convention 3、选中Name,并勾选Enable name/code conversions. 4、选择Name To Code 粘贴脚本代码 脚本1: .set_value(_First, true, new) .foreach_part(%Name%, "'#'") .if (%_First%) .delete(%CurrentPart%) .enddelete .set_value(_First, false, update)

Codeforces Round #501 (Div. 3)(ABCDE)

本秂侑毒 提交于 2020-02-10 21:02:07
A. Points in Segments time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a set of n n segments on the axis O x Ox, each segment has integer endpoints between 1 1 and m m inclusive. Segments may intersect, overlap or even coincide with each other. Each segment is characterized by two integers l i li and r i ri ( 1 ≤ l i ≤ r i ≤ m 1≤li≤ri≤m) — coordinates of the left and of the right endpoints. Consider all integer points between 1 1 and m m inclusive. Your task is to print all such points that don't belong to any segment.

stl_list复习

心不动则不痛 提交于 2020-02-10 20:34:08
#include <iostream> #include <list> #include <algorithm> using namespace std; //底层结构是双向链表 struct Node{ int a; char c; }; struct Node1{ //重点中的重点 int a; char c; Node1(int d,char e) { a=d; c=e; } bool operator==(const Node1& i) { if(i.a==this->a&&i.c==this->c) { return true; } return false; } bool operator<(const Node1& f) { if(this->a<f.a) //if(this->a>f.a) //可以改变> , < return true; return false; } }; void fun(Node d) { cout << d.a << " " << d.c << "\n"; } void fun1(Node1 d) { cout << d.a << " " << d.c << "\n"; } void listdefine() { list<Node> ls; list<Node> l(5); Node no={12,'a'}; list<Node> l1

JavaScript 多级联动浮动菜单

心不动则不痛 提交于 2020-02-09 02:55:08
请到这里看09-08-18更新版本 类似的多级浮动菜单网上也很多实例,但大部分都是只针对一种情况或不够灵活,简单说就是做死了的。 所以我就想到做一个能够自定义菜单的,有更多功能的多级浮动菜单。 而其中的关键就是怎么根据自定义的菜单结构来生成新菜单, 关键中的难点就是怎么得到下级菜单结构和容器对象的使用。 理想的做法是每次有下级菜单时,从对象直接取得下级菜单结构,放到容器对象中, 并且容器能重用,而不是每次都重新生成。 但想了很久也想不到适合的做法,直到做了 多级联动下拉菜单 终于得到了灵感。 放弃了直接取得下级菜单结构,而是每次都从原来的菜单结构中获取当前需要的下级菜单结构。 容器对象也不是自动生成,而是由用户先定义好(后来也做到能自动生成了)。 放下了这些包袱后,后面的开发就顺畅了。 特点: 1.根据自定义菜单结构生成菜单; 2.多级联动功能; 3.自定义浮动位置(上下左右); 4.自定义延迟效果; 5.js控制编辑菜单; 6.可根据需要自动生产容器对象; 效果: //--> */ /*--> */ //--> 程序原理 程序是根据传统浮动菜单扩展而来,这里说一下几个比较关键或有用的地方: 【延时功能】 这个很多人 都懂,就是设个setTimeout计时器,这里有两个计时器,分别是容器计时器和菜单计时器。 容器计时器的作用是鼠标移到容器外面时隐藏容器

python jieba分词

假装没事ソ 提交于 2020-02-08 20:30:35
#!/usr/bin/python # -*- coding: UTF-8 -*- import jieba import jieba.analyse import pymysql id = 1 # shoes.txt中的标签库 tag_ku = [] #精确模式分成的tag tag = [] # 打开标签库 f = open('D:\spider\shoes.txt','r',encoding='utf-8') f.seek(0) #从标签库中读取所有数据,并将每行内容作为一个元素存在data列表里 data = f.read().splitlines() # 将每行第一个词条即标签读出来 for tag_line in data: tag_ku.append(tag_line.split(' ')[0]) # jiebashe'zhiz自定义词库 jieba.set_dictionary('./shoes.txt') # 连接数据库 coon = pymysql.connect(user='root', password='root', host='127.0.0.1', port=3306, database='bishe_shoes',use_unicode=True, charset="utf8") cursor = coon.cursor() #

[LeetCode 1177] Can Make Palindrome from Substring

元气小坏坏 提交于 2020-02-08 04:32:51
Given a string s , we make queries on substrings of s . For each query queries[i] = [left, right, k] , we may rearrange the substring s[left], ..., s[right] , and then choose up to k of them to replace with any lowercase English letter. If the substring is possible to be a palindrome string after the operations above, the result of the query is true . Otherwise, the result is false . Return an array answer[] , where answer[i] is the result of the i -th query queries[i] . Note that: Each letter is counted individually for replacement so if for example s[left..right] = "aaa" , and k = 2 , we can