转 Adding Sound to Your Ruby Apps
Have you ever thought about including sounds in your Ruby application? Used sparingly, sound may enhance your applications by adding audio cues or a custom touch. You could, for example, play a beep or chime that announces the completion of a lengthy process. Perhaps a humorous sound to accompany an error message .
The win32-sound library makes using sounds really simple.
If you installed Ruby with the One-Click Ruby Installer, then you probably already have the win32-sound library installed, along with other win32 utilities. Otherwise, you can install it in seconds via gem. Open up a console window and enter..
gem install win32-sound
To use the win32-sound library, add these require and include statements to the top of your script...
require 'win32/sound'
include Win32
Then, to play a sound file on the PC, call the Sound.play method, passing it the name of the file...
Sound.play('chimes.wav')
Sound.play('c:\sounds\hal9000.wav')
In the exa ......
using System;
using System.Data;
using System.Xml;
using System.Data.OleDb ;
using System.Collections;
namespace ePhoto.AccessDAL
{
/// <summary>
/// DBUtil 操作Access数据库
/// </summary>
public class DBUtil
{
private Hashtable parmCache = Hashtable.Synchronized(new Hashtable()); //缓存用户参数
private static string path = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
System.Web.HttpContext.Current.Server.MapPath("")+"\\"+System.Configuration.ConfigurationSettings.AppSettings["AccessDataBase"] ; //Access 数据库文件地址
/// <summary>
/// 执行单向操作,返回数据库受影响的行数使用默认连接, 执行SQL语句,仅仅返回数据库受影响行数。
/// 所需参数:命令文本,参数列表。
/// </summary>
/// <param name="cmdText">命令文本</param>
/// <param name="cmdParms">参数列表</param>
/// <returns></returns>
public static int ExecuteNonQuery(string cmdText ,params OleDbParameter[] cmdParams)
......
How To ... Access the Z-Depth channel
delete $VoxelBox*
rbmp
= render outputsize:[32,32] channels:#(#zdepth) vfb:
off
z_d
= getchannelasmask rbmp #zdepth
progressstart "Rendering Voxels..."
for
y = 1 to
rbmp.height do
(
progressupdate (100.0 * y / rbmp.height)
pixel_line = getpixels rbmp [0,y-1] rbmp.width
z_line = getpixels z_d [0,y-1] rbmp.width
for
x = 1 to
rbmp.width do
(
b =
box width:10 length:10 height:(z_line[x].value/2)
b.pos = [x*10,-y*10,0]
b.wirecolor = pixel_line[x]
b.name = uniquename "VoxelBox"
)
--end x loop
)
--end y loop
progressend ()
......
java 用rmi编写客户/服务程序
出现access denied 问题
因为不知道怎么配置 策略文件 就将客户端的System.setSecurityManager(new RMISecurityManager())删了,运行java ProductClient
成功!
配置策略文件得之后才弄啦 ......
java 用rmi编写客户/服务程序
出现access denied 问题
因为不知道怎么配置 策略文件 就将客户端的System.setSecurityManager(new RMISecurityManager())删了,运行java ProductClient
成功!
配置策略文件得之后才弄啦 ......
1.首先 ddic用戶用戶進入,su01,輸入用戶名(“加入我新建立的dev”),回車,建立一個用戶帳號,然後把設置密碼,profile選項中輸入“SAP_ALL”(這個是SAP ALL 認證的意思),保存就可了。然後LOG OFF。
2.用新建立的“DEV”登陸,系統會提示你更改密碼。更改,然後提示你是第一次登陸。然後 開始破解了。
(這是顯示的視窗)
3.SE38, 輸入"LSKEYF00",然後點"DISPLAY", 找到 form. JUMP_THE_WALL, 在
CALL 'GET_DEVELOPER_KEY' ID 'NAME' FIELD 'ABCDEFGHIJKL'
ID 'CUSTID' FIELD '1234567890'
  ......
廖洪亮 2010/4/13
概述
在实际的项目中,可能会遇到这样的问题:A服务器上的应用程序需要访问B服务器上的access数据库(可以使用虚拟机模拟A、B服务器进行测试)。而access数据库是文件类型的,不同计算机间需要指定文件访问权限,增加了程序的复杂度。本文将从一个实例来介绍一种简单实用的方法。该实例使用的方法来自Internet,并已经成功应用到实际项目中。
在B服务器中创建access数据
1、创建access数据库前,确保你的计算机中已经安装了MS office软件。
2、创建一个测试数据库,testdb.mdb(文件版本为office200-2003) ,新建表tb_test,字段ID、name、age,并插入几天相应的记录。
3、test.mdb放置在E:\mydb目录下。
在B服务器中设置ODBC数据源
1、 使用”win”+r组合键,调出“运行”对话框,输入”odbcad32”调出“ODBC数据源管理器”。
2、 选择“系统DSN”页签,点击“添加”按钮,创建新数据源,选择“Microsoft Access Driver(*.mdb)”。点击“完成”,弹出“ODBC Microsoft Access安装”对话框,配置如下图:
&nb ......
廖洪亮 2010/4/13
概述
在实际的项目中,可能会遇到这样的问题:A服务器上的应用程序需要访问B服务器上的access数据库(可以使用虚拟机模拟A、B服务器进行测试)。而access数据库是文件类型的,不同计算机间需要指定文件访问权限,增加了程序的复杂度。本文将从一个实例来介绍一种简单实用的方法。该实例使用的方法来自Internet,并已经成功应用到实际项目中。
在B服务器中创建access数据
1、创建access数据库前,确保你的计算机中已经安装了MS office软件。
2、创建一个测试数据库,testdb.mdb(文件版本为office200-2003) ,新建表tb_test,字段ID、name、age,并插入几天相应的记录。
3、test.mdb放置在E:\mydb目录下。
在B服务器中设置ODBC数据源
1、 使用”win”+r组合键,调出“运行”对话框,输入”odbcad32”调出“ODBC数据源管理器”。
2、 选择“系统DSN”页签,点击“添加”按钮,创建新数据源,选择“Microsoft Access Driver(*.mdb)”。点击“完成”,弹出“ODBC Microsoft Access安装”对话框,配置如下图:
&nb ......