« first day (1185 days earlier)      last day (3988 days later) » 

00:06
// no input texture, the output is completely generated in code

/// <summary>The center of the gradient. </summary>
/// <minValue>0,0</minValue>
/// <maxValue>1,1</maxValue>
/// <defaultValue>.5,.5</defaultValue>
float2 centerPoint : register(C0);

/// <summary>The primary color of the gradient. </summary>
/// <defaultValue>Blue</defaultValue>
float4 primaryColor : register(C3);

/// <summary>The primary color of the gradient. </summary>
/// <defaultValue>Red</defaultValue>
float4 secondaryColor : register(C4);
yeah!
@Johan is that Cg?
HLSL, very similar I think
started tonight
I started shaders last night xD
gonna try it in wpf now
You can use shaders in wpf?
00:21
yes I'm pretty sure
wrap them in an effect
Oh ok... this is my shader
can't read that :)
Haha yeah I haven't even been able to compile it yet... Cg's error messages suck
One error I got was: "Shader error on line: 14"
Loadin' up a new version of Unity
00:38
Tested it in wpf now, it worked. For small values of work.
Nice...
want to use it as a brush now
or tomorrow, getting late
Cool... mine finally compiled...
@JohanLarsson so if i make a bunch of commits, then push it back to the origin branch, do you see every one of my commits or just the push?
every one I think
00:53
nvm, i can see your commits when i pulled it, so pretty sure you'll see them all
there is a way to squash commits
Oh man... I just found out there is a Giving up... Parser is hopelessly lost error in Cg xD
lol okay, well, i played around with git for a while, so theres a lot of them :p
> If you look up "rebase squash" you should get all the details. -- The Mighty drch
I asked him earlier today
oh cool okay
00:54
he is my personal
don't think he likes it much :D
lol, i always feel bad bugging people when i need help
2
01:29
Nice
02:18
goodday!
anyone here good in hashtable? just need a help regarding it
hi @OutlawLemur
Whats up
how to make key of hashtable autoincrement @OutlawLemur
for loop?
02:23
ee
yep...
why do you need hashtable key increment?
i plan to fill only valuees
ok heres the thing

