This file contains hidden or 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
//STACK DINAMIS (DENGAN LINKED LIST) | |
#include <stdio.h> | |
#include <malloc.h> | |
#include <string.h> | |
typedef struct{ | |
char nim[10]; | |
char nama[50]; | |
float nilai; | |
}nilaiMatKul; |
This file contains hidden or 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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package reversestring; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
/** |
This file contains hidden or 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 | |
$app_id = "YOUR-APP-ID"; | |
$app_secret = "YOUR-APP-SECRET-ID"; | |
$my_url = "YOUR-CALLBACK-URL"; | |
//$my_url = "http://yusyaif.com/facebook"; | |
$code = $_REQUEST["code"]; | |
session_start(); | |
if(empty($code)) { |
This file contains hidden or 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 Tkinter import * | |
import Queue | |
class Application(Frame): | |
""" A GUI Application""" | |
def __init__(self, master): | |
""" Initialize the Frame """ | |
Frame.__init__(self, master) |
This file contains hidden or 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
{* Temperature Converter *} | |
{* Made by Yusuf Syaifudin *} | |
{* as request from Muhammad Angga Prasetyo - 2 December 2014 *} | |
program konverter; | |
{ | |
Formula to convert celsius to farenheit is: | |
F = ((9/5)* C) +32 | |
} |
This file contains hidden or 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
String s = "hksaksaggah";//sample string | |
String temp2="";//string with no duplicates | |
HashMap<Integer, Character> tc = new HashMap<>();//create a hashmap to store the char's | |
char [] charArray = s.toCharArray(); | |
for (Character c : charArray)//for each char | |
{ | |
if (!tc.containsValue(c))//if the char is not already in the hashmap | |
{ | |
temp2=temp2+c.toString();//add the char to the output string | |
tc.put(c.hashCode(),c);//and add the char to the hashmap |
This file contains hidden or 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 test.tokenizer.tokenizerId; | |
import java.util.ArrayList; | |
import yusufs.nlp.tokenizerid.Tokenizer;; | |
/** | |
* Hello world! | |
* | |
*/ |
This file contains hidden or 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
# create topic: /opt/kafka/bin/kafka-topics.sh --create --zookeeper zoo1:2181,zoo2:2181 --topic qmessage --partitions 4 --replication-factor 2 | |
# use official zookeeper image since the wurstmeister/zookeeper image does not currently support zookeeper in replicated mode | |
# (https://github.com/wurstmeister/kafka-docker/issues/372#issuecomment-409166940) | |
# for the first run, set the KAFKA_CREATE_TOPICS: 'qmessage:4:2' to create new topic or use the command above. | |
# For every restart, don't set it, since it will recreate the topic, hence your old data will lost and will make your consumer missing some data. | |
version: '2' | |
services: | |
zoo1: | |
image: zookeeper:3.4.13 | |
container_name: zoo1 |
This file contains hidden or 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 kafka | |
import ( | |
"time" | |
"github.com/segmentio/kafka-go" | |
"github.com/segmentio/kafka-go/snappy" | |
) | |
var writer *kafka.Writer |
This file contains hidden or 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 ( | |
"context" | |
"fmt" | |
"os" | |
"os/signal" | |
"strings" | |
"syscall" | |
"time" |
OlderNewer