« first day (2663 days earlier)      last day (2285 days later) » 

12:27 AM
Anyone still using crystal report? Please help.
There is this old program that needs to revive but it is still in vb6. now im having a problem in dependencies, due to crystal report 13. I already installed cr13 but the dlls still not available.
There is this old program that needs to revive but it is still in vb6. now im having a problem in dependencies, due to crystal report 13. I already installed cr13 but the dlls still not available.
 
 
4 hours later…
user5500750
4:51 AM
Could a List have a null value?
 
user5500750
Can I put a null value in a List? Many areas in my app could fail if they a null so I just want to double check.
 
5:27 AM
So to understand this properly
A monad is an abstraction of a simple type to elevate it to have certain extra abilities
And it is wrong to think of a monad as simply a wrapper as it is more like a composable
That we are meant to use without decomposing outside of its implementation
We can use monads to serially execute code
And we can also use monads to monitor or inspect each stage of execution enabling us to do stuff with what is being executed
And also allowing us to return early and stuff
Essentially, monads are a means of using a common cause or a common effect to achieve a conception of the state of entities or if I may put it, monads
The link back to category theory often does not help in understanding monads but what I found helpful is reading the background material that category theory uses from philosophy and other branches of mathematics
The likes of Liebniz in their metaphysics introduce monads in a way that presents them as an abstraction that is then handled abstractly
And not as a box
One other thing that also helped was looking at continuation passing style
If I am asked today what a monad is, I will say that a monad is not an atom but it is a single unit that is handled as one. It is composed hence it not being an atom but it loses its utility when decomposed
Like a person
A person is a monad whose underlying type is a soul
Or mind dependending on what model you wish to use
The monadic effect is brought about by the body which enables the mind or the soul
Other monads of the same type ie other people can interact with you because you have are a monad yourself and that you enable your brain to function. Without your body no interaction can take place and you are of no utility. Without you as a monad, your brain as an atom is useless and without power
Cause and effect, space and time in this view are illusions
And in-turn we still don't have state but we can create the illusion that we do obeying certain rules of the abstraction
I am still doing my reading so this is subject to change
There is a whole field called monadology. I will have a peek
 
6:04 AM
posted on January 30, 2018 by Scott Hanselman

Docker for Windows is really coming along nicely. They have both a Stable and Edge channel and the Edge (beta, experimental) one just included a lovely new feature - Kubernetes support. Per their docs, Kubernetes is only available in Docker for Windows 18.02 CE Edge. They set most everything up nicely and put Kubectl into your path and setup a context. If you use kubectl for other things - like

 
 
1 hour later…
7:31 AM
Is anyone here well versed with event aggregator with caliburn micro?
 
Good morning sharperinos!
I'm using crystal reports unfortunately, and I want to never ear it again and I have literally no idea how CR works
It's black magic
 
Why black majic?
 
It works, nobody knows why, we just touch the input string that tell a parser what to get with reflection and use magic to shove the values into a crystal report
 
7:51 AM
Hi All
 
ohayou
#hasherinos
 
I want to save photos from an application to remote location..There are two options available...one is we can save file directly to the location..and other is save the file in the app server then sync it with remote server location using Microsoft sync framework
Which one is better?We are expecting more than 500 images at a time
 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
@Metallkiller Black magic*
 
Ohhai
 
Kamil, my arch nemesis who never sees through a duel!
 
8:14 AM
morning
@KesiyaAbraham upload directly to wherever you need them
 
need some help over here understanding some code
Hi everyone
 
and then create a backup somewhere else
 
@TaimurAyaz dont we all do that?
 
yup
 
To quote meti earlier:
44 mins ago, by Metallkiller
It's black magic
 
8:16 AM
Can you please take a look over here?
can't understand what insertion function is doing
this is for my school project
 
Doesn't look like c# does it now?
 
nope it is c++ :D
 
Yeap i haz no clue :D
Run it in VS and debug it
that might help you more than words would :)
 
it is working fine
but I need to understnad it
 
Step by step
Thats why debug it,
Look at what each step does.
Not just theoretical with code but practical with debugging
 
