« first day (2846 days earlier)      last day (2116 days later) » 

12:00 AM
all at once, but angular has a lifecycle
 
`import * as ol from 'openlayers';

export default ol.interaction;`

Shouldn't I be able to just do `import interaction from 'ol/interaction'` where `'ol/interaction'` is the file/module /
 
you should but you probably need babel
 
Yeah it's in a react project
okay I will open an issue on the git repo
I wanted to make sure I'm not being stupid first
 
i've done it before so. but I had to setup bable for it. it was a pain. I can't speak for your setup
 
Babel is working well for me, it's not a new project
And I'm using many other dependencies from the same package
thanks rick
 
12:09 AM
are you able to import nomrally without the *
 
I'm gonna make a JS lib called Bible
 
There's a ruby lib called god
 
it'll transpile cleaner code
that's exciting
> The easiest way to understand how god will make your life better is by trying out a simple example.
> From the logs you can see god killing and restarting the process
> let's see how to use the more powerful aspects of god
 
@Martin if you want a workaround for now, create your own 'index' for the directory
 
@Rick so I could hook into the compilation process and look at all the modules as well as all dependencies of each module?
 
12:20 AM
export Map from 'opensource/blah/Map';
export whatever from ...;
and so on
whatever you're using
then import from that file with your defaults or w/e set
 
I'm back
hey people
 
morn
 
afternoon
 
12:36 AM
night
brb
 
12:58 AM
@DemCodeLines ya, use the injector service in angular.
 
anyone know php
if so plz help out in php chat.
how do I make the following secure:
$url = $_GET["url"];
escapeshellcmd ('/usr/local/bin/youtube-dl youtube.com/watch?v=';.$url.' --no-check-certificate -f mp4 -o /This/Is/A/Path.mp4');
 
1:53 AM
350 tabs open any beat me?
chrome://inspect/#pages
ctrl f "inspect"
@JBis you could probably use asceape as html
really you should be passing in array IMO
 
for(let i = 0; i < 351; i++) window.open('about:blank');
beat :D
 
10 points for gryffindor
 
is this the 'shortest string to crash the browser' thing? i'm not sure i want to test it...
 
@JBis I would just accept alphanumeric characters only
 
i don't even know if that works
 
1:57 AM
using regex
 
I'm not running it tho
 
is there a stack forum where you can post your code and have it be judged and critiqued?
 
^
here
codereview has some issues IMO
 
I have been using code review. sometimes no one answers or the feedback sucks
 
1:58 AM
if its small & well simple SO works if its large rarely do people want to read the whole thing
 
I pride myself on the conciseness of my code.
mine in the latest post check it out
I formatted it and even gave a high-level description of the solution using metaphors, similes, and all manner of descriptive magic
 
codewriting I'll do for free namely SO
codereview well yeah to much mental energy
But I do like Rick and Morty though
heck I even tried the special schezwaaaananan sauce!
 
schezwaaananan sauce sucked.
 
meeh it wasn't much worse then anything else mcdonalds sells
you have to think relatively
 
well if you put it that way. it's not that bad
I don't like reviewing other peoples code. Unless the code does something unique that paradigm shifts my understanding of the problem. However, I do like having my code reviewed.
I mainly like code reviews because It's nice to see how other people would approach the same problem
 
2:12 AM
I sometimes wish you could pay people to answer questions on SO
well SE in general
the people that know the answers seem to lurk around here
but a bounty isn't always enough incentive
Paying some random on a site or even a tutor has been a real hit and miss for me
 
If you think about it, you are being paid. The more problems you solve the more job opertuinties that are available to you.
 
@William I think YouTube urls sometimes contain numbers.
 
@JBis alaphanumeric
both numbers and letters
google the term
 
Oh I misread
i know what term means
read fast (on mobile)
 
@Rick meeh I don't connect my account on her with my person life at all
lot's of people don't
 
2:17 AM
@William addtiaoonlly some have "_"
 
I mean someone could probably figure out my name
from the history in chat but that won't do much
 
@William what about escapeshellcmd
 
@JBis wrap you value in quotes and strip out all quotes
sure and use that command
 
@William ok thanks for help.
 
@JBis this should work
escapeshellcmd ('/usr/local/bin/youtube-dl youtube.com/watch?v='.str_replace($url,"\"").' --no-check-certificate -f mp4 -o /This/Is/A/Path.mp4');
but don't tell anyone I told you to do that
its a pretty bad idea
you should be using something that accepts arrays
ideally or a plugin
 
2:22 AM
Wdym?
 
what are you confused about
 
