« first day (1913 days earlier)      last day (3255 days later) » 

user47589
00:58
kowabunga dudes
lol
o/
 
3 hours later…
04:27
Anyone there?
04:55
no
shh, you are giving us away
05:48
@torvin Lurkers gotta lurk.
06:38
Can we configure windows store to work within an intranet network? What would we need?
What would the windows store "server" be?
@deostroll A local on-premise store? I don't think so.
That would probably go against what they're trying to do with the store, which is to create a mobile-like closed ecosystem.
Okay then the hard question follows...how to have another software install other software?
You want an alternate app store, like the one Amazon has for their Android devices, I assume.
yep
what does amazon have?
Look at gaming platforms, like Steam or Origin. This is exactly what they do.
@deostroll Amazon has their own AppStore, since their Android based devices don't license Google's platform apps like the Play Store.
"Installing" an app is basically copying the app's files + creating shortcuts + registering it the registry for it to appear in the Add/Remove Programs screen. Your app could easily do it.
Even simpler if you bundle your app as an MSI doing all the work, and your "Store" simply browses a repository of MSIs on a remote server, downloads them and launches their installers.
06:48
yes, but it has to install silently...msi's are usually gui based right?
Not necessarily. There's a standard option for silent installation.
Unless an MSI was specifically constructed to prevent that, it should work out of the box.
07:24
morning, people
clarified
Annoying nitpickers: 1. Rest of the world: 0.
gah.
I hate MSSQL
I just 'lost' the content of two entire tables.
One hour everything is there, next -poof- everything is gone
no Statements, no log entries. Nada.
08:00
Plan for today:
1. Fix code in module.
2. Ensure code works.
3. Check in working code.
4. Refactor and rewrite the living *shit* out of code in module.
5. Ensure new code works.
6. Check in working code.
Good morning everyone
why not skip 2 to 5? @AvnerShahar-Kashtan
@SteffenWinkler Because it's a terrible mess right now and needs to be refactored, but first priority right now is to have it checked in and working so other people can depend on it.
Then I'll refactor it so future changes won't be as painful as what I'm doing now.
well, have fun with that.
I probably will, actually.
08:09
mroning
@scheien morning
I'm getting "Object reference not set to an instance of an object" when I edit Identity User, hmm
It keeps pointing to " @foreach (var item in Model.RolesList)"
This happens when I click on Update button
@CodeMaster Does RolesList contain a null?
No, I've got 3 roles and it loads all of them but as soon as I try to update something this pops up.
I'm not very experienced with Razor/MVC, but I'm guessing there's a binding inside your view to a proprety inside the Role, and that property is null.
08:16
This is my view:

