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
/* | |
* File: main.cpp | |
* Author: patrik | |
* | |
* Created on October 7, 2011, 12:14 PM | |
*/ | |
#include <iostream> | |
#include <stdio.h> | |
#include <stdlib.h> |
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
<?php | |
function cutPrice($price, $delimiter = 3) | |
{ | |
$pieces = array_reverse(str_split(strrev($price), $delimiter)); | |
(string)$fprice = null; | |
(int)$i = 0; | |
foreach($pieces as $piece) | |
{ | |
if($i == 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
/* | |
* File: Regxp.h | |
* Author: solution | |
* | |
* Created on 11. listopad 2011, 16:00 | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <pcre.h> |
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
server { | |
listen 80; ## listen for ipv4; this line is default and implied | |
listen [::]:80 default ipv6only=on; ## listen for ipv6 | |
root /var/www/www; | |
index index.php index.html index.htm; | |
server_name localhost; | |
#server_name _; | |
access_log /var/log/nginx/localhost.access.log; |
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
<?php | |
namespace Gedmo; | |
use Doctrine\Common\Annotations\AnnotationRegistry; | |
use Doctrine\ORM\Mapping\Driver as DriverMappingORM; | |
use Doctrine\Common\Persistence\Mapping\Driver as DriverORM; | |
use Doctrine\ODM\MongoDB\Mapping\Driver as DriverMongodbODM; | |
use Doctrine\Common\Annotations\Reader; | |
use Doctrine\Common\Annotations\CachedReader; |
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 main | |
import ( | |
"fmt" | |
"github.com/PragGoLabs/grupttor" | |
"github.com/PragGoLabs/grupttor/handlers" | |
"github.com/PragGoLabs/grupttor/hooks" | |
"os" | |
"syscall" | |
"time" |
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
func() { | |
// create consumer | |
c := consumer.NewConsumer(q, facade) | |
ch, _ := amqpSession.GetConnection().Channel() | |
interruptor := grupttor.NewGrupttor( | |
handlers.NewAmqpHandler( | |
ch, | |
q.GetTag(), | |
), |
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
func (c Consumer) Consume(interruptor *grupttor.Grupttor) q.ConsumeFunc { | |
return func(deliveries <-chan amqp.Delivery, done chan error) { | |
defer func() { | |
if r := recover(); r != nil { | |
err := errors.New(fmt.Sprintf("internal goroutine paniced: %v", r)) | |
log.Error(err) | |
// print out the stack | |
log.Error(string(debug.Stack())) |
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 client | |
import ( | |
"net/http" | |
"strings" | |
"github.com/pkg/errors" | |
) | |
type RequestFactory struct { | |
schema Schema |
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 client | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"github.com/Solution/go-httpwares" | |
"github.com/Solution/go-httpwares/metrics" | |
"github.com/Solution/go-httpwares/tags" |
OlderNewer