« first day (1496 days earlier)      last day (3454 days later) » 

12:05 AM
Assuming its not something like 10 parameters; I would say it depends on what you plan on storing
Having to construct an object out of the arguments each time you make a call doesn't buy you much
but if you are going to have a Log object lying around anyways; go ahead
 
with logging, also consider developer convenience. skip passing a datetime when the logger innards can just call DateTime.UtcNow
and create overloads for cases when there may or may not be an accompanying object of interest to be logged
 
12:19 AM
@Greg I prefer the first
 
@Greg The second would only be advantageous if you passed an interface, and that interface had the API to extract out hte message
so you could log other information without breaking the API
but with a class, it's probably not very useful
 
1:06 AM
I cleaned off my car tonight, all for naught
@JohanLarsson got any snow in sverige?
 
1:22 AM
No snow here. I guess thats the advantage to living in a desert
Very cold though
 
1:38 AM
OOC, how cold is "very cold"?
!!weather reno
 
@KendallFrey Reno: 44.8159F (7.12C, 280.27K), overcast clouds
 
pffff noob
!!weather kitchener
 
@KendallFrey Kitchener: -3.68C (269.47K), light snow
 
2:03 AM
posted on November 20, 2014 by Scott Hanselman

TagHelpers are a new feature of ASP.NET 5 (formerly and colloquially ASP.NET vNext) but it's taken me (and others) some time to fully digest them and what they mean. Note that this, and all of ASP.NET 5 is a work in progress. TagHelpers can and will change. There is NO tooling support in Visual Studio for them, as they are changing day to day, so just be aware. That's why this post (and series

 
 
6 hours later…
7:36 AM
hey
using Implemented Enums in Abstract Classes is valid or not?
 
 
2 hours later…
9:09 AM
haha, amazing. Reply-all cascade going off right now
 
9:35 AM
ahoy
 
0
Q: Ajax not invoking service method through phonegap

Cute ChildI have ajax call as: $.ajax({ type: "POST", url: "http://localhost:95/MobileEcomm/Service1.svc/validateLogin", crossDomain: true, data:{ 'EmailID':EmailID, 'Password':Password}, success: function (data) { alert(data); // do something wi...

 
9:47 AM
@CuteChild Uh, you have a Chrome developer console in PhoneGap?
 
yep
 
That's not possible, unfortunately.
The closest you're going to get is Ripple and its proxy capabilities are broken.
Otherwise use an actual device/emulator and phonegap developer app.
Pretty sure you're using Ripple then, yeah?
 
@RoelvanUden y not possible if u click at circled place?
 
What is that?
 
through that i get chrome console
 
9:54 AM
I have absolutely no idea what tooling you're using then. Forget it. If you ask questions without giving the most basic of basic information, nobody is going to bother trying to help you further.
 
Linked question appears to be a duplicate, I have flagged
 
That too, flagged.
 
10:32 AM
sup nerdz!
 
Hi guys, does anybody know if we can bind to a value inside of an observable collection? I have an ItemsSource which is bound to an observable collection, and I want to bind to a value inside of that but I get the error: Additional information: Two-way binding requires Path or XPath.
 
@RoelvanUden I'm fucking supporting this web forms application now
/rage
 
10:50 AM
@Sippy Oh, gawd...
 
@KendallFrey no snow here.
 
11:35 AM
Conceptual/soft question: I've built a WCF service that implements asynchronous streaming over HTTP. How can I prove that it's doing what I expect it to? i.e. the method really is dispatched asynchronously, the data is streamed to its eventual destination rather than being read into memory, and so on?
 
@RoelvanUden One fucking person can't save information
Like .. I don't even
Everyone else can save.
And to note, my code hasn't been published yet so I'm doing that first l0l
@TomW uhm .. connect to it .. from another computer?
 
How does that prove the things I said?
 
How would it not? I don't get your thinking. You mean file streaming, right?
 
Yeah, I mean, it's a conventional form on the client so no fancy ajax or anything, and therefore the file body is uploaded in its entirety to the webserver first
but the WCF service should be streaming, so there shouldn't be another load into memory on the app server
working on the client asynchrony later, for now validating the WCF service
 
11:50 AM
Ah now I getcha.
 
it doesn't appear to start copying the stream to a file as it's supposed to as promptly as I'd expect, so I'd like to gather some data that proves or disproves that it really is using the streaming model I wanted
 
12:06 PM
@TomW Upload a 8GB file and see if your server explodes :P
 
@RoelvanUden If I did that my internet connection would explode
 
@KendallFrey Well, you upload.. locally, usually, to test a dev thingy.
 
Yeah well I don't have Tom's dev thingy local
 
12:26 PM
no test environment yet, my dev box only
thinking about that I should at least give myself a local git repo to shelve it in
 
Hello people who enjoy the business of the monkey
 
o.0
 
If some one has a little time, I have a non coding question, more of a "can I use" question. Using ADO.NET, it is very easy to create an application where the end user can enter connection string detail, such as the path of their SQL database, the username/password etc.
This means their database has nothing to do with my software and they don't need us to set it up for them (but it's very much up to them to ensure it's right).

My question is, is this replicable using EF (I'm assuming not)
What I mean is, EF uses the conenction string in the web.config file - is there a way to tell it to use a different string?
 
@TomW I'm pretty sure it'd still work if you tried to upload 8gb lol
 
since the machine only has 4GB of RAM, I'm not sure
virtual memory would kick in massively
 
12:34 PM
@TomW There's ya test then
You can monitor that :D
What you're asking for is possible but I have no idea how you would do it.
You'd have to recompile your EDMX at runtime based on the connection string given to you by the user.
Which is dangerous at best.
 
@Sippy, I was guessing that is the case... I wonder if it will be easier to just use System.Data and write the query the 'old' fashioned way
 
Hey guys anyone interested in solving something strange?
 
Well, a result is a result so at least I can continue
 
@RoXaS That really depends on how you define strange lol
 
@RoXaS, I worked it out... It was putting the marmalade too close to the tea bags
 
12:37 PM
@Dave Aw thanks
 
:)
he he
go on
 
wat
 
@Sippy eehm how about code that should not give problems with eachother fucking shit up
 
@Sippy, you don't like marmalade :)
 
@RoXaS That sentence is not English but go ahead ..
@Dave Yeah I do!
 
12:38 PM
@Sippy I brainfarted... sorry
 
Ah, a paddinton bear fan too I guess
 
I have this epic SQLCE 3.5 Database
 
I use lime marmalade for making asian foods, it's super duper great
 
And i have a DBcontext class generated for it
So i acces it using stuff like
using (var db = DBHelper.GetConnection())
                {
                    List<ServiceBulletinStatus> SBS;
                    var apu = db.Apus.FirstOrDefault(x => x.Serial == SerialTB.Text);
                    if (apu != null)
                    {
                        SBS = apu.ServiceBulletinStatus.ToList();
                    }
 
yes! tuna and sweetcorn! living with mum has benefits!
 
12:40 PM
The DBHelper.GetConnection() returns a DBContext instance with the connectionstring set
Now this code runs fine
every time
However
I have this form
In which the user can select files from and OpenFileDialog
For which it adds an entry to a list
the filepath of thise files will be stored in the database
Here comes the weird part
When no files are selected the savebutton does it's job perfectly
When files are selected it returns an SQLCE exception
saying that the path to the database is not valid
But....
It does not crash on storing the files in the database...
It crashes on loading an entry from the database
  /// <summary>
    /// Open file button is clicked
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void Button_Click(object sender, RoutedEventArgs e)
    {
        try
        {
            OpenFileDialog OFD = new OpenFileDialog();
            if (OFD.ShowDialog() == true)
            {
                var name = OFD.FileName.Substring(OFD.FileName.LastIndexOf('\\') + 1);
                SfFiles.Add(new KeyValuePair<string, string>(name, OFD.FileName));
  private void SaveBut_Click(object sender, RoutedEventArgs e)
    {
        ProgramDebugger.Info("Submitting Shopfinding Form", this.ToString());
        try
        {
            Utilities.Validation Validator = new Utilities.Validation();
            ProgramDebugger.Debug("Validating Form", this.ToString());
            Validator.TextboxNotEmpty(SerialTB, "Number");

            if (TypeCBB.SelectedItem == null)
            {
                Validator.AddMessage("Aircraft type", "Type is not set", control: TypeCBB);
 
And you know it attempts to save? I mean, you have empty catch methods so it could be failing and you're not noticing?
 
private void SaveBut_Click(object sender, RoutedEventArgs e)
{
this is where it saves
the files are neatly added to the list
but it's not even supposed to be related
also when filereferences are in the list
and you remove them
It still crashes
 
I got nothin'.
 
You see my confusion?
 
Yeaaa.
I mean .. did you code the context?
 
12:49 PM
The context was generated
 
Maybe it's not closing properly iunno.
Ah
 
and every statement
regarding the database uses a "using()"
 
@RoelvanUden You're a wizard, right?
 
@Sippy An aerial combat mage, yes.
 
1:09 PM
If you put a watch on var apu = db.Apus.FirstOrDefault(x => x.Serial == SerialTB.Text); does it show you anything about the db varialbe?
 
500MB file...memory usage stable
taking forever
there's a mysterious progress bar on the folder in explorer, which I didn't initiate...so I guess that indicates something is happening
 
@Dave @RoXaS
 
@Dave Sorry coworker called me..
@Dave For some reason it now works...........
For f sake
but when i deployed it to the another pc it still fails...
 
1:24 PM
@RoXaS, take another call as it seems to fix it
:)
 
@Dave Im deplying it now to the work pc-s where the program has to run
see how that goes
 
I have just went for drink from coffee machine, noticed there is a tea. Ordered and got some liquid that tastes like mixture of coffee and tea but its actually good taste.
 
I mixed chicken soup with tea. That was not a good taste
 
Hahahahahahahahahahahahahahahahahahahahaha
@RoelvanUden There's HTML generated in code behind
I fucking quit
I'm getting a new job
 
@Sippy That's a bit premature if this is a temporary thing
 
1:28 PM
@RoelvanUden It was sarcasm
 
@Sippy But it is pretty darn sad.
 
Someone who gets paid more than me wrote this
 
getting paid more does not make you better, and remember, you're not the only one whos learning.. if he wrote it like 10 years ago he's forgiven
 
@RoelvanUden This was released in 2012 I think.
I'm pretty sure in 2004 it was still a bad idea to generate HTML in code behind
No?
 
@Dave WTF I deployed it to my pc and it works
But the one im actually doing this for can't get it to work
Thank got it's only an internship and my term ends next week
got my bachelor 2 weeks ago so i'm gonna pull a fuckyou!
 
1:42 PM
@Sippy Probably was, but not in .NET world.
 
What is wrong with generating HTML in the code behind? I'm lost? What platofrm is this?
 
My best guess was thatsomeone was doing something like ASP or Razor
 
@Dave dave pls
 
and generating strings of HTML
in the code behind
instead of the razor/ asp syntax
 
1:49 PM
OH, I thought you meant an HTML page was being generated (and saved to disk)
 
But like 300 odd lines of it
 
ah, now I see
I used to do similar for SOME pages using ado.net - it was the simplier solution and was more read able
although less managable
that was about 5 years ago, when I worked on web forms
 
This is neither manageable or readable lol
 
hang on, I@m talking about 10 lnes of code
not 300 :)
but I can't remember why we had to do it this way
 
2:04 PM
Any one used geolocation tools before?
ah, I remember why we did it that way - it was because we had all come from asp.classic and it felt more 'natural' ha ha. Yes, we did it once, and then never again
any way, no one used GeoLocation tools? Or does any one konw why the results between different tools are so varied?
 
2:28 PM
is there a better way to access a form in an angular controller other than
9
A: Can I access a form in the controller?

Atul ChaudharyBit late for an answer but came with following option. It is working for me but not sure if it is the correct way or not. In my view I'm doing this: <form name="formName"> <div ng-init="setForm(formName);"></div> </form> And in the controller: $scope.setForm = function (form) { $scop...

I'm not sure if theres a new-er way as this seems hackish
 
Fuck this is so aids
 
Way to go Word.
> ~$ucking Customization Modifications.docx
Looks a lot worse than it is
 
Lol
Fortunately for you, non technicals will just read it as sucking.
 
@Sippy We can hope
 
@KendallFrey What was the original title?
 
2:38 PM
Trucking
 
Harr harr it's a good rename. I'm proud of you word
 
3:31 PM
@ReedCopsey You think, my current interface should call another interface?
 
@Greg You can never have to much interfaces
 
@Greg Sure why not?
 
@RoelvanUden Just never done an implementation like that:

public interface ILogger
{
     LogMessage(ILog log);
}
I've never done an implementation like that.
 
3:48 PM
That does look better than your previous code
 
@KendallFrey Can you explain, why?
@KendallFrey I've never done that, how would you use Dependency Injection with such an implementation for instance?
 
@Greg More modular, more flexible, and less driven by business logic
I don't know much about DI, but I guess it would apply only to the logger, and not the log entries.
 
@KendallFrey So if I have an implementation like:
public class EmailLog : ILogger
{
     public void LogMessage(ILog log)
     {

     }
}
How do you implement ILog in that point correctly, would you do a private ILog to pass the implementation through the Constructor? Or would you build it in that implementation?
 
4:04 PM
@KendallFrey Save yourself bruh
 
@Sippy ?
 
js
 
constructor injection mostly (not always) preferable :P
 
@Teomanshipahi I'm doing to understand this approach, properly.
 
man, debugging process dumps is powerfully useful
 
4:14 PM
@Greg Some guy (not Some Guy) in JS is arguing that Rectangle : Square
@MikeAsdf I actually read that as "usually powerful" lolwtf
 
@KendallFrey "Powerfully" isn't exactly a conventional preposition for 'useful'.
 
We were randomly seeing abnormally high cpu usage on our server, but whenever we deployed a package with profiling enabled, we were unlucky enough to see no issues to investigate
When it was happening recently, I remoted into the machine, did a process dump, zipped it up & downloaded it. Then VS could show me every stack trace and method argument at that point in time.
 
Square : Shape
 
Culprit was a rogue loop on certain input.
 
"No that's abitrary"
Art thou a moron?
@KendallFrey Is it reasonable to assume that Shape would not be an arbitrary class?
Am I the only one who thinks OOP should be verbose or what
Lol
 
4:20 PM
Random question, wouldn't this:

string i = reader["Product"] as string;

Be better than:

string i = (reader["Product"] == null ? "" : reader["Product"].ToString();
 
They do different things
 
ToString will convert things like ints
is it "better"? It depends
 
Also, null != ""
^^
 
Wouldn't as string convert to a string if it fails it becomes null?
 
the as operator can only attempt casts, and it can only be used on reference types
 
4:22 PM
Is this valid statement?
SELECT DISTINCT SUBSTRING(col, 8, 3) FROM table ORDER BY SUBSTRING(col, 8, 3) ASC
 
So based on the code the person wrote, if it is null they set it to an String.Empty or "" which wouldn't the AS be equivalent?
 
@Greg yeah, 42 would become null rather than "42"
@Greg uh, no
 
@Greg the only was for as to return "" is if the input is exactly the string ""
 
@Marek Does it work?
 
Well, if you do:

string i = 42 as string;

Wouldn't that equate to "42"?
 
4:25 PM
no
 
(x as SomeType) is equivalent to (x is SomeType ? (SomeType) x : null)
 
rtfm
 
@Greg i would be null
test it
 
@MikeAsdf for practical purposes, equivalent
 
or wait, it wouldn't compile
 
4:26 PM
I'm gonna bet it would
 
you can't apply as to ints, right?
 
testing
 
@MikeAsdf You can if it is int?
@KendallFrey Ah, I see the documentation now.
 
@MikeAsdf right you are
here's your 42 fake internet points
 
@Greg Nullable<int> seems to have the same restriction
 
4:29 PM
@KendallFrey Yeah, I just read the detail. I was under the impression that AS would still attempt to convert.
 
it's a cast, not a convert
 
Makes more sense now.
Misunderstanding of Cast, I assumed that casting an object to another type forces it to that type.
 
IIRC C++ will take some weird conversion avenues on your behalf if it can find them
 
as does do that
 
@Sippy no
 
4:34 PM
like attempt to find a copy constructor that takes the source type as argument
 
@KendallFrey But I also believed that if you forced 42 as a string it would try to make it "42"
If it failed, it would become nullable.
 
casting does not work that way
 
Fair enough.
 
@Marek Then no.
 
4:51 PM
This feels like a dumb question but, oh well. What would be the right project template to start with if you wanted to create an executable without a window or console?
 
A Class Library
That would be able to be used as a .dll or be referenced within other projects for 'Desktop, Web, or Console`
 
@Greg was that an answer for my question?
 
@BrandenBoucher Yeah.
@BrandenBoucher That is just code, it doesn't have an entry point or anything it is just a library.
 
right
I'm looking to create an exe. Just wanting to see what was more common in practice
e.g. Win App vs Console App
 
What do you mean? What type of application do you want to build?
 
5:00 PM
@ton.yeung That's kinda why I want to shy away from that. It's not a problem really but a preference.
oooo. good point.
This project will have a window but it's loaded at runtime by the exe.
so I'm trying to avoid having anything else pop up before hand. Just to try to keep it more clean looking.
The whole explanation would take a very long time to explain.
apps already written but thanks for your input
@ton.yeung
question for you
Let's say you do have a situation where you wanted the view-able window to be loaded at runtime, what would you do that you would sound less gimicky?
 
5:19 PM
@ton.yeung Is there a simple way to add a loading or something on an asp.net web-page while it is executing a long query?
 
hello everyone
 
hey Jack
 
@ton.yeung Well, I want it to do it when Sql is called long queries. So a button click would occur.
 
where could I ask for a book recommendation? is there any stack* sites to do that without it be closed as being off-topic?
 
@Jack Chat or Amazon are good.
 
5:25 PM
Well, without going to a ton of details, there's data that gets loaded early on that is outside of the scope of the view and an update process that is set up to overcome some limitations of PRISM that can be used to update the main window without shutting down (or restarting) the main program as you'd have to do using ClickOnce.
 
@Jack Amazon has great reviews.
 
HAMMERTIME!
 
lol
Yes, it stops when you beat the tower with a hammer.
@ton.yeung AAHAHAHAHA
shhhhh
 
@Greg: I'd like to create a small text editor and get some book about the subject but just search on amazona is such a hard job since I didn't find results from search 'accurate']
I don't know if there are books about that subject out there, btw
 
@ton.yeung The loading isn't REALLY silent. There's a progress window that pop's up. That really could be the window that is shown at first, but there's a bit that happens before then that turns out be cleaner
 
5:29 PM
@ton.yeung Well, I was debating on either a thread or to trigger a hidden value field. So if it says false show a spinning 'loading' if it shows true then it fades.
 
This is a bit more complicated to explain here but, trust me, we've spent quite a while reviewing our process. I just had a brain fart on the exe.
not yet
@ton.yeung Thanks. That's the pattern I'm going to use.
 
@ton.yeung Or just javascript on click, then on postback it disappears.
 
@ton.yeung I think I'll def take that in to consideration for the update/install process for modules. It's a very good idea.
as far as the winform stuff, I forgot you can just use a class lib, set up a static class with a Main sub and set the project type to windows app.
@ton.yeung even WPF win dev? (<-sarcasm)
 
@ton.yeung Boss asked for it.
 
@BrandenBoucher @BrandenBoucher Console App
fail, sorry.
 
5:38 PM
@ton.yeung What if I anchor for when they run the report?
 
@ton.yeung Then when the page refreshes it removes the animated image?
 
"Descriptiption" is one of the most creative spellings I've seen in a while
 
@ton.yeung It won't issue the Postback until it finishes the query to start the Page-Load again.
 
1
Q: How to show a loading screen till my function completes

Stacy KeblerI have a function called Export Excel which basically exports data to excel and saves it. So i need to show a splash screen till my function completes the job. How can i do this. EDITED : How to close my Please wait screen before showing the below dialog box My code snippet: //For back groun...

 
5:51 PM
@StacyKebler Why did you ping me?
 
@KendallFrey Because She's hot for Kendall, she's got it bad- so bad. She's hot for Kendall. (Eddie Van Halen guitar slide)
 
I'm not a rep whore, I don't sleep with help vampires.
 
@KendallFrey ... I'm a knowledge whore.
 
@BrandenBoucher
var start = new ProcessStartInfo();
start.FileName = filePathToExe;
start.WindowStyle = ProcessWindowStyle.Hidden;
using (Process proc = Process.Start(start)) { ... }
^ shows no cmd prompt window at all.
when you call exe from another app
 
6:06 PM
:whistles:
 
6:45 PM
So, what would be the proper way to do:

public interface ILogger
{
     void LogMessage(ILog log);
}

In an application?
 
Not sure what you are asking
There isn't anything wrong with that code that i see
 
Well, how would I properly declare that, I've never added an interface to an interface before.
 
@Greg something like:
public interface IMessage
{
    string AsStringRepresentation();
}

public interface ILogger
{
     void LogMessage(IMessage log);
}
 
I keep receiving an error @ReedCopsey
 
what's the error?
 
6:57 PM
@ReedCopsey I may have sorted out the error, but I have a couple of questions.
How does that provide additional flexibility? As the log can be ever changing?
Or is something like this what you had in mind:
    public interface ILog <TInput, TOutput>
    {
        TOutput Log(TInput input);
    }

    public interface ILogger <TInput, TOutput>
    {
        void LogMessage(ILog<TInput, TOutput> log);
    }
 
It allows you to pass a different logging implementation into your functions
The second one seems a bit over the top
 
There is also the possibility of additional information provided by implementors of IMessage, that certain loggers can access
That seems a little anti-pattern though
 
@Greg Well, in your original code, you were always logging 3 things? ie: a name + value + time or something
this lets you change it to log other types of information, without changing the logger
 
@ReedCopsey Yes, the account, priority, message, and date.
 

« first day (1496 days earlier)      last day (3454 days later) »