Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javaÊó±êÍÏ·ÅÎļþ£¨Windows & LinuxÊÊÓã©

/*ͨ¹ýÊó±êÍÏ·ÅÎļþµ½Öƶ¨¿Ø¼þÖУ¬²¢ÅжÏÊÇ·ñΪÎļþ£¬Èç¹ûÊÇ£¬Ôòµ÷ÓÃÎļþ·¢ËÍ·½·¨ChatFrame.SendFile(finalpath);
*/
class TextDropTargetListener implements DropTargetListener
{
CODER Coder = new CODER();
CHAT_FRAME ChatFrame;
/**
Constructs a listener.
@param aTextArea the text area in which to display the
properties of the dropped object.
*/
public TextDropTargetListener(CHAT_FRAME CF)
{
ChatFrame = CF;
}
public void dragEnter(DropTargetDragEvent event)
{
/*
int a = event.getDropAction();
if ((a & DnDConstants.ACTION_COPY) != 0)
textArea.append("ACTION_COPY\n");
if ((a & DnDConstants.ACTION_MOVE) != 0)
textArea.append("ACTION_MOVE\n");
if ((a & DnDConstants.ACTION_LINK) != 0)
textArea.append("ACTION_LINK\n");
if (!isDragAcceptable(event))
{
event.rejectDrag();
return;
}
*/
}
public void dragExit(DropTargetEvent event)
{
}
public void dragOver(DropTargetDragEvent event)
{
}
public void dropActionChanged(DropTargetDragEvent event)
{
if (!isDragAcceptable(event))
{
event.rejectDrag();
return;
}
}
public void drop(DropTargetDropEvent event)
{
if(ChatFrame.gbl_isSendFileShow==false){
ChatFrame.gbl_isSendFileShow=true;
if (!isDropAcceptable(event))
{
event.rejectDrop();
return;
}
event.acceptDrop(DnDConstants.ACTION_COPY);
Transferable transferable = event.getTransferable();
DataFlavor[] flavors = transferable.getTransferDataFlavors();
String path = "";
String finalpath = "";
for (int i = 0; i < flavors.length; i++)
{
DataFlavor d = flavors[i];
//textArea.append("MIME type=" + d.getMimeType() + "\n");
try


Ïà¹ØÎĵµ£º

Linux²Ù×÷ϵͳϵĶàÏ̱߳à³ÌÏêϸ½âÎö£¨1£©


    zieckey £¨zieckey£Àyahoo.com.cn£©
    Ị̈߳¨thread£©¼¼ÊõÔçÔÚ60Äê´ú¾Í±»Ìá³ö£¬µ«ÕæÕýÓ¦ÓöàÏ̵߳½²Ù×÷ϵͳÖÐÈ¥£¬ÊÇÔÚ80Äê´úÖÐÆÚ£¬solarisÊÇÕâ·½ÃæµÄٮٮÕß¡£´«Í³µÄUnixÒ²Ö§³ÖÏ̵߳ĸÅÄµ«ÊÇÔÚÒ»¸ö½ø³Ì£¨process£©ÖÐÖ»ÔÊÐíÓÐÒ»¸öỊ̈߳¬ÕâÑù¶àÏ߳̾ÍÒâζ×Ŷà½ø³Ì¡£
ÏÖÔÚ£¬¶àÏ̼߳ ......

Linux²Ù×÷ϵͳϵĶàÏ̱߳à³ÌÏêϸ½âÎö£¨4£©


   º¯ÊýÔ­ÐÍ£º
   
#include <pthread.h>
void pthread_cleanup_push(void (*rtn)(void *),void *arg);
    º¯ÊýrtnÊÇÇåÀíº¯Êý£¬argÊǵ÷ÓòÎÊý
void pthread_cleanup_pop(int execute);
 
 
    ÔÚÇ°Ãæ½²¹ýÏ̵߳ÄÖÕÖ¹·½Ê½£¬ÊÇÕý³£ÖÕÖ¹»¹ÊÇ·Ç ......

linuxÔý¼Ç

 :::::::Linux ϵÄһЩ³£ÓÃÃüÁî
# uname -a # ²é¿´ÄÚºË/²Ù×÷ϵͳ/CPUÐÅÏ¢
# head -n 1 /etc/issue # ²é¿´²Ù×÷ϵͳ°æ±¾
# cat /proc/cpuinfo # ²é¿´CPUÐÅÏ¢
# hostname # ²é¿´¼ÆËã»úÃû
# lspci -tv # ÁгöËùÓÐPCIÉ豸
# lsusb -tv # ÁгöËùÓÐUSBÉ豸
# lsmod # Áгö¼ÓÔصÄÄÚºËÄ£¿é
# env # ²é¿´»·¾³±äÁ¿
×ÊÔ´ ......

¡¾Linux¡¿LinuxΪÍø¿¨¾²Ì¬ÅäÖÃIPµØÖ·µÈ

linuxÖÐÓÃifconfigΪÍø¿¨ÅäÖÃIPµØÖ·µÈ£¬ÔÚϵͳÖØÆôºó¾ÍʧЧÁË¡£ÎªÁ˱£Ö¤ÅäÖÃÓÀ¾ÃÉúЧ£¬ÐèÒª²ÉÓÃÐÞ¸ÄÅäÖÃÎļþµÄ¾²Ì¬ÅäÖ÷½·¨£¬×ܽáÈçÏ£º
1. cd /etc/sysconfig/network-scripts¡£
2. vi ifcfg-eth0(Ò²¿ÉÄÜÊÇeth1£¬eth2£¬·Ö±ð¶ÔÓ¦²»Í¬µÄÍø¿¨)
3. ÅäÖÃÄÚÈÝÈçÏ£º
    DEVICE=eth0   //Íø¿¨É豸à ......

linuxÈëÃÅ×ܽá

ϵͳ±ÀÀ£ÁËÒ»´Î£¬ºÜ¶àÎļþ¶¼¶ªÁË£¬ÐҺöªµÄÎļþ²»ÊǺÜÖØÒª¡£µÃÁËÕâ´Î½Ìѵ£¬ÒÔºóÒ»¶¨ÒªÇÚд²©¿Í£¬ÎÞÂÛ¶«Î÷¶àô¼¦Ã«ËâƤ£¬Ò»µ©ÄãÓùýÁËÈ»ºóÍü¼ÇÁËÈ»ºóijһÌìÓÖÐèÒªÓõÄʱºò£¬ÏëÆðÀ´×Ô¼ºÔø¾­»á¹ý¶øÏÖÔÚºÍÐÂÊÖÎÞÒ죬ÄÇÖÖÐÄÇé±ðÌáÓжàÓôÃÆÁË¡£
Õýʽתµ½linuxÓÐÁ½¸ö¶àÔÂÁË£¬ÓÃlinuxµÄÔ­Òò³ýÁËÃâ·ÑÒÔÍ⣬×îÖØÒªµÄ¾ÍÊÇlinuxÖÐÓÐÌ«¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