我有一个网站,导航栏固定在顶部,主要内容区域下面有3个div.
我正在尝试从bootstrap框架中使用scrollspy.
当你滚动浏览div时,我已成功突出显示菜单中的不同标题.
我也有它,所以当你点击菜单时,它会滚动到页面的正确部分.但是,偏移是不正确的(它不考虑导航栏,所以我需要偏移约40像素)
我在Bootstrap页面上看到它提到了一个偏移选项,但我不确定如何使用它.
当它说你可以使用scrollspy时$('#navbar').scrollspy(),我也不是它的意思,我不知道在哪里包含它所以我没有,一切似乎都在工作(除了偏移).
我认为偏移可能是data-offset='10'身体标签,但它对我没有任何作用.
我觉得这是非常明显的事情,我只是错过了它.有帮助吗?
我的代码是
...
<!-- note: the data-offset doesn't do anything for me -->
<body data-spy="scroll" data-offset="20">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="#">VIPS</a>
<ul class="nav">
<li class="active">
<a href="#trafficContainer">Traffic</a>
</li>
<li class="">
<a href="#responseContainer">Response Times</a>
</li>
<li class="">
<a href="#cpuContainer">CPU</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="span12">
<div id="trafficContainer" class="graph" style="position: relative;">
<!-- graph goes here -->
</div> …Run Code Online (Sandbox Code Playgroud) 我有一个项目,我已经更新
编译我尝试使用或设置@ViewBag.Title属性时收到错误.
无法找到编译动态表达式所需的一种或多种类型.您是否缺少对Microsoft.CSharp.dll和System.Core.dll的引用?
我做了以下事情
我不知道还能做什么?
编辑:
我注意到在GAC Gui中有System.Core 3.5.0.0但没有System.Core 4.0.0.0.这是否意味着它变得困惑并仍在使用以前的版本?或者我误解了GAC?
编辑:
我的web.config看起来如下
...
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add …Run Code Online (Sandbox Code Playgroud) 我有一个Silverlight应用程序,当我点击"运行"时,Internet Explorer启动并且没有显示任何内容.我在左下角看到一个错误图标,当我点击它时,会导致以下错误.
网页错误详情
用户代理:Mozilla/4.0(兼容; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)时间戳: 2009年11月25日星期三00:11:41 UTC
消息:Silverlight应用程序中的未处理错误
代码:2103
类别:InitializeError
消息:应用程序无效或格式错误:检查清单
行:54个字符:13代码:0 URI:http:// localhost:50511/TestPage.html
为什么我会收到此错误?我该如何解决?
我环顾四周,其他人在重命名他们的应用程序时似乎得到了这个错误,但是我还没有这样做.
我创建了一个自定义样式,如果它可能与它有任何关系.
我没有编码,我所做的就是拖动我的样式控件并链接页面.
如何只在一个目录及其子目录中忽略某个文件类型?
解释我的意思是对以下设置进行成像
我希望能够做的是告诉git(使用.gitignore文件)忽略*.iml但仅在目录foldtertoignore下.
我以为这会起作用
foldertoignore/*.iml
Run Code Online (Sandbox Code Playgroud)
但是,只发现ignoreme1.iml而不是忽略me2.iml
我知道如何告诉它忽略*.iml,除了特定的目录.这与此相反.有什么想法吗?
我使用Deploy to heroku此页面上的按钮创建了一个heroku应用程序https://github.com/ParsePlatform/parse-server-example
我可以通过运行类似于以下返回结果的代码来检查其运行情况.
curl -X GET \
-H "X-Parse-Application-Id: ********************" \
-H "X-Parse-Master-Key: *******************" \
http://MY-APP.herokuapp.com/parse/classes/Speech
Run Code Online (Sandbox Code Playgroud)
我想更新云代码,我对如何做到这一点的理解是git克隆应用程序,进行更改,提交然后再将其推回.
但是当我跑的heroku git:clone -a MY-APP时候给了我以下警告
Cloning into 'MY-APP'...
warning: You appear to have cloned an empty repository.
Checking connectivity... done.
Run Code Online (Sandbox Code Playgroud)
而MY-APP文件夹为空.
我究竟做错了什么?
应该有什么东西吗?否则curl...命令不起作用?
编辑:这个问题和答案解决了我的问题.显然这是heroku的一个bug.如何使用MongoDB在Heroku上托管我自己的Parse Server?
我的文件(126 MB大小,.exe)给了我一些问题.
我正在使用标准的laravel下载方法.
我尝试增加内存,但它仍然说我的内存不足,或者我下载了0 KB大小的文件.
该文档没有提到任何有关大文件大小的内容.
我的代码是
ini_set("memory_limit","-1"); // Trying to see if this works
return Response::download($full_path);
Run Code Online (Sandbox Code Playgroud)
我做错了什么?
- 编辑 -
继续Phill Sparks评论,这就是我所拥有的并且它的工作原理.它是Phill的组合加上一些来自php.net的组合.不确定是否有遗失的东西?
public static function big_download($path, $name = null, array $headers = array())
{
if (is_null($name)) $name = basename($path);
// Prepare the headers
$headers = array_merge(array(
'Content-Description' => 'File Transfer',
'Content-Type' => File::mime(File::extension($path)),
'Content-Transfer-Encoding' => 'binary',
'Expires' => 0,
'Cache-Control' => 'must-revalidate, post-check=0, pre-check=0',
'Pragma' => 'public',
'Content-Length' => File::size($path),
), $headers);
$response = new Response('', 200, …Run Code Online (Sandbox Code Playgroud) 我当前的单元测试(量角器+ angularJS项目)因错误而失败UnknownError: unknown error: Element is not clickable at point (525, 1103).我使用调试器在失败之前停止它,并且我认为它会失败的唯一原因是因为按钮不在视口中(你必须向下滚动).
失败的线是
homeLink = ptor.findElement(protractor.By.linkText('Home'));
homeLink.click();
expect(ptor.getCurrentUrl()).toBe(homeUrl);
Run Code Online (Sandbox Code Playgroud)
从https://github.com/angular/protractor/issues/319,他说'...当我使用findElement()时,它会将它们滚动到页面的"顶部".评论同意.
在我的测试homeLink = ptor.findElement(protractor.By.linkText('Home'));中没有导致页面滚动.
我认为应该错了吗?
我该怎么办?
我想知道如何循环通过孩子们everyone.我正在使用Firebase和AngularJS.
我的firebase对象如下所示:

对我来说,它看起来像一个字典,所以从获取我尝试过的关联数组键列表
syncData('everyone').$bind($scope, 'everyone').then(function() {
var keys = $scope.everyone.$getIndex();
for (var key in $scope.everyone) {
console.log("key : " + key + " value : " + $scope.everyone[key]);
}
});
Run Code Online (Sandbox Code Playgroud)
日志确实包含子对象,但它也包含所有方法.像这样
... Before this line is all the other methods.
key : $on value : function (a,c){if("loaded"==a&&b._loaded)return b._timeout(function(){c()}),void 0;if(!b._on.hasOwnProperty(a))throw new Error("Invalid event type "+a+" specified");b._on[a].push(c)} controllers.js:58
key : $off value : function (a,c){if(b._on.hasOwnProperty(a))if(c){var d=b._on[a].indexOf(c);-1!==d&&b._on[a].splice(d,1)}else b._on[a]=[];else b._fRef.off()} controllers.js:58
key : $auth value : function (a){var c=b._q.defer();return …Run Code Online (Sandbox Code Playgroud) 我的以下代码:
var AWS = require('./aws-sdk-2.2.10.js') // THIS LINE ERRORS
Run Code Online (Sandbox Code Playgroud)
产生以下错误:
Uncaught TypeError: Cannot read property 'crypto' of undefined
Run Code Online (Sandbox Code Playgroud)
这是抛出错误的aws-sdk-2.2.10.js的一部分
...
65: [function(require, module, exports) {
(function() {
var _global = this; // I think 'this' is undefined here
var mathRNG, whatwgRNG;
mathRNG = function(size) {
var bytes = new Array(size);
var r;
for (var i = 0, r; i < size; i++) {
if ((i & 0x03) == 0)
r = Math.random() * 0x100000000;
bytes[i] = r >>> ((i & …Run Code Online (Sandbox Code Playgroud) 我有另一个系统将data.json文件放在我的Laravel站点/文件夹结构的某个地方.
我只希望Laravel能够读取json文件(即用户无法通过在浏览器中输入url来查看它).
这个文件应该放在哪里?
我目前在应用程序/模型文件夹或应用程序/ [新文件夹]之间徘徊.我的webroot设置为公用文件夹,因此您无法通过浏览器访问应用程序文件夹.
如果它在那里,我假设我将能够在PHP内读取它而不是javascript(这没关系).
angularjs ×2
git ×2
javascript ×2
laravel ×2
laravel-3 ×2
asp.net-mvc ×1
aws-sdk ×1
c# ×1
c#-4.0 ×1
firebase ×1
heroku ×1
parse-server ×1
php ×1
protractor ×1
silverlight ×1