8:23 AM
got it
thanks
 
No broblemo missitemo
 
good morning
 
@Nerdintraining'questionmark' that's my secret of not losing!
 
@KamilSolecki Actuelly yes, you are loosing. There is a limit of 1 day for you to do yourn turn :D
 
8:35 AM
Is it better to use string.IsEmpty() or string.equals("") method
 
Is there even string.isEmpty()?
Or just string.isNullOrEmpty()
 
there is no IsEmpty
 
uys
guys
 
Good morning.
@pluto20010 If you want to compare to an empty string, use myStr == "" or myStr == string.Empty" or myStr.Equals("")` or myStr.Equals(string.Empty). They're equivalent.
 
when using SSIS, and a MySQL connector it builds correctly, but when I try to retrieve tables I get the error at Extract Excel Data... what does Excel have to do with MySQL anyway? Whatever, I try to retrieve the tables and I get no results... I would assume I haven't selected a database, but I don't see anywhere to choose one, any tips?
 
8:43 AM
@pluto20010 i thing best ist string.IsNullorWhitespace("") or what ever the precice name is
 
thank you
 
@Nerdintraining'questionmark' It's not "best". It's a different use case. In some cases, whitespace is a legitimate string while null isn't.
 
@AvnerShahar-Kashtan Yeah, I should have added, "Is the best in my eyes when dealing if the user entered anything at all"
 
Hello, I have this code now
public IEnumerable<UserVm> GetUsers(Func<Users, bool> predicate)
{
      return db.Users.Where(predicate).Select(user =>
          new UserVm(user));
}
Is there a way like I can use Include in this line of code?
return db.Users.Where(predicate).Select(user =>
          new UserVm(user));
because, suppose the Users has a relationship with other models.
 
@jsonGPPD I don't get that sentence.
 
8:54 AM
return db.Users.Where(predicate).Include(user=>user.Accounts).Select(user =>
          new UserVm(user));
 
@jsonGPPD What argument does Include accept?
 
@Nerdintraining'questionmark' I'm trying to add .Include(somemodels)
@AvnerShahar-Kashtan the other model let say, with one to many relationship
Normally,
when I use this
 
@jsonGPPD I know what it does. But what's the method signature?
 
return db.Users.Where(x=>x.Id=id).Include(user=>user.Accounts).Select(user =>
new UserVm(user))
But when I use predicate from my method signature and use the .Include,
it doesn't work
 
Hmm. I thought to suggest passing in a collection of Expression<Func<User,T>> and passing those into your Include, but Include has a generic parameter that isn't easily exposed upwards.
 
8:59 AM
what should I do?
I'm looking with this code right now
let me show you
 
Your GetUsers method is there to hide the DB details, right?
 
It works fine. But the problem is, example, Users has a relationship with many to one to Accounts
So, normally, we use Include and call the Accounts in there
 
So don't expose the Include call directly. You're already writing a User-specific method. Have an Include specific property.
 
Oh thanks for that tip. So where should I use the include in order to create a connection between different models?
 
is default value of if() true?
 
9:03 AM
yes @pluto20010 if(test) is the same with if(test == true)
 
@pluto20010 if() doesn't have a value, default or otherwise.
 
yeah got it
 
So @AvnerShahar-Kashtan do you have a sample on how can I achieve it?
I do code first so my models have relationships with other models. Using include is the fastest way to connect them in retrieving details or certain details @AvnerShahar-Kashtan
 
:41023773 public List<UserVm> GetUsers (Predicate<User> predicate, params string[] includeModels)
{
     var users = db.Users.Where(predicate);
     foreach (var model in includeModels)
     {
            users.Include(model); // this is the tricky part.
     }
     return users.Select(ToVm);
}
The tricky part is calling Include dynamically. You can do it quick and dirty, having a switch/case with the model name and supplying the relevant Include call.
You can do it more complex, generating an Expression from the name and adding it.
 
@AvnerShahar-Kashtan what if I write if(true)
does that makes any sense?
I guess not
 
