« first day (1779 days earlier)      last day (3161 days later) » 

12:32 AM
@LuluthoMgwali Stored Procedures are a DB object, don't think we can do them code first yet, have to make them in the SQL server
 
 
7 hours later…
7:32 AM
Not that all the advice I was given on here was alright. This high school student that was contacting me for a reply on Facebook asked why I wanted to live code with someone. He then followed to ask me if I wanted to join a forum instead or follow twitter accounts I then told him what are you talking about. He then told me to go to these links on forums and of course stack over flow haha . But I knew already that I was being strangled by the throat;
I then proceeded to ask for not help but for a project I can help with or not even help but code on for fun. I don't know who was hurt here me or him, but it does seem to be me. Or else I would not be here writing this. I was told that he has over 40 word press apps that he makes within 2 months of .. project time ?... Or whatever . He then told me that he was a sophomore and I told him I have made apps and said I just can't make the cut with just little things like small applications
really sorry
I was discouraged from this sorry again
sorry sorry sorry
 
 
4 hours later…
11:28 AM
@june1992 What are you talking about?
Also how old are you?
 
 
2 hours later…
1:02 PM
^
I'm not sure either.
 
 
2 hours later…
2:41 PM
Hello everyone. How can I scrap the full source of a website from webbrowser-control?
DocumentText isnt giving me everything.
I need to get text even on the outer location of html-tags.
Also I dont want to use a seperate download through a stream.
Anyone?
 
nothin
 
2:57 PM
:/
 
 
2 hours later…
4:44 PM
@C4ud3x ask the site owner if you can first
92 maybe 23? @june1992
 
yes
that's corect
 
5:04 PM
@juanvan Not your businness caring about.
 
that is cool then we don't have to answer
@june1992 what you have going on? you have a a code question
 
Hah lol.
Ive asked about programming, not laws. This is stackoverflow you remember?
 
ethics is part of technology
 
Thank god "we" only means you.
Ethics lol.
Here comes the ethic-part:
The part before the html-tag is displayed on the website as important information.
So its public anyway.
Nothing reprehensible in here.
If everyone whould've to justify oneself.....
 
Hi C#, simple question about IoC/DI and unit testing.

Let's say I have `FooService` whose constructor injects `IBarService` and `IBazService`. Unit testing is easy since I can simply mock out those dependencies. However, say `FooService` has a method I'm testing that uses `WebRequest` and `StreamReader`... clearly I want to mock those out but do I really have to inject them via DI? Can I just use mock to override them?
I should note that passing them in as parameters wouldn't make sense
 
5:09 PM
You can't DI those items but you can Mock them with a MemoryStream
 
What are they talking about
 
@juanvan I see. My question is more about any dependencies that is not one of my services.
is it okay to just use the unit testing/mocking frameworks to override the new Something in these cases?
or is this hacky and screaming "bad design!"
 
well using an override in a test could be bad design
 
I mean "override" in terms of "hey if you see a new Something, mock it out this way"
for instance, a WebRequest
 
Ya that sounds right
 
5:12 PM
Okay, so if this is the case... then what's the point of DI/IoC?
is the only advantage with the lifecycle aspect?
 
abstraction would be a better wouldn't it ? Then you can override the virtual method being that
 
that is for the base methods
 
oh
 
With Di the idea is to use 1 thing mutil places
 
@juanvan I appreciate your help. To conclude:
 
5:17 PM
In software engineering, inversion of control (IoC) describes a design in which custom-written portions of a computer program receive the flow of control from a generic, reusable library. A software architecture with this design inverts control as compared to traditional procedural programming: in traditional programming, the custom code that expresses the purpose of the program calls into reusable libraries to take care of generic tasks, but with inversion of control, it is the reusable code that calls into the custom, or task-specific, code. Inversion of control is used to increase modularity...
This is what DI is looking to solve
Create reusable code that can be used where ever I is accepted
like VISA
 
@MatthewVita there's a feature in .Net called Fakes. This lets you rewrite the actual .net type being used, so in this case something like WebRequest
You can then pass a version of that type that works like a stub, or whatever. Tight coupling is no longer a problem
 
