« first day (2418 days earlier)      last day (2528 days later) » 

12:00 AM
@Cauterite Im trying to assign members of my list of sick people to my list of doctors. But people have different states of sickness.
@Cauterite Magenta is very high, red is high, yellow is medium and green is low.
 
@Dany4k so what does that have to do with exceptions?
 
@Cauterite The doctor has to treat the Magenta ones first and only after that red and so on.
@Cauterite It can't be randomly assigned.
 
so how about you sort the list of patients by priority (colour)?
 
@Brogrammer before I go sleep, I'll tell you this wasn't supposed to be a programming question, but rather a math one
 
i dont know how modulo relates to this tho
 
12:04 AM
@Cauterite I can't because the colors are randomly generated everytime I start the program.
 
@Dany4k so how are the colours of any use then?
 
yeah but priority levels aren't
which means you can trivially map from one to another with a dictionary
 
Because I can only use those 4 colors
To simplify my question. What's the easiest way to assign a patient to a doctor, respecting the color hierarchy.
 
i'm struggling to imagine how you can have "patient priority" and "random" in the same piece of software
unless you're making a video game
 
patient needs doctor of at least yellow. doesnt matter which, give him a random dr that fits that criteria
?
 
12:14 AM
even that algorithm i'd much rather be deterministic
 
The collor atribution is random.
The patient atribution, is done AFTER, is not.
 
define "collor atribution"
 
When you go to a hospital, you are given an ticket with a green color.
 
7 mins ago, by milleniumbug
which means you can trivially map from one to another with a dictionary
 
Imagine I arrive after you, but Im given a yellow ticket.
Im going to be assigned to a doctor first than you.
You are placed on a queue until one of these 6 doctors is free from all magentas, reds and yellows.
Thats What I want to implement.
 
12:17 AM
yes, so colour represents priority, that makes sense
magenta = 0, red = 1, yellow = 2, green = 3, or whatever,
convert colour to number and sort by that, then assign to the doctors from the start of the sorted list until its empty
 
put the patients in a priority queue ordered by patient priority, and make the doctors get patients from priority queu
whether you map your priority levels at runtime to different colors is irrelevant
your idea about mapping priority levels to colors is ok, but switch is not appropriate if the colors are supposed to be assigned at runtime to priority levels
Use a Dictionary
(by assigned at runtime I mean, for example, if on this program run "red" is supposed to mean "critical priority", and on another run "low priority")
 
Exactly
They change everytime the program runs.
 
so each time you 'generate' the colours, keep track of what priority they represent
 
In that case, yes, you want to use a Dictionary
 
milleniumbug might be on to something …
maybe if you actually take a moment to think about what he's been suggesting for the past 20 minutes
 
12:26 AM
I know but I never worked with dictionarys. Im trying to make it work with what I know.
I have no idea how to do it with a dictionary,
 
well what you know isn't enough to get the job done
 
Then it's a good chance to learn how to work with them!
 
time to learn something new
 
Ok, well its 2am here, gotta get some sleep. I will read about dictionarys tomorrow and I will tell you something.
Thanks for the ideas.
 
