« first day (2151 days earlier)      last day (2811 days later) » 

user3295818
2:54 AM
 
5:19 AM
hello, i had an interview several days ago, i didn't know what was difference between Union and Union all, i didn't know what was difference old Web Services vs WCF, i didn't know when and why we should choose code first vs database first, does it make me bad programmer? :))
 
5:37 AM
@QuietNaN, as always on the itnernet, yes, yes it does :D
nah jk i didn't even know those words exist :D
@RoelvanUden Good morning sensei
 
Is there a union style thing in C#?
 
@RAGHUNATH you know the last one is fawlty right?
 
5:53 AM
@Nerdintraining Wouldn't it make a rectangle that's closed though? It would just have things jutting out, right?
 
In my eyes it is not a closed rectange,
its like sayign this: @
is a citcle
 
_____|
|     |
|     |
|     |
| _ _+___
It's a rectangle, if I understood it correctly
 
there are things sticking out of it though
which in my eyes doesnt make it a rectangle
It's a mutated rectamngle it is :D
 
It forms a closed loop however, so it is a solution
 
it has ends sticking out of it
like this so called "cicle line" in hamburg --> upload.wikimedia.org/wikipedia/commons/8/8f/…
If you don't pay attention, then you arn't in the loop anymore
If that's a closed loop, please kill me^^
 
6:00 AM
Well, I'd call it a rectangle, because a rectangle is formed and the person who made the question says it counts as one
 
I despise your teacher
:D
 
Who said I had a teacher :P
@Nerdintraining Technically, my teacher is the whole internet
 
@Darkrifts i had hope^^
I thought, "only teachers can think of a task which is utterly bananas, just like that 1"
 
6:18 AM
Moooooooorning
 
Wth am I missing here? I should probably also add that my expected output is only 1, since hte database has only one record. gist.github.com/JohannesSundqvist/…
Morning! @JakobMillah
 
@JakobMillah Jaaackooon is back!
 
Fix your thumbnail damn it!
Shieet
 
if
i
spam allot it is
fixed!
tada
 
Shiet.
 
6:21 AM
lel
 
Just needs the big version of the picture, the small one is buggy
 
Contact meta and they'll fix. Else it's gonna bug both you and me for eternity!
 
i actually quite like it
i am mr. Half Grey now
forget all the full grey men, half grey is the new way to go
 
o/
 
6:23 AM
\o
 
\0
 
Eifel tower!
 
@QuietNaN No, it does not.
 
o/
 
\o Eifel tower @Froxer
 
6:24 AM
Screens were acting weird
One of them was shutting off, the other on
when i first started work laptop today
 
Nevermind my previous question if anyones looking at it now or later, got it fixed!
 
got what fixed how
 
The issue I posted above
 
oh
 
And I wrote a query that did .ToList() instead of .FirstOrDefault() and it worked
 
6:26 AM
ok
 
+ making it queryable
So theres your answer ^^
 
mornign @ElieSaad
 
Haha, hey @Nerdintraining
 
How does default(T) work for a given class T?
 
All's fine i hope
 
6:29 AM
Yeah my friend, what about you?
 
Morning.
@Darkrifts Define "how does it work"? It works because IL has a specific instruction for returning the default value of a type.
 
morning avner
 
Specifically, for reference types, it returns null, and for value types it returns a default instance, which is 0 for numerics, false for boolean, DateTime.MinValue for DateTime, and for structs - a struct with all its members set to their default values.
 
couldn't ride my bike to work because of the rain, which made me sad.
Except that all's wel @ElieSaad
 
So, a custom class's default is null?
 
6:32 AM
Yes.
 
A custom struct is like saying every member is default?
Ok
 
@Nerdintraining I used to hurt myself on 4 wheeled bikes man.
When i use still young :P
 
The struct KeyValuePair<int, string>, for instance, is initialized to an instance set to 0,null.
 
@ElieSaad lol :'D
I hope you don't do that anymore :P
 
sabbach alher
 
6:52 AM
asayek
 
@scheien atm i am oriented on improving my code quality, i am learning new patterns, trying to write examples by myself or add them into existing projects to improve them, i have never tried to sit and read about such differences, so i was confused :))
 
What's the closest thing to union in C#?
Is there some kind of "field offset" attribute or whatever it's called I can use?
 
how can we able to insert next line in Excel if the Excel have records
 
7:08 AM
Excel is fun
Warning: Not for the faint of heart/those who are offended by morgan freeman. This is a good example.
 
@Darkrifts lol i hope this is a true story
 
