I tried to set multiple cursors on Ace Editor, I know this question is already asked, but the answer is old and it seems to not work anymore.
So, I've read the perfect example for setting multiple cursors in this file:
https://github.com/ajaxorg/ace/blob/master/lib/ace/search_highlight.js
But when I watch this code, I don't understand how to use the SearchHighlight Object? I've searched in the others files but I've not found.
Related
I'm sure this has probably been asked before, but I'm fairly new to threejs (and React Fiber), so part of my problem here is not really knowing how to phrase what I need..
I know what I want to do must be possible, because it is possible to drag and drop any gltf file here: https://gltf-viewer.donmccurdy.com/ and see it rendered correctly.
So, what I want to do, is create a loop which will traverse all parts (nodes?) of a gltf model with/without animations (such as this one) and output it as part of a webpage.
Currently, I find myself tediously trying to add a <mesh> for each and every part of a model, and I know there must be an easier way.
I have found the source-code for the viewer here, but as mentioned, I'm still quite new to this library, so any help (or link to a similar question), would be appreciated.
I would like to add new match field of type OXM_experimenter class OVS source code, could anyone share proper document or steps to do it. It needs changes in many of the files and functions and understanding OVS source is somewhat difficult. If any added already and tested, can you guide ?
I successfully did this before, however, I don't have access to the code anymore, only bookmarks to stuff. There is an old thread in the mailing lists that may help you: Link and Link.
I wanted to handle PACKET_IN events in OVS a bit differently, so I followed the way of packets from the data plane through the upcall bit to ofproto-dpif-xlate.c. On the way, I stumbled upon a lot of constants. After adding my own to the enums, the last bit missing was the experimenter field, which was somewhere in the python scripts as described in the links above.
I hope this helps, I'm in the process of getting access to the code again I'll update my answer then. If not, the OvS discuss mailing list and archives may help you too.
Is there a way to do some checks before allowing a merge in Mercurial?
I have found the pre-update hook and have a script that runs before an update is allowed, by adding the following to ~/.hg/hgrc:
[hooks]
pre-update = ~/hg_pre_update.sh
But I'd like to run the check before allowing a merge as well, and currently it just allows the merge to go through without running my checks.
Background
In case there are alternative ways to solve the problem...
We have been having a number of problems with 'lost' edits under Mercurial. I've tracked down most of them now to the same underlying cause: someone has vim edit sessions open while either they or someone else does a hg update or merge. The editor warns the file has changed externally, the user ignores the warning and saves their changes.
When these changes are committed, for Mercurial there is nothing controversial. The user has simply reverted all the changes brought in with the last update and put in their own changes.
Some time later, we notice the code has gone walkabouts. Cue assorted insults flung the way of mercurial...
Set vim to autoreload changes if no local changes where done. (otherwise ask, or force a merge)
that's how I avoid such issues in any editor...
Sorry just worked out there is a pre-merge hook that works just the same as pre-update. I tried it before asking the question, but now just looking at my hgrc I realise I put the script being called for that hook to ~/hg_pre_merge.sh which doesn't exist.
I can't find the existence of pre-merge documented anywhere but still feeling like a bit of a muppet now.
I am involved in using the C API to interact with Lotus Notes and Lotus Domino. I'm running into issues when reading existing Notes out of an NSF. Specifically, reading TYPE_OBJECT fields and even more specifically, $FILE fields (though I'm sure all TYPE_OBJECT fields would fail if I had any others).
I'm using NSFItemInfo to get the summary data on the $FILE field (so I don't need the saved file, I need information about it such as its size, name, etc...).
If I create the Note in memory, Commit it, then read the $FILE field, everything works. If I change my unit test to read an existing Note (instead of creating it in memory), Lotus PANICS with an Invalid Handle Lookup message.
So I'm left feeling like there is something different about loading those fields when I create a Note from scratch Vs opening one already created. Even reading in an already created Note that my own code created gives me the same error, so I think I'm creating the Notes correctly.
I've explored the NSFNoteOpenExt's flags options and have attempted to open the Note with every possible flag described in OPEN_xxx and I always get the panics except when I open the Note with OPEN_ABSTRACT or OPEN_NOOBJECTS. The reason those don't error though, is because they open the Note without the $FILE fields at all, so when I see if the field exists I get a false and the code to read in TYPE_OBJECT fields is never executed.
Any ideas what I'm missing?
I'd provide code, but I'm actually using .NET interop to accomplish all this, and the code is spread across multiple files, etc.... If you have any questions please ask and I'll provide as much detail as I can.
Craig
I figured out the issue. It came from the fact that when using interop in C#, you can't call C macros. OSLockBlock is defined as a macro to another macro to a function. Essentially, it locks the BlockId.Pool pointer, then increments the pointer by BlockId.BlockHandle. I was mis-interpreting that macro logic to be first increment BlockId.Pool by BlockId.BlockHandle, then lock.
Essentially:
Lock(BlockId.Pool)+BlockId.BlockHandle Vs Lock(BlockId.Pool+BlockId.BlockHandle)
It's interesting that the latter would work when creating a new note with new attachments. I finally figured that out as well, BlockId.BlockHandle was always zero when doing that. So that's why that always worked.
I'm new to jedit, and I haven't yet found out how to open a new window. For example, I want to be editing one set of files in one space on my Mac, and edit a different set of files in another. Does anyone know how to open a new instance/window of jedit to make this possible?
Thanks
You should set Buffer Sets scope to "View"
See also: Buffer Sets
It is possible to really Open a new instance of jEdit, and not only to open a new set of buffers in the same instance.
You have to launch jEdit with the -noserver option.
"Do not attempt to connect to a running edit server, and do not start one either."
Please see documentation here :
http://www.jedit.org/users-guide/cli-usage.html#d0e471
On Windows, to set this option you have to add it to the command line of the shortcut which launches jEdit.
It's a new feature to 4.3. It's under View | Buffer Sets. You click on either the "View Scope" or "EditPane Scope" buffer sets checkbox.
When you open a new View, it's a separate window instance. It has a buffer set and an edit pane. With more than one View open, you can decide to share buffer sets (global scope) or each keep their own (View scope). When you split the View, you add another Edit pane. Each can use the View's buffer set, or have their own (EditPane scope)
Global scope: All Views and EditPanes share a common buffer set
View Scope: EditPanes in the same view share the same buffer set
EditPane Scope: Each EditPane can have it's own independent buffer set.
The editpane scope works when you have split the view (view | splitting). You can look at files side-by-side, and each side can have their own buffer set. Very useful in comparing files in two different directories (one set per side), for example.
I wish there was an answer for this, since I'm constantly trying to open new instances of JEdit (despite being a daily user for several years now). But, as far as I can tell, you can't.
I have to assume this is another example of a good project getting over-architected.
Instead of allowing separate instances which logically associate different buffer behaviors using the built-in OS mnemonics, the JEdit crew have decided to create their own UI concepts. What OS lacks the concept of software instances and a task bar? Was it necessary to force a single-instance mode, and then re-create basic OS UI functionality in an obscure manner?
A hint for budding developers out there: if you're creating new terminology to handle UI concepts in your application, you're probably doing it wrong.
The following command line invocation will solve your problem:
jedit -noserver
You can create an alias for jedit that contains the above.
In the Jedit help, see Chapter 2, "Starting Jedit", in the section on Command Line Usage, Edit Server Options, and you will find the -noserver description.