摘要: class CameraClass{private: //成员变量的声明 D3DXVECTOR3 m_vRightVector; // 右分量向量 D3DXVECTOR3 m_vUpVector; // 上分量向量 D3DXVECTOR3 m_vLookVector; // 观察方向向量 D3DXVECTOR3 m_vCameraPosition; // 摄像机位置的向量 D3... 阅读全文
posted @ 2013-05-13 15:30 newShit 阅读(1821) 评论(0) 推荐(0) 编辑
摘要: //指定某一日期string datetime = "2013-5-13";//MessageBox.Show(((DateTime.Parse(datetime).DayOfWeek)).ToString());//返回值是英文的星期枚举//System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(DateTime.Now.DayOfWeek);//转化为中文的星期,要判断的日期是今天MessageBox.Show((((int)DateTime.Parse(datetime).Da 阅读全文
posted @ 2013-05-13 14:39 newShit 阅读(3168) 评论(0) 推荐(0) 编辑
摘要: 本文是对http://www.cnblogs.com/shit/archive/2012/04/11/2441737.html的改进。新增内容:增加一个控制台通过模拟wp7客户端进行客户端间的聊天互动 好像上个版本有中文问题,这个版本没有,手机可以接收到中文正常显示。 服务器采用中间转发,通过分词识别发送信息。控制台severusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Net.Sockets;using System 阅读全文
posted @ 2013-02-09 11:15 newShit 阅读(549) 评论(6) 推荐(2) 编辑
摘要: 提示:每个点可以多次搜索,但是要判断是否是较优解,用visit数组保存每个点的最优解,即最少转弯次数。#include<iostream>#include<cstdio>#include<queue>#include<memory.h>using namespace std; struct node{ int x,y,direction; int turn; }; int tnum,si,sr,ei,er,h,l; char map[101][101]; int visit[101][101]; #define reset(f,n) memset 阅读全文
posted @ 2012-08-02 12:56 newShit 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 本例实现一个简单的控制台与wp7端的聊天对话。采用多线程处理接入的客户端。代码都贴上来吧。注释写的很明白了应该。传下图:xaml文件: <Grid x:Name="LayoutRoot" Background="#FF3399FF"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <!--T 阅读全文
posted @ 2012-04-11 09:20 newShit 阅读(4165) 评论(16) 推荐(8) 编辑
摘要: 之前尝试了用webservice上传wav录音文件失败了,以为是工程上传的问题,现在改用Webclient上传,然后发现先前的想法是错的。。。。。过程:在xaml中放一个按钮,按住的时候录音,放开后保存录音,并上传在前台定义button的ManipulationStarted和ManipulationCompleted 事件,然后开始了----一堆微软的东西拿进去: //麦克单例 private Microphone microphone = Microphone.Default; //每次捕获音频缓存 private b... 阅读全文
posted @ 2012-03-19 14:52 newShit 阅读(1963) 评论(8) 推荐(4) 编辑
摘要: 本例通过webclient上传图片,首先在Mian.xaml.cs中:private void SelectButton_Click(object sender, RoutedEventArgs e) { PhotoChooserTask task = new PhotoChooserTask(); task.Completed += task_Completed; task.Show(); } private void task_Completed(object sender, Pho... 阅读全文
posted @ 2012-03-19 14:24 newShit 阅读(1446) 评论(10) 推荐(3) 编辑
摘要: WP7录音时遇到".Update has not been called.Regular FrameworkDispatcher.Update calls are necessary for fire and forget sound effects and framework events to function correctly. ",找了资料是这么说的:如果您从一个应用程序使用XNA框架,不执行游戏类,例如,一个Windows Phone应用程序中使用Silverlight应用程序的模型,你必须在XNA框架消息队列中调用自己的FrameworkDispatcher. 阅读全文
posted @ 2012-03-19 12:43 newShit 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 最近接了一个微博站内应用 分享一些经验微博站内应用要用oauth2.0授权针对Oauth2.0回调地址error:redirect_uri_mismatch错误解决办法 进入“创建应用”->“编辑属性”,如应用为站内应用进入“应用页面”填写“站内应用地址”;如其他应用进入“授权设置”填写回调地址,在相应程序中设置对应的回调地址,同时回调地址在绑定域名的范围内。更改完成后的数据不是实时生效的。 阅读全文
posted @ 2012-02-28 12:09 newShit 阅读(2102) 评论(0) 推荐(0) 编辑
摘要: 或者有时报错是A web application appears to have started a thread named ["thread name"] but has failed to stop it. This is very likely to create a memory leak.说个非配置和tomcat bug的原因,就是自己代码问题的情况原因:存储过程中的变量定义顺序和在java代码中调用时的变量赋值顺序有问题。例子:Create PROCEDURE your_proc_name ( @Tables varchar(1000), @PrimaryKe 阅读全文
posted @ 2011-12-21 11:29 newShit 阅读(616) 评论(0) 推荐(0) 编辑