@Nerdintraining ikr. This is the kind of trolling I aspire to achieve
I mean, I could actually do things like this for my engineering classes
Word has VBA, right?
 
@Darkrifts urgh. I'd do that to a friend, but not a colleague. Don't people have boundaries?
 
It does go kind of crazy doenst it @Squiggle
 
I've got this feelin
Inside my bones
 
7:17 AM
Is it Freeman?
 
I bet it is
 
@Darkrifts Not really, no. There's a [FieldOffset] attribute that's used when marshalling data types to interop with external code (like C APIs that need a union) but not something for internal .NET use.
What do you need it for?
 
Oh, only to break data automatically and such
 
@Darkrifts To what?
 
Oh, just like Number in -> messed up junk
I could do it w/o a union style thing, but union could help
I'd need to test it in C# tho
 
7:22 AM
@Darkrifts I still have no idea what you're saying.
 
Goes off to make a test
 
Morn All
 
@Ggalla1779 mORN aLL.
 
Mourns
 
my old fingers slow to work in mornings!
 
7:27 AM
I just realised that, I'm not sure where down the road of coding this to begin with I thought that .Add() would update something as opposed to adding a whole new record <.<
 
[StructLayout(LayoutKind.Explicit)]
struct Test
{
    [FieldOffset(0)]
    public int r;
    [FieldOffset(0)]
    public byte r0;
    [FieldOffset(1)]
    public byte r1;
    [FieldOffset(2)]
    public byte r2;
    [FieldOffset(3)]
    public byte r3;
}
 
@Darkrifts 1. Please edit the code and press Ctrl-K to format it.
 
Like an automatic way of accessing all teh bytz
Forgot the Ctrl+K :P
 
LayoutKind Sequential
byte array with size.
 
website is so slow when hitting F5 instead of CTRL+F5 D:
 
7:32 AM
[StructLayout(LayoutKind.Explicit)]
struct Test
{
    public Test(string s) {r = 0; s1 = s;}
    [FieldOffset(0)]
    public string s1;
    [FieldOffset(0)]
    public long r;
}
 
How would you get a query like this to Update its WorkDescription based on the name? (So the name already exists in the database, and it needs to add a description to the field with the correct name)
Because .Update() clearly doesn't work, and .Add() obviously adds a whole new record
 
Load the entity from the database by name, then modify the property and update.
73
A: How to update record using Entity Framework 6?

Craig W.You're trying to update the record (which to me means "change a value on an existing record and save it back"). So you need to retrieve the object, make a change, and save it. using (var db = new MyContextDB()) { var result = db.Books.SingleOrDefault(b => b.BookNumber == bookNumber); if ...

some of the other answers there tell you to attach an entity to the context or modify the state. Don't do that.
 
Yeah. Find entity. Modify entity. SaveChanges on UoW. Done.
 
I'm a tad confused as how to do that, to be honest. What should .SomeValue be in regards to BookNumber in that case?
Oh nevermind
I think I got it, put an "=" too much
Yep. Works. Except for one issue
It also replaces the WorkDescription, so while it doesnt make another Customer (which is correct), I cant give it more than one description, which now that I think about it I'm not sure how to accomplish
 
7:48 AM
@Darkrifts That's sick shit. haha
 
At the end I'll probably have to make multiple record to get multiple descriptions, don't I?
Nevermind that as well. Got it kind-of fixed in a way
 
8:20 AM
So... Another person is leaving this company... And so the train begins
 
All jump aboard
 
the leavetrain
 
choo choo! Next stop: Buttsville.
oh wow it actually exists: google.ch/maps/place/…
 
8:37 AM
haha
 
War
morning all
 
Here's a dutch one; Poepershoek (translated as 'Shitters corner') google.nl/maps/place/Poepershoek/…
 
"When you have eliminated the JavaScript, whatever remains must be an empty page. "
i love noscript! <3
 
Yeah, I got that too first hit :3
 
8:42 AM
Noscript life is noscript love
or something like that
anyways have a greatday everybody!
I'll split myself for now and join again later
cya
 
8:59 AM
does anyone know what this is in mvc? msdn.microsoft.com/en-us/library/…
> The TemplateInfo class is used to retrieve metadata for templates or HTML helpers that you create.
idk what that means
or why I would want to retrieve metadata
 
I just applied for a job as "criminal custodian" or whatever it might be called in English
RIP
 
Hmm, how do i remove bad values from a string ?
 
bad values from a string?
 
can you be more unclear
 
