我正在创建一个数据库设置jsf页面,它在页面加载期间显示属性文件的值.然后,用户更新页面并按提交,并在属性文件中更新值.
我遵循了Balusc提供的解决方案
并在辅助bean的构造函数中设置值.
public DbSettingsBean()
{
this.setUserName(helper.getValueForProperty("user_name"));
this.setPassword(helper.getValueForProperty("password"));
}
Run Code Online (Sandbox Code Playgroud)
虽然我设法在页面加载期间显示属性文件中的用户名.我无法在页面加载期间显示inputsecret的密码值.它仍然是空白的.
在页面加载期间是否还有其他方法可以显示密码?
我使用的是JSF RI 1.2和Richfaces 3.3.2
提前致谢
我试图用外键截断一个表并得到消息:
" 无法截断表,因为它正被FOREIGN KEY约束引用 ".
我阅读了很多关于这个问题的文献,并认为我通过使用delete找到了解决方案
DELETE FROM table_name DBCC CHECKIDENT (table_name, RESEED, 0)
Run Code Online (Sandbox Code Playgroud)
但我仍然收到一条错误消息:
" DELETE语句与REFERENCE约束冲突 ".
当我尝试使用Microsoft Management Studio删除并执行以前的查询时
DELETE FROM table_name DBCC CHECKIDENT (table_name, RESEED, 0)
Run Code Online (Sandbox Code Playgroud)
它没有给出错误并且正常工作.我想从表中删除所有信息并添加新信息,但我不想删除并创建外键.
请考虑以下HTML:
<a id="add" herf="#">add</a>
<div class="list">
<select>
<option>1</option>
<option>2</option>
</select>
</div>
Run Code Online (Sandbox Code Playgroud)
和Javascript:
$('#add').click(function() {
var copy = $('.list').last().clone();
copy.appendTo('body');
});
Run Code Online (Sandbox Code Playgroud)
(或者:http://jsfiddle.net/5A5pN/)
如果在单击之前选择了一个选择选项 Add,您会注意到新添加的选择框仍然使用1作为其原始值,而不是2.
有什么方法可以解决这个问
谢谢!
创建了一个ATL COM项目,通过该项目我将菜单项插入右键菜单,如下所示:
STDMETHODIMP CSimpleShlExt::QueryContextMenu (
HMENU hmenu, UINT uMenuIndex, UINT uidFirstCmd,
UINT uidLastCmd, UINT uFlags )
{
gHMenu=hmenu;
UINT uCmdID = uidFirstCmd;
// If the flags include CMF_DEFAULTONLY then we shouldn't do anything.
if ( uFlags & CMF_DEFAULTONLY )
return MAKE_HRESULT ( SEVERITY_SUCCESS, FACILITY_NULL, 0 );
InsertMenu ( hmenu, uMenuIndex, MF_BYPOSITION, uCmdID++, _T("Connect To Server") );
uMenuIndex++;
InsertMenu ( hmenu, uMenuIndex, MF_BYPOSITION, uCmdID++,
_T("DisConnect From Server") );
return MAKE_HRESULT ( SEVERITY_SUCCESS, FACILITY_NULL, 2 );
}
Run Code Online (Sandbox Code Playgroud)
现在我想在用户点击它时立即禁用Connect子菜单,为此我使用的是EnableSubMenuItem,
STDMETHODIMP CSimpleShlExt::InvokeCommand …Run Code Online (Sandbox Code Playgroud) 如何将键,值对添加到字典?.我提到以下格式?
{'1_somemessage': [[3L,
1L,
u'AAA',
1689544L,
datetime.datetime(2010, 9, 21, 22, 30),
u'gffggf'],
[3L,
1L,
u'BBB',
1689544L,
datetime.datetime(2010, 9, 21, 20, 30),
u'ffgffgfg'],
[3L,
1L,
u'CCC',
1689544L,
datetime.datetime(2010, 9, 21, 22, 30),
u'hjhjhjhj'],
[3L,
1L,
u'DDD',
1689544L,
datetime.datetime(2010, 9, 21, 21, 45),
u'jhhjjh']],
'2_somemessage': [[4L,
1L,
u'AAA',
1689544L,
datetime.datetime(2010, 9, 21, 22, 30),
u'gffggf'],
[4L,
1L,
u'BBB',
1689544L,
datetime.datetime(2010, 9, 21, 20, 30),
u'ffgffgfg'],
[4L,
1L,
u'CCC',
1689544L,
datetime.datetime(2010, 9, 21, 22, 30),
u'hjhjhjhj'],
[4L,
1L,
u'DDD',
1689544L,
datetime.datetime(2010, 9, 21, …Run Code Online (Sandbox Code Playgroud) 我有一个用HTML(前端),java(服务器端)构建的Web应用程序,当我发布一些带换行符的数据时,我有一个textarea(按下一个单词后输入),不保留换行符(数据出现在下一个彼此之间没有换行符)如何保留换行符?注意我在显示时不使用标签(必须)
我正在使用代码服务器端将新行转换为br
public String saveLineBreaks(String text) {
return text.replaceAll("\n", "<br/>");
}
Run Code Online (Sandbox Code Playgroud)
但它无法正常工作
节点处理事件如何?一个当时,还是并发?
我需要知道,如果要同时访问共享数组,如下例所示:
var ws = require("./ws.js"),
connections = [];
ws.createServer(function( socket ){
// add to connection array
socket.on('connect', function(){
connections.push(socket);
});
// remove from connection array
socket.on('close', function(){
var i = connections.indexOf(socket);
connections.splice(i,1);
});
}).listen(8000);
Run Code Online (Sandbox Code Playgroud)
当客户端连接时,其套接字被推送到数组.当连接关闭时,我想从连接数组中删除它.
但是,在其他语言中,这可能会导致并发问题.
FX.如果两个连接同时关闭:
这会是一个问题,还是我可以假设一次只处理一个回调?
我正在使用gc模块来调试泄漏.
这是一个gui程序,我已将此功能挂钩到一个按钮.
我已将set debug更多设置为 gc.SAVE_ALL
> gc.collect()
>
> print gc.garbage
Run Code Online (Sandbox Code Playgroud)
这是输出
[(<type '_ctypes.Array'>,), {'__module__': 'ctypes._endian', '__dict__': <attribute '__dict__' of 'c_int_Array_3' objects>, '__weakref__': <attribute '__weakref__' of 'c_int_Array_3' objects>, '_length_': 3, '_type_': <class 'ctypes.c_int'>, '__doc__': None}, <class 'ctypes._endian.c_int_Array_3'>, <attribute '__dict__' of 'c_int_Array_3' objects>, <attribute '__weakref__' of 'c_int_Array_3' objects>, (<class 'ctypes._endian.c_int_Array_3'>, <type '_ctypes.Array'>, <type '_ctypes._CData'>, <type 'object'>), (<type '_ctypes.CFuncPtr'>,), {'__module__': 'ctypes', '__dict__': <attribute '__dict__' of '_FuncPtr' objects>, '__weakref__': <attribute '__weakref__' of '_FuncPtr' objects>, '_flags_': 1, '__doc__': None, '_restype_': <class 'ctypes.c_int'>}, <class 'ctypes._FuncPtr'>, …
我有一些Objective-C代码,如:
ABAddressBookRef addressBook;
CFErrorRef error = NULL;
addressBook = ABAddressBookCreate();
ABRecordRef group = ABGroupCreate();
ABRecordSetValue(group, kABGroupNameProperty,@"My Group", &error);
ABRecordRef person = ABPersonCreate();
ABRecordSetValue(person,kABPersonFirstNameProperty,@"Huy 1111111",&error);
ABRecordSetValue(person,kABPersonLastNameProperty,@"AseDra",&error);
ABGroupAddMember(group, person, &error);
ABAddressBookAddRecord(addressBook, group, &error);
ABAddressBookSave(addressBook,&error);
Run Code Online (Sandbox Code Playgroud)
它运行正常,没有错误,组添加到模拟器地址簿但人没有添加到Simunator地址簿.谁能告诉我哪里错了?
我想实现一个为MDX查询提供支持的应用程序.为此,我想使用pentaho mondrian(一个带有MDX接口的开源OLTP服务器)中的一个库,它将MDX查询转换为下划线数据库的SQL(基于xml描述),遗憾的是我无法找到任何信息.库我需要包含 - 以及如何使用它们 - 在我的项目中使MDX到SQL映射工作.
有没有人在她/他的应用程序中重复使用mondrian组件的经验?
java ×3
python ×2
c# ×1
c++ ×1
html ×1
integration ×1
ios ×1
iphone ×1
jquery ×1
jsf ×1
line-breaks ×1
mdx ×1
memory-leaks ×1
menuitem ×1
mondrian ×1
node.js ×1
objective-c ×1
spring ×1
spring-mvc ×1
sql ×1
sql-delete ×1
truncate ×1
windows ×1