Search Results

Search found 2 results on 1 pages for 'plash'.

Page 1/1 | 1 

  • LaTeX: Automatic two-column wrapping of content

    - by plash
    Say I have a list of words that need to retain their order, and need to be sorted into two columns. I can do this rather well with a tabular: \begin{tabular}{l l} abc & def \\ ghi & jkl \\ \end{tabular} But doing so makes it rather difficult and time consuming to reorder the list. Is it possible to have an automatically wrapped two-column list? Ideally, I would like to simply enter an ordered list: \begin{magic} abc \\ def \\ ghi \\ jkl \\ \end{magic} And have it wrapped to two columns (as the tabular enables): abc def ghi jkl

    Read the article

  • Javascript force GC collection? / Forcefully free object?

    - by plash
    I have a js function for playing any given sound using the Audio interface (creating a new instance for every call). This works quite well, until about the 32nd call (sometimes less). This issue is directly related to the release of the Audio instance. I know this because I've allowed time for the GC in Chromium to run and it will allow me to play another 32 or so sounds again. Here's an example of what I'm doing: <html><head> <script language="javascript"> function playSound(url) { snd = new Audio(url); snd.play(); delete snd; snd = null; } </script> </head> <body> <a href="#" onclick="playSound('blah.mp3');">Play sound</a> </body></html> I also have this, which works well for pages that have less than 32 playSound calls: var AudioPlayer = { cache: {}, play: function(url) { if (!AudioPlayer.cache[url]) AudioPlayer.cache[url] = new Audio(url); AudioPlayer.cache[url].play(); } }; But this will not work for what I want to do (dynamically replace a div with other content (from separate files), which have even more sounds on them - 1. memory usage would easily skyrocket, 2. many sounds will never play). I need a way to release the sound immediately. Is it possible to do this? I have found no free/close/unload method for the Audio interface. The pages will be viewed locally, so the constant loading of sounds is not a big factor at all (and most sounds are rather short).

    Read the article

1