last day (2161 days later) » 

10:00 PM
You can add an rss feed (from an url), then you can choose whether the feeds user posts the messages, or if new feeds appear at the top of the screen
@CCInc
 
@CCInc How would I interface my bot with stackoverflow then? How does your bot get the most recent messages in chat?
 
POST I think
 
Does it have to parse the HTML?
 
@ShaquinTrifonoff Do you know exactly how chat works?
@jackwilsdon Let me find a simple example
 
Ok :)
ty
 
10:05 PM
@jackwilsdon Kendall made a real simple chatbot that may be easier to learn from
 
Ah, thanks :)
 
start: function ()
	{
		bot.xhr("POST", "/chats/" + bot.roomId + "/events", "since=0&mode=Messages&msgCount=0&fkey=" + bot.fkey, bot.onStart);
		bot.startButton.style = "display: none;";
		bot.stopButton.style = "";
	},

	onStart: function (status, responseText, retry)
	{
		if (status != 200)
		{
			console.log("Starting failed with status " + status);
			return;
		}
		var response = JSON.parse(responseText);
		bot.time = response.time;
		bot.xhr("POST", "/ws-auth", "roomId=" + bot.roomId + "&fkey=" + bot.fkey, bot.onWsauth);
 
There is a stream(?) called 'events'. I think that's where new messages come from. But I usually just use setInterval and check if the last message id is different
 
So, according to that code, this should work; chat.stackoverflow.com/chats/22091/events
Visiting that link should return some stuff
Or is it only by POST
 
One sec
 
10:09 PM
@ccinc btw, there is a function called fkey so you don't have to get the value of the element called fkey
 
Request URL:chat.stackoverflow.com/chats/22091/events
Request Method:POST
Found it :)
 
Request data: since=0&mode=Messages&msgCount=0&fkey="
 
@jack only by post, otherwise it 404's
 
Ah :D
Thankyou @Shaquin
How does the bot auth exactly?
 
?
Auth what?
 
10:12 PM
To get it's fkey from stackoverflow
How does it authenticate with their servers
 
I also found a way to post messages with PHP. The script needs the fkey and two cookies
 
fkey: fkey().fkey,
wat.
 
@jack the fkey is stored in a hidded input
 
@jackwilsdon Run fkey() in console
 
where is the fkey function?
 
10:13 PM
In chat
 
Aha
 
Run it in console
fkey()
Object
fkey: "802cd66262d4cdc64d1769d58e3b673c"
__proto__: Object
 
So basically, I have to enter this into the bot?
 
Well, you get it programatically
 
And is this key then permanent?
How do I get it programatically?
From, E.G., Java
 
10:14 PM
fkey()
Ah,
 
Not on a web browser :p
 
I suppose then you have to hardcode it
 
@jack you have to get the cookies from auth
 
T_T
 
Ah, PHP. The impossible language.
 
10:15 PM
Hello, I just learned about this cool forum.
 
So basically, I'd have to get my Java application to submit a form, then get the fkey from the cookie set?
@Hope4You Welcome :)
 
@Hope4You Hello!
 
Then request a page, and it will contain the fkey
 
@ShaquinTrifonoff So I'm gonna have to do some snooping with the login of StackOverflow? T_T
 
@jack it's more complicated than that I think, you have to deal with openid
 
10:17 PM
AAAHHH
 
T_T
 
Yay openid!
cc/urban yws
 
@CCInc yws You Want Some?
 
What kind of magic is this @ShaquinTrifonoff ?
How did you become most active while Hangbot talked last?
 
10:18 PM
?
 
Hmm, nevermind
Wait, why is our chat sleighed?
 
Because it's Christmas season :)
 
(... I mean, the sleigh when a person leaves)
 
Yes, but I thought only certain rooms were sleighed...
 
10:19 PM
All those I've been in have sleds.
 
Nope, all of them @cci
 
BRB guYS :D
 
BTW does anyone here know how to convert NSURL into NSData?
(objective-c)
 
Objective c?!
Mac?!!!
 
Can you ask anything here??
 
10:20 PM
@Hope4You In theory, yes.
But I don't think anyone here knows obective C
 
OK no problem
 
I haven't ever looked at obective C
and I know C, C++, and C#
 
I know a bit of normal C
 
Back :D
 
#include <isoph>
main()
{
printf("something");
}
 
