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
@In((a: string, b: string) => { | |
assert(typeof a === 'string'); | |
assert(typeof b === 'string'); | |
assert(a.length > 5); | |
assert(a.length > 7); | |
}) | |
@Out((result: string) => { | |
assert(typeof result === 'string'); | |
assert(a.length > 12); | |
}) |
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"?> | |
<!-- This is the default code layout which will be applied if you choose "Use the default Code Layout which that ships with Regionerate". Notice that modifying this file will not affect Regionerate. You can modify this file and load it manualy by choosing "Use custom" under "Primary Code Layout", or you can place it in the "My Code Layouts" directory. --> | |
<CodeLayout xmlns="http://regionerate.net/schemas/0.7.3.0/CodeLayout.xsd"> | |
<ForEach Type="Struct"> | |
<CreateRegion Title="Nested Classes" PadFirstChild="0" PadLastChild="0"> | |
<PutNestedClasses> | |
<OrderBy> | |
<Name /> | |
</OrderBy> | |
</PutNestedClasses> |
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
private static long DoTest(int count, Action action) | |
{ | |
var sw = Stopwatch.StartNew(); | |
for (int i = 0; i < count; ++i) | |
{ | |
action(); | |
} | |
return sw.ElapsedMilliseconds; | |
} |
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
private static string GetUniqueKey() | |
{ | |
return GetUniqueKey(8); | |
} | |
private static string GetUniqueKey(int size) | |
{ | |
var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".ToCharArray(); |
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
from google.appengine.ext import db | |
import webapp2 | |
import uuid | |
class Article(db.Model): | |
id = db.StringProperty(required=True) | |
name = db.StringProperty() | |
content = db.TextProperty() | |
class Blog(db.Model): |
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
from google.appengine.api import users | |
import webapp2 | |
class MainHandler(webapp2.RequestHandler): | |
def get(self): | |
user = users.get_current_user() | |
if user: | |
self.response.write( | |
""" |
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
from google.appengine.api import users | |
from google.appengine.api import mail | |
import webapp2 | |
class MainHandler(webapp2.RequestHandler): | |
def get(self): | |
sender = self.request.get("sender") | |
receiver = self.request.get("receiver") | |
subject = self.request.get("subject") | |
message = self.request.get("message") |
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
<html> | |
<input x-webkit-speech> | |
</body> | |
</html> |
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
... | |
private void btnLogin_Click(object sender, EventArgs e) | |
{ | |
if (!String.IsNullOrEmpty(Properties.Settings.Default.SECRET) && !String.IsNullOrEmpty(Properties.Settings.Default.TOKEN)) | |
{ | |
m_DropNetClient.UserLogin = new UserLogin() | |
{ | |
Secret = Properties.Settings.Default.SECRET, | |
Token = Properties.Settings.Default.TOKEN | |
}; |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Runtime.Caching; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |