« first day (2245 days earlier)      last day (2719 days later) » 

8:01 PM
ha
 
ha......ha........a.........a.........
 
i'm using inproc session with a 65 min timeout for my .net web app and i'm noticing loss of Session data/variables randomly much earlier in the session eg. 15 mins
 
I don't know how to 'ha', maybe I should try something else
Sorry, I'll stop now lol
 
how do i get windows 'quick access' items and put them in list? ex: get.quickaccessitems.tolist();
 
I have an object that I know is an IEnumerable<T> but I don't know what T is, and I need to figure it out. Normally I'd use obj.GetType().GetInterface() but that's not supported in PCL. How can I figure out what the type of objects in the collection is?
 
8:15 PM
exactly
 
@KendallFrey I'm not entirely sure but I think this might be relevant blogs.msdn.microsoft.com/dotnet/2012/08/28/…
 
@im1dermike - When the application pool is recycled from inactivity your session memory is also collected.
 
@KendallFrey - Make a list of every known type in your application and then iterate through them with a try catch testing to see if a cast will work.
 
jesus
 
8:17 PM
lol
 
I don't think that's possible
but even if it was
>:(
 
Haskell could do it.
 
^
 
oh fuck
now I understand how TypeInfo is useful
 
hey guys
 
8:20 PM
@KendallFrey - Did you figure it out? Will accessing the Enumerable in order to look at one of the elements change the Enumerable?
 
But how the beelzebub do I get a TypeInfo from an object
 
how do i get the names of items in windows 'quick access' so i can put it to a list?
 
(as in GetNext has special rules of enumeration)
 
u usally put ur favorite folders in quick access and i want to do something with it, first i need the names that exist there though, i did a google search and got nothing
 
@TravisJ I don't think that's viable either, because polymorphism
 
8:21 PM
0
Q: How do i get the name of each item in windows 10 'quick access' items list and put it on a list?

OzymandiasIn Windows 10 or possibly lesser windows versions, there is a 'quick access' icon that shows up when you have documents folder open on the left side, so I just want to get the names of each item in that 'quick access' list and put it .ToList();, how do I do this? windows quick access image

Put a bounty on it.
 
I was thinking of trying to cast as enumerable, take first item, and then experiment on it
If you like it then you should have put a bounty on it.
@KendallFrey - Is this a good mock? object o = Enumerable.Range(0,10).Select(i => new test());
test is just public class test{}
 
A bit better would be:
object o = Enumerable.Range(0,10).Select(i => new test() as IDisposable);
 
ok
 
In this case I want IDisposable, not test
 
okay so test : IDisposable then
the plot thickens
 
8:25 PM
At this point I'm sick of hearing about PCL
</rant>
I think I might have it
Basically just using obje.GetType().GetTypeInfo().ImplementedInterfaces
GetTypeInfo is an extension method, which explains why it wasn't appearing
hooray, progress!
 
so basically im screwed
 
@TravisJ I have the app pool's idle timeout set to 0
 
@KendallFrey - Did you solve it?
 
That specific part of my problem, yes
 
@KendallFrey - I see 5 interfaces in the implemented interfaces list
 
8:38 PM
one suggestion i saw for this is to change the session state from InProc to StateServer or SqlServer. thoughts?
i'm unfamiliar with them
 
@AdanRamirez that question was asked 20 minutes ago. Patience. If it doesn't get an answer put a bounty on it.
 
It's also interesting to me that user and you apparently had the same question at the same time.
There you go. Closed as a dupe. tl;dr you can't stackoverflow.com/a/30189850/1015495
 
i have 2 accounts, and yea i saw a link for a similar question
thx:3
 
@AdanRamirez while there's nothing wrong with having 2 accounts, if you use them for sock-puppet voting you can expect....not good things to happen. Just FYI
 
8:43 PM
hey one thing, my question is different, first off, i dont want to put folders in quick access, i want the names of each quick access item
theres a diference, not fair that they thumbs down and mark it as duplicate
 
The answer to your question is in the other question.
Duplicate questions aren't a bad thing.
 
Hello every one
 
ah i see, okay
 
oof. looks like there is a 15% overhead for access data in StateServer process
 
I have a problem with my action method as it keeps throwing an exception of the parameters dictionary contains a null entry for parameter
I can show the code if needed!
 
8:51 PM
code or it didn't happen
 
Hi Jarvis
lol
public ActionResult Details()
{
//fetching user identity
var userid = User.Identity.GetUserId();
//Filtering on db using the wehre method
var checkAccount = db.checkAccounts.Where(usersId => usersId.AppUserId == userid).FirstOrDefault();
return View(checkAccount);
}

///Only Admin authorised to access
[Authorize(Roles = "Admin")]
public ActionResult AdministratorOnly(int Userid) //Int id to identify the checking account
{
if (ModelState.IsValid)
{
//Find method on the DB set
var AdminCheck = db.checkAccounts.Find(Userid);
the error in the (int Userid) in the administrator only action method
 
Next time, a simple
public ActionResult SomeAction(int Userid) <- this is null
would suffice
 
        @Html.ActionLink("Details", "AdministratorOnly", new { id = item.Id })
 
Whatever is posting to that is not doing it right
Ah, there you go
The names must match
@Html.ActionLink("Details", "AdministratorOnly", new { Userid = item.Id })
 
you mean in the item.Id
right
 
8:56 PM
The names you use in your client view (the browser page) must be exactly the same as the names used in your server side action methods.
 
We're using Entity Framework in an MVC app, code-first. Is there an add-on for MVC to generate the non-EF models? These are sometimes called "view models" and contain the same fields as the EF models but also have non-database related stuff that's specific for the view.
 
ah right! Sorry I am still learning the MVC
 
@Alex - Look into using "automapper"
 
Thank you Jarvis , it worked perfectly!
You don't mind me call you Jarvis
 
Not really, no. At least the intent is friendly
 
8:59 PM
Phew, appreciate your help :)
 
@TravisJ I've heard of Automapper but wasn't sure how it works. Does it generate the files for you?
Hmm. Yeah, Automapper looks promising. Is there any way to auto-generate the basic "view model" classes from the EF models?
 
In the latest topping of shit for 2016, John Glenn died.
 
GOD DAMN YOU 2016!
 
He seemed like such a gentle soul. Ed Harris played him in "The Right Stuff"
 
Ed Harris is killin' it in Westworld
 
9:09 PM
I met him briefly at a black tie event at the Air and Space Museum. 100th anniversary of the Wright Brothers flight
 
Wow, that must have been interesting.
 
From what I'm reading, you'd have to use a t4 template to generate the view models from the EF models
 
Not sure why you would want 2 models that both have the same properties.
 
The company I was working for at the time did some of the kiosk displays. I was working on a glider flight sim, but it ended up not being used.
 
@TravisJ Some info on VMs: dotnettricks.com/learn/mvc/…
For us, it would be extra properties we'd want that are strongly typed, such as a list of something that's not on the controller. We usually pass that stuff using ViewBag, which is a nasty way to do it
And that property doesn't make sense on the EF model itself, because it's not on the database directly. It might be a SelectList of some stuff we need to pass to the view
More on VMs in MVC here: stackoverflow.com/a/11074506/177416
 
9:31 PM
That answer employs bad practice imo
 
What is best practice for doing what I described? You have some SelectLists that you'd like to pass to your view but don't want to resort to ViewBag.
 
9:48 PM
Is it possible to get JSON.NET to add type information for things like Guid? Right now it's deserializing them as strings, even though I have type names enabled
 
@Alex - Do you know that the ViewBag is the holder of the @model? Anywho, I would just make something that was a simple holder for the select lists, since all you really need is an id and a piece of text to make a dropdown. Beyond that, model binding in general is rather straightforward and tends to get overengineered for some reason. All it is is a set of key value pairs. Make broader or more reusable wrappers with names that are not domain specific.
 
10:02 PM
my edit actions methods are doing absolutely nothing!!
[HttpGet]
// GET: CheckingAccounts/Edit
public ActionResult Edit(int? Id)
{

var AdminCheck = db.checkAccounts.Find(Id);
if (AdminCheck == null)
{
return HttpNotFound();
}
return View(AdminCheck);
}

// POST: CheckingAccounts/Edit
[Authorize(Roles = "Admin")]
[HttpPost]

public ActionResult Edit([Bind (Include = "Id,AccountNumber, FirstName, LastName, Balance, Telephone, CheckingAccount")] CheckingAccount checkingAccount)
{

if (ModelState.IsValid)
{
db.Entry(checkingAccount).State = System.Data.Entity.EntityState.Modified;
 
Is the modelstate valid?
Using breakpoints is very helpful in these situations
 
tried to run an update but what do you mean by valid?
 
if (ModelState.IsValid)
If that is false, then nothing happens
 
oh yeah, sorry yes, its valid but after pressing the button save, nothing is rendering
and stays at the edit page!
 
set a breakpoint
 
10:05 PM
ok
 
look to see where the execution goes and what values are being worked with
start at the modelstate if statement
 
ok dokey
I've got this error: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
 
in your breakpoint environment, you should be able to use your mouse and investigate what the values are in the viewmodeldictionary that the modelstate examines
 
anyone know how to access attributes on a viewmodel property that has an editortemplate associated to it?
I've got a [Remote] attribute on a string property on a ViewModel but I'm not using the traditional Html.EditorFor and need to access the values/html attributes that are created by the [Remote] attribute but inside the EditorTemplate.

I have access to the ViewData but I can't see any property on that which gives that.

http://stackoverflow.com/questions/41049500/accessing-the-remote-validation-attributes-in-an-editor-template-mvc-5
 
10:22 PM
I've got a red x on this: HistoryContextFactory = The function evaluation requires all threads to run.
 
I think you may have traveled down the wrong rabbit hole :P If you inspect the ModelState itself, its properties should include the keys it is looking for along with any problems that cause exceptions or invalidations.
 
@TravisJ is that directed to me or Dodi82?
 
I think it's for me
 
^
 
shall I comment the ModelState and where do you think I could put the breaking point?
 
10:38 PM
@Dodi82 - Put the breakpoint at the if statement, and then hover over the ModelState and look at its properties. In there should be all the information you need
 
:)
im getting drunk and eating fried chicken
you know you're jealous
 
IsValid = false
Luck u Steve. I am feeling ill because of the Edit action method
 
Yeah, luck you Steve.
Luck on outta here.
 
10:53 PM
@Dodi82 - No, not the Invalid part, the other part. The ModelState just before IsValid
You can hover that and look at all of its properties. While IsValid may be one, the key value pair for what it expects is also present
@SteveG - Sounds good to me, hopefully you stick to one type of alcohol so you don't have a headache tomorrow :)
 
lol yeah
i found this really good beer
well, i think it's alright
but it's named
Devil Dog
so i have to think it's the best
 
Hoo-rah
 
:p
 
hah :)
 
hello all
 
10:57 PM
@SteveG - I like Stouts. They can even double over for dinner replacement with all those calories
 
oh i do too
 
@mikeTheLiar, John Glenn never existed
 
delicious
 
Although, maybe that wasn't the type of beer you have. The first result in google for devil dog beer was an oatmeal stout so I naturally assumed that was what you had :P
 
yep
XD
 
10:59 PM
Not that it really matters though right? Beer is beer :) except for hefeweizen :/
 
nooo it totally matters
i can't drink bud light anymore, so gross
or bud light lime
or miller lite
basically, i hate non craft beer
 
I avoid it as well, unless I am like at a large party in the hot sun or something, then light beer can be okay
This is my all time favorite at the moment:
oops, bot failed
 
oh, thats way too low alcohol % for me :(
it looks good
but, if it doesn't have like 8 at least, i get full before i get drunk
 
Usually pair it with some sort of whiskey :)
 
i should
i really, really like captain morgan, private stock
but i drank captain for so long, my tolerance is way up
to the point where I'm buzzing now on 2 beers, and it'd take me 1/2 a fifth to get this buzzed off of captain
 
11:03 PM
They make beer that is like 120 proof
Basically it gets frozen after it is made into beer, and then all of the ice is removed.
 
freeze dried beer
 
lol thats like
not beer
 
astronaut beer maybe?
 
i remember this strong beer
called
XXX
i'd google it in here
but you know, porn would show up
 
imagine if the ISS had, in addition to hot and cold water dispensers, an ethanol dispenser
 
11:06 PM
i so want to try poutine
 
lol
in JavaScript - bringing back connorspiracies. , 13 hours ago, by Madara Uchiha
Note to self: If you want to reach the TypeScript repl, do not google for "ts playground".
 
@SteveG Yeah, but that's like, just your opinion, man.
 
lol
 
11:31 PM
HEY, any of you want this hot dog i found in a Macys bathroom garbage can?
 
is it a burger king hotdog?
 
11:47 PM
Would you like to know more?
 

« first day (2245 days earlier)      last day (2719 days later) »