Skip to content

Instantly share code, notes, and snippets.

@Adamwaheed
Adamwaheed / InwardListViewAdaptor
Created March 29, 2016 03:32
InwardListViewAdaptor
public class InwardListViewAdaptor extends ArrayAdapter<Inward> {
public InwardListViewAdaptor(Activity context, ArrayList<Inward> data) {
super(context, R.layout.inward_row_item, data);
}
public View getView(int position, View view, ViewGroup parent) {
///LayoutInflater inflater = parent.getContext().getLayoutInflater();
View rowView = LayoutInflater.from(parent.getContext()).inflate(R.layout.inward_row_item, parent, false);
//View rowView= inflater.inflate(R.layout.voyage_item_row, null, true);
// For an introduction to the Blank template, see the following documentation:
// http://go.microsoft.com/fwlink/?LinkId=232509
(function () {
"use strict";
var app = WinJS.Application;
var activation = Windows.ApplicationModel.Activation;
app.onactivated = function (args) {
if (args.detail.kind === activation.ActivationKind.launch) {
app.directive('articleView', function(){
return {
template: '',
scope: {
media: '='
},
restrict: 'E',
controller: function($scope) {
@Adamwaheed
Adamwaheed / Block_Block.java
Created February 20, 2016 15:04
BlockModel
package mv.com.jps.alerm.Block;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
/**
* Created by amin on 2/20/16.
Intent intent = new Intent();
PendingIntent pendingIntent = PendingIntent.getActivity(MainActivity.this,0,intent,0);
Notification noti = new Notification.Builder(MainActivity.this)
.setTicker("Title")
.setContentTitle("Contant Tutle")
.setContentText("Hekko this is nust")
.setContentText("Content Texty")
.setSmallIcon(android.R.drawable.menu_frame)
.setContentIntent(pendingIntent).getNotification();
@Adamwaheed
Adamwaheed / vhost.sh
Last active June 4, 2024 21:57
Simple Apache Vhost manager
#!/bin/bash
NONE='\033[00m'
RED='\033[01;31m'
GREEN='\033[01;32m'
YELLOW='\033[01;33m'
PURPLE='\033[01;35m'
CYAN='\033[01;36m'
WHITE='\033[01;37m'
BOLD='\033[1m'
@Adamwaheed
Adamwaheed / mbDatepicker
Created March 29, 2015 03:56
Date Picker Directives
app.directive('mbDatepicker', function() {
'use strict';
return {
restrict: 'AE',
replace:true,
scope :{
mbModel : '=',
mbDpConfig: '=',
label : '@',
mbId: '='
'use strict';
angular.module('clientApp')
.controller('staffCtrl', function ($scope,$http,uri,Helper) {
$scope.frm = {};
$scope.deparments = [];
$http.get(uri+'staff').
success(function(data, status, headers, config) {
$scope.staff = data.staff;
$scope.departments = data.departments;
$http({method: 'post', url:uri+'user/store'}).
success(function(data, status, headers, config) {
$location.path('admin/user/edit/'+data);
});
asset is a single asset item type
asset type is a asset classification class
asset location provides where they are located
asset items in location sets each item in the location
asset item is assigned to a user
asset item has purchase record
asset item belongs to a user from an assigned date and can be re-assigned to different user on a different date
asset item can be discarded (state change)
asset item can be returned to an asset inventory when not in use