Skip to content

Instantly share code, notes, and snippets.

View ssi-anik's full-sized avatar
💻
Open to remote work!

Syed Sirajul Islam Anik ssi-anik

💻
Open to remote work!
View GitHub Profile
@ssi-anik
ssi-anik / movingCar.cpp
Last active August 29, 2015 14:26
This program will animate a car, move up, down with up and down arrow key. Pause animation pressing button p. closes window pressing ESCAPE. And moves fast and slow using right and left arrow button
/*
3 ------------------ 4
/ \
/ \
/ \
1 --------------- 2 5 ------------------ 6
| |
| Car Demo |
| |
8 ----------------------------------------------------------------- 7
@ssi-anik
ssi-anik / animatedHouse.cpp
Created July 31, 2015 03:59
Animated house, programmed in C++. Used openGl. Tree animates its branches. A man walk through the front road. Have fun playing with the code.
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <GL/glut.h>
#define PI 3.14159
#define ESCAPE 27
#define PAUSE 112
#define MANUAL 109
#include<stdio.h>
#include<graphics.h>
int driver = DETECT, mode, width, height;
void rotateObject(int inAngle);
int main(void){
width = getmaxwidth() - 100;
height = getmaxheight() - 50;
int inAngle;
#include<stdio.h>
#include<graphics.h>
#include<math.h>
int driver = DETECT, mode, width, height;
void drawCircle(int scaling_factor);
int main() {
width = getmaxwidth() - 100;
height = getmaxheight() - 50;
int scaling_factor;
printf("what is your scaling factory (1-9): ");
#include<stdio.h>
#include<graphics.h>
int driver = DETECT, mode, width, height;
void translation(int x, int y);
int main(void){
width = getmaxwidth() - 100;
height = getmaxheight() - 50;
int scaling_factor;
-> Copy graphics.h and winbgim.h files in include folder of your compiler directory
-> Copy libbgi.a to lib folder of your compiler directory
-> In code::blocks open Settings >> Compiler and debugger >>linker settings ( or, Compiler > General > Linker ( or right side) )
-> Click Add button in link libraries part and browse and select libbgi.a file
-> In right part (ie. other linker options) paste commands "-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32"
@ssi-anik
ssi-anik / androidAsyncTaskExampleWithInterface.java
Last active August 31, 2015 19:11
Shows how to handle the request with interface
interface IHttpResponseListener {
public void onRemoteCallComplete(int statusCode, String json);
}
class RequestGet extends AsyncTask<Void, Void, Boolean> {
private IHttpResponseListener listener = null;
private Context context;
private int statusCode = 0;
private String json = "";
public RequestGet(Context context, IHttpResponseListener listener){
@ssi-anik
ssi-anik / AppNotification.java
Last active October 14, 2015 17:25
Android full application notification system
package put.your.packageName.here;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.provider.Settings;
import android.support.v4.app.NotificationCompat;
import com.example.anik.agent.AllComplaintActivity;
@ssi-anik
ssi-anik / ActivatedUserMiddleware.php
Created November 13, 2015 00:39
Laravel middle ware example
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Auth\Guard;
use Illuminate\Support\Facades\Auth;
class ActivatedUserMiddleware
{
<?php namespace App;
# PLACE IN:
# PROJECT/app/Application.php - CREATE NEW FILE
class Application extends \Illuminate\Foundation\Application {
public function publicPath() {
return $this->basePath;
}
}