我想知道如何最好地验证Rails中的URL.我在考虑使用正则表达式,但不确定这是否是最好的做法.
而且,如果我使用正则表达式,有人可以向我推荐一个吗?我还是Regex的新手.
每次将更新发送到我们的远程存储库时,我正在执行一个程序来提醒CruiseControl.我正在使用Git post-update钩子.
如果我能找到已经提交的分支,那将是很好的,所以我可以使用它来通知CruiseControl要构建哪个分支.有没有办法在更新后的钩子中访问分支名称?
由于它是textarea,我在html属性中尝试cols ="50"但它不起作用.
另外,我找到了上一个问题的答案.他说我可以通过添加来做到这一点.
CKEDITOR.instances.myinstance.resize(1000, 900);但是,尺寸仍未改变.
这是我尝试的代码,谢谢.
更新
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script src="../plugin/jquery-1.6.1.min.js"></script>
<script src="../plugin/jquery.validate.min.js"></script>
<script type="text/javascript" src="../plugin/ckeditor/ckeditor.js"></script>
<script>
$(document).ready(function(){
$("#addlist").validate();
var editor = CKEDITOR.replace('editor1');
var div = document.getElementById('editor');
editor.resize($(div).width(),'900');
});
</script>
</head>
<body>
<form method="post" action="confirm.php">
<p><br />
<div id="editor">
<textarea id="editor1" name="editor1">
</div>
<? if (isset($_GET['file']))
{$filepath=$_GET['file'];
require_once("../template/".$filepath);}?> </textarea>
</p>
</br>
File Name </br>
<b>(Naming Without .html e.g. MyTemplate1) :</b>
</br>
<input id="tname" name="tname" class="required" />
<input type="submit" />
</p>
</form> …Run Code Online (Sandbox Code Playgroud) 我有一个应用程序,它从数据库创建页面路由.我的整个站点都使用表单身份验证进行保护,但我需要允许未经身份验证的用户访问这些路由.我不想为<location>web.config中的路由硬编码标签,因为这会否定我使用数据库生成路由.
有人可以帮忙吗?
.net ×1
asp.net ×1
c#-4.0 ×1
ckeditor ×1
git ×1
githooks ×1
html ×1
javascript ×1
jquery ×1
regex ×1
ruby ×1
shell ×1
url ×1
validation ×1
web-config ×1