projecteuler---->problem=32----Pandigital products

Problem 32 We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital. The produ
分类: 其他 发布时间: 07-28 23:47 阅读次数: 0

projecteuler---->problem=33----Digit canceling fractions

Problem 33 The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that49/98 = 4/8, which is correct, is obtained by cance
分类: 其他 发布时间: 07-28 23:47 阅读次数: 0

projecteuler---->problem=35----Circular primes

Problem 35 The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13,
分类: 其他 发布时间: 07-28 23:46 阅读次数: 0

projecteuler---->problem=36----Double-base palindromes

Problem 36 The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. (Please
分类: 其他 发布时间: 07-28 23:46 阅读次数: 0

projecteuler---->problem=34----Digit factorials

Problem 34 145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find the sum of all numbers which are equal to the sum of the factorial of their digits. Note: as 1! = 1 and 2! = 2 are
分类: 其他 发布时间: 07-28 23:46 阅读次数: 0

LeetCode Remove Duplicates from Sorted Array

问题描述: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place
分类: 其他 发布时间: 07-28 23:46 阅读次数: 0

LeetCode Remove Duplicates from Sorted Array II

title  描述  Follow up for ”Remove Duplicates”: What if duplicates are allowed at most twice? For example, Given sorted array A = [1,1,1,2,2,3],  Your function should return length = 5, and A is no
分类: 其他 发布时间: 07-28 23:45 阅读次数: 0

LeetCode Search in Rotated Sorted Array

Search in Rotated Sorted Array  Total Accepted: 27955 Total Submissions: 97929My Submissions Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6
分类: 其他 发布时间: 07-28 23:45 阅读次数: 0

LeetCode Search in Rotated Sorted Array II

Search in Rotated Sorted Array II  Total Accepted: 18488 Total Submissions: 59914My Submissions Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this
分类: 其他 发布时间: 07-28 23:45 阅读次数: 0

Vulnerability checks

Cross-site scripting (XSS) is a type of computer security vulnerability typically found in Web applications. XSS enables attackers to inject client-side script into Web pages viewed by ot
分类: 其他 发布时间: 07-28 23:45 阅读次数: 0

emacs config

觉得这篇博文发表出来后,可能会引起一些争议,很多人眼中Emacs已经太陈旧了,根本无法和自己心目中的IDE齐驱并驾,最开始接触Emacs是在前年的这个时候,当时公司里面来了一群linux高人,当时还在做.NET的开发,天成的VS程序员看到了Emacs这个界面酷酷的编辑器悠然心动,最开始以为是VIM后来发现它叫Emacs。     我认为Emacs迷人的地方在于他的扩展性以及unix哲学的渗透
分类: 其他 发布时间: 07-28 23:44 阅读次数: 0

emacs config for my

(global-set-key [C-tab] 'other-window) ; 切换窗口 (global-set-key [f9] 'compile) ; 编译 (global-set-key [C-f9] 'gdb) ; 调试 ;; For Linux (global-set-key (kbd "") 'text-scale-increase) (global-set-key (kbd "
分类: 其他 发布时间: 07-28 23:44 阅读次数: 0

linux(fedora) 下dvwa 环境的搭建

linux(fedora)下dvwa的配置 1.下载httpd,dvwa,mysql,mysqlserver, php-mysql,php 除了dvwa 是进官网下之外,其余的服务都是通过install 安装 yum install httpd, mysql, php-mysql, php 如果出现安装的问题,可以先yum search xxx   2.安装完之后,检查
分类: 其他 发布时间: 07-28 23:44 阅读次数: 0

OWAP Top 10

2013 Top 10 List   A1-Injection Injection flaws, such as SQL, OS, and LDAP injection occur when untrusted data is sent to an interpreter as part of a command or query.
分类: 其他 发布时间: 07-28 23:44 阅读次数: 0

DotNetCore深入了解之一Startup类

一个典型的ASP.NET Core应用程序会包含Program与Startup两个文件。Program类中有应用程序的入口方法Main,其中的处理逻辑通常是创建一个WebHostBuilder,再生成WebHost,然后启动项目。 1 public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>(); Vie
分类: 其他 发布时间: 07-28 23:43 阅读次数: 0

Python基础知识练习题(一)

1、执行Python脚本的两种方式      python解释器 python 1.py 2、简述位、字节的关系    8 bits = 1 byte (8位一字节)    计算机处理以字节(byte)为单位    存储以位(bit)为单位 3、简述ascii、unicode、utf-‐8、gbk的关系   ascii 英文编码,8个二进制位代表一个字母,总共可以有2的8次方减去1个等于255个   gbk是中文编码,是用的16个二进制代表一个汉字,有点浪费空间   uft-8也是中文编码,也
分类: 其他 发布时间: 07-28 23:43 阅读次数: 0

BZOJ1413: [ZJOI2009]取石子游戏

BZOJ1413: [ZJOI2009]取石子游戏 Description 在研究过Nim游戏及各种变种之后,Orez又发现了一种全新的取石子游戏,这个游戏是这样的: 有n堆石子,将这n堆石子摆成一排。 游戏由两个人进行,两人轮流操作,每次操作者都可以从最左或最右的一堆中取出若干颗石子,可以将那一堆全部取掉,但不能不取,不能操作的人就输了。 Orez问:对于任意给出一个初始一个局面,是否存在先手必胜策略。 Input 文件的第一行为一个整数T,表示有 T组测试数据。 对于每组测试数据,第一行为
分类: 其他 发布时间: 07-28 23:43 阅读次数: 0

Top K以及java priorityqueue

Top K问题比较常见啦,这里总结一下方法。 1、用最小堆来做。 思路是先利用数组中前k个数字建一个最小堆,然后将剩余元素与堆顶元素进行比较,如果某个元素比堆顶元素大,就替换掉堆顶元素,并且重新调整成最小堆。 到这里,堆中保存着的其实是前k个最大的数字。堆顶就是第K个最大的数字。这样前k个,第k个都可以求出来了。代码如下: 1 public void find(int[] nums, int k){ 2 PriorityQueue<Integer> priority
分类: 其他 发布时间: 07-28 23:43 阅读次数: 0

python中关键字的总结

python中各种关键字的总结:用表格形式,解释关键字符号的作用和案例说明 关键字 描述 示例分析 and 逻辑与 True and False ==False as with--as语句的一部分 with x as y:pass assert 断言(确保)某东西为真 assert False, "Error!" class 定义类 class Person(object) try 尝试执行代码,出错后转到except try:pass except 如果发生异常,允许此处代码 except
分类: 其他 发布时间: 07-28 23:43 阅读次数: 0

JAVA平台在手机上广泛应用

JAVA平台由于在手机上广泛应用,使得扩展名为jar的游戏成为目前手机游戏市场上最大的家族,直接传入手机直接安装即可。 众所周知,JAVA是一种跨平台的程序设计语言。由于其高可移植性、简单、可靠、安全等诸多优异性能,现在已经成为最受欢迎、最有影响力的编程语言之一。 JAVA程序的短小精干和其跨平台的先天特点,使其成为众多开放或半开放式手机扩展自身功能的最佳选择。因此现在市场上流行的手机大多支持JAVA应用程序了。 1 package Com.Table; 2 import java.uti
分类: 其他 发布时间: 07-28 23:43 阅读次数: 0