Implementing High Performance Parsers in Java
This file contains 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
#include <stdio.h> | |
#include "numbers.h" // https://gist.github.com/911872 | |
int main() | |
{ | |
struct numbers a; | |
struct numbers b; | |
/* | |
I feel like a tool, sort of. I spent more time than I should admit using | |
generateRandoms here, forgetting that mergesort can only merge two arrays |
This file contains 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
// This is the .cpp file for the binomial heap implementation of a | |
// Priority Queue, demonstrates some pointer work. All code on this | |
// page is mine. | |
// http://www.stanford.edu/class/cs106x/handouts/26-Assignment-4-PQueue.pdf | |
#include "pqueue-binomial-heap.h" | |
BinomialHeapPQueue::BinomialHeapPQueue() | |
{ | |
logSize = 0; |
This file contains 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
package niochat; | |
import java.net.*; | |
import java.nio.*; | |
import java.nio.channels.*; | |
import java.io.IOException; | |
import java.util.*; | |
public class NiochatServer implements Runnable { | |
private final int port; |
This file contains 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
//============================================================================ | |
// Name : OctaneCrawler.cpp | |
// Author : Berlin Brown (berlin dot brown at gmail.com) | |
// Version : | |
// Copyright : Copyright Berlin Brown 2012-2013 | |
// License : BSD | |
// Description : This is the simplest possible web crawler in C++ | |
// Uses boost_regex and boost_algorithm | |
//============================================================================ |
This file contains 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
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <climits> | |
#include <exception> | |
#include <set> | |
using namespace std; | |
struct Edge { |
- Input: A graph G with non-negative edge weights, a source vertex s and a target vertex t.
- Output: The shortest path between s and t in G.
- O((|E| + |V |)log |V |) is pretty fast, right?
- For a graph of USA with 20M vertices and 50M edges it will work for several seconds on average
- Millions of users of Google Maps want the result in a blink of an eye, all at the same time
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Предлагается написать программу для извлечения из текста ссылок на нормативные акты. Ссылка — это подстрока вида "ч. 3 ст.19 АПК РФ", "ст.ст. 15, 309 ГК РФ", "части 6, 7 статьи 210 АПК РФ". Программа должна находить такие подстроки в тексте и приводить их к нормальному виду, например:
В соответствии с частью 1 статьи 123 и частью 2 статьи 215 Арбитражного процессуального
кодекса Российской Федерации дело рассмотрено без участия представителей сторон.
[17, 116] # начало и конец подстроки со ссылкой.
[