ymail 客户端 android,Android-YMail-Warmtel-程序员宅基地

技术标签: ymail 客户端 android  

package com.mail163.email.util;

import java.io.BufferedOutputStream;

import java.io.BufferedReader;

import java.io.ByteArrayOutputStream;

import java.io.File;

import java.io.FileInputStream;

import java.io.FileReader;

import java.io.IOException;

import java.io.InputStream;

import java.io.InputStreamReader;

import java.io.OutputStream;

import java.io.Reader;

import java.net.HttpURLConnection;

import java.net.URL;

import java.util.ArrayList;

import java.util.List;

import java.util.StringTokenizer;

import java.util.Timer;

import java.util.TimerTask;

import java.util.regex.Matcher;

import java.util.regex.Pattern;

import android.accounts.NetworkErrorException;

import android.app.ActivityManager;

import android.app.AlertDialog;

import android.app.Notification;

import android.app.NotificationManager;

import android.app.PendingIntent;

import android.app.ActivityManager.MemoryInfo;

import android.content.ComponentName;

import android.content.Context;

import android.content.DialogInterface;

import android.content.Intent;

import android.content.SharedPreferences;

import android.graphics.Bitmap;

import android.graphics.BitmapFactory;

import android.graphics.drawable.BitmapDrawable;

import android.graphics.drawable.Drawable;

import android.net.ConnectivityManager;

import android.net.NetworkInfo;

import android.net.TrafficStats;

import android.os.Environment;

import android.os.StatFs;

import android.support.v4.app.NotificationCompat;

import android.text.Html;

import android.text.format.Formatter;

import android.util.Log;

import android.widget.RemoteViews;

import com.mail163.email.Email;

import com.mail163.email.Logs;

import com.mail163.email.R;

import com.mail163.email.Email.Global;

import com.mail163.email.activity.Welcome;

import com.mail163.email.service.UpdateService;

