The most geekish discovery EVER :-)


There is a not-very-documented feature in MacOS 10.9 that I just stumbled upon.

If you save a text file in SMILES format, Mac will show the correct image, scalable, in preview.
SMILES screen shot!
This is a very simple text file. It’s the shorthand for the chemical structure of DDT, and its sole content is

Clc1ccc(cc1)C(c2ccc(Cl)cc2)C(Cl)(Cl)Cl

which is the Simplified Molecular-Input Line Entry System, or SMILES, abbreviation.

It doesn’t make that the icon of the file, just next to it you can see the BBEdit document for a really large molecule (which also renders) that I copied from the Wikipedia entry on SMILES.

Now, I’m nowhere near geek enough to dig into the UNIX guts and find the function call. But it’s pretty cool.

Advertisements

Conversion from Word – (mostly) Solved!


Simplest method I’ve been able to find:

  1. Open Word file, select & copy material.
  2. Go to the demo page for CKEditor, http://ckeditor.com/demo.
  3. Click the “Paste From Word” button and paste the content.
  4. Click the “Source” button in CKEditor
  5. Copy HTML source code
  6. Paste into an HTML document. I’m using Flux and RapidWeaver for that.

Amazingly, my images seem to have come through as well. There’s no horrible excess of <span> or <div> tags, no font specifications, none of that cruft. so I can add those in later to make it more meaningful. The headings and basic markup are there, nothing else.

Here it is in the “saved-from-word” HTML:

<p class=MsoNormal>&nbsp;</p>
<p class=MsoListParagraph style='text-indent:-.25in'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;
</span>What bond breaks in the first step? </p>
<p class=MsoListParagraph style='text-indent:-.25in'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;
</span>In the second step, one bond breaks and two bonds form. Which are they? </p>
<p class=MsoListParagraph style='text-indent:-.25in'>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;
</span>Compare the relative energies of the reactants (t-BuCl + B<sup>-</sup>);
the intermediates (t-Bu<sup>+</sup>, Cl<sup>-</sup>, and B<sup>-</sup>); and
the products (2-methylpropene, Cl<sup>-</sup>, and HB). </p>

And the same material done from the above method:

<ol>
 <li>What bond breaks in the first step?</li>
 <li>In the second step, one bond breaks and two bonds form. Which are they?</li>
 <li>Compare the relative energies of the reactants (t-BuCl + B-); the intermediates (t-Bu+, Cl-, and B-); and the products (2-methylpropene, Cl-, and HB).</li>

So I lose the superscript tags for the ions, but the list format is done properly with tags and the whole code is much more readable.  It’s a very worthy trade-off.

The images are still saved with very generic names, so I will have to come up with some kind of system for naming them properly and keeping them sorted.
(from Word)

 <p class=MsoNormal><img width=266 height=62 id="_x0000_i1027"
src="markovnikov%20from%20word_files/image003.png"></p>

and from CKEdit:

<p><img src="file://localhost/Users/dave/Library/Caches/TemporaryItems/msoclip/0clip_image006.png" style="height:62px; width:266px; " ></p>


