我正在尝试从.net编写一个WEB API,并尝试让我的Android应用程序从sql server数据库中查询一些数据.
我编写了web api,它在调试模式下运行良好.
我的问题是我注意到该应用程序的URL是localhost:port,它运行正常.但是,当我尝试将其更改为MYIP:port (eg. http:192.168.X.1234)或者MYHOSTNAME:port (eg win7home:1234)这给了我Bad Request - Invalid Hostname.
我知道我可以将其部署到IIS并且我的IIS已经设置但我只是想知道它怎么会在调试模式下不起作用???
有没有办法让我在调试模式下运行它并同时在我的Android上测试,而不是每次我想要进行更改时都要部署它?
我想MediaElement在Windows Phone 8中为我的对象手动设置速度比.没有SpeedRatio属性,我似乎无法使用SmoothStreamingMediaElement (Microsoft.Web.Media.SmoothStreaming命名空间的一部分).
MediaElement对于Windows Phone 8,还有其他方法可以设置我的速度(我需要减慢播放速度)吗?
谢谢!
我有两种类型的字符串.一个是"abcdEfgh"和"abcd efgh".这意味着第一个String中间有大写字母,第二个字符串有空格.那么现在如何在java中检查这两个模式字符串并生成两个字符串.
String givenString;
if (givenString.equals("abcdEfgh")) {
String str1 = abcd;
String str2 = Efgh;
} else (givenString.equals("abcd efgh") {
String str1 = abcd;
String str2 = efgh;
}
Run Code Online (Sandbox Code Playgroud)
请提供解决方案谢谢
有没有办法降低AppBarXAML UWP 中Bottom的高度?我有以下XAML代码:
<Page.BottomAppBar>
<CommandBar Height="35">
<CommandBar.SecondaryCommands>
<AppBarButton Label="Share"/>
<AppBarButton Label="Settings"/>
<AppBarButton Label="Settings"/>
<AppBarButton Label="Settings"/>
<AppBarButton Label="Settings"/>
<AppBarButton Label="Settings"/>
<AppBarButton Label="Settings"/>
</CommandBar.SecondaryCommands>
</CommandBar>
</Page.BottomAppBar>
Run Code Online (Sandbox Code Playgroud)
问题是,当我将高度设置为35或低于50时,我会在底部AppBar上方看到一个额外的空白区域.如果我使用黑色或蓝色作为背景颜色,则该空白区域呈现白色

for循环在下面java代码停止在第一次迭代中,我不知道为什么!你能帮助我吗?
controllerSwitches元素是{1,2}
allSwithces元素是{1,2,3,4}
for (int p = 0; p < controllerSwitches.length; p++)
{
switches tempSwitch = controllerSwitches[p];
for (int w = 0; w <= allSwithces.size(); w++)
{
System.out.println(tempSwitch.getSwitchId() +"\t" + allSwithces.get(w).getSwitchId());
if (allSwithces.get(w).getSwitchId().equals(tempSwitch.getSwitchId()))
{
failedControllerswitches.add(allSwithces.get(w)); // it is break after getting the first p index
}
continue;
}
continue;
}
Run Code Online (Sandbox Code Playgroud)
它获得第一个p索引并将其与allSwitches列表的所有元素进行比较,然后打破循环.我的意思是它没有进入第二个p指数.输出是
1 1
1 2
1 3
1 4
它不会将controllerSwitches的第二个元素与allSwithces元素进行比较