Skip to content

Instantly share code, notes, and snippets.

View marius92mc's full-sized avatar

Marius-Constantin Melemciuc marius92mc

  • Bucharest, Romania
View GitHub Profile
@Override
protected TokenStreamComponents createComponents(String fieldName)
{
final Tokenizer source = new StandardTokenizer();
TokenStream tokenStream = source;
tokenStream = new StandardFilter(tokenStream);
tokenStream = new LowerCaseFilter(tokenStream);
tokenStream = new StopFilter(tokenStream, getStopwordSet());
public static String documentType(String file)
{
String fileType = "Undetermined";
try
{
final URL url = new URL("file://" + file);
final URLConnection connection = url.openConnection();
fileType = connection.getContentType();
}
catch (MalformedURLException badUrlEx)
#
# Makefile for compiling IndexFiles.java and SearchFiles.java
#
# define a makefile variable for the java compiler
#
JCC = javac
# define a makefile variable for compilation flags
# the -g flag compiles with debugging information
\chapter{Primul capitol}
\section{Prima sectiune}
\subsection{Subsectiune}
\subsubsection{Sub-subsectiune}
\begin{center}
{\large\bf Ceva mare si gros :) } %bf = bold font. separi intre acolade daca vrei sa aplici ceva numai unei bucati. daca nu separam textul asta, facea totul bold
\documentclass[a4paper]{book} %asa incepe documentul. orice e pus cu paranteze patrate e parametru optional. aici am ales ca textul sa fie formatat pregatit pentru imprimare pe a4
\usepackage{amsmath,amssymb,amsthm} %pachete pentru simboluri matematice
\usepackage{xcolor} %pachet pentru scris colorat
\usepackage{hyperref} %pachet pentru hyperlinks - sa poti trimite in document catre un alt capitol, de exemplu "vezi capitolul cutare"
\usepackage{caption} %pentru figuri
\usepackage{enumerate} %pentru optiuni de bullets si numbering
\usepackage[margin=1cm]{geometry} %pentru a ingusta marginile
\usepackage{graphicx} %pentru a include poze
\usepackage[Sonny]{fncychap} %sa apara titlurile frumoase. in loc de Sonny, mai poti pune Glenn si Bjornstrup
import tweepy
CONSUMER_KEY = '...'
CONSUMER_SECRET = '...'
API = ""
initial_logged_in_user = ""
def main(request):
""" main view of app, either login page or info page """
vector<string> anagrams(vector<string> &strs)
{
int strs_size = strs.size();
vector<string> result;
map<string, vector<string> > m;
for (int i = 0; i < strs_size; i++)
{
string temp = strs[i];
@marius92mc
marius92mc / git.css
Last active December 4, 2015 08:56 — forked from neilgee/git.css
Git commands and tutorial
Awesome git tutorial, learn by doing in browser.
https://try.github.io/levels/1/challenges/1
/* Set up Git Configuration */
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global core.editor "vi"
git config --global color.ui true
#define BIGPRIME 4979
class Solution
{
private:
typedef struct element
{
int value;
int index;
}Element;
FBRequest* friends_request = [FBRequest requestForMyFriends];
[friends_request startWithCompletionHandler:^(FBRequestConnection* connection,
NSDictionary* result,
NSError* error)
{
NSArray* friends = [result objectForKey:@"data"];
//...
for (NSDictionary<FBGraphUser>* friend in friends)
{
[friends_name addObject:friend.name];