« first day (2440 days earlier)      last day (2511 days later) » 

1:17 AM
hello ppl
 
hello
 
hello hsimah
a little question to you or everyone that is reading, someone is programming with c# for desktop apps?
 
not for a while, mostly do web these days. ask away and if anyone knows they'll respond
 
this is a general question I think... sorry for my english, I speak in spanish.
I feel like a dinosaur, seen all that is new on js stuff, like angular, vue.js, etc... and like to improve my programming skills on dektop stuff, those last weeks I'm checking about async / await, that is a whole world to learn, but still I made some progress to make UI responsive and the user experience be better, still in simple windows forms apps....

today I reading about Rx, I still not read too much from http://www.introtorx.com/Content/v1.0.10621.0/02_KeyTypes.html but see that it seems to make something
I still lerarning the basics of vue.js (that seems that play well with laravel) to make views/forms in the future that can be used on mobile, web and desktop all from same source (with bulma or bootstrap foir cs//UI} maybe), but for now I cannot make the transition to my work needs that have to be made faster that I can learn :P
 
im also learning these new web technologies. I am doing Ampersand.js and React on a node/express back end
 
1:28 AM
I not larned well with angular, but with vuejs I was amazed how it tackle all the stuff, I understand better how things have to be made at least the basics :P
I not know ampersand, checking it now
 
1:39 AM
@JohanLarsson what the fuck did your country do en.wikipedia.org/wiki/Flying_Jacob
 
 
2 hours later…
4:07 AM
@KevinMaxwell Hey... I think for your SO question It would be better to change the topic to "How to Create a Cross Reference Check" because " in ASP.NET MVC EntityFramework?" is not needed. The tags point them out.
I tried proposing an edit for it but it got rejected. I just found out it's because you probably sent an edit right after I did.
 
 
2 hours later…
5:55 AM
@KendallFrey It is actually pretty tasty.
 
@Sometowngeek I changed the subject to How to Create a Cross Reference Check.
 
heyo
@KendallFrey it's bananas!
 
6:19 AM
GoOoOoOoOoOoOoOoOd Morning neglecterinos
 
6:34 AM
@KamilSolecki can you rebuil the board from yesterdfay?
 
'morning.
 
0
Q: Conatins doesn't work and Like is also not... in LINQ and SQL SERVER

Ram SinghI am working on advanced search option, in which i have a field named "Notes" which i have to check in three columns, Notes, Notes1, Note2. I can html tags as well in these columns so firstly i had tried following SQL query to make it working: string noo = System.Text.RegularExpressions.Regex.Re...

please help me
 
Good morning guys!
2
Q: How to Create a Cross Reference Check?

Kevin MaxwellTLDR: I am trying to make a reference from Case A to Case B and I want Case B to be able to recognize there is a reference from Case A. In my application, I have a section where I connect Cases to each other in order to be able to process them together. This section is called Case Cross Referenc...

 
@RamSingh There isn't actually any LINQ in your question. You're just showing how you're building a (very) complicated SQL string in code. Not showing how you're running it not saying what the error is (other than "not always works", and you're not even clear in what it's supposed to do.
 
@RamSingh i love linq but your thing looks mighty complicated^^
oh avner you've done it again
you've said all i want to said but would never ever be managed to say it
 
6:54 AM
 
@KevinMaxwell one of my favorite movies
 
Indeed
 
@Nerdintraining That's what I'm here for.
Task for this morning: see why our server process, usually around 400-500MB, has ballooned to 18GB last night in a test environment.
 
ohayou
 
^^
I bet it's because of Proxy!
 
6:58 AM
Is it, @Proxy? Have you been storing your stuff in our process' memory space again?
 
@AvnerShahar-Kashtan i have :)
 
#ohproxyyovedoneitagain
 
Am I going to find all sorts of junk in the memory dump? Old magazines and empty candy wrappers?
 
some dirty old magazines
 
Ewww. This is a process that handles sensitive data! The data is going to get all icky.
 
7:02 AM
 
(Still copying the 18GB memory dump from the server)
 
swap out the maggoo with Proxy will you not :)
 
(Technically, already copied the 3GB .7z file, now uncompressing the 18GB dump file)
 
Good morning :D
 
7:14 AM
senpaiiiiiiiiiiiiii
how are you feeling on this rainy morning?
 
literally raining in the middle east :DDD
 
Rain? Not here.
 
oh you Europeans get it every other day
we have to do the rain dance AND the sacrifice of the first born to get some sprinkle
 
