« first day (1474 days earlier)      last day (3473 days later) » 

12:00 AM
new indie bundle is pretty sweet. tower of guns looks rad
 
Anyway to bind a progress bar to a await ... call?
 
you can pass in an IProgress<T>
but the method needs to know about it and support it
Progress<T> automatically handles marshaling for you, etc
 
@Pheonixblade9 My brother and I made a game. True story bro
 
I have this:
IProgress<int> progressVal = new Progress<int>(value => { progress.Value = value; });
await Task.Run(() => {
    x++;
    getCachedMusic(cachedSongs);
    progressVal.Report(x / cachedSongs.Count);
});
But it throws an exception.
A first chance exception of type 'System.Exception' occurred in TestApp.exe
 
message?
also, unhandled exceptions may be more useful than first chance
 
12:12 AM
anyone want Teleglitch: Die More Edition?
 
There is no message
 
It only gives an exception.
Nothing else.
Sadly.
 
enjoy, whoever gets it first
 
wait, is that free for everyone?
it showed up at the bottom of my page
@DemCodeLines does the exception actually crash your app? if it's handled, there shouldn't be a problem
 
12:15 AM
@KendallFrey Finally got a message:
Additional information: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))
 
12:55 AM
Hello my GREAT friends
Why is C# + ASP.net so bitchy?
 
So I have a for loop that has i as its variable and counts up to sourceType.Count
 
@MikeM. Can you be more specific?
 
Inside it, I have this line: Debug.WriteLine(i + "/" + sourceType.Count + "=" + (i/sourceType.Count));
 
@KendallFrey Trying to do a simple update function but it doesn't update the values but neither throw an error xD
 
Guess what the debugger prints?
 
12:57 AM
Don't mind these replaces
 
@DemCodeLines something ending with 0
 
Yes...but why?
8/185=0
when i = 8
 
int/int=int
if you want to return a double, use double division
if you want decimal, us decimal
 
(double)intval/ intval = doubleval right
 
basically yeah
 
12:59 AM
This is the actual line of use: progress.Value = (i / sourceType.Count);
where progress is the progressbar
so, I believe it's a decimal I need.
 
progress.Value should be i
progress.MaxValue should be sourceType.Count
 
but ye kendall I hope you can help me with: chat.stackoverflow.com/transcript/message/19658429#19658429 because it's pretty important issue
well for me it is
 
@MikeM. What are you expecting to see?
 
Help in the good way :)
The code should update the code and when you redirect back as last as you can see, it shows the articles
 
reduce the problem, I don't understand
 
1:01 AM
if I update the Name text and I click update, it doesn't throw an error yet it does go to article
If I click update the database table should get updated with these values: naam content and publishMode
*naam* is shown on the artikelen.aspx page
when I hit update it does redirect to *artikelen.aspx* but it does not update the *naam* text
Got what I meant now? XD
IDK how to explain it better than that to be honest xD
 
Right now I'm only able to comprehend 2 things: You're doing string replace, and you're using SQL
any way you can determine only what's relevant?
 
Ignore the string replaxed
replaces*
 
so it's a SQL problem?
 
kinda ye
Well yes and no
to be honest I don't see a problem with my query...
and it neither throws an error...
 
what do you have it narrowed down to?
Can you post a minimal reproducible example?
 
1:09 AM
I will use pictures :)
 
i prefer code
 
This is my artikelen.aspx: http://i.imgur.com/yacYPza.png
This is my EditArtikel.aspx: http://i.imgur.com/pc9O3AS.png
This is after the edits: http://i.imgur.com/nclxssq.png <== this is how it should look like
This is how the codes look like: http://i.imgur.com/8LwfIhX.png
This is how the Artikelen.aspx looks like {and it doesn't get updated while it should}: http://i.imgur.com/LbfPz2J.png
That's basicly all code that's doing something at that place.
behave receiving...
Good to know: Changing for example the Name Manually then it does work, but it just doesn;t work in my update query :(
 
you mean test isn't updating to test test?
 
indeed
neither any value is getting updated.
 
is id matching?
 
1:14 AM
yup
 
what does the generated SQL look like before going to the server?
BTW, you should use SQL parameters, your code is vulnerable to injection
 
hey it's a college project
 
What value does ExecuteNonQuery return?
 
who gives a shit about injections in that xD
 
@MikeM. no better time to start than now :)
 
1:17 AM
I do know them
 
@MikeM. every good professor
 
I used it for the datetime in another file :)
as that one was bitchy xD
 
