:=一定要給初值
b:=3
baz:= []int {3,4,5}
baz:= [3]int // error! 缺乏初值- var 可以給初值也可以不給
| #!/bin/sh | |
| echo "Stopping firewall and allowing everyone..." | |
| iptables -F | |
| iptables -X | |
| iptables -P INPUT ACCEPT | |
| iptables -P FORWARD ACCEPT | |
| iptables -P OUTPUT ACCEPT |
| net = require('net') | |
| mib_entries=[] | |
| @add_entry = (oid, type, cb)-> | |
| mib_entries.push | |
| oid: oid | |
| type: type | |
| cb: cb |
| prvs_tmp = [] | |
| prvs_tmp.push { oid: ".1.3.6.1.6.3.15.1.1.#{i}.0", handler:{}} for i in [1..6] | |
| prvs_tmp.push {oid:'.1.3.6.1.2.1.4.1.0' , handler:{}} | |
| prvs_tmp.push {oid:'.1.3.6.1.23.13.4.1.0' , handler:{}} | |
| prvs_tmp.push {oid:'.1.3.6.1.2.12.4.1.0' , handler:{}} | |
| prvs_tmp.push {oid:'.1.3.6.1.23.12.4.1.0' , handler:{}} | |
| prvs_tmp.push {oid:'.1.3.6.1.2.1.31.1.1.1.6.12' , handler:{}} | |
| prvs_tmp.push {oid:'.1.3.6.1.2.1.31.1.1.1.6.11' , handler:{}} | |
| mibentries = prvs_tmp |
| fs = require("fs") | |
| writereg = (offt,rval)-> | |
| to8dhex = (val)-> | |
| s=val.toString(16) | |
| pre0='' | |
| pre0+='0' for i in [1..(8-s.length)] | |
| pre0+s | |
| rdfn="/proc/resource_dump" | |
| fs.open rdfn, 'r+', null, (err, fd)-> | |
| return if not fd? |
| 340049 F 如影隨形 江美琪 1 4 0 http://i.eimg.com.tw/d/alb/30/49730.100.jpg?ver=0 H90074 | |
| 82258 F 如果 邰肇玫 1 2 0 | |
| 390002 F 如果下個路口遇見你 許茹芸 1 9 0 http://i.eimg.com.tw/d/alb/41/27441.100.jpg?ver=0 I20398 | |
| 35595 F 如果不想要 蔡依林 1 5 0 YS-0272 | |
| 16900 F 如果你也聽說 張惠妹 1 6 0 http://i.eimg.com.tw/d/alb/65/92865.100.jpg?ver=0 | |
| 360091 F 如果你也聽說 張惠妹 1 6 0 http://i.eimg.com.tw/d/alb/65/92865.100.jpg?ver=0 B71136 | |
| 82729 F 如果你愛我 蔡健雅 1 5 0 http://i.eimg.com.tw/d/alb/44/98444.100.jpg?ver=0 | |
| 350211 F 如果你愛我 蔡健雅 1 5 0 http://i.eimg.com.tw/d/alb/44/98444.100.jpg?ver=0 B71280 | |
| 36037 F 如果你是李白 莫文蔚 1 6 0 http://i.eimg.com.tw/d/alb/36/45336.100.jpg?ver=0 G80078 | |
| 300010 F 如果在你懷裡滿足的死掉 徐懷鈺 1 11 0 http://i.eimg.com.tw/d/alb/5/88605.100.jpg?ver=0 B71099 |
| http = require("http") | |
| url = require("url") | |
| path = require("path") | |
| fs = require("fs") | |
| dirname = '.' | |
| servfunc = (request, response) -> | |
| uri = url.parse(request.url).pathname | |
| filename = path.join( dirname, uri) | |
| fs.exists filename, (exists) -> |
| os =require 'os' | |
| dgram = require 'dgram' | |
| test_send = (ifaddr)-> | |
| MDNS_PORT = 5354 # OSX refuses app to use port 5353 | |
| MDNS_ADDRESS = "224.0.0.251" | |
| s = dgram.createSocket('udp4') | |
| ver = Number(process.versions.node.split('.')[1]) | |
| if ver==10 | |
| s.bind MDNS_PORT, ifaddr, -> |
Intrising technologies is a custom electronics design services company focusing on communication devices for mission critical scenarios. The main application includes L2/L3 ethernet switches used in mobile backhaul, factory automation, smart rail and power planets. With years of strong experience in protocol implementation and firmware engineering, Intrising provides the electronic design consulting services as well as full turnkey product from development to mass production.
In 2012, Intrising announced the world’s first industrial Ethernet switch supporting ITU.G8032. With the sub 50ms convergence time, they offer customer can get ultra-fast failure recovery without sacrificing interoperability.
A2e Technologies is a Custom Electronics Design Services (EDS) firm.
As one of the top Product Design Companies in the industry, we provide embedded systems and electronic product design consulting services as well as full turnkey product development through our multiple design centers. We provide everythi
struct 真的是copy value , 要用 pointer 才能指到同一個 struct variable
package main
import "fmt"
type myst struct {
age int
}