Archive for category 计算机与 Internet

Microsoft PowerPoint: Lock Objects in Slide

Goal: I wanted to lock the Footnotes (date, page number, etc) that I don’t usually make edits to.

Problem: PowerPoint does not have a feature to lock any object. Indirectly, you can lock a picture by putting it into Slide Master. But those text boxes even in Slide Master are still selectable and movable in Normal view.

Microsoft product managers and community volunteers have once again failed to realize what users want is what they should do. The link points to an old thread that’s asking for this feature.

Solution: In the Slide Master view, place a rectangle shape above the text box, and fully cover it with the shape. Then, remove its Outline by changing it to No Outline. The color fill is the tricky part, and you will have to set the color to any color with 100% transparency, instead of simply No Fill.


Microsoft PowerPoint: Convert and Replace Image to PNG Format

The following procedures are written according to and tested under PowerPoint 2010 (14.0.7182.5000 64-bit, Office Professional Plus)


Image could take a substantial storage space in a PPT file. We can replace EMF format images with compressed PNG or any other desired format.

Solution 1:

This could easily be achieved by the following steps:

  1. Right click on picture, select ‘Save as Picture’. In the dialog box, select desired picture format and save the picture.
  2. Import the picture by either copy-and-paste or going to ‘Insert’ tab -> ‘Images’ group -> ‘Picture’.
  3. Remove the old one and place the new one to the right location.

Solution 2:

When the amount of task gets large, it is better to use macro.

  1. Add macro functionality to the current presentation.
    1. Go to ‘Customize Ribbon’ (Right click on Ribbon, select ‘Customize the Ribbon’).
    2. On the right side of the window, under ‘Customize the Ribbon’, locate and check the ‘Developer’ tab.
    3. Click ‘OK’.
    4. In main window, switch to ‘Developer’ tab. Click ‘Macros’ in the ‘Code’ group.
    5. In the ‘Macro’ dialog box, fill the Macro name as ‘ConvertShapeToPNG’ and click the ‘Create’ button.
    6. In the VBA window, fill in the newly added macro with the code attached at the end of this post.
    7. Close the VBA window, and go back to the main window of slides.
  2. (Optional) Save the slides including the macro. Due to security limitations, the slides has to be saved into a macro-enabled file.
    1. Click ‘Save’, and a prompt saying that you have to save the file as a macro-enabled file type.
    2. Click ‘No’ to refuse to save it as  a macro-free presentation.
    3. Follow the aforementioned instruction to save the file.
    4. (After editing) When done, save the file as macro-free presentation by changing back the file format in ‘Save as’ dialog. Answer ‘Yes’ to the question and the macro is automatically removed.
  3. Add a button in the Ribbon for the macro.
    1. Go to ‘Customize Ribbon’ (Right click on Ribbon, select ‘Customize the Ribbon’).
    2. On the right side of the window, in ‘Choose commands from’, select ‘Macros’. The macro we just added should show up below.
    3. Under ‘Customize the Ribbon’, click ‘New Tab’ and rename the new tab and group as desired.
    4. Drag the macro from the left to the new group.
    5. Click ‘OK’ and return to the main window.
  4. In the slide, select a single picture that you wish to convert. Click the Ribbon button for the macro, and see the change.



Stack Exchange: How to convert multiple embedded PNGs to JPEGs in Powerpoint file?

Stack Overflow: Convert internal images in powerpoint to one format


(Click “阅读更多” below to get the code)

阅读更多 »


How Nvidia breaks Chrome Incognito | charliehorse55

Summary: Video card makers don’t like erasing G-RAM buffers before handing them over to other applications, because they think that would significantly slow down the performance. Application developers don’t like erasing the buffers before returning them back to GPU, since they think it would not be their job. After all, users have to do their own cleaning job.
Well done, another industry standard.


Chrome OS: Entirely disable mouse accelaration


Chrome OS is light weighted. That means users have few options to customize it into forms suitable for themselves.

One of the missing features is disabling mouse accelaration. Under current design, user can only adjust “mouse pointer speed” in the Settings page. No accelaration adjustment. Accelaration is meaningful for touchpads. But for external mice, it’s awkward. At least true to me.

In older versions of Chrome OS, one can find a way to disable accelaration by typing xset m 0 in the terminal console. In later updates, xset is deprecated with no successor at all.