<ul class="collection">
@foreach (var item in Model.RolesList)
{

<li class="collection-item">
<div>
@Html.Label(item.Value, new {@class = "f-12 w-300 control-label", @for = item.Value.Replace(" ", "")})
<a class="secondary-content">
<div class="togglebutton togglebutton-material-blue-grey">
<label>
<input type="checkbox" name="selectedRole" value="@item.Value" checked="@item.Selected" class="md-checkbox" [email protected](" ", "")/>

</label>
</div>
</a>
</div>
</li>

}
</ul>
during initial loading everything works as expected but it seems during the Update action something is null, but I can't find that...
Haven't done enough MVC code to be familiar with the nuances of razor binding. Sorry.
@AvnerShahar-Kashtan no problem, thanks for looking at it.
@AvnerShahar-Kashtan but what about the uninstaller? How to do this via registry?
@deostroll The same. Make sure your MSI's uninstall scripts work. Then you can get the ProductId guid via the registry and call MSIEXEC -U with the ProductId.
08:35
Hey folks, Anyone here familiar w/ using Service Buses? I'd like to better understand the anatomy of a system that users services buses. Is it a bunch of websites, or is it your main website then a bunch of .net CLI apps that are constantly running / working and processing events. How do i think about what this sort of a system might look like?
@MarkAlanEvans Service Bus is a pattern that can be implemented in various technologies.
Uhm.. you have code that puts things on the bus, and code that pulls things and processes them. It's just a producer/consumer pattern.
But does that mean it is up to me to figure out how to "run" these consumers?
For instance, you can have one system be a web app that users access via their browsers. Another is a Windows app that communicates with a web server via service calls. Both of these might access the service bus, which might be implemented as a Windows Service somewhere, or as a WebApi service endpoint, to send and receive data.
As far as individual modules or applications are concerned, the service bus is a service they access for publish/subscribe operations.
So if i'm trying to equate it to a background worker system.
For example a basic shopping cart site.
An order is placed. Lets say that triggers and even OrderPlaced
And i have 2 consumers of this event.
One that actually handles placing the order. and one that is just used to update some KPI / metrics system.
Perhaps we call it OrderPlacer and OrderLogger
08:42
Right.
Neither of these services are API's. Well they don't need to be.
And the concept of a service bus is that we don't need a logical location.
We just need a message
The API here is within the messages. The shopping cart publishes an "OrderPlaced" message. Subscribers listen to this specific message.
@MarkAlanEvans Another good example would be an inventory system that can trigger an order via a B2B system to the vendor.
Right. Ok, the subscriber in this case the OrderPlacer is listening for the OrderPlaced event/message.
Where is this OrderPlacer code running & watching?
The above is the part i'm confused about.
It depends. Could be a Windows Service polling the bus every x seconds. Some service bus implementations could implement a "subscription" as "Here is my REST callback URL. Please call it whenever my subscription is updated".
In which case the subscriber's method is called when the subscription is pinged.
OK. Cool.
That is what i'm trying to understand better.
the mechanisms for separating out our code / logic
I'm mostly familiar w/ the background job / HangFire concepts. Jobs / Queues etc.
08:48
You might be using the service bus pattern internally. It could be a service that various modules inside your process subscribe to.
You first have to ask yourself; Is it necessary to separate it?
Let's assume it does make sense.
In my initial project, i'm considering it for an Eventing system.
That's quite an assumption. :P
Ideally we could implement this to send events to services like MixPanel.com or Segment.com
I just need help visualizing the mechanisms / that are polling
or in your above note, it could be an API service.
The problem we are also trying to solve is backgrounding much of the work.
Events, Emails, Notifications.
So what are the more typical methods to have code that subscribes ?
@MarkAlanEvans What is your application infrastructure? Web?
08:54
.net MVC
Azure
EF is being weird.. >_<'
So i was looking at (NServiceBus or Nimbus ) + Azure ServiceBus as the libs & core. But I just need a better understanding of where all the code should go.
I can easily see in my Web App where i would "Publish"
webjobs is where you run background tasks in azure normaly isnt it?
But the "Subscribers" and how best to do that is still vaque.
Hello and Morning... Another day without anything to do at work xD
08:58
@AlexL it's one place.
or it could be a logic app
@AlexL if i just had a VM.
What would make the most sense?
a CLI APP that is just running and polling? :)
@MarkAlanEvans Better a Windows than a CLI app if you're running in a VM.
More reliable. You could set it to auto-start if the VM reboots or if it crashes.
Sure. But do you guys see what I mean, the solution for this "subscriber" is not clear to me.
Is that what I need to do? Build a Windows App ?
@MarkAlanEvans as far as i know Azure ServiceBus is simlar to RabbitMQ so, you have some apps (the subscibers) connect to it and sub to a topic when you publish something to that topic they run some code
09:02
From the docs ive read, breaking your system up into lots of little services each publishing and subscribing to events is really intriquing
@AlexL but what sort of App?
where does it run?
Do i create lots of little apps that are in charge of handling different types of things?
@MarkAlanEvans on a VM or a logic app or where ever you can get it to run
a raspberry pi could work
i think logic apps are where ms are thinking you will run this sort of stuff
i mean its literaly for "Automate business processes"
Hmm. ok. Well i can add that to my list to review then.
Azure Logic Apps do seem to be the right tool. You link them to a trigger (which can probably be easily integrated with a service bus event), which then performs their logic.
09:06
Ok. So i'll dive into that and see if that is the right solution being that i'm on Azure.
But if I was just using VM's
And we are talking about common/best practices
Is it a assumed that it is just an app, that is running, be it Windows App or CLI app that is just polling?
Or is the app running always, and by "Subscribing" its essentially like listening on a port and so messages get sent directly to it without polling.
@MarkAlanEvans Depends on the service bus you're using.
Intuitively, I'd say the service bus is passive and it's your subscriber's job to poll.
But I can certainly see value in an active/callback-rest-call model of raising subscription events.
09:11
I think it depends on the message you are sending
Emails. Follows. Metrics. Scheduled events to process large amounts of data.
Could even by Credit Card Charges.
I've read enough about the concept that i get the idea, but implementing it for production I can't really find any good docs around what this should look like.
It's like everyone understands it from a conceptual perspective, but actually using NServiceBus or Azure Service bus, and organizing the code & the apps around it, it's just a few folks.
Any other last thoughts or recomendations?
09:30
@MarkAlanEvans for metrics i wouldnt send data in rhe message i would inform the sub that there is data and let it get it mainly to get round lossed messages, but there may be better ways
09:46
morning @SteffenWinkler
@scheien dude. Lag!
nah, meeting
hehe
10:01
can anybody help me with this question:
Can you launch the sql profiler and see if\what sql statement has been issued? — Martino Bordin 1 min ago
@scheien Hello
Hi @CodeMaster
@scheien can I ask you a question since you helped me once regarding the same matter?
Sure, just ask. If anyone can answer, they will :)
Thanks, I'm trying to edit the Identity User. I don't get any error message on the initial page but as soon as I click on Update I get the following:
Object reference not set to an instance of an object.
@foreach (var item in Model.RolesList)
I'm the following the same rule as the Identity Sample file
10:08
Is your model fully populated?
I've got this inside View:
@model EditAccountViewModel
Everything loads as expected but as soon as I hit Update that happens.
@foreach (var item in Model.RolesList) is it that line that throws the exception?
yes
I've got this inside ViewModel:
public IEnumerable<SelectListItem> RolesList { get; set; }
How do you assign a value to that within your controller action?
Q: are vsto files recognized universally on windows machines? Or does it require MS Office to be installed?
10:11
RolesList = RoleManager.Roles.ToList().Select(x => new SelectListItem()
{
Selected = userRoles.Contains(x.Name),
Text = x.Name,
Value = x.Name
}),
If you debug, does it assign a value, or is it null?
I think you also can put that ToList() after the Select(..).
So that it is RoleManager.Roles.Select(...).ToList();
maybe you can even drop it (ToList()), since your using an IEnumerable
but you need to step the action, and see what it assigns to the RolesList property first.
This is the Debug result
http://i.imgur.com/iYx1Nhf.jpg
No, that is the exception.
10:16
oops
let me try again
You need to step the code, and see what it assigns to your model in your controller action.
@scheien You mean I should put a breakpoint?
Yes. Exactly.
@scheien So I should put it where it returns, correct?
yes, you can do that.
Then your model would be fully populated, I presume.
10:20
@scheien Under Locals (VS) I have userRoles
[0] "Ultimate"
[1] "Administrator"
These are the roles that I have assigned to my user
Yes.
What does RolesList contain?
Anybody here know how to easily pad/clip an bitmap image?
@scheien hmm, There is no RoleList in Autos or Locals
@scheien it's crazy
@scheien Null
I couldn't see the RoleList, so I did the following:

