经典打飞机游戏 – 微信小程序打飞机游戏源码小程序打飞机游戏下载链接: 链接: http://pan.baidu.com/s/1kVfYghL 密码: ……继续阅读 » 开心洋葱 10年前 (2017-03-30) 2289浏览 5评论2079个赞
php代码实现从电子邮件中抽取一个字符串function extract_emails($str){ // This regular expression extracts all emails from a string: $regexp = '/([a-z0-9_\.\-])+\@(([a-z0-9\-])+\.)+(……继续阅读 » 水墨上仙 10年前 (2017-03-30) 1920浏览 405个赞
go代码使用 fmt.Sscanf()实现转换科学计数的例子,但是只能转换成int型package mainimport "fmt"func main() { var ( old = "1.00000023e+06" new float64 ) n, err := fmt.Ss……继续阅读 » 水墨上仙 10年前 (2017-03-30) 641392浏览 1921个赞
JavaScript添加监控事件 addEventListner// addEventListener polyfill 1.0 / Eirik Backer / MIT Licence(function(win, doc){ if(win.addEventListener)return; //No need to polyfill func……继续阅读 » 水墨上仙 10年前 (2017-03-30) 2569浏览 1531个赞
python作为脚本语言根据类名字符生成类实例非常简单,类似java的Class.forNamepython是一个脚本语言,它不象java一样有一个专门的包来处理反射。以 下是我们来看看python是怎么做到类似java一样的反射功能的。我在网上搜了一下,因为在网上没有很明确的文章说要怎么做,所以,我写了这篇,希望 新手不要……继续阅读 » 水墨上仙 10年前 (2017-03-29) 2811浏览 1482个赞
微擎排行榜游戏合集-微赞营销游戏排合集 摇骰子吧抽奖hl_bbb-微擎微赞通用功能游戏模块http://www.75271.com/709.html 免费html5微信游戏 端午节微信小游戏粽子大战源码类似微信打飞机..http://www.75271.com/676.html俄罗斯方块wdl_cube-微擎微赞好玩的微游……继续阅读 » 开心洋葱 10年前 (2017-03-29) 1866浏览 0评论1401个赞
Java代码实现7种将字符串反转的效果import java.util.Stack;public class StringReverse { public static String reverse1(String s) { int length = s.length(); if (length <= 1) retu……继续阅读 » 水墨上仙 10年前 (2017-03-29) 2865浏览 1410个赞
可以通过userAgent判断是否是微信的客户端打开的网页function is_weixn(){ var ua = navigator.userAgent.toLowerCase(); if(ua.match(/MicroMessenger/i)=="micromessenger") { ……继续阅读 » 水墨上仙 10年前 (2017-03-29) 2958浏览 1199个赞
go语言将golang的科学计数值转换为相应字符串,使用 fmt格式输出package mainimport "fmt"func main() { n := fmt.Sprintf("%.2f", 1.00000027e+06) fmt.Println(n)}……继续阅读 » 水墨上仙 10年前 (2017-03-29) 2988浏览 205个赞
没有一个具体的网址,但是有时候我们希望浏览器显示一个没有任何内容的网页,可以使用about:blank来显示空白页面。代码很简单,只要在浏览器地址栏输入下面的代码,则浏览器会显示一个空白网页about:blank……继续阅读 » 水墨上仙 10年前 (2017-03-29) 3412浏览 1258个赞
python中获取汉字首字母#!/usr/bin/env python# -*- coding=utf-8 -*-# File Name : pinyin.py# Author : 开心样# Site : 75271.com# Create Time : 2017/03/29 21:37:39def multi_get……继续阅读 » 水墨上仙 10年前 (2017-03-29) 3142浏览 762个赞
//PHP代码函数实现PHP发送短信功能//本代码基于开心洋葱 运行//代码来源:开心洋葱//PHP发送短信开心洋葱专用(PHP代码函数)//本代码基于开心洋葱 运行//代码来源:开心洋葱 function sms($config,$language,$pdo,$sender,$phone_number,$content){ ……继续阅读 » 水墨上仙 10年前 (2017-03-29) 2839浏览 322个赞
//PHP代码函数实现https_post提交//代码来源:开心洋葱//https_post提交(PHP代码函数)//代码来源:开心洋葱 function https_post($url,$data){ $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); ……继续阅读 » 水墨上仙 10年前 (2017-03-29) 2222浏览 1368个赞
//PHP代码函数 CURL获取网页//代码来源:开心洋葱//CURL获取网页(PHP代码函数)//代码来源:开心洋葱function curl_open($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURL……继续阅读 » 水墨上仙 10年前 (2017-03-29) 2726浏览 146个赞
sass scss rem计算公式$root-font-size: 20; // 根字体大小@function getRem($val) { @return $val / $root-font-size + rem;}div { width: getRem(40); // width: 2rem; // 1rem =……继续阅读 » 开心洋葱 10年前 (2017-03-29) 3294浏览 0评论1576个赞
html常用的meta整理 <!-- 使用 HTML5 doctype,不区分大小写 --> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa --> <!-- 声明文档使用的字符编码 --> <!-- 优先使用 IE 最新版本和 Chrom……继续阅读 » 开心洋葱 10年前 (2017-03-29) 2997浏览 0评论1982个赞
java创建线程池适用于TCP短连接场景import java.util.LinkedList;import java.util.concurrent.atomic.AtomicLong;/** * Copyright ©2017 gonglibin * 守护线程池类接收并执行任务 * @author gonglibin *……继续阅读 » 开心洋葱 10年前 (2017-03-29) 2505浏览 0评论196个赞
pdbs文件读取全部,然后下载到文件夹内的脚本#!/usr/bin/python# coding=utf8# 本脚本负责读取全部pdbs文件名,然后下载到文件夹内import urllib2import osimport stringimport Queueimport threadingimport time……继续阅读 » 开心洋葱 10年前 (2017-03-29) 3340浏览 0评论1090个赞
获取Ueditor里面的图片列表,地址绝对化/** * 内容中图片地址转成绝对地址 * @param $content * @return mixed */ private function imgUrl($content) { preg_match_all(……继续阅读 » 开心洋葱 10年前 (2017-03-29) 2214浏览 0评论359个赞
python 图像的显示和自动关闭'''python 图像的显示和自动关闭需要用交互操作模式打开plt.ion()'''import matplotlib.pyplot as pltplt.ion()# img是从磁盘读取图像或其他方式得到的图像……继续阅读 » 开心洋葱 10年前 (2017-03-29) 2423浏览 0评论2899个赞
//PHP代码函数实现16进制转RGB代码来源:开心洋葱./config/functions.php//16进制转RGB (PHP代码函数)//代码来源:开心洋葱./config/functions.phpfunction hex2rgb($hex){ $hex=str_replace('#',''……继续阅读 » 水墨上仙 10年前 (2017-03-29) 3005浏览 939个赞
在python中可以使用in符号判断指定的元素是否存在于列表中,但我发现元组和数组存在区别,下面是详细实验结果。>>> '75271.com' in ['haotu.net','75271.com']True>>> '75271.com……继续阅读 » 水墨上仙 10年前 (2017-03-29) 2137浏览 1724个赞
可以通过iptraf命令查看网卡的实时流量,图像非常直观。今天在测试服务器上准备看下网络流量[root@localhost ~]# iptraf -d eth0-bash: iptraf: command not found发现运维同事没有给安装只能自己手工安装了首先安装需要的包:yum -y install gccyum -y ……继续阅读 » 水墨上仙 10年前 (2017-03-29) 3495浏览 1617个赞
对于HTML元素本身就带有的固有属性,在处理时,使用prop方法。对于HTML元素我们自己自定义的DOM属性,在处理时,使用attr方法。在高版本的jquery引入prop方法后,什么时候该用prop?什么时候用attr?它们两个之间有什么区别?这些问题就出现了。关于它们两个的区别,网上的答案很多。这里谈谈我的心得,我的心得很简单:对于HTML元素本……继续阅读 » 水墨上仙 10年前 (2017-03-28) 2685浏览 1113个赞
代码从DELPHI语言到JAVA语言[delphi],从DELPHI到JAVA[delphi]1 字符串处理 DELPHI var s :string; s := s + 'a string'; JAVA ……继续阅读 » 水墨上仙 10年前 (2017-03-28) 1837浏览 685个赞
如何将 XML 文件显示为 HTML 表格展示 <html><head><script type="text/javascript">var xmlhttp;function loadXMLDoc(url){xmlhttp=null;……继续阅读 » 水墨上仙 10年前 (2017-03-28) 1708浏览 1216个赞
jQuery中可以通过append在列表的最后添加数据,也可以通过prepend在列表的最前面添加数据 jQuery('#comment_list').prepend('<li>hello www.75271.com</li>');……继续阅读 » 水墨上仙 10年前 (2017-03-28) 3395浏览 1448个赞
ajax() 方法通过 HTTP 请求加载远程数据。该方法是 jQuery 底层 AJAX 实现。简单易用的高层实现见 $.get, $.post 等。$.ajax() 返回其创建的 XMLHttpRequest 对象。大多数情况下你无需直接操作该函数,除非你需要操作不常用的选项,以获得更多的灵活性。最简单的情况下,$.ajax() 可以不带任何参数直接……继续阅读 » 水墨上仙 10年前 (2017-03-28) 3295浏览 2790个赞
根据当前文件获得上层文件夹路径(python语言实现)比如当前路径为:/home/www/a/b 想要获得上层路径/home/www,请参考下面的代码import osprint os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))……继续阅读 » 水墨上仙 10年前 (2017-03-28) 3018浏览 1194个赞
经典算法之冒泡排序c#public static int[] BubbleSort(int[] array){ int length = array.Length; for (int i = 0; i <= length - 1; i++) { for (int j = length - 1; j > i; j--)……继续阅读 » 水墨上仙 10年前 (2017-03-27) 1571浏览 186个赞
C#实现窗体几种淡入淡出效果的方法1.private void Form1_Load(object sender, System.EventArgs e)for(double d=0.01; d< 1; d+=0.02) { System.Threading.Thread.Sleep(1); Application.DoEvents();……继续阅读 » 水墨上仙 10年前 (2017-03-27) 1777浏览 491个赞
住在乌托邦首都(编号为1)的天凯,开始对首都的交通情况感到不满,因为,他发现首都到某些城市,即使他选择最短的路径,距离也非常远。因此他想让你求一下交通中心城市是哪座城市(也有可能就是首都)。 为了说明交通中心城市的概念,先定义G[i]为距离城市i最远的城市(到城市i的最短路径长度最长的城市)到城市i的距离。那么交通中心城市都是G[i]最小的城市,如果有几个城……继续阅读 » 水墨上仙 10年前 (2017-03-27) 2260浏览 2427个赞
排序算法之C#的堆排序示例代码private static void Adjust (int[] list, int i, int m){ int Temp = list[i]; int j = i * 2 + 1; while (j <= m) { //more children……继续阅读 » 水墨上仙 10年前 (2017-03-27) 3538浏览 148个赞
如果在C:\下执行下面的批处理代码,则返回 Current drive is C:@ECHO OFF:: CURDRIVE.BAT:: Written by Rob van der Woude:: Places the current drive letter in environment variable CURRDRIVE::S……继续阅读 » 水墨上仙 10年前 (2017-03-27) 3469浏览 1949个赞
使用前请先安装openpyxl:easy_install openpyxl通过这个模块可以很方便的导出数据到Excelfrom openpyxl.workbook import Workbookfrom openpyxl.writer.excel import ExcelWriterfrom openpyxl.cell import get_colu……继续阅读 » 水墨上仙 10年前 (2017-03-27) 1580浏览 336个赞
foreach语句遍历数组C#的使用using System; public class w3demo { public static void Main() { int sum = 0; int[] nums = new int[10]; // give nums some values ……继续阅读 » 水墨上仙 10年前 (2017-03-27) 2470浏览 1700个赞
下面的代码演示了JS中如何通过数组对象的join方法将数组元素连接成一个字符串输出<!DOCTYPE html><html><body><p id="demo">Click the button to join the array elements into a str……继续阅读 » 水墨上仙 10年前 (2017-03-27) 3372浏览 1558个赞
下面的代码用于c#发送html格式的邮件,并且可以将图片附加到邮件一起发出MailMessage m = new MailMessage();m.From = new MailAddress("ir@75271.com", "Raja Item");m.To.Add(new MailAddress("……继续阅读 » 水墨上仙 10年前 (2017-03-27) 2037浏览 977个赞
Android的 adb shell 命令方法大全adb介绍SDK的Tools文件夹下包含着Android模拟器操作的重要命令adb,adb的全称为(Android Debug Bridge就是调试桥的作用。通过adb我们可以在Eclipse中方面通过DDMS来调试Android程序。借助这个工具,我们可以管理设备或手机模拟器的状态。还可以进行以下的操作……继续阅读 » 水墨上仙 10年前 (2017-03-27) 2237浏览 297个赞
在这篇入门教程中,我们假定你已经安装了Scrapy。如果你还没有安装,那么请参考安装指南。我们将使用开放目录项目(dmoz)作为抓取的例子。这篇入门教程将引导你完成如下任务:创建一个新的Scrapy项目定义提取的Item写一个Spider用来爬行站点,并提取Items写一个Item Pipeline用来存储提取出的ItemsScrapy是由……继续阅读 » 开心洋葱 10年前 (2017-03-23) 3587浏览 0评论329个赞
#!/usr/bin/env python"""Setuptools bootstrapping installer.Maintained at https://github.com/pypa/setuptools/tree/bootstrap.Run this script to install……继续阅读 » 开心洋葱 10年前 (2017-03-23) 2653浏览 0评论1478个赞
一、 Scrapy简介Scrapy is a fast high-level screen scraping and web crawling framework, used to crawl websites and extract structured data from their pages. It can be used for a wide r……继续阅读 » 开心洋葱 10年前 (2017-03-23) 2646浏览 0评论1184个赞
Get http:///var/run/docker.sock/v1.19/images/json: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?问题解决执行:……继续阅读 » 开心洋葱 10年前 (2017-03-22) 3167浏览 0评论2178个赞
最近,Google Project Zero公开披露了一个macOS系统的神漏洞,一行JS代码便可以让Mac电脑弹计算器。这个神漏洞真的特别有趣,研究员发现macOS的内置应用HelpViewer有一个内部协议调用,可以打开本机上的任何文件,这个协议调用的路径检查有点缺陷,使用某些特定语法可以绕过,去打开攻击者指定的文件。以上只能做到本地命令执行,研究员……继续阅读 » 开心洋葱 10年前 (2017-03-22) 3124浏览 0评论2523个赞
#!/usr/bin/env bash## Create a base CentOS Docker image.## This script is useful on systems with yum installed (e.g., building# a CentOS image on CentOS). See contrib/……继续阅读 » 开心洋葱 10年前 (2017-03-22) 2768浏览 0评论1556个赞