Kategoriarkiv: Programmering

Delphi: How to Add a Splash Screen to Your Application

From: http://info.borland.com/devsupport/delphi/devcorner/techtips/splash.html Splash Screens are important to your applications. They provide function while adding to your application’s visual appearance and interface. Splash Screens communicate with users of your application. Using Splash Screens in your applications can uniquely distinguish yours from … Læs resten

Udgivet i Old Base, Programmering | Skriv en kommentar

Tilpas vindue efter indholds stoerese[IE]

<body leftmargin=”0″ topmargin=”0″ rightmargin=”0″ onblur=”self.close();”> <div id=’mydiv’> 1blablablalbalbalbalabababfgadZ 2blablablalbalbalbalabababfgadZ 3blablablalbalbalbalabababfgadZ 4blablablalbalbalbalabababfgadZ </div> <script> w=document.all[“mydiv”].clientWidth || document.getElementById(“mydiv”).offsetWidth; h=document.all[“mydiv”].clientHeight || document.getElementById(“mydiv”).offsetHeight; document.write(document.body.offsetWidth); document.write(document.getElementById(“mydiv”).offsetHeight); window.resizeTo((document.body.offsetWidth+6),(document.getElementById(“mydiv”).offsetHeight+30)); </script>

Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar

Størrelsen på en div i javascript [IE Only]

<div id=’mydiv’> Hvor hoej er den her crap div??<br><br><br>Saa hoej? </div> <script> height=document.all[“mydiv”].clientHeight || document.getElementById(“mydiv”).offsetHeight width=document.all[“mydiv”].clientWidth || document.getElementById(“mydiv”).offsetWidth alert(height+’ ‘+width) document.write(document.mytab.style.offsetHeight); </script>

Udgivet i Old Base, Programmering, Windows | Skriv en kommentar

remote editing ower scp in vim

created: August 27, 2003 11:10 complexity: intermediate author: Roberto as of Vim: 6.0 I’m frequently editing files remotely, but if the network traffic is tight, then a normal VIM session turns into a tortuous event. The solution to that was … Læs resten

Udgivet i Knowledge Base, Networking, Programmering | Skriv en kommentar

special front page from certain IP’s in php

This is trivial I know, but I needed to store the code as I don’t use it anymore… $page = $_REQUEST[‘page’]; if ($page == ”) { /* kode for at sætte specifik forside for specifikke IP’er */ $this_ip = split(“\.”, … Læs resten

Udgivet i Knowledge Base, PHP, Programmering | Skriv en kommentar

Advancerede SQL queries

vis alle værdier fra chart_entry og use fra chart_list hvor chart_entry.id svarer til chart_list.nummer og kun en for hvert nummer i chart_list og begræns søgningen til uge 48. select chart_entry.*,chart_list.uge from chart_entry,chart_list where chart_entry.id=chart_list.nummer and uge=’48’; Lidt kryptisk, jeg fatter … Læs resten

Udgivet i Knowledge Base, Old Base, Programmering, SQL | Skriv en kommentar

SQL Match på unix timestamps

select time from system.weblog where time < UNIX_TIMESTAMP(‘2003-11-21 16:00’);  

Udgivet i Knowledge Base, Old Base, Programmering, SQL | Skriv en kommentar

Checking if someone is online with ICQ in PHP

<?php // *** // ICQ tjek funktion // *** function icq_test($uin) { $arr = file( “http://online.mirabilis.com/scripts/online.dll?icq=$uin&img=1”); $len = strlen($arr[1]); if ($len == 96) { return “<b><font color=\”#00FF00\”>Online</font></b>”; } elseif ($len == 83) { return “<b><font color=\”#FF4040\”>Offline</font></b>”; } elseif ($len == … Læs resten

Udgivet i Knowledge Base, Old Base, PHP, Programmering | Skriv en kommentar

Sessions i php

session_start(); if ( $_SESSION[“nick”] != “”)

Udgivet i Knowledge Base, Old Base, PHP, Programmering | Skriv en kommentar

Debug Tools

strace <command> ¸ viser loebende hvad programmet laver ldd viser lib-deps: root@chilibeans:~/openssh-3.7p1# ldd /usr/local/sbin/sshd libutil.so.1 => /lib/libutil.so.1 (0x7002e000) libz.so.1 => /usr/lib/libz.so.1 (0x70040000) libnsl.so.1 => /lib/libnsl.so.1 (0x70060000) libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x70086000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x7018a000) libc.so.6 => /lib/libc.so.6 (0x701c8000) /lib/ld-linux.so.2 => … Læs resten

Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar