Показаны сообщения с ярлыком web. Показать все сообщения
Показаны сообщения с ярлыком web. Показать все сообщения

понедельник, 9 ноября 2020 г.

[Vue] [vee-validate] collection.indexOf is not a function - how to fix

 It occurs when to get error message (with `errors.first('myfield')`) of not existing field. In another words, check that component field has v-validate tag attribute (and maybe also `name` attribute). Or remove `errors.first('myfield')` line at all, this will fix this error.

четверг, 1 августа 2019 г.

[nodejjs] [websocket] Specified protocol was not requested by the client fix

If you have this error:

Error: Specified protocol was not requested by the client.
    at WebSocketRequest.accept (/proj/node_modules/websocket/lib/WebSocketRequest.js:289:19)

this means you have to create a connection at client side like this:

var connection = new WebSocket('ws://127.0.0.1:3000', 'echo-protocol');

instead of this:

var connection = new WebSocket('ws://127.0.0.1:3000');

Also this means you should to handle it at server side not to crash your server.

[Nodejs] Express + Websocket: Connection closed before receiving a handshake response

In case this error you should pass Express listen() return result to WebSocketServer() like this:

wsServer = new WebSocketServer({
    httpServer: app.listen(3000),
    port: 3001,
});

Full example:
var WebSocketServer = require('websocket').server;
var path = require('path');
var express = require('express');
var app = express();
app.use(express.static(path.join(__dirname, 'public')));

app.get('/', function(req, res){
    res.render('index.html');
});
console.log(`Server running on port ${process.env.PORT}`);

wsServer = new WebSocketServer({
    httpServer: app.listen(3000),
    port: 3001,
});

вторник, 11 июля 2017 г.

Symfony assets don't create files in web/bundles

After running asset:install, Asset tries to add needed files in web/bundles directory, and then fastyle deletes them. Same behavior appears with --symlink, --relative and other asset directory path.

Solution to me was to update Asset bundle with Composer.

четверг, 3 ноября 2016 г.

[Symfony] [ckeditor] browse / upload buttons missing - how to fix

be sure you don't have duplicate call of ivory_ck_editor in config.yml file.

четверг, 14 июля 2016 г.

5 columns layout with Twitter Bootstrap

based on http://www.wearesicc.com/quick-tips-5-column-layout-with-twitter-bootstrap/ , modified for fitting 5 columns in any >320px width displays.

.col-xs-15,
.col-sm-15,
.col-md-15,
.col-lg-15 {
  position: relative;
  min-height: 1px;
  padding-right: 10px;
  padding-left: 10px;
}

@media (min-width: 320px) {
  .col-md-15 {
    width: 20%;
    float: left;
  }
}

And use it like this:
<div class="col-md-15 col-sm-3">
    ...
</div>