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 <curl/curl.h> | |
int main(void) { | |
CURL *curl; | |
CURLcode res; | |
curl = curl_easy_init(); | |
if(curl) { | |
curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:8000"); |
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
import redis | |
import sys | |
import logging | |
from apscheduler.schedulers.blocking import BlockingScheduler | |
LOG_FILENAME = 'clock.log' | |
logging.basicConfig(level=logging.WARNING) | |
sched = BlockingScheduler() |
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
# -*- coding: utf-8 -*- | |
# | |
from xml.etree import ElementTree | |
import xml.etree.ElementTree as ET | |
from telegram import Updater | |
from telegram.dispatcher import run_async | |
import logging, telegram, json, requests, time, sys | |
from geopy.distance import vincenty | |
reload(sys) |
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
import fdb | |
cn = fdb.connect(dsn='/temp/test.db', user='sysdba', password='masterkey') | |
db = cn.cursor() | |
db.execute("SELECT * FROM languages ORDER BY year_released") | |
print db.fetchall() |
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
org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "shingleString": Plugin init failure for [schema.xml] analyzer/filter: Error instantiating class: 'org.apache.lucene.analysis.position.PositionFilterFactory'. Schema file is /opt/solr/solr/shop/schema.xml | |
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "shingleString": Plugin init failure for [schema.xml] analyzer/filter: Error instantiating class: 'org.apache.lucene.analysis.position.PositionFilterFactory' | |
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "shingleString": Plugin init failure for [schema.xml] analyzer/filter: Error instantiating class: 'org.apache.lucene.analysis.position.PositionFilterFactory'. Schema file is /opt/solr/solr/shop/schema.xml | |
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "shingleString": Plugin init failure for [schema.xml] analyzer/filter: Error instan |
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
Lets say solr is located at /usr/local/solr-5.5.0 . | |
1. bin/solr start | |
2. bin/solr create -c test | |
3. location of new core is here /usr/local/solr-5.5.0/server/solr/test | |
4. location of solrconfig is here /usr/local/solr-5.5.0/server/solr/test/solrconfig.xml | |
5. Open solrconfig.xml - | |
You will find this | |
<schemaFactory class="ManagedIndexSchemaFactory"> | |
<bool name="mutable">true</bool> | |
<str name="managedSchemaResourceName">managed-schema</str> |
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
<!DOCTYPE html> | |
<html ng-app="app"> | |
<head> | |
<title></title> | |
</head> | |
<body ng-controller="vai" ng-show="name"> | |
Its worked | |
</body> | |
<script type="text/javascript" src="/static/lib/angular.min.js"></script> | |
<script type="text/javascript"> |
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
from __future__ import unicode_literals | |
import json | |
import random | |
import urllib | |
import jinja2 | |
from collections import OrderedDict | |
from flask import Flask, jsonify, render_template | |
data = [{'id':2, 'name':'Geroudo'}, |
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
<!DOCTYPE html> | |
<html ng-app="tcc"> | |
<head> | |
<title>CLIENT</title> | |
</head> | |
<body ng-controller="BoardController"> | |
<ul> | |
<li ng-repeat="item in itens">{$ item.name $}</li> | |
</ul> | |
<input type="button" ng-click="vai()" value="+1"> |
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
var app = angular.module('tcc', []).config(function($interpolateProvider) { | |
$interpolateProvider.startSymbol('{$'); | |
$interpolateProvider.endSymbol('$}'); | |
}); | |
app.controller('BoardController', function($scope, $http){ | |
$scope.$on('list-user', function(event, args) { | |
$http.get('/api').success(function(response){ | |
var data = response.data; | |
$scope.itens = data; |
OlderNewer