« first day (2972 days earlier)      last day (1980 days later) » 

mr5
2:32 AM
o/
@Sinjai haa! that's what I always thought
but didn't had the chance to say it or always forget to bring that up every damn time
If I have been given a task to parse that format, it would give me a hard time since I can't find a separator pattern
ha! I think I got it using RegEx
[a-zA-Z\/0-9.;]+ ?(\([a-zA-Z\/0-9.;, ]*\))?
[a-zA-Z\/0-9.;]+ ?(\([a-zA-Z\/0-9.;, _]*\))?
I guess the format is not standardized
I can't find a single SO post regarding the way how to interpret or parse this data
[a-zA-Z\/0-9.; -]+ ?(\([a-zA-Z\/0-9.;, _]*\))?
can handle all the UAs mentioned from this post
 
3:05 AM
[a-zA-Z\/0-9.;]+ ?(\([a-zA-Z\/0-9.;, _]*\))? is a standard regex
 
mr5
where can I find that?
 
pcre, js and phyton are successful parsing this regex.
 
@mr5 What's that?
 
mr5
@Sinjai that's a question my friend
^^
 
3:50 AM
What were you at-ing me about?
@mr5
 
mr5
@Sinjai click on that arrow to follow the context
 
4:05 AM
meh
 
4:15 AM
G'Afternoon!
 
 
3 hours later…
7:05 AM
Goooooood moorniiiing CeeeeeShaaarp! What funny thing happened to you or you got to witness lately? Winter starting in your corner of the earth too?
@HéctorÁlvarez I kinda wanna read your résumé
 
pokémon
 
Wingardium Leviosá
 
7:26 AM
ohayou
@Squirrelkiller actually more like spring is starting. The last few days the daily temperature is around 16 C. Week before that it was around 0
 
Guys
If you are using the same line 2 times, should you create a method?
 
Depends on how big that line is
probably not
unless you feel you might need it again in the future
 
it is small yep
                if (currentTask.FileInfo.Checksum != newTask.FileInfo.Checksum || (currentTask.StateInfo.TaskState != EDownloadTaskState.Complete && DestinationPathHasChanged(currentTask, newTask)))
it is just this
 
oh man
maybe make a bool before the if, for readability
or seperate bools and then go
if(filesAreDifferent || taskWasChanged)
Or something
right now it's really hard to understand what that if wants
 
okk
Thanks!
maybe with the comment
it is ok
/* Check if checksum or destination path has changed.*/
                if (currentTask.FileInfo.Checksum != newTask.FileInfo.Checksum || (currentTask.StateInfo.TaskState != EDownloadTaskState.Complete && DestinationPathHasChanged(currentTask, newTask)))
 
7:40 AM
Better than before, although I'd probably prefer seperate bools if I had to maintain that. Not sure though.
yo
 
yo
 
you mean, changedCheckSum and changeddestinationPath
 
checksumCHanged and destinationPathChanged, but yeah basically that
 
Or maybe even make the checksum bool less technical. Not sure if it's about the file itself changing, or maybe somebody writing i na console or something.
Domain language if possible, since it's the more human understandable part
Whats a second level program?
They say in Linux, /usr is also for "second level programs" - what are those? End-user programs?
 
7:56 AM
yo
 
8:44 AM
yo
 
@Wietlol I didn't actually mention your name, fyi :P
It wasn't a personal attack, I just don't agree with that idea
 
The problem is that in C# and similar languages, it's easy to confuse between "class" and "service", because services are implemented as, well, classes.
"service" here refers, architecturally, to an entity that provides services to other bits of the code.
 
well class is rather generic
 
So if my client has a PotatoViewModel that gets its data from a PotatoManager which retrieves the data from a PotatoResourceAccessor, than the PotatoManager and the PotatoResourceAccessor are services, and it makes sense to have them implement interfaces for easy separation, mocking and DI.
But these services will probably use several other classes, like Potato and HttpClient and PotatoMetadataCollection, which aren't necessarily services, and don't need to automatically implement an interface out of blind cargo-cult practice.
But technically, C#-wise, both Potato and PotatoManager are both classes, and people get confused about the different roles they serve in an application.
 
9:02 AM
Guys, I have a piece of regex here, and I seem to mis-understand it's meaning:
memberName = Regex.Replace(memberName, "`\\d+", "");
Shouldn't that math something like "`\", "`\3","`\55" etc? Instead, it does match the following without any backslashes...: "`3", "`55" etc
 