whats wrong with what escaping and what you did? Why plug-in? And why use an array?
 
it sort of like using eval in JavaScript
its there but dear god you better have a really good resano
what I'd should work if there aren't any bugs
escapeshellcmd ('/usr/local/bin/youtube-dl "https://www.youtube.com/watch?v='.str_replace($url,"\"").'" --no-check-certificate -f mp4 -o /This/Is/A/Path.mp4');
that is what I intended but either way I am not a phper
 
Ok thanks
will test something's out
 
my favorite feature about php is well that it has really good syntax highlighting and I get tired of staring at planish text all day long
and I would argue that isn't the feature of the language but just the fact it is so popular
so not really a good argument
its templating system is much simpler then JS's
also
 
2:40 AM
escapeshellcmd ($url)
Seems to work well. Test by echoing output
was not able to trick it
 
3:10 AM
Is there any way to get a list of all modules and their dependencies in angularjs?
 
 
3 hours later…
6:12 AM
@DemCodeLines I don't know what you're goal is, but if you need to alter program behavior based on the module and/or dependencies available, you're probably doing something wrong
 
6:38 AM
seems that it is a genre on its own
 
Patient gamers?
 
yeah I am active in that sub
 
What's that sub about?
I'd check it out, but I can't really access sites like reddit from work pc
 
talking about games that are > 6 months old. The concept is that most of us have bought games via promo/sales where a game is usually a year older or more
and discussing about that. It happens in a civil manner, of which I like
For example, I recently started with Alan Wake
 
Sounds right up my alley then
 
6:44 AM
that is a game from 2013 I think. Sometimes I purchase games around its release date but I usually put it on my wish list to purchase it later when my backlog got reduced
 
I don't often buy games newly released (though I did buy two point hospital)
 
Like I still have to play AC: Syndicate and Origins :D
it is not a problem to buy at release while being a patient gamer. Just don't talk about it in that sub :P
 
The significant bulk of the games I buy were on sale or acquired through humble bundle
Caveblazers is a really kickass game by the way
Indy game that costs very little but it is quite addictive if you like platformers
 
there are nice platformer indie games yes
 
they have aspects of the game which are roguelike so every game is different
I do enjoy assassin's creed games
I get a lot of value from them to be sure
I avoid the main plotline for as long as possible
 
6:54 AM
Sidequests!
Oh yeah
Gotta get my hands on Origins, still.
 
And if we're being honest, I think my favorite parts of the AC games were the puzzle areas
like either literal puzzle or like "stay undetected" puzzles
 
they are working on another title: AC: Odyssey
happens in the ancient Greece :D
 
AC is one of the few things being done by Ubisoft which generally has a lot of positive input
 
that was not the case with Unity and Syndicate AFAIK
 
Meh, they've made so many AC games that if you don't like one, you can just try another
I still need to play black flag
I played the original AC game. I loved the plot.. it got weird towards the end
 
7:10 AM
played all of them until Syndicate :P
 
I thought AC Brotherhood was a good one too
Another good twist at the end
Have you seen the movie?
 
7:32 AM
Hello everyone, I want to ask can we have functions inside functional components ?
In reactjs
 
@stonerock sure, I don't see why not
 
In above code I am getting error why so ?
It is functional component and has a function called clubPage()
Error: Unexpected token , expected : at 10:19
 
I can't view images through my work proxy, sorry
can you make a pastbin version?
 
Wait let me add code here
import React, { Component } from 'react'
import { Meteor } from 'meteor/meteor'
import { withTracker } from 'meteor/react-meteor-data'


const Header = ({allnavitems, loading}) => {

	let navlist = allnavitems;

	clubPage(clubSlug){
    	if(clubSlug === ''){
    		return false
    	}
    	return true
    }

	if (loading) {
    	return <div><p>Loading...</p></div>
    }

    console.log(navlist)

    return (
      <div><p>Hello world</p></div>
    )


}

