« first day (2649 days earlier)      last day (2525 days later) » 

06:20
How can I debug my application and see the starting point and it's execution flow?
mr5
mr5
06:40
o/
mr5 please tell?
mr5
mr5
Our country is finally going to be a federal states which means, the Manila will be decongested and soon provincial rates will vanished
@pluto20010 sorry I'm not in the mood to answer programming-related questions
okay! :/
User.Identity.IsAuthenticated automatically becomes true when I log in?
Where can I see the flow happening at the back
07:15
ohayou
Ohi!
@pluto20010 Reference source. Google it
I checked it, I figured out it the user credentials are saved in the the configuration file
so maybe from there it checks
08:07
hello guys
i used this code to lock a folder
public void lockit(string folderPath)
        {
            DirectorySecurity ds = Directory.GetAccessControl(folderPath);
            ds.AddAccessRule(fsa);
            Directory.SetAccessControl(folderPath, ds);
            MessageBox.Show("Locked");
        }
it locks the folder sucessfuly
but when i copy the folder to a usb flash drive or another coputer its not locked!
how to i make it to be locked everywhere?
You can't.
Security attributes are NOT copied across disks
IF the target disk does not support em
@HamreenAhmad that's not how it works
08:30
How do i get that goal?
@milleniumbug
@RoelvanUden
I mean how to lock a folder that cannot be opened every where
Any idea?
good morning
there is nuget version of it also
You mean do i zip it with a password?
@ntohl
yes
Thanks i try...
09:20
That's the only real way. Encrypt the shit out of it
user5500750
10:08
Have you ever had a situation where you add a NuGet package but Microsoft Visual Studio never finds the namespace in the editor but when you build it - it works.
good morning guys
user5500750
But when you add something like; using Combinatorics.Collections;
user5500750
You just get the error: The type or namespace name 'Combinatorics' could not be found
who requests and response between client and server>
?
can a server also request?
Then the server would not be the server but a client.
But yes, any machine can be both client and server. There is no clear distinction.
10:17
so our browser(client) can act as a server too?
for example if cookie is made
No. A browser is an example of a program written to be a client, and nothing more.
user5500750
Can a server call back a browser to do something?
user5500750
...send a request back to the browser.
Only if there is an open connection that was initiated by the browser (e.g. the client)
@user5500750 nuget downloads the stuff into packages after build. The dll is missing with the namespace before build
user5500750
10:18
But not through HTTP?
You can overcome this by right click on solution, and restore nuget packages
@user5500750 Again, only if there is an open connection that was initiated by the browser. Bidirectional communication is possible on the modern web, using WebSockets. But again, the browser initiates the request to open a bidirectional communication channel, and never the server.
@RoelvanUden Does it happens when it takes the information stored in cookie at the client machine?
@pluto20010 That made no sense at all.
I visit a website(make a request to the website's server) and store my credentials
website responds and creates a cookie on my browser
user5500750
10:21
@ntohl The dll is there.
now next time I send a request
how server knows about the cookie?
I'm pretty sure that doing:
lstNames.Where(x => x.Name.ToLower().Contains(txtName.Text.ToLower()));
is not the way I tell C#: search in this list with no case sensitivity
user5500750
This has just started happening recently on just one of the projects that I am working
The response of the server includes a http header, 'Set-Cookie', which your browser may or may not respect and stores the data in its own cache. Then on each subsequent request, the browser adds a http header 'Cookie' which the server can read.
Really, this is HTTP 101 and you should read up on it if this confuses you.
thanks
104
A: Case-Insensitive List Search

Adam SillsInstead of String.IndexOf, use String.Equals to ensure you don't have partial matches. Also don't use FindAll as that goes through every element, use FindIndex (it stops on the first one it hits). if(testList.FindIndex(x => x.Equals(keyword, StringComparison.OrdinalIgnoreCase) ) != -1) ...

197
A: Case-Insensitive List Search

shaxbyI realise this is an old post, but just in case anyone else is looking, you can use Contains by providing the case insensitive string equality comparer like so: if (testList.Contains(keyword, StringComparer.OrdinalIgnoreCase)) { Console.WriteLine("Keyword Exists"); } This has been availabl...

depends on .net version
user5500750
@MohamedAhmed Technically No. But it is the same thing.
user5500750
I am sure the C# first converts everything to lower case when you use RegexOptions.IgnoreCase
it's not that simple
976
A: Case insensitive 'Contains(string)'

Colonel PanicTo test if the string paragraph contains the string word (thanks @QuarterMeister) culture.CompareInfo.IndexOf(paragraph, word, CompareOptions.IgnoreCase) >= 0 Where culture is the instance of CultureInfo describing the language that the text is written in. This solution is transparent about t...

11:31
FormsAuthenticationTicket authTicket = new
FormsAuthenticationTicket(1, //version
userName, // user name
DateTime.Now, //creation
DateTime.Now.AddMinutes(30), //Expiration (you can set it to 1 month
true, //Persistent
userData); // additional informat
is this different from
<authentication mode="Forms">
<forms loginUrl="~/Partner/LogOn" defaultUrl="~/Home/Index"
timeout="30" slidingExpiration="true" />
</authentication>
please explain
 
1 hour later…
12:41
error: ctrl+k missing
looks like the set arguments are different
sorry
but do they both do the same thing?
I don't know. What does the persistent mean? are there the same information in userData, like loginUrl and defaultUrl? Have You tried authentication with both?
userData contains some addtional information
persistent means the cookie won't expire if I close my browser window
if the <authentication> is on the right place, it should be the same. If the addition info is the same. You can config Your web stuff from code behind too. In fact the web.config translates to code, than that will be used.
both the codes are creating an authentication ticket right?
12:57
In WPF , can you bind a List<string> to a textbox? I basically have a list with the values 1, 2, 3, 4, 5 etc and I'd like to have this direct...
@Dave no. Create a property that flattens the list than and bind to that
hmmm... Thanks @ntohl
@pluto20010 handling authentication yes. Does that authentication have a ticket at all? I don't know how it's handled
13:14
anyone familiar with ftp stuff?
i had to test a tool written by someone else, and that tool accesses a file by ftp
but it says it cannot connect
and i have no clue how it should work
13:27
what should be the default font size when writing a document
?
14:02
it's calibri 11 in my M$ Word
@Wietlol try another ftp client and see if same error. ? Examine packets via Wireshark ?
Tom
Tom
14:19
Hello :)
I want to initialize something in my partial class via the constructor. The other partial class is generated by Entity Framework, so I don't really want to modify it.

