lazarus,synedit输入小键盘特殊符号的补丁
unit synedittextdoublewidthchars2;
// fix up chinese symbel width
//by steven {$mode objfpc}{$H+} interface uses
Classes, SysUtils; type TInterval=record
first:longword;
last:longword;
end; function mk_wcswidth(wcs:unicodestring ):integer;
function mk_wcwidth(ucs:longword):integer; implementation const combining:array[0..122] of Tinterval=
((first: $0300;last:$0357 ),
(first: $035D;last:$036F ),
(first: $0483;last:$0486 ),
(first: $0488;last:$0489 ),
(first: $0591;last:$05A1 ),
(first: $05A3;last:$05B9 ),
(first: $05BB;last:$05BD ),
(first: $05BF;last:$05BF ),
(first: $05C1;last:$05C2 ),
(first: $05C4;last:$05C4 ),
(first: $0600;last:$0603 ),
(first: $0610;last:$0615 ),
(first: $064B;last:$0658 ),
(first: $0670;last:$0670 ),
(first: $06D6;last:$06E4 ),
(first: $06E7;last:$06E8 ),
(first: $06EA;last:$06ED ),
(first: $070F;last:$070F ),
(first: $0711;last:$0711 ),
(first: $0730;last:$074A ),
(first: $07A6;last:$07B0 ),
(first: $0901;last:$0902 ),
(first: $093C;last:$093C ),
(first: $0941;last:$0948 ),
(first: $094D;last:$094D ),
(first: $0951;last:$0954 ),
(first: $0962;last:$0963 ),
(first: $0981;last:$0981 ),
(first: $09BC;last:$09BC ),
(first: $09C1;last:$09C4 ),
(first: $09CD;last:$09CD ),
(first: $09E2;last:$09E3 ),
(first: $0A01;last:$0A02 ),
(first: $0A3C;last:$0A3C ),
(first: $0A41;last:$0A42 ),
(first: $0A47;last:$0A48 ),
(first: $0A4B;last:$0A4D ),
(first: $0A70;last:$0A71 ),
(first: $0A81;last:$0A82 ),
(first: $0ABC;last:$0ABC ),
(first: $0AC1;last:$0AC5 ),
(first: $0AC7;last:$0AC8 ),
(first: $0ACD;last:$0ACD ),
(first: $0AE2;last:$0AE3 ),
(first: $0B01;last:$0B01 ),
(first: $0B3C;last:$0B3C ),
(first: $0B3F;last:$0B3F ),
(first: $0B41;last:$0B43 ),
(first: $0B4D;last:$0B4D ),
(first: $0B56;last:$0B56 ),
(first: $0B82;last:$0B82 ),
(first: $0BC0;last:$0BC0 ),
(first: $0BCD;last:$0BCD ),
(first: $0C3E;last:$0C40 ),
(first: $0C46;last:$0C48 ),
(first: $0C4A;last:$0C4D ),
(first: $0C55;last:$0C56 ),
(first: $0CBC;last:$0CBC ),
(first: $0CBF;last:$0CBF ),
(first: $0CC6;last:$0CC6 ),
(first: $0CCC;last:$0CCD ),
(first: $0D41;last:$0D43 ),
(first: $0D4D;last:$0D4D ),
(first: $0DCA;last:$0DCA ),
(first: $0DD2;last:$0DD4 ),
(first: $0DD6;last:$0DD6 ),
(first: $0E31;last:$0E31 ),
(first: $0E34;last:$0E3A ),
(first: $0E47;last:$0E4E ),
(first: $0EB1;last:$0EB1 ),
(first: $0EB4;last:$0EB9 ),
(first: $0EBB;last:$0EBC ),
(first: $0EC8;last:$0ECD ),
(first: $0F18;last:$0F19 ),
(first: $0F35;last:$0F35 ),
(first: $0F37;last:$0F37 ),
(first: $0F39;last:$0F39 ),
(first: $0F71;last:$0F7E ),
(first: $0F80;last:$0F84 ),
(first: $0F86;last:$0F87 ),
(first: $0F90;last:$0F97 ),
(first: $0F99;last:$0FBC ),
(first: $0FC6;last:$0FC6 ),
(first: $102D;last:$1030 ),
(first: $1032;last:$1032 ),
(first: $1036;last:$1037 ),
(first: $1039;last:$1039 ),
(first: $1058;last:$1059 ),
(first: $1160;last:$11FF ),
(first: $1712;last:$1714 ),
(first: $1732;last:$1734 ),
(first: $1752;last:$1753 ),
(first: $1772;last:$1773 ),
(first: $17B4;last:$17B5 ),
(first: $17B7;last:$17BD ),
(first: $17C6;last:$17C6 ),
(first: $17C9;last:$17D3 ),
(first: $17DD;last:$17DD ),
(first: $180B;last:$180D ),
(first: $18A9;last:$18A9 ),
(first: $1920;last:$1922 ),
(first: $1927;last:$1928 ),
(first: $1932;last:$1932 ),
(first: $1939;last:$193B ),
(first: $200B;last:$200F ),
(first: $202A;last:$202E ),
(first: $2060;last:$2063 ),
(first: $206A;last:$206F ),
(first: $20D0;last:$20EA ),
(first: $302A;last:$302F ),
(first: $3099;last:$309A ),
(first: $FB1E;last:$FB1E ),
(first: $FE00;last:$FE0F ),
(first: $FE20;last:$FE23 ),
(first: $FEFF;last:$FEFF ),
(first: $FFF9;last:$FFFB ),
(first: $1D167;last:$1D169 ),
(first: $1D173;last:$1D182 ),
(first: $1D185;last:$1D18B ),
(first: $1D1AA;last:$1D1AD ),
(first: $E0001;last:$E0001 ),
(first: $E0020;last:$E007F ),
(first: $E0100;last:$E01EF )); function bisearch(ucs:word; table: array of TInterval ;max:integer):boolean;
var min,mid:word;
begin
min := 0;
if(ucs < table[0].first) and (ucs > table[max].last) then
begin
result :=false;
exit;
end; while max >= min do
begin
mid := (min + max ) div 2;
if (ucs > table[mid].last ) then
min := mid + 1
else if (ucs < table[mid].first) then
max := mid -1
else
begin
result := true;
exit;
end;
end; result := false;
end; function mk_wcwidth(ucs:longword):integer;
//var ucs:longword;
begin
//ucs := ord(aucs);
if ucs=0 then
begin
result := 0;
exit;
end; if ucs in [32,$7f..$a0] then
begin
result := -1;
exit;
end; if (ucs = $2220)or
(ucs = $2312)or
(ucs = $2299)or
(ucs = $224c)or
(ucs = $223d)or
(ucs = $221a)or
(ucs = $e022)or
(ucs = $203b)or
(ucs = $2116)or
(ucs = $ffE0)or
(ucs = $2103)or
(ucs = $2235)or
(ucs = $2234)or
(ucs = $22A5)or
(ucs = $2225)or
(ucs = $222E)or
(ucs = $221D)or
(ucs = $221E)or
(ucs = $2227)or
(ucs = $2228)or
(ucs = $2211)or
(ucs = $220F)or
(ucs = $222A)or
(ucs = $2229)or
(ucs = $2208)or
(ucs = $226E)or
(ucs = $226F)or
(ucs = $216A)or
(ucs = $216B)or
(ucs = $2160)or
(ucs = $2161)or
(ucs = $2162)or
(ucs = $2163)or
(ucs = $2164)or
(ucs = $2165)or
(ucs = $2166)or
(ucs = $2167)or
(ucs = $2168)or
(ucs = $2169)or
(ucs = $2236)or ////------
(ucs = $2016)
then
begin
result := 2;
exit;
end; if bisearch(ucs,combining,length(combining) - 1) then
begin
result := 0;
exit;
end; result := 1 ; // Hangul Jamo init. consonants */
// CJK ... Yi */
// Hangul Syllables */
// CJK Compatibility Ideographs */
// CJK Compatibility Forms */
// Fullwidth Forms */
//BUG, duplicate
if(ucs <> $303f)
and(
(ucs = $232a) or
(ucs = $2e80) or
//****************patched by steven
//unicode , high byte , low byte //----------------------end patch
(ucs > $1100) and (ucs <$115f) or
(ucs > $2329) and (ucs <$a4cf)or
(ucs > $ac00) and (ucs <$d7a3)or
(ucs > $f900) and (ucs <$faff)or
(ucs > $fe30) and (ucs <$fe6f)or
(ucs > $ff00) and (ucs <$ff60)or
(ucs >$ffe0) and (ucs <$ffe6) or
(ucs > $20000) and (ucs <$2fffd)or
(ucs > $30000) and (ucs <$3fffd))then
inc(result);
end; function mk_wcswidth(wcs:unicodestring ):integer;
var w,l,width:integer;
i:integer;
begin
i:=1;
width := 0;
l :=length(wcs);
while (i<=l) do
begin
w := mk_wcwidth(ord(wcs[i]));
if w < 0 then
begin
result := -1;
exit;
end;
width := width + w;
inc(i);
end;
result := width; end; end.
{------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Alternatively, the contents of this file may be used under the terms of the GNU General Public License Version 2 or later (the "GPL"), in which case the provisions of the GPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the GPL and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. -------------------------------------------------------------------------------} (* visit the following URL for more information http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt http://unicode.org/reports/tr11/ *) unit SynEditTextDoubleWidthChars; {$I synedit.inc} interface uses Classes, SysUtils, LazSynEditText ,synedittextdoublewidthchars2; type { SynEditTextDoubleWidthChars } SynEditStringDoubleWidthChars = class(TSynEditStringsLinked) protected procedure DoGetPhysicalCharWidths(Line: PChar; LineLen, Index: Integer; PWidths: PPhysicalCharWidth); override; end; implementation { SynEditTextDoubleWidthChars } procedure SynEditStringDoubleWidthChars.DoGetPhysicalCharWidths(Line: PChar; LineLen, Index: Integer; PWidths: PPhysicalCharWidth); var i: Integer; str:ansistring; begin inherited DoGetPhysicalCharWidths(Line, LineLen, Index, PWidths); if not IsUtf8 then exit; dec(Line); dec(PWidths); for i := 0 to LineLen - 1 do begin inc(Line); inc(PWidths); if Line^ < #$e1 then continue; if PWidths^ = 0 then continue; //读3个字节,转换成unicode //获得绘制宽度 str := ''; str := str + line^ + line[1] + line[2]; //DebugLn(str); // ..writeln(utf8decode(str)); pWidths^ := mk_wcwidth(longword(ord(utf8decode(str)[1]))) ; {* case Line^ of #$e1: case Line[1] of #$84: if (Line[2] >= #$80) then PWidths^ := 2; #$85: if (Line[2] <= #$9f) then PWidths^ := 2; end; #$e2: case Line[1] of #$8c: if (Line[2] = #$a9) or (Line[2] = #$aa) then PWidths^ := 2; #$ba: if (Line[2] >= #$80) then PWidths^ := 2; #$bb..#$ff: PWidths^ := 2; end; #$e3: case Line[1] of #$81: if (Line[2] >= #$81) then PWidths^ := 2; #$82..#$8e: PWidths^ := 2; #$8f: if (Line[2] <= #$bf) then PWidths^ := 2; #$90: if (Line[2] >= #$80) then PWidths^ := 2; #$91..#$FF: PWidths^ := 2; end; #$e4: case Line[1] of #$00..#$b5: PWidths^ := 2; #$b6: if (Line[2] <= #$b5) then PWidths^ := 2; #$b8: if (Line[2] >= #$80) then PWidths^ := 2; #$b9..#$ff: PWidths^ := 2; end; #$e5..#$e8: PWidths^ := 2; #$e9: if (Line[1] <= #$bf) or (Line[2] <= #$83) then PWidths^ := 2; #$ea: case Line[1] of #$80, #$b0: if (Line[2] >= #$80) then PWidths^ := 2; #$81..#$92, #$b1..#$ff: PWidths^ := 2; #$93: if (Line[2] <= #$86) then PWidths^ := 2; end; #$eb..#$ec: PWidths^ := 2; #$ed: if (Line[1] <= #$9e) or (Line[2] <= #$a3) then PWidths^ := 2; #$ef: case Line[1] of #$a4: if (Line[2] >= #$80) then PWidths^ := 2; #$a5..#$aa: PWidths^ := 2; #$ab: if (Line[2] <= #$99) then PWidths^ := 2; #$b8: if (Line[2] in [#$90..#$99,#$b0..#$ff]) then PWidths^ := 2; #$b9: if (Line[2] <= #$ab) then PWidths^ := 2; #$bc: if (Line[2] >= #$81) then PWidths^ := 2; #$bd: if (Line[2] <= #$a0) then PWidths^ := 2; #$bf: if (Line[2] >= #$a0) and (Line[2] <= #$a6) then PWidths^ := 2; end; #$f0: case Line[1] of #$a0, #$b0: case Line[2] of #$80: if (Line[3] >= #$80) then PWidths^ := 2; #$81..#$ff: PWidths^ := 2; end; #$a1..#$ae, #$b1..#$be: PWidths^ := 2; #$af, #$bf: case Line[2] of #$00..#$be: PWidths^ := 2; #$bf: if (Line[3] <= #$bd) then PWidths^ := 2; end; end end; *} end end; (* Ranges that are FullWidth char 1100 e1 84 80 .. 115F e1 85 9f 2329 e2 8c a9 .. 232A e2 8c aa 2E80 e2 ba 80 .. 303E e3 80 be 3041 e3 81 81 .. 33FF e3 8f bf 3400 e3 90 80 .. 4DB5 e4 b6 b5 4E00 e4 b8 80 .. 9FC3 e9 bf 83 A000 ea 80 80 .. A4C6 ea 93 86 AC00 ea b0 80 .. D7A3 ed 9e a3 F900 ef a4 80 .. FAD9 ef ab 99 FE10 ef b8 90 .. FE19 ef b8 99 FE30 ef b8 b0 .. FE6B ef b9 ab FF01 ef bc 81 .. FF60 ef bd a0 FFE0 ef bf a0 .. FFE6 ef bf a6 20000 f0 a0 80 80 .. 2FFFD f0 af bf bd 30000 f0 b0 80 80 .. 3FFFD f0 bf bf bd *) end.
{-------------------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.
Alternatively, the contents of this file may be used under the terms of the
GNU General Public License Version 2 or later (the "GPL"), in which case
the provisions of the GPL are applicable instead of those above.
If you wish to allow use of your version of this file only under the terms
of the GPL and not to allow others to use your version of this file
under the MPL, indicate your decision by deleting the provisions above and
replace them with the notice and other provisions required by the GPL.
If you do not delete the provisions above, a recipient may use your version
of this file under either the MPL or the GPL.
-------------------------------------------------------------------------------}
(*
visit the following URL for more information
http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt
http://unicode.org/reports/tr11/
*)
unit SynEditTextDoubleWidthChars;
{$I synedit.inc}
interface
uses
Classes, SysUtils, LazSynEditText ,synedittextdoublewidthchars2;
type
{ SynEditTextDoubleWidthChars }
SynEditStringDoubleWidthChars = class(TSynEditStringsLinked)
protected
procedure DoGetPhysicalCharWidths(Line: PChar; LineLen, Index: Integer; PWidths: PPhysicalCharWidth); override;
end;
implementation
{ SynEditTextDoubleWidthChars }
procedure SynEditStringDoubleWidthChars.DoGetPhysicalCharWidths(Line: PChar;
LineLen, Index: Integer; PWidths: PPhysicalCharWidth);
var
i: Integer; str:ansistring;
begin
inherited DoGetPhysicalCharWidths(Line, LineLen, Index, PWidths);
if not IsUtf8 then
exit;
dec(Line);
dec(PWidths);
for i := 0 to LineLen - 1 do begin
inc(Line);
inc(PWidths);
if Line^ < #$e1 then continue;
if PWidths^ = 0 then continue;
//读3个字节,转换成unicode
//获得绘制宽度
str := '';
str := str + line^ + line[1] + line[2];
//DebugLn(str);
// ..writeln(utf8decode(str));
pWidths^ := mk_wcwidth(longword(ord(utf8decode(str)[1]))) ;
{*
case Line^ of
#$e1:
case Line[1] of
#$84:
if (Line[2] >= #$80) then PWidths^ := 2;
#$85:
if (Line[2] <= #$9f) then PWidths^ := 2;
end;
#$e2:
case Line[1] of
#$8c:
if (Line[2] = #$a9) or (Line[2] = #$aa) then PWidths^ := 2;
#$ba:
if (Line[2] >= #$80) then PWidths^ := 2;
#$bb..#$ff:
PWidths^ := 2;
end;
#$e3:
case Line[1] of
#$81:
if (Line[2] >= #$81) then PWidths^ := 2;
#$82..#$8e:
PWidths^ := 2;
#$8f:
if (Line[2] <= #$bf) then PWidths^ := 2;
#$90:
if (Line[2] >= #$80) then PWidths^ := 2;
#$91..#$FF:
PWidths^ := 2;
end;
#$e4:
case Line[1] of
#$00..#$b5:
PWidths^ := 2;
#$b6:
if (Line[2] <= #$b5) then PWidths^ := 2;
#$b8:
if (Line[2] >= #$80) then PWidths^ := 2;
#$b9..#$ff:
PWidths^ := 2;
end;
#$e5..#$e8:
PWidths^ := 2;
#$e9:
if (Line[1] <= #$bf) or (Line[2] <= #$83) then PWidths^ := 2;
#$ea:
case Line[1] of
#$80, #$b0:
if (Line[2] >= #$80) then PWidths^ := 2;
#$81..#$92, #$b1..#$ff:
PWidths^ := 2;
#$93:
if (Line[2] <= #$86) then PWidths^ := 2;
end;
#$eb..#$ec:
PWidths^ := 2;
#$ed:
if (Line[1] <= #$9e) or (Line[2] <= #$a3) then PWidths^ := 2;
#$ef:
case Line[1] of
#$a4:
if (Line[2] >= #$80) then PWidths^ := 2;
#$a5..#$aa:
PWidths^ := 2;
#$ab:
if (Line[2] <= #$99) then PWidths^ := 2;
#$b8:
if (Line[2] in [#$90..#$99,#$b0..#$ff]) then PWidths^ := 2;
#$b9:
if (Line[2] <= #$ab) then PWidths^ := 2;
#$bc:
if (Line[2] >= #$81) then PWidths^ := 2;
#$bd:
if (Line[2] <= #$a0) then PWidths^ := 2;
#$bf:
if (Line[2] >= #$a0) and (Line[2] <= #$a6) then PWidths^ := 2;
end;
#$f0:
case Line[1] of
#$a0, #$b0:
case Line[2] of
#$80:
if (Line[3] >= #$80) then PWidths^ := 2;
#$81..#$ff:
PWidths^ := 2;
end;
#$a1..#$ae, #$b1..#$be:
PWidths^ := 2;
#$af, #$bf:
case Line[2] of
#$00..#$be:
PWidths^ := 2;
#$bf:
if (Line[3] <= #$bd) then PWidths^ := 2;
end;
end
end;
*}
end
end;
(* Ranges that are FullWidth char
1100 e1 84 80 .. 115F e1 85 9f
2329 e2 8c a9 .. 232A e2 8c aa
2E80 e2 ba 80 .. 303E e3 80 be
3041 e3 81 81 .. 33FF e3 8f bf
3400 e3 90 80 .. 4DB5 e4 b6 b5
4E00 e4 b8 80 .. 9FC3 e9 bf 83
A000 ea 80 80 .. A4C6 ea 93 86
AC00 ea b0 80 .. D7A3 ed 9e a3
F900 ef a4 80 .. FAD9 ef ab 99
FE10 ef b8 90 .. FE19 ef b8 99
FE30 ef b8 b0 .. FE6B ef b9 ab
FF01 ef bc 81 .. FF60 ef bd a0
FFE0 ef bf a0 .. FFE6 ef bf a6
20000 f0 a0 80 80 .. 2FFFD f0 af bf bd
30000 f0 b0 80 80 .. 3FFFD f0 bf bf bd
*)
end.
lazarus,synedit输入小键盘特殊符号的补丁,这两个单元是解决synedit输入符号的时候发生重叠的问题的。
lazarus,synedit输入小键盘特殊符号的补丁的更多相关文章
- TeXmacs 中输入狄拉克 braket 符号
TeXmacs的数学模式下,默认会对括号进行自动补齐.这也导致输入狄拉克 braket 符号时得到的可能不是你想要的结果.经测试,可用以下输入方式输入 (以下 _ 表示光标所在位置,Tab代表Tab键 ...
- MathType输入几何符号的技巧
通过学习几何学的知识,我们发现其中包含的几何符号有很多,比如有表示图形的符号,如三角形,平行四边形,圆,角,圆弧等:还有表示位置关系的符号,如平行,垂直等:还有表示矢量等其他符号,那么MathType ...
- 利用MathType在Word里输入几何符号的技巧
通过学习几何学的知识,我们发现其中包含的几何符号有很多,比如有表示图形的符号,如三角形,平行四边形,圆,角,圆弧等:还有表示位置关系的符号,如平行,垂直等:还有表示矢量等其他符号,那这些符号怎么打出来 ...
- Excel 怎样去掉单元格中的回车符号
1.同时按下 CTRL+H调出"查找---替换"对话框:2.在查找中输入:按住ALT ,小键盘输入 10 ,然后松开ALT:3.在替换中写入要替换的符号:这样就将回车符换成其他符号 ...
- gets和从键盘输入换行符
i was wrong! 虽然setbuf可以让程序自己管理缓冲,但是像getchar,gets这些标准IO函数还是要通过隐藏的stdin进行操作,而stdin是啥呢?还是一个FILE*,而FILE* ...
- 限制TextBox输入,只能输入Double类型数字
public class TextBoxDouble : TextBox { public TextBoxDouble() { KeyDown += TextBoxDouble_KeyDown; Te ...
- 利用Pattern和Mather来禁止特殊字符的输入
String regEx="[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}[]‘::”“’.,.?]&q ...
- 批量安装XP补丁的命令
方法一: 新建一个bat文件,把这个文件和所有补丁文件放在同一个目录下,双击运行. BAT代码如下 @echo offfor %%i in (*.exe) do %%i /passive /nores ...
- Linux-使用patch命令给uboot打补丁(3)
patch:修改文件,让用户对原文件打补丁 用法 patch -p[剥离层级] <[补丁文件] 打补丁示例: u-boot-1.1.6_jz2440.patach补丁文件给u-b ...
随机推荐
- 线上问题!----------org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
1.问题出现 昨晚项目在上线的时候因为推广的原因,新增的大量请求.在八点的时候. org.apache.catalina.connector.ClientAbortException: java.io ...
- Error:Error: Avoid non-default constructors in fragments: use a default constructor plus Fragment#setArguments(Bundle) instead [ValidFragment]
原文博客链接:https://blog.csdn.net/chniccs/article/details/51258972 在创建fragment时,你可能在打包时碰到如下错误 Error:Error ...
- JDK1.8 HashMap 扩容 对链表(长度小于默认的8)处理时重新定位的过程
关于HashMap的扩容过程,请参考源码或百度. 我想记录的是1.8 HashMap扩容是对链表中节点的Hash计算分析. 对术语先明确一下: hash计算指的确定节点在table[index]中的链 ...
- 无线渗透开启WPS功能的路由器
首先关闭网络服务 service network-manager stop wps一般可在10-20小时可以爆破开,攻击难度较低,有一些厂家的无线路由甚至无法关闭WPS功能. 开始侦听开启wps功能的 ...
- Tableau-安装的坑
前言: 为了学习Tableau的教程,我下载了这个软件从官网,结果安装的时候一直报一个奇怪的错误, 由于当时没有截图,只记得错误代码Xo80076666好像是,提示安装失败,已经有另一个产品安装 在我 ...
- redis.clients.jedis.exceptions.JedisException: Can connect to sentinel, but seems to be not monitored.
在使用Redis的哨兵Sentinel配置时,报错如下: redis.clients.jedis.exceptions.JedisException: Can connect to sentinel, ...
- vue通过ID(参数)修改URL复用同一个页面(组件)不重新加载的问题
项目中经常会用到同一个页面,结构是相同的,我只是在vue-router中通过添加参数的方式来区分状态,参数可以在页面跳转时带上params,或者query,但是有一个问题,即使我们修改了参数,URL也 ...
- js回调函数,检测这个值是否重复
//校验提交的数据是否重复 /** * url:后端的查询地址 * filedVal: 要传到后台的值 * ele:要绑定显示的元素,一般就是当前的input就可以,直接在其后边追加显示 * fn:回 ...
- e-olymp Problem4196 Chocolate bars
吐槽一下,这个OJ的题目真的是阅读理解题.代码非常短,就是题目难理解.心累. 传送门:点我 Chocolate bars It is hard to overestimate the role of ...
- 98. Validate Binary Search Tree (Tree; DFS)
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as ...