自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

evolone的专栏

每天一小步

  • 博客(98)
  • 收藏
  • 关注

原创 计算机二进制数值表示为何出现原码反码补码三种方式? and 如何计算?

前言:学习计算机的同学,在底层硬件计算过程中会遇到原码、反码、补码。很多关于计算机的书籍都介绍原码、反码、补码的表示方法,及相互转换关系,但是同一个值为什么要用到原码、反码、补码却没详细说明。为什么要使用这三种不同的编码表示同一个数?它们的原理是什么呢?我搜索了论文资料,在前人基础上,终于弄明白了这些问题,现收集整理如下。我们知道数值在计算机中表示形式为机器数,由0和1组成,计算机只能识别0和1,使

2017-04-19 10:19:36 1546

原创 Linux环境下常用文件批量操作

最近工作中需要对Linux中文档内容进行修改。 大量内容组成类似,不同的地方不多,需要修改的地方也不多。 但是修改总量很可观。 之前不知道还有批处理这一利器,傻乎乎地一个一个手动修改,劳神费时,效率低下。 最典型的事倍功半! 发现同事完成得很快,心下赞叹之余,亦在恰当时机虚心请教,遂得知了批处理这一利器! 寡人花了几分钟摸索学会操作后掌握这一利器,果然是事半功倍! 现特将此利器广而告之

2016-10-27 17:31:56 1821

原创 基于systemVerilog的UVM 调试问题及解决办法集锦

说在前头目前接触的UVM内容都是基于systemVerilog的。所以,碰到的问题主要基于sv。一、低级语法错误此类错误是由于一些低级操作或常识不清导致的,并很容易解决。 多为语法错误。1、信号赋值信号主要分为wire型和reg型。 在进行信号赋值时,wire型信号不能出现在等号左边只能在右边,reg型信号可以出现在等号左边和右边。故,当不小心把wire型信号放在等...

2016-10-10 20:23:50 16258 2

原创 Linux环境下常用操作命令及快捷键总结

1.命令框为了方便,一般会在一个用户界面下,使用多个命令行窗口。若一个一个生成,那么每个窗口相互独立,造成命令行窗口太多。那么,问题来了,有没有办法让多个命令行窗口集中在一个窗口中?如同浏览器的多个页面一般,并排在一起?当然有!快捷键:Ctrl + shift + T功能:快速新建命令行窗口,并集中在一个窗口中。2.创建文件夹和文件要开展工作,就要有文件。2.1创建文件夹Linux下,首先建立文件夹

2016-08-26 11:24:28 4933 1

原创 从零开始,一步一步编写网页

1.编程工具WEB前端的学习环境非常简单,很多书上说,只需要PC上有浏览器和文本编辑器就成。本小白本着不怕死的冲劲试了试,还真是!!!(1)浏览器这个大家的PC都有吧?我的是360浏览器。(2)文本编辑器windows自带的文本编辑器也有吧?不过,我折腾后发现,这个编辑器对于保存文件的格式选择不方便,且代码看着怪怪的,不习惯。果断弃了,选择常用的Notepad++,安利下,本软件保存文件格式多、免费

2016-08-17 00:05:04 16574 8

原创 win7下安装配置spark

1.spark运行在JVM下。(1)首先,安装JVM。下载JDK,地址链接: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html。(2)修改环境变量。参考教程: http://jingyan.baidu.com/article/6dad5075d1dc40a123e36ea3.ht

2016-07-17 13:46:48 3367

原创 Python(xy)下载地址、安装教程、使用教程

1.下载地址 目前,官网无法上,正常的下载地址没有反应。这些天,一直折腾,总算找到能够下载的地址,特此分享。 http://pythonxy.connectmv.com/ 2.安装 注意,英文软件都要求安装路径为英文。 网上有网友说2.7.6的版本中无IPython,所以推荐用2.7.2的版本。 本人没有验证,直接安装的2.7.2。 安装中推荐选择“full”安装。 安装完成后,在环

2016-05-25 11:11:54 25172 2

原创 算法工程师相关(自我备忘)

1.工作内容 算法研究、机器学习、数据挖掘模型设计2.掌握知识 数理统计、数学算法、程序设计、机器学习、数据挖掘、分布式系统3常见内容总结: 假设检验 线性模型、非线性模型 蒙特卡洛决策树 SVM、ANN online optimization(FTRL、online Rank-SVM) 图论4.书籍名称 矩阵分析 http://book.douban.com/subject/1

2016-05-13 15:40:48 919

原创 人工神经网络之激活函数

