A detailed example of AOP in springServices that need to be enhancedIf you have the following service, his function is simple, print the input parameters and return the parameters.@Servicepublic class SimpleService { public String getName(String name) { System.out.println(get name is: + name); return name; Defining facets and tangency points@Component@Aspectpublic class LogAspect { // 定义切点 @Pointcut(within(com.ydoing.service..*)) // @Pointcut(execution(* com.ydoing.
parameter is not available, all strings after this character cannot be saved. Either way, this
"-" Cannot be converted successfully, and cannot be output. In addition, mb_convert_encoding does not have this bug.
2. mb_convert_encoding can specify multiple input encodings, which are automatically identified based on the content, but the execution efficiency is much lower than iconv; for example: $ str =
Mb_convert_encoding ($ str, "euc-jp", "ASCII,
, all strings after that character cannot be saved. Anyway, this"-" can not be converted successfully, cannot output. Another mb_convert_encoding does not have this bug.2. Mb_convert_encoding can specify a variety of input codes, which will be automatically recognized according to the content, but the execution efficiency is much worse than the iconv, such as: $str =Mb_convert_encoding ($str, "EUC-JP", "Ascii,jis,euc-
, remove the extension before php_mbstring.dll.
String iconv (string in_charset, string out_charset, string str)
Note: in addition to specifying the encoding to be converted, you can also add two suffixes: // transcoder and // ignore: // Transcoder automatically converts a character that cannot be directly converted into one or more similar characters. // ignore ignores the characters that cannot be converted, by default, the result is truncated from the first invalid character.
Returns the conv
The usage example of the character encoding conversion function in php, and the php example. The usage example of the character encoding conversion function in php. the example in this article describes the usage of the character encoding conversion function in php. The specific implementation method is as follows: examples of character encoding conversion functions in php, and examples of php
This article describes the usage of character encoding conversion functions in php. The specific imple
, configuring a transaction-processing configuration file, and not having to worry about transactions when writing the manager or action).Then, introduce the code implementation in the example.1. Introduction of JAR Package:2. Tangent aspect Code:Package COM.LZQ.SPRING.AOP;Import Org.apache.log4j.Logger;Import Org.aspectj.lang.JoinPoint;Import Org.aspectj.lang.ProceedingJoinPoint;Import Com.lzq.spring.test.AOPTest;/** * Facets *@author LZQ * * * *PublicClassAspect { Logger Logger = Logger.getlog
In general, with Iconv, only use the Mb_convert_encoding function if you encounter an inability to determine what encoding the original encoding is, or if the Iconv conversion fails to display properly.
iconv function Syntax:
echo iconv("ISO-8859-1", "UTF-8", "This is a test.");?>
mb_convert_encoding function Syntax:
/* Convert internal character encoding to SJIS */$str = mb_convert_encoding($str, "SJIS");/* Convert EUC-JP to UTF-7 */$s
mb_convert_encoding does not have this bug.
2. Mb_convert_encoding can specify a variety of input codes, which will be automatically recognized according to the content, but the execution efficiency is much worse than the iconv, such as: $str =
Mb_convert_encoding ($str, "EUC-JP", "Ascii,jis,euc-jp,sjis,utf-8"); " Ascii,jis,euc-jp,sjis,utf-8 "in the order of di
, execute the LS command at on May 1, 11, 21, and 31 every month. ]
Run all executable files in the/etc/cron. daily directory as root at every day.
50 7 * root run-parts/etc/cron. daily [Note: Run-parts parameter indicates that all executable files in the following directory are executed. ]
9. added a scheduling task.
There are two ways to add a scheduling task: 1) Enter crontab-E in the command line and add the corresponding task. Then, the WQ disk exits. 2) directly edit the/etc/crontab file,
Addlanguage KO. Ko
Addlanguage LTZ. LTZ
Addlanguage NL. nl
Addlanguage NN. nn
Addlanguage No. No
Addlanguage pl. Po
Addlanguage pt. PT
Addlanguage Pt-Br. Pt-Br
Addlanguage Ru. ru
Addlanguage Sv. sv
Addlanguage ZH-CN. ZH-CN
Addlanguage ZH-TW. ZH-TW
Languagepriority ZH-cn En ca CS da de El EO es et Fr he hr it Ja ko ltz nl nn no PL Pt-Br Ru sv zh-TW
Forcelanguagepriority prefer fallback
# Adddefacharset ISO-8859-1
Adddefacharcharset gb2312
Addcharset ISO-8859-1. iso8859-1. Latin1
Addcharset ISO-8
Compress the file as required. Write java classes.
Required jar package: jlha. jar
Specific requirements:
Import jp. gr. java_conf.dangan.util.lha.LhaHeader;
Import jp. gr. java_conf.dangan.util.lha.LhaOutputStream;
The code and comments are as follows:
/** Directoryzip. java ** created on 2008.7.8, pm4: 48 ** to change this template, choose tools | template manager * and open the template in the editor. *
disk will exit.2. directly edit the/etc/crontab file, that is, VI/etc/crontab, and add the corresponding task.
View scheduled tasksCrontab-l // list all current scheduling tasksCrontab-l-u JP // list all scheduling tasks of user JP
Delete Task SchedulingCrontab-r // delete all task scheduling tasks
Redirection of task scheduling execution resultsExample 1: Execute the LS command at every day and output the
Arabic
20423
Ibm423
IBM ebcdic Greek
20424
Ibm424
IBM ebcdic Hebrew
20833
X-ebcdic-koreanextended
IBM ebcdic Korean extended
20838
IBM-Thai
IBM ebcdic Thai
20866
Koi8-r
Russian (KOI8-R); Cyrillic (KOI8-R)
20871
Ibm871
IBM ebcdic Icelandic
20880
Ibm880
IBM ebcdic Cyrillic Russian
20905
Ibm905
IBM ebcdic Turkish
20924
Ibm00924
IBM ebcdic Latin 1/Open System (1047
cannot be output. In addition, mb_convert_encoding does not have this bug.2. mb_convert_encoding can specify multiple input encodings, which are automatically identified based on the content, but the execution efficiency is much lower than iconv; for example: $ str =
Mb_convert_encoding ($ str, "euc-jp", "ASCII, JIS, EUC-JP, SJIS, UTF-8"); "ASCII, JIS, EUC-JP, S
for 0th 15 30 45 60 minutes] 30 6 */10 ** ls every month, run the ls command at every 10 days [that is, run the ls command at on the 1st, 11th, 21st, and 31st of every month.] Run/etc/cron at every day as root. all executable files in the daily directory are 50 7 * root run-parts/etc/cron. daily [Note: run-parts parameter indicates that all executable files in the following directory are executed.] 9. There are two ways to add a new scheduling task: 1) Enter crontab-e in the command line and ad
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.