Python function list parser

Berikut adalah konfigurasi notepad++ agar dapat menampilkan daftar fungsi pada FunctionList. Ini akan mempermudah membaca source code python tentunya. 😀

Buka file functionList.xml (gunakan selain editor notepad++), biasanya terdapat di direktori: %appdata%\Notepad++\ kemudian tambahkan/sisipkan baris2 berikut diantara node <parser> :

<parser id="py_function" displayName="Python class" commentExpr="(#.*?$|'''.*?('''|\Z))">
    <classRange mainExpr="(?<=^class ).*?(?=\n\S|\Z)">
        <className>
            <nameExpr expr="\w+(?=[\(|:])"/>
        </className>
        <function mainExpr="(?<=def ).+?(?=:)">
            <functionName>
                <funcNameExpr expr=".*"/>
            </functionName>
        </function>
    </classRange>
    <function mainExpr="(?<=def ).+?(?=:)">
        <functionName>
            <funcNameExpr expr=".*"/>
        </functionName>
    </function>
</parser>

lalu tambahakan/sisipkan baris berikut diantara node <associationMap> :

<association langID="22" id="py_function"/>

Simpan. Jalankan notepad++ dan buka file berekstensi *.py. Tada !!!

Src: http://sourceforge.net/p/notepad-plus/discussion/482781/thread/515001cd/

Python function list parser

PHP Function (ini_set)

Fungsi ini_set pada PHP dapat digunakan untuk menyeting konfigurasi PHP (php.ini) langsung pada saat pengeksekusian skrip dan konfigurasi akan kembali seperti semula ketika pengeksekusian skrip berakhir.

Fungsi:
ini_set ( string $varname , string $newvalue )

Contoh:
Jika pada konfigurasi PHP (php.ini) konfigurasi error_display=Off, sedangkan kita ingin menampilkan error pada halaman web tanpa harus merubah file konfogurasi PHP (php.ini) maka kita dapat menggunakan fungsi ini_set ini.

error_reporting(E_ALL);
ini_set('display_errors','On');

Ok!

PHP Function (ini_set)

Error: “Cannot make a visible window modal”

Question: I’m trying to show a form modally; however, my application raises an exception: “Cannot make a visible window modal.” How do I solve this?

Answer: Set the form’s Visible design property to False.

To do this:

  1. Open your project in Delphi
  2. Open the form that raises the exception.
  3. In the Object Inspector, set the form’s Visible property to False.
  4. Save, compile, and run your application.

The creates the form as an invisible window, which lets you show it modally.

Thank’s to:  Lance Leonard
Source:  http://www.techtricks.com/delphi/makevisible.php

Error: “Cannot make a visible window modal”

.NET Data Providers

.NET Data Providers

  • Microsoft SQL Server
  • MySQL – From CoreLab
  • ODBC Providers
  • OLE DB Providers
  • Oracle Provider – From Microsoft
  • Oracle Provider – From Oracle
  • Oracle Provider – From CoreLab
  • Postgre SQL Direct – From CoreLab
  • Sybase ASE
  • VistaDB Provider

Microsoft SQL Server .NET Data Provider (System.Data.SqlClient)

The Microsoft SQL Server .NET Data Provide allows you to connect to a Microsoft
SQL Server 7.0, 2000, and 2005 databases.

For Microsoft SQL Server 6.5 or earlier, use the OLE DB .NET Data Provider with
the SQL Server OLE DB
Provider (SQLOLEDB).

Using C#:

using System.Data.SqlClient;
...
SqlConnection oSQLConn = new SqlConnection();
oSQLConn.ConnectionString = "Data Source=(local);
" + "Initial Catalog=myDatabaseName;
" + "Integrated Security=SSPI";
//Or
// "Server=(local);" +
// "Database=myDatabaseName;" +
// "Trusted_Connection=Yes";

oSQLConn.Open();
...
oSQLConn.Close();