public class Utiles {

public static String getNetStream(Context mContext) {

int mUid = mContext.getApplicationInfo().uid;

long recvByte = TrafficStats.getUidRxBytes(mUid);

//long sendByte = TrafficStats.getUidTxBytes(mUid);

long totalByte = recvByte;// + sendByte;

if (totalByte <= -1) {

return "0";// getString(R.string.device_no_stream);

}

return Formatter.formatFileSize(mContext, totalByte);// Byteת��ΪKB����MB

}

public static long getNetStreamSize(Context mContext) {

int mUid = mContext.getApplicationInfo().uid;

long recvByte = TrafficStats.getUidRxBytes(mUid);

//long sendByte = TrafficStats.getUidTxBytes(mUid);

long totalByte = recvByte;// + sendByte;

if (totalByte <= -1) {

return 0;

}

return totalByte / 1024;// Byteת��ΪKB

}

public static String getAvailMemory(Context mContext) {// ��ȡandroid��ǰ�����ڴ��С

ActivityManager am = (ActivityManager) mContext

.getSystemService(Context.ACTIVITY_SERVICE);

MemoryInfo mi = new MemoryInfo();

am.getMemoryInfo(mi);

// mi.availMem; ��ǰϵͳ�Ŀ����ڴ�

return Formatter.formatFileSize(mContext, mi.availMem);// ����ȡ���ڴ��С���

}

public static long getAvailMemorySize(Context mContext) {// ��ȡandroid��ǰ�����ڴ��С

ActivityManager am = (ActivityManager) mContext

.getSystemService(Context.ACTIVITY_SERVICE);

MemoryInfo mi = new MemoryInfo();

am.getMemoryInfo(mi);

// mi.availMem; ��ǰϵͳ�Ŀ����ڴ�

return mi.availMem / 1024;// ����ȡ���ڴ��С���

}

public static String getTotalMemory(Context mContext) {

String str1 = "/proc/meminfo";// ϵͳ�ڴ���Ϣ�ļ�

String str2;

String[] arrayOfString;

long initial_memory = 0;

try {

FileReader localFileReader = new FileReader(str1);

BufferedReader localBufferedReader = new BufferedReader(

localFileReader, 8192);

str2 = localBufferedReader.readLine();// ��ȡmeminfo��һ�У�ϵͳ���ڴ��С

arrayOfString = str2.split("\\s+");

for (String num : arrayOfString) {

Log.i(str2, num + "\t");

}

initial_memory = Integer.valueOf(arrayOfString[1]).intValue() * 1024;// ���ϵͳ���ڴ棬��λ��KB������1024ת��ΪByte

localBufferedReader.close();

} catch (IOException e) {

}

return Formatter.formatFileSize(mContext, initial_memory);// Byteת��ΪKB����MB���ڴ��С���

}

public static String getSdcardAvailSize(Context mContext) {

if (Environment.getExternalStorageState().equals(

Environment.MEDIA_MOUNTED)) {

File sdPath = Environment.getExternalStorageDirectory();

StatFs sdStatFs = new StatFs(sdPath.getPath());

long blockSize = sdStatFs.getBlockSize();

long availableBlocks = sdStatFs.getAvailableBlocks();

long sdAvailable = availableBlocks * blockSize;

return Formatter.formatFileSize(mContext, sdAvailable);

} else {

return "0byte";

}

}

public static long getSdcardAvailSizes(Context mContext) {

if (Environment.getExternalStorageState().equals(

Environment.MEDIA_MOUNTED)) {

File sdPath = Environment.getExternalStorageDirectory();

StatFs sdStatFs = new StatFs(sdPath.getPath());

long blockSize = sdStatFs.getBlockSize();

long availableBlocks = sdStatFs.getAvailableBlocks();

long sdAvailable = availableBlocks * blockSize;

return sdAvailable / 1024;

} else {

return 0;

}

}

public static String getSdcardAllSize(Context mContext) {

if (Environment.getExternalStorageState().equals(

Environment.MEDIA_MOUNTED)) {

File sdPath = Environment.getExternalStorageDirectory();

StatFs sdStatFs = new StatFs(sdPath.getPath());

long blockSize = sdStatFs.getBlockSize();

long totalBlocks = sdStatFs.getBlockCount();

long sdTotal = totalBlocks * blockSize;

return Formatter.formatFileSize(mContext, sdTotal);

} else {

return "0byte";

}

}

public static void showNoNetworkNotification(Context mContext,

String notifyTitle, String notifyMessage) {

NotificationManager notificationManager = (NotificationManager) mContext

.getSystemService(Context.NOTIFICATION_SERVICE);

int icon = R.drawable.icon;

CharSequence tickerText = notifyTitle;

long when = System.currentTimeMillis();

Intent intent = new Intent();

PendingIntent contentIntent = PendingIntent.getActivity(mContext, 0,

intent, PendingIntent.FLAG_UPDATE_CURRENT);

NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext);//设置UI界面特征

builder.setSmallIcon(icon); //通知图标

builder.setContentTitle(notifyTitle);

builder.setContentText(notifyMessage); //通知内容

builder.setTicker(tickerText); //刚收到通知时提示

builder.setAutoCancel(true); // 点击取消通知

builder.setWhen(System.currentTimeMillis());

builder.setContentIntent(contentIntent); //通知点击行为

NotificationManager mNotifyManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);

Notification notification = builder.build();

mNotifyManager.notify(R.string.app_name, notification);//发布通知

}

public static void createSoftUpdateVersionDialog(final Context mContext) {

AlertDialog.Builder alert = new AlertDialog.Builder(mContext);

alert.setTitle(R.string.soft_update_title).setMessage(

R.string.soft_update_message).setPositiveButton(

R.string.confirm, new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int which) {

Intent updateIntent = new Intent(mContext,

UpdateService.class);

updateIntent.putExtra("titleId", R.string.app_name);

mContext.startService(updateIntent);

}

}).setNegativeButton(R.string.cancel,

new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int which) {

dialog.dismiss();

}

});

alert.create().show();

}

public static void showSystemNotification(Context mContext, String message) {

NotificationManager notificationManager = (NotificationManager) mContext

.getSystemService(Context.NOTIFICATION_SERVICE);

int icon = R.drawable.icon;

CharSequence tickerText = mContext.getString(R.string.system_notice);

// ֪ͨ������ʱ�䣬����֪ͨ��Ϣ����ʾ

long when = System.currentTimeMillis();

// ��ʼ�� Notification

Notification notification = new Notification(icon, tickerText, when);

notification.flags = Notification.FLAG_AUTO_CANCEL;

ComponentName component = new ComponentName(mContext, Welcome.class);

Intent intent = new Intent();

intent.setAction(Intent.ACTION_MAIN);

intent.addCategory(Intent.CATEGORY_LAUNCHER);

intent.setComponent(component);

PendingIntent contentIntent = PendingIntent.getActivity(mContext, 0,

intent, PendingIntent.FLAG_UPDATE_CURRENT);

RemoteViews contentView = new RemoteViews(mContext.getPackageName(),

R.layout.system_notice_remoteview);

contentView.setTextViewText(R.id.notificationContent, Html

.fromHtml(message));

contentView.setImageViewResource(R.id.notificationImage,

R.drawable.icon);

notification.contentView = contentView;

notification.contentIntent = contentIntent;

notificationManager.notify(R.string.system_notice, notification);

}

