« first day (894 days earlier)      last day (4055 days later) » 

12:04 AM
@Ellie are you saying you don't come here for our glowing personalities?
crickets
 
lol
 
so I just got a LinkedIn connection request from a girl I used to date
we had a date Valentine's Day 2012, then she never called me again, with no explanation
trying to decide if I should suck it up and connect and ignore her, or message her and be like "yo, what up?" or what]
 
Say:
"YO MAN WHATS THE F**ING DEAL WHYD YOU LEAVE ME YO MAN DUDE UNCOOL DUDE"
 
2 messages moved to Trash can
@ChadRuppert you can come back!! ellie has returned!!
 
12:50 AM
roooight.
 
user1125394
1:08 AM
looking for a clean way to substract 2 arrays in C# / linq
 
@crl do you work with wpf?
 
user1125394
don't know it, guess no
 
subtract?
 
user1125394
@CCInc something like stackoverflow.com/a/8016723/1125394, but giving {1}
 
user1125394
1:13 AM
11
A: How to perform set subtraction on arrays in C#?

KeltexIf you're using Linq, you can use the Except operator like this: string [] c = a.Except(b).ToArray(); Edit: CodeInChaos makes a good point. If a contains duplicates, it will remove any duplicates as well. The alternative to make it function exactly like the Ruby version would be this: string...

 
get all the elements in the first one?
and return what wiht the second?
 
user1125394
get all the element in 1 niot in 2
 
I'll check my reference
 
user1125394
like the set or domain substract
 
c# in a nutshell 5.0 says:
@crl You want the Except method
 
