« first day (248 days earlier)      last day (4695 days later) » 
04:00 - 17:0017:00 - 23:00

4:05 AM
hi
 
 
4 hours later…
7:53 AM
Hello got problem with typed dataset. Cannot find row by FindBy method. It doesnt exist!
Got tables:
Routes <RouteID PK> ...
Case <CaseRouteID ...> in relation.

ReportDS.RoutesRow rr = rds.Routes.Rows.Find~ doesnt exist!
 
8:08 AM
How's it going peeps?
 
AMH
8:29 AM
@Greg hi
 
I'm terminating my .NET programming forever today. Never will I touch C# or Visual Studio again!
guess I'll take this room out of my favourites...
 
why??????
 
AMH
@aligray may ask u a question
it's regarding vectors and planes
 
of course
 
@aligray I learned C# at university, and used it at my last job, but have been moving to more open platforms all the time. I have no need for .NET any more
 
8:31 AM
@Greg interesting...
what are you using now?
 
AMH
@aligray I created a structure for vector and another one for plan
 
yup
 
@aligray the right tool for the right job
 
lol
 
AMH
@aligray I need to create algorithm to find the intersection between two planes could u help me regarding that
 
8:32 AM
My main languages are PHP and JavaScript (obviously not for desktop apps)
 
AMH
@aligray are u still there
 
@AMH simple maths
 
@AMH how is your plane structure defined?
 
@aligray for desktop applications I'm using Qt until I've finished writing my own platform ;)
 
AMH
@aligray tthe vectore be defined using x,y,z and the plane will use 3 vectors to create a normal and destance to define it
I can send to u the sample code that I use
 
8:34 AM
yeah i'll take a look
 
AMH
@aligray could u send me ur mail
give it
 
@AMH ask it on Stack Overflow, then people get rep points for answering
and you will help others out in the future
 
AMH
@Greg I asked but get confused
 
contactalig at gmail.com
 
AMH
@aligray just a minute I am using .NEt 2010
 
8:37 AM
k
so do u prefer php to c#?
 
@aligray yes and no. I really like .NET's uniformity, and modular based code. But PHP hits it for me every time. Such a "quick" language.
 
i've only dabbled with it; seems messy
 
Obviously, I'm talking about PHP with a framework and C# using .NET framework.
 
AMH
@aligray I send it to u
 
@aligray it is messy without a framework. Imagine writing a website in C# without using .NET !!
 
AMH
8:41 AM
@aligray are u still there
@MartinhoFernandes Hi
 
@Greg no I cannot imagine!
@AMH will take a look at it soon, i'm much more comfortable dealing with linear algebra on paper!
:)
 
@aligray I think that's where PHP gets its "messy" name from... You need to have a framework in place.
 
AMH
@aligray me too
 
what do you recommend?
@AMH do you want to test if two planes intersect, or a plane and a line?
 
AMH
@aligray I need to get two points on the line of intersection
 
 
1 hour later…
10:15 AM
Hi all
 
hey @username
 
@Madcowe do you know what is the naming convention for delegate parameters?
For example public void Hello(Action<string> sayHelloAction);
 
@username sorry... cant help ya there, still rather new to C#
 
I'm using C# a few years, but still have a lot of questions ))
 
@username I prefer to given them names ending in -er/-or. Like "selector", "reader", "fiddler", "recorder".
 
10:27 AM
@username btw, can you make a tetris game on C#? x)
 
@Madcowe yep, no problem )
 
@username think you could help me create one?
 
@MartinhoFernandes is the first letter small? It looks odd when then I'm calling them
@Madcowe I thinks so, are you using wpf?
 
@username Actually, I have no idea how to start or how shall I go about doing it. I have visual studio 2008 and visual studio C# express 2010
 
@Madcowe I think that it's a good idea to use wpf for that case. The only problem is that if you don't want to have blurry fonts you need to use .net framework 4.0
 
10:40 AM
@username I always name arguments with lowercase.
 
@username so I make an wpf file on vs C# 2010 express?
 
@Madcowe yes
 
@username ok then, what's the first thing I'll need to do?
@username Ok started a project now..
 
@Madcowe now you have a main window and you can call it "tetris". It's a half of all work ;)
seriously, now you need some sort of logical grid with rows and columns
and you need to think about how to represent a block in that grid
 
