How do I just SAVE a jsFiddle and not get a new version - jsfiddle

In the documentation:
Buttons Save or Fork are always present in the UI. First one appears if no fiddle was loaded, the latter is used to create a new fiddle from the existing one.
I ONLY see SAVE when the fiddle is brand new, then RUN/update/fork. In Fx4 and Safari 5 on MAC (and Fx 4 on pc)
UPDATE: New BASE functionality does exactly what I wanted.
From the SO FAQ
Stack Overflow is for professional and
enthusiast programmers, people who
write code because they love it. We
feel the best Stack Overflow questions
have a bit of source code in them, but
if your question generally covers …
a specific programming problem
a software algorithm
software tools commonly used by programmers
matters that are unique to the programming profession
… then you’re in the right place to ask your question!

When you log into JsFiddle, you'll get a Set as Base button, which will make the revision you're working on the base version - think of it as an alias for john/7hd62/12/ -> john/7hd62/.

I ran into an issue where set as base would not save my work. The solution was to:
make a change.
Update to get a new version.
Set as Base.
Hope that helps

I always use Update to save and create a new revision.
I haven't seen the button Save... maybe it is so that we can't Save to a version, but always need to Update to a new version, so everybody can look at the same code at a certain version.

Have a look on Issue #225 in JSFiddle GitHub Repository - URL for the latest version of a fiddle such as /xxxxx/latest/:
#zalun: Please read http://doc.jsfiddle.net/basic/introduction.html#setting-base-version
Sharing a latest fiddle is not always what you wanted. Because anyone is able to save "latest" fiddle, someone would be able to change it to the content you wouldn't like to share. With setting a base version you are the person who chooses which version is shared under default "no version" URL.

Related

what controls the order of UMLS linked entities from scispacy if the scores are all 1

