我无法在运行Nginx和php-fpm的Ubuntu 12.04服务器上运行.html文件.
在执行.html扩展文件时,我得到的是拒绝访问..php文件运行得很好.
这是我的配置代码.
nginx.conf
user www-data;
worker_processes 4; # Make this equal to no of processors you have "cat /proc/cpuinfo |grep processor" @mayur
pid /var/run/nginx.pid;
events {
worker_connections 2048; # Essential to keep it high for heavy sites @mayur
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens on; #Make this off Live Server for Security Reasons: @mayur
# server_names_hash_bucket_size 64;
# server_name_in_redirect off; …Run Code Online (Sandbox Code Playgroud) 嗨我有一个面积图,其中包含几个X(年)和Y(价格)值.正如我发现有一种简单的方法来获取X,当用户点击其中一个点然而点击外线时,Y可以为图表提供值,即SVG/Chart-Body区域只能提供X,Y这些是平面的坐标而不是数据.

点图表:
circles = c.svg().selectAll 'circle.dot'
circles.on 'click', (d) ->
console.log 'POINT', 'Datum:', d
Run Code Online (Sandbox Code Playgroud)
O/P:
POINT Datum:
{x: Fri Feb 01 1980 00:00:00 GMT+0000 (GMT Standard Time), y: 666}
Run Code Online (Sandbox Code Playgroud)
点外图:
svg.on 'click', () ->
console.log 'SVG', d3.mouse(@)
Run Code Online (Sandbox Code Playgroud)
O/P:
SVG [605.5, 394.5]
Run Code Online (Sandbox Code Playgroud)
现在有什么办法可以在点击SVG时获得最近的数据坐标吗?例如SVG [605.5,394.5]将是(最接近[X,Y]使用的东西)
{x: Fri Feb 01 1980 00:00:00 GMT+0000 (GMT Standard Time), y: 666}
Run Code Online (Sandbox Code Playgroud)
或者其他一些方法将SVG X,Y转换为数据X,Y?
原始数据的形式为,
[
{x: Fri Jan 01 1980 00:00:00 GMT+0000 (GMT Standard Time), y: 666},
{x: Fri Feb 01 1980 00:00:00 GMT+0000 …Run Code Online (Sandbox Code Playgroud) 我需要的不是电子邮件验证..它很简单.允许@hello.world或@hello_world或@helloworld,但@helloworld.应被视为@helloworld使@helloworld?
简而言之,检查字母或数字.和_如果不是采取它之前的字符串.
我现有的RegEx /@.([A-Za-z0-9_]+)(?=\?|\,|\;|\s|\Z)/只关心@helloworld,而不关心@ hello.world或@hello_world.
更新:
所以,现在我有一个正则表达式与问题涉及数量1,即允许@hello.world或@hello_world或@helloworld,但仍然什么@helloworld.应该被视为@helloworld使@helloworld?
新RegEx:
/@([A-Za-z0-9+_.-]+)/
我有一个名为orders的表,我存储有关用户订单的信息.
order_id | user_id | amount
+++++++++++++++++++++++++++++++++++
1 | 1 | 100
2 | 1 | 200
3 | 2 | 200
4 | 3 | 100
5 | 3 | 100
6 | 4 | 500
Run Code Online (Sandbox Code Playgroud)
我想要的最终结果是,用户订单数量和这些订单的总价值.
所以在上面的情况下输出应该是这样的,
user_id | count | sum
+++++++++++++++++++++++++++++++++++
1 | 2 | 300
2 | 1 | 200
3 | 3 | 600
4 | 1 | 500
Run Code Online (Sandbox Code Playgroud)