« first day (1769 days earlier)      last day (3402 days later) » 

14:00
but when i have to go beyond static, i'll ook at that paypal react thing
almost every native addon using buffers no longer work
@cswl You didn't read the changelog first?
@Luggage that's the kind of thing I want, indeed
@Luggage well, don't react handlers take over after your loading?
yea. basically I tell react to render, like normal
oh, it's a static site generator
yeah, not what I want
14:05
but it finds already-rendered html with a hash, so it confirms it's up-to-date, attached it's event handlers and proceeds
well, this is both. static generator so the initial html is all ready before react loads
but it's 100% react, so it's all dynamic once react laods on the client
yeah, but I want to load dynamic content
e.g. I want to have /user/foo and /user/bar
ohh,right, so you want the paypal thing, so you can feed it data on the server site
server-generated but dynamic
you can do that with plain react, actually..
yeah, it looks like so
14:07
react supprts server-side and client side rendering out of the box
require('node-jsx').install()

var express = require('express')
  , app = express()
  , React = require('react/addons')
  , components = require('./public/components.jsx')

var HelloMessage = React.createFactory(components.HelloMessage)


app.engine('jade', require('jade').__express)
app.set('view engine', 'jade')

app.use(express.static(__dirname + '/public'))

app.get('/', function(req, res){
  res.render('index', {
    react: React.renderToString(HelloMessage({name: "John"}))
  })
})

