« first day (2593 days earlier)      last day (2370 days later) » 
01:00 - 16:0016:00 - 00:00

1:04 AM
I'm working with DS MA500 Biometrics, and currently I can transfer data that has been saved in database by the biometrics. The problem is, what if the network is down, then the data of biometrics will store inside the device itself. This is the I need help part. How can I retrieve the data from the biometrics once the network is up.
 
1:59 AM
@Sea Charp C# doesn't support inheriting from two separate classes (so-called multiple inheritance) though.
 
 
1 hour later…
3:09 AM
I have a string naming a constant in an enum, and I need to pass in the type of that enum directly. So I got the assembly I needed, read through for an enum called PropertyNames, searched through its values for the string I was given, and found it.
Reflector is fun. Let's see if I can solve the rest of this puzzle: casting the int back to the enum somehow
 
@KendallFrey Awesome, I didn't see that method yet. Although I think I solved it anyway.
That said, Enum.Parse simplified my logic a lot too.
 
 
4 hours later…
7:21 AM
ohayou
 
good morning
 
SRJ
SmtpClient m = new SmtpClient();
m.Host = getIPAddress();
m.Port = 52635;
m.EnableSsl = false;
m.Timeout = 50000;
m.Send("sreejith.j@beo.in", "sreejith.j@beo.in", "Test", "This is a test email.....");


hello, why the above code shows time out error ? what is wrong
what could be the issue ? first it showed error in port. i gave the port of localhost
then time out issue
 
8:17 AM
@SRJ The port might be 25
 
8:33 AM
@SRJ first of all, make sure you have a mail service listening, then make sure your server is actually listening on that port, next check whether your server is set to accept SSL encryption (that's important)
 
hey ho
another thing check if the port isnt locked by the firewall
 
8:47 AM
good morning
 
good morning :)
 
9:04 AM
I have made a vid about prime factors kata:
 
9:18 AM
maybe I can improve the for, so there will be no need for reference type variables
 
Oh god, a chat full of nerds.
 
!!tumbleweed
 
Oh god, a chat full of tumbleweeds.
 
we're all busy programming ^^" (at least i hope thats the case)
 
9:29 AM
Hi all
I have a working program that Im switching from WinForms to WPF MVVM
At Winforms, some labels and grids got set at startup
I can not find any information about setting data at startup "the right way"
 
SRJ
thanks @SankarRaj @HéctorÁlvarez
 
My program starts, and retrieves data coming from a JSON
 
@MwBakker bind the label's or grid's content
when model complete, binding do it's job
 
Yes I get this, but sorry I meant to ask where is the location to do this?
app.config?
 
model
 
9:36 AM
The program starts -> Retrieves JSON -> JSON data sets dictionary, list, labels and grid
 
AHOY MATEYS O/
 
Viewmodel?
 
program starts -> creates model -> JSON reading in model -> ViewModel getter using Model's parsed data -> View got it's value
 
I thought Model was just about object and properties, not about containing large methods in its class
 
this way You can give Model's constructor an IJSONReader interface, mock the reader whenever You like, and in the Test You don't have reference to any WPF or WinForms related stuff.
 
9:39 AM
Like Person.cs
Or Car.cs
 
that is a DTO
Model is not just DTO
Model contains the large methods
 
@ntohl and fields
yeah that's the idea
 
Ah alright, then this here is confusing
 
the good old method is binding it on the UML. It works, and I don't see a reason not to do so
 
This is coming from an example solution
Here it is the ViewModel executing the methods
Or the Helpers
So I am confused now
I mean I do get what you say here ntohl, and the process you are describing as well
But why is my downloaded example having its execution methods elsewhere but Model?
 
9:45 AM
dunno. I got lazy nowadays. If it's really simple, than I don't do Model stuff, and just hack it into the VM, but I would move JSON readed label construction into model.
I think the creator of the example didn't grok the MVVM as well
 
grok?
But this is coming from Microsoft dev center called "MVVM Example"
 