var getRoles = RoleManager.Roles.Select(x => new SelectListItem()
{
Selected = userRoles.Contains(x.Name),
Text = x.Name,
Value = x.Name
});

--------------------------------
RolesList = getRoles
--------------------------------
Then I was able to see getRoles with Null value
10:42
This RoleManager, is it part of the Identity management?
class A {
  public virtual B B {  get set; }
}
class B {
  public string Name { get; set; }
}
db.Delete(instaceOfA); // should also delete B
In EF, how do I model that relationship so deleting A also deletes B? :/
I tried with WithRequiredDependent but it doesn't make a proper db
.WillCascadeOnDelete(true);
or change the settings on the actual db table to cascade on delete
35
A: Entity Framework (EF) Code First Cascade Delete for One-to-Zero-or-One relationship

hutchonoidYou will have to use the fluent API to do this. Try adding the below to your DB Context protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Entity<User>() .HasOptional(a => a.UserDetail) .WithOptionalDependent() .WillCascadeOnDel...

I tried that. Doing it like that generates an invalid database.
No reference from A to B at all anywhere in the DB.
10:54
bogus
EF is a dark art, isn't it?
I hate EF.
@scheien How can I find out?
I have this inside my controller:
http://pastie.org/private/qu3gkjouwbqbh50t90xibq
11:14
@Squiggle It generates A without a reference to B. Great.
wtf :-/
Well. With Optional it does.
Now, anyway.
I want it required.
I should dump EF and start using Linq2db honestly, EF is freaking me out
Still, this should work.
Good lord this shit is horrible
11:31
Anybody know why the code using (Graphics gr = Graphics.FromImage(ScaledImage))
{
gr.DrawImageUnscaledAndClipped(ScaledImage,new Rectangle(hscroll,vscroll,ScaledImage.Width-1,ScaledImage.Height-1));
} gives me a blank image when hscroll and vscroll are not 0? This is with ScaledImage as a bitmap of size 512.
Q: are blobs supported in sql server express?
11:42
Feels pretty good to be the all round guy at work. Can help everyone out with anything pretty much
Anyone here where experience in capturing mouse wheels?
Afaik it's just an event you need to listen to.
@scheien I just started to bypass some fields to find the main issue and so far I have this error:
Non-static method requires a target.
var userProfile = await db.UserProfile.FirstOrDefaultAsync(x => x.User.Id == user.Id);
11:58
@scheien which one? When I set it up as this.pictureBox.MouseWheel it isn't recognized and none of the other mouseevents I see are relevant.
You have attached it?
Might be that the message goes to another control, the one that has focus, which might be something other than the picturebox.
@CodeMaster You can't fetch the userprofile?
@JakobMillah yeah, that's nice :)
@RoelvanUden I did that then found that Linq2db freaked me out and just used dapper
@scheien At first when page loads with Id, I'm able to fetch everything but as soon as I hit Update things start to act crazy.
@AlexL I like compile-time checking
@CodeMaster Have you retained the values you need when performing form post? Like relevant ids? and sending them as hidden values.
12:08
@scheien I have the following: this.pictureBox1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.Zoom);
which is not autocompleted unlike any other (but does compile) and when I attach a debugger to zoom it is never triggered.
http://pastie.org/private/ub6cnpkbo4mtta7b1hlbbq
It's line 65
@Thijser: Might be that some other Control has focus, rather than your picturebox.
I've got this inside View
@Html.HiddenFor(model => model.UserId)
:28051328 Is this winforms?
@scheien any way around this? I have my mouse on top of the picturebox and just clicked on it.
12:10
What if you try to attach the MouseWheel on the form rather than the picturebox? Does it make any difference?
@scheien ah yes that does work (why?)
It's because the WM_MOUSEWHEEL from the mousewheel is sent to the Control that has focus, and that is probably your form, and not your picturebox.
You could maybe trigger focus to your picturebox on MouseEnter/Leave if you want to attach the event on the picturebox control.
9
Q: How to capture mouse wheel on panel?

