« first day (2354 days earlier)      last day (2595 days later) » 
04:00 - 12:0012:00 - 00:00

12:09 PM
I'm STILL GETTING UPVOTES on this stupid answer: stackoverflow.com/a/9646739/785745
 
shall i downvote ?
just joking
 
@KendallFrey its funny...I upvoted you
 
12:42 PM
banned Kendall Frey for upvote fishing
 
@KendallFrey this looks like:
look at this AWESOME METHOD TO EARN 500$ A DAY
 
...work?
 
G'day! I'm currently trying to create a instance of a Dictionary<string,string> I've got, however, considering i'm receiving "Object reference not set to an instance of a object" when trying to use it I'm guessing it's not sufficient/correctly made?

The call:

Dictionary<string, string> formValues = config.HTTPRequestData.FormValues;

The source:

private Dictionary<string, string> _formvalues;

public Dictionary<string, string> FormValues
{
get { return _formvalues; }
set { _formvalues = value; }
 
@KendallFrey some people are looking for answers, and they think hey this guy is a god upvote
 
12:46 PM
lol
 
@Xariez Something is null. What is it?
 
it still wont work @SebastianL
ah
 
@Xariez where is the error? on this line
`Dictionary<string, string> formValues = config.HTTPRequestData.FormValues; `
 
3 time
 
i didn't knew snowballing was a sexpractic o.O
 
12:46 PM
The error comes when I try to add a value to the dictionary. So for example, when I try to do formValues.Add("1", "MyVal");
 
oh well, that is something new
 
!!urban snowballing
 
Dictionary<string, string> formValues = new Dictionary<string, string>();
do that then add the = config.HTTPRequestData.FormValues; next line
then add your
`formValues.Add("1", "MyVal");`
why is that not formatting the code..
 
So like this? :
Dictionary<string, string> formValues = new Dictionary<string, string>();
formValues = config.HTTPRequestData.FormValues;
formValues.Add("0", "empty");
 
our network config is crap, most pcs are still on static IPs (because the colleague doesn't like dhcp.).
we switched provider, and I got 3 calls that "internet doesn't work.".
 
12:49 PM
ya see what happens might fail
 
Alright, 1s
 
if this is null config.HTTPRequestData.FormValues; it will fail
then you know where the problem is
 
Yeah, same error.
 
ya remove this line
formValues = config.HTTPRequestData.FormValues;
see if it errors again
trial and error
 
So it doesnt return a error, but
 
12:52 PM
but you need the config data
 
I do
Or well, i dont need to read it, really. Just assign stuff to it.
Gonna debug and play around with it a bit I think :D Now that im atleast getting a error free code
 
well now you know whats going on.
so do var temp = config; and see what the value of config is
 
I do indeed.
 
and then can dive into that find whats going on
 
Put it into debugging, the config.FormValues was indeed null
 
12:57 PM
what is the method you are calling assuming it is a MVC
 
What do you mean? config.HTTPRequestData.FormValues ?
 
ya
 
public class HTTPRequestData
{
private Dictionary<string, string> _formvalues;

public Dictionary<string, string> FormValues
{
get { return _formvalues; }
set { _formvalues = value; }
}
}
 
When adding a new record in EF 6 to a table with a datetime column, I keep getting this error, even though the default value for the column is (GetDate()):
The conversion of a datetime2 data type to a datetime data type resulted
in an out-of-range value.\r\nThe statement has been terminated.
If I provide a value for the column using DateTime.Now, it's happy
What gives?
Shouldn't the default value kick in and prevent the error?
 
1:12 PM
136
Q: The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value

CameronI have the following code in my HomeController: public ActionResult Edit(int id) { var ArticleToEdit = (from m in _db.ArticleSet where m.storyId == id select m).First(); return View(ArticleToEdit); } [ValidateInput(false)] [AcceptVerbs(HttpVerbs.Post)] pu...

maybe it will help (1 & 2 answer)
 
G K
Hi all,
I am working on a click once deployment to deploy and update automatically WPF application from a network path. I found the code from MSDN and its works fine but there is a little lag when it tries to update the latest version (for which I was thinking that async might help).

I wanted to know if this following code would be good to go with it or else will there be any best alternatives for a multi-tier applications. Also, kindly suggest me if I can do the update operation in an async way? Is that okay to do it as there is no UI loaded so far, was thinking does Async helps in this c
 
@Alex look at the values between datetime and datetime2 should explain it
@GK your app is taking to long to update with the default click once settings?
 
G K
Yes, so far I am working on a sample demo which itself takes a bit long and was thinking how does it works out in case of my actual application where there are many components involved in that.
Also looking if that code is good to go with it for a click once silent update?
 
because many apps use the default setting and it works well
Magic the Gathering Online is an example if you want to see how it works
lot of Dell apps use click once
 
Wouldn't the GetDate() default value on the column prevent the issue?
 
1:18 PM
many components? you mean the tiers? that are boiled down to a .dll in the end and added to the main project
 
That's what's puzzling me. I'm not passing any value for that column, hoping the default would cover it
 
G K
Yes, they wil be added under my main project. I agree with that. Just I have mentioned it even though it does not make any sense.
 
I think this will solve it:
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public DateTime CreationDate { get; set; }
 
G K
To share if there is any precaution to be taken care.
 
might need to do SELECT GETDATE() AS CurrentDateTime
in the sql procedure
 
1:23 PM
Well, it's just a default value on the column in the table. It's set to GetDate() and works well under other conditions, but EF somehow gets confused
 
meh only shitty questions on SO today...
 
well I got a good one
 
if its not like for example this one ^^
-11
Q: How TO solve this ..?

Nilesh VermaSuppose we have database and have 5 field column like I1,I2,I3,S,F ok. I want to find largest and second largest number in I1,I2,I3 row and average(Largest+second largest) ok. Then I sum S and Average and my final value is Insert or view on F column. please help me how to do that...I am using vis...

 
@SebastianL How do I do a password reset and send password token with UserManager?
this has been the bane of my existence for at least a month
I keep getting No IUserTokenProvider is registered and I have tried every relavent solution on SO
 
1:38 PM
i'm not well versed in asp.net but i would have just generated a resettoken and send an activation link to the user per mail
 
1:51 PM
man
i hate dubstep song remixes
why does every modern america made movie has to have electro/dubstep music in it
 
@Proxy wubwubwubwubwubwubwubwubwubwubwubwub brrwtbrrwtbrrwtbrrwtbrrwtbrrwt
 
yeah
i want to give the new ghost in the shell movie a look
but the music in trailers is so bad
 
@Proxy i hope it'll be good, cause i love the anime :D
 
what would you replace it with
 
the original had such a good soundtrack
 
1:54 PM
they probably can't use that
 
i wonder how much story they packed into the movie
 
seems they can
cause bits are from the original soundtrack
 
Can someone please help: I am trying to improve my coding standards. In the past I have always created my dataservice class as a static class with static memebers accessed via a factory class. Now after getting a better understanding of Dependency Injection, I am wondering if I should be instantiating a class with DP? Anyone have a good rule of thumb for this topic?
 
and then it goes
wubwubwubwubwubwubwubwubwubwubwubwub brrwtbrrwtbrrwtbrrwtbrrwtbrrwt
 
1:55 PM
what the fuck is a movie trailer remix
 
i guess they wanted to put emphasis on the new music
 
i dunno but have you guys seen the new Justice League Trailer
it looks pretty good!
 
2:15 PM
good
 
2:32 PM
What are the cases I should disable lazy loading?
I always find it useful and time saving,
 
@MohamedAhmed basic properties (e.g. int, byte, double, bool, etc)
 
What about this properties?
I use it with navigation properties
 
I'm not entirely sure if this is the right room for this, but I didn't see any others that might work. I have an application I want to deploy to users with automatic updates. But I don't want the users to have access to the exe until after they authenticate with our internal authentication service. Is there an established system (ClickOnce was suggested) that will let me do this?
 
@MohamedAhmed you can exclude those from lazy loading, since they have a simple finite complexity
 
 
2:40 PM
Love XKCD
 
Hi :) I need some cool suggestions :)
@RoelvanUden what do you prefer the most, React.js or Angular.js? :)
 
