« first day (918 days earlier)      last day (4031 days later) » 

7:00 PM
She accompanies Jaime back to King's Landing for a ransom negotiation.
 
Well she was supposed to escort him to Kings Landing,
 
yes
I don't remember the exact details of that trip...
 
Yeah.. but some soldiers captured the two and George chops his fucking hand off. WTF
 
user142019
back
 
oh yah...I remember that part now.
 
user142019
7:01 PM
I need a good book on algorithms and datastructures.
 
@Code-Guru I'm unsure as to whether that is his sword hand... but that shocked the shit out of me.
 
yes, GRRM doesn't mind maiming and killing main characters.
@LewsTherin IIRC, it was.
 
He did that with Khal Drogo as well.. that made me furious.
 
@Zoidberg I've never read Knuth but he is pretty respected
 
@Code-Guru I thought so.
 
user142019
7:02 PM
Knuth it a Jedi when it comes to CS.
 
Yoda?
 
user142019
Now you reminded me of Yoda expressions. :(
 
I don't like Yoda expressions ha
 
user142019
They're terrible.
 
Yup
 
user142019
7:03 PM
If you use a decent language that doesn't implicitly convert things too Booleans, problem solved!
 
user142019
And in other languages… enable your compiler warnings. :^)
 
Wise Yoda is!
 
user142019
 
They also work on cats! i.imgur.com/27z5C49.gif
 
I can't remember, but I think of the things Yoda expression was good for was a null check
 
7:05 PM
@Zoidberg lol
 
@RoelvanUden so what should the controller be doing?
I mean on MVC
 
user142019
Control things.
 
Accept input, instruct the model to do stuff, and pass that to something to generate a view.
 
user142019
In web MVC it usually processes a request—takes user input and renders a view.
 
@Magikarp The Controller gets a model through another layer, and feeds it to the View.
 
7:06 PM
event listeners are part of the controller, right?
 
In Java unfortunately..
 
Event listeners..?
 
user142019
Java is retarded, don't use it.
 
@RoelvanUden Delegates
 
java kind of blurs the line between the view and controller so I'm not sure about it...
 
user142019
7:06 PM
Avoid it at all costs.
 
@Zoidberg your mom's retarded =p
 
user142019
It's worse than PHP.
 
@LewsTherin Lol. I know what event listeners are.
 
java java java
android android
 
I mean, events in ASP.NET MVC?
 
user142019
7:07 PM
@Code-Guru I disagree!
 
so if I may ask, what kind of phone do you have, @zoid?
 
Java is decent enough for command line apps and.. Android.
 
user142019
Nokia C3.
 
@RoelvanUden Ah, I don't think he does MVC. That was a Java question me thinks
 
user142019
Nokia, of course.
 
7:07 PM
Of course mvc has events!
 
