« first day (584 days earlier)      last day (4371 days later) » 

12:36 AM
sif
1 hour later... ic your point
 
12:46 AM
php room is always kickin our ass as far as activity
 
1:05 AM
well... to be honest.. i've only had to delve into php a few times, but every time it strikes me as a cryptic sort of scripting language, that requires some experience to properly decipher. Meanwhile C# has an awesome IDE that uses intellisense and integrated help... jus' sayin' is all
 
1:29 AM
no one took the bait... pffffffft... time to do me some work
 
2:04 AM
php is icky. I didn't use it much but I was an ASP Classic programmer for years and they're pretty much the same thing. Bad bad bad.
To be fair in their time they were good technologies.
But it's time to move on.
 
2:23 AM
It's time for things to move on: youtube.com/…
 
 
2 hours later…
4:27 AM
@SpencerRuport you still here?
 
@ScottSelby - Yes.
 
is there a simple way to call several API's asynchronously from c#?
 
using threads ? or something else?
 
I think it's generally recommended to use a thread pool if you're going to use a lot of threads but yes.
 
4:33 AM
how do I watch how long everything is taking in debug mode?
I have 4 API calls and in Chrome it says they're all taking about 350ms , all together = not good
 
Chrome?
 
the browser
 
Why is Chrome telling you what your C# code is doing?
 
its telling what the site is doing while running it in chrome, because the requests are comming from other sites
 
Oh so these are Web Services?
 
4:38 AM
yes zir
 
Ok, keep in mind that some people when they hear API are going to think you mean DLLs
 
ahhh , I mean web service api's
 
Gotcha.
 
there is this strange guy too...
 
So your question is now how do you effectively debug multithreaded applications?
 
4:39 AM
yes sir
there is this
404 not found...
I don't know why it's looking for it or what it is
I think because jquery-1.7.2.min.js:4 is attached it automatically looks for this image
 
What image?
favicon.ico?
 
ui-bg_flat_75_ffffff_40x100.png
if that is an image
 
oh that's jQuery ui doing that most likely.
 
exactly
but I can worry about that later, I don't really know how to multi-thread
 
Well it's a big subject matter.
I'd recommend creating a console app
and trying to get it working in there first.
 
4:42 AM
and log the shit outa it?
 
Well if he names his threads the debugger should make it pretty easy to figure out what's going on.
 
true
but hes measuring speed
maybe
 
@ScottSelby - Fortunately this is a fairly trivial use of threads so it's a really good starting point.
I'd just look up a couple tutorials, see if you can get those working
 
I'll look for some tutorial on it
 
And then extrapolate what you want to do from there
 
4:44 AM
yea, most I found in the past were waiting for one thread to finish then starting another
 
If you get stuck come back and ask for help obv.
 
assuming I know very very little javascript, you think it's a better route to learn threading , or making the calls from client side AJAX ?
 
whats the end goal?
 
If it's a public API it's always better to let the client do it.
 
4:48 AM
People with javascript disabled be damned.
 
ugh
unfortunately for some of us thats something we cant say just yet -_-
 
I don't care so much which is faster to learn , i care more which in the end is more often better faster method, and probably more valuable to learn considering I am now interviewing for several junior level developer jobs
ohhhhh, its not public api , I have a key , soo.. looks like don't put the key in client script im assuming?
 
Well multithreading is good to learn
Yeah then you'll have to use multithreading :)
 
ohhhh one more thing , this may be a stupid question, but how do I convert c# code to vb.net ?
I have a job that it looks very likely i'll hopefully get hired, and its all vb.net and i need to get a little familar with it
I google'd it and there are a lot of VS add-on's , I'm guessing there is no way right in Visual Studio's to do it?
 
Hello guys! I am developing a C# application around Lua and have noticed that latin characters (such as á, é, í, ó, ú and so forth) appear to be switched to other encodings when i retrieve them fro Lua, is there anything i can do to counter this behaviour?
 
5:00 AM
you got deadmau5 guy logo!
 
@ScottSelby Yes indeed, i like deadmau5 :D
 
as for your question - i have no idea
 
:/ Ill have to read a bit on the docs for LuaInterface
 
so what do they appear as when retrieved?
 
@MichaelMason Let me get you a screenshot
 
5:03 AM
.net strings are Unicode (UTF-16) by default
 
That should be "Triángulo", not "Triángulo"
 
