« first day (1478 days earlier)      last day (3464 days later) » 

12:15 AM
@JoshBjelovuk What do you need ?
ah, alone here again :]
 
12:34 AM
hey, sorry
still there?
I'm wondering about the efficiency behind using SingleOrDefault() within a loop
actually, nevermind, i think i'm ok
 
 
1 hour later…
1:45 AM
How to get rid of idiots: pastebin.com/N1KtZNiF
 
@MikeM. I don't know who that Mike guy is, but he sure isn't a nice person to chat with.
 
I am that Mike Guy
The dude I was talking to f_cked me over 2 or 3 times
I am just done with him.
 
sounds to me like you were the one that was fucking people over
talking about DoSing a website or something
 
@KendallFrey lolz
I don't do DoS(S)ings
It's low as fuck
and every child of 10 can do it nowadays
 
so is that conversation
 
1:54 AM
We had 2 sites together and he kept bitching at other sites that got us into trouble and closing the sites.
So we merged into a friends site and he left so I stood alone with nothing as the coder is his ass-licking cousin....
Which got me fucked over with the site owner.
 
sounds like a lot of bad decisions by a bunch of assholes
 
so the last 2 or 3 sites of him got closed because of I contacted vBulletin because he uses Nulled vBulletin software.
That's just hilarious, want to pirate software still make shit up with others.
then he spammed me his new site xD well thats how this all started...
(this convo)
So ye I can be a real asshole if people make it too.
@KendallFrey In which subject I need to take that? XD
I am also like: if(!MIKE.Likes(You)){ MIKE.Says("I don't like you"); }
Maybe a bit better ^^
 
2:33 AM
 
lolz
 
2:58 AM
@ton.yeung huh?
 
 
1 hour later…
4:04 AM
http://i.imgur.com/ldYPgsn.png for free hosting
http://i.imgur.com/iMURybZ.png with these prices: http://i.imgur.com/vi4u2Q6.png seems fine :)
ofcourse at my forum site xD SimpleBB.net
I am working on the forum software with an extra hosting service as extra, so people do not need to search for some good hosting provider :)
 
4:54 AM
how's everybody doing?
 
 
1 hour later…
5:59 AM
I'm alright, and yourself @AndrewKim?
 
6:52 AM
HI all!
1
/ \
2 3
/\ /\
4 5 6 7
to
5
|
2
/ \
1 4
/
3
/ \
6 7
damn.. it doesn't look good
well any body knows how to take the binary tree and turn the leaf node into root?
I guess the end result is not really binary tree..
ok... I've kill the conversation
 
 
3 hours later…
9:40 AM
Hi
 
9:52 AM
Roel, sorry to bombard you with questions but you appear to be a C# oracle :) , have you ever experienced this odd issue: WIth an empty C# webforms project, you put a watch on the default.aspx OnLoad method, debug the project to realise that 2 threads are running on it (sometimes)?
 
10:39 AM
@Dave I don't use Web Forms at all, and have never really used it. But I have a pretty good idea why that happens; it is because you don't have a favicon.ico. The favicon.ico is always requested by the web browser to display a little icon next to the address, and if there isn't one, IIS will merely forward the request to the Web Forms engine to deal with it.
Therefore resulting in 2 requests, and thus 2 OnLoads
 
11:18 AM
hmmmm. That is correct actually... My goodness. I will test now @RoelvanUden
 
11:45 AM
Hi all!
Is there possible to "fail" serialization process in try catch? If a certain property in the class isn't match a criteria?
 
If exception happens during serialization, then yes, it will fail into catch block
but it will be common, and i'm not sure that you can get what class\property causes serialization issue, because it may depends on specific serialization mechanism
 
how to manually throw the exception?
I mean. Like "if PropertyA=1, then throw exception manually"
(I Implement IXmlSerializable, so I write the serialization process myself)
 
inside serialization process? you can implement setter for PropertyA and in that setter you can check if value is 1, then you can just throw Exception; or custom exception, and then you can catch that exception in catch block of serialization logic
 