// If you open the connection, then close the connection!
// Otherwise the connection does not go back into the connection pool.
// Note the SqlDataAdapter will open and close the connection for you
// when calling it's Fill or Update methods. However if the connection
// is already open, the SqlDataAdapter will leave it open.

Using VB.NET:

Imports System.Data.SqlClient
...
Dim oSQLConn As SqlConnection = New SqlConnection()
oSQLConn.ConnectionString = _
"Data Source=(local);" & _ < BR > "Initial Catalog = myDatabaseName;" & _< BR> "Integrated Security=SSPI" oSQLConn.Open()

If connection to a remote server (via IP address):

oSQLConn.ConnectionString = _
"Network Library=DBMSSOCN;" & _
"Data Source=xxx.xxx.xxx.xxx,1433;" & _
"Initial Catalog=myDatabaseName;" & _
"User ID=myUsername;" & _
"Password=myPassword" oSQLConn.Open()

MySQLDirect .NET Data Provider – From CoreLab (CoreLab.MySql)

MySQLDirect .NET is data provider to direct access to MySQL database server for
the Microsoft .NET Framework and .NET Compact Framework. It is completely based
on ActiveX Data Objects for the .NET Framework (ADO.NET) technology. ADO.NET provides
a rich set of components for creating distributed, data-sharing applications. It
is an integral part of the .NET Framework, providing access to relational data,
XML, and application data.

MySQLDirect .NET data provider can be used in the same way as the SQL Server .NET
or the OLE DB .NET Data Provider. Data provider can access MySQL server either using
native MySQL network protocol directly or through MySQL client library. It allows
to create lightweight and fast applications working with MySQL.

Using C#

using CoreLab.MySql;
...
MySqlConnection oMySqlConn = new MySqlConnection();
oMySqlConn.ConnectionString = "User ID=myUsername;" +
"Password=myPassword;" +
"Host=localhost;" +
"Port=3306;" +
"Database=myDatabaseName;" +
"Direct=true;" +
"Protocol=TCP;" +
"Compress=false;" +
"Pooling=true;" +
"Min Pool Size=0;" +
"Max Pool Size=100;" +
"Connection Lifetime=0";
oMySqlConn.Open();

Using VB.NET

Imports CoreLab.MySql
...
Dim oMySqlConn As MySqlConnection = New MySqlConnection()
oMySqlConn.ConnectionString = _ "User ID=myUsername;" & _
"Password=myPassword;" & _
"Host=localhost;" & _
"Port=3306;" & _
"Database=myDatabaseName;" & _
"Direct=true;" & _
"Protocol=TCP;" & _
"Compress=false;" & _
"Pooling=true;" & _
"Min Pool Size=0;" & _
"Max Pool Size=100;" & _
"Connection Lifetime=0"
oMySqlConn.Open()

ODBC .NET Data Provider (System.Data.ODBC)

The Open Database Connectivity (ODBC) .NET Data Provider provides access to native
ODBC drivers the same way the OLE DB .NET Data Provider provides access to native
OLE DB providers.

Note: This namespace, class, or member is supported only in version
1.1 of the .NET Framework.

For SQL Server ODBC Driver

' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection Dim sConnString As String = _
"Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Uid=MyUsername;" & _
"Pwd=MyPassword"
oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()

For Oracle ODBC Driver

' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection Dim sConnString As String = _
"Driver={Microsoft ODBC for Oracle};" & _
"Server=OracleServer.world;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()

For Access (JET) ODBC Driver

' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection Dim sConnString As String = _
"Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=c:\somepath\mydb.mdb;"
oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()

For Sybase System 11 ODBC Driver

' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection Dim sConnString As String = _
"Driver={Sybase System 11};" & _
"SRVR=mySybaseServerName;" & _
"DB=myDatabaseName;" & _
"UID=myUsername;" & _
"PWD=myPassword"
oODBCConnection = New OdbcConnection(sConnString)
oODBCConnection.Open()