looks like they are being encoded correctly... if they wernt they would come out as '?'
 
Seems like this is indeed a LuaInterface encoding issue
 
@MichaelMason - its just as easy as Thread t = new Thread (WriteY); t.Start(); ???
 
I'll apply that fix tomorrow
 
5:06 AM
@ScottSelby sorta... its a big topic, with many many pitfalls.. a good tutorial will stand you in good stead.
or you could use a library
where a lot of that complexity is done for you
 
Has anyone here used the TableLayour
WinForms btw
 
@ScottSelby you could also utilize plinq, may work better too
 
I have a book on LINQ and never got to the PLINQ section
I didn't know what it was
 
its .net 4.0
its like linq, but runs parrallel to take advantage of things like multicore cpu's
so similar sintax
 
You shouldnt need it unless handling massive volumes of data
 
5:18 AM
how do I trace stack , or what ever it's called in debug mode to see the speed?
 
@ScottSelby Use a profiler
 
yea prob easiest way
 
This is a good profiller jetbrains.com/profiler
 
plinq is meant to be ideal for blocking tasks like calling several webservices at once
 
Which is a great idea, but trying to mix and match webservices at once is bound to go bad if you don't take in network latency
 
5:24 AM
I'm going to read up on them both
anyone notice that the majority of free books on the internet were taken down in the past month?
before you could just type " free download" + whatever book you wanted and get them, now its a pain
 
Everyone is freaking out on lame copyright legislations
Or so it seems
 
maybe its borders and barnes and nobles comming back to haunt everyone
 
Anyhow, off to bed. So much maths to digest tomorrow
See you all
 
later
 
 
2 hours later…
7:08 AM
Yo
 
7:23 AM
yo
 
7:50 AM
I am using static class properties as session variables is that bad? :)
 
 
2 hours later…
9:57 AM
Morning all
 
 
3 hours later…
1:16 PM
@jcolebrand you around batman?
 
1:28 PM
@HansRudel you need to wait for night, turn on the sign, and have a deep, serious, sadened look in your eyes. Tsssk... newbies -.-
 
@baboon lmao i'll start wheeling out the bat sign now ;)
hows it going buddy
 
debugging deadlocks induced by a WCF in duplex mode.
 
sounds great
 
On the bright side, I can tell you how hot Hell is.
 
lmao, its a cool 18 degrees here in Scotland so its nae too baa
guessing Paris is a little warmer
 
1:31 PM
0
Q: custom textboxes changed location for windows 7

jaminatorI made windows form application in win7 .net3.5, all the custom textboxes were give hardcoded locations everything went well in all xp systems, & even in win7 systems which had .net 3.5 but for windows 7 system with .net 4.0 all the custom boxes are slightly to the above and left of their lab...

@anyone any ideas about above?
 
not a clue, sorry
@baboon, so u managed to get it sorted?
 
still working on it, kinda not so motivated this week
 
fancy a 2min break then?
i have a wee question which im sure u'll be able to answer
 
1:46 PM
@HansRudel what up
 
@Heinst sup bro, hows it going?
@baboon, got it sorted so dont worry
 
good man how are you
 
heyhow can i populate dropdownlist from a cell element of a table in the database
 
@onepseudoxy do select distinct on that column into a datatable and then make it comboBox.DataSource
 
@heinst, glad to hear bro. what u been upto today? ahh im good man + its nice n sunny outside
 
1:55 PM
just coding....the usual
i wish it was sunny here
 
ur in the states right?
 
yeah
new jersey
 
nice
@baboon, @Heinst u guys used stored procedures before with sql server?
 
nope sorry
 
I have
 
2:03 PM
USE [HistoricalData]
GO

Create Proc SProcList
AS
/*
Date:    19-05-2012
Purpose: Obtains a list of all stored procedures
		 inc parameters and their data types.
*/
BEGIN

SELECT
	sprocs.ROUTINE_NAME,
	parms.PARAMETER_NAME,
	parms.DATA_TYPE
FROM
	INFORMATION_SCHEMA.ROUTINES sprocs
	LEFT OUTER JOIN INFORMATION_SCHEMA.PARAMETERS parms ON parms.SPECIFIC_NAME = sprocs.ROUTINE_NAME
WHERE
	sprocs.ROUTINE_TYPE = 'PROCEDURE'
END
 
