server

How to disable HTTP OPTIONS Method in JBoss?

风格不统一 提交于 2019-12-01 07:54:20
问题 I'm trying to disable JBOSS HTTP OPTIONS method. Using the following syntax in the web.xml in JBoss, I can disable all the http-method except OPTIONS. Is there a way to successfully disable http-method OPTIONS? click here for screenshot <security-constraint> <web-resource-collection> <web-resource-name>Restricted</web-resource-name> <description>Declarative security tests</description> <url-pattern>/EVE/*</url-pattern> <http-method>PUT</http-method> <http-method>DELETE</http-method> <http

socket binding won't return an int

陌路散爱 提交于 2019-12-01 07:42:25
问题 A snippet of my code looks as follows: int descriptor = socket(AF_INET, SOCK_STREAM, 0); if(descriptor < 0){ cerr << "Error establishing socket connection." << endl; return -1; } int port = 3400; struct sockaddr_in address; char buffer[140]; address.sin_family = AF_INET; address.sin_addr.s_addr = htons(INADDR_ANY); address.sin_port = htons(port); int size = sizeof(address); if(bind(descriptor,(struct sockaddr*)&address,size) < 0){ cerr << "Error binding socket." << endl; } cout << "Waiting

Win-Server-2008-R2-x64安装Oracle-11g-R2-x64及问题处理

心不动则不痛 提交于 2019-12-01 07:24:42
一、安装数据库 1、高级安装-->语言选择UTF-8,使用统一密码。 2、一路 下一步 ,安装完成。 3、 PLSQL Developer使用出现以下问题: 3.1、Database下拉框为空: 3.2、 强制输入用户名、密码及 Database ,登录弹出: 说明PLSQL Developer并不支持 Oracle 64 位客户端连接。 3.3、 解决办法 : 3.3.1、 下载 32 位绿色版Oracle客户端、解压 将下载到的将其解压,如我解压到了 D:\soft\instantclient_11_2 3.3.2、 设置PLSQL Developer 在工具 - 首选项,连接, OCI 主目录名输入: D:\soft\instantclient_11_2 在工具 - 首选项,连接, OCI 库输入: e:\app\instantclient_11_2\oci.dll 如下图: 3.4、 链接数据库方法 3.4.1、将数据库安装目录下D:\app\Administrator\product\11.2.0\dbhome_1\ 下 NETWORK整个文件夹拷贝D:\instantclient_11_2下即可链接本地数据库。 3.4.2、修改D:\instantclient_11_2\NETWORK\ADMIN下tnsnames.ora文件,新增其他数据库连接即可链接外部数据库。

Mac下安装mysql服务及基于workbench的使用方法

徘徊边缘 提交于 2019-12-01 06:59:51
首先,Mac下安装Mysql服务及客户端的方式与Windows和Linux都是不一样的。 其次,mysql5.7的安装方式与之前版本的安装过程也有不同。 网上好多教程都不完整,下面是我安装mysql服务的完整过程,给大家参考。 一、安装文件准备 1、mysql Server安装文件 在 http://www.mysql.com/downloads/ 地址的底部找到 "MySQL Community Edition" 点击下部的下载连接。 在随后弹出的页面中点击 DownLoad连接即可。 2、mysql workBench下载 在 http://dev.mysql.com/downloads/workbench/ 页面底部点击Download连接。 在随后弹出的页面的底部,点击真实下载连接: 两个文件下载完成后在Finder中列表如下: 二、安装过程 1、安装mysql Server 在以上目录中双击 mysql-5.7.13-osx10.11-x86_64.dmg 文件,安装过程一直next即可,过程中如果想更改安装路径,按页面提示操作即可。 注意:安装完成后会弹出一个提示框,提示框中有临时密码,必须记住,否则后面会很麻烦。界面上的文字可以复制。界面大致如下: 其中为root生成的临时密码为(每次安装实例都会不一样): pa6#)eFhloj6

Why the openfire's user remains ONLINE even with no SESSION exists in sessions

筅森魡賤 提交于 2019-12-01 05:48:30
I'm developing an android app contains "Messaging" using OpenFire as an XMPP server and using Smack for android client. All functions works fine, but when a user is online(as you can see it's state in admin panel of openfire), and network connectivity disconnected suddenly, the session of it will be destroyed, but the user remains ONLINE in server! Thus, the packets not stores in server as an offline messages and will be sent to user even the user is offline and packets will be lost! I was tested an windows client (Spark), but when its connectivity losing, session in server will be destroyed

