JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
May 11, 2016 19:31
ty
May 11, 2016 19:31
okay cool
May 11, 2016 19:31
yeah sure
May 11, 2016 19:29
so 1 << 3 would be 8
May 11, 2016 19:29
is that all << notates ??
May 11, 2016 19:24
why 1<<24
May 11, 2016 19:24
just wanted to understand the bitshifting more than anything
May 11, 2016 19:23
with the |0
May 11, 2016 19:23
what is the bitshifting doing
May 11, 2016 19:22
"#"+((1<<24)*Math.random()|0).toString(16)
May 11, 2016 19:22
guys, this line of code generates a random color
May 11, 2016 19:12
yo
May 8, 2016 00:26
and I want to print a variable in layout.jade
May 8, 2016 00:26
my layout.jade is only called from index.jade like:
    extends layout
    block content
May 8, 2016 00:25
quick question, in node is there anyway to pass a variable to a layout that is only called from another jade file
May 8, 2016 00:03
(hello, isit me youre looking for)
May 8, 2016 00:02
hey rlemon I sorted my routing problem :D
May 8, 2016 00:02
yo dudes
May 4, 2016 00:28
so like app.use('/page/:id', index(array)) ?
May 4, 2016 00:27
var index = require('./routes/index')(BUF);
app.use('/', index);
May 4, 2016 00:27
I have an array of post objects, which I can pass to the routes like this
May 4, 2016 00:26
module.exports = function(p) {
  return router.get('/', function(req, res, next){
    res.render('index', {posts: p});
  });
}
May 4, 2016 00:25
I'm usually pretty terrible at explaining, this is my routes/index.js
May 4, 2016 00:24
it is just a case of reusing the index route with a new array being passed to it
May 4, 2016 00:24
I can do that,
May 4, 2016 00:21
so I am working on a blog, the posts are to be all on the index, but I want to be able to search for tags if tags are specified in the parameters
May 4, 2016 00:20
yeah basically
May 4, 2016 00:18
with app.use('/', index);
May 4, 2016 00:18
I can do var index = require('./routes/index')(ARRAY);
May 4, 2016 00:18
if /page is hit, I want to get an array and load routes/index with that array
May 4, 2016 00:17
So still grasping the concept of middleware -- am I doing anything blatantly incorrect here

    app.use('/page/:id', function(req, res) {
      var hi = getArray();
      require('./routes/index')(hi);
    });
May 4, 2016 00:16
I tried :(
May 4, 2016 00:09
its ok dude it sounded right to me too
May 4, 2016 00:08
:'
May 4, 2016 00:07
classic
May 4, 2016 00:06
console.log("you're all ive ever wanted");
May 4, 2016 00:05
i can see it in your eyes...
May 4, 2016 00:00
hello :)
 

Trash can

Like the recycle bin, but trashier.
May 4, 2016 00:16
So still grasping the concept of middleware -- am I doing anything blatantly incorrect here

    app.use('/page/:id', function(req, res) {
      var hi = getArray();
      require('./routes/index')(hi);
    });
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
Apr 27, 2016 20:10
thanks dude
Apr 27, 2016 19:39
any suggestions ?
Apr 27, 2016 19:39
guys, I need to make a relative div with text 100% width of a relative parent
Apr 27, 2016 19:38
yo
 

Java

Dedicated to the discussion of the Java programming language a...
Apr 5, 2016 10:42
so you wouldn't have an idea of why searching for a string in the DOM isn't working
Apr 5, 2016 10:34
anybody have any experience with selenium? :'
Apr 5, 2016 10:31
Hello :D
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Mar 25, 2016 21:21
hey
does anyone have some experience with aws
 

Lounge<C++>

Today we're daydreaming about C++26 reflection
Mar 25, 2016 21:19
amazon web services
Mar 25, 2016 21:18
ok np