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
/** @constructor */ | |
ScalaJS.c.example_ScalaJSExample$ = (function() { | |
ScalaJS.c.java_lang_Object.call(this) | |
}); | |
ScalaJS.c.example_ScalaJSExample$.prototype = new ScalaJS.inheritable.java_lang_Object(); | |
ScalaJS.c.example_ScalaJSExample$.prototype.constructor = ScalaJS.c.example_ScalaJSExample$; | |
ScalaJS.c.example_ScalaJSExample$.prototype.main__V = (function() { | |
var paragraph = ScalaJS.g["document"]["createElement"]("p"); | |
paragraph["innerHTML"] = "<strong>It works!</strong>"; |
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
ScalaJS.c.example_ScalaJSExample$.prototype.main__V = (function() { | |
var paragraph = ScalaJS.g["document"]["createElement"]("p"); | |
var l = ScalaJS.modules.scala_collection_immutable_List().apply__Lscala_collection_Seq__Lscala_collection_immutable_List(ScalaJS.modules.scala_Predef().wrapIntArray__AI__Lscala_collection_mutable_WrappedArray(ScalaJS.makeNativeArrayWrapper(ScalaJS.data.scala_Int.getArrayOf(), [1, 2, 3]))); | |
var l2 = ScalaJS.as.scala_collection_immutable_List(l.$$colon$plus__O__Lscala_collection_generic_CanBuildFrom__O(ScalaJS.bI(4), ScalaJS.modules.scala_collection_immutable_List().canBuildFrom__Lscala_collection_generic_CanBuildFrom())); | |
paragraph["innerHTML"] = (("<strong>Here's a list" + l2) + "</strong>"); | |
ScalaJS.g["document"]["getElementById"]("playground")["appendChild"](paragraph) | |
}); | |
Scala |
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
/** @constructor */ | |
ScalaJS.c.example_Person = (function() { | |
ScalaJS.c.java_lang_Object.call(this); | |
this.name$1 = null; | |
this.age$1 = 0 | |
}); | |
ScalaJS.c.example_Person.prototype = new ScalaJS.inheritable.java_lang_Object(); | |
ScalaJS.c.example_Person.prototype.constructor = ScalaJS.c.example_Person; | |
ScalaJS.c.example_Person.prototype.name__T = (function() { | |
return this.name$1 |
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
/** @constructor */ | |
ScalaJS.c.example_Person = (function() { | |
ScalaJS.c.java_lang_Object.call(this); | |
this.name$1 = null; | |
this.age$1 = 0 | |
}); | |
ScalaJS.c.example_Person.prototype = new ScalaJS.inheritable.java_lang_Object(); | |
ScalaJS.c.example_Person.prototype.constructor = ScalaJS.c.example_Person; | |
ScalaJS.c.example_Person.prototype.name__T = (function() { | |
return this.name$1 |
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(){'use strict';function e(a){return function(){return this[a]}}function f(a){return function(){return a}}var k,aa="object"===typeof global&&global&&global.Object===Object?global:this,ba="object"===typeof __ScalaJSExportsNamespace&&__ScalaJSExportsNamespace?__ScalaJSExportsNamespace:"object"===typeof global&&global&&global.Object===Object?global:this;function ca(a){return function(b,c){return!(!b||!b.a||b.a.Ra!==c||b.a.Qa!==a)}}function da(a){var b,c;for(c in a)b=c;return b}function n(a){return!(!a||!a.a)} | |
function p(a,b){throw(new ea).x(a+" is not an instance of "+b);} | |
function fa(a,b){var c;if(n(a))if(ga(),a===b)c=!0;else if(q(a))if(c=ha(a),q(b)){var d=ha(b),h=ia(c),g=ia(d),h=g>h?g:h;switch(h){default:c=h===s().K?c.y()===d.y():h===s().X?c.B().j(d.B()):h===s().W?c.P()===d.P():h===s().V?c.N()===d.N():d&&d.a&&d.a.g.cc&&!(c&&c.a&&c.a.g.cc)?t(d,c):null===c?null===d:t(c,d)}}else u(b)?(d=ja(b),c=ka(c,d)):c=null===c?null===b:t(c,b);else u(a)?(c=ja(a),u(b)?(d=ja(b),c=c.m===d.m):q(b)?(d=ha(b),c=ka(d,c)):c=nu |
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
val codeToChars: Map[Char, String] = | |
Map( | |
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL", | |
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ" | |
) | |
/** | |
* Inverse of codeToChars, | |
* e.g. 'A' -> '2', 'B' -> '2'. | |
*/ |
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
package tagged | |
import scala.pickling._ | |
import internal._ | |
import json._ | |
// final case class TypeInfo(erasureClass: String, typeArguments: Seq[TypeInfo] = Seq.empty) | |
// final case class AttributeKey(name: String, manifest: TypeInfo) |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<row Id="4" PostTypeId="1" AcceptedAnswerId="7" CreationDate="2008-07-31T21:42:52.667" Score="322" ViewCount="21888" Body="<p>I want to use a track-bar to change a form's opacity.</p>

<p>This is my code:</p>

<pre><code>decimal trans = trackBar1.Value / 5000;
this.Opacity = trans;
</code></pre>

<p>When I try to build it, I get this error:</p>

<blockquote>
 <p>Cannot implicitly convert type 'decimal' to 'double'.</p>
</blockquote>

<p>I tried making <code>trans</code> a <code>double</code>, but then the control doesn't work. This code has worked fine for me in VB.NET in the past. </p>
" OwnerUserId="8" LastEditorUserId="451518" LastEditorDisplayName="Rich B" LastEditDate="2014-07-28T10:02:50.557" LastActivityDate="2014-12-20T17:18:47.807" Title="When setting a form's opacity should I use a |
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
def slow = Thread.sleep(700) | |
def fast = Thread.sleep(100) | |
def threadDeliver[T](fun: => T, prom: SyncVar[T]) = | |
actor { prom set fun } | |
def main[T](a: => T, aw: Long, b: => T, overall: Long, default: T): T = { | |
val p = new SyncVar[T] | |
threadDeliver(a, p) |
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
def slow = Thread.sleep(700) | |
def fast = Thread.sleep(100) | |
def threadDeliver[T](fun: => T, prom: SyncVar[T]) = | |
actor { prom set fun } | |
def tryDeliver[T](promise: SyncVar[T], a: => T, timeout: Long)(otherwise: => T): T = { | |
threadDeliver(a, promise) | |
promise.get(timeout) match { |
OlderNewer