10:55 AM
uh is that something "physical" or code based?
 
code based
 
<Grid>

</Grid>

in here right?
 
oh, you meant a grid in ui, ok let it be )
 
@username should I make a grid on an array or something?
dang, I really am a n00b at this
 
I'd create an array with two dimensions
 
11:00 AM
10x20?
 
yes, it doesn't matter
let's start from 10x20 by default
 
for(int i=1; i<=10;i++)
{
for(int j=1; j<=20; j++)
{
}
}


like so?
 
private int[,] grid = new int[10,20];
place it in a separate class that will serve as your game engine
tetris is a simple thing, but there is a lot of work to do anyway )
 
so I create a global class for the private int[,] grid = new int[10,20];?
 
yes
change it from int to bool, we need to know only two states for any cell
 
11:13 AM
inside class Class1
{
?
 
yes
 
@username ok done, what's next?
 
your grid will change it's state depending on the position of the falling block. It's state contains the falling block and the other blocks at the bottom. Now you need to create a block class that will contain a set of coordinates it takes
 
so, I create a new class for a block right?
 
yep
 
11:25 AM
uh..
what do I put inside of it?
 
create an array of points that have coordinates x and y
 
hm like (0,0) (0,1) (1,1) (1,0)
that would be a block?
 
yes, you can just declare an array, later you will initialize it with it's starting position
 
anyone familiar with naudio??
 
@username ok let me try
ok I came up with this:
class Block
{
    int i,j;
    for (i=0; i<=1; i++)
{
    for (j=0; j<=1; j++)
{
}
}
}
however I am getting a lot of error reports
 
11:45 AM
@Madcowe you don't have to iterate through this array now. Just declare it like
pubilc Point[] Points {get;set;}
 
like this:
class Block
{
public Point[] Points {get;set;}
}
?
 
yes, and that's it, you can even make it as struct
 
I got this error: Error 1 The type or namespace name 'Point' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Utilizador\AppData\Local\Temporary Projects\Tetris\Block.cs 10 11 Tetris

But I guess I still haven't done anything with "Point"
@username next what do I need to do?
 
it is in System.Drawing.dll
you can add it, or declare it by yourself
 
using System.Drawing?
 
11:53 AM
 
@CBarlow lol
 
What's up @Madcowe!
et al =)
 
@CBarlow not much, finally found someone that could aid me on making a tetris game on C# :P
 
hi
 
Hey folks
anyone done callbacks in WCF ?
 
12:00 PM
@Madcowe I'm very intrigued (just read over your transcript with @username) - I'd very much like to get my feet wet with basic game design so I might follow your progress =)
 
@CBarlow well I would certainly appreciate some help
as for that System.Drawing thing, it appears I dont have it here if I use the "using" command
either that, or i got it wrong on what I had to do
 
at the top of your class document where you want to use the Point class, just write "using System.Drawing;"
 
Error 1 The type or namespace name 'Drawing' does not exist in the namespace 'System' (are you missing an assembly reference?) C:\Users\Utilizador\AppData\Local\Temporary Projects\Tetris\Block.cs 5 14 Tetris


that's what I mean
 
@Madcowe have you added System.Drawing to your references?
 
@Madcowe Looks like you're not referencing the System.Drawing-dll in your project. You might want to add that
 
12:03 PM
@Christian how do I do that exactly?
 
You can make the Point struct yourself
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

I just added the last line, using System.Drawing;
 
you need to go to the references folder click right and select add reference
 
@Madcowe Right click on "References" in the solution explorer. Then "Add reference"... in the dialog that popus up, you can choose the dll then
 
0
Q: What's the difference between using statement and adding a reference?

comecmeIn Visual Studio, when do you have to add a reference to a dll? I always try to have a minimum of references in my projects, I try to only include the ones that are really necessary. I would think that I only need a reference if I have a using statement in my source. But that's not always enough...

 
12:06 PM
Sorry @Madcowe I misunderstood your problem =)
 
@CBarlow no prob ;P
@Christian ok thanks, now I need to find the drawing dll
 
@Madcowe it's in the ".NET" tab.. you'll find it in no time
I wonder though, why it's not in the references in the first place. Did you create a naked project?
 
