Skip to content

Instantly share code, notes, and snippets.

View hkkcngz's full-sized avatar
💭
never git up

Hakkı Cengiz hkkcngz

💭
never git up
View GitHub Profile
@hkkcngz
hkkcngz / build.gradle
Last active September 12, 2022 12:55
build.gradle
plugins {
id 'com.android.application'
}
import java.util.regex.Matcher
import java.util.regex.Pattern
/*
sonarqube {
properties {
@hkkcngz
hkkcngz / allatori.xml
Created September 12, 2022 12:55
codes taken from allatori documentations.
<config>
<input basedir="input-jars" single-jar="application.jar">
<jar in="app.jar" out="app-obf.jar"/>
<jar in="input/*.jar" out="output/*.jar"/>
<dir in="in-dir" out="out-dir"/>
</input>
<classpath basedir="library-jars">
<!-- Adding library.jar to the classpath -->
@hkkcngz
hkkcngz / allatori_build.gradle
Last active September 12, 2022 13:33
Allatori, build.gradle
android {
...
// for applications
applicationVariants.all { variant ->
variant.javaCompileProvider.get().doLast {
runAllatori(variant)
}
}
// for libraries
// libraryVariants.all { variant ->
import java.util.*;
class ReadingPractice
{
/* What is the return value of |mystery("hi")|?
*
* (A) hi
* (B) hi5
* (C) hi55
* (D) mn
@hkkcngz
hkkcngz / InheritancePractice.java
Created January 27, 2023 09:39 — forked from bhnascar/InheritancePractice.java
Inheritance practice questions
class InheritancePractice
{
public static abstract class Vehicle
{
public int maxSpeed; // In MPH
public int acceleration; // In 0-60MPH secs
public Vehicle(int maxSpeed, int acceleration) {
this.maxSpeed = maxSpeed;
this.acceleration = acceleration;
@hkkcngz
hkkcngz / Errors.java
Created January 27, 2023 09:39 — forked from bhnascar/Errors.java
Error spotting practice
import java.util.*;
class Errors
{
/* Adds the given value to everything in the ArrayList.
*
* This AddToAll method does not work correctly. Explain
* why.
*
* Which of the following replacements for line 19 will fix the method?
@hkkcngz
hkkcngz / MoreArrayListTest.java
Created January 27, 2023 09:39 — forked from bhnascar/MoreArrayListTest.java
Tests for MoreArrayList
import java.util.*;
class MoreArrayListTest
{
public static void main(String[] args)
{
// Run all the tests.
testNormalize();
testShuffle();
testRemoveDuplicates();
@hkkcngz
hkkcngz / modalgenerator.php
Last active August 31, 2023 06:11
Bootstrap Modal Generator
function generateModal($modalId, $modalTitle, $fields, $extraHtml = "") {
$submitButtonId = $modalId . "Submit";
$submitButtonText = 'Kaydet';
$modal = '<div class="modal fade" id="' . $modalId . '" tabindex="-1" role="dialog" aria-labelledby="' . $modalId . 'Label" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">' . $modalTitle . '</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Kapat">
@hkkcngz
hkkcngz / bootstrap-table-generator.php
Created August 31, 2023 06:12
Bootstrap-table Generator
function generateBootstrapTable($id, $columns, $dataUrl, $extensions = []) {
$tableHtml = "<table id='$id' class='table table-striped'";
// Temel ayarlar
$tableHtml .= ' data-id-field="id" data-unique-id="id" data-toolbar="#toolbar"';
// Eklentileri ve özellikleri ekleyin
foreach($extensions as $key => $value) {
$tableHtml .= ' data-' . $key . '="' . $value . '"';
}
@hkkcngz
hkkcngz / index.html
Created September 4, 2023 19:50
Read More Elements Just Pure CSS
<input type="checkbox" class="read-more-state" id="el-1" />
<div class="read-more-wrap">
${ALLINONEPROJECTS}
</div>
<label for="homeprojects" class="read-more-trigger"></label>