For all other ODBC Drivers

' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
"Dsn=myDsn;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()

OLE DB .NET Data Provider (System.Data.OleDb)

The Microsoft .NET Framework Data Provider for OLE DB allow you to use native OLE
DB providers (e.g. Microsoft.JET.OLEDB.4.0) through COM interop to enable data access.

For IBM AS/400 OLE DB Provider

' VB.NET
Imports System.Data.OleDb
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=IBMDA400.DataSource.1;" & _
"Data source=myAS400DbName;" & _
"User Id=myUsername;" & _
"Password=myPassword"
oOleDbConnection = New OleDb.OleDbConnection(sConnString)
oOleDbConnection.Open()

For JET OLE DB Provider

' VB.NET
Imports System.Data.OleDb
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\myPath\myJet.mdb;" & _
"User ID=Admin;" & _
"Password="
oOleDbConnection = New OleDb.OleDbConnection(sConnString)
oOleDbConnection.Open()

For Oracle OLE DB Provider

' VB.NET
Imports System.Data.OleDb
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=OraOLEDB.Oracle;" & _
"Data Source=MyOracleDB;" & _
"User ID=myUsername;" & _
"Password=myPassword"
oOleDbConnection = New OleDb.OleDbConnection(sConnString)
oOleDbConnection.Open()

For SQL Server OLE DB Provider

' VB.NET
Imports System.Data.OleDb
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=sqloledb;" & _
"Data Source=myServerName;" & _
"Initial Catalog=myDatabaseName;" & _
"User Id=myUsername;" & _
"Password=myPassword"
oOleDbConnection = New OleDb.OleDbConnection(sConnString)
oOleDbConnection.Open()

For Sybase ASE OLE DB Provider

' VB.NET
Imports System.Data.OleDb
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=Sybase ASE OLE DB Provider;" & _
"Data Source=MyDataSourceName;" & _
"Server Name=MyServerName;" & _
"Database=MyDatabaseName;" & _
"User ID=myUsername;" & _
"Password=myPassword"
oOleDbConnection = New OleDb.OleDbConnection(sConnString)
oOleDbConnection.Open()

Oracle .NET Data Provider – From Microsoft (System.Data.OracleClient)

The Microsoft .NET Framework Data Provider for Oracle is an add-on component to
the .NET Framework 1.0 that provides access to an Oracle database using the Oracle
Call Interface (OCI) as provided by Oracle Client software. Oracle 8i Release 3
(8.1.7) Client or later must be installed for this provider to function correctly.

Note: This namespace, class, or member is supported only in version
1.1 of the .NET Framework.

Using C#:

using System.Data.OracleClient;
...
OracleConnection oOracleConn = new OracleConnection();
oOracleConn.ConnectionString = "Data Source=Oracle8i;" +
"Integrated Security=SSPI";
oOracleConn.Open();

Using VB.NET:

Imports System.Data.OracleClient
...
Dim oOracleConn As OracleConnection = New OracleConnection()
oOracleConn.ConnectionString = "Data Source=Oracle8i;" & _
"Integrated Security=SSPI";
oOracleConn.Open()

Oracle .NET Data Provider – From Oracle (Oracle.DataAccess.Client)

The Oracle Data Provider for .NET (ODP.NET) features optimized data access to the
Oracle database from a .NET environment. ODP.NET allows developers to take advantage
of advanced Oracle database functionality, including Real Application Clusters,
XML DB, and advanced security. The data provider can be used from any .NET language,
including C# and Visual Basic .NET.

ODP.NET makes using Oracle from .NET more flexible, faster, and more stable. ODP.NET
includes many features not available from other .NET drivers, including Multiple
Active Result Sets (MARS), a native XML data type, the ability to bind array parameters,
and flexible LOB tuning. ODP.NET is designed for scalable enterprise Windows solutions
by providing full support for Unicode and local and distributed transactions. Distributed
transactions are supported using the Oracle Services for MTS.

