所以我的JQuery存在一些问题,我想滚动到特定的div.
HTML
<div id="searchbycharacter">
<a class="searchbychar" href="#" id="#0-9" onclick="return false">0-9 |</a>
<a class="searchbychar" href="#" id="#A" onclick="return false"> A |</a>
<a class="searchbychar" href="#" id="#B" onclick="return false"> B |</a>
<a class="searchbychar" href="#" id="#C" onclick="return false"> C |</a>
... Untill Z
</div>
<div id="0-9">
<p>some content</p>
</div>
<div id="A">
<p>some content</p>
</div>
<div id="B">
<p>some content</p>
</div>
<div id="C">
<p>some content</p>
</div>
... Untill Z
Run Code Online (Sandbox Code Playgroud)
JQuery的
我想要的代码是:在.searchbychar的点击事件A TAG>获取ID属性值并滚动到那...
$( '.searchbychar' ).click(function() {
$('html, body').animate({
scrollTop: $('.searchbychar').attr('id').offset().top
}, 2000);
});
Run Code Online (Sandbox Code Playgroud) 以下是我正在使用的PHP代码
$file_handle = fopen("products.csv", "r");
$fname = "products.csv";
$fhandle = fopen($fname,"r");
$content = fread($fhandle,filesize($fname));
$server = "**\******,1433";
$connectionInfo = array( "Database"=>"******", "UID"=>"***", "PWD"=>"*******" );
$conn = sqlsrv_connect( $server, $connectionInfo );
if( $conn === false ) {
die( print_r( sqlsrv_errors(), true));
}
while (!feof($file_handle) ) {
$line_of_text = fgetcsv($file_handle, 1024);
$itemco = $line_of_text[0];
$sql = "SELECT quantity FROM Item WHERE itemlookupcode = '$itemco' ";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
} …Run Code Online (Sandbox Code Playgroud) Express API:
view cache:启用视图模板编译缓存,默认情况下在生产中启用
我有两个问题:
在app.js view cache中没有在开发块中明确设置,它应该是什么?
这个缓存机制如何工作; 它与memcache有关吗?
到目前为止,我已经按照Flink的kinesis连接器记录的说明使用本地Kinesis。
Properties producerConfig = new Properties();
producerConfig.put(AWSConfigConstants.AWS_REGION, "us-east-1");
producerConfig.put(AWSConfigConstants.AWS_ACCESS_KEY_ID, "aws_access_key_id");
producerConfig.put(AWSConfigConstants.AWS_SECRET_ACCESS_KEY, "aws_secret_access_key");
producerConfig.put(AWSConfigConstants.AWS_ENDPOINT, "http://localhost:4567");
Run Code Online (Sandbox Code Playgroud)
对于Flink生产商,这些说明适用于局部运动(我使用Kinesalite)。
然而,随着消费者弗林克,我得到一个异常aws.region和aws.endpoint未都不允许。但是区域是必需的,这意味着无法覆盖端点。
org.apache.flink.client.program.ProgramInvocationException:导致错误的主要方法:对于FlinkKinesisConsumer,必须在配置中设置AWS区域('aws.region')或AWS终端节点('aws.endpoint')。
这是连接器中的错误吗?我看到一个相关的PR:https : //github.com/apache/flink/pull/6045。
我在Flink的邮件列表中找到了一种解决方法,但是他们将其描述为生产者而不是消费者的问题,而我却相反(我认为),因此不确定。真是令人困惑。
假设我在redis中有一个超级日志,该超级日志记录邮件的数量,是否有任何规定可以在某种程度上解释删除邮件?
Flink Web UI 有一个出色的背压部分。但我看不到 Prometheus 记者给出的任何指标,这些指标可用于以与 Grafana 仪表板相同的方式检测背压。
有没有办法在 Flink Web UI 之外获取相同的指标?使用此处描述的指标https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/metrics.html。或者甚至有一个 prometheus scraper 来抓取 web api?
我刚刚开始尝试学习PHP和MYSQL,并且一直在关注创建网页搜索引擎的一些教程,但是遇到了一个问题,当我提交表单时结果没有返回,我不知道在哪里问题在于或在哪里尝试对其进行故障排除,所以它认为在这里发布我的问题值得一试.希望有人可以帮助我,提前谢谢.
PHP
<?php
mysql_connect("localhost","root","123")or die("Could not connect to Db");
mysql_select_db("members") or die("Could not find db");
if(isset($_POST['submit'])){
$searchq = $_POST['submit'];
$searchq = preg_replace("#[^0-9a-z]#i","",$searchq);
$query = mysql_query("Select * FROM memberlist WHERE Fname LIKE '%$searchq%' OR Lname LIKE '%$searchq%' ") or die(mysql_error());
$count = mysql_num_rows($query);
if($count == 0){
$output = "No results were found, sorry.";
}
else{
while($row = mysql_fetch_array($query)){
$firstname = $row['Fname'];
$lastname = $row['Lname'];
$output .= "<div>".$firstname." ".$firstname."</div>";
}
}
}
?>
Run Code Online (Sandbox Code Playgroud)
HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Search</title> …Run Code Online (Sandbox Code Playgroud) apache-flink ×2
php ×2
caching ×1
csv ×1
database ×1
express ×1
forms ×1
grafana ×1
html ×1
html5 ×1
hyperloglog ×1
java ×1
javascript ×1
jquery ×1
mysql ×1
node.js ×1
parsing ×1
prometheus ×1
redis ×1
sql-server ×1
str-replace ×1
view ×1