Skip to content

Instantly share code, notes, and snippets.

View hanstananda's full-sized avatar
🐢
I may be slow to respond.

Hans Tananda hanstananda

🐢
I may be slow to respond.
  • Singapore
View GitHub Profile
@hanstananda
hanstananda / jira_azure_migration.md
Last active October 7, 2022 06:54
Jira to Azure Migration
#include <stdio.h>
#include <string.h>
#define SIZE 10
#define INIT_VALUE 999
void printNames(char nameptr[][80], int size);
void readNames(char nameptr[][80], int *size);
int findTarget(char *target, char nameptr[][80], int size);
int main()
{
char nameptr[SIZE][80], t[40];
import time
print(time.time(),time.clock())
a = ["serve", "rival"," lovely","caveat",
"devote"," irving"," livery"," selves",
"latvian"," saviour"," observe"," octavian",
"dovetail", "levantine"]
b={}
for i in a:
temp=''.join(sorted(i))
# b.append(''.join(sorted(i)))
@hanstananda
hanstananda / cppoutformatwidth.cpp
Last active September 3, 2017 14:45
C++ Output format with certain width
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int a=12345,b=777,c=-111;
cout<<setfill('.')<<setw(15)<<a<<endl;//setting the width to 15, filling the empty digits with '.'
cout<<setw(15)<<setfill('$')<<a<<endl;//fill the empty ones with '$'
@hanstananda
hanstananda / coutbase.cpp
Last active September 3, 2017 06:56
C++ cout output in certain bases
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int a=30,b=-25;
cout<<a<<endl; //cout decimal value of a(normal)
cout<<setbase(16)<<a<<endl; //hex value
#include <iostream>
#include <iomanip>
int main()
{
float a = 98.123;
double b = 98.123;
double c = 98.999;
double d = 98.129;
std::cout<<std::setprecision(1)<<a<<std::endl;
#include <iostream>
using namespace std;
int main()
{
cout<<"Hi\n";
cout<<"I'm"<<'\n';
cout<<"back"<<endl;
return 0;
#include <iostream>
#include <string>
using namespace std;
int main()
{
int x=1000;
string Hi="Again";
cout<<"Hello World!"; //Output "Hello World!" to the screen
@hanstananda
hanstananda / cppcin.cpp
Last active August 2, 2017 07:20
C++ io cin
#include <iostream>
using namespace std;
int main()
{
int i;
cin>>i;
return 0;
}