ワーキング


  C言語問題と、SQL問題用課題 用ページ

http://winofsql.jp/VA003334/cappvariety060129145316.htm
http://winofsql.jp/VA003334/cappvariety060129161112.htm


  clcomp




  

import myswing.*;
import java.awt.event.*;
import javax.swing.*;

JAVA_MAIN
	MyClass Window = new MyClass();
	Window.setVisible(true);
JAVA_END

#include "hm010.h"
  

  

' ******************************************************
' Java
' ******************************************************
function JavaBuild()

	Dim SrcCode,ErrText

	SrcCode = document.all("Src").value

	if Trim( SrcCode ) = "" then
		alert( "ソースコードがありません   " )
		exit function
	end if

	' ソースコード構築
	Call Initialize( )
	Call ReplaceMacro( )
	SrcCode = document.all("Src").value
	SrcCode = "#include ""head\JAVA.H""" & vbCrLf & SrcCode 

	Dim Cpp

	Set Cpp = Fs.CreateTextFile( "CLCOMP.CPP", True )
	Cpp.WriteLine( SrcCode )
	Cpp.Close()

	' プリプロセス実行
	if document.all("Cygwin").checked then
		Call WshShell.Run( "CMD.EXE /C bat\PPGCC.BAT", 0, True )
	else
		Call WshShell.Run( "CMD.EXE /C bat\PP.BAT", 0, True )
	end if

	Dim strWork,StdText,OutSw

	Set StdText = Fs.OpenTextFile("CLCOMP.i", 1)
	Set Cpp = Fs.CreateTextFile( "CLCOMP.java", True )
	OutSw = False
	Do While not StdText.AtEndOfStream
		strWork = StdText.ReadLine
		if Left( strWork, 1 ) <> "#" then
			Cpp.WriteLine strWork
		end if
	Loop
	StdText.Close()
	Cpp.Close()

	document.all("Bytes").length = 0
	Set CppText = Fs.OpenTextFile("CLCOMP.java", 1)
	Do While not CppText.AtEndOfStream
		strWork = CppText.ReadLine
		document.all("Bytes").length = document.all("Bytes").length + 1
		document.all("Bytes").options(document.all("Bytes").length-1).text = Len(strWork)
	Loop
	CppText.Close()

	' Java コンパイル
	Call WshShell.Run( "CMD.EXE /C bat\JAVABUILD.BAT", 0, True )

	Set ErrText = Fs.OpenTextFile("ERR", 1)
	strWork = ""
	Do While not ErrText.AtEndOfStream
		strWork = strWork & ErrText.ReadLine
	Loop

	if strWork = "" then
		DoJavaExec( )
	else
		DispJavaErr( )
	end if

end function 
  


  VB ADO+フレキシブルグリッド

  

Private Sub Command1_Click()

    Dim Cn As New ADODB.Connection
    Dim Rs As New ADODB.Recordset
    
    ConnectString = _
    "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=C:\Documents and Settings\lightbox\My Documents\販売管理B.mdb;"
    
    Cn.Open ConnectString

    Query = "select * from 商品マスタ"
    Rs.Open Query, Cn
    
    Grid.Cols = Rs.Fields.Count + 1

    Do While Not Rs.EOF
    
        For I = 0 To Rs.Fields.Count - 1
            Grid.TextMatrix(Grid.Rows - 1, I + 1) = Rs.Fields(I).Value & ""
        Next
        Rs.MoveNext
        If Not Rs.EOF Then
            Grid.Rows = Grid.Rows + 1
        End If
    
    Loop
    
    Rs.Close
    Cn.Close

End Sub
  

  XML load.php

  

<?
#$doc = DOMDocument::load('book.xml');
#echo $doc->saveXML();

#$doc = new DOMDocument('book.xml');
#$doc->load('book.xml');
#echo $doc->saveXML();


$dom = domxml_open_file("book.xml");

#$temp = $dom->get_elements_by_tagname("a");
#foreach($a as $nexta) {
#   echo $nexta->get_content();
#}

$ctx = xpath_new_context($dom);
$obj = $ctx->xpath_eval( "//book/title" );

$nodeset = $obj->nodeset;
print $nodeset[0]->get_content();

#$ctx = 
$nodes = $dom->get_elements_by_tagname("book");
#print $nodes[0]->get_content();

print "<hr>";
print "<pre>";
echo htmlentities($dom->dump_mem(true));
print "</pre>";


?>
  

  model.php の更新処理

  