Is here any android expert?
 
@MohammadAreebSiddiqui you are doing it wrong
@SergeyLitvinov something like this
public void WriteXml(System.Xml.XmlWriter writer)
        {
            if(PropertyA == 1)
                throw new SerializationFailsException();
            //serializing things
        }
 
11:52 AM
@MosesAprico I know but I need urgent help regarding android here.
 
@MohammadAreebSiddiqui okay, I learnt it a long time ago, post your problem
 
@MosesAprico yeah it should work. and then you can do catch(SerializationFailsException ex) in block where you do it
 
Can any android expert here solve my problem:
https://stackoverflow.com/questions/26698878/fragment-not-reloading
 
@SergeyLitvinov and how to prevent the such "broken" file for being created? or undoing that at least. A manual delete file? Since even the error comes "mid air" the file still created, but broken
 
@MohammadAreebSiddiqui C# and android are quite far apart.
 
11:58 AM
@MohammadAreebSiddiqui that seemed beyond my reach sorry. (I just learned the basic, thought maybe your problem is simple enough)
 
well, i suppose you would need to delete that file manually. if exception happens in the beggining of serialization, then file still be exists, but it will be empty. Another solution might serialization into MemoryStream, and then if it is passed fine, then you can save this MemoryStream into real file. Otherwise you won't do it and file won't be created. But in that case if serialization object is huge, then that MemoryStream can take some more memory
 
Can any one come to me in a separate room for android help?
 
@MohammadAreebSiddiqui isn't that already a chat room for that
 
Yeah it's there but it's secured, I have already requested access but no response yet. I am needing some really very urgent help here.
 
I'm learning c# at the moment and have just finished a course on the fundamentals which didn't touch on anything visual what so ever, it was purely console based. I've started c# because I eventually want to use Xamarin for cross-platform development and now I'm trying to take baby steps at understanding the visual side.
Does each of the three platforms supported by Xamarin require different code for the UI elements?
For example it seems the XAML is used for Windows apps, but I can't work out what is used for Android, iOS.
 
12:02 PM
@James I believe they all use either xaml or html 5
(I might be wrong)
 
@James yes, all platforms will require own UI as each platform has own style guidelines. If we are talking about Android, iOS and WindowsPhone
 
@MosesAprico Thanks, I'm looking at their docs page here but it's not that clear to me, at least not as a beginner dev. developer.xamarin.com/guides/cross-platform/…
@SergeyLitvinov Ok, I realise that they all have their own style, I was just hoping that the coding of the UI was a common language.
 
@James html5 can be used across those platform I guess
 
@MosesAprico Ok. Although I want to end up trying x-platform development I have some small experience with Visual Studio and their JS/HTML5 apps. Now that I'm learning C# I was going to stay in a familiar env and try building a few basic apps in VS with C# and XAML hoping that the knowledge would carry through when I eventually try Xamarin - does that makes sense?
 
C# & XAML => VS is better. (My gut told me so, never tried xamarin)
oh sorry
doesnt read that carefully
yes, it makes sense then
 
12:12 PM
@MosesAprico Ok, cool. Thank you.
 
@James you're welcome
 
@James Usually you have a different UI for each platform and shared business logic, in Xamarin world, that is. If you do PhoneGap/HTML2 development you can pretty much use the same code everywhere.
 
@RoelvanUden I'd not heard of PhoneGap before, cheers for the suggestion I'm just looking at the page now. Perhaps I'll do a bit more research on this vs. Xamarin before I get in too deep as I have some HTML/JS knowledge already
Very deep hole this old coding business!
 
Wariness of frameworks is a good instinct to have imho
I think to really grok the purpose of them you have to have gone through trying to write the equivalent code yourself
And some are just so opinionated that they create as many headaches as they solve
 
12:34 PM
There is that. I prefer PhoneGap simply because it's JavaScript/HTML/CSS and so extremely easy to setup and test (there are emulators inside Chrome, for example). Essentially, it's really nothing more than a browser with your application packaged and some additional APIs for native device functionalities. It's so easy you can set up your own pipeline, but that might also be confusing. Whatever you choose, you'll encounter stuff that you think is stupid anyway :D
 
