Streams of Consciousness & Thoughts~~~

  • Christian Chat is a moderated online Christian community allowing Christians around the world to fellowship with each other in real time chat via webcam, voice, and text, with the Christian Chat app. You can also start or participate in a Bible-based discussion here in the Christian Chat Forums, where members can also share with each other their own videos, pictures, or favorite Christian music.

    If you are a Christian and need encouragement and fellowship, we're here for you! If you are not a Christian but interested in knowing more about Jesus our Lord, you're also welcome! Want to know what the Bible says, and how you can apply it to your life? Join us!

    To make new Christian friends now around the world, click here to join Christian Chat.

Oncefallen

Idiot in Chief
Staff member
Jan 15, 2011
6,031
3,264
113
I learned which teams were playing in the Super Bowl from the boy I pick up for church. This kid is very enthusiastic about whatever he is into at the time, so all the way to church I got an earful of how he liked the Broncos and hated the Panthers.
I would have expected a southern boy to be rooting for the Panthers.

Ok I just decided I'm rooting for the Broncos!! :D

(actually I was rooting for them all along because Peyton is a decent, humble man and he acknowledges God with his wins...)

There you go Zero, pick your team after the win......:p
 
J

James4redemption

Guest
The puppy bowl was more entertaining ¯\_(ツ)_/¯
 

mochi

Senior Member
May 26, 2015
923
38
28
Good Morning everyone ^^
Today is supposed to be a happy day but i stay at home a whole day because of stomachache and didnt come to the main house where family and relative come (and avoid the interrogation session from them too >_< hehehe.. kidding)..
But i still got the cookies and food when they got home :p

View attachment 144125

Hope you all have a great day ^^
 

zeroturbulence

Senior Member
Aug 2, 2009
24,580
4,268
113
Good Morning everyone ^^
Today is supposed to be a happy day but i stay at home a whole day because of stomachache and didnt come to the main house where family and relative come (and avoid the interrogation session from them too >_< hehehe.. kidding)..
But i still got the cookies and food when they got home :p

View attachment 144125

Hope you all have a great day ^^
Staying home and still getting the food and cookies is awesome. :D Hope your tummy feels better.
 

zeroturbulence

Senior Member
Aug 2, 2009
24,580
4,268
113
Was trying to decide whether to post this here or not but here goes...

A few months ago I decided to take up singing as a hobby and well this a recording I just made of me singing "The Flame" by cheap trick (its an 80's song)..

[video=youtube;YcBj9wJl7HE]https://www.youtube.com/watch?v=YcBj9wJl7HE&amp;feature=youtu.be[/video]
 
W

wwjd_kilden

Guest
Eyh, programming guys. I am new to this whole threading business.

Why can't I access a control from a different thread?
- and why do I get an error message about this only if I close my streanwriter after ending the threads?

+ Ia there any logical reason that a streamwriter file should be closed before I use the close method on it?


Cannot write to a closed TextWriter pops up as a errorbox
.....
Message "Cross-thread operation not valid: Control 'Form1' accessed from a thread other than the thread it was created on." string
appears in the call stack

There is no error message from VS if I remove the close method.
So withtout it, the program runs and the listbox is filled according to plan
but the output file has no info in it after a run in either case

I know I am probably being braindead, but you should be used to that by now :D

PS: this.Invoke((MethodInvoker)(() =>

helped with the listbox, but makes no difference on writing to file
.................

namespace TestRE_Ex1
{
public partial class Form1 : Form
{

private static Mutex mutex = new Mutex();

private static string filePath = "output.txt";
private static System.IO.StreamWriter file = new System.IO.StreamWriter(filePath);


public Form1()
{
InitializeComponent();
}


private Thread trd;

private void startThreadsButton_Click(object sender, EventArgs e)
{
MessageBox.Show("Starting", MessageBoxButtons.OK, MessageBoxIcon.Warning);

for (int i = 0; i < 10; i++) {

trd = new Thread(() => threadTask(i+1));
trd.Start();

}
// file.Close();
}


Random rnd;

private void threadTask(int id)
{
mutex.WaitOne();

//listBox1.Items.Add("Starting thread " + (id + 1));
this.Invoke((MethodInvoker)(() => listBox1.Items.Add("Starting thread " + (id + 1))));
this.Invoke((MethodInvoker)(() => listBox1.Refresh()));

rnd = new Random();
int ms = rnd.Next(1000);
string info = "Thread id:" + id + ". Sleep time in ms:" + ms;

Thread.Sleep(ms);
writeToFile(info);

this.Invoke((MethodInvoker)(() => listBox1.Items.Add("Finishing thread " + id + "Sleep time:" + ms )));
this.Invoke((MethodInvoker)(() => listBox1.Refresh()));

mutex.ReleaseMutex(); //*
}

private void writeToFile(string info)
{
file.WriteLine(info);
}


}
}


// Beginner's Guide to Threading in .NET: Part 3 of n - CodeProject
// c# - How to add item to listBox from other thread? - Stack Overflow
 

Lynx

Folksy yet erudite
Aug 13, 2014
24,912
8,165
113
So THAT'S why breakfast at work was so slow today! I was wondering.
 
S

Siberian_Khatru

Guest
It's adorable when people return something said out of courtesy that doesn't apply to the person who first said it.

e.g. -
"Okay, well thank you very much for getting me this far."
"You're welcome sir. Good luck!"
"Thanks, you too."

Lol.
 
S

Siberian_Khatru

Guest
Was trying to decide whether to post this here or not but here goes...

A few months ago I decided to take up singing as a hobby and well this a recording I just made of me singing "The Flame" by cheap trick (its an 80's song)..

[video=youtube;YcBj9wJl7HE]https://www.youtube.com/watch?v=YcBj9wJl7HE&feature=youtu.be[/video]
Cool cover! Cheap Trick has some good jams. I wanna hear you cover "Gonna Raise Hell," next. ;)
 

lil_christian

Senior Member
Mar 14, 2010
7,489
73
48
27
Started working on the floor today at my work. Everything went pretty well :)
 

melita916

Senior Member
Aug 12, 2011
10,418
2,660
113
[patients walk in at 4:24 pm]

her: was our appointment for 4:30 or 5 pm?
me: it was actually for 4:15.
 
B

blueorchidjd

Guest
Here I am reporting the malfunctions again.
 
L

LittleBit1987

Guest
Im home... Drinking sweet tea.. And eating chocolate chip cookies...

I regret nothing.
 

Lynx

Folksy yet erudite
Aug 13, 2014
24,912
8,165
113
[patients walk in at 4:24 pm]

her: was our appointment for 4:30 or 5 pm?
me: it was actually for 4:15.
We have employees who do that quite often.

"Where were you? You were supposed to take my place at four!"
:goofy grin: "Really? I thought I was supposed to come in at five."

No apology, no thanks for staying for me, no nothing. Yeah, you're welcome for staying here an extra hour to cover for your dilatory self.
 
C

crosstweed

Guest
That moment when you have the powerful, uncontrollable urge to go change immediately into a teeshirt.