column

注解开发中的@Results注解使用

限于喜欢 提交于 2019-12-04 18:20:13
package com.hope.dao;import com.hope.domain.User;import com.sun.xml.internal.bind.v2.model.core.ID;import org.apache.ibatis.annotations.*;import java.util.List;/** * @author newcityman * @date 2019/11/15 - 22:59 */public interface IUserDao { /** * 查询所有用户的信息 * @return */ @Select(value = "select * from user") @Results(id = "userMap",value = { @Result(id = true,column ="id" ,property ="userId" ), @Result(column = "username" ,property = "userName"), @Result(column = "sex",property = "userSex"), @Result(column = "address",property = "userAddress"), @Result(column = "birthday",property =

DBGrid 单击弹出PickList

笑着哭i 提交于 2019-12-04 00:16:50
type myGrid = class(TCustomGrid) end; type myInplaceEditList = class(TInplaceEditList) end; procedure TDemoForm.gdDemoGridCellClick(Column: TColumn); begin Column.Field.FocusControl; Column.DropDownRows := 20; myInplaceEditList(myGrid(grdColorSize).InplaceEditor).DropDown; end; 来源: https://www.cnblogs.com/jijm123/p/11824945.html

MyBatis嵌套对象中的List查询

余生长醉 提交于 2019-12-03 22:34:43
<resultMap id="myDept" type="com.stayreal.mybatis.Department"> <id column="did" property="id"/> <result column="dept_name" property="name"/> <!-- collection定义关联集合类型的属性封装规则 offType:指定集合中的元素类型 --> <collection property="employees" ofType="com.stayreal.mybatis.Employee"> <id column="eid" property="id"/> <result column="last_name" property="lastName"/> <result column="email" property="email"/> <result column="gender" property="gender"/> </collection> 来源: https://www.cnblogs.com/java-ty/p/11809879.html

来做几道算术题

倾然丶 夕夏残阳落幕 提交于 2019-12-03 21:07:30
学生时代最喜欢做算术题,寒暑假一天就能做完所有算术作业。 走上社会后充分利用每次超市大采购的机会,默算总价对账单。 特意用python开发了一个小应用程序,随时可以做几道算术题~~ import random import Tkinter as tk from tkMessageBox import * import datetime starttime = datetime.datetime.now() window=tk.Tk() window.title('来做几道算术题') window.geometry('800x600') for i in range(9): w1_i = random.randint(0, 99) w2_i = random.randint(0, 99) v1_i = tk.StringVar() v2_i = tk.StringVar() v3_i = tk.StringVar() v4_i = tk.StringVar() tk.Label(window,textvariable=v1_i,width=5).grid(row = 5+i, column = 1) v1_i.set(w1_i) tk.Label(window,textvariable=v2_i,width=5).grid(row = 5+i, column = 2) v2_i

[20191106]善用column格式化输出.txt

戏子无情 提交于 2019-12-03 16:46:36
[20191106]善用column格式化输出.txt # man column DESCRIPTION The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or, by default, from the standard input. Empty lines are ignored. -t Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with the characters supplied using the -s option. Useful for pretty-printing displays. --//可以利用格式化输出获得好的显示效果,例子如下: $ mount /dev/sda1 on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev

django admin 中文报错incorrect string value解决方案

别等时光非礼了梦想. 提交于 2019-12-03 10:02:33
对于错误" Incorrect string value: '\xE6\xA2\xB5\xE8\x92\x82...'for column 'object_repr' at row 1 解决方法是设置django_admin_log表的object_repr一项使用utf8_unicode_ci; 对于错误" Incorrect string value: '\xE6\xA2\xB5\xE8\x92\x82...'for column 'change_message' at row 1 “ 解决方法是设置django_admin_log表的change_message一项使用utf8_unicode_ci; 具体mysql语句为:mysql> ALTER TABLE django_admin_log MODIFY COLUMN object_repr VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; mysql > ALTER TABLE django_admin_log MODIFY COLUMN change_message VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; 对应修改上面的表名和字段即可 来源:

forcing the columns of a matrix within different limits

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a matrix named l having size 20X3. What I wanted to do was this : Suppose I have this limits: l1_max=20; l1_min=0.5; l2_max=20; l2_min=0.5; mu_max=20; mu_min=0.5; I wanted to force all the elements of the matrix l within the limits. The values of 1st column within l1_max & l1_min. The values of 2nd column within l2_max & l2_min. The values of 3rd column within mu_max & mu_min. What I did was like this: for k=1:20 if l(k,1)>l1_max l(k,1) = l1_max; elseif l(k,1)<l1_min l(k,1) = l1_min; end if l(k,2)>l2_max l(k,2) = l2_max; elseif l(k,2)

Update only one column (next column) if previous column is empty

匿名 (未验证) 提交于 2019-12-03 08:56:10
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have created table and inserted values as below. create table mytable (id INT, col1 INT, col2 INT, col3 INT); insert into mytable values (1,1,1,NULL), (2,1,NULL,NULL); What I want to do is update col2 if col1 is not null, update col3 if col2 is not null and so on... BUT only one column to update. Consider I want to update data for id=2, then only col2 should be updated and not col2, col3 as both are null. When I tried with below query, then all columns get updated. update myTable set col1 = ( IF (col1 is null, 9, col1) ), col2 = ( IF (col2

Pandas 列索引操作

我是研究僧i 提交于 2019-12-03 08:41:00
import pandas as pd df = pd. DataFrame ({ "Column A" :[ 1 , 2 , 3 ], "Column B" :[ 3 , 4 , 5 ] }) df Column A Column B 0 1 1 2 2 3 更改列名 更改指定列名 df.rename(columns={ 'Column A' : 'Column C' }, inplace = True ) # 重新命名数据框 df Column C Column B 0 1 1 2 2 3 更改所有列名 df .columns =[ "Column D" , "Column E" ] # 重新命名数据框 df Column D Column E 0 1 1 2 2 3 使用DataFrame.str.方法 df .columns =df .columns .str .lower () # 可以用str方法来修改columns的值 df column d column e 0 1 1 2 2 3 更改列顺序 更改数据框列顺序 df=df .reindex _axis([ "Column E" , "Column D" ],axis= 1 ) #设置数据框的列殊勋 df column e column d 0 3 1 4 2 5 更改保存列顺序 df .to _csv( "C:

ORA-01747: invalid user.table.column, table.column, or column specification

匿名 (未验证) 提交于 2019-12-03 08:39:56
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Get the above error when the execute immediate is called in a loop Update CustomersPriceGroups set 1AO00=:disc Where cuno=:cuno Parameters: disc=66 cuno=000974 Update CustomersPriceGroups set 1AP00=:disc Where cuno=:cuno Parameters: disc=70.5 cuno=000974 Update CustomersPriceGroups set 1AQ00=:disc Where cuno=:cuno Parameters: disc=66 cuno=000974 Update CustomersPriceGroups set 1ZA00=:disc Where cuno=:cuno Parameters: disc=60 cuno=000974 What does this mean ? Here is the code fragment c:=PriceWorx.frcPriceListCustomers('020','221'); LOOP