# **********************************************************
# 更新処理
# **********************************************************
function UpdateData( &$SQL ) {

	global $ErrMessage,$Message;
	global $Target,$KeyField,$KeyName;

	if ( $_POST['send'] != '更新' ) {
		return;
	}

	foreach( $_POST as $Key => $Value ) {
		if ( substr( $Key, 0, 3 ) == 'IUL' ) {
			$Renban = str_replace( 'IUL', '', $Key ); 
			$Query = 'update メニューマスタ';
			$Query .= " set URL =  '$Value'" ;
			$Query .= " where id =  {$_POST['id']}" ;
			$Query .= " and 連番 =  $Renban";
			$SQL->Execute( $Query );
		}
		if ( substr( $Key, 0, 3 ) == 'ITL' ) {
			$Renban = str_replace( 'ITL', '', $Key ); 
			$Query = 'update メニューマスタ';
			$Query .= " set タイトル =  '$Value'" ;
			$Query .= " where id =  {$_POST['id']}" ;
			$Query .= " and 連番 =  $Renban";
			$SQL->Execute( $Query );
		}
		if ( substr( $Key, 0, 3 ) == 'IUM' ) {
			$Renban = str_replace( 'IUM', '', $Key ); 
			$Query = 'update メニューマスタ';
			$Query .= " set URL2 =  '$Value'" ;
			$Query .= " where id =  {$_POST['id']}" ;
			$Query .= " and 連番 =  $Renban";
			$SQL->Execute( $Query );
		}
		if ( substr( $Key, 0, 3 ) == 'ITM' ) {
			$Renban = str_replace( 'ITM', '', $Key ); 
			$Query = 'update メニューマスタ';
			$Query .= " set タイトル2 =  '$Value'" ;
			$Query .= " where id =  {$_POST['id']}" ;
			$Query .= " and 連番 =  $Renban";
			$SQL->Execute( $Query );
		}
		if ( substr( $Key, 0, 3 ) == 'IUR' ) {
			$Renban = str_replace( 'IUR', '', $Key ); 
			$Query = 'update メニューマスタ';
			$Query .= " set URL3 =  '$Value'" ;
			$Query .= " where id =  {$_POST['id']}" ;
			$Query .= " and 連番 =  $Renban";
			$SQL->Execute( $Query );
		}
		if ( substr( $Key, 0, 3 ) == 'ITR' ) {
			$Renban = str_replace( 'ITR', '', $Key ); 
			$Query = 'update メニューマスタ';
			$Query .= " set タイトル3 =  '$Value'" ;
			$Query .= " where id =  {$_POST['id']}" ;
			$Query .= " and 連番 =  $Renban";
			$SQL->Execute( $Query );
		}
	}

	return TRUE;
}
  

  excelctl.htm

  

<SCRIPT language=VBScript src=excel.vbs></SCRIPT>
<SCRIPT language=VBScript>

Dim MyBook

' ************************************************
' 開く
' ************************************************
function XlsOpen()

	Target = document.all("Excel").value

	if Trim(Target) = "" then
		alert("Excel ブックを選択して下さい   ")
		Exit Function
	end if

	Set MyBook = ExcelOpen( Target )
	Call ExcelVisible( true )

	ExcelApp.Width = 380

	document.all("OpenButton").disabled = True
	document.all("QuitButton").disabled = False
	document.all("SheetListButton").disabled = False
	document.all("SheetList").disabled = False
	document.all("RangeButton").disabled = False

end function

' ************************************************
' 終了
' ************************************************
function XlsQuit()

	Call ExcelQuit(MyBook)

	document.all("OpenButton").disabled = False
	document.all("QuitButton").disabled = True
	document.all("SheetListButton").disabled = True
	document.all("SheetList").disabled = True
	document.all("SheetList").options.length = 0
	document.all("RangeButton").disabled = True

end function

' ************************************************
' シート一覧
' ************************************************
function XlsSheetList()

	Call ExcelSheetList(MyBook,"SheetList")

end function

' ************************************************
' シート選択
' ************************************************
function XlsSelectSheet()

	Target = document.all("SheetList").value

	Call ExcelSelectSheet(MyBook, Target)

end function

