« first day (1471 days earlier)      last day (3471 days later) » 

8:04 AM
That's fucking terrible. Whoever thought that was a kind of "treatment" should be put in prison.
 
obviously that wasn't the intention
 
@TomW I know lol.
@TomW I have a history with shitty doctors so I don't tolerate them anymore. Their ego and ignorance is what harms most patients I believe.
Ofcourse I'm only going by my own and other's experiences that I've heard about.
 
well, I think I'm misremembering parts but I'm pretty sure it's this one en.wikipedia.org/wiki/TGN1412
 
I used to want to be a doctor at one point. I used to think I wasn't smart enough but when I actually became sick and needed a doctor I not only lost faith in them but I also realised that you couldn't possibly need to be that smart to be a doctor; since most of the ones I've been to don't even know what a bloody cold is.
This Ebola thing is pretty scary though lol
 
Well since there's nothing much that can be done for a cold, they were probably wondering what you were doing there
 
8:14 AM
@TomW due to my still (partially) undiagnosed illness, it can take several months for me to get over a cold now (and I have lots of common sense, so it's not like I'm making it worse by doing stupid shit when I'm sick). And he's fully aware of my health issues, so, he shouldn't be wondering that. When you develop a chest infection (when you have a cold) which gets so bad that you end up coughing so much phlegm that you literally choke for a whole minute on your own phlegm you generally
need antibiotics for the chest infection but some doctors are just clueless or something.
My doctor was so ignorant about rheumatoid arthritis that he refused to send me to a rheumatologist to get checked out even after I told him about family history. so I saw a different doctor and he confirmed I am borderline rheumatoid arthritis. in the last decade I've seen over 20 doctors and have diagnosed myself everytime despite them saying I was wrong and I turned out to be right about it 100% of the time. don't every come to Sydney Australia guys, health care here is terrible.
anyway, I didn't mean to go on about that crap lol. I just can't help it sometimes when I see stuff about doctors/treatments going wrong etc
HHey @TomW you into aviation?
 
I like looking at planes
 
yeh me too. u got a favourite?
 
I wouldn't say favourite
never seen in person
 
ah lol fighter jets yeah I've always liked them
 
well that's a Vulcan, cold war nuclear bomber
XH558 is the only one still airworthy and it's been doing the rounds at air shows the last couple of years
 
8:25 AM
oh cool
I just found this operation2015.org/index.html I never heard of the Vulcan nuc bomber before
i'd only heard of the f18's etc
 
that's the guy
 
I like the commercial airliners... like the boeing 747 img.planespotters.net/photo/136000/original/…
you been to any of those air shows?
 
British only, it was decided during the cold war that since we're the next nearest NATO target after Germany that we're going to need something to deliver nuclear bombs to Russia as nobody else is going to do it; they started a tender for a radical new jet bomber. Three companies, Vickers, Avro and Handley-Page all designed and submitted their own bonkers design. They bought them all
I last went to an air show when I was about 4, I don't really remember
there's a good one fairly close to here that I've been invited to several years running and never went
 
ah
you don't have the time to go?
 
time/organisation yeah
 
8:31 AM
too bad would be cool to go I think
i haven't been to any
 
commercials I'm not too interested in
there's no radical design there, not anymore
 
last time i went on a flight to queensland i was so excited i was jumping around and asked the pilot if i could ride in the cockpit with them and he was like "ah no sorry". I thought he would say yes actually because there's heaps of youtube videos where they've let enthusiasts go in the cockpits during flights
 
that's surprising. I thought they always kept the cockpit door locked these days
maybe aussies are more relaxed about it, wouldn't surprise me
I like flying, and I do get excited too, but more about the whole experience
although there's nothing really pleasurable about a european shorthaul on a budget carrier
 
Well, a little more detail... We had to park our car before we entered the airport and there's this massive secure car park and its that big that you need a bus to take you from the cr park to the airport and while we were on the bus i overheard a pilot speaking to his collegue about the flight we were about to board soon and that's when i asked him. so yeah, probably a few hours later when he was at the plane he might have had it locked
i remember growing up... everyone was so relaxed and easy going. it was really awesome. but now... most strangers look at you like you're a criminal - or potential criminal (compared to how people used to look at others around here).
it's pretty sad that there have to be so many strict rules in place. takes a lot of the fun away
 
You can't rely on people using their common sense anymore since a lot of people don't have any, so you just have to ban everything
Although I expect there aren't really any more screwups now than there ever were, but organisations used to be more prepared and able to look the other way and/or cover it up
 
8:47 AM
yea that is true
 
What bothers me the most is that people working for any business or other organisation apparently get no support when they stand up to someone (i.e. a customer) being a prick
 
Um, well over here it's kind of the opposite. These days it's usually the worker or the business owners that are being the pricks and there's usually no one standing up for the customer. I remember working for tandy and dick smith years ago, things were different then, it was all about the customer "the customer is always right" - even though half the time they're wrong but now it's like "the company is always right, even if it's not, we'll just act like it is and screw the customer"
 
oh yeah, it goes both ways I suppose. Everyone has experience of being put on hold to talk to a call centre that can't or won't do anything
 
i dunno, i think society in general is a bit bipolar. I've just observed over the years that the way society seems to think about things shifts from one extreme to the other
it does go both ways
i guess it just depends where you live as to what you experience the most
it's very depressing, especially when i remember a better time that feels like it was just yesterday
but around here, there's been a massive shift in the way people are being treated it's totally the opposite now
Hi Lex :)
 
