使用kineticjs的自定义编辑器(Custom Editor using kineticjs)
我正在尝试使用kineticjs构建一个编辑器。 有一些选项可以添加文本和添加样式到添加的文本,如粗体下划线。 是否有任何选项以文本样式设置项目符号?
像这个
- 项目清单
- 项目清单
I am trying to built an editor using kineticjs. There are some options like add text and adding styles to the added text like bold underline. is there any option to set bullets in text style?
like this one
- List item
- List item
原文:https://stackoverflow.com/questions/22065772
最满意答案
首先安装一个正则表达式函数。 本文提供了可以剪切/粘贴的代码。
然后用RegexReplace(从那篇文章),你可以从字符串中提取数字:
dbo.RegexReplace( '.*?(\d+).*', myField, '$1' )
然后将此字符串转换为数字:
CAST( dbo.RegexReplace( '.*?(\d+).*', myField, '$1' ) AS INT )
然后在
SELECT
的MAX()
函数内使用该表达式。First install a regular expression function. This article has code you can cut/paste.
Then with RegexReplace (from that article) you can extract digits from a string:
dbo.RegexReplace( '.*?(\d+).*', myField, '$1' )
Then convert this string to a number:
CAST( dbo.RegexReplace( '.*?(\d+).*', myField, '$1' ) AS INT )
Then use this expression inside a
MAX()
function in aSELECT
.
相关问答
更多-
如何仅从PostgreSQL中的varchar列中选择整数值(How to select integer values only from a varchar column in PostgreSQL)[2024-01-26]
SELECT column FROM table WHERE column ~ '^\d+$' SELECT column FROM table WHERE column ~ '^\d+$' -
首先安装一个正则表达式函数。 本文提供了可以剪切/粘贴的代码。 然后用RegexReplace(从那篇文章),你可以从字符串中提取数字: dbo.RegexReplace( '.*?(\d+).*', myField, '$1' ) 然后将此字符串转换为数字: CAST( dbo.RegexReplace( '.*?(\d+).*', myField, '$1' ) AS INT ) 然后在SELECT的MAX()函数内使用该表达式。 First install a regular expression ...
-
分组由SQL Server中的varbinary(MAX)或varchar(MAX)组成(Group By varbinary (MAX) or varchar (MAX) in SQL Server)[2024-03-15]
使用固定宽度数据类型时,您更有可能遇到此问题,因为它们始终存储在行中。 可变长度类型可以存储在行外,并带有指向实际值的指针。 CREATE TABLE #T ( C CHAR(4027) DEFAULT REPLICATE('A', 4027) ); INSERT INTO #T DEFAULT VALUES; SELECT COUNT(*) FROM #T T1 CROSS JOIN #T T2 GROUP BY T1.C, T2.C 查询处 ... -
NUMERIC和VARCHAR(NUMERIC and VARCHAR)[2023-02-04]
当你使用> '95'时,它会按字母顺序比较“数字”,这就是结果就是这样的原因。 当您使用> 95时,它会将列转换为数字,这就是不同结果的原因。 为了确定实际发生了什么,你应该自己进行投射。 当然,您不应将数字存储为varchars。 正确的顺序是 按convert(int,num)排序 但如果表中有非数字字段,它将失败。 When you use > '95' it compares the "numbers" in alphabetical order, that's why the result is ... -
有类似的问题: php删除/识别此符号 替换角色 FFFD 替换字符 用于替换Unicode中未知或不可表示的值的传入字符 更新: 这个输出是什么: echo mb_detect_encoding($desc).' '; var_dump($desc); 如果mb_detect_encoding不起作用 if(is_utf8($desc)) { echo "UTF-8 Encoded"; } else { echo "Oops, not UTF-8"; } var_dump($desc) ...
-
这将做:UPDATE MY_TABLE SET MyGeometry =几何:: STGeomFromText(“POLYGON((174.893529167059 -37.0260462162965,174.89351593407 -37.0260221329151,174.893508034056 -37.0260077002766,174.893444415879 -37.0258916500588,174.893416916056 -37.0258414997842,174.893481733297 ...
-
你确定你加载了2005年的SQL本机驱动,而不是2000年的旧驱动? 本机驱动程序名称为2k8的{SQL Server Native Client 10.0}或2k5的{SQL Native Client} 错误消息ODBC SQL Server Driver似乎表示旧的2k驱动程序(我可能错了,现在已经10年没有碰到ODBC了)。 You sure you load the SQL Native Driver for 2005, not the old driver for 2000? The nativ ...
-
您可以使用规范函数DbFunctions.Right模拟LINQ to Entities中的固定PadLeft 而不是这个 a.price.PadLeft(10, '0') 用这个 DbFunctions.Right("000000000" + a.price, 10) 我没有使用MySql提供程序对其进行测试,但DbFunctions中定义的规范函数应该由任何提供程序支持。 You can simulate fixed PadLeft in LINQ to Entities with the cano ...
-
这可以使用SQL使用MySQL的隐式类型转换来完成: select max(case when (field1+0)>(field2+0) then field1+0 else field2+0 end) from default_table1 使用+0会将varchar转换为数字,并且还会忽略该数字后面的任何字符。 如果您仍需要原始内容,可以像这样编写查询: select case when (field1+0)>(field2+0) then field1 else field2 end from d ...
-
假设您的EmployeeID格式为YYYY-MMdd-XXXX 。 尝试这个, SELECT MAX(EmployeeID) FROM tableName WHERE EmployeeID LIKE CONCAT(SUBSTRING(EmployeeID, 1, 4),'%') SQLFiddle演示 Assuming that your EmployeeID's format is YYYY-MMdd-XXXX. Try this, SELECT MAX(EmployeeID) FROM tableNa ...