@Christian yea I think so...
found it, now what shall I do next?
 
Well, click on Add
Then recompile
 
@Greg if you think going from being a .NET developer to a PHP developer is a verticial career move, I have some beachfront property in Kansas to sell you.
 
12:09 PM
No errors so far, just a blank window that appears since I've done nothing yet
 
ok, now you need to return to your engine
here you will have a list of fixed blocks at the bottom and a current falling block
 
@username sorry, what engine?
 
I mean your class with grid, don't know how you named it
 
yea I named it Grid ;)
 
ok =)
 
12:16 PM
uh I got to go lunch, be right back
ok
class Grid
{
private int[,] grid = new int[10, 20];
}

this is what I have on the grid class
 
now you can declare a fixed block at the bottom and current block
 
@username ok but on the grid class or the block class?
 
in the grid class
 
hm so...
uh
new Block[0,0]?
 
12:31 PM
no, just declare them
private Block fixedBlock;
private Block fallingBlock;
 
ok done
 
now you can create a method that returns one simple block. A cube as an example
 
@username ok..
 
set its initial coordinates to (0,0) (0,1) (1,0) (1,1) then you can translate it to the middle of your grid
 
@username sorry for all this "give me teh codez" thing but I still dont know very well what to do...
how should I do that one you said now?
 
12:40 PM
private Block CreateCubeBlock()
{
var block = new Block();
block.Points = new[]
{
new Point(0,0),
new Point(0,1),
new Point(1,0),
new Point(1,1)
};

return block;
}
 
@username that inside the gris as well?
 
yes
then you'll need to add Translate method to the Block
 
@username ok, how?
 
go to Block and add a public method, that will accept two parameters - translation in the x and y direction. In that method you need all your points coordinates become x+xOffset, y + yOffset
 
@username something like this? public BlockTrans(x,y)
 
12:52 PM
yes, but I suggest you not to add Block prefix because you are already in a block and will call this method as block.Translate(x,y). I think it's better then block.BlockTrans(x,y)
 
okok
 
=)
 
so now I have this: public Translate(x,y)

what am I missing?
 
public void Translate(x, y) { //implementation }
do you have a 'void' keyword&
?
 
@username hm what does the void do again? also if you are asking if the "void" is in blue, it is.
also, dont I need to declare x and y?
 
12:59 PM
void is what your function returns. Actually it returns nothing and type void specifies it. Is that what you are asking?
 
Do people mind if I swing a T-SQL question
 
@username I think so, thanks
ok so far I have:
class Block
{
public Point[] Points {get;set;}
public void Translate(x, y) { /*implementation*/ }
}
bit I think there is something missing on the Translate method
 
0
Q: What is the "god" sys table?

RaynosIF EXISTS (SELECT * FROM sys.all_objects WHERE name = N'SOMELOGIN') DROP USER [SOMELOGIN] GO Does not work because USER SOMELOGIN does not live in sys.all_objects. Is there a global "god" table I can look in to see if something exists. (i.e. dropping it when it doesn't exist doesn't throw an ...

 
namely maybe declaring x and y for example... since they are underlined with that wiggly red line
 
@Madcowe yeah, you have to add their types
int x, int y
 
1:16 PM
class Block
{
int x,y;
public Point[] Points {get;set;}
public void Translate(x, y) { /*implementation*/ }
}
but this shows:
Error 5 'Tetris.Block.x' is a 'field' but is used like a 'type' C:\Users\Utilizador\AppData\Local\Temporary Projects\Tetris\Block.cs 13 31 Tetris
same for y
 
remove this line - int x,y; rewrite Translate - public void Translate(int x, int y)
btw it's better to rename Points to Cells or what is more meaningful
 
points to cells?
and wow it worked, although I didnt quite understand why
 
yes, of course it's up to you how you name it
 
@Madcowe You have to define the type of each parameter in C#
thus Translate(x, y) won't work but Translate(int x, int y) will
 
@akmad yes I know, but when I had int x,y; on the beginning of the code it didnt work
 
1:25 PM
I don't know if that's legal for a class-level field declaration... it may be, I just think it's sloppy to write code that way ;)
 
@akmad so its better to declare them inside the method itself right?
@username alright, what's next?
 
@Madcowe you need to remove them
I mean int x,y
 
@Madcowe only if they are only needed as method variables
 
already have, class Block
{
public Point[] Points {get;set;}
public void Translate(int x, int y) { /*implementation*/ }
}
 
if they are used throughout the class or hold class state then they should be class members
 
1:28 PM
@akmad yes of course, thanks ;)
 
@Madcowe go ahead and implement Translate
 
@username uh sorry... I'm still rather clueless, but I am getting there
 
@Madcowe iterate through your points array and add to their coordinates x and y
 
@username but I have to relate that do the grid dont I?
 
1:44 PM
you will use it in a grid later
btw struct Point has a method Offset, you can use it
the idea is to make a block the only place that controls the value of its coordinates
that's why I also recommend to get rid off Points setter, this object will be initialized only once during creation
 
brb
 
@username But note that with public Point[] Points {get; private set;}, even though you're not exposing the array setter, you're exposing the setters for each individual element.
foo.Points[0] = ... is valid, even if foo.Points = ... isn't.
 
@MartinhoFernandes that's why I suggested to make Block as a struct
 
1:59 PM
That wouldn't stop you from doing foo.Points[0] = ....
And it would actually make it worse.
Exposing an array is a Bad Ideaâ„¢.
Exposing an array in a struct is a Worse Ideaâ„¢.
 
@MartinhoFernandes hm, you are right, I was expecting that C# compiler will not allow me to do that
 
Arrays are nasty because they're half-mutable, half-immutable.
The size is fixed, but the elements are mutable.
 
so... do I need to change something on my code or something?
 
=)
 
