Skip to content

Instantly share code, notes, and snippets.

View Swimburger's full-sized avatar
🍔
Creating full snack content

Niels Swimberghe Swimburger

🍔
Creating full snack content
View GitHub Profile
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_student_detail, container, false);
// Show the dummy content as text in a TextView.
if (mStudent != null) {
//create your view here
scoreGrid=(GridView)rootView.findViewById(R.id.score_grid);
txtTotaal=(TextView)rootView.findViewById(R.id.totale_score);
@Swimburger
Swimburger / dialog_wijzig_score.xml
Created March 19, 2014 18:19
Custom alert dialog example
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/activity_horizontal_margin">
<TextView
android:textAppearance="@android:style/TextAppearance.Large"
@Swimburger
Swimburger / timer
Created April 19, 2014 11:16
Visual timer Processing
int timer;
int timespan=1000*10;
void draw() {
if(millis()>timer+timespan)
{
timer=millis();
moveToNextHashtag();
}
@Swimburger
Swimburger / StudentenHuisService.java
Last active June 16, 2016 06:13
Parsing xml example
package be.howest.nmct.studentenhuizen.data;
import android.util.Xml;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
@Swimburger
Swimburger / Program.cs
Created September 2, 2014 18:22
An example console application that shows you how to create an extension method on a collection that prints its content to the console in a generic way.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
public class Program
{
@Swimburger
Swimburger / app.js
Created October 7, 2014 16:15
Exercise on JS, CSS, SASS, HTML
/**
* Created by Niels on 7/10/2014.
*/
(function init(isTest){
var form=document.getElementById('personForm'),
inputName=document.getElementById('inputName'),
inputLastName=document.getElementById('inputLastName'),
inputAge=document.getElementById('inputAge'),
inputImage=document.getElementById('inputImage'),
persons=document.getElementById('persons');
package be.swimberghe.niels.bieren;
import android.app.Activity;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
@Swimburger
Swimburger / cktableoverride.php
Created September 21, 2015 14:49
Overriding table for ckeditor plugin mybb
<?php
//Disallow direct Initialization for extra security.
if(!defined("IN_MYBB"))
{
die("You Cannot Access This File Directly. Please Make Sure IN_MYBB Is Defined.");
}
// Information
function cktableoverride_info()
@Swimburger
Swimburger / index.html
Created September 28, 2015 21:29
Example directive for google sign in button
<!doctype html>
<html lang="en" ng-app="app" ng-controller="MainController">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta name="google-signin-client_id" content="859037623-6vp83186d483245qiv0lredmp55im54r.apps.googleusercontent.com">
</head>
<body>
<google-sign-in-button button-id="uniqueid" options="options"></google-sign-in-button>
@Swimburger
Swimburger / index.html
Created September 28, 2015 21:31
Manually log in Google Auth in Angularjs controller
<!doctype html>
<html lang="en" ng-app="app">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div ng-view></div>
<script src="https://apis.google.com/js/platform.js"></script>