<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                # 常問面試題 ## 算法 ### 微信拼手氣紅包算法 ```text function psq($total, $num) { $min = 0.01;//每個人最少能收到0.01元 for ($i = 1; $i < $num; $i++) { $safe_total = ($total - ($num - $i) * $min) / ($num - $i);//隨機安全上限 $money = mt_rand($min * 100, $safe_total * 100) / 100; $total = $total - $money; $money_arr[] = $money; } $money_arr[] = round($total, 2); return $money_arr; } ``` ### 抽獎概率算法 ### [查找算法](/dataAtructureAlgorithm/algorithm/FIND.html) ### [排序算法](/dataAtructureAlgorithm/algorithm/SORT.html) ### 四個頂點坐標判斷是否是矩形 ## php基礎 ### session文件內容格式 ```text <?php session_save_path('./'); session_start(); $_SESSION['name'] = 'shiwenyuan'; $_SESSION['age'] = 100; // session file_data : name|s:10:"shiwenyuan";age|i:100; ``` ### [toString會在什么時候觸發](/backend/php/basics/PHP_STR_MAGIC_METHODS.html#tostring) ### 程序運行結果 #### 題目一 ```php <?php $arr = [1, 'aa' => 2, 3,4]; foreach($arr as $key => $val) { echo ($key == 'aa' ? 5 : $val); } ``` ##### 答案 ```text 5534 ``` ## mysql ### 題目一 `table1` id|name|password ---|---|--- 1| AA | asd 2| AA | asd 3| b | asd 4| c | asd `table2` id|name ---|--- 1| AA 2| AA 3| b 4| c **select * from table1 as t1 left join table2 as t2 on t1.id = t2.id**查詢結果條數,并說明原因 4條 左表優先 **select * from table1 union select * from table2**查詢結果條數,并說明原因 **select * from table1 union all select * from table2**查詢結果條數,并說明原因 **select id, name from table1 union select id, name from table2**查詢結果條數,并說明原因 ## linux ### 統計文件字符串出現的次數 awk '{print $1}' access.log | sort |uniq -c ### 統計文件字符串出現的次數并排序 awk '{print $1}' access.log | sort |uniq -c | sort -rn ### 統計文件字符串出現的次數并排序后前100名 awk '{print $1}' access.log | sort |uniq -c | sort -rn |head -n 100
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看