Inverted text or white text on a black background when printing – Windows 10

This issue is caused by a recent update to the generic printer driver that is installed on your computer. To resolve this issue, please delete the existing printer driver, and reinstall the printer driver using the following steps:

1. Delete the existing printer driver:

How to delete the printer driver

a. Click Image  (All apps) → Windows System → Control Panel.

b. Click View Devices and Printers, under Hardware and Sound.

c. Right-click on the printer driver and then left-click on Remove device.

note icon If the printer driver is not listed, go to step 2.

d. Click Yes, to confirm that you want to delete the driver. Go to step 2.

2. Add the printer driver

How to add the printer driver

a. Click Image  (All apps) → Windows System → Control Panel.

b. Click View Devices and Printers, under Hardware and Sound.

c. Click Add a printer.  The computer will begin searching for an available network printer.

d. Even if your machine appears in the list, click The printer that I want isn’t listed.

important icon This step will prevent the computer from re-adding the generic driver, which doesn’t offer full functionality of the machine.



e. Click My printer is a little older. Help me find it.



f. Windows should locate any printer on the network.


g. 
If you receive a message stating that the driver is already installed, select Replace the current driver and then click Next.

Add Printer

h. Leave the default printer name and then click Next.

i. Select a printer sharing option and then click Next.

note icon It’s typically not necessary to share a network-connected printer driver.  All compatible network-connected computer should be able to communicate with the printer through the router.

j. You may set your machine as the default printer.  If you want to print a test page, you may do so.

k. Click Finish.  Go to step 3.

3. Attempt to print a document or a test page. Click here for instructions on how to print a test page.

Source: https://help.brother-usa.com/app/answers/detail/a_id/167000/~/inverted-text-or-white-text-on-a-black-background-when-printing—windows-10

Use Google Fonts Locally

Retrieve the Google Fonts CSS

  1. Go to the Google Fonts website and add your chosen fonts to a collection.
  2. Click the Use Button
  3. Scroll down the page to the link to the Google Fonts CSS file.
  4. Copy this link to a text editor
  5. From the text editor, copy the content of the href tag and paste it into the browser address bar. Copy these @font-face styles to your text editor. We’ll be editing these styles in the last step.

Download the Google Font(s)

The names of the Google Font files are in the @font-face styles you just copied to your text editor. For each font, copy the text that is in the URL() tag. For example, for the OpenSans-Light font in the above example, the name of the font file is:

fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTRampu5_7CjHW5spxoeN3Vs.woff2

Copy this to your browser address bar and the font will download. Unless you want to continue referring to the file as DXI1ORHCpsQm3Vp6mXoaTRampu5_7CjHW5spxoeN3Vs.woff2, I suggest you rename this when you download it to something more human readable. I generally rename the font file one of the local reference names in the style. In this case, I would rename this file to opensans-light.woff2.

Upload the Font(s) to Your Server

Once you’ve downloaded all of the Google fonts to your computer, upload them through FTP to your child theme directory. I generally create a fonts directory in the child theme directory and copy the fonts to there.

Add the Font(s) to Your Style Sheet

Now it’s time to edit the @font-face styles we copied to your text editor. Change the URL() tags to point to the files in your child theme fonts/directory.

Copy all of this @font-face text to your child theme’s style sheet.

Make sure you remove any code from your functions.php that may be enqueuing Google fonts through php code.

Using Google Fonts on the Desktop

If you download the full Google Font package of your choice from the alternative source mentioned in the Author’s Note above, it should include either a True Type (ttf) or Open Type (otf) font. You can then use your OS font installer to add the font to your desktop font collection.

Source: https://victorfont.com/use-google-fonts-locally/

List all Objects and Indexes per Filegroup / Partition


-- List all Objects and Indexes
-- per Filegroup / Partition and Allocation Type
-- including the allocated data size
SELECT DS.name AS DataSpaceName
,AU.type_desc AS AllocationDesc
,AU.total_pages / 128 AS TotalSizeMB
,AU.used_pages / 128 AS UsedSizeMB
,AU.data_pages / 128 AS DataSizeMB
,SCH.name AS SchemaName
,OBJ.type_desc AS ObjectType
,OBJ.name AS ObjectName
,IDX.type_desc AS IndexType
,IDX.name AS IndexName
FROM sys.data_spaces AS DS
INNER JOIN sys.allocation_units AS AU
ON DS.data_space_id = AU.data_space_id
INNER JOIN sys.partitions AS PA
ON (AU.type IN (1, 3)
AND AU.container_id = PA.hobt_id)
OR
(AU.type = 2
AND AU.container_id = PA.partition_id)
INNER JOIN sys.objects AS OBJ
ON PA.object_id = OBJ.object_id
INNER JOIN sys.schemas AS SCH
ON OBJ.schema_id = SCH.schema_id
LEFT JOIN sys.indexes AS IDX
ON PA.object_id = IDX.object_id
AND PA.index_id = IDX.index_id
ORDER BY DS.name
,SCH.name
,OBJ.name
,IDX.name

