遺失必要的CD/DVD磁碟裝置驅動程式



無法安裝還要額外整合程式?還要去BIOS修改?底下教你的方法通通不用

出處:www.xfastest.com
相信有玩家聽說Skylake平台上無法直接用Windows 7隨身碟安作業系統,因為Skylake基本上無法使用USB安裝Windows 7系統,因為Skylake移除EHCI主控,改用XHCI,而Windwos 7是不支援的,但是不代表Skylake平台無法安裝Windwos 7,相信有玩家可能要透過Windows 7升級Windows 10,但是如果在Skylake平台上無法安裝Windows 7那怎麼升級成Windwos 10呢?

其實因為這個問題目前各主機板廠商都有其解決方法,讓玩家們可以在Skylake平台上安裝Windows 7,玩家們如果有購買SKylake平台的話可以翻翻產品說明書,就會發現有Windows 7安裝教學,像是華碩透過他們自家的軟體光碟幫助你安裝作業系統,前提你要有一台SATA介面的光碟機,而MSI則是在說明書內教你怎麼製作可安裝的Windwos 7隨身碟,而華擎在說明書內有教你如何把驅動裝到Windows 7隨身碟內,讓使用者可以自己製作。

其實小編覺得目前最簡單的方法是直接用SATA光碟機使用Windows 7光碟去安裝系統是最簡單的方法,但是可能已經有許多玩家沒有加裝SATA光碟機,因此小編這次要教大家改Windows 7裡面的檔案,那樣就可以順利使用Windows 7隨身碟安裝系統囉!

事前要準備項目
Windows 7系統隨身碟(32bit&64bit自己選擇)
Intel USB 3.0驅動(32bit&64bit自己選擇)
Intel USB 3.0驅動下載點(內含32位元和64位元驅動)

第一步:把Windows 7隨身碟sources資料夾內的boot.Wim複製到X86資料夾內
P.S:資料夾名稱可以自己設定,不然就像小編設定一樣的資料夾名稱,小編是在D槽內設定一個資料夾叫X86,然後把boot.Wim複製到資料夾內,建議你資料夾設定跟小編的一樣那就可以直接複製貼上指定即可


新增說明文字

第二步:在X86資料夾內建立兩個資料夾,分別為mount和USB3
P.S建議你資料夾設定跟小編的一樣那就可以直接複製貼上指定即可


第三步:把下載的Intel USB3.0驅動解壓縮


第四步:把Intel USB3.0驅動內的Driver內的檔案複製到USB3資料夾內
如下圖兩張照片中的檔案複製到USB3的資料夾內
P.S:如果你的作業系統是64位元的就複製64位元資料夾內的檔案,那你的作業系統是32位元的就複製32位元資料夾內的檔案



而下圖就是你USB3內應該有的檔案,玩家可以比對一下是否有漏失


第五步:開啟CMD命令提示字元
P.S:記得以系統管理員身分執行



第六步:輸入指令加入驅動
如果你設定的資料夾都跟小編的一樣你可以直接複製小編的指令就可以輕鬆加入驅動

輸入D: 按下enter 
如果你是放在其他槽那你就輸入其他槽的名稱,像是:E、F等

輸入cd X86按下enter

輸入dism /mount-wim /wimfile:boot.wim /index:2 /mountdir:mount

輸入dism /image:mount /add-driver /driver:usb3\iusb3hub.inf按下enter

輸入dism /image:mount /add-driver /driver:usb3\iusb3xhc.inf按下enter

輸入dism /image:mount /add-driver /driver:usb3\iusb3hcs.inf按下enter

輸入dism /unmount-wim /mountdir:mount /commit按下enter

完成

以上不論你是64位元的還是32位元的輸入方式都跟以上相同

指令步驟圖


第七步:把X86資料夾內的boot.wim複製回去Windows 7隨身碟的sources資料夾內


第八步:做好以上動作後,代表可在Skylake主機板上安裝Windows 7系統的隨身碟已經大功告成囉!

透過以上的步驟,不論你是64位元版本還是32位元版本都可以輕鬆搞定,只是你驅動版本要複製對那就沒有問題。

使用未修改前的Windows 7隨身碟安裝會出現下面的畫面,這樣是無法順利安裝的


使用修改後的Windwows 7隨身碟安裝會是下方的畫面,放心順利安裝系統囉