JVM client模式和Server模式的区别

狂风中的少年 提交于 2019-12-01 04:50:01
这里向大家描述一下 JVM client模式和Server模式两者的区别和联系,JVM如果不显式指定是-Server模式还是-client模式,JVM能够根据下列原则进行自动判断(适用于Java5版本或者Java以上版本)。 JVM client模式和Server模式 JVM Server模式与client模式启动,最主要的差别在于:-Server模式启动时,速度较慢,但是一旦运行起来后,性能将会有很大的提升。JVM如果不显式指定是-Server模式还是-client模式,JVM能够根据下列原则进行自动判断(适用于Java5版本或者Java以上版本)。 前段时间有个同事给我发了个java跟c++性能比较的文章,其中有个对比图引起了我的兴趣,意外的是,我感兴趣的不是java和c++的对比,而是java -Server模式和java -client模式的对比。从来没想到两者间的性能有如此巨大的差别。而在后来自己的亲身测试中发现确实如此。 下面是我看到的那个对比图: 图中最显著的就是JVM client模式和Server模式关于method call的对比,那个差别不是一般的大,在后来的测试中发现,相差至少有10倍。 下面是另外两个对比图: JVM工作在Server模式可以大大提高性能,但应用的启动会比client模式慢大概10%。当该参数不指定时,虚拟机启动检测主机是否为服务器,如果是

Why the openfire's user remains ONLINE even with no SESSION exists in sessions

*爱你&永不变心* 提交于 2019-12-01 03:46:56
问题 I'm developing an android app contains "Messaging" using OpenFire as an XMPP server and using Smack for android client. All functions works fine, but when a user is online(as you can see it's state in admin panel of openfire), and network connectivity disconnected suddenly, the session of it will be destroyed, but the user remains ONLINE in server! Thus, the packets not stores in server as an offline messages and will be sent to user even the user is offline and packets will be lost! I was

java.lang.IllegalArgumentException: No suitable parent found from the given view. Please provide a valid view

那年仲夏 提交于 2019-12-01 03:35:26
my app crashes when trying to display server message and I think the problem could be with my getView() . below is the registerActivity were the crash occurs and my activity_register.xml import android.app.Activity; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.Snackbar; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar; import android.widget.Toast; import com.fastchat.helper.SQLiteHandler; import com.fastchat.helper

oracle自带的一些基本的常用的函数

牧云@^-^@ 提交于 2019-12-01 03:04:42
1.TO_DATE(字符串,日期格式) oracle自带函数 将字符串转化成日期处理 直接传入的util.date会,有可能与数据库的sql.date不匹配而报错 例如:SELECT TO_DATE('2008-8-8','yyyy-MM-dd') FROM DUAL; 2. NVL(字段,默认值) oracle自带函数 当前一个字段为空可以设置一个默认的值 当数字类型时有效的避免了将空赋值而报错 SELECT NVL(COUNT(*),0) FROM EMP; 3.SUBSTR(字符串,截取开始位置,截取长度) ORACLE自带函数//返回截取的字 substr('Hello World',0,1) //返回结果为 'H' *从字符串第一个字符开始截取长度为1的字符串 substr('Hello World',1,1) //返回结果为 'H' * 0和1都是表示截取的开始位置为第一个字符 substr('Hello World',2,4) //返回结果为 'ello' substr('Hello World',-3,3)//返回结果为 'rld' *负数(-i)表示截取的开始位置为字符串右端向左数第i个字符 测试: select substr('Hello World',-3,3) value from dual; 4.INSTR (源字符串, 目标字符串, 起始位置, 匹配序号

centos6.x 配置 vnc server

一笑奈何 提交于 2019-12-01 02:21:21
环境: centos6.x 桌面环境 用户root 安装vnc服务端软件 yum install -y tigervnc-server 配置vnc vncserver :1 设置密码后会自动生成相关配置文件 如下 root@localhost ~]# vncserver :1 You will require a password to access your desktops. Password: Verify: xauth: (stdin):1: bad display name "localhost:1" in "add" command New 'localhost:1 (root)' desktop is localhost:1 Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/localhost:1.log 配置防火墙 vnc服务默认使用5900以后端口 :1使用5901 :2使用5902 ##以此类推 查看使用哪个端口 netstat -tupln|grep vnc tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 5969/Xvnc