**激活函数之S型函数** Sigmoid函数: Sigmoid函数的导数推导: 可见,处处可导。

2016-01-28 11:27:37 853

原创 Verilog编程testbench的注意事项

对于新手,编写Verilog代码,仿真,最开心的是变化的波形图,最讨厌各种报错,或无错而输出为高阻态。最近在写代码,调试的时候遇到的问题,以及心得,在此做一归纳总结。1 Verilog中变量一定写在代码最前面,否则报错。这点不如C++灵活。 2 Verilog中各种语句一定最好写上begin end,否则各种奇葩错误。 3 Verilog中各种$语句一定在某个代码块中,而不是单独成行,否则各种报

2015-11-12 16:27:33 2534

原创 Java--Swing组件使用问题详解

一、布局管理器 Swing中有6种布局管理器:FlowLayout–流式布局管理器;BorderLayout–边界布局管理器; 运用时需要注意,North等方位一定不要写错,并对大小写敏感,若错将North写成north,会出现错误: Exception in thread “main” java.lang.IllegalArgumentException: cannot add to lay

2015-09-02 11:13:58 2975

原创 异步FIFO Verilog代码注释分析

近日复习数字电路设计,遇到异步FIFO的问题。 在百度找到相关代码,阅读理解后,写出注释,方便自己今后查阅以及迅速理解;同时在此分享,以便广大读者查阅。 并,感谢分享者的无私精神!此异步FIFO,深度256,宽度8; 采用格雷码进行空满条件判断,注意: 格雷码判空,直接判断读写地址是否相同即可; 格雷码判满,需要满足条件:最高位不同,次高位也不同,其余位必须相同;所以,需要将信号最高2位翻

2015-08-30 16:44:59 13750 1

原创 Eclipse Java EE IDE使用方法

