Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.
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
import { Categories, Products } from '/lib/collections'; | |
import {Meteor} from 'meteor/meteor'; | |
import {check} from 'meteor/check'; | |
export default function () { | |
Meteor.publish('categoriesList', () => { | |
return [ | |
Categories.find(), |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>LIGHTBOX NA MALUPET</title> | |
<style> | |
.black_overlay{ | |
display: none; | |
position: absolute; | |
top: 0%; | |
left: 0%; |
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
#!/usr/bin/env python | |
# URL SHORTENER CLI v0.01 by 4R5C4R105U5 | |
# CREATED ON SEPT. 14, 2011 | |
# GUI COMING SOON | |
import urllib | |
api = "" # I LEFT THIS BLANK ON PURPOSE | |
login = "" # LEFT BLANK ON PURPOSE AS WELL, USE YOUR OWN LOGIN AND API KEY! :D | |
user_url = raw_input('Enter url to be shortened : ') |
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
print "Enter maximum number : " | |
n = gets.to_i | |
primes = (2..n).to_a | |
i = 0 | |
while primes[i]**2 < primes.last | |
prime = primes[i] | |
primes = primes.select { |num| num == prime || num % prime != 0 } |
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
print "Enter maximum number : " | |
n = gets.to_i | |
primes = (2..n).to_a | |
i = 0 | |
while primes[i]**2 < primes.last | |
prime = primes[i] | |
primes = primes.select { |num| num == prime || num % prime != 0 } |
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
import java.io.*; | |
public class Age { | |
public static void main(String args[]) throws IOException { | |
int age; | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
System.out.print("Enter your age : "); | |
age = Integer.parseInt(br.readLine()); | |
System.out.println("Your age is " + age); | |
} |
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
require 'logger' | |
class TextAnalyzer | |
def initialize(fname) | |
@log = Logger.new('TextAnalyzerClass.log', 'monthly') | |
@log.progname = $0 | |
@text = '' | |
@output = '' | |
File.open(fname) do |f| | |
while line = f.gets |
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
require 'logger' | |
$LOG = Logger.new('analyzer.log', 'monthly') | |
def document_to_string(filename) | |
$LOG.debug("File name : #{filename}") | |
text = '' | |
begin | |
File.open(filename) do |f| | |
while line = f.gets |
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
filename = ARGV | |
fields_and_sizes = [[:track_name, 30], [:artist_name, 30],[:album_name, 30], [:year, 4], [:comment, 30], | |
[:genre, 1]] | |
tag = Hash.new | |
File.open(filename.first) do |f| | |
f.seek(-128, IO::SEEK_END) | |
if f.read(3) == 'TAG' | |
fields_and_sizes.each do |field, size| |