信号报告switchcase语句的应用Word文档下载推荐.docx
- 文档编号:5258459
- 上传时间:2023-05-04
- 格式:DOCX
- 页数:42
- 大小:26.30KB
信号报告switchcase语句的应用Word文档下载推荐.docx
《信号报告switchcase语句的应用Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《信号报告switchcase语句的应用Word文档下载推荐.docx(42页珍藏版)》请在冰点文库上搜索。
blogsystem"
Unabletoselectdatabase"
$data=addslashes(fread(fopen($form_data,"
r"
),filesize($form_data)));
mysqlPicture="
.$data;
//C语言获取当前执行文件所在的目录
$result=MYSQL_QUERY("
INSERTINTOccs_image(description,bin_data,filename,filesize,filetype)VALUES('
$form_description'
'
$data'
$form_data_name'
$form_data_size'
$form_data_type'
)"
$id=mysql_insert_id();
print"
p>
ThisfilehasthefollowingDatabaseID:
<
ahref='
get_data.php?
id=$id'
>
b>
$id<
/b>
/a>
"
//C语言实现双向链表(支持双向迭代)
//C语言实现线程池,支持动态拓展和销毁
MYSQL_CLOSE();
[文件]get_data.php
874B
(137)
php
if(isset($_GET['
id'
])){
$id=$_GET['
$connect=MYSQL_CONNECT("
$query="
selectbin_data,filetypefromccs_imagewhereid=$id"
$result=@MYSQL_QUERY($query);
$out=mysql_fetch_array($result);
$data=$out["
bin_data"
$type=$out["
filetype"
Header("
Content-type:
$type"
echo$data;
}
if(isset($_GET["
pic_id"
]))
{
$pic_id=$_GET['
pic_id'
$connect=MYSQL_CONNECT("
mysql_select_db("
$query="
select*fromccs_imagewhereid=$pic_id"
$result=@MYSQL_QUERY($query);
$out=mysql_fetch_array($result);
echo$out["
id"
[文件]new_file.php
1KB
(138)
$connect=MYSQL_CONNECT("
$sql="
select*fromccs_image"
$result=mysql_query($sql)ordie(mysql_error());
while($out=@mysql_fetch_array($result))
{
echo"
imgstyle='
style:
height:
100px;
width:
'
src='
id="
.$out['
]."
onmouseover='
see_big("
)'
/>
br/>
}
scriptsrc="
jquery.js"
/script>
scripttype="
text/javascript"
$(document).ready(function(){
});
functionsee_big(id)
varpic_id=id;
$.ajax({
type:
"
GET"
data:
pic_id="
+pic_id,
:
get_data.php"
dataType:
text'
success:
function(data)
$("
#big_picimg"
).attr("
src"
"
+data);
})
divid="
big_pic"
style="
500px;
600px;
position:
absolute;
margin-left:
200px;
margin-top:
-550px;
img/>
/div>
center>
formmethod="
post"
action="
form.php"
enctype="
multipart/form-data"
FileDescription:
inputtype="
text"
name="
form_description"
size="
40"
INPUTTYPE="
hidden"
MAX_FILE_SIZE"
value="
1000000"
br>
Filetoupload/storeindatabase:
file"
form_data"
submit"
/form>
/center>
[代码][Java]代码
packagecom.ejintai.test;
importjava.io.FileInputStream;
importjava.io.FileOutputStream;
importjava.io.IOException;
importjava.nio.channels.FileChannel;
publicclassFileCopy
publicstaticvoidmain(String[]args)throwsIOException{
Stringsourcefile="
E:
\\参考资料\\设计模式.pdf"
Stringtargetfile="
\\参考资料\\设计模式1.pdf"
copyfile(sourcefile,targetfile);
/**
*
*方法用途:
文件拷贝
*方法名:
copyfile
*返回值:
void
*参数:
@paramsourcefile源文件
@paramtargetfile目标文件
@throwsIOException
*/
privatestaticvoidcopyfile(Stringsourcefile,Stringtargetfile)throwsIOException{
FileChannelsourcefc=newFileInputStream(sourcefile).getChannel();
FileChanneltargetfc=newFileOutputStream(targetfile).getChannel();
sourcefc.transferTo(0,sourcefc.size(),targetfc);
//上面没有进行文件是否存在的判断和异常的处理
[代码]pythonsqlite3的常规使用
#Filename:
DBcon.py
importsqlite3
importtime
conn=sqlite3.connect(r'
D:
\Exercise\Python\DB\example.db'
)
c=conn.cursor()
c.execute("
Createtableifnotexistsstocks(datetext,transtext,symboltext,qtyreal,pricereal)"
flag=raw_input("
Doyouwannacleanthetable?
(y/n):
ifflag=='
y'
:
c.execute("
deletefromstocks"
Insertintostocksvalues('
+time.strftime('
%Y-%m-%d%H:
%m:
%S'
)+"
'
Buy'
Rhatd'
1000,23.14)"
connmit()
c.execute('
select*fromstocks'
res=c.fetchall()
count=0
printres
print'
-'
*60
forlineinres:
forfinline:
count=count+1
printcount,f,
Thereare%drecords!
%count
c.close()
conn.close()
[代码][Shell/批处理]代码
MACADDR="
52:
54:
$(ddif=/dev/urandomcount=12>
/dev/null|md5sum|sed'
s/^\(..\)\(..\)\(..\)\(..\).*$/\1:
\2:
\3:
\4/'
echo$MACADDR
[文件]PathUtil.java
3KB
(10)
packagesmoke;
importjava.util.LinkedList;
importjava.util.List;
importjava.util.Stack;
publicclassPathUtil{
publicstaticList<
Pos>
find(int[][]matrix){
intWIDTH=matrix.length;
intHEIGHT=matrix[0].length;
int[][]used=newint[WIDTH][HEIGHT];
TreeNoderoot=newTreeNode();
root.setFather(null);
root.setX(0);
root.setY(0);
TreeNodetail=buildTree(root,matrix,used);
if(tail!
=null)
Stack<
stack=newStack<
();
TreeNodecurrent=tail;
for(;
if(current==null){
break;
Pospos=newPos();
pos.x=current.getX();
pos.y=current.getY();
stack.push(pos);
current=current.getFather();
List<
list=newLinkedList<
while(stack.size()>
0)
list.add(stack.pop());
returnlist;
returnnull;
privatestaticTreeNodebuildTree(TreeNodecurrent,int[][]matrix,int[][]used)
intx=current.getX();
inty=current.getY();
if(x+1<
WIDTH&
&
y+1<
HEIGHT)
if(matrix[x+1][y+1]==0&
matrix[x+1][y]==0&
matrix[x][y+1]==0&
used[x+1][y+1]==0)
TreeNodenode=newTreeNode();
node.setFather(current);
node.setX(x+1);
node.setY(y+1);
current.getChildren().add(node);
used[x+1][y+1]=1;
if(x+1==WIDTH-1&
y+1==HEIGHT-1)
returnnode;
WIDTH)
if(matrix[x+1][y]==0&
used[x+1][y]==0)
node.setY(y);
used[x+1][y]=1;
y==HEIGHT-1)
if(y+1<
if(matrix[x][y+1]==0&
used[x][y+1]==0)
node.setX(x);
used[x][y+1]=1;
if(x==WIDTH-1&
if(y-1>
=0)
if(matrix[x][y-1]==0&
used[x][y-1]==0)
node.setY(y-1);
used[x][y-1]=1;
if(x-1>
if(matrix[x-1][y]==0&
used[x-1][y]==0)
node.setX(x-1);
used[x-1][y]=1;
=0&
y-1>
if(matrix[x-11][y-11]==0&
matrix[x-1][y]==0&
matrix[x][y-1]==0&
used[x-1][y-1]==0)
used[x-1][y-1]=1;
TreeNode>
list=current.getChildren();
if(list.size()<
for(TreeNodenode:
list)
TreeNodetail=buildTree(node,matrix,used);
returntail;
[文件]Pos.java
73B
(8)
publicclassPos{
publicintx;
publicinty;
[文件]TreeNode.java
626B
importjava.util.ArrayList;
publicclassTreeNode{
privateTreeNodefather;
privateList<
children;
privateintx;
privateinty;
publicTreeNode()
children=newArrayList<
publicvoidsetFather(TreeNodefather){
this.father=father;
publicTreeNodegetFather(){
returnfather;
publicList<
getChildren(){
returnchildren;
publicvoidsetX(intx){
this.x=x;
publicintgetX(){
returnx;
publicvoidsetY(inty){
this.y=y;
publicintgetY(){
returny;
[代码][PHP]代码
classUser{
staticfunctiongetInstance()
if(self:
$instance==NULL){//Ifinstanceisnotcreatedyet,willcreateit.
self:
$instance=newUser();
returnself:
$instance;
privatefunction__construct()
//Constructormethodasprivatesobymistakedevelopernotcrate
//secondobjectoftheUserclasswiththeuseofnewoperator
privatefunction__clone()
//Clonemethodasprivatesobymistakedevelopernotcrate
//secondobjectoftheUserclasswiththeuseofclone.
functionLog($str)
{
echo$str;
staticprivate$instance=NULL;
User:
getInstance()->
Log("
WelcomeUser"
[代码][JavaScript]代码
(function(){
vari=null;
functionk(){
returnFunction.prototype.call.apply(Array.prototype.slice,arguments)
functionl(a,b){
varc=k(arguments,2);
returnfunction(){
returnb.apply(a,c)
functionm(a,b){
varc=newn(b);
for(c.f=[a];
c.f.length;
){
vare=c,
d=c.f.shift();
e.g(d);
for(d=d.firstChild;
d;
d=d.nextSibling)d.nodeType==1&
e.f.push(d)
functionn(a){
this.g=a
functiono(a){
a.style.display="
functio
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 信号 报告 switchcase 语句 应用