Microsoft Project fill order

in

This is really for my own personal reference, but this is the order in which Microsoft Projects should be created:

  1. Tasks
  2. Assignments (with % allocations)
  3. Work
  4. Predecessors

Adding assignments will change the amount of work, which isn’t what you want most of the time. Use auto-leveling early on to detect problems.

Unicode attack

Amarok recently liked

in
recently-liked
amarok

The “Recently liked” section in the right sidebar is generated hourly. Amarok stores all the collection/rating data in a MySQL DB. This makes it possible to pull up the most recent songs that I rated 4/5 stars or above. Last.fm’s api is used to create the links.

Check the “run.sh” script to see how it’s all put together.

The json-to-atom script is using a UUID seed that I randomly generated using uuid.uuid4() in python. Since there are no links for any of the items, the <id> elements are generated using the artist/track names and this UUID seed.

If you’re interested, you can get the code using bazaar like so:

bzr branch http://glyphy.com/bzr/amarok-top-rated

If you end up using some of the code, please change the last.fm API key. You can easily generate your own. Also change the UUID seed in json-to-atom.py.

TODO

  • add images
  • record the items already seen to prevent hitting last.fm’s servers more than necessary

Make it stop!

From today’s Metro:

An Ohio man was facing a $150 fine for playing rap music too loudly on his car stereo in July. But a judge offered to reduce that to $35 if he spent 20 hours listening to classical music by the likes of Bach and Chopin. The man, 24, lasted only about 15 minutes, a probation officer said.

Greatest OS textbook cover

in

OS Textbook

Nuit Blanche 2008

nuit blanche
Nuit Blanche is getting a little too popular in my opinion. The streets smelled of pot and cigarettes the entire night. Some exhibits I was looking forward to seeing weren’t even there.

This guy was pretty cool, though, even if a little schizophrenic.

JavaScript forms

The code in question:

<html>
    <head>
        <script type="text/javascript">
            function doIt() {
                var frm = document.getElementById('form1');
                frm.action = 'rightaction.html';
                frm.submit();
            }
        </script>
    </head>
    <body>
        <form action="wrongaction.html" id="form1" method="post">
            <input type="hidden" name="action" value="fieldaction.html" />
            <button onclick="doIt()">do it</button>
        </form>
    </body>
</html>

On IE, instead of updating the action attribute of the form element, it changes the value attribute of the hidden field named “action”. It does this even with frm.setAttribute('action', 'rightaction.html'). The only workaround I found was to temporarily remove the hidden input tag from the DOM, change the form’s action attribute and then reinsert the input tag. Is there a better solution?

Update: After some googling, found the answer. The fix is to use the getAttributeNode() function. The resulting code is as follows:

<html>
    <head>
        <script type="text/javascript">
            function doIt() {
                var frm = document.getElementById('form1');
                frm.getAttributeNode('action').value = 'rightaction.html';
                frm.submit();
            }
        </script>
    </head>
    <body>
        <form action="wrongaction.html" id="form1" method="post">
            <input type="hidden" name="action" value="fieldaction.html" />
            <button onclick="doIt()">do it</button>
        </form>
    </body>
</html>

bzr-loom : a better example

in

If the last post made sense, there’s a much more in-depth example here.

Combine bzr-loom with shelf and you can handle any sort of interruptions in your workflow without having to manually keep track of uncommitted changes.

One downside of bzr-loom is the terminology. bzr combine-thread actually destroys the thread tossing all the changes made in it, which can be unpleasantly surprising. There’s a bug about it, though.

bzr-loom

in

Branching may be cheap in DVCSs from the technical perspective, but sometimes it’s other factors that make it a pain. For example, the environment setup procedure could be very tedious, or you may be unable to use hardlinks (Windows) and your branches are too large. The bzr-loom plugin comes in handy in these situations. A very simple example follows:

## Install bzr-loom using `bzr branch lp:bzr-loom` in your .bazaar/plugins/
 
# Create a new repository
$ bzr init bzr
$ cd bzr
 
# Create a new file
$ echo initial > first
 
# Check it in
$ bzr add first
added first
$ bzr ci -m "initial"
Committing to: /home/tro/temp/bzr/
added first
Committed revision 1.
 
$ cat first
initial
 
# Set the branch nick specifically. This is the initial development "thread".
$ bzr nick initial
 
# Create a loom. From this point on, you have to have the plugin to interact with this repo directly
$ bzr loomify
 
# Only one thread exists right now
$ bzr show-loom
=>initial
 
# Add a new thread (acts as another branch inside the current directory)
$ bzr create-thread feature-1
 
# Add a new file
$ echo "second file" > second
$ bzr add second
added second
$ bzr ci -m "+second"
Committing to: /home/tro/temp/bzr/
added second
Committed revision 2.
 
# Switch back to the initial dev thread. Note how "second" disappears, since it is in another thread.
$ bzr down-thread
All changes applied successfully.
Moved to thread 'initial'.
$ bzr show-loom
  feature-1
=>initial
$ ls
first
 
# Switch to feature-1
$ bzr up-thread # this would do a merge, if any new changes were made in "initial"
$ ls
first  second
 
# Edit first
$ echo "edit in feature-1 thread" >> first
$ cat first
initial
edit in feature-1 thread
$ bzr ci -m "useless text meant to illustrate merging between threads"
 
# At this point pretend that we are satisfied with the changes in "feature-1"
# and want to merge them into "initial". Go there.
$ bzr down-thread
$ ls
first
$ bzr merge -r thread:feature-1 .
+N  second
 M  first
All changes applied successfully.
 
# Merged changes from feature-1 to initial
$ ls
first  second
$ cat first
initial
edit in feature-1 thread
$ cat second
second file

This gives you a limited git-like ability to spawn off new branches in the current directory.

Wotan Server

These guys totally saved me today. I dropped my phone today (had it on my lap when I got up) and its screen got all messed up. Turns out flashing the firmware helps restore things to normal state. Float’s helped to restore contacts and msgs. Success.

Syndicate content Syndicate content