I'm making a custom keyboard for Oriya/ Odia script with Keyman developer 10 but it won't do contextual substitutions when all the input is in Odia script. For example
+ [K_K] > U+0B15
+ [K_T] > U+0B24
U+0B15 + U+0B24 > U+0B15 U+0B4D U+0B24
"a" + "b" > U+0B15 U+0B4D U+0B24
U+0B15 + [K_C] > U+0B15 U+0B4D U+0B24
When I test his, I get the desired output when I type 'ab' or 'kc' but not with 'kt'. Any help to explain why line 3 won't work but line 4 does will be appreciated.
I do get this error sometimes when Targets is set to 'any' rather than 'windows'
warning 209A: The rule will never be matched because its key code is never fired.
The reason this isn't working is you are trying to match on a Unicode value instead of a keystroke on line 3:
U+0B15 + U+0B24 > U+0B15 U+0B4D U+0B24
Instead of U+0B24, which is a Unicode character, you need to match on the keystroke, for example:
+ [K_K] > U+0B15
+ [K_T] > U+0B24
U+0B15 + [K_T] > U+0B15 U+0B4D U+0B24
As this third rule has a longer context (U+0B15), it takes precedence over the second rule.
An alternate way to solve this issue is to use a post-processing group. In this model, the output from the first group is fed into the context of the second group. Note that the second group does not include a using keys clause.
group(main) using keys
+ [K_K] > U+0B15
+ [K_T] > U+0B24
match > use(post)
group(post)
U+0B15 U+0B24 > U+0B15 U+0B4D U+0B24
Related
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
This code is valid in vim. It is the syntax of vimscript. It can also work in neovim's configuration file init.vim. how can I achieve the same effect in init.lua?
Tested on 0.7.2, if not available, the version may be too low.
vim.api.nvim_create_autocmd("BufReadPost", {
pattern = {"*"},
callback = function()
if vim.fn.line("'\"") > 1 and vim.fn.line("'\"") <= vim.fn.line("$") then
vim.api.nvim_exec("normal! g'\"",false)
end
end
})
In older versions of Coq (< 8.5), the main coqtop process would interchange data with IDEs using strings.
This was supposedly recently changed - how does one query the richer XML-like structure representing ASTs?
Use case: I would like to interpret whatever Coq computes in a different way - that is, I need its results after performing operations (such as invoking tactics) in a form that's not string that I need to parse.
Note: this answer has been edited to make it up to date
The only reasonable option as of end of 2018 is SerAPI, a Coq language server that supports full serialization of Coq documents. Using SerAPI you can get a full representation of any Coq document or internal structure:
$ rlwrap sertop --printer=human
(Add () "Lemma u n : n + 0 = n.")
> (Answer 0 (StmAdded 2 (...) NewTip))
(Query ((sid 2)) Ast)
> (Answer 1(ObjList
> ((CoqAst
> (VernacStartTheoremProof Lemma
> ((((((Id u)) ()))
> (((LocalRawAssum
> (((Name (Id n))))
> (Default Explicit)
> (CHole () IntroAnonymous ())))
> (CNotation
> "_ = _"
> (((CNotation
> "_ + _"
> (((CRef
> (Ident
> (Id n)))
> ())
> (CPrim
> (Numeral (Ser_Bigint 0))))
> () ()))
> (CRef
> (Ident
> (Id n)))
> ()))
> () ()))
> ())))
> false)))))
Note that SerAPI is experimental software and I am the main author.
I am getting issue in below rule. This is working fine in 5.3 but throwing error (must be boolean expression).
String drl="import com.drools.Applicant;"
+ "rule \"Is of valid age\" "
+ " when $a : Applicant(age > 18 && name matches \"(?i).*\"+ name + \"(.|\n|\r)*\")"
+ " then $a.setValid( true ); "
+ " System.out.println(\"validation: \" + $a.isValid());\n"+
"end";
Issue is with line :
" when $a : Applicant(age > 18 && name matches \"(?i).\"+ name + \"(.|\n|\r)\")"
Any advise.
The expression isn't correct since name cannot be resolved as part of an experssion. Use a binding.
$a : Applicant($n: name, age > 18, name matches \"(?i).*\"+ $name + \"(.|\n|\r)*\")"
(I don't think the the constraint makes much sense - it's merely a test whether a name matches itself, with or without arbitrary characters before and after. Moreover, the ?i is superfluous.)
I am making my own command, and so far the cl code that processes the .cmd code works just fine on its own. I can call it and send in the parameters and it does exactly what it needs to do, so I'm assuming that the error must be with the .cmd:
CMD 'DISPLAY SYSTEM LEVEL (DSPSYSLVL) NADIA S.C.'
PARM KWD(OUTPUT)
MIN(1)
TYPE(*CHAR) LEN(8)
RSTD(*YES)
VALUES(*MSGLINE *DISPLAY)
PROMPT('OUTPUT FOR SYSTEM LEVEL')
PARM KWD(SOLUTION)
TYPE(*CHAR) LEN(4)
RSTD(*YES)
VALUES(*YES *NO)
DFT(*NO)
PROMPT('TELL ME HOW YOU DID IT')
PARM KWD(SHOWCMD)
TYPE(*CHAR) LEN(4)
RSTD(*YES)
VALUES(*YES *NO)
DFT(*NO)
PROMPT('SHOW COMMAND')
when I run crtcmd and give the appropriate filenames, I get the message "Command DSPSYSLVL not created in library [library name]." with a CPF0201 message.
I'm still fairly new to the whole system, and I'm really not sure what the problem could be. The job log doesn't provide any new information either...
It may just be a transcription issue but the first thing that stands out is the multi-line format without the continuation character (+):
CMD 'DISPLAY SYSTEM LEVEL (DSPSYSL'
PARM KWD(OUTPUT) +
MIN(1) +
TYPE(*CHAR) LEN(8) +
RSTD(*YES) +
VALUES(*MSGLINE *DISPLAY) +
PROMPT('OUTPUT FOR SYSTEM LEVEL')
PARM KWD(SOLUTION) +
TYPE(*CHAR) LEN(4) +
RSTD(*YES) +
VALUES(*YES *NO) +
DFT(*NO) +
PROMPT('TELL ME HOW YOU DID IT')
PARM KWD(SHOWCMD) +
TYPE(*CHAR) LEN(4) +
RSTD(*YES) +
VALUES(*YES *NO) +
DFT(*NO) +
PROMPT('SHOW COMMAND')
Each PARM is a single entity and must be 'continued' if split onto multiple lines.
The CRTCMD command should generate a spooled file containing more details about the errors.
EDIT: Also the maximum length of the CMD prompt is 30 characters.
when i take notes, i like to write in "ascii math".
e.g. definition of continuous
all eps > 0, exist del > 0 . |f(x)-f(y)| < eps . |x-y| < del
i would like this to automatically inline unicode, as i type
Ɐ ε > 0, ∃ δ > 0 . |f(x)-f(y)| < ε . |x-y| < δ
1) does this exist, in a minor mode and independent of any latex major mode?
2) how do i substitute "tokens" in emacs. e.g. the regex "\W+all\W+" => "Ɐ" (since writing " all " is easier than "\forall")?