4 mins ago, by Kendall Frey
what does the generated SQL look like before going to the server?
 
the .ExecuteNonQuery content = "UPDATE Article SET Name='test', Content='dit is een test artikel', Published='0' WHERE Id =1027" for the sqlcommand
which is correct
 
yeah, that looks fine
and the return value?
wait, no that doesn't look fine
 
1:19 AM
looks fine to me indeed XD
 
it should be SET Name='test test' right?
 
indeed
 
that's your problem then
 
yup noticed that now aswell xD
 
If txtNaam.Text isn't returning the entered value, I'm not sure what the problem is
 
1:21 AM
I have no idea
 
Do yourself a favour, and sleep on it :) It usually works
 
private void Button_Click(object sender, RoutedEventArgs e)
        {
            SqlConnection sc = new SqlConnection();
            SqlCommand com = new SqlCommand();
            sc.ConnectionString = ConString;
            sc.Open();
            com.Connection = sc;
            com.CommandText = ("INSERT INTO stuff (People) VALUES (" + tbPeople.Text);
            com.ExecuteNonQuery();
            sc.Close();
        }
Does this look right?
 
com.CommandText = ("INSERT INTO stuff (People) VALUES (" + tbPeople.Text);
.
=
.
com.CommandText = "INSERT INTO stuff (People) VALUES('"+ tbPeople.Text +"')";
 
@Tokencodingnewbie no
What Mike said
when in doubt, double check you SQL statement
 
I got further
but it's REALLLY strange :P
String naam = txtNaam.Text;
String published = cmbPublish.SelectedValue;
String content = txtContent.Text;
here it already says the old values
 
1:28 AM
not an expert in ASP.NET, probably a simple mistake, but no idea what it would be
 
@Tokencodingnewbie You can also do: SqlConnection sc = new SqlConnection(ConString);
oh and SqlCommand com = new SqlCommand("Query Here", con);
I am just gonna sleep
I hoop I can fix it up tomorrow
because it has to be done thursday ;( (I cri everytim)
 
Thank you, new to this SQL thing.
 
Me too about 9 weeks ago xD
 
Trying to make a prototype for my boss at work to show him how cool computers are :P
Instead of using notebook paper for everything
 
lol
notebook paper is cool for everything!
 
1:33 AM
Leafs are up 3-0 time for bed
 
2:33 AM
I need to wake up at 5AM
 
you crazy europeans
 
awesomeness! ^_^
 
I only go to bed that late on weekends
 
Programming is my life
No Programming == No Life
Sleep well everyone :)
#Forever alone ^^ (joke) anyways cya
 
1:58 AM
Yay my stuff is working, kind of <333333333
 
if (Debugger.IsAttached) { Debugger.Break(); }
will this code hurt anything on production?
 
 
2 hours later…
4:27 AM
@Teoman on the first eye catch in trolling mode: I'd say neh.
If you look straight away to that I'd have to ask you: WHY'?!?
 
 
1 hour later…
5:31 AM
yo yo yo :)
its been a while zup
 
 
5 hours later…
10:02 AM
@Teoman why do you want to do that?
 
10:37 AM
o/
@Teomanshipahi Use #if DEBUG ...............
 
10:55 AM
@RoelvanUden Halp
Was updating ALL packages yesterday in this project and the fucking internet cut out at work
Interrupted the update
So now nothing works
And when I run Update Package it says no packages installed
 
@Sippy Uh, just revert the changes in your source control?
 
:D
:DDDD
Is that the only fix?
Cos I wrote a bunch of other shit before I did the package update
Not expecting the fucking internet for the whole company to shit out
 
Probably not. You can probably force a NuGet restore.
But in TFS you can just revert everything in your packages and go meh.
 
Oh you can revert just the packages?
 
Yeah. Team Explorer, Source Control, go to your branch and then right-click packages and go Revert Changes
 
11:00 AM
Hello all
 
"Undo Pending Changes"?
 
Yeah, that.
 
Kewl.
Thankya
Was literally just trying to downgrade jQuery using nuget lol
Then my workmate was like oh just do package update
 
NuGet is terrible for JavaScript. bower is the way to go.
 
Ah ffs
Still broken
:/
k np
For some reason it removed reference to system.web.http
cos sense.
Ah fuck it
 
11:09 AM
Ever get one of those days where you just know you're not going to get any work done? Usually the days I end up in C# chat.
 
omg
Oh my god.
What a fuckin headache :/
 
@Sippy Aspirine?
 
@RoelvanUden I just pulled from TFS from 2 weeks ago
And now half of the new stuff is in it
Like how
So many errors :/
 