xD, sorry.
        static string CapText(Match m)
        {
            // Get the matched string.
            string x = m.ToString();
            // If the first char is lower case...
            if (char.IsLower(x[0]))
            {
                // Capitalize it.
                return char.ToUpper(x[0]) + x.Substring(1, x.Length - 1);
            }
            return x;
            {
                string wordWithBadValues = "asdsh%e&·%$·llo w&%or&$l·$%daddsa#¤%#¤h%e&·%$·llo w&%or&$l·$%d%#";
                Console.WriteLine("word=[" + wordWithBadValues + "]");
That is a bad template i went from with reg expressions.
IT was originally showing how to capitalize letters in a string
I want to remove certain values.
 
9:07 AM
Always capitilize the first letter and remove the if statement
 
These values are at random positions in the string
so i cant simply .Remove
 
Well, havn't checked the second part. Just reacted to the first. Just capitilize the first letter :P
Remove the IF
 
The first part is bad.
It has nothing to do with my solution, and i should not even of posted that entire code scope
Sorry for the confusion.
 
Niema problemu. Just a headsup that that code is pretty much useless, due to the entire toUpper is taken about the time it takes to ask if the first letter is lowerCase or not :P If not exactly the same time
 
Hi I am returning an string from a dll file
THen I am catching this string in asp.net
 
9:10 AM
Yes, you are right.
(I am trying to get back into C# by diving into Kata problems on Codewars)
After taking a 2 month break during the summer.
 
Dim str As String
Set fps = Server.CreateObject("FamServer.FamApp")
str = (String)fps.FamEnroll(trim(Request("name")),Request.Form("LearnModel"),Request.ServerVariables("REMOTE_ADDR"))
But this code is now crashing
 
Is that visual basic ?
 
If I wrote this as :

Dim str
Set fps = Server.CreateObject("FamServer.FamApp")
str = (String)fps.FamEnroll(trim(Request("name")),Request.Form("LearnModel"),Request.ServerVariables("REMOTE_ADDR"))
Then the code works fine
Yes visual basic
@Froxer
 
I have no clue. Just noticed the use of dims :)
 
Dim str As String
Set fps = Server.CreateObject("FamServer.FamApp")

str = (String)fps.FamEnroll(trim(Request("name")),Request.Form("LearnModel"),Request.ServerVariables("REMOTE_ADDR"))
strSQL = "INSERT INTO BIOTPL.FIN_DATA(USER_NAME,KEY,DATA) values ('tEST','DDDDD','"& str &"') "
This code crashes
 
9:13 AM
@Froxer Regarding your problem. Why not add all the bad words to a list and then check if your text contains any of the words in the list
 
This code is written in asp.net
@Froxer
 
Keeping the words in a string and then regex them out seems a bit harsh
 
means ?
@JakobMillah
 
ok ye
 
@osimerpothe Was meant for @Froxer's question.

Never coded using VB so don't know it's methods etc
 
9:16 AM
@Froxer , please help me
 
I don't think Froxer is the guy tbh :P (No offense to Froxer. I just got the feeling from reading the conv ^^)
 
I am struggling with basic C# after this break, i really have no idea.
 
C# is simple
 
sure
 
just divide everything in to Expression<Func<T>> and you'll be fine
 
9:17 AM
but if you dont use anything for a longer period of time, things get complicated :P
 
I need help
 
@Froxer Do you fall over when trying to ride a bike after a 1y break?
 
I need help
 
no i dont fall over
 
@Froxer It's the same for programming. Like you don't fall over when riding a bike again, you don't suddenly lose your acquired logic and thought processes. You might wonder a little bit about 'Where is the lock on this bike?' but you'll figure that out in a matter of minutes. Idem for programming.
 
9:21 AM
@RoelvanUden Dude, when I was trying to ice-skating after like 6 years of not doing it... From doing it every day for like 2-5 hours during winter periods to stand on ice skates 6 years later.... I knew EXACTLY what had to be done. How to break, how to skate backwards... But fuck me, I was Bambi... The frustration killed me. I blamed the ice skates and my Ex gf and her family just laughs at me when I do that... But fuck me, that was devastating
 
idk, i guess i just need to keep practising.
 
@RoelvanUden If you are used to programming and have a break, initially can be a bit overwhelming, but as you are saying, your skills regarding problem solving and logic is not gone. It's just the language that might be different etc.
 
idk what you want to say, but yea sure i probably didnt hold full control over the C# language even before the break.
 
@JakobMillah Well, you can't expect it to be 100% perfect instantly. Give it a few hours. I guarantee you, you and your body remember the moves, it's just adjusting a little again. :)
 
That takes years.
 
9:23 AM
Can anyone help me ?
 
@RoelvanUden My body knows exactly what to do. Give me ice skates now that fits and are sharpened, I would skate like a king... I hope so anyway, else something is really messed up
 
@osimerpothe you are asking a VB Q in a C# chat.
 
@JakobMillah I'm not an ice skater, but I know motorcycles, does that count? You'll be a little awkward turning and controlling the motorcycle after winter break, but riding it for a few hours (awkwardly) you'll get that click again and get back to where you were before. :3
 
Shieeet. Shots fired
 
I suspect the same for ice skating.
 
9:24 AM
This code is written in asp.net
 
@RoelvanUden Pretty much the same, ye
 
@Froxer
 
Clearly Visual Basic, but still. I think this is the room to ask if any :)
But then again. You are not even asking a question, just handing out code
 
