« first day (724 days earlier)      last day (4446 days later) » 

07:00
@YagyaSharma i think it will be, but you will get Obsolete message when for example you make use of the FormsAuthentication.Authenticate() method.
this line:
string[] Allmarkets = resp12.marketData.Split(':');
creates duplicates, does'nt it
Does your string contain duplicates?
Thanks Rob
there are lots of duplicate instances in my code, most are object.string type
the size of resp.marketdta is more than 4 MB
and i am assuming, size of ALLmarket would become 4 MB after the split
that's a waste, is'nt it
Big time...
07:05
and as i explained to rob earlier, in a few steps, this is repeated like 3 more times in my code
creating more duplicates
help me eliminate them
please
I dunno.. what code does that?
first is this part
GetAllMarketsResp resp12 = new GetAllMarketsResp();
resp12 = bfg2.getAllMarkets(marq_req);
string[] Allmarkets = resp12.marketData.Split(':');
foreach (string value in Allmarkets)
{
makeMyTree1(value);
}
Example of how your string contains duplicates?
hi, everybody I'm new guy for this chat room
i used the profiler, it confirms my doubts
and makemytree is using pass by value
so it creates more copies
07:09
But how do you know it contains duplicates?
@Samy000rathore mmn, passing string by value doesn't create duplicates.
O.o
it does'nt
how can it not
It is the operations you do with the string that creates new strings.
@Samy000rathore A string is passed by value reference..
Is this the right place to ask about Windows Phone 7?
Is anywhere the right place?
u are getting me confused
still, as i said there is more splitting in the method
07:13
I'm new guy for C#. is there anybody who can guide me on C#
@Samy000rathore You could use Distinct but I don't want to break your method
@Vis
what do you need help with
wtf why is this not compiling!

            int a[3][3] = {{1,0, 1},  {2, 2, 4}, {1, 2, 3}};

		int b[3][3] ={ { 2, 3, 1},  { 6, 6, 2 },  { 9, 9, 0 } };
		int result[3][3];
		double tmp;


		int i;
		int j;
		int k;

		for (int i=0; i<3; i++) //i = col
		  {
			for (int k=0; k<3; k++)
			{
			  tmp = a[i][k];
			  for (int j=0; j<3; j++) //j = row
			  {
				result[i][j] += tmp * b[k][j];
				printf("%d\t",result[i][j]);
			  }
			}
		  }