how about no.js?
;)
 
Hi @SebastianL :)
What do you prefer that most in asp.net mvc? :) I'm using jquery and someone told me it's the old way
and current age, doesn't prefer using jquery at all.
 
i found react to be a bit easier at the start
but i made maybe 2 small prototypes with it
now i'm doing angular 2 for the last ~2 months
its a bit harder to get into
but with typescript it is similar to c#
whatever you chose the initial period is a bit hard
also not that i have not worked with js a lot before
 
2:58 PM
@Proxy I see
 
angular.. does not matter 1 or 2, messes a lot with html, and makes a lot of noise/dirt. I am looking for a framework almost totally detached from html and attaches himself with only selectors. Maybe angular has that capability but could not get it from first sense..
 
yup you need to do the binding between html / ang2
 
Or we gotta have a abstraction over html, expects dependency as angular, but we would easily switch to another framework. Am I dreaming?
 
So, what framework do you prefer @Teomanshipahi? :)
I'm just doing survey what's the better :)
 
@SteveG I wanted to reply back but I got pulled away into a meeting.
I set it up like you described where I allow the user to pass in a URL (and their credentials if they want):

someAPI api = new someAPI("https://someapiurl.com/");
categoryList = api.GetCategories();

I just don't know if its better to wrap the above call in a try catch (Everytime I make an api call) or do the try catch inside the someAPI class and just return empty Lists, nulls, and default values if the exception occurs.