@HansRudel lots and lots of it
 
im trying to get it to save in historical database and not master
any ideas?
 
Since you have the USE clause it should be putting it in HistoricalData
 
@jaminator i did it whith a dropdownlist but it doesn't work
look
the following code
 
@TonyHarmon @Baboon this is the error i get
A fatal scripting error occurred.
Incorrect syntax was encountered while parsing GO.
 
2:06 PM
<asp:Label ID="lbl_ville" Text="ville" runat="server"></asp:Label>
<asp:DropDownList ID="ddl_lstVille" DataSourceID="odsLstVille" runat="server" >
</asp:DropDownList>
<asp:ObjectDataSource ID="odsLstVille" DataObjectTypeName="List(of String)" TypeName="OFPPT.Data.DataMapper_Cls_EFP"
SelectMethod="GetListVilles" runat="server"></asp:ObjectDataSource>
and this is the code of the method called in datasource
Public Function GetListVilles() As IList(Of String)
Dim lstVilles As New List(Of String)()
Using connection As DbConnection = Me.GetConnection()
Using command As DbCommand = connection.CreateCommand()
command.CommandText = "select distinct villeEFP from EFP"
connection.Open()
Using reader As DbDataReader = command.ExecuteReader()
lstVilles.Add(Convert.ToString(reader("villeEFP")))
End Using
End Using
End Using
Return lstVilles
End Function
 
@HansRudel Then the database must be called something other then HistoricalData because everything else is correct. I cut and pasted the proc into one of my play databases and it ran fine
 
hmm,
 
In studio manager just make sure you're in that database then run from the create statement down
 
@TonyHarmon
[IMG]http://i.imgur.com/1bWfU.jpg[/IMG]
 
@HansRudel remove the GO
 
2:12 PM
Just highlight from create to the last and hit f5 and see what happens, you might not have authority to create procedures
No GO is okay
 
@Baboon Msg 111, Level 15, State 1, Procedure SProcList, Line 1
'CREATE/ALTER PROCEDURE' must be the first statement in a query batch.
@TonyHarmon Command(s) completed successfully.
so im lost why the hell wont it let me shove it in that db
 
If it completed successfully it's there. select refresh on the database and you'll find it
 
@HansRudel Add a semicolon after the USE statement.
USE [HistoricalData];
 
SQL server doesn't really require the semi-colon anymore, at least not 2008 R2
 
@SPFiredrake doesnt work USE [HistoricalData];
go
get this error
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'go'.
Msg 111, Level 15, State 1, Line 1
'CREATE/ALTER PROCEDURE' must be the first statement in a query batch.
 
2:17 PM
@HansRudel Do you have connect permission for HistoricalData?
 
@TonyHarmon nah its still not there, i refreshed it and its in Master but not in Historicaldata
@SPFiredrake i created it so unless i f-cked up then i should do
 
@HansRudel You can remove the USE statement altogether, as you're already working in the context of that database.
 
how can i check
@SPFiredrake i want the SProc to be stored in the Historicaldata database not master
 
@HansRudel If you look at the top-left, there's a combobox that says "HistoricalData"
That's your currently working database.
At the bottom of the query window it says which Database you're working in as well.
You don't work in the context of the SQL instance, but individual databases.
@HansRudel To grant connect permission, type GRANT CONNECT TO <user> when working in that database.
 
@SPFiredrake i got a new query, selected historical data in the combo, ran the procedure and it said that it already existed in the database
i deleted it from master
refreshed and ran again and it still says its already there
 
2:23 PM
@HansRudel Then it already exists in HistoricalData
 
is it possible to return a string []
 
there is nothing in the programability tab though
 
Refresh the Stored Procedures folder.
 
@heinst from a method, yes
FFS!!!!!
@SPFiredrake u win a cookie
 
YAY!
 
2:24 PM
Told you so ;p
 
dammit
 
C is for Cookie, good enough for me!
 
I never get cookies
@SPFiredrake share?
 
Hmm... What's it worth to ya'?
 
why doesnt it refresh the whole db? @TonyHarmon so u did, sorry i didnt realise i had to click on the folder i specifically wanted to refresh
thanks very much guys
 
2:26 PM
@HansRudel Because that would be a waste of resources.
You don't understand how much actually goes into refreshing database information.
 