app.listen(3000, function() {
this is what I want :-)
Not sure what the PayPal module would add
What's the difference between including 'react' vs 'react/addons'? What's in the addons that doesn;t get included by default?
@FlorianMargaine Pretty much that without having to pass the react prop
yea. i use webpack, too, to bundle up all the images and such. that means i need to load my webpack bundle from node and call the render on the SAME CODE that is sent to the client
14:11
@Nick In 0.14 I think they moved certain stuff to react/addons
fair enough; I've seen people include the 'react/addons' but I omit the /addons part, and it works just fine
Oh, ok
Such as React.render
Uhh, nah, it works with jsut react
Actually no, in 0.14 they moved it to react-dom
when you use React/addons, then the object you get back has an extra "addons" property with more junk
14:12
@Luggage static images such as headers included in the CSS? Or what kind of images do you bundle with webpack?
@FlorianMargaine all of the above.
an image reference from a background-image rule in css, also other iamges reference in code. one sec, i'll show you
Yes please
@Luggage no dynamic image though, right?
no..
pngs on disk
Is super(props); and super() the same thing? I always do the latter.
@AwalGarg, couldn't debug from express but i've used node-inspector. Connection fails for this message: XMLHttpRequest cannot load localhost:8888/app. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8888' is therefore not allowed access. Data from my post req is already present at localhost:8888/app. How should i handle this ?
@BenFortune in react? do youhave props? super(props) just passes the ose props to the parent constructor which will assign them to the object (maybe other thigsn)
are you assigning them yourself? this.props = props; ?
Oh, no
14:16
If you have property in an object deeply nested among multiple objects, is it best practice to check if each of the key in the property 'path' exist? IE. if(object.key && object.key.key && object.key.key.keyThatHasMyThing) {}
I usually do something like <Component {...this.props} />
cool, so now i need a virtual env for iojs2.. :|
class MyComponent extends React.Component
{
    constructor(props) {
        super(props);
    }
}
Only had 2 small react projects, still learning
Does the above couple with what I wrote?
well, this.props won't be assigned unless you did it yourself in the constructor or did super(props);
14:20
Makes sense
jerk off
The streaming pipeline for Http2 is so exciting.
@BenFortune nice.
@BenFortune How does that work, though? Does my browser actually load those images with http2?
14:28
@Kippie If your browser supports it, yes
Can anyone else help on my issue ? :(
@Anirban Allow CORS
user3119231
@AwalGarg seems like it is an error (?) :DD
can anyone else load inbox.google.com?
14:30
oh, looks like inbox for google apps is available
@AwalGarg yep
user3119231
Google Inbox - German language > Sie verwenden Google Apps for Work?
@BenFortune , Where should i allow it ? server side or client side ?
hmm, signed out (removed cookies) and signed in. now it works
@Anirban Server
14:32
@Anirban both
Oh, that http2 benchmark lmao
> Well, they also appear to be stacking the deck a bit, by configuring HTTP/1.1 in ways that no sane person would (i.e., force-closing the connection after each resource -- HTTP/1.1 already supports re-using the existing connection for further requests, but they're explicitly disallowing that to make HTTP/2 seem better).
@BenFortune , how to allow them using js ? most of the examples have used php.
@BenFortune i mean most of SO answers
Usually consists of something like res.header("Access-Control-Allow-Origin", "*");
@Anirban starting the debugger without even looking at the logs is not a smart choice. start express in verbose logging mode, send the request, and see where it chokes. (you will have to set some environment variable to enable the verbose logging I think)
I am using jquery ui accordion and want to be able to click a google map marker which opens a accordion item how do i go about this ?
14:35
use a paste service
Having a go a tit
paste service ?
yes
a service that allows you to paste in walls of text and give us a link
you mean like jsfiddle ?
sure
14:36
chat.stackoverflow.com/messages/23262/25208375 here it is. stackoverflow's in-house pastie service
@rlemon lol. Like Pastebin, or Gist also.
@SeanLarkin sure
thanks guys will do
@AwalGarg , I'm kind of new. I tried Express DEBUG, but didn't result much. So, i went for inspector. I'll try it if adding headers doesn't solve this.
@AwalGarg This needs to be a command
14:37
i have created a question actually which might be even better for you ?
@havingagoatit small blocks of code are fine, anything over a half dozen lines gets painful to read in this chat
user3119231
The only disadvantage is, that you can't delete your script on this services...
@Anirban "didn't result much"?? you didn't see the logs in the console?
@BenFortune It sure does.
user3119231
@Anirban Try terminal has built in console.
Make a paste room, !!gist <code>, moves it to room then links the message
14:38
node-pg, I have an array of id's and I wanna return the respective rows. SELECT * FROM tbl WHERE id IN ($1) then I give it ids.join(',') but this doesn't work.
@rlemon [ids.join(',')] right?
yup
@BenFortune correct. make a PR.
text: query
values: [ids.join(',')]
@AwalGarg I tried this command from express doc: set DEBUG=express:* & node index.js but it just loaded usual files (as i saw them on console) then it was listening on debug mode. I tried loading the app from browser but nothing more was in console. It was just listening.
14:40
@rlemon [ids.map(id => "'" + id + "'").join(',')]?
@AwalGarg, Though It sounds funny. :3
here is the question i made stackoverflow.com/questions/32120982/how-to-click-google-map-marker-to-open-acco‌​rdion-item
@FlorianMargaine Shouldn't need it if id is an integer right?
Date is a function that returns a string, so is Date.now a nested function?
14:41
@Anirban after you load the app, send the POST request which is not working. Then see what express has to say about that request in the console. If nothing about that request appears, it means the request didn't come to express in the first place so your problem is elsewhere.
This process is also known as "looking at the screen"
@AwalGarg Yeah, I also assumed that. But i needed to be sure about the problem, So, i used inspector.
@rlemon id = ANY($1::int[])?
@BenFortune not sure.
@BenFortune that is probably what I'm after
IN should work though
You shouldn't need to join with that too
YourAdrenalineFix again hahahahaha
14:48
@BenFortune so in and pass it the array??
values: [[123,456,789,...]]
is what that would equate too
I have 1337 kills on my stattrak scar 20 wat do
@rlemon client.query('SELECT * FROM tbl WHERE id = ANY($1::int[])', [ids])
will try, thanks
@ʞɔᴉN 1337.0 k/d
@KendallFrey pretty much
14:51
!!stat ʞɔᴉN
@ʞɔᴉN l2awp
@rlemon ʞɔᴉN (http://stackoverflow.com/users/1146881/%ca%9e%c9%94%e1%b4%89n) has 2306 reputation, earned 0 rep today, asked 4 questions, gave 10 answers, for a q:a ratio of 2:5.
avg. rep/post: 164.71. Badges: 1g 10s 20b
m4a1 masterrace
Hi
sup Neil
14:52
@BenFortune awps are for scrubs
:25208523, The command i used for express debugging. Is that okay ? or i've to add some other parameters ?
@ʞɔᴉN Play a real game like battlefield
@CapricaSix rep/post game too strong
!!stat catgocat
14:53
@catgocat You (http://stackoverflow.com/users/4106994/catgocat) have 801 reputation, earned 0 rep today, asked 17 questions, gave 24 answers, for a q:a ratio of 17:24.
avg. rep/post: 19.53. Badges: 0g 3s 13b
!!stat
@Cereal You (http://stackoverflow.com/users/2424975/cereal) have 1175 reputation, earned 0 rep today, asked 14 questions, gave 61 answers, for a q:a ratio of 14:61.
avg. rep/post: 15.66. Badges: 0g 4s 18b
Can't wait for postgres 9.5 upserts
!!stat
@BenFortune You (http://stackoverflow.com/users/2615209/ben-fortune) have 11105 reputation, earned -3 rep today, asked 11 questions, gave 357 answers, for a q:a ratio of 11:357.
avg. rep/post: 30.17. Badges: 4g 20s 37b
@Anirban it is correct
!!stat Caprica Six
@catgocat User Elusio proved elusive.
!!stat CapricaSix
@rlemon Caprica Six (http://stackoverflow.com/users/1839506/caprica-six) has 1401 reputation, earned 0 rep today, asked 0 questions, gave 4 answers, for a q:a ratio of H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ.
avg. rep/post: 350.25. Badges: 0g 6s 10b
2
14:56
what
!!stat
@AwalGarg You (http://stackoverflow.com/users/3459110/awal-garg) have 2444 reputation, earned 0 rep today, asked 1 questions, gave 29 answers, for a q:a ratio of 1:29.
avg. rep/post: 81.46. Badges: 0g 8s 25b
no link, no clicky
@BenFortune, added cors. A new problem appeared for remote devices. net::ERR_CONNECTION_REFUSED for loading the post data into new page. i.e. localhost:8888/something.html Page can't load data. But data is posted.
yaya, more stat spam
14:57
!!stat
@ssube You (http://stackoverflow.com/users/129032/ssube) have 14707 reputation, earned 0 rep today, asked 40 questions, gave 476 answers, for a q:a ratio of 10:119.
avg. rep/post: 28.5. Badges: 2g 32s 71b
!!stat Nick
@BenFortune That dude sucks
5
Yup
!!stat 6524
14:58
@AwalGarg User Elusio proved elusive.
if the user isn't in the room you have to use their id
@CapricaSix Ha wait what
@AwalGarg John Resig (http://stackoverflow.com/users/6524/john-resig) has 25885 reputation, earned 0 rep today, asked 0 questions, gave 10 answers, for a q:a ratio of H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ.
avg. rep/post: 2588.5. Badges: 3g 20s 18b
, hmm. Thanks. But I'm thinking i've made serious mess to understand the design. The reason express showing no data, may be i designed it wrong way.
It should log the request i made from remote device. But chrome inspection says net::ERR_CONNECTION_REFUSED and express-debug says nothing.
!!stat 22656
14:59
@BenFortune Jon Skeet (http://stackoverflow.com/users/22656/jon-skeet) has 800789 reputation, earned 200 rep today, asked 36 questions, gave 32137 answers, for a q:a ratio of 36:32137.
avg. rep/post: 24.89. Badges: 385g 5576s 6748b

« first day (1769 days earlier)      last day (3402 days later) »