1:17 PM
Does anyone use Visual Studio? I'm wondering if, in the designer view you can configure VS to automatically highlight in the designer the element corresponding to where your cursor is in the code?
It works the other way i.e. click on element moves you to the right place in code
 
1:51 PM
@James I am pretty sure we all use VS for .net but no I never seen it...
 
2:16 PM
a plugin is probably possible but I guess also more effort than it's worth
it has so many options though, might be buried in there somewhere
 
no idea why this does not work every time.
> System.Runtime.Serialization.SerializationException : Unable to find assembly 'Gu.Units, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
 
that's weird
race condition with VS possibly, rather than any issue with the code is my guess
 
 
3 hours later…
5:15 PM
anybody here?
 
hi @AndrewKim
 
hey!
 
nothing too large... although, are you familiar with asp.net mvc?
 
nope sorry.
shoot in your question. maybe someone stop by and read yours
 
5:21 PM
sure
how do y'all set a success message at the controller and show it at the view? through the ViewBag? Through ModelState?
 
@AndrewKim either ViewBag or with a strongly-typed view that takes a model instance
 
ok then, I should then continue on using the model way
 
Am I right in thinking the Styles is the closest XAML has to CSS?
 
I asked because of the ModelState class which I learned to use for validation errors
@James iirc yes
@TomW is it a good idea to have a base model class with basic properties like "Message," and have every model inherit from it?
 
I probably wouldn't do that. Unless all the different model types all actually are specialised versions of some base type conceptually, which I can't imagine would often be the case
 
5:38 PM
Guys how can i insert in a database a lot of things one at a time, and if the command failed in the middle, all the added things will be deleted ? am using c# mysql
 
Can you post images here? I have something in Visual Studio that I haven't seen before.
 
@James yeah you can, with the upload button
 
@User1 that's called a transaction
 
@AndrewKim Ha, sorry - I'm running in a minimised window and that doesn't appear
Thanks
Got it now.
 
@TomW i need to add order + sell + notification + userHistory, and if if for example the command failed on adding the notification , all added order and sell will be removed ? if it's a transaction i can't find how i can do it
 
5:43 PM
This is a template from VS for C#Universal apps, I haven't seen this 'outdented' code before with the #IF style syntax - what is it used for?
The grey text.
 
@User1 yes, that's exactly what transactions are designed to do. You really can't google "SQL transaction"?
 
shuriken Thanks
 
6:44 PM
Hi !
 
@KeremZaman hello
 
I am new to WPF and I am trying to do this: http://stackoverflow.com/questions/19806271/c-sharp-playing-a-video-file
But I don't want to make video player at background. I want to make it fit into a part of form.
 
7:04 PM
Is there a way to make EF monitor a specific entity for changes?
I get an entity back with a postback action in the viewmodel with changes, but I don't think I can save it because the context that's available isn't the same as the one where I got the entity from
 
7:46 PM
Anyone around?
 
hey
 
Hello Andrew
A question pops in my head
in today's world of EF and LINQ-TO-Whatever, does data layer (or data service) still have a reason to exist?
To think of it, what EF generates, is de facto a data layer, is it not?
 
True
 
so if you have EF, would you let numerous services of the same platfrom use it straight up?
 
for my current project I still have a DAL with EF
But I think this question isn't uncommon
hold on
 
7:49 PM
Any reasons in particular?
 
Hmm
 
Aren't you creating a bottleneck for yourself?
You could be hitting DB from 5 spots at once, instead you are hitting DAL which in turn talks to DB
 
I reasoned with having a DAL because with it, I have a single layer where I can change the way I use the db objects
and it makes it so I can unit test my services easier
 
So we are talking more about Business Layer Rules
 
Well I mean I guess, the reason I have one does relate closely with the business layer
 