Is it somehow possible to extend/override the constructor of the other partial class?
partial class EfEntity
{
EfEntity() {}
}

partial class EfEntity()
{
EfEntity()
{
// I want to do something here
}
}
ImportFailure failure = new ImportFailure
                            {
                                FailedId = fId,
                                Description = des
                            };
How does this make you guys feel?
Applying an 'if' statement-esque setup to object initialization and assigning values to fields within that object as its being created in this fashion.
You guys started to ask the vaguest questions in the world...
ftp not working. What font size. Random class initialization. What do You think?
Tom
Tom
x'D
I'm just asking for your feelings on the syntax itself, not a particular answer for it.
it feels like tasting avocado
>D
14:25
So...gross?
depends on taste >D. Depends on context
btw I think object initialization should be a distinct responsibility
I've never actually seen a class initialized in this particular fashion. The most 'common' way I've seen is something like
ImportFailure failure = new ImportFailure();
failure.FailedId = fId;
failure.Description = des;
ohh. If that is the only question...
I use resharper, since I always do the first
it always corrects me to inline those.
Funny that you mention resharper, because I saw it come up as a suggestion in resharper. I just never noticed that particular correction till now
visually it's more coherent with instantiation.
I like it
resharper thought me how to implement IEquitable also.
14:33
Oh wow. I didn't even know Resharper could automatically create Equality overrides like that. I've created those manually over the years.
@Tom Not sure if this works for you, as I don't know Entity Framework stackoverflow.com/questions/15088426/…
Tom
Tom
@Hpjchobbes Yes, also thought about extending the .tt-file
14:50
Question about SortedSet. If I initialize a new instance with SortedSet<T> Constructor (IEnumerable<T>), can I expect the order of the SortedSet to be the same as the IEnumerable I passed to it?
I'm trying to create an ISet<Widget> which I can enumerate over in a specific order, and I'm trying to do so without implementing a full-fledged IComparer<Widget>, because office politics makes it harder to create new classes than adding statements/functions to existing classes.
I figured I could do this by doing (Iesi.Collections.Generic.ISet<Widget>)new System.Collections.Generic.SortedSet<Widget>(MyWidgetCollection.OrderByDescendin‌​g(x => x.SpokeCount)); but I'm not confident that it will do what I want, and not just do it by coincidence
Oh, you can't cast a System.Collections.Generic.SortedSet into an Iesi.Collections.Generic.ISet. Oops.
1) Test it with an MVCE 2) I wouldn't inherently expect any "set" collection to be sorted and 3) what the actual fuck is wrong with your job
@Kevin I would like to emphasize on @mikeTheLiar's 3rd bullet point
what is the actual fluff...
And I can't do (Iesi.Collections.Generic.ISet<Widget>)new Iesi.Collections.Generic.ISet<Widget>(MyWidgetCollection.OrderByDescending(x => x.SpokeCount)); because the iesi SortedSet initializer doesn't accept any interface that System.Linq.IOrderedEnumerable implements. Dang.
I worked at Nokia. Ok. It was a 2 week procedure to acquire a new variable, that You can use. But that was because app layer was on top of a 16 bit DOS, which only had global variables...
15:11
I mean I'm kind of overblowing the politics aspect. Our style standard is to put every class in its own file unless there's a real good reason not to; and our source control has a problem where "get latest" won't always get new files unless you do an extra step which nobody bothers to do unless they know ahead of time that a new file was added. So this means that when I push to QA or Prod, I have to give them an extra-explicit heads-up to make sure to get the new file
And talking to other humans is an unpleasant experience for me, being a programmer, so I prefer to avoid that where possible
Dang, I was hoping this would do it:
System.Collections.Generic.ICollection<Widget> orderedData = Widgets.OrderByDescending(x => x.SpokeCount).ToList<Widget>();
result = new Iesi.Collections.Generic.SortedSet<Widget>(orderedData);
But it complains At least one object must implement IComparable. So much for that.
On second look, I can implement IComparable on the Widget class without adding a new file to source control. I was misreading it before, and I was thinking I'd have to make a WidgetComparer class or something.
user7538827
Hello
You can add : IComparable<Widget> sure.
resharper helps a lot in that too
user7538827
I have a question, it' possible convert any varbinary files read from Sql Server database to a png?
The implementation for CompareTo will be a bit ugly since SpokeCount is a nullable int, so I'll have to check all the combinations of this.SpokeCount.HasValue and other.SpokeCount.HasValue and have a conditional for each one. Oh well!
15:26
I think You want something with that varbinary file-ish. Or web-ish. That is the latter one.
            byte[] bytes = (byte[])GetData("SELECT Data FROM Images WHERE Id =" + id).Rows[0]["Data"];
            string base64String = Convert.ToBase64String(bytes, 0, bytes.Length);
            Image1.ImageUrl = "data:image/png;base64," + base64String;
