小编Nel*_*eph的帖子

在HttpWebRequest中添加自定义标头

我需要为HttpWebRequest对象添加一些自定义标头.如何HttpWebRequest在Windows Phone 7中向对象添加自定义标题 .

c# header httpwebrequest http-headers windows-phone-7

80
推荐指数
2
解决办法
14万
查看次数

在Delphi 7中找不到文件

我是Delphi的初学者.我在Delphi 7中收到错误文件:'StreamFlashPlayer.dcu'.

如何修复此错误以及从哪里获取此StreamFlashPlayer.dcu文件

delphi delphi-7

6
推荐指数
2
解决办法
8019
查看次数

如何在delphi中设置表单的宽度和高度

如何在Delphi 7中设置表单的宽度和高度?表单包含不同类型的控件.我需要将主窗体大小设置为127x263.它应该在按钮单击中以编程方式更改.

delphi delphi-7

5
推荐指数
1
解决办法
1万
查看次数

在c#中查找和删除数组中的项

我有一个字符串数组.我需要从该数组中删除一些项目.但我不知道需要删除的项目的索引.

我的数组是:string [] arr = {"","a","b","","c","","d","","e","f",""," "}.

我需要删除""项目.即删除""后我的结果应该是arr = {"a","b","c","d","e","f"}

我怎样才能做到这一点?

c# arrays

5
推荐指数
2
解决办法
2万
查看次数

从delphi7中的按钮单击运行批处理文件

我有一个批处理文件和一个在delphi7中开发的应用程序.两者都很好.我想在单击按钮时运行批处理文件.我该怎么办?

谢谢尼尔森

delphi delphi-7

4
推荐指数
1
解决办法
5921
查看次数

如何在Windows Mobile 7上的C#中获取操作系统名称和版本详细信息?

如何查找使用Windows Phone os的手机中安装的操作系统名称和操作系统版本.

c# windows-phone-7

4
推荐指数
1
解决办法
7787
查看次数

刷新页面

我需要在wp7中刷新页面.在谷歌搜索并得到这个

NavigationService.Navigate(new Uri(NavigationService.Source + "?Refresh=true", UriKind.Relative));
Run Code Online (Sandbox Code Playgroud)

但是当我使用它时会出现错误,即应用程序中断.

如何在wp7中刷新当前页面?

windows-phone-7

4
推荐指数
1
解决办法
7900
查看次数

任务栏的宽度,高度和位置

我需要获得任务栏的宽度和高度.我还需要任务栏的位置.我怎么能得到这个?

delphi

3
推荐指数
2
解决办法
7876
查看次数

错误"IsolatedStorageFileStream上不允许操作".WP7

我正在尝试从中读取文本文件IsolatedStorage并检查它是否包含字符串.如果不是,则将字符串添加到文件的末尾.但是当我尝试将字符串写入文件时,我收到了一个错误:"Operation not permitted on IsolatedStorageFileStream.".我的代码如下所示.我怎样才能克服这个问题?

public void AddToDownloadList()
{
    IsolatedStorageFile downloadFile=IsolatedStorageFile.GetUserStoreForApplication();

    try
    {
        string downloads = string.Empty;

        if (!downloadFile.DirectoryExists("DownloadedFiles"))
            downloadFile.CreateDirectory( "DownloadedFiles" );

        if(downloadFile.FileExists("DownloadedFiles\\DownloadList.txt"))
        {
            IsolatedStorageFileStream downloadStream = downloadFile.OpenFile("DownloadedFiles\\DownloadList.txt",FileMode.Open, FileAccess.Read );

            using ( StreamReader reader = new StreamReader( downloadStream ) )
            {
                downloads = reader.ReadToEnd();
                reader.Close();
            }
            downloadFile.DeleteFile( "DownloadedFiles\\DownloadList.txt" );
        }

        downloadFile.CreateFile( "DownloadedFiles\\DownloadList.txt" );

        string currentFile = FileName;

        if ( !downloads.Contains( currentFile ) )
        {
            downloads += currentFile;

            using ( StreamWriter writeFile = new StreamWriter( new IsolatedStorageFileStream( …
Run Code Online (Sandbox Code Playgroud)

isolatedstorage windows-phone-7 windows-phone-7.1

3
推荐指数
1
解决办法
3135
查看次数

用c ++生成SHA256

我需要生成一些数据的SHA256.我发现这个例子非常好.现在我的问题是我可以使用自己的密钥生成sha256.

编辑:

首先,抱歉错误的问题.我并不是说要更改用于生成SHA256的密钥.我真的需要的是,将以下java代码转换为c ++

public static String calculateHMAC(String data, String key) throws Exception {
String result;
try {
    // get an hmac_sha2 key from the raw key bytes
    SecretKeySpec signingKey = new SecretKeySpec(key.getBytes(), HMAC_SHA2_ALGORITHM);

    // get an hmac_sha1 Mac instance and initialize with the signing key
    Mac sha256_HMAC = Mac.getInstance(HMAC_SHA2_ALGORITHM);
    sha256_HMAC.init(signingKey);

    // compute the hmac on input data bytes
    byte[] rawHmac = sha256_HMAC.doFinal(data.getBytes());

    // base64-encode the hmac 
    StringBuilder sb = new StringBuilder();
    char[] charArray = Base64.encode(rawHmac);
        for ( …
Run Code Online (Sandbox Code Playgroud)

c++ sha256

3
推荐指数
2
解决办法
3万
查看次数