Showing posts with label codes. Show all posts
Showing posts with label codes. Show all posts

Friday, 9 June 2017

Create Multiple Folders Using R Codes

Create Multiple Folders Using R Codes


Below codes show how to create multiple folders without leaving R environment. The code chunk is useful when, for example, doing graphical diagnostics for some statistical models and numerous (e.g., several hundreds or thousands) diagnostic plots will be produced.  Multiple plots can be woven into a html file, and visually checked afterward.  


foldername <- read.table(nameList.txt, header=FALSE, sep=".")[,1]
 
for(i in 1:length(foldername)){
tmp <- foldername[i]
test <- paste("mkdir ", tmp, sep="")
system(test)
}
{ Read More }


Friday, 19 May 2017

Creating QR codes with Qreator

Creating QR codes with Qreator


Qreator lets you create QR codes in Ubuntu. You can choose to encrypt an URL, text, a location or a wifi network. Of course, there are many mobile apps and web services that let you do the same, but an Ubuntu desktop client cant hurt. Furthermore the options to encrypt not only an URL or text, but also a geolocation or the information about a wifi network are something that goes beyond what most services offer. Qreator is fast and easy to use and pretty straightforward, offering a nice, seamless experience for the user. For further information check out the Ubuntu app directory info on Qreator or follow our download link directly to the Ubuntu Software Center:




{ Read More }


Wednesday, 10 May 2017

Creating custom shortcodes codes in Wordpress

Creating custom shortcodes codes in Wordpress


If you need some custom shortcodes, you have to add a few lines in your themes function.php file.

First, create the function that you want to use. In this example well just make the text red between [red][/red].

 function makeRed($atts, $string) { 
return <span style="color: #ff0000;">.$string.</span>;
};

Next we need to register our function.

 function register_shortcodes() { 
add_shortcode(red, makeRed);
};

Finally, we need to make the whole thing work.

 add_action(init, register_shortcodes); 
{ Read More }