我刚刚获得了Windows Server 2008 VPS,但我无法安装IIS7.
我在IIS中创建了一个新的网站,其中包含路径,IP地址和主机名(如"www.nameofsite.com"),然后单击"确定".当我浏览网站时,它会在浏览器中显示" http://www.nameofsite.com "并且......没有... IE无法显示此网页.
如果我在绑定中删除主机名并单击[浏览]它工作正常(它需要我到http://10.10.2.92 - 计算机的IP).因此,输入主机名会破坏网站.
关于我缺少的任何想法?服务我可能没有运行或我失踪的角色?
最初没有在VPS上安装任何服务器角色,所以我安装了IIS,DHCP,DNS和Application Server ...矫枉过正,但我不确定要安装什么.
我想学习如何使用绑定函数.这是一个想法:我有这个参数的功能:
void print_i(int t, std::string separator)
{
std::cout << t << separator;
}
Run Code Online (Sandbox Code Playgroud)
我想这样做:
std::vector<int> elements;
// ...
for_each(elements.begin(), elements.end(), std::bind2nd(print_i, '\n'));
Run Code Online (Sandbox Code Playgroud)
但它不起作用!
这是我得到的:
/usr/include/c++/4.3/backward/binders.h: In instantiation of ‘std::binder2nd<void ()(int, std::string)>’:
main.cpp:72: instantiated from here
/usr/include/c++/4.3/backward/binders.h:138: error: ‘void ()(int, std::string)’ is not a class, struct, or union type
/usr/include/c++/4.3/backward/binders.h:141: error: ‘void ()(int, std::string)’ is not a class, struct, or union type
/usr/include/c++/4.3/backward/binders.h:145: error: ‘void ()(int, std::string)’ is not a class, struct, or union type
/usr/include/c++/4.3/backward/binders.h:149: error: ‘void ()(int, std::string)’ is …Run Code Online (Sandbox Code Playgroud) 是否可以使WrapPanel的内容(子)绑定到依赖属性?
我在想的是有一个类型为List的依赖属性,然后为MyClass定义一个模板.
然后让WrapPanel显示它们.
我知道使用列表框可以轻松完成,但由于其他限制,我需要在转到列表框之前尝试使用WrapPanel.
我正在使用MVVM.我更喜欢这种模式.如果我要打破MVVM,我可以使用一个事件或命名它并在加载时填充它.我希望有一种更清洁的约束方式.
我刚刚开始尝试使用WPF模板和样式,我不确定我做错了什么.下面的目标是交替菜单中选项的颜色.代码可以正常工作,但是当我为"MenuChoiceOdd"的第二段复制并粘贴/重命名时,我收到以下错误:
>在'System.Windows.Baml2006.TypeConverterMarkupExtension'上提供值引发异常.
代码示例:
<Window x:Class="WpfApplication1.Template_Testing"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Template_Testing" Height="300" Width="300">
<Grid>
<Grid.Resources>
<ControlTemplate x:Key="MenuChoiceEven">
<Border BorderThickness="1" BorderBrush="#FF4A5D80">
<TextBlock Height="Auto" HorizontalAlignment="Stretch" Margin="0" Width="Auto" FontSize="14" Foreground="SlateGray" TextAlignment="Left" AllowDrop="True" Text="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}">
<TextBlock.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White" Offset="0" />
<GradientStop Color="#FFC2CCDB" Offset="1" />
</LinearGradientBrush>
</TextBlock.Background>
</TextBlock>
</Border>
</ControlTemplate>
<ControlTemplate x:Key="MenuChoiceOdd">
<Border BorderThickness="1" BorderBrush="#FF4A5D80">
<TextBlock Height="Auto" HorizontalAlignment="Stretch" Margin="0" Width="Auto" FontSize="14" Foreground="SlateGray" TextAlignment="Left" AllowDrop="True" Text="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}">
<TextBlock.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White" Offset="0" />
<GradientStop Color="##FFCBCBCB" Offset="1" />
</LinearGradientBrush>
</TextBlock.Background>
</TextBlock> …Run Code Online (Sandbox Code Playgroud) 我有一个加载的页面,加载后,它会输入一个LI列表来填充新闻源.
<li><a href="/url/" class="quickview">quick view</a></li>
<li><a href="/url/" class="quickview">quick view</a></li>
<li><a href="/url/" class="quickview">quick view</a></li>
Run Code Online (Sandbox Code Playgroud)
当用户点击快速查看但没有任何运气时,我正试图让奇特的盒子触发.有任何想法吗?
$(document).ready(function() {
$('.quickview').fancybox();
});
Run Code Online (Sandbox Code Playgroud)
还尝试过:
$(document).ready(function() {
$('a.quickview').live('click', function() {
$(this).fancybox();
});
});
Run Code Online (Sandbox Code Playgroud)
谢谢你的任何想法......
第一; 问题是修辞,我有一个答案!看到这里我得到了很多帮助,我想把这个巧妙的技巧拿回来.
想象一下,你有一个你想要绑定的值,但它在某种程度上或有些错误.
我对元数据发布概念感到困惑.
如果在WCF服务配置文件中我写了:
<serviceMetadata httpGetEnabled="false"/>
Run Code Online (Sandbox Code Playgroud)
无论是真是假.当我尝试使用"添加服务引用..."在客户端应用程序中提供服务引用并单击"发现"时,我能够检索服务引用.
但删除以下两行: -
<endpoint address="mex" binding="mexBasicHttpBinding" contract="IMetadataExchange"/>
<serviceMetadata httpGetEnabled="false"/>
Run Code Online (Sandbox Code Playgroud)
如今后,当我试图给使用客户端应用程序引用"添加服务引用...",并点击"查看",我不能够检索服务参考.
现在任何人都可以告诉我它究竟意味着什么.为什么在将其设置为False之后仍然允许设置参考.为什么在删除这些行之后它不允许设置引用.
-Anil
我正在尝试更新特定网站上的http绑定,我可以这样做:
Set-ItemProperty "IIS:\Sites\SiteName" -Name bindings -Value @{protocol="http";bindingInformation=*:80:hostname.site.net}
Run Code Online (Sandbox Code Playgroud)
我遇到的问题是这个命令完全取代了绑定信息,所以如果有一个https绑定,那么它会被Set-ItemProperty删除.
有没有人知道如何更新像HTTP这样的特定绑定而不必删除其他绑定或重新创建整个绑定字符串?
我非常喜欢Caliburn和命名约定绑定,并且惊讶于Visibility的绑定方式与"CanNAME"约定用于保护Action的方式不同.据我所知,只有在Caliburn中明确使用Binding时才使用BooleanToVisibilityConverter,而不是像guard方法那样自动使用.所以我想修改源代码以自动绑定到"bool?ControlNameIsVisible()"(null等于崩溃)或类似.我想知道这是否是正确的方法,如果有人已经完成了实施并且可以在这里分享它.
我尝试使用动态生成列创建ListView.我用mvvm patern.我该如何实现呢?在这个momemt我只有静态列.
<ListView ItemsSource="{Binding ProblemProducts}"
Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="4">
<ListView.View>
<GridView>
<GridViewColumn Header="Spisuj?cy" DisplayMemberBinding="{Binding _spisujacy}" Width="auto"/>
<GridViewColumn Header="Miejsce sk?adowania" DisplayMemberBinding="{Binding MiejsceSkladowania}" Width="auto"/>
<GridViewColumn Header="Typ spisu" DisplayMemberBinding="{Binding _typSpisu}" Width="auto"/>
<GridViewColumn Header="Kod" DisplayMemberBinding="{Binding Kod}" width="auto"/>
</GridView>
</ListView.View>
</ListView>
Run Code Online (Sandbox Code Playgroud)