Warning: session_start(): open(/var/lib/php/sessions/sess_lgbme50e2am7m3eep6cnahtcf4, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
//static TimedCache> mediumPostsCache = new TimedCache(60);
static volatile L mediumPosts;
static volatile long numComputers;
static new ThreadLocal visitor;
p {
doEveryStartingNow(60000, f update);
}
svoid update {
numComputers = numComputers();
pcall {
mediumPosts = getMediumPosts("stefanreich");
}
}
html {
print("html starting");
S vis = registerVisitor();
visitor.set(dropIncluding(vis, "
"));
if (eq(domain(), "code.ai1.lol"))
ret hrefresh("http://snippets.tinybrain.de");
//ret hrefresh([[http://tinybrain.de:8080/tb/snippets.php?action=create&description=My+first+JavaX+Program%21&text=%21752%0A%0Ap+%7B%0A++showAnimation%28"%231004373"%2C+10%29%3B+++%2F%2F+10+seconds+of+applause%21%0A%7D]]);
if (eq(uri, "/chat")) {
O chat = getBot("#1003081");
ret callHtmlMethod(chat, uri, params);
}
if (eq(uri, "/goodies") || eq(uri, "/") && eq(domain(), "javax.ai1.lol")) {
new L l;
for (S s : toLinesFullTrim(loadSnippet("#1004044"))) {
if (s.startsWith("*"))
l.add(dropPrefixTrim("*", s));
else {
S s2 = dropPrefixSuffixTrim("", "
", s);
if (neq(s, s2))
appendToLast(l, "\n" + dynamize(s2) + "
");
else
appendToLast(l, s);
}
}
S liStyle = "margin-bottom:0.2em";
ret hmobilefix ()
+ ahref(snippetLink("#1004132"),
himg(snippetImgLink("#1004415"), "width", 300, "style", "border: 2px solid black; border-radius: 5px; float: right; margin-left: 20px; margin-bottom: 20px", "title", "JavaX Screenshot"))
+ p(ahref("http://ai1.lol", "<< back")
)
+ htitle_h1("JavaX Goodies!")
+ ul(l, null, "style", liStyle)
+ p(b(">> " + targetBlank("http://new-program.tinybrain.de/", "Get started here!"), "style", "font-size: 2em"))
+ ul(ll([[
Note: JavaX favors on-the-server development, and also public development (because both makes the world better).]],
[[Thus, the preferred way to make your first program is to
just ]] + targetBlank("http://tinybrain.de:8080/tb-usercake/login.php", "get a log-in") + " and "
+ targetBlank("http://new-program.tinybrain.de/", "create your program here") + ".",
[[After hitting "Create snippet", you can immediately run the program in your local ]] + ahref("http://tinybrain.de/x30.jar", "x30.jar") + [[ (it will automatically show on
top of the list) or ]] + targetBlank("http://app-allperms.tinybrain.de", "in the app") + ".",
[[In case of any question, or if you want "private" development: I am ]] + ahref("mailto:info@ai1.lol", "always glad to help") + "!"),
null, "style", liStyle)
+ p(ahref("http://tinybrain.de:8080/getraw.php?id=1006863&contentType=text/html", "Privacy Policy"))
+ visitorsChart("float: right; margin-left: 20px; margin-bottom: 20px");
}
// Serve landing page
if (eq(uri, "/buy"))
ret callHtmlMethod(getBot("#1005215"), uri, params);
// Load stuff
L mediumPosts = main.mediumPosts;
mediumPosts = concatLists(mediumPosts, ll(
new MediumPost("The A.I. Super-Database", "https://medium.com/@stefanreich/the-a-i-super-database-3ba31410e21"),
));
if (eq(uri, "/more"))
ret htitle("Making Robots That Talk (Stefan Reich)")
+ htotalcenter(
h1("Welcome To The Advent Of A.I.!")
+ h3("Stuff is happening.")
+ p("JavaX begins to think about itself (and everything else!). :)")
+ p(youtubeEmbed(
//"fCvxu5f4PeA"
//"tbHenhl-QTY"
//"WMJLcRNPUnI"
//"etSXjcQntIg"
//"zFV71gvzGqk" // me!
"YCBt-JggF2c"
//, 600, 350))
, 400, 250))
/* + p(himg("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1003828&contentType=image/gif", "alt", "JavaX-Bert!"))
+ p(b("^^ That is " + rawLink("goodies", bertName()) + ". He is always where the sun is shining. ™"))
*/
+ pJavaXInstallations()
//+ p(targetBlank(rawBotLink("#1003081"), htmlencode("[>> Chat! <<]")))
+ p(ahref("/buy", "Buy an AI :)"))
+ p(b(ahref("http://snippets.tinybrain.de", "LATEST CODE") + " | " + ahref("http://slides.com/stefanreich", "SLIDES")))
+ p(hsmall(visitor.get()))
+ p(b(ahref("http://medium.com/@stefanreich", "On Medium.com:")))
+ p(b(join("
",
map(func(MediumPost p) {
ahref(p.url, htmlencode(p.title))
}, mediumPosts))), "style", "font-size: 1.5em; line-height: 140%")
+ p(ahref("http://medium.com/@stefanreich", "[more...]"))
+ p(b(ahref("http://tinybrain.de/x30.jar", "Download JavaX! [PC]") + " " + ahref("http://java.com/download", "[Get Java First]")) + "
"
+ ahref("http://app-allperms.tinybrain.de", b("Download JavaX! [Android]")) + " " + ahref("http://tinybrain.de/javax-34.apk", "[bypass play store]") + "
"
+ b(ahref(rawLink("goodies"), "JavaX Goodies!")) + "
"
+ b(ahref("http://snippets.tinybrain.de", "Code Database")))
+ p(b("Some Screenshots."))
+ bigScreenshot("#1004809", "#1004778", "A Simple Expert System")
+ bigScreenshot("#1004649", "#1004648", "Learning To Read")
+ bigScreenshot("#1004530", "#1004528")
+ p("[Thanks to the great " + targetBlank("http://dedexer.sourceforge.net/", "Dedexer")
+ " by " + targetBlank("http://pallergabor.uw.hu/", "Gabor Paller") + "!]")
// + bigScreenshot("#1004294", "#1004284", "")
+ h3("More screenshots")
+ p(screenshotLin2("#1004618", "#1004616") + " "
+ screenshotLin2("#1004555", "#1004552") + " "
+ screenshotLin2("#1004494", "#1004361") + " "
+ screenshotLin2("#1004359", "#1004353") + " "
+ screenshotLin2("#1004330", "#1003779") + " "
+ screenshotLin2("#1004280", "#1004032") + " "
+ screenshotLin2("#1004267", "#1003779") + " "
+ screenshotLin2("#1004135", "#1004132") + " "
+ screenshotLin2("#1004090", "#1004068") + " "
+ screenshotLink("#1003815", "#1003881") + " "
+ screenshotLink("#1004089", "#1004088") + " "
+ screenshotLink("#1003695", "#1003697") + " "
+ screenshotLink("#1003678", "#1003681") + " "
+ screenshotLink("#1003634", "#1003650") + " "
+ screenshotLink("#1003509", "#1003514") + " "
+ screenshotLink("#1003494", "#1003504") + " "
+ screenshotLink("#1003486", "#1003487") + " "
+ screenshotLink("#1003417", "#1003470") + " "
+ screenshotLink("#1003417", "#1003428") + " "
+ screenshotLink("#1003406", "#1003392"))
+ p(b("Latest Video"))
+ youtubeEmbed("gf7eaIWvnp8"/*"j1wbwdGrBes"*//*"HWs9F5-egOI"*/) // ("Z1dWiMPyvgQ")
+ p(ahref(rawBotLink("#1003220"), "Company")
+ " | " + ahref("http://medium.com/@stefanreich", "Articles")
+ " | " + ahref("mailto:info@ai1.lol", "Mail")
//+ " | " + ahref(rawBotLink("#1003081"), "Chat")
+ " | " + ahref("/buy", "Buy an AI :)")
)
+ p(targetBlank("https://medium.com/@stefanreich/mixing-javax-and-english-6b56f3aecd4", "Making Chatbots from English Dialog") + "
"
+ targetBlank("https://medium.com/@stefanreich/a-music-player-in-javax-178-lines-ca304d3ae031", "A Music Player In JavaX: 178 Lines"))
//+ p(visitor.get())
+ p("Status: " + b("Offering Free Robots For Every Purpose"))
+ p(b("Music.") + "
"
+ join("
", map(func(S v) { youtubeEmbed(v, 300, 100) }, splitAtSpace(
"hxfE_-hqCE0 K8qNkFXfvIE 0FCo8vGUKuE Dd8WjeK8riE Xg1lfnyYJpc wNS-mrZvcOg KfvoR6aqcws tZB1sHlB554 zZwJL1J53LU YsTzN1_a5rg BBpGVZ4yMiE gdPwF2oMsdw"))))
// 98bgS9AuFe4 FjlPtUaXcvg
);
if (eq(uri, "/ever-easier"))
ret page_everEasier();
if (eq(uri, "/watch"))
ret page_watch();
if (eq(uri, "/explodingWindow"))
ret page_explodingWindow();
if (eq(uri, "/automaticScreenshots"))
ret page_automaticScreenshot();
if (eq(uri, "/editor"))
ret page_editor();
if (eq(uri, "/gc"))
ret page_gc();
if (eq(uri, "/dynamicButtons"))
ret page_dynamicButtons();
if (eq(uri, "/screenshots"))
ret page_screenshots();
if (eq(uri, "/pastLives")) ret page_pastLives();
if (eq(uri, "/screenLens")) ret page_screenLens();
if (eq(uri, "/new") || true) ret page_new();
// main page above
null;
}
static S page_everEasier() {
print("html ever-easier");
S code = hHiliteJava([[
p-awt {
final new ImageSurface is;
showFrame(jscroll(is));
jHandleFileDrop(is, voidfunc(File f) {
is.setImage(loadBufferedImage(f))
});
}
]], "text-align: left; width: 400px");
ret htitle("Ever Easier Programming | Stefan Reich")
+ hmobilefix ()
+ hGoogleFont("Nunito Sans:900")
+ hcenter2(
h1("Welcome To Ever-Easier-Programming!", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 50px")
+ p(b("Today: Making an image surface in " + ahref("http://javax.ai1.lol", "JavaX") + " that you can drag image files into. " + ahref(snippetLink("#1006022"), "Full program.")))
+ code
+ p(" ")
+ hr()
+ mediumPosts()
+ p(youtubeEmbed("YCBt-JggF2c", 400, 250))
+ p(ahref(rawLink("more"), "[More]") + " " + ahref("mailto:info@ai1.lol", "[Mail]"))
+ p(hsmall(visitor.get()))
);
}
static S rest() {
ret
or2(pJavaXInstallations(), p(" "))
+ p(hsmall(visitor.get()))
+ hr()
+ mediumPosts()
+ p(ahref(rawLink("more"), "[More]") + " " + ahref("mailto:info@ai1.lol", "[Mail]"))
+ p(b("Other Popular Videos."))
+ p(b(ahref(youtubeLink("kTFS3V4PnQM"), "Perfect Java Garbage Collection")));
}
static S mediumPosts() {
ret p(b(ahref("http://medium.com/@stefanreich", "On Medium.com:")))
+ mediumPosts2();
}
static S mediumPosts2() {
ret p(b(join("
",
map(func(MediumPost p) {
ahref(p.url, htmlencode(p.title))
}, mediumPosts))), "style", "font-size: 1.5em; line-height: 140%");
}
static S page_watch() {
ret htitle("Let Your Computer Watch You! | Stefan Reich")
+ hmobilefix ()
+ hGoogleFont("Nunito Sans:900")
+ hcenter2(
h1("Let Your Computer Watch You!", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 50px")
+ p(himg("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1006291&contentType=image/png"))
+ p(targetBlank("http://tinybrain.de/1006248", "Program.") + " " + ahref("http://tinybrain.de/x30.jar", "Install.") + " " + targetBlank("http://java.com/download", "Java 8."))
+ p(b("FAQ: ") + "Does this program send any information to a server?
" + b("Answer: No. ") + "If you want to share your trained fonts, there is another program for that.")
+ rest());
}
static S page_explodingWindow() {
ret htitle("Behold The Exploding Window! | Stefan Reich")
+ hmobilefix ()
+ hGoogleFont("Nunito Sans:900")
+ hcenter2(
h1("Behold The Exploding Window!", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ htableRaw2(ll(ll(himg("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1006358&contentType=image/png") + b("
(Original)"),
himg("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1006399&contentType=image/png") + b("
(Exploded)"))), ll("cellspacing", 20), null, ll("align", "center"))
+ p("Tell me this ain't grand e.g. for finding scrollbars. It's " + ahref("http://tinybrain.de/1006396", "automatic") + "!")
+ p(ahref("/watch", "Yesterday's news."))
+ rest());
}
static S page_automaticScreenshot() {
S title = "Automatic Screenshots Of Windows";
S program = "http://tinybrain.de/1006425";
ret htitle(title + " | Stefan Reich")
+ hmobilefix ()
+ hGoogleFont("Nunito Sans:900")
+ hcenter2(
h1(title, "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(targetBlank(program, himg("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1006436&contentType=image/png"))
+ p(targetBlank(program, himg("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1006427&contentType=image/png"))
+ p("Tell me this ain't grand. " + targetBlank(program, "Program.") + " " + targetBlank("http://tinybrain.de/1006408", "Program 2.") + " " + ahref("/explodingWindow", "Yesterday's news."))
+ rest()
+ p(b("Music."))
+ p(youtubeEmbed("V5AztWseIdU", 300, 100)));
}
static S page_editor() {
S title = "Making A Text Editor In 100 Lines";
S program = "http://tinybrain.de/1006438";
ret htitle(title + " | Stefan Reich")
+ hmobilefix ()
+ hGoogleFont("Nunito Sans:900")
+ hcenter2(
h1(title, "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("8A-25E7T8pA"))
+ p("Tell me this ain't grand. " + targetBlank(program, "Program.") + " " + targetBlank("http://tinybrain.de/1006441", "Program 2.") + " " + ahref("/automaticScreenshots", "Yesterday's news."))
+ rest()
+ p(b("Music."))
+ p(youtubeEmbed("zigwkEgKPAk", 300, 100)));
}
static S page_dynamicButtons() {
S title = "Dynamic Buttons In " + ahref("http://javax.ai1.lol", "JavaX!");
S program = "http://tinybrain.de/1006467";
ret htitle(hTitleClean(title) + " | Stefan Reich")
+ hmobilefix ()
+ hGoogleFont("Nunito Sans:900")
+ hcenter2(
visitorsChart("float: left; margin-right: 20px")
+ youtubeLinkFloatRight()
+ h1(title, "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(hHiliteJava([[
static JScrollPane scroller;
p-substance {
showFrame(scroller = new JScrollPane);
scroller.setViewportView(vstack(jbutton("1"), jbutton("2"), jbutton("3")));
packFrame(scroller);
awtLater(scroller, 5000, r {
scroller.setViewportView(vstack(jbutton("7"),
jbutton("2"), jbutton("4"), jbutton("6"), jbutton("hello!")));
});
}]], "text-align: left; width: 640px"))
+ p(b("Show some buttons, after 5 seconds show another set of buttons. All with a scrollbar."))
+ p(targetBlank(program, "Program."))
+ h1("Programs " + ahref("https://medium.com/@stefanreich/javax-programs-can-rename-themselves-238c49f3377a", "renaming themselves"), "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(hHiliteJava([[
renameProgram(dropStartingFromLast(getProgramTitle(), " - ")
+ " - last renamed " + ymd_hms());
]], "text-align: left; width: 500px"))
+ p(targetBlank("http://tinybrain.de/1006471", "Program."))
+ p(b(ahref("/gc", "Yesterday's news.")))
+ rest()
);
}
static S page_screenshots() {
S title = "Sharing Screenshots Between Windows & Linux In One Click";
ret htitle(hTitleClean(title) + " | Stefan Reich")
+ hmobilefix ()
+ hGoogleFont("Nunito Sans:900")
+ hcenter2(
visitorsChart("float: left; margin-right: 20px")
+ youtubeLinkFloatRight()
+ h1(title, "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ bigScreenshot_noTitle(#1006485, #1005411)
+ p(b(ahref("/dynamicButtons", "Yesterday's news.")))
+ rest()
);
}
static S page_new() {
S title = "A. I. For Everyone by Stefan Reich";
ret htitle(hTitleClean(title))
+ hmobilefix()
+ hGoogleFont("Nunito Sans:900")
+ hcenter2(
visitorsChart("float: left; margin-right: 20px")
+ youtubeLinkFloatRight()
+ header("Welcome To The New AI!")
+ headerSmaller("A New Type Of Chess Engine")
+ p(youtubeEmbed("TBTXScYgSvg", 500, 500*9/16))
+ headerSmaller("Is Donald a good person?")
+ p(youtubeEmbed("m4sqmHuJeC8", 400, 400*9/16))
+ p(b(ahref("http://javax.ai1.lol", "[JavaX]")))
+ mediumPosts2()
+ header("An Automatic Image Machine :)")
+ p(youtubeEmbed("EJ0gdYIcdUA", 300, 200))
+ header("Text Recognition As A Game")
+ p(youtubeEmbed("j2CSTPwunvs", 300, 200))
+ header("A Telepathic Language For Computers")
+ p(youtubeEmbed("gTlgZkc95IU", 500, 350))
+ header("More Dancing Numbers")
+ p(youtubeEmbed("douXXGMHbfA", 500, 350))
+ p(ahref(youtubeLink("oY_K_QMbfvM"), "A Heart For Cute YouTubers :)"))
+ header("Reproducing Images Without Neural Networks")
+ p(youtubeEmbed("tgZbUJJTMqo", 500, 350))
+ header("A. I. Games To Change The World / The Computer That Clicks Itself")
+ p(youtubeEmbed("1HLVUxrvwcc", 500, 350))
+ header("JavaX: Create a tiled background in one line")
+ p(ahref("http://tinybrain.de/1006896", himg("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1006899&contentType=image/png")))
+ tag("tt", dynamize([[showFrame(jTiledBackground(#1006895, withMargin(vstack(jbutton("Yo"), jbutton("Mama!")))));]]))
+ header("2 New Games")
+ p(youtubeEmbed("T8UTAmqcv1Q", 500, 350))
+ p(b(ahref("/screenLens", "Yesterday's news.")))
+ rest()
);
}
sS header(S s) {
ret h1(s, "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px");
}
sS headerSmaller(S s) {
ret h2(s, "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px");
}
static S page_screenLens() {
S title = "A. I. For Everyone by Stefan Reich";
ret htitle(hTitleClean(title))
+ hmobilefix ()
+ hGoogleFont("Nunito Sans:900")
+ hcenter2(
visitorsChart("float: left; margin-right: 20px")
+ youtubeLinkFloatRight()
+ h1("2 New Games", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("T8UTAmqcv1Q", 500, 350))
+ h1("A. I. Game Solved", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("AUjnnDakJhM", 500, 350))
+ h1("A New A. I. Game!", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("OVBDsiQbWdQ", 500, 350))
+ h1("How To Make Your Own Personal Assistant In 1 Minute ", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("LetUlRSi5QI", 400, 300))
+ h1("Let Our A.I. Play A Simple Game! / Programming Challenge", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("PJC4ej5-PDo", 500, 350))
+ h1("My Screen Lens Is Watching You!", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("nEeMH_HyTYE", 400, 300))
+ h1("The Mystery", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("xhlMzQAaMjo", 300, 200))
+ h1("Database Tutorial", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("ChHhPgKFYy0", 300, 200))
+ p(b(ahref("/pastLives", "Yesterday's news.")))
+ rest()
);
}
static S page_pastLives() {
S title = "The Truth About \"Past Lives\" + What Jesus Does Today";
ret htitle(hTitleClean(title) + " | Stefan Reich")
+ hmobilefix ()
+ hGoogleFont("Nunito Sans:900")
+ hcenter2(
visitorsChart("float: left; margin-right: 20px")
+ youtubeLinkFloatRight()
+ h1(title, "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("2gh7KsJbWj4", 450, 300))
+ h1("Database Tutorial", "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("ChHhPgKFYy0", 300, 200))
+ p(b(ahref("/screenshots", "Yesterday's news.")))
+ rest()
);
}
static S page_gc() {
S title = "Perfect Java Garbage Collection!";
S program = "http://tinybrain.de/1006458";
S program2 = "http://tinybrain.de/1006272";
ret htitle(title + " | Stefan Reich")
+ hmobilefix ()
+ hGoogleFont("Nunito Sans:900")
+ hcenter2(
h1(title, "style", "font-family: 'Nunito Sans', sans-serif; margin-bottom: 0px")
+ p(youtubeEmbed("kTFS3V4PnQM", 600, 400))
+ p(b("Enjoy! ") + targetBlank(program, "Program.") + " " + targetBlank(program2, "Program 2.") + " " + ahref("/editor", "Yesterday's news."))
+ rest()
);
}
static S pJavaXInstallations() {
ret numComputers == 0 ? "" :
p(ahref("http://javax.ai1.lol", "JavaX") + " installations: " + b(targetBlank("http://tinybrain.de:8080/tb/all-computers.php", numComputers)) + " and counting!");
}
static S visitorsChart(S style) {
ret himg("http://ai1.lol/1004435/raw?q=visitors+chart", "width", "150", "height", "110", "style", "border: 2px solid black; border-radius: 5px; " + style);
}
static S youtubeLinkFloatRight() {
ret div(targetBlank("https://www.youtube.com/channel/UCSvK6EfxnMTajbe-Qpc6NvA", himg("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1006478&contentType=image/jpeg", title := "YouTube", width := 57, height := 35, align := "absmiddle")), "style", "float: right");
}
!include #1006016 // screenshotLink etc.