VB.NET syntax highlight problems using hightlight.js in blog - vb.net

I use hightlight.js for syntax highlighting in my blog and it works fine for C# and Java. But i have problems with highlight for VB.NET code. Most of keywords and comments not highlighted.
For example:
Public Enum EditorBrowsableState
Always ' Отображается всегда
Never ' Не отображается
Advanced ' Отображается во складке "Все"
End Enum
result here (i use <pre><code class="vb"> as always) (excuse me, i can't now add sample image)
How can i handle this?

I know the question is a bit old and the author apparently stopped using highlight.js in his blog so I even don't know this is the cause. but I'm introducing what made vb codes not highlighted in my case.
It's just because the CDN library I used didn't include VB to begin with.
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/highlight.min.js"></script>
It only covers apache, bash, zsh, CoffeeScript, C++, C, C#, CSS, Diff, Http, Ini, Java, JSP, JavaScript, JSON, Makefile, Mak, Xml, Markdown, Nginx, Objective-C, Perl, Nginx Conf, PHP, Ruby, Python, Gemspec and so on. If we need something else, we should load the module for it.
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/languages/vbnet.min.js"></script>

Related

How to develop API with Hapi.js in coffeescript

I'm new to hapi.js and I would try test it out. Is it possible to develop with Hapi.js and coffeescript? Could you supply some example on how to setup hapi.js with coffeescript.
I thought the same approach would be useful. From CoffeeScript.org:
The golden rule of CoffeeScript is: "It's just JavaScript". The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is readable and pretty-printed, will work in every JavaScript runtime, and tends to run as fast or faster than the equivalent handwritten JavaScript.
If you know CoffeeScript, then you should be able to translate all examples into CoffeeScript by yourself. Else, you should learn CoffeeScript.
Copy and paste any example code into http://js2.coffee and it will show you how it may look like in coffeescript.
And yes you could easily use coffeescript also with hapi like:
Hapi = require 'hapi'
server = new Hapi.Server()
server.connection
port: 3000
server.start ->
console.log 'Server running at:', server.info.uri

Using elm for front end development + serving dynamic elm pages though haskell

I started with elm yesterday and I really enjoy using it. Without any experience in front end development I could build a nice looking webpage in only 30 lines of code, which is amazing.
Now I really want to use it in a real life example, I want to build a small blog.
But I need a way to communicate with elm. For example I need to query my database and I get a list of blog entries [Blog] and now I need to pass them to elm.
I am not sure how I would do it. I was looking though the popular haskell frameworks like yesod snap and happstack and the first thing that I found was http://hackage.haskell.org/package/snap-elm-0.1.1.2/docs/Snap-Elm.html
But it seems it is intended for serving static elm files, but I need to pass arguments to it.
Any framework that you would recommend me that already has elm support for serving dynamic elm pages?
And if not, how would you do it?
My idea was just to use elm as a skeleton and then I generate a normal html file with yesod snap or happstack and integrate this file into elm. Would this be possible?
Something that would look like this
container 1000 1000 middle <| displayHtml "/pages/my_generated_html_page.html"
Edit:
My first hacky solution was this
tPage = plainText "<script src=\"http://code.jquery.com/jquery-1.10.1.min.js\"></script>\n
<script> \n
$(function(){\n
$(\"#includedContent\).load(\"/home/maik/b.html\"); \n
});\n
</script> \n
<div id=\"includedContent\"></div>\n"
Unfortunately I am not allowed to use script tags in elm.
I recommend studying elm-lang.org's source code. The majority of it is pure Elm but there are pages that are generated on the server side with Haskell.

lua embeded in html with apache

Apache has mod_lua. Is there a way to have it process an html page with a like tag similar to php?
If not is there some other method? (I've seen mod_plua but it doesn't seem to have much work towards it).
I haven't tried it actually, but Haserl is something what you might need.
It was reported to be working in the lua-users mailing list.
Haserl is a small cgi wrapper that allows "PHP" style cgi programming, but uses a UNIX bash-like shell or Lua as the programming language. It is very small, so it can be used in embedded environments, or where something like PHP is too big.
P.S.
I haven't worked with it, so I'm not eaxctly sure if it works.
For php-style Lua programming, you could definitely use mod_pLua.
Contrary to what your initial statement says, it does have a lot of work put into it, just look at the extra features supported by it.
Whether or not mod_lua will support this kind of programming in the future...who knows :)
You need to update your config. In your Apache config, add the following lines of code:
AddHandler lua-script .lua
AddHandler lua-script .htm .html
That should set the handler for html files to mod_lua (not tested as I don't use this mod).

Is dotless the same exact syntax as the less css language?

The .less library calls itself a port of ruby LESS library. Can I take away from that that they both are compilers for the same LESS file format or do they expect subtly different less code? Asked another way, am I locking myself in to the dotless library or can use dotless and the less javascript lib on the less files?
Dotlesscss is a straight (almost 1:1 port) of the JavaScript project less.js (a JavaScript implementation of LessCSS by Cloudhead the original author of LessCss for Ruby)
In 99% of the cases the same code that runs on dotlesscss will run on less.js and vice versa. If something works on less.js and doesn't on dotlesscss we consider that a bug and try to fix it if possible.
There are very subtle differences though as it is very hard to keep three different projects 100% synced up.
For one that would be different function names.
Examples would be the color manipulation functions that we implemented before the LessCss project, as we named these after their SASS equivalents..
But in general: the language though is 100% compatible.
You are not limiting yourself to one language. You should be able to move between different implementations fairly easily.
Also dotless runs on Mono so you are not locked to a specific OS either.
If you encounter any problems feel free to raise an Issue on our GitHub Page or through the Mailing List
They're supposed to be equivalent implemnentations however there is a hudge difference between
the server side implementations (ruby, .net, php ...)
the client side javascript implementation
The big difference is that with the client side implementation, you'll be able to use all the dom of the browser in your less files and this would never work with server side implementations :
#height: `document.body.clientHeight`;
More over, in the current version of dotless (1.2.4.0), javascript evaluation is not implemented and is rendered as [script unsupported] in the css output.

What is everything involved from typing in code to executing a program?

I realized, when just asking a question, I don't understand all the components that are part of the coding process.
This seems a silly question, but I can't find a definitive answer on Google, Wiki, nothing.
What exactly are all the parts called, and how do they work and intertwine? I'm talking whatever you type code into, whatever checks that for errors, compiles it, and runs it.
I'd appreciate any links, repeats, etc. I apologize for such a bland, stupid question.
EDIT: Well, I'm trying to start Perl, so anything about Perl would help. Like, how to use Notepad++ and eventually compile Perl.
Write code
Run code in one of two ways[*]
Compiled languages (C, C++, D, Java, C#)
Compile the code into an executable file with the compiler tool.
Run the executable
Interpreted languages (Perl Python Ruby Lua Haskell Lisp & more)
Run the code in an interpreter, e.g., perl foo.pl
Debug code.
edit: Since the question was refined to be the Perl development cycle...
You will need an editor and a 'shell', which is used to command the system with. In particular, you want a 'command-line interface'. On Windows, you start this with running cmd.exe on the Run dialog (Windows + R is the shortcut).
You see a strange black and white box with a blinking cursor, reminding you of ancient systems redolent of gurus and wizards. You panic and refer to Google, getting a web page. Finding the command to change directory and list files is recommended...
Upon arriving at the directory where you stored your Perl file, you issue the command perl myfilename.pl, where myfile.pl is the file you saved. As is common for programming, you find some errors that appear to be incomprehensible, and you refer to Stackoverflow.com once again...
* I have elided, glossed, and moved past many of the details, as this is an introductory question. A full discussion is known as "senior-level course on compilers".