if (!string.IsNullOrEmpty(stringTest))
newString = stringTest; // newString is a string
else
newString = string.Empty;
Run Code Online (Sandbox Code Playgroud)
有另一种(简单)方法来实现这一目标吗?
我有一个数组(double):ox_test具有已知数量的元素。
当我编码时:
Array.Sort(ox_test);
Run Code Online (Sandbox Code Playgroud)
然后,仅查看数组是否已排序:
for (int y = 1; y <= ox_test.Length; y++)
MessageBox.Show(".x: " + ox_test[y]);
Run Code Online (Sandbox Code Playgroud)
..我得到... 0、0、0、0、0(如果元素数为5)。请帮忙,谢谢!
所以我修改了两个for循环:
for (int y = 0; y < ox_test.Length; y++)
MessageBox.Show(".x: " + ox_test[y]);
// HERE i get the values not sorted but != 0
Array.Sort(ox_test);
for (int y = 0; y < ox_test.Length; y++)
MessageBox.Show(".x s: " + ox_test[y]);
// HERE i get only 0 values
Run Code Online (Sandbox Code Playgroud) 我想确定两个日期/时间字段之间的天数:开始和停止,但不包括周末天数.
因此,如果Start =让我们说星期五的某个日期而停止=下一个星期一=>差异是两个
我将不胜感激任何帮助
PS:我发现了这个:http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256AFA0078F418
有用!我知道问管理员是否应该打开这个问题或者只是删除它.非常感谢!
在我的lotusscripy中我创建了一个外部文件,我在其中"打印"了一些行,我关闭它然后我用Shell函数运行它:
Open "D:\testF.dsx" For Output As fileNum%
Print #fileNum%, "line1"
Print #fileNum%, "line2"
Print #fileNum%, "line3"
Close fileNum%
result = Shell(|path "D:\testF.dsx"|, 1)
Run Code Online (Sandbox Code Playgroud)
shell函数运行正常,它正在运行的文件.
在此之后我就放了
Kill fileNum% 'which should delete the file
Run Code Online (Sandbox Code Playgroud)
另外,我试图添加
Sleep 2 'before the Kill statement but I get the same error: Path/file access error.
Run Code Online (Sandbox Code Playgroud)
谢谢你的时间!
我的按钮代码:
<xp:button value="Raport" id="button1" styleClass="lotusFormButton"
style="float:right;">
<xp:eventHandler event="onclick"
submit="true" refreshMode="complete" immediate="false"
save="true" id="eventHandler2">
<xp:this.action><![CDATA[#{javascript:context.redirectToPage("export_hidden.xsp");
getcomponent('exampleDialog').hide()}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
Run Code Online (Sandbox Code Playgroud)
它只是去export_hidden.xsp(XAgent创建一个excel文件),但没有关闭对话框.
我尝试反转2个动作,但结果相同.
我很感激你的时间.
我有一个计算列图像(图标):
<xp:this.iconSrc><![CDATA[#{javascript:var formName = rowData.getDocument().getItemValueString("Form");
var iconNumber = parseInt(rowData.getColumnValue("$8"));
if ( formName == "fmCompanie") {
"/.ibmxspres/domino/icons/vwicn" + (iconNumber > 99 ? "" : "0") + iconNumber + ".gif"}
else if ( formName == "fmPersContact" )
{ "" }}]]></xp:this.iconSrc>
Run Code Online (Sandbox Code Playgroud)
问题是,当我想打开从我的viewPanel列出的文档时,我收到以下错误:调用方法时出现异常NotesXspViewEntry.getDocument()null
在以下代码行:
var formName = rowData.getDocument().getItemValueString("Form");
Run Code Online (Sandbox Code Playgroud) <i class="fa-trash-o fa" /> ( from http://fortawesome.github.io/Font-Awesome/icons/ )
Run Code Online (Sandbox Code Playgroud)
我希望上面的类是列图标的结果:
<xp:this.iconSrc><![CDATA[#{javascript:var class = "fa-trash-o fa";
if (rowData.isDocument() && rowData.getDocument()!= null) {
var formName = rowData.getDocument().getItemValueString("Form");
if ( formName == "Aform") {
// How can I reffer to the class? => The icon from the class will be shown. }
]]></xp:this.iconSrc>
Run Code Online (Sandbox Code Playgroud) 我几天前问过这个问题xpages在视图列中返回类图标,我理解了内容类型必须设置为"HTML"的事实.
是否可以将一些fa-icon(<span class="fa-save fa" />)与对话标题"连接" ?
<xe:dialog id="exampleDialog" refreshOnShow="true">
<span class="fa-save fa" />
<xe:this.title><![CDATA[#{javascript:"Some string returned."}]]>
// I couldn't add the <span> tag here...
</xe:this.title>
<xe:dialogContent id="dialogContent1">
....
Run Code Online (Sandbox Code Playgroud)
但图标的添加低于标题栏.
Id | Value
1 50
2 60
3 80
3 50
2 20
1 60
1 100
Run Code Online (Sandbox Code Playgroud)
我想使用 linq 查询计算每个 id 的总数。我知道我必须group by在 sql 中使用相同的语句:
select id, sum(Value)
from MyTable
group by id
Run Code Online (Sandbox Code Playgroud)
但是如何使用 linq 或 lambda 来实现这一点?
我有一个可编辑的对话框列表用于choices Use formula for choices.它DbLookup在视图上使用a .
有没有机会,如果@DbLookup有3个值后第一个值已经设置为对话框列表的默认值?
感谢您的时间和帮助!
我使用IBM的教程为ftsearch创建了一个xpage元素
我的请求:是否有可能有2个日期字段(作为搜索的输入要求)来查找那些创建日期在包含这2个日期的区间内的文档?
我应该创建一个计算字段dtCreated,我将存储创建日期,然后在search视图的属性中我应该添加如下内容:
var tmpArray = new Array("");
var cTerms = 0;
if (sessionScope.searchDate1) && (sessionScope.searchDate2) {
tmpArray[cTerms++] = "(Field dtCreated > \"" + sessionScope.searhcDate1 + "\")" && "(Field dtCreated < \"" + sessionScope.searhcDate2 + "\")";
}
....
....
Run Code Online (Sandbox Code Playgroud)
还是有另一种选择?
我的2个会话变量有Short (5/5/14) Date format.此外,这两个日期(会话变量)的默认值是,""但我当然在单击Submit按钮之前添加一些值.
谢谢你的时间!
有viewPanel一个专栏showCheckbox="true".
是否可以限制用户只选择viewPanel列出的一行/文档(而不是多行/文档.)?
我确实想在第一个\r\n\符号之前获取所有文本。
例如,
lalal lalal laldlasdaa daslda\r\n\Prefersaasda reanreainrea
我需要:lalal lalal laldlasdaa daslda。上面的字符串可以为空,但也可以不包含任何'\r\n\'符号。”我怎样才能做到这一点?
xpages ×6
c# ×4
lotus-notes ×3
xpages-ssjs ×3
asp.net ×2
arrays ×1
delete-file ×1
difference ×1
file ×1
javascript ×1
linq ×1
sorting ×1
split ×1
string ×1