我正在使用sublime text 2编辑器.我想使用正则表达式来匹配所有h1标签之间的所有字符.
截至目前我正在使用这样的
<h1>.+</h1>
Run Code Online (Sandbox Code Playgroud)
如果h1标签没有中断,它的工作正常.
我的意思是
<h1>Hello this is a hedaer</h1>
Run Code Online (Sandbox Code Playgroud)
它的工作正常.
但如果标签看起来像这样,它就不起作用了
<h1>
Hello this is a hedaer
</h1>
Run Code Online (Sandbox Code Playgroud)
有人可以帮我解释语法吗?
所以subscription我的数据库中有一个表.
我想有一个state列,它将具有以下任何一个值
Valid
Invalid
Cancelled
In Trial
Non Renewing
Future
Run Code Online (Sandbox Code Playgroud)
有人可以解释如何将这些值用作rails 4中的枚举值吗?
每次我使用双引号字符串,我都会得到这样的建议:

当我点击灯泡图标时,我得到一个选项,将该字符串转换为单引号字符串.
有人可以解释为什么单引号字符串比双引号字符串更受欢迎吗?
截至目前我正在使用这样的javascript
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js"></script>
<script> $.fn.modal || document.write('<script src="js/bootstrap.min.js">\x3C/script>')</script>
Run Code Online (Sandbox Code Playgroud)
我正在从bootstrapcdn加载bootstrap.css
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
Run Code Online (Sandbox Code Playgroud)
如果cdn服务器关闭,有人可以告诉我如何加载本地副本.?
我的网址格式为:
google.com
www.google.com
http://google.com
http://www.google.com
Run Code Online (Sandbox Code Playgroud)
我想将所有类型的链接转换为统一格式,从 http://
http://google.com
Run Code Online (Sandbox Code Playgroud)
如何http://使用Python 预先添加URL ?
我有一个包含以下代码的javascript文件grid.js
Preview.prototype = {
create : function() {
// create Preview structure:
this.$title = $( '<h3></h3>' );
this.$description = $( '<p></p>' );
this.$href = $('<div class="showbutton"><form id="myform" method="POST" action="#"><div class="linkbtn02"><a href="#">EVOEGEN</a></div></form></div>' );
this.$details = $( '<div class="og-details"></div>' ).append( this.$title, this.$description, this.$href );
this.$loading = $( '<div class="og-loading"></div>' );
this.$fullimage = $( '<div class="og-fullimg"></div>' ).append( this.$loading );
this.$closePreview = $( '<span class="og-close"></span>' );
this.$previewInner = $( '<div class="og-expander-inner"></div>' ).append( this.$closePreview, this.$fullimage, this.$details );
this.$previewEl = $( '<div class="og-expander"></div>' ).append( this.$previewInner ); …Run Code Online (Sandbox Code Playgroud) 好吧,我编写了一些HTML页面.我在那里集成了一个jQuery滑块.滑块名称轨道滑块.我的网站使用流体布局.如果垂直最小化页面,则可以看到右侧角落图像向左移动.
但我有一些问题.当用户垂直缩小页面时,我也希望移动右侧滑块导航.
问题是我无法在滑块中应用100%宽度.滑块根据图像大小自动创建宽度.我不知道如何将其更改为100%宽度.
您可以在此页面中查看滑块.
这是我的javascript文件.
这是javascript使用宽度的地方.
var b = 0,
p = 0,
h, v, u, f = d(this).addClass("orbit"),
c = f.wrap('<div class="orbit-wrapper" />').parent();
f.add(h).width("1px").height("1px");
var e = f.children("img, a, div");
e.each(function () {
var a = d(this),
b = a.width(),
a = a.height();
b > f.width() && (f.add(c).width(b), h = f.width());
a > f.height() && (f.add(c).height(a), v = f.height());
p++
});
Run Code Online (Sandbox Code Playgroud)
你可以在javascript文件中查看它.我希望宽度100%.请给我一些想法.谢谢
这是我的普通文件上传代码.
HTML
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<input name="theFile" type="file" />
<input name="Submit" type="submit" value="Upload">
</form>
Run Code Online (Sandbox Code Playgroud)
PHP变量接收文件
$fileName = $_FILES['theFile']['name'];
$fileTempName = $_FILES['theFile']['tmp_name'];
Run Code Online (Sandbox Code Playgroud)
现在我想使用远程上传.
所以我创建了一个这样的表单
<form method="POST" action="<?=$self?>">
<input type="text" name="file[]" size="45" value="">
<input name="submit" type="submit" id="submit" value="submit" accesskey="s"></p>
</form>
Run Code Online (Sandbox Code Playgroud)
我必须以上面的形式输入文件网址.当我提交表单时,我希望文件文件详细信息存储在这些变量中$fileName,$fileTempName
我不希望他们在本地存储.我正试图在亚马逊s3上传中使用这些变量.你们能帮助我吗?谢谢
我正在尝试使用jQuery扩展我的搜索栏.我也想隐藏导航链接.
我有一些像这样的jQuery代码.这个代码在焦点时工作正常.
$(".searchBox input").focus(function(){
$("#navlinks").css('display','none');
$(this).css({'width':'200px','-moz-transition':'width 0.5s ease-out','-webkit-transition':'width 0.5s ease-out','transition':'width 0.5s ease-out'});
});
$(".searchBox input").focus(function(){
$(this).css({'width':'100px','-moz-transition':'width 0.5s ease-out','-webkit-transition':'width 0.5s ease-out','transition':'width 0.5s ease-out'});
$("#navlinks").css('display','block');
});
Run Code Online (Sandbox Code Playgroud)
第二个功能也很好 except it display the content before animation complete.
所以我只想$("#navlinks").css('display','block');在完成动画时才能被激活.
谁能告诉我怎么样?
谢谢
css ×4
javascript ×3
jquery ×3
php ×2
ruby ×2
cdn ×1
file ×1
file-upload ×1
html ×1
python ×1
python-2.7 ×1
regex ×1
rubymine ×1
sublimetext2 ×1
sublimetext3 ×1
url ×1
variables ×1