Silly man. You should learn to use source control properly :-P
 
I don't know wtf happened ...
This is fucking gay
 
11:20 AM
you're seeing changes you didn't pull?
That's called a merge
 
Why is half my fucking source missing wtf
FUCK
 
Did you overwrite your local solution file?
 
you should always pull before or after checking in
 
Or, in TFS, shelve your own changes.
 
How can I fix this?
 
11:21 AM
what's the problem?
 
I thought TFS saved all previous versions?
I just wanna pull down a previous version of the project
I don't want any of these changes.
 
do you have uncommitted changes you want to keep?
 
No
I just wanna go back two weeks
And have that project that worked
 
then do a Get Specific Version
 
It's not working
IT's missing loads of files.
I did a commit on the 27th that worked
Now I just wanna scrap the entire local version and download that
 
11:25 AM
Um, is there a Windows 7 version of this book? or... maybe something similar? amazon.com/Head-First-C-Jennifer-Greene/dp/1449343503/…
 
fuuuuuuck
 
@Sippy you could try deleting and remapping
 
That's what I'm doing but that's not working, it's only downloading two projects out of the four
Rather stressful.
 
Hey guys, i use a 3 tier architecture in a project, should i use the same MysqlConnection object ? or this can result in problems
 
The same connection for what?
 
11:40 AM
what i'm doing now is that i have a static class that contains a mysqlconnection object, whenever i need to connect i use StaticClass.ConnectionObject.Open(), is this the correct way
 
no
you should create a new connection
 
yes ofc i do StaticClass.ConnectionObject = new MysqlConnection();
 
There's probably no reason to have a property for it
A factory method would be useful, but there's probably no reason to store it anywhere but a local variable
 
so i should : whenever i want to coonnect with mysql use :
var conn = new MysqlConnection(); ???
 
that would work fine
you will want your connection string stored somewhere you can access it everywhere
but the connections are disposable
 
11:48 AM
yes thank you @KendallFrey , i saw too many tutorials storing the connection object to a static class
 
that's just discouraging garbage collection and encouraging stale objects
 
the problem is that when you query database multiple times in different threads , the conn object cann be in use, that 's why " i gess" my app is crashing :)
 
that would be an issue, yes
local variables should fix that
 
should not trust tutorials anymore :)
 
Think it's working again now
For some reason the base controller which had all the authentication shit in it is missing
But w/e
 
11:57 AM
do you guys know a good paper about 3 tier architecture ?
 
n tier?
Roel might
k gonna need to go shower
 
@RoelvanUden if it's possible i need
you
 
stress finished
 
guys, i want to display a loading screen whenever i perform long actions, for now i'm using a method that takes an action and wait for the action to execute, while the action is runnign i open a loading window and when it's finnished i close it, but i'm not sure this is the correctt way to do, it can result of some problems , what's the correct way, any sugestions?
 
Ugh i hate co-workers...
@User1 IsBusy
With BackgroundWorker is an option
 
12:14 PM
while(isbussy)
display windoow ???
 
@User1 Google and fill in your own. There is no golden standard
 
@User1 In what tech
 
We have a person who is turning any C# code that he cannot figure out into C++. I am like the only one that knows at this point... not sure what to do haha.
 