@juanvan and @TomW so if I'm understanding correctly, it's best to constructor inject my service dependencies, but whenever I need to mock classes that are "new'ed" up (such as webrequest or filereader), it's not possible to inject those and I must simply use some magic within my mocking and testing frameworks?
 
@MatthewVita pretty much, yeah. And to be honest, I think that's the way it should be; in cases where you have an explicit dependency on a particular class (i.e. newing, it) I don't think it should be easy to change the intent of that code - if you really need to, I think it's right to have to perform some ceremony to make that happen
Then there's no risk of messing it up by accident
 
ceremony - this b.c it's Sunday?
 
@TomW okay, I see. My only concern is that I'm looking at the C# Fakes and they seem to be passed in one way or another
 
5:22 PM
oh yeah fuck, working on the Sabbath, we're all going to hell
 
the items I'm "new"ing up are NOT passed in as parameters. Would I still be about to fake/stub/mock them out?
 
@MatthewVita my understanding is that any code that mentions them gets the faked version and can't tell the difference; I could be wrong about that though
actually you know what, I'm not sure
 
@TomW so if FoobarService has a method called GetWeatherToday() that makes a WebRequest to some external weather api... I may not be able to fake out the WebRequest because it's not a parameter?
 
I'd have to look it up, I'm not sure
 
