We Recommend

An Introduction to R An Introduction to R
This tutorial manual provides a comprehensive introduction to R, a software package for statistical computing and graphics. R supports a wide range of statistical techniques, and is easily extensible via user-defined functions written in its own language, or using dynamically loaded modules written in C, C++ or Fortran. One of R's strengths is the ease with which well-designed publication-quality plots can be produced.


Posted By

rolfthomas on 07/04/08


Tagged

javascript js textmate browser selection


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

SpinZ
wizard04


cross-browser way to get selection


Published in: Other 


  1. function getSel(){
  2. var w=window,d=document,gS='getSelection';
  3. return (''+(w[gS]?w[gS]():d[gS]?d[gS]():d.selection.createRange().text)).replace(/(^\s+|\s+$)/g,'');
  4. }

Report this snippet 

You need to login to post a comment.