After thinking about it it seems like letting the someAPI class throw an exception makes it easier o
 
3:12 PM
1- try catch if you just want to do anything with ex object. Otherwise let it crash.
2- do not return null, empty list (in case of error) from an API call. Either let it result or throw exception
hiding exceptions from client/consumer will only throw dirt under the carpet, one day it will smell very bad.
 
3:51 PM
@Teomanshipahi thats kinda what I thought :) thanks.
@Teomanshipahi what do you think about the try-catches everytime the api is called by the consumer though?
not very clean? or thats just how it is?
 
I was looking at entity framework and saw the latest 6.x release was over 2 years ago. Is it still considered a go to ORM? I was using Telerik's data access, but it is dead.
 
4:14 PM
@Justin yes it is. EF 6.x vs EF7.x branch in different directions from eachother. While EF7 will likely eventually replace EF 6 (in a few years); it is missing functionality the EF 6 had and is therefore not a current 1-to-1 replacement.
EF 7 was re-written from the ground up to start clean and do things in ways that don't cause the same limitations that EF6 ran into. Thats why they are sort of 2 separate branches from eachother
 
4:45 PM
I'm trying to show my model data using the code below but instead I get a string with the type instead.
@{
string paramValue = item.CTargetedProfiles.Select(x => x.TargetedProfile.AffiliateID).ToString();
}
@Html.DisplayFor(modelItem => paramValue)
IT shows this: System.Linq.Enumerable+WhereSelectListIterator2[Data.Entities.Models.CTargetedP‌​rofileModel,System.Nullable1[System.Int32]
 
what is the type of x.TargetedProfile.AffiliateID
 
@Euridice01 You're doing a ToString on an IEnumerable
Select returns an Enumerable, you're looking for the first right?
so use string paramValue = item.CTargetedProfiles.FirstOrDefault(x => x.TargetedProfile.AffiliateID).ToString();
 
AffiliateID is an int
I can't convert int to bool Ryan for your edit
 
NOpe you can't ;) (I can't edit it either)
Select returns a "list" of items
so doing .ToString() on an Enuerable is giving you the type
You want a specific item from the item.CTargetedProfiles I believe, you'll need to be clear on what item you want through a logical expression:
example:
var profile = item.CTargetedProfiles.FirstOrDefault(x=> x.TargetedProfile.AffiliateID == IdIWant);
 
ok got it
However, I'm not sure what id I want yet
but I will try and find out
lol
 
5:52 PM
Hi guys!
 
Is there a way to give a Html.Partial properties via a Controller?
 
@KevinMaxwell How goes it
 
For example, I've got:

public IActionResult Index() {
return View();
}

But is there any way I could do this? :

public IActionResult HeaderPartial() {
return View();
}

So that I can give it ViewData's etc?
 
Properties?
you mean a Model?
 
I'm trying to implement a form inside Bootstrap Modal (MVC). Inside the Modal I've got a few required fields, when I click on Submit it should display the message but it doesn't. I get the following:
An invalid form control with name='Condition' is not focusable.
 
5:55 PM
IActionResult?
 
Right, so let me add some context
 
@juanvan Hey, it used to be better :)
 
@KevinMaxwell maybe change it to ID
 
I got my pages, Index, About, etc, on a MVC application
 
Ya well all were kids at one point
 
5:56 PM
True :D
 
I also got a .cshtml file that I use as a partial, "FrontPageNavbar"
 
@juanvan I tried with both ID and form and it's the same result.
 
Now I'm planning on looping through a list into a Dropdown Box, so I got a foreach loop in the partial view.
 