"ViewModel: This should essentially delegate everything to the Model except for exposing data for the View.

"
 
Goddamnit so even this example is not at the right end?
 
yeah.
 
I already put a lot of work into having a working WinForm program turn into WPF MVVM
The least I would ask is to finally be at the right end
 
9:49 AM
told You to give feedback early
 
But usually I get into fights, or well... examples not being the actual example
Well I am not that far yet anyhow
The GUI is build, all elements are present with a few bindings
But this initial 'binder' coming from JSON source is one which I dk where to put. But your conclusion is to put this at Model?
Between my DTO classes
 
'binder'? Binding is defined between the layers. It's hard to say it's 'binder' code. JSON reading should be in Model.
 
Meant to say the methods behind them, sorry
 
wait. I will create a sample proj
 
That's very nice of you, thanks
Btw I have a folder called "Processors" that contains a PDFGenerator class and a FileReader class, should these also be in the Model folder to maintain the logical structure?
 
10:01 AM
Models folder usually should contain database models (tables)
in ViewModels you can mix and match those models, add some external helper fields and so on
code logic could (and I rather say should) be in service classes, that are dedicated to work with input and output
it is a bit more work in the beginning rather than just mixing and putting everything into one class, but it really helps, when you work with this project for longer or need to return to it at some point (also counts if anyone else should have to do this)
 
So an example of a service class would be the unzipping and reading files ?
In my WinForms version I have Processors.FileReader that is holding the involved methods, this owuld be considered a service class?
 
yes, doing it in service, would be reasonable, but it also depends a little, since you are having 1 instance of your application running for 1 user at the time, then there is no big problem with using static classes and methods
so you could do it under helpers as well
 
I have simplified the example. In reality it would be much more complex because of the MainWindowViewModel should be INotifyPropertyChanged, and notification is not a factor in the example.
 
@ntohl Gonna have a look on this one, thank you
@Taurib Alright but I am an intern and despite having one user etc I just want best practise. Heck I didnt even had to switch from WinForms but I am determined to learn the right end
So therefor I should put it in Model, right?
 
in my MVVM interpretation, yes.
 
10:16 AM
@MwBakker from what did you switch from?
 
@Taurib semi MVVM WinForms
 
Yes thats true, I have a WinForms application that had a 'UI' folder, 'Processor' folder and 'Data' folder
 
ahh, okay, it's still nice to see people try to learn to do things by practices not just write spaghetti code all the time
 
Thanks but the hardest part is to know when to be at the right end
Without accidently being rude to someone or such
Because basically I trust everybody, but everybody does not always trust eachother when it comes to best practises haha
Im an intern in this company but nobody here dealt with C#, and my teachers tell me they can't interact too much
Which is why I am bothering you guys, I'm sorry for this but I highly appreciate the help so far
@ntohl your example cleared some fog for me, thanks I will keep this one with me along my MVVM route
 
I can't find ANY example like mine, but reading the the definition of MVVM, I can just point out where are all of the examples are wrong...
so be careful on Your path. And I emphasize on that's my interpretation.
 
10:25 AM
It's alright to ask, hopefully you find good people who would answer
There are many different visions about same standards, so take things always with a little grain of salt
 
yeah lots of web tuts on MVVM have bad practices in them
sadly
 
but keep in mind, that not every solution works for you, you need to look what fits for your needs, there is no need to build whole best practice framework, when there is no need for that
 
@KamilSolecki please check the gist, if You have any comments on the example
 
and clean code is always appreciated
 
<3 clean code
 
10:27 AM
I know, but as a student I better now learn the most right direction rather than re-learning later
What I am going to do is take your lessons you guys gave me and just finish my stuff
Have it checked by teacher and maybe some of it on stack
 
@ntohl 15 mins and I will, I'm in the process of spawning child processes :D
I just made the most redundant library ever
 
@KamilSolecki need more overlords?
@MwBakker early feedback -> less rewrite
 
