echo

Captilize every word in ECHO string with PHP

微笑、不失礼 提交于 2020-01-06 15:21:00
问题 Aps if this seems really basic, I'm not a PHP developer. OK this shows you how to captalize each word in a string Capitalise every word of a string in PHP? BUT, how do you incorporate this into multiple strings being echoed? For example I have <?php echo $prefillTitle, ' ', $prefillFirstname, ' ', $prefillLastname; ?> How would I ensure each parameter echoes with it's first letter as a capital using the ucwords(). Would it be as simple as this? <?php echo ucwords($prefillTitle, ' ',

批处理文件应用

北战南征 提交于 2020-01-06 14:56:03
过滤DS生成的pdb文件中的额外信息。拖入生成的pdb文件,自动生成以原文件名加_new结尾的新pdb文件。 @echo off setlocal enabledelayedexpansion set new=%~dpn1_new%~x1 if exist %new% del %new% for /f "delims=" %%i in (%1) do ( set j=%%i if "!j:~,6!"=="HETATM" echo !j!>>%new% if "!j:~,3!"=="END" echo !j!>>%new% ) if %errorlevel% equ 0 (echo OK) else (echo Failed) pause>nul 来源: https://www.cnblogs.com/cp45899/p/12147744.html

centos7一键彻底删除和重装mysql (妈妈再也不用担心我一条条复制粘贴命令啦)

爷,独闯天下 提交于 2020-01-06 14:44:16
考研去了,几个月没管项目,今天一打开数据库挂了,各种问号,按照网上一些步骤执行命令却把mysql彻底搞崩了,突然料到可能是因为我阿里云装的宝塔面板还有一堆其他东西导致相同的命令别人行我却不行,无奈,干脆写一个从头到尾自动删除和重装mysql的脚本,最好是能一执行完就能直接navicat连接的那种! 先直接看效果: (彻底删除mysql的部分截图) (自动配置mysql的部分截图) (对,然后就连接成功了) shell脚本代码如下: 当然你也可以直接在github上下载最新版本: 点这里 #删除mysql及其相关依赖包 echo "正在删除mysql及其相关依赖包..." rpm -qa | grep -i mysql | xargs rpm -e --nodeps echo "Done." #删除mysql所涉及的安装目录 echo "正在删除mysql所涉及的安装目录..." whereis mysql | xargs rm -rf echo "Done." #删除所有和mysql相关的目录 echo "正在删除所有和mysql相关的目录..." find / -name mysql | xargs rm -rf echo "Done." #删除所有配置文件 echo "正在删除所有配置文件..." find / -name my.cnf* | xargs rm -rf echo

Need help echoing the checked boxes selected by the user

落爺英雄遲暮 提交于 2020-01-06 13:58:52
问题 How to display selected checkbox? I tried but it didnt work <input type=checkbox value="Administrative"<?php echo ($industry_sector1a == 'Administrative' ? 'selected="selected"' : ''); ?>name="industry_sector1"> Administrative I use the below for drop down boxes . <option value="-1"<?php echo ($native_language == '-1' ? 'selected="selected"' : ''); ?>>----- Please Select -----</option> <option value="1"<?php echo ($native_language == '1' ? 'selected="selected"' : ''); ?>>English - United

REQUEST_URI: echo$url : only get the number of url

北战南征 提交于 2020-01-06 12:52:11
问题 I have a website for recruitment services. When people respond to a vacancy, the url of the vacancy is echo'd in the response form (hidden field) so I see on what vacancy they respond. I use this code for it on the response button, it redirects to the response form: vacature= $ url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];echo $url; On the website the vacancies have links of the title, combined with the vacancy number: website_url/vacancy_title-number For example: www.test.com

shell编程题(十四)

断了今生、忘了曾经 提交于 2020-01-06 10:16:44
题目: 编写一个的脚本,它包括以下内容 a) 包含一段注释,列出您的姓名、脚本的名称和编写这个脚本的目的。 b) 问候用户。 c) 显示日期和时间。 d) 显示这个月的日历。 e) 显示您的机器名。 f) 显示当前这个操作系统的名称和版本。 g) 显示父目录中的所有文件的列表。 h) 显示root正在运行的所有进程。 i) 显示变量TERM、PATH和HOME的值。 j) 显示磁盘使用情况。 k) 用id命令打印出您的组ID。 m) 跟用户说“Good bye” 答案: #!/bin/bash user=`whoami` case $user in root) echo "hello robot";; ubuntu) echo "hello ubuntu";; *) echo "hello $user, welcome" esac echo "date: `date`" echo "calendar: `cal`" echo "name: `uname -n`" echo "name of operation and version: `uname -s; uname -r`" echo "all file list of parent menu: `ls ../`" echo "all process running of root: `ps -u root`" echo