so let's say this IS possible... would that be bad design?
(I'm leaning on "no, it's fine")
@juanvan and @TomW thanks for helping me uncover this, btw
 
5:28 PM
I never done asp.net only winforms
 
@MatthewVita I don't think so, doing whatever Fakes are designed to do I think is fine; as long as you understand it
@juanvan what?
 
@MatthewVita You wouldn't be able to decouple that, but you can abstract the HTTP calls into a HttpService that you can mock to test the FoobarService! Decoupling can go too far too. Use IoC in moderation. :P
 
Really ?
 
@TomW asp.net everything web in .net?
 
I meant desktop though
 
5:29 PM
@juanvan you said:
> asp.net is winforms
 
Ohh I see what I did
 
which is nonsense
 
correct it is
 
@juanvan I think you were thinking of "WEBforms"
 
Yar!
my eyes they lie in the light
 
5:30 PM
winforms is "deprecated" ?
 
@RoelvanUden that's what I'm thinking
 
am a little hung over
 
hi
 
@june1992 still used many places
 
what sites are good for asp.net learners?
 
5:32 PM
@RoelvanUden can you confirm that it's possible to "mock" out "new'ed" up things like DateTime and WebRequest with the magic of a mocking/testing framework without having to explicitly pass it in? @TomW wasn't 100% sure
@Harish pluralsight (it is not free, but is VERY high quality. If you are in the field, you may consider asking your employer to purchase a license)
 
microsoftvirtualacademy
 
@MatthewVita Probably not. Not in any kind of reasonable fashion at least
But @TomW mentioned "Fakes" so it might be worth checking out.
 
@MatthewVita ok
 
@RoelvanUden, @TomW, and @juanvan thanks for the help on this!
 
@MatthewVita ok
 
5:42 PM
wpf vs winforms
 
@MatthewVita is there any site where I can learn all asp.net concepts like how to make auto text box,how to connect to DB, how to upload images like so? and all that should be free?
 
@Harish those are pretty specific
I'm sure you can find courses in relation to .NET for databases (ORM or just general SQL stuff)
 
@MatthewVita yes
 
I'm also sure you can find courses on building UIs in .NET
as for uploading images, you can probably just read blogs and study the .NET documentation for the relevant APIs
Again, Pluralsight is not free but it will give you a really awesome survey of .NET (the database courses there are very good... Entity and LINQ-to-SQL, for example)
you can also just search around on YouTube, of course
...but you may lose on quality and, of course, it's not curated
 
@MatthewVita But if I want to make something specific like I wanna trace the mobile no.
where I can find the code for that?
 
5:49 PM
"trace the mobile no." - pardon?
If you're talking about network, perhaps a networking course?
 
if I wanna search mobile no. location, where I can find the course or code for that?
 
Again, sites like Plural Sight will help you understand the depths of C#/.NET. As for what you're talking about with the mobile tracing, you may also be interested in checking the course list for a local university's school of Information Sciences.
Else, I'm sure there's a bunch of blogs and papers out on the web about that topic
 
@june1992 WPF for new development?
 
sweet
web pages vs webforms
 
@Harish you have to google for 'snipts' of code other people did that do what you are looking to do. There may be more then one like with DI unity and ninject
 
5:57 PM
@MatthewVita ok ! Thanks for guiding me.
 
@june1992 MVC
 
ohh
 
@juanvan alright sir.
 
codeproject is a good place to learn how to use some frameworks
 
@juanvan I will see that too, thanks
 
 
2 hours later…
7:30 PM
hi guys
 
7:50 PM
hey guys :D
 
I've followed the link here
however, can anyone help me as it is not working. Can anyone tell me what I'm doing wrong?
 
@user3545438 what does 'not working' mean?
 
Hi Tom sorry just trping it out :P
typing even
the code is firing correctly (as far as I can see), but the model parameters from the querystring are not being passed to the action method
another thing I noticed is that the ContainsPrefix methos is being passed he value act_DXMVCUploadControl as the prefix with each call?
so for example I call the method decorated with the attribute e.g.
localhost:44301/Home/LoadView{myencryptedquerystring}
ContainsPrefix is being called (and passed the act_DXMVCUploadControl string??)
this.routeData.Values["id"] contains the encrypted string
and so I decrpt it and save it to the dictionary.
however i.e. this.dictionary
however the items are not being then passed to the action controller
any ideas?
 
8:07 PM
In short, no. I'm trying to read the article to work out what he's talking about, but it's taking several attempts, I keep getting distracted
 
lol thanks for even taking time to look at ti
*it
 
What's a prefix? The article doesn't explain anywhere what a prefix is and what the ContainsPrefix method is for. It's from the IValueProvider interface, but the documentation of that type doesn't explain what it's for either
 
no thats where i'm struggling to get anywhere with it
also the GetValue isnt being called? I assume it would call this to get the binder values
basically I need to provide an encrypted querystring mechanism for specified actions
this seems to be the best out there on google
 
> The former method is used to determine if there are any values in the provider with the given prefix (so the model binding system knows when to stop recursively binding)
....what?
That doesn't make it any clearer, but it's the first mention I've found
 
8:14 PM
> The ContainsPrefix method is called by the model binder to determine whether the value provider can resolve the data for a given prefix
Again, what?
Why don't people just explain stuff
 
suppose it more than the msdn page lol
as it was being passed the odd string I set it to just return true
but even that did f-all
getvlaue isnt being called after that
 
try false? :P
 
        public bool ContainsPrefix(string prefix)
        {
            if (this.routeData.Values["id"] == null)
            {
                return false;
            }

            this.dictionary = Decrypt(this.routeData.Values["id"].ToString());

           // return this.dictionary.ContainsKey(prefix.ToUpper());
            return true;
        }
its getting late good shout
 
Did the action method work when the query string was unencrypted?
before you applied the value provider
 
yeah just fine
got ti working with clear text first then looked at implementing the encryption
as i potentially need to do this across a few different routes i thought this would be a nice quick solution... i thought wrongly
what?? if i return false it calls getvalue?? and tries to get a field with the key DXMVCGridEditFields
 
8:21 PM
> At the time of model binding the DefaultModelBinder checks with the value providers could they return value for the parameter AccountNo by calling the ContainsPrefix method. If none of the value providers registered eariler could return the value our SessionValueProvider checks with session whether such a parameter is stored and if yes it return the value.
I'm not sure what that means. I think it's saying that there are a collection of value providers, and the first one to state that it can supply a value, get invoked. If you have another value provider pre-empting yours, I guess that would do it?
 
ok i think i see where your coming from,
but isfrom what i read i thought that would only happen if added it to the factories (as per the badly written link i provided)
although i suppose the attribute would work in exactly the same way
 

« first day (1779 days earlier)      last day (3161 days later) »