just don't do that + id part. Use sql parameter
or Your ORM or whatever
user7538827
+Utente.nome+
those are bad
user7538827
@ntohl but it works only with image
Dang, I implemented IComparable but now NHibernate is complaining could not delete collection. I think I mucked up the Widget entity definition somewhere. Maybe it's not allowed to implement IComparable.
@RiccardoPirani those are still bad.
15:35
Don't really know since we're using a version of NHibernate that's six major versions old and all the documentation has vanished off the Internet
@Kevin I think NHibernate prefers to use IComparable, and if the implementation is slightly off, than it fails.
user7538827
@ntohl thanks
15:50
I think I can tell Hibernate to add an ORDER BY clause, but then I have to change the WidgetCollection from a <set> to a <list>, which I'm not 100% sure how to do since Iesi.Collections.Generic doesn't have an IList type. Maybe System.Collections.Generic.IList will work? Even though thirty minutes ago I encountered a cluster of errors complaining that Iesi and System don't play nice together
Would have been really nice if ayende.com/blog/4043/nhibernate-mapping-list had shown their using directives
Oh, I guess <list> doesn't support one-to-many relations.
Or, hang on, the page I just linked explicitly says he could have used one-to-many, although it would require slightly different syntax. Would have been really nice if he had shown that syntax.
16:09
can I get some help on gridview/updatepanels?
user7480455
Hi All
Just as well since I think the list would use the primary key of the table as the index so if the widget has an id of a million, then the list will have a million minus one empty elements, followed by the widget?
16:26
a million empty elements and one widget?
why does that not sound right
Ok, approach #5: in the same context that defines the Widgets ISet property, also define an OrderedWidgets IList property, which just calls OrderBy on Widgets and returns it. This shouldn't bother NHibernate, provided it simply ignores properties that aren't mapped to a column; and it satisfies the three other constraints imposed on me by ass-backwards third party libraries that I haven't bothered to mention up until this point
"Kevin, you might be the worst in the world at providing an MCVE that conveys your exact requirements", thinks the hypothetical reader. I know, reader. And on that account, nobody is more sorry than me.
Many people are saying
Kevin is the sorriest
MOST SORRY
SAD
We're going to build a wall around Kevin and make him pay for it
user7480455
I still don;t understand the dislike for your leaders
Ok, the property is returning the elements ordered as desired... But every element is being rendered twice. Hell is real and I'm in it.
16:35
@Kevin .Distinct()
user7480455
america has the best of everything and I suspect you leader is good but you all are just giving them a hard time?
@007 I don't understand your use of semicolons.
@007 [citation needed]
Aren't ISets already distinct? So converting from an ISet to a list and calling OrderBy on it shouldn't make duplicates, right?
user7480455
what do you mean?
In other words, I expect that doing myWidgetSet.ToList().Distinct() would have identical behavior to myWidgetSet.ToList(). The duplication is probably happening somewhere between the OrderedWidgets getter and the ultimate rendering of the page
90% of which takes place in the jankiest closed-source library I've had the displeasure of using this year
16:40
Well, it's only January. You have 11.5 months to top that
No, OrderBy and ToList won't make duplicates.
@Kevin you have duplication of lists?
I think infragistics is accessing OrderedWidgets twice and combining them, for some reason. It didn't matter when it was accessing Widgets, because combining a set with itself doesn't do anything.
infragistics
Well there's your problem.
No kidding
16:47
@mikeTheLiar pls dont be a rubber duck
:D
So now I just need a type that implements ISet and doesn't allow duplicates, and which retains the original order of the elements as I inserted them the first time
LinkedHashSet?
I mean... ISet, no duplicates, ordered... duh
user7480455
are you feeling well today mike?
Okay. Not phenomenal. I've been worse. I mean, I've been better, too, but things are okay.
How're you?
I believe Distinct looks for exact matches, so Sample and SaMpLe would actually be different. Since it uses the default comparer for equals. So I don't think it is case sensitive.
user7480455
16:50
thanks for asking ... today I am not well...
ofc you are not a well, you are a person
user7480455
that is true
Sorry to hear that. Hope things turn around.
user7480455
thank you
user7480455
but I'm sureI don;t have much time left sadly
16:53
how much did the doctor say you have left?
user7480455
but good news is that I will be allowed to leave this station and end my working career
user7480455
medicine here is not hat advance so the can;t tell those things..
#define here
user7480455
I am just old.. busted and rusted.. worn out... so it is time for me to just stop as my service time will be over.
user7480455
here as in where I am at right now
user7480455
16:55
there is where you are at now
there is not where I am
I am here
and here != there
user7480455
how can that be
user7480455
if I am here
are you me?
user7480455
you can;t be both here and there
16:56
You're not done until you're done.
But if you're done, enjoy it while you can.
user7480455
no I am 007
ow, ok
user7480455
well I have been working for a long time
user7480455
I have enjoyed all the things that I do and claim to have done
user7480455
but my replacement is being briefed and will be taking over which makes me happy
user7480455
16:58
I doubt they will be granted access to outside sites such as this
user7480455
but I will say that you all here have been a big help. And I thank you
Even if they are granted access, I doubt they will be as entertaining as you are.
user7480455
yeah
17:15
Probably won't be kicked as frequently as well.
user7480455
17:51
The kicking was do to young people being irrational and not using their powers correctly... no one will can work with in that scheme... you just go with the flow and deal with their behaviors as at the end of the day.. it does not matter nor does it have any effect on the parties of either side
user7480455
That is how I look at it.
18:02
@Wietlol I assume you're just joking because the first five google hits for that are all variants of "how do I implement something in C# that's the equivalent of Java's LinkedHashSet?", but just to be sure... Is there such a thing in C# and all five of those posters just overlooked it?
The concept of a linked hash-set seems fundamentally wrong to me somehow.
Either it's a hash set or it's linked.
Unless we're talking about sausage links and hash browns, the two concepts seem incompatible.
Also, now I'm hungry.
!!afk noms
It's academic at this point since I've abandoned the OrderedWidgets approach entirely, but in case my fifth approach to this problem fails, I might revisit #4
18:40
What are you attempting to do Kevin?
I have an infragistics WebHierarchicalDataGrid, the rows of which expand into data islands of multiple rows each. The DataGrid is bound to a Clients collection, and the islands are bound to each Client instance's Widgets ISet. I want to sort each island by Widget.CreatedDate.
Just doing e.RowIsland.Behaviors.Sorting.SortedColumns.Add(e.RowIsland.Columns["CreatedDat‌​e"], Infragistics.Web.UI.SortDirection.Descending); doesn't work because the CreatedDate column is populated by a TemplateDataField, which apparently either 1) can only sort lexicographically, or 2) not be used as a sorting criteria at all.
Changing the Client class' Widgets collection to a List and pre-sorting it before data bind doesn't work because infragistics will render every entry of that list twice. It apparently has to be a type that disallows duplcates.
I have tentatively discovered an approach which works on my machine: create a property on the Widget class, int CreatedDateTimestamp, and create a corresponding BoundDataField on the data island, with the property Hidden="true". Then do e.RowIsland.Behaviors.Sorting.SortedColumns.Add(e.RowIsland.Columns["CreatedDat‌​‌​eTimestamp"], Infragistics.Web.UI.SortDirection.Descending);
My test data is pretty scarce and adding new data to the db is a trial in its own right, but it seems to work AFAICT.
I'm considering this one resolved until QA complains again.
 