9:17 AM
@Bechi The double "\" is just escaping the second slash
So the proper regex being used is `\d+
\d is any number digit
and \d+ is at least one number digit
so any number following a ` is what you're matching
 
I do not know from where this is getting the filenames:
            return Directory.GetFiles(path, SearchPattern, SearchOption.AllDirectories);
Because if I remove any file inside that path it will be restored when it runs
 
@QuicoLlinaresLlorens what do you mean "it will be restored when it runs"?
 
I mean, I do the test
and that line is executed, so if I had removed any file inside the path
then it will be restored
so, I do not know from where is getting the filename. Because I see there the path, but not the filenames
 
that call should be giving you a list of all directories at path "path"
it shouldn't be altering the state of anything
 
9:33 AM
hello guys. any good tutorial that explains how to use queue? i want to use concurentQueue for Enqueing object to queue and dequeing
 
@Bechi There are two escapings going on here. One is the C# escaping that escapes "\\" to "\". The second is the regex chracter which parses "\d" as "a digit". At no point does the regex search for an actual backslash, which would probably be expressed in regex as "\\\\".
 
@Kob_24 The concept is fairly straightforward. If you want to grab an item from the queue and no items are there, your thread waits
If a thread tries to add an item and it's full, that thread waits
It allows two threads to pipeline work
 
@Neil ConcurrentQueue doesn't wait, that's a BlockingCollection.
 
@RoelvanUden then I'm confusing myself with Java
What does ConcurrentQueue do?
 
ConcurrentQueue is just a Queue<T> that is thread-safe. It has Enqueue and TryDequeue. Enqueue puts an item on the queue. TryDequeue might get one from the queue. It's thread-safe.
If you want to wait for an item, you can put a ConcurrentQueue in a BlockingCollection.
 
9:36 AM
ohh ok orger that
 
@Neil dont worry, im not offended or anything
 
Open-sourcing WPF is a nice move.
Winforms... well, ok, Winforms too.
Most of the code still isn't up on their repo, though.
 
I like WinForms for what it is.
 
Glancing at the code, it looks like signifcant chunks of the Winforms-over-.NETCore code is the original Winforms-over-.NETFx code, simply copied.
Which might explain why there are still places using ArrayList in it.
I'm pretty sure this line of code is unchanged since 2001:
https://github.com/dotnet/winforms/blob/master/src/System.Windows.Forms/src/System/Windows/Forms/Screen.cs#L487
 
WPF is on there too?
 
9:45 AM
Will be, soon. Right now it's mostly System.Xaml.
I'm told that the Avalonia team are ecstatic at having a good Xaml library to use instead of the one they're currently using.
 
Hi all, I would like to ask how can I write admin password into cmd with C#. I got problem when I open batch file to execute some code and at the end execute that code:
runas /user:Administrator c:\utility\info.bat.
There I need to insert password for admin rights. How can I put that password in? Thanks for help.
 
hmm... decisions
either copy a private method across all classes that do this.
or make the method public and have the chance of other pieces of code using it
 
10:02 AM
@LukaToni You realize that the reason there isn't simply a /password:<blah> parameter is precisely so you can't easily do that, right?
 
I know that
 
how do you run the command?
 
Process p = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo("CMD");
startInfo.Verb = "runas";
startInfo.Arguments = "/user:Administrator \"cmd /C D:\\TOOLS\\DISABLE.bat\"";
startInfo.Password = pass;
startInfo.UseShellExecute = false;
//startInfo.RedirectStandardOutput = true;
p.StartInfo = startInfo;
p.Start();

//here execude: runas /user:Administrator c:\utility\info.bat.
//TODO: insert password in CMD
 