I have returned a string from dll file . \
Thn in ASP.Net , I want to catch this string
But the code crashes
hy ?
Why ?
 
too vague
show some code
 
9:29 AM
Dim str As String
Set fps = Server.CreateObject("FamServer.FamApp")

str = (String)fps.FamEnroll(trim(Request("name")),Request.Form("LearnModel"),Request.ServerVariables("REMOTE_ADDR"))
strSQL = "INSERT INTO BIOTPL.FIN_DATA(USER_NAME,KEY,DATA) values ('tEST','DDDDD','"& str &"') "
 
@StevenLiekens Code up there
 
Did you catch the exception and read the error message?
 
This code crashes
 
clap clap did you catch it and read the error message?
 
9:31 AM
Go ahead and do that. Because that's step #1 to helping yourself solve the prob.
 
But, but... We have you?
 
<%
Try
Dim str
Set fps = Server.CreateObject("FamServer.FamApp")
If Not (fps Is Nothing) Then

'If fps.FamEnroll(trim(Request("name")),Request.Form("LearnModel"),Request.ServerVariables("REMOTE_ADDR"))
str = fps.FamEnroll(trim(Request("name")),Request.Form("LearnModel"),Request.ServerVariables("REMOTE_ADDR"))
'Then
%>
<p>&nbsp;</p>
<p><font size="5" color="#ff0000"><%Response.write(str) %></font><font size="5">&nbsp;&nbsp;Enroll Successfully!</font></p>

<%
Dim Conn
Set Conn = Server.Createobject("ADODB.Connection")
I have wrote this code
and try to run it
But the exception is not caught
@RoelvanUden
 
deeeeeeeeeeeeeeeeeeeeeeeep sigh
 
Count to 10
 
yaaaaawn
 
9:35 AM
Well, have you tried using the debugger?
 
!!wat
 
omg this formatting is even worse than no formatting
 
9:37 AM
@osimerpothe Start using VS and its debugger because this ain't doing you favors man
 
+1 for using Visual Studio. It's literally one of the best things about coding in C#.
 
coding on my macbook in starbucks with notepad++ is my favorite way :^)
 
weeeeeew
 
@misha130 Visual Studio Code on mac is the best experience I've had.
 
thats true though
 
9:39 AM
As long as it's web dev... If you decide to do visual basic with notepad++.... Shieet
 
the only complaint I have is that they renamed visual code to visual code 2 at some point...
 
i did java in notepad++ 2009~
 
@RoelvanUden , can you tell me why the exception is not caught ?
 
@misha130 huh?
 
9:39 AM
Well, notepad++ > eclipse all day if that's the choice
 
@Squiggle its really a minor issue
if you look at it in your mac it says visual code 2
 
@misha130 really? That doesn't sound right
 
Don't think it does on my Mac :o Need to check when I remember it
 
well its such a small issue
why would anyone care (besides me)
 
Because we're all detail nerds.
 
9:43 AM
FYI: blogs.msdn.microsoft.com/vsoservice/?p=12265 VSTS performance issues in Western Europe instances, just in case anyone needed an excuse to do no work today
 
Hi guys.
 
Elo
 
I want to know, could I can display result in table only one row.. I have multiple column result from stored procedure.
 
I guess you might want to stringify the datatable(?) rows first and then add them to the table
 
9:50 AM
when apps insist on using inappropriately cutesy language to alert users of trending topics: 2016 https://t.co/U9tdSTxqRK
 
o/
 
Beep boop woopidoop
this is snoop, trying to coop with yoo
 
\o
 