Convert C# to C++ to make it understandable? HAHAHAHAHAHAHA
(I'm crying inside)
 
12:17 PM
That is the language he learned first...
Tried to give me some BS excuse right now about how pointers don't work right in C#. B freaking S
 
@RoelvanUden wpf
 
@JLott Lol indeed. He should just learn and adapt, or get his ass fired. :P
@JLott Don't you have like, a policy saying, we code in .NET? :-/
 
This all started because I was debugging and got the message saying I couldn't because debugging in C++ was not enabled. Yes.. We have a huge policy that we code in .NET unless we HAVE to code in something else.
Which is usually something in PowerShell... or something...
 
@JLott Well, talk to your superiors about it. Imho, its unacceptable to use C++ because you're too damn rusted down to use anything else
 
Right. He has been struggling on this project for weeeks so I think he just gave up lol
 
12:22 PM
no help about 3 tier architecture ?
 
We use WPF here. I really think you should look into the Background Worker class. It is great
Once you learn how to use it
 
BackgroundWorker is a tad old tho, just use a Task
 
Pssssh.. lol that is fine too.
 
IsDoingLongRunningTask = true;
Task.Run(() => {
    // .. long stuff here ..
    IsDoingLongRunningTask = false;
});
Then just respond with an animation on IsDoingLongRunningTask
 
yes sir, what about using a method that takes multiple actions and execute it
Task.Run(() => {
action();
IsDoingLongRunningTask = false;
});
Humm ?
 
12:35 PM
I kinda wish we could make traditional desktop applications for Windows Phone.
Imagine having Windows Forms on Windows Phone... Now that would be bliss
 
@jay_t55 Uh.. please, god, no. WPF on WP8 would be fine. OH WAIT!
 
LOL
 
(Yes, it's pretty much the same as WPF -- should've learned that eh)
 
I just mean that WinForms programming is 1 billion times faster and easier and you basically get the same quality (some exceptions apply)
 
@jay_t55 wat
ur drunk
 
12:38 PM
Not even close. It's slower, more cumbersome, lower quality, less extensibility, etc
 
all of those
 
If you don't get binding then yes, WPF is slow for you.
But you're supposed to learn binding.
 
Maybe for your apps, but for the stuff I've had to make - I've rewritten in xaml/wpf and it's the same result
I get binding now. I was stuck for a while months ago but
i love binding. that's not my issue though
 
@jay_t55 If you write WPF as if it was WinForms, then obviously it will be slower, because it's not WinForms. It's better.
 
^ WPF is better
 
12:41 PM
WPF is butter
 
you guys will be using wpf also with windows 10 ?
 
of course
 
For desktop, sure. That, or, node-webkit.
 
When does Windows 10 come out? I know I could Google it...
 
why don't you download the preview?
 
12:43 PM
NO
I am going to have to upgrade my VMWare..
 
Mac problems :P
 
fuck apple
 
is it possible to develop with c# in a mac computer , i mean without visual studio
 
mono
 
12:46 PM
i mean develop for windows , in a mac ?
 
Yes, Kendall said, mono.
Is it comfortable? Not really. But it works.
 
1:20 PM
Hello,I would like to know ,if this update method is good or maybe there are better solutions?
public void UpdateEmployee(Customer customer)
{
Employees.Insert(Employees.IndexOf(customer),customer);
}
 
... Context.
 
I have List of Employees and I want update single customer in that List,with matching info.
 
it doesn't look like you're updating employee really, it looks like you adding a customer to employee
 
@User1 I use VMWare. It is very comfortable.
 
I changed it,I think now it`s good,but maybe there is better way to do it?
public void UpdateEmployee(Customer oldCustomer,Customer newCustomer)
{
Employees.Insert(Employees.IndexOf(oldCustomer),newCustomer);
OnEmployeeChanged();
}
 
1:31 PM
@RoelvanUden Fuck jQuery!
 
@Sippy Yes
Don't use it :-P
 
Fucking datepicker works but it won't accept css
And it looks like ..
 
That is jQuery UI
 
Yeah well
They're the same level of evil
Look how disgusting that is
It looked normal before this whole god damn debacle
 
Need to add a spare space to those single Digs
 
1:36 PM
@Sippy CTRL+F5?
 
(void)::EnumPrinters(PRINTER_ENUM_LOCAL|PRINTER_ENUM_CONNECTIONS,
                   NULL, 2, NULL, 0, &bytes_needed, &count_returned);
 
@RoelvanUden Doesn't do anyting.
 
whats dis syntax C++ gurus
 
Deleting both and reinstalling lol
 
nevermind
 
1:37 PM
@NETscape Normal C++ with a useless type cast and static accessor
 
@RoelvanUden In the nuget package manager where's the option to uninstall something .. O_o
 
@Sippy At the big uninstall button
 
Under the Installed Packages tab on the left
 
@RoelvanUden Bitchass jQueryUI doesn't have one
Oh
In there :D
 
Me Back after 1 month long holiday :Z
 
1:52 PM
sabbatical > holiday
 
Well that didn't work
PLAN Z
cry.
 
did you pull jq load the page see if the scripts are missing?
 
PLAN Z "cry" LOOOOOL
 
Slide bars for a 1-10 selector.. what happened to radio buttons..
 
using(mysqlconnection conn = new mysqlconnection(connstring);
{
    conn.open();
    return true;
}
guys, will this call the dispose() despite returning tru ?
 
1:58 PM
unless it comes back to the block
no
 
Ah fuck it, time to hope that the jqueryui cdn doesn't expire before my project.
Cos it works.
And I'm too lazy to copy paste.
 
it has to end the block put return true after the }
 
ah yes , thank you
:)
 

« first day (1474 days earlier)      last day (3473 days later) »