Posts

Showing posts from March, 2011

How to Add Items from Comboboxes to Windows Forms

Image
On a recent PoC (Proof-of-Concept) I had to add items from two comboboxes to a Windows Form combobox. Here is a simple solution to that:

1. Highlight the combobox control in Object Explorer and click the Explore Component Properties button at the top of the Object Explorer.


2. You should see the list of properties available for the combobox control. Select the "Items" property and then select Configure Type to see Properties and Methods of the combobox.


3. Select the Methods you would like to use and then click OK. The methods you selected will appear in the Object Explorer. I've added Items.AddRange(Object[] items) to add an Array of items Commonly used methods are:


4. Then on my Automation I just added the AddRange method to be populated by the combobox from a Windows Application. Something similar to the following:


I just did the same thing for the other combobox items I wanted to add to my Windows Form combobox and ended up with all of them in one single control.

How to Change the Default Drag And Drop Behavior for Properties, Methods or Events

Image
There are some cases during a project you're constantly working with the same control and you want to change the default behavior when you drag and drop it from the Object Explorer. Well, here is what you have to do to change the default behavior in OpenSpan Studio (MS-Visual Studio plugin):

1. Select the control type you want and click Configure Type. Here is an example for a button.


2. The Button Control Configuration pops up and now you can select the property, event or method you want to be the default behavior. For the button control the "Click" event is the default behavior.


3. Select the new configuration you want to be the default behavior, right-click on it and then select Set As Default Member.


In the example above I've set the PerformClick method to be the default behavior.

The next time I drag and drop a button to the automation it will be the PerformClick method instead of the Click event.

How to Speed Up Mouse Tracking on Mac OS X

Sometimes I feel that my mouse tracking is not fast enough but when I check its settings on System Preferences it's already set to the maximum possible speed. Here is a very simple (and fast) solution to that problem.

Open Terminal.app (/Applications/Terminal)

Enter the following command:

defaults read -g com.apple.mouse.scaling

That should return the current speed of your mouse tracking as an integer. Mine was 5 and I want to update it to 10. Here is how I did it...

To change the speed of your mouse tracking you can simply run the following command:

defaults write -g com.apple.mouse.scaling your_mouse_speed

where your_mouse_speed is the speed you want to set to your mouse tracking.

Then you'll have to Log Out or restart your Mac to see the changes take effect.

UPDATE: As reported by the reader Squished Spider, if you update your settings using the approach above and perform any changes to the Mouse settings using Mac OS System Preferences later then the system will override e…

Happy Birthday Twitter!

I'm a big fan of Twitter and from the business perspective I see a lot possibilities and use cases where Twitter could add a lot of value. This week Twitter is celebrating its 5th anniversary and I came across this post from one of the founders (Biz Stone - @biz) and I think the video they put together is just amazing... Check it out! http://blog.twitter.com/2011/03/happy-birthday-twitter.html

OpenSpan Application Usage Events

OpenSpan is innovating again and customers/partners are now able to enjoy another great capability. In a new release, OpenSpan is including new events capabilities for monitoring application usage metrics for all applications on the desktop without touching them. Yeah! You got that right... No need for application interrogation, no need for touch the applications you want to get metrics from. That's an amazing opportunity to understand more about patterns and metrics from the user's desktop.

There are now three categories of events that OpenSpan can work with: Application Usage Events, Application Detail Events (Generic), Custom Business Events.

Application Usage Events

With minimal configuration and no application interrogation required, deploy OpenSpan to user desktops and immediately begin collecting high-level application usage and interaction metrics for all applications running on the user’s desktop. This new capability provides unprecedented insight into user experienc…

Desktop Events with OpenSpan and Oracle CEP - Part 3

Image
Having started the Oracle CEP successfully was the goal for the second part of this tutorial. Now, we're going to start building a sample OpenSpan automation to send messages through the JMS interface we created previously and push events from the desktop application to Oracle CEP.