' ************************************************
' 範囲選択
' ************************************************
function XlsRange()

	Target = document.all("SheetList").value
	if Target = "" then
		alert("シートを選択して下さい   ")
		Exit Function
	end if

	Call ExcelSelectSheet(MyBook, Target)

	X1 = Cint(document.all("RangeX1").value)
	Y1 = Cint(document.all("RangeY1").value)
	X2 = Cint(document.all("RangeX2").value)
	Y2 = Cint(document.all("RangeY2").value)

	Call ExcelRange(MyBook, Target, X1, Y1, X2, Y2 )

end function

</SCRIPT>

<HTML>
<HEAD>
	<META http-equiv="Content-type" content="text/html; charset=Shift_JIS">
	<TITLE>excel専用</TITLE>
<STYLE>
	.MyCell {
		background-color:silver
	}
	.MyButton {
		width:200
	}
</STYLE>
</HEAD>
<BODY>

<INPUT type=file name=Excel style='width:400'>
<BR>

<INPUT
	class=MyButton
	name=OpenButton
	type=button
	value="開く"
	onClick='Call XlsOpen()'
><BR>

<INPUT
	class=MyButton
	name=QuitButton
	type=button
	value="終了"
	onClick='Call XlsQuit()'
	disabled
><BR>

<INPUT
	class=MyButton
	name=SheetListButton
	type=button
	value="シート一覧"
	onClick='Call XlsSheetList()'
	disabled
><BR>
<SELECT
	class=MyButton
	name=SheetList
	disabled
	onChange='Call XlsSelectSheet()'
></SELECT><BR>

<INPUT
	class=MyButton
	name=RangeButton
	type=button
	value="範囲選択"
	onClick='Call XlsRange()'
	disabled
><BR>
<SELECT
	name=RangeX1
>
<OPTION value=1>1<OPTION value=2>2<OPTION value=3>3<OPTION value=4>4
<OPTION value=5>5<OPTION value=6>6<OPTION value=7>7<OPTION value=8>8
<OPTION value=9>9<OPTION value=10>10<OPTION value=11>11
<OPTION value=12>12<OPTION value=13>13<OPTION value=14>14
</SELECT>
<SELECT
	name=RangeY1
>
<OPTION value=1>1<OPTION value=2>2<OPTION value=3>3<OPTION value=4>4
<OPTION value=5>5<OPTION value=6>6<OPTION value=7>7<OPTION value=8>8
<OPTION value=9>9<OPTION value=10>10<OPTION value=11>11
<OPTION value=12>12<OPTION value=13>13<OPTION value=14>14
</SELECT>
<SELECT
	name=RangeX2
>
<OPTION value=1>1<OPTION value=2>2<OPTION value=3>3<OPTION value=4>4
<OPTION value=5>5<OPTION value=6>6<OPTION value=7>7<OPTION value=8>8
<OPTION value=9>9<OPTION value=10>10<OPTION value=11>11
<OPTION value=12>12<OPTION value=13>13<OPTION value=14>14
</SELECT>
<SELECT
	name=RangeY2
>
<OPTION value=1>1<OPTION value=2>2<OPTION value=3>3<OPTION value=4>4
<OPTION value=5>5<OPTION value=6>6<OPTION value=7>7<OPTION value=8>8
<OPTION value=9>9<OPTION value=10>10<OPTION value=11>11
<OPTION value=12>12<OPTION value=13>13<OPTION value=14>14
</SELECT>
<BR>

</BODY>
</HTML>

<SCRIPT for=window event=onload language="VBScript">

	window.focus()
	top.resizeTo screen.width / 2, screen.height - 32
	top.moveTo screen.width / 2, 0

</SCRIPT>
<SCRIPT for=window event=onunload language="VBScript">

	Call ExcelQuit(MyBook)

</SCRIPT>
  

  ADO

  

#import "c:\Program Files\Common Files\System\ADO\msado15.dll" \
no_namespace rename("EOF", "EndOfFile")
inline void TESTHR(HRESULT x) {if FAILED(x) _com_issue_error(x);};

_ConnectionPtr pCn = NULL;

void PrintProviderError(_ConnectionPtr pConnection)
{
	ErrorPtr  pErr = NULL;

	if( (pConnection->Errors->Count) > 0)
	{
		printf("ProviderError\n");
		long nCount = pConnection->Errors->Count;
		for(long i = 0; i < nCount; i++)
		{
			pErr = pConnection->Errors->GetItem(i);
			printf("\tError number: %x\n", pErr->Number );
			printf("\tDescription: %s\n", (LPTSTR)pErr->Description);
		}
	}
}