The only rain I've seen recently was my sprinkler system.
 
It's sunny in the north of germany!
 
7:18 AM
Yeah. While the UK and western US go through a heatwave, we get rain. Rain!
 
@misha130 In egypt it only rains once a year usuall round september
 
Just not something that happens in the summer here.
 
egypt and israel are neighbors so I am not surprised
 
Funfact:
Global warming is actually a wrong usage of the word.
Climate change is more fitting, eversince yes the global temprature is going up but the weather is getting wakier and more extreme.
there is little love between israel and egypt
#sinai
 
never been
wanna go though
 
7:21 AM
I've been to Taba, though no further.
It's in Sinai, right across the border from Eilat in Israel.
Back in the late 80's.
 
@AvnerShahar-Kashtan taba is lovely
but there is a place between taba and nuweeba (hopefulyl writing it correct)
it's like heavon on earth
you go into the water and after 5 meters you have intakt corrals
hang on
it's come down allot ever since the revolution but it's still lovely.
You can either camp or take rent a bungalow
 
I think I'll wait a bit longer for the political situation to settle down before going down there. :)
 
o7 @RoelvanUden @AvnerShahar-Kashtan @misha130 @Proxy @Nerdintraining
 
oh its a salute o7
 
7:29 AM
o7
 
this is a salute, right?
 
Its not raining here either
actually
 
we had 38? degrees yesterday
 
wait a second..is the salute with the right or left hand?
 
7:29 AM
@misha130 That depends on which side the person is facing? :p
 
well we need a reversed 7
 
8GB allocated in 168,000 strings. Hmpff.
 
Well you can always do
Ù¢o
 
thats a waiter
bringing food
am I...am I hungry?..
 
@misha130 depending in wich direction you are facin
 
7:33 AM
ã„¥o
I've been hungry since this morning, because of an accident of Hebrew phonology and orthography.
 
its a young language :^)
 
We're releasing a version of our software, so we made a new branch in our source control. For phonological reasons beyond the scope of this message, the transliteration (and usually pronunciation) of "branch" in Hebrew is identical to "brunch".
 
I'm hungarian.
 
7:38 AM
good morning
it's time to eat
 
is it?
damn, I'd like to eat smth.
 
@AvnerShahar-Kashtan mmmm brunch
 
So yeah, I've slept 3 hours tonight, I'm gonna get more coffee and maybe some eggs benedict.
 
you usually sleep that short?
 
@AvnerShahar-Kashtan You're in TA right?
 
7:40 AM
@MadaraUchiha Yup. Humidity central.
@Proxy Sick baby.
Well, not that sick anymore. Just hungry in the middle of the night.
 
Around Rothschild, by any chance?
 
Nah. A bit to the north-east, around Nahalat Yitzhak.
 
I think MadaraUchiha is planing something evil
 
@AvnerShahar-Kashtan Ah, near my previous company then
Ah well, thought about grabbing lunch one day, but you're a bit off-ways 😛
 
Sure, one of these days.
 
7:47 AM
you know whats funny if you go up to zahala I don't think its that hot
like a protective shield is applied to the neighborhood :^)
 
and it has to do with AvnerShahar-Kashtan
 
The absolute best thing you can do with eggs is a hot egg sandwitch.
Sliced hardboiled eggs, chives, lots of mayonnaise (hint - dont use butter - use mayonnaise as butter) all with a dash of sweet paprika, pepper and salt
yumm
 
@Nerdintraining Heh, I'm planning various evil things, most of them have nothing to do with Avner.
 
@MadaraUchiha oh. I was expecting making Avner your slave or something like that.
 
@Nerdintraining What for, all ya'll are already my slaves
Have been since about 2012 when my Eye in the Moon plan completed
 
7:50 AM
Seems like a reference to Naruto, wich i only watched partilly
 
sounds like a dr evil master plan tbh
 
Teo
Hi guys, I have a problem with my MVC solution and SignalR. Hope you can help me:

In my solution I've 3 projects:

Project A (MVC) -> localhost:8001
Project B (SignalR)
Project C -> localhost:8002

In project A I can send and receive notifications via SignalR with no problems.
In project C I've referenced the same project B but when I send a message from Project C, Project A can't receive it.
Can you help me?
 
@AvnerShahar-Kashtan mine also couldn't sleep well. Couldn't keep open my eyes, so half slept holding my head against the crib.
 
Mine woke up at 2:45 and took until 4:00 to fall asleep. And has been doing similar things for the past two weeks. So.. yeah.
 