private static final String NET_TYPE_WIFI = "WIFI";

public static boolean isWifi(Context mContext) {

try {

ConnectivityManager connMng = (ConnectivityManager) mContext

.getSystemService(Context.CONNECTIVITY_SERVICE);

NetworkInfo netInf = connMng.getActiveNetworkInfo();

if (netInf != null && NET_TYPE_WIFI.equals(netInf.getTypeName())) {

return true;

}

} catch (Exception e) {

e.printStackTrace();

}

return false;

}

public static Bitmap getBitmapFromUrl(Context context, String urlPath) {

if (urlPath == null)

return null;

HttpURLConnection conn = null;

try {

// 利用string url构建URL对象

URL mURL = new URL(urlPath.toString());

conn = (HttpURLConnection) mURL.openConnection();

conn.setRequestMethod("GET");

conn.setReadTimeout(5000);

conn.setConnectTimeout(10000);

int responseCode = conn.getResponseCode();

if (responseCode == 200) {

InputStream is = conn.getInputStream();

final ByteArrayOutputStream dataStream = new ByteArrayOutputStream();

OutputStream out = new BufferedOutputStream(dataStream,

4 * 1024);

copy(is, out);

out.flush();

final byte[] data = dataStream.toByteArray();

Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0,

data.length);

return bitmap;

} else {

throw new NetworkErrorException("response status is "+responseCode);

}

} catch (Exception e) {

e.printStackTrace();

} finally {

if (conn != null) {

conn.disconnect();

}

}

return null;

}

private static void copy(InputStream in, OutputStream out)

throws IOException {

byte[] b = new byte[4 * 1024];

int read;

while ((read = in.read(b)) != -1) {

out.write(b, 0, read);

}

}

public static void getVersion(Context mContext) {

try {

Global.localVersion = mContext.getPackageManager().getPackageInfo(

mContext.getPackageName(), 0).versionCode; // ���ñ��ذ汾��

Global.localVersionName = mContext.getPackageManager()

.getPackageInfo(mContext.getPackageName(), 0).versionName; // ���ñ��ذ汾

} catch (Exception ex) {

ex.printStackTrace();

}

}

public static void fetchSetting(Context context) {

SharedPreferences sharedata = context.getSharedPreferences(

Email.STORESETMESSAGE, 0);

Global.set_store = sharedata.getInt(Global.set_store_name, 0);

Global.set_sdSize = sharedata.getInt(Global.set_sd_name, Global.set_sdSize);

Global.set_streamSize = sharedata.getInt(Global.set_stream_name, Global.set_streamSize);

Global.set_softUpdate = sharedata.getInt(Global.set_softUpdate_name, 0);

Global.set_shortcut = sharedata.getInt(Global.set_shortcut_name, 1);

Global.set_security = sharedata.getInt(Global.set_security_name, 1);

Global.notice_version = sharedata

.getLong(Global.notice_version_name, 0);

Global.set_download_select = sharedata.getInt(

Global.set_download_select_name, 1);

Email.VISIBLE_LIMIT_DEFAULT = sharedata.getInt(

Global.set_download_count_name, 20);

Email.VISIBLE_LIMIT_INCREMENT = Email.VISIBLE_LIMIT_DEFAULT;

Global.set_sysch_delete = sharedata.getBoolean(

Global.set_sysch_delete_name, true);

Global.set_scret_send = sharedata.getBoolean(

Global.set_scret_send_name, false);

Global.set_music_background_value = sharedata.getInt(Global.set_music_background, 0);

Global.set_security_password = sharedata.getString(Global.set_security_password_name, "");

}

public static void fetchDownMailSetting(Context context) {

SharedPreferences sharedata = context.getSharedPreferences(

Email.STORESETMESSAGE, 0);

Global.set_download_select = sharedata.getInt(

Global.set_download_select_name, 1);

Email.VISIBLE_LIMIT_DEFAULT = sharedata.getInt(

Global.set_download_count_name, 20);

Email.VISIBLE_LIMIT_INCREMENT = Email.VISIBLE_LIMIT_DEFAULT;

Global.set_sysch_delete = sharedata.getBoolean(

Global.set_sysch_delete_name, true);

}