Using C#

using Oracle.DataAccess.Client;
...
OracleConnection oOracleConn = new OracleConnection();
oOracleConn.ConnectionString = "Data Source=MyOracleServerName;" +
"Integrated Security=SSPI";
oOracleConn.Open();

Using VB.NET

Imports Oracle.DataAccess.Client
...
Dim oOracleConn As OracleConnection = New OracleConnection()
oOracleConn.ConnectionString = _
"Data Source=MyOracleServerName;" & _
"Integrated Security=SSPI";
oOracleConn.Open();

OraDirect .NET Data Provider – From CoreLab (CoreLab.Oracle)

OraDirect .NET is a data provider to direct access to Oracle database server for
the Microsoft .NET Framework and .NET Compact Framework. It is completely based
on ActiveX Data Objects for the .NET Framework (ADO.NET) technology. ADO.NET provides
a rich set of components for creating distributed, data-sharing applications. It
is an integral part of the .NET Framework, providing access to relational data,
XML, and application data.

OraDirect .NET data provider can be used in the same way as the SQL Server .NET
or the OLE DB .NET Data Provider. OraDirect .NET can access Oracle server using
Oracle Call Interface (OCI) or through TCP/IP directly.

Using C#

using CoreLab.Oracle;
...
OracleConnection oOracleConn = new OracleConnection();
oOracleConn.ConnectionString = "User ID=myUsername;" +
"Password=myPassword;" +
"Host=(local);" +
"Pooling=true;" +
"Min Pool Size=0;" +
"Max Pool Size=100;" +
"Connection Lifetime=0";
oOracleConn.Open();

Using VB.NET

Imports CoreLab.Oracle
...
Dim oOracleConn As OracleConnection = New OracleConnection()
oOracleConn.ConnectionString = "User ID=myUsername;" & _
"Password=myPassword;" & _
"Host=(local);" & _
"Pooling=true;" & _
"Min Pool Size=0;" & _
"Max Pool Size=100;" & _
"Connection Lifetime=0"
oOracleConn.Open()

PostgreSQLDirect .NET Data Provider – From CoreLab (CoreLab.PostgreSql)

PostgreSQLDirect .NET is data provider to direct access to PostgreSQL database for
the Microsoft .NET Framework and .NET Compact Framework. It completely based on
ActiveX Data Objects for the .NET Framework (ADO.NET) technology. ADO.NET provides
a rich set of components for creating distributed, data-sharing applications. It
is an integral part of the .NET Framework, providing access to relational data,
XML, and application data.

PostgreSQLDirect .NET data provider can be used in the same way as the SQL Server
.NET or the OLE DB .NET Data Provider.

Using C#

using CoreLab.PostgreSql;
...
PgSqlConnection oPgSqlConn = new PgSqlConnection();
oPgSqlConn.ConnectionString = "User ID=myUsername;" +
"Password=myPassword;" +
"Host=localhost;" +
"Port=5432;" +
"Database=myDatabaseName;" +
"Pooling=true;" +
"Min Pool Size=0;" +
"Max Pool Size=100;" +
"Connection Lifetime=0";
oPgSqlConn.Open();

Using VB.NET

Imports CoreLab.PostgreSql
...
Dim oPgSqlConn As PgSqlConnection = New PgSqlConnection()
oPgSqlConn.ConnectionString = "User ID=myUsername;" & _
"Password=myPassword;" & _
"Host=localhost;" & _
"Port=5432;" & _
"Database=myDatabaseName;" & _
"Pooling=true;" & _
"Min Pool Size=0;" & _
"Max Pool Size=100;" & _
"Connection Lifetime=0"
oPgSqlConn.Open()

Sybase Adaptive Server (ASE) Enterprise .NET Data Provider ( name=”AseClientManagedProvider”>Sybase.Data.AseClient)