export default withTracker(() => {
  const navitems = Meteor.subscribe('league_navbar', '')
 
ctrl + k before submitting to format code
Hmm, I don't see an obvious error.. which line is line 10?
 
7:40 AM
Line 10 is clubPage() {}
Error is -> `imports/Header.jsx:10:19: Unexpected token,
expected ; (10:19)
`
 
maybe you have to add function keyword before
 
@Neil Wow it works fine. This is something new for me
 
@Neil yes. The visuals are well done but I don't recommend it. It breaks the lore that the game series has created.
 
In class based component we don't use function keyword but in functional components we do need to use "function" am I right ?
 
@KarelG Oh I've seen the movie
I'm glad to hear we're on the same wavelength
While I appreciate that they were trying to drive the story in a new direction, it wasn't well done
If they're going to derail the storyline for the games, they should at least make sure it's a damn good storyline
They seemed to focus a lot on Desmond's adaptation to finding out he's really an assassin
 
7:53 AM
the story is based on the first use of animus to obtain data from genetic code
AC1 happened further in the future btw
I totally get it, but it is just the script as a whole. Even the ending is ludicrous and is not the Creed.
I already noticed that they do not comprehend that at the beginning of the movie. The Creed is something different than what they tried to tell
 
Well the movie certainly wasn't the plot of the first game
They didn't even go into much detail about his life as an assassin
 
just a story in the large time line of AC :P
 
I think I would have appreciated more of that
Also, they could have asked Kristen Bell for the part..
 
which part?
(she is in veronica mars right?)
 
She played Lucy in the first game
She wasn't just the voice, she actually looked like Kristen Bell
 
7:58 AM
really?
TIL
 
I'm guessing they got her to act as well
You see that a lot these days, but it was somewhat new then
 
They did that in GTA games for a while. Since Vice City AFAIK
each character with a dialogue has a similar appearance as their voice actor
 
I think that really elevates the game when they do that
 
I was literally stuck in the "neat" mood when I compared voice actors with the characters through those GTA games
 
Animating walking 3d models will never quite look the same as actual data of a person walking
much less acting
Yeah, the effect is a little like being in a movie
 
8:04 AM
fun fact
the aunt of Franklin is represented and voice acted by same the actress that has played aunt Viv in French Prince of Bel Air.
Wents nut when I discovered that
 
oh that's weird
It's always weird to hear about the different roles voice actors play
 
Party people, I need help
Why is this returning "Undefined" its really pissing me off.. seems straight foward no?
function validateEmail(email) {
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;

if (regex.test(email)) {

$.ajax({
url: '/users/checkmail',
data: {
email: email
},
method: 'post',
success: function (res) {
$("#email_prev").html(res);
if (res == "available") {
$("#store_email").attr('data-valid', 'true');
return true;
} else {
$("#store_email").attr('data-valid', 'false');
return false;
}
}
});
Its not throwing any errors at all
 
could it be that you are not familair with the event driven nature of javascript ?
the function in success is only called when the server has replied on the request.
That does not happen immediately.
The terminology for that is "callback".
 
8:21 AM
4303
Q: How do I return the response from an asynchronous call?

Felix KlingI have a function foo which makes an Ajax request. How can I return the response from foo? I tried returning the value from the success callback as well as assigning the response to a local variable inside the function and returning that one, but none of those ways actually return the response....

 
Well i can confirm that the Ajax is working well.

$("#email_prev").html(res);
This line works
 
 
4 hours later…
11:57 AM
Hello can someone please help me on conditional rendering in reactjs ?
My code:
<div class="container alignCenterVertically" id="logoContainer">
                {{#if clubPage }}
                <div class="col-md-5 col-sm-12">
                  {{#if liteVersionLeague }}
                  <a href="{{pathFor 'club.admin' slug=slug}}" class="logoSideMenu alignCenterVertically">
                    <img src="{{clubLogo}}" class="logo float-left"><span class="elegant-color-text ultra-bold-900">{{clubBanner}}</span>
                  </a>
                  {{else}}
                  <a href="{{pathFor 'club.index' slug=slug}}" class="logoSideMenu alignCenterVertically">
Above code is meteorjs I want to convert it into react component
 
and what's giving you trouble?
 
In above code clubPage, liteVersionLeague all are boolean true/false if true I want to display html elements else other html elements
@rlemon I am not able to understand how should I break them ?
 
render() {
  return <div>
    { foo ? <ComponentA /> : <ComponentB /> }
  </div>;
}
as a very simple example
it's still just js
but with JSX
that gets messy, so consider breaking parts out
 
But instead of component I want to display multiple html elements in mycase <img> and <a> tags
 
they are still components
<div></div> in JSX translates to React.createElement('div', ...);
maybe 'component' is over reaching of a term, but they are all built with the same tools when doing JSX
and that's why I said break things out
 
12:06 PM
 
Should I add those html elements inside a function ? And then I can do liteVersionLeague ? func1() : func2()
 
yes
you don't even need the ternary
 
How ?
 
@Feeds Should happen any millennium now..
 
function func1(value) {
  if( !value ) return null;
  // build the list
}
function func2(value) {
  if( value ) return null;
  // build the list
}
react doesn't render nulls
 
12:08 PM
Oh ok got it.
 
so then you can just call both, and let them return values or null
 
Cool got it
 
imo both are fine
whatever suits your fancy
 
Or whatever fancies your suits
Don't sweat the petty things and don't pet the sweaty things, I always say
 
you don't know me.
maybe that's my jam
 
12:12 PM
Sounds like the jam of a serial killer to me
 
hi
 
@Breathing \o
 
xD
 
Hi, Can I use angular material design without including angular in my project???
 
no
but you can use other material design libraries
 
12:25 PM
What is better to have in a home? Wood flooring or ceramic wood-like flooring?
One is obviously nicer but can ruin
 
I am using mdbootstrap but Its didn't provide side nav
in basic component
 
@Neil what room?
 
@rlemon javascript room
Kidding
Bedroom
Can't seem to come to a conclusion with my wife.. she really likes the idea of ceramic flooring, but I'd assume that wood would be "nicer"
 
hrm. I'm leaning towards vinyl fake wood
they make really nice looking (with texture) water proof panels now
 
True
 
12:29 PM
I have stone tile, hard wood, carpet, and other random assortments of flooring in my house
the hard wood is nice, but a bitch to maintain
and more expensive.
I'm lookin at some of the new water proof vinyl panels for my basement
 
I wouldn't have even suggested wood for the flooring if it were the living room or kitchen
 
@ShubhamKandiyal material.io/develop/web
 
living room. but not kitchen
kitchen would be the worst place for real hardwood
 
but we don't eat in the bedroom so I figure it's not a terrible idea
 
drop a spoon, damage the floor :D
 
12:30 PM
nah, bathroom would be worse :P
"You wet the floor, again!?" "Well yeah.. I showered.."
 
meh, with the right wood and treatment water isn't even the worst you can do to wood
dropping stuff, almost anything metal, will dent the wood. if it breaks the fibers you have something that will never look right again
I used to be in the "I hate vinyl" camp, but the new stuff they have now is really nice looking
 
@Ikari But There is no demo
 
so I've been converted
 
they can make very realistic wood-like ceramic tiling
even faking the "wood plank" look you always see
 
lmao @ShubhamKandiyal did you try navigating around that site at all?
fwiw there's a sidebar, Components > pick any component you wanna play with > Open it (material.io/develop/web/components/drawers) > Demo (material-components.github.io/material-components-web-catalog/#/…)
 
12:36 PM
@Ikari Cloneing a repo
thanks
 
@Neil the look yes. But nothing beats the nice smell of real wood being used
 
@rlemon We have a oak woorden floor in the kitchen
 
you poor soul
I had wooden kitchen floors once. oak inlays with mostly pine
granted pine is the worst choice..
it was a nightmare
 
Nah, it can take quite a beating
 
maybe oak can
pine is like a peach
 
12:40 PM
Pine is just... soft, mushy.
 
Yop guys
Is there a way to do something like this in Vue.js ?
:style="{padding: padding padding/2}"
 
12:54 PM
is there a way I can make a input box like prompt?
 
how do you mean like prompt?
blocking? with buttons? a modal?
 
a modal
yes
prompt appears differently for diffrent browswers when I take input
I don't want that
 
okay, so there are like 10,000 examples on how to write a modal.
@Breathing sure? but why. literally no regular user expects things to be identical between browsers. their menus are different, so is the other system dialogs.
besides that.. not many people switch browsers
 
lol
thanks
 
@rlemon Kinda ironic
 
1:02 PM
I don't think so
 
Why not?
 
because they're not saying you can't have it look the same
if there was just a <h1>hello world</h1> it would look the same
 
Fair enough :P
 
point was don't go out of the way to make something look identical, when it looks perfectly fine
 
It would've been awesome if they did some user-agent based styles :P
 
1:03 PM
body {
	margin: 0;
	padding: 10em;
	font: small Baskerville, Georgia, serif;
	background: #dfd5c5 url(tile.gif);
	}
h1 {
	margin: 0;
	padding: 0 0 70px 0;
	font-size: 1400%;
	line-height: 1em;
	font-weight: normal;
	text-align: center;
	text-shadow: 3px 3px 4px #a0937f;
	white-space: nowrap;
	color: #48433d;
	background: url(flourish.png) no-repeat 50% 100%;
they make no additional effort to support browsers who don't respect common styling :P
no prefixes, no hacks.
 
1:17 PM
ello
 
1:35 PM
ohai
 
EHLO @Kamil
 
1:46 PM
@Cerbrus that's why it is useful for beavers ( ͡° ͜ʖ ͡°)
 

« first day (2846 days earlier)      last day (2116 days later) »