/**

* ɾ���ļ�������������ļ�

*

* @param path

* String �ļ���·�� �� c:/fqf

*/

public static void delAllFile(String path) {

File file = new File(path);

if (!file.exists()) {

return;

}

if (!file.isDirectory()) {

return;

}

String[] tempList = file.list();

File temp = null;

for (int i = 0; i < tempList.length; i++) {

if (path.endsWith(File.separator)) {

temp = new File(path + tempList[i]);

} else {

temp = new File(path + File.separator + tempList[i]);

}

if (temp.isFile()) {

temp.delete();

}

if (temp.isDirectory()) {

delAllFile(path + "/" + tempList[i]);// ��ɾ���ļ���������ļ�

delFolder(path + "/" + tempList[i]);// ��ɾ�����ļ���

}

}

}

public static void delFile(String path) {

File file = new File(path);

if (!file.exists()) {

return;

}

if (file.isDirectory()) {

return;

}

file.delete();

}

/**

* ɾ���ļ���

*

* @param filePathAndName

* String �ļ���·�������� ��c:/fqf

* @param fileContent

* String

* @return boolean

*/

public static void delFolder(String folderPath) {

try {

delAllFile(folderPath); // ɾ����������������

String filePath = folderPath;

filePath = filePath.toString();

File myFilePath = new File(filePath);

myFilePath.delete(); // ɾ�����ļ���

} catch (Exception e) {

e.printStackTrace();

}

}

/**

* �˳�����

*

* @param activity

* ������

*/

public static void killProcess(final Context mContext) {

try {

new Timer().schedule(new TimerTask() {

@Override

public void run() {

// android 2.1 ��֮ǰ�汾��Ч

if (Integer.parseInt(android.os.Build.VERSION.SDK) < 8) {// android

// sdk

// 2.1

// ��֮ǰ�汾

ActivityManager activityManager = (ActivityManager) mContext

.getSystemService(Context.ACTIVITY_SERVICE);

activityManager.restartPackage(mContext

.getPackageName());

} else {// android sdk 2.2

kill(mContext);

}

}

}, 500);

} catch (Exception e) {

e.printStackTrace();

}

}

public static void kill(Context mContext) {

String packageName = mContext.getPackageName();

Runtime runtime = Runtime.getRuntime();

List processLine = new ArrayList();

try {

Process process = runtime.exec("ps");

BufferedReader reader = new BufferedReader(new InputStreamReader(

process.getInputStream()));

String line;

while ((line = reader.readLine()) != null) {

if (line.contains(packageName)) {

processLine.add(0, line);

}

}

reader.close();

for (String string : processLine) {

StringTokenizer stringTokenizer = new StringTokenizer(string);

int count = 0;

while (stringTokenizer.hasMoreTokens()) {

count++;

String object = stringTokenizer.nextToken();

if (count == 2) {

runtime.exec("kill -9 " + object);

// android.os.Process.killProcess(Integer.parseInt(object));

}

}

}

} catch (Exception e) {

e.printStackTrace();

}

}

public static void clearAccount(Context mContext) {

String dateBaseDir = "//data//data//com.mail163.email//databases//";

String prefsBaseDir = "//data//data//com.mail163.email//shared_prefs//";

delFolder(dateBaseDir);

delFolder(prefsBaseDir);

killProcess(mContext);

}

public static Drawable fetchBackDrawable(Context mContext) {

String targetDir = Environment.getDataDirectory() + "/data/"+ mContext.getPackageName() + "/skin/";

String listViewBack = targetDir + "back1.png";

Drawable drawable = null;

File bgFile = new File(listViewBack);

try {

drawable = BitmapDrawable.createFromPath(bgFile.getCanonicalPath());

} catch (IOException e) {

Logs.e(Logs.LOG_TAG, "error :" + e.getMessage());

e.printStackTrace();

}

return drawable;

}

public static String fetchSkinName(Context mContext) {

String targetDir = Environment.getDataDirectory() + "/data/"+ mContext.getPackageName() + "/skin/";

String listViewBack = targetDir + "skininfo.txt";

File skinFile = new File(listViewBack);

if (skinFile == null || !skinFile.exists()) {

return "";

}

StringBuffer buffer = new StringBuffer();

try {

FileInputStream fis = new FileInputStream(skinFile);

InputStreamReader isr = new InputStreamReader(fis, "UTF-8");// �ļ�����Unicode,UTF-8,ASCII,GB2312,Big5

Reader in = new BufferedReader(isr);

int ch;

while ((ch = in.read()) > -1) {

buffer.append((char) ch);

}

in.close();

// buffer.toString())���Ƕ����������ַ�

} catch (IOException e) {

e.printStackTrace();

}

Pattern pattern = Pattern.compile("[&]");

String[] skinInfoArr = pattern.split(buffer.toString());

if(skinInfoArr != null && skinInfoArr.length>2){

return skinInfoArr[2];//skin2.zip&��ɫ���&��ɫ

}else{

return "";

}

}

