var registry = Microsoft.Win32.Registry.ClassesRoot;
var subKeyNames = registry.GetSubKeyNames();
var regex = new System.Text.RegularExpressions.Regex(@"^VisualStudio\.edmx\.(\d+)\.(\d+)$");
foreach (var subKeyName in subKeyNames)
{
var match = regex.Match(subKeyName);
if (match.Success)
Console.WriteLine("V" + match.Groups[1].Value + "." + match.Groups[2].Value);
}
using Saxon.Api;
var xslt = new FileInfo(@"C:\path\to\stylesheet.xslt");
var input = new FileInfo(@"C:\path\to\data.xml");
var output = new FileInfo(@"C:\path\to\result.xml");
// Compile stylesheet
var processor = new Processor();
using System; | |
using ImageMagick; | |
using System.IO; | |
namespace coreImagick | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
StiReport report1 = new StiReport(); | |
report1.RegData(dataSet1); | |
report1.Load("SimpleList.mrt"); | |
report1.ReportDescription = "Demostracion de lista de clientes"; | |
// Export PDF | |
report1.Render(false); | |
report1.ExportDocument(StiExportFormat.Pdf, "my.pdf"); | |
Process.Start("my.pdf"); |
%Compiler Path%lc /target:myapplication.exe /complist:licenses.licx /i:AssemblyPath/Devart.Data.PostgreSql.dll
update pg_database set encoding = pg_char_to_encoding('LATIN1') where datname = 'dbname' |
PostgreSQL for Windows installs the PGDATA directory by default into C:\Program Files\PostgreSQL\some version\data
. This mini-HOWTO explains how to change the default PGDATA directory to another location.
Close all application that are currently connected to your database, then go to Windows Services Management and stop the PostgreSQL service:
You should check the task manager to see if any postgresql.exe instances are still running. If so, DO NOT TERMINATE them, instead close all applications that are still connected to the database. Sometimes services like webservers keep persistent connections. In this case you also should stop these services.
Start the Windows Registry Editor (regedit.exe) and navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pgsql-some version
.
function format2(value) { | |
if (value < 10) return '0' + value; | |
return value; | |
} | |
// Set the date we're counting down to | |
var countDownDate = 3*60000; | |
var now = 0; | |
var element = document.getElementById("demo"); |
SELECT | |
pg_terminate_backend(procpid) | |
FROM | |
pg_stat_activity | |
WHERE | |
-- don't kill my own connection! | |
procpid <> pg_backend_pid() | |
-- don't kill the connections to other databases | |
AND datname = 'database_name' | |
; |