我在这里查看了许多类似的帖子,但没有找到解决我问题的方法.这很可能是一件非常简单的事情,但我无法得到它.
问题 我有sevaral域并在Google Analytics中使用一个帐户来跟踪它们.它们有交叉链接(基本上在不同语言之间).当我尝试点击指向我的另一个域的链接时,没有任何反应(除非我在Chrom consol上查看).其他浏览器工作正常......
一些代码a)GA提供的snipplet
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-1']);
_gaq.push(['_setDomainName', 'site1.de']);
_gaq.push(['_setAllowHash', false]);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Run Code Online (Sandbox Code Playgroud)
b)然后在BODY我有以下链接:
<A HREF="http://www.site2.com/" onclick="_gaq.push(['_link', 'http://www.site2.com/']); return false;">English</A>
Run Code Online (Sandbox Code Playgroud)
如上所述,点击该链接在例如IE,FF中很好.但在Chrome中似乎没有任何事情发生.如果我打开控制台,我看到一个错误:
ga.js:1未捕获的SyntaxError:意外的令牌ILLEGAL
我也在信息窗口看到很多"中国人".
现在,如果我激活GA Debug或使用ga_debug.js,代码工作正常.我试图用不同的编码(UTF-8,ANSI ......)保存html文件,但是没有做到这一点.
有任何想法吗?
我需要线图库,它支持移动应用程序的多色(最常见的是三种颜色).
例如:y轴称为葡萄糖,范围为50 -600,然后x轴日期,一个月的愤怒(所以总是范围将是每天30点)
逻辑:考虑从x轴开始
1st and level of glucose is 70
2nd - 80
…
…
…
9th - 300
10th – 350
…
…
…
15th – 500
16th – 550
…
…
…
25th – 120
26th – 130
Run Code Online (Sandbox Code Playgroud)
所以我的图表应该如下,取决于葡萄糖水平.
50 – 150 - low – and line color should be green
151 – 300 – average – line color should be orange
Above 301 – high – line color should be red
Run Code Online (Sandbox Code Playgroud)
我浏览了Google Graphs和jqPlot,但似乎不走运,有人对此有何体验?
我偶尔会在我的故事板中找到自己的copy/pasting自定义单元格,UITableViews这正逐渐成为维护的噩梦(即,现在必须对几个自定义单元格进行简单的更改UITableViews).
是否可以在故事板或xib文件中创建一个自定义单元格,然后从多个引用它UITableViews?我认为必须有一种方法来指定单元格的NIB名称,static/prototype类似于在编辑法线时如何指定NIB名称.UIViewControllerxib
顺便说一句......我知道如何通过代码来做到这一点.我正在寻找的是从故事板编辑器本身中做到这一点的方法.
<div class="post_each">
<h1 class="post_title">Apartamentos 1 comodo</h1>
<img class="thumb" src="1.jpg"/>
<img class="thumb" src="1.jpg"/>
<img class="thumb" src="1.jpg"/>
<img class="thumb last" src="1.jpg"/>
</div>
<div class="post_each">
<h1 class="post_title">Apartamentos 2 comodo</h1>
<img class="thumb" src="1.jpg"/>
<img class="thumb" src="1.jpg"/>
<img class="thumb" src="1.jpg"/>
<img class="thumb last" src="1.jpg"/>
</div>
<script type="text/javascript">
$('img.thumb').hover(function {
$(this).animate({"background" : "white"}, 600);
});
</script>
Run Code Online (Sandbox Code Playgroud)
hover()根本不起作用.我只是尝试设置鼠标悬停时应增加背景颜色或边框大小.
是否可以horizontal通过javascript或CSS 显示div顶部的滚动条而无需jquery.默认情况下它位于底部.
我为此瞪眼但没有得到任何帮助.
哦,伙计,我一直在撕扯我的头发.下拉列表4小时.
我正在使用Twitter Bootstrap.
顶部的固定导航有一个下拉,非常标准的东西.
除了下拉不会像通常那样关闭.只有在按下切换按钮时才会切换打开和关闭,而不是在按下菜单中的项目或用户在菜单外单击时(这两个都应该关闭下拉列表).
我唯一不做的就是使用iframe和bootswatch的主题.
我以前没有这样的问题,所以我觉得它可能是一个bug(升级后的bootstrap到2.1.0,jquery到今天的1.7.2).
这里的所有代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>test</title>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
<!-- Le styles -->
<link href="./css/bootstrap.css" rel="stylesheet">
<style>
iframe {
border: 0px;
height: 95%;
left: 0px;
position: absolute;
top: 50px;
width: 100%;
}
</style>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" target="mainframe" href="./home.html">
Brand
</a>
<ul class="nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" …Run Code Online (Sandbox Code Playgroud) 我希望我的基于Netty的服务能够RESTful.有没有经验丰富的图书馆,我可以使用它来满足这个要求?
我是Selenium Webdriver的新手.当我使用这个代码然后我得到输出和警告.请帮帮我,我怎么能忽略这个警告.我的代码是:
package com.webdriver.Webdriver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
public class Example {
public static void main(String[] args) {
// Create a new instance of the html unit driver
// Notice that the remainder of the code relies on the interface,
// not the implementation.
WebDriver driver = new HtmlUnitDriver();
// And now use this to visit Google
driver.get( "https://mobile.twitter.com/andres/about" );
// Find the text input element by its name
//WebElement element = driver.findElement(By.xpath("//title"));
WebElement element = …Run Code Online (Sandbox Code Playgroud) 在Python中,我正在编写一个自然语言处理模块,无法解决如何编写函数来执行以下操作.输入:从输入的句子作为短字符串导出的词性(POS)列表.列表中的某些项目本身就是列表,因为程序的该部分不知道从两种或更多种可能中选择哪个词性.例如,一个特定["DET", "NOUN", ["VERB", "NOUN"], "CONJ", ["ADJ", "ADV", "NOUN"], "ADV"]
的六个字的句子导致,即第一个字肯定是一个DET,第二个字肯定是NOUN,第三个字可以是一个VERB或NOUN,第四个字肯定是一个CONJ,第五个字可以是ADJ,ADV或NOUN第6个字肯定是ADV.
所以INPUT = ["DET", "NOUN", ["VERB", "NOUN"], "CONJ", ["ADJ", "ADV", "NOUN"], "ADV"]
我需要函数将每个可能的组合作为列表列表返回.所以上面的返回值应该是:
[["DET", "NOUN", "NOUN", "CONJ", "NOUN", "ADV"],
["DET", "NOUN", "NOUN", "CONJ", "ADV", "ADV"],
["DET", "NOUN", "NOUN", "CONJ", "ADJ", "ADV"],
["DET", "NOUN", "VERB", "CONJ", "NOUN", "ADV"],
["DET", "NOUN", "VERB", "CONJ", "ADV", "ADV"],
["DET", "NOUN", "VERB", "CONJ", "ADJ", "ADV"]]
Run Code Online (Sandbox Code Playgroud)
句子可以是从1到n个单词长.每个单词可能会从一个到两个部分的语音回来.
<style type="text/css">
#featured a:first-child
{
background-color:yellow;
}
</style>
<div id="featured">
<ul class="ui-tabs-nav">
<li><a href="#"><span>test 1</span></a></li>
<li><a href="#"><span>test 2</span></a></li>
<li><a href="#"><span>test 3</span></a></li>
<li><a href="#"><span>test 4</span></a></li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
我想从列表中突出显示第一个锚点,但遗憾的是所有锚点都突出显示.这里有什么错误.
html ×4
javascript ×4
jquery ×4
css ×3
bootswatch ×1
css3 ×1
graph ×1
iframe ×1
ios5 ×1
java ×1
netty ×1
nlp ×1
objective-c ×1
python ×1
rest ×1
selenium ×1
storyboard ×1
tree ×1
webdriver ×1