28. Go to OpenSpan Studio (or MS-Visual Studio with OpenSpan plug-in installed) and create a new project. Select OpenSpan Project and name it OpenSpan_OCEP_Tutorial

29. Add a new Windows Form. Add a label, text box and button to your recently created Windows Form. You should have something similar to the following picture:


30. Go to Automation1 (Add a new Automation if you don't have one) and drag a MessagePublisher component from the Toolbox (Add the component to the Toolbox if it's not available for you). Make sure it's set to Global.
31. Highlight the messagePublisher1 component and go to the Properties panel. Select the MessageVendorType and set the Message Connection Properties to conne…

How to re-enable Mac Mail plugins after Mac OS X upgrade

I just upgraded my machine to Mac OS X (10.6.7) and unfortunately the plugins I have installed with Mac Mail stopped working one more time. I'm a big fan of GrowlMail, TruePreview and LetterBox and have been using them for a long time.
If you search on the Internet, you're going to find tons of references to this issue that affects Mac Mail plugins when you update your Mac. I haven't written that procedure on my notes and kept googling it every time I faced such situation. Well, I came across a very well written note that I think it's worth mentioning about how to fix that issue and decided to share it

How to re-enable Mac Mail plugins after updates

I hope you find it useful as well.

Desktop Events with OpenSpan and Oracle CEP - Part 2

Image
On the first part of this tutorial we walked through the steps of Oracle WebLogic JMS configuration. This is a very important step since it's the base underlying communication system between the major components for the integration between the applications part of this demonstration.


9. Assuming that everything works fine on the infrastructure side of the project you’re now ready to start developing your Oracle CEP application. Go to Oracle Enterprise Pack for Eclipse (Start Menu > Oracle WebLogic > Oracle Enterprise Pack for Eclipse).

10. Create a new Oracle CEP Application Project. Go to File > New > Other > Oracle CEP > Oracle CEP Application Project.

11. Name the project OpenSpan_Tutorial and leave all other fields as default.

12. Click Next.

13. On the New Oracle CEP Application Project select “Create an Oracle CEP Application using an application template” and choose Hello World as the template.

14. Click Finish.

15. At this point you should have an Oracl…

Moving to a Cloud-Based Lifestyle

I got a new laptop from my company (OpenSpan) some time ago and as much as I'm a Mac fan, and have been using the Apple hardware for quite some time, the company's standard is Lenovo and MS-Windows.

I try to spend as much time as I can on my Mac but the new laptop is really powerful (Lenovo W510 Intel Core i7 Q720 1.60Ghz, 8GB RAM, Win7 64-bit, 500GB HD) and a huge part of my job is done on virtual machines. Well, Virtual Machines use a lot of disk space, CPU and memory. Sometimes, I also need to run two VMs at the same time which it's kind of impossible with my Mac these days. I have a MacBook Pro Intel Core 2 Duo 2.16Ghz, 4GB RAM, MacOS Snow Leopard and there is no way to upgrade memory on this machine.

So, to be able to work from my Mac on the days that I don't need to spend hours developing or testing something on my VMs but also don't loose the ability to have all of my files updated on the next day when I need or want to log in to my Windows laptop and be rea…

Desktop Events with OpenSpan and Oracle CEP - Part 1

Oracle’s Complex Event Processing Engine can be used to monitor large volumes of real-time data feeds but how do you enable your existing applications to trigger and react with the CEP engine?

With OpenSpan Events you can quickly and easily monitor any application or set of applications on a user’s desktop - including Windows, Web, Java, mainframe, cloud-based, virtualized or Citrix-hosted applications - without modifying the original applications. All events and associated data can be sent in real-time to Oracle CEP, as well as stored in an Oracle or other central database for analysis using OpenSpan Analytics, Oracle Hyperion or any other BI or reporting tool.

Here is a step-by-step guide to get you started with OpenSpan Events with Complex Event Processing (CEP) technology. Part 1 of this tutorial is going to cover Oracle WebLogic JMS setup.

1. Download and Install Oracle WebLogic 11g R1 (http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html)

2. Download and …

How to Declare Variables in MS-SQL Server Management Studio

