location

Nginx笔记(附conf参考模板)

ε祈祈猫儿з 提交于 2019-12-17 02:02:53
文章目录 Linux下环境搭建 虚拟主机配置讲解 location配置 日志文件 反向代理 负载均衡 文档及模板 Linux下环境搭建 1,wget下载: wget http://nginx.org/download/nginx-1.6.2.tar.gz 2, 安装: tar -zxvf nginx-1.6.2.tar.gz 3, 下载需要的依赖库文件: yum install pcre yum install pcre-devel yum install zlib yum install zlib-devel 4,进行configure配置: cd nginx-1.6.2 && ./configure --prefix=/user/local/nginx 查看是否报错。(/user/local/nginx是你nginx的所在路径) 5,编译安装 make && make install 6,启动nginx cd /user/local/nginx 目录下:看到如下四个目录:conf配置文件,html网页文件,logs日志文件,sbin主要二进制程序 启动命令: /user/local/nginx/sbin/nginx 关闭( -s stop )重启( -s reload ) 7,成功:查看是否启动成功( netstat -ano|grep 80 )失败可能是80端口被占用

LocationClient getLastLocation() return null

随声附和 提交于 2019-12-17 01:03:35
问题 Like the questions someone encountered before I tested one the nexus s(4.0.4 with google play service available) and avd (4.2.2 with google api), in both case locationclient's getLastLocation() always return null . public class MainActivity extends Activity implements LocationListener, GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener { private LocationClient mLocationClient; private LocationRequest mLocationRequest; boolean mUpdatesRequested =

Calculating distance between two geographic locations

…衆ロ難τιáo~ 提交于 2019-12-16 20:12:43
问题 please shed some light on this situation Right now i have two array having latitude and longitude of nearby places and also have the user location latiude and longiude now i want to calculate the distance between user location and nearby places and want to show them in listview. I know that there is a method for calculating distance as public static void distanceBetween (double startLatitude, double startLongitude, double endLatitude, double endLongitude, float[] results); Now what is the

window.location详解

