u'%s' % str(value)
>>> s = u'Stretch fabric piqué polo'
>>> s
u'Stretch fabric piqu\xe9 polo'
>>> print s
Stretch fabric piqué polo
>>>
def schema():
return {'name': random_name()
'surname': random_surname()
'age': random_age()
'years': random_year()
}
random_size = 100
random_schemes = [schema() for x in range(random_size)]
var count = 0;
var app = express();
http.createServer(app).listen(8080)
.on('connection', function(socket) {
count++;
socket.on('close', function () {
count--;
})
});
function getConnectionsCount () {
return count;
}
var app = express();
var server = http.createServer(app).listen(8080);
server.getConnections(function (err, count) {
});