hey @Madcowe - i just found this to look at the code, don't know if you've seen it yet. Might seem like cheating, but maybe you have a look at this code when you are done with yours? =)
 
2:07 PM
@Madcowe there is always a need to change the code
 
@CBarlow ah thanks, I'll look into it when I finish it maybe ;)
ok so,
class Block
{
public Point[] Points {get;set;}
public void Translate(int x, int y)
{

}
}
class Grid
{
private int[,] grid = new int[10, 20];
private Block fixedBlock;
private Block fallingBlock;

private Block CreateCubeBlock()
{
var block = new Block();
block.Points = new[]
{
new Point(0,0),
new Point(0,1),
new Point(1,0),
new Point(1,1)
};

return block;
}
}
this is what I have so far
sigh I still have a lot of ground to cover if I ever want to be a decent programmer dont I? x)
 
now you can change Points[] to something else that will not allow to change your points, probably IEnumerable<Point> (or IList<Point>). For the start you can change it's type, convert auto property to property with backing field, then remove it's setter, provide constructor with parameter, initialize from it. Then you need to change cube initialize method
it is some sort of pair programming
 
2:27 PM
@username sorry, I didnt get what I had to do
 
You can live with the array for now.
It's not a show-stopper.
 
@MartinhoFernandes then what must I do now?
 
Hmm, I see an empty Translate method there.
That's a clue :)
 
@MartinhoFernandes yea but I have no idea what I have to put there x)
 
You need to iterate through the array of points, and add x and y to each.
 
2:33 PM
@MartinhoFernandes so... I use 2 for cycles?
 
@Madcowe you need to use one for cycle to iterate through points
 
@username can you give me an example?
 
in each point there is an Offset method, you can use it
for(int i = 0; i < Points.Length; i++)
{
Points[i].Offset(x,y);
}
but there is a danger of NullReferenceException
 
hm
 
No there isn't.
 
2:38 PM
also what does the offset do? so I can understand the code better?
 
That is, unless you forget to initialize Points.
 
@MartinhoFernandes that's right, Translate method may be called before initializing of Points
probably I'm too defensive )
 
