stuzer05 / Oracle search source code in functions DDL
1 mi piace
0 forks
1 files
Ultima volta attivo
1 | SELECT |
2 | type, |
3 | name, |
4 | text |
5 | FROM |
6 | all_source |
7 | WHERE |
8 | type IN ( 'FUNCTION', 'PROCEDURE' ) |
9 | AND UPPER(text) like UPPER('%EI_KURS_VAL%') |
10 | ORDER BY type, name |
stuzer05 / Go context.WithCancel() example
0 mi piace
0 forks
1 files
Ultima volta attivo
1 | func doWork(ctx context.Context) { |
2 | for { |
3 | select { |
4 | case <-ctx.Done(): |
5 | return |
6 | default: |
7 | } |
8 | |
9 | time.Sleep(1 * time.Second) |
10 | fmt.Println("doing work...") |
stuzer05 / Oracle view locked tables
0 mi piace
0 forks
1 files
Ultima volta attivo
1 | SELECT o.object_name, o.object_type, l.session_id, l.locked_mode |
2 | FROM v$locked_object l |
3 | JOIN dba_objects o ON l.object_id = o.object_id; |
stuzer05 / Nginx default vhost configuration
0 mi piace
0 forks
1 files
Ultima volta attivo
1 | http { |
2 | |
3 | server { |
4 | listen 80 default_server; |
5 | server_name _; |
6 | |
7 | return 404; |
8 | } |
9 |
stuzer05 / PHP show all errors
0 mi piace
0 forks
1 files
Ultima volta attivo
1 | ini_set('display_errors', 1); |
2 | ini_set('display_startup_errors', 1); |
3 | error_reporting(E_ALL); |
stuzer05 / PHP build tree from sql result
0 mi piace
0 forks
1 files
Ultima volta attivo
1 | function buildTree(array $elements, $parentId = 0) { |
2 | $branch = array(); |
3 | |
4 | foreach ($elements as $element) { |
5 | if ($element['parent_id'] == $parentId) { |
6 | $children = buildTree($elements, $element['id']); |
7 | if ($children) { |
8 | $element['children'] = $children; |
9 | } |
10 | $branch[] = $element; |
stuzer05 / PHP create in-memory zip archive
0 mi piace
0 forks
1 files
Ultima volta attivo
1 | $tmp_file = tmpfile(); |
2 | $tmp_file_path = stream_get_meta_data($tmp_file)['uri']; |
3 | |
4 | $zip = new ZipArchive; |
5 | $res = $zip->open($tmp_file_path, ZipArchive::CREATE); |
6 | |
7 | foreach ($ptah_p7s->Signs as $i => $sign) { |
8 | $zip->addFromString("signature{$i}.p7s", base64_decode($sign)); |
9 | } |
stuzer05 / SQL tables to Go structs
0 mi piace
0 forks
3 files
Ultima volta attivo
1 | SELECT |
2 | 'type ' || table_name || ' struct {' || CHR(10) || fields || CHR(10) || '}' AS models |
3 | FROM |
4 | ( |
5 | SELECT |
6 | table_name, |
7 | REPLACE(RTRIM(XMLAGG(XMLELEMENT(E, CHR(9) || column_name || CHR(9) || type_info || CHR(9) || annotation || CHR(10))).EXTRACT('//text()').GETCLOBVAL(), CHR(10)), '"', '"') AS fields |
8 | FROM |
9 | ( |
10 | SELECT |
Più nuovi
Più vecchi