2 hours later…
20:42
If I have an Entity Framework 6 edmx file, is there any way to take that and compare it against the actual database and see what the edmx file has that's missing from the database?
@mikeTheLiar the concept is a linked list with O(1) search and insertion (insertion after a specific object that is)
@Wietlol mikeTheLiar is afk: noms
@Kevin after a quick look, SortedSet<T> seems to be the equivalent of LinkedHashSet<T>
The terms 'dynamic typing' and 'static typing' are often misused
but other users say there are some differences, which they are, i dont know
20:44
People often mean 'dynamic checking' and 'static checking'
wait, im talking rubbish
@Wietlol not exactly
sortedset does indeed order them, but not in insertion order
yeah, that
i guess C-harp doesnt have a LinkedHashSet then
it isnt really hard to make though
take the hashset, adjust the generic type to a wrapper type that stores the linked nodes
20:46
I might have been able to use SortedSet, but making Widget implement IComparable made NHibernate very unhappy. Rock, hard place.
then, on insertion and removal, you link the nodes
And the safest statically checked type systems are not purely static
@Wietlol What even is that, a binary search tree?
Normally the point of a HashSet is O(1) lookup, what kind of "linked" structure gives you that?
it's a linked list + hash table (mapping to the nodes of that linked list), the linked list is only for you to provide a specific iteration order (the order they were inserted)
ordered enumeration
20:48
@Wietlol you usually have to pay extra for that
user7480455
"What even is that" funny wording
But Kendall's mom was having a sale.
the lookup remains O(1)
user7480455
oh gosh mike why the mothers...???
So you basically are doing double-entry accounting with all your data?
20:48
@mikeTheLiar 0.o?
@007 We wouldn't be here without them
@KendallFrey welcome to linked node collections
user7480455
this is true
you could also do it with a List, but that becomes messy and will grow in size approximately equally as much
user7480455
what came first the mothers or the harsh words about them
20:50
words
words existed before mankind
user7480455
I a gree
If we're talking about Kendall's mom, she's lucky she came at all.
U a gree?
what's a gree?
user7480455
oh gosh mike
user7480455
that makes me so not comfortable
user7480455
20:51
english is not my first langauge wietol so my spelling could be a bit miffed
@Zorkind hey ^_^ I wasn't in the chat lately sorry lol
21:26
@milleniumbug on a side note, you know Jaba right?
a bit of it, yeah
lets talk in Jaba room
21:40
heyy guys!
and me
help me help u
sends halp
bro, u got a minute to help me out a little?
now its your turn
i can halp you out... im not sure if i can minimize the halp so much that it will only halp a little
21:43
i am currently making a small c# app which will retrieve my emails using pop3
u familiar with that?
not really
are there pop3 related issues?
not soo much of a halp is it
or more general?
it's just email related issue where I am using POP3 to get my mails
what is the issue?
21:44
not working hahaha
try paying it more
i noticed
Error log?
let me share the code and then explain
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
getMail();

}

