我正在导入一个相当大的数据库.该.sql文件中有近1,000,000行.问题是我在尝试导入数据库时遇到语法错误.它说:
错误1064(42000),第8428420行:您的SQL语法中有错误; 检查与您的MySQL服务器版本对应的手册,以便在"
致命错误:最大执行时间超过600秒 "附近使用正确的语法
通常我只是打开.sql文件并修复错误.但我的电脑真的很难打开这个文件.
导入MySQL数据库时有什么办法可以忽略错误吗?
我的页面上有一个滚动元素(使用jScrollPane jQuery插件).我想要实现的是通过检测浏览器窗口的宽度来关闭滚动窗口的方法.我正在做一个响应式布局,我希望在浏览器低于一定宽度时关闭此滚动功能.当我刷新页面时,我能够使它工作,但是当我调整浏览器窗口的大小时,宽度值不会立即更新.
现在,如果我开始使用宽度为1000px的窗口,则调整大小为350px,滚动功能仍然存在.一旦浏览器宽度达到440px,我希望滚动功能关闭.
这是我到目前为止的代码..
var windowsize = $(window).width();
$(window).resize(function() {
var windowsize = $(window).width();
});
if (windowsize > 440) {
//if the window is greater than 440px wide then turn on jScrollPane..
$('#pane1').jScrollPane({
scrollbarWidth:15,
scrollbarMargin:52
});
}
Run Code Online (Sandbox Code Playgroud) 我有收到一个奇怪的错误,当我使用的组合overflow,border-radius和transition.我有一个div里面有一个img.div具有边框半径和溢出设置为隐藏.当我将鼠标悬停在img上时,我发生了一个过渡,使图像变大以创建缩放效果.问题是溢出似乎在图像的左下角和右下角中断.
我为你创造了一个jsfiddle,看看我在说什么.http://jsfiddle.net/dmcgrew/HuMrC/1/
它在Firefox中运行良好,但在Chrome和Safari中中断.
任何人都知道可能导致此问题或如何修复它?
我有一个带有Facebook Share按钮的页面.我要共享的URL上有一个查询字符串,我用javascript构建.以下是我如何生成要共享的URL.
queryString = "cup=blue&bowl=red&spoon=green";
//the values of this are actually generated by user input, don't think its important for this example though. So in this example its just a basic string.
siteURL = "http://example.com/?share=1&";
//the url without the query string
sharingURL = siteURL+queryString;
//Combing the domain/host with query string.. sharingURL should = http://example.com?share=1&cup=blue&bowl=red&spoon=green
function FBshare(){
shareURL = siteURL+queryString;
console.log(shareURL);
window.open(
'https://www.facebook.com/sharer/sharer.php?u='+shareURL,
'facebook-share-dialog',
'width=626,height=436');
return false;
}
$(".facebook").bind("click", function(){
FBshare();
});
Run Code Online (Sandbox Code Playgroud)
当facebook因某种原因抓取URL时,它会删除在queryString变量中创建的所有内容.所以共享的URL最终只是http://example.com/?share=1.任何想法为什么它离开queryString变量?正确的URL被放入正常的URL console.log,加上它在Facebook …
我在尝试打开供稿对话框时收到以下错误信息.
发生错误.请稍后再试.
我是否需要让用户授权应用程序在他们的墙上发布?我认为它不会,因为这不会被应用程序本身自动发布到用户的墙上.另外,当我使用管理员帐户时,我收到了错误消息.
这是我的代码:
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'xxxxxxxxxxxxxxx', // App ID
channelURL : 'http://localhost/foods/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
oauth : true, // enable OAuth 2.0
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); …Run Code Online (Sandbox Code Playgroud) 我正在构建一个iframe应用程序,其中会有一些关于Facebook页面的提及.我的应用程序将添加到具有不同名称的多个页面.我需要的是这样的东西..
$page_name = "Bob's Toys";
Thank you for visiting the <?php echo $page_name; ?> page!
Run Code Online (Sandbox Code Playgroud)
有没有办法做到这一点?
我有一组选项卡,每个选项卡都包含一个动画子元素。当我单击每个选项卡时,会发生该选项卡内子元素的动画运行。我不想让它运行。我希望动画第一次运行,然后在父级从 切换display:none到时不再重播display:block。
在下面我制作的示例中,我有 2 个父 div,每个都有一个向右移动的子 div。当每个父母都设置为阻止动画重播时,我不希望发生这种情况。我希望每个孩子都保持在右侧。我怎样才能做到这一点?
$(".toggler").on("click", function() {
$(".parent").toggleClass("active");
});Run Code Online (Sandbox Code Playgroud)
.parent {
display: none;
cursor: pointer;
}
.child {
width: 100px;
height: 100px;
background-color: red;
position: relative;
animation: move 200ms cubic-bezier(.91, .8, .54, 1.39);
}
.active {
display: block;
}
.child.red {
background-color: red;
}
.child.blue {
background-color: blue;
}
@keyframes move {
from {
left: 0;
}
to {
left: 180px;
}
}Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a class="toggler">Click this</a>
<div class="parent active">
<div class="child …Run Code Online (Sandbox Code Playgroud)我在基础6.4中使用javascript失去了理智.我不知道这个Webpack的事情是怎么回事.似乎有些库/插件工作,有些则没有.我的最新一期是plyr(https://plyr.io/).我不明白为什么TweenMax 100%正常工作,而plyr.js没有.我究竟做错了什么?
这是我得到的错误..
app.js:23026 Uncaught ReferenceError: plyr is not defined
这就是我的app.js样子......
import $ from 'jquery';
import whatInput from 'what-input';
window.$ = $;
window.jQuery = $;
require('./TweenMax.js');
require('./plyr.js');
//import Foundation from 'foundation-sites';
// If you want to pick and choose which modules to include, comment out the above and uncomment
// the line below
import './lib/foundation-explicit-pieces';
$(document).foundation().ready(function(){
TweenMax.set(".logo-center", {transformOrigin:"50% 50%"});
var blast = plyr.setup('#blast', {
hideControls: true,
clickToPlay: false,
controls: []
});
});
Run Code Online (Sandbox Code Playgroud)
我在config.yml文件中也有plyr.js的路径:
# Your project's …Run Code Online (Sandbox Code Playgroud) 我正在使用全新安装的Foundation 6并尝试设置一个可关闭的切换盒(http://foundation.zurb.com/sites/docs/toggler.html).
出于某种原因,我收到此错误但..
Uncaught TypeError: Cannot read property '_init' of undefined
在foundation.core.js的第245行.
这是我页面上的HTML,直接来自Foundation文档中的可关闭示例.
<div class="callout" data-closable>
<button class="close-button" data-close>×</button>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Labore praesentium sint alias dolorum qui vel quaerat, libero consequatur non esse asperiores veritatis commodi, odit eum ipsam nemo dicta iste aliquam.</p>
</div>
Run Code Online (Sandbox Code Playgroud)
这是我之前在HTML底部的javascript </body>.
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/foundation-sites/js/foundation.core.js"></script>
<script src="bower_components/foundation-sites/js/foundation.toggler.js"></script>
<script>
$(document).foundation();
</script>
Run Code Online (Sandbox Code Playgroud)
我不确定我在这里做错了什么或者我错过了什么.如果我加载整个Foundation javascript库,那么一切都有效,但这对于我需要的内容来说是完全矫枉过正的.
我有一个导航栏,当视口有点狭窄时,有一些链接可以包含2+行.我想让所有导航项目的高度相同,并保持文本垂直居中.到目前为止,我已经能够将所有内容垂直居中,但我无法获得<a>'s所有匹配的高度.请参阅下面的codepen示例...
http://codepen.io/anon/pen/GovmZa
.container {
width:950px;
margin:0 auto;
}
ul {
display:flex;
align-items: stretch;
justify-content: flex-start;
}
li {
list-style-type:none;
display:flex;
flex-grow:1;
align-items:center;
flex-direction: column;
text-align:center;
border:1px solid #fff;
text-align:center;
}
a {
color:#fff;
padding:10px;
margin-right:1px;
flex: 1;
display: flex;
align-content: center;
align-items: center;
text-align:center;
background-color:#000;
}Run Code Online (Sandbox Code Playgroud)
<div class="container">
<p>How do I make the links stretch to be equal heights and keep text vertically aligned in the center?</p>
<ul>
<li>
<a href="#">Can</a>
</li>
<li>
<a href="#">somebody please help me …Run Code Online (Sandbox Code Playgroud)