Nah, I'm getting lax.
Languages without nulls everywhere do that to you.
:(
 
@Madcowe Offset does the same thing - it adds x and y to the point's coordinates
@MartinhoFernandes what such languages do you use?
 
@username so this piece of code will create a block with the coordinates (x,y) on the spot where is [i]?
 
2:45 PM
@username Haskell, and more recently, C++.
 
@MartinhoFernandes oh great, I always wanted to learn haskell
I've heard that there is totally another situation with creating barricades where you have to perform validation of you data in haskell, but actually I don't know how it works there
 
Hmm, no, you don't have that kind of trouble in Haskell.
Of course you still need to validate user input, but that's not the same as testing something for null.
 
hello
anyone here.. help needed for a c# noob
 
@Madcowe It will adjust the position of the block, yes.
@techmanc Just ask
 
Im trying to implement this is my project
will have to make changes
but i dont understand how i should implement it...
dont get what he means by those 4 steps
in the end "Putting it all together"
 
2:59 PM
Which steps are you misunderstanding?
 
all four i guess
but mainly about how to get started
 
@techmanc did you download his source code to take a look at his implementation?
 
yeah i did
but am i supposed to look for something specific here
i figured that i have to reference the Timeline.dll to my project and then follow his steps in the end to get it working
 
Ok, I only skimmed the article, and I don't have the time right now to read it, but implementing ITimelineItem seems easy.
 
@techmanc that's exactly what you need to do: reference his assembly and then create classes that implement the different interfaces that can be used by the control to generate the diagram
 
3:09 PM
@madd0 Write classes implementing ITimelineItem to represent data items
how exactly do i write this
 
class MyTimelineItem : ITimelineItem, and then you implement the methods in the interface.
IF you look around the sample code, you should see something similar.
 
@techmanc in the VTAView project you'll find an example of an ITimelineItem in the TrainStopItem class
 
ah okay
and in the third step where he says drag and drop timeline control
we have to add it to the toolbox from the dll and then dragdrop it right?
 
AMH
@MartinhoFernandes hi
 
@techmanc yes, that'll probably do it
 
3:19 PM
@madd0 thanks! hope it works ! :) cheers
@MartinhoFernandes thanks!
 
by the way, I hope you won't take this the wrong way, but that last one is typically the kind of question you should try first and ask later; in my experience, you'll learn more that way ;)
 
point noted :)
will do it more often :)
thanks again
 
AMH
do any one worked with planes and vectors and can help me
 
@MartinhoFernandes kk thanks ;)
 
@AMH Can you post your code on pastebin.com or something?
I can't download it :(
 
AMH
3:27 PM
it's 3 classes
 
gist.github.com allows multi-file pastes.
 
AMH
could u give me ur mail and I will send it to u
I will try giet.hub
 
Hmm, I just realized my code has a flaw.
There could be divisions by zero :(
 
AMH
@MartinhoFernandes if u can help me in that
 
Give me some time. I'll have to rethink those divisions :(
 
AMH
3:35 PM
Ok u can send to me at my mail is this ok for u
 
on a side note: Is there a way to easily move one directory from one repos into another one? SVN, using RapidSVN
 
AMH
ali.m.habib@hotmail.com
 
@yas4891 Checkout both repos, mv path/to/dir/in/repo1 path/to/dir/in/repo2, commit both repos?
 
hmm. Problem is the ".svn" subfolder
 
Oh, that.
Now I remember why I came to hate SVN.
Ask on SO.
 
3:39 PM
Oh wait a second ;-)
found a way. It's called "Export" in RapidSVN
 
AMH
@MartinhoFernandes are u there
 
4:02 PM
hmm... Another question
Is it possible to tell the compiler to delete all references to a certain type?
Background is: I have some lines in my code to measure performance, but I don't want them in the release code
 
@yas4891 Add the ConditionalAttribute to the methods.
[Conditional("DEBUG")] should do it.
 
4:37 PM
is there any game from nowadays that was made using C#?
and I mean "strong" titles like ps3, Xbox, PC... heck, even if its just psx or something
I think most are c++ though...
 
@Martinho thanks.. how obvious :-/
 
@Madcowe C++ gives lots more control.
 
@MartinhoFernandes So I've heard..
 
That's why it's the preferred language for that kind of thing.
 
@MartinhoFernandes yea
 
4:48 PM
@Madcowe games developed with Unity use C#
 
Also, There's XNA for the PC/XBox.
 
@madd0 can you give me an example of a known game?
for no reason really... I'm just curious
 
@Madcowe I wouldn't know if a game is "known" or not, I'm not really into games, but take a look at their game list ;)
 
@madd0 o..k dont know any of them but they do seem nice xD
 
04:00 - 17:0017:00 - 23:00

« first day (248 days earlier)      last day (4695 days later) »