can you screen shoot the error
 
But how do I actually supply that Viewdata to the view from the controller?
 
5:57 PM
@juanvan you mean my error?
 
ya
 
@Xariez Are you sending back a model at all?
 
sounds like not
 
MVC stands for Model View Controller. You're controller populates a Model with the pertinent information your View requires.
 
ViewBag data only goes to the Called View it does not tunnel down
 
5:58 PM
You're View contains a reference to a Model type, so when your view is loaded it has access to that model
 
Hmm, so could I just send the data via a model and initialize that in the partial?
 
I wouldn't suggest using ViewBag, TempData, ViewData properties
 
@juanvan the first image is the actual Modal and the second one is the error.
 
can you show the html behind the text box
 
6:00 PM
You're "model" for that view would probably have:
List of Conditions, Source, Treatment Type, Treatment Urgency

bool for Treatment required, access to medical care, medical records provided, ongoing
string Comments
String medical care details
int id;
 
I'm using EditorTemplate
 
@Xariez Create the Model in your controller. When returning the view, return the model object with it
 
Alright, will try to do that! One moment and i'll test it right away
 
the View, which will reference the model, will then have access to the data within the model
<sniff> they grow up so fast
 
@KevinMaxwell the scaffolding
I disagree, I did some 18yr old events over the weekend
 
6:01 PM
 
some emo's were walking across the street stopping to read text messages, I tossed a lighter at them, told them to get a fire under there feet
 
Last "18" year old event my fiance and I went to, everyone thought I was rober downy jr. Only got a few free drinks out of it :(
@juanvan hahaha
 
ya, whats the output html sorry :)
free drink is a free drink
 
oops, i got the posts above messed up, oh well
 
6:03 PM
just not that yellow beer
 
I made some changes during the weekend. Previously I used to have jquery, jqueryval and kendo stuff inside the partial view where the Modal was getting generated and it was working fine but they were very slow due the duplicate loading.
I decided to make a partial view for Modal and include all the js files inside the parent where the layout is coming from.
With this method I save lot of loading time, all my other js stuff function as usual except the validation.
 
Might be b.c of tab index -1
Unselectable = on
 
I changed it now, it's the same
Let me make it more easier to understand:

+ _Layout.cshtml: I've got all the js files
+ Inside the above _Layout, I have @Html.Partial("_Modal")
+ Inside _Modal, I have the html code for Modal + Bootstrap script for opening and closing the modal
+ Inside the partialview where the form is populated, I have html codes + form tag
 
ya it should be find able
 
Not the prettiest solution but will clean up the code later and mostly work for functionality right now, fixed it by in the controller doing
ViewData["GetCategories"] = _context.GetPost().Where(x => x.Category != null);
And in the view doing
@foreach (var category in ViewData["GetCategories"] as IQueryable<CMS.Models.Post>)
@RyanTernier ^
 
6:17 PM
@juanvan, I moved the following code inside the Form
$("form").kendoValidator({
validateOnBlur: true
});
 
ahh was scope
 
It works now, however I get this message
 
don't rattle the snake at the watering hole
somewhere async: false is set?
 
cool loader
 
6:20 PM
yes
I get the message from that js files
It's gone
I had to disable Cache inside Chrome in order to reset everything
once again you helped me @juanvan
Thanks man
 
no problem :)
 
Does anyone know how to play audio clips in a DNX Console App C#?
 
6:36 PM
No but we might be able to help
 
@KevinJensenPetersen DNX?
 
I have have the shortage wrong. What I mean is .NET Core.
I may *
 
would anyone be able to help me with some logic quickly
 
> DNX, a Dot Net eXecution environment, contains all of the code that is required to bootstrap and run an application.
That's not the same as Core, but similar
 
6:39 PM
@RachelDockter I'm pretty good with logic
identity, non-contradiction, and excluded middle
I can name them all
 
im trying to send a file over tcp, so i have to convert it to a byte array but i also want the file name to be sent with it, would i contat the byte[] containing the file name on the end? but then depending on the file name length, the byte[] would have a different lengh so when im recieving it i wont know which bytes contain the name and which one contains the file contents
 
Aw, I was expecting logic
Sounds like you can invent a simple protocol for that
 
i was thinking concat a byte at the end of it containing the lengh of the bytes that contain the file name but it seems more effort than its worth
 
you never put the length at the end of the message, always before
that sounds right otherwise
 
whats before and not at the end?
 
