你好,我有一个简单的问题但我无法处理它.
我需要实现一个"按类别筛选"功能,该功能会删除所有标记并再次添加它们,但这只是基于列表中的选择.
所以我需要将数组与位置模型中的filter-id进行比较,并将数组与TableView中的所有Filter-ID进行比较.我使用了以下功能:
for (Location *currLocation in arrListOfLocationsNearby) {
Run Code Online (Sandbox Code Playgroud)
for(NSrtring*currKatId in currLocation.arrKatIds){
NSInteger intCurrKatId = [currKatId integerValue];
NSLog(@"Current KatId %@ id: %d \n", currLocation.strAdr, intCurrKatId);
for (Filter *currFilter in [SDM getSharedDataManager].arrListOfFilterOptions) {
if (currFilter.isSelected) {
NSInteger intCurrFilterId = [currFilter.strAtt_id intValue];
NSLog(@"Current Filter %@ id: %d \n", currFilter.strAtt_text, intCurrFilterId);
if ([currKatId intValue] == [currFilter.strAtt_id intValue]) {
currLocation.isVisible = YES;
}else {
currLocation.isVisible = NO;
}
}
}
Run Code Online (Sandbox Code Playgroud)
}}
我知道这将是循环通过一切的最无效的方式.我想以某种方式使用NSPredicate,但我以前从未使用它们,我找不到我的问题的例子.
你们有什么提示吗?
关于m.
可能重复:
为什么在IDE中使用等宽字体?
几乎所有编码器(和代码编辑器)都使用固定宽度字体.为什么是这样?
我想知道如何在Aptana Studio 3.0中找到在Aptana 2.x中有快捷键Ctrl + Shift + F的HTML代码格式?
我在同一个表单上同时使用了几个TVirtualStringTree.
如果树具有选定节点,但焦点当前位于另一个树上,则选择将以浅灰色突出显示.
是否有一种简单的方法可以选择使用通常的选择颜色(我的计算机上的蓝色)突出显示未聚焦的TVirtualStringTree?
谢谢
我似乎无法通过搜索谷歌来解决这个问题.
我有一个现有的数据库,其中包含一些类型的列,double我将在rails迁移中写入什么以创建等效的列类型?这是一个相对较旧的数据库,可能有一个更合适的数据类型可以完全使用,但我想看看其他人的想法.
我打算用这种类型:decimal,这是最好的选择吗?
思考?
我正在尝试将部分插入到jquery对话框中.对话框正在运行,但没有部分..
这是我的代码:
的application.js
$(document).ready(function(){
$("#add_note").click(function(){
$("#notes").html("<%= escape_javascript(render(:partial => @note)) %>").dialog({title: 'Basic Dialog'})
})
})
Run Code Online (Sandbox Code Playgroud)
我的看法
<div class="title">
<span>Historique :</span>
<span id="add_note">Ajouter une note</span>
</div>
<div id="notes">
</div>
Run Code Online (Sandbox Code Playgroud)
我 在myview/_note.html.erb中的部分内容
<div class="note">
<%= form_for(@add_note) do |f| %>
<dl>
<dt>Type de note</dt>
<dd><%= f.collection_select :note_type_id, NoteType.find(:all), :id, :label, :allow_blank => "Type" %></dd>
</dl>
<dl>
<dt>Titre :</dt>
<dd><%= f.text_field :title %></dd>
</dl>
<dl>
<dt>Description :</dt>
<dd><%= f.text_field :description %></dd>
</dl>
<%= f.hidden_field :project_id, :value => @project_id %>
<%= f.hidden_field :organization_id, :value …Run Code Online (Sandbox Code Playgroud) 我在代码库上工作,主要是带有一点点C++的C语言,并且主要使用gcc构建,但偶尔需要使用MSVC构建.微软的C编译器仍然是非常C89有一些小的扩展,它仍然不支持混合代码和变量定义点菜 C++/C99.所以我需要找到一种方法来阻止开发人员在使用gcc时编写无序代码/变量定义,否则构建随后会破坏MSVC.如果我使用gcc -std=c89那么一切都会中断,因为不允许使用C++风格的注释(可能还有其他问题,但我还没有进一步研究过).如果我使用gcc -std=gnu89那么允许无序代码/变量定义,这对我也没有帮助.有任何想法吗 ?我想我只需要类似的东西gcc -std=c99 -fno-inline-variable-definitions,如果存在这样的选择.
是否可以将一个OracleParameter正确传递给pl/sql存储过程中的boolean参数?
我创建了一个三个文件SettingsViewController.h,SettingsViewController.m和SettingsViewController.xib.
我在单击一行中的单元格时显示SwttingsViewController.xib.xib文件上有一个标签和滑块.它工作正常.但在使用界面构建器创建连接后.即从redLabel插槽拖放到我在xib文件上的Label我收到此错误并且应用程序终止.
'[<UIViewController 0x3d636d0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key redLabel."
是否可以用Java捕获计算机的声音输出?
可以捕获麦克风,但这不是我需要的,我需要捕获计算机正在播放的部分声音,但我无法弄清楚。
谢谢
iphone ×2
objective-c ×2
aptana ×1
audio ×1
c ×1
c# ×1
c89 ×1
c99 ×1
delphi ×1
fonts ×1
formatting ×1
gcc ×1
html ×1
ide ×1
java ×1
jquery ×1
mysql ×1
nspredicate ×1
odp.net ×1
oracle ×1
oracle11g ×1
plsql ×1
text-editor ×1
visual-c++ ×1