@BicB That's not how to declare 2d arrays in C#
btw this is in C not in C# =)
07:16
Oh ok
What's the error?
woops
i declared i,j,k
and declared again
Bic B. you have declared ijk twice.
oh u saw
It shouldn't matter..
@TusharJain ok. I am going to development mini application with sql database. Now my Question is that what should i do or refer book for developing desktop application over internet.
07:20
My suggestion would be download a sample app and watch a video of someone making a sample app.
@TusharJain for video or apps any suggestion !!
patel bhai
thodi help kardo
@TusharJain that could be helpful in my development..
@vishalpatel
hmm just a minute, wll try to search for one.
07:23
ok
fine then
@BicB tell me??
just a minute...
I am stuck on this problem for 2 hours now! its a simple matrix multiplication using transpose but for some reason its not working, I am doing this in C
i'll be back in 10-minutes
    int main()
{

  int a[3][3] = {{1,0, 1}, {2, 2, 4},{1, 2, 3}};

		int b[3][3] ={ { 2, 3, 1}, { 6, 6, 2 }, { 9, 9, 0 } };
		int result[3][3];
		double tmp;

		for (int i=0; i<3; i++) //i = col
		  {
			for (int k=0; k<3; k++)
			{
			  tmp = a[i][k];
			  for (int j=0; j<3; j++) //j = row
			  {
				result[i][j] += tmp * b[k][j];
				printf("%d\t",result[i][j]);
			  }
			}
		  }


}
@vishalpatel ok
07:26
@LewsTherin if i call mymethod(value); and value is string,
i change the value="abc"; in mymethod
it would change in the calling method also??
@BicB Is it compiling now?
@Samy000rathore No
@LewsTherin no =( it saying for for loop declarations are only allowed in c99 mode
What compiler are you using?
gcc
can anyone help me correct my code so that it would do matrix multiplication using transpose one matrix???
@Samy000rathore You need ref string.
07:32
it won't let me use ref inside a foreach
No use ref in the function argument..
When did you start with C#? Ha ha
:P i am a noob
haha
but i was saying that i DID used it in the func argument
but the actual calling was in a foreach loop like this
foreach (string value in Allmarkets)
{
makeMyTree1(value);
}
i can't use a ref there
As in makeMyTree1(ref value)?
yeah,
Cannot pass 'value' as a ref or out argument because it is a 'foreach iteration variable'
Makes sense.. foreach is readonly
07:41
well neway, i might as well replace it with a for loop
Make sure you don't break the original code :)
Ha ha I just saw the @Billdr starred msg.
@Billdr If I got more stars in here, maybe I wouldn't need to ;)
morning
07:45
@E.LDunn GTFO Dunn
@Drose Lol, what are you doing here?
Betraying Java? tut..
@LewsTherin Hiding of course. Actually I'm trying to figure out this new git stuff. 8P
Haven't used git yet..
Yeah it's confusing the crap out of me compared to svn
I've only ever managed to use TSVN and Perforce.
@E.LDunn Ok ok morning.. giving me the aul silent treatment :(
One of the guys in teh Java room suggested I try it to handle my projects, but I can't get it to make an initial commit. Something about files 'not under git'
07:51
GIT by command line is awfull!
morning el
i tried it once
i managed to get my project commited and that was it
@Samy000rathore :O Dunn El
we have to use full names now?? :o
My apologies Sir @E.LDunn, A very Good morning to you.
07:53
You didn't get the joke lol
Anyways I'm off to college. Later
Well I'm trying with Eclipse // Intellij IDEA, without luck on either
i got myself a plugin for VS
you can install it with the extension manager under Tools
@lew now i got it :D
07:57
stackoverflow.com/questions/12795143/… is my implentation of matrix multiplication using transpose correct?
anyone?
08:21
when there are one or more validation groups in an aspx page, then whenever one validation group is activated then automatically the error messages and summary of the other one disappears........does anyone know how to come aroung this??
i mean - if there are error messages and summary of a validation group displayed, then i dont want them getting disappeared when the other validation group is activated.....
Jez
Jez
hmm.
if you're designing an ASP.NET MVC application with EF, is there really any need to have more than 2 projects?
the web project and a data project
i'm thinking there ought to be a business logic project, but i can't actually think what would go in it! or at least, I can't think why that stuff shouldn't go in the web project
can anyone help me?
you talking to me!!!!!!!
Jez
Jez
anyone really :-)
sorry, thats supposed to be with question marks rather than exclamations...
Jez
Jez
i've never had to design an MVC application from the ground-up before. it's more hard than i thought.
08:34
oh..okay...im just went de nero...then.
Jez
Jez
i get the distinct impression i'm going to go down a bad route
do i want n-tier or not? do you use a repository pattern in an n-tier app?
nevermind......u're lucky, to get around mvc rather than asp.net webforms
Jez
Jez
well that's true
i hate webforms :-)
i hate them to the very core...too
Jez
Jez
it's not really MVC im having a problem with; it's where to put stuff
08:36
if MVC....i have no idea
Jez
Jez
it's not so much MVC
if you were using webforms with EF for the data persistence...
by the way , do u know the way to get around the problem i posted back
Jez
Jez
where would you put the business logic?
hmm....id make a class and compile it and put it in bin
Jez
Jez
@user1247808 not really. validation in webforms was invented by the devil. it's one of the main reasons to get away from webforms. i mean, "everything is one big form"? ludicrous.
08:38
yeah....im stuck with it....couldnt find a solution
Jez
Jez
@user1247808 but why put the business logic in a separate assembly if it's only going to be used in the web project?
so...do u wanna put it in app_code folder?
Jez
Jez
i dont know where i wanna put it :-)
take an Enum
take an enum!!!!!!!!....i didnt get that
Jez
Jez
there's an Enum that maps dropdown entries on a SELECT to database values
actually not database values... but enum values
that will later be used in some business logic
where does that enum go?
08:40
ohh....by business logic, u meant dealing with value passing
!!
Jez
Jez
no
i mean dealing with the data once you've passed it to the application
enum goes where the entities go
btw asp.net mvc isn't that just 1 project?
Jez
Jez
yes... the web part
but the rest of the application will consist of more projects
or do you need another application server outside the dmz?
Jez
Jez
what about mapping EF entities to MVC models
08:42
Is that because of a request the multiple projects?
do you have to deploy on multiple tiers?
just map entities one on one from table to model
no need of DDD-crap
just CRUD
a folder in the project for your models a folder for your data access and a presentation folder
depends on the project offcourse
Jez
Jez
maybe i need to use the service pattern.
why?
is the data going to be used by other applications?
like 99% sure going to be used
Jez
Jez
hmm
possibly
there may be 2 web apps that use this, there may also be an "import data" application to import from an old DB
so this data model should basically be decoupled from the web app
"may be" is not 99%
Jez
Jez
no but it's high enough that i want to decouple it :-)
08:49
its easier to decouple later on
well yes but it will not make the application better
Jez
Jez
i'm thinking that i will avoid interfaces until later when i'm unit testing
but i don't want to avoid decoupling
the data from the business logic
the only question is whether to decouple BLL from the web application
putting 2 folders into 2 projects is not decoupling
Jez
Jez
and how
you shouldn't
because it will take more time
Jez
Jez
i shouldn't decouple business logic from the web app?
what about "Skinny Controller, Fat Model"?
08:51
if there is no REAL NEED then no
what about updating all your decoupled layers and interfaces with every change
oh what fun
Jez
Jez
heh
what about "Keeping things simple" :)
Jez
Jez
i said i would avoid interfaces until unit testing ;-)
i don't think you can avoid them then, i mean if you create a mock class you need an interface
why do you need a mock class?
putting things in folder or projects is almost the same
Jez
Jez
well ok not a mock class
but mock business objects
so your unit test can send some mock data to your BLL, instead of having to get real data from a DB
08:55
Why not go to the real DB?
Why waste extra time on a mock class
Jez
Jez
because it's slower, and it's more of a pain to have to setup a whole DB just for unit testing. you may want to do unit testing on a build server.
So how are you going to test the DB?
Do you have extra load/stress tests?
Jez
Jez
i'm not testing anything at the moment
i'm planning for the day when i might have time to implement testing :-)
Jez
Jez
tbh i'm really confused at the "skinny controllers" idea.
i mean why have a controller just to put almost nothing in it?
ooh, there's 10 lines of code? so fucking what? am i missing something?
09:01
then you can put another pattern on your brag list
Jez
Jez
someone needs to explain to me skinny controllers
or another acronym on your resume
Jez
Jez
no, surely there must be something to it
i just don't understand
something meaning "hey lets add complexity to our crud app"
if you don't see the need then don't use
later on maybe you will see the need
implement it then
not every application need every architectural best practice
Jez
Jez
it doesn't help that when you create a new MVC application, Visual Studio creates a "models" folder
IMHO it should create a new project for models
i mean that's where most of the business logic is meant to go
09:06
there is no need to put it in another project
guys I need someones help really badly regard matrix multiplication in C!
I am begging pleeease, I been stuck on this for a hour now
Jez
Jez
@DavidDV if you have a bunch of complex domain models in your web project, you have a load of business logic in your web project, yes?
yes
and if that has to reside on a seperate tier outside the DMZ you need another project
Jez
Jez
wait a minute, now you're moving onto a DMZ
i'm thinking about reusability in a web app
if you need to create multiple sites on the same domain model then also
if you "may possible" need then no
Jez
Jez
09:11
hmmm
making a generic domain model for an application and "possible future ones" will never work
Jez
Jez
what about mapping between EF POCOs and your domain model objects?
I don't use EF
I have a better ORM that I use
Jez
Jez
what ORM is that
Jez
Jez
09:17
i think part of the problem is this: everything i have been told as a programmer tells me to decouple data access, business logic, and presentation.
now with MVC, i'm not sure that decoupling exists anymore
or at least, not in separate assemblies. it can all be shoehorned into 2 assemblies
data, and "everything else"
it just doesnt feel right
:)
Look in the end its all about being productive
Jez
Jez
with Entity Framework, you can have your Web assembly directly accessing database entities
well yes but you still put everything like data access and business logic in a seperate namespace/folder
Jez
Jez
separate from what?
I just got trolled by F#
09:20
seperation by namespace or project is the same
Jez
Jez
@DavidDV hardly
just with project its harder to fuck up
Jez
Jez
with project, you separate the code into another assembly
if you only do it for yourself and not for another project
if you only do it for some OCD then do it in another project
but it is not magically better
Jez
Jez
hmm
yeah i basically got fired from my last job for not falling in line with their anal obsession with various coding practices
maybe that has made me too inflexible :-)
like, they got REALLY pissed if you said this.property and not property
09:23
lol
Jez
Jez
and they got REALLY pissed if you said enum Foo : int instead of enum Foo
there's a book called Clean Code. they called it their "Bible"
Coding Style is important, but I think the end-result counts more
Jez
Jez
i always fight for tabs instead of spaces. :-) i think that pissed them off a little
i lost that fight
let's look at a practical example
i'm implementing a membership provider for the site, and it's linking into my DB thru entity framework
do I use:
UserRepository repUser = new UserRepository();
var foundUser = repUser.GetUser(username);
or do i just say:
using (var context = new DbContext()) {
    var foundUsers = context.Users.Where(usr => usr.LoginId == username);
if (foundUsers.Any()) {
        return foundUsers.First();
    }

    return null;
}
you can do FirstOrDefault instead btw
Jez
Jez
i like being able to specify the default
09:30
ah ok then not
Jez
Jez
see i was thinking that i should use a UserRepository.
first part is calling the repository
Jez
Jez
now i'm not sure.
second part is the code in the repository
Jez
Jez
at the moment, yes. but im wondering whether i can move that code straight into the membership provider. i might want to reuse that code somewhere else
so presumably i dont want it in the membership provider
but do i want a repository?
i think having a repository that takes lambdas might be nice
so basically you're just saying "get from Users stuff that matches this query"
09:38
you mean Iqueryable
Jez
Jez
yup
I would just tightly couple my methods to just then ones I need
Jez
Jez
but then you need a new repo method if you need some new functionality
that's going to be more work, isnt it
no it will be better
Jez
Jez
why
09:40
because I want to say to my repository, get my active users
and the repository handles that
active users => a special where clause
I don't want that outside my repository
Jez
Jez
what if you want to say, "get my active users where the user is in this role and their surname is "smith""?
GetUsersByName() :p
Jez
Jez
no, you need name and role
It depends on all the methods I need
I might just create a filter object that I fill and pass on
Jez
Jez
whereas if i'm passing in a lambda
i can have something like
09:42
well yes
but it no longer contained
GetUsersByName is a shitty nomenclature
bla bla
we need GetUsers().Where().Property("Name").Equals("Value")
Jez
Jez
userRepo.GetUsers(usr => {usr.Active && usr.Roles.Contains("xyz") && usr.Surname == "smith"})
Fluent API is the way to go!
:)
09:43
lol that would suck :p
Jez
Jez
it's ultra-flexible
@Jez that stuff should be in the repository
Jez
Jez
you have a repo with just a few methods, and you have a nice way of specifying exactly what you want to get
why though, david?
don't i want that in my business logic?
not really
anyway I got to eat
Jez
Jez
heh
this makes the case for a very generic repository pattern
09:48
@Jez If you like it, try using it
to me, it looks like that instead of creating n number of repositories, he is creating n number of criteria, and then passing it to generic repository
not much difference
Jez
Jez
well, it seems a bit more elegant
i want to get data according to a particular set of criteria, i use a lambda instead of creating a whole new method
Hey. Is anyone known with the Routing from mvc? I've tried to use this:
routes.MapRoute(
name: "Custom",
url: "{controller}/{action}/{year}/{week}",
defaults: new { controller = "Cursus", action = "Filter", year = DateTime.Now.Year, weekOfYear = 1 }
);


And navigate to: sitename/Cursus/Filter/2012/5 but it gives me an 'Resource not found' error
What am I missing guys?:D
Jez
Jez
@Mittchel need more context really.
09:58
Uhm do you need my controller method too?
Jez
Jez
what does your controller look like
Basicly what I want is
Jez
Jez
by the way, weekOfYear = 1
I would like a function called Filter which filters a planner on the year and weeknummer. So sitename.com/Filter/{year}/{weeknumber}
Jez
Jez
what does that do? it doesn't give a default for week
09:59
doesn't it set the default to 1?
Jez
Jez
don't you want to set the default for week?

« first day (724 days earlier)      last day (4446 days later) »