user142019
@RoelvanUden nah. :(
 
@LewsTherin That confuses the shit out of me; this is a C# room :-)
 
user142019
Type inference for variables or GTFO.
 
They are even nicely exposed already for you to use.
 
@Zoidberg android?
 
7:08 PM
@RoelvanUden Lol, hasn't stopped me from asking some javascript questions though :D
 
user142019
@Code-Guru Symbian.
 
user142019
I have no smartphone.
 
ahh
 
@LewsTherin That is because C# is used a lot for web applications, and whether the developer doing that work loves or hates JS, he will have to deal with it.
I have a Lumia, Windows Phone, programming with C#
That's how you should roll. Buy a phone for the better developer experience.
 
I hate the phone I have.. I don't even know where it is right now.
Under the bed maybe
I hate phones in general.
 
7:10 PM
I also have a Nokia stupid phone, don't want to replace it, kind of like to have batteries that lasts more than a day
 
@JohanLarsson My phone lasts a day as well! Lol.. I see the battery life I'm like WTF.. you don't get texts or any calls :D
 
user142019
The batteries in my Nokia last for over three weeks.
 
@RoelvanUden so what if you dont have a view? all you return is an XML format string?
 
@JohanLarsson I have a Lumia 620 which has a really terrible battery. It lasts about 5 days without recharging, but I don't have 3G enabled.
 
@Magikarp It's MVC, how can you not have a View? Me confused?
 
7:11 PM
@RoelvanUden you think 5 days is 'terrible'?
 
Imagine how I feel
 
@LewsTherin i mean if you dont have much in the view model
 
@TomW The battery itself is bad compared to what is loaded in expensive phones.
 
@RoelvanUden Had to google Lumia, looks nice.
 
user142019
 
7:12 PM
@LewsTherin was just wondering if theres another architecture
 
I have an S2 that lasts about a day
 
@LewsTherin turn off the backlight...definitely improves the battery life.
 
@Magikarp There is always a view, since the view is the representation of the state you want to return. You always have to return something, the form of that representation you want to return is irrelevant -- the view can be a string, xml, json, html, whatever.
 
@RoelvanUden ah ok thanks
 
@RoelvanUden Irrelevant in what way?
 
7:13 PM
If you don't want to return anything (thus no view), there is also no need for input (no controller) and thus no model. Or no software.
 
@Magikarp XML format is a view
 
I dont know why but I was thinking of GUI all the time
 
@LewsTherin Everything you return -- the state you are representing -- is a view. Whatever format it is, is irrelevent.
 
user142019
Any program that terminates and does not output anything can be optimized to no-op.
 
@Zoidberg Let's go left, right?
 
7:14 PM
public class NullController : Controller {}
 
@RoelvanUden Right, gotcha.
I think it is confusing when folks say the View doesn't care what the server feeds it.. which imo is wrong
The View cares at some level.
 
There is no reality. Reality is a model. All you see is your version of reality through a view. You are controlled.
 
Deep.
 
@TravisJ If there is no reality, how is reality a model?
 
7:18 PM
Take the red pill.
 
@Code-Guru She is annoying as fuck.
 
I love her
I certainly wouldn't kick her out of bed for crumbs
 
I wanted Miles Millar to kill her. Unfortunately he did so too late
 
Well if I told you that you are getting a car for christmas you would be stoked. But then if I told you there was no car, and that you were just going to get a diagram version of the car, then that is how.
 
@LewsTherin What movie?
 
7:20 PM
@TravisJ I just think that statement has some contradictions. "All you see is your version of reality".. except there is no reality, hence I am seeing nothing?
@Code-Guru TV show, Smallville..
I think she is in a new Tv series..
 
Overrated
 
@LewsTherin ahh...that's where I know her from, but I have no idea whoe Miles Millar is. I only watched it here and there.
 
user142019
@Code-Guru meh.
 
user142019
I know people who are way hotter.
 
7:22 PM
@Lews - The first set of statements sets up a redefinition of reality.
 
@LewsTherin Adriana Lima? pfft She's one of the hottest women alive!
@Zoidberg Now I know I can't trust your opinion about much of anything =p
 
@Code-Guru Are we having this conversation again? :D :D
 
user142019
1 min ago, by Lews Therin
Overrated
 
user142019
^ exactly.
 
Reality reality;
reality = new YourReality();//you are here
reality = null;//first statement
reality = new MVCReality();//mind blown.
 
user142019
7:23 PM
There are few hot celebrities and models.
 
Arguing about which is better, a 9.9 or a 9.89, is still focused on the issue of damn.
2
 
@LewsTherin again? did we already have this conversation once before?
 
I think Continuum is today.. Rachel Nichols <3 <3 <3
 
That is like triple take quality if you saw them in the street.
 
@Code-Guru Kate Upton etc.. ?
@TravisJ Lol!
 
7:26 PM
@TravisJ You've not been drinking beer this weekend right?
Keep 'em coming :D
 
@Johan - Nope. Just sleep deprivation. Besides, its Sunday right?
 
@LewsTherin Kate Upton is hot too!
@LewsTherin yah...she's hot
 
Today I am stuck doing data entry. It is easier to mindlessly kibitz than to mindlessly enter data.
 
@TravisJ ah, lack of sleep explains it. I get degrees of aphasia when not sleeping enough.
 
At least I got 6 hours, so it isn't too bad. It is just that I have got between 4-6 hours in a row for the past like 5 days.
 
7:29 PM
Sleep deprivation and me are cousins.
 
work?
 
Yeah, I wish it was something more fun than work lol
what really sucks is I am going to have to run the company in may while the president is gone (eww)
 
I don't sleep because I am working..
I don't sleep because I am watching a tv show, or a movie.
I don't sleep because I am reading a book. I don't fucking sleep.
 
@TravisJ sell it?
 
Ha ha, that's awesome
 
7:32 PM
Old but good
 
Is the plural of queue, queue or queues?
 
the latter imo
 
Yeah
 
Aight. :-)
 
