Highcharts, old look of exporting i 3.0 - highcharts

there is some code for changing back to the old look of export buttons even if you're running version 3.0.
It's here:
https://github.com/highslide-software/highcharts.com/blob/master/js/modules/exporting-old-look.src.js
My only question is, how do I include this code into my graph?

You can just copy that javascript into your own project between and tags,
or
you can include it from github in a script tag:
or
You can download it to your own project area and include it in a script tag from your own web server.
The script will load and run when the page loads, so make sure to include it after highcharts.

Related

Simple image gallery plugin tags not being recognized

I am using a gallery plugin to show multiple images in a joomla article.
However when I add the code that needs to be parsed it just shows the code as plain text in my article, and the gallery is nowhere to be found.
This is the parsing code:
{gallery}content{/gallery}
With content being the image folder.
I enabled the plugin in plugin management, and when I put a non existent folder in the plugin code it gives me an error that the folder can't be found, so the plugin is active.
I removed all formatting from the code so that is not the issue.
I also set the cache folder permissions to 777 and 775, both did not work.
What could be the cause of this?
My joomla version is: Joomla! 3.0.3 Stable [ Ember ] 04-February-2013 14:00 GMT
Also I should note that when I type this code and save my article, the images from the specified folder are stored in the cache folder of the joomla root. So it is creating the thumbnails I guess.

OpenLayers that is not minified?

I'm trying to find an OpenLayers3.js file that is not minifed, it is a pain debugging stuff that is minified, can anyone help me find it?
Im using this address now: http://openlayers.org/en/v3.0.0/build/ol.js
By the way, it is a special thingy at the top. See the website: http://ol3.js.org/ ? Made me laugh.
Help?
If you need the unminified ol, you can use the one from ol:
http://openlayers.org/en/v3.0.0/build/ol-debug.js
It's a file of 3.5M so don't use this in production ;)
Have you tried the Download link on the main page?
https://github.com/openlayers/ol3/releases/download/v3.0.0/v3.0.0.zip
If you want a hosted version, upload one here:
https://cdnjs.com
Yes, http://openlayers.org/en/v3.0.0/examples/loader.js will load all the raw files -- basically by writing out a bunch of script tags. As #lexicore has already said, you can get the source from github, though this involves setting up nodejs locally to run (which actually isn't that painful, but more so than just debugging from a hosted source). Take a look at package.json to get a feel for how much has gone into OpenLayers 3.
If you go to the OpenLayers 3 examples, for example animation, change production to development in the drop down, and then do view source, you will get the link above. You can also see all the raw js files in the Javascript console.
EDIT: I put some instructions, following the official OL dev page, on how to build/run locally, which will also get you the unminified OL source code

Which files needs to be deployed from a Dart project?

I have an AngularJS project that I am thinking of migrating to Dart. I do not want to migrate the whole project in a big-bang, so I am looking for ways to run the two apps side-by-side.
The dart app will run on the root as index.html. The js app will run on a separate path, say '/jsApp'.
When I build a test project, it seems that the /build directory includes a lot of unnecessary files. Would I need to deploy the complete contents of the /build/web directory?
What is it that actually gets loaded? Do html files still get loaded at runtime or are they bundled into the main file?
Do I need main.dart.js as well as main.dart.precompiled.js? It seems that they are very large files for a trivial app. Is that to be expected?
It is still unclear to me how all these things hang together.
If you want to keep the generated files as small as possible, you should:
Make sure your pubspec.yaml includes the angular transformer, as explained here: Angulardart. Creating your first app
Your pubspec.yaml should look like this:
name: angular_dart_demo
version: 0.0.1
dependencies:
angular: 0.12.0
[...]
transformers:
- angular
html_files:
- web/my_html_template.html
- web/another_html_template.html
Build from the command line with pub build
This way you will get 800KB js, instead of 5MB js ;)
That's because Angular Dart uses mirrors and, as a result, the generated js code can get very big if you don't use the angular transformer.
I think html templates are copied to the build directory and will be requested at runtime.
You will have to merge the contents you get from "pub build" with your existing js application somehow.
I am using AngularJS with Dart controllers mixed in. You do not have to adapt your current project structure to use the pub build. Just use dart2js to compile the individual dart files and include the ".js" files in your page. You do not have to add the native dart script tag or include the dart bootstrap in your code. Just include a script tag for the generated js file (the only file you need) and it will do what you expect. I plan to write up a brief overview of this soon.
Normally the entire build directory needs to be deployed and there are normally no unnecessary files.
The *.precompiled.js files are not generated anymore in recent Dart builds (this was for CSP compliance).
What Dart version are you using?
If you build in debug mode also the source map files are generated in the build directory.
The browser loads the HTML file the user requests and then loads the script files references in <script> tags in this HTML and all other resources (img, css, ...)
I don't know if the build output of an Angular component with an external HTML-template file is inlined in the index.html or if they are copied as they are.

Troubleshooting "call to undefined function" when adding Markdown to project

I'm trying to add some Markdown capabilities to my Symfony project (Symfony version 1.3.3).
To accomplish that, I had already included the Markdown library into lib/vendor directory. Also, I added the need configuration in the autoload.yml for the previous library.
However, I'm getting a fatal PHP error:
Call to undefined function Markdown()
How can I resolve this problem?
The symfony autoloader loads classes from php files named like <classname>.class.php. If you're using the markdown.php file from mitchelf.com, it does not follow the naming scheme, nor does it contain a class called Markdown, as a matter of fact: it has a function called Markdown.
Symfony isn't even trying to load it, for reasons I described above. You will have to include it manually. I suggest you have a look at http://www.symfony-project.org/plugins/sfEasyMarkdownPlugin.
I do NOT suggest installing a plugin for such a simple feature. It is not hard for you to figure it out if you have some real examples.
There is an open source project based on symfony named Bookeet. It has embedded MarkDowm feature. It uses markitup as the markdown editor. And it uses php markdown to convert markdown code to html code.
To save your time, go directly to changeset 29f0ba1807 of the Bookeet project(I am sorry that I can't post the hyperlink because SO doesn't permit new user to post more than one hyperlink). You could see clearly what should be done in order to add markdown feature to your website.

How does theming for ziya charts work?

I'm implementing charts using The Ziya Charts Gem. Unfortunately, the documentation isn't really helpful or I haven't had enough coffee to figure out theming. I know I can set a theme using
chart.add(:theme, 'whatever')
Problem: I haven't found any predefined themes, nor have I found a reference to the required format.
If you install the ZiYa plug-in into your Rails application there should be a themes directory where you said. Just copy one of the existing themes, change its name to whatever you want, and then modify it however you like.
Another options for nice Flash charts is Open Flash Chart. I moved from Ziya/SWF Charts to Open Flash Chart when working on Flash charts in a Rails app I was working on. There is also a Rails plug-in for Open Flash Chart. Besides the fact that it is easier to work with, Open Flash Chart is open source, so if you can hack Flash you can customize it.
As I understand it, the themes are used by initializing the theme directory in your ziya.rb file like so:
Ziya.initialize(:themes_dir => File.join( File.dirname(__FILE__), %w[.. .. public charts themes]) )
And you'll need to set up the proper directory, in this case public/charts/themes. It doesn't come with any in there to start with as I recall. Are you having problems past this?
To partly answer my own question, there are some themes in the website sources which can be checked out at
svn co svn://rubyforge.org/var/svn/liquidrail/samples/charting
(then go to /public/charts/themes/)

Resources