line

mybatis调用Oracle存储过程

ⅰ亾dé卋堺 提交于 2019-12-24 04:24:16
oracle procedure代码 CREATE OR REPLACE PROCEDURE dept_insert_proc(   v_deptno dept.deptno%TYPE,   v_dname dept.dname%TYPE,   v_loc dept.loc%TYPE,   v_result OUT NUMBER) IS   v_deptCount NUMBER; BEGIN   SELECT COUNT(1)INTO v_deptCount FROM dept WHERE deptno=v_deptno ;   IF v_deptCount>0 THEN     v_result:=-1;     DBMS_OUTPUT.put_line('部门已存在!');   ELSE     INSERT INTO dept(deptno,dname,loc)VALUES(v_deptno,v_dname,v_loc);     v_result:=0;   DBMS_OUTPUT.put_line('新部门添加成功!');   COMMIT; END IF; END; / dao接口 package com.jinlin.dao; import org.apache.ibatis.annotations.Param; import com.jinlin.entity

PHP script to grab entire line

本秂侑毒 提交于 2019-12-24 03:35:16
问题 Thank you for taking the time to read this and I will appreciate every single response no mater the quality of content. :) I'm trying to create a php script which searches a text file for specific text. A person types in the specific text within a HTML form and the php script should search for that specific text within the text file. The value of the input field of the HTML form is "username" and within the php document, the variable "$username" is the entered data, example shown below:

Drawing a line using a Mouse Motion Listener

*爱你&永不变心* 提交于 2019-12-24 02:52:22
问题 I'm new at using actionListener and mouselistner . I want to track the Mouse movements and connect the dots as I go. So it will be one continuous line. I am using the MouseMotionListener every time I move the mouse across the screen and get a new set of points. I am not using mousePressed or mouseReleased . Everytime I move the mouse, I can get every point of where my mouse's position is on my JPanel to show up on my results window, but in order to draw the line between two points, I'm not

Remove line from a text file after read

♀尐吖头ヾ 提交于 2019-12-24 02:35:12
问题 I have a text file named 1.txt which contains the following: 123456 011111 02222 03333 and I have created a python code which copy the first line to x number of folders to file number.txt then copy the second to x number of folders: progs = int(raw_input( "Folders Number : ")) with open('1.txt', 'r') as f: progs2 = f.read().splitlines() progs3 = int(raw_input( "Copy time for each line : ")) for i in xrange(progs): splis = int(math.ceil(float(progs)/len(progs3))) with open("{0}/number.txt"

How to make dashed grid lines intersect making crosshairs in gnuplot?

空扰寡人 提交于 2019-12-24 00:29:16
问题 I'm plotting some data and I want to use dashed grid lines. Any dashed grid line would suffice, but I prefer a "long dash, short dash, long dash" format. For example, given the following code set grid lc rgb "#000000" lt 1 dt (50, 25, 20, 25) plot x**2 I get this result But I would rather the grid lines intersection to happen always at the middle of two dashes, like this If I could make horizontal grid lines different to vertical grid lines and I could add some offset to each one, then I'd

How to set the line width to 0.5 pt in ggplot2?

百般思念 提交于 2019-12-24 00:27:38
问题 In ggplot2 , it is easy to use element_text with argument size=6 to set the font size to 6 pt (For text, size has a unit of pt). However, we cannot use element_line with argument size=0.5 to set the line width to 0.5 pt (For line, size has no unit). So how to solve this problem? In grid package, I meet with the similar question. The code is as following: library(grid) grid.rect(width=unit(5, "cm"), height=unit(5, "cm"), gp=gpar(lwd=unit(2, "cm"))) and the result is: Obviously, the line width

How do I add a line as a sprite in pygame?

拟墨画扇 提交于 2019-12-23 20:18:47
问题 I want to add a grid to my level that stays with the terrain and not the screen. The way I thought of doing it is to add all the lines that form the grid as sprites and move them with the terrain, but I can't figure out how to represent the line as an image. I tried to do this myself, but had no success. EDIT: Here's what I've tried class Grid(): def __init__(self): self.grid = pygame.Surface(size) self.grid.set_colorkey((0,0,0)) def draw(self): # DRAW TILE LINES -----------------------------

ZedGraph - How to make a horizontal line drag-able?

主宰稳场 提交于 2019-12-23 18:50:15
问题 I have some straight horizontal lines that I want the user be able to drag vertically. How would this be possible? I think the best parameter for line selection would be a fixed number of pixels near the line. So if mouse is +/- 2 pixels, I should change the mouse cursor and make the line drag-able.. I see the CurveItem class has properties IsSelectable and IsSelected. Will these have any function in solving this issue? I can’t really understand what they are for from reading the class

Replace a specific line in a file using Ruby

两盒软妹~` 提交于 2019-12-23 18:30:04
问题 I have a text file (a.txt) that looks like the following. open close open open close open I need to find a way to replace the 3rd line with "close". I did some search and most method involve searching for the line than replace it. Can't really do it here since I don't want to turn all the "open" to "close". Essentially (for this case) I'm looking for a write version of IO.readlines("./a.txt") [2]. 回答1: How about something like: lines = File.readlines('file') lines[2] = 'close' << $/ File.open

firefoxs renders thin grey lines at content box edges of a png at certain widths - why?

余生长醉 提交于 2019-12-23 17:29:05
问题 When firefox (3.0.6) renders a png image at certain widths (e.g., 50%), a thin grey line is shown along the left and top edges of the content box. The line disappears at other widths (e.g., 70%). Furthermore, the line doesn't seem to be present in the original image (using gimp to inspect the image). The phenomenon occurs in the absence of the CSS style markup -- in the HTML example below, the CSS is present to clarify where the grey lines are located -- it seems clear that the grey lines are