`
hzy3774
  • 浏览: 995568 次
  • 性别: Icon_minigender_1
  • 来自: 珠海
社区版块
存档分类
最新评论
文章列表
5110LCD与1602LCD比起来,采用串行传输数据,节省IO,自带DDRAM,一般连背光算上只占用单片机6个IO:   sbit CLK = P2^4;     //串行时钟   //上升沿写入数据sbit DIN = P2^3;     //串行数据输入  //先高后低sbit DC  = P2^2;     //数据指令控制端 //高电平数据,低电平指令sbit CS  = P2^1;     //片选使能   //低电平有效sbit RST = P2^0;     //LCD复位端  //低电平复位sbit LED = P2^5; //背光灯控制端      //高电平打开 ...
现在很多电脑提供了蓝牙支持,很多笔记本网卡也集成了蓝牙功能,也可以采用USB蓝牙方便的连接手机等蓝牙设备进行通信。 操作蓝牙要使用类库InTheHand.Net.Personal 首先在项目中引用该类库; static void Main(string[] args) { BluetoothRadio bluetoothRadio = BluetoothRadio.PrimaryRadio; if (bluetoothRadio == null) { Console.WriteLine("没有找到本机蓝牙设备!"); } ...
在窗体程序中我们常把费时操作另开新线程,但是我们要知道新线程的运行状态,又要对UI线程进行操作来显示新线程状态;例如: namespace CrossCall { public partial class Form1 : Form { Thread thread = null; public Form1() { InitializeComponent(); //CheckForIllegalCrossThreadCalls = false; ...
1.在手机的当前状态将手机调成USB调试模式,然后再关机状态下按住红色挂机键+音量减小键+开机键,手机停留在华为的logo界面即可(此模式也叫fastboot模式),同时去设备管理器确认下ADB,这步也就是为了验证驱动是否安装正确 如果缺少驱动要安装驱动;    2.连接好电脑后,运行第二步操作的包里的启动刷机.bat,根据提示按任意键,直到提示recovery 安装完成之后,手机会自动重启,这样刷recovery的过程就算完成  3. 在关机状态下,按住绿色拨号+音量上键+开机键(这个操作即进入recovery模式),先会出现华为的logo,然后就会出现recovery的界面,这 ...
赶集网校招一个程序题,要求将矩阵螺旋输出如:   图中6*6矩阵线条所示为输出顺序,如果输出正确的话应该输出1~36有序数字 我当时是这么做的: #include <stdio.h> //#define LEN 1 //#define LEN 2 //#define LEN 3 #define LEN 4 void printClock(int a[][LEN]){//输出函数 int t; int i = 0, m = 0; int j = LEN, n = LEN; while (i <= j || m <= n) { ...
下载地址:http://winscp.net/eng/docs/lang:chs 支持中文,很好用,文件上传下载直接拖放就可以实现: 测试: 在VirtualBox中启动一个Linux,    启动WinSCP: 输入IP,用户名,密码   保存;  单击登陆,就可以查看和操作Linux文件系统中的文件:  下载一个putty,http://www.putty.org/ 在选项中指定putty所在路径,就可以在WinSCP中启动putty来执行Linux命令。     
首先要下载eclipse_java,安装ADT,CDT,NDK, 在MainActivity中写一些本地函数声明: public native void fun1(); public native String fun2(); public native char fun3(); public native int fun4(); public native double fun5(); public native void fun6(int i, String s);   配置好Java环境变量;   然后控制台进入项目的b ...
程序首先要获取写外部存储权限: 程序: package com.hu.andstar; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import android.content.Context; public class UnzipAssets { ...
UnzipAssets.java package com.hu.andstar; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import android.content.Context; public class UnzipAssets { /** ...
class UseWinRar { private string rarExeFile = null;//WinRar.exe路径 private bool useAble = false;//标志WinRar是否可用 public UseWinRar()//构造方法 { rarExeFile = getRarExe(); useAble = !string.IsNullOrEmpty(rarExeFile);//如果WinRar.exe路径不为空,说明可用 ...
有时候需要在两个窗体之间传递事件或者参数,例如一个登陆窗体,要将用户名和密码传递给主窗体,使用Event不但可以使主窗体在登录窗体关闭后再显示出来,还可以将数据传递到主窗体,代码很简单,要注意的是要判断事件是否为空,不然会出现空指向异常: FormLogin代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Fo ...
使用System.Data.SQLite下载地址:http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki 得到System.Data.SQLite.dll添加到工程引用;  建表,插入操作 static void Main(string[] args) { SQLiteConnection conn = null; string dbPath = "Data Source =" + Environment.Curr ...
#include <stdio.h> #include <stdlib.h> typedef struct _NODE//节点结构 { struct _NODE* leftChild; int value; struct _NODE* rightChild; } NODE, *PNODE; PNODE createNode(int value){//创建一个新节点 PNODE n = (PNODE)malloc(sizeof(NODE)); n->value = value; n->leftChild = NULL; ...
写入文档: static void Main(string[] args) { XmlDocument doc = new XmlDocument();//实例化文档对象 if (File.Exists("student.xml"))//如果文件已存在,载入文档 { doc.Load("student.xml"); } else//否则 ...
#include <reg51.h> #include <intrins.h> #define uchar unsigned char void delay() { int i, j; for(i = 0; i < 255; i++) { for(j = 0; j < 255; j++); } } void show1()//移位 { uchar a = 0x01;//0000 0001 while(1) { P0 = a; delay(); a <<= 1;//左移一位 ...
Global site tag (gtag.js) - Google Analytics