> queue (plural queues)
 
7:35 PM
Strange fact: I'm kind of reg in the ELU chat (dunno why) it actually happens that I manage to help Americans with q's about English :D
 
user142019
@RoelvanUden queues
 
Is Sandbox the SO equivalent of /dev/null?
 
user142019
I wish Stack Overflow were /dev/null. No more bad questions!
 
@Zoidberg lol
 
user142019
 
user142019
7:37 PM
Almost five million bad questions!
 
user142019
(Seriously 90% of all questions are FUBAR.)
 
And yet you still come here
and even racked up some rep
 
user142019
I only come here for the chat. :P
 
user142019
And to downvote and close bad questions!
 
user142019
131
Q: Placeholder in UITextView

ZoidbergI'm making an application which uses an UITextView. Now I want the UITextView to have a placeholder similar to the one you can set for an UITextField. Does anyone know how to do this?

 
user142019
7:40 PM
^ one of my worst questions ever LOL.
 
lol :P
 
user142019
Basically a "gimme the codez" question.
 
Back in '09 everyone got to ask gimme teh codez questions
 
user142019
65k views. Not bad.
 
user142019
I should post it on iOS development subreddit.
 
7:41 PM
It gets almost as many daily views as our wiki :P
 
user142019
You know what's even the worst part?
 
@Zoidberg And got 18.5k rep just downvoting? =p
 
user142019
The project I needed it for was abandoned about an hour after I asked the question.
 
user142019
And I never looked back at it again.
 
7:42 PM
I think kyle takes the cake though
 
user142019
And then I saw it had like 30 upvotes and 10 answers or something and I decided to just accept a random answer. xD
 
103
A: $(document).ready shorthand