alright good luck
crap, now i have to go back to doing my job :(
 
12:47 AM
How do I decode messages from HttpResponseMessage.Content?
Right now it's spitting out encoded messages
In Fiddler (left), it provides automatic decoding, but I'm not sure how to do that with HttpResponseMessage Content
 
> Content-Encoding: gzip
there's a clue
might want to investigate System.IO.Compression.GZipStream
 
Thanks, will do
 
1:08 AM
if i make an object like this: new Foo(param) {x = 1, y = 2}, are x and y assigned before the constructor is called, or after?
 
if this was the former, it would make this feature totally useless
 
thought u were in bed lol
 
can't sleep for some reason
also I am in my bed, holding my phone
 
prolly because youre here chatting
 
ok, let's try again
 
1:16 AM
@milleniumbug alright thanks
 
@hsimah whats the solution to multiplying elements within elements
 
is this for an assignment
like for some sort of class
 
ya
online
we just learned foreach loops
and how to create arrays
i know how to multiply elements by each other but not in multidemensional
 
okay, because there are methods to do it for you, eg linq
but you cant use those
 
so then?
 
1:24 AM
use another foreach loop within the first one
 
this is in powershell not c#
but you should get the idea
$array = ((5,1), (3,-1), (-4,-3))

foreach ($element in $array) {
    $sum = 1

    foreach ($value in $element) {
        $sum *= $value
    }

    write-host "$element sum is: $sum"
}
 
omg i forgot
about loops within loops
 
loop over the array, then loop over each element and multiple the elements
 
i get an error
when making the second foreach
foreach (int element in ArrayPassedIn)
{
foreach (int value in element)
{

}
}
 
what is the error
also hit Ctrl+K when pasting code so it formats it
oh
 
1:29 AM
it says foreach cannot operate on ints
 
you want foreach (int[] element) in the first loop
because it is an array
or var if you are allowed to use that
 
now it says on the first for loop cannot convert type int to int[]
 
what type is ArrayPassedIn?
 
int[]
 
it should be int[][]
 
1:30 AM
i mean int[,]
int [,] ThreeByTwoArray= new int[3,2] { {5,1}, {3,-1}, {-4,-3} };
 
ah
 
is how i declared my array
 
i wasn't aware of that syntax
 
its a multidimensional array
ive never looped over one lol
 
I have some experience iwth that
whats the question
 
1:33 AM
add all elements of the elements of the array
 
no
thats not the question lol
 
{5,1}, {3,-1}, {-4,-3} = 5, -3, 12
sorry multiply
 
right
 
@Brogrammer whats the question
okay so all the elements multiple them together? Including all dimensions ?
 
i think so; multiply together all the 'leaves' of the matrix
 
1:35 AM
After initializing the array, print out its contents so we can see what columns are on
which row. See p301 in your text for an example on initializing rectangular arrays.
2. Compute and print out the sum of all of the elements in the array. Since it is a
rectangular array, a foreach statement is ideal!
3. We need the sum of the product of the columns for each row. For the data above, the
products are:
5 x 1 = 5
3 x -1 = -3
-4 x -3 = 12
So the sum of the products would be 5 - 3 + 12 = 14.
4. You must print out the sum of the products.
 
I don't do homework
 
no ik i was just copying it
for myself
i already added them
but i need to multiply the elements within elements
 
so change the + to a *?
oh
 
no that multiplies all of them
togethe
 
@Brogrammer whats your current code?
 
1:38 AM
wow a foreach on a multidimensional array loops over all the elements of the elements in order
 
class Problem_3_solution
{
public static void Main(string[] args)
{
//Creating 3X2 array
int [,] ThreeByTwoArray= new int[3,2] { {5,1}, {3,-1}, {-4,-3} };

SumElementsInArray(ThreeByTwoArray);
ProductOfEachRow(ThreeByTwoArray);

}

public static void SumElementsInArray(int[,] ArrayPassedIn)
{
int SumOfElements = 0;

//Adds all the elements in the array together
foreach (int element in ArrayPassedIn)
{
SumOfElements = SumOfElements + element;
}

Console.WriteLine("The sum of the array elements is {0}", SumOfElements);//prints out 1
 
format your code
Ctrl + K
 
@hsimah does it give you an index variable or something?
ideally a tuple {indexX, indexY, …}
 
ctrl k doesnt work
but never mind the formatting
 
@Brogrammer it works if you edit the message select all and then Ctrl + K
 
1:42 AM
its deleting my code
each line gets removed each time i do ctrl k
 
class Problem_3_solution
{
public static void Main(string[] args)
{
//Creating 3X2 array
int [,] ThreeByTwoArray= new int[3,2] { {5,1}, {3,-1}, {-4,-3} };

SumElementsInArray(ThreeByTwoArray);
ProductOfEachRow(ThreeByTwoArray);

}

public static void SumElementsInArray(int[,] ArrayPassedIn)
{
int SumOfElements = 0;

//Adds all the elements in the array together
foreach (int element in ArrayPassedIn)
{
SumOfElements = SumOfElements + element;
}

Console.WriteLine("The sum of the array elements is {0}", SumOfElements);//prints out 1
oh dear god
what IDE are you using?
 
Xamarin Studio
 
because the formatting is not doing you ANY favors. Everything should be indented inside a bracket
a hint is you need to use a nested for loop. Its not hardcoded because you can use the length of each dimension
nested anything gets very confusing without proper formatting
 
so a foreach inside a foreach
 
no a for loop inside a for loop
 
1:45 AM
that doesnt count as hardcoding??
because it uses the length
of each dimension
 
@Brogrammer hard coding would be you knowing the lenth is say... 5 and having the for loop only go to 5
instead of 5 use Length
 
oh ok
i thought in the directions my prof wanted us to use foreach
but i think i misread it
 
you will need to look up Length in multidimensional arrays to be able to know how to get the length of each dimension
 
that part i can do
i just wasnt sure if we had to do foreach
 
yeah foreach is great and all for normal arrays so to speak
 
1:47 AM
since he said You must not hardcode any loops. Instead you must use the methods foreach to sum
all the elements in the array and GetLength to control looping through each row and
column in the array for printing the elements and building the sum of the products of
each line.
right
when u told me for within for it got easier
for me
thx
 
but foreach wont work with multidimensional arrays unless you want to multiple EVERY value in the array together
because there is no control of the indice its on
 
right in which i wud use * instead of +
 
exactly
@Brogrammer if they have covered lists and linq there is an easier way to do it
but I'm guessing they havent
its probably homework so you get good with loops and shit
 
only to unlearn it again when you discover sequence methods
 
@Cauterite what do you mean by "sequence methods"
 
1:54 AM
@JABFreeware map, reduce, flatten, chain, etc.
 
We call that LINQ in these here parts
 
ohhh ok
yeah that sounds more like JS
LINQ is awesome though
<3 LINQ
 
LINQ was inspired by functional paradigms that are present in languages such as Haskell
 
oh god
for you
I dare you try that one
 
Haskell is really just lambda calculus at its core, it's not so difficult
 
1:58 AM
and so it begins
 
@JABFreeware it has side effects though
 
@KendallFrey birth control?
 
@JABFreeware I bet you didn't see the binary lambda calculus interpreter I wrote in JS
 
@KendallFrey an impure relationship D:
 
@JABFreeware Is that a side effect of love?
 
2:00 AM
@KendallFrey depends....
 
Fun fact: 100% of all actions taken by a Haskell program happen after the program returns.
 
does it use tail-call-optimisation to return to another function (other than its original caller)?
 
I don't think so
In C# terms, every side effect is a Task, and Main returns a Task, which is then executed.
 
so is it more like, it 'returns' to an event dispatcher?
 
@KendallFrey I read what you wrote
my parser crashed
 
2:05 AM
It returns to the runtime, but I don't know much about what it does then
 
updating parser....
uhoh it says must reboot to finish this update
how do I reboot?
 
reincarnate
 
@KendallFrey That doesn't really count as "returning" though
there is no program
there are values
 
True
 
!False
@Cauterite but I dont want to be a dog
 
2:06 AM
Heck, main isn't even a function
since it has no parameters
 
@KendallFrey you're not a human
since you have no feelings
 
How would one go about proving they have feelings
To themselves or anyone
 
@KendallFrey get offended
or hurt
or cry on your keyboard would prove it to me
 
but some people can cry on command
 
fuck
 
2:10 AM
probably need a more concrete definition of "feelings"
 
but I didnt define what kind of feelings
physical or emotional
I meant emotional though so no nail pulling :(
@KendallFrey we need live cameras covering your house 24/7
I will setup a panel of judges to determine if you're human
no blindspots
 
I don't think cameras will solve the philosophical zombie problem
 
the what?
 
A philosophical zombie or p-zombie in the philosophy of mind and perception is a hypothetical being that from the outside is indistinguishable from a normal human being but lacks conscious experience, qualia, or sentience. For example, if a philosophical zombie was poked with a sharp object it would not feel any pain sensation, yet could behave exactly as if it does feel pain (it may say "ouch", recoil from the stimulus, and say that it is feeling pain). The notion of a philosophical zombie is used mainly in thought experiments intended to support arguments (often called "zombie arguments") against...
 
well shit
I need to drill into your skull
that ok?
 
2:13 AM
even that won't do anything
there's nothing you can do physically to prove mind-body dualism
mmmm delicious philosophy
 
@KendallFrey im hungry order me pizza or make me a sandwhich
 
"Ok Google, order me pizza"
 
my phone isnt with me
 
No, I was saying that
 
pizza is not for you its me
you;d need my addres
 
2:18 AM
i just repeated what you said
 
:|
you can be annoying sometimes
 
2:29 AM
@KendallFrey you know nodejs?
 
yeah
too bad you can't continue the conversation now
oh you didn't actually get banned for that one
yet
 
I mean was that really creepy? I honestly was curious. Just curious. Its not like you can often ask. To me creepy would be asking for pictures or something like that. I wasn't asking personal questions was I?
I didnt even ask if the picture was real unlike the other person
 
Not really creepy, I just think the gender issue isn't really worth discussing like this.
 
this is exactly why I don't respect the SO authority around here. Its just power hungry morons. Had she simply said she didnt want to answer or didn't answer at all totally cool wouldn't have anything. But oh well...
@KendallFrey much like google saying its too expensive to get wage data lol
 
Flags have nothing to do with authority
 
2:36 AM
I was just kicked thats all...
 
oh that
 
I might be drunk but im not stupid
 
mr5
\o/
/\
damn

Android Software Developer (f/m) (110338)

BMW Group

THE SOURCE CODE TO THE FUTURE IS DEVELOPED HERE.SHARE YOUR PASSION FOR DEVELOPING SOFTWARE. To revolutionise the future…

Posted on Stack Overflow Jobs on February 10, 2017

 
whats creepy is this
in JavaScript. Not Java Script or Java Scripting.. JavaScript!, 16 mins ago, by Jason Marsh
@RachelDockter let me clarify this first. are you woman?
but does he get kicked? Nope
 
mr5
a Java script?
 
2:39 AM
:|
@mr5 what?
 
mr5
i dunno men
 
3:15 AM
@mr5 hmmm. I got suspended for a bit
 
from a different chat room?
 
the js
for being "inappropriate" talking to some girl
it wasnt
 
mr5
3:41 AM
!!> ['l', 'e', ' ', 'w', 'i', 'l', 'd', ' ', 'j', 'a', 'v', 'a', 's', 'c', 'r', 'i', 'p', 't', ' ' , 'a', 'p', 'p', 'e', 'a', 'r', 's'].join('');
 
@mr5 "le wild javascript appears"
 
4:09 AM
good morning
 
there is no such thing as a **good** morning
unless you're still asleep
 
i beg to differ
a good morning might include ihop
 
mr5
!!hangman
 
or coding c# and java at the same time
 
@mr5 That didn't make much sense. Use the !!/help command to learn more.
 
mr5
4:12 AM
!!/help
 
@mr5 Information on interacting with me can be found at this page
 
!!/help
 
@Brogrammer Information on interacting with me can be found at this page
 
whoa
!!!/help
 
@Brogrammer That didn't make much sense. Maybe you meant: help
 
mr5
4:12 AM
!!/hang
 
  +---+
  |   |
  |
  |
  |
__+__

--------------
 
!!/a
 
@Brogrammer That didn't make much sense. Maybe you meant: 3, ah, am, d, y, ^, !, π, ?
 
mr5
how do you answer to that game?
!!/hang a
 
  +---+
  |   |
  |   O
  |
  |
__+__
a
--------------
 
mr5
4:15 AM
!!/hang e
 
  +---+
  |   |
  |   O
  |
  |
__+__
a, e
---e--e-e--e--
 
mr5
!!/hang i
 
  +---+
  |   |
  |   O
  |
  |
__+__
a, e, i
i--e--e-e--e--
 
mr5
!!/hang o
 
  +---+
  |   |
  |   O
  |   |
  |
__+__
a, e, i, o
i--e--e-e--e--
 
mr5
4:16 AM
!!/hang t
 
  +---+
  |   |
  |   O
  |   |
  |
__+__
a, e, i, o, t
i-te--e-e--e-t
 
s!
no
n
!!/hang l
 
mr5
!!/hang n
 
@mr5 n was already submitted
  +---+
  |   |
  |   O
  |   |
  |
__+__
a, e, i, n, o, t
inte--e-en-ent
  +---+
  |   |
  |   O/
  |   |
  |
__+__
a, e, i, l, n, o, t
inte--e-en-ent
 
mr5
!!/hang m
 
4:17 AM
!!/hang l
 
  +---+
  |   |
  |  \O/
  |   |
  |
__+__
a, e, i, l, m, n, o, t
inte--e-en-ent
@hsimah l was already submitted
 
yeah
 
mr5
!!/hang r
 
  +---+
  |   |
  |  \O/
  |   |
  |
__+__
a, e, i, l, m, n, o, r, t
inter-e-en-ent
 
mr5
!!/hang d
 
4:18 AM
  +---+
  |   |
  |  \O/
  |   |
  |
__+__
a, d, e, i, l, m, n, o, r, t
interde-endent
 
mr5
!!/hang p
 
!!/hang p
 
@mr5 Correct! The word is interdependent.
 
mr5
lul
 
:'(
 
4:18 AM
  +---+
  |   |
  |   O
  |
  |
__+__
p
-------------
 
mr5
enough bot
!!/fuckoff
 
@mr5 That didn't make much sense. Use the !!/help command to learn more.
 
lol
 
4:41 AM
is there a clever way in using the for loop to list all the elements in pairs of two elements
i know i can use a for loop to list all the elements in an array
but i want to list two elements at a time
i meant foreach not for srry
 
4:55 AM
I am getting this error while connecting to oracle database
[InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.]
Any idea to solve this error ?
@Brogrammer
 
no clue
srry
 
5:09 AM
@Brogrammer I don't think so..not without adding extra crap (ie. A separate counting variable). Why?
 
nvm
i figured it out
and thats what i did lol
 
O rly
 
used a counting variable
lol
 
O lol
 
i wanted to be clever
i think i was clever on my c# homework
 
5:11 AM
Kind of repeats the purpose of "each"...at least with a normal for() you can step by 2 etc.
Defeats *
Clever would be to bail out of the loop half way through?
 
can i show u my homework
 
@Brogrammer do you need to use foreach?
 
that was only for the sum
i finished my homework
 
ok
 
and wanted to show you guys if that was okay
class Problem_3_solution
{
public static void Main(string[] args)
{
//Creating 3X2 array
int[,] ThreeByTwoArray = new int[3, 2] { { 5, 1 }, { 3, -1 }, { -4, -3 } };
//j is used in keeping track of when we want to move on to the next line
//for displaying the pair elements inside ThreeByTwoArray(i.e (5,1) (3,-1))
int j = 0;

Console.WriteLine("The array contains: ");
//Displays all the contents in pairs of two inside ThreeByTwoArray
foreach (int ElementInArray in ThreeByTwoArray)
{
//Make a newline if we aren't at the end of the "pair" of the elements
 
5:15 AM
I suppose.. My break is almost over, but might comment in few hours. :/
 
in a foreach i couldnt use that to display two elements at once
 
@Brogrammer what are you needing to do?
 
This problem involves the use of a rectangular 3 x 2 array holding values that are defined
below. Your job will be to initialize the array and then compute and display some information.
The Solution Requirements
You must use the following information:
Column 1 Value Column 2 Value
5 1
3 -1
-4 -3
1. After initializing the array, print out its contents so we can see what columns are on
which row. See p301 in your text for an example on initializing rectangular arrays.
2. Compute and print out the sum of all of the elements in the array. Since it is a
 
that's a lot to read
 
my code above i posted is the final solution i made for the hw
 
5:27 AM
so you just want someone to take a look at it
 
you dont have to if you dont want
ya i really want to impress my prof even tho its online
like i know my output is correct
i just want to know if i had good style i guess
 
ok
 
5:38 AM
Oh shit, I fell asleep at 16:30 yesterday and just woke up
 
Anyone know any good articles about creating first VS application?? I wrote a form that functions how I like but I can't figure out how to compile it into a folder with an executable and dlls (no source code).
Only been able to run the build exe from the project file
 
Thanks m8
 
Depending on your needs, one of these walkthroughs should solve your problems
 
Yeah! Helps a lot, late for me so I book marked them all and I'll give them a read tomorrow :)
Thanks again Kamil, later!
 
6:24 AM
ooh, that's how you should do it, I always did copy paste the release compile.
hello
(though I do only need to put most of my programs on a single computer each time.)
 
Well it works as far as the destination pc has all the dependencies, incl. .net
But if it misses something it won't run
 
6:38 AM
GoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOodn Morning chelas
 
question, can i load up a table on a datagridview and then hardcode one of the columns to be a combobox?
 
you can, probably.
 
I've been trying to but doesn't seem to work
 
6:56 AM
@KamilSolecki 16h, wow
 

« first day (2418 days earlier)      last day (2528 days later) »