9:14 AM
if does one thing - evaluate a boolean expression to see if it's value is true. That's all.
Given bool x = true, both if (x) and if (x == true) resolve to true, but not because of any default value.
 
myEvent?.Invoke(); is the same as
if(myEvent != null) myEvent.Invoke();
right?
 
It's just that the expression x has a value of true
 
@Nerd yes. You could even go if(myEvent != null) myEvent();
 
if (true) also has the value true - it's a literal expression. Just like 5 has the value 5.
 
@Metallkiller So why does .Invoke() exists if one could also do ()?
 
9:18 AM
...historically grown?
No idea. But you can use () and '?' together.
 
2 hours ago, by Metallkiller
It's black magic
 
Thanks, Cap
 
ahoy mateys
o/
 
9:27 AM
@Nerdintraining'questionmark' Invoke is the method you have on a delegate. That's what invokes it. The C# compiler also gives you sweet, sweet syntactic sugar to treat the delegate as a method and allow you to call it like one.
Behind the scenes, myDelegate() is compiled into myDelegate.Invoke().
 
Other .NET languages might not give you that syntactic shorthand.
 
@CaptainSquirrel you look... diffrent today
 
@Nerdintraining'questionmark' I don't know what you are talking about
 
Anyone know what the UpgradeBackupLocationnode in a csproj file indicates? Why backup? THat's what source control is for!
 
9:29 AM
@CaptainSquirrel You seem a bit squirelly.. but well.. it must be just me
 
I should probably change
oh fuck
 
@Metallkiller I'm guessing its when VS upgrades a .csproj file. If you're opening a csproj built in an older version (say, from VS2010), it offers the option of backing it up before converting it to the newer format.
 
Oops! There was a problem updating your profile:
Display name may only be changed once every 30 days; you may change again on Feb 28 at 16:51
riperoni
 
@CaptainSquirrel Haha :D
 
9:30 AM
Guess im a squirrel now
 
@CaptainSquirrel I've seen people stuck with more embarassing names.
 
So the squirrel army continues
 
which is correct
!(if i == 2)
 
Yeah, like "Avner Shahar", now he just sticks to it, to pretend it was intentional!
 
or if(!(i==2))
 
9:31 AM
or if(i != 2)?
 
of if(1+2)
(ignore me)
 
@pluto20010 Not a question of "correct". It's a question of clarity and style.
 
they are both same right?
and correct>
 
I prefer != anyday.
 
I got it!
If( i != (1 + 1))
 
9:32 AM
and what about !if(i == 2)
 
I prefer i==2? x:y
 
@pluto20010 why dont you just type !if() in the compuiler and see what happens
 
I am asking for preference
 
I don't think !if compiles FMI
 
!if won't be valid
 
9:34 AM
@Nerdintraining'questionmark' It's a real issue, actually. There's a legal limit to how often you can change your name, officially, here in Israel. Once every few years. I worked with a woman who changed her last name in her early 20's, and then got married a while later, and the government official who updated her official status decided, on his own initiative, to change her last name to her husband's. When she went to change it back, she was told she can't because she recently changed it.
 
well that sucks
 
She had to take it to court (and won), but it took a couple of months of bureaucracy.
 
@AvnerShahar-Kashtan Welp sucks to be her.
Atleast summat.
 
!!CaptainSquirrel2
2
 
9:36 AM
...you did not
 
Hahahaha
Star that so that allota peopls try it out pl0x
You know what it is?
It's.. It's..
 
2 hours ago, by Metallkiller
It's black magic
 
I forgot, what is this '|' pronounced as?
 
@pluto20010 It's a guttural sound in the back of your throat. Like drawing in a breath but closed off. It's hard to do with only one jaw.
 
@Metallkiller Crystal Reports? Good luck
 
9:42 AM
Thanks. I just hope to never have to go too deep into that. So far, the graphical editor was enough.
 
@AvnerShahar-Kashtan is there any shortcuts in doing it?
 
lol
are you serious?
 
No.
Rarely.
 
I would just call it pipe
or vertical bar
 
