我已将git项目克隆到本地git存储库中.然后我对其中一个文件做了一些令人讨厌的事情,在那恐慌中我从drive(rm style.css)中物理删除了文件,并从git(git rm style.css)中删除了它.
我想style.css从原点回到我的开发分支.不幸的是,我的git认为它是最新的,不会做任何事情.
root@debian:~/project.me# git status
# On branch dev
nothing to commit (working directory clean)
root@debian:~/project.me# git pull origin dev
Password for 'https://someone@github.com':
From https://github.com/somewhere/project.me
* branch dev -> FETCH_HEAD
Already up-to-date.
Run Code Online (Sandbox Code Playgroud)
我需要做些什么来告诉git我想将原始style.css文件下载回我的dev分支?
IE8/Chrome,FF运行良好,但Internet Explorer 7令我头疼.
我试图获得实际表格的数字结果
$(".checklist label").click(function () {
checkResults();
});
function checkResults() {
var str = $("form").serializeArray();
$.ajax({
type: "POST",
url: "/data.asmx/GetTotal",
cache: false,
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ data: str }),
dataType: "json",
success: handleHtml,
error: ajaxFailed
});
}
function handleHtml(msg) {
$("#result").text(msg.d);
}
function ajaxFailed(xmlRequest) {
}
Run Code Online (Sandbox Code Playgroud)
IE7无法正常工作,我做错了什么?
谢谢
我有这些字段组成的表格:
id | date_from | date_to | price
--------------------------------------------
CK1 22-12-2012 29-12-2012 800
CK1 22-12-2012 29-12-2012 1200
CK2 22-12-2012 29-12-2012 1400
CK2 22-12-2012 29-12-2012 1800
CK2 22-12-2012 29-12-2012 2200
Run Code Online (Sandbox Code Playgroud)
如何创建SQL选择按ID,DATE_FROM,DATE_TO分组结果并从价格中选择最低值.
结果就是这样
CK1 22-12-2012 29-12-2012 800
CK2 22-12-2012 29-12-2012 1400
Run Code Online (Sandbox Code Playgroud) 我已经在主干View上创建了两次警报触发的快速示例.
http://jsfiddle.net/feronovak/8svqX/
这没什么特别的,它真的让我理解如何正确调用单独的视图,所以它们不会触发先前的点击方法.现在我生成两个视图,第二个视图覆盖#boxSearch中的表单.当我点击按钮搜索时,它也会生成警报doSearch SearchLocation.我期待只看到警报doSearch SearchLatitude.我做错了什么?
var Geo = {
Views: {},
Templates: {}
};
Geo.Templates.SearchLocation = _.template( $("#tpl-search-location").html());
Geo.Templates.SearchLatitude = _.template( $("#tpl-search-latitude").html());
Geo.Views.SearchLocation = Backbone.View.extend({
initialize: function() {
this.render();
},
el: $("#boxSearch"),
template: Geo.Templates.SearchLocation,
render: function()
{
$(this.el).html(this.template);
},
events: {
"click input[type=button]": "doSearch"
},
doSearch: function(e) {
e.preventDefault();
alert('doSearch SearchLocation');
}
});
Geo.Views.SearchLatitude = Backbone.View.extend({
initialize: function() {
this.render();
},
el: $("#boxSearch"),
template: Geo.Templates.SearchLatitude,
render: function()
{
$(this.el).html(this.template);
},
events: {
"click input[type=button]": "doSearch"
}, …Run Code Online (Sandbox Code Playgroud) 是否可以将ConnectionStrings和mailSettings与web.config分开?
由于开发和测试,开发环境对连接字符串和smtp邮件具有不同的IP地址.我们不想使用实时机器和实时IP地址进行测试和开发.
可能吗?
$("#submit").click(function () {
var boolError = false;
CheckForm("#email");
CheckPhone("#phone");
if (boolError == true) {
console.log('error');
} else {
console.log('here');
// $("#form").submit();
}
});
Run Code Online (Sandbox Code Playgroud)
问题是它总是返回 console.log('here');
有没有办法等待CheckForm和CheckPhone.来自CheckForm函数的AJAX调用:
$.ajax({
type: "POST",
url: "/webservice/user.asmx/CheckForm",
data: "{'type':'" + var_type + "', 'value':'" + var_value + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
error: function (XMLHttpRequest, textStatus, errorThrown) { },
success: function (data) {
var obj = data.d;
}
});
Run Code Online (Sandbox Code Playgroud) 如何将结果WITH table AS导入CURSOR循环?我以前曾问过如何从我的表中获取递归结果
;with C as
(
definition ...
)
Run Code Online (Sandbox Code Playgroud)
我创建了CURSOR循环,我想为所有结果运行特定的存储过程 table
declare @id int, @parent int
declare cur cursor local fast_forward
for
select id, parent from C
open cur
fetch next from cur into @id, @parent
while @@fetch_status = 0
begin
exec storedProcedure @id=@id, @parent=@parent
fetch next from cur into @id, @parent
end
close cur
deallocate cur
Run Code Online (Sandbox Code Playgroud)
问题是CURSOR不知道tableWITH AS结果.
Invalid object name 'C'.
Run Code Online (Sandbox Code Playgroud) 我正在尝试创建将位于div中心的寻呼机.基本上代码看起来像这样:
<div class="cms-pager">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
如果我像这样指定CSS:
.cms-pager { }
.cms-pager ul { background-color: somecolor; margin: 0 auto; }
.cms-pager ul li { padding: 5px; margin: 3px; }
Run Code Online (Sandbox Code Playgroud)
然后UL不会居中,因为它在整个div上有宽度/背景颜色.我不会工作.
如果我像这样指定CSS:
.cms-pager { }
.cms-pager ul { width: 200px; background-color: somecolor; margin: 0 auto; }
.cms-pager ul li { padding: 5px; margin: 3px; }
Run Code Online (Sandbox Code Playgroud)
然后UL以页面为中心.问题是我必须指定固定宽度:200px; 如果我只有1或2个链接,它就在中心位置.所以这对我来说不合适,我需要UL真正拥有实际LI标签的宽度并且要按宽度精确指定.
如果我像这样指定CSS:
.cms-pager { margin: 0 auto; }
.cms-pager ul { float: left; background-color: somecolor; margin: 0 auto; }
.cms-pager ul li { …Run Code Online (Sandbox Code Playgroud) 有没有办法用以下参数创建UPDATE stored_procedure:
@param1 int = null,
@param2 int = null,
@param3 nvarchar(255) = null,
@param4 bit = null,
@id int
Run Code Online (Sandbox Code Playgroud)
并使用UPDATE语句,它将仅更新非NULL的字段
所以,如果我执行
spUpdateProcedure @param1=255, @id=1
Run Code Online (Sandbox Code Playgroud)
如果将更新记录@ id = 1,但它只会改变字段@ param1并忽略对其他@param2,3,4的更改.
换句话说,它不会改变null@ param2,3,4中的值
谢谢.
有没有办法按类似的表递归读取记录并按深度级别排序?
#table:
id int | parent int | value string
--------------------------------------------
1 -1 some
2 1 some2
3 2 some3
4 2 some4
5 3 some5
6 4 some6
7 3 some5
8 3 some5
9 8 some5
10 8 some5
Run Code Online (Sandbox Code Playgroud)
那么有一种方法可以递归地选择结果表看起来像这样的地方.
select * from #table where id=3
id int | parent int | value string | depth
--------------------------------------------------------
3 2 some3 0
5 3 some5 1
7 3 some5 1
8 3 some5 1
9 8 some5 2
10 …Run Code Online (Sandbox Code Playgroud) 简单的问题,如果我有这样的静态文件(使用mockJSON web生成JSON)
http://www.webwrx.sk/clients/data.json.txt
我需要用这个文件把它改成JSONP吗?我需要以某种方式修改它吗?文件如api.flickr.com有什么不同?
我甚至在该文件中添加了():
http://www.webwrx.sk/clients/data2.json.txt
仍然下面的代码不会工作:
var params = _.extend({
'method': 'GET',
'url': this.url,
'cache': true,
'dataType': 'jsonp',
processData: true
}, options);
return $.ajax(params);
Run Code Online (Sandbox Code Playgroud)
感谢您的任何帮助.
我有超过30万行,即使我使用TOP*语句只选择20/50/100记录,我想返回记录的总数.
是否可以过滤选择之类的
select top 50 * from table where rule1=rule1 and rule=rule2
假设数据库为300 000并且上面选择的记录总数将返回4 000条记录.但实际上它只返回50条记录,我需要知道manu是如何在数据库中使用这个where语句(它将返回4000).
谢谢
我在设置蚂蚁的%PATH%时遇到问题.我想我已经正确地完成了它,但它仍然无法使用cmd.exe
这是echo %ANT_HOME%显示的
C:\Users\Fero>echo %ANT_HOME%
c:\ant
Run Code Online (Sandbox Code Playgroud)
和 echo %PATH%
C:\Users\Fero>echo %PATH%
.
.
LLIB\SAMPLES\REPL;C:\Program Files (x86)\Nmap;"C:\Users\Fero\AppData\Local\Andro
id\android-sdk\platform-tools;C:\Development\android-sdk-windows\tools;%JAVA_HOM
E%\bin;c:\ant\bin;C:\Ruby193\bin;
Run Code Online (Sandbox Code Playgroud)
这是实际的要求 ant
C:\Users\Fero>ant
'ant' is not recognized as an internal or external command,
operable program or batch file.
Run Code Online (Sandbox Code Playgroud)
但是,如果我手动执行:
C:\Users\Fero>c:\ant\bin\ant -version
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\li
b\tools.jar
Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Run Code Online (Sandbox Code Playgroud)
似乎还有其他问题,我的jre目录有各种各样的.jar文件但没有调用tools.jar
t-sql ×5
jquery ×3
select ×3
backbone.js ×2
json ×2
sql ×2
ajax ×1
alignment ×1
android ×1
ant ×1
cordova ×1
count ×1
css ×1
cursor ×1
duplicates ×1
eclipse ×1
git ×1
git-pull ×1
github ×1
group-by ×1
html-lists ×1
jsonp ×1
margin ×1
recursion ×1
return ×1
templates ×1
undefined ×1
view ×1
web-config ×1