//function to display the application list public async void launch() { //以"深圳九幽网络科技有限公司"为例: await Windows.System.Launcher.LaunchUriAsync(new Uri("zune:search?publisher=深圳九幽网络科技有限公司")); }
privateasyncvoid SendEmailTask()
{
var emailMessage = new EmailMessage();
emailMessage.Subject = "subject";
emailMessage.Body = "body";
emailMessage.To.Add(new EmailRecipient("emailAddress"));
await EmailManager.ShowComposeNewEmailAsync(emailMessage);
}
注:配合 TextBlock中的
网络编程
http协议:
httpwebrequest:
get请求:
sqlite操作
wp8.1
注意:
修改数据应直接对数据库进行操作,而非数据列表。
修改数据库数据:
SQLiteAsyncConnection conn = connData();
ObservableCollection list = new ObservableCollection(await conn.Table().ToListAsync());
//for (int i = 0; i < list.Count; i++)
//{
// if (list[i].ID == 2)
// {
// list[i].Name = "小梦我爱你,再一次";
// }
//}
var query = conn.Table().Where(x => x.ID == 2);
var result = await query.ToListAsync();
foreach (var item in result)
{
item.Name = "小梦我爱你";
await conn.UpdateAsync(item);
}
//ObservableCollection lists = new ObservableCollection(await conn.Table().ToListAsync());*/
lv_appear.ItemsSource = list;
闪光灯:
如何在 Windows Phone 8 的应用中使用相机闪光灯
2014/6/18
适用于:Windows Phone 8 和 Windows Phone Silverlight 8.1 | Windows Phone OS 7.1
从 Windows Phone OS 7.1 开始,您可以使用 Microsoft.Devices.PhotoCamera 类以编程方式访问手机的相机。本主题介绍如何采用编程方式设置相机闪光灯模式。本主题是如何为 Windows Phone 8 创建基本相机应用的继续,并且假定您已在该主题中创建了基本相机项目。
提示:
从 Windows Phone 8 开始,应用可以将 PhotoCaptureDevice 类用于高级捕获方案。PhotoCaptureDevice 允许应用控制照片属性,例如 ISO、曝光补偿和手动对焦位置(在手机上可用时)。本主题没有演示PhotoCaptureDevice;有关使用此类的更多信息,请参见 Windows Phone 8 的高级照片拍摄。
// Activate a flash mode.// Cycle through flash mode options when the flash button is pressed.privatevoid changeFlash_Clicked(object sender, RoutedEventArgs e)
{
switch (cam.FlashMode)
{
case FlashMode.Off:
if (cam.IsFlashModeSupported(FlashMode.On))
{
// Specify that flash should be used.
cam.FlashMode = FlashMode.On;
FlashButton.Content = "Fl:On";
currentFlashMode = "Flash mode: On";
}
break;
case FlashMode.On:
if (cam.IsFlashModeSupported(FlashMode.RedEyeReduction))
{
// Specify that the red-eye reduction flash should be used.
cam.FlashMode = FlashMode.RedEyeReduction;
FlashButton.Content = "Fl:RER";
currentFlashMode = "Flash mode: RedEyeReduction";
}
elseif (cam.IsFlashModeSupported(FlashMode.Auto))
{
// If red-eye reduction is not supported, specify automatic mode.
cam.FlashMode = FlashMode.Auto;
FlashButton.Content = "Fl:Auto";
currentFlashMode = "Flash mode: Auto";
}
else
{
// If automatic is not supported, specify that no flash should be used.
cam.FlashMode = FlashMode.Off;
FlashButton.Content = "Fl:Off";
currentFlashMode = "Flash mode: Off";
}
break;
case FlashMode.RedEyeReduction:
if (cam.IsFlashModeSupported(FlashMode.Auto))
{
// Specify that the flash should be used in the automatic mode.
cam.FlashMode = FlashMode.Auto;
FlashButton.Content = "Fl:Auto";
currentFlashMode = "Flash mode: Auto";
}
else
{
// If automatic is not supported, specify that no flash should be used.
cam.FlashMode = FlashMode.Off;
FlashButton.Content = "Fl:Off";
currentFlashMode = "Flash mode: Off";
}
break;
case FlashMode.Auto:
if (cam.IsFlashModeSupported(FlashMode.Off))
{
// Specify that no flash should be used.
cam.FlashMode = FlashMode.Off;
FlashButton.Content = "Fl:Off";
currentFlashMode = "Flash mode: Off";
}
break;
}
// Display current flash mode.this.Dispatcher.BeginInvoke(delegate()
{
txtDebug.Text = currentFlashMode;
});
}
今天和同事争论一问题,关于静态变量与非静态变量的初始化顺序,谁先谁后,最终想整理出来!测试代码:
import java.util.Map;
public class T {
public static T t = new T();
private Map map = new HashMap();
public T(){
System.out.println(&quo
完整命令
CREATE DATABASE mynewdb USER SYS IDENTIFIED BY sys_password USER SYSTEM IDENTIFIED BY system_password LOGFILE GROUP 1 ('/u01/logs/my/redo01a.log','/u02/logs/m
多线程并发使用同一个channel
java.nio.BufferOverflowException: null
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:183) ~[na:1.7.0_60-ea]
at java.nio.ByteBuffer.put(ByteBuffer.java:832) ~[na:1.7.0_60-ea]