« first day (1435 days earlier)      last day (3517 days later) » 
00:00 - 16:0016:00 - 00:00

4:00 PM
Breaks the problem down into more manageable pieces
 
Well in computer terms I'm not sure how to give the cmputer this knowledge, know what I mean?
 
Yep, so you break the problem down again
and again, and again. Eventually it becomes clear what you should do
so if we look at shouldBlockOpponent()
we might break that down into return opponentIsCloseToWinning() || whatever else you care about
Then you break it down again
 
Well my scope of knowledge on programming is low, so I don't even know what I have to use. Know what I mean?
 
Ok, so what problem do you have with opponentIsCloseToWinning()?
I shall nudge you
 
so, when you break the problem down far enough, thats when you get to the point when you can start googling stuff that you don't know about
 
4:04 PM
My problem is how will the computer know it's close to winning?
 
@Tokencodingnewbie you need to break that down again
 
how do you know if an opponent is close to winning
non-computer based
 
By looking at the board and seeing that they need one more spot to win.
 
so, you know that you have to look at the board, that involves some sort of looping right
 
Yes, I have one that shows what is taken and open.
 
4:05 PM
if a computer were to do it
 
but I'm not sure how to put it for the computer to use it.
 
@Tokencodingnewbie so break it down again
 
sorry, didn't mean to steal your thinder omgtechy :p
 
@Steve it's fine :)
 
I keep picturing a grid and the more the opponent has in a grid will make that grid more "riskier" to the computer.
but how does a computer see a grid? an array isn't a grid.
 
4:06 PM
is this tic tac toe?
 
yes
@Tokencodingnewbie so break it down again
Do you see a theme here?
 
I do, but how else do I break that down?
 
a two-dimensional array is indeed a grid, is that what you're using to represent the board?
 
ah
 
4:07 PM
just a single array
 
So how can you break it up so you can use it like a grid?
This is breaking it down again
 
I could change the board to a 2d array?
Since it's grid like.
 
you don't even need to do that
one sec
 
I could put all the isTaken, isOpen stuff into a 2d array? :/
 
this sounds like fun, i've never written tic tac toe before
 
4:09 PM
It's fun, but they want it more complex than I had it.
 
Yes, a tic-tac-toe AI is about as simple as computer players get
 
@Tokencodingnewbie so, you've got each element in this 1d array, how do YOU know which is which?
 
0 = open 1 = x 2 = o
 
I mean, how do you know which element is which grid space
 
I suppose with this?
Dictionary<Button, int> indexs = new Dictionary<Button, int>{{Button1, 0}, {Button2, 1}, {Button3, 2}, {Button4, 3}, {Button5, 4}, {Button6, 5},
{Button7, 6}, {Button8, 7}, {Button9, 8}};
 
4:11 PM
@KendallFrey did you ever figure out the neural network stuff?
 
Yes I know how you store it, but I want to know how YOU know which is which
 
hah
no, I never made anything real
 
lol take that as a no?
 
For example, which row is element 0 on?
which column is it on?
How do you know?
From a human perspective
I'd imagine element 0 is row 0 column 0?
 
Hi. Currently working on JavaScript. It takes color input in this format 0xCCCCCC What kind of format is that?
 
4:13 PM
and 2 is row 0 column 1? or something similar
@Marek 32bit hex
 
Yeah it's the top left one.
left corner
 
@Tokencodingnewbie ok now we're getting somewhere
 
Then it goes 0, 1 , 2
 
0 1 2
3 4 5
6 7 8
Something like that?
 
4:15 PM
Ok then, so now look at them like this
 
@OMGtechy Thanks alot. Do you have any website that you would recommend that gives similar output for color picking? I tried: color-hex.com/color/eeeeee but cannot find 32bit hex
 
0 1 2 3 4 5 6 7 8
@Marek the last 8 bits aren't colour, so you'll struggle. Use a 24 bit hex and do the rest yourself
in fact that's balls
I think yours is 24 bit hex
@Marek you can look up HTML colour tables too
@Tokencodingnewbie mathmatically, what's the pattern here?
 
counting real numbers
 
How do you know element 2 is row 1 and element 3 is row 2?
 
It's in 3's
 
4:17 PM
yes!
So now, given ANY number from 0 - 8, how could you tell which row an element is on?
47 secs ago, by Token coding newbie
It's in 3's
That's your hint
 
@OMGtechy Thanˇks.
 
by seeing what group of 3 it is in?
 
Yep!
So how can you do that using basic maths?
"group of 3" is the key part
 
...count by 3's? D:
Kind of took a shot in the dark there lul
 
Ok so I have a cake, how do I split it into 3 pieces?
Your cake is your array
 
4:21 PM
damn, making me want cake
 
Mmm
 
so hung over
 
Drink a pint or 2 of water before you go to sleep; no hangover.
 
