PHPÄ£ÄâʵÏÖJavaµÄendsWith
JavaÖеÄstartsWithºÍendsWith·½·¨£¬ÔÚfilterµÄ¹¦ÄÜʵÏÖÖкܷ½±ã£¬PHP¿ÉÒÔÓÃstrncmp()
ʵÏÖstartsWith£¬µ«ÊÇÎÞ·¨ÊµÏÖendsWith£¬ÓÐЩÈË»áÓÃÕýÔòÀ´ÊµÏÖ£¬µ«´ó¶àÊýÈ˶¼²»Ï²»¶ÕýÔò±í´ïʽµÄ²Ù×÷¡£
ÕâÀïÎÒͨ¹ýÒ»¸ö½Ðsubstr_compareµÄ·½·¨ÊµÏÖ(ͬʱËûÒ²ÄÜʵÏÖstartsWith)¡£
¶¨ÒåºÍÓ÷¨
substr_compare() º¯Êý´ÓÖ¸¶¨µÄ¿ªÊ¼³¤¶È±È½ÏÁ½¸ö×Ö·û´®¡£
¸Ãº¯Êý·µ»Ø£º
0 - Èç¹ûµÈÁ½×Ö·û´®Ïà
<0 - Èç¹û string1 £¨´Ó¿ªÊ¼Î»Öã©Ð¡ÓÚ string2
>0 - Èç¹û string1 £¨´Ó¿ªÊ¼Î»Öã©´óÓÚ string2
Óï·¨
substr_compare(string1,string2,startpos,length,case)
²ÎÊý
ÃèÊö
string1
±ØÐè¡£¹æ¶¨Òª±È½ÏµÄµÚÒ»¸ö×Ö·û´®¡£
string2
±ØÐè¡£¹æ¶¨Òª±È½ÏµÄµÚ¶þ¸ö×Ö·û´®¡£
startpos
¿ÉÑ¡¡£¹æ¶¨ÔÚ string1
Öеĺδ¦¿ªÊ¼±È½Ï¡£
length
¿ÉÑ¡¡£¹æ¶¨ÔÚ string1
ÖвÎÓë±È½ÏµÄ×Ö·ûÊý¡£
case
¿ÉÑ¡¡£¹æ¶¨ÊÇ·ñÖ¸¶¨´óСд±È½Ï¡£Ä¬ÈÏÊÇ FALSE £¨¶Ô´óСдÃô¸Ð£©¡£
ʹÓÃsubstr_compareÖØдºóµÄstartsWithºÍendsWithÈçÏÂ
function startsWith(){
$string1 = "XXXX";
$string2 = "XXXX";
if(strlen($string1)<strlen($string2)){ //ÈôµÚÒ»¸ö×Ö·û´®³¤¶ÈСÓÚµÚ¶þ¸öµÄʱºò£¬±ØÐëÖ¸¶¨·µ»Øfalse£¬
return false; //·ñÔòsubstr_compareÓöµ½ÕâÖÖÇé¿ö»á·µ»Ø0£¨¼´Ï൱£¬ÓëÊÂʵ²»·ûºÏ£©
}else{
return !substr_compare($string1,$string2,0,strlen($string2));//µ±µÚÒ»¸ö³¤¶È´óÓÚµÚ¶þ¸öʱ²Å¿ªÊ¼ÅжÏ
}
}
function endsWith(){
$string1 = "XXXX";
$string2 = "XXXX";
if(strlen($string1
Ïà¹ØÎĵµ£º
Íøַץȡ Java API ¸ÅÊö
http://code.google.com/intl/zh-CN/appengine/docs/java/urlfetch/usingjavanet.html
App Engine Ó¦ÓóÌÐò¿ÉÒÔÓëÆäËûÓ¦ÓóÌÐò½øÐÐͨÐÅ»òͨ¹ýץȡÍøÖ··ÃÎÊÍøÂçÉϵÄÆäËû×ÊÔ´¡£Ó¦ÓóÌÐò¿ÉÒÔʹÓÃÍøַץȡ·þÎñÀ´·¢³ö HTTP ºÍ HTTPS ÇëÇó²¢½ÓÊÕÏìÓ¦¡£³öÓÚЧÂʺÍÀ©Õ¹ÐÔ¿¼ÂÇ£¬Íøַץȡ·þÎñʹÓà G ......
×ֺţº´ó ÖРС
import java.awt.Graphics;
import java.io.File;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.SourceDataLine;
public class M ......
´«ÖDz¥¿ÍJAVAÅàѵstruts2ѧϰ±Ê¼Ç Ç°Á½ÌìÎÒÏÝÈëÁËstruts2ÔÀíµÄÄàÌ·Öв»¿É×Ô°ÇÁË£¬ÕâÖָоõÏ൱²»´í£¬µ«ÊÇÎÒ¸öÈË»¹ÊǸоõ»ù´¡Èç¹û²»ÊǺܺõĻ°£¬Ç§Íò²»ÒªÏÝÈ룬ÒòΪÕâÑùµÄ»°£¬ºÜÓпÉÄÜÈÃÒ»¸öÈ˱äµÃûÓÐÐÅÐÄ£¬»¹ºÃÎÒÊÇÒ»¸öÐÄÀí»¹´í²»´íµÄÈË£¬ËùÒԺܿì¾Í×ßÁ˳öÀ´¡£ËùÒÔ£¬ÎҵĸöÈ˸оõ»¹ÊÇ£¬ÏÈÕÆÎÕ»ù´¡£¬È»ºóÔÚÈ¥Àí½âÔÀí°É£¬Ò ......
Ò»¡¢ÔËËã·û
ËãÊõÔËËã·û£º+£¬-£¬*£¬/£¬%£¬++£¬--
¹ØϵÔËËã·û£º>£¬<£¬>=£¬<=£¬==£¬!=
²¼¶ûÂß¼ÔËËã·û£º!£¬&£¬^£¬|£¬&&£¬||
λÔËËã·û£º&£¬|£¬^£¬>>£¬<<£¬>>>
¸³ÖµÔËËã·û£º=
À©Õ¹¸³ÖµÔËËã·û£º+=£¬-=£¬*=£¬/=
×Ö·û´®Á´½ÓÔËËã·û£º+
Á½ÊýÏà³ý£¬ÄÇôÈç¹û ......
Ê×ÏÈÔÚLinuxÉÏ´´½¨Ò»¸ö¹²ÏíÎļþ¼Ð
mkdir /home/user/share
ÓÃrootÓû§Æô¶¯samba·þÎñ
service smb start
ÐÞ¸Äsmb.confÎļþ
sudo gedit /etc/samba/smb.conf »òÕß vi /etc/samba/smb.conf
[share]
path = /home/user/share
...
writable = yes
´´½¨¹²ÏíÓû§²¢ÉèÖÃÃÜÂë
sudo useradd smbusr
sudo smbpasswd -a s ......