« first day (2319 days earlier)      last day (2854 days later) » 

15:02
I'm needing to add CA before the $ symbol for items from Canada, but it's so ugly, I'm considering using 🍁 instead
In angular2, is it possible to do routing with HASH?

I'm trying to create a sub route for a tab component in a user profile page.

for example:
localhost/user/foo#tab1
localhost/user/foo#tab2
localhost/user/foo#tab3
@rolu It's going to do that for browsers that don't support the History API automatically.
Why do you need to worry about it yourself? It's something that Angular handles for you.
He wants to do both.
hash routing just for the page-specific part, like the tab.
we'll I want to lazy load each tab contents. @Luggage thanks i wasnt clear enough
15:07
1 message moved to Trash can
@rolu Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
I have the user profile routes set up like this:

const routes: Routes = [
    {
        path: '',
        component: userProfileComponent,
        children: [
            {
                path: '',
                component: ProfileAllVideos
            },
            {
                path: 'all-showcase',
                component: ProfileAllShowCase
            },
            {
                path: 'showcase',
                component: ProfileShowCase
            },
            {
                path: 'about',
🍁$10.00
I know I can add a fragment to each tab el:

<a [routerLink]="['all-showcase']" fragment=>All Showcase</a>

which will add a hash "all-showcase" to the url
@Luggage Perfect, right?
Any experts on git here? I am learning git and wanted to vet something around detached head with someone to see if I understood it. Not necessarily in here though but I was given this room name as a tip on people that knew the internals of git :)
15:16
Ask away. I get git.
OK, I read that a "problem" with a detached head is that might end up losing changesets later, if a gc occurs. The way I see it, if I do a single commit, changing one file, I get a few new git objects, a new blob object, a new tree object referring to the blob, and a new commit object referring to the tree. Right now only HEAD refers to this new commit.
However, if I later checkout master, the objects still exists on disk, but neither HEAD nor anything in refs refer to them, so a gc at this point might clean them up.
If I explicitly create a branch referring to my new commit, a reference exists, and thus gc won't clean it up. Is this about right?
Yes.
Thanks! That means I understood the git internals about objects :) I'm coming from mercurial and the way branching and things work is different :)
You are typically only on a detached head temporarily, though.
Yep, and unless a gc has occured, I can also checkout the same commit again, which again, temporarily, points HEAD to it.
15:19
Like if you checkout a random commit as part of a 'git bisect' or if you reset master to another commit and are about to make a new branch at your present location
So if I have the history 1-->2-->3-->4-->5-->6 (master), I can reset master back to 4, which means I'm now at a detached head (at 6), and I can now create a new branch at 6? Is that what you mean?
true, but you'd typically resolve the situation on the spot, not like tomorrow.
No
When you git checkout master && git reset 4 you aren't in detached head mode.
reset moves the master pointer back to commit 4
i think you are.
right
When you git checkout 4 you're in detached head mode.
15:22
if you put master back to 4 but HEAD -> 6, then that's a detached head, too
Yes, I understand that, I'm not trying to learn how I can actively use the detached head state, I'm trying to learn git internals because at work I will probably be the go-to guy when people get stumped. So I can't limit myself to learning the command line only.
I'll test the 1-->...6 example :)
Also, if you have a tag on 4 (say release/four) and you checkout the tag with git checkout release/four you're in detached head mode.
just branch anything you want to keep before leaving your seat. no problems.
and yes.. ^ a detached head doesn't always mean you can lose something, sometimes you are pointed to something in history.
@LasseV.Karlsen The warning is about changes and commits you make while in detached head mode.
Yep, it just means that HEAD refers to it but no other named object
15:24
@LasseV.Karlsen Yes,
More interesting question, please. :)
And that means that if you make a commit now, you'll create an unreachable commit
but you can just branch..
By unreachable you mean "without knowing its hash", still assuming a gc hasn't cleaned it up.
Unreachable commits are still reachable if you remember their hash, or if you use git reflog
And if you invoke git gc, it will be removed.
if you have to use reflog, punch whoever fucked up.
Of course, you can still, while on an unreachable commit, just git branch foo, and the commit becomes reachable.
@Luggage I had to use reflog exactly once. And I did punch myself.
git reset 2 got rid of everything after in the log, I wasn't in a detached head, I was back at that changeset and the following changesets were dangling (did not appear in the log).
perfect. the system works.
15:26
@LasseV.Karlsen Right
git reset moves the pointer of the branch you're on back to the commit you say
but it doesn't change the working directory
git reset (hash of previous tip) got me back.
So all the changes between 2 and 6 are now in the working directory, waiting to be added and committed
Exactly, the working folder still contained the file from the previous tip.
git reset --hard will also reset the working directory.
can someone tell me how to make a callback inside a callback function : jsfiddle.net/j57bkdaq/1
15:27
git reset --hard created unreachable commits
ok, we're just masturbating to reset at this point.
Now, 3, 4, 5 and 6 are unreachable.
At work everybody comes from TFS so I'm foreseeing a pleasant future of merge problems :P
hahah, TFS. Their minds are screwed.
If you want them back, you have two options
If you've already pushed master when the tip was at 6, you can git pull and get those commits back, no problem
If you haven't, you have to use git reflog to find the hashes again.
And reset master back to the hash for 6.
If you push, reset, commit and try to push again, it will fail because the branches diverge
15:29
git reset --hard didn't remove anything from the objects, I reset --hard back to 2, then back up to 4 (I only went to 4 in my test here), and everything was kept.
@LasseV.Karlsen Right
reset doesn't remove anything.
--hard did modify my working folder though, brought it back to the stage of 2
It changes the pointer (and optionally, the working directory) to the specified commit
The previous commits still exist
But if you run git gc they'll be gone.
Yep
OK, thanks guys, this was helpful!
Anytime
Also, have your coworkers complete this:
15:31
let your users only ever push fast-forward commit and most problems are reversable without getting too crazy
no git push -f allowed for people that don't know what they are doing
@MadaraUchiha Thanks, bookmarked and I'll go through it myself :)
Currently reading through Pro Git.
15:33
You may need so use some controlled substances to get your users to forget all about TFS.
Tabula Rasa
I don't think anything ever will make them forget that, I think we're well into damage control territory by now.
However, most came from SourceSafe before that so at least we're moving forward.
Now if I can only wrench the stone tablets out of their hands....
Jesus. I dropped source safe for CVS in 2004.
So, to those who suggested that my problem is related to console, you are of course right
And even that was too long.
But this type was new to me
15:36
I'm always right
I'm surprised MS still has console.log bugs in Edge.
@Luggage I got the women in school question wrong (I said 5)
The signature of IE/Edge console.log is different, so it failed when called with multiple arguments
This results in TypeError: invalid calling object in that case
I use console-polyfill that makes those issues go away.
oh.
@Luggage We use "a" console polyfill, that doesn't cover this
15:37
IE/Edge has the worst dev tools possible, not accounting for Safari, whose dev tools don't even count as dev tools
@ndugger The problem only appears while the DevTools are closed, so, in that case the tools are awesome ;P
Because opening them is already the fix!
Magic
yea.. same bug as old IEs. a console.log before the dev tools were open would silently fail
and you'll never see an error.
It didn't used to be silent
it used to just break the whole site
it was. That was the problem. You'd open the console and see nothing
right
It's interesting to note that the number of people in poverty hasn't really changed since 1975, just the percentage of people. (Since population has grown substantially)
15:39
I lived below the poverty line while working for a startup company. I slept on an air mattress and couldn't afford any furniture
It went on for a year before I decided that the abuse wasn't worth it
the % has gone up according to that
This is the type of poverty where an air matress is but the fevered dream of a madman.
I don't think you understand how poor I was, and I lived in a bad area in a really shitty apartment that got broken into regularly
Ah. That's just the US, not the whole world.
they probably took one look at the air mattress and then laughed and went on their way
15:42
@Luggage Which is what I remembered. That console.log is replaced when you open the DevTools in newer versions, that was new to me
/s/console\.log/alert/g
@MadaraUchiha Very nice and visual git tutorial, thanks for that link!
Back to reliable debugging methods!
@Luggage I slept on air mattresses for about a year
15:45
I wonder if they're considering debt as income
But nobody really answered my question. What is your motivation for staying alive?
@Shmiddty Dying is a PITA
and expensive
@FlorianMargaine that's a good reason
15:50
I'm scared of death.
@Luggage He's more scared of you than you are of it.
I don't really have any motivation for living
Death, Death of Rats and Luggage
Being dead would be boring. I can at least do stuff while alive
It's not boring
15:53
@ndugger well, if there isn't an afterlife then it isn't boring, it's nothing
Are you dead?
nothing sounds boring
if there is an afterlife, it's probably not boring
Not at the moment
@ndugger nothing can't be boring
I'd find a way
15:54
you'll just get null reference errors
You were dead for about 13.7 billion years. How did you find it?
boring
your mom is boring
Can confirm, his mom is boring.
The fuck, when did this happen?
15:58
So I've been thinking about making a game
@BenFortune oh, wtf
@BenFortune It's optional
Everyone thinks about making a game. :)
You don't have to buy the commercial license.
> Nodemailer is available under a more restrictive license without a fee, so you are free to test Nodemailer before actually buying anything.
16:00
use createJS for gaming
> European Union Public Licence
@Shmiddty I'm not familiar with the european union licence they cited.
nodemailer is suitable for marketing email?
the UK can't use that license.
@Luggage lol
16:01
@Luggage Sure we can
Also fuck you, I'm still bitter
So basically, if I don't want to go with GPL then I have to buy it?
@BenFortune Correct.
that says commercial use is ok.
ohh.. it's full gpl? not just include source of that library?
Yeah, full GPLv2 apparently
Or at least equivalent
16:03
@jacobian maybe
are jsx comments on codepen not working?
I'm doing {/* this is a comment */}
so we need to have vps to install nodemailer right?
@jacobian Not really, you can use it on anything that supports Node.
nevermind, it accepts normal comments.
You know that "Never allow this page to create alerts again" checkbox? How do I allow alerts again after I clicked that? ...in Edge
16:08
reinstall windows
@OliverSalzburg edge GPO i think
well I still use that default email service in cpanel. so yeah I'll look into it later then.
oops.. i just realized that the code I wrote, I wrote earlier, too. It's all duplicate work.
user2620028
@Luggage right? i even made a couple lines of code for one at one point
@KarelG I need a GPO to revert my click on "Prevent this page from showing additional messages"?
@BenFortune That's not it
I didn't even check sorry lol
Love how I get this when I press F1 in edge
16:16
@BenFortune I just randomly clicked the "Should I trust this site?" link you get when you click the lock next to the URL. That performs a Bing search for "should i trust this web site"
hahaha
@OliverSalzburg edge manages most advanced rules through GPO and registries ...
Something along those lines anyway
you have to search through it
it's far easier at firefox, which is stored in the browser's config
@KarelG It doesn't seem very advanced to me and overly specific
But I'll check for it
16:17
@OliverSalzburg Clear browsing data, notifications permissions
ah ya know MS
That being said, the GPO would probably only set a registry key anyway :P
@BenFortune I have Edge set to clear all on exit
well, that's why i said to check them
16:21
0
A: Browser dialogs (Alert, Confirm, & Prompt) not longer working in Internet Explorer & Firefox on a specific Windows install

