Skip to content

Instantly share code, notes, and snippets.

@cofearabi
cofearabi / jikan.c
Created December 13, 2012 14:48
(c language) display the time. if between 11:32~12:28 return 1 else return 0
#include <stdio.h>
#include <time.h>
int main(void)
{
time_t timer;
struct tm *t_st;
/* 現在時刻の取得 */
time(&timer);
@cofearabi
cofearabi / cs_excel
Created December 14, 2012 16:43
(c#) access to the excel sheet and display the value of A1 cell.
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 / cs_access
Created December 15, 2012 09:10
(C#) display the value of field of the table in access mdb.
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;
@cofearabi
cofearabi / Database0
Last active November 13, 2015 16:20
jackcess sample for creating database
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.sql.Types;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Map;
@cofearabi
cofearabi / CreateTable.java
Created November 14, 2015 07:22
creating table with jackcess
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import com.healthmarketscience.jackcess.ColumnBuilder;
import com.healthmarketscience.jackcess.DataType;
import com.healthmarketscience.jackcess.Database;
import com.healthmarketscience.jackcess.DatabaseBuilder;
import com.healthmarketscience.jackcess.Table;
@cofearabi
cofearabi / DeleteTable.java
Last active November 14, 2015 15:53
java sample code : delete table with jackcess (drop table with jackcess)
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import com.healthmarketscience.jackcess.Cursor;
import com.healthmarketscience.jackcess.Database;
import com.healthmarketscience.jackcess.DatabaseBuilder;
import com.healthmarketscience.jackcess.Table;
@cofearabi
cofearabi / Sample.java
Created November 18, 2015 00:18
get folder name from absolute path of a file
import java.io.File;
import java.util.Stack;
import java.util.StringTokenizer;
public class Sample {
/**
* @param args
@cofearabi
cofearabi / gist:4301879
Created December 16, 2012 01:17
(C#) connect to the access database and display values of fields.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.OleDb;
using System.Data;
using System.Xml.Serialization;
namespace ConsoleApplication2
@cofearabi
cofearabi / gist:4333269
Created December 19, 2012 00:04
(C#) read and write the value of A1 cell of Excel sheet
using System;
using Microsoft.Office.Interop.Excel;
namespace COMAutomation_Excel_CS
{
class Program
{
static void Main(string[] args)
{
string fileName = @"C:\mdb\temp2.xlsx";
@cofearabi
cofearabi / gist:4339565
Created December 19, 2012 19:12
(C#) display the chart extracting from Access mdb database of stock data
private void display_chart(int code , int miniY)
{
chart1.ChartAreas[0].AxisY.Minimum = miniY;
String meigara = code.ToString();
// Resolve the address to the Access database