`
文章列表

C#生成条形码打印

    博客分类:
  • C#
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Printing; using System.Linq; using System.Text; using System.Windows.Forms; using ZXing; using ZXing.Common; using ZXing.QrCode; using System.IO; ...

C#打印图片,转载一下

    博客分类:
  • C#
 
打印的原理是:生成mdi文件,系统碰到mdi的时候会自动以打印的方式处理。所以,不管用什么模板,什么方式;能在PrintPage事件处理中,生成一张要打印内容的图片就OK了!   C#实现打印源码如下:   #region 打印 private vo ...
类1: package com.yu.gogo; import java.awt.Color; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutpu ...
爱因斯坦的《相对论》中的第一公理:“本宇宙速度的最高上限是光速”     假设一辆火车以100/s速度向右运动,火车里有个人已每秒10米的速度向右运动,那么火车以地面做参考系,火车速度是100/s,人以地面做参考系,人的速度是火车速度+人速度=110/s。       假设火车已光速向右前进,人也以光速向右运动,以宇宙作为参考系,按照经典物理的逻辑,人在已2倍光速向右运动,既然本宇宙的上限是光速那么就不可能有速度超过光速,结论是人在光速运动,火车也在光速运动,如果是这样的话,那么只有一种可能火车与人不在同一个惯性系当中,这并不合理,也很难理解,但这是事实。       以上这些其实只 ...
--资料来源互联网   第一步:创建C#类库项目,修改“名称”为HuaYun.ActiveX  第二步:修改AssemblyInfo.cs,增加代码   //自定添加 [assembly: AllowPartiallyTrustedCallers()]   第三步:右键工程,“添加”-“用户控件”命名为“ActiveXControl.cs” 第四步:按照第三步的方法添加接口IObjectSafety.cs   using System; using System.Collections.Generic; using System.Linq; using Sys ...
JAVA最科学的多状态记录 数据库当中一个表的字段越少效率越高,所有科学的利用一个字段,是我们势在必行的。下面是我开发的多状态,但字段记录法。非常实用。 以下是测试代码: @Test public void test(){ List<String> s ...
@Test public void 状态位 (){ int 数学 = 1; int 语文 = 1<<1; int 化学 = 1<<2; int 物理 = 1<<3; int 所有科目 = 数学+语文+化学+物理; int 小明的科目 = 数学+物理; //判断小明所选科目 if ((小明的科目&数学) == 数学){ System.out.println("小明选择了数学"); } if ((小明的科目&语文) == 语文){ ...
  package test; import org.junit.Test; public class TestDemo { public static final char ofLow = 1<<5; public static final char ofUp = (char)(Character.MAX_VALUE-(1<<5)); public static final char upMinVal = 'A'; public static final char upMaxVal = 'Z'; public static fin ...

js调用本地调用

    博客分类:
  • C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; usin ...
  最近在学习汇编(assembily),读中文文档的时候看了半天认为自己都懂了,但实际上在看一遍英文文档,你发现其实你并没有理解。甚至漏掉很多内容。我个人觉得那是因为大脑已经对中文的敏感度不够,对一些熟悉的字段就不加分析了。还有一个原因就是中文跟英文书写格式不一样,中文是以句为单位,而英文是以词为单位,一个词一个词的看很容易找到关键点,而中文一句话很容易忽略其关键内容。   尽量的多学习一下英文吧。外国的文档真的有与生俱来的优势。忽然想到被大英帝国殖民过的印度,就从编程的角度而言,它们的环境要比中国要好。英文这是一个问题。  
  a^n/a^m=a^(n-m) 设n=m a^0=1       目前我认为比较靠谱的说法,这个具体的推断过程是不是这样,那就需要查阅数学史了。
public static byte[] readFile (String filePath, int bufsize){ byte[] retval = null; try { RandomAccessFile raf = new RandomAccessFile(filePath, "rw"); FileChannel inChannel = raf.getChannel(); ByteBuffer buf = ByteBuffer.allocate(bufsize); int byteRead = inChannel ...
package com.yu.entity; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; //继承Comparable接口 public class SocketEntity implements Comparable<SocketEntity> { public static final int SEND_DATA = 1; //发送数据 public static final i ...
<aop:config> <aop:pointcut id="mmethod" expression="execution(* com.jc.bus.jttsp.service.*.*(..))" /> <aop:advisor advice-ref="txAdvice" pointcut-ref="mmethod" /> </aop:config>   首先检查切点是不是有问题。   @Service注解如果被SpringMVC扫描到那么Servic ...
usertask设置如上图。重点参数 Multi-instance type/Cardinality/completion condition这里是重点 代码如下。   @RequestMapping (value = {"saStartMI"}) @ResponseBody public Map<String, Object> SpringMultiInstance (){ Map<String, Object> retval = new HashMap<String, Object>(); Map& ...
Global site tag (gtag.js) - Google Analytics