my magical lib's only purpose is to shorten the amount of code needed by.... about 30 lines.
although I'm trying to make it useful somehow
messaging child processes and getting info from them should be implemented
 
@ntohl I know early feedback is preventing less re-writing but it really feels like bothering people like you too much. You sure you don't mind?
 
What do yall think about logging info being spat out to the task runner, and not be application specific only?
 
10:32 AM
@MwBakker I don't mind
 
spat out === message~bussed
 
I don't understand. How app specific only?
 
so I have a multitude of scripts
so I wrote a little script runner/ aggregator that runs them as child processes
now, logging is script-specific for now
I was thinking wether it would make sense to messagebus the logs from the child processes to the task runner
and build a combined log for the task runner
Also keeping in mind that I hope to make the task/script runner somehow useful in the future :P
also, in the paragraph above, task runner = script runner
 
I.. also got another question
 
shoot
 
10:45 AM
Dont want to interrupt anybody though
In my Winforms there is a row of checklist boxes (5 seperated checkboxes)
This is not a checklistbox becuase I induvidually want to cross and disable the text when element not present
Hold on, uploading an image
This result of what is selectable or not comes from a scan, initialized at startup
At WinForms one method was responsible for setting the checkboxes enabled or disabled
The referrences was CheckListBox[] checkboxes
And then it was a simple foreach.. But not with binding at WPF I wont know the right approach
 
You have two ways. Simpler is have ObservableCollection<MyObjectWithMetaData>, and the class have properties about if it's visible/enabled/crossed etc.
than at View, You have a UserControl, which binds these attributes to the view. You can bind to that ObservableCollection, and set the template to that UserControl.
 
So the ObservableCollection<MyObjectWithMetaData> is being 'filled' at the UserControl?
Im sorry if this sounded weird, its hard to transfer from WinForms where I could just 'grab' these elements and for-each the checked boxes
 
<ItemsControl Name="childItemsWillGoInHere"  ItemsSource="{Binding ObsColl}"
Grid.Row="1">
    <ItemsControl.ItemTemplate>
      <DataTemplate>
        <TextBlock Text="{Binding PropertyOfItem}" IsEnabled={Binding PropIsEnabled} />
      </DataTemplate>
    </ItemsControl.ItemTemplate>
  </ItemsControl>
^ basically this, just inside the DataTemplate, I would move the <TextBlock ... part into a UserControl
 
11:00 AM
I haven't learned about user control..
 
13
A: Use a user control as a DataTemplate within a WPF application

JustABillThat DataTemplate isn't actually being assigned to your ListBox. There's three ways: 1: Replace the template in the Resources section with <ListBox.ItemTemplate> <DataTemplate> <local:ucActivityItm /> </DataTemplate> </ListBox.ItemTemplate> in the ListBox. 2: Somewhat related: <

 
Wow you are quick
 
:D
the other way is using templateselector.
 
But I see the comparisment now
IsEnabled = depending on a method
Just as in WinForms the .enabled = true was being 'done' by method
Or am I entirely wrong here
 
so You have an ObservableCollection<object>, and fill it up, with different Type of objects. The ItemsControl or whatever (check out what options You have, for example StackPanel), may have ItemTemplateSelector property, and You can differentiate how should different type of objects look like.
You are not wrong here. Just Your method did manipulate on the control, not manipulate on a ViewModel's (MyObjectWithMetaData) property
You may have a public bool Done {get;set;} in MyObjectWithMetaData
latter version's example is this>
3
A: binding different types of objects to canvas

