嗨,我正在开发一个在Windows Phone 8.1中通过共享合同共享图片的应用程序.我的代码是
DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();
dataTransferManager.DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.DataRequested);
Run Code Online (Sandbox Code Playgroud)
和
private async void DataRequested(DataTransferManager sender, DataRequestedEventArgs args)
{
DataRequest request = args.Request;
request.Data.Properties.Title = "Unscramble this";
request.Data.Properties.Description = "";
request.Data.SetText(string.Format("Scrambled word is {0} and clue is {1}. Help me to unscramble this \r\n(via Unscramble Plus for Windows Phone)",scrambledString.ToUpper(),selectedMeanings.ToUpper()));
DataRequestDeferral deferral = request.GetDeferral();
// Make sure we always call Complete on the deferral.
try
{
//StorageFile logoFile = await Package.Current.InstalledLocation.GetFileAsync("Assets\\Logo.png");
StorageFile imagefile = await KnownFolders.PicturesLibrary.GetFileAsync("pic.png");
List<IStorageItem> storageItems = …Run Code Online (Sandbox Code Playgroud) Windows 8.1附带一个名为"SlideToShutdown"的功能.我试图以编程方式调用该可执行文件.我Process.Start();在C#,Shell()VB和C中试过(void)system();.
它说错误为'C:\Windows\System32\SlideToShutdown.exe' is not recognized as an internal or external command, operable program or batch file.
但是在执行命令提示符时start C:\windows\system32\slidetoshutdown.exe它完美无缺.

这是我的C程序(名为ac)来调用它
#include <stdlib.h>
#include <stdio.h>
int main()
{
(void)system("C:\\Windows\\System32\\SlideToShutDown.exe");
return(0);
}
Run Code Online (Sandbox Code Playgroud)
请帮我.
我有一个公式来评估
((x+y-1)*(x+y-2))/2 + x
Run Code Online (Sandbox Code Playgroud)
并获取它的字符串表示形式.所以在Java 1.7中我写了
public static void main(String[] args)
{
int x = 99999;
int y = 99999;
int answer = ((x+y-1)*(x+y-2))/2 + x;
String s = Integer.toString(answer);
System.out.println(s);
}
Run Code Online (Sandbox Code Playgroud)
并在Python 2.7中
def answer(x, y):
z = ((x+y-1)*(x+y-2))/2 + x
return str(z);
print(answer(99999,99999))
Run Code Online (Sandbox Code Playgroud)
Java给了我一些输出,672047173而Python给了我19999400005看似Python的价值是正确的.这种差异背后的原因是什么?