9:52 AM
        public void badValues()
        {
            //Creating a list instance
            List<string> listOfStrings = new List<string>();
            //listOfStrings.Add("This is how i will add my strings into the 0 based list");

            //My bad values
            string badStringValues = ("%$&/#·@|º\\ª");

            //Trying to figure out how i will find the bad values, in my list.
            listOfStrings.Find(Predicate < string > badStringValues);
        }
 
Hi, I'm trying to create a CLR function for Sql Server 2005, in a tutorial, it says that I have to add Microsoft.SqlServer.Server namespace, but I can't find it, anyone knows where is it ?
 
SQL Server 2005?
 
yes
 
using Microsoft.SqlServer.Server;
?
 
@Hamza_L SQL Server 2005 - EOL support ended in April. Upgraaaaaaade!
 
9:54 AM
rip [*]
 
lol
it's not my server
 
then tell your client to upgraaaaaade
 
@Froxer If you only have x symbols that you want to check for, just use Regex.Matches(yourstring,regexexpression).Count;
 
it's a huuuuge security issue
 
thanks for the advice @Squiggle ;)
 
9:55 AM
It's like still running Window Server 2003, it's just not-done!
 
and it's running on windows server 2003
so ...
 
Who's your client? ( ͡° ͜ʖ ͡°)
 
a french "big" company
 
( ͡° ͜ʖ ͡°), ( ͡° ͜ʖ ͡°), ( ͡° ͜ʖ ͡°)
 
Give more info (ง ͠° ͟ل͜ ͡°)ง
 
9:56 AM
Anyone know what to get the published version of application ? It seems to be way to hard to find it
this is for vb 2010
 
Jokes aside. Yeah, upgrade server. Just do it
 
Imports System.Deployment.Application doesnt exist in 2010
 
@Hamza_L shit, man. It's probably already running a botnet.
 
( ͡° ͜ʖ ͡°)
 
not ethical to withhold the name of your client :3 especially when he asks to do shitty tasks
 
10:04 AM
hmm
What about this approach :
            List<string> listOfStrings = new List<string>();
            //listOfStrings.Add("This is how i will add my strings into the 0 based list");

            //My bad values
            string badStringValues = ("%$&/#·@|º\\ª");

            //Trying to figure out how i will find the bad values, in my list.
            listOfStrings.Contains(badStringValues);
The method i need to write is supposed to remove noise
The noise = badStringValues
And then by TDD do :
 
so... invalid characters
 
Assert.AreEqual("",Kata.removeNoise("%$&/#·@|º\\ª"), "You failed the test for '%$&/#·@|º\\ª'. (Please note that in c# special characters are displayed as '?' in the error screen)");

et.c
 
Don't ask which forms ffs. Just tell me what logic should i apply to search as i type in search-textbox
 
Yes @milleniumbug
 
i can't figure out.
 
10:38 AM
https://gist.github.com/anonymous/7873919b13ee66b10f1e9af03ecae404

At line 12, I am getting Newline in constant, followed by too many characters in character literal and then syntax error ',' expected
 
anyone is instructed to give me a proper logic?
search on instant type
 
What do you mean @ARr0w ?
 
@Froxer A backslash (``) signifies the beginning of an escape sequence. If you want to have the \ character, write it '\\'.
 
Ok, thank you @AvnerShahar-Kashtan
 
10
Q: How do i write a backslash (\) in a string

user2509901I want to write something like this C:\Users\UserName\Documents\Tasks in a textbox. This is the actual code. txtPath.Text = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)+"\Tasks"; I get the error Unrecognized escape sequence. Pls how do i write a backslash in a string??

 
10:41 AM
as we type in search textbox in windows and the 'mycomputer search-bar' instantly starts to show records @Froxer
 
OK ? @ARr0w
 
how do i do that? logic?
 
What have you tried ?
 
Textbox_textchanged event
 
@ARr0w ...and then?
 
10:42 AM
but it is not a good UI experience.
 
k?
 
is there a better way?
 
I am sure there is.
 
alternatives? well, if you are aware of any then share? i've been googling and all it is giving me is 'autocomplete'
and i don't want autocomplete
i guess either you don't know or no one is interested. Well Sad day.
 
hey guys
 
10:59 AM
@JakobMillah what are those emojis called? The faces and the shizzles. Plic
 
i love programming books, but i don't like reading huge stories in it, i mostly skip them, read description of chapter, or technique or pattern, when and why to use it and i am reading samples trying to practice and write my owns, is it bad? should i read whole book in a detail or is it ok that i skip some moments and read what i think is important?
^^
 

« first day (2151 days earlier)      last day (2811 days later) »