Skip to content

Instantly share code, notes, and snippets.

View japharr's full-sized avatar
🏠
Working from away

Jelil Adesina japharr

🏠
Working from away
View GitHub Profile
@japharr
japharr / cellRowIndexes
Last active August 29, 2015 14:10
Search for data, returning row indexes for jQuery DataTable 1.10
$.fn.dataTable.Api.register('cellRowIndexes()', function (sSearch, iColumn) {
var aOut = [];
if ( iColumn === undefined ) {
this.columns().iterator( 'columns', function ( settings, columns ) {
for ( var i=0, ien=columns.length ; i<ien ; i++ ) {
this.column(i).data()
.filter( function ( value, index ) {
var result = false;
if(value == sSearch) {
result = true;
@japharr
japharr / RowSelect
Created December 18, 2014 13:15
Row selection in jQuery Datatables
var idx = {}; var checkedCount = 0;
$('#deviceTable tbody').on( 'click', 'tr', function () {
$(this).toggleClass('selected');
var data = oTable.fnGetData(this);
//var data OTable.rows('.selected').data();
//console.log(data);
var rowIndex = oTable.fnGetPosition($(this).closest('tr')[0] );
var isSelected = $(this).hasClass('selected');
@japharr
japharr / gist:0e04b31a998abb1eb33a
Created February 14, 2015 11:06
Resources or CDN
<!-- jQuery
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> -->
<script th:src="@{/resources/plugins/jquery/1.11.2/jquery-1.11.2.min.js}"></script>
<script type="text/javascript" th:inline="javascript">
// <![CDATA[
window.jQuery || document.write('<script th:src="@{/resources/plugins/jquery/1.11.2/jquery-1.11.2.min.js}"><\/script>')
// ]]>
</script>
<!-- Latest compiled and minified CSS
import javax.sql.DataSource;
import org.apache.commons.dbcp.BasicDataSource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
package com.jelies.spring3tomcat7.config.quartz;
import org.quartz.spi.TriggerFiredBundle;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.scheduling.quartz.SpringBeanJobFactory;
/**
* This JobFactory autowires automatically the created quartz bean with spring @Autowired dependencies.
@japharr
japharr / index.html
Created March 3, 2016 11:57
In AngularJS How do you check if any Checkbox is Checked or Unchecked?
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
</head>
<body>
<div ng-app="myApp" ng-controller="myController"
ng-init="list=[
{ name:'Computer Architecture' },
{ name:'Advanced Composite Materials'},
@japharr
japharr / HttpPostFormDataActivity.java
Created March 5, 2016 10:58
Spring for Android form data post to server
/*
* Copyright 2010-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@japharr
japharr / snippet.html
Created June 8, 2016 11:45
Font Awesome Verified Icons
<!-- Verifed Icons -->
<span class="fa fa-stack fa-lg">
<i class="fa fa-certificate fa-stack-2x" style="color: green"></i>
<i class="fa fa-check fa-stack-1x fa-inverse"></i>
</span>
<span class="fa fa-stack fa-lg">
<i class="fa fa-certificate fa-stack-2x" style="color: red"></i>
<i class="fa fa-close fa-stack-1x fa-inverse"></i>
</span>
@japharr
japharr / BookResource.java
Last active November 28, 2016 09:49
How to use checkbox on jhipster table and delete selected rows.
...
@Inject
BookRepository bookRepository;
/**
* DELETE /books/:id : delete the "id" book.
*
* @param books the id of the book to delete
* @return the ResponseEntity with status 200 (OK)
*/
@japharr
japharr / .txt
Created January 30, 2017 14:18
Sample
http://197.210.2.132/galooliDevKitService/galooliDevKitService.svc/json/GetDailyInformation?userName=progserver&userHost=mtnn-business&userOrg=zon_mtnn_business&password=sattrak&requestedUnits=1116440&startDate=2017-01-01&endDate=2017-01-16&requestedPropertiesStr=date,unit_id,unit_name,fuel_init,fuel_final