SQLite enforces foreign key constraints
http://sqlite.org/releaselog/3_6_19.html
A pragma statement has to be execute on the database to enable the enforcement:
PRAGMA foreign_keys = true;
Measuring disk I/O speed
http://www.objectso.nl/
Using this tool, testing the read/write performance of 8KB, 16KB, 32KB, etc, sized blocks is a breeze. The size and location of the test file is also configurable.
Note: on the website the tool is called "disk throughput tester".
Winload.exe missing or corrupt (0xc000000e)
0xC000000E \WINDOWS\SYSTEM32\WINLOAD.EXE INFO: THE SELECTED ENTRY COULD NOT BE LOADED BECAUSE THE APPLICATION IS MISSING OR CORRUPT
What made this case different from all others that I could find on the internet is that the system partition was no longer accessible. It was not assigned the C drive letter.
So, the suggestions I could find did not work. They include, but are not limited to:
- Repair using the Vista installation disc
- From the Vista installation disc's command prompt option:
bootrec /fixmbr -> completes succesfully, but didn't fix the issue - From the Vista installation disc's command prompt option:
bootrec /fixboot -> no system partition can be found - From the Vista installation disc's command prompt option:
bootrec /scanos -> no system partition can be found - Perform the following three commands from the Vista installation disc's command prompt option:
x:\windows\system32\bcdedit /set {default} device partition=c:
x:\windows\system32\bcdedit /set {default} osdevice partition=c:
x:\windows\system32\bcdedit /set {bootmgr} device partition=c:
-> no system partition can be found
Bootrec is the "fdisk /mbr" for Windows Vista and Windows 7.
If you got here and you still have a C drive letter assigned and that drive is accessible, then the suggestions above might work. I suggest you try them first.
If you don't have a system drive letter, then the resolution is fairly simple:
Start the repair option from a Windows 7 installation disk.
It detected that there were issues with the current Vista installation and fixed them. We rebooted the system and all was well again. No data loss and still running Vista.
We used a Windows 7 Ultimate x64 disk to fix a Windows Vista Ultimate x32 OS.
Cursor variants in Oracle 10g
Examples of different types of cursors. Each has its own pros and cons. Example 1 is the most straightforward and easiest to understand. The variants in example 3 perform better. I've put them here for reference.
-- 1) implicit cursor DECLARE l_old_tbs VARCHAR(100) := 'USERS'; BEGIN FOR item IN ( SELECT OWNER, TABLE_NAME FROM ALL_TABLES WHERE TABLESPACE_NAME = l_old_tbs ) LOOP dbms_output.put_line(item.TABLE_NAME); END LOOP; END; -- 2) explicit cursor DECLARE l_old_tbs VARCHAR(100); CURSOR c1 IS (SELECT OWNER, TABLE_NAME FROM ALL_TABLES WHERE TABLESPACE_NAME = l_old_tbs); BEGIN l_old_tbs := 'USERS'; -- set variable here, otherwise it is NULL! FOR item IN c1 LOOP dbms_output.put_line(item.TABLE_NAME); END LOOP; END; -- 3a) local collection variable with multiple fields using BULK COLLECT and FORALL CREATE TABLE TEST1 (OWNER VARCHAR(30), TABLE_NAME VARCHAR(30)); DECLARE l_old_tbs VARCHAR(100); TYPE r_tmp IS RECORD (OWNER ALL_TABLES.OWNER%TYPE, TABLE_NAME ALL_TABLES.TABLE_NAME%TYPE); TYPE t_tmp IS TABLE OF r_tmp; tmp t_tmp; BEGIN l_old_tbs:= 'USERS'; -- fill local collection "tmp" with one bulk operation SELECT OWNER, TABLE_NAME BULK COLLECT INTO tmp FROM ALL_TABLES WHERE TABLESPACE_NAME = l_old_tbs; -- update/insert/delete with one bulk operation; select not permitted. -- no "loop" keyword, because following statement is performed as one batch. Check dbms_output, this is only one line. -- always use "commit" statement FORALL i IN tmp.FIRST..tmp.LAST INSERT INTO TEST1 VALUES tmp(i); dbms_output.put_line('first: 'tmp.FIRST', last: 'tmp.LAST); COMMIT; END; -- 3b) local collection variable with single field using BULK COLLECT and FORALL DECLARE l_old_tbs VARCHAR(100); TYPE t_tmp IS TABLE OF ALL_TABLES.TABLE_NAME%TYPE; tmp t_tmp; BEGIN l_old_tbs:= 'USERS'; -- fill "tmp" with one bulk operation SELECT TABLE_NAME BULK COLLECT INTO tmp FROM ALL_TABLES WHERE TABLESPACE_NAME = l_old_tbs; -- update/insert/delete with one bulk operation; select not permitted. -- no "loop" keyword, because following statement is performed as one batch. -- always use "commit" statement FORALL i IN tmp.FIRST..tmp.LAST INSERT INTO TEST1 (TABLE_NAME) SELECT tmp(i) FROM DUAL; COMMIT; END; -- 3c) local collection variable with multiple fields using BULK COLLECT and FOR SET SERVEROUTPUT ON; SET SERVEROUTPUT ON SIZE UNLIMITED; DECLARE l_old_tbs VARCHAR2(100); TYPE r_tmp IS RECORD (OWNER ALL_TABLES.OWNER%TYPE, TABLE_NAME ALL_TABLES.TABLE_NAME%TYPE); TYPE t_tmp IS TABLE OF r_tmp; tmp t_tmp; BEGIN l_old_tbs:= 'USERS'; -- fill local collection "tmp" with one bulk operation SELECT OWNER, TABLE_NAME BULK COLLECT INTO tmp FROM ALL_TABLES WHERE TABLESPACE_NAME = l_old_tbs; -- update/insert/delete with one bulk operation; select not permitted. -- with "loop" statement. Check dbms_output, there are as much lines as tmp.LAST. -- always use "commit" statement FOR i IN 1..tmp.COUNT LOOP --INSERT INTO TEST1 VALUES tmp(i); dbms_output.put_line('tablename: '||tmp(i).TABLE_NAME||', last: '||tmp.LAST); COMMIT; END LOOP; END; -- 3d) local collection variable with single field using BULK COLLECT and FOR SET SERVEROUTPUT ON; SET SERVEROUTPUT ON SIZE UNLIMITED; DECLARE i INT := 0; l_tabname VARCHAR2(100); TYPE r_tmp IS RECORD (TABLE_NAME USER_TABLES.TABLE_NAME%TYPE); TYPE t_tmp IS TABLE OF r_tmp; tmp t_tmp; BEGIN -- fill local collection "tmp" with one bulk operation SELECT TABLE_NAME BULK COLLECT INTO tmp FROM USER_TABLES WHERE UPPER(TABLE_NAME) LIKE 'TTMP_%'; -- update/insert/delete with one bulk operation; select not permitted. -- with "loop" statement. Check dbms_output, there are as much lines as tmp.LAST. -- always use "commit" statement FOR i IN 1..tmp.COUNT LOOP dbms_output.put_line(i); l_tabname := 'DROP TABLE ' || tmp(i).TABLE_NAME; dbms_output.put_line(l_tabname); EXECUTE IMMEDIATE l_tabname; COMMIT; END LOOP; END; -- 4) use a temp table CREATE GLOBAL TEMPORARY TABLE tmp (OWNER VARCHAR(30), TABLE_NAME VARCHAR(30);
Create handwritten truetype font for free using fontcapture
Another advantage is that if you own a tablet pc or a (Wacom) pentablet, you can use it to fill in the template digitally. No need to print and scan the template.
The mechanism can also be used to trace bitmaps, since the tool does not distinguish between characters or other designs. The result is a font with vectorized images.
Alternatives:
- Fontifier (http://www.fontifier.com/): almost identical to Fontcapture, but charges $9 per font
- Yourfonts (http://www.yourfonts.com/): almost identical to Fontcapture, but charges $9 per font
- Fontgrinder: (http://www.fontgrinder.com/): idem, but charges even more: $14.95
- Fontstruct (http://fontstruct.fontshop.com/): free, but doesn't support handwritten fonts. The website has an editor for constructing your own font from predefined building blocks. A sort of "lego-for-font" method.
UPDATE 20110727: There is a new website offering the same free funtionality: http://www.myscriptfont.com
Netsend
http://www.lantalk.net/netsend/
List of freeware tools
- Total Commander (shareware): http://www.ghisler.com/
- 7-Zip: http://www.7-zip.org/
- VirtualCloneDrive: http://www.slysoft.com/nl/virtual-clonedrive.html
- NTFS Undelete: http://www.ntfsundelete.com/
- CDBurnerXP: http://cdburnerxp.se/en/download
- Atto Disk Benchmark: http://www.attotech.com/products/product.php?sku=Disk_Benchmark
- Notepad2: http://www.flos-freeware.ch/notepad2.html
- ExifTool & ExifToolGUI: http://www.sno.phy.queensu.ca/~phil/exiftool
- Now3d: http://www.now3d.it/Eng/
- Blender: http://www.blender.org/
- Sketchup: http://sketchup.google.com/
- FastStone Image Viewer: http://www.faststone.org/
- Paint .Net: http://www.getpaint.net/
- IcoFX: http://www.icofx.ro/
- Screenhunter Free: http://wisdom-soft.com/products/screenhunter.htm
- Inkscape: http://www.inkscape.org/
- FontForge: http://fontforge.sourceforge.net/
- Super: http://www.erightsoft.com/
- MediaCoder: http://mediacoder.sourceforge.net/download.htm
- PDFsam (split and merge): http://www.pdfsam.org/
- Bullzip PDF Printer: http://www.bullzip.com/products/pdf/info.php
- A-PDF extractor (PDF to text): http://www.a-pdf.com/text/index.htm
- Renoise: http://www.renoise.com/
- Zoom Player 5.02 (6+ is no longer free): http://download.cnet.com/Zoom-Player-Standard/3000-2139_4-10068896.html?tag=mncol
- Media Tagger (Ladislav Dufek): http://www.softpedia.com/get/Multimedia/Audio/Tag-Editors/Media-Tagger.shtml
- Subtitle Workshop: http://www.urusoft.net/home.php?lang=1
- Divx 7: http://www.divx.com/en/win
- Youwashock: http://youwashockvst.googlepages.com/
- Stomper: http://www.lysator.liu.se/~zap/stomper/index2.html
- MP3Val: http://mp3val.sourceforge.net
- T@B ZS4: http://www.zs4.net
- PostgreSQL (as a service): http:/www.postgresql.org
- SQL Server Compact 3.5 (in-process): http://www.microsoft.com/Sqlserver/2005/en/us/compact.aspx
- SQLite (in-process): http://www.sqlite.org/
Great directors and actors
Directors
- Darren Aronofski: Pi, Requiem For A Dream, The Wrestler
- Christopher Nolan: Memento, Insomnia, Batman Begins, The Prestige, The Dark Knight
- Clint Eastwood: The Bridges Of Madison County, Mystic River, Million Dollar Baby, Letters From Iwo Jima, Changeling, Gran Torino
- David Fincher: Se7en, The Game, Fight Club, Zodiac, The Curious Case Of Benjamin Button
- Christian Bale: Empire Of The Sun, Equilibrium, The Machinist, Batman Begins, Harsh Times, The Prestige, 3:10 To Yuma, The Dark Knight
- Joseph Gordon-Levitt: Mysterious Skin, Brick, The Lookout
Oracle SQL Developer screen redraw glitch
Start with just the sqldeveloper.conf adjustment. If that doesn't fix it, then perform all steps.
Steps to solve the issue:
- Add or replace the attribute of the following config file.
..\sqldeveloper\bin\sqldeveloper.conf
AddVMOption -Dsun.java2d.noddraw=true - Install the most recent jdk.
Last seen here: http://java.sun.com/javase/downloads/index.jsp
Select the Java SE Development Kit (JDK). At this time, JDK 6 Update 16 is the most recent version. Install it in C:\Program Files\Java\jdk1.6.0_16 - Add or replace the attributes of the following config files.
..\ide\bin\jdk.conf
SetJavaHome C:\Program Files\Java\jdk1.6.0_16
..\ide\bin\ide.conf
AddVMOption -Xmx256M
AddVMOption -Dsun.awt.keepWorkingSetOnMinimize=true
Remove visual rings / circles from pen tablet in Windows 7
How to disable these rings in Windows 7?
- Disable the "Tablet PC Input Service".
This solved the problem for me for a while... until the rings came back for no apparent reason. I suspect because of an automatic update or updated Wacom driver, that reactivated the tablet pc ring feature. - Uninstall Tablet PC Components.
Control panel -> Programs and Features -> Turn Windows features on or off -> uncheck Tablet PC Components. Windows needs to be restarted after this. - Kill the wisptis.exe process, e.g. via taskmanager.
Then 1) rename\windows\system32\wisptis.exe to wisptis.bak, 2) create a textfile called wisptis.exe with nothing in it. Alternatively: open properties for wisptis.exe, go to security tab and "deny full control" for the "everyone" account. If "everyone" is not visible, click edit, click add, type in "everyone" and click ok.
UPDATE 20100305: The wisptis.exe process still comes up when running some .Net applications. Even when the above tip is applied. Most probably it is copied from the protected cache / version history Windows keeps. To prevent this, download the tool "process blocker":
http://www.processblocker.com/download.html
Configure it to block "wisptis.exe" and now the rings are REALLY gone forever.
UPDATE 20120718: There is a registry fix to disable the rings:
http://viziblr.com/news/2011/8/14/the-ultimate-guide-to-making-your-wacom-tablet-work-on-windo.html
Download the fix from step 5. Try this first and if it doesn't work, then use the process blocker application.
UPDATE 20130410: ... or disable it via a group policy:
- Open Local Group Policy Editor:Run... gpedit.msc
- Navigate to User Configuration - Administrative Templates - Windows Components - Tablet PC - Cursors
- Enable the Turn off pen feedback setting.
Limited connectivity using wireless internet in Vista Home SP1
I've collected the following possible remedies. I'm not sure which one solved it in the end. Obvious remedies like "put the laptop wifi switch to ON", "put in a correct WEP key" (or any other encryption key) or "check if the router is turned on" are left out:
- (20090618) I put this upfront, because all the tips that follow didn't resolve the issue for me, so I finally bought a new Wifi USB dongle. After buying a new laptop to add to my wireless network I noticed that the WEP encryption I was using didn't work for the new laptop. So in the end I changed protocols from WEP to the stronger WPA. After that, all PC's and even the Wii worked flawlessly. Even after switching back to the original wifi NIC on the laptop that first had the "limited connectivity" message, that laptop hasn't had the problem. So in short: try changing encryption protocols. Start with none (unsecured) to see if the problem is gone and then move on to stronger ones.
- Update drivers. There is a great free tool to update almost all drivers on your system, called DriverMax. Just register and it can be used legitimately for 30 days. I am not sure why it is "freeware" if it states that you can "use it freely for 30 days". It is based around a community of users uploading drivers. It the tool detects a new driver, you can then update it. This is a bit tedious, but always better then scouring the internet manually. The current version of the driver that is going to be updated is uploaded to DriverMax first. It is stored in their driver base for other users.
- Reset TCPIP stack. Execute the following statement at the command prompt:
NETSH INT IP RESET - Reset Winsock. Execute the following statement at the command prompt:
NETSH WINSOCK RESET. Or remove both winsock registry keys, reboot, and reinstall TCP/IP protocol: http://support.microsoft.com/kb/811259 - Disable auto-tuning. Execute the following statement at the command prompt:
NETSH INTERFACE TCP SHOW GLOBAL. Check if "Receive Window Auto-Tuning Level" is disabled. If not, then disable it:
NETSH INTERFACE TCP SET GLOBAL AUTOTUNINGLEVEL=DISABLED. Re-enable with "=NORMAL". - Disable IP6 protocol. Uncheck IPv6 protocol on the network adapters and disable in the registry. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters, add or change DWORD key "DisabledComponents", set to hex "FF".
- Disable other protocols. Additionaly uncheck QoS Packet Scheduler, Link-Layer Topology Discovery Mapper I/O Driver, and Link-Layer Topology Discovery Responder.
- Disable power management on NIC. Right click the wireless network adapter in Device Manager, select properties, tab "Power Management" and uncheck the box "Allow the computer to turn of this device to save power". In my case it was turned back on again at a later point in time, but that could be due to installing a new driver afterwards.
- Change wireless channel. Try different channel numbers for the NIC. Each channel number (mostly between 1 and 13) corresponds to a different frequency. The property can be set on the advanced tab of the driver for the NIC in device manager. Set the adhoc channel accordingly in the wireless router configuration.
- Disable and re-enable network adapter. Apparently, this sometimes fixes issues.
- Reboot in Safe Mode. A solution like the previous one. Reboot the system, press F8, select "safe mode". After it has fully restarted, reboot again. Windows starts normally again.
- Run the System File Checker utility. Execute the following statement at the command prompt:
SFC /SCANNOW. This is not of much of use to the majority of laptop owners, since they often do not own a copy of their Windows OS installation disk. When SFC finds a component (e.g. DLL) on the system, that is different from the one that was installed during the original installation, then it needs to get that original one from the installation disk. - Check eventviewer. I have error messages concerning a NTIOMIN service that cannot start, TCPIP.SYS signing issues, and Kerberos related messages (can supposedly be ignored when the laptop is not part of a domain). Still haven't figured out the first two. I'm also getting "informational" events about the NETw5v32 wireless driver. This is related to an incorrect driver.
- Run registry or system cleaners: nice tools to run are HijackThis and CCleaner. The first can be used to remove questionable or corrupt services, browser helper objects, protocols, etc. The latter cleans the registry, removing orphanaged keys.
- Repair wireless. Right click the wireless network icon in the notification area and select "diagnose and repair". Alternative method. Execute the following statement at the command prompt:
%windir%\system32\rundll32.exe ndfapi,NdfRunDllDiagnoseIncident. Do this before "limited connectivity" message pops up. In my case it displayed a message: "TCP/IP settings not optimized", and it optimized them. Running it again didn't display the message again, so I guess it did something the first time. - Run Intel PROSet/Wireless diagnostics. If using Intel on-board wireless (I am using 3945ABG), then you can run the diagnostics utility. Execute the following statement at the command prompt:
%windir%\system32\iPROSet.cpl. Run "diagnose" to check hardware, driver, radio, etc. Run "statistics" to check beacons, transmit errors, and power and power levels. - Downgrade driver. Sometimes the most recent driver is not the best one for your device. Some drivers available are: NETw3v32, NETw4v32 (11.5.0.34), NETw5v32 (12.2.0.11). In my case, the NETw4v32 driver gave 100% signal quality, while a NETw3v32 driver gave only 60%. The NETw5v32 filled my eventlog with messages (see remark elsewhere).
- Set router to G-Only: put the router in network mode "G-Only". This way, the older B-mode is not supported, but throughput is improved.
- (Run Network Diagnostics tool. Execute the following statement at the command prompt: NETSH DIAG GUI. Check all scanning options and start. This should work in Vista when the command prompt is started with admin rights, but I couldn't get it to work)
- (NIC settings. If supported, try putting the adapter in full-duplex mode, or if it is already, in half-duplex mode. Experiment what works best. I cannot do this myself and wonder if this is even possible for a wireless adapter?)
- (Run netdiag tool. Unfortunately, this tool is only availabe in Windows XP as part of "Microsoft Windows XP Support Tools". So, only for those using Windows XP, execute the following statement at the command prompt:
NETDIAG /TEST:WINSOCK /V. Use the outcome of the test for further analysis.)
Links: http://ask-leo.com/what_is_limited_connectivity_and_how_do_i_fix_it.html