apache

Setting up virtual host on XAMPP

别说谁变了你拦得住时间么 提交于 2021-02-06 23:58:35
问题 I've installed XAMPP on Ubuntu in '/opt/lampp' directory and would like to set up some VirtualHosts. Apache Virtual Host tutorial instructs to place <VirtualHost *:80> ... </VirtualHost> code in '/etc/apache2/sites-available/[virtualhostname].conf'. The problem is that I don't have 'apache2' folder in '/etc'. I also don't have 'sites-available' directory in '/opt/lampp/apache2'. I have '/opt/lampp/etc/httpd.conf' and '/opt/lampp/etc/extra/httpd-vhosts.conf' files though. Which ones shall I

Java 判断数字字符串,空字符串返回 true

删除回忆录丶 提交于 2021-02-06 19:33:21
问题 使用 StringUtils.isNumeric 判断是否是数字字符串 public static void main ( String [] args ) { System . out . println ( StringUtils . isNumeric ( "" )) ; } 竟然输出 true 解决过程 看了下源码得知 StringUtils.isNumeric("") = true 确实会输出 true 注意此时我用的是 org.apache.commons.lang 这个版本的包 /** * <p>Checks if the String contains only unicode digits. * A decimal point is not a unicode digit and returns false.</p> * * <p><code>null</code> will return <code>false</code>. * An empty String (length()=0) will return <code>true</code>.</p> * * <pre> * StringUtils.isNumeric(null) = false * StringUtils.isNumeric("") = true * StringUtils

LAMP服务环境搭建

余生长醉 提交于 2021-02-06 15:37:39
操作系统:CentOS Linux release 7.9 一、安装Apache 1.安装Apache依赖库和相关软件包 # wget -c http://archive.apache.org/dist/apr/apr-1.6.3.tar.gz [root@Linux tool]# tar zxvf apr-1.6.3.tar.gz [root@Linux tool]# cd arp-1.6.3 [root@Linux apr-1.6.3]# ./configure --prefix=/usr/local/apr [root@Linux apr-1.6.3]# make -j 8 && make install # wget https://mirror.bit.edu.cn/apache//apr/apr-util-1.6.1.tar.gz [root@Linux /]# yum install expat expat-devel [root@Linux tool]# tar zxvf apr-util-1.6.1.tar.gz [root@Linux tool]# cd apr-util-1.6.1 [root@Linux apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr

Is it possible to have a nested MultipartEntities or FormBodyPart in a multipart POST?

牧云@^-^@ 提交于 2021-02-06 15:29:41
问题 I'm trying to make something the following server POST request using MultipartEntity: parameters: {"parameter1"=>"parameter1", "parameter2"=>{"sub_parameter1"=>"sub_parameter1", "sub_parameter2"=>"sub_parameter2"}} I am currently using something like: multipartEntity.addPart("parameter1", new StringBody("parameter1")); FormBodyPart parameter2 = new FormBodyPart("parameter2", new StringBody("")); // It wouldn't allow a null ContentBody parameter2.addField("sub_parameter1", "sub_parameter1");

Is it possible to have a nested MultipartEntities or FormBodyPart in a multipart POST?

旧城冷巷雨未停 提交于 2021-02-06 15:26:59
问题 I'm trying to make something the following server POST request using MultipartEntity: parameters: {"parameter1"=>"parameter1", "parameter2"=>{"sub_parameter1"=>"sub_parameter1", "sub_parameter2"=>"sub_parameter2"}} I am currently using something like: multipartEntity.addPart("parameter1", new StringBody("parameter1")); FormBodyPart parameter2 = new FormBodyPart("parameter2", new StringBody("")); // It wouldn't allow a null ContentBody parameter2.addField("sub_parameter1", "sub_parameter1");

Is it possible to have a nested MultipartEntities or FormBodyPart in a multipart POST?

只愿长相守 提交于 2021-02-06 15:26:27
问题 I'm trying to make something the following server POST request using MultipartEntity: parameters: {"parameter1"=>"parameter1", "parameter2"=>{"sub_parameter1"=>"sub_parameter1", "sub_parameter2"=>"sub_parameter2"}} I am currently using something like: multipartEntity.addPart("parameter1", new StringBody("parameter1")); FormBodyPart parameter2 = new FormBodyPart("parameter2", new StringBody("")); // It wouldn't allow a null ContentBody parameter2.addField("sub_parameter1", "sub_parameter1");

Calling Macro function in Velocity template

北慕城南 提交于 2021-02-06 15:14:01
问题 I am trying to figure out how to return a value from a velocity macro call and assign it to a varaible my macro function looks something like this. its once in common shared macros files #macro(getBookListLink, $readingTrackerResult) $readingTrackerResult.getBookListLink() #end I am need to assign the result of this macro to a variable in another velocity template file I tried something like this #set($book_list_link = #getBookListLink( $readingTrackerResult )) but did not work. I tried with

Calling Macro function in Velocity template

心已入冬 提交于 2021-02-06 15:11:12
问题 I am trying to figure out how to return a value from a velocity macro call and assign it to a varaible my macro function looks something like this. its once in common shared macros files #macro(getBookListLink, $readingTrackerResult) $readingTrackerResult.getBookListLink() #end I am need to assign the result of this macro to a variable in another velocity template file I tried something like this #set($book_list_link = #getBookListLink( $readingTrackerResult )) but did not work. I tried with

Calling Macro function in Velocity template

与世无争的帅哥 提交于 2021-02-06 15:10:41
问题 I am trying to figure out how to return a value from a velocity macro call and assign it to a varaible my macro function looks something like this. its once in common shared macros files #macro(getBookListLink, $readingTrackerResult) $readingTrackerResult.getBookListLink() #end I am need to assign the result of this macro to a variable in another velocity template file I tried something like this #set($book_list_link = #getBookListLink( $readingTrackerResult )) but did not work. I tried with

Downloading files with download.php

↘锁芯ラ 提交于 2021-02-06 11:41:28
问题 I need to deliver big files like file.zip (~2 GB) to customers, with a unique URL for each customer. Then I will redirect (with .htaccess ) a customer download link example.com/download/f6zDaq/file.zip to something like example.com/download.php?id=f6zDaq&file=file.zip But as the files are big, I don't want the fact that PHP processes the downloading (instead of just letting Apache handle it) to be a CPU / RAM performance issue for my server. After all, asking PHP to do it involves a new layer