7:52 PM
And to answer your question from 13:04, yes you can still save it, but you need to drop the original context first
There is an SO on that
you want me to look?
 
oh sure, that'd be great... I couldn't find one earlier
 
14
Q: Save detached entity in Entity Framework 6

KingOfHypocritesI've read through LOTS of posts on saving a detached entity in Entity Framework. All of them seem to apply to older versions of Entity Framework. They reference methods such as ApplyCurrentValues and ChangeObjectState which do not seem to exist. On a whim I decided to try a method I found through...

Let me know if it helps
 
ah that helps a ton
thanks!
@Darek
oops
 
oops what?
 
I accidentally pressed enter, but my question is, generally how long are your controllers?
 
8:04 PM
my controllers?
 
yeah, in the asp.net mvc projects you work(ed) on
 
Oh, I have not done MVC for a while
have been stuck with a Brownfield WinForms app
500k lines of spaghetti code
 
Ahaha ok
That must suck
 
Small sample
        DataSet ds = new clsWizardEx().queryDB("Select * FROM POLICY WHERE POLICY = " + policyPK, this.DSN);
        XmlDocument xmlDoc = new XmlDocument();
        xmlDoc.LoadXml(ds.GetXml());
        XmlNode rootNode = xmlDoc.SelectSingleNode("ds1/Table");
 
Haha
 
8:07 PM
The XML serves no other eason but grabbing the data from DB
I guess someone was learning and thought that would be cool to implement
Not only they waste time on xml genertaion, but querying XML is by far more expensive than iterating through DS.Tables[0].Rows
And although we need only three columns from the POLICY record, let's retrieve all 113 of them
 
That... is genius haha
 
Most days, I cry myself to sleep
:)
Another one:
public static string GetCurrentCultureDate(string DateText)
{
string retVal = "";

try
{
DateTime dtDateIn = DateTime.Parse(DateText);
retVal = dtDateIn.ToString(AUM.DBFunctions.DBFunction.OracleDateFormat);

}
catch(Exception ex)
{
MessageBox.Show("Error coverting date: " + ex.Message, "Error Converting Date");
}

return retVal;
}
private string FormatDate2(string dateIn)
{
string temYear = "", temMonth = "", temDay = "";
dateIn = dateIn.Substring(0, 10);
temYear = dateIn.Substring(0, 4);
temMonth = dateIn.Substring(5, 2);
temDay = dateIn.Substring(8, 2);

return temMonth + "/" + temDay + "/" + temYear;
}
 
oh my
 
By the way, these go to textboxes to represent dates, and we have full suite of Infragistics controls to use
 
I don't know how to respond haha... Simply "wow" maybe
 
8:21 PM
@Darek do you have the power to aggressively refactor?
 
Not aggresively
I am an independent contractor, sandwiched between Infosys engineers and Accenture QA at a Fortune 500
So I do teh best I can
promote tools
best practices
teach som ehow to code
and chase down copy-pasters
Because they don't think what they copy
Playing the role of Software Architect for a $1.5B policy management system
 
sounds like a nutty amount of money to spend on any IT project
 
Oh, no, that's the amount we mange
 
gotcha
 
teh latest project is still 8 figures over 3 years
a shitload of dough for the number of features we actually deliver
most of it is just talk and meetings
very little meat
:)
 
8:27 PM
getting the task understood is usually the hardest part
It seems that in all sorts of businesses there are processes that actually nobody understands
 
very true
takes practice to accept it
I think there is value in many
 
clients that don't understand their own business, consume a huge amount of time and fruitless effort
don't really mind as long as I'm getting paid for re-work that should have been done right the first time
 
True, still frustrates me on some days, that so much dough is "wasted"
 
common pattern IME is i) you ask a client what they want, they tell you ii) you do some prototyping and realise there are consequences to what they've specified that they haven't thought of iii) you ask them to reconcile those consequences and they go dark
 
Indeed
 