asusfanI had this problem using a Windows 8 tablet running IE 10 and solved it by Enabling 'Allow websites to prompt for information using scripted windows' option under Internet Options -> Security Tab -> Custom Level

This also sounds good, but the menu is gone in Edge :P
13 mins ago, by Luggage
reinstall windows
:)
Okay, either I broke my test code or Edge even blocks alerts in InPrivate sessions now
The former. Outside of InPrivate everything is still fucked though :(
        this.data.data.push(data);
best piece of code I wrote in years
I'm getting "Uncaught Error: Objects are not valid as a React child (found: object with keys {AssetList, EPRID}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of Anchor."
@BrianJ Pretty straight forward
16:26
Hey JS ! Community out there what do you think of my answer on JS Namespaces ?
5
A: How do I declare a namespace in JavaScript?

Divyanshu RawatThe Module pattern was originally defined as a way to provide both private and public encapsulation for classes in conventional software engineering. When working with the Module pattern, we may find it useful to define a simple template that we use for getting started with it. Here's one that c...

This problem still blows my mind though. When DevTools are open, everything is awesome. DevTools are closed and one specific console.info call is breaking everything. Throws TypeError: Invalid calling object. When I copy the same call to the start of my application, it doesn't throw
wtf
It only happens when I'm invoking console.info through a reference
var info=window.console.info;info("",""); // throws
window.console.info("",""); // doesn't throw
var info=window.console.info.bind(console)?
@BenFortune That works much better
Shockingly!
not so shocking
ECMAscript: "Context, all the things!"
@jAndy That's why I put a sarcastic exclamation mark at the end of it
You can tell it's a sarcastic exclamation mark because it gives you that dirty look if you get real close to your display
16:37
oh!! I didn't see the sarcastic color of the exclamation mark.. but now that you mentioned it...
Also, thanks @BenFortune, you have always been my favorite
Oh, and if you want to get your alert()s back after you've disabled them on one site in Edge, it helps to go back to that same site for testing :P
@BenFortune yeah it seems that my data binding source needs to be an array and it's being passed an object :)
on a side note, any idea how to get the dropdown from this searchinput to display top instead of bottom? grommet.github.io/docs/search-input
when I hit search on the input the suggestions dropdown but are cutoff..so would prefer them to drop up if that's a thing
17:01
@OliverSalzburg Is that... sarcasm?
17:15
@BenFortune Partially. I actually am thankful, but I would have to check the current ranking to see who the real favorite is
17:26
Anyone here good with animations jQuery?
I have a fancy idea, not sure if something like that isn't already made though
user2620028
it is already made
It was made in 2013 and we were tired of it in 2014. :)
Well, guess there is no point in explaining my idea then
user2620028
i mean you could, and then we could show you who already made it more than likely
17:35
Joking aside, animations made with jquery aren't too popular around here. I don't want to speak for everyone, though.
well, animation in general
Pretty hard to explain it tho
Lemme paint it :3
user2620028
i doubt that will help us understand it haha
I am pretty sure it will xD
ok I suck at drawing
basicly, I want to add a fancy animation for the navbar where it kind of "drops" from above the page
idk if this is a good explanation xD The top stays at the same place while the bottom drops down 90*
I think you might be able to do that with css-only.
Oh, any ideas how if I might ask?
17:41
Lay out the bar in the final position, then have it animate from a rotate(90) to 0.
yeh but that would make it 2d
user2620028
@Omnitored daneden.github.io/animate.css some css animation examples
I mean that at the beginning the bottom is further away from you
user2620028
your website is 3d?
No, but I want the animation to look like it
17:42
ohh, I see. you mean flip forward, not flop don on it's side?
user2620028
yeah the 2d image didn't help convey the 3d effect
You can "skew" in a css tranform.. so you can maybe fake the 3d with that
imagine holding a paper sheet forward, then the end of the sheet that is further away from you drops 90* down while the place you hold stays in same position
right. skew.
17:43
kind of like th FlipInX on the github animate.css you sent @HatterisMad
just the other way
user2620028
then read the source and find out how they did it and then modify it
okay, thanks :3
they use transform: perspective() and rotate3d()
uh,
so
I have an answer with 500 votes now
503
A: How to find the sum of an array of numbers

Florian MargaineIn Lisp, this'd be exactly the job for reduce. You'd see this kind of code: (reduce #'+ '(1 2 3)) ; 6 Fortunately, in JavaScript, we also have reduce! Unfortunately, + is an operator, not a function. But we can make it pretty! Here, look: var sum = [1, 2, 3].reduce(add, 0); function add(a, b...

Yes, no IE8 support, jQuery 2+ doesn't work in IE8 either. Let's not be hamstrung by a really crappy browser. This Answer is beautiful. Thank Florian. — augurone Jun 13 '14 at 1:22
what a wonderful comment
17:55
a lullaby to my ears
That's really cool though, and a great answer
Could use less Lisp evangelism.
My best answer has 31 votes :(
it should have been haskell
@Luggage could totally use more

« first day (2319 days earlier)      last day (2854 days later) »