用C#读取图片的EXIF信息的方法
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Drawing;
using System.Drawing.Imaging;
using System.Collections; namespace YEMLWEB.AppHelper
{
public class Picturexif
{
#region 构造函数
/// <summary>
/// 构造函数
/// </summary>
public Picturexif()
{
}
#endregion #region 数据转换结构
/// <summary>
/// 转换数据结构
/// </summary>
public struct MetadataDetail
{
public string Hex;//十六进制字符串
public string RawValueAsString;//原始值串
public string DisplayValue;//显示值串
}
#endregion #region EXIF元素结构
/// <summary>
/// 结构:存储EXIF元素信息
/// </summary>
public struct Metadata
{
public MetadataDetail EquipmentMake;
public MetadataDetail CameraModel;
public MetadataDetail ExposureTime;//曝光时间
public MetadataDetail Fstop;
public MetadataDetail DatePictureTaken;
public MetadataDetail ShutterSpeed;// 快门速度
public MetadataDetail MeteringMode;//曝光模式
public MetadataDetail Flash;//闪光灯
public MetadataDetail XResolution;
public MetadataDetail YResolution;
public MetadataDetail ImageWidth;//照片宽度
public MetadataDetail ImageHeight;//照片高度 public MetadataDetail FNumber;// added f值,光圈数
public MetadataDetail ExposureProg;// added 曝光程序
public MetadataDetail SpectralSense;// added
public MetadataDetail ISOSpeed;// added ISO感光度
public MetadataDetail OECF;// added
public MetadataDetail Ver;// added EXIF版本
public MetadataDetail CompConfig;// added 色彩设置
public MetadataDetail CompBPP;// added 压缩比率
public MetadataDetail Aperture;// added 光圈值
public MetadataDetail Brightness;// added 亮度值Ev
public MetadataDetail ExposureBias;// added 曝光补偿
public MetadataDetail MaxAperture;// added 最大光圈值 public MetadataDetail SubjectDist;// added主体距离
public MetadataDetail LightSource;// added 白平衡
public MetadataDetail FocalLength;// added 焦距
public MetadataDetail FPXVer;// added FlashPix版本
public MetadataDetail ColorSpace;// added 色彩空间
public MetadataDetail Interop;// added
public MetadataDetail FlashEnergy;// added
public MetadataDetail SpatialFR;// added
public MetadataDetail FocalXRes;// added
public MetadataDetail FocalYRes;// added
public MetadataDetail FocalResUnit;// added
public MetadataDetail ExposureIndex;// added 曝光指数
public MetadataDetail SensingMethod;// added 感应方式
public MetadataDetail SceneType;// added
public MetadataDetail CfaPattern;// added
}
#endregion #region 查找EXIF元素值
public string LookupEXIFValue(string Description, string Value)
{
string DescriptionValue = null; switch (Description)
{
case "MeteringMode": #region MeteringMode
{
switch (Value)
{
case "":
DescriptionValue = "Unknown"; break;
case "":
DescriptionValue = "Average"; break;
case "":
DescriptionValue = "Center Weighted Average"; break;
case "":
DescriptionValue = "Spot"; break;
case "":
DescriptionValue = "Multi-spot"; break;
case "":
DescriptionValue = "Multi-segment"; break;
case "":
DescriptionValue = "Partial"; break;
case "":
DescriptionValue = "Other"; break;
}
}
#endregion break;
case "ResolutionUnit": #region ResolutionUnit
{
switch (Value)
{
case "":
DescriptionValue = "No Units"; break;
case "":
DescriptionValue = "Inch"; break;
case "":
DescriptionValue = "Centimeter"; break;
}
} #endregion break;
case "Flash": #region Flash
{
switch (Value)
{
case "":
DescriptionValue = "未使用"; break;
case "":
DescriptionValue = "闪光"; break;
case "":
DescriptionValue = "Flash fired but strobe return light not detected"; break;
case "":
DescriptionValue = "Flash fired and strobe return light detected"; break;
}
}
#endregion break;
case "ExposureProg": #region ExposureProg
{
switch (Value)
{
case "":
DescriptionValue = "没有定义"; break;
case "":
DescriptionValue = "手动控制"; break;
case "":
DescriptionValue = "程序控制"; break;
case "":
DescriptionValue = "光圈优先"; break;
case "":
DescriptionValue = "快门优先"; break;
case "":
DescriptionValue = "夜景模式"; break;
case "":
DescriptionValue = "运动模式"; break;
case "":
DescriptionValue = "肖像模式"; break;
case "":
DescriptionValue = "风景模式"; break;
case "":
DescriptionValue = "保留的"; break;
}
} #endregion break;
case "CompConfig": #region CompConfig
{
switch (Value)
{ case "":
DescriptionValue = "YCbCr"; break;
}
}
#endregion break;
case "Aperture": #region Aperture
DescriptionValue = Value;
#endregion break;
case "LightSource": #region LightSource
{
switch (Value)
{
case "":
DescriptionValue = "未知"; break;
case "":
DescriptionValue = "日光"; break;
case "":
DescriptionValue = "荧光灯"; break;
case "":
DescriptionValue = "白炽灯"; break;
case "":
DescriptionValue = "闪光灯"; break;
case "":
DescriptionValue = "标准光A"; break;
case "":
DescriptionValue = "标准光B"; break;
case "":
DescriptionValue = "标准光C"; break;
case "":
DescriptionValue = "标准光D55"; break;
case "":
DescriptionValue = "标准光D65"; break;
case "":
DescriptionValue = "标准光D75"; break;
case "":
DescriptionValue = "其它"; break;
}
} #endregion
break; }
return DescriptionValue;
}
#endregion #region 取得图片的EXIF信息
public Metadata GetEXIFMetaData(string PhotoName)
{
// 创建一个图片的实例
System.Drawing.Image MyImage = System.Drawing.Image.FromFile(PhotoName);
// 创建一个整型数组来存储图像中属性数组的ID
int[] MyPropertyIdList = MyImage.PropertyIdList;
//创建一个封闭图像属性数组的实例
PropertyItem[] MyPropertyItemList = new PropertyItem[MyPropertyIdList.Length];
//创建一个图像EXIT信息的实例结构对象,并且赋初值 #region 创建一个图像EXIT信息的实例结构对象,并且赋初值
Metadata MyMetadata = new Metadata();
MyMetadata.EquipmentMake.Hex = "10f";
MyMetadata.CameraModel.Hex = "";
MyMetadata.DatePictureTaken.Hex = "";
MyMetadata.ExposureTime.Hex = "829a";
MyMetadata.Fstop.Hex = "829d";
MyMetadata.ShutterSpeed.Hex = "";
MyMetadata.MeteringMode.Hex = "";
MyMetadata.Flash.Hex = "";
MyMetadata.FNumber.Hex = "829d"; //added
MyMetadata.ExposureProg.Hex = ""; //added
MyMetadata.SpectralSense.Hex = ""; //added
MyMetadata.ISOSpeed.Hex = ""; //added
MyMetadata.OECF.Hex = ""; //added
MyMetadata.Ver.Hex = ""; //added
MyMetadata.CompConfig.Hex = ""; //added
MyMetadata.CompBPP.Hex = ""; //added
MyMetadata.Aperture.Hex = ""; //added
MyMetadata.Brightness.Hex = ""; //added
MyMetadata.ExposureBias.Hex = ""; //added
MyMetadata.MaxAperture.Hex = ""; //added
MyMetadata.SubjectDist.Hex = ""; //added
MyMetadata.LightSource.Hex = ""; //added
MyMetadata.FocalLength.Hex = "920a"; //added
MyMetadata.FPXVer.Hex = "a000"; //added
MyMetadata.ColorSpace.Hex = "a001"; //added
MyMetadata.FocalXRes.Hex = "a20e"; //added
MyMetadata.FocalYRes.Hex = "a20f"; //added
MyMetadata.FocalResUnit.Hex = "a210"; //added
MyMetadata.ExposureIndex.Hex = "a215"; //added
MyMetadata.SensingMethod.Hex = "a217"; //added
MyMetadata.SceneType.Hex = "a301";
MyMetadata.CfaPattern.Hex = "a302";
#endregion // ASCII编码
System.Text.ASCIIEncoding Value = new System.Text.ASCIIEncoding(); int index = ;
int MyPropertyIdListCount = MyPropertyIdList.Length;
if (MyPropertyIdListCount != )
{
foreach (int MyPropertyId in MyPropertyIdList)
{
string hexVal = "";
MyPropertyItemList[index] = MyImage.GetPropertyItem(MyPropertyId); #region 初始化各属性值
string myPropertyIdString = MyImage.GetPropertyItem(MyPropertyId).Id.ToString("x");
switch (myPropertyIdString)
{
case "10f":
{
MyMetadata.EquipmentMake.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.EquipmentMake.DisplayValue = Value.GetString(MyPropertyItemList[index].Value);
break;
} case "":
{
MyMetadata.CameraModel.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.CameraModel.DisplayValue = Value.GetString(MyPropertyItemList[index].Value);
break; } case "":
{
MyMetadata.DatePictureTaken.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.DatePictureTaken.DisplayValue = Value.GetString(MyPropertyItemList[index].Value);
break;
} case "":
{
MyMetadata.MeteringMode.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.MeteringMode.DisplayValue = LookupEXIFValue("MeteringMode", BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString());
break;
} case "":
{
MyMetadata.Flash.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.Flash.DisplayValue = LookupEXIFValue("Flash", BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString());
break;
} case "829a":
{
MyMetadata.ExposureTime.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
string StringValue = "";
for (int Offset = ; Offset < MyImage.GetPropertyItem(MyPropertyId).Len; Offset = Offset + )
{
StringValue += BitConverter.ToInt32(MyImage.GetPropertyItem(MyPropertyId).Value, Offset).ToString() + "/";
}
MyMetadata.ExposureTime.DisplayValue = StringValue.Substring(, StringValue.Length - );
break;
}
case "829d":
{
MyMetadata.Fstop.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
int int1;
int int2;
int1 = BitConverter.ToInt32(MyImage.GetPropertyItem(MyPropertyId).Value, );
int2 = BitConverter.ToInt32(MyImage.GetPropertyItem(MyPropertyId).Value, );
MyMetadata.Fstop.DisplayValue = "F/" + (int1 / int2); MyMetadata.FNumber.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.FNumber.DisplayValue = BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString(); break;
}
case "":
{
MyMetadata.ShutterSpeed.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
string StringValue = BitConverter.ToInt32(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString();
MyMetadata.ShutterSpeed.DisplayValue = "1/" + StringValue;
break;
} case "":
{
MyMetadata.ExposureProg.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.ExposureProg.DisplayValue = LookupEXIFValue("ExposureProg", BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString());
break;
} case "":
{
MyMetadata.SpectralSense.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.SpectralSense.DisplayValue = Value.GetString(MyPropertyItemList[index].Value);
break;
}
case "":
{
hexVal = "";
MyMetadata.ISOSpeed.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
hexVal = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value).Substring(, );
MyMetadata.ISOSpeed.DisplayValue = Convert.ToInt32(hexVal, ).ToString();//Value.GetString(MyPropertyItemList[index].Value);
break;
} case "":
{
MyMetadata.OECF.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.OECF.DisplayValue = Value.GetString(MyPropertyItemList[index].Value);
break;
} case "":
{
MyMetadata.Ver.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.Ver.DisplayValue = Value.GetString(MyPropertyItemList[index].Value).Substring(, ) + "." + Value.GetString(MyPropertyItemList[index].Value).Substring(, );
break;
} case "":
{
MyMetadata.CompConfig.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.CompConfig.DisplayValue = LookupEXIFValue("CompConfig", BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString());
break;
} case "":
{
MyMetadata.CompBPP.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.CompBPP.DisplayValue = BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString();
break;
} case "":
{
hexVal = "";
MyMetadata.Aperture.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
hexVal = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value).Substring(, );
hexVal = Convert.ToInt32(hexVal, ).ToString();
hexVal = hexVal + "";
MyMetadata.Aperture.DisplayValue = hexVal.Substring(, ) + "." + hexVal.Substring(, );
break;
} case "":
{
hexVal = "";
MyMetadata.Brightness.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
hexVal = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value).Substring(, );
hexVal = Convert.ToInt32(hexVal, ).ToString();
hexVal = hexVal + "";
MyMetadata.Brightness.DisplayValue = hexVal.Substring(, ) + "." + hexVal.Substring(, );
break;
} case "":
{
MyMetadata.ExposureBias.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.ExposureBias.DisplayValue = BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString();
break;
} case "":
{
hexVal = "";
MyMetadata.MaxAperture.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
hexVal = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value).Substring(, );
hexVal = Convert.ToInt32(hexVal, ).ToString();
hexVal = hexVal + "";
MyMetadata.MaxAperture.DisplayValue = hexVal.Substring(, ) + "." + hexVal.Substring(, );
break;
} case "":
{
MyMetadata.SubjectDist.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.SubjectDist.DisplayValue = Value.GetString(MyPropertyItemList[index].Value);
break;
} case "":
{
MyMetadata.LightSource.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.LightSource.DisplayValue = LookupEXIFValue("LightSource", BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString());
break;
} case "920a":
{
hexVal = "";
MyMetadata.FocalLength.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
hexVal = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value).Substring(, );
hexVal = Convert.ToInt32(hexVal, ).ToString();
hexVal = hexVal + "";
MyMetadata.FocalLength.DisplayValue = hexVal.Substring(, ) + "." + hexVal.Substring(, );
break;
} case "a000":
{
MyMetadata.FPXVer.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.FPXVer.DisplayValue = Value.GetString(MyPropertyItemList[index].Value).Substring(, ) + "." + Value.GetString(MyPropertyItemList[index].Value).Substring(, );
break;
} case "a001":
{
MyMetadata.ColorSpace.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
if (BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString() == "")
MyMetadata.ColorSpace.DisplayValue = "RGB";
if (BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString() == "")
MyMetadata.ColorSpace.DisplayValue = "Uncalibrated";
break;
} case "a20e":
{
MyMetadata.FocalXRes.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.FocalXRes.DisplayValue = BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString();
break;
} case "a20f":
{
MyMetadata.FocalYRes.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.FocalYRes.DisplayValue = BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString();
break;
} case "a210":
{
string aa;
MyMetadata.FocalResUnit.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
aa = BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString(); ;
if (aa == "") MyMetadata.FocalResUnit.DisplayValue = "没有单位";
if (aa == "") MyMetadata.FocalResUnit.DisplayValue = "英尺";
if (aa == "") MyMetadata.FocalResUnit.DisplayValue = "厘米";
break;
} case "a215":
{
MyMetadata.ExposureIndex.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.ExposureIndex.DisplayValue = Value.GetString(MyPropertyItemList[index].Value);
break;
} case "a217":
{
string aa;
aa = BitConverter.ToInt16(MyImage.GetPropertyItem(MyPropertyId).Value, ).ToString();
MyMetadata.SensingMethod.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
if (aa == "") MyMetadata.SensingMethod.DisplayValue = "1 chip color area sensor";
break;
} case "a301":
{
MyMetadata.SceneType.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.SceneType.DisplayValue = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
break;
} case "a302":
{
MyMetadata.CfaPattern.RawValueAsString = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
MyMetadata.CfaPattern.DisplayValue = BitConverter.ToString(MyImage.GetPropertyItem(MyPropertyId).Value);
break;
} }
#endregion index++;
}
} MyMetadata.XResolution.DisplayValue = MyImage.HorizontalResolution.ToString();
MyMetadata.YResolution.DisplayValue = MyImage.VerticalResolution.ToString();
MyMetadata.ImageHeight.DisplayValue = MyImage.Height.ToString();
MyMetadata.ImageWidth.DisplayValue = MyImage.Width.ToString();
MyImage.Dispose();
return MyMetadata;
}
#endregion
}
}
然后就是个调用的问题,有了这个类,我如何读取图片的EXIF信息呢?代码如下
Picturexif em = new Picturexif();
string filePath = Server.MapPath("Test.jpg");//这里可以动态传递图片路径的
Picturexif.Metadata m = em.GetEXIFMetaData(filePath);//这里就是调用,传图片绝对路径
string exif = m.Ver.DisplayValue;
string camera = m.CameraModel.DisplayValue;
string model = m.CameraModel.DisplayValue;
string aperture = m.Aperture.DisplayValue;
string shutter = m.ShutterSpeed.DisplayValue;
string sensitive = m.ExposureIndex.DisplayValue;
用C#读取图片的EXIF信息的方法的更多相关文章
- 用C#读取相片(JPG图片)的EXIF信息的方法
引言:EXIF,是英文Exchangeable Image File{}#endregion#region 数据转换结构/// summary>/// 转换数据结构/// /summary> ...
- IOS: 使用imageIO获取和修改图片的exif信息
使用imageIO获取和修改图片的exif信息 一幅图片除了包含我们能看见的像素信息,背后还包含了拍摄时间,光圈大小,曝光等信息.UIImage类将这些细节信息都隐藏了起来,只提供我们关心的图片尺寸, ...
- C# 获取图片的EXIF 信息
关于 EXIF 信息的介绍. 1 EXIF,是英文Exchangeable Image File(可交换图像文件)的缩写.EXIF是一种图像文件格式,只是文件的后缀名为jpg.EXIF信息是由数码相 ...
- GOEXIF读取和写入EXIF信息
最新版本的gexif,直接基于gdi+实现了exif信息的读取和写入,代码更清晰. /* * File: gexif.h * Purpose: cpp EXIF reader * 3/2/2017 & ...
- 在Android下通过ExifInterface类操作图片的Exif信息
什么是Exif 先来了解什么是Exif.Exif是一种图像文件格式,它的数据存储于JPEG格式是完全相同的,实际上Exif格式就是JPEG格式头插入了 数码照片的信息,包括拍摄的光圈.快门.平衡白.I ...
- 使用Java程序读取JPG Tif等格式图片的exif信息
package com.util; import java.io.File;import java.util.Iterator; import com.drew.imaging.ImageProces ...
- 利用php获取图片完整Exif信息类 获取图片详细完整信息类
<?php /** * @Author: TonyLevid * @Copyright: TonyLevid.com * @Name: Image Exif Class * @Version: ...
- 获取图片的EXIF信息
对于专业的摄影师来说,Exif信息是很重要的信息,也包含了非常多的东西 1.EXIF EXIF(Exchangeable Image File)是“可交换图像文件”的缩写,当中包含了专门为数码相机的照 ...
- Android 获取图片exif信息
使用android api读取图片的exif信息 布局代码: <LinearLayout xmlns:android="http://schemas.android.com/apk/r ...
随机推荐
- java自定义类
引用数据类型(类) 引用数据类型分类 提到引用数据类型(类),其实我们对它并不陌生,之前使用过的Scanner类.Random类. 我们可以把类的类型为两种: 第一种,Java为我们提供好的类,如Sc ...
- Linux命令之usermod
usermod [选项] 登录名 usermod修改用户基本信息. (1).常用选项 -d,--home HOME_DIR 用户的新主目录 -g,--gid GROUP 强制GROUP为新主组 -G, ...
- socket的使用一
socket概念 socket层 理解socket Socket是应用层与TCP/IP协议族通信的中间软件抽象层,它是一组接口.在设计模式中,Socket其实就是一个门面模式,它把复杂的TCP/IP协 ...
- HDU 6134 Battlestation Operational(莫比乌斯反演)
[题目链接] http://acm.hdu.edu.cn/showproblem.php?pid=6134 [题目大意] 求$\sum_{i=1}^{n}{\sum_{j=1}^{i}\lceil{\ ...
- 【离散化】【DFS】Gym - 101617H - Security Badges
题意:给你一张有向图,每条边有个限制范围,只有权值在限制范围内的人能走这条边,问你权值不超过K的人中,有多少人能从S到T. K很大,因此我们只处理边的范围的上下界这O(m)个权值能否到达,以防万一,还 ...
- nginx的重试机制以及nginx常用的超时配置说明
nginx的重试机制 现在对外服务的网站,很少只使用一个服务节点,而是部署多台服务器,上层通过一定机制保证容错和负载均衡. nginx就是常用的一种HTTP和反向代理服务器,支持容错和负载均衡. ng ...
- python开发_tkinter
Tkinter模块("Tk 接口")是Python的标准Tk GUI工具包的接口.Tk和Tkinter可以在大多数的Unix平台下使用, 同样可以应用在Windows和Macint ...
- 【转】2012年7月9 – 知名网页游戏公司 PHP高级工程师 最新面试题
开头先唠叨两句,今天下午,上海的天热的让人窒息啊.Google下地图,好远!要做公交,想想就是人挤人.咬了下牙,打的,尼玛百来块啊,有木有!麻麻的,更让我萌生买车的决心了. 到了公司,环境不错.前台拿 ...
- Windows Embedded Compact 7网络编程概述(上)
如今,不论是嵌入式设备.PDA还是智能手机,网络都是必不可少的模块.网络使人们更方便地共享设备上的信息和资源.而且,利用智能手机浏览互联网,也逐渐成为生活中的常见手段.物联网所倡导的物物相联,也离不开 ...
- Step by Step 設定 TFS 2012 Create Team Project 權限 - 避免 TF218017、TF250044
基本上權限的設定和 以往的 TFS 沒有什麼太大的差別 只是這次的權限設定畫面有略作些調整,我還是一併整理一下 當我們用 TFSSetup 的帳號安裝完 TFS 2012 後 想要在自已的電腦上用自已 ...