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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog $remote_fs | |
# Required-Stop: $syslog $remote_fs | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
< [hex]: | |
0000 41 4D 51 50 00 00 09 01 AMQP.... | |
waiting for 10,10 | |
waiting for a new frame | |
> 10,10: Connection.start | |
Start from server, version: 0.9, properties: capabilities=(publisher_confirms=1, exchange_exchange_bindings=1, basic.nack=1, consumer_cancel_notify=1), copyright=Copyright (C) 2007-2013 GoPivotal, Inc., information=Licensed under the MPL. See http://www.rabbitmq.com/, platform=Erlang/OTP, product=RabbitMQ, version=3.1.5, mechanisms: AMQPLAIN, PLAIN, locales: en_US | |
< 10,11: Connection.start_ok | |
< [hex]: | |
0000 01 00 00 00 00 00 D9 00 0A 00 0B 00 00 00 9B 07 ......?. ......?. |
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
//Interface tanımlama | |
public interface UserService { | |
@GET("/users/{username}") | |
UserModel getUser(@Path("username") String name); | |
} | |
//Adapter ve servis oluşturma | |
RestAdapter restAdapter = new RestAdapter.Builder() | |
.setEndpoint("https://api.mustafab.net") | |
.build(); |
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
Picasso.with(context).load("http://mustafab.net/images/captain.png").into(imageView); |
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
//Main Container | |
<android.support.v4.view.ViewPager | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/pager" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" /> |
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
function minimax(node, depth, maximizingPlayer) | |
if depth = 0 or node is a terminal node | |
return the heuristic value of node | |
if maximizingPlayer | |
bestValue := -∞ | |
for each child of node | |
val := minimax(child, depth - 1, FALSE)) | |
bestValue := max(bestValue, val); | |
return bestValue | |
else |
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 android.os.Bundle; | |
import android.support.v4.app.FragmentActivity; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.Toast; | |
import com.abhi.barcode.frag.libv2.BarcodeFragment; | |
import com.abhi.barcode.frag.libv2.IScanResultHandler; | |
import com.abhi.barcode.frag.libv2.ScanResult; |
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 | |
$category = 8; | |
$data = array( | |
164, 150, 132, 144, 125, 149, 145, 146, | |
158, 140, 147, 136, 148, 152, 144, 168, | |
126, 138, 176, 163, 119, 154, 165, 146, | |
173, 142, 147, 135, 153, 140, 135, 161, | |
145, 135, 142, 150, 156, 145, 128, 157 | |
); | |
$min = min($data); |
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 com.mustafab; | |
import com.mongodb.*; | |
import twitter4j.*; | |
import twitter4j.conf.ConfigurationBuilder; | |
import java.io.*; | |
import java.net.UnknownHostException; | |
import java.util.Properties; |
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
mongod -port 27001 -dbpath /var/mongodb/rep1 -replSet replicationName | |
mongod -port 27002 -dbpath /var/mongodb/rep2 -replSet replicationName | |
mongod -port 27003 -dbpath /var/mongodb/rep3 -replSet replicationName |
OlderNewer