Skip to content

Instantly share code, notes, and snippets.

@cofearabi
cofearabi / AndroidManifest.xml
Created October 28, 2014 22:12
Android sample appli which read Excel file and display the data of the sheet.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.andexcelread0"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
@cofearabi
cofearabi / AndroidManifest.xml
Last active July 21, 2020 12:50
Android sample connect to the mysql server database and get the values of field of table , and display them.
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
@cofearabi
cofearabi / MainActivity.java
Created June 23, 2013 17:25
Android sample of Listview
package com.example.listviewsample2;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
@cofearabi
cofearabi / scrape4_mysql.pl
Created June 16, 2013 03:40
get stock data from yahoo and put them into mysql database server
#!/usr/bin/perl
use strict;
use warnings;
use Web::Scraper;
use URI;
use Encode;
# use Spreadsheet::WriteExcel;
use strict;
use warnings;
use utf8;
@cofearabi
cofearabi / cs_excel_write
Created December 15, 2012 00:03
(C#) write excel file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
@cofearabi
cofearabi / gist:4443524
Last active June 15, 2016 15:40
(C#) diaplay a chart from csv data
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using System.Data.OleDb;
@cofearabi
cofearabi / gist:5864873
Created June 26, 2013 04:57
get excel data and put data into access
Private Sub CommandButton1_Click()
Dim int_sheets_no
'int_sheets_no = Int(InputBox("", "", "1"))
int_sheets_no = 1
@cofearabi
cofearabi / gist:5845135
Created June 23, 2013 14:05
VBA Macro which gets the Excel data and put it into MySQL database.
Sub send_mysql()
Dim int_sheets_no
int_sheets_no = 1
@cofearabi
cofearabi / MainActivity.java
Created February 26, 2013 09:36
Android sample . When buntton is clicked , it displays message with Toast.
package com.example.andtoast;
import android.os.Bundle;
import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
@cofearabi
cofearabi / MainActivity.java
Last active December 14, 2015 04:39
Android sample using Thread, Handler
package com.example.andrunnable2;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;