Skip to content

Instantly share code, notes, and snippets.

View arekgotfryd's full-sized avatar
👽
Working from home

Arkadiusz arekgotfryd

👽
Working from home
View GitHub Profile

Plan tematów do omówienia dla przedmiotu Systemy Informacji Przestrzennej

Przykładowy plan stworzony dla studentów na kierunku: Inżynieria Bezpieczeństwa

Wykłady

  1. Charakterystyka danych przestrzennych
    • co to ta długość i szerokość geograficzna
    • wektor vs raster
  • podstawowe operacje na danych przestrzennych:
REVOKE CONNECT ON DATABASE TARGET_DB FROM public;
SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = 'TARGET_DB';
osm2pgsql -c -d osm --cache 4000 -U postgres -W -H localhost -S E:\default.style E:\poland-latest.osm.pbf
if command
`file "wykaz_stacji.csv"`
returns `wykaz_stacji.csv: Non-ISO extended-ASCII text, with CRLF line terminators`
try one of below commands
`recode CP1250..utf8 <x.txt >x.utf8.txt`
`iconv -f CP1250 -t UTF-8 <x.txt >x.utf8.txt`
\// console.log(.*)
console.log(.*)
below removes whole lines and clear whitespaces
.*// debugger.*\n
1. Go to File --> Preferences --> Settings (https://miro.medium.com/max/2000/1*rUzpJjNxAsLTZUMfvrVh1A.png)
2. Type "node debug"
3. Set "Node: Auto attach" option to On
4. run your app `node --inspect <FILE NAME>`
EXEC sp_msforeachdb
'if exists(select 1 from [?].sys.objects where name=''PBS_GenerateReport_sp'')
select ''?'' as FoundInDatabase from [?].sys.objects where name=''PBS_GenerateReport_sp'''
-- Good basic information about OS memory amounts and state (Query 14) (System Memory)
SELECT total_physical_memory_kb/1024 AS [Physical Memory (MB)],
available_physical_memory_kb/1024 AS [Available Memory (MB)],
total_page_file_kb/1024 AS [Total Page File (MB)],
available_page_file_kb/1024 AS [Available Page File (MB)],
system_cache_kb/1024 AS [System Cache (MB)],
system_memory_state_desc AS [System Memory State]
FROM sys.dm_os_sys_memory WITH (NOLOCK) OPTION (RECOMPILE);
------
RESTORE FILELISTONLY
FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SS2008\MSSQL\Backup\Northwind.bak'
RESTORE DATABASE dbname FROM DISK = 'C:\whatever\dbname.bak'
WITH MOVE 'dbname_data' TO 'C:\...\dbname.mdf',
MOVE 'dbname_log' TO 'C:\...\dbname.ldf';