Skip to content

Instantly share code, notes, and snippets.

@swshan
swshan / IHS_notes.txt
Created November 24, 2017 11:48
IHS配置
0.检查插件logs目录是否有webserver的文件夹
1. 添加hosts解析,IHS主机对APP主机的
2. 检查和整理所需要的参数。
webserver名字 对应插件的目录
web服务端口
admin管理端口
源码包的拷贝 节点目录
Profile_root/config/cells/cell_name/applications/<app_name>.ear
A部分
+++
0检查步骤
0.1 Cognos版本所兼容的数据库大版本。数据库相关
0.2 系统版本
0.3 WAS详细版本 精确到fp
@swshan
swshan / callback1.py
Created August 1, 2017 03:35
回调函数 demo
#coding=utf-8
def double(x):
return x*2
def getoddnum(k, getEvenNumber):
return 1 + getEvenNumber(k)
def main():
k = 1
#coding=utf-8
import multiprocessing
import time
def proc1(pipe):
while True:
for i in range(10000):
print 'send %s' % i
pipe.send(i)
time.sleep(1)
@swshan
swshan / fib01.py
Created July 21, 2017 08:50
生成斐波那契数列并取前10项
def func(m):
n, a, b = 0, 1, 1
while n < m:
yield a
a, b = b, a+b
n = n + 1
def main():
for one in func(10):
print one
@swshan
swshan / thread.py
Created June 30, 2017 02:25
python练习 多线程
from threading import Thread
import time
a = 0
def th1():
global a
a = a + 1
##print 'a: ', a
@swshan
swshan / heapSort.java
Created June 20, 2017 09:22
堆排序 摘自维基百科
package main;
import java.util.Arrays;
public class heapSort {
private int[] arr;
public HeapSort(int[] arr){
this.arr = arr;
// 来自 http://xinqiu.me/2017/05/09/a-byte-of-go/ 的练习代码
package main
import "fmt"
func main() {
s := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
a := s[3:6]
b := a[1:2]
package main
import (
"os/exec";
"fmt";
"bytes";
)
package net;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.*;
public class Server {