how to rephrase that my last sentence? It's very hard to understand IMHO with my wording.
 
7:58 AM
Couldn't keep my eyes open, so I ended up half-sleeping with my head against the crib?
 
my sincere condolences
 
something along
 
@Teo @Teo Look to the line of codes where you are sending message from Project C to Project B and receiving message in Project B
 
@ntohl Your syntax makes perfect sense to me. Then again, my brain is a bit fried.
 
@KamilSolecki Yeah. That's much better
 
Teo
8:03 AM
@ARr0w thank you for the answer! Here is the code: pastebin.com/9jSFWxn0
I think that sending and receiving message from A is no problem because the url is the same.
When I send a message from project C, the project A can't receive it because it is on another URL.
I don't know how tell to use the same url to send and receive message.
 
this is javascript. First, I know little Javascript. Second i can help you logically. SignalR must be the 'server' b/w two projects which are "A" and "C"

Send Message from "C" to "B (Server)" then let "B" to send that message to "A". If i am getting your problem correctly this can resolve your problem.
 
@Teo Mount both under the same port.
 
Teo
@RoelvanUden Hi @RoelvanUden!
The Project C is a WebAPI project... When deployed they run on the same port, but Project A is a sub application of project C. When deployed the problem persist.

Can I configure the hub of project B in a way that run always on a specific url, so it's shared between MVC project and WebAPI project?
 
8:24 AM
can anyone please share a simple drag and drop file upload for c# using HTML 5 file element?
i am not able to get the files in server side when drag and drop into the HTML5 file element with runat="server" tag
 
AHOY
THE RUM IS GONE
WHY IS THE RUM GONE
 
Probably the rum has also gone into my 18GB memory leak.
Everything is in there but the kitchen sink.
 
18gb.. memory leak?
oh boi
 
Well, an 18GB memory dump for our process that usually stays around 400-500MB.
 
8:29 AM
sounds like it would fry my machine 4 times
 
!!tell Kieran kieran2
 
@Nerdintraining Don't be annoying, drop the @, nobody likes a double-ping.
 
    foreach (var requiredAttribute in requiredAttributes)
    {
        var attribute = this._attributes.FirstOrDefault(attr => attr.Id == requiredAttribute.AttributeId);
        if (attribute != null)
            query.AppendLine($"([{attribute.Table}].[{attribute.Field}] is not null)");
        if (requiredAttribute != requiredAttributes.Last())
            query.AppendLine(" AND ");
    }
why isn't the last equals to the element
ever
 
....18gb memory leak
how
 
8:33 AM
requiredAttribute != requiredAttributes.Last()
 
@AvnerShahar-Kashtan how?!
 
@KamilSolecki Remember me
muahahaha sorry to rub it into your face :P
 
@Kieran That's what I'm trying to figure out.
 
0-2 I give up I was a retard yeseterday
I will play you today though
 
Good god
 
8:34 AM
^^
Bring it on bitch :P
 
That's 8GB of strings.
 
What's up with the hate on the youtube spotlight video today?
havn't wathce dit fully but don't get it^^
 
its political
also young turks lol, everyone hates the young turks
 
@KamilSolecki lichess.org/10XpWZ1w
^^
accept when ever youre ready, i am afk nows
 
8:58 AM
@Nerdintraining I am more than a fish...
 
@satibel wat
 
@Nerdintraining I am more than a man...
 
@GoJavaAndCSharp look at unity 3D
 
9:24 AM
Jeej. I passed for the C# exam (70-483) :D
 
Congrats. slow clap
So you're now an official C# devzor?
 
Well I'm a junior already cuz they were so stupid to hire me xD
 
Not so negative yo.
 
9:29 AM
I'm very positive! Passed the exam without learning for it. Win win situation =)
 
I'd offer you rum, but the rum is gone
 
Why is the rum always gone?!
 
@Kieran why is it gone?
One
Two
One
Two
 
wot
 
9:31 AM
^^
 
@Kieran what do you think about the newest Pirates of the Caribbean
 
Not seen it yet
Looks like it should be good though
 
