我开始学习Flex/Flash并且来自PHP背景.似乎ColdFusion一直是Flash/Flex后端的首选语言.但是(对我来说很重要)我不打算建立严重依赖Flash(用于搜索引擎优化等)的网站,只是将Flash放在其中的一小部分的网站.我正在考虑这个原因,我不会将我的后端工作从PHP切换到ColdFusion.由于我是技术新手,我不确定这是不是正确的想法.有人可以帮助比较PHP和ColdFusion(我假设它是Adobe最喜欢的后端语言)吗?在我上面所说的内容中也会有所帮助.我不会在ColdFusion中执行我的后端工作,从而失去了大量的库,功能,便利性等.
我不确定如何最好地表达这个问题,但基本上我有一个联系人表,而不是典型的 - 一个联系人有一个参与表与配偶信息,一个表有孩子,我想要每个那些人是一个联系人,但后来定义了这些联系人(兄弟,姐妹,孩子,配偶等)之间的关系.因此,联系人将存在于单个表中,但我无法根据联系人ID和关系类型确定如何最好地定义关系.任何意见,将不胜感激.
我正在尝试创建一个双精度矩阵,表示实体之间的相关性.
这是我通过LINQ做的方式
double[][] correlationsRaw = (from e in entitiesInOrder
select
(from f in entitiesInOrder
select correlations.GetCorrelation(e, f)
).ToArray()).ToArray();
Run Code Online (Sandbox Code Playgroud)
这很好.
但我想要的是一个二维数组(双[,]),而不是锯齿状数组.
显然,我可以编写一些嵌套的for循环来将一个转换为另一个.
但是我可以在这里使用一些优雅的LINQ技巧吗?
我读到新的实体框架将包含一个删除多个项目的方法(Linq to SQL有DeleteAllOnSubmit()),但我找不到这样做的函数/方法.
这是在Beta 2还是我必须自己制作?
更新:
这就是我现在使用的:
public void DeleteObjects(IEnumerable<object> objects)
{
foreach (object o in objects)
{
DeleteObject(o);
}
SaveChanges();
}
Run Code Online (Sandbox Code Playgroud) 我是Ruby on Rails的新手,我显然有一个活跃的记录关联问题,但我不能自己解决它.
鉴于三个模型类及其关联:
# application_form.rb
class ApplicationForm < ActiveRecord::Base
has_many :questions, :through => :form_questions
end
# question.rb
class Question < ActiveRecord::Base
belongs_to :section
has_many :application_forms, :through => :form_questions
end
# form_question.rb
class FormQuestion < ActiveRecord::Base
belongs_to :question
belongs_to :application_form
belongs_to :question_type
has_many :answers, :through => :form_question_answers
end
Run Code Online (Sandbox Code Playgroud)
但是当我执行控制器向应用程序表单添加问题时,我收到错误:
ActiveRecord::HasManyThroughAssociationNotFoundError in Application_forms#show
Showing app/views/application_forms/show.html.erb where line #9 raised:
Could not find the association :form_questions in model ApplicationForm
Run Code Online (Sandbox Code Playgroud)
谁能指出我做错了什么?
我想将我的自定义集合存储为Key,Value也是字符串List的集合.我可以使用KeyvaluePair和hashtable来实现这一点.什么是最合适的匹配,这使我在灵活性方面更具优势?
C#或.net中是否有用于编辑pdf文档的API?
就像我需要检索特定文本并用我自己的文本替换它.
谢谢
nRk
我真的非常绝望地尝试将UIImageView添加到UITableViewCell.backgroundView.我所有的努力都导致了这种糟糕的渲染:
替代文字http://img.skitch.com/20091123-ch8wk6pdxqkrn9tpftnhusigcy.jpg
看起来细胞的标签的白色背景位于细胞背景的顶部并覆盖其部分.
我尝试将标签的背景颜色设置为clear或其他颜色,并且没有任何事件.它总是白色的.
我之所以知道它是文本标签背景导致这个白色区域的原因是,如果我不这样做[cell setText:@"Cell text here"]; 白色区域消失了,我只看到了细胞的背景图像.
这是我正在使用的代码.表视图添加到.xib文件中,UITableView添加到UIViewController:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [myCollection.items count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSUInteger rowIndex = indexPath.row;
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"darkCellBackground.png"]];
cell.selectedBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"darkCellBackground.png"]];
}
[cell setText:@"Cell text here"];
return cell;
}
- …Run Code Online (Sandbox Code Playgroud) 在Java for XML编组/解组中,可以使用JAXB,JIBX,CASTOR,ADB等.但是这些是最通用和常用的吗?或者还有其他可用的实用程序吗?
.net ×2
.net-4.0 ×1
activerecord ×1
apache-flex ×1
api ×1
associations ×1
c# ×1
castor ×1
cocoa-touch ×1
coldfusion ×1
database ×1
flash ×1
iphone ×1
java ×1
jaxb ×1
jibx ×1
linq ×1
models ×1
objective-c ×1
pdf ×1
php ×1
solr ×1
sql ×1
web-crawler ×1
xml ×1