Wednesday, 12 October 2016

DevFest Western Kenya 2016



GDG DevFests are large, community-run events that can offer speaker sessions across multiple product areas, all-day hack-a-thons, code labs, and more.
GDG Kisumu and GDG MMUST is once again  happy to announce the third annual GDG DevFest 2016 ­ the largest Google related event in Kisumu. The event will be held on 26th November at planet media cinema.
This year we are doing it bigger and better by partnering with three GDGs(GDGMoi,Kericho and MMUST)

Overall objective of the event:
  • Android: new features in Nougat, tools, best practices, frameworks & libraries for building native mobile apps. Kotlin, RxJava, Data Binding, testing, architecture best practices.
  • Web: Web frameworks, AngularJS, HTML5, CSS3, JavaScript, best practices, libraries & tools to build web apps, Polymer, RAIL, Node Js, React JS
  • Cloud & BigData:  Firebase, Kubernetes, Docker, Cloud, PaaS, TensorFlow, Vision API, Speech API, best practices, NoSQL, Spark, Hadoop, Drill, Machine learning
  • IoT: raspberry Pi, Arduino , Picaxe, Low energy Bluetooth Beacons,Smart Devices

Target Audience:
Designers, Developers, and Technology entrepreneurs, both men and women,
We are expecting about 300 people to attend most of whom are doing computer related degrees.From all the GDGs


ABOUT THE SPEAKERS - Call for Proposal.

  1. Mercy Orangi - Google Community manager for developers in Africa. She will be talking about the startup eco system and the various opportunities and support that google has for start ups especially in a growing tech ecosystem like Kisumu.
  2. Eugene Mutai-  Google Developers Expert.
  3. Esther Monchari - Board Member GIT Software developer
  4. Waithera Kunene - Software developer
  5. Dorcas Owino - Wometechmakers Lead Kisumu

Apply now on Eventbrite using this link

Saturday, 25 July 2015

Java MYSQL Tutorial

This Tutorial will help you to create basic crud(Create Read Update Delete) in java using jdbc mysql driver First of all, make sure you have the jdbc.jar file and add it to your project

How to configure the libs in eclipse and add the to your project

Source code


package com.jdbc.demo;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

import javax.swing.JOptionPane;

import com.mysql.jdbc.ResultSet;

public class MainClass {

 public static void main(String[] args) {
  
  try {
   insertData();
   queryData();
   updateData();
   queryData();
   deleteData() ;
  } catch (Exception e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   System.err.print(e.toString());
  }
 }
 
 private static Connection createConnection() throws Exception{
  /**
   * SQL STATEMENTS 
   * 
   * create database test_db;
   * 
   * create table tbl_test(_id int primary key auto_increment,fname text not null,lname text not null);
   * 
   */
  Class.forName("com.mysql.jdbc.Driver");
  String DATABASE_NAME = "test_db";
  return DriverManager.getConnection("jdbc:mysql://localhost/"+DATABASE_NAME, "root", "");
 }
 
 private static void insertData() throws Exception{
  Statement statement = createConnection().createStatement();
  String SQL = "insert into `tbl_test` (`fname`,`lname`) values ('Victor','Mwenda') ";
  boolean success = statement.execute(SQL);
  
  String executionResults = "";
  if(!success){
   executionResults = "Data inserted";
  }else{
   executionResults = "Data not inserted";
  }
  
  JOptionPane.showMessageDialog(null, executionResults);
 }
 private static void queryData() throws Exception{
  Statement statement = createConnection().createStatement();
  String SQL = "select * from `tbl_test`";
  java.sql.ResultSet results = statement.executeQuery(SQL);
  
  int i = 0;
  for(results.first();!results.isAfterLast();results.next()){ //Iterate through the results
   String firstname = results.getString("fname");//fname is the column name . . .this is the array index
   String lastname = results.getString("lname");//lname is the column name . . .this is the array index
   i++;
   String executionResults = i+" Firstname : "+firstname +" Lastname : "+lastname;
   JOptionPane.showMessageDialog(null, executionResults);
   
  }
  
 }
 private static void updateData() throws Exception{
  Statement statement = createConnection().createStatement();
  String SQL = "update `tbl_test` set `fname`='Mwenda',`lname`='Victor' where `fname`='Victor' and `lname`='Mwenda' ";
  boolean success = statement.execute(SQL);
  
  String executionResults = "";
  if(!success){
   executionResults = "Data updated";
  }else{
   executionResults = "Data not updated";
  }
  
  JOptionPane.showMessageDialog(null, executionResults);
 }
 private static void deleteData() throws Exception{
  Statement statement = createConnection().createStatement();
  String SQL = "delete from `tbl_test` where fname='Victor' and lname='Mwenda' ";
  boolean success = statement.execute(SQL);
  
  String executionResults = "";
  if(!success){
   executionResults = "Data deleted";
  }else{
   executionResults = "Data not deleted";
  }
  
  JOptionPane.showMessageDialog(null, executionResults);
 }
}




Download the project resources from here

Saturday, 6 June 2015

How to capture Android Screenshots using batch programming.


Open any editor(I prefer Notepad) and create a .bat file

Add this source code

********************************************************
@echo off
echo This script will capture a screenshot of your android phone...
echo Trying to capture your screen
adb shell screencap -p /sdcard/screenshot.png
echo saving to your computer
adb pull /sdcard/screenshot.png
echo deleting residuals from your phone
adb shell rm -r /sdcard/screenshot.png
echo done
exit
***********************************************************

Save the file now.

Double click to open the file, or open via cmd

Voila!