第一,需要安装JDK环境; 第二,下载Eclipse Java EE IDE; 第三,打开eclipse,file->new->other->Java Project; 第四,选择项目位置;编写第一个java程序。package javatest;public class Test { public static void main(String[] args)//在类中,必须有这个m

2015-08-26 17:53:58 7311

原创 C、C++多组输入方法

多组输入方法

2015-08-17 10:49:37 3460

原创 Verilog--奇数分频与偶数分频及占空比

分频器设计 1.简单的二分频module half_clk(reset, clk_in, clk_out);input clk_in, reset;output clk_out;reg clk_out;always @(posedge clk_in)beginif(!reset)clk_out = 0;elseclk_out = ~clk_out;endendmodule2.任

2015-08-17 10:19:50 2726

原创 leetcode--83&82 Remove Duplicates from sorted list I&II

Given a sorted linked list, delete all duplicates such that each element appear only once.For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3.去除重复的单链表节点。 时间12ms。 代码:/** *

2015-08-11 21:02:26 513

原创 leetcode--160 intersection of two linked list

Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a2 ↘

2015-08-11 11:24:50 414

原创 Word中行与行之间存在空白,而且删不掉的解决办法

选中空白区域,然后按delete键,OK!

2015-08-06 17:28:31 18545 1

原创 MathType使用细节及日常使用中遇到问题的解决

1.如何调整公式字体大小 如图所示, 第一,选择公式, 然后 第二,按shift+ctrl+<,则缩小;或按shift+ctrl+>,则放大; 自由调节!!2.如何增加空格,调整公式排版 如图所示。 为了将Sigmoid函数的导数推导过程写得工整,需要用到空格。 简单尝试常规的增加空格办法,按空格键,MathType毫无反应。 经过一番尝试,终于发现采用Ctrl+Alt+空

2015-08-06 12:12:39 927

原创 word格式问题解决方法

1.用MathType编辑公式插入word后,往往公式上浮,如图所示: 这该怎么办? 解决方法: 选择这一行,然后在“段落”->“中文版式”->“文本对齐方式”->”居中”,即可解决!

2015-08-06 11:52:07 444

原创 leetcode --237 delete node in a linked list

Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value 3, t

2015-08-05 10:29:50 342

原创 MySQL常用命令

首先登陆。 在CMD命令窗口中,输入 mysql -uroot -p 回车;//采用用户名为root的超级用户名 输入密码。一定要回车再输入密码,如此,密码显示为*号,如果直接在-p后输入密码,则密码是明文,别人翻阅记录就可以看到,不安全。create database AB;//建立数据库ABshow databases;//显示当前存在的数据库use AB;//假设AB是一个数据库名。此步

2015-08-04 17:57:30 378

原创 PHP 安全防注入

PHP按照字节处理,因此当遇到如GBK等宽字符集的时候,添加恰当的包含转义字符的特殊字符(如繁体字誠),会拆分形成转义字符,以此为后面的注入形成条件。 若选择二进制形式,可以防止网站的注入风险。

2015-08-04 14:37:35 441

原创 写论文时,画黑白电路图的技巧

首先在multisim中建立目标电路图,此时电路图是彩色。 直接将电路图圈中,复制粘贴到word,成为图片格式。 利用word图片的“格式”中选择“颜色”,调整为灰色,成为黑白图片。 若再需要添加其他标注,可以将黑白图片复制粘贴到Visio中,添加需要的辅助线、文本框等。 注意:在图形上设置文本框,填充文字即可;若是先生成文本框,再拖动到图片,那么图片会处于文本框的上一层,覆盖文本框。

2015-08-03 16:37:07 5595

原创 leetcode-190&191 Reverse Bits & Number of 1 Bits

一、190 Reverse Bits Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in bina

2015-07-08 12:01:39 385

原创 leetcode-205 Isomorphic Strings

Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with another chara

2015-07-07 21:33:56 391

原创 leetcode-202 Happy Number

Write an algorithm to determine if a number is “happy”.A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of i

2015-07-07 15:29:13 353

原创 leetcode-203 Remove Linked List Elements

Remove all elements from a linked list of integers that have value val.Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –> 2 –> 3 –> 4 –> 5题意清楚,主要考察链表指针的使用。 小心头结点和尾节点的处理。 时间36ms。

2015-07-07 11:41:00 374

原创 leetcode-204 Count Primes

Count the number of prime numbers less than a non-negative number, n. 计算小于n的素数的个数。 素数,从2开始,2,3,5,7,11…… 素数定义,除了被1和自身整除外,没有其他因数。 最直接的想法就是从2开始到n的平方根,如果有能整除的,就不是素数。 最直接的往往效率最低。果然,虽然不断剪枝,但是本身的效率低下,再怎么

2015-07-06 21:28:30 424

原创 leetcode-206 Reverse Linked List

Reverse a singly linked list. 题意简单,考察对链表的熟练程度。主要注意链表指针的变化。代码如下:/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), ne

2015-07-06 18:26:33 454

原创 leetcode-223 Rectangle Area

Find the total area covered by two rectilinear rectangles in a 2D plane.Each rectangle is defined by its bottom left corner and top right corner as shown in the figure. Assume that the total area is n

2015-07-06 17:26:55 423

原创 leetcode-231 Power of Two

Given an integer, write a function to determine if it is a power of two. 题目就是求输入整数n,是否为2的幂。 考虑特殊情况,输入为负数、0,1,2,3,4,5. 若为负数和0,false; 1,2,4,true; 3,5,false; 只要n>1,若n%2 != 0;则false; 否则 n = n/2; 时间

2015-07-06 16:04:52 299

原创 leetcode-21 Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.题目很简单,就是考察队链表插入的熟悉程度。 12ms。 代码:/** * Definition for singl

2015-07-03 21:55:28 333

原创 leetcode-105&106 Construct Binary Tree from Preorder and Inorder Traversal I&II

Given preorder and inorder traversal of a tree, construct the binary tree.思路简单,但是实现起来就复杂了。思路:发现,前序的第一个为根,然后在中序中找到根,在中序中,根的左边是左子树,右边是右子树。然后递归进入左子树与右子树。可是由于在左子树的时候,坐标会错位,没办法对齐,纠结了很久,还是无法解决。最后求助于强大的百度……发现

2015-07-03 19:46:07 350

原创 leetcode-10 Regular Expression Matching

Implement regular expression matching with support for ‘.’ and ‘*’.‘.’ Matches any single character. ‘*’ Matches zero or more of the preceding element.The matching should cover the entire input string

2015-07-01 20:05:52 408

原创 leetcode--217&219&220 Contains Duplicate(重复)I&II&III

一、217 Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return

2015-06-30 20:24:54 662

原创 leetcode-56&88 Merge Intervals && Merge Sorted Array

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note: You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional

2015-06-09 17:15:28 450

原创 leetcode-20 Valid Parentheses

Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close in the correct order, “()” and “()[]{}” are all valid but “

2015-06-03 16:02:53 415

原创 leetcode--19 Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2.After removing the second node from the end, the linked list be

2015-06-02 18:56:16 376

原创 leetcode-62&63 Unique Paths I & II

一,第62题,unique paths I A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right at any point in time. The robot is tr

2015-05-14 20:06:36 465

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除