免自己製作boot.wim,下載覆蓋即製作完成
應該有玩家看到以上的步驟會覺得很麻煩又擔心自己弄步驟失敗,所以小編提供32位元和64位元的檔案,使用者只需要覆蓋到Windows 7隨身碟的sources資料夾即可,玩家記得依據自己的位元版本下載檔案。

32位元下載點

64位元下載點

P.S:為了怕玩家們失敗毀掉隨身碟,小編會建議你覆蓋檔案前記得先複製一份Windows 7隨身碟sources資料夾內boot.wim的檔案到自己的電腦內,如果失敗只要把檔案覆蓋回去你的隨身碟就復活囉。

此方法不適合你的windows 7是整合32和64位元版本的隨身碟使用,因此才會請玩家先備份檔案

[Centos7] 新的防火牆firewalld

什麼?我在新裝的Centos7中竟然沒有找到iptables以及ip6tables,我直覺的想:應該是要自己安裝吧。不過事實上,我發現開的通訊埠都連不上,以為是selinux的問題,結果才知道,Centos7的防火牆是我好像聽過事實上是沒聽過的firewalld (呃,取這個名字?會不會太貼切了~~)

系統

CentOS Linux release 7.0.1406 (Core)

firewalld執行指令

啟動
# service firewalld start
停止
# service firewalld stop
重新啟動
# service firewalld restart
重讀設定
# firewall-cmd --reload

查看狀態
# service firewalld status
或
# firewall-cmd --state

程式設定

目錄 /etc/firewalld
設定檔 /etc/firewalld/firewalld.conf

防火牆基礎操作

畢竟他是一個防火牆,所以他引入了防火牆的zone的觀念,一看到就能瞭,一個zone可以有規則,zone到zone也可以有規則。
預設是一個叫 public的 zone,就是外面進到伺服器的zone,如果伺服器很單純對外服務不當路由器的話,這個zone就夠了。
操作這個防火牆如果有圖形介面直接在選單中點選防火牆就好了,圖形化易學易懂較沒問題,指令的話主要是用firewall-cmd 這個指令。
查看zone
# firewall-cmd --get-default-zone
public
查看運作中的zone和zone裡的介面
# firewall-cmd --get-active-zones
public
  interfaces: ens192
可以看到ens192這個介面是在public 這個zone中。
查看所有的zone
# firewall-cmd --get-zones
新增zone
# firewall-cmd --set-default-zone=home
查看此zone=public所開的服務
# firewall-cmd --zone=public --list-all
public (default, active)
  interfaces: ens192
  sources:
  services: dhcpv6-client ssh
  ports:
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules:


在public zone新增80TCP的服務
# firewall-cmd --zone=public --add-port=80/tcp
移除在public zone上80埠的所有服務 tcp/udp
# firewall-cmd --zone=public --remove-port=80
移除在public zone上5144埠的udp服務 5144/udp
# firewall-cmd --zone=public --remove-port=5144/udp
上面移除新增port(或服務)是整個zone都生效(一個zone可以由很多interfaces組成),我們可以指定來源:
# firewall-cmd --zone=public  --add-source=163.17.40.0/24
# firewall-cmd --zone=public  --remove-source=163.17.40.0/24

複雜的限定

這樣是所有的服務都套用這個來源,如果要限定單一服務的來源,可以使用他的rich rules:
列出所有rich-rules
# firewall-cmd --zone=public --list-rich-rules
<預設是沒有>
新增接受限制40.0可以讀取 28001埠
# firewall-cmd --zone=public --add-rich-rule='rule family="ipv4" source address="163.17.40.0/24" port port="28001" protocol="tcp" accept'
查看設定結果
# firewall-cmd  --zone=public --list-all
public (default, active)
  interfaces: ens192
  sources:
  services: dhcpv6-client ssh
  ports:
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules:

        rule family="ipv4" source address="163.17.40.0/24" port port="28001" protocol="tcp" accept

這樣子就開通了40.0/24連往這台機器的規則。
但是這樣子設定只是runtime的環境有用,一設定下去就生效,不需要重啟和重讀;
移除,得要完整的寫才有用,請把 --list-all 顯示出來的 rich rules整行貼上
# firewall-cmd --zone=public --remove-rich-rule='rule family="ipv4" source address="192.168.56.0/24" port port="3306" protocol="tcp" accept'
當 firewalld重啟或重讀時,剛才加的設定就不見了,所以上面的操作要全部加上--permanent,讓它變成永久的設定