public string GetDisplayNameFromPath(string defaultPath)
{
string[] GetPath = Directory.GetDirectories(defaultPath);
return GetPath;
}
cannot implicity string[] to string
 
public string[] GetDisplayNameFromPath(string defaultPath)
 
oh wow
ok thanks
 
You specify the return type in the method name :P
The only time that doesn't apply, is with the dynamic keyword.
 
@SPFiredrake yeah ok, fair point, guess i was being a bit naive there
 
2:28 PM
However, I find that it's hard to escape from the dynamic world, so I refuse to use it >.<
 
haha
 
Yeah, dynamic is like rabbits: you put one and it procreates until the entire vicinity is covered by them. At which point, the vicinity collapses. Game over.
 
hell yeah, she is now working. u guys are awsome!
 
@HansRudel I know I am
 
one more random question which i was wondering about earlier. Say i have a block of code for a browse button and im effectively calling it twice. Is it better to put it into its own class in a class lib and create an instance of it each time these two buttons are clicked or should i leave it as 2 separate methods even though they are the same?
i have a feeling that there is a performance hit for creating a class each time?
@heinst ;)
 
2:37 PM
yeah i think youre right with your feeling
 
public class Browse
    {

        public string selectFile(string propertyName)
        {
            //Open a new window
            OpenFileDialog browserWindow = new OpenFileDialog();

            //Customize browser
            browserWindow.Title = "Please select your file";
            browserWindow.CustomPlaces.Add(@"C:\");
            browserWindow.Filter = "Files|*.txt;";

            //Displaying custom browser
            System.Windows.Forms.DialogResult browserResult = browserWindow.ShowDialog();
thats the class i create twice
 
@HansRudel if you have the same method n times, you're absolutely always doing it wrong
 
so i should have it set as i do now. 1 class and two methods which create an instance of that class and pass in a variable to the formal parameter "propertyName"
 
it looks like it could be static
 
these are the method calls
        private void statusLogFilePath_Click(object sender, EventArgs e)
        {
            Frazer.SProc.Browse browser = new Browse();
            StatusLogFilePath = browser.selectFile(StatusLogFilePath);
        }

        private void queryResultsFilePath_Click(object sender, EventArgs e)
        {
            Frazer.SProc.Browse browser = new Browse();
            QueryResultFilePath = browser.selectFile(QueryResultFilePath);
        }
 
2:40 PM
easy
 
@Baboon hmm hadnt thought about static
 
i'll let you think about it for 10 seconds
then I answer
 
@baboon, ive thought about it this morning for more than 10 sec :(
 
those buttons, they're on the same form?
well, not so easy, but there are lots of ways to resolve this
depends on your setup
 
correct, but in dif group boxes
 
2:42 PM
so these 2 event handlers are in the same class right?
 
yeah the form1 class
 
but you set a different string property
so create a third method:
 
@SPFiredrake So I got my thing working perfectly but my "boss" didnt like my code so he told me to create two methods one that GetDisplayNameFromPath and the other that GetPathFromDisplayName and populate the combobox that way
i have been staring at my screen for 1 and a half hours now
 
private (static) string GetPath(string _Init)
 
the code isnt writing itself
 
2:44 PM
@baboon, u lost me bro, why am i creating a new method?
 
@heinst Umm... wtf?
That's freaking retarded...
Is this going to be used in an embedded platform?
 
@HansRudel to centralize the call
 
@baboon, so i still have those two button_click methods. they call a single method which then creates the class lib?
or i make it static and it just called the static method
 
@HansRudel the problem is you're setting 2 different string properties
so you need the 2 event handlers
but you should abstract away the intricacies of how you get that string
besides, it looks goofy: QueryResultFilePath = browser.selectFile(QueryResultFilePath); ????
 
yeah my naming is sh!t, i will be going through it again but thats the best i could come up with
 
2:50 PM
so how do you know the state of QueryResultFilePath?
 
? howd u mean
 
how to resolve this exception
 
whether it's the string before you did selectFile or after
 
System.Web.HttpException: DataBinding: 'System.String' does not contain a property calle
 
@baboon, tbh i hadnt thought about that. just thought, id select a file and then assign the new file path to it
 
2:52 PM
@SPFiredrake no its not going to
@SPFiredrake I just dont get why hes having me do it this way....i dont even know how to do it the way he wants
 
@HansRudel what you're doing is called strong coupling, and it's brittle. We usually prefer lose coupling.
 
@baboon, do you have time to write a very short example of how my problem should be so i can see? If not, no worries
 
@HansRudel where do you initially set QueryResultFilePath ?
before it gets into the event handler
and winforms or WPF?
 
winforms
private string ResultsFilePath = string.Empty;
public string QueryResultFilePath
{
    get
    {
        return ResultsFilePath;
    }
    set
    {
        ResultsFilePath = value;
        txtQueryResultsFilePath.Text = value;
        UpdateLog("The results file has been specified: " + value);
    }
}
thats where its initially set i guess
so its blank to begin with. then each time the user clicks the button and selects a new file, that method in the class lib returns a string and that string is assigned to QueryResultFilePath
does that make sense
do u want me to write out a full/short example of how i have it atm?
 
no I think I get it
 
3:00 PM
so is it a really sh!tty design?
 
Yeah but it's winforms, it doesn't really allow good design between UI and code
just make it so
private void queryResultsFilePath_Click(object sender, EventArgs e)
{
Frazer.SProc.Browse browser = new Browse();
QueryResultFilePath = browser.selectFile(QueryResultFilePath);
}
becomes
private void queryResultsFilePath_Click(object sender, EventArgs e)
{
QueryResultFilePath = SelectFile(QueryResultFilePath);
}
 
alright I have updated my questions here stackoverflow.com/questions/10702907/…
 
so make it static
 
and then change the other event handler as well
 
3:03 PM
the problem is only happening on one system
weird
 
it can be a regular method in the same class
 
a system with same configs is running the application fine
 
@Baboon i was told all functionality should be in the class lib. If thats the case should i make it static then?
 
@HansRudel if you own the SProc.Browse class, make it a static method there
 
ok cool
sounds like coding in WPF is quite different to winforms
+ thanks very much for ur help
i really appreciate it!!!! (u get a cookie as well)
 
3:06 PM
in WPF I would've given a whole different answer
much cleaner
 
how, in laymans terms, would it look in wpf?
 
@SPFiredrake How did you get rid of the Path name in the combobox? I know it was the LastIndexOF
GetPath.LastIndexOf("\\Data") + 1; is what I came up with
ah nvm found it in the transcript
 
Hello there. Is it possible to make a delegate that matches any prototype?
 
3:22 PM
@HansRudel it would use binding and an IValueConverter
 
@Baboon sounds cool
@Cicada, dont have a clue, sorry. Baboon or someone else may
 
@Cicada what's the use?
 
@Baboon I just answered a question where the OP apparently tries to do that (if my psychic powers are correct). So that got me wondering.
 
you can't call it if you don't know the signature
what if the delegate takes 2 parameters and returns a bool
if you don't know it does, how do you invoke it?
the most generic you can do, is a delegate that takes an object as parameter, and returns an object
it's also probably plain useless
 
lol
 
3:33 PM
And in the case where you can't modify the methods you intend to call?
 
and, at least to me, reflects poor design
what do you mean modify?
reflecting over a method, extracting the information, recreating it through expression trees and adding another line to it?
 
Sounds like overkill.
Imagine the guy wants to wrap any method in a generic delegate
Like he wants to pass Assert.AreEqual (that's what he does in the question)
But Assert.AreEqual has around 20 overloads
And dispatch to the correct one, dynamically, based on arguments
 
in that case, I make a method that takes an Action as parameter, and let the user of my method use and abuse of closures
i'll make an example
 
Look at the question if you want to answer it. stackoverflow.com/questions/10704531/…
 
@Cicada if he wants to entirely shield the usage of Assert.Equals, he has to use reflection
but if he wants to allow the user of that method to pass in the right Assert.Equals in the call, i make an example
I'm thinking something like
static void ActionTestCaller()
        {
            ActionTest(() => { return Assert.Equals(new object(), new object()); });
        }

        static bool ActionTest(Func<bool> _Act)
        {
            bool ret;
            //Do something before
            ret = _Act.Invoke();
            //Do something after
            return ret;
        }
 
3:43 PM
Okay that covers bool Assert(...)
Which I guess is enough for that guy.
 
covers anything that returns a bool
since the choice of the overload to use is left to the caller
 
3:59 PM
What if it's a "bool?" bool (just learning so I'm just trying to understand)?
 

« first day (584 days earlier)      last day (4371 days later) »