void PrintComError(_com_error &e)
{
	_bstr_t bstrSource(e.Source());
	_bstr_t bstrDescription(e.Description());

	// Print Com errors.
	printf("ComError\n");
	printf("\tCode = %08lx\n", e.Error());
	printf("\tCode meaning = %s\n", e.ErrorMessage());
	printf("\tSource = %s\n", (LPCSTR) bstrSource);
	printf("\tDescription = %s\n", (LPCSTR) bstrDescription);
}

char *ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;"
"Data Source=C:\\Documents and Settings\\lightbox\\My Documents\\db.mdb;";

int main( )
{
	CoInitialize(NULL);

	try {
		TESTHR(pCn.CreateInstance(__uuidof(Connection)));

		_bstr_t ConString;
		ConString.operator = ( ConnectionString );
		printf( "%s\n", (LPTSTR)ConString );
		pCn->Open(ConString, "", "", adConnectUnspecified);

		// ここにコードを書く

		pCn->Close();
		pCn.Release();

	}
	catch (_com_error &e)
	{
		PrintProviderError(pCn);
		PrintComError(e);
	}

	CoUninitialize();
	return 0;
}
  

  myado.h

  

#import "c:\Program Files\Common Files\System\ADO\msado15.dll" \
no_namespace rename("EOF", "EndOfFile")
inline void TESTHR(HRESULT x) {if FAILED(x) _com_issue_error(x);};

_ConnectionPtr pCn = NULL;

void PrintProviderError(_ConnectionPtr pConnection)
{
	ErrorPtr  pErr = NULL;

	if( (pConnection->Errors->Count) > 0)
	{
		printf("ProviderError\n");
		long nCount = pConnection->Errors->Count;
		for(long i = 0; i < nCount; i++)
		{
			pErr = pConnection->Errors->GetItem(i);
			printf("\tError number: %x\n", pErr->Number );
			printf("\tDescription: %s\n", (LPTSTR)pErr->Description);
		}
	}
}

void PrintComError(_com_error &e)
{
	_bstr_t bstrSource(e.Source());
	_bstr_t bstrDescription(e.Description());

	// Print Com errors.
	printf("ComError\n");
	printf("\tCode = %08lx\n", e.Error());
	printf("\tCode meaning = %s\n", e.ErrorMessage());
	printf("\tSource = %s\n", (LPCSTR) bstrSource);
	printf("\tDescription = %s\n", (LPCSTR) bstrDescription);
}

#define ADO_MAIN(constring) \
int main( ) \
{ \
	CoInitialize(NULL); \
	try { \
		TESTHR(pCn.CreateInstance(__uuidof(Connection))); \
		_bstr_t ConString; \
		ConString.operator = ( constring ); \
		printf( "接続文字列は[%s]です\n", (LPTSTR)ConString ); \
		pCn->Open(ConString, "", "", adConnectUnspecified);

#define ADO_END pCn->Close(); pCn.Release(); } catch (_com_error &e) \
	{ \
		PrintProviderError(pCn); \
		PrintComError(e); \
	} \
	CoUninitialize(); \
	return 0; \
}

#define ADO_EXECUTE(Command) \
	pCn->Execute(Command, NULL, adExecuteNoRecords);
  

  

  

#include <stdio.h>
#include "myado.h"

char *ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;"
"Data Source=C:\\Documents and Settings\\lightbox\\My Documents\\db1.mdb;";

ADO_MAIN(ConnectionString)

	_bstr_t Command;
	Command.operator = ("insert into TEST (AAA) values('1234567890')");
	ADO_EXECUTE(Command)

ADO_END
  

  

  

char *ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;"
"Data Source=D:\\lightbox\\db1.mdb;";

ADO_MAIN(ConnectionString)

FILE *fp;
fp = fopen("D:\\lightbox\\27osaka\\27OSAKA.CSV","rt");
char buff[1024];
fgets( buff, 1024, fp );
printf( "%s\n", buff );

fclose(fp);

LboxString LWork;
LWork = "ABCDE";
printf( "%s\n", LWork.szLboxString );

_bstr_t BBuff;
BBuff = "insert into aaa (a,b,c) values(10,'abcd','2005/1/1')";

//ADO_EXECUTE(BBuff)


ADO_END
  

  

  

char *ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;"
"Data Source=D:\\lightbox\\db1.mdb;";

ADO_MAIN(ConnectionString)

_variant_t VBuff;
VBuff = "select * from sample3";
ADO_QUERY(VBuff)
char szBuff[1024];
QUERY_LOOP
	QUERY_GET("x5",szBuff)
	printf("%s\n",szBuff);
QUERY_END

ADO_END
  

  IDENTITY 列の指定値設定ヒント

  

DBCC CHECKIDENT (EXP_社員マスタ, RESEED, 1000)
  

  JavaScript

  

<SCRIPT language=JavaScript>

function getFlashVarsion() {

   var objFlash,i;
   var description,flashPlugin;

   if ( document.all ) {
      for( i = 10; i >= 5; i-- ) {
         try {
            objFlash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i );
            break;
         }
         catch( e ) {
            if ( i == 5 ) {
               i = 0;
               break;
            }
         }
      }
   }
   else {
      i = 0;
      if ( navigator.plugins && navigator.plugins.length > 0) {
         flashPlugin = navigator.plugins['Shockwave Flash'];
         if (typeof flashPlugin == 'object') {
            description = flashPlugin.description;
            for( i = 10; i > 4; i-- ) {
               if (description.indexOf(i+'.') != -1) {
                  break;
               }
            }
            if ( i == 4 ) {
               i = 0;
            }
         }
      }
   }

   return i;

}