The ASE Enterprise .NET Data Provider is an
add-on component to the .NET Framework that allows you to access a Sybase
Adaptive Server Enterprise (ASE) database.

Using C#

using Sybase.Data.AseClient;
...
AseConnection oAseConn = new AseConnection();
oAseConn.ConnectionString = "Data Source=(local);" +
"Initial Catalog=myDatabaseName;" +
"User ID=myUsername;" +
"Password=myPassword"
oAseConn.Open();

Using VB.NET

Imports System.Data.AseClient
...
Dim oAseConn As AseConnection = New AseConnection()
oAseConn.ConnectionString = "Data Source=(local);" & _
"Initial Catalog=myDatabaseName;" & _
"User ID=myUsername;" & _
"Password=myPassword"
oAseConn.Open()

VistaDB (VistaDB.Provider)

The VistaDB
Provider allows you to access a VistaDB
database.

Using C#

using VistaDB.Provider;
...
string connectionString = @"Data Source = C:\VistaDB.vdb3;
Open Mode = ExclusiveReadWrite";
VistaDBConnection connection = new VistaDBConnection(connectionString);
connection.Open();

Using VB.NET

Imports VistaDB.Provider
...
Dim vistaDBConnection As VistaDBConnection = New VistaDBConnection() vistaDBConnection.ConnectionString = @"Data Source = C:\VistaDB.vdb3; Open Mode = ExclusiveReadWrite";
vistaDBConnection.Open()

Source: www.carlprothman.net

.NET Data Providers

System.Data.OracleClient Requires Oracle Client Software Version 8.1.7 Or Greater

Problem Description
——————-

When running an application using the Oracle9i Release 2 (9.2.0.1.0) install
of client software and that attempts to connect to an Oracle database with the
Authenticated User privilege (such as when you use Microsoft’s Internet
Information Server (IIS)) through any of the following programmatic interfaces

1. Oracle Provider for OLE DB
2. Microsoft OLE DB Provider for Oracle
3. Oracle ODBC Driver
4. Microsoft ODBC for Oracle
5. Oracle Objects for OLE (OO4O)
6. Microsoft .NET Framework Data Provider for Oracle

you may receive one of the following errors:

(1) Oracle Provider for OLE DB

(a) Error Type: Microsoft OLE DB Service Components (0x80070005)

Access is denied.

(b) OraOLEDB.Oracle Provider is not registered on the local machine

(2) Microsoft OLE DB Provider for Oracle

(a) Error Type: Microsoft OLE DB Provider for Oracle (0x80004005)

Oracle client and networking components were not found. These
components are supplied by Oracle Corporation and are part of the
Oracle Version 7.3.3 or later client software installation. Provider
is unable to function until these components are installed.

(b) Error Type: Microsoft OLE DB Provider for Oracle (0x80004005)

Oracle error occurred, but error message could not be retrieved
from Oracle.

(3) Oracle ODBC Driver

(a) Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005)

Specified driver could not be loaded due to system error 5 (Oracle
in OraHome92).

(4) Microsoft ODBC for Oracle

(a) The Oracle(tm) client and networking components were not found.
These components are supplied by Oracle Corporation and are part
of the Oracle Version 7.3 (or greater) client software installation.

You will be unable to use this driver until these components have
been installed.

(b) Error number: -2147467259

Error Description: [Microsoft][ODBC Driver Manager] Driver’s
SQLAllocHandle on SQL_HANDLE_ENV failed

(5) Oracle Objects for OLE

(a) while using a GLOBAL.ASA file

Error Type: Active Server Pages (0x0)

An error occurred while creating object ‘OraSession’.

(b) not using a GLOBAL.ASA file

Error Type: Microsoft VBScript runtime (0x800A0046)

Permission denied: ‘CreateObject’

(6) Microsoft .NET Framework Data Provider for Oracle