/**

* �ж��Ƿ���ȷ�����ַ

* @param str

* @return

*/

public static boolean isEmailAddress(String str) {

boolean b = false;

Pattern pattern = Regex.EMAIL_ADDRESS_PATTERN;

Matcher matcher = pattern.matcher(str);

if (matcher.matches()) {

b = true;

}

return b;

}

/**

* �����ֻ��ķֱ��ʴ� dp �ĵ�λ ת��Ϊ px(����)

*/

public static int dip2px(Context context, float dpValue) {

final float scale = context.getResources().getDisplayMetrics().density;

return (int) (dpValue * scale + 0.5f);

}

/**

* �����ֻ��ķֱ��ʴ� px(����) �ĵ�λ ת��Ϊ dp

*/

public static int px2dip(Context context, float pxValue) {

final float scale = context.getResources().getDisplayMetrics().density;

return (int) (pxValue / scale + 0.5f);

}

}

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_35805266/article/details/117746263

智能推荐

解决 idea maven依赖引入失效,无法正常导入依赖问题_idea maven失效-程序员宅基地

文章浏览阅读1.5w次,点赞9次,收藏26次。解决 idea maven依赖引入失效,无法正常导入依赖问题idea是真的好用,不过里面的maven依赖问题有时候还真挺让人头疼,不少小伙伴也许会遇到刚配好不久的maven突然就无法正常导入依赖了,或者正满怀激情地看着教学视频想跟着敲一波代码,最后却因依赖无法导入而激情湮灭;又或者开发了挺久的项目哪天敲着敲着代码就一片爆红,一顿猛操作却发现是依赖失效了!又或者诸如…等等。关键是最后试了下网上常用的套路:1.右键 pom.xml -> maven -> reimport;2.File -&g_idea maven失效

遗传算法得到最优目标值及最优个体,一次迭代即产生子代1_遗传算法中最优个体是什么-程序员宅基地

文章浏览阅读1k次。import mathimport randomfrom random import sampleimport numpy as npfrom numpy import *import geatpy as eaimport xlrd##已知数据q1='F:\共享车选址调度\共享汽车数据\候选点之间的OD(13).xlsx'T1='F:\共享车选址调度\共享汽车数据\候选点之间的..._遗传算法中最优个体是什么

springboot整合微信支付笔记_cn.springboot.bestpay-程序员宅基地

文章浏览阅读1.1k次。先来看一下微信支付的流程,可见在整个支付流程中后台需要处理的事情有:1、调用统一下单api2、生成JSAPI页面调用的支付参数,并请求支付3、异步通知商户支付结果4、返回微信异步通知的处理结果下面来实际编程实现以上的过程,这里面我们使用了第三方Sdk,best-pay-sdkhttps://github.com/Pay-Group/best-pay-sdkmaven引入依赖 ..._cn.springboot.bestpay

【Linux】进程_linux so 入口函数-程序员宅基地

文章浏览阅读527次。首先通过图右边的文件编译过程,生成 so 文件和可执行文件,放在硬盘上。下图左边的用户态的进程 A 执行 fork,创建进程 B,在进程 B 的处理逻辑中,执行 exec 系列系统调用。这个系统调用会通过 load_elf_binary 方法,将刚才生成的可执行文件,加载到进程 B 的内存中执行。_linux so 入口函数

大屏可视化之适配和布局_大屏还原ui适配宽度-程序员宅基地

文章浏览阅读5k次,点赞5次,收藏53次。前言在做可视化大屏的时候,我们首先要保证UI图的比例不变,例如16:9的UI图,但大屏的比例可能是2:1,很多时候大屏的比例往往很少能与UI图的比例一模一样的,这个时候我们就要利用公式换算来适配大屏。例如16:9的UI图:适配大屏当页面首次加载时,判断视口的宽高,如果视口的宽/高 > 16/9 则说明视口宽度比较设计图宽,实际的显示宽度应该等于视口的高度*16/9。如果视口的宽/高 < 16/9 则说明视口高度比设计图高,实际的显示宽度应该等于视口的宽度,显示高度应等_大屏还原ui适配宽度

