This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var io = require('socket.io')(); | |
io.on('connection', function(socket){console.log('connected');}); | |
io.listen(3000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-carousel-extra='{"blog_id":1,"permalink":"http:\/\/tonykova.users.cs.helsinki.fi\/test-wp\/2014\/04\/23\/test-gallery\/","likes_blog_id":67087184}' class="tiled-gallery type-rectangular tiled-gallery-unresized" data-original-width="474"> | |
<div class="gallery-row" data-original-width="469" data-original-height="210" style="width: 469px; height: 206px;"> | |
<div data-original-width="313" data-original-height="210" class="gallery-group images-1" style="width: 313px; height: 210px;"> | |
<div class="tiled-gallery-item tiled-gallery-item-large"> | |
<a href="http://i0.wp.com/tonykova.users.cs.helsinki.fi/test-wp/wp-content/uploads/2014/04/good_times2.jpg"> | |
<img data-original-width="309" data-original-height="206" data-attachment-id="186" data-orig-file="http://tonykova.users.cs.helsinki.fi/test-wp/wp-content/uploads/2014/04/good_times2.jpg" data-orig-size="603,402" data-comments-opened="1" data-image-meta="{"aperture":"0","credit&q |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function gallery_shortcode( $val, $atts ) { | |
$start_time = microtime( true ); | |
if ( ! empty( $val ) ) // something else is overriding post_gallery, like a custom VIP shortcode | |
return $val; | |
global $post; | |
$this->set_atts( $atts ); | |
$attachments = $this->get_attachments(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Starting position | |
start_lat = 39.0291382; | |
start_lon = 125.7421118; | |
dist = 10000; % in km | |
arclen = distdim(dist, 'km', 'deg', 'earth'); | |
% Open KML file | |
fh = fopen('viz.kml', 'w+'); | |
fprintf(fh, '<?xml version="1.0" encoding="UTF-8"?>\n'); | |
fprintf(fh, '<kml xmlns="http://www.opengis.net/kml/2.2">\n'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequestMapping(value = "reference/bibtex", method = RequestMethod.POST) | |
public String generateBibtex(@Valid @ModelAttribute FileForm fileForm, BindingResult result, Model model, HttpServletResponse response) throws IOException { | |
if (result.hasErrors()) { | |
return "bibtex"; | |
} | |
response.setContentType("application/octet-stream"); | |
response.setHeader("Content-Disposition", "attachment;filename=" + fileForm.getFilename() + ".bib"); | |
InputStream is = new StringBufferInputStream(bibtexService.generateBibtex()); | |
IOUtils.copy(is, response.getOutputStream()); | |
response.flushBuffer(); |