牧云@^-^@ 提交于 2019-12-16 15:26:00
window.location对象常用属性 location.hostname 返回 web 主机的域名 location.host 返回 web 主机的域名(包含端口) location.pathname 返回当前页面的路径和文件名 location.port 返回 web 主机的端口 (80 或 443,如果采用默认的80端口(update:即使添加了:80),那么返回值并不是默认的80而是空字符。) location.protocol 返回所使用的 web 协议(http:// 或 https://) location.href 属性返回当前页面的 URL location.search 返回?后面部分(包含?) location.hash 返回锚点(返回值:#xxx) window.location对象常用方法 location.assign() 加载一个新的文档,就相当于一个链接,跳转到指定的url location.reload() 重新加载当前文档,没有参数或者参数是 false,它就会用 HTTP 头 If-Modified-Since 来检测服务器上的文档是否已改变。如果文档已改变,reload() 会再次下载该文档。如果文档未改变,则该方法将从缓存中装载文档。这与用户单击浏览器的刷新按钮的效果是完全一样的。如果该方法的参数为 true,那么会绕过缓存

React-router使用

做~自己de王妃 提交于 2019-12-16 13:33:03
介绍 react-router 被分为以下几部分: react-router是浏览器和原生应用中的通用部分。 react-router-dom是用于浏览器的。 react-router-native是用于原生应用的。 react-router 是核心部分。 react-router-dom 提供了浏览器使用需要的定制组件。 react-router-native 则专门提供了在原生移动应用中需要用到的部分。 安装 开发web引用只需要安装 react-router-dom 。 npm install react-router-dom --save 三个props history History是React Router的两大重要依赖之一,在不同的JavaScript环境中, history 以多种形式实现了对于session历史的管理。 history 对象通常会具有以下属性和方法: length - number类型,表示history堆栈的数量。 action - string类型,表示当前的动作。比如 pop 、 replace 或 push 。 location - object类型,表示当前的位置。 push(path, [state]) - function类型,在history堆栈顶加入一个新的条目。 replace(path, [state]) -

JS中document对象 && window对象

会有一股神秘感。 提交于 2019-12-16 12:10:11
所有的全局函数和对象都属于Window对象的属性和方法。 区别: 1、window 指窗体。Window 对象表示浏览器中打开的窗口。 document指页面。document是window的一个子对象、一个对象属性。 2、用户不能改变 document.location(因为这是当前显示文档的位置)。 但是,可以改变window.location (用其它文档取代当前文档) window.location本身也是一个对象, 而document.location不是对象。 如果文档包含框架(frame 或 iframe 标签),浏览器会为HTML文档创建一个window对象, 并为每个框架创建 一个额外的 window 对象。 document 对 Document 对象的只读引用。 document 当前显示的文档(该属性本身也是一个对象)。 frame 窗口里的一个框架((FRAME>)(该属性本身也是一个对象)。 frames array 列举窗口的框架对象的数组,按照这些对象在文档中出现的顺序列出(该属性本身也是一个对象)。 1、window:代表浏览器中一个打开的窗口。它是一个顶层对象,而不是另一个对象的属性。 (1)对象属性 (2)对象方法 (3)成员对象 2、document对象:代表整个HTML 文档,可用来访问页面中的所有元素。 (1)对象属性 (2)对象方法

nginx实际应用一

随声附和 提交于 2019-12-15 21:23:10
alias server { listen 80; server_name www.xxxpc.net ~^www\.site\d+\.net$; error_page 500 502 503 504 404 /50x.html; location /about { alias /data/nginx/pc/html; index index.html; } location /host.pass { deny all; } } 当访问www.xxxpc.net/about的时候,会直接跳转访问/data/nginx/pc/html/index.html这个资源 location的详细使用 uri:资源定位;当访问http://www.xxxpc.net/about/index.html时,uri为/about/index.html url:url是包含协议的;http://www.xxxpc.net/about/index.html这整个就是一个url = #用于标准uri前,需要请求字串与uri精确匹配,如果匹配成功就停止向下匹配并立即处理请求。 ~ #用于标准uri前,表示包含正则表达式并且区分大小写 !~ #用于标准uri前,表示包含正则表达式并且区分大小写不匹配 ~* #用于标准uri前,表示包含正则表达式并且不区分大写 !~* #用于标准uri前

js实现页面重新加载

戏子无情 提交于 2019-12-14 23:49:59
1、reload 方法,该方法强迫浏览器刷新当前页面。 语法:location.reload([bForceGet]) 参数: bForceGet, 可选参数, 默认为 false,从客户端缓存里取当前页。true, 则以 GET 方式,从服务端取最新的页面, 相当于客户端点击 F5(“刷新”) 2、 replace 方法,该方法通过指定URL替换当前缓存在历史里(客户端)的项目,因此当使用replace方法之后,你不能通过“前进”和“后退”来访问已经被替换的URL。 语法: location.replace(URL) 通常使用: location.reload() 或者是 history.go(0) 来做。 此方法类似客户端点F5刷新页面,所以页面method=”post”时,会出现”网页过期”的提示。 因为Session的安全保护机制。 当调用 location.reload() 方法时, aspx页面此时在服务端内存里已经存在, 因此必定是 IsPostback 的。 如果有这种应用: 需要重新加载该页面,也就是说期望页面能够在服务端重新被创建,期望是 Not IsPostback 的。 这里,location.replace() 就可以完成此任务。被replace的页面每次都在服务端重新生成。 代码: location.replace(location.href); 3

jq页面刷新+点击加载更多数据

六眼飞鱼酱① 提交于 2019-12-14 14:05:00
1. 页面刷新 (1) 页面加载刷新一次 function fresh ( ) { if ( location . href . indexOf ( "reload=true" ) < 0 ) { location . href + = "&reload=true" ; } } setTimeout ( "fresh()" , 50 ) ; (2) 刷新当前页面 window . location . reload ( ) ; (3) 刷新父亲对象(用于框架) parent . location . reload ( ) (4) 刷新父窗口对象(用于单开窗口) opener . location . reload ( ) (5) 刷新最顶端对象(用于多开窗口) top . location . reload ( ) 2. 点击加载更多 < div class = "page" > < span > 第一行数据 < span > < span > 第二行数据 < span > < span > 第三行数据 < span > < / div > < div id = "more" data - status = "1" > 加载更多 < / div > < input type = "hidden" id = "page" value = "2" > $ ( function ( )

how to get full address from passing Latitude and Latitude?

廉价感情. 提交于 2019-12-14 04:08:33
问题 i used the code on my phone bellow to get address { country, street, city}, but it didnt work for many inputs, why? and sometimes crashing . please how to get the full address by passing Longitude and Latitude to a method that returns all the available address to this Longitude and Latitude. can you please provide me with the answer to get best result. help me. import java.io.IOException; import java.util.List; import java.util.Locale; import android.app.Activity; import android.content