user1125394
1:20 AM
I have a method (can't change it) that return an array of Foo objects, (Foo has a and b string attributes), is there a clever way to get the an array of foo.b's directly if you see what I mean
 
var array = foo.Select( f => f.b);
 
user1125394
ah thx, linq is cool, need to learn it
 
user1125394
linq is only available in c#, not c++ managed right?
 
right
 
@CCInc Wrong.
 
1:26 AM
Oh there it was
I was waiting for Kendall to correct me
Shit kendall was right.
12
A: How to use LINQ in C++/CLI - in VS 2010/.Net 4.0

David YawYou can use the Linq methods that are defined in the System::Linq namespace, but you'll have to jump through a couple extra hoops. First, C++/CLI doesn't support extension methods. However, the extension methods are regular methods defined on various classes in System::Linq, so you can call the...

 
user1125394
but it's quite ugly
 
@Kendall Was my math right?
Oh, also y = 0 is the center of the screen right?
 
y=0 is only where you (or your coordinate system) define it to be.
 
Well, is like the center of my screen defined as (0,0), or is it (Screen.Width / 2, Screen.Height / 2)?
 
Depends on your coordinate system.
 
1:36 AM
But is it usually (0,0)?
 
Okay
 
There is no usually.
 
It never is (0,0)?
 
Many coordinate systems make it 0,0
 
1:38 AM
I AM TALKING ABOUT MY FREAKING COMPUTER SCREEN
Not normal grids
 
Yeah, but you should be talking about what presents information to your computer screen.
 
So the center is (Screen.Width / 2, Screen.Height / 2)
Not (0,0)
 
Depends on your coordinate system.
In some cases yes, in some cases no.
 
OMFG
 
user1125394
logarithmic scales
 
1:40 AM
What is the standard
 
There is none.
 
What will it most likely be?
 
Some specific types of application often have a 'normal' coordinate system.
But it varies widely between types.
I can't say what it will likely be unless you explain what kind of application you're working with.
 
A video game
 
Using what framework?
 
1:42 AM
Unity
 
I'm not familiar with it. Are you using 3D graphics or 2D?
 
3d
 
Then I'd assume it will be 0,0.
 
Ok
 
Have you looked up the documentation?
 
3D doesn't generally have a concept of screen coordinates.
The coordinates of the screen depend on where the camera is pointing.
 
It is the width of the player window
 
In unity, there are both Global and Local coordinates
 
hey
what is the difference between customControl
and userControl
 
@KendallFrey is your bot running?
$f
 
1:54 AM
Heads
 
$g customcontrol vs usercontrol
 
@KendallFrey for some reason my control has a margin or something, that is making it move to the right
why is that?
 
user1125394
string s ="";
foreach (Order o in qc.GetOrders())
{
    s += string.Format("&{0}|{1}|{2}", o.Type, o.Lots, o.Price);
}
 
user1125394
can do that with linq also?
 
1:56 AM
@EliteGamer You expect me to know? Who is the one looking at your code?
 
me, but i do not see anything that will affect it
 
@crl Yes.
Aggregate
 
how do i export my usercontrol to a dll file?
 
'export'? lol
 
user1125394
@KendallFrey like a foldl
 
1:57 AM
Just make a Class Library project and make a UserControl in it.
 
Poor kendall.
with all these n00b q's
 
You wanna take over? I need sleep.
 
user1125394
k, but here the gain is near null, thx
 
@crl Or even string.Join("", qc.GetOrders().Select(o => string.Format("&{0}|{1}|{2}", o.Type, o.Lots, o.Price)))
One-liners FTW.
@crl What gain are you looking for?
 
user1125394
indeed
 
user1125394
2:00 AM
clarity actually
 
user1125394
removing my 200 for loops
 
user1125394
so your solution is perfect
 
@crl - what?
 
user1125394
> Or even string.Join(""...
 
I wrote what before I scrolled down
 
2:05 AM
Does this look like it will work @Kendall


     public float FindDirection()
    	{
    		float mousex = Input.GetAxis ("Horizontal");
    		float corange = ((Screen.width / 2) / 10) * 9;
    		float conversion = 0.9f / corange;
    		float Direction = 0.0f;
    		if (mousex >= corange / 9.0f)
    		{
    			return conversion * mousex;
    		}

    		else if (mousex <= (0 - (corange / 9.0f)))
    		{
    			return (conversion * mousex) * -1;
    		}

    		else
    			return Direction;
    	}
 
ignored
 
? Why
 
Because I don't want to debug someone else's code.
 
FIne, @CCINC is my code right
 
2 mins ago, by Kendall Frey
Because I don't want to debug someone else's code.
 
user1125394
 
NOOOOOOOO
 
Lol if I want to get banned (from asking questions)
 
user1125394
 
lol
nice
sorry @Kinected I'm not thinking about math now
and I have too much HW to finish to focus
 
 
1 hour later…
3:14 AM
Pupil objPupil = new Pupil();
var myForeName = objPupil.Forename;
if (txt_Username.Text == myForeName)
{

I have this on button click for validation which is meant to check a XML file for the value, however its not working :(
 
 
3 hours later…
6:26 AM
How do you pronounce NuGet? Is it new-get or just like the word nugget?
 
 
2 hours later…
8:19 AM
anyone presents here
 
8:30 AM
anyone present here
 
 
2 hours later…
Jez
10:15 AM
@ThinkingStiff It's invented by Americans, so I guess "noo get"
but they like yod-dropping. As a Brit I pronounce it new-get with a yod.
 
10:28 AM
@Jez Hi how r u
@MarcoS.
hi
 
hi
 
i@MarcoS. i have Q 4 u
X#
C#
 
10:46 AM
Hi guys.....
 
Morning people
 
Guys can anyone help me with this stackoverflow.com/questions/15675883/…
 
11:41 AM
Hey all... Looking for some help stackoverflow.com/questions/15666703/…
 
You could just clear the list at the start of the function, then add items that already have their text like
// Clear the list
			listView1.Items.Clear();
			listView1.Refresh();
			// now add the items
			foreach (String v in values)
			{
				listView1.Items.Add(v);
			}
			listView1.Refresh();
 
I will try that...
 
Just a suggestion
 
I could get rid of the selected item from the list, however the listview would be corrupted. I think this might just work
Thank you Winerps
 
Yup.
no problem
well if you want to use this to remove items, just add a simple if statement around listView1.Items.Add(v); like this
if (v != listView1.SelectedItems[0].Text) {
	listView1.Items.Add(v);
}
that will clear and refill your listbox without the item that was removed
 
11:56 AM
I am sorry i did not get this part
 
So you want the user to be able to select an item in listView1, click delete, and have it removed, but the listview gets all screwed up in the process right?
 
Yes exactly
 
This will do that.
What it does is it completely clears the listbox, then adds all the items back, but without the one that they deleted.
 
however the selected item is deleted from list...So I got the process of clearing the listview and adding the elements again from thge list
Got it :)
Worked really well I think you can paste the answer...I will accept it :)
The trick was to reload the list...solves the problem... I had to just use .Clear() and .Refresh()
 
Glad I could help :D
 
12:02 PM
2 days it took...and the answer was this simple :P
 
So just put the clear and refresh part?
Haha yeah sometimes things work like that
 
The answer was to reload the list as I am able to get rid of it from the list
earlier I was displaying it using the same index and hence was getting array out of bound... Once I reloaded the list into the listview bammm it worked
 
Alright, answer posted
 
Winderps...have another 2 problems...
 
Alright what are they?
 
12:06 PM
Any idea how to get hold of the PST file path
I tried so many links on stack and none worked
I even added using Microsoft.Office.Interop.Outlook;
 
Mmm, never used outlook, I'll see what I can find though
 
but nothing under that namespace works
Thank you...I just need the path to the PST and-or OST file
I will have to add that to the list in the XMl (I mean just the path)
 
does the pst file belong to a certain contact?
 
well yes and no
its a particular user's PSt file
Right-clicking on the Inbox (Outlook Interface) gives the location. I need to get this done programatically
 
        Outlook.Application app = new Outlook.Application();
        Outlook.NameSpace outlookNs = app.GetNamespace("MAPI");
        Outlook.MAPIFolder emailFolder = outlookNs.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
 
12:10 PM
the only thing I can find is this.
Outlook._ContactItem pContact = (Outlook._ContactItem)OutlookItem;
Outlook.Folder pParentFolder = (Outlook.Folder)pContact.Parent;
string sFilePath = pParentFolder.Store.FilePath;
 
will try both...
 
not sure if this applies to your particular situation though
 
using Outlook = Microsoft.Office.Interop.Outlook;
 
Thank you for your efforts.. :)
WIll try them both
Ya I think that would work...as
Outlook. is giving me missing namespace
What is the type for email folder...
 
MAPI folder, looks like.
 
12:18 PM
Hello Every one i have a question about sql connection
 
Nope gives me a wrong output...also CC Inc, the commands shuts down Outlook if it is open
Winderps...has errors...so I guess this is also not working
I will try researching more
 
hello :D
does someone know, why the C# 3.0, 4.0 and 5.0 is no mor ECMA?
 
string dbfile = Properties.Settings.Default.CTMSConnectionString1;

SqlConnection con = new SqlConnection(dbfile);
con.Open();
if ((textBox6.Text != "") && (textBox7.Text != "") && (textBox8.Text != ""))
{
SqlCommand insert = new SqlCommand("Insert into Temptranstion (CustomerID, ProductName,Quantity,Price,DateTime ) Values (@CustomerID,@ProductName,@Quantity,@Price,@DateTime)", con);
insert.Parameters.AddWithValue ("@CustomerID ",comboBox1.SelectedValue);
insert.Parameters.AddWithValue ("@ProductName",textBox6.Text);
its not work execute give no error but no data is insert in sql table
 
take out the @ signs?
Not sure... Haven't done much with SQL.
 
@SaimaMaheen you are sure that the message box are not empy?
*empty
@Winderps no the @ signs are correct
 
12:27 PM
Alright, wasn't sure.
 
@Winderps that's only used with parametrized querys
@SaimaMaheen Another tip: you should build up data objects. Do not directly insert the values from the textbox.. because you cant use the same code for another application part.
 
it give no eror but when i check that data is insert in table. no data is present in sqltable
 
@SaimaMaheen haha, Now I found it..
 
@CSharper what
@CSharper tell me what u found
 
wait a sec
if ((textBox6.Text != "") && (textBox7.Text != "") && (textBox8.Text != ""))
{

string dbfile = Properties.Settings.Default.CTMSConnectionString1;
using(SqlConnection con = new SqlConnection(dbfile))
{
con.Open();
using(SqlCommand insert = con.CreateCommand())
{
insert.CommandText = "Insert into Temptranstion (CustomerID, ProductName,Quantity,Price,DateTime ) Values (@CustomerID,@ProductName,@Quantity,@Price,@DateTime)";
insert.Parameters.AddWithValue ("@CustomerID ",comboBox1.SelectedValue);
insert.Parameters.AddWithValue ("@ProductName",textBox6.Text);
Create only the db connection when the textbox are ready. All instances are disposable, so but it in usings.
 
12:37 PM
@CSharper ok i try this one
 
The using around the connection prevents memory leaks, because at the end of the using block, it is automaticly closed/released.
The same applies for the sqlcommand instance
Tell me if it's work
 
return memoryStream.ToArray();
@CSharper it gives error no content found in ..,.,
@CSharper return memoryStream.ToArray();
 
oh upps
if ((textBox6.Text != "") && (textBox7.Text != "") && (textBox8.Text != ""))
{

string dbfile = Properties.Settings.Default.CTMSConnectionString1;
using(SqlConnection con = new SqlConnection(dbfile))
{
con.Open();
using(SqlCommand insert = con.CreateCommand())
{
insert.CommandText = "Insert into Temptranstion (CustomerID, ProductName,Quantity,Price,DateTime ) Values (@CustomerID,@ProductName,@Quantity,@Price,@DateTime)";
insert.Parameters.AddWithValue ("@CustomerID ",comboBox1.SelectedValue);
insert.Parameters.AddWithValue ("@ProductName",textBox6.Text);
this was my misstake sorry -.-
now? works?
 
12:53 PM
enjoy then
 
@KendallFrey you were here yesterday when we were talking about operators right?
 
I thought of one. What about < and >. those are operators as well as other symbols.
 
What about them?
 
12:59 PM
like, List<string> is a statement, but if (7<6>8) is also a statement.
 
No, it's not.
 
@SaimaMaheen ?
 
hold on
let me think of what I'm trying to say.
ok, so, < and > can be treated as both a part of a statement, or an operator, why then, can't other symbols be treated the same way?
 
Which symbols?
 
like ;
 
1:01 PM
well, that's a very important one
 
true, ok, how about :
 
That only appears as part of ternary or label, right?
 
Yeah I think so
haven't used it too much
wait also for inheritance
 
Yeah.
Those are all easily distinguished.
If you added a : operator, then a ? b : c : d would be confusing.
 
ok, hmmm
 
1:05 PM
@Winderps whats the goal of your "questions"?
 
@CSharper simply for the purpose of good, on-topic discussion.
 
@Winderps ah okay.
 
We should add :) and :( operators
 
In my opinion, we should be able to (to a certain degree) add operators to c#, but I understand why we can't
 
@Winderps Maybe it would be possible in C# 5.0 with roslyn
 
1:08 PM
If we want add new functionality, we should do something that won't change parser rules, i.e. Methods.
@CSharper No, I thought I would be able to extend the language with Roslyn, but I don't think it's possible.
 
ok, so make symbols part of the "allowed characters list" for method names?
that would be interesting,
 
Why?
That would break the parser again.
 
ok, then how would you do it?
 
@KendallFrey If I understand the concept of roslyn correctly, we can intercept during compilation, and can change things?
 
Change a few things, but not much.
You can't change parsing rules, so you can't add operators.
 
1:14 PM
:(
 
I want to install .NET on my sandwhich.
 
Is there a way to read XML nodes when you know the exact number of nodes..
<Progress>
<Status>Completed</Status>
<Percent>100</Percent></Progress>
I need to read the status
 
I want to install .NET on my Raspberry Pi. Because that would mean I have a Raspberry Pi.
 
XmlDocument xdoc = new XmlDocument();
xdoc.Load(path);
foreach (XmlNode node in xdoc.SelectNodes("Progress"))
{
stat = node.SelectSingleNode(snode).InnerText;
}
return stat;
 
Ditto for my Corvette.
@VivianLobo You should use XPath I think.
 
1:17 PM
Sorry not the aove code...
public string statusreader(string path, string snode)
{
string stat;
XmlDocument xdoc = new XmlDocument();
xdoc.Load(path);
foreach (XmlNode node in xdoc.SelectNodes("Progress"))
{
stat = node.SelectSingleNode(snode).InnerText;
}
return stat;
}
 
Or LINQ to XML.
 
XML
 
Yes, that is XML.
 
I used the same code above to return a list and it works fine...
not able to return the string
 
Error message.
 
1:19 PM
Use of unassigned local variable stat
 
@Winderps what is sandwhich? ^^
 
@VivianLobo So assign it a default value in case the loop does not execute.
 
okay...
made it null
trying it
worked :) Thanks Kendall
 
Aaagghhh technologically impaired people are going to make me crazy
@CSharper Sandwich sw = new Sandwich("Lettuce", "Tomato", "Cheddar", "Bacon", "White_Bread").Grill();
 
@Winderps haha :D
 
1:26 PM
good morning
i'm in a good mood, i got new shoes
 
public holiday on Friday and Monday is South Africa
YAHOOO
 
sw.CreateDir("dotnet-4.0");
sw.InstallFrom("dotnet-4.0-redist.msi");
 
raj
hi
 
hi
:)
I'm weird and i'm okay with that
 

« first day (894 days earlier)      last day (4055 days later) »