system

水印文字 图片

≯℡__Kan透↙ 提交于 2020-04-07 14:56:42
@{ Layout = null; } <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>Index</title> <script src="~/Scripts/jquery-1.10.2.min.js"></script> <link href="~/Content/bootstrap.css" rel="stylesheet" /> </head> <body> <div> <form enctype="multipart/form-data" action="/show/Index" method="post"> <input id="File1" type="file" name="ExcFile" /><br /> <br /> 输入水印文字:<br /> <br /> <input id="Text1" type="text" name="Shuiyinwenzi" /><br /> <br /> <input id="Button1" type="submit" value="添加水印" onclick="shui()" /> <br /> <input id="Button1" type="button" value="导出图片"

C#线程暂停和继续操作

荒凉一梦 提交于 2020-04-07 10:39:56
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace XCZT { public partial class Form1 : Form { public Form1() { InitializeComponent(); Label.CheckForIllegalCrossThreadCalls = false; } ManualResetEvent ma = new ManualResetEvent(false); bool stop = false; //启动 private void button1_Click(object sender, EventArgs e) { Thread thread = new Thread(Runtime); stop = false; ma.Set();// 信号打开,不阻塞当前线程 thread.Start

IO

时光怂恿深爱的人放手 提交于 2020-04-07 08:39:32
当你发现自己最受欢迎的一篇blog其实大错特错时,这绝对不是一件让人愉悦的事。 《 IO - 同步,异步,阻塞,非阻塞 》是我在开始学习epoll和libevent的时候写的,主要的思路来自于文中的那篇 link 。写完之后发现很多人都很喜欢,我还是非常开心的,也说明这个问题确实困扰了很多人。随着学习的深入,渐渐的感觉原来的理解有些偏差,但是还是没引起自己的重视,觉着都是一些小错误,无伤大雅。直到有位博友问了一个问题,我重新查阅了一些更权威的资料,才发现原来的文章中有很大的理论错误。我不知道有多少人已经看过这篇blog并受到了我的误导,鄙人在此表示抱歉。俺以后写技术blog会更加严谨的。 一度想把原文删了,最后还是没舍得。毕竟每篇blog都花费了不少心血,另外放在那里也可以引以为戒。所以这里新补一篇。算是亡羊补牢吧。 言归正传。 同步(synchronous) IO和异步(asynchronous) IO,阻塞(blocking) IO和非阻塞(non-blocking)IO分别是什么,到底有什么区别?这个问题其实不同的人给出的答案都可能不同,比如wiki,就认为asynchronous IO和non-blocking IO是一个东西。这其实是因为不同的人的知识背景不同,并且在讨论这个问题的时候上下文(context)也不相同。所以,为了更好的回答这个问题,我先限定一下本文的上下文

oracle 数据泵

你。 提交于 2020-04-07 07:42:10
Oracle 数据库 导入导出工具,可以使用exp/imp,但这是比较早期的工具。本文主要介绍数据泵expdp/impdp工具的使用。 1、建立数据泵目录 使用数据泵需要先建directory create directory dir_back as 'e:\app\back' (删除目录:drop directory dir ) 2、查看建立的目录 Select * from dba_directories 3、赋权 Grant read,write on directory dir_back to sxybyj 4、导库 expdp sxybyj/sxybyj@orcl directory=dir_back dumpfile=sxybyj.dmp 导出数据 1)按用户导 expdp scott/tiger@orcl schemas=scott dumpfile=expdp.dmp DIRECTORY=dir logfile=expdp.log 2)并行进程parallel expdp scott/tiger@orcl directory=dir dumpfile=scott3.dmp parallel=40 job_name=scott3 3)按表名导 expdp scott/tiger@orcl TABLES=emp,dept dumpfile=expdp.dmp

未能加载文件或程序集System.EnterpriseServices

陌路散爱 提交于 2020-04-07 05:49:43
未能加载文件或程序集“System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。 解决方法: 方法一: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 目录下的: System.EnterpriseServices.dll, System.EnterpriseServices.Wrapper.dll 这两个文件拷到 目录: C:\WINDOWS\WinSxS\x86_System.EnterpriseServices_b03f5f7f11d50a3a_2.0.0.0_x-ww_7d5f3790 即可。 方法二: Microsoft .NET Framework 2.0 (版可再发行组件)包.exe 进行修复 来源: https://www.cnblogs.com/jams742003/archive/2009/01/10/1373117.html

CentOS7安装配置vncserver