With the latest beta channel update, it’s possible to achieve that again. But the command becomes much more complicated.

That’s the way Google makes simple life not simple.

inputcontrol –mouse_custom_point_accel=\
inputcontrol –use_mouse_custom_point_accel=1

Note: the “4” in the second line is the linear speed that you may want to change. With the last line of command, Chrome OS will pick up user definition of mouse accelaration, ignoring the “mouse speed” option in the Settings page.


Reference – Issue 359288: Find the holy grail of mouse acceleration curves


– END –


Windows – Run Google Drive client in desired language

Put the following commands into a .cmd batch script, and run.


set LANG=en_US
cd /d “C:\Program Files\Google\Drive”
start “” googledrivesync.exe


You can change the value of variable LANG to any other one as your desire.

Reference –

Google Product Forums – Google Drive client localized, can I have it in english instead


BTW I found Google’s Drive client for Windows is pretty nasty, since it doesn’t support NTFS junction / symbol link folders. A few more discoveries show that Google has deliberately banned the support for this low-level function, provided by the OS, by actively detecting whether a folder is a junction / symbol link. Maybe there’s good reasons not to do it, but clearly Dropbox has not found why. Or it might just be another awesome bug that Google has fixed by removing the entire feature.


– END –


Ubuntu – Clear screen in shell

This belongs to my collection of life tricks.

To clear the screen, type this command in bash:


printf “\ec”


Reference –

Stack Overflow – Clear the Ubuntu bash screen for real


– END –


Update: (Solved) Windows Live Writer removing EXIF data in uploaded photos

Six months ago I noticed this problem, which removes your photo’s EXIF data silently while uploading them to WordPress. Now I solved it.

The reason to my particular case is that, I have been using watermarks on photos, before I noticed this feature removes EXIF data and therefore stopped using it. However, simply removing text string in “Watermark” setting does not stop Windows Live Writer from putting watermarks onto the pictures. In fact, if you clear the text string after using this feature, it will put BLANK watermark on your photos.

The reason why WLW’s features such as watermarks, resizing, framing, etc stripe EXIF data is, IMO, that it uses some old-fashioned JPEG codec library (DLL file) which does not support EXIF processing. I can remember there used to be an Intel JPEG Library DLL file inside Live Writer’s installation folder. Althogh now the standalone file is gone, and I guess it is using some newer version of it and includes the library in its own, WLW still fails to handle EXIF properly.

In this post, the author also discovered that framing (adding borders to) the phoros also removes EXIF. It’s interesting that the article was posted no sooner than I visited, when I also found this issue of WLW. But at that time I thought that article did not help. But now, re-visiting this post, with a flash in my head I knew what is going on.

Anyway, here’s your solution.


The idea is you have to remove all picture effects provided by Windows Live Writer. In the above example, simply leaving the watermark string blank does not help, because WLW will put a blank watermark then. You have to remove, from its default settings, the “watermark” entry entirelly. This involves system registry operations, so use with caution.

  1. Close Windows Live Writer properly. Launch regedit.
  2. Go to registry location: HKCU\Software\Microsoft\Windows Live\Writer\Weblogs. In this key, you can see all the blogs that are managed by WLW. Double click to open a blog, then you will see a subkey called ImageDefaults
  3. Under this subkey, there are several items to be modified.  In this subkey, a value called Decorators contains all the picture effects to be deployed upon newly added pictures. Remove “Watermark” and the proceeding single comma and white space in the text.
  4. Under this subkey, remove subkey Watermark.
  5. Make sure you haven’t done anything other than the above 3 steps, otherwise you might have damaged your system, and I don’t bear the responsibility. Now you can close Registry program.
  6. Re-launch WLW and you should see changes on new-added photos. Older photos, especially those you have posted already, won’t get changed at all. You have to delete and re-insert all the photos in draft posts in order to keep EXIF during uploading.

Conclusion: This method at least solves the particular problem that Watermark feature removes EXIF data in photos, and even though you stop using Watermark feature by clearing the watermark text, it continues removing EXIF because it then leaves blank watermark. The reason why watermark, as well as many picture effects, removes EXIF is that WLW uses a JPEG codec library which does not support EXIF processing.

– END –