Skip to content

Instantly share code, notes, and snippets.

View renanpalmeira's full-sized avatar

Renan renanpalmeira

View GitHub Profile
#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");
import redis
import sys
import logging
from apscheduler.schedulers.blocking import BlockingScheduler
LOG_FILENAME = 'clock.log'
logging.basicConfig(level=logging.WARNING)
sched = BlockingScheduler()
# -*- 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)
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()
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
@renanpalmeira
renanpalmeira / solr.txt
Created March 30, 2016 14:30
No schema.xml in SOLR core
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>
<!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">
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'},
<!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">
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;