> “Our youth now love luxury. They have bad manners, contempt for authority; they show disrespect for their elders and love chatter in place of exercise; they no longer rise when elders enter the room; they contradict their parents, chatter before company; gobble up their food and tyrannize their teachers.”
- Socrates
nothing changes
 
8:54 AM
I guess
hmmm
that just is my age showing then
 
Never been to Australia, would like to
 
@TomW Australia is still pretty good. Come fly a Vulcan over here lol (just don't bomb anything :P)
 
heard it's gone a bit bonkers economy-wise in the last few years
I have this perception that there's a long strip across the east coast that ranges from sometimes a bit chilly to tropical rainforest depending on latitude, and you can more or less pick where you want to live by climate
 
9:09 AM
yeah lol
 
hey Guys, i need some help..i have a winforms app, with 2 pictureboxes. In pic1 it's an image, and in pic2 nothing. I want this: as im hovering over the pic1, in the pic2 to "draw" the pixels from that position where my mouse is. Any help? this is what i have written
 private void pic1_MouseMove(object sender, MouseEventArgs e)
        {
            Color oldColor = ((Bitmap)pic1.Image).GetPixel(e.X, e.Y);
            Color newColor = Color.FromArgb(oldColor.A - 1, oldColor.R - 1, oldColor.G - 1, oldColor.B - 1);
            Invoke((MethodInvoker) (() => ((Bitmap) pic1.Image).SetPixel(e.X, e.Y, newColor)));
        }
can someone help me?
 
@jay_t55 sounds good to me. Sign me up for a bit chilly, brits don't take the heat very well
 
I love the cold too
@KraziiKiiD Ok so here's how you _get_ the pixel:

Color pixelColor;

private void picture1_MouseMove(object sender, MouseEventArgs e)
{
pixelColor = Get(e.Location);
}

private Color Get(Point location)
{
Bitmap bitmap = (Bitmap)picture1.Image;

return bitmap.GetPixel(location.X, location.Y);
}
@KraziiKiiD to draw the pixel you could use gdi and draw the pixel at the location of the cursor
 
@jay_t55 so i need to create a function for Set pixel ?
 
erm, I would just set a bool on mousemove to say "it's ok to draw now" then in pictureBox2.Paint method check if "it's ok to draw now" then draw the pixel in pictureBox2's paint method
 
9:17 AM
yes but on mousemove is getting the pixels but it should set the pixel to the other picturebox too in the same time
 
yep
so in mousemove event:

1. get the pixel location and color
2. set bool isOKtoDraw = true
3. call pictureBox2.Refresh(); or pictureBox2.Update(); (i can't remember which one)

then when you call pictureBox2.refresh or update it will make it repaint itself and that's where you can set the pixel in pbox2
hold on, i kinda suck at explaining, i'll just write it for you
gimme a min
 
Oops, i have written it like opposite way
 
9:36 AM
@jay_t55 can't you calculate the stretch?
 
ok i got it @KraziiKiiD
 
@jay_t55 let me see it
 
Then just place 2 picturebox controls on the form - keep them the same size just to keep it simple for this example, then add a image to pictureBox1 obviously then debug
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace GetSetPixel
{
    public partial class Form1 : Form
    {
        bool okToDraw;

        List<Pixel> pixels = new List<Pixel>();

        public class Pixel
        {
            public Color color { get; set; }
            public Point location { get; set; }
        }

        public Form1()
 
@jay_t55 cool, i have almost written it like this
.
.
 
cool, how's it working for you? You might also wanna set DoubleBuffered = true to make the drawing smoother/flickerless; on the pictureBox2 control but I can't remember how to do that. I think you'll need to override it or maybe use SetStyle or something
 
9:51 AM
@jay_t55 yeah kind of, but its silly drawing the pixels (the points)
where can i expand the area?
of setting the pixels in pic2?
graphics.DrawLine(new Pen(pixel.Color, 1), pixel.Location.X, pixel.Location.Y, pixel.Location.X + 1, pixel.Location.Y + 1);
x + 100and y + 100 ?
 
10:09 AM
@jay_t55 but if i want to set the both picturebox as stretch image, the picturebox2 draws a red cross on white space
is theere i way to work as stretch image?
 
 
6 hours later…
3:58 PM
public partial class MainWindow : Window
    {
        SqlConnection myConnection = new SqlConnection("server=localhost; Trusted_Connection=yes; database=master");


        public MainWindow()
        {
            SqlCommand myCommand = new SqlCommand();



            InitializeComponent();

            try
            {
                myConnection.Open();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
            myCommand.Connection = myConnection;
This is giving an xmlparse exception?
System.Windows.Markup.XamlParseException was unhandled
  HResult=-2146233087
  Message='The invocation of the constructor on type 'WpfApplication12.MainWindow' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'.
  Source=PresentationFramework
  LineNumber=3
  LinePosition=9
  StackTrace:
       at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
 
@Tokencodingnewbie The xaml is probably malformed. This is just a partial
 
A WPF window is typically composed of two parts: The markup (XAML) that defines the appearance, and the code-behind (C#) that can do things with the defined buttons etc.
In your case, your XAML is not compiling because it's not valid XAML.
 
but I didn't even do anything with the xaml
All I have is this code behind file, trying to learn some SQL
 
Don't blame me; blame Canada.

I'm just telling you what's wrong according to your error. :-)
 
4:04 PM
Oh yeah, I appreciate any help :P
Don't want to sound like an asshole haha.
I'm just wondering what I can do so it doesn't crash.
 
That's the designer trying to instantiate the window class and barfing
 
Why though?
 
because that's how it works
 
Innerexception is you friend, drill down to innermost
 
there's nothing wrong with the xaml, but the code-behind gets executed by the designer as well as when you run the application. WPF window constructors should do very little or ideally nothing, for that reason
don't know whether events like Loaded fire as well
 
4:09 PM
What's wrong with my code though?
 
the exception tells you
> Message=Incorrect syntax near the keyword 'table'.
 
I would be surprised if you're allowed to call a table table
 
What do you mean?
I'm new to this SQL stuff and I'm working with a tutorial :(
 
Can you put it in pastebin please
The code formatting in chatbox is cancer at the best of times.
 
4:14 PM
table is a keyword in SQL, go figure
 
Ah.
There ya go.
 
I was surprised it let him name it table lol
 
what's 'it'?
 
The table.
 
4:15 PM
you can type whatever you like into a sqlcommand, doesn't make it valid
 
No
..
Come on Tom ;)
It being firstly the server and secondly the table itself :P
 
@Tokencodingnewbie Is there a table called table in your SQL server instance?
 
I don't think you should be using master as your database either.
;)
 
oh, you might be able to use [table] as IIRC SQL server interprets anything in square brackets as an identifer, rather than a keyword
maybe that's how that can be done
 
He's likely connecting to the wrong db.
 
4:18 PM
I probably am, I'm just kind of winging this SQL thing.
 
It's easy when you get your head round it
 
I didn't even make a table on my SQL server.
 
Let's start with what you've put in your SQL server
Well that'd be why then
 
Yeah right now it's confusing AF
 
LOL
Okay so SQL server works by identifiers
 
4:19 PM
I thought it would make the table for me!
 
Your database has one, your tables have one, and your columns have one
That's not right and it's extremely simple, but think of it like that.
So if you wanna get data from your DB, you need a database first.
What SQL server you got?
 
You're using MSSQL?
 
Okay so go into your sql server management studio, connect to (local) with your windows user
 
4:21 PM
I'm in there.
 
Then in the pane on the left, right click databases and add one
Don't worry about all the extra options, you rarely need to change those because a DBA will do it for you
DBA = db admin, a person. :D
So just name it and create it.
 
Wouldn't that be me? :P
 
Only if you work alone
 
In which case have fun, I don't even know that stuff.
 
4:22 PM
This is hobbyist programming lul.
 
Ah well in that case you'll prolly not need to change it
You only need that level of optimisation if you're in a business setting, USUALLY.
 
I'd like to make a prototype program for my boss so he quits using notebook paper to run his business.
 
Have you made a db?
 
Oh my god.
 
4:22 PM
I named it "stuff"
 
"Always use verbose naming."
Doesn't matter for now, but in future name everything with what's inside it so you know what it is
Imagine if you were moving house and you labelled all the boxes 'stuff' xD
 
Oh I know.
 
Ah ok
 
I just want to get this thing running then I'll do all the proper stuff.
 
So next, right click on your database 'stuff' and add a table
And don't call it table pls.
 
4:24 PM
I was going to name it things
lol.
 
That's fine haha
 
stuff and things lori!
 
You're just better off not using reserved words, like @TomW was saying.
So now you have a database called stuff and a table called things. Open up your table called things
In most tables, you always want a primary key as a unique identifier, a self-increasing number usually.
'auto-increment'
 
like an ID number?
 
So call the first thing in that table 'id', change it to an int and make it non-nullable, then if you look at the bottom there should be a list of properties for that column
You wanna scroll down the list till you find a property called Identity Specification and change it to yes
Got it?
 
4:27 PM
Got it, thanks for helping me.
 
No worries
So now make another column, call it whatever you want, set it to varchar or nvarchar
The number represents the number of characters, MAX is something like 2gb worth of characters
nvarchar is for universal characters, like chinese ones
and varchar is just for regular ascii shit, I believe
 
I set it to varchar(10)
 
So now in your code,
SqlConnection myConnection = new SqlConnection("server=localhost; Trusted_Connection=yes; database=master");
Will become;
SqlConnection myConnection = new SqlConnection("server=localhost; Trusted_Connection=yes; database=stuff");
 
okie doke
 
myCommand.CommandText = "INSERT INTO things ('put whatever your second column is here') " +
                    "Values ('somestring')";
Like that ^
Lol, figured it'd be easier to put it in there.
Replace secondcolumn with whatever you called it.
 
4:33 PM
It's still throwing the exception :(
 
On what line?
 
line number 3?
 
Which is what?
 
using System.Linq;
 
uhm
 
4:35 PM
lol yeah
 
Is it included in references?
 
hrm I might see the problem
Got it :D
now to link it up with a textbox, or whatever is used to display the data :P
I wish the error just said "WRONG WORD IN THE COMMAND"
 
5:01 PM
anybody else losing hair in their late 20's lol?
 
lol lucky!
 
INSERT INTO TABLE ('penis')
That kind of wrong word?
 
anybody know if it's possible to create c# apps using visual studio online? i was reading about Visual Studio Online and some website made it sound likke you can write code online and build/debug the app on the visual studio website but i don't see that option anywhere
 
SQL Server : No means No
 
5:15 PM
INSERT INTO TABLE(':::::::::::::) ~~>');
lol
 
@jay_t55 you heard of Somerton Man?
reading about him now. Have read before, so interesting I'm reading again
 
@TomW never heard of him, i'll look it up lol. What is it?
 
"Considered "one of Australia's most profound mysteries" at the time"
^ wiki
dead guy discovered on a beach in Adelaide in 1948
his identity has never been figured out
 
haha that is eally interesting, i'm on the wikipedia page now lol. some say he may have been a spy?
 
doesn't seem unlikely
Adelaide is one of the more conveniently located major cities for travelling to Woomera, so if it's anything to do with that, British intelligence probably up to their necks in it
lot of joint work on rocketry in the 40s
 
5:26 PM
lol bloody brits :P
i realy should sleep man, it's so late.. it' s 4:30am here lol i need to be awake in a few hours
 
5:45 PM
@Tokencodingnewbie What was the error?
 
6:13 PM
@Sippy Oh I had the wrong column :P
 
@Tokencodingnewbie How do you mean?
 
I literally put "column" instead of the name of the column
 
Ah right
Newb :D
All works now though?
 
Yeah.
It doesn't do anything, but it compiles.
I assume its connected to my database.
 
If you assign the reader outputs to variables and use breakpoints to debug
You'll be able to see what's in them just to ascertain if it worked or not.
 
6:20 PM
Can't I just add a data table?
 
Do what you like, I was just suggesting a way for you to see whether it was pulling data :)
Based on the code I have from you from earlier.
You will wanna read up on basic database design, such as relational database design and normalisation
 
Word, I appreciate it.
That sounds complex haha
 
It's not
Basically, link your tables together using foreign keys so they make sense
And don't ever have the same static data written twice.
 
Well I'll probably input the main data and have it so that the user can insert data as needed
 
Yeah
The point being if you have a table say, things
And each thing has a static location, like the name of a town
You don't just write the name of the town in the box for every row
You link it to a table full of town names
So it has a foreign key to the town name in the town table.
That way if you have 20 records all with the same town, you only have to put the town in your database once, not 20 times.
The rest of the times it's just a link.
 
6:25 PM
Is that kind of like a Dictionary<>?
 
I guess
key value, sure.
 
Ugh coding while hung over sux
 
6:47 PM
Lol yup
 
 
3 hours later…
9:43 PM
Random question, what would be the ideal way to do a dynamic layout in Model View Controller. For instance, dynamically modify it.
 
9:59 PM
@Greg AJAX
Lol
 
What do you mean?
 
You need to elaborate.
 
You can modify @{ Layout ... }
 
What is it you want to build?
 
Well, I want to be able to dynamically call Layout.
 
10:02 PM
I have literally no idea what you mean by layout.
Do you have an example of it being used in any context?
 
Yeah, on your front end for your partial view you call a shared layout.
Can you modify it dynamically, rather then hard code to the partial view.
 
Ohhhhh
You shouldn't really change that.
It'll modify your entire site.
 
Well, if your trying to provide a clean approach for other people to change a layout on the fly. Then how would you do it?
Well, you can build as many shared layouts as you want.
 
True.
 
I want to be able to call and modify.
 
10:05 PM
Best way I can think of is to have partial views make up your layout.
Use ajax to modify the partial views.
 
Can you clarify.
 
Your layout files are cshtml
So you can create them by calling a number of partials
Or like
format them
I still don't know exactly what you're trying to achieve
I would never change a layout file at runtime
Are you trying to add menu options dynamically or something?
 
I'm trying to modify layout.
As different layouts for different types of pages.
 
            try
            {
                SqlDataReader myReader = null;
                SqlCommand myReadCommand = new SqlCommand("select * from things",
                                                         myConnection);
                myReader = myCommand.ExecuteReader();
                while (myReader.Read())
                {
                    MessageBox.Show(myReader["Column1"].ToString());
                    MessageBox.Show(myReader["Column2"].ToString());
                }
            }
Is this right? It's not displaying a messagebox.
 
@Greg So why not just define a bunch of layouts and then use them for said pages when you create them?
 
10:20 PM
Well, I could do that.
But, other developers to change page.
 
like how?
What would they be changing?
 
Hm, good chance.
I'd like a bit more dynamic.
 
?
3 mins ago, by Greg
Hm, good chance.
wat
 
Meant good idea.
Hoping to make it a bit more dynamic, so you don't need to recompile to change page layouts.
 
I really don't understand what you're trying to accomplish lol
You want the user to be able to restructure the site layout
But if it's something you want them to restructure, why not just make a minimal layout
And let them change the pages?
 
10:29 PM
What do you mean?
 
A layout is supposed to be something that affects all pages
So you've got your layout, and your pages in general, which can change dynamically.
You can have multiple layouts for different things, sure
But they aren't supposed to be dynamic,.
They can load dynamic content
But you don't change their html dynamically.
 
Well, I want a user to be able to change a layout. I want them to be able to install a new one.
 
A skin or a layout?
Letting a user change CSS is fine
Letting them literally restructure the code of your site is both dangerous and wrong
 
Well, I want them to be able to modify a shared layout or to use a different shared layout.
 
To what end?
If you let them write the code for it
Just no
Obviously that won't even compile but yeah.
Letting them choose a different shared layout is fine
Otherwise just use Javascript to manipulate DOM elements and save it to the client machine.
That's what Javascript is for :D
 
10:39 PM
Hm, trying to build a useful CMS
 
Changing a layout is completely fine, so long as you have a sane template engine.
Doing user-custom Razor is obviously a terrible idea; user-custom Mustache isn't.
 
Well, I want to build it in a useful fashion. Thats why I asked.
 

« first day (1471 days earlier)      last day (3471 days later) »