helper to entertain itself. I am very interested in the computer graphic interface.
Swing components use some design patterns, which is worth studying and useful for programming!
You are always insisting on learning things. Many toolkit tools are similar. They are profound and others can be passed!
4. A Swing program learned in Youtobe video is included:
Packagecom. ting723.www;
Importjava. awt. Container;
Importjava. awt. GridLayout;
Importjava. awt. event. ActionEvent;
Importjava. awt. event
php_mbstring.dll.String iconv (string in_charset, string out_charset, string Str)Note:The second parameter, in addition to specifying the encoding to be converted, can also add two suffixes: // Transcoder and // ignore,Where:// 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, it is truncated from the first invalid character.Returns the converted string or fal
I. Introduction of AOP:Ii. Examples of AOP:Iii. Examples of UseRequirements: Before and after student added, print the log information;0) Spring AOP needs to refer to the jar package:1) Studentservice.java Interface: Package Com.cy.service; Public Interface Studentservice { publicvoid addstudent (String name);}View Code2) Studentserviceimpl.java Implementation class: Package Com.cy.service.impl; Import Com.cy.service.StudentService; Public class Implements Studentservice { @Override
ImportOrg.aspectj.lang.annotation.Before;4 5@Aspect//indicates that the current class is a tangent6 Public classMyaspect {7@Before ("Execution (* *). Isomeservice.dofirst (..)) ")8 Public voidbefore () {9System.out.println ("Perform a pre-notification method");Ten } One A@Before ("Execution (* *). Isomeservice.dofirst (..)) ") - Public voidbefore (Joinpoint JP) { -System.out.println ("Perform a pre-notification method
characters,
IGNORE ignores characters that cannot be converted, and the default effect is to truncate from the first illegal character.
Returns the converted string or FALSE on failure.
Use:
1. Found that iconv in the conversion character "-" to gb2312 error, if there is no ignore parameters, all the strings after the string can not be saved. In any case, this "-" cannot be converted successfully and cannot be exported. In addition Mb_convert_encoding does not have this bug.
2. Mb_convert_enco
Iconv is a conversion code, but there is an incomplete display problem when the Chinese transcoding.
Copy Code code as follows:
Iconv ("UTF-8", "Gb2312//ignore", $data); Add//ignore, ignore error
or use Mb_convert_encoding ()
Copy Code code as follows:
/* Convert internal code to SJIS * *
$str = mb_convert_encoding ($str, "Sjis");
/* Convert EUC-JP to UTF-7 * *
$str = mb_convert_encoding ($str, "UTF-7", "
, after the successful connection to the server broadcast messages, the end of the need to close IO stream and socket.
The above program, is a simple client to send messages to the server, that is, a simple one-way communication program.
two, the server side and the client send messages to each other
The above is just the client to send messages to the server, now look at the two can send messages between the program. Server side:
Import javax.swing.*;
Import java.awt.*;
Import java.awt.event.A
This article illustrates the usage of the character encoding conversion function in PHP, and shares it for everyone's reference. The implementation methods are as follows:
Generally speaking, in the Web page program, especially involves the reading of the database process, often the most annoying is the problem of character encoding, php4.0.6 above version provides mb_convert_encoding can facilitate the conversion of the code.
Specifically as follows:
Copy Code code as follows:
;
Create a panel and a label to store the picture as a background.
JPanel JP;
JLabel JL;
ImageIcon image;
Create a button for the test.
JButton JB;
public static void Main (string[] args) {new java_jframe ();
Public Java_jframe () {layeredpane=new jlayeredpane ();
Image=new ImageIcon ("D:\\fox download\\editplus_ck_xp85\\5.png");//Find a picture to see the effect.
Create th
. 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 pt-br RU SV ZH-TW
Forcelanguagepriority prefer fallback
#AddDefaultCharset iso-8859-1
Adddefaultcharset GB2312
Addcharset iso-8859-1. Iso8859-1 latin1
Addcharset iso-8859-2. iso8859-2 latin2. Cen
Addcharset iso-8859-3. iso8859-3 latin3
Addcharset iso-8859-4. Iso
characters,
IGNORE ignores characters that cannot be converted, and the default effect is to truncate from the first illegal character.
Returns the converted string or FALSE on failure.
Use:
1. Found that iconv in the conversion character "-" to gb2312 error, if there is no ignore parameters, all the strings after the string can not be saved. In any case, this "-" cannot be converted successfully and cannot be exported. In addition Mb_convert_encoding does not have this bug.
2. Mb_convert_enco
Merge a field in a single record: Concat ()If for the user table, the following:
ID
class
name
Age
1
1001
Zh
18
2
1001
En
19
3
1002
Cs
18
4
1002
Jp
19
If you want to display name and age as a field, there are:select id, class, concat(name, ": ", age) as name_age from user;Results:
month (1, 11, 21, 31st). 6:30 executes the LS command once. ]Every day 7:50 executes all executables in the/etc/cron.daily directory as root7 * * * Root run-parts/etc/cron.daily [Note: The Run-parts parameter indicates that all executables in the following directory are executed. ]9. New Scheduling taskThere are two ways to add a dispatch task:1), at the command line input: CRONTAB-E and then add the corresponding task, Wq save the disk to exit.2), directly edit the/etc/crontab file, that is, v
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.