如何替换错误页面
A Database Error Occurred
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by rand()' at line 1
Run Code Online (Sandbox Code Playgroud)
与我的网站的默认404错误页面?
我的印象是,有两个同步开启的经纪人我的kafka设置应该继续工作,即使其中一个经纪人失败.
为了测试它,我创建了一个名为topicname的新主题.其描述如下:
Topic:topicname PartitionCount:1 ReplicationFactor:1 Configs:
Topic: topicname Partition: 0 Leader: 0 Replicas: 0 Isr: 0
Run Code Online (Sandbox Code Playgroud)
然后我按以下方式运行producer.sh和consumer.sh:
bin/kafka-console-producer.sh --broker-list localhost:9092,localhost:9095 sync --topic topicname
bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic topicname --from-beginning
Run Code Online (Sandbox Code Playgroud)
直到两个经纪人都在工作我才看到消费者正在接收消息,但是当我通过kill命令杀死其中一个经纪人实例时,消费者就不再向我显示任何新消息了.相反,它向我显示以下错误消息:
WARN [ConsumerFetcherThread-console-consumer-57116_ip-<internalipvalue>-1438604886831-603de65b-0-0], Error in fetch Name: FetchRequest; Version: 0; CorrelationId: 865; ClientId: console-consumer-57116; ReplicaId: -1; MaxWait: 100 ms; MinBytes: 1 bytes; RequestInfo: [topicname,0] -> PartitionFetchInfo(9,1048576). Possible cause: java.nio.channels.ClosedChannelException (kafka.consumer.ConsumerFetcherThread)
[2015-08-03 12:29:36,341] WARN Fetching topic metadata with correlation id 1 for topics [Set(topicname)] from broker [id:0,host:<hostname>,port:9092] failed (kafka.client.ClientUtils$)
java.nio.channels.ClosedChannelException …Run Code Online (Sandbox Code Playgroud) 我需要将两个div元素放在同一水平面上.按照我的方式进行操作使得第二个显示在第一个下面.我希望将它们放置在过渡时彼此交叉的方式.
编辑1- 这里当按下按钮交换他们的类时,div上下移动.
#aaidi,#aaidi3 {
-webkit-transition: margin-left 1s ease-in-out;
-moz-transition: margin-left 1s ease-in-out;
-o-transition: margin-left 1s ease-in-out;
transition: margin-left 1s ease-in-out;
}
.left {
margin-left: 45%;
border: 1px solid green ;
width: 20px;
height: 4px;
background: #FF0000;
} // similar for right with margin-left:55%
......
<tr>
<td colspan=3>
<div id="aaidi" class="left">
</div>
<div id="aaidi3" class="right">
</div>
</td>
</tr> // after this there is a button pressing whom changes the class of both divs.
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用此方法来查找两个字符串中的常用字符,即$ a和$ r,但第一个字符未打印.此外,$已经收集了常用字符,并防止它们被多次打印(我需要每个字符只打印一次),但它没有这样做.请告诉我我正在犯的错误.
<?php
$a="BNJUBCI CBDIDIBO";
$r="SBKJOJLBOU";
$already="";
for($i=0;$i<strlen($r);$i++)
{
if (stripos($a,$r[$i])!=FALSE)
{
if (stripos($already,$r[$i])==FALSE)
{
$already=$already.$r[$i];
echo "already=".$already."<br>";
echo $r[$i]."<br>";
}
}
}
?>
Run Code Online (Sandbox Code Playgroud) php ×2
apache-kafka ×1
codeigniter ×1
compare ×1
css ×1
css3 ×1
html ×1
html5 ×1
mysql ×1
string ×1