防火牆永久的設定

操作要全部加上--permanent,讓它變成永久的設定,runtime和永久的設定的不同,在firewalld重啟或重讀時,firewalld才會把永久的規則寫到runtime來用。
所以,永久的設定一定重啟或重讀才會生效。
查看永久的設定
# firewall-cmd --zone=public --list-all --permanent
查看runtime的設定(少了--permanent)
# firewall-cmd --zone=public --list-all
新增在public zone上53埠的udp服務 53/udp
# firewall-cmd --zone=public --add-port=53/udp --permanent
要觀察永遠設定的rule時,切記加上 --permanent

nginx SSL PEM_read_bio:壞的結束行

在嘗試再次啟動nginx時,在我們的服務器上安裝中間證書給了我以下錯誤:
該文件的結尾看起來不錯,但問題是一半通過它。不知怎的,串聯連接在一起:
這只需要一個換行來解決:

[ nginx ] 轉換切換目錄 change root path

轉換目錄時
會發生失敗 無法讀取
cat error.log 會出現
is forbidden , Permission denied 的字樣

請執行以下
To check if SELinux is running:
# getenforce

To disable SELinux until next reboot:
# setenforce Permissive

【代訂】三鷹の森ジブリ美術館門票




























【門票費用】
成人、大學生600元
高中、中學生450元
國小400元 / 幼兒(4歲以上)100元

【入場時間】
第一場10:00(到10:30為止)
第二場12:00(到12:30為止)
第三場14:00(到14:30為止)
第四場16:00(到16:30為止)

【營業時間】
10:00~18:00(星期二休館)
一天只有四個入場時間每場的入場時間只有半小時,超過時間就不能進去
但是入場後可以一直待到當天晚上6點美術館關門
詳細說明
1. 三鷹美術館於每週二休館,不對外開放參觀。美術館每日遊客有限,不保證一定會能預購成功請知悉
2. 旅客資料請務必於每月7號前提供完畢才視同有效單
3. 最終訂票結果會於當月15號前通知,並發送取票憑證
4. 此票券為記名制,務必提供同護照英文姓名,否則有被拒絕入場之可能
5. 【記名制】票券購買後,不接受任何原因的變更及取消

訂購時請提供以下訊息
1.【代表者】旅客【英文姓名】(同護照,務必跟護照上一樣,恕不接受更改名字)
2.訂購張數 , 例:成人2張 , 高中x1
3.電子信箱,會將門票寄到電子信箱

欲訂購者
於 facebook 訊息中留言詳細資料
[ facebook 三鷹の森ジブリ美術館門票代訂專頁 ] 點我進入
有對話紀錄 保障雙方權益
並確認匯款款項
預訂作業即開始進行

Laravel 5.0 必成功之安裝步驟





















Laravel 的安裝參考了網路上許多資源
發覺遺漏許多部份 , 失敗了數次 並經過一段工作時間將其匯整
使其能按照以下步驟 , 必定能安裝完成之列表
直接用 Pietty or MobaXterm 複製貼上簡單輕鬆的完成它


軟體版本
PHPphp5.4
WEBnginx
FRAMEWORKLaravel5.0
DBmariaDB
VMvmware8(2015.10.05 Vmware 11安裝無法選擇套件 進入以下步驟會有問題 )
OSCentOS7(選擇網站伺服器安裝,mariadb,php )


為了各位學習 Laravel 方便,提供 vmware 8.0 使用的 vmdk 供下載(download)
網友可以自己選擇要直接使用vm檔或是按照步骤完成



//----download Laravel5.0   -----------------------------------------------------------------

Laravel5.0_Vmdk
(click me download vmdk(vmare8 )for Laravel 5.0 )
(contain : nginx+php5.4+mariadb)

//----install step by step   -----------------------------------------------------------------

yum update yum install wget yum install epel-release //更新後才可執行 sudo yum install php-mcrypt* sudo yum install php-mcrypt* //laravel 會使用到的套件

//mariadb install yum install mariadb-server mariadb sudo systemctl start mariadb
第一次安裝 mysql -u root mysql -p (enter) password : ( 直接 enter 第一次不需密碼 )
設定密碼 SET PASSWORD FOR 'root'@'localhost' = PASSWORD ('你的密碼');
設定誰可以進入資料庫 grant all privileges on *.* to root@1.2.3.4 identified by '你的密碼'; ( 某人可以從1.2.3.4使用root進入) 視個人需求是否要修改port號 修改完記得要重啟 修改 mariadb port /etc/my.cnf