This was so easy that I downloaded the ckeditor library, from their website (http://ckeditor.com/download), made my own local page following their tutorial. Now, the only annoying bit is fixing the images from their location in a temp folder to a meaningful location in the web site directory.

testing the new bluetooth keyboard


i just got a new bluetooth keyboard for the iPad. it seems to work easily. Pairing was no problem, it feels much nicer to type on a mechanical keyboard than on the ipad screen, plus with the external keyboard I have that much more screen space.

it was a great deal, $30 and free shipping for an $80 item, the Zagg Flex keyboard and case-stand.

it has a flexible case for the keyboard that folds to make a stand. That, i am not using yet, but just the detachable keyboard is pretty good. Nice to have the arrow keys (sorely missing from ipad built-in), plus the traditional row with numbers and punctuation, without having to tap a selection key. The size is a little smaller than a standard keyboard, but for this hunt-and-peck typist it’s fine. a touch-typist might find it to small.
I also like that it’s not built into an ipad sleeve but can be used separately. that means, if I wanted to , I could even pair it with an iphone or a laptop…

The tactile keys make a bit of noise when typing, but less than those of my office pc keyboard.

It’s a keeper.

Adapting to iOS 7, part 2


Search? Where the heck is the search?

“Swipe down from the top” – no, not quite the top. If you swipe down from the off-screen top you get the calendar. You have to be a couple millimeters onto the screen itself., and only on the home screen (one of the ones with all the apps on it). The swipe-from-way-top works in all apps, you get a little chevron (wide, shaft less arrow).
Swiping it again brings the panel.
Swiping up from off-screen bottom gets you the control center, with tunes, rotation, and utilities like camera, flashlight (on LED-equipped phones), and other common settings.

Updated to iOS 7 just now…


Hmmm. Just updated to iOS 7. Of course it will take a bit to get used to the “flatter” graphics, moving away from the more object-like look of the iOS 6 design.
Otherwise, a little early to tell the advantages. I kind of wish it didn’t look so much like Windows 8 though….

Noticed: the app icons “float” above the background picture and respond to the tilt sensor.
The WordPress app is different.

You can double-click the Home button to get the recent apps. Swiping between apps leaves a view of the app window (screenshot) so you can see what was going on.

20130921-193549.jpg

The Maps app might be different – the trees in 3D view are still blocky and weird, but maybe not quite as bad?

Safari looks very different, but haven’t checked its functionality enough to spot anything. I don’t like the change that put bookmarks to the right of the address box instead of to the left, though.


Oh-oh. It broke Overdrive, the app I use to take out e-books from the library. Fortunately all it takes is a reinstall of the app to re-authorize….from the Overdrive blog.

Facebook followers = scammers


Facebook follower-stalkers? I just blocked three people who were “following” me. I had ignored that until I got a friend request from someone I’d never heard of. Looked to see if she had mutual friends or any connection whatsoever. No. No posts at all, just a not-very-sexy-but-clearly-supposed-to-be pic and a half dozen other friends, all male, from all over the world. Another one of the three had nothing but a few ads for an online “dating” site.

Now, I understand that people who are “public figures” are happy to have followers who can read their updates. Yay for them. But “chemprofdave” is hardly a celebrity, in real life or in cyberspace.

I suspect that what’s going on here is there are scammers out there who get onto people’s friend lists and then, at some point, request money or post something about being in desperate circumstances.

Those of you who have a big friend list, how well do you know those people? Have you ever accepted a friend request from someone you don’t know?

Go to your profile page, see if you have any “followers”, and then block them if they seem fake or suspicious. Directions can be found in the Facebook help sections.

Earlier, I had noticed something about suspicious (business-related) followers in WordPress. But since there are orders of magnitude more FB users out there, I’ll add this.

I have checked Snopes on this, it doesn’t seem to be much of a concern yet. But for the record, just kill off those followers who have no real-life connection to you. And don’t accept a friend request if you aren’t actually at least an acquaintance with someone.


Update: immediately after posting, another similar event happened. Someone with no connection to anything to do with the Minnesota Section of the American Chemical Society wanted to be admitted to the MNACS Facebook group. Checked her out, another fake, DENIED.

Add a Dock divider in Lion


I’ve got Parallels installed on my MacBook. Most of the time I don’t have much use for Windows, but the one thing that I do like is that ChemDraw structures are double-click editable in Word & PowerPoint. Even the great competitor ChemDoodle can’t do that in Mac Word.

So, since the geniuses at Microsoft can’t make Mac & Windows apps with the same flippin’ menus, I am going to use Windows Word under Parallels instead of Mac Word. (As an educator I can get both of those even cheaper than Apple’s iWork apps.)

I want to have my windows apps in the dock like Mac apps, but distinguished: so add a divider.

Here’s how. I start off with this trick to make blank icons in the dock. That’s nice, but I wanted the little dashed-line separator instead. (No go, seems like it can’t be done.) Looking for it, though led me to this other set of tips. You can make a Recent Applications (or Recent Documents) item and make the mouse pointer hilight the item it’s over. Note that the tip in the link has a mistake: it should be

defaults write com.apple.dock mouse-over-hilite-stack -boolean YES

(they left out one “i” in “hilite”)

So, cool. Here’s the result (click to embiggen)

Modified Dock

Modified Dock

Notice there’s a blank space between iBooks Author (orange) and Parallels’ MS Word icon, also notice that the Naming Game powerpoint is highlighted in the Recent Items popup.

 

PS: WordPress informs me this is my 50th post. Yay for me.