@LukaToni right click on your executable and go to properties
Make it so that when your executable is run, you must have administrator rights
If you're already admin, it won't ask, it should just run (and consequently anything it launches which requires admin rights won't ask)
If you're not admin, it'll just ask the password immediately rather than later
the "not asking" thing has to do with windows settings.. because if I'm not mistaken, there's a property which will cause windows to ask even if you are administrator
So this approach, or you just make the bat file that you're running not require administrative rights
 
10:24 AM
you could write the arguments as stream
then you can write this command, followed by the password
... or just run it as admin
 
providing the password seems like an extraordinarily bad idea
and on multiple levels at that
 
especially when it is treated as a string
 
@LukaToni what happens if you redirect input? Does it asks for the password in the inputstream?
 
10:50 AM
I will try with redirected input.
 
@Squirrelkiller Do you mind if it's in spanish?
I've edited out the personal info fields
the rest is verbatim
technically it should be PDF but I can't edit a PDF obviously.
oh and feel free to criticise everything you don't like
constructively.
 
11:15 AM
Gracias amigo
Trying to learn Spanish anyway, so that helps :D
 
As always, feel free to ask
 
So. Much. Vocabulary.
 
11:43 AM
@Neil Thank you, stupid me
 
@Bechi nah, you're not stupid for asking :)
 
@AvnerShahar-Kashtan Thank you to. I could more explicitly use the verbatim string @"`\d+", correct?
 
guys how can i pass arguments to windows service via pwershell when i start service?
 
@Bechi That's the same as what you have
If you want to use a \ in a regex, you have to escape it
 
Yes, I see.
Thank you all!
 
11:53 AM
is this the real life, is this just fantasy? Caught in a landslide, no \"escape from reality\"
2
 
@Bechi Probably.
 
12:33 PM
@Neil I'M JUST A POOOOR BOOOOOOOY!
 
I need no sympathy
 
B-cuz I'm ez come ez go
 
Little high little low
 
Anywhere the wiiiind blows
 
Doesn't really matter to meeeeeeeeee
 
12:35 PM
But it matters to admiiiiiins.... inb4 the spam warning
 
how can you call that spam? That beautiful masterpiece of Freddy Mercury?
 
Mamaaaaaaaaaaaaaaaaaaaa, just killed a man
 
Oh well, it was getting a bit out of control
 
it's one of those songs I have a hard time not singing to the tune to
 
12:52 PM
@KendallFrey if you want to use a \ in a string, you also have to escape it
and if you want to throw that string to JS, you need to escape that too
so you end up with `\\\\` for a single slash
 
\/!{2}$\/$0$`\/(?<!@)[\\\\\\\/](?=.*!{2}.*(?<!_)$)\/@$0\/(?<!_)$\/_\/@(?=[\\\\\\\/])\/\\\\\/(.+)_\/$>$1!!/!{2}$/$0$`/(?<!@)[\\\/](?=.*!{2}.*(?<!_)$)/@$0/(?<!_)$/_/@(?=[\\\/])/\\/(.+)_/$>$1
 
[r](?=e)..(?<=g)\u0065[^\u0000-\u0077\u0079-\uFFFF]
 
guys any idea how to install windows service on network service via powershell ?
 
!!googleme how to install windows service on network service via powershell
 
@Wietlol Yes, that it is
 
@KendallFrey what does yours do?
 
It's not a single regex, it's a quine in REBEL
 
but it is a valid regex
 
1:36 PM
>.Net Core 3.0, ASP.NET Core 3.0, EF Core 3.0 will support C# 8.0 and will be relased with them
Thats nice
 
brace yourselves, C#8 is coming soon™
 
1:58 PM
(removed)
 
(removed js)
 
I am getting an exception and it is saying Exception User-Unhandled
But I am doing trying catch, so why it is failing?
 
code?
 
2:14 PM
private IEnumerable<DownloadTask> CreateAvailableFileTasks(IReadOnlyCollection<TPlatformType> items)
        {
            try
            {
                if (!Directory.Exists(this.DownloadPath))
                {
                    this.Logger.Warn($"[{nameof(BaseFillUpExecutor<TWebType, TPlatformType>)}] {this.ServiceName}: The specified download path ({this.DownloadPath}) does not exist. Fill up mode will be aborted.");
                    return Enumerable.Empty<DownloadTask>();
                }
 
@QuicoLlinaresLlorens Well, my guess is there's another exception being thrown
try catching Exception instead and see if the effect is the same
If it's caught, you're not catching the right exception here
 
But it says is throwing ArgumentException
 
you've got several things going on here.. it wouldn't surprise me a bit if the exception were being thrown elsewhere
 
2:31 PM
@QuicoLlinaresLlorens Call stack?
 
@QuicoLlinaresLlorens Maybe it's a different type of ArgumentException than the one you're expecting?
It's not possible to know without having more information
Humor me please.. change ArgumentException to Exception and tell me what happens
 
2:59 PM
 
3:20 PM
> if (Debug) TerminateProgram();
I think this has been the worst hotfix I have seen in ages
 
It fixes the error
 
}
catch (Exception e)
{
    Path.at("C:\\dev\\Workspace\\Proj").DeleteAll();
}
 
3:50 PM
What if you don't store your files in C:\dev\Workspace\Proj
 
then you are safe
you ofcourse put the path of your colleague there
 
Noone is safe when JS exist in world
 
D:/Work/Projects/
 
You can access your colleagues files?
 
no, but colleagues will also develop this application
until their projects are gone
 
3:52 PM
But you wouldn't be able to delete your colleagues files unless they ran the applicationm
 
and they will git pull the code
and they will run the code
and they will cry on top of the missing code
 
That's not nice
▄   \     ▄
 █💩💩💩█
 █💩💩💩█
 █💩💩💩█
  ▀▀▀▀▀▀▀
That's stirring shit
 
no no no no no
-3
Q: Print element from ArrayList<List> in java

dbachhavGetting ' method size() is undefined for the type Object' issue when I am trying to print element from my list of list. ArrayList holds below values: [[1,2,3],[4,5],[6,7],[8,9]] public static List List1 = new ArrayList<List>(); for(int i=0;i<List1.size();i++) { for(int j=0;j<(Li...

this is stirring shit
 
No it's not, that would work fine in C#
Replace Size for Count of course
 
4:08 PM
that would still not work fine in C#
IList list = new List<List<Object>>();
list[0].Size; << error, cannot get Size of Object
except that... the non-generic IList doesnt exist in C#
nor the non-generic ICollection
which I find odd
oh wait
they do exist
but IList<T> doesnt extend it
so that would also give an error on the first line
 
new List<List<Object>>() that are two list so whould be list[0][0]?
 
No that's not the same thing
 
and if you wanna to get the nº of elements in c# is Count
 
You can't get the size of the first item because the first item doesn't exist
Not you @Arngue
 
@LeeButler but that is a runtime issue
the SO question is a compile time issue
 
4:14 PM
The SO question is also in Java
 
IList<Object> list = new List<Object>();
list.Add(new List<Object>());
var countOfFirstElement = list[0].Count; << this is not possible
 
That's not the same thing either
 
that is what he is trying to do in the SO question
 
No boecause in the Q list is defined as Arraylist<List>
Not a List<object>
 
> public static List List1
its defined as List<? extends Object>
 
4:17 PM
The child type is specified so Size() would work ebcause the compiler knows the child is a list
 
which, in C#, is pretty much equal to IList<Object>
 
Oh I missed that bit because who the fuck defines like that
 
dbachhav does
 
It should be public static ArrayList<List> List1 = new ArrayList<List>()
 
a regular Jaba pleb would do List<List<Object>> myList = new ArrayList<>();
 
4:19 PM
Why would they do that? Is Arraylist derived from List?
 
and he would make it private non-static
List is an interface in Jaba
ArrayList is the default implementation you would use
 
Maybe there's a reason for it to be public static
 
Java - C#
List<T> - IList<T>
ArrayList<T> - List<T>
Shit - ArrayList
 
C# Arraylists are aids
 
(disclaimer, the class Shit doesnt actually exist in the default Jaba packages)
 
5:19 PM
ASP.NET is testing my patience
 
 
1 hour later…
6:34 PM
ASP.NET MVC 5 - ELMAH returns a generic HTTP 500 error when I go to the web page for the list, and it isn't logging to SQL Server like it's supposed to. I can't figure out how to get a more detailed error. It works fine on the test server but not on production. Any ideas?
Oh, Windows event logs show it's trying to access the SQL database with a different account than the IIS app pool account the rest of the application uses. But why...
 
7:23 PM
I'm building a REST API using asp.net Web API and using Swagger to test it
Running into an issue where on a Get request, a property in an object doesn't serialize back and appear in the response
model looks something like this:

class A{
    int id
    List<B> firstList;
    List<B> secondList;
}
On the response, only the first list will appear in the serialized response
but not the second one
Even if there's stuff in that second list from the query
Checked in code
And the list isn't empty
 

« first day (2972 days earlier)      last day (1980 days later) »