i have richtextbox and im counting all '{' been type on it
Sorry I've only ever used a hashtable once
ok @OutlawLemur
02:25
@Elegiac keep going, I still can't see how you're using hashtable
@MarcinJuraszek ill post my code
I'm going to take a shower, be back in 10
   Regex open = new Regex(@"\{");
            MatchCollection Matches_Open = open.Matches(richTextBox1.Text);
{
      foreach (Match Match_Open in Matches_Open)
            {
                if (Match_Open.Success)
                {

                    var open_match = Matches_Open.Count.ToString();
                    var index = Match_Open.Index.ToString();
  label1.Text = "{ ==" + open_match;
}

}
so in this sample label1.Text counts all { been type in richtextbox
e.g: i type 3{ in rtb ... then text will be { === 3
i want to foreach the count but it doesnt work
and ill make it keys for Hashtable
then value would be {
btw, output will be ill merge 2list in hashtable ... listopen compose of { and listclose }
Why don't you just use a NameValueCollection?
whats the use of NameValueCollection
02:41
I used it a lot for multipart/form-data HTTP requests
I still don't see why you're trying to use hashtable here
it looks like you should use Dictionary<TKey, TValue>
but I'm not 100% sure because I don't get the I want to foreach the count by it doesn't work part
Im turning in... Night guys
night man
@MarcinJuraszek can i ask
Your here???
02:55
in dictionary is there a way i can detect specific value of char and the next to it till specific value? hehe sorry for my english ill give a sample
my dictionary was compose of charindex and value was { or }
if order is important to you neither Dictionary not HashSet will work
because they do not preserve the order
@MarcinJuraszek noted
ok lets say
i sort dictionary by keys#
then value was
item1 ------ 9 | {
item2 ------ 10 | }
item 3 ------ 15 | {
item4 ------ 16 | {
item 5 ------ 18 |}
item 6 ------ 20 | }
then i want to trace every { ... then make a condition that if item was { then next was } ... will count all { (like for item 3-4) then count its number then make a limit till } (sample if its 2{ then i need to count till 2} )
3-4 till 5-6 (since item 3 was { followed by another { which is item4)
are you trying to check if all {} are closed?
03:00
yes
then you just need a list
then
then just iterated over list items and increment/decrement counter variable
if it even goes below 0 or ends over 0 something is wrong
can you set me sample
your input is a string?
03:02
i have created one list for open bracket and another one for close
yes
how can i make condition that finding if { was followed by another { ... and need to find 2}
if 1{ was followed by 1} then its ok
            var input = @"{{ssfg } sdf {  { sdfs} { sdf} } }";

            var counter = 0;
            foreach(var c in input)
            {
                if(c == '{')
                    counter++;
                else if (c == '}')
                    counter --;
                else
                    continue;

                if(counter < 0)
                    throw new ArgumentException("error!");
            }
            if(counter != 0)
                throw new ArgumentException("error!");
the simplest one I can think of
or as a method
        public static bool CheckBraces(string input)
        {
            var counter = 0;
            foreach (var c in input)
            {
                if (c == '{')
                    counter++;
                else if (c == '}')
                    counter--;
                else
                    continue;

                if (counter < 0)
                    return false;
            }
            return counter == 0;
        }
what it does
well, the code is really simple, if you don't understand that one you should really start from basics :)
it keeps track of the bracket count by adding 1 for each {, and subtracting 1 for each }.... if your count is below 0, it means you have one out of order (e.g. { }} { )

if it doesn't end in zero, it means that there aren't an equal number of opening and closing braces
thats actually pretty smart, i was impressed :)
thanks @Steve
thanks @MarcinJuraszek
03:16
i wish ms or somebody had a public northwind or adventureworks database hosted on sql server
i think i know the logic now
you gave me some idea
03:28
We have Predicate, Action and Func delegate types. Why did C# teams choose Func rather than Function?
because its a keyword in other .NET languages
e.g. in VB.NET
@MarcinJuraszek What is the MSIL code for Func? Is it Func also? If not, using Function as the C# delegate type is safe for the inter-operation with other .NET languages
but it's not c#-only delegate type
it's .NET Framework delegate type
03:44
@MarcinJuraszek I haven't worked with other people using languages other than C#. For example, if my class library contains public delegate Function<T>... then my class library cannot be used by VB.net programmers? If so, it will be difficult for us to know this issue without having knowledge of other languages. What do you think?
I just tried that with public class Function
trying to use that in VB.NET:
        Dim t As Function = New Function()
3 errors
you could write
    Dim t As [Function] = New [Function]()
that's similar to @keyword in c#
but that's just a pain in the ass
so yes, if you design libraries which are supposed to be used from other .NET Framework languages you should be aware of limitations from these languages
and as you can see .NET Framework designers are completely aware of that, and I think that's why there is Func not Function delegate
@MarcinJuraszek OK. It makes sense. Cross-language interoperability is no longer interesting to me. :-) Thanks.
 
3 hours later…
no9
no9
07:05
morning
Hi Good Morning @no9
I have one doubt..
no9
no9
i have plenty
@no9 good afternoon sir
0
Q: avoid loss of data when back to the previous page in mvc?

Jasper ManickarajIn my page i have a two dropdownlist and 2 partial view. In that partial view i have lot of textbox and that textbox contains values that are entered by the user. So if i redirect this page to next page and use back button to get this page means i lost my partial view and its value. I use th...

Have any idea about my issue
07:26
how to sort list by value?
sample

list was

1,2,3,4,5,6,8,67,6,5,4
i want it to be
1,2,3,4,5,6,7,8,9,10 ... sort
if it's List<int> you can just call Sort() method
its list int but sort not working
i have 2list and i add those items from 2list into 1list
 Merge.Clear();
            Merge.Sort();
            Merge.AddRange(qwe);
            Merge.AddRange(asd);
Merge, qwe, and asd are lists
you're calling Sort on empty list?
what's the point?
its outside a loop
buttonclick
so everyclick label would update
i mean list
so it merge
your code calls Clear just before calling Sort, so you either you're sorting empty list or you're showing us the wrong code
07:34
but doesnt sort
Sort does not make your list magically sorted all the time, no matter what elements are added/removed. It sorts the list in its current state
so when you call it and then add/remove items, it will no longer be sorted
i already update it @MarcinJuraszek
i merge list items into 1 by using AddRange and sort it
and thats the result .xD
so looks like you're doing something wrong
maybe the AddRange?
but its like .Add right?
07:43
it sort but separate list
haha
don't try to find bug in List<T> code, it's ok. You're just using it in wrong way
      label6.Text = "";
                Merge.AddRange(qwe);
                Merge.AddRange(asd);
                Merge.Sort();
  label6.Text = string.Join("\n", Merge);
did you try debugging your program?
yeah
hmmm
2list that merge are strings
but the 1 was int
aha
08:01
Hi foks, Which is recommended?
    var data = new int[] { 2, 3, 4, 5, 0, 9, 8, 7, 6 };
    var a = data.TakeWhile(x => x < 6);
    var b = data.Where(x => x < 6);
a or b?
they do not return the same
hmm
ok, they do
@MarcinJuraszek You are responding my question?
Which one is more efficient?
TakeWhile
it will only perform the check 6 times
Where would do 9 checks
08:03
@MarcinJuraszek Oh, I see, Thanks.
but in general, they do not have to return the same values
so be careful
@MarcinJuraszek I see.
ok, time to go to bed. good night (or good day)
@MarcinJuraszek Good night.
08:43
morning
no9
no9
08:59
@DaimTo hello
@DaImTo hi
09:15
Hi all
@Corbo152 hi bro
Can anyone help me with this question its driving me crazy, i know im missing something somewhere
0
Q: passing a commit method with Paypal express checkout plugin in Nopcommerce

Corbo152I am using nopcommerce 3.0 source, i have a website where users can order transport tickets online, when they add the ticket to the basket they are taken to a rendering server that lets them input ticket dates, i have all this working, the issue i am having is that when payment is completed a...

i believe its missing a reference for the Ilist ShoppinCartItem
09:31
morning
@RaZor morning
09:46
hi
10:18
evil script ran in 101 hours, 18 minutes and 17 seconds. My new version runs in 23 seconds. I should get a bonus
@DaImTo Or a big slapping for the initial draft
@RoelvanUden Got a job yet?
@DaImTo what did you do? Parallel'd everything?
(that's what I usually do to speed things up)
Or did you replace DataSets with Dictionaries?
It is a script.. how do you parallelize that?
you modularize it, throw an other script on top of that that spawns multiple instances, each with only a part of the work that needs to be done
10:27
Aww you know what I mean
That sounds like cgi smell though
The inital script was using cursors to check each row for processing then inserting it. in. 400k rows insert one at a time. checking the table if a parent had been insertd. it got expontionaly worse due to the number of rows in the table.
The new script is just doing insert into selects.
> The new script is just doing insert into selects
What?
@LewsTherin No. Will start searching this week~
A bit of a break?
10:48
@LewsTherin I'm still finishing graduation period, 2 weeks remaining
So yeah, I graduated and got my result, BUT still work here for 2 weeks to finish stuff/give presentations
@RoelvanUden Oh I see.
I assume in good faith you got a 1st honors?
@LewsTherin A what?
1st class?
Maybe it is done differently where you are from.
Please elaborate then :P
11:03
Irish universities have:
1st class
2:1 which is 2nd honors upper level
2:2 2nd honors lower
And pass
I hate monday mornings lol
why is it everything can work friday evening and then roll in monday morning and everythings broke lol
11:22
hi is anyone familiar with windows phone dev here atm?
@Ahmed.C Sadly, not I. I keep putting it off.
ahh its alright i just wanted to ask someone having this tiny problem.
You should its fun :P
well i'm not sure if fun was the answer but ehh i find it fun :D
hi guys, does someone know an alternative to Coverity Development Testing Platform?
not me :(
@Ahmed.C If it is a C# thing most of us can probably answer
11:31
its c sharp but its a design error using blend
and xaml
:\
anyone here familiar with Nopcommerce?
11:46
does anyone know how to tag certain code snippets? when posting code in an "ask a question" section?
e.g. c# code with c# syntax highlighted?
Will DbSet.Find work with unique (not just primary) keys?
please help
12:06
@LewsTherin I dont know. I got a good grade and passed fine, but not with honors. I have a few grades less than a 7 (required to get that)
@Ahmed.C I am familiar with Windows Phone 8 development. What's up?
can someone please help with this question its driving me insane, im trying to find the confirm order button so i can add the code to it but having no luck
1
Q: passing a commit method with Paypal express checkout plugin in Nopcommerce

Corbo152I am using nopcommerce 3.0 source, i have a website where users can order transport tickets online, when they add the ticket to the basket they are taken to a rendering server that lets them input ticket dates, i have all this working, the issue i am having is that when payment is completed a...

@RoelvanUden Ah I see.
12:22
@CodeMocker
What exactly is the difference between a Forms constructor and the event Load?
@MathiasSiigNørregaard The constructor happens when you make the instance of the class. The load event is called when the actual form is ready and has loaded.
Doing a bunch of stuff in the constructor is usually considered bad because it makes everything else code-soup, especially testing. Events are there for a reason :P
Haha okay thanks @RoelvanUden . It's still kind of nearly the same to me ;P
It should be called 'Loaded' instead of 'Load'
12:45
how to fix this friends?
0x800a1391 - JavaScript runtime error: 'FormData' is undefined
@JasperManickaraj Define FormData :D
var formdata = new FormData();
Mainly i used this to Upload the file using Javascript @RoelvanUden
I don't know what FormData is supposed to be, but it's not defined in your JS @JasperManickaraj
I defined this in my js.. It works perfectly on Firefox .. but not working in IE..
Can you show some code?
12:52
yup with pleasure
function FileUploading() {
    beginform();
    UploadBtnClick = "true";
    var formdata = new FormData(); //FormData object
    var fileInput = document.getElementById('fileInput');

    //Iterating through each files selected in fileInput
    for (i = 0; i < fileInput.files.length; i++) {
        //Appending each file to FormData object
        formdata.append(fileInput.files[i].name, fileInput.files[i]);
    }
    endform();
    //Creating an XMLHttpRequest and sending
    var xhr = new XMLHttpRequest();
So where is FormData defined?
Oh, right. You're making the assumption your IE can actually handle the new XMLHttpRequest API
You're wrong. It can't. You need IE10+ for that.
So find a fallback mechanism, such as github.com/malsup/form
Okay Ya . let me try that one :)
hi @all
13:08
hey
I need advice on how to go about something
Hi Guys, how can i fix this?
     string destination_dir = System.IO.Directory.GetCurrentDirectory() + @"./4x6";

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

                List<ImageEntity> dizin = Directory.GetFiles(destination_dir, "*.*")
                    .Where(f => extensions.Contains(new FileInfo(f).Extension.ToLower())).ToArray();

                return dizin;
13:24
hey
I have a windows application like 1 solution with 35 projects in it. I want to have a single global variable which stores clientID. i access this variable throughout the solution. any clue ?
@linguini Step 1: Do something besides simply asking a chat room to fix your code
@KendallFrey Where were you!?
@shakthi naughty
!?
i am new to winforms. I am trying to add a feature. Idk how to persist a variable's value everywhere. some suggestions will be appreciated
Don't do it
13:31
goodday all!
WHO THE FUCK WROTE THIS SHIT?
is there a way i can make "Point" a fckng bool?
if (coL <= First && coL >= Last && rtb_JS.GetPositionFromCharIndex()
switch (a)
{
    case "a":
        Foo("a");
        break;
    case "b":
        Foo("b");
        break;
    case "c":
        Foo("c");
        break;
    ...
}
im trap in the office pls anyone can help haha
@Elegiac I don't know, what should be true, what should be false?
13:36
it says && operator cant be applied to operands of type 'bool' and 'System.drawing.Point'
obviously
ahaha
But a Point isn't a boolean value
yeah -_-
i just want to verify if my current textposition was on the textposition that i wanted
so i make this inbetween
coL <= First && coL >= Last
So you want to use ==?
13:37
for?
comparison?
it cant be i guess
like?
 if (coL <= First && coL >= Last && rtb_JS.GetPositionFromCharIndex(coL) == coL)
haha sorry for that
If coL is a point
(I'm guessing it's not)
13:39
its 10pm now in here and im alone in the office *
You know what you want to express. Now express it.
 int coL = rtb_JS.SelectionStart - rtb_JS.GetFirstCharIndexOfCurrentLine();
blugh - my R# keeps ignoring my bracing style when automatically creating new methods - any ideas?
@Elegiac I get the feeling you don't want to be using points at all, but probably ints
13:42
@elegiac I believe that GetPositionFromCharIndex returns screen coordinates of the specified char: msdn.microsoft.com/ru-ru/library/…
So i think it is not you want.
yes and yes
i want to get textcursor position
something like:
int coL = rtb_JS.SelectionStart - rtb_JS.GetFirstCharIndexOfCurrentLine();
That's entirely different
Don't you even read the code you paste in?
sry i cant think well now
but today was the deadline so i cant go home lol
The deadline of what?
this.task;
13:46
lol
use pascal case plz
what
is that
!!tell Elegiac google pascal case
google hates me
13:48
PascalCase is CamelCase, but not lowerCamelCase
@elegiac what type of rtb_JS?
lol
@MeFCorvi richtextbox
@CapricaSix thanks
Ok I'll Use PascalCase From Now On ...
What Should I do Now
no, no, no
PascalCase for public members
not english
haha
@KendallFrey ......
    int coL = rtb_JS.SelectionStart - rtb_JS.GetFirstCharIndexOfCurrentLine();
                                            Point asd = new Point(coL);

                                            if (coL <= First && coL >= Last && rtb_JS.GetPositionFromCharIndex(asd))
                                            {

deng
haha
awt
13:59
@MeFCorvi is that the textindexposition?
sry brah been here 13hours straight now cant see and think clear now
^^

« first day (1185 days earlier)      last day (3988 days later) »