icebatThere`s a great answer to somehow related question that we can extend to make it work with your problem. Say we have two types that can be dropped to Canvas: public class TextClass { public string Text { get; set; } } public class RectangleClass { public Brush FillBrush { get; set; } } ...

 
11:23 AM
@ntohl I'd say your example is just fine for a simple one :)
 
ok. Thx
 
12:05 PM
I used the Merge function to merge two datasets
DataSet1.Merge(DataSet2)
When I get the new dataset, I get a dataset with two seperate sheets rather than one
How do I resolve that?(edited)

I assumed the columns and cell values in Dataset1 will combine with the one in Dataset2 to give longer columns with more cell values
 
I haven't used Merge yet
 
12:28 PM
I need some non-C# advice, what do you do when people around you seem to be disconnected?
 
@HéctorÁlvarez Start shooting. That usually pumps things up.
 
e.g. people who don't like talking at all, not even 5 minutes in 9 hours; people who are clueless or pretend to be and ignore all your work-related questions claiming they have no idea; people who simply want to be right all the time
 
@HéctorÁlvarez If things are that bad, we move jobs.
 
@MadaraUchiha ...is that a reference to what i think it is?
 
@Kieran Don't think it is, I made it up on the spot
 
12:35 PM
@MadaraUchiha Mkai, I did think it seemed a little dark
 
@MadaraUchiha "That bad"? It's not like I'm being bullied for being an Apache helicopter here... I just get bored of coding after a few hours and need that 5-10 minute breather to avoid roasting myself.
 
@HéctorÁlvarez Know them feels, I usually take a break and check the news or something
Also, if you were being bullied because you are an Apache Helicopter, surely you could just shoot yer missles at them and blow them up?
 
@Kieran With great power comes great responsibility.
 
hahaha
Fair enough
 
So I am at complete loss
Wait, nvm
 
1:01 PM
Is there already any replacement going on for WPF or such actually>
*?
 
Theoretically there's UWP, but I wouldn't be surprised if it died before WPF does
 
WPF is too desktopy. Everything going towards web. So closest one is electronjs.org
 
"Everything is going web" but I hate building websites
I want to focus on desktop and mobile apps in my future
 
@MwBakker it sucks, doesn't it?
 
Yep
Although I am lucky because I like mobile apps
Worked with Xamarin.Forms
Sorry I mean Xamarin.IOS and Xamarin.Android
Anyway as I am consuming time on turning my WinForms application towards WPF I am questioning if its worth the effort
Any XAML replacement going on already or such I should perhaps focus on?
 
1:07 PM
UWP and Xamarin.Forms use XAML
There's ammyui.com if you don't like XML's verbosity
 
No I do like the XAML way of doing things
The main reason for switching to WPF MVVM is because I considered it to be in the direction of the future
WPF may not be, but is at least MVVM?
 
1:31 PM
Anyone tried to rebase a git repo in VS?
it's horrible
 
dude use the git command line
 
i do, but somehow, a few minutes ago, i had the idea, that if VS has a GUI for it, maybe, JUST MAYBE its an improvment.... to the console game
i did not know how wrong that was
 
one does not simply leverage their powerful tools to a third party software integration
!!giphy boromir one does not simply
 
@HéctorÁlvarez That didn't make much sense. Use the !!/help command to learn more.
 
What is generally used more often, MVP or MVVM?
 
1:42 PM
I never hear about MVP anymore
 
And what about MVC?
I know about MVC but I feel like I need to use MVVM, but this is just because I read it
 
MVC is very common in web. I think it's still used somewhat in WPF, though not sure how common.
 
Hello
Can somebody tell me, what is binding?
 
hi turtle
 
:)
 
1:51 PM
@KendallFrey not very, since Wpf is pretty much crafted for use with mvvm
 
So I want to keep working with desktop apps and mobile apps
What is best recommended? MVC or MVVM as future
 
@kame Binding is when one object watches and/or updates data in another object.
@MwBakker I'd say if you want WPF, then go MVVM.
 
I dont actually want WPF per se, but I feel like MVC loses ground on mobile and desktop dev
 
@KendallFrey Thank you
 
how so?
 
1:54 PM
I haven't done any nontrivial desktop GUI recently
Haven't touched WPF in so long though
 
Because MVVM is being presented is THE architecture on the web
 
Really?
 
Its how I experience it
 
huh, I wouldn't say so
 
Talked about it with my teacher as well
But he says MVC is still the going
 
1:55 PM
angular goes well with MVVM
 
DESIGN PATTORNS
 
but ASP NET is pretty much MVC
 
2:31 PM
MVVM on the web? Hell no. It's all MVC for traditional request/response software.
MVVM is popular in SPAs tho.
 
And what about Xamarin.Android or Xamarin.IOS
 
they exist because someone came up with an idea to use Java (or Objective-C) in crucial OS APIs
 
No I mean is MVVM populair here as well?
 
Xamarin uses MVVM, yes. It's popular if you're working on mobile apps with Xamarin and desktop with WPF. Or if you use React/Angular in a MVVM-style. Etc.
(Disclaimer: I don't use MVVM)
(Right now)
 
MVVM is nice, but verbose. But once you're used to it it's not so bad.
Any sane person has R# to do all the typing anyways.
 
2:37 PM
Eh, in C#-land you can use assembly weaving to make MVVM nicer.
In JS you can just use mobx for example
 
Dumb question: any idea why Chrome is demanding authentication when I run IISExpress and IE isn't?
 
Alright thanks all
 
@MattThrower Possibly IE gets a signal that it isn't needed.
 
@WilliamMariager OK - any idea how I can stop Chrome from demanding credentials? I'm not even sure what it wants - offering admin doesn't seem to help
 
No clue. What kind of authentication did you select?
If it's Windows authentication, you could try the username/password for your computer.
Or Guest and no password if you enabled that.
 
2:50 PM
@MattThrower Try wiping your history, maybe those credentials were saved?
 
@HéctorÁlvarez Thanks
 
3:23 PM
In debug mode in the watch list, I'm looking at the DataType of an object and getting this string

{Name = "List`1" FullName = "System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}

