参考来源:
列出可获得的所有Ruby版本(列表较长,速度较慢):
$ rvm list known
参考来源:
列出可获得的所有Ruby版本(列表较长,速度较慢):
$ rvm list known
##创建msg
###msg是什么
msg是一个普通的文本文件,描述了一个消息的数据成员(数据结构),它将作为原型去生成各种编程语言能够使用的数据类型。
###Creating a msg
Firstly, we need a msg folder with a filename.msg file under the package folder.
#!/usr/bin/env ruby | |
print "input n: " | |
n = gets.chomp.to_i | |
r = 0 | |
(1..(n - 1)).each do |i| | |
((i + 1)..(n)).each do |j| | |
(1..j).each {r += 1} | |
end |
// I find the excellent code at http://stackoverflow.com/a/20946151 | |
// Put it here for further work on the CAPSLOCK detection prog | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <linux/input.h> | |
#include <string.h> | |
#include <stdio.h> |
%token plus minus mul div lp rp num float | |
%nonassoc num float | |
%left plus minus | |
%left mul div | |
%right lp rp | |
%% | |
exp : exp plus exp | |
| exp minus exp |
# Set Vivado environment path | |
set --export XILINX_VIVADO /opt/Xilinx/Vivado/2015.2 | |
set --export LD_LIBRARY_PATH $LD_LIBRARY_PATH /opt/Xilinx/Vivado/2015.2/lib/lnx64.o | |
set --export PATH $PATH /opt/Xilinx/Vivado/2015.2/bin |
一种cache的外围结构, 不涉及缓存策略和替换算法:
可行性方面存在问题: 由于时钟不一致, cpu 访问 cache 发现 miss 时可能已经没有足够的时间进行内存读写.
Update: 可以增加计时器, miss 信号相当于该计时器的异步 reset, 计时器结束时同步地写入 valid bit 并且恢复 cpu
void foo() | |
{ | |
if (1) { | |
1; | |
} else if (2) { | |
2; | |
} else while (3) { | |
3; | |
} else for (;;) { | |
4; |
namespace RenameFiles | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string paZipPath = @"C:\"; | |
var fileNameList = Directory.GetFiles(paZipPath); | |
foreach (var filename in fileNameList) | |
{ |
`timescale 1ns / 1ps | |
// Origin: http://www.fpga4fun.com/MusicBox2.html | |
module pwm( | |
input CLK100MHZ, | |
input BTNC, | |
output AUD_PWM, | |
output AUD_SD | |
); | |
parameter clk_divider_440 = (100000000 / 440) / 2; |