« first day (3176 days earlier)      last day (1755 days later) » 

12:47 AM
Hey, guys. Any UWP expert around? Really needing inspiration to get something done.
 
 
5 hours later…
6:17 AM
Morning All of you have a Nice day.
Anyone help me to convert this query to linQ Query
var modal = await App.dbContext.GetWithChildrenAsync<SafetyVisitModel>(Model.UniqueID, true);
 
Good morning
 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' squirrelerinos!
 
im converting like this
 
@mr5 I can support dis
 
var modal = App.dbContext.safetyVisitModels.Where(x => x.UniqueID == Model.UniqueID && x.IsDirty == true).ToList();
 
6:33 AM
good morning
@zubairz you have been asking this question since yesterday
use so!
 
yes i asked also yesterday but this new one
 
no it is similar
 
this senerio im not understanding
 
learn the basics then
 
can you suggest me the good web link for learning
 
6:35 AM
the official docs?
 
yes
there are many others just a google search away
 
please tell me there are two types query im seeing
one starting from keyword
and other is starting database object
i want to use query that start with database object then table and then remaning query...i didnot the name of this query
 
6:51 AM
@zubairz where you from?
 
7:12 AM
@Squirrelintraining Im from Pakistan and you brother?
 
@zubairz queries starting with select, insert, update, delete, are sort just basic sql queries
from there, you can also call procedures
 
I know these Query but i resolve the issue
i just return all list and perform find operation on result data
 
if it is a C# specific question, then I'm probably not answering your question
 
yes This was C# Question
Thanks BTW
 
@zubairz India
Just kidding, germany.
 
7:20 AM
hahhah BTW if You are belong To India its not issue for me...Because i respect Human being .
good are you owner of this group
:46611345
@Squirrelintraining In which you have Expertise
 
I leave C# to the CSharpites
 
@Neil can you tell us What is CSSharpites and its scope and use.
 
Hi guys
@Neil Your latest answer is wrong
 
@zubairz just made it up :) I meant C# experts
 
Silly @Neil
 
7:28 AM
@ILoveStackoverflow Ah, it wouldn't be a good morning without hearing this at least once
 
Lots of mistakes in your answer i have found
 
@Neil ok but in which teconology you working
 
zubairz, not to be rude, but I think you need to watch some more english movies/read english books to improve on your english :) (i know big words coming from a german squirrel)
 
@zubairz Java mostly
javascript sometimes as well
 
@Squirrelintraining hahhah you are my brother and also friend ...i'm not going to be rude. i reply in same Context in which you speak.i know my English is not good.but i need help from other so i talk in English to learn something from others friends
@NE
@Neil Good keep it up friend
 
7:34 AM
Will do
 
Aye, I ment that actually, so that you understand Tutorials better and can work with them more easely.
It seems to me, as if all your problems can be solved with propper communication (as in most of the times).
Usually there is an answer in the web to your problem and all you need is a little google-fu and with that propper wording.
 
HMM RIGHT
 
@Neil I want to kick you for this
@Neil and this
@WutchZone du hast "wucht" falsch geschrieben
 
@Squirrelintraining Yes you are right friends
 
@Squirrelintraining Oh but I enjoy the company of CSharpites
 
7:37 AM
@Neil The weak are always attracted to the strong :P
 
and like a strong magnet, I am pulled by the bits of iron filings that is this room :)
 
@Squirrelintraining right
its morning time friends be cool
 
g'morning.
Moved to a new office. Got a new monitor. Am undecided about it.
 
Mornin' avni
 
It's a 2k, 27" monitor. Everything is a bit too small at 100% DPI, and a bit too big at 150%, and a bit too blurry at 125%.
 
7:40 AM
Can someone please help me explain this below point with code example :
The implementation of a subclass becomes so bound up with the implementation of its parent class that any change in the parent's implementation will force the subclass to change.
I dont understand what it is trying to say
 
@AvnerShahar-Kashtan Experience has taught me, that one gets used to it.
 
@ILoveStackoverflow Context might help.
Yeah. Stay at 100%, zoom to 110% in Chrome/VS, and everything will be fine.
 
@ILoveStackoverflow Any changes in the parent class is reflected to the child class is what they are saying i think.
 
@AvnerShahar-Kashtan I am reading a book where it was mention as 1 of the disadvantages of inheritance
 
I find it easier to keep it at 100% dpi and then just bump up the font size
the extra space is worth it for me
 