﹥>﹥吖頭↗ 提交于 2020-04-07 05:35:02
系统环境:CentOS Linux release 7.4.1708 Kernel:3.10.0-693.el7.x86_64 系统现状:最小化安装,没有安装任何图形支持软件 安装图形化支持 不建议安装GNOME Desktop,它会占用大量系统资源,安装完后大约要占用1G左右的空间,而且安装过程也较长。以root权限安装“X Window System”即可 # yum groups install "X Window System" # yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts 修改系统启动级别 # systemctl set-default graphical.target  #graphical.target相当于level5,multi-user.target相当于level3 安装vncserver # yum install tigervnc-server 配置vncserver实例 分别配置root用户和st-jun用户,配置略有不同 root用户,服务名是vncserver@:1.service: # cp /lib/systemd/system/vncserver@.service

C#程序调用外部程序

≡放荡痞女 提交于 2020-04-07 03:10:58
/* * 编程语言:Visual Studio .NET C# (Beta 2) * 功 能:通过C#程序调用 Windows 记事本程序 编辑一个 * 名为 test.txt 的文本文件。 * * 在整个程序中 System.Diagnostics.Process.Start(Info) * 为主要语句。 * 如果只是单独执行一个外部程序,可用一条如下代码即可: * System.Diagnostics.Process.Start( * "外部程序名","启动参数"); */ using System; class test { static void Main() { //声明一个程序信息类 System.Diagnostics.ProcessStartInfo Info = new System.Diagnostics.ProcessStartInfo(); //设置外部程序名 Info.FileName = "notepad.exe"; //设置外部程序的启动参数(命令行参数)为test.txt Info.Arguments = "test.txt"; //设置外部程序工作目录为 C:\\ Info.WorkingDirectory = "C:\\\\"; //声明一个程序类 System.Diagnostics.Process Proc ; try { // /

VNC 远程连接vmware下centOS7

£可爱£侵袭症+ 提交于 2020-04-07 02:56:49
VNC ( Virtual Network Computing)是一个linux下提供远程桌面支持的服务,类似于windows下的远程桌面服务,本来我是准备用xmanager来远程连我虚拟机中的centos的,但是由于xmanager据说不支持centos7下的gnome,其他的xfce好像支持度也不好。既然这样,我就用了VNC。 1.如果没有安装X-Windows 桌面的话要先安装Xwindows [root@localhost ~]# yum check-update [root@localhost ~]# yum groupinstall "X Window System" [root@localhost ~]# yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts [root@localhost ~]# unlink /etc/systemd/system/default.target [root@localhost ~]# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target [root@localhost

C#程序调用外部程序

元气小坏坏 提交于 2020-04-07 02:29:04
* * 编程语言:Visual Studio .NET C# (Beta 2) * 功 能:通过C#程序调用 Windows 记事本程序 编辑一个 * 名为 test.txt 的文本文件。 * * 在整个程序中 System.Diagnostics.Process.Start(Info) * 为主要语句。 * 如果只是单独执行一个外部程序,可用一条如下代码即可: * System.Diagnostics.Process.Start( * "外部程序名","启动参数"); */ using System; class test { static void Main() { //声明一个程序信息类 System.Diagnostics.ProcessStartInfo Info = new System.Diagnostics.ProcessStartInfo(); //设置外部程序名 Info.FileName = "notepad.exe"; //设置外部程序的启动参数(命令行参数)为test.txt Info.Arguments = "test.txt"; //设置外部程序工作目录为 C:\ Info.WorkingDirectory = "C:\\"; //声明一个程序类 System.Diagnostics.Process Proc ; try { // //启动外部程序 /

NHibernate映射oracle数据库CLOB、BLOB类型大数据字段

不问归期 提交于 2020-04-07 01:46:23
最初始最简单的方法如下: 首先建一个测试类: public class testClass { //需要映射为CLOB类型的字段 public string WKT{get;set;} } nhibernate配置文件中: <property column="WKT" type="StringClob" name="WKT" length="200000" /> 具体nhibernate的配制方法什么的不在此赘述,请查看本人nhibernate相关博客。 番外:CLOB、BLOB字段最大上限为4GB,即4x1024x1024x1024个字节,除非特别需要,不建议length过大,合适就行。我取的20万字节 写一个简单的方法插入数据测试: var testClass = new testClass(); testClass.WKT = data; // data是一个变量,存储你要插入的字符串 ISession session = SessionFactory.OpenSession(); session.Save(testClass); session.Flush(); 我们会发现此时oracle数据库WKT字段为NCLOB类型,但是测试数据在2000字节以下以及4000字节以上时顺利通过,在2000-4000字节时发生错误【 ORA-01461: 仅可以插入 LONG 列的