How is this different from a List<string>?
 
@Hypersapien It's not
 
if you look at it carefully, you'll find List and String in this listing
 
If I wanted to test the objects that pass through and test if they are a List<string>, and make sure that one comes up, how would I do that?
 
whatever is List<string>
 
What do you mean "make sure that one comes up"
^^
 
3:27 PM
These are the datatypes for columns in a datagrid. I need to make a special case for List datatypes. How would I test for List<string> when I'm getting a datatype like that?
 
You want to see if a type is List<string>?
That would be DataType == typeof(List<string>)
 
Yeah, I tried that. i keep getting a Type Expected error.
 
try{ List<string> troglodyteButEffectiveCheck = <the object you want to check>}catch{/*NOPE*/}
 
good god no
 
3:32 PM
@KendallFrey I'd use this, but I must admit the other function is lightning fast for checking
although primitive technology
 
What other function?
 
how is that supposed to work
 
@KendallFrey the troglodyte check
 
When I do DataType == List<string> without the typeof(), I get false
 
@HéctorÁlvarez Surely is is much faster
 
3:33 PM
it shouldn't compile at all
 
I mean "is"
 
@Hypersapien That's because is is not ==
 
@milleniumbug well, if it's a List<string> the object will be parsed as such (assuming he's reading objects) and if it breaks, the catch will keep you going
 
You're checking to see if the datatype is a list. It's not, it's a type.
6 mins ago, by Kendall Frey
That would be DataType == typeof(List<string>)
This is what you want
 
for starters, is DataType an instance of System.Type
 
3:35 PM
Oh jesus I don't know what's your intent here but it seems overly complicated
 
Your solution? Agreed
 
like why do you need to check?!
 
I meant DataType is List<string>
 
@KendallFrey oh please, yesterday I saw how to do Facebooks "A, B and 2 others" string with all 5 case scenarios in 1 line
 
@Hypersapien That is not what you want
 
3:37 PM
@KendallFrey You don't want to implement that piece of crap in your shiny code, agreed, but it's fast AF.
Also it wasn't a solution, it was a troglodyte check
 
Faster than is?
 
Yeah, I see what you mean
 
I'll believe it when I see it
 
if it has troglodyte in its name, it's out of the question
@KendallFrey I don't think so, but it should translate into few IL instructions
 
I still have no clue how List<string> t = <?????>; is supposed to compile when rhs doesn't have a static type List<string> or derived from it
 
3:39 PM
@milleniumbug It isn't
 
Although DataType == typeof(List<string>) gives me a true
actually ==
 
FINALLY
 
!!applause
 
@HéctorÁlvarez That didn't make much sense. Use the !!/help command to learn more.
 
Right. Sorry. I missed your post above saying that exact thing.
 
3:40 PM
it's one of the few instances where copy-paste just works
 
I tested, and is seems to be at least 10x as fast if it's not a list
 
@KendallFrey so what is it even checking
 
@milleniumbug You have to cast
 
oh right, the cast was conspicuously missing from the code
hence my confusion
 
Make that about 1000x as fast
There's just nothing "fast" about that
 
3:44 PM
side question
what's the point of virtual desktops
 
I don't use them
 
as in virtual machines?
 
I have 4 physical displays instead :D
 
@KendallFrey nope, virtual desktops
 
Thanks for clearing that up
 
3:46 PM
I think he means like a thin client type deal
 
@milleniumbug me too, but i was wondering what's the point of virtual desktops, much faster to swap between applications in a single desktop
 
mr5
o/
 
Is that the name for Windows 10's multiple desktop feature?
 
it's called virtual desktops in penguinland
 
Oh, You mean the most pointless thing in the planet?
 
3:47 PM
if you press the "new desktop" after clicking that, yes.
 
mr5
can you give me an English word to describe "list of users who received the notifications"?
 
I too fail to see any gain from that
 
@HéctorÁlvarez 1. No it's not (for me anyway) 2. Quite often I group by sets of applications, e.g. one for browsing, one for coding, one for gaming.
 
@mr5 There isn't a word for that
 
@Kieran I have 3 right now, they're anything but pointless
 
3:47 PM
unless im misunderstanding
 
Recipients?
 
mr5
@Kieran there might be
 
@KendallFrey pls explain
 
virtual desktops are for separating your workflows, like "I'm programming on this one", "I'm playing games on this one", "I'm doing video editing on this one"
 
3:48 PM
mmkai
That makes sense
 
mr5
@Hypersapien hmm but the user who's already in the list already received the notifications and the others who still don't is still a pending receiver
 
meeeh then it wasn't just me
 
Oh, that's what you mean
 
I take it that they don't save when you shut yer pc off?
 
I don't have my command prompt, vscode, etc. cluttering up my taskbar while I'm gaming
they're in the other workspace
 
mr5
3:49 PM
*desktop
 
You mean you don't game and code at the same time?
Peasant.
 
@Kieran They do, not the applications, just the desktops
 
riterite
 
mr5
give me the WORD plz
I'm stuck at naming my database table!
 
@Kieran I mean that workspaces let me do that without having to manage my applications
 
3:50 PM
mmkai
I might look into that
Would be nice to remove all my dev shit from my taskbar
 
Windows Explorer is a particularly important one
 
important one what
 
I might have 5 explorer windows open at once, but my steam library is open on 3, my coding project is open on 2, and my downloads is open on 1
So if I want to see all the folders related to what I'm coding, I switch to 2
 
ah
 
mr5
wat
you still don't have that tech in Windows?
 
3:53 PM
no, its in windows
 
Yeah, Windows 10 added it
 
mr5
OSX cough
 
OSX barf
 
I used it before though and I'm so glad they added it
 
OSX is trash
 
mr5
3:54 PM
HOLISHITE!
THE WORD I'M LOOKING FOR IS NOTIFIED_USERS!
 
lmao
 
mr5
you peasants!
 
oh wow
 
!!define notified_users
 
gotta go for today, cheers
 
3:54 PM
later dude
 
You said "word". That's two words.
 
@Hypersapien technically its a word. Seperated by an underscore not a space
 
mr5
eh. I mean noun ^^
 
01:00 - 16:0016:00 - 00:00

« first day (2593 days earlier)      last day (2370 days later) »