</SCRIPT>
<HTML>
<BODY>
<INPUT type="button" value="実行" onClick="alert(getFlashVarsion())">
</BODY>
</HTML>
  

  動画

http://www.microsoft.com/downloads/details.aspx?FamilyID=5691ba02-e496-465a-bba9-b2f1182cdf24&DisplayLang=ja

http://www.divx-digest.com/software/mov2avi.html

http://www.radgametools.com/bnkdown.htm

  

http://r205.jf.land.to

  画像変換

http://www.vector.co.jp/soft/dl/win95/art/se242146.html

http://www.vector.co.jp/soft/win95/art/se279567.html?site=n

  CSS テスト

文章1


文章2




yahoo  google  MSDN  MSDN(us)  WinFAQ  Win Howto  tohoho  ie_DHTML  vector  wdic  辞書  天気 


[work]
claudebot
24/03/28 18:55:03
InfoBoard Version 1.00 : Language=Perl

1 BatchHelper COMprog CommonSpec Cprog CprogBase CprogSAMPLE CprogSTD CprogSTD2 CprogWinsock Cygwin GameScript HTML HTMLcss InstallShield InstallShieldFunc JScript JScriptSAMPLE Jsfuncs LLINK OldProg OracleGold OracleSilver PRO PRObrowser PROc PROconePOINT PROcontrol PROftpclient PROjscript PROmailer PROperl PROperlCHAT PROphp PROphpLesson PROphpLesson2 PROphpLesson3 PROphpfunction PROphpfunctionArray PROphpfunctionMisc PROphpfunctionString PROsql PROvb PROvbFunction PROvbString PROvbdbmtn PROvbonepoint PROwebapp PROwin1POINT PROwinSYSTEM PROwinYOROZU PROwindows ProjectBoard RealPHP ScriptAPP ScriptMaster VBRealtime Vsfuncs a1root access accreq adsi ajax amazon argus asp aspSample aspVarious aspdotnet aw2kinst cappvariety centura ckeyword classStyle cmaterial cmbin cmdbapp cmenum cmlang cmlistbox cmstd cmstdseed cmtxt cs daz3d db dbCommon dbaccess dnettool dos download flex2 flex3 flex4 framemtn framereq freeWorld freesoft gimp ginpro giodownload google hdml home hta htmlDom ie9svg install java javaSwing javascript jetsql jquery jsp jspTest jspVarious lightbox listasp listmsapi listmsie listmsiis listmsnt listmspatch listmsscript listmsvb listmsvc memo ms msde mysql netbeans oraPlsql oracle oracleWiper oraclehelper orafunc other panoramio pear perl personal pgdojo pgdojo_cal pgdojo_holiday pgdojo_idx pgdojo_ref pgdojo_req php phpVarious phpguide plsql postgres ps r205 realC realwebapp regex rgaki ruby rule sboard sc scprint scquest sdb sdbquest seesaa setup sh_Imagick sh_canvas sh_dotnet sh_google sh_tool sh_web shadowbox shgm shjquery shvbs shweb sjscript skadai skywalker smalltech sperl sqlq src systemdoc tcpip tegaki three toolbox twitter typeface usb useXML vb vbdb vbsfunc vbsguide vbsrc vpc wcsignup webanymind webappgen webclass webparts webtool webwsh win8 winofsql wmi work wp youtube