yUML is a simple tool for embedding UML diagrams in wikis and blogs without needing any UML or diagramming tools.
Here's an idea of how it could be used in your repository readme.markdown or wiki.
View the RAW source to see how images are made.
yUML is a simple tool for embedding UML diagrams in wikis and blogs without needing any UML or diagramming tools.
Here's an idea of how it could be used in your repository readme.markdown or wiki.
View the RAW source to see how images are made.
class A | |
class A2 extends A | |
class B | |
trait M[X] | |
// | |
// Upper Type Bound | |
// | |
def upperTypeBound[AA <: A](x: AA): A = x |
Update 2022: git checkout -p <other-branch>
is basically a shortcut for all this.
FYI This was written in 2010, though I guess people still find it useful at least as of 2021. I haven't had to do it ever again, so if it goes out of date I probably won't know.
Example: You have a branch refactor
that is quite different from master
. You can't merge all of the
commits, or even every hunk in any single commit or master will break, but you have made a lot of
improvements there that you would like to bring over to master.
Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.
/** | |
* Sample code which listens to Enter key event on TextField | |
*/ | |
package myscala | |
import scala.swing.BorderPanel | |
import scala.swing.Label | |
import scala.swing.MainFrame | |
import scala.swing.SimpleSwingApplication | |
import scala.swing.TextField |
/** | |
* Part Zero : 10:15 Saturday Night | |
* | |
* (In which we will see how to let the type system help you handle failure)... | |
* | |
* First let's define a domain. (All the following requires scala 2.9.x and scalaz 6.0) | |
*/ | |
import scalaz._ | |
import Scalaz._ |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.19370138645172119</real> | |
<key>Green Component</key> | |
<real>0.15575926005840302</real> |
import sbt._ | |
import Keys._ | |
object MyBuild extends Build { | |
val mySettings = Defaults.defaultSettings ++ Seq( | |
organization := "tv.cntt", | |
name := "comy", | |
version := "1.3-SNAPSHOT", | |
scalaVersion := "2.9.0-1" | |
) |
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
import scalaz._ | |
import Scalaz._ | |
object MonadTransformerExamples { | |
def main(args: Array[String]) = run | |
def run { | |
// ------------------------------------------------------ | |
// Combined Option/Option | |
// ------------------------------------------------------ |
Strophe.addConnectionPlugin("xdomainrequest", { | |
init: function () { | |
if (window.XDomainRequest) { | |
Strophe.debug("using XdomainRequest for IE"); | |
// override the send method to fire readystate 2 | |
if (typeof XDomainRequest.prototype.oldsend == 'undefined') { | |
XDomainRequest.prototype.oldsend = XDomainRequest.prototype.send; | |
XDomainRequest.prototype.send = function() { | |
XDomainRequest.prototype.oldsend.apply(this, arguments); |