Thursday, 3 December 2020

Kivy Tutorial #1 - How to Create Mobile Apps With Python

 https://www.youtube.com/watch?v=bMHK6NDVlCM

 

try:
import kivy # XXX 要验证是否安装的库名
except ImportError:
print("kivy not exist")

 

Saturday, 14 November 2020

flutter_url_webview_examples

 

https://github.com/tensor-programming/flutter_url_webview_examples

https://www.durinews.com/


Friday, 6 November 2020

MY 9+ Work from home woes no more Click to check out more CMCO-special titles at bookxcessonline.com bookxcessonline.com 3:32 / 10:46 10 MIN AB WORKOUT - FLATTEN BELLY FAST | BUILD CORE STRENGTH/ No Equipment at Home


 

https://www.pontikis.net/blog/create-cookies-php-javascript

 https://www.pontikis.net/blog/create-cookies-php-javascript

Cookie

 <?php
$cookie_name = "test1";
setcookie($cookie_name, "This is a test cookie", time() + 600);
?>
<!DOCTYPE html>
<html>
<head>
<title>PHP Cookie Test</title>
</head>
<body>
<h1>Trying to set a cookie</h1>
<?php
if(!isset($_COOKIE[$cookie_name])) {
    echo "Cookie named '" . $cookie_name . "' is not set!";
} else {
    echo "Cookie '" . $cookie_name . "' is set!<br>";
    echo "Value is: " . $_COOKIE[$cookie_name];
}

   $ln = explode(",", $cookie_language);
   $x = 0;
   while($ln[$x]) {
    // echo "The number is: $x <br>";
     if($slan) { $slan .= " OR ";  }
     $slan .= "`ln` LIKE '".$ln[$x]."'";
     $x++;
   }

?>

</body>
</html> 

https://www.durinews.com/

Friday, 30 October 2020

Extract URL's from a string using PHP [duplicate]

 

$string = "The text you want to filter goes here. http://google.com, https://www.youtube.com/watch?v=K_m7NEDMrV0,https://instagram.com/hellow/";

preg_match_all('#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', $string, $match);

echo "<pre>";
print_r($match[0]); 
echo "</pre>";

Thursday, 29 October 2020

【Python】美女爬虫 - 指定URL下载所有的图片

 https://www.youtube.com/watch?v=ZR9bG1RwrBc


Python學習03 利用Python下載網頁的圖片範例


 

Python---获取div标签中的文字

 

<span style="color:#000000"># -*- coding: UTF-8 -*-
import requests
import time
import re
from bs4 import BeautifulSoup
from urllib.request import urlretrieve

if __name__ == '__main__':
    list_url = []
    url = 'https://www.names.org/n/kevin/about'
    #设置请求头信息
    headers = {
        "User-Agent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
    }
    req = requests.get(url=url,headers=headers)
    req.encoding='utf-8'
    html=req.text
    bf = BeautifulSoup(html,'html.parser')
    targets_url_1 = bf.find_all(class_='container page-section')
    bf = BeautifulSoup(str(targets_url_1),'html.parser')
    targets_url_2 = bf.find_all(class_='name')
    
    #保存名字链接
    for each in targets_url_2:
        list_url.append(re.sub('[\t\n]',"",re.sub(r'<[^>]+>',"",str(each))))
    
    f = open('test.txt', 'w')  #首先先创建一个文件对象,打开方式为w
    for each in list_url:
        f.writelines(each)  #用readlines()方法写入文件
        f.writelines('\n')
         
    print(list_url)
     
    print('下载完成!')
          </span>

Sunday, 11 October 2020

Flutter vs React Native vs Ionic


 

Flutter Crash Course for Beginners 2020 - Build a Flutter App with Google's Flutter & Dart


 

通过HttpClient发起HTTP请求

 

Dart IO库中提供了用于发起Http请求的一些类,我们可以直接使用HttpClient来发起请求。使用HttpClient发起请求分为五步:

1 创建一个HttpClient

HttpClient httpClient = new HttpClient();
2 打开Http连接,设置请求头:
HttpClientRequest request = await httpClient.getUrl(uri);

这一步可以使用任意Http Method,如httpClient.post(...)httpClient.delete(...)等。如果包含Query参数,可以在构建uri时添加,如:

Uri uri=Uri(scheme: "https", host: "flutterchina.club", queryParameters: { "xx":"xx", "yy":"dd" });

通过HttpClientRequest可以设置请求header,如:

request.headers.add("user-agent", "test");

如果是post或put等可以携带请求体方法,可以通过HttpClientRequest对象发送request body,如:

String payload="..."; request.add(utf8.encode(payload)); //request.addStream(_inputStream); //可以直接添加输入流 

3 等待连接服务器:

HttpClientResponse response = await request.close();

这一步完成后,请求信息就已经发送给服务器了,返回一个HttpClientResponse对象,它包含响应头(header)和响应流(响应体的Stream),接下来就可以通过读取响应流来获取响应内容。

4 读取响应内容:

String responseBody = await response.transform(utf8.decoder).join();

我们通过读取响应流来获取服务器返回的数据,在读取时我们可以设置编码格式,这里是utf8。

5 请求结束,关闭HttpClient

httpClient.close();

关闭client后,通过该client发起的所有请求都会中止。

示例

我们实现一个获取百度首页html的例子


 

https://book.flutterchina.club/chapter11/http.html

 

 

 

 

 

 
 

Friday, 4 September 2020

Draw an X in CSS

 

You could just put the letter X in the HTML inside the div and then style it with css.

See JSFiddle: http://jsfiddle.net/uSwbN/

HTML:

<div id="orangeBox">
  <span id="x">X</span>
</div>

CSS:

#orangeBox {
  background: #f90;
  color: #fff;
  font-family: 'Helvetica', 'Arial', sans-serif;
  font-size: 2em;
  font-weight: bold;
  text-align: center;
  width: 40px;
  height: 40px;
  border-radius: 5px;
}

Website

 

1、Videofk视频在线解析下载
2、人人译视界
3、全历史
4、字由
5、qiuziti,360查字体
6、UZER.ME
7、SOBOOKS
8、爱给
9、稿定设计
10、虫部落

Wednesday, 2 September 2020

买和田玉挨骗上当的多,玉商老纪淘货有标准,总好过几万块打水漂

 https://www.ixigua.com/6867060604352332292https://www.ixigua.com/6867060604352332292https://www.ixigua.com/6867060604352332292 https://www.ixigua.com/6867060604352332292https://www.ixigua.com/6867060604352332292https://www.ixigua.com/6867060604352332292https://www.ixigua.com/6867060604352332292

Saturday, 29 August 2020

喜板

食谱来自:Eva Yu
喜板
糯米粉 180g
面粉 320g
糖 100g
酵母 5g
水 320ml
(如果做班兰口味可以用班兰汁)
粟米油 20g
全部手搓均匀,分割,滚圆轻按压,放在香蕉叶或烘培纸,待发半小时左右
(待发时间是要发酵双倍大)好了就可以大火蒸12-15分钟就可以了。
蒸好待一会才开盖哦。
 
 

 

zomok E-commerce system plan. Choose your online ordering system. No-risk 30 day free trial. Then USD 9/month. No credit card required.

zomok E-commerce system plan. Choose your online ordering system. No-risk 30 day free trial. Then USD 9/month. No credit card required. h...