1
投票
1答案
808 次观看

FluentNHibernate Lookup Table

This is possibly an easy one that I can't seem to get past. I've created a "Product" class which has a list of "Accessories". Each "Accessory" is just another product referenced by a lookup table. Table setup: Product ------- ProductID int Name varchar(200) AccessoryProduct ---------------- I...

0
投票
5答案
2469 次观看

@DBColumn in Lotus Notes

I've been tasked with learning Lotus Domino Designer - not sure what I did in a previous life, but it must have been pretty bad... - and was wondering how to do a lookup on a database to get some values for selections. As this information could potentially be used in a lot of the applications, I...

13
投票
3答案
13819 次观看

Small Tables in Python?

Let's say I don't have more than one or two dozen objects with different properties, such as the following: UID, Name, Value, Color, Type, Location I want to be able to call up all objects with Location = "Boston", or Type = "Primary". Classic database query type stuff. Most table solutions (...

9
投票
3答案
10636 次观看

Best way to flatten/denormalize SQL lookup tables?

I have a bunch of tables like this: Lookup_HealthCheckupRisks ------------ ID Name 1 Anemia 2 Anorexic 3 Bulemic 4 Depression ... 122 Syphilis PatientRisksOnCheckup ------------------ ID CheckupID RiskID 1 11 2 2 11 3 3 12 1 4 14 1 5 14 3 ......

2
投票
3答案
928 次观看

Can I put constraint on column without referring to another table?

I have a text column that should only have 1 of 3 possible strings. To put a constraint on it, I would have to reference another table. Can I instead put the values of the constraint directly on the column without referring to another table?

1
投票
2答案
1658 次观看

Omaha Hi Hand Evaluator

Currently I'm trying to port Keith Rule's Texas Holdem Hand Evaluator to Omaha Hi: Texas Holdem Evaluator and Analysis More Analysis Part1 More Analysis Part 2 After thinking more about the algorithm, I found a solution which gives me the right percentages for the hands and everything is fi...

1
投票
2答案
1584 次观看

How do I get my look up table values in a select box?

Reading along with the agile book, it says this in a footnote: ... You simply pass the select helper the result of doing a find(:all) on your lookup table. Okay ... <%= f.select :source, Source.find(:all) %> My source controller (and therefore table) looks like this: create_tab...

0
投票
1答案
609 次观看

Member function pointer calls copy constructor?

I'm trying to create a lookup table of member functions in my code, but it seems to be trying to call my copy constructor, which I've blocked by extending an "uncopyable" class. What I have is something like the following. enum {FUN1_IDX, FUN2_IDX, ..., NUM_FUNS }; class Foo { fun1(Bar b){ .....

0
投票
1答案
248 次观看

Mixed types in a logic tree in c#

I have an UGLY logic tree that I'm looking at ways replace with some code generated from a table. It branches based on several thing: the length of a List<AbstractType> the actual types in the list a flags enum My basic idea is to build some kind of decision tree from by input table. Fo...

2
投票
3答案
206 次观看

Enumerations in the database and O/RM

Suppose I want entries in the table Regions to have a type, e.g. a city, a country etc. What's the accepted way of storing this type, assuming I'll be using O/RM (NHibernate in my case) ? I see two options: Have an enum in the C# bussines layer with the types and store the type as a tinyint in ...

0
投票
1答案
460 次观看

Best way to implement many-to-many lookup table with user-entered data

Say I want users to pick one or more contact methods (email, phone, fax, other, etc). And if they choose other, then they can enter a single contact method of their own. What's the best way to store this in a database? I see three possibilities: Use a set datatype column, plus a single "othe...

2
投票
1答案
1369 次观看

When implementing the repository pattern should lookup value / tables get their own Repository?

I am creating RESTful services for several database entities based on a modified version of the BISDM. Some of these entities have associated lookup tables, such as depicted below: I have decided to use the repository pattern to provide a clean separation between data persistance / retrieval; ...

0
投票
5答案
1728 次观看

Storing Large Lookup Tables

I am developing an app that utilizes very large lookup tables to speed up mathematical computations. The largest of these tables is an int[] that has ~10 million entries. Not all of the lookup tables are int[]. For example, one is a Dictionary with ~200,000 entries. Currently, I generate each loo...

6
投票
3答案
1664 次观看

Circuit that counts the number of set bits in 15-bit input

How to build an area-efficient circuit that counts the number of set bits in 15-bit input using 4-input LUTs (look-up tables). The output is obviously 4-bit (counts 0-15). Some claim that it's possible to do using 9 LUTs.

2
投票
3答案
2093 次观看

查询查询表的最佳实践

我试图找到一种查询属性特征查找表的方法。 我有一个财产表,其中包含租赁财产信息(地址,租金,押金,卧室数量等),以及另一个表(Property_Feature),代表该财产的功能(游泳池,空调,洗衣房,网站等)。这些功能本身在另一个标记为Feature的表中定义。 Property pid - primary key other property details Feature fid - primary key name value Property_Feature id - primary key pid - fore...

2
投票
4答案
105 次观看

如果我有多种类型的对象,则object.type何时应为字符串,何时应为外键?

假设我有一些可能是浪漫,小说或神秘的书。我有2个现实的选择来存储此数据。一种是在我的books表中有一个类型列,该列是值为“ romance”,“ fiction”或“ mystery”的字符串。另一种是创建一个book_types表并将类型存储在其中。然后我的书会有一个引用book_types表的type_id外键。 我的问题是我该如何选择最好的?我已经看到了Restful认证Rails插件中使用的字符串方法,该方法包含有关用户状态的信息-'inactive','active','pending'... 考虑到我将一直在查询此信息,因此使用查找表方法是否会对性能产生影响? 谢谢!

6
投票
2答案
2670 次观看

Latex中的查询表

我有一堆自动生成的LaTeX代码,其超级目标的形式为“ functionname_2093840289fad1337”,即附加了哈希的函数名称。我想仅通过引用我知道是唯一的函数名称来引用文档其余部分中的那些函数。我想要一个类似这样的查找功能: \hyperdyperlink{functionname} 发出 \hyperlink{functionname_2093840289fad1337}{functionname} 请注意,我无法计算哈希,但是我准备编写一个将每个函数名映射到函数名+哈希的表。编写这种功能的最佳方法是什么?

7
投票
8答案
1402 次观看

如何确定Pi(π)的精度

优化我们正在开发的游戏,我们进入了每个CPU周期获胜的阶段。我们使用弧度来计算围绕其他对象旋转的对象的位置,我想在查找表中削减不必要的精度。为此,我们大量使用了预定义的Pi。 此Pi应该有多精确? 所以,我的问题是: 准确度有多高? 甚至更好,如何确定所需的准确性?

3
投票
4答案
9720 次观看

在C#中表示此查找表的最佳方法

我需要用C#表示一个查询表,这是基本结构: Name Range Multiplier Active 10-20 0.5 你们有什么建议? 我将需要查找范围并获取乘数。 我还需要使用该名称进行查找。 更新 总共可能有10-15行。 范围是整数日期类型。

1
投票
2答案
497 次观看

我应该如何实现一个下拉框,其中包含需要用不同语言显示的项目列表?

我正在尝试设计一种表单,其中包含一个包含杂货店商品选择列表的下拉框。 在尝试决定使用Java枚举还是查找表时应该考虑哪些标准?另外,我将需要为下拉列表字符串的i18n支持预先计划。

16
投票
4答案
20074 次观看

国家,州,省WebService?

是否有任何好的Web服务可以为国家和州/省提供良好的查找信息? 如果是的话,您使用什么?