i'm using Scispacy (which is awesome!) but when I type 'tau' into the app found here https://scispacy.apps.allenai.org/
the UMLS entity gives me the canonical name of 'MAPT gene' which is what I want.
But when I do the exact same thing in my python code based on the app code (see here https://gist.github.com/DeNeutoy/b20860b40b9fa9d33675893c56afde42)
the first canonical name on the list is 'uridine triacetate' (the second is 'MAPT gene')
in the app code there is the call 'if show_only_top:break' so I assume somehow their app implementation orders the linked entities differently.
if someone can explain the difference in ordering and how to fix that would be great thanks!!
This question was also asked on github (https://github.com/allenai/scispacy/issues/344), and answered there, but I am including the answer below in case anyone ends up here.
The demo app is not currently running the latest version of scispacy, and the inconsistent ordering of the entities was an issue that was fixed in scispacy version 0.4.0.

silverstripe dynamic backend for flexible frontend

I'm searching for a while, but didn't find a practical answer for the following problem:
An Articlepage in the Frontend can contain different types of sections. For example a block text section and than a text section with left photo an at the end an wallpaper photo.
Now I want to implement this in my backend dynamically, so that I can choose, which type of section and -even more important- how many sections my article should contain.
In my recent project I've solved the problem as an Articlesection with a Dropdown, wich contains the different section styles. And one article hat xy Artilesections as childpages. In the frontend I included all Childpages of the Article - so to speak the Articlesections, where I've checked with if conditions, which sectionsystyle I have in this Section and here I styled the section as I want.
For example Artilce1 has 2 Childpages: Articlesection1 and Artilcesection2.
In AS1 I have choose in the dropdown: right text with left photo and check with if conditions, to style the section. The same with AS2, that is for example a wallpaper photo.
This semiprofessional solution worked, but there are some bugs with displaying the Article correct in the backend, because I have to declare the Articlesections as Includes and not native childpages. And in generell this don't seems like the developers of silverstripe want the users to do it this way..
Are there better ways to implement a dynamically changing backend, so I can decide, which and how much sections I have in the frontend.
Take a look at https://github.com/sheadawson/silverstripe-blocks. There's quite a few addons that offer similar functionality as Blocks such as Elemental. The following blog post might also be useful too - https://www.silverstripe.org/blog/silverstripe-strips/.
Thank you for your reply, but there is a problem, because I don't work a lot with the terminal and the composer. In principle I want to install sheadawsons silverstripe-block. I have installed the composer and run the command:
"composer require sheadawson/silverstripe-blocks" it seems like it installed that correctly, because I became no errors, but what then? With dev/build -to refresh the database- happened nothing and the following instructions in the readmy chanced nothing. Should I copy any files in my Sivlerstripe web folder or what else..? I'm a bit desperate, because there is such a poor documentation.
Tank you

Can Intellij IDEA (14 Ultimate) generate regex based TODO-comments?

A few years back i worked in a company where i could press CTRL+T and a TODO-comment was generated - say my ID to be identified by other developers was xy45 then the generated comment was:
//TODO (xy45):
Is something available from within Intellij 14 Ultimate or did they write their own plugin for it?
What i tried: Webreserach, Jetbrais documentations - it looks like its not possible out of the box (i however ask before i write a plugin for it) or masked by the various search results regarding the TODO-view (due to bad research skills of mine).
There is no built-in feature in IntelliJ IDEA to generate such comments, so it looks like they did write their own plugin.
Found something that works quite similar but is not boundable to a shortcut:
File -> Settings -> Live Templates
I guess the picture says enoth to allow customization (consult the Jetbrains documentation for more possibilities). E.g. browse to the Live Template section within the settings, add a new Live Template (small green cross, upper right corner in the above picture) and set the context where this Live Template is applicable.
Note: Once you defined the Live Template to be applicable within Java (...Change in the above image where the red exclamation marks are shown) context you can just type "t", "todo" and hit CTRL+Space (or the shortcut you defined for code completion).
I suggest to reconsider using that practice at all. Generally you should not include redundant information which is easily and more reliably accessible through your Version Control System (easily available in Idea directly in editor using Annotate feature). It is similiar to not using javadoc tag #author as the information provided with it is often outdated inaccurate and redundant. Additionaly, I don´t think author of TODO is that much valuable information. Person who will solve the issue will often be completly different person and the TODO should be well documented and descriptive anyway. When you find your own old TODO, which is poorly documented, you often don't remember all the required information even if you were the author.
However, instead of adding author's name, a good practice is to create a task in you issue management system and add identifier of this task to the description of the todo. This way you have all your todos in evidence at one place, you can add additional information to the task, track progress, assign it etc. My experience is that if you don´t use this, todos tend to stay in the code forever and after some time no one remembers clearly the details of the problem. Additionaly, author mentioned in the todo is often already gone working for a different company.
Annotated TODO with issue ID

Getting the latest version of Bootstrap

It looks like I can use:
//getbootstrap.com/dist/css/bootstrap.css
//getbootstrap.com/dist/js/bootstrap.js
to automatically use the latest version of bootstrap.
Does anybody ever do that?
You have CDN's that have a similar functionality (BootstrapCDN for example), but I wouldn't recommend to automatically get the latest version. If the new version breaks something you wouldn't know it until it's too late.
Besides, what would the benefit be? Anything major is very likely to break something, and anything minor is, well, minor.
At http://getbootstrap.com/, they say
"Downloads are pulled directly from the latest committed code on
GitHub, and as a result our docs may at times be out of sync."
Your page will load faster if you get your bootstrap from their site but it may be outdated.
Hope it helped!

Is there a script that turns a Pharo core image into something more useful, that would include an OmniBrowser?

I cannot use the most recent dev Pharo release because of some strange issues with the compiler built into Pharo. Well. I was wondering if there is a quick way to install all the nifty extras into Pharo that the core image misses, as compared to the dev image.
With all non-core Pharo images come a script which was used to build that image. Just edit that file and drag&drop it on a new core.
You could also tell me what you don't like in the Pharo images so that I can enhance them.
There is also the script I published on the Pharo wiki that I use to build my images:
http://code.google.com/p/pharo/wiki/ImageBuildScripts
Of course it is very specific to my preferences and needs, but you can take it as an example and adapt it to your own needs.
CommandShell works with Pharo 9.10.10. You will hit several errors as you try to load the package due to Pharo lacking MVC, but you can simply proceed past the first bunch and abandon the last one (that tries to actually open a CommandShell in Morphic). At that point, you'll have a class called PipeableOSProcess that can be used very easily to grab output. For example:
(PipeableOSProcess command: 'ls /bin') output
will return the contents of your bin directory as a string.
Ok, OB itself can be easily downloaded using ScriptLoader loadSuperOB.
Damien adds (from comment below):
The problem with that approach is that nobody really maintains it.
Moreover, you miss some configuration steps to enhance the use of OB
(for example, you won't have the OB-based browsers if you ask for the
senders of a message from a workspace)