Skip to content

Instantly share code, notes, and snippets.

View kukurniawan's full-sized avatar

kun kukurniawan

View GitHub Profile
@kukurniawan
kukurniawan / gist:daf153c896172e742e8f
Created November 30, 2014 01:40
Regex Mencari Javascript Comment
(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|(//.*)
@kukurniawan
kukurniawan / gist:8368102
Created January 11, 2014 07:25
CultureInfo
// On Start Apps
Application.CurrentCulture = SetUpCultureInfo();
public static CultureInfo SetUpCultureInfo()
{
var cultureInfo = new CultureInfo("id-ID", true);
var numberFormatInfo = new NumberFormatInfo
{
public void ShowProfitLossReport(int month, int year)
{
InitializeConnectionInfo();
rpt = new Finance.rptProfitLoss();
rpt.ParameterFields["bulan"].CurrentValues.AddValue(month);
rpt.ParameterFields["tahun"].CurrentValues.AddValue(year);
rpt.ParameterFields["span"].CurrentValues.AddValue("MONTHLY");
SetReportLogonInfo(rpt);
crViewer1.ReportSource = rpt;
crViewer1.Zoom(1);
@kukurniawan
kukurniawan / gist:5844998
Created June 23, 2013 13:09
Javascript: Simple Regex
var a = 'Vitalea Sisha'.replace('Sisha', 'Sesha');
document.write(a);
document.write('<br/>');
document.write('<br/>');
var b = a + ' 99 039';
document.write(b);
document.write('<br/>');
document.write(b.replace(/([^0-9])/g, ""));
document.write('<br/>');
@kukurniawan
kukurniawan / gist:5752420
Created June 10, 2013 21:20
Visual Studio Error On Publish : The target "GatherAllFilesToPublish" does not exist in the project
Add in file project
<Target Name="GatherAllFilesToPublish">
</Target>
@kukurniawan
kukurniawan / gist:5742907
Created June 9, 2013 09:14
Database diagram suppoty objects cannot be installed because this database does not have a valid owner
ALTER AUTHORIZATION ON DATABASE::[database name] TO [desire login name]
@kukurniawan
kukurniawan / gist:5696401
Created June 3, 2013 06:28
C# - NullCoalesce
object.value = (item.value == null ? "" : item.value);
to
object.value = (item.value ?? "");
@kukurniawan
kukurniawan / gist:5649040
Last active December 17, 2015 17:49
C# Send Emal
private static void SendMail(Exception err)
{
try
{
var body = new StringBuilder();
body.AppendLine("Services Notification");
body.AppendLine("<br/><br/>");
body.AppendLine("Error On Allocate<br/>");
body.AppendLine(string.Format(ExceptionHelpers.GetMessage(err) + "<br/>"));
body.AppendLine("Error Source<br/>");
@kukurniawan
kukurniawan / gist:5644476
Created May 24, 2013 15:54
ExtJs simple layout
Ext.onReady(
function () {
Ext.QuickTips.init();
//var viewport = new Ext.Viewport({
Ext.create('Ext.panel.Panel', {
width: 1350,
height: 590,
title: 'Sistem Inventory Commuter Line',
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class ClassCetak
Public Shared Sub _ConReport()
Dim _ReportLogonInfos As New TableLogOnInfos
Dim _ReportLogonInfo As New TableLogOnInfo
Dim _ReportConInfo As New ConnectionInfo
Dim _Tables As Tables
Dim _Table As Table