因为在这些企业里,有一些根深蒂固的不成文的规定:
- 不要成为有消极想法的人;
- 不要指出问题,除非你有解决办法;
- 不要说任何事可能是一个问题,除非你能证明它是;
- 不要做拆台的人;
- 不要明确指出问题,
"->", ",", ";", "." 这样只是更加突出了函数的定义和使用时的方便性。 Pid ! Message , 与接收 Receive。这与 Erlang 虚拟机的轻量级进程相结合,无疑是提供了一个颇具工程价值的强悍的函数式语言;2)引入的模块(module),函数输出/输入定义(export/import),引入宏; 3)增强的 Term 匹配; 4)引入异常处理机制(try/catch),5)引入 tuple 以及 record 数据类型。
10.4. Why is Ericsson giving away Erlang?
(The following is my personal impression. I don't speak for Ericsson!)
Nothing to lose: Ericsson's core business is telecommunications products, selling programming tools is not really a business Ericsson is interested in.
Stimulate adoption: Erlang is a great language for many sorts of systems. Releasing a good, free development environment is likely to make Erlang catch on faster.
Generate goodwill: Giving away cool software can only improve Ericsson's image, especially given the current level of media attention around "open software".
C:\Program Files\Yahoo!\Messenger>dumpbin /exports idle.dll
Microsoft (R) COFF/PE Dumper Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file idle.dll
File Type: DLL
Section contains the following exports for idle.dll
00000000 characteristics
450867C8 time date stamp Thu Sep 14 04:19:20 2006
0.00 version
1 ordinal base
3 number of functions
3 number of names
ordinal hint RVA name
1 0 00001016 ?IdleUIGetLastInputTime@@YAKXZ
2 1 000010C3 ?IdleUIInit@@YAHXZ
3 2 0000111C ?IdleUITerm@@YAXXZ
Summary
1000 .data
1000 .rdata
1000 .reloc
1000 .rsrc
1000 .text
1000 Y_IDLE
/**
* This is used to hack the Yahoo Messenger.
* compiled with VC7.1 as:
* cl -W3 -O1sy -LD -MD -D_WIN32_WINNT=0x0500 idle.cpp -Feidle.dll User32.lib
*/
#include
#pragma section("Y_IDLE",read,write)
__declspec(allocate("Y_IDLE"))
int Y_IDLE = 0;
#define DllExport __declspec( dllexport )
DllExport DWORD IdleUIGetLastInputTime()
{
LASTINPUTINFO lii;
lii.cbSize = sizeof(lii);
GetLastInputInfo(&lii);
return lii.dwTime;
}
DllExport INT IdleUIInit()
{
return TRUE;
}
DllExport VOID IdleUITerm()
{
return;
}
!include <win32.mak>
## Link with MSVCRT and MSVCP
#.cpp.exe:
# cl -nologo -MD -W3 -O1y -EHsc -I. $**
.cpp.exe:
cl -nologo -W3 -O1y -EHsc -I. $**
clean:
del /q /f *.exe *.obj
## GNU Makefile with MinGW/MSYS
## MinGW 下面简化的Makefile 需要 MSYS
## It can be invoked like `mingw32-make hello.exe`
## This will compile the hello.cpp to hello.exe
CXXFLAGS=-I. -O3
## 没有下面这条指令, 后缀通配指令不能识别 .cpp.exe
.SUFFIXES: .exe
.cpp.exe:
g++ -Wall $(CXXFLAGS) -o $@ $<
.PHONY : clean
clean:
rm -f *.exe *.obj *.o
XMLHttpRequest, DOMParser, etc.)All the folders/files are necessary for a XUL application, "app files..." will be variant, it depends on your application itself.
/HelloWorldApp
/chrome
- app files ...
chrome.manifest
/defaults
/preferences
prefs.js
application.ini
[App]
; This field specifies your organization's name. This field is recommended,
; but optional.
Vendor=MozillaTest
;
; This field specifies your application's name. This field is required.
Name=HelloWorldApp
;
; This field specifies your application's version. This field is optional.
Version=0.0.1
;
; This field specifies your application's build ID (timestamp).
; This field is required.
BuildID=20061030
;
; This field specifies a compact copyright notice for your application. This
; field is optional.
Copyright=Copyright (c) 2004 Mozilla.org
;
; This ID is just an example. Every XUL app ought to have it's own unique ID.
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
; irc.mozilla.org and /msg botbot uuid. This field is optional.
ID={CAB1E5C0-1E38-44c3-B153-754AD72E898B}
[Gecko]
;
; This field is required. It specifies the minimum Gecko version that this
; application requires.
MinVersion=1.8
;
; This field is optional. It specifies the maximum Gecko version that this
; application requires. It should be specified if your application uses
; unfrozen interfaces.
MaxVersion=1.9
pref("toolkit.defaultChromeURI", "chrome://helloworldapp/content/helloworld.xul");
pref("general.useragent.extra.helloworldapp", "HelloWorld/0.1"); It define "toolkit.defaultChromeURI" to "chrome://helloworldapp/content/helloworld.xul" .This file performs the mapping between a chrome:// url and your application files:
这个文件主要用来实现 XUL 程序中使用的 chrome:// scheme 和你自己编写的应用程序文件的对应。
This is the chrome.manifest of "Hello World" application.
Hello World 程序的 chrome.manifest 文件的内容如下:
content helloworldapp file:helloworldapp/This institution tells XULRunner to look at ${APP_ROOT}/chrome/hellowworldapp/ when it encounters a chrome://helloworldapp/content/ URI. The change of the application name and folder name will impact the URI looking up of XULRunner.
Most XUL applications are distributed as a .jar file, rather than a subfolder of chrome/ with all the files scattered about. When you do want to deploy it as a jar:
chrome.manifest to point to applicationName.jar: content applicationName jar:applicationName.jar!/
This is a very simple XUL file which defined a frame window, and there is only a button on it. When the button is clicked, there will be a prompt alert. It just works like HTML.
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id = "helloworldapp"
title = "Hello World!"
width = "300" height = "200"
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<button label="Hello World" onclick="window.alert('Hello World!');"/>
</window>
e:\devel\xulrunner>xulrunner.exe HelloWorld\application.iniin other words:
${XULRUNNER_HOME}\xulrunner.exe ${APP_ROOT}\application.ini
当然也可以使用上面的方法来运行,这里 ${XULRUNNER_HOME} 和 ${APP_ROOT} 应该被替换成她们实际的全路径名。
# This is an example configuration file for xsupplicant versions after 0.8b.
### GLOBAL SECTION
# network_list: defines all of the networks in this file which
# should be kept in memory and used.Comma delimited list or "all"
# for keeping all defined configurations in memory. For efficiency,
# keep only the networks you might roam to in memory.
# To avoid errors, make sure your default network is always
# in the network_list. In general, you will want to leave this set to
# "all".
network_list = all
#network_list = default, test1, test2
# default_netname: some users may actually have a network named "default".
# since "default" is a keyword in the network section below, you can
# change which is to be used as the replacement for this keyword
default_netname = default
#default_netname = my_defaults
# When running in daemon, or non-foreground mode, you may want to have the
# output of the program. So, define a log file here. Each time XSupplicant
# is started, this file will be replaced. So, there is no need to roll the
# log file.
logfile = /var/log/xsupplicant.log
# The auth_period, held_period, and max_starts modify the timers in the state
# machine. (Please reference the 802.1x spec for info on how they are used.)
# For most people, there is no reason to define these values, as the defaults
# should work.
#auth_period = 30
#held_period = 30
#max_starts = 3
### NETWORK SECTION
# The general format of the network section is a network name followed
# by a group of variables.
# Network names may contain the following characters: a-z, A-Z, 0-9, '-',
# '_', '\', '/'
# Those interested in having an SSID with ANY character in it can use
# the ssid tag within the network clause. Otherwise, your ssid will
# be the name of the network.
## The default network is not a network itself. These values are
## the default used for any network parameters not overridden
## in another section. If it's not in your network configuration
## and not in your default, it won't work!!
default
{
# type: the type of this network. wired or wireless, if this value is not
# set, xsupplicant will attempt to determine if the interface is wired or
# wireless. In general, you should only need to define this when
# xsupplicant incorrectly identifies your network interface.
type = wire # For your Ethernet card.
# wireless_control: If this profile is forced to wired, this will not do
# anything. However, if the interface is forced, or detected to be wireless
# XSupplicant will take control of re/setting WEP keys when the machine
# first starts, and when it jumps to a different AP. In general, you won't
# need to define, or set this value.
# wireless_control = yes
# allow_types: describes which EAP types this network will allow. The
# first type listed will be requested if the server tries to use something
# not in this list.
# allow_types = eap_tls, eap_md5, eap_gtc, eap-otp
allow_types = all
# identity: what to respond with when presented with an EAP Id Request
# Typically, this is the username for this network. If this is a string
# that does not contain any spaces, or unusual characters, it can be listed
# plain. Otherwise, it should be enclosed in quotes.
identity = "DOMAIN\USERID" # For window based 802.1X RADIUS, it should be DOMAIN\USER
# Force xsupplicant to send it's packets to this destination MAC address.
# In most cases, this isn't needed, and shouldn't be defined.
#dest_mac = 00:aA:bB:cC:dD:eE
eap-peap {
inner_id = USERID # Only UserID
# As in tls, define either a root certificate or a directory
# containing root certificates. If the path contains spaces, or unusual
# characters, enclose it in quotes.
# Trusted root cert can be exported from windows
# as DER format, and translate to PEM format by using openssl
# under Linux:
# openssl x509 -inform DER.cer -outform PEM -out root.crt
root_cert = /path/to/root/certificate
root_dir = "/path /to /root /certificate /dir"
crl_dir = /path/to/dir/with/crl
chunk_size = 1398
random_file = /dev/random # /dev/random will work for most case.
# If you don't know the CN name of your RADIUS server,
# You can make the cnexact = no
# While the RADIUS server name can be saw in "Xsupplicant -d A" mode
cncheck = myradius.radius.com
cnexact = yes # Should it be an exact match?
session_resume = yes
#Currently 'all' is just mschapv2
#If no allow_types is defined, all is assumed
allow_types = all # where all = MSCHAPv2, MD5, OTP, GTC, SIM
#allow_types = eap_mschapv2
eap-mschapv2 {
# ntpwdhash was generated by using "xsup_ntpwdhash" command
ntpwdhash = E653E6452753C97E46792567DFF599B6
# Don't put your password here, use the ntpwdhash instead.
#password = "phase2 mschapv2 pass"
}
}
}
# TIP:
#
# 1. Use the foregroup mode to debug your configure.
# It will show you all the things.
# /usr/sbin/xsupplicant -i eth0 -d A -f
#
# 2. Remove all the unnecessary data cleaned
syntax region xDocLink start="{" end="}" contained
syntax region xDocComment start="/\*\*" end="\*/"
\ contains=xDocLink
syntax region xBlock start="{" end="}"
\ contains=xDocComment keepend
{
/**
* The comments {@links}
*/
Block;
}
item matches equivalentUsing this predefined ranges works a lot faster than the character range it stands for.
\d digit [0-9]
\D non-digit [^0-9]
\x hex digit [0-9a-fA-F]
\X non-hex digit [^0-9a-fA-F]
\s white space [ ] (and )
\S non-white characters [^ ] (notand )
\l lowercase alpha [a-z]
\L non-lowercase alpha [^a-z]
\u uppercase alpha [A-Z]
\U non-uppercase alpha [^A-Z]
@copyright of Sam Chadwick - https://thehub.thomsonreuters.com/groups/bitcoin/blog/2017/09/10/blockchain-paper Blockchain Papers A c...