(a) System.DllNotFoundException: Unable to load DLL (oci.dll).
at System.Data.OracleClient.DBObjectPool.GetObject(Boolean&
isInTransaction)
at System.Data.OracleClient.OracleConnectionPoolManager.
GetPooledConnection(String encryptedConnectionString,
OracleConnectionString options, Boolean& isInTransaction)
at System.Data.OracleClient.OracleConnection.OpenInternal
(OracleConnectionString parsedConnectionString, Object transact)
at System.Data.OracleClient.OracleConnection.Open()
at WCWSItemAvailability.ETAAvailability.SingleAvailability(String
ItemNumber, String BusinessUnit, Int32 OrderQty, Int32&
AvailableQty, Int32& OnHandQty, String& ETADate, Int32& Error)
at WCWSItemAvailability.ETAAvailability.XMLAvailability(String
XMLInput)

(7) Other miscellaneous errors

(a) The Specified Module Could Not Be Found

(b) ORA-00604: error occurred at recursive SQL level 1
ORA-12705: invalid or unknown NLS parameter value specified

(c) Unable to load DLL (OraOps9.dll):

[DllNotFoundException: Unable to load DLL (OraOps9.dll).]

(d) System Error 998 trying to run ASP page

Solution Description
——————–

Oracle 9.2 Client software requires that you give the Authenticated User
privilege to the Oracle Home by following these steps:

1. Log on to Windows as a user with Administrator privileges.

2. Launch Windows Explorer from the Start Menu and and navigate to the
ORACLE_HOME folder. This is typically the “Ora92” folder under the
“Oracle” folder (i.e. D:\Oracle\Ora92).

3. Right-click on the ORACLE_HOME folder and choose the “Properties” option
from the drop down list. A “Properties” window should appear.

4. Click on the “Security” tab of the “Properties” window.

5. Click on “Authenticated Users” item in the “Name” list (on Windows XP
the “Name” list is called “Group or user names”).

6. Uncheck the “Read and Execute” box in the “Permissions” list under the
“Allow” column (on Windows XP the “Permissions” list is called
“Permissions for Authenticated Users”).

7. Re-check the “Read and Execute” box under the “Allow” column (this is
the box you just unchecked).

8. Click the “Advanced” button and in the “Permission Entries” list make
sure you see the “Authenticated Users” listed there with:

Permission = Read & Execute
Apply To = This folder, subfolders and files

If this is NOT the case, edit that line and make sure the “Apply onto”
drop-down box is set to “This folder, subfolders and files”. This
should already be set properly but it is important that you verify this.

9. Click the “Ok” button until you close out all of the security properties
windows. The cursor may present the hour glass for a few seconds as it
applies the permissions you just changed to all subfolders and files.

10. Reboot your computer to assure that these changes have taken effect.

Re-execute the application and it should now work.

Explanation
———–

If you install Oracle9i Release 2 (9.2.0.1.0) on a computer running Windows
with an NTFS partition, the contents of ORACLE_HOME directory will not be
visible to users who are authenticated on that machine. These permissions
were not set properly when the software was installed.

Applications that were working fine with previous versions of Oracle software
will stop working when they upgrade to Oracle 9.2.

NOTE: The application will continue to work if the user has logged onto the
machine as an Administrator.

Any application that is using the Authenticated User privilege will not work.
A notable example would be IIS which might service some of the requests based
on the Authenticated User privileges.

To demonstrate the problem in further detail, you can log on to the operating
system as an authenticated machine user. You won’t be able browse the contents
of the ORACLE_HOME directory demonstrating your inability to load any Oracle DLLs
or make a connection.

Additional Information
———————-

The above error messages may not only be encountered when using Oracle 9.2
client software but may also exists when running into general permissions
issues using third party products on a Windows platform.

Paul
~~~~
Microsoft MVP (Visual Basic)

System.Data.OracleClient Requires Oracle Client Software Version 8.1.7 Or Greater