Displaying links in PHP/MySQL?

扶醉桌前 提交于 2020-01-06 08:57:08
问题 Thank you for answering my question at Ignore null results in MySQL JOIN queries I've created my own radio station website in localhost, at http://myradiostation.localhost This is the code: <?php $connection = mysql_connect("localhost", "root", "PASSWORD") or die("Error connecting to database"); mysql_select_db("radio1", $connection); $result = mysql_query("SELECT * FROM presenters;", $connection) or die("error querying database"); $i = 0; while($result_ar = mysql_fetch_assoc($result)){ ?>

MAC下配置WebDav

冷暖自知 提交于 2020-01-06 08:48:42
WebDav 完全可以当成一个网络共享的文件服务器使用! # 1. 修改了两个配置文件 # 2. 创建 web 访问用户的用户名和口令 # 3. 创建了两个目录,并且设置了管理权限 # 切换目录 $ cd /etc/apache2 $ sudo vim httpd.conf # 查找 httpd-dav.conf /httpd-dav.conf " 删除行首 #" # 将光标定位到行首 0 # 删除行首的注释 x # 保存退出 :wq # 切换目录 $ cd /etc/apache2/extra # 备份文件(只要备份一次就行) $ sudo cp httpd-dav.conf httpd-dav.conf.bak # 编辑配置文件 $ sudo vim httpd-dav.conf " 将 Digest 修改为 Basic" # 查找 Digest /Digest # AuthType Basic # 进入编辑模式 i # 返回到命令行模式 ESC # 保存退出 :wq # 切换目录,可以使用鼠标拖拽的方式 $ cd 保存 put 脚本的目录 # 以管理员权限运行 put 配置脚本 $ sudo ./put 设置两次密码 : (例)123456 注意:要在 Mac 10.10 配置 Web-dav 还需要在 httpd.conf 中打开以下三个模块 LoadModule dav

Mule Echo component changes the message

孤街醉人 提交于 2020-01-06 08:04:03
问题 The Mule Echo component is meant to output the current message to the console. As far as the documentation goes the Echo component shouldn't change the message in any way. However I have noticed that it does have an effect on the message seemingly similar to an Object to String component. Is this expected or is it a bug? 回答1: It is expected. Use the <logger> message processor, which is a replacement of the obsolete Echo Component, and which doesn't log the message payload by default, i.e.

linux tomcat自启动设置

徘徊边缘 提交于 2020-01-05 18:22:23
1、进入/etc/init.d 2、新建文件tomcat,内容如下: #!/bin/sh # chkconfig: 345 99 10 # description: Auto-starts tomcat # /etc/init.d/tomcat # Tomcat auto-start # Source function library. #. /etc/init.d/functions # source networking configuration. #. /etc/sysconfig/network RETVAL=0 export JRE_HOME=/usr/jre1.6.0_22 export CATALINA_HOME=/usr/tomcat6 export CATALINA_BASE=/usr/tomcat6 start() { if [ -f $CATALINA_HOME/bin/startup.sh ]; then echo $"Starting Tomcat" $CATALINA_HOME/bin/startup.sh RETVAL=$? echo " OK" return $RETVAL fi } stop() { if [ -f $CATALINA_HOME/bin/shutdown.sh ]; then echo $"Stopping Tomcat"