This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
siteLoader.loadMovie("mysite.swf"); | |
loadingBar._xscale = 1; | |
loadingBar.onEnterFrame = function() { | |
kBytesLoaded = this._parent.siteLoader.getBytesLoaded() / 1024; | |
kBytesTotal = this._parent.siteLoader.getBytesTotal() / 1024; | |
percentage = Math.round(kBytesLoaded / kBytesTotal * 100); | |
this._xscale = percentage; | |
if (percentage == 99) { | |
delete this.onEnterFrame; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request:URLRequest = new URLRequest("content.swf"); | |
var loader:Loader = new Loader(); | |
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress); | |
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); | |
function loadProgress(event:ProgressEvent):void { | |
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal; | |
percentLoaded = Math.round(percentLoaded * 100); | |
trace("Loading: "+percentLoaded+"%"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// $Id: node.tpl.php,v 1.7 2007/08/07 08:39:36 goba Exp $ | |
?> | |
<div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>"> | |
<?php if ($picture) { | |
print $picture; | |
}?> | |
<?php if ($page == 0) { ?><h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2><?php }; ?> | |
<span class="submitted"><?php print $submitted?></span> | |
<div class="taxonomy"><?php print $terms?></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="myBean" class="com.iamkristian.MyBean" factory-method="instance" /> | |
<bean class="org.springframework.jmx.export.MBeanExporter" lazy-init="false"> | |
<property name="beans"> | |
<map> | |
<entry key="bean:name=myBean" value-ref="myBean"/> | |
</map> | |
</property> | |
</bean> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<context-param> | |
<param-name>webAppRootKey</param-name> | |
<param-value>myVeryOwnWebApp</param-value> | |
</context-param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function nameit() { | |
name="" | |
for arg in $@; do | |
name="${name} ${arg}"; | |
done | |
echo -e '\e]0;'${name}'\07' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addLineNumbersToAllGists() { | |
jQuery('.gist').each( function() { | |
_addLineNumbersToGist('#' + jQuery(this).attr('id')); | |
}); | |
} | |
function addLineNumbersToGist(id) { | |
_addLineNumbersToGist('#gist-' + id); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page language="java" contentType="text/html;charset=UTF-8" %> | |
<%@ page import="org.apache.log4j.Level" %> | |
<%@ page import="org.apache.log4j.LogManager" %> | |
<%@ page import="org.apache.log4j.Logger" %> | |
<%@ page import="java.util.HashMap" %> | |
<%@ page import="java.util.Enumeration" %> | |
<%@ page import="java.util.Set" %> | |
<%@ page import="java.util.Arrays" %> | |
<% | |
/* This was originally suggested by Nelz on http://nelz.net/2008/04/08/log4j-runtime-configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ... extract */ | |
public void stopServer() { | |
try { | |
socket.close(); | |
} catch (Exception e) { | |
logger.warn("An exception occured closing the socket", e); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo port -d selfupdate | |
sudo port upgrade outdated | |
#Or alternatively | |
sudo port upgrade installed |
OlderNewer