« first day (1186 days earlier)      last day (3987 days later) » 

00:01
The funny thing is, I'm starting to get good at it
Developing patterns and such
@Greg Yeah - safe and easy
@TravisJ Got it parsed. You're my hero.
Is image editing advanced enough to where you can edit the face of a person?
@CCInc What kind of dumb question is that? You can edit any part of the image.
00:10
Yeah, I didn't phrase that properly
You sure didn't :P
Speakers have such a hard time playing these piano pieces.. even my good headphones crack sometimes
I don't blame them.
@ReedCopsey So essentially just create the query `string dbExist = @"Select database_id from sys.databases where name = @dbName";

Then simply add the query with the `Parameters` like above.
00:22
I do have a question though, the name of the database isn't really a value- So it doesn't have a type. Cause it is querying the system.
okay, 13 hour day is over. TTYL.
kbye
kbye
00:25
kai
ka
me
ha
me
HAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Your reputation amount is invoking my OCD
@Greg It should be a string, I believe
@CCInc my rep amount?
00:36
@CCInc I know what you mean
hmm. downvote me twice, then upvote a question?
4443, one away from 4444, which is divisible by four
then I'll be 4444
oh really? cool
I see 4433
00:37
That's odd..
not really
!!user pheonixblade9
haha fail
oh dear. at least C# is 2nd
00:37
I have a regex badge
!!user ccinc
@CCInc Can't find user cc in this chatroom.
!!user steve
@Steve Can't find user steve in this chatroom.
!!user KendallFrey
00:40
@ReedCopsey Can't find user @ken in this chatroom.
Kendall Frey, Ontario, Canada
17.2k 1 27 64
yeah - nice that the regex shows up ;)
Top 13% and I haven't been active in a year... wow...
I would !!user ReedCopsey, but my eyes are allergic to gold colour.
well, top overall doesn't drop much over time unless you're in the higher percentiles
lol
!!user ReedCopsey
00:41
(because I'm curious)
They say colour in Canada? Or is that just your thing?
ack! I've got a damn vb.net badge :S
that sucks
hm
Seems to sort the tag classes in descending order
@CCInc They say colour in more countries than say color.
00:43
@Reed - On your profile generics is first, but since this is descending and shows only 7, it is omitted
Indeed. Most countries also use a measurement system that makes sense.
!!user travisj
And he sits in the C# room. tsk tsk
It is harder for people to grok complex mvc answers than it is a simple jsfiddle demo
Also don't have to compete with people like Reed and Jon Skeet :P
00:50
@CapricaSix so web
@TravisJ If only there were more REBEL questions...
@Kendall - REBEL looks pretty interesting :) I read through the 99 bottles of beer example and that looked fun. It almost feels encrypted when looking through it
It does look like text overwritten with noise...
If you have text in it of course
The quine is just noise
you think you will make a zalgo language?
You mean APL?
trololol
APL is a terrible-looking language
"ASCII? fuk dat!"
00:56
Promotional material for APL from 1976
that's a way old language...
Who doesn't hate a language that looks like this?
life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
They thought malbolge was unreadable...
You know a language is great when wikipedia gives the warning
This article contains APL source code. Without proper rendering support, you may see question marks, boxes, or other symbols instead of APL symbols.
Well, time to go
Enumerable.Range(1,199).ToList().ForEach(i => {if((int)(i/2) > 0)Console.WriteLine((int)(i/2) + " bottles of beer on the wall");else Console.WriteLine("No bottles of beer");});
:P
cya, Travis!
01:00
@TravisJ eww
What about "Take one down, and pass it around"?
yeah - it's buggy
Mine works
nyah nyah
debugging REBEL is so fun :D
Adding a feature exposed a bug
Currently the program is 925 chars long
I need a better IDE
WOOHOO!
@KendallFrey gist it?
what are you using? notepad? or something custom?
01:05
NP++ for writing, Visual REBEL for debugging
@JohanLarsson I'll just paste it here :)
ha! finally reached #top10 in month reputation league :)
Actually, chat doesn't allow >500 chars
durn
I'm pretty sure it won't last for long, but it's nice anyway :D
@MarcinJuraszek yay1
@MarcinJuraszek Congrats!
I've been slacking this month ;) I'm at like 50
01:08
If I was at 50, that wouldn't be slacking...
I really hate the fact that it's much harder to find good and unanswered question in this timezone :P
Most of my rep nowadays comes from PCG
specifically the OOM answer
it was much easier when I lived in Poland
@MarcinJuraszek That explains the name :)
01:10
I answer old questions that I find when looking for stuff, that is a poor rep strategy.
Using 'inventory' as a verb doesn't sound quite right. I wonder if there's a nicer word.
@JohanLarsson haha yeah
what is the full sentence?
haha there is none
funny thing
it's used as a command
too random
inven would be almost good, but... nah
01:16
inspect?
so at current prices it would take me 108 days to recoup the cost of an R9 290X VGA
too similar to other commands
1041 chars now
bugs...
fu
froze the debugger
irdum
You are at the start.
inventory
look
You are at the start.
There is a key on the ground.
get key
inventory
You are carrying a key.
look
You are at the start.
go north
You are at the end.
inventory
You are carrying a key.
drop key
inventory
look
You are at the end.
There is a key on the ground.
go south
You are at the start.
go north
You are at the end.
There is a key on the ground.
die
My latest test play
Sometimes this chat feels like my personal brain dump.
2
:D
I can join you
I'm thinking about creating my own language which would be compiled to .NET Framework (either MSIL directly or to C# first). Any thoughts what fun features it could have?
I might actually write some code today... after a few rounds of bf
@MarcinJuraszek I wrote a compiler to .NET once, but it was for an existing language.
As for features, it needs regexes!
01:31
I considered writing my own c# compiler, but think it will be more fun to do something new
answered in comment, op wanted proper answer for some reason.
The problem with writing compilers is that the learning curve is logarithmic. It's infinite at first.
I have no idea how to create an ELF binary
that's why I may decide to compile to c# and let c# compiler do the worse part of the job
@KendallFrey IIRC it's a pretty simple format
Compiling to another language? ew
01:34
yes, like TypeScript or Script#
Almost as dumb an idea as Google's Closure compiler.
(I actually think Closure is cool, but calling it a compiler is weird)
!!wiki google closure
Google Closure Tools is a set of tools to help developers build rich web applications with JavaScript. It was developed by Google for use in their web applications such as Gmail, Google Docs and Google Maps. Closure Compiler The [https://developers.google.com/closure/ Closure Compiler] is a tool for making JavaScript download and run faster. It optimizes JavaScript. It does not compile from JavaScript to machine code, but rather compiles from JavaScript to better JavaScript (for machine, not human). It parses JavaScript, analyzes it, removes dead code and rewrites and minimizes what...
!!wiki compiler
A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program. The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code). If the compiled program can run on a computer whose CPU or operati...
01:35
as you can see, is a tool which takes code in one language and gives you the same code in different language
It does not compile from JavaScript to machine code, but rather compiles from JavaScript to better JavaScript (for machine, not human).
According to that definition, Closure isn't a compiler
yes
I agree
but e.g. TypeScript compiler is
yeah
if Closure is a compiler, then other minifiers are too
so all it does is optimize? what exactly does "machine" javascript look like? I'm guessing like a decomplied exe
01:36
@CCInc changes all user-friendly names to the shortest possible ones, like var a = b();
and a lot more stuff
but that's make it a little less readable
or almost non-readable
won't the JS interpreter do that anyway?
not necessary
uh, no?
and it makes the files size smaller
so they can be loaded faster
and parsed faster (because there's less text to read and parse)
01:38
Oh, javascript doesn't optimize code by default? C# does, doens't it?
does it optimize for size, speed, or either?
I would say both
@CCInc Depends what you mean by optimize
Modern JS interpreters store arrays as actual arrays, and objects as actual objects, etc.
@CCInc c# compiler does not optimize your c# code, it optimizes generated MSIL
That's what I meant
but it does preform some level of optimization?
01:40
yes
but there is another part of optimization process done by JIT compiler
Fun fact, the C# compiler does at least one optimization even with /o-
02:30
0.Equals(new Nullable<int>(0)) // hehe
I think I'm glad that ^ is true. Looks like the implicit cast operator takes care of that.
02:51
@JohanLarsson You there?
Should DBNull.Value ever be null?
don't think so
03:06
Oh, I'm dumb: Dim dbNull As New Scalar(Of Integer)(dbNull.Value) ... see what VB did there! #DoNotUseVB
Fun fact... Scalar has a property Value and VB decided that despite me typing DBNull, I must have wanted to the local dbNull object. Woops!
 
2 hours later…
05:20
If anyone here is available to help me with a wp8 error: stackoverflow.com/questions/21090665/…
wow, nice behavior :D
I don't have WP8 SDK installed
so I can't help you
05:44
ahh thanks :D
I've always wondered how to do that but after some searching, managed to get it to work just that I never expected it to be that way. Quite odd.
I guess this error isn't only a WP8. Might even work for WP7
 
2 hours later…
08:19
morning
no9
no9
moin
08:36
anyone here good in dictionary?
i keep on getting this error:
Additional information: An item with the same key has already been added.
How to convert from Double to double?
I am sure it has been asked already but can't find, incredibly...
@NicolasRaoul They are the same
using double = System.Double;
morning
Damnit. I crashed on my motorcycle. It kinda hurts, bike scraped, what a sucky beginning of a day.
@RaZor Hi
@RoelvanUden Oh wow. Not good :(
08:50
@LewsTherin: Casting a Double with (double) causes System.InvalidCastException: Specified cast is not valid.
@NicolasRaoul You shouldn't have to cast?
It is a runtime error.. so something else must be off
no9
no9
@RoelvanUden winter time is not ment to be time for motorcycles :)
but glad to hear your ok!
Indeed it is not. But it did not freeze and it is 8 degrees celcius, so it should be fine~ Thanks!
09:09
I am either a really nice person or an internet stalker / spy im not sure which
09:21
can anyone help me trace whats the problem?
i have a Hashtable that saves the Index for every variable saves in _key_, and the variableline itself in _value_ ... problem was it keeps on saving the 1st variable that i declared instead of all ... heres my code
                Hashtable Global_Hash = new Hashtable();
                List<string> eta = new List<string>();
                List<int> xcv = new List<int>();

 Regex RegexVar = new Regex(@"var\s+(\w+)\s*=+\s*([^;]+)\s*;"); //var name = ?;
                    MatchCollection MatchesVar = RegexVar.Matches(rtb_JS.Text);

                    foreach (Match MatchVar in MatchesVar)
                    {
                        if (MatchVar.Success)
                        {
                            var globalVAR = MatchVar.Groups[0].Value.ToString();
(see full text)
e.g: when i type var aaa = 3; and var ddd = "sda"; in richtextbox it only saves 1st which is the var aaa = 3; instead of all matches
and duplicate it once it loop with diff key
10:05
problem solve:
  if (!Global_Hash.Contains(VarIndex))
                            {
                                for (int x = 0; x < xcv.Count; x++) //absb
                                {
                                    if (Global_Hash.ContainsKey(eta[x]))
                                               { }
                                    else
                                    Global_Hash.Add(eta[x], xcv[x]);
                                }
                            }
0
Q: Random sequence of html div tags position

Mahdi HesariThere is four Div tags in this GridView with ID="NUMBER1" ID="NUMBER2" ID="NUMBER3" ID="NUMBER4" values and i want to change the sequence of their position in page randomly in every row of the gridview. what is the best and most simple SERVER SIDE method to do this. I'm new to asp.net using C# l...

no9
no9
@DaImTo I like cookies...
@no9 ?
no9
no9
:)
i make good cookies. But you should have tried the chease cake i made last weekend now that was yummy
no9
no9
10:10
never had a cheese cake iml i think
i enjoy baking i just dont do it to often my waste line tends to expand.
no9
no9
heheh
hi can anyone tell me how can I log performance info of my app?
no9
no9
@DaImTo i think that baking isnt the real problem here ... i beak cakes, i just dont eat them :)
10:31
Hi Guys, need some help on image to sepia conversion.
 private void Button_Click(object sender, RoutedEventArgs e) //Sepia
        {
            string destination_dir = @"C:\Users\krangaraj\Pictures\AAA";

            string[] extensions = { ".jpg", ".gif", ".jpeg", ".png", ".tiff" };

            string[] dizin = Directory.GetFiles(destination_dir, "*.*")
                .Where(f => extensions.Contains(new FileInfo(f).Extension.ToLower())).ToArray();


            foreach (string file_name in dizin)
            {

                Image img = Image.FromFile(file_name);
(see full text)
No error but the conversion output is still the same original image.
no9
no9
10:49
i dont see the conversion
now i do :)
perhaps this will help @linguini gutgames.com/post/Sepia-Tone-in-C.aspx
@no9 Thank you. Actually i fixed the conversion to Sepia.
 private static void SepiaBitmap(Bitmap bmp)
        {
            System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, bmp.Width, bmp.Height);
            BitmapData bmpData = bmp.LockBits(rect, ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format32bppPArgb);
            IntPtr ptr = bmpData.Scan0;

            int numPixels = bmpData.Width * bmp.Height;
            int numBytes = numPixels * 4;
            byte[] rgbValues = new byte[numBytes];

            System.Runtime.InteropServices.Marshal.Copy(ptr, rgbValues, 0, numBytes);
(see full text)
@no9 I got stuck with Black & White conversion.
:14054312  private void Button_Click_1(object sender, RoutedEventArgs e) //GrayScale-Black&White
        {
             string destination_dir = @"C:\Users\krangaraj\Pictures\AAA";

             string[] extensions = { ".jpg", ".gif", ".jpeg", ".png", ".tiff" };

            string[] dizin = Directory.GetFiles(destination_dir, "*.*")
                .Where(f => extensions.Contains(new FileInfo(f).Extension.ToLower())).ToArray();


            foreach (string file_name in dizin)
            {
                Image img = Image.FromFile(file_name);
(see full text)
11:11
Anyone here know much about WebAPI?
Got a question about best practices etc:
I'm passing a username (encrypted) to my webapi service in the header, so it can authenticate against a DB.
Once authenticated I'm populating a custom IPrincipal with various properties from the database.
I'd like to avoid the database hit to lookup the user for every request. I don't want to use session/cookies etc. as webapi is supposed to be stateless, so my idea was to get the service to send back a json string (encrypted) that contained the properties of my user object. The calling application would send that same json string back. If the web api found that json string in the request's header it would just use that rather than a DB lookup
Does this seem like something reasonable to do? I'm new to public facing services/sites, so I'm worried I may have missed some security implications.
12:08
can i do someting like not greaterthan or equal?
like:
sampleOnly >=! First && sampleOnly <=! Last
Hey guys.. I'm trying to split a string and save the splitted in 2 different lists or array.
I've 2 coordinates X, Y in a string for example: "51.000 53.000,51.000 53.000" they are divided by a comma and the X and Y by a space.. how can I split the X and Y and save them into an X and Y array
Two splits obv
Indeed.. but when I made the first split and get: "51.000 52.000"
How can I get the 51.000 in a different array
foreach commasplit in commasplits
  foreach coord in commasplit.split
Naive implementation but works
Or you could have each coord on a newline so you split once
foreach coord in file.ReadLines()
  coord.split()
@GeorgeDuckett That would be depending on unreliable data. You really do not want to do anything like that. However, instead of using a session or cookie, you can use an app-based cache. As your original goal is just to avoid hitting the database for each request, you can make an application-based cache to keep the authentications inside the server memory. Let them time out after a while, and you'll be sorted.
@GeorgeDuckett In regards to security implications, you have to assume that an attacker knows the protocol you use and the decryption that the server applies to submitted content. If I, as attacker, can fake an authentication just by having the encryption/decryption key, something is quite wrong there.
12:43
@RoelvanUden Ok, that makes sense. As I understand it you're saying keep an in-memory cache lookup mapping usernames to my DB user objects, caching them as they get authenticated.
@RoelvanUden Thanks for the clarification there. I had a feeling I was going down the wrong road, hence the question.
@GeorgeDuckett Yes. You'll avoid the database hit and keep it in memory for a set period of time. Trick point here, tough, is that you need adequate RAM to keep them in memory and need some kind of clean-up task. For example, order the authentications by time and update the time on each look-up, and keep it restricted to the 1000 latest authentications (and delete older as you do the look-up).
@GeorgeDuckett To put this in perspective, tough, looking up a single record with a proper index is fast. Really, really fast. There is almost no processing time involved on the database server, so if you have a decent connection pooling mechanism the overhead involved with on-the-fly authentication is almost negligible. I would personally not care unless I expect thousands of authentication requests/second, and even then perform a good amount of performance tests to see if it actually matters.
Keeping things simple without premature optimization is a good thing, too.
@RoelvanUden Very true, thanks for the help.
@Steve Congratulations with the job offer man :)
13:16
hey all
hey @RoelvanUden
13:43
Stupid customers, Y U no have parameterless constructor?
I expect my customers to have default ctors
I've a question @KendallFrey
Hi all
hey @Corbo152
do you guys use MEF? isn't it too much for less advantage in closely coupled classes?
when we declare a static variable or Global Variable
13:53
@Annie We use MEF. I didn't understand your second sentence.
@MRS1367 You get slapped
it stores its recently data until the program is running
can any of you guys help, im trying to add an attribute id to the PDF service class in Nopcommerce 3.0,
but it not works for me in a situation
i have created the extra columns, rows etc.
@MRS1367 sorry what?
You have a variable that stores data until the program runs?
13:54
I mean what advantage does MEF provide over simple DRY approach in Web projects such as MVC?
//DOCID

                    String docID = String.Empty;
                    cell = new PdfPCell();
                    cell.HorizontalAlignment = Element.ALIGN_CENTER;
                    productsTable.AddCell(cell);
That's impossible
Lifetime of a variable
@KendallFrey lol
@Annie MEF has nothing to do with DRY or MVC
13:55
thats what i currently have in pdf service class
I speak about VBA
not in C#
the variable i need to pass into that PDF is:
Static in VB is a local variable that keeps its value between calls, right?
13:55
I test my codes in a simple codes and it works always
@KendallFrey, so we can't use MEF in MVC projects?
but it not works in my main codes
@MRS1367 I don't see why not
 if (docId != null)
                    {
                        var attribute = new ProductVariantAttribute();
                        attribute.Id = punchOutDocumentId;

                        // add this to the product attributes
                        item.AttributesXml = _productAttributeParser.AddProductAttribute(item.AttributesXml, attribute, docId);

                        _shoppingCartService.UpdateShoppingCartItemAttributes(_workContext.CurrentCustomer, item.Id, item.AttributesXml);
(see full text)
If a procedure-level variable is declared by using the Static keyword, the variable retains its value until your project is reset. Therefore, if you have a static variable, the next time that you call your procedure, the static variable is initialized to its last value.
13:56
how can i pass that into this:
 String docID = String.Empty;
                    cell = new PdfPCell();
                    cell.HorizontalAlignment = Element.ALIGN_CENTER;
                    productsTable.AddCell(cell);
A module-level variable is like Static Variable @KendallFrey
can I describe my situation and lemme know ur ideas about it?
I don't know, can you?
yes I can lol
13:59
Then do
I've a Function in a class
Is MEF another name of DI/IoC pattern?
@Annie You can use, but you use it for extensibility. It makes no sense to add an extensibility framework if you don't need ... extensibility. If you want IoC/DI, use the appropriate tool for that.
I find MEF difficult to understand. I am however, also retarded
it creates a UserForm
13:59
@Annie Not to me, though it could be used for that probably
when the end-user clicks on the one of the buttons
@tranceporter When you understand something, it's a very basic concept. When you don't, it's insanely complex.
it stores related index in a module-level variable in the class that has created it
@KendallFrey To understand something completely is a massively complex thing in itself
no way
As soon as you understand something, you are amazed at how simple it is.
14:02
oh I must tell in the first that the function that creates the UserForm has called by other function
after completing the function that creates UserForm
I want to use from the index that has stored in the module-level variable
but when I retrieve it, it always 0
I check my codes in other test projects
Can you make a SSCCE?
and it always works
@RoelvanUden, so can we comprehend it like; dependency (interface) injection in construct is what we do when we are dealing with DI/IoC. Which is also extensibility.
Can we consider MEF as an umbrella of extensibilities; DI being one of them? The other may be library injection [Import( .. )]
ok, sure
I'll show u an example
0
Q: Add custom attribute to the PDFService class Nopcommerce 3.0

Corbo152I have a custom attribute that i wish to add to the PDF Invoice in nopcommerce, i have inserted this code into the ShoppingCartController to add this to the product attributes, int punchOutDocumentId; Int32.TryParse(ConfigurationManager.AppSettings["PunchOutDocumentId"], out pu...

14:07
posted on January 14, 2014 by skeet

As I begin to write this, I'm in a small cubicle in Philadelphia airport, on my way back from CodeMash - a wonderful conference (yet again) which I feel privileged to have attended. Personal top highlights definitely include Dustin Campbell's talk on C# 6 (I'm practically dribbling with anticipation - bits please!) and playing Settlers of Catan on an enormous board. Kevin Pilch-Biss

Jon Skeet has a cubicle at the airport? LMAO
can anyone help me with the above question?
hi all, what condition would I use to stop a user from using ampersands and hash tags in a regular validation expression?
thanks kendal, I will try it
14:24
hi
Hi @Steve
--------------------------------------------------------------------------03.
keyboard got stuck under the recliner, sorry
@KendallFrey
I tried this

<asp:RegularExpressionValidator ID="regJobTitle" runat="server" ControlToValidate="Job_TitleTextBox"
                    CssClass="required" Display="Dynamic" EnableClientScript="true" ErrorMessage="Please remove (&) or (#)"
                    SetFocusOnError="true" ValidationExpression="[^&#]+" />
it does not display the error message
Change it to ^[^&#]*$
Kinda guessing here
14:44
@KendallFrey i hear ya....I have been looking around the site and other sites for a while this morning plus combing through some of my old code and projects and could not find a solution
how would i add HTML or plain text to PdfService class
hey guys
not a lot going on here huh
Trying to solve jon skeet's puzzle
so close...
14:58
haven't heard of it
I should install VS on my surface

« first day (1186 days earlier)      last day (3987 days later) »