SQL, C#, VB, .net, asp, JavaScript, you name it. Code samples, Error messages and stuff like that. Please add coments if you think I said something stupid :D or if you have a better idea ... or anything at all ...
Tuesday, May 3, 2016
Friday, February 19, 2016
Wednesday, May 13, 2015
Chrome: Could not load shockwave flash
I had an expired Flash - Firefox. For some weird reason, I made an upgrade. (I don't really use Firefox)
This messed up my Chrome Flash. I had "Could not load shockwave flash", and that nice looking grey thing.
Went on to google it, tried several things.
Nothing worked.
I finally uninstalled chrome, and reinstalled it. I didn't lose anything. Browsing history, shortcuts, home page, extensions (even an extension that is no longer in Chrome app store).
Flash also worked flawlessly after this.
This messed up my Chrome Flash. I had "Could not load shockwave flash", and that nice looking grey thing.
Went on to google it, tried several things.
- chrome setting, something needs to be disabled (when you have 2 plugins)
- delete some files from some flash folder on C drive
- uninstall plugins, reinstall them
Nothing worked.
I finally uninstalled chrome, and reinstalled it. I didn't lose anything. Browsing history, shortcuts, home page, extensions (even an extension that is no longer in Chrome app store).
Flash also worked flawlessly after this.
Thursday, April 9, 2015
How to get the size of the tables in a database
How to get the size of the tables in a database
Thanks to Andrew
SELECT
t.NAME AS TableName,
s.Name AS SchemaName,
p.rows AS RowCounts,
SUM(a.total_pages) * 8 AS TotalSpaceKB,
SUM(a.used_pages) * 8 AS UsedSpaceKB,
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB
FROM
sys.tables t
INNER JOIN
sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN
sys.allocation_units a ON p.partition_id = a.container_id
LEFT OUTER JOIN
sys.schemas s ON t.schema_id = s.schema_id
WHERE
t.NAME NOT LIKE 'dt%'
AND t.is_ms_shipped = 0
AND i.OBJECT_ID > 255
GROUP BY
t.Name, s.Name, p.Rows
ORDER BY
TotalSpaceKB desc
t.NAME AS TableName,
s.Name AS SchemaName,
p.rows AS RowCounts,
SUM(a.total_pages) * 8 AS TotalSpaceKB,
SUM(a.used_pages) * 8 AS UsedSpaceKB,
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB
FROM
sys.tables t
INNER JOIN
sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN
sys.allocation_units a ON p.partition_id = a.container_id
LEFT OUTER JOIN
sys.schemas s ON t.schema_id = s.schema_id
WHERE
t.NAME NOT LIKE 'dt%'
AND t.is_ms_shipped = 0
AND i.OBJECT_ID > 255
GROUP BY
t.Name, s.Name, p.Rows
ORDER BY
TotalSpaceKB desc
Friday, January 10, 2014
Kindle USB issue - Cannot connect Kindle to PC
My kindle 3 (keyboard) was not connecting to my PC, but it did connect to any other PC.
I tried everything I found on the internet:
- restart from kindle button
- restart from Kindle settings
- checked all the USB ports in fromt (2 of them) and in the back (6 of them)
nothing worked
when i plug it in, the PC displays the Safely Remove Hardver icon in the tray, and the Kindle goes to that "USB drive mode" screen. No Kindle drive. If I "safely remove" then it still charges, the "USB drive mode" screen goes away, i can check my books, but still no kindle drive
What did I do?
I went to Device Manager, Kindle was visible (charging worked), and on Properties, I was browsing through the tabs. On the 3rd tab ("Volume") I had a Populate button, I clicked it. It showed me Kindle(E)
BUT
my E drive was a network connection (Network share), a kind of shortcut to an other computer from the LAN
i disconnected my "old" E drive, the Network Share.
Ta Da !
All the Kindle folders suddenly showed up on the E drive right there.
Case closed.
Seems like the Kindle was trying to force itself to a (taken) drive letter, not sure why.
If you ever have the same issue, if you don't see the Kindle drive in Windows File Explorer, try if you can see it in (My Computer - Manage) Computer Management - Disk Management, maybe all you need to reallocate some drive letters.
I tried everything I found on the internet:
- restart from kindle button
- restart from Kindle settings
- checked all the USB ports in fromt (2 of them) and in the back (6 of them)
nothing worked
when i plug it in, the PC displays the Safely Remove Hardver icon in the tray, and the Kindle goes to that "USB drive mode" screen. No Kindle drive. If I "safely remove" then it still charges, the "USB drive mode" screen goes away, i can check my books, but still no kindle drive
What did I do?
I went to Device Manager, Kindle was visible (charging worked), and on Properties, I was browsing through the tabs. On the 3rd tab ("Volume") I had a Populate button, I clicked it. It showed me Kindle(E)
BUT
my E drive was a network connection (Network share), a kind of shortcut to an other computer from the LAN
i disconnected my "old" E drive, the Network Share.
Ta Da !
All the Kindle folders suddenly showed up on the E drive right there.
Case closed.
Seems like the Kindle was trying to force itself to a (taken) drive letter, not sure why.
If you ever have the same issue, if you don't see the Kindle drive in Windows File Explorer, try if you can see it in (My Computer - Manage) Computer Management - Disk Management, maybe all you need to reallocate some drive letters.
Wednesday, October 9, 2013
CONVERT DATETIME seems all right, but still ...
A table with a varchar column that has date and other value types too.
A query with a simple CONVERT DATETIME
Until I read THIS.
Not only I know why it happened (and sortof feel like SQL is "stupid" :D) but I get an interesting idea to work around the issue.
A query with a simple CONVERT DATETIME
Conversion failed when converting date and/or time from character string.Crashing. Over and over again. I start to call it X-Files.
Until I read THIS.
Not only I know why it happened (and sortof feel like SQL is "stupid" :D) but I get an interesting idea to work around the issue.
Thursday, September 26, 2013
F7 - Visual Studio - switch between aspx and "codebehind"
It was not working for me.
This is what I had to do:
- Bring up customization dialog with "Tools\Customize..."
- Bring up the keystroke mapper with "Keyboard..."
- Set focus in "Press Shortcut Keys" text box
- Press F7 or some other keystroke you want
- The "Shortcut currently used by" box will show the command currently invoked by the keystroke.
- Set focus to "Show Commands Containing" and type ToggleDesigner
- This will select the View.ToggleDesigner command in the list box of commands
- Next press the "Assign" button to assign the keystroke shortcut to the command.
- Click "OK" to the keystroke mapper dialog
- Click "Close" to the customization dialog
Subscribe to:
Posts (Atom)
