我有这些我正在设计的div .tocolor
,但我还需要唯一的标识符1,2,3,4等,所以我将它添加为另一个类tocolor-1
.
<div class="tocolor tocolor-1"> tocolor 1 </div>
<div class="tocolor tocolor-2"> tocolor 2 </div>
<div class="tocolor tocolor-3"> tocolor 3 </div>
<div class="tocolor tocolor-4"> tocolor 4 </div>
.tocolor{
background: red;
}
Run Code Online (Sandbox Code Playgroud)
有没有办法只有一个班级tocolor-*
.我尝试使用*
这个css中的通配符,但它没有用.
.tocolor-*{
background: red;
}
Run Code Online (Sandbox Code Playgroud) 我在Windows 7上运行了XAMPP安装.
只要我将一个VirtualHost添加到httpd-vhosts.conf,那么'常规' http://localhost
和新的dropbox.local
都不起作用.
这是我添加到我的httpd-vhosts.conf中的内容:
<VirtualHost *:80>
ServerAdmin postmaster@dummy-host.localhost
DocumentRoot "E:/Documenten/Dropbox/Dropbox/dummy-htdocs"
ServerName dropbox.local
ServerAlias www.dropbox.local
ErrorLog "logs/dropbox.local-error.log"
CustomLog "logs/dropbox.local-access.log" combined
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
所以我查看了我的dropbox.local-error.log以获取任何信息:
[Thu Feb 02 10:41:57 2012] [error] [client 127.0.0.1] client denied by server configuration: E:/Documenten/Dropbox/Dropbox/dummy-htdocs/
Run Code Online (Sandbox Code Playgroud)
这个错误似乎可以通过添加来解决
<directory "E:/Documenten/Dropbox/Dropbox/dummy-htdocs">
Allow from all
</directory>
Run Code Online (Sandbox Code Playgroud)
但现在我在dropbox.local-error.log中收到此错误:
[Thu Feb 02 10:45:56 2012] [error] [client ::1] Directory index forbidden by Options directive: E:/Documenten/Dropbox/Dropbox/dummy-htdocs/
Run Code Online (Sandbox Code Playgroud)
此外,当我尝试访问时httpd-vhosts.conf
,我没有在常规中得到任何错误dropbox.local-error.log
,虽然我得到了dropbox.local-error.log
当我尝试访问它时.
任何人都可以帮忙......这让我很生气:S
编辑:还有http://localhost
以下(我已经多次提到它,所以在任何人说之前):
<IfModule dir_module>
DirectoryIndex index.php index.pl index.cgi index.asp …
Run Code Online (Sandbox Code Playgroud) 我想在php中使用特定的日期格式获取昨天的日期,这是格式:
$today = date("d.m.Y"); //15.04.2013
Run Code Online (Sandbox Code Playgroud)
可能吗?
如果应该分别更改,请考虑月份和年份.
我浪费了很多时间来搜索输入和输入组的自己的xs大小(小于小), 所以这是代码!
Peter Butkovic将错误/请求上传到bootstrap github:https:
//github.com/twbs/bootstrap/issues/15107
以下是他们的回复:
我们不会将它添加到v3中,我认为即使在v4中我们也不会有xs按钮,但如果我们选择保留它,我会记住它.
在我的Visual Studio 2013 RC项目中,我得到了这个错误信息:
" 类型'System.Net.Http.Formatting.MediaTypeFormatter'是在未引用的程序集中定义的.您必须添加对程序集'System.Net.Http.Formatting,Version = 4.0.0.0,Culture = neutral, PublicKeyToken = 31bf3856ad364e35' "
...在"var response = "
Controller中的代码行上:
public HttpResponseMessage PostDelivery(Delivery delivery)
{
delivery = repository.Add(delivery);
var response = Request.CreateResponse<Delivery>(HttpStatusCode.Created, delivery);
string uri = Url.Link("DefaultApi", new { id = delivery.Id });
response.Headers.Location = new Uri(uri);
return response;
}
Run Code Online (Sandbox Code Playgroud)
在我的硬盘中搜索所需的程序集("System.Net.Http.Formatting"),它向我显示了它存在的几个位置,但它们都在现有项目中,如下所示:
当然还有另一个位置,可以从中引用System.Net.Http.Formatting.dll!但是哪里?
试着按照这里的线索:http://www.nuget.org/packages/System.Net.Http.Formatting
IOW,选择工具>库包管理器>包管理器控制台,然后输入:
Install-Package System.Net.Http.Formatting -Version 4.0.20710
Run Code Online (Sandbox Code Playgroud)
......我看到潘普洛纳(不是饮料)的红牛在我身上肆虐:
我从这里添加了System.Net.Http.Formatting.dll:
C:\Users\clay\My Documents\Visual Studio 2013\Projects\MvcApplication1\MvcApplication1\bin
Run Code Online (Sandbox Code Playgroud)
......它现在编译并运行并按预期工作,但这显然是"不是首选的方法"
system.net .net-assembly visual-studio-debugging mediatypeformatter visual-studio-2013
快速搜索货币正则表达式会带来很多结果.
我选择其中之一的问题是,如果不测试所有边缘情况,正则表达式很难验证.我可以花很多时间在这上面,因为我相信其他数百名开发人员已经做过了.
有没有人有美国货币的正则表达式已经过彻底测试?
我唯一的要求是匹配的字符串是US Currency并解析为System.Decimal:
[ws][sign][digits,]digits[.fractional-digits][ws] Elements in square brackets ([ and ]) are optional. The following table describes each element. ELEMENT DESCRIPTION ws Optional white space. sign An optional sign. digits A sequence of digits ranging from 0 to 9. , A culture-specific thousands separator symbol. . A culture-specific decimal point symbol. fractional-digits A sequence of digits ranging from 0 to 9.
我需要在web.config中更改此配置的地址:
<client>
<endpoint address="OLD_ADDRESS"
binding="basicHttpBinding"
contract="Service.IService" name="BasicHttpBinding_IService" />
</client>
Run Code Online (Sandbox Code Playgroud)
对此:
<client>
<endpoint address="NEW_ADDRESS"
binding="basicHttpBinding"
contract="Service.IService" name="BasicHttpBinding_IService" />
</client>
Run Code Online (Sandbox Code Playgroud)
在我的XML-Transformation文件中(它正在工作,它会改变另一个add key value
)
我有这个:
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<client>
<endpoint name="BasicHttpBinding_IService"
address="NEW_ADDRESS"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</client>
Run Code Online (Sandbox Code Playgroud)
但它不起作用.如果我按名字找到,我不明白为什么它不会改变.任何帮助/提示都将被预先确定.谢谢
我想在c#中获取可移动磁盘列表.我想跳过本地驱动器.因为我希望用户只将文件保存在可移动磁盘中.
如何在Linux终端上执行C#代码作为shell脚本.
我有这个示例代码:
public string Check(string _IPaddress,string _Port, int _SmsID)
{
ClassGlobal._client = new TcpClient(_IPaddress, Convert.ToInt32(_Port));
ClassGlobal.SMSID = _SmsID;
string _result = SendToCAS(_IPaddress, _Port, _SmsID );
if (_result != "") return (_result);
string _acoknoledgement = GetFromCAS();
return _acoknoledgement;
}
Run Code Online (Sandbox Code Playgroud)
当我运行shell bash时我会使用#!/bin/bash
.如何用C#做同样的事情?
将Microsoft.Aspnet.Webapi.Webhost包安装到我的web api项目后,我最终得到以下异常:
无法加载文件或程序集'System.Web.Http,Version = 5.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一.定位的程序集的清单定义与程序集引用不匹配.(HRESULT异常:0x80131040)