Image
Most of the projects I work on have some kind of database interaction and some of them require variables to be the passed to the queries at runtime.

I typically test my queries against the database using Microsoft SQL Server Management Studio and being able to use variable on my queries there is a big help.

Here is a quick hint to use variables with MS-SQL Server Management Studio:


-- Database to use
USE OSBC;

-- Declare the variable you need
DECLARE @AcctNumber varchar;

-- Set the value of the variable
BEGIN
SET @AcctNumber = 1
END

-- Run the query testing the paramenters
select * from contacts
WHERE AccountNumber = @AcctNumber


Here is a screenshot of my test:



Pretty simple stuff yet useful...

How to Create Code-Based OpenSpan Solutions

Image
OpenSpan Studio and its counterpart MS-Visual Studio plugin do a pretty good job when you have to integrate applications where you don’t have the source code available, service-enabled applications and/or exposed APIs. Having all the properties, events and methods graphically available make the development effort much easier than coding from scratch.

But, let’s say you’re an avid developer and feel pretty good handling code. Well, here is something you would really appreciate then. OpenSpan 4.5 has the capability of write automations directly in C#, VB or other .NET languages.

This is really powerful when you have the source code available and you want to drive your automations from a .NET-based application. Also, this approach would make the deployment sometimes simpler than the traditional approach.

Here is an example of code-based automation project:


1. Create a new .NET project. In this example we’ll be using a Visual C# project as the base project. Then, name it CodeBasedDemo.
2.…

Getting Started with OpenSpan Events (without the server infrastructure)

Image
So, you have heard about OpenSpan and its capabilities to collect and manipulate events from the user's desktop. Well, some people have been asking me if there is any way to start playing with OpenSpan Events without building the whole infrastructure behind it. Short answer: Yes. Instead of waiting for someone to create a database, setup the tables, install OpenSpan Events Server, figure out the transport layer (HTTP/S, JMS, etc), take a look on this short tutorial to see how can you collect events locally to make sure you're getting the information you want before you hit the server...

1. Start OpenSpan Studio (Or MS-Visual Studio if you’re using the plugin)

2. Go to File > New > Project and Create a new Empty OpenSpan Project

3. Name your project “Local Events Demo” and leave all default information selected

4. You should end up with something similar to following picture:



5. Go to Project > Add New Item and select Windows Application. I’m using a sample Window…

How to Disable Mac Mail.app Inline Image Attachments

If you need to disable (or enable) inline images on Mac OS X Mail.app to view them as attachments, here is what you have to do: Go to Terminal (Applications > Utilities > Terminal) and then type: defaults write com.apple.mail DisableInlineAttachmentViewing -bool true But, if you already have that set up on your system and want to go back, just run the following: defaults write com.apple.mail DisableInlineAttachmentViewing -bool false After any of the below commands don't forget to restart Mail.app

How to switch windows within the same application in Mac OS X using keyboard shortcut

Just found out how to switch windows within the same application in Mac OS X using keyboard shortcuts. The default behavior when you press Apple + Tab is to switch between applications but if you want to switch to the same application but a different window (let's say you have multiple Web browsers open) all you have to do is press Apple + ` (` is located left to the 1 key and on top of Tab key). Simple!

Ok... I gave up...

Not the best way to start a blog (I know) but I've been thinking about blogging and the content to start one for a long time and I just figured out that would be better to keep the context of my posts around Information Technology and computer-related stuff...

I've been for a long time on TwitterLinkedIn and Facebook but blogging is kind of new to me. Well, we all have to start somehow, right? Here is my first stab at this where I plan to share useful information about things that I find on the road (when traveling to customer's sites), articles from the Internet or something that I've in mind that someone can reuse out there.
So, I gave up holding the idea of start blogging...

By the way, my name is Marcelo Jabali and I've been working with technology since 1998. Most of my work is around systems integration, Service-Oriented Architecture and application design and architecture. I'm also a Mac fan and all things Apple.

Stay tuned for more... Feel free to con…