//php install No match for argument: php-mysql centos无法安装php-mysql模块 解决方案: 可能是epel源问题: 1.获取php7.0的yum源 rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm sudo yum install php-mbstring //laravel 會使用到的套件 yum install php php-mysql php-fpm (若出現異常跳過 沒有安裝跡象 ,則分開各別裝 ) (centos 內建 php5.4) ex : yum install php-fpm ex : yum install php ex : yum install php-mysql (centos 如果要安裝 更高php版本 7.2 請參考以下 ) yum install epel-release yum-utils -y yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum-config-manager --enable remi-php72 yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql -y How to Install PHP 7.0, 7.1, 7.2

sudo vi /etc/php.ini /尋找 memory 修改記憶體配置 改為 512MB , 原本是128M sudo vi /etc/php-fpm.d/www.conf 修改listen = /var/run/php-fpm/php-fpm.sock ;user = apache user = nginx ;group = apache group = nginx listen.owner = nginx listen.group = nginx listen.mode = 0666 sudo systemctl start php-fpm systemctl enable php-fpm.service

以下為補充 ( laravel 5.1 need php5.5.9 + ) 若使用 Laravel 5.1 的朋友需使用底下安裝步驟(php5.6) //php5.6使用 wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm vi /etc/yum.repos.d/remi.repo 找到標題是 [remi-php56] 將 enabled=0 改為 1 ( 以上找不到就自動省略 )

//nginx install rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install nginx

centos8 
假設安裝遇問題 添加以下
cat << EOF > /etc/yum.repos.d/nginx.repo [nginx-stable] name=nginx stable repo baseurl=http://nginx.org/packages/centos/8/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://nginx.org/keys/nginx_signing.key module_hotfixes=true EOF



開通80port服務 iptables -I INPUT -p tcp --dport 80 -j ACCEPT vi /etc/nginx/conf.d/default.conf 將內容整個砍掉 ,複製貼上底下內容即可 ( 注記得修改 root /usr/share/nginx/html/S1/public 位置) server { listen 80; server_name localhost; root /usr/share/nginx/html/S1/public; index index.php index.html index.htm; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; proxy_connect_timeout 159s; proxy_send_timeout 600; proxy_read_timeout 600; proxy_buffer_size 64k; proxy_buffers 16 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; proxy_pass_header Set-Cookie; proxy_redirect off; proxy_hide_header Vary; proxy_set_header Accept-Encoding ''; proxy_ignore_headers Cache-Control Expires; proxy_set_header Referer $http_referer; proxy_set_header Host $host; proxy_set_header Cookie $http_cookie; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }


視個人需求是否要修改port號 修改完記得要重啟 修改 nginx port /etc/nginx/conf.d/php.conf 修改 mariadb port /etc/my.cnf systemctl start nginx systemctl status nginx systemctl enable nginx.service

//Laravel install cd /usr/share/nginx/html/ wget http://down.golaravel.com/laravel/laravel-v5.0.22.zip unzip laravel-v5.0.22.zip mv laravel-v5.0.22 Laravel sudo chmod -R 775 Laravel sudo chown -R nginx.nginx Laravel systemctl restart nignx 這裡記住一定用sudo 去下cmd , 不要以為用root就不使用sudo 設定SELinux vi /etc/selinux/config 由原本 #SELINUX=enforcing 改為 SELINUX=disabled SELinux是 Security Enhanced Linux (安全加強的 Linux) 的縮寫, 他並不是一個防火牆的軟體,而是一個『針對檔案系統權限作更細部規劃的一個模組』。

假設到新電腦上安裝,複製原本的laravel資料夾過去 看log一直顯示 could not be opened failed to open stream permission denied 時
或是出現 0.0.0.0:8843 failed (13: Permission denied)

執行它即可
sudo setenforce 0
或是在 nginx.conf 最上方
user nginx 改為 root
參考
https://blog.51cto.com/waxyz/5336419


Lexical Analyzer C++ 語法解析器



#include<iostream>
#include<conio.h>
#include<string>
#include<fstream>
using namespace std;

/* The grammar follwed by this analyser is : you have to give a blank to differentite between two different entities, for eg 
       instead of writing "int c=a+b;", write it as "int c = a + b ;".
       
   To execute this program first create an "input.txt" file where the program is written or specify the path of the file which has 
      to be analysed, after compiling an "output.txt" file will be created where you have stored the program.
*/

