上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 19 下一页

2020年4月11日

asp.net webforms 用户自定义控件验证

摘要: 用户自定义控件里有一堆控件,但提交按钮不在用户控件内部,验证不起使用。 此处仅说服务端验证方法,不支持客户端验证。 在用户控件中定义两个方法,需要的时候调用验证一下就可了,就当是Page.Validate()和Page.IsValid的组件方法吧 public bool validate() { f 阅读全文

posted @ 2020-04-11 13:55 空明流光 阅读(208) 评论(0) 推荐(0)

2020年4月9日

C#创建编译时动态属性对象和运行时动态属性对象(linq 动态列名)

摘要: void Main() { var list = new List<object>(); Enumerable.Range(1, 100).ToList().ForEach(item => { dynamic d = new System.Dynamic.ExpandoObject(); d.Nam 阅读全文

posted @ 2020-04-09 16:30 空明流光 阅读(807) 评论(0) 推荐(0)

2020年4月8日

monodevelop 在 linux 安装后 debug 报错 Debugger operation failed

摘要: 不同的版本报错不一样, 有的显示了文件名,有的不显示,是文件找不到的错误。归根结底是找不到这个文件:gnome-terminal-server 解决方案如下: It was because on 20.04, gnome-terminal-server had moved from /usr/lib 阅读全文

posted @ 2020-04-08 09:58 空明流光 阅读(861) 评论(1) 推荐(1)

2020年4月2日

c# winform 在新的应用程序域运行 wpf

摘要: var appName = "MobileExaming.exe"; var appPath = Application.StartupPath + @"\" + appName; var domain = AppDomain.CreateDomain("WpfAppDomain"); domain 阅读全文

posted @ 2020-04-02 09:36 空明流光 阅读(357) 评论(0) 推荐(0)

2020年3月30日

c# 图像压缩

摘要: /// <summary> /// 图片尺寸压缩 /// </summary> /// <param name="bitmap"></param> /// <param name="maxWidth"></param> /// <param name="maxHeight"></param> /// 阅读全文

posted @ 2020-03-30 17:09 空明流光 阅读(688) 评论(0) 推荐(0)

2020年3月25日

java 图像压缩

摘要: import java.awt.Graphics2D; import java.awt.Image; import java.awt.RenderingHints; import java.awt.color.ColorSpace; import java.awt.geom.AffineTransf 阅读全文

posted @ 2020-03-25 18:08 空明流光 阅读(234) 评论(0) 推荐(0)

android 权限全集及申请代码示例

摘要: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="s1.ppp.com"> <!--访问登记属性(读取或写入登记ch 阅读全文

posted @ 2020-03-25 13:50 空明流光 阅读(1394) 评论(0) 推荐(0)

2020年3月24日

javascript 图像旋转

摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD 阅读全文

posted @ 2020-03-24 15:30 空明流光 阅读(219) 评论(0) 推荐(0)

2020年3月20日

c# 创建斜着写字图片

摘要: void Main() { using (var bitmap = new Bitmap(3094, 2136,PixelFormat.Format32bppArgb)) { using (Graphics g = Graphics.FromImage(bitmap)) { var msg = "在 阅读全文

posted @ 2020-03-20 11:57 空明流光 阅读(491) 评论(0) 推荐(0)

2020年3月7日

NewtonSoft.Json 用法备忘

摘要: 两种用法: 1.序列化与反序列化 Newtonsoft.Json.JsonConvert.SerializeObject(obj) Newtonsoft.Json.JsonConvert.DeserializeObject<DateType>(str) 2.不定义类型,直接读取json var ob 阅读全文

posted @ 2020-03-07 10:38 空明流光 阅读(154) 评论(0) 推荐(0)

2020年3月2日

C#各版本功能

摘要: 阅读全文

posted @ 2020-03-02 15:10 空明流光 阅读(152) 评论(0) 推荐(0)

2019年12月31日

动态创建 Hello World

摘要: var myHelloWorldApp = AssemblyDefinition.CreateAssembly( new AssemblyNameDefinition("HelloWorld", new Version(1, 0, 0, 0)), "HelloWorld", ModuleKind.Console); var module = myHelloWorldApp.MainModule; 阅读全文

posted @ 2019-12-31 13:19 空明流光 阅读(344) 评论(0) 推荐(0)

2019年12月23日

C# Hook 方法

摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; using System.Runtime.CompilerServices; namespace MethodHookSample { class Program { stati 阅读全文

posted @ 2019-12-23 16:31 空明流光 阅读(2408) 评论(0) 推荐(0)

2019年12月20日

c++获取当前进程所在位置

摘要: WCHAR buffer[MAX_PATH]; GetModuleFileName(NULL, buffer, MAX_PATH ); wstring::size_type pos = wstring(buffer).find_last_of(TEXT("\\/")); WCHAR currentP 阅读全文

posted @ 2019-12-20 10:44 空明流光 阅读(933) 评论(0) 推荐(0)

2019年12月18日

c++ 读取 utf-8 文件到 string

摘要: #include <iostream> #include <assert.h> #include <fstream> #include <string> #include <string.h> using namespace std; #ifdef _WIN32 #include <Windows.h> #endif typedef enum FileType { FileType_ANSI = 阅读全文

posted @ 2019-12-18 11:45 空明流光 阅读(5772) 评论(0) 推荐(0)

2019年12月10日

javascript 访问 webservice

摘要: xml: javascript: 带参数的访问: 阅读全文

posted @ 2019-12-10 18:17 空明流光 阅读(326) 评论(0) 推荐(0)

2019年12月3日

eclipse code recommenders cannot download its model repository index

摘要: Cent OS 7 运行 eclipse oxygen 代码提示出现标题所示的错误,解决办法,将网络提供程序设置为手动即可解决。 Window->Preference->General->Network Connection->Active Provider 选择 Manual, 保存即可。 阅读全文

posted @ 2019-12-03 11:03 空明流光 阅读(1308) 评论(0) 推荐(0)

2019年11月26日

android 内存共享

摘要: 匿名共享内存Ashmem 阅读全文

posted @ 2019-11-26 09:19 空明流光 阅读(303) 评论(0) 推荐(0)

2019年11月24日

malloc和cmalloc

摘要: void *malloc(size_t size); 分配内存,但不会初始化,未使用内存不一定是0;void *calloc(size_t numElements,size_t sizeOfElement); 分配内存并初始化,未使用内存为0; 阅读全文

posted @ 2019-11-24 19:50 空明流光 阅读(1016) 评论(0) 推荐(0)

c语言字串指针 char*

摘要: c语言中 char* 不仅能存字符串,还能存二进制数据,所以它的用途因使用者而定。 char* 在很多使用场景下,是需要存储ascii码为0的元素的,这样就必须注意一个问题,那就是char*的长度。 c语言中是没有办法检测char*长度的,这样也就能解释之前为什么我在网上找到的那么多示例函数都把长度 阅读全文

posted @ 2019-11-24 18:28 空明流光 阅读(1237) 评论(0) 推荐(0)

c# android 读取资源文件流

只有注册用户登录后才能阅读该文。 阅读全文

posted @ 2019-11-24 00:03 空明流光 阅读(2) 评论(0) 推荐(0)

2019年11月23日

windows10中Android模拟器与docker环境要求的虚拟技术冲突解决

摘要: https://blog.csdn.net/austindev/article/details/85601564 阅读全文

posted @ 2019-11-23 18:41 空明流光 阅读(3793) 评论(0) 推荐(0)

2019年11月19日

c++ 调用 sqlcipher

摘要: #include <iostream> #include <string.h> #include "sqlite3.h" using namespace std; static int callback(void *notUsed, int argc, char **argv, char **azColName) { for (int i = 0; i < argc; i++) cout << a 阅读全文

posted @ 2019-11-19 18:44 空明流光 阅读(2593) 评论(0) 推荐(0)

c++ 调用 sqlite

摘要: #include #include "sqlite3.h" using namespace std; void dbTest() { #pragma region 打开或创建数据库 /*打开或创建的数据库实例句柄*/ sqlite3 *db = NULL; /*数据库文件的路径及文件名*/ const char * path = "./sqlcipher... 阅读全文

posted @ 2019-11-19 18:22 空明流光 阅读(992) 评论(0) 推荐(0)

2019年11月18日

从 java 代码到 android 进程的详细过程

摘要: java代码: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } 编译打包: javac HelloWorld.java dx --de 阅读全文

posted @ 2019-11-18 10:46 空明流光 阅读(301) 评论(0) 推荐(0)

2019年11月16日

linux centos 7 安装vnc远程服务

摘要: xrdp 配合 tigervnc-server 可以实现无需 vnc 客户端直接使用mstsc连接。 # Windows 远程登录需要安装 Xrdp,需要 epel 源wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/ 阅读全文

posted @ 2019-11-16 12:57 空明流光 阅读(57) 评论(0) 推荐(0)

2019年11月6日

c++ 智能指针

摘要: #include <memory> //c++11 std::shared_ptr<int> p3(new int); *p3 = 10; cout << "p3:" << *p3 << endl; 阅读全文

posted @ 2019-11-06 16:17 空明流光 阅读(144) 评论(0) 推荐(0)

2019年11月5日

linux 进程间共享内存示例

摘要: 写入端: 读取端: 阅读全文

posted @ 2019-11-05 11:55 空明流光 阅读(349) 评论(0) 推荐(0)

2019年11月4日

visual studio 在windows远程调试 linux 程序 cout 输出乱码

摘要: 转载:https://www.cnblogs.com/findumars/p/6627255.html 反正是解决了。 以gcc为例,它有三个命令选项:-finput-charset=gb18030-fexec-charset=utf-8-fwide-exec-charset=utf32顾名思议,i 阅读全文

posted @ 2019-11-04 14:23 空明流光 阅读(656) 评论(0) 推荐(0)

2019年10月30日

wcf restful 访问报错 *.svc HTTP error 404.17 - Not Found

摘要: 安装完成 iisreset,即使不重启也已经可以使用了 阅读全文

posted @ 2019-10-30 16:20 空明流光 阅读(427) 评论(0) 推荐(0)

2019年10月26日

c++ 创建 uuid guid

摘要: 如果没安装,先安装: [root@localhost]# yum install libuuid-devel #include "uuid/uuid.h" 引用 libuuid.so,即uuid .... .... 阅读全文

posted @ 2019-10-26 11:18 空明流光 阅读(1683) 评论(0) 推荐(0)

2019年10月18日

c++ 事件回调 java

摘要: #pragma once #ifdef __cplusplus extern "C" { #endif typedef void(*sig_t)(int); int FirstEliteValidateTest(); int FirstEliteValidateTest2(sig_t proc); #ifdef __cplusplus } #endif pa... 阅读全文

posted @ 2019-10-18 10:23 空明流光 阅读(662) 评论(0) 推荐(0)

2019年10月16日

java通过jna调用so

摘要: c++: FirstEliteValidate.h FirstEliteValidate.cpp 编译出so文件命名为 libFirstEliteValidate.so,复制到 /usr/lib下 java: 运行: 阅读全文

posted @ 2019-10-16 19:00 空明流光 阅读(5536) 评论(0) 推荐(0)

java 执行 jar 包和 class

摘要: windows 编译并执行 Program.java: "...\jdk1.8.0_181\bin\javac" -encoding GBK -classpath ".;.\args4j-2.0.1.jar;.\com.bg.security.jar;.\com4j.jar;.\fastjson-1 阅读全文

posted @ 2019-10-16 18:55 空明流光 阅读(784) 评论(0) 推荐(0)

2019年9月30日

java调用com组件com4j

摘要: A Java library that allows Java applications to seemlessly interoperate with Microsoft Component Object Model. First generate Java type definitions fr 阅读全文

posted @ 2019-09-30 17:40 空明流光 阅读(2210) 评论(0) 推荐(0)

java jna 调用windows动态链接库

摘要: 需引入:jna-5.4.0.jar和jna-platform-5.4.0.jar 阅读全文

posted @ 2019-09-30 14:35 空明流光 阅读(434) 评论(0) 推荐(0)

2019年9月27日

Linux 下创建静态库和动态库

摘要: 1.创建静态链接库 2.创建动态链接库 阅读全文

posted @ 2019-09-27 16:27 空明流光 阅读(202) 评论(0) 推荐(0)

程序的编译和链接过程

摘要: 程序 function.h function.c main.c 编译和链接分步执行的命令: 编译和链接一步到位的命令: 编译后会生成main.o,可反编译查看它的汇编代码: 也可反编译demoApp查看它的汇编代码: 阅读全文

posted @ 2019-09-27 15:39 空明流光 阅读(251) 评论(0) 推荐(0)

2019年9月23日

webform 防止一个请求重复提交

摘要: /// <summary> /// 防止一个请求重复提交 /// </summary> public void PreventRepeatSubmit() { if (ScriptManager.GetCurrent(this.Page).IsInAsyncPostBack) ScriptManag 阅读全文

posted @ 2019-09-23 13:53 空明流光 阅读(441) 评论(0) 推荐(0)

2019年9月9日

跨 Appdomain 对象共享

摘要: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Runtime.InteropServices; using System.Diagnosti... 阅读全文

posted @ 2019-09-09 16:50 空明流光 阅读(366) 评论(0) 推荐(0)

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 19 下一页

导航