| SlvTable has the click method, by the x, y has to be the position relative to the parent control (table or the grid here.) so , get the top location of the table itself, then run some basic math cacaluation, you can click any cells with links, Here is one snippet to click [3,3] links, myx=browser("HomePage).Page("Module1").SlvWindow("RootVisualWrapper").SlvTable("Grid1").GetCellProperty(3,3,"x") parentx=browser("HomePage).Page("Module1").SlvWindow("RootVisualWrapper").SlvTable("Grid1").GetROProperty("x") w=browser("HomePage).Page("Module1").SlvWindow("RootVisualWrapper").SlvTable("Grid1").GetCellProperty(3,3,"width") rx=myx + w/2-parentx browser("HomePage).Page("Module1").SlvWindow("RootVisualWrapper").SlvTable("Grid1").Click rx, ry |
Tuesday, January 31, 2012
HP QTP, Click LInk in specified cells in the data grid of siliverlight, SlvTable
Friday, January 20, 2012
Oracle Coherence Monitoring, Node max memory keep changing.
If you turn on the coherence monitoring by setting the jvm property, -Dtangosol.coherence.management.remote=true, you can check the Coherence status via the JMX client like Jconsole. I.e you can click the Node of Coherence domain, and see all the Nodes information, like MaxMemory, FreeMemory.
always we set up the heap size constant. min and max to the same value, I set it up to 300M here.
But when I check the node attributes of max and free memory, the max one is not 300M, and sometimes, even keep changing.
then I check the code, to return the MemoryMaxMB, pretty simple, just call runtime to get the maxmemory.
I created the following bTrace script, and make sure it is calling this code. And I am right.
| @OnMethod(clazz = "com.tangosol.coherence.component.net.management.model.localModel.ClusterNodeModel", method = "getMemoryMaxMB", location = @Location(value = Kind.RETURN)) } |
then the question is why the maxmemory here is 287 or some value instead of 300M ?
I did a another test, change the JVM to Jrockit, what do you expect? it shows 300M.
conclusion, the MemoryMaxMB reported here vary by JVM. because each JVM vendor has it’s own implementation of the JVM.
Wednesday, December 14, 2011
Cassandra OpsCenter Community features
played with the Ops several hours, here are the major feature In my option.
Monitoring the whole cluster status, like req/s, disk capacity, IO
Node tool visualization and do maintenance job just a click away. Such as, drain one node, compact, or get one node out of cluster(decommission.), rebalance cluster is only available in enterprise version sadly.
Clicking the Node, you can do a lot stuff, such as view the multi-DC replications.
Data modeling and explor( create keyspace , and view data), update column family.
Exploring data,
Monitoring again,
Actions on node, (like the node tool)
Cassandra Opscenter, connected to the cluster, But No Node information get listed
configration is pretty simple for opscenter, just change files under conf fodler, point to correct seed server, then I can query the data from Opscenter now.
How ever, the dashboard, there is no node information.
When I check the logs under opscenter , when it try to get node infrmation from the thift API, get error, that explains why, return no results.
After did a lot testing, I noticed this is because of the version mismatch, for Cassandra cluster, it runs on 1.0 version.
while the ops center version is 1.3.1, you can tell from the console on the left bottom
then I try update the Cassandra to the latest version 1.0.5, it works without any problem.
Cassandra OpsCenter,Failed to load application: libpython2.6.so.1.0
Unzip the OpsCenter file, Instal the 2.7 Python, then run the opscenter, failed get the following error.
| [root@e3 opscenter]# bin/opscenter File "build/lib/python2.7/site-packages/opscenterd/Config.py", line 392, in init_config File "build/lib/python2.7/site-packages/opscenterd/events/plugins/CassandraStore.py", line 12, in <module> File "build/lib/python2.7/site-packages/opscenterd/CassandraService.py", line 17, in <module> File "build/lib/python2.7/site-packages/opscenterd/Cluster.py", line 14, in <module> File "build/lib/python2.7/site-packages/opscenterd/AgentServer.py", line 23, in <module> File "build/lib/python2.7/site-packages/opscenterd/HttpUtils.py", line 10, in <module> File "/usr/lib/cassandra/opscenter-1.3.1/lib/py-redhat/2.6/5/amd64/OpenSSL/__init__.py", line 11, in <module> Failed to load application: libpython2.6.so.1.0: cannot open shared object file: No such file or directory |
When I list the LibPython module under /usr/lib64/libpython* , It only has the 2.4 modue. So we need to install the 2.6 Module required by the opscenter.
1, first, Check my OS, it ‘s Centos 5
go to http://download.fedora.redhat.com/pub/epel/5/x86_64/, download the epel-release-5-4.noarch.rpm
2. Update the rpm, “rpm -Uvh epel-release*rpm”
3. yum install python26-libs
Once done, you can see the 2.6 modules under the lib folder,
Now we can run the opscenter now.
Tuesday, December 6, 2011
How to: write a key mapper or Key transformation utility in 10 minutes
Question, need a utility to map or transform the key stoke, say when you press F6, replace the contents with a Mailing address, and Press F7 for the zip code of your city.
Answer, In C#, it’s easy and not easy. you have to wrap several Native APIs to hook the mapping point into the system, Easy one is it has one Great methods called Sendkeys.Send.
So eventually, we need one file to keep the mapping logic , here I just pickup the .config file, then the code. Code is here,you may just copy and save it as .cs file, then compile it.
| using System; public class KeyMapper private static LowLevelKeyboardProc _proc = HookCallback; mappings = System.Configuration.ConfigurationManager.AppSettings; _hookID = SetHook(_proc); private static IntPtr SetHook(LowLevelKeyboardProc proc) private delegate IntPtr LowLevelKeyboardProc( private static IntPtr HookCallback( if (mappings[key] != null)
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] |
Then we you started the console application.
wherever you enter F6, it will put a sample address there.
If you can’t compile the code , leave a comment , I will email you the compiled bits.
Wednesday, November 30, 2011
Error: Vmplayer, NO Disk, There is no disk in the drive. Please insert a disk into drive \Device\Harddisk2\DR4.
One Day I get this error, when I just open the Vmware player, Kept popping up this error when I click the VMs.
Then I run a diskpart from the cmd shell, then call “list disk” it will show all the hard disks and their sizes
the disk2 is a weird Disk, Size is 0B.
then checked all my hard disk, I plugged my phone into the USB port. unplug the cable, the disk 2 is gone.
the error of NO disk was fixed too.