You split the cake into 3 separate pieces?
Do I need 3 separate arrays >.>?
 
@Tokencodingnewbie mathmatically what is this called?
 
4:22 PM
dividing
 
No you don't need seperate arrays
 
bam
 
YES
@Tokencodingnewbie so using division, work out what row a given element is on
Remember we count from 0, so the first row is row 0
 
It wouldn't be row 1?
 
You can think of it as row 1 if you like for now
just subtract 1 from whatever answer you get and it works out the same
0 1 2 // row 0 == row 1 - 1
3 4 5 // row 1 == row 2 - 1
6 7 8 // row 2 == row 3 - 1
So, you know you need to use division by 3 here. Have a go
7 mins ago, by Token coding newbie
...count by 3's? D:
5 mins ago, by Token coding newbie
dividing
 
4:30 PM
How can I turn #F6F6F4 into my format please? @OMGtechy
 
@Marek 0x<insert value here>
So 0xF6F6F4
 
@OMGtechy :o Thanks
 
It's nice when the answer is simple haha
@Marek 0x is simply a hint to the compiler saying "this is a hex literal"
rather than another base like base 24 etc
0x doesn't actually affect the value
 
@OMGtechy Aaah that makes sense. Thank you.
 
@Tokencodingnewbie got it? :)
 
4:33 PM
think you lost him
 
If I have, I shall help
He tries hard enough, so I don't mind
 
Huh
I'm working on it lul
 
It's a one liner
If you're doing anything more than that, you're doing it wrong
so assume you've got yourArray[index], based upon index how can you work it out with what I've shown you?
@Tokencodingnewbie can I see what you're trying?
 
public string DetermineRow(int i)
        {
			    if(isX[i] < 3)
                {
                    return "Row one";
                }
                if(isX[i] < 6)
                {
                    return "Row two";
                }
                if(isX[i] < 9)
                {
                    return "Row three";
                }
                return "";
        }
if (isX[i] == 1 || isX[i] == 2)
                {
                    MessageBox.Show(myButton.Name + " is taken");
                    MessageBox.Show(myButton.Name + " is in " + DetermineRow(isX[i]));
                }
 
I see what you're trying to do, but it's more complex than it needs to be
@Tokencodingnewbie what happens if you divide the index by 3?
Also, you don't want to return a string really, just return the row number
 
4:42 PM
Oh yeah I guess I could just divide
 
mmhm
 
I kept thinking but what about 1-2 you can't divide those by 3!
 
haha yeah easily done
you CAN, but you'll have a remainder
// so really you just want:
return i / 3;
 
It wont go ape because it's an int?
I thought int had to be whole numbers
 
5/2 = 2 if they're ints, it just doesn't do a decimal
 
4:47 PM
When you do division, you're saying "how many times to N fit in X"
If you think of it that way, it makes more sense @Tokencodingnewbie
Just don't divide by 0 xD
 
Oh also while I was brushing my teeth I was thinking
There is more than just left to right rows in the game
 
there are
and we'll get to that
RE int division
 
rant: i hate when sushi places grind up the tuna or salon in sushi rolls..... leave that shit in one piece
 
hahaha
a bit random, but true
@Tokencodingnewbie so are you comfortable with how to find out which row it is?
 
and I have to get ready for a date.
 
4:55 PM
i knew you weren't a true computer nerd
:p
 
Yeah I think so, I'm just folding laundry
and I have to get ready for a date.
 
ugh, to go to oktoberfest or not, will 3 days of being drunk in a row make me an alcoholic?
 
Yep.
It sure will
 
i dont believe you i'm doing it anyway
 
5:10 PM
:p
 
@OMGtechy twss
 
@KendallFrey sstw
 
Single Stage To... Water?
 