10:09 AM
Hmm. Let's say I have a LINQ groupby clause which returns a list of groups of strings. Say, something like this:
"1": { "meat", "cheese", "potato"}
"2": { "cheese", "potato", "meat"}
"3": { "cheese", "meat", "potato"}
Is there a simple way to find the group in which "meat" comes before "potato"?
Without pulling everything into RAM?
I'd have to have some kind of IndexOf operator. Not sure I can push that into SQL.
I'll have to resutrcture that query.
I have a table with three columns - CaseId, Action and Timestamp. Each case can have several actions. I want to find all the caseIds for whom action A took place before action B.
The current implementation used a Join to create a joined table of all Action As and all Action Bs together and compared their Timestamps. That resulted in >10GB RAM with realistic test data. :(
 
you mean
inputArray.Where(p => p.IndexOf("meat") < p.IndexOf("potato");
?
 
@Nerdintraining Loving his talk there :d
 
~~~~~~~~~~~~~~~~~
I can't google it properly.
Can someone help me find a tutorial or anything of the support that shows/teaches me how to display the window from a diffrent process in my application?
I mean like teamviewer, obs or skype does.
~~~~~~~~~~~~~~~~~
@RoelvanUden ya It's super!
 
10:25 AM
dis is c++ :(
 
@Nerdintraining what exactly are your needs ?
static picture or video? local or remote? single specific app or any program? do you need it to work with fullscreen DirectX or not?
 
Hmm how to put it genereally?
Imagine there is a youtube video running on one firefox, i would like to capture just the portion of the screen wich is displaying the video.
Display it in a diffrent window wich is always on top.
God i have a hard time explaining what i want to do today..
@satibel video, local, specific programm window, no need for fullscreen on my app
my brain hurts
 
would the captured zone be hidden or not?
can't you just get the address of the youtube video and play it ?
but using CopyFromScreen 30 times per second would probably be the easiest.
 
Thanks for the input @satibel
It's not necceseraly about youtube vids
 
> Examples

The following example demonstrates how to use the CopyFromScreen method. To run this example, paste it into a Windows Form. Handle the form’s Paint event and call the CopyPixels4 method from the Paint event-handling method, passing e as PaintEventArgs.
C#
private void CopyPixels4(PaintEventArgs e)
{
    e.Graphics.CopyFromScreen(0, 0, 20, 20, new Size(160, 160),
        CopyPixelOperation.SourceInvert);
}
add a loop with this.Invalidate(); and a sleep for 30ms or so.
 
mr5
10:41 AM
@Nerdintraining like what facebook does, when you scroll down far enough while the vid is playing?
 
i was thinking more like, what you (could) do with skype.
"Share Screen", a specific window or even jsut a specific area on that window
 
Morn All
 
share screen is not local.
 
mr5
@Nerdintraining you need to find a way to hack skype codebase then
 
Thanks again for the input @satibel. I will pop something in my mouth and come and then attack the problem again^^
 
mr5
10:44 AM
but it's down :/
so there's a "Internet Investigator"
 
@Nerdintraining github.com/humphd/VncSharp using vnc would probably be the easiest for a non hacky thing.
 
hello everyone
 
@mr5 DMCA struck again.
 
guys, really quick question, how can I limit my winforms application to be executed and run only once on a PC ?
 
@mr5 actually found it on the usual suspect.
 
user7442629
11:16 AM
Guys is there any easy method to, from a string, get the first sentence and the rest of the text (in an array, perhaps)
 
user7442629
Or anything known of that sort
 
user7442629
I want to get the 'Header' and 'Body' of a paragraph
 
user7442629
Oh nevermind I guess this works
 
user7442629
private string[] GetTitleAndBody(string text)
        {
            int? indexOfFirstSentence = GetIndexOfFirstSentence(text);

            if (indexOfFirstSentence == null) return new string[] { text, string.Empty };

            return new string[] { string.Join(string.Empty, text.Take((int)indexOfFirstSentence)), string.Join(string.Empty, text.Skip((int)indexOfFirstSentence)) };
        }

        private int? GetIndexOfFirstSentence(string text)
        {
            char? previousCharacter = null;
 
user7442629
I doubt there's an easier way to do it?
 
11:20 AM
476
Q: What is the correct way to create a single-instance application?

NidonocuUsing C# and WPF under .NET (rather than Windows Forms or console), what is the correct way to create an application that can only be run as a single instance? I know it has something to do with some mythical thing called a mutex, rarely can I find someone that bothers to stop and explain what o...

 
@satibel huh, so everyone uses mutex. ok cool :D thanks @satibel
 
user7442629
@AdiMohan the easiest way is to have a registry value of '0' or '1' that indicates whether the program has already been run or not - you have to be careful to make sure to change it back only when the instance that was meant to run (the first instance) closes
 
@Aleksbgbg nope, if you unplug the computer, you can't start the app anymore.
 
user7442629
@satibel then log a PID to check if the PID that made the change exists and has the same title of application
 
the short version i found with mutex was as follows :
 
user7442629
11:23 AM
Or something dodgy like that
 
user7442629
I've done it before and it worked pretty well, though I was the only one to use the app and I couldn't predict all possibilities
 
@Aleksbgbg dodgy indeed.
 
bool result;
var mutex = new System.Threading.Mutex(true, "nameofapp", out result);
if(!result)
{
MessageBox.Show("msg", "title");
return;
}
seems to be the easiest way to do it. does it have any negative implications doing it like this VIA program.cs?
 
though what you proposed is good for checking if the program closed correctly.
 
user7442629
I thought of that on the spot but it actually is - I'll be using that in the future I guess
 
11:32 AM
@AdiMohan not sure if that works, result is true if a local mutex was created, but I'm not sure that it is always removed when not in use.
prefer this as it also calls the current running one to bring it on top.
 
user7442629
Is there any way to force XML to output tags like this
 
user7442629
<Chicken>
    [content]
</Chicken>
 
you mean indent?
 
user7442629
Because for non-tag content (i.e. string) I'm getting <Chicken> [content] </Chicken>
 
user7442629
Yes
 
user7442629
11:34 AM
I'm using System.Xml.Linq by the way
 
user7442629
Not System.Xml
 
well, then your string is "\r\n\t[content]\r\n".
 
user7442629
Clever
 
user7442629
:D thanks
 
user7442629
11:37 AM
That's for System.Xml
 
user7442629
System.Xml.Linq uses lots of nesting and I didn't know if there was something you can do like new Metadata("Indent it pls thx xx")
 
you can but you need Metadata("I beg you indent it pls thx xoxo")
 
user7442629
Nice
 
user7442629
I'm using that already but the \r\n solution works fine so thanks
 
11:39 AM
@KamilSolecki This isn't INTERCAL
 
@Aleksbgbg you need to be careful when parsing the result, as it will contains the line returns and the tab.
 
@KendallFrey Sometimes when I look at code written late in the night this seems to be false.
 
user7442629
Yeah of course
 
@KamilSolecki You ought to give REBEL a try
 
user7442629
@KamilSolecki had that one too many times
 
11:41 AM
you'll need to Trim() it.
 
user7442629
I mean
 
user7442629
'had that one - too many times'
 
user7442629
not
 
@KendallFrey I think it could be a problem that I am an absolute failure when it comes to regex? :D
 
user7442629
'had that - one too many times'
 
11:42 AM
@KamilSolecki That may indeed prove a slight hindrance
 
user7442629
RegEx is easy
 
user7442629
www.cheattableonregex.com
 
@Aleksbgbg did you mean regex101.com ?
 
user7442629
@satibel didn't know about that one, thanks
 
user7442629
11:45 AM
Been shooting in the dark a few times and definitely would need that
 
it's pretty useful against that.
 
I could probably copy a big DB by hand in the same time it would take me to write a proper regex query.
 
\/!{2}$\/$0$`\/(?<!@)[\\\\\\\/](?=.*!{2}.*(?<!_)$)\/@$0\/(?<!_)$\/_\/@(?=[\\\\\\\/])\/\\\\\/(.+)_\/$>$1!!/!{2}$/$0$`/(?<!@)[\\\/](?=.*!{2}.*(?<!_)$)/@$0/(?<!_)$/_/@(?=[\\\/])/\\/(.+)_/$>$1
 
user7442629
You know I wrote a very nice and ugly single-line piece of code of width the size of Asia that worked perfectly but I had to disassemble it into a for loop because Xml was giving me a bad character error and then I spent 2 hours finding it and then without fixing it the character was gone
 
user7442629
11:50 AM
Now I'm dissapointed AND left with 50 lines of code extra
 
user7442629
Which I almost lost just now because I copied @KendallFrey's thing after I copied the code to save to an external file because I don't want 50 lines of code as a comment since i might need it again if I mess up the documents I just parsed
 
user7442629
!(Great day ahead)
 
Hey guys!
 
user7442629
Hi
 
3
Q: How to Create a Cross Reference Check?

Kevin MaxwellTLDR: I am trying to make a reference from Case A to Case B and I want Case B to be able to recognize there is a reference from Case A. In my application, I have a section where I connect Cases to each other in order to be able to process them together. This section is called Case Cross Referenc...

Can someone please help me?
 

« first day (2440 days earlier)      last day (2511 days later) »