Miko KronnHow to capture mouse wheel on panel in C#? I'm using WinForms EDIT: I try to do it on PictureBox now. My code: this.pictureBox1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseClick); this.pictureBox1.MouseWheel += new System.Windows.Forms.MouseEventHandler(...

as reference
@scheien I'm really getting crazy
Hey guys!
I'd like to get the name of a property as a string. In C# 6 you can simply do 'nameof'. This project i'm working on however uses C# 5.
Can someone tell me how to get the same result in C# 5?
12:26
@CodeMaster: Does it still return null in the getRoles / RolesList?
@scheien let me check
@scheien When I put a Breakpoint then I should look at Autos and Locals window to find something?
@ActionHank Can't
Except maybe for [CallerMemberName]
@CodeMaster I usually just hover the property I'd like to inspect.
@scheien Great, it's still Null
@KendallFrey what does [CallerMemberName] do?
12:31
look it up, it's pretty specific
compared to nameof
@scheien It's weird, it returns the SQL query when I hover over RolesList
Yeah.
@scheien Is it normal?
expand the tooltip, so that you can inspect the other properties.
@scheien Other properties have the correct value
12:33
yeah, it's a EF thing. So that you can see what sql it has generated for that particular linq query.
will try this, thanks
What are you trying to do?
@scheien hmm, because other properties show either the firstname, gender or UserId but RolesList is query.
@scheien var userProfile = await db.UserProfile.FirstOrDefaultAsync(x => x.User.Id == user.Id); returns Null
@KendallFrey I want the name of a property of a Model class as a string, to put this in some Jquery selector
@ActionHank Probably just have to pass it as a literal
12:41
so if you have 'Address' as a property of a model (we're talking MVC here, btw), I'd like to have a jquery selector named $("#Address")
@KendallFrey yeah, what exactly do I need to pass then? because passing @Model.Address gives me the value of the property, not the name.
> as a literal
literally this: $("#Address")
oh.
right.
If this property ever changes name though, my JS will be broken
That's what I was trying to prevent
can I test if a Trigger is firing at all?
for example, I've a trigger that should fire when the mouse is over a MenuItem
it should change the foreground color to black
but nothing is happening on mouse over
13:14
morning
Did I ever mention I hate Entity Framework before?
@RoelvanUden but do you hate it as much as @KendallFrey hates TFS?
Whats better to use; absolute or relative links to other pages in the html behind a website? or does it depend?
what technology? I like MVC's Url.Action
@Html.ActionLink("Edit this resource", "Edit", "Resource", new { id = resource.Id }, null)
@Squiggle I think so, yes.
13:25
Generally speaking, relative links are more flexible, allowing you to treat your website as a closed unit that can be moved to a different location easily.
Whether these relative links are "proper" HTML relative links, or (as @Squiggle suggests) links generated by your framework is irrelevant. In both cases you specify the relative resources, and let the framework (browser or @Razor layout engine) expand it.
Hmm. I wonder if asking about Razor syntax in chat keeps pinging people.
Thank you
@AvnerShahar-Kashtan I think only if they've visited the C# chat in the past 30 days or something
@AvnerShahar-Kashtan what is your thought on this, The way my supervisor has our website set up is with a Site project that has multiple pages, but some of the pages link to MVC projects. This makes it very difficult to maintain a coherent layout (think navbar, and links). For each MVC project, I must copy the layout code from the site project anytime it changes. And since the MVC Projects are separate from the site I have to use absolute links between MVC projects and the site.
It almost seems like they should be placed into the same solution and add eachother as references?
@Michael Haven't worked with MVC much, but it probably has some concept of shared assets/templates, where you can create one project that has partial views (or however they're called) for the shared layout.
However, if the different projects are developed by different people/departments, you might now have much choice except for your manual replication.
good morning, happy monday, blahblahblah is it friday yet
13:34
its all under the same department,
moving a project from CC.NET to TFBuild
get the pitch forks and torches

« first day (1913 days earlier)      last day (3255 days later) »