adapter

Design pattern for default implementation with empty methods

Is there a specific design pattern that describes the scenario where a non-abstract default implementation is provided that implements all or some of the methods on the interface with empty, NO-OP implementations. This being done with the intent of alleviating subclasses with the burden of implementing methods that they themselves may no...

Ruby on Rails + Sql Server 2005

This has been addressed some time ago, but I've not had any luck following the steps outlined or advice suggested. Here's my situation: I've installed SQL Server '05 and have another (non-Ruby) application utilizing it successfully. I've got Rails up and running successfully (but only for MySQL.) I've installed the Rails sqlserver adap...

Adapter Design Patter | adapter that converts an Iterator to an Enumeration |ConcurrentModificationException

As part of an exercise, am implementing an ArrayList which will support Enumerations. Following is the adapter that converts an Iterator to an Enumeration: public class MyEnumeratorAdapter<Object> implements Enumeration<Object> { private Iterator<Object> adaptee; public MyEnumeratorAdapter(Iterator<Object> it) { this.ada...

Biztalk: Send and Receive multipart message in custom adapter

Hi, I am currently looking into using the BTS 2006 SDK "Submit" custom adapter to enable a unit test to invoke a test "wrapper" BTS orchestration. This "test" orchestration will in turn "call" or "start" the orchestration I wish to test. I would prefer to use something like "submit" adapter rather than expose the "test" orchestration as...

Need help installing MySQL for Python

Trying to install MySQL for Python. Two problems: 1) Instructions over the net says installation is python setup.py For me, it results with can't open file 'setup.py': [Errno 2] No such file or directory 2) README.txt says: The Z MySQL database adapter uses the MySQLdb package.This must be installed before you can use the Z MySQL DA. Y...

What's the best way to connect to an Oracle DB from BizTalk 2006 (not R2)?

I need to call a stored procedure in Oracle from an orchestration. I am running BizTalk 2006 (not R2). Which way is best? Are there others? BizTalk Adapters for Enterprise Applications BizTalk LOB Adapters Thanks in advance. ...

ListView and onitemClicked effect in Android ?

Hi I have made an BaseAdapter that does not show the onclick effect on the rows when the items get selected (orange background). Im wondering what is needed to make the OnClickedItem effect appear. I tried to set the OnItemClickListener on the list, but it did not help. here is my code: private class MyAdapter extends BaseAdapter...

How to get serial number for Hard Driver

How to get the unique number (serial number/ID) for Processor (CPU), SCSI, Display, and IDE using C++ program other than WMI and asm code? ...

Request View and View Updates from Another Application

I am looking to create an app with plugin functionality. What I want is to allow a separate plugin "app" to provide me with the view, and take care of the updating of the view that I will use in my list adapter. Essentially, I want the separate app to take care of the bindView and newView methods of my adapter. I am looking at RemoteVie...

Android: ListView with complex data model

I'd like to map an Array of "complex" data to a ListView. In a very simplified form my data model would look like something like this: class ListPlacesValues { String idObject; String name; String city; String country; ArrayList<String> classification; double distance_quantity; DistanceUnit distance_unit; [......

Android: How to bind spinner to custom object list?

Hi, In the user interface there has to be a spinner which contains some names (the names are visible) and each name has its own ID (the IDs are not equal to display sequence). When the user selects the name from the list the variable currentID has to be changed. The application contains the ArrayList Where User is an object with ID an...

Android: EfficientAdapter with two different Views

I'm using an extended version of BaseAdapter based on the EfficientAdapter example from the SDK demo samples. My data is basically an object (ListPlaces) which holds an ArrayList with the actual list of places, accessible via listPlaces.getValues(). This ArrayList data is sorted by range and the ArrayList consist of some special items (...

C# API to test if a network Adapter is firewalled

Given - .Net 2.0 XP machine with SP2 and multiple network adapters Is there an API that can be used to check if the network adapter is firewalled? OneGuyInDC ...

Android, Custom ListAdapter get TextView-Text

Hello guys I coded an own Adapter and added it to my ListActivity via an ListView. The reason why I wrote an own Adapter is, that i had to make some layout changes to the list-entrys. In every entry of the list i've got 3 TextViews. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/...

Implementing safe duck-typing in C#

After looking at how Go handles interfaces and liking it, I started thinking about how you could achieve similar duck-typing in C# like this: var mallard = new Mallard(); // doesn't implement IDuck but has the right methods IDuck duck = DuckTyper.Adapt<Mallard,IDuck>(mallard); The DuckTyper.Adapt method would use System.Reflection.Emi...

Design pattern for abstracting existing objects

Hi there, i want to create an abstract representation of an existing object. For this example i want to wrap the functionality of a System.Windows.Forms.TreeNode. I started by creating an adapter as follows... Edit : The purpose of the abstraction will allow me to use the ITreeNodeAdapter in my application without knowing about the Tr...

Why doesn't the BizTalk 2009 SMTP Adapter support BCC and Priority ?

When looking at http://msdn.microsoft.com/en-us/library/aa560648%28BTS.10%29.aspx I couldn't find BCC or Priority, so I'm sure it's not supported. But why ? ...

mysqlplus is better adapter than ruby mysql?

I want to know if the mysqlplus gem is a better database driver than the common Ruby mysql gem? I used to have some problems in my Rails application, like: ActiveRecord::StatementInvalid: Mysql::Error: MySQL server has gone away ...

Own sync adapter for Android?

The press release of Android 2.0 states that the new release supports sync adapters so that emails and calendars cannot only be synced with gmail and exchange. However, there is no information available online how to write such a sync adapter. Has anyone tried it and some example code available? ...

Fetching the SelectedValue from a RadioButtonList subclass

I have subclassed the RadioButtonList control in order to create a Control Adapter that outputs the HTML exactly the way I want (it is the first time I write an adapter). The problem that I am facing is when accessing the "SelectedValue" property, I always get an empty string. If I switch to the superclass I get the proper value, so I a...