bool keycheck(string str)
{
     string keyword[] ={"int","main()","float","if"};
     int flag=0;
     if(!(str[0]>=97 && str[0]<=122))
                     return false;
      for(int i=0;i<4;i++)
      {
             if(str == keyword[i])
              {     
                     flag = 1;
                     break;
              }
      }
     

     
     if(flag == 1)
             return true;
     else
             return false;
} 

string opcheck(string str)
{
     string reloperators[8] ={"=","==",">","<",">=","<="};
     string mathoperators[5] ={"+","*","/","-","%"};
     string operators[4]={"{","}",";",","};
     int flag1=0,flag2=0,flag=0;
     
    
    for(int i=0;i<4;i++)
    {
            if(str == operators[i])
            {
                   flag = 1;
                   break;
            }
    }
    if(flag == 1)
    {
            return "operator";
    }
    else
    {
    
        for(int i=0;i<8;i++)
         {       
             if(str == reloperators[i])
             {
                    flag1 = 1;
                    break;
             }
         }
         if(flag1 == 1)
         {
             return "relational operator";
         }
         else
         {
          for(int i=0;i<5;i++)
          {       
             if(str == mathoperators[i])
             {
                    flag2 =1;
                    break;
             }
          }
          
          if(flag2 == 1)
                  return "mathematical operator";
          else
                  return "error";
     }
    }
}
                   
         
             
int ischar(char c)
{
     if((c>=65 && c<=90) || (c>=97 && c<=122))
             return 1;
    else
             return 0; 
}          
                     

int isnum(char c)
{
    if(c>=48 && c<=57)
             return 1;
    else
             return 0;
}
    
int isnums(string str)
{
    int flag=0;
    for(int i = 0;i<str.length();i++)
    {
         if(!isnum(str[i]))
         {
                           if(str[i] != 46) 
                           {
                                     flag=1;
                                     break;
                           }
         }
    }
    
    if(flag == 1)
            return 0;
    else
            return 1;
}

int isidentifier(string str)
{
    int flag =0;
     for(int i=1;i<str.length();i++)
     {
      if(!ischar(str[i]))
      {
       if(!isnum(str[i]))
       {
        if(str[i] != 95)
        {
           if(str[i] == 91)
           {
                     i++;
                     for(;str[i]!= 93;)
                     {
                      if(!isnum(str[i]))
                      {
                                        flag =1;
                                        break;
                      }
                      i++;
                     }
           }
           else
           {         
                     flag = 1;
                     
           }
           
           if(flag ==1)
                   break;
        }
      }
     }
    }
    
    return flag;
}


int exc( string str1 )
{

    int flag=0;
    bool check;
 string str="",strch,strline;

    for(int j=0;j<str1.length();j++)
    {       
            if(str1[j] ==' ' || str1[j]=='\t')
            {
                                    
                      
              
                      
                     if(str != "")
                     {
                      if(ischar(str[0]))
                      {
                                    check = keycheck(str);
                                    
                                    if(check)
                                    {
                                            cout<<str<<"\t --> reserved word\n";  
                                    }        
                                    else
                                    {
                                      
                                        flag = isidentifier(str);
                                        
                                        if(flag == 1)
                                        {
                                                cout<<str<<"\t --> error\n";
                                                flag = 0;
                                        
                                        }
                                        else
                                        {
                                            cout<<str<<"\t --> identifier\n";
                                        }
                                    }
                                                                                             
                      
                                           
                      }
                      else
                      {
                          if(isnum(str[0]))
                          {
                                          if(isnums(str))
                                                         cout<<str<<"\t -->number\n";
                                          else
                                                         cout<<str<<"\t -->error\n";
                          }
                          else
                          {
                              strch = opcheck(str);
                              if(strch == "error")
                                     cout<<str<<"\t -->"<<strch<<"\n";
                              else
                                     cout<<str<<"\t -->"<<strch<<"\n";
                          }
                      } 
                      
                     }
                      
                     str="";  
            }
           else
            {
               str=str+str1[j];    
            }    
     }

 return 0 ;
}
             
                                                        
int main()
{
 
    string str="",strch,strline,str1;

    char a[520]; 
    cin.get(a,520); 
    exc(a);
                      
    system("pause");
                      
    

}

編譯後結果應如下圖