https://gallery.technet.microsoft.com/scriptcenter/c7483555-cc22-4f6c-b9c4-90811eb3bdb6

Move Tables To Filegroup

1. Move all tables, indexes and heaps, from all schemas into the filegroup named SECONDARY:
EXEC dbo.sp_MoveTablesToFileGroup
@SchemaFilter = ‘%’, — chooses schemas using the LIKE operator
@TableFilter = ‘%’, — chooses tables using the LIKE operator
@DataFileGroup = ‘SECONDARY’, — The name of the filegroup to move index and in-row data to.
@ClusteredIndexes = 1, — 1 means “Move all clustered indexes” – i.e. table data where a primary key / clustered index exists
@SecondaryIndexes = 1, — 1 means “Move all secondary indexes”
@Heaps = 1, — 1 means “Move all heaps” – i.e. tables with no clustered index.

2. Produce a script to move LOBS to the LOB_DATA filegroup, and move table data to the SECONDARY filegroup, for tables in the TEST schema only:
EXEC dbo.sp_MoveTablesToFileGroup
@SchemaFilter = ‘TEST’, — Only tables in the TEST schema
@TableFilter = ‘%’, — All tables
@DataFileGroup = ‘SECONDARY’, — Move in-row data to SECONDARY
@LobFileGroup = ‘LOB_DATA’, — Move LOB data to LOB_DATA fg.
@ClusteredIndexes = 1, — Move all clustered indexes
@SecondaryIndexes = 0, — Don’t move all secondary indexes
@Heaps = 0, — Don’t move tables with no PK
@ProduceScript = 1 — Don’t move anything, just produce a T-SQL script

Continue reading “Move Tables To Filegroup”

Gradually Deleting Data in SQL Server

If you have a situation where you have a very large table in SQL Server, where you need to periodically delete tens of millions of rows of data, there are several ways to do it.

If you have a maintenance window (or your database is not required to be available 24 x 7 x 365), you can (and probably should) just delete all of the rows in one shot, using a set based operation. This would be the quickest way to delete a large number of rows, but you will probably end up getting lock escalation to a table lock, which essentially makes the table unavailable during the delete.

Another issue to consider is whether you have transactional replication on that table, and/or you have database mirroring in place on the database. Deleting a large number of rows from a table will generate a lot of log activity, which may cause transactional replication or database mirroring to fall behind. This of course depends on your hardware and network infrastructure. You also want to keep an eye on your transaction log, to make sure it is not filling up and having auto-grow kick in.

A safer, but much more time consuming way to delete millions of rows is to use some sort of looping mechanism, where you gradually delete a fairly small number of rows in a loop, to slowly nibble away at the table. This will take much longer than a set based operation, but, if done properly, will not cause concurrency problems, and will not overwhelm transactional replication or database mirroring.

At any rate, I recently faced a situation like this, so I decided to show one method to deal with it pretty easily. In this case, we want to delete every row that has a TransactionId lower than a certain number. We are going to delete 500 random rows that qualify in each delete, and loop 5000 times, with a slight delay between each delete. This will delete 2.5 million rows each time the query is run. You can obviously adjust these numbers and the delay time so that it works best in your environment. You could also wrap this into a stored procedure.

Continue reading “Gradually Deleting Data in SQL Server”

Enable NTFS Write on Mac OS X Mavericks

Easiest way is to use Spotlight just hit Cmd + Space and write Terminal and here we go… The other way is in your Finder Applications > Utilities > Terminal. (Those who use iTerm2, I bet they know how to open it :D)

Before we start on, MAKE SURE that your USB stick, external HDD, has single name to it, or better yet without spaces in name! e.g. ”MyPrecious” is fine, ”My Precious” is not!
And what I mean by name is the label name that you get in Finder or Desktop when you plug your device, that is underneath the HDD icon, this is mostly set by manufacture, and if you know how to format on Windows, you can also set custom name!

Continue reading “Enable NTFS Write on Mac OS X Mavericks”