@bobthechemist I think I'm almost done assembling a Joomla plugin which can be set up in one click and turns on syntax highlighting like here on my site
@bobthechemist I have created a GitHub repo since the original site for JPrettify is no longer available. I have tested this with Joomla 2.5. First, you save the plg_system_jprettify1.0.zip from the repository. Then you log into your Joomla site as admin and go to Extensions -> Extension Manager. Go to Manage and see whether you have an old installation of JPrettify. If yes, mark it and click on Uninstall in the upper right corner.
Then you go to the Install tab and press the Choose File button under Upload Package File. Select the zip file you have downloaded and press Upload and Install. (Alternatively, you can make an Install from URL by giving the raw link to the zip in the repository). After the installation, you should see some general information about the plugin.
Now you go again to Manage and change the status of the JPrettify plugin to Enabled by clicking on the red point. After that, everything should be set up. Go to some article and edit it. To make a highlighted code section, you need to switch to edit the raw html code. In the JCE editor I'm using, there is a button for this named: Source Code Editor. In the pure html view, you insert something like the following:
That's it. Now the code should be highlighted properly. When everything is set up correctly, the s_String must be green!
@bobthechemist Some additional notes: The current colors are exactly the same as we use here on SE. I simply copied the appropriate section from the css file and inserted it in the prettify.css at line 111. If you want to change colors, do it there. To create a new, install-able plugin, just zip the complete plg_system_jprettify folder after you have finished your edits.
If you want to change the used font, then you have to do this in the main css file of the Joomla template you are using. Mine contains the line
pre { font-size:12px; font-family: 'Droid Sans Mono', Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; line-height:19.600000381469727px;}
which is again just copied from SE to match the style (and no, I have no idea who came up with such a line-height).
this is from the main plugin file and the only thing which should happen here is that the function prettyPrint() should be called when the page is loaded.
@bobthechemist This doesn't seem to work in Joomla 3 any more.
@bobthechemist When you look at the source with e.g. the Chrome dev tools you see that the code is successfully injected into the head of your html page.
@rm-rf Maybe I misunderstand you here, because I have no experience myself, but the general flow is as follows:
You write the userscript and it needs to be installed in your browser. In the beginning of the script, you define the URLs on which the script should work. The only thing you have to do is to navigate to an url and the script kicks in.
@rm-rf But exactly this workflow is to slow for me. There must be a way around the problem that you always need to install it first. In Chrome, you can edit it on the fly, but you have to do it with the Chrome dev tools and not your IDE of choice.
@bobthechemist Would is be possible to, instead of adding more leds, use white light and a grating to divvy up the lightwaves and then use a CCD to capture all wavelength components at once? I suggested your spectrophotometer to someone who is in high school for an approx. 100 hours long school project and I'm wondering if there are easy ways to generalize it. Capturing several wavelengths would possibly open up other interesting applications.
btw. great job. I would never have recommended it if I didn't think it was cool :)
@Pickett Yes, I've done this with the camera module that you can buy for the RPi and a fragment of a CD as the diffraction grating. It works reasonably well. I ran in to some website difficulties so the article describing how to set up the spectrometer needs to be re-posted.
@bobthechemist OK neat, I will keep a look out on the website then. Do you think it's possible to get reasonable results from flame emissions spectroscopy using this method and maybe, idk, a lighter?
@Pickett I'm not sure if a lighter or alcohol lamp would be hot enough to get decent emission; however the concept, in principle, should work. I'll work on getting the article back on line, but essentially the LED light was condensed with a 10x lens and diffracted with the CD. I used MMA to both capture the image and process into a rudimentary spectrum. There are some practical considerations (bright enough flame and an enclosure that won't set on fire) but I could see this as a DIY FES.
@bobthechemist I'm currently transferring the IDEA Plugin page to its own Joomla installation which uses version 3. I guess you have seen my question here. I will work the solution into the plugin and test myself with the new page.
@rm-rf That's reassuring. I've participated in 3 betas so far, and all of them have very mediocre voting activity. I guess the only conclusion to draw is that mathematica users are inherently friendly people.
@YvesKlett on the contrary, I've used mma.se as an example of a healthy SE site. I get the feeling that we tend to upvote questions from new users that show some thought and are well-written, even if they turn out to be dupes or will be closed for some other reason.
hi all, i found an answer re memoization that helped me with another issue; i managed to solve it so a question is no longer relevant; however, i would like to share it with the community; what's the best way to do it? tnx in advance