design, technology, tips

A Fix for when InDesign Split Columns Doesn't Work

Thanks to David at InDesign Secrets I’ve verified a little bug with InDesign’s Split Columns feature. Apparently if you try to split columns at the end of a story it just won’t work.

The solution is easy enough though:

  1. Add an extra empty paragraph to the end of the story.
  2. Split the column as you would normally.
  3. Delete the extra empty paragraph.

I can’t explain why it is that you need the extra paragraph there to make the column split, or why you can delete it immediately afterwards with no ill effect, but I am certain this method (while slightly cumbersome) works.

Standard
apple, mac, tips, windows

Getting Text From Apple Pages on a PC in a Pinch

The other day I brought a .pages file into a classroom. The problem is all the computers at the school use MS Windows, which can’t open .pages files. Did I panic? Yes. Was all hope lost? Nope.

It turns out that the .pages extension is just a fancy compressed file. That means you can simply change the “.pages” extension to “.zip” or “.rar” and get at the file contents.

The simplest way to get at the text from there is to look in the folder called “QuickLook.” There should be a PDF in that folder with everything in the file. If you need to edit the text, you could simply copy and paste it into a new file. If you are using adobe acrobat it will probably have formatting oddities, so another option is to upload the PDF to Google Docs, which will allow you to convert, edit, and print the file.

If you are feeling really adventurous, there is a final option. The “index.xml” file contains the text and styling of the .pages file. It will look mostly like a bunch of code, but if you go all the way to the end of the file, you’ll find the text is in there.

Of course, none of these are the ideal way to handle .pages files. It is obviously much simpler to export the file as a PDF, RTF, or DOCX file. Just know that if the options are limited, there is still a way to pull a save off.

Standard
code, technology, tips

Dead Simple PHP Calendar

I needed a calendar for a PHP project I was working on. I did a quick look around and found some promising solutions, but they all seemed way more complex than what I wanted. They also used tables, which are gross. This is a ridiculously easy way to get a calendar from php:function calendar($date=false){
$date_parts=(!$date)?preg_split("/[-]+/",$date):preg_split("/[-]+/",date('Y-m-d'));
$year=$date_parts[0];$month=$date_parts[1];$day=$date_parts[2];
$time=mktime(0,0,0,$month,1,$year);
$month_name=date('F',$time);
$days_in_month=cal_days_in_month(CAL_GREGORIAN,$month,$year);
$first_day=date('w',$time);
$calendar='

'.$month_name.' '.$year.'
  1. Su
  2. Mo
  3. Tu
  4. We
  5. Th
  6. Fr
  7. Sa
  8. ';
    for($x=0;$x< $first_day;++$x)$calendar.='

  9.  ';
    for($x=1;$x< =$days_in_month;++$x)$calendar.=($x==$day)?'
  10. '.$x.'':'

  11. '.$x.'
  12. ';
    return $calendar.'

';
}

How it works
It is actually pretty simple. If you feed the function a date it will make a calendar and highlight that day of the month. If you do not feed the calendar a date it will make a calendar and highlight today’s date.

How to use it
The simplest way to call this function is or if you are feeling romantic you can specify a date You must format the date YYYY-MM-DD (leading zeros are optional).