Kyle TraubermanThe shorthand is: $(function() { // Code here });

 
@Zoidberg wow...131 upvotes...so you are contributing to the cruft too!
 
user142019
LOL :P
 
user142019
Jup.
 
7:45 PM
31
Q: How can I write a power function myself?

ZoidbergI was always wondering how I can make a function which calculates the power (e.g. 23) myself. In most languages these are included in the standard library, mostly as pow(double x, double y), but how can I write it myself? I was thinking about for loops, but it think my brain got in a loop (when ...

Now that's not a bad question...at least once I read that you also want to do real exponents.
 
user142019
It's terrible.
 
user142019
Delete it.
 
user142019
It's emberasing.
 
Lol
 
I suppose you could probably have googled it
 
user142019
7:47 PM
:'(
 
user142019
Probably but I was a noob back then.
 
user142019
I asked so many bad questions around then lol.
 
Did you mean 'how is it implemented in languages that have it'? If so, that's a google-able. If you extend it to also be "...and why is this a good way?" then it's a better question.
 
user142019
This question is still my favourite:
 
user142019
0
Q: PHP class not found

ZoidbergI solved this question my own. The filename was wrong lolz. Hello everyone! I'm building a CMS like Drupal and Joomla. I'm working on the module feature (plugins), and I got the following error: Fatal error: Class 'settings' not found in C:\wamp\www\SYSTEM\view.php on line 22 Here is my code...

 
user142019
7:49 PM
It has 11k views because it's the first Google result for "PHP class not found".
 
user142019
And it's a terribly useless question since the answer is "you had a typo in your filename".
 
user142019
I was the worst programmer ever.
 
user142019
And I did PHP. :(
 
And you said PHP is better than Java.. ugh
:)
 
user142019
It is.
 
7:53 PM
lol
 
@Zoidberg Get out!
 
user142019
That's why I never did Java except for stupid homework assignments.
 
At least Java is strongly typed
@Zoidberg Ikr?
 
user142019
Java is weakly typed.
 
Are you serious?
 
user142019
7:54 PM
It casts int to float implicitly.
 
user142019
Implicit cast —> weak typing.
 
user142019
Though PHP's type system is much weaker. :)
 
Primitives.. acceptable
 
listen to He Whose Blog Shapes What Is.
 
@Zoidberg was?
 
user142019
7:55 PM
I consider only type systems which perform no implicit conversions at all to be strong.
 
user142019
Others are weak. Weak, like Java and PHP programmers.
 
Which languages don't perform implicit conversions?
 
user142019
Haskell. Erlang.
 
> Any time two people use "strongly typed" or "weakly typed" in a conversation about programming languages, odds are good that they have two subtly or grossly different meanings in their heads
 
user142019
Meh no, not Elixir.
 
7:58 PM
> Instead of using "strongly typed" and "weakly typed", actually describe the restriction you mean.
 
user142019
I consider languages like Python, Java and C# "strong enough". Unlike crap like Perl and C++ which perform implicit casts in very arcane ways. :P
 
RE: C++
A simple widening conversion would be fine. But presumably C++ caters to that boorish jerk who thinks everything should be different for his convenience, and allows you to define stuff that doesn't make sense
 
user142019
Still not as bad as C, though. lol
 
Unless C++ deletes features found in C, it's exactly as bad
 
user142019
It does lack features C has. And not really; C++ still automatic resource management. That's one thing that makes it good no matter what it inherits from C.
 
user142019
8:02 PM
I don't really consider widening conversions in imperative languages to be a problem. And implicit upcasts are totally fine.
 
I'll take your word for it, but I couldn't name one
 
user142019
Implicit conversion from void*. restrict. Designated initializers.
 
I would excuse a great deal of horribleness in C, on account of the circumstances it's intended to be used in
 
user142019
I wish C++ had designated initializers. :(
 
@Zoidberg @LewsTherin Time to log out. Nice chattin with ya'll
 
user142019
8:09 PM
Bye.
 
Later
 
8:32 PM
The hardest part of programming is settling on an architecture and API.
 
and starting, and finishing
 
hello fellow c-sharpers
0
Q: linq to sql query with 2 dbml files

Scott SelbyI have a object of MyFriendFollowStatus , for each friend I need information from 2 different databases, so I wrote something like this db1Context FFdb = new db1Context(); db2Context EEdb = new db2Context(); foreach (fbFriendsFollowStatus a in fbids) { long ffID = FFdb.FFUsers.Where(x => x....

I got a question
 
@RoelvanUden For me, it is also knowing if I am doing shit the right way
 
Hmm there is no right way :P
 
lol
 
8:36 PM
Lol :P
 
there has to be a better way then my way - you'd think .... I mean if you were me - you'd probably think that
who downvoted ???? bastads...
 
lool
 
bastards, with no comment who would do such a thing
 
No downvotes?
 
click on the number , one up one down
 
8:42 PM
I see
 
which is still bettter then no votes +10 for up -2 for down , but still... who randomly down votes ligitimit questions and leaves no comments?
I meant +5 , -2
+10 for an answer
@LewsTherin - that dudes answer seems right , what do you think?
or at least my comment to his answer
 
No.
You cannot query two different databases with one statement.
 
I was just going to say "Where the hell is @TravisJ" before I asked my question , and there you are
 
I was in a meeting :(
 
you got a new gravittar
 
8:52 PM
> Meetings, the socially acceptable alternative to work
 
Yeah, a while ago. But anyway, bottom line on that is two things. You must have at least on query per database. And you must have one query per query constraint. You cannot send in a list in a query and then have SQL know about that list.
Thus, there is no better way than to use a foreach loop there and then issue one query per database in the loop.
The only thing you can do is make sure that your contexts are both open during the entirety of the loop - and properly disposed from using statements.
 
that is what I thought , his query with the .Contains() kind of scares me , that just looks like trouble
not trouble I guess , but slow
 
It actually wont work. The SQL database has no clue what FFUserIds is or contains.
 
ohhhhh , I accepted for nothing , pretty much I answered my own question in the comments of his answer , oh well
 
Don't accept contains as an answer because others will try it and then it will fail during runtime
If you mock with linq to objects it will work and pass tests.
 
8:58 PM
@TravisJ FFUserIds is an IEnumerable<int> I believe.. so shouldn't be a problem
 
There are a lot of questions asking about contains. Let me see if I can get a skeet reference
@Lews - Just not the case, I tried that with IEnumerable<DateTime> and it does not work either.
 
I've used .Contains() before , It just can get very slow based on how you're using it
 
Oops, not IEnumerable<int> some IEnumerable<anon>
@TravisJ Why would SQL database care? It is an in memory list, no?
 

« first day (918 days earlier)      last day (4031 days later) »