mapping

Google Maps API - GMarker.openInfoWindowHtml() stopped working

I have a Google Map that suddenly stopped working for no apparent reason (I hadn't touched the code for months, but the wrapper code from our CMS may have changed without Corporate telling me). http://www.democratandchronicle.com/section/builder (sorry about the nasty HTML outside the map, most of that comes from our corporate parent.....

Color mapping a texture in opengl

I am displaying a texture that I want to manipulate without out affecting the image data. I want to be able to clamp the texel values so that anything below the lower value becomes 0, anything above the upper value becomes 0, and anything between is linearly mapped from 0 to 1. Originally, to display my image I was using glDrawPixels. ...

Mapping Oracle bool fields with nHibernate

I have an Oracle database and the boolean fields are CHAR(1) with Y/N stored. How can I map this to a bool type using nHibernate? ...

nHibernate mapping to custom types

I have a Oracle database and one of the fields is a date range field. It is basically just stored in the database as a VARCHAR(40) in the format YYYY/MM/DD-YYYY/MM/DD. I want to map it in nHibernate to a custom class I have created like this public class DateTimeRange { public DateTimeRange(DateTime fromTime, DateTime toTime) { ...

NHibernate many-to-one mappings updating unchanged table

I have a situation where I have two entities that share a primary key (Transaction and TransactionDetail). I have them mapped using many-to-one relationship from Transaction to TransactionDetail and from TransactionDetail to Transaction. Transaction detail holds one record for each transaction. However, when I create a new transaction ...

NHibernate mapping identity to a cloumn without a generator

Hi, Can I map the identity of an entity to a column whose values are not auto-generated (but still unique)? If so, what should I put in the xml identity/generator tag? Thanks. ...

JPA / Hibernate Select Column Subset on Join

In SQL it is easy to do a join and only return the columns you want from the joined table. What is the best way to map this in JPA / Hibernate? For example, there is a Folder entity mapped to the EMAIL_FOLDER and an Email entity mapped to the EMAIL table. There is a one-to-many relationship from Folder to Email. The Email entity is rath...

Creating a NHibernate object and initializing a Set

Hi, I have a Table called Product and I have the Table StorageHistory. Now, Product contains a reference to StorageHistory in it's mappings <set name="StorageHistories" lazy="false"> <key column="ProductId" /> <one-to-many class="StorageHistory" /> </set> And it works, when I retrieve an object from the ORM I get an empty ISet. ...

server.mappath("."), server.mappath("~"), server.mappath(@"\"), server.mappath("/"). What is the difference?

Can anyone explain the difference between Server.MapPath("."), Server.MapPath("~"), Server.MapPath(@"\") and Server.MapPath("/")? ...

Can not add '.* " at mapping of IIS.

Hello All, I am unable to add .* at extension mapping in IIS (defaultwebsite -> properties -> home directory -> configuration) because it gives the message "Wrong file Extension". The operating system is Windows 2003 server. I can add .* at mapping in IIS when the operating system is Windows XP ...

Object to object mapper

I've used plenty of ORM tools in the past, NHibernate, .netTiers, LLBLGen and more and they always do a pretty good job of mapping data from a database to objects in code. What I'm looking for though is a framework or a pattern or something that will allow me to transform objects from one type to another. An example is I have a two we...

Using Web.SiteMap with Dynamic URLS (URL Routing)

I would like to match "approximate" matches in Web.SiteMap The Web.Sitemap static sitemap provider works well, except for one thing. IT'S STATIC! So, if I would have to have a sitemapnode for each of the 10,000 articles on my page like so : site.com/articles/1/article-title site.com/articles/2/another-article-title site.com/articles...

What is a good tool to document XSD <---> XSD schema mapping?

Is there a tool that lets you open one schema on the left, the other schema on the right, and document the element-level mapping between them. ...

How to convert Perforce depot locations to client view locations

I'd like to know how to convert Perforce depot locations to client view locations for the purpose of script writing. I have a script that first checks out a file for edit in perforce and then interacts with the file. I need to have the depot location (i.e. \Projects\Project6) converted to the client view location. (i.e. d:\Projects\P...

How does "Find Nearest Locations" work?

Nowadays most of the Restaurants and other businesses have a "Find Locations" functionality on their websites which lists nearest locations for a given address/Zip. How is this implemented? Matching the zipcode against the DB is a simple no-brainer way to do but may not always work, for example there may be a branch closer to the given l...

Handler mappings request restrictions doesn't work

If I set the Request Restrictions for the StaticFileModule to Invoke handler only if request is mapped to FILE shouldn't StaticFileModule only be invoked if the requested file exists physically ? It doesn't seem to be the case because I'm still getting 404 File not found on handler: StaticFile instead of handler: Not yet determined The...

Mapping ORACLE's NUMBER Type with Hibernate

Hello, I have a table in a ORACLE 10g database with a column "kzCode NUMBER(1)". If I try to map this with Hibernate annotations in JBOSS Server WebApp like this: @Column(nullable=false) private Integer kzCode; I got an error: org.hibernate.HibernateException: Wrong column type: kzCode, expected: integer I also tried @Column(nulla...

Math - mapping numbers

How do I map numbers, linearly, between a and b to go between c and d. That is, I want numbers between 2 and 6 to map to numbers between 10 and 20... but I need the generalized case. My brain is fried. ...

NHibernate FK is a CHAR(6), and various queries fail due to the child table PK being CHAR(6)

I have a legacy Oracle database that has multiple 1:n lookup tables that are based on CHAR(6) primary keys in the child tables. Unfortunately, I'm not the only one who has problems with how NHibernate deals with char fields (especially with those as primary keys). See: http://forum.hibernate.org/viewtopic.php?t=984281 http://forum.hibe...

Creating dynamic maps on the web

My company uses a sales model of dealers, territory managers and regional managers, each with a different level of area scope (IE manage based on zips codes, states, or regions.) I want to create a slimmed down map that is similar to this US state map that would allow our users to manipulate who manages what. What are some good resourc...