随便推点

SciencePlots安装(采坑+手动安装+Anaconda)-程序员宅基地

文章浏览阅读10w+次,点赞28次,收藏41次。花了4个小时就为装这个玩样,终于解决了,真的又气又兴奋(笑死)。不知道是版本问题还是什么,我在自己电脑上使用pip install SciencePlots安装,只能安装1.0.1版本,但是这个版本根本没有效果,用不了。然后我又使用手动安装si在了一个细节上,坑太多了。我的开发环境:Anaconda python3.6官方地址(其实SciencePlots是matplotlib样式包,是给定了几个学术作图的样式)SciencePlots · PyPIFormat Matplotlib_scienceplots安装

如何用python进行数据预处理_Python数据预处理-程序员宅基地

文章浏览阅读2.3k次。数据预处理是指在对数据进行数据挖掘之前,先对原始数据进行必要的清洗、集成、转换、离散和规约等一系列的处理工作,已达到挖掘算法进行知识获取研究所要求的最低规范和标准。通常数据预处理包括:数据清洗、数据集成、数据变换、数据规约。一:数据清洗数据清洗是填充缺失数据、消除噪声数据等操作,主要通过分析“脏数据”的产生原因和存在形式,利用现有的数据挖掘手段和方法去清洗“脏数据”,将“脏数据”转化为满足数据质量..._python数据预处理

华为鸿蒙系统支持批次,机型正式确认,鸿蒙OS 2.0第一批名单曝光!花粉:华为不够厚道...-程序员宅基地

文章浏览阅读96次。原标题:机型正式确认,鸿蒙OS 2.0第一批名单曝光!花粉:华为不够厚道最新消息:华为的鸿蒙OS2.0暂定在12月18日开放Beta测试版本,明年一二月份将面向部分手机用户提供升级渠道(机型下方公布),与此同时,华为方面表示,市面上百分之九十的华为机型都可以升级鸿蒙。 鸿蒙姗姗来迟‍从去年开始,中国的手机用户就在期待华为自家的手机操作系统,鸿蒙OS已经不只是简简单单的代表一个自研的操作系统了,它更..._鸿蒙开放批次

计算机遵守谁提出的基本原理,2010年全国自考计算机网络基本原理模拟试卷(十)及答案.doc...-程序员宅基地

文章浏览阅读97次。2010年全国自考计算机网络基本原理模拟试卷(十)及答案更多优质自考资料,请访问自考乐园俱乐部/club/53463892010年全国自考计算机网络基本原理模拟试卷(十)一、单项选择题(本大题共20小题,每小题1分,共20分)在每小题列出的四个备选项中只有一个是符合题目要求的,请将其代码填写在题后的括号内。错选、多选或未选均无分。1.在公开密钥密码体制中,()A.加密密钥能用来解密B.加密密钥不能..._ansi的高级通信控制过程adccp是

基于C#的波形显示控件的实现_kaic_c# 波形图控件-程序员宅基地

文章浏览阅读410次。开发完成后的波形显示控件,可以快速嵌入到.NET平台下的软件工程中,开发者只需简单的操作,就可以使用该控件友好地显示波形数据,从而达到快速开发的目的。本文先介绍了.NET平台下用户控件开发的基本方法,以及用C#描述的GDI+图形开发技术,然后提出一种基于C#的波形显示控件的设计思路,并对波形坐标值转换、坐标标尺、工具栏、局部放大等具体的设计细节进行详细解析。该波形显示控件能够根据当前要显示的波形数据的值,自动选择最佳的坐标范围,来直观地在控件的波形显示区域显示完整的波形曲线。关键词:波形显示控件;_c# 波形图控件

c语言考试程序改错只要结果对吗,计算机等级考试二级C语言程序设计第17章上机指导.ppt...-程序员宅基地

文章浏览阅读338次。计算机等级考试二级C语言程序设计第17章上机指导第17章 上机指导 17.1 上机考试简介   上机考试包括三个部分:程序填空题、程序改错题和程序设计题。填空和改错部分如果有指定的结果输出文件时,只要运行结果正确即可得满分,如果运行结果有错误或无结果文件输出时,则上机考试系统将对其修改或填充部分进行检测,如果其内容全部正确,则也可以得满分,如果部分正确,则按比例进行给分。而程序编制、调试运行类..._计算机二级c语言改错如果运行结果正确