5:24 PM
private void Button_Click(object sender, RoutedEventArgs e)
        {

            Dictionary<int, Button> determineButton = new Dictionary<int, Button>{{0, Button1}, {1, Button2}, {2, Button3}, { 3, Button4}, {4, Button5}, {5, Button6},
                {6, Button7}, {7, Button8}, {8, Button9}};


            for (int i = 0; i < 9; i++)
            {
                Button myButton = determineButton[i];
                if (isX[i] == 1 || isX[i] == 2)
                {
                    MessageBox.Show(myButton.Name + " is taken");
all the rows are coming back as 0
right now it says i is equal to 4 but isX[i] is 2?
Hrm
Is it giving me the element and not the index?
 
(Came in halfway through the conversation), wouldn't i be the index into the array?
 
Yeah.
I'm trying to divide by the index not the element.
 
Just wondering, when having Visual Studio autogenerate code (Generate Method etc...), is there a way to force it to import the correct namespace rather than prefixing each member with the fully qualified name.
All the suggestions I've found are "Use Resharper", is there any small addons which will do the same thing?
are*
 
@user1112560 even better, don't use auto generated code :P
 
But... I don't want to write code :P
 
5:37 PM
@Tokencodingnewbie you want to divide the index by 3, not divide 3 by the index :P
or the element
Dividing a button by 3 doesn't make sense
dividing the button NUMBER does
hence i / 3 and not isX[i] / 3
 
I'm not dividing the button?
and I thought I was dividing by 3?
@OMGtechy I think I know what you mean now, but still the button numbers are in a dictionary :P
 
5:52 PM
@Tokencodingnewbie ? (regarding that last bit)
 
@Tokencodingnewbie so isX[] is an array of the board's state?
 
@user1112560 mmhm
well
a dictionary
Key is element number (0 - 8), value is the button
 
public static int[] isX = new int[9]; //0=empty 1=x 2=o
 
oops
 
Dictionary<Button, int> indexs = new Dictionary<Button, int>{{Button1, 0}, {Button2, 1}, {Button3, 2}, {Button4, 3}, {Button5, 4}, {Button6, 5},
                {Button7, 6}, {Button8, 7}, {Button9, 8}};
 
5:54 PM
I was looking at determineButton
 
so when it divides by 3 any number that isn't dividing evenly is rounded down.
 
6:27 PM
What does ~ in path stands for?
I need to link on ftp from two project to same directory for libraries trying to find the correct path.
 
10
Q: How do I use '~' (tilde) in the context of paths?

captcadaverI'm a web application development noob. I have a function that opens a file and reads it. Unfortunately, the directory structures between the test and production servers differ. I was told to "use a path relative to ~". I haven't been able to find any resources on the '~', though! How do I use t...

 
Guess I need ../ that refers one directory up right?
 
Yep, although there should be some functions in the language to handle that
 
Its HTML script src guess I need to use that.
So when I do ../../text.xml its parent of parent directory?
 
@Tokencodingnewbie it will always round down, never up
unless you tell it to do otherwise
 
6:34 PM
Can i tell it to
like hey, quit that.
 
haha
In this case, you don't want to, but yes you can get a "rounding" effect
 
6:50 PM
Can I ask for help how to format JavaScript in MVC?
 
MVC can mean two things, MVC or Microsoft MVC.
People don't seem to know the difference anymore, which pains me.
 
I'd presume ASP.NET MVC
 
I mean ASP.NET MVC View
Looks I have to place the script src and the script itself in separet div
Hm does not help either
<div>
<script src="js/build/three.min.js"></script>
<script type="text/javascript">
What is wrong with this please?
In MVC View
 
7:14 PM
<script type="text/javascript"> - that's a non-closed script tag with an empty src
Unless there's content afterwards
 
<script src="@Url.Content("js/build/three.min.js")" type="text/javascript"></script>
That seems not to be correct.
I got it like this:
@section Scripts
{
        <script src="@Url.Content("js/build/three.min.js")" type="text/javascript"></script>
}
Still not correct
 
could it be an issue with quotes?
you have quotes in quotes, and that often causes problems
 
When I click Advanced > Edit code it still stucks on that line :/
Also tried:
<script src=@Url.Content("js/build/three.min.js") type="text/javascript"></script>
Not taking
But it is willing to take this:
 <script src=Url.Content(js/build/three.min.js) type="text/javascript"></script>
What do you think :-o ?
Is ok:
  <script src='@Url.Content("~/js/build/three.min.js")' type="text/javascript"></script>
Ok I take back its not.
Still I get that the class is undefined :/
Got it :)
 
 
2 hours later…
9:52 PM
@KendallFrey "Valid reasons to kick someone (IMO): nude pictures, racial slurs not for comedy purposes, relentless spamming, threatening room owners, etc"

Hmm .. i don't see how racial slurs fit any purpose. Comedy or not.
 
I wouldn't kick someone for a racist joke
 
10:17 PM
Yeah, sorry. I just saw it by accident. There was another one that caught my eye too; "Threatening room owners" :-)
What about threats to everybody else :-P
 
@gurun True, I guess I've only seen threats directed towards owners/mods.
 
10:50 PM
threatens - MC Hammer: Can't Touch This.
dances
 
Bye guys
 
11:37 PM
happy halloween
 
Damn, you REALLY made me second-guess myself there.
 
Wha?
 
lol
eating outback, watching new girl, drinking a beer, ahhhhhh life is good :)
 
mmm I may get a beer
 
do you like sam adams?
 
11:48 PM
Who?
 
you
 
I am Sam Adams?
 
do you enjoy Samual Adams, the beer
sorry, i realize not all people in here are american, i should have been more clear :)
 
I have never heard of it :)
 
00:00 - 16:0016:00 - 00:00

« first day (1435 days earlier)      last day (3517 days later) »