10:21 PM
Eww, Objective C
 
It's for iOS app... what else?
 
[function: makesnosense]
:D
#include <something or other...>
 
Exactly
 
baaack!
 
It's not easy to remember all the Obj-C methods, that's why XCode is there to remind you.
 
10:22 PM
@javawarrior hello!
 
Hey @javawarrior!
 
So............
 
in C#, 29 secs ago, by CC Inc
Question: Why do C#-ians look down apon java?
 
Who can guess what my favorite language is
 
in C#, 17 secs ago, by Travis J
Answer: Because it is a beneath us.
@javawarrior Java?
 
10:24 PM
:O
HOW DID YOU KNOW?
 
j
 
@javawarrior Potato?
Oh, someone beat me to it :(
 
in C#, 21 secs ago, by Shotgun Ninja
As a professional Java developer, it's because Java sucks.
 
10:24 PM
onion
 
:( sorry java folk
 
cc inc no big deal
 
cc/undo
 
@CCInc I've yet to say a word.
 
10:25 PM
It seems Java is not very good in the C#-ian community
 
we all have to get along in this world
 
let's all be friendly to each other
 
Just quoting
 
10:25 PM
00000000000000000000000000000000000000000
there are ten types of people in the world, those who understand binary, and those who don't
 
1 message moved to Java
 
In the C++ room, they argued about which was worse: Java or PHP
 
PHP
 
for sure
 
10:26 PM
f
 
No offense
but I don't like no debugger
 
I'm 21, lol. Bye noobs
 
Hey @ShotgunNinja
I ain't no C# noob
as you plenty know
 
Tom
Why on earth was that message moved to Java?
 
d
f
k
LOOOOOOONELY ISLAND
 
10:28 PM
@Tom sorry, my mistake
 
@Lonelyisland Stop
 
user142019
@ShaquinTrifonoff both are equally terrible so it doesn't matter.
 
Hey, it is @Zoidberg'--
 
@ccinc they thought java was worse
 
Tom
10:31 PM
"<insert_language> sucks" usually means no more than "I suck at <insert_language> programming".
 
Should methods have capital letters at the beginning?
 
user142019
Follow your style guide and be consistent.
 
Tom
Occasionally, it's a justified statement. As long as it's followed by "Here's a better language I conceived and made a compiler for"
@j
@jackwilsdon in which language?
 
Java
I know it's preference, but I'm wondering which
I usually do lowercase
 
@jackwilsdon Usually depends, like in C# we use PascalCase for public and camelCase for private
 
user142019
10:32 PM
Java is horrific. Use Haskell or Python.
 
Tom
@jackwilsdon they should not.
 
Ok :P
(quote from Tom) "<insert_language> sucks" usually means no more than "I suck at <insert_language> programming".
 
user142019
You can quote by pasting the permalink noob.
 
So, @Zoidberg'--, Java's not that bad
 
user142019
It is.
 
10:34 PM
Why?
 
Tom
@Zoidberg'-- is calling others noobs the only argument you've got? Or is there more?
 
Hmm...
 
user142019
It's overly verbose, it has no unified type system, it has no type inference (which is a huge disadvantage), has no unsigned integers "because programmers would not understand unsigned integer arithmetic" (according to the designer of Java) and interfacing with other languages such as C in Java is almost undoable.
 
user142019
Its generics are type-erased, which is most vexing. You never want that.
 
10:35 PM
Lol
 
Can we not start a flamewar in here, I'm sure there's a chatroom for that
 
user142019
You asked why.
 
Can I add a website to the feeds?
 
Is it not your room?
 
I am an owner.
 
10:37 PM
Well, add the site then :D
 
I added the xkcd feed to Sandbox :)
 
Woo
How do I see it? >_<
 
New feeds are posted by the Feeds user
 
Lets test this out
@jackwilsdon ...
 
10:39 PM
What?
 
CC Inc has made a change to the feeds posted into this room
CC Inc has stopped a feed from being posted into this room
 
Dang feeds won't work
 
They don't appear instantly
 
How long does it take to update?
 
10:42 PM
Is the feed RSS (XML)?
 
Do you not need to add feed://feeds.rapidfeeds.com/55537/
the feed:// bit
 
Doesn't work
 
Oh :/
 
CC Inc has made a change to the feeds posted into this room
CC Inc has stopped a feed from being posted into this room
 
10:44 PM
Doesn't look like RSS to me
 
It is supposedly T_T
 
@ShaquinTrifonoff This better? feeds.rapidfeeds.com/55537
 
posted on January 03, 2013

Here I present my arguments against Java and against the wrong arguments defending Java:

posted on January 03, 2013

http://www.lastwordonnothing.com/wp-content/uploads/2010/07/computer_programming_1012.jpg

posted on January 03, 2013

http://www.lastwordonnothing.com/wp-content/uploads/2010/07/under_the_hood.png

 
...
@ShaquinTrifonoff How do I get it to display images?
 
10:56 PM
Check out the xkcd feed?
 
Ah
 
Although, xkcd links get oneboxed... there might not be a way to show images...
 
oneboxed?
Well, I tried the IMG tag...
<description>
<img src="http://www.lastwordonnothing.com/wp-content/uploads/2010/07/computer_programming_1012.jpg" title="Abstruse Goose has the same problem I do but proposes a solution." />
</description>
 
I might have to create an 'ImageFeeds' user :D
 
Aww, he left :(
grr
 
11:12 PM
http://feeds.rapidfeeds.com/?iid4ct=6908380
Teenage Chat Feed
Programming

1357250280
 
grr
 
Hey @DemCodeLines, what'cha need?
 
Top-level control cannot be added to a control.
 
@user1691444 Hello!
@DemCodeLines one sec
 
11:22 PM
hello
 
@DemCodeLines More specific?
@user1691444 Hi!
 
@DemCodeLines What do you need this time?
:)
@DemCodeLines CC is right we need MUCH more DETAIL!
 
Error creating window handle
 
@DemCodeLines WE NEED MORE DETAILS!
we cannot fix broken bricks without clay!
show us some code
give us some background
etc
 
Ok here it is:
There is a form (form1). This form1 is child of form2. form2 is supposed to be embedded in a panel in form 3. Except, I can't get it to work
 
11:30 PM
@DemCodeLines I see!
 
Umm
 
Well can you show us the code for embedding it (I've never done this but might be able to point you in the right direction)
 
Why would you embed a form inside a form?
 
@CCInc It CAN be done
 
can't you just put the controls in it?
 
11:31 PM
    Dim s As Form2 = New Form2
    Dim FF = New Form1
    s.Prepare(New Drawing.Point(0, 0), FF)
    pnlBar.Controls.Add(s)
    s.Show()
    s.Activate()
    s.BringToFront()
    s.Width =pnlBar.Width
 
in VB?
 
@JABFreeware Of course!
 
@CCInc I HATE VB, dont you?
 
s.Prepare(New Drawing.Point(0, 0), FF) is used to embed the first form into form 2
 
I do @JABFreeware
 
11:32 PM
I can convert to C#, but I think that will create confusions for me then
anyways
 
@DemCodeLines we will try and help
what exactly is the error code?
and where is thrown?
is it*
 
Error creating window handle.
 
...
 
at s.Show()
 
EXACT
 
11:35 PM
@DemCodeLines can you copy the exception text in here, please!
 
I did
 
...
This is an exception:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SQLite.dll' or one of its dependencies. The specified module could not be found.
File name: 'System.Data.SQLite.dll'
   at GetHistory.Chrome.GetHistory(Boolean display)
   at GetHistory.Browser.ReturnHistory(Boolean display) in C:\git\BrowserSync\BrowserSync\GetBrowsers\URLHistory.cs:line 499
 
@CCInc oh boy!
@DemCodeLines yeah thats the good stuff we need, below!
above, sorry!
 
Can you write a dummy app that just opens the file and closes it?
 
BRB dinner
 
11:38 PM
It really looks like something is preventing it from finding/accessing the file
 
@JohanLarsson Yeah your right
 
I do try to do that a lot when facing problems, writing super simple throw away prototypes to narrow things down
 
System.InvalidOperationException was unhandled
Message=Form that is not a top-level form cannot be displayed as a modal dialog box. Remove the form from any parent form before calling Show.
Source=System.Windows.Forms
StackTrace:
at System.Windows.Forms.Form.Show(IWin32Window owner)
at App.Desk.Desk_Load(Object sender, EventArgs e) in C:\app\App\Desk.vb:line 9
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
there you go :D
 
@JohanLarsson that does help. SInce @CCInc has to have dinner, can you help DemCodeLines
?
 
winforms is one of the things I suck on, I have never used it really
 
11:40 PM
@JohanLarsson what do you use?
!!!!!!!!!!!
 
(I have not been programming very long)
 
@DemCodeLinesThere is a form (form1). This form1 is child of form2. form2 is supposed to be embedded in a panel in form 3. Except, I can't get it to work
 
@JABFreeware always wpf but don't write much gui stuff
 
@JohanLarsson so If I have a WPF question you can answer it?
 
@JABFreeware I will try
 
11:41 PM
@DemCodeLines What is form3?
are child or parent of what?
 
Desk
 
@DemCodeLines what?
 
Desk.vb = Form 3
That is the file which contains the panel which Form 2 is to be embed in
 
@DemCodeLines But is Form three a child of form2?
 
No
Form 3 is the form in which the final result gets embedded
Form 3 has the panel
 
11:43 PM
@DemCodeLines okay
 
Form 3 is supposed to embed Form 2
 
I have never done this
 
Inside its pane
 
check this link
1
Q: Embedding a winform within a winform (c#)

phreneticIs it possible to embed a windows form within another windows form? I have created a windows form in Visual Studio along with all its associated behaviour. I now want to create another windows form containing a tab view, and I want to embed the first windows form into the tab view. Is this pos...

 
is it possible to emulate/simulate the jvm in java
 
11:44 PM
also, notice the comment:
I would -1 for missleading info as it is most definitely POSSIBLE to directly embed a form in another form and he ASKS "Is it possible..." but I have learned, through experience, that it is such a bad idea/nightmare to work with that it is best if people think it isn't possible... ;-)
@user1691444 beats me!
I dont think anyone here does Java, try the Java room
 
Back
 
@DemCodeLines @JohanLarsson do you know any java for @user1691444?
 
Unfortunately, I am forced to embed
 
@CCInc YAY
 
@user1691444 What do you mean, emulate the JVM? You mean like android?
@JABFreeware I do
 
11:46 PM
@DemCodeLines well I'm sorry, i've never done this and all I can do for you is point you to some links
1
Q: Parent a form to a panel

JeremyI have a form with a treeview on one side. Depending on what node is selected, I want to display different content on the right. To keep code and controls manageable, my plan was to isolate content into seperate forms, and display the form inside a panel. In my TreeView AfterSelect event, I tr...

 
   private void embedForm(Form frm) {
        // Remove any existing form
        while (panel1.Controls.Count > 0) panel1.Controls[0].Dispose();
        // Embed new one
        frm.TopLevel = false;
        frm.FormBorderStyle = FormBorderStyle.None;
        frm.Dock = DockStyle.Fill;
        frm.Visible = true;
        panel1.Controls.Add(frm);
    }
 
Ok. Ill be more clear plus Ill ask a question here:
 
@CCInc whats that for?
 
well i want to be able to create a jvm, because i want to be able to add computers into my java game what run java :D and i dont want to just use classloaders as the loaded computer files can effect the game
meaning emulating a jvm would make sense
 
Think of it like this: There is a separate form that emulates a task bar
now there is separate form that emulates a desktop screen. The desktop screen contains a panel in the bottom.
 
11:48 PM
@user1691444 As far as I know, the JVM is NOT emulatable.
 
that panel is supposed to embed this taskbar form.
get it?
 
well create a new instance
 
And that works fine
 
maby a libary that uses native stuff,
would have to be used
and create a new jvm from c++
like how an os does it
 
@DemCodeLines I completely understand what you want to do and it sounds cool, but I know NOTHING about it!
sorry
 
11:50 PM
@user1691444 Sorry, I am not that advanced at Java.
 
@CCInc, you neither?
 
   private void embedForm(Form frm) {
        // Remove any existing form
        while (panel1.Controls.Count > 0) panel1.Controls[0].Dispose();
        // Embed new one
        frm.TopLevel = false;
        frm.FormBorderStyle = FormBorderStyle.None;
        frm.Dock = DockStyle.Fill;
        frm.Visible = true;
        panel1.Controls.Add(frm);
    }
Thats all I can tell you.
 
@DemCodeLines hes limited too!
 
@DemCodeLines sorry
 

  last day (2161 days later) »