7:43 AM
@ILoveStackoverflow In general? Well, consider a base class such as AbstractFileSaver, which is inherited by JsonFileSaver. The AbstractFileSaver has a method called SaveToFile which received an object and a filename. The JsonFileSaver child implements that method by serializing the object to JSON and saving.
 
@ILoveStackoverflow I.e. GetRandomInt() => 4; if you change it to GetRandomInt() => 3 /*new diceroll*/; then the children will also always return 3 from then on.
 
Also true or false: the number of stars in the milky way outnumber the number of trees on earth
 
public void SaveToFile(object data, string path)
{
    var filestream = base.GetFileStream(path);
    var jsonData = JsonSerialize(data);
    filestream.Write(jsonData);
}
 
(I'm being vague on the syntax on purpose)
 
7:44 AM
It is mention in this book
 
@ILoveStackoverflow Now, this JsonFIleSaver relies on the behavior of AbstractFileSaver. If anything in it changes (for instance, the protected method GetFileStream now requires both a file path and credentials for access), JsonFileSaver now has to change its code to fit it. That's the dependency.
 
@Neil true ofc
 
@Squirrelintraining nope, false
 
What does JsonFIleSaver class contains?
I am bit confused
@AvnerShahar-Kashtan
 
If it used encapsulation (e.g. JsonFileSaver doesn't inherit, but instead is instantiated with a FileStreamPRovider that exposes GetFileStream), then it isn't dependent on that FileStreamProvider - you can switch it to a different FileStreamProvider, but changing it to inherit a differetn base class is harder.
 
7:47 AM
@ILoveStackoverflow Might be illegal to share that depending on where you're coming from
@Neil give it another 100million years and it'll be true
 
There are 100 billion stars in the milky way and roughly 3 trillion trees. So we're talking a difference of roughly 30 trees to a star
@Squirrelintraining touché
probably far less
 
Also TIL: when the ancient Greeks watched the stars, they saw a bright band of stars they called "galaksia kyklos", or "the milky circle" from the white color. From there, via Latin "via lactea", we got both the general word "galaxy" and the specific galaxy, our milky way.
The "lactic" in "galactic" is cognate with "lactose".
 
I like the name. It's very unscientific
if scientists had named it, it would have been like Orion 36-C
 
@AvnerShahar-Kashtan intresting
Also @ILoveStackoverflow that book is atleast 10 years old (I only just realized the ast commit was 10 years ago)
 
7:52 AM
But it is very popular book
 
So is the Bible
 
@ILoveStackoverflow A common usage for inheritance is to reuse code. So my base class has the GetFileStream() method, while the derived class uses it:
 
but i dont understand that how does parent class method implementation change will force derivce class to change
 
abstract class BaseSaver
{
      public abstract void SaveToFile(object data, string path);
      protected FileStream GetFileStream(string path)
      {
              return File.OpenWrite(path);
      }
}

class JsonFileSaver : BaseSaver
{
    public override void SaveToFile(object data, string path)
    {
         using (var stream = GetFileStream(path))
         {
                  new JsonSerializer().WriteToStream(data, path);
         }
    }

}
 
public class Parent
{
   public void Foo()
   {
      Cw("hello");
   }
}

public class Child : Parent
{
   public void ChildFoo()
   {
      Foo(); // I am just calling this method is derive class so now if foo implementaion changes in parent than how does it impact since I am just calling method?
   }
}
 
8:06 AM
Now, imagine that someone changes the implementation of BaseSaver so that it doesn't use File.OpenWrite (which either opens an existing file or creates a new one) but instead now only returns a filestream if the file doesn't exist, and throws an exception if it does.
This means that a change of behavior in the base class now affects the behavior of the derived class.
 
what about my example?
 
So what's the problem? The problem is that the inheritance serves two purposes here. It reuses code (the GetFileStream method) and it defines contract/identity. The JsonFileSaver is-a BaseSaver. If I want to change the behavior of JsonFileSaver now, I have to stop inheriting from BaseSaver, which means that any caller that relied on it being derived from BaseSaver will now fail.
Your example is too simple to illustrate the problem.
 
hey hey kids are we ready for another day at work??
 
AHOY MATEYS O/
ADJUST MAIN SAIL
 
Here's an alternative using interfaces and composition, which separates the two functions:
 
8:09 AM
PORT TO STARBOARD, 30 DEGREES
Y'ARRR
hello o/
 
Y'ARRRRRR
 
oh no
squirril will make the ship Crash again
 
I may have nearly face planted when I walked up the stairs this morning
 
adjusts Course
 
WHY IS THERE NO RUM!
 
8:10 AM
hahahhaa
 
THE RUM IS GONE
!!kieran2
 
i replaced it all with WHISKEYYY
 
I mean
that's not terrible
 
interface IFileSaver
{
     void SaveToFile(object data, string path);
}

interface IFileStreamProvider
{
     FileStream GetFileStream(string path);
}

class OverridingFileProvider : IFileProvider
{
      public FileStream GetFileStream (string path) => File.OpenWrite(path);
}

class JsonSaver : IFileSaver
{
        public JsonSaver (IFileStreamProvider provider)
        {
              _provider = provider;
        }

        void SaveToFile(object data, string path)
        {
              using (_provider.GetFileStream(path))
 
8:10 AM
WHISKEY's FOR LAND LUBBERS!
 
Whiskey is better anyway
!!shrug
 
@HollyStyles oi now you listen here
 
¯\_(ツ)_/¯
 
!!Do commands when i feel like it or do commands when given
 
@Hans1984 do commands when given
 
8:11 AM
I'm not against kicking people, especially ones insulting the only true spirit, whiskey
:)
 
the delay was too long
 
@CaptainSquirrel fave whiskey
yes im judging your answer
 
Jack Daniels Honey
 
YOU PLEB
 
@ILoveStackoverflow What we did here is separate the two functions. Now JsonSaver gets its contract from IFileSaver, and its reusable code via IFileStreamProvider.
 
8:12 AM
draws cutlass
 
THATS NOT WHISKEY
ITS BOURBON
 
Lagavulin.
Though I do like bourbon, better than most whiskies.
 
* not bourbon
 
@AvnerShahar-Kashtan All right.Let me spend sometime understand what you said and what you have done.I will get back to you with some doubts and confusion if any :)
 
8:13 AM
WHISKEY
 
But thank you so much for explaining the point :)
 
@ILoveStackoverflow 👍
 
but it IS bourbon
 
sets rum barrels on fire with flamethrower
 
it goes in bourbon casks
 
8:14 AM
 
I think, technically, Jack Daniels isn't bourbon because it's not made in Kentucky.
It's Tennessee Whiskey.
 
TENNESSEE
WHISKEY
 
hey my Favorit whiskey
how did you know
 
AMERICAN PIG WHISKEY
REEEE
SCOTCH IS TRUE WHISKEY
 
yeah i heard that before
I can only afford american Whiskey though
 
8:16 AM
cause its worse yes
 
Is WHISKEY Part of development>
?
 
nah tbf
JD is OK in those little cans for convenience
@zubairz it is when you start to get stressed
 
I honestly don't understand the love for whiskey of any kind
I get bourbon, tequila, rum, even vodka at times
 
REEE
 
i never tast WHISKEY and never will taste
 
8:18 AM
!!xkcd 323
 
@Harry nah, i go to Costco and get the big 1.5L bottles of it
 
costco
thats actually a really good shout why did i never think of that theres one half a mile away from mme
 
@CaptainSquirrel hghahha
 
I think the office would be a lot more entertaining if next to the water dispenser, there was a beer tap
 
War
8:20 AM
hey guys
 
oh shit
hi @War
not seen you in a while
 
War
Yeh been crazy busy
rebuilt the company from the ground up
got in to a whole new domain of issues now
 
that'll keep you on your toes
 
War
Looking for ideas for a search
 
8:21 AM
@Neil Facebook have those, at least in their Israeli dev center. Several other companies I've seen, as well. WeWork have a free draft beer tap in their coworking space.
 
War
I have some fairly large SQL db's and need to build a system that users can build their own indexes and bind ui to them for search
 
@AvnerShahar-Kashtan would be such a chill environment to work in
 
War
typical example
 
this might be a stupid question
 
I don't like it, personally. Not because I've got anything against beer or drinking (moderately) on the job, but because of the "hey, we're cool, we've got beer and an xbox and a ping-pong table, please move your entire life into the office" vibe.
 
8:22 AM
That would be a bad environment for me...
 
but can i use 2 object lists in a LINQ statement?
 
"Sorry about the late report." "Nah, don't worry about it, no biggie." "Here, let me grab you a beer to make up for it.."
 
War
yes you can @Adan
 
i tried and failed.....
 
War
LINQ to Entities might not like it though
what you trying to do ?
 
8:23 AM
@AvnerShahar-Kashtan nobody said it had to be like that, but beer just sort of makes work seem more like a social event in my eyes
 
@AvnerShahar-Kashtan That and, when the hell are you going to have the time to do that
 
it's the difference between going to work and going to a party with friends and coworkers
 
ya Know
cuz work
 
@War gime 1 sec
 
War
lol tyt
 
8:25 AM
@Neil Another thing I don't particularly care for. The blurring of lines between work and socializing. It looks like it would be fun, but it's actually work. Blurring the lines will inevitably lead to "you're partying at work, and so we expect you to work when you're partying as well". I prefer work to be work (not necessarily glum and dour, definitely should be fun and friendly), but clearly distinct from other parts of life.
 
War
i work during work hours and party during party hours
it's that simple
 
   var CreditListAvailability = new JavaScriptSerializer().Serialize(
            Model.ConversionsDataList.Where(x => x.SOURCETYPE == "Credit")
                .GroupBy(x => x.SOURCENAME)
                .Select(x => new { AVAILABLECREDIT = 5.5M - x.Sum(y => decimal.Parse(y.AMOUNT)
                + Model.returnFee(y.SOURCEFEE, y.AMOUNT))
                                 - Model.TTransactionsDataList.Where(x => x.PAYMENTSOURCE == "") //transactions
                                   , NAME = x.Key }).ToList()
 
And if i'm getting paid, i'll work during party hours too
 
take this garbage as an example
 
War
this weekend is my stag doo ... my companies CTO (my boss) is coming though
 
8:26 AM
can anyone tell me .The owners of this group are jobs here?
 
@War congratz
 
@AvnerShahar-Kashtan I don't think that's an issue for people who remember that it is work
 
where my brain farted was in the ' - Model.TTransactionsDataList.Where....
 
@zubairz eh?
 
I don't think it's honestly that hard to remember that you'd get confused and hug Cheryl from accounting
 
War
8:26 AM
@CaptainSquirrel thanks man ... the wedding is next month
 
because the groupby 'sourcename' has a unique list of names that are in the TTransactions datal ist
 
@zubairz Nope. Room Owners are just bored people who happen to be on a bit more than the rest.
 
I mean
We have jobs
most of us at least
 
@AvnerShahar-Kashtan hmmm ok
@CaptainSquirrel ok good
 
>< this stumped me last night
and im so frustrated
 
War
8:28 AM
@Adan not sure what you're trying to achieve
 
here's the other way to look at it
i have 3 lists: creditStatsList, creditTransactionsList, conversionsList
creditstat's detail the credit card's limit in credit (ex: 1500 dollars)
transactions details what i spent on this credit card
 
War
collection1.Select(i => new { x = collection2.Where(j => ...) });
 
conversions say when i did balance transfers/cash advance on thsi card
 
War
not sure what the problem is
 
so im basically asking: "what is my available credit? considering i have 3 object lists to work with to find out what it'l be"
transactions are going to reduce my available credit, so are conversions
 
War
8:30 AM
the first thing i would do is build an object that contained relevant data from all 3 lists
 
and the hard part is making it in 1 LINQ statement, i can do this manually by using 'for' loops but i dont want to go that route
 
@AvnerShahar-Kashtan also, i'd like to challenge your starred message about stars
 
@War go on... i like that
 
@AvnerShahar-Kashtan Its called the milky way, because that's what they were eating at the time of naming it
 
War
var data = list1.Select(i => new { item1 = i, item2 = list2.Where(...), item3 = list3.Where(...) });
then you can simply linq off that
 
8:31 AM
@CaptainSquirrel Feel free.
 
War
data.Select(...)
that way for each item you're asking a scoped question having previously determined what the scope is
 
@CaptainSquirrel Surely not. It's an established historical and archeological fact that the ancient Greeks hated nougat.
 
:O
YOU TAKE THAT BACK
 
War
otherwise you're having to do both in the same query logic
lol @AvnerShahar-Kashtan
 
@War ok i'l try that
@War it's like doing SQL, noonder that makes sense to me, thanks!
the answer was under my nose
 
8:41 AM
I have a helper method that gets some values from a REST API and caches them. I want the helper to be callable from multiple threads but only kick one API request off at a time, where other threads entering should wait for the result to come back if it's going off right now. I can't lock on the cache updating logic because the calls using HttpClient are asynchronous. It seems surprisingly difficult to get a straight answer about how you're supposed to do this when your code is async
 
War
@Adan pretty much :)
 
@TomW I had exactly this problem last year.
 
Can you set a private static bool for your helper class, if the bool is true then store your other requests in a list & loop through them one after the other, after your current request is done.
If its false, just do the request and set the bool to true?
@TomW ^ ?
 
War
@TomW stack them in a concurrent collection then have a httpclient kick off one at a time from that collection
 
If that makes 0 sense, tell me and i'll reword
 
8:44 AM
@TomW Use a thread-local cache?
Ah, no, the opposite.
 
I used ConcurrentDictionary and a object lock to queue the requests, use lock to allow only one request object to actually make the API call, then share response to all requests.
 
You can use a SemaphoreSlim, I think, with 1 as the maximum number of requests allowed. It's async-aware.
 
The approach I came up with was to stick a SemaphoreSlim.WaitAsync at the top of the Update method, but I'm not convinced that's right. I've never used SemaphoreSlim before
 
> SemaphoreSlim
 
when it's released, the other threads should see that the lastUpdated variable is within the expiry window and bypass doing it again. But they shouldn't proceed until the update has finished
 
8:46 AM
Isn't that the name of an up-coming slim shady tribute act?
 
Hey guys anyone remembers link to game that simulates you working in Word or Excell
it was like a pong game or something
 
If one other person here has suggested SemaphoreSlim then I'm happy that's probably a decent approach. Basically the easiest way to get this to work the way we wanted it in the first place is to do something conceptually-similar-to-lock without actually locking.
 
You can use one of the tools from Stephen Cleary's AsyncEx library.
 
The other complication is that this has to stop being async at the top level i.e. the helper methods called into, because they are for use in BizTalk and BizTalk doesn't understand async at all
I mean, it has its own concurrent processing model developed in about 1998 at the very dawn of .net which works well, but it hasn't kept up with how .net has progressed
 
It looks like Cleary's AsyncLock supports both sync and async lock acquisition.
@TomW Frankly, I'm surprised BizTalk still exists. I haven't heard it mentioned since 2011 or so.
 
8:49 AM
But if you make it call a method that returns a Task it won't know what to do with it
@AvnerShahar-Kashtan it's actually a really solid product.
Solid like a concrete elephant
It took a ton of tedious, expensive effort to get it in here and we sure aren't doing at least as much work to get it out
BizTalk 2020 is in development
 
I had a friend who spent a year in London with the NHS, back in 2005 or so, getting their entire operation running on BizTalk. There's a good changes it's still there.
 
I don't think there is any notion of an "entire operation" in the NHS. It's such a massive organisation doing so many different things that overarching IT projects basically always fail to get off the ground
They've tried to do electronic records numerous times, it's always turned out too complicated
 
Yeah, probably. The entire operations of a specific department he was contracting with.
 
for the likes of, you know, Fujitsu
BigHugeCorps bite off more than they can chew with the NHS
to be fair outpatient appointments to secondary care are now digitised and standardised and that works well
tl;dr you can take your booking reference to any NHS facility that treats your condition and they have to see you
They can schedule you an appointment that's so far in the future that it's effectively never, but they have to offer you one. If too busy; go somewhere else.
my first job after university was chasing the gaps on that system
Anyway. I spend over half of my work time consulting on BizTalk.
 
Going back to your actual question earlier, I am just now fixing a SemaphoreSlim bug by replacing it with AsyncEx's AsyncAutoResetEvent.
 
8:58 AM
what was the bug?
 
I have this background service (a cache) that needs to persist its index periodically, but only if any changes were made. So it would listen on a SemaphoreSLim until an operation that changed the index flagged that persisting is needed, then it persisted and returned to await.
 
YouTube and Twitch shall responsible to Etika dead.
 
SemaphoreSlim wasn't the right tool here, since I need a simple set/unset flag, but I needed it to be async/await aware, so I used SemaphoreSlim.
 
I don't see what the difference is
What's the difference in practice between releasing a semaphore, which causes (presumably) one thread waiting on it to be allowed to resume i.e. completes the task returned by WaitAsync
and setting the reset event, which as far as I can tell has exactly the same effect
Oh. It looks like semaphores can run into reference count issues if your code is complicated, i.e. you mess up and don't match up the Waits and Releases. It the point of a ResetEvent to make this simpler so you can't mess it up?
> Represents a thread synchronization event that, when signaled, resets automatically after releasing a single waiting thread
The problem I have with this is that nobody seems to want to explain what "set" means
> Auto-reset events are more confusing. Probably the easiest way to think about them is as if they were semaphores with a maximum token count of one
Ok cool
 
9:28 AM
When there is a flood, there is no drop of rain feel responsible.
 
She acts like summer and walks like rain
Reminds me that there's a-time to change, hey, hey
 
9:46 AM
do do do
 
9:59 AM
put pineapples in a tree
 

« first day (3176 days earlier)      last day (1755 days later) »