private void Form1_Load(object sender, EventArgs e)
{

}

private void getMail()
{
using(Pop3 pop3 = new Pop3())
{
pop3.Connect("pop3.live.com");
pop3.UseBestLogin("myEmail@hotmail.com", "password");

foreach(string uid in pop3.GetAll())
{
IMail email = new MailBuilder()
.CreateFromEml(pop3.GetMessageByUID(uid));

richTextBox1.AppendText(email.Subject + "\n" +
email.Text);
}

pop3.Close();
(see full text)
allows Nero to share code
... but only via a code sharing tool
Is POP3 enabled in your Hotmail account?
don't know x.x
Be aware that if you read your messages by POP3 will not be transferred again
pfft y didn't they tell me that in the tutorial...
@Nero what is the issue?
21:47
If you don't want this, use IMAP
@miny1997 wait wat?!
so if POP3 reads my msg, i wont get the same msg on my hotmail?
read + removed
This is POP3
Read the wiki article
try IMAP instead
better switch over to imap
do i need to change hotmail settings for imap?
21:48
Yes
But normally when you enable POP3 you can also use IMAP
im going through the settings, hold on
i need to get this functionality working today
I have a problem with my VSTO Outlook Add-in. I can build the project and install it, but I need also an uninstaller and the setup is a exe and not a msi.
@Nero Do you want to stick with POP3 or switch?
@miny1997 i will have to switch because i need emails both on my app and in outlook
@miny1997 cant find the settings though
Hold on
Settings:
Server: imap-mail.outlook.com
SSL: true-implicit
Port: 993 (default)
User: pat@hotmail.com
Try it without changing the settings
where do i input these settings?
21:56
Try it with Outlook
Then move to the implementation
Wait...
Is there a lib which can havle IMAP over SSL?
it even looks like its the same lib he uses
... maybe
nvm, i guess its not
i don't know if it makes sense but I am using reference file of Mail.dll
do excuse me because i am new to this stuff
Mail.dll could be anything
it could be something someone made just for fun
or it could be a highly used library for mailclients
98
Q: Accessing Imap in C#

UnkwnTechIs there a built-in method to access an Imap server (with SSL) in C# or is there a good free library?

this could also be useful
@miny1997 that code is intense!
22:03
This one is more for you
Or search at NuGet for an IMAP client which supports SSL/TLS
i genuinely don't understand why isn't imap working?
Otherwise you risk unencrypted data interchange and I don't know if Hotmail supports unencrypted interchange
Can you connect by Outlook to your account?
i was able to send emails before but not receive them
but i only wanted receiving functionality in my app so i deleted the sending options
Ok...
The POP settings look like this: https://puu.sh/z364l/bd47172ffa.jpg
IMAP should work without it. But first test IMAP by Outlook or Thunderbird so you know if it could work by C# in the first place.
yes, settings are on
these are the IMAP settings but where do i put them?
Server name: imap-mail.outlook.com
Port: 993
Encryption method: TLS
22:12
IDK, i use the web client. Let Outlook find the settings automaticly
x.x
nevertheless thanks bro
hi. anybody can help me with this: stackoverflow.com/questions/48290630/…

« first day (2649 days earlier)      last day (2525 days later) »