Depending on the context, it's either "pipe" or "OR sign".
 
9:53 AM
yeah 'ÓR'
 
Hi guys
I am having 1 mvc app in azure cloud from where i want to perform some long running operation.This long running operation will take place in wcf service(just a thought) and this service will reside in client on premise
So now when user submit this long running operation i want to display status of this long running process to user on my mvc app
This is what i am thinking:
1) Install windows service in the form of agents of 2-3 computer on premises to take advantage of resp resources and open a tcp/ip connection with this agents from mvc app to track status of this long running process unless and untill thole long running process is complete.
2) Use hangfire to run this long running process outside of IIS thread but i guess this will put load on server.
 
10:27 AM
guys
how would you make an ODBC selector?
I mean
I was just doing a textbox with a button to select from the ODBC list
and then just paste the name in there and store the connection info
but maybe a dropdown list would be more appropriate? Although I don't know if there's a way to bind the list to the actual ODBC sources
 
11:01 AM
Store connection strings with a name and a displayname
Dropdown shows:

DB1
DB2
DB3
Add...
When selecting Add..., a Textbox or Input window opens asking for either connectionstirng or data to make one
Maybe make a textbox with a "..." button appear that lets you paste/write a connectionstring, and the button opens an input window for seperate data (as connections stirngs arent always handy)
I now know what I have to add to my versionscanner app to make it better, thanks!
Rubber duck debugging designing
 
How the hell do I make my grid take 100% of its parent container in WPF?
it's like the grid doesn't have bounds except on top
 
It does by default actually
That's why I prefer it to e.g. StackPanel
 
wait
I'm putting it inside a stackpanel, becuase that crap doesn't know how to sort stuff a the bottom right corner
 
Any of ou have a shortcut to open a .csproj file in Notepad++ from solution/team explorer?
Nononon no stackpanel
use a dockpanel if you have to
StackPanel shrinks by default
 
alright I changed to dockpanel
it's gucci now... but the buttons I put in there are overlapping WTF
UML is shady
 
11:11 AM
Or just do everything with grids...I got like 3 or 5 grids within each other somewhere
 
I put the grid in the dockpanel
 
UML is nice, except it seems in the real world nobody uses it
Why not put the grid directly in the container, then make columns/rows, then put your element in the desired column/row?
 
I thought I'd need a container
I'll do that
 
For me, usually the <Window> is the container
Stacking grids into each other until I have the desired look
 
dammit the grid's stuck at the top of the parent grid
 
11:14 AM
Did you make <RowDefinitions>?
 
wait I was setting Grid.Column instead of Grid.Row
 
That might have been it XD
 
Grid's in position now, buttons still overlap though
Maybe I should put each of them in a different row/column definition
 
Buttons in Grid.Row/Column, size smaller than grid cell, maybe some margin?
 
there are no margins
and the buttons are definitely not bigger than the grid cell
Abused the grid like a boss
 
11:19 AM
Just checked, I have indeed 5 grids stacked
And it looks beautiful
Do your buttons have autosize? Because the nthey should just fill their respective cell
 
Nope I set them to fixed widths and heights
I'll make a proper setter for each control later on, if necessary
 
Might have strange results for different ppi screens
 
should I just spam grids?
 
Absolutely
 
11:22 AM
this particular window is going to be static, not even resizeable
but for any other window after this one I'll go for the grids
I remember there was a way to bind labels to buttons
or maybe it was a different UI framework
 
I mean, if you say a button has 24px height, and it looks good on your 1080p screen, and you open your app on a 720p screen, the button will look different. If everything else is in fixed px too, that's ok, just a little strange (like when you changed your desktop from 640p to 1080p after installing a driver). But when other things are dynamic, it will look awful.
Define "bind labels to buttons"
A button has a content attribute, so you can put anything into it
 
@Metallkiller who is nthey? Some fraud?
 
@Metallkiller The idea I had in mind was setting a default ALT key for labels, which then click their respective buttons
because every button is called "Browse"
Downside here, if I eventually change all those messages to Resource file text, how do I keep the same ALT key for each command?
without putting some weird text in it, like [_1] Some action
 