Making it look nice
Tables are not the worse thing in the world, but they are not even close to the best way to do this. Styling the calendar in CSS is a far better choice, especially if you want to go above and beyond with you calendar. If you just want a basic calendar you can use CSS like this:#calendar{position:absolute;top:6em;left:50em;width:14em;min-height:12.5em;margin:0 auto;text-align:center;font-size:0.6em}
#calendar h6{font-size:1em;margin:0 1em;display:inline}
#cal_body li{list-style:none;width:1em;height:0.8em;float:left;padding:0.2em;margin:0.1em;text-align:center}
.highlight{color:#E81490}

Of course we can make this more complex
For example, we could add navigation to get to the next month or previous month. We could also make the dates into links. For my purposes I did both.

Adding monthly navigation can be done by editing one line:$calendar='

< <

'.$month_name.' '.$year.'

>>

  1. Su
  2. Mo
  3. Tu
  4. We
  5. Th
  6. Fr
  7. Sa
  8. '

If you want to use that, you will probably need to edit the link so that it connects to whatever/wherever your calendar is located.

Making the dates into links is also just a simple matter of editing one (long) line:for($x=1;$x< =$days_in_month;++$x)$calendar.=($x==$day)?'

  • '.$x.'':'

  • '.$x.'
  • ';Again, you would need to edit that link so that it connects to everything to the function.

    Standard
    democracy, politics, privacy, technology, tips

    Verizon and the Sale of the Customer

    According to Verizon’s latest update to their privacy policy, they will now “share” (i.e. sell) lots of information that may make customers uncomfortable. Verizon’s changes to their privacy policy, one must assume the term privacy is being used ironically, includes sharing:

    Mobile Usage Information:

    • Addresses of websites you visit when using our wireless service. These data strings (or URLs) may include search terms you have used
    • Location of your device (“Location Information”)
    • App and device feature usage

    Consumer Information:

    • Information about your use of Verizon products and services (such as data and calling features, device type, and amount of use)
    • Demographic and interest categories provided to us by other companies, such as gender, age range, sports fan, frequent diner, or pet owner (“Demographics”)

    Verizon is trying to make users feel better about this by quietly offering a opt out and promising that no personally identifiable information is being sent. It should be noted that this doesn’t mean your personal information isn’t being held back, it just means your name, account number, and the like aren’t being sent.

    This is the loop-hole that corporations have carved out for themselves in order to commodify customers. Sell everything about the customer, except for their names. It is a good way to make money. Companies like Verizon are charging people to use the service and then having those customers create a product that it can sell. In return for the service the customer provides Verizon the customer gets nothing. Even as this erosion and commodification of privacy becomes common practice these days, there is not much customers can do.

    Corporations like Verizon have the upper-hand and can simply place the onus on the customer and the free-market. If you don’t like how they collect data, don’t give them your business. Never mind that the next company will do the same. Never mind that services like internet and cellphones are essential to modern society.

    Giving those who oppose regulations the benefit of the doubt, lets say they often miss this important fact— that corporations have only their best interest at heart, and that many (though obviously not all) of their services are not optional. A democratic society should protect its citizen from the corporations which have become micro-oligarchs.

    Standard
    apple, boneheads, technology

    iOS 5: Why I finally Jailbroke My iPod

    First, I want to say that I love my iPod Touch. In Japan it was a constant companion. It was my map, my music, my entertainment during long commutes, my study aid, and a few other nice things along the way. Each very of iOS has brought with it a slew of enhancements that make it easier and more enjoyable to use. Unfortunately, each iteration of iOS brings something else as well, preloaded BS apps. While the available storage options have climbed, there is still just a scant 64gb peak. That means the iPod Touch and iPhone is more of a storage hill than a mountain.

    This is a minor inconvenience. In the first version of iOS Apple decided users needed to have an app that let you watch YouTube (rarely use YouTube), write crappy Notes in sub-standard font, and told you about Stocks (I have better options) and the Weather (same as stocks). At first it didn’t seem so bad, but then came FaceTime and Game Center (neither have felt so much a single tap from my fingers).

    Now comes NewsStand, yet another thing that I won’t use trapped on my iPod. This time Apple outdid itself, though. While none of their crappy and useless (to me) app are deletable, they at least allowed those apps to be put out of the way in a folder that I never had to worry about opening. NewsStand, on the other hand, spurns every effort to tuck it away.

    Fast-forward to this very instant. As I type, my iPod is restoring from a backup. Once that finishes I’ll be the proud owner of a jailbroken iPod Touch. For the longest time I ignored jailbreaking, because it was just too much of a hassle for me. That changed with iOS 5. I want at least a third as much control over the device I own as Apple current holds over it. Hopefully, I’ll get that.

    I really hope that Apple gets their act together. Until then I didn’t really see anything in iOS 5 that was worth the annoyance of the new crap they jammed it up with.

    iPod Touch, I love you, but if you keep it up, it might be time we see other people.

    Standard
    education

    Anaheim, California Schools Took Step onto the Slippery Slope of Eugenics

    Cypress and Kennedy high schools in the Anaheim, California school district recently color coded students based on test scores. Every student was given a color coded ID card and binder. Besides creating a visible method for students to ostracize one another it also allowed the school the ostracize the students by giving the good test takers discounts and made the poor testers use a separate lunch line.

    This horrific practice was instated to create an incentive for students to improve their test scores. Luckily, the Anaheim school district nixed the practice.

    In a press release the school district stated:

    The incentive programs at two AUHSD campuses were implemented with the best intentions. They were designed to support and encourage students to do their best on a state test they are mandated to take, but which does not directly impact their academic success in school.

    If there has ever been a better indication that mandatory testing is not only useless, but also harmful this is it. Creating classes of students based on a test score that “does not directly impact their academic success” doesn’t help students. The incentive program itself is an absurd idea that is working at the problem backwards. A good grade in and of itself is a reward. Poor grades or test scores demotivate students by reinforcing low self-esteem in the students. Creating a prominent color coding system only agitates the negative feedback loop that students already suffer under.

    Indeed, University of California professor, AnneMarie Conley, said that, “It goes against everything we know about student motivation and what helps students learn in productive ways.”

    And while the school designed the system with the greatest of intentions, we all know what the road to hell is paved with. A system that encourages good test takers to view themselves as somehow better people, worthy of privileges and discounts that inferior students are not is an amazingly scary concept. It isn’t difficult to imagine that a color coded ID could quickly devolve into a dystopian eugenic nightmare where children can only socialize with a student of their class. There is no doubt that people at Cypress and Kennedy high schools would be aghast at the thought, but that doesn’t excuse them from steering the school system towards that darkened sky and rough murky waters.

    Standard
    japan

    Japanese People Give a Shit (approx. $130,000USD)

    If you read the news you may have read about a donation for disaster relief being found in a public toilet. Apparently it was in a plastic bag, hopefully sealed tight, along with a note saying it was for Tohoku relief efforts. Japanese people are peaches, and the fact that whoever discovered this chose not to pocket the money only goes to show how damn honest most people are in that country. Here’s to wishing that the money gets to the right places to help people in a crappy situation.

    Standard