2016年

windows下可以使用向导一步一步创建数据库,注意编码。

windows连接到某一个数据库实例(不然会默认到一个实例下面):
set ORACLE_SID=TEST

--登录开始创建表空间及可以操作的用户
sqlplus / as sysdba;

--创建表空间
create tablespace db_test
datafile 'D:\oracle\oradata\TEST\db_test.dbf'
size 50m
autoextend on;

--查询创建好的表空间
select default_tablespace, temporary_tablespace, d.username
from dba_users d

--删除表空间
DROP TABLESPACE db_test INCLUDING CONTENTS AND DATAFILES;

--创建用户,注意设置表空间范围
CREATE USER test
IDENTIFIED BY test
DEFAULT TABLESPACE db_test;

select * from dba_users;

--授权
grant connect, resource,dba to test;


导出导入命令:
exp a/a@DB FILE=d:\a.dmp OWNER=usera GRANTS=y ROWS=y COMPRESS=y log=D:\sample.log;
imp a/a@DB file=d:\a.dmp fromuser=usera touser=userb ignore=y log=D:\sample.log;

nginx二级域名配置自动跳转到一级域名
rewrite配置内容:
if ($http_host !~ "^www.aaa.com$") {
rewrite
^(.*) http://www.aaa.com$1 permanent; }

下方,nginx代理访问项目proxy_pass,及rewrite参考
server
{
listen
80;
server_name www.aaa.com
100.100.100.100;
location
/{if ($http_host !~ "^www.aaa.com$") {
rewrite
^(.*) http://www.aaa.com$1 permanent; }
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X
-Real-IP $remote_addr;
proxy_set_header X
-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http:
//192.168.1.2:8000; }
access_log logs
/aaa.com_access.log; }

 

function scrollToEnd(){//滚动到底部
            var h = $(document).height()-$(window).height();
$(document).scrollTop(h);
}

更多专业开发技能,让你事半功倍,成为技术大咖,请扫码了解!

 

 

js判断undefined类型

    if (reValue== undefined){
    alert("undefined");
    }
  发现判断不出来,最后查了下资料要用typeof
方法:
if (typeof(reValue) == "undefined") { 
   alert("undefined"); 
}  

typeof 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、"undefined"

1、Java1-1、字符串数组=>字符串:StringUtils: join(Object[] array, String separator) 

例:


Java代码 收藏代码
importorg.apache.commons.lang.StringUtils;public classStringUtilsTrial {public static voidmain(String[] args) {//Join all Strings in the Array into a Single String,//separated by $#$ System.out.println(StringUtils.join(new String[] { "AB", "CD", "EF" }, "$#$"));
}
}
1-2、字符串=>字符串数组:String: split(String separator)

例:

Java代码 收藏代码
publicSplitDemo() {
String s
= "AB$#$CD$#$EF";//在每个空格字符处进行分解。 String[] ss = s.split("$#$");
}
2、JavaScript2-1、字符串数组=>字符串:Array: join(String separator)

例:

Js代码 收藏代码
<mce:script type="text/javascript"> <!--var a= new Array("a","b","c");
a.join(
"|");
alert(a);
//--> </mce:script> 2-2、字符串=>字符串数组:String: split(String separator)、String: split(String separator, intlength)

例:

Js代码 收藏代码
<mce:script type="text/javascript"> <!--var str= "一二三四";
var str1
= "篮球、排球、乒乓球";
var arr
= str.split("");//全部分割 var arr1 = str1.split("、");//按照顿号分割 var arr2 = str1.split("、",2);//按照顿号分割,保留两段//--> </mce:script>

 

免责声明
本博客部分内容来自于互联网,不代表作者的观点和立场,如若侵犯到您的权益,请联系[email protected]。我们会在24小时内进行删除。