6:41 PM
for simplicity I'd send the string beforehand.
 
because before you know how much to expect
 
if you don't know the length, you don't know where the length data is located
 
ah i see, the end would work just you would have to work backwards to putting it at the beggining would be eaiser
 
guys i need a simple library to play audio files
 
6:43 PM
Join the club Slashy :D
 
with an option to change their play speed
 
Another idea is to send .tar files, and let them take care of file metadata
 
slow playing...faster... any ideas? i've understand Naudio does not support my this kind of features
 
i have no idea what a .tar file is, i was thinking of just putting it in a zip so it keeps the file name but then id have to make a folder, copy the file in, zip it, send it and delete the zip
 
@Slashy Do you want to simply change the sample rate, or do you want to "stretch" the audio?
@RachelDockter a tar is a zip without compression
roughly speaking
it's yet another archive format
 
6:46 PM
oh right, i might look into that then if i cant combine the filename onto the byte array and get that working
thanks for the info btw
 
@KendallFrey would changing sample rate will change the the audio to kind of "Bass voice" or somthing like that? i really dont know much about audio processing so sorry if i got you wrong
i just want to play it slower
 
yes, changing the sample rate will change the perceived pitch
 
no additional effects
oh
 
That is the simplest definition of playing it slower
keeping pitch is an "additional effect"
and it's not very easy
 
okay haha
yeah... i guess
 
6:53 PM
So I suspect most sound libraries won't implement it
 
how does it called? what's the term name for the kind of proccess i'm looking for?
"strech the audio"?
 
If just changing the speed of the original audio files is a possible solution, Audacity can take care of that easily
@Slashy Let me see what it's called in Audacity
 
alright
 
"Change Tempo"
 
okay.. that's the name?
 
6:55 PM
as opposed to "Change Pitch" and "Change Speed"
That's the name of the operation in Audacity
Probably not a great google term
 
okayy
lets begin the searching
:)
 
7:55 PM
@KendallFrey awesome! found that!
 
8:15 PM
Guys, I need a quick help. Does AutoMapper.Mapper.Map() works without an AutoMapper.Profile defined for the involved types?
 
8:49 PM
anyone know how to prevent var x = JsonSerializer().Deserialize<dynamic>(jsonString) from converting things like the ul disc being changed into some other weird characters?
 
9:44 PM
That's always a fun one
it really depends on the character of the ul disc
could you use numbering instead of a disc?
 
10:14 PM
when you serialise a list you get the disc? I did not know that
 
user1804599
10:28 PM
@RoelvanUden lol I found you on bookface since we have @JohanLarsson in common
 
I stalked you both
 
user1804599
10:39 PM
:p
 
user1804599
@KendallFrey I am proud.
 
lol, everyone hates me
 
user1804599
You should get a Haskell job.
 
I'm a junkie
 
user1804599
I have a PureScript job. It's super great.
 
user1804599
10:44 PM
@KendallFrey They're just jealous of your fabulous recursion schemes and profunctor optics.
 
Hi Guys,
Anyone here understand linq?
 
most of us
 
great
so if i make a join with linq the expectable result its like a sql query right?
 
I don't understand the question
 
Can i put some code here to explain better?
 
10:57 PM
sure can, but hopefully not an overwhelming amount
 
List<PlayerCard> C1, C2;
C1 = new List<PlayerCard>();
C2 = new List<PlayerCard>();

C1.Add(new PlayerCard() { CardOne = Cards.ace, Cards2 = Cards.jack });

C2.Add(new PlayerCard() { CardOne = Cards.ace, Cards2 = Cards.jack });
C2.Add(new PlayerCard() { CardOne = Cards.ace, Cards2 = Cards.jack });

IEnumerable<PlayerCard> C3 = (from L1 in C1
join L2 in C2
on new { Val1 = L1.CardOne, Val2 = L1.Cards2 } equals new { Val1 = L2.CardOne, Val2 = L2.Cards2 }
select L1
);

foreach (PlayerCard Cards in C3)
In the bottom, i have what I expect and what this show me. Could you explain to me why is the output repeated?
I execute the same in SQL and returns what I expect....
 
11:18 PM
would anyone know how i can drag a file into a textbox and it display the file path? i tried a dragEnter and dragDrop event but neither of them let me drop files in them
i did it nevermind
 
04:00 - 12:0012:00 - 00:00

« first day (2354 days earlier)      last day (2595 days later) »