###取当前URL中的页面名称
window.location.href.split('/').pop().split('#')[0];
var curIndex = -1; | |
function callbackDown(){ | |
if(curIndex >=0) $('input.hideItem_myx')[curIndex].click(); | |
curIndex++; | |
$('input.hideItem_myx')[curIndex].click(); | |
$('ul button.myx-button-text')[curIndex].click(); | |
//触发下载popup | |
setTimeout(function(){$('.myx-popover-inner .transcludedContent_myx .contentDetails_myx #contentAction_download_myx').trigger('click');},1000); | |
setTimeout(function(){$('.dialog_myx .myx-button-primary').trigger('click');},2000); |
// Website you intended to retrieve for users. | |
const upstream = 'api.openai.com' | |
// Custom pathname for the upstream website. | |
const upstream_path = '/' | |
// Website you intended to retrieve for users using mobile devices. | |
const upstream_mobile = upstream | |
// Countries and regions where you wish to suspend your service. |
Mac版的MonoDevelop能显示中文, 前提是字体包含中文, 但是平时用惯的Lucida Console不带汉字, 导致IDE的文本区, 汉字都是挤在一起的乱码。 在网上找了一下, 汉字等宽字体, 终于找到一个, 用下来感觉还行, 就先这么凑合吧。 | |
http://wenq.org/?FontGuide 中介绍的“兼顾中英文对齐的等宽开源字体:文泉驿等宽正黑” | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using System.Web.Http.Controllers; | |
using System.Web.Http; |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace DesignPatterns | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
var aa =$('.chk[node-type="chk"]'); | |
var pos = 0; | |
var MaxPos = aa.length;//分享页面的一级文件夹数量 | |
var timer; | |
function saveItem(){ | |
$(aa[pos]).trigger('click'); | |
window.setTimeout(function(){$('.btn.saveToDisk-btn').click()},1000); | |
timer = window.setInterval(function(){ | |
if($('.b-panel.b-dialog.move-dialog').css('display') == "block"){ |
###取当前URL中的页面名称
window.location.href.split('/').pop().split('#')[0];
在查看源码的页面, 执行
JSON.parse($('.webkit-line-content').innerHTML);
或者在普通tab页面, 执行
var result = JSON.parse($('body>pre').innerHTML);
string filename = ExportExcel.ExportSurvey(iSurveyId, MapPath("/")); | |
System.IO.FileInfo file = new System.IO.FileInfo(filename); | |
Response.Clear(); | |
Response.Charset = "GB2312"; | |
Response.ContentEncoding = System.Text.Encoding.UTF8; | |
// 添加头信息,为"文件下载/另存为"对话框指定默认文件名 | |
Response.AddHeader("Content-Disposition", "attachment; filename = " + Server.UrlEncode(file.Name)); | |
// 添加头信息,指定文件大小,让浏览器能够显示下载进度 | |
Response.AddHeader("Content-Length", file.Length.ToString()); | |
// 指定返回的是一个不能被客户端读取的流,必须被下载 |
public string CalculateMD5Hash(string input) | |
{ | |
// step 1, calculate MD5 hash from input | |
MD5 md5 = System.Security.Cryptography.MD5.Create(); | |
byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input); | |
byte[] hash = md5.ComputeHash(inputBytes); | |
// step 2, convert byte array to hex string | |
StringBuilder sb = new StringBuilder(); | |
for (int i = 0; i < hash.Length; i++) |