« first day (3545 days earlier)      last day (1408 days later) » 

8:41 AM
0
Q: Javascript image object does not resize on canvas

kahveciderinI am trying to use this code to resize images and print them on a canvas to modify them later: var wth = img.clientHeight / img.clientWidth; img.width=300; img.height=300 * wth; ctx.drawImage(img, 0, 0); However, this does not change the result on canvas. It still appears to be too large for th...

 
9:02 AM
string.Join(",", typeof(Environment).GetProperties().Select(x => $"{x.Name}:{x.GetValue(null)}"));
oh right
@Wietbot evalcsharp string.Join(",", typeof(Environment).GetProperties().Select(x => $"{x.Name}:{x.GetValue(null)}"));
 
null
 
null?
 
Oh right
 
@Wietbot evalcsharp string.Join(",", typeof(Environment).GetFields().Select(x => $"{x.Name}:{x.GetValue(null)}"));
 
9:04 AM
@Wietbot evalcsharp Console.WriteLine(string.Join(",", typeof(Environment).GetProperties().Select(x => $"{x.Name}:{x.GetValue(null)}")));
 
null
Result: null
Output:
CurrentManagedThreadId:1,ExitCode:0,HasShutdownStarted:False,ProcessorCount:2,StackTrace: at System.Environment.get_StackTrace()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
 
LOL only 2 cpus
 
you dont need more :D
 
Oh shit
 
@Wietbot evalcsharp string.Join(",",typeof(Environment).GetProperties().Select(x=>{try{return $"{x.Name}:{x.GetValue(null)}";}catch {return x.Name;}}));
 
9:08 AM
null
 
@Wietbot evalcsharp string.Join(",",typeof(Environment).GetProperties().Select(x=>{try{return $"{x.Name}:{x.GetValue(null)}";}catch {return x.Name;}}));
 
Looks like it doesn't automatically return the response to methods
 
@Wietbot evalcsharp string.Join(",",typeof(Environment).GetProperties().Select(x=>{try{return $"{x.Name}:{x.GetValue(null)}";}catch {return x.Name+":!";}}));
 
You need to wrap it in a Console.Writeline()
 
null
 
9:09 AM
@Wietbot evalcsharp return string.Join(",",typeof(Environment).GetProperties().Select(x=>{try{return $"{x.Name}:{x.GetValue(null)}";}catch {return x.Name+":!";}}));
 
CurrentManagedThreadId:1,ExitCode:0,HasShutdownStarted:False,ProcessorCount:2,StackTrace: at System.Environment.get_StackTrace()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
 
@Wietbot evalcsharp return string.Join("\n",typeof(Environment).GetProperties().Select(x=>{try{return $"---{x.Name} = {x.GetValue(null)}";}catch {return x.Name+":!";}}));
 
---CurrentManagedThreadId = 1
---ExitCode = 0
---HasShutdownStarted = False
---ProcessorCount = 2
---StackTrace = at System.Environment.get_StackTrace()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
 
*D:\Users\Harry\IdeaProjects\Wietbot*
 
@Wietbot evalcsharp typeof(Environment).GetProperties().Count()
 
9:13 AM
21
 
@Wietbot evalcsharp typeof(Environment).GetProperties().First().Let(it => $"{it.Name}:{it.GetValue(null)}")
 
CurrentManagedThreadId:1
 
@Wietbot evalcsharp typeof(Environment).GetProperties().Select(it => $"{it.Name}:{it.GetValue(null)}").ToList()
 
System.Collections.Generic.List`1[System.String]
 
@Wietbot evalcsharp typeof(Environment).GetProperties().Select(it => $"{it.Name}:{it.GetValue(null)}").ForAll(Console.WriteLine)
 
9:15 AM
Result: System.Collections.Generic.List`1[System.String]
Output:
CurrentManagedThreadId:1
ExitCode:0
HasShutdownStarted:False
ProcessorCount:2
StackTrace: at System.Environment.get_StackTrace()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, Cultu
 
9:27 AM
@CaptainObvious ah, the null response is due to a semicolon
@Wietbot evalcsharp "hello".Trim()
 
hello
 
@Wietbot evalcsharp "hello".Trim();
 
null
 
the first reads as an expression, the engine will interpret it and keep the result as it's final result
the second reads as a statement, statements have no return value and the final result would be null
 
add return
@Wietbot evalcsharp return " hello ".Trim();
 
9:29 AM
Microsoft.CodeAnalysis.Scripting.CompilationErrorException((1,24): error CS1002: ; expected)
hello
 
hmm... I guess that also works
@Wietbot evalcsharp ""
 
<empty result>
 
9:57 AM
@Wietbot evalcsharp ListOf(true, false, true, false).OrderBy(it => it).ForAll(Console.WriteLine)
 
Result: System.Collections.Generic.List`1[System.Boolean]
Output:
False
False
True
True
 
 
7 hours later…
5:26 PM
Sandy, fuck
 
@CaptainObvious Sorry, I don't know that one.
 
Excellent
IT BEGINDS
after food tho
 
 
2 hours later…
7:12 PM
now it begins
 
7:37 PM
Sandy, this is a test
aaa
pls
plspls
Hey it worked this time
Sandy, do you respond to this
No, excellent.
👏, I need a response
 
@CaptainObvious Sorry, I don't know that one.
 
Fuckin a
botler!
Botler!
Botler! do something
 
@CaptainObvious Sorry, I don't know that one.
 
So he doesn't do anything with no arguments. Seems reasonable.
botler! do something
Case sensitivity can do one
 
 
1 hour later…
8:52 PM
Now for the moment of truth
Botler! About
oh pss
Botler! about
 
Lee Botler: A bot for C# which probably won't work.
Written by CaptainObvious, based originally on Sandy, by SquirrelKiller.
 
OH FUCK OH FUCK OH FUCK
ITS ALIVE
The question is
Can I just add a new command and it just work
Botler, join 7
 
@CaptainObvious Sorry, I don't know that one.
 
wait what
botler, join 7
oh piss tits
botler, join 7
 
2 more and I'll join room 7
 
9:05 PM
oh piss off
I AM YOUR MATER
MASTER
botler, join 78
 
2 more and I'll join room 78
 
oh fuck
wait what
botler, join 7
oh that's my fault
botler, join 7
 
I joined room 7, Boss.
 
9:22 PM
👏👏 join 7
 
@CaptainObvious Sorry, I don't know that one.
 
👏👏 join 7
👏👏 join 7
 
@CaptainObvious Sorry, I don't know that one.
 
👏👏 join 7
 
@CaptainObvious Sorry, I don't know that one.
 
9:24 PM
👏👏 join 7
👏👏 join 7
👏👏 join 7
 
I joined room 7, Boss.
 
 
2 hours later…
11:44 PM
2 Nicolas Fuchs and 1 other Nicolas stackoverflow.com/q/62667634/13552470
 

« first day (3545 days earlier)      last day (1408 days later) »