Skip to content

Instantly share code, notes, and snippets.

@otarza
otarza / gist:4037475
Created November 8, 2012 08:02
homework1
USE [homework1]
GO
/****** Object: Table [dbo].[birds] Script Date: 11/08/2012 12:02:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[birds](
@otarza
otarza / DB
Created June 27, 2013 20:36
Database interaction layer for PHP and MySql
<?php
/**
* Created by JetBrains PhpStorm.
* User: Otar
* Date: 2/22/13
* Time: 8:02 AM
* To change this template use File | Settings | File Templates.
*/
class DB {
private $pdo_connection;
ListView hedgeList = chveulebrivi listview;
//R.layout.row_hedge - sheni sheqmnili custom row.
//HedgeHelper cards - romelic inaxavs obieqtebs.
HedgeListAdapter adapter = new HedgeListAdapter(HedgehogActivity.this, R.layout.row_hedge, cards);
hedgeList.setAdapter(adapter);
///HedgeListAdapter
exports.search = function (req, response) {
var term = req.params.term;
response.send("hello search: " + term);
if (req.session.oauth && req.session.oauth.access_token) {
var text = req.body.text;
var result = "fail";
oa.get(
<form action="https://secure.pay1.de/client-api/" method="POST">
<input type="hidden" name="portalid" value="2000000">
<input type="hidden" name="aid" value="10000">
<input type="hidden" name="mode" value="test">
<input type="hidden" name="request" value="bankaccountcheck">
<input type="hidden" name="successurl" value="http://www.yoursite.com/success.php">
<input type="hidden" name="errorurl" value="http://www.yoursite.com/error.php">
<input type="hidden" name="hash" value="70eaec2a33fa1b4674c0b1ge5e982966">
<input type="hidden" name="responsetype" value="REDIRECT">
<input type="hidden" name="language" value="en">
123
@otarza
otarza / vaxo
Created November 7, 2013 08:07
<?php
require_once __DIR__ . '/config.php';
function db_connect() {
static $conn;
if (empty($conn)) {
$conn = mysqli_connect(
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-45966899-1', 'unihack.ge');
ga('send', 'pageview');
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-45966899-1']);
_gaq.push(['_setDomainName', 'unihack.ge']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
@otarza
otarza / #2
Created January 28, 2014 19:26
#include<stdio.h>
#include<iostream>
using namespace std;
struct node {
int x;
node *next;
node *prev;
};