it's not weird. You get used to it
 
Set mnemonics with "Ima&Label" and make L the default key on the corresponding button?
Or see if the label has onClick or Command
Or...make the label a button
"Choose this"
"Choose that"
"Choose something entire else that you'll totally never need"
 
11:32 AM
I mean You can &Browse B&rowse Br&owse, I'm ok with that
 
No no, I want to put buttons in there because clients are too stupid to guess the label is clickable, this feature is only for myself but it shall not replace buttons at all
because I like going like F1 > Select file > F2 > Select option > F3
etc.
 
If the clients have to guess that the label is clickable, it probably shouldn't be clickable. Or shouldn't be a label.
 
There's a button that does something, all I want is to be able to press Alt+1 to press that button, or click the label to do so
or Alt+F, or whatever it's bound to
e.g. Alt+e Pops the dialog to select an Excel file
 
What UI framework are you using?
 
11:42 AM
In WPF it's as easy as adding a couple of KeyBindings to the window.
If there's already an "official" way to perform a task (click a button) and you want power users to be able to do it with keyboard shortcuts, just add it.
 
Yup, Window-wide keybindings will come later
for now I'll be adding text shortcuts
which is just adding an underscore before the key you want to bind
 
Your keyboard bindings don't - and shouldn't - have anything to do with the button.
They're just alternate input methods that bind to the same command.
 
actually it's a built-in function
e.g. "_Hello" will allow you to trigger that control when you press H
it also works in the designer actually
you can't press the shortcut though, it will run VS shortcuts instead
but you press Alt and keys are highlighted
 
Yes, I'm familiar with the mnemonics. I think they're a bad idea.
Instead of having two input methods that bind to a command, you have an input method that binds to a Click event, which in turn binds to a command.
 
I believe that leads to better programming, because you'll handle the event from a single route, i.e. all your programming sequences will follow the whole path instead of just the call to the event
unless you want to handle each sender individually I don't see why it would be a bad idea to send everyone through the button click event
 
11:51 AM
I disagree. It frames the button as the route from which the logic starts. But that's expressly against MVVM concepts.
The button should be interchangeable. It's just a view element. The command is exposed by the ViewModel.
 
So how do you put a hotkey into the <window>?
 
<Window.KeyBindings>
      <Binding Key="Ctrl+1" Command="{Binding DoSomethingCommand}"/>
</Window.KeyBindings>
 
Oh, nice
Can I bind Alt+F4 too? :D
 
@AvnerShahar-Kashtan Oh wait you are thinking in MVVM, but this has nothing to do with MVVM. My app is too small, using that pattern would be overkill
@Metallkiller you can probably override it
but that depends of whether your OS captures and handles the event beforehand
 
@HéctorÁlvarez I disagree. The overhead, even for small apps, is pretty small.
 
11:55 AM
And it's actually quite nice to have all keybindings within a single Tag
 
@AvnerShahar-Kashtan that's actually awesome, I thought we were talking about code bindings
 
@Metallkiller of course
 
@Metallkiller It also defines the scope. If you define the KeyBindings only in one area of the window, for instance, they'll only fire if you're focused in that area.
 
@Metallkiller I think the only thing you can't bind is CTRL+ALT+Delete
 
The events bubble up from inside out.
 
11:56 AM
@MadaraUchiha I think you can bind to that, just you can't intercept it
 
@MadaraUchiha There are a couple more, like the Fn key, that aren't passed in as regular keyboard scancodes.
 
Unless you dive dig into windows with hooks
 
"The attachable property KeyBindings could not be found in type Window" @Avner
However there's a "Keybinding" element available
 
@Nerd Ctrl+Alt+Del actually is a hardware interrupt. No chance of intercepting that
 
Yeah, I was working from memory.
<Window.InputBindings>
    <KeyBinding Command="Copy" Key="F5" />
</Window.InputBindings>
 
12:01 PM
@Metallkiller daeimn
'swell hardware interrupt seems to be the wrong wordning meti
15
A: How can I intercept all key events, including ctrl+alt+del and ctrl+tab?

