/* run before importing data */
-- SQL disable all triggers - disable all triggers sql server - t sql disable trigger
EXEC sp_MSforeachtable @command1="ALTER TABLE ? DISABLE TRIGGER ALL"
GO
-- SQL disable all constraints - disable all constraints sql server
EXEC sp_MSforeachtable @command1="ALTER TABLE ? NOCHECK CONSTRAINT ALL"
GO
/* deletes all existing data */
-- SQL disable all constraints - disable all constraints sql server
EXEC sp_MSforeachtable @command1="DELETE FROM ? "
GO
/* run after importing data */
-- SQL enable all triggers - enable all triggers sql server - t sql enable trigger
EXEC sp_MSforeachtable @command1="ALTER TABLE ? ENABLE TRIGGER ALL"
GO
-- SQL enable all constraints - enable all constraints sql server
-- sp_MSforeachtable is an undocumented system stored procedure
EXEC sp_MSforeachtable @command1="ALTER TABLE ? CHECK CONSTRAINT ALL"
GO
Wednesday, November 16, 2011
Quickly disable triggers and keys
Tuesday, May 24, 2011
T410 USB not working - SOLVED
I tried posting this to the Lenovo Community thread but after I registered, everything was in German and it wouldn't let me post.
But, for those struggling with the same issue, here's how I solved it.
1. Right-click on "My Computer"
2. Select Manage
3. Expand the "Universal Serial Bus controllers"
4. Right-click on the first "USB Root Hub"
5. Select Properties
6. Select the "Power Management" tab
7. Uncheck "Allow the computer to turn off this device to save power."
8. Click OK
9. Repeat steps 4-8 for the other "USB Root Hub"
10. Right-click each USB Root Hub and uninstall each one
11. Right-click on the "Universal Serial Bus controllers"
12. Select "Scan for hardware changes"
13. Let all the stuff reconnect (USB hubs, camera, fingerprint, AND MOUSE! :)
14. Done!
But, for those struggling with the same issue, here's how I solved it.
1. Right-click on "My Computer"
2. Select Manage
3. Expand the "Universal Serial Bus controllers"
4. Right-click on the first "USB Root Hub"
5. Select Properties
6. Select the "Power Management" tab
7. Uncheck "Allow the computer to turn off this device to save power."
8. Click OK
9. Repeat steps 4-8 for the other "USB Root Hub"
10. Right-click each USB Root Hub and uninstall each one
11. Right-click on the "Universal Serial Bus controllers"
12. Select "Scan for hardware changes"
13. Let all the stuff reconnect (USB hubs, camera, fingerprint, AND MOUSE! :)
14. Done!
Tuesday, February 8, 2011
CSS Compressor
I found this the other day. Another nice compressing tool, but this one is for CSS.
http://www.cssdrive.com/index.php/main/csscompressor
http://www.cssdrive.com/index.php/main/csscompressor
Wednesday, June 3, 2009
DSN-less ColdFusion queries
<cfscript> // DNSless DB connection // http://www.datapackethelp.net/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=47&nav=0 // http://www.ibmpressbooks.com/articles/printerfriendly.asp?p=170336 classLoader = createObject("java", "java.lang.Class"); classLoader.forName("macromedia.jdbc.MacromediaDriver"); dm = createObject("java","java.sql.DriverManager"); con = dm.getConnection("jdbc:macromedia:db2://myserver.com:55000;DatabaseName=SMWDB","username","password"); st = con.createStatement(); rs = st.ExecuteQuery(PreserveSingleQuotes(mySql)); q = createObject("java", "coldfusion.sql.QueryTable").init(rs); st.close(); con.close(); </cfscript>
Wednesday, December 17, 2008
Developer tools
I have some development tools I've used day-to-day, you might like them too...
Quickly find and replace stuff (commas to line breaks, regular expressions, etc)
http://www.parkapps.com/tools/find_replace.cfm
Other tools can be found at http://www.parkapps.com/tools/
Quickly find and replace stuff (commas to line breaks, regular expressions, etc)
http://www.parkapps.com/tools/find_replace.cfm
Other tools can be found at http://www.parkapps.com/tools/
Friday, December 5, 2008
Minify Javascript
We're having some problems with JavaScript not loading entirely for some users... I'm not sure why yet, but I came across this JSMin - JavaScript minifier. Excellent stuff.
http://fmarcia.info/jsmin/test.html
http://fmarcia.info/jsmin/test.html
Tuesday, September 23, 2008
Vertical multi-column list
function ge(obj) { return document.getElementById(obj); } /* Reorder a list that normally flows horizontally and refactor to flow vertically in the same area. Assumes that the li element has a css width and uses the shortcut function ge() */ function vertMultiColList(parentObj) { var nextColHtml = '
- '; // no quotes b/c IE is weird about rewriting HTML
// if this has already run take out any continued lists
parentObj.innerHTML = parentObj.innerHTML.replace(/<\/ul>
- /ig,''); // Firefox
parentObj.innerHTML = parentObj.innerHTML.replace(/<\/ul>
- /ig,''); // IE
var arrUl = document.getElementsByTagName('UL');
for(var j=0;j
Subscribe to:
Posts (Atom)