Or do I just have to manually type in each letter to see what it could be tabbed into? And change the file extension to see the language-specific snippets?
I don't know about all of the snippets but for single languages, at a time you can go into Settings \ Packages and search for the language that you want. Then once you have found it scroll down until you find the snippets section and voilĂ , there are your snippets.
I know this is 7 months too late, but I just thought I would answer in case anyone else came looking for an answer like I did. :D
Edit: Just remembered something else, you can type snippets available in the command palette and see all the snippets for the file type you are focused on.
Related
I've recently updated a website that uses the Instafeed.js plugin from the old version to the new one. In the previous version the 'sortBy' option worked with a few possible strings e.g. number of likes ("likes.count"), number of comments ("comments.count") etc.
In the new version, the 'sortBy' option has been replaced by a 'sort' option, and as you can see on this page, it says that it 'uses a function' instead of the simple preset options as in the previous version.
https://github.com/stevenschobert/instafeed.js/wiki/Version-2-migration-guide
My Javascript knowledge is basic, and I've not come across something like this in a js plugin before. I don't really understand how I can write a function to sort the posts from the feed by the number of likes, since I can't see where the number of likes is made available from the Instagram API. If you'd like me to share the live website as it currently is, I'm happy to do so.
If anyone could point me in the right direction it would be really appreciated.
Thanks
I am stuck with spell check and dictionary issues. basically I am looking for a spell check solution. It could be open source or licensed.
I have already tried typo.js from https://github.com/cfinke/Typo.js/.
My requirement is given below -
It has to check the spelling of the word, for wrong words it should be red as showed in browsers.
There should be an options to add the word to dictionary. I have tried the same with typo.js I can find the spell check suggestions but could not add the same to dictionary.
How to disable browser's spell check.
Also It should support Linux servers.
Looking at your question and the reason why you decided not to go for Typo.js (answer on my comment), I decided to look at the Typo.js project.
If you look at the GitHub test folder of Typo.js, you can see that there is a way to include custom dictionaries (different languages etc):
https://github.com/cfinke/Typo.js/tree/master/tests
Using a custom dictionary is very easy:
var dictionary = new Typo("en_EN", false, false, { dictionaryPath: "typo/dictionaries" });
Here you can find the directory structure: https://github.com/cfinke/Typo.js/tree/master/tests/dictionaries
Now all you need is an open source English dictionary which does have all these words, and include this into the Typo library :)
I am actually searching for a javascript / jquery library where I can pass a function equation, such as sin(x^2), and it plots the graph. Example link:
http://www.greatgraphing.me/?plot=sin(x^2)
Furthermore, I would like to scan my website for function equations and replace them with this function graph embed. It should have navigation features (scrolling, dragging the stage etc).
Over the last 4 hours I have searched the net without satisfactory result. Even the popular plot.ly, fooplot.com and jsxgraph do not offer this kind of features. The only thing that comes close to what I need is www.graph.tk. You can pass 1 equation by URL but it has no embed feature (widget or alike).
Wolframalpha offers a widget but it seems to be just an embed without the option to pass the equation.
Update: Found out that desmos.com offers an embed feature, if you purchase one of their API keys. Price is not stated.
I also considered using Google's geometry calculator but there seems to be no embed features.
Before starting to build such a "graph embed" myself, I would like to ask if such a project exists already. Maybe it is hidden in some github repo and I just can't find it.
Thank you.
PS: If the question is too offtopic (saw the first close flag), even though it is related to js/jquery, where should I ask it? On Superuser? Please advice me. I am sure this is an important question for many math developers.
All right, I took the time to write a first prototype based on jquery, math.js and easeljs (about 300 KB with v0.0.1):
graphobed
Demo: http://www.matheretter.de/tools/graphobed.html
Source: http://www.matheretter.de/tools/graphobed.html or here: https://raw.githubusercontent.com/echteinfachtv/graphobed/master/graphobed.js
Github repo: https://github.com/echteinfachtv/graphobed
Disclaimer: The code is a bit messy but worked in my tests. You just have to embed the js file, the script runs over all elements on your site and parses only if an enclosed equation has been found, the characters for enclosing are: *# x^2*sin(x) #*
I also added the possibility to change the graph later on by simply providing an input field. So after the embed you can change the graph as you wish:
Enjoy and improve the source code if you like :)
I am looking for a JavaScript libarary for coding in a textarea (with proper indentation).
I found Behave.js (http://jakiestfu.github.io/Behave.js/). However, that is lacking one basic feature: Indent a new line according to the last lines indent. It only does automatic indentation by recognizing braces and parentheses. Also, Codemirror and MarkItUp do not indent according to the last line, as far as I could see.
Do you know either an alternative library that does exactly that (and potentially more) or a way to add (or enable?) that functionality in Behave.js?
The reason why I need indentation like last line is that I want to be able to use a non standard programming language.
OK, I found the answer.
The Ace editor is the absolutely best code editor for JavaScript as far as I can see.
http://ace.c9.io/ it is developed by Cloud9 and some time ago the whole SkyWriter/Bespin team from Mozilla joined their efforts and have merged some of their features into Ace.
I have an asp-based website which I would like to add spell checking capabilities to the textarea elements on the page. Most of the pages are generated from an engine, though I can add JavaScript to them. So my preferred solution is a JavaScript-based one. I have tried JavaScriptSpellCheck and it works okay, though I would like to see what some of my other options may be. I also found spellchecker.net but at $3500 for a server license it seems excessive.
Spell checking can be in a separate window and must support multiple languages (the more the better). Ultimately I would like to send the spell check object a collection or delimited string of textarea names or id's (preferably names as they already exist in the pages) and have it spell check all of them, updating the text as spelling is corrected.
Check out using Google's api for this: http://www.asp101.com/articles/jeremy/googlespell/default.asp
Here is a free, open source Javascript library for spell checking that I authored:
https://github.com/LPology/Javascript-PHP-Spell-Checker
There's a link to a live demo at the top. It's designed to have the feel of a spell checker in a desktop word processor. I wrote it after being dissatisified with these same options.
To use, just include the JS and CSS files into your page, and then add this:
var checker = new sc.SpellChecker(
button: 'spellcheck_button', // opens the spell checker when clicked
textInput: 'text_box', // HTML field containing the text to spell check
action: '/spellcheck.php' // URL of the server side script
);
It includes a PHP script for spell checking, but it could be ported to another language fairly easily as long as it returns the correct JSON response.
If I were you, I'd look into something like aspell - this is used as one of the supported spellchecking backends in TinyMCE. Personally, I use pspell because it's integrated into PHP.
EDIT
There's an aspell integration here that has a PHP or a Perl/CGI version; might be worth checking out.
If I am not wrong, Firefox's English dictionary for spell checking takes around 800KB of data.
If you like to do everything in JavaScript -- for a full-featured spell checking engine, it means you need to load that 800KB data in every page load. It's really not a good idea.
So, instead of doing that in JavaScript, send the data to the server with AJAX, check it server side, and return it back; that's the best way.
Well this is quite old question, but my answer might help people who are looking for latest options on this question.
"JavaScript SpellCheck" is the industry leading spellchecker plugin for javascript. It allows the developer to easily add and control spellchecking in almost any HTML environment. You can install it in about 5 minutes by copying a folder into your website.
http://www.javascriptspellcheck.com/
Also support multiple languages - http://www.javascriptspellcheck.com/Internationalization_Demo
I might be a bit late on the answer to this question. I found a solution a long while ago. You must have a spell checker installed on your browser first. Then create a bookmark with the following code as the link.
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0