8:33 PM
probably because those questions have exposed a contradiction between things they thought they knew about their business that they can't resolve
when it eventually gets done, it's handed to someone in their camp who only has a limited view, and what they give you back doesn't answer the question, so you have to go through the whole process again
fgsgds
 
This sounds like my day
 
It feels to me like a horrible quagmire that really smart people know ways to get out of and the rest of us have to make do
but maybe it's just a fact of life
 
You guys are familiar with unit tests right?
 
Yup
fairly
 
I'm confused on how to make them test the rules of logic instead of implementation
Say I'm testing an action in an MVC controller
I test an edge case and I expect it to return, say an HTTP status code
wouldn't testing for the status code be testing the implementation? If I changed that behavior later on, I would have to also change the unit tests too
 
8:39 PM
Controllers are not the easiest artefacts to test, whatever issues you have are probably not new
That's another way of saying there may not be a satisfactory answer
I'm not sure what you mean by this logic vs. implementation idea
 
Is it possible to keep a Socket open after you do Socket.Send(...) ?
 
@DestinyDawn what makes you think it wouldn't be open?
 
I assume that it means to test and check for expected results instead of checking on how it specifically does it, but I'm not too clear about it either, now that I think about it. programmers.stackexchange.com/questions/750/…
 
I'm sending a string using a Socket from my C# code to my program in Java and the pipe always appears to be closing the second after I send it
 
@AndrewKim ah, I suppose I see what you mean. The status code gets returned from the action method, no? So that's not really any different to testing that any other method returns an appropriate value
@DestinyDawn that sounds to me like the java end is hanging up
 
8:44 PM
I suppose so, thanks.
 
@TomW It could be--I basically just need to send and receive a string. But before I go, if you are correct, is there a way to say that the received string length is unknown?
 
@DestinyDawn looking at the docs for Socket, it doesn't say anything about automatically closing, it should be held open until either side closes it
 
@TomW Okay--but is it at least possible to receive an unknown length string? The byte length is always unknown since the response will always be different.
 
@DestinyDawn I'm not sure I understand the question
 
@TomW I'll try to explain better.
 
8:47 PM
I don't think that's possible
Last time I used sockets, I had to always send a fixed size byte array containing length of string bytes
Otherwise I wouldn't know when to stop reading
 
@AndrewKim That seems like a flawed system, don't you think? What's the point of constantly sending the same length between a server and a client?
 
each call to Receive fills a fixed-length byte array passed as an argument and returns the number of bytes written. While the number of bytes received is greater than 0, keep reading
 
Basically here is what I'm doing:

var response = new byte[xxx];

sock.Receive (response);
var str = Encoding.UTF8.GetString (response);
Console.WriteLine ("[RECV] {0}", str);
The value xxx is always unknown
 
I guess Tom's way works
 
@DestinyDawn xxx is unknown because you've assumed it should be the same as the length of your data, it's not meant to be used like that
@AndrewKim what's 'my way'?
 
8:51 PM
@TomW this
 
You normally pick a constant array size and reuse the array, buffering its contents somewhere after each read
 
@TomW What's it suppose to be then? I'm really not understanding much. I'm completely new to Sockets.
 
any size
8000 is reasonable I think
 
I thought the size did matter though, or else

sock.Receive (response);
var str = Encoding.UTF8.GetString (response);
Console.WriteLine ("[RECV] {0}", str);

would give off some weird character?
This is actually what I'm getting in result of that: [RECV] ��
 
Yeah, that's probably cut off the end of the string
 
8:53 PM
yes, but you use the int returned from .Recieve for when to cut off
.receive
 
UTF8 represents characters as between 1 and 4 bytes IIRC. You could be cutting off the string halfway through a byte sequence so the last byte is meaningless and can't be interpreted as a UTF8 character
And interpreting the zeroes after the end of the data as UTF8 wouldn't work either
 
Sorry to cut the conversation off, I'm going out. I'll look into it more
Thanks for your help in a meantime
 
 
1 hour later…
10:07 PM
The features seems good enough isn't it?
 

« first day (1478 days earlier)      last day (3464 days later) »