ChrisWTo add to what Shog9 said, if your application could intercept ctrl+alt+del, then your application would be able to pretend to be the Windows Login dialog, and by doing so trick the end-user into typing their credentials into your application. If you do want to replace the Windows Login dialog, ...

 
are there any snippets to write ICommands and their methods?
 
Don't write custom ICommands. It's such a pain.
 
what do you suggest?
 
Just use one of the many DelegateCommand implementations that can be found in any MVVM framework, like Prism or MvvmLight. It's just a wrapper around a delegate.
 
Isn't Prism some sort of IoC framework?
 
12:10 PM
public void DoTheThing()
{
   // thing.
}
public ICommand DoTheThingCommand { get; private set;}
ctor
{
    DoTheThingCommand = new DelegateCommand(DoTheThing);
}
 
my app doesn't necessarily have to implement threading (yet)
 
What do you want to accive?
I have snippet to create bare class of type ICommand
 
I want to bind the buttons to their actions as @Avner suggested, but in order to bind the command I need ta command to bind first.
I can't bind an int, according to intellisense
 
@HéctorÁlvarez Prism isn't an IoC framework, and IoC has nothing to do with threading.
 
What I mean is that I don't really need so many frameworks and crap
 
12:13 PM
@HéctorÁlvarez Buttons can only Bind to a Command +1
 
Fine. So write your own ICommands. Thats' a lot more work. :)
 
Build your own delegate command:
 
So it seems the underscore thing is finally the simple solution
I don't need to run anything async
 
delegating is far beyond my current scope
 
12:15 PM
@HéctorÁlvarez I don't understnad what u mean by that
 
@HéctorÁlvarez Nothing any of us have said has anything to do with async.
"DelegateCommand" is simply a generic ICommand that receives a delegate - that is, a method - and calls it when the command is invoked.
Instead of creating a new class implementing ICommand for each command you want, simply create a method in your viewmodel, and create an instance of DelegateCommand that calls it.
 
@AvnerShahar-Kashtan Unless, in my honest and hublest of most opinions, you have reoccuring commands, then one could implement a slightly diffrent pattern.
 
Okay I'm confused now
I thought a delegate was meant to handle async tasks
 
12:20 PM
Well fuck me
 
A delegate is simply a function pointer, sort of.
 
RemoveAction = new GeneralCommand(o => o != null, o =>
{
	if (MessageBox.Show("Delte Shortcut?", "", MessageBoxButton.YesNo) == MessageBoxResult.No)
		return;
	this.config.RemoveAction((Models.Action)o ); RaisePropertyChanged(nameof(Actions));
});
Example:
 
I'll nuget that prism thing and see what I can get out of it
 
I wouldn't necessarily start with Prism.
It's a big beast.
 
o => o != null --> simply sais that if the parameter passed is != null, then you can execute
 
12:22 PM
Check out MvvmLight, which is a much lighter MVVM framework.
I've heard good things about CaliburnMicro too.
 
And thats a lambda expression being used as a adelagate
 
@Nerd that post didn't really say anything definite about the Ctrl+Alt+Del interrupt
 
@Metallkiller Does
 
It links two posts that seem to say something, but they both say "This page was removed"
 
well, given I definitely suck at this... I'm using propfull at a custom class file I made for MainWindow (I'm not using MainWindow.xaml.cs) and used propfull to add the properties, is that right?
or should I bind the window to a model?
There are basically 2 file paths I want to store
Can't find examples, 404 on the VS gallery ling and the VS Gallery browser also returns no reslults
I did manage to find the extension tools though
 
12:52 PM
templates aren't available online either
there's a github project with several examples apparently, but I can't download it due to proxy restrictions
 
o/
@Roel Mind shedding some light here? I've never really had the chance to build anything big enough to use all this crap
and I feel time's wasting by adding so many frameworks I don't understand
 
@HéctorÁlvarez On what? I didn't really read anything before I went \o
 

« first day (2663 days earlier)      last day (2285 days later) »