Categories
Mastering Development

Flask session don’t work with nginx and gunicorn

i have an issue with session on flask, in authentication page, i’m able to login but it doesn’t redirect to the index page. The problem is the session doesn’t store the username. So when i’m redirected to the index page the code check for the username in the session and it do not find it… […]

Categories
Mastering Development

How to fix vue-jest error – SyntaxError: Unexpected token ‘export’

How to fix vue-jest error – SyntaxError: Unexpected token ‘export’? I’m having an issue with vue-jest unit test. Any help will be appreciated. 1. jest.config.js module.exports = { preset: ‘@vue/cli-plugin-unit-jest/presets/no-babel’, "moduleFileExtensions": [ "js", "ts", "json", "vue" ], transform: { ‘.*\\.(vue)$’: ‘<rootDir>/node_modules/vue-jest’ }, } 2. package.json { "name": "hotel-frontend-vue", "version": "0.1.0", "private": true, "scripts": { "serve": […]

Categories
Mastering Development

Vue Jest Invalid or unexpected token

I’m new to Jest and Vue, but I’m getting an error in one of my tests. The error is: Test suite failed to run /…../node_modules/element-ui/lib/theme-chalk/table-column.css:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){@charset "UTF-8";.el-checkbox,.el-checkbox__input{white-space:nowrap;display:inline-block;position:relative}.el-checkbox{color:#606266;font-weight:500;font-size:14px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-right:30px}.el-checkbox.is-bordered{padding:9px 20px 9px 10px;border-radius:4px;border:1px solid #DCDFE6;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:normal;height:40px}.el-checkbox.is-bordered.is-checked{border-color:#409EFF}.el-checkbox.is-bordered.is-disabled{border-color:#EBEEF5;cursor:not-allowed}.el-checkbox.is-bordered+.el-checkbox.is-bordered{margin-left:10px}.el-checkbox.is-bordered.el-checkbox–medium{padding:7px 20px 7px 10px;border-radius:4px;height:36px}.el-checkbox.is-bordered.el-checkbox–medium .el-checkbox__l SyntaxError: Invalid or unexpected token Here’s my package.json file: "jest": { "moduleFileExtensions": [ "js", "json", "vue" ], "transform": { […]

Categories
Mastering Development

Jest withTypeScript syntaxerror unexpected token, expected “;”

I’ve been trying to setup jest for use with typescript and I’ve tried a bunch of fixes with no luck. I’m getting the error SyntaxError: Unexpected token, expected ";", I think the config isn’t supporting typescript code: https://i.stack.imgur.com/iGBCa.png If anybody has any suggestions I’d be very grateful! Here’s my package.json: "jest": { "preset": "ts-jest", "testEnvironment": […]

Categories
Ask Geographic Information System (GIS)

Creating complementary graph from GIS data (e.g., shapefiles)

I am new to GIS. I have some data about shapes, e.g., voting-districts, in several formats such as WMS, JSON, SHP. I want to create a graph (e.g., graphML) such that each district corresponds to a node, and edges indicate that two districts share a border. The nodes should be located in the "mass-point" of […]

Categories
Ask Geographic Information System (GIS)

Creating complementary graph from GIS data (e.g., shapefiles)

I am new to GIS. I have some data about shapes, e.g., voting-districts, in several formats such as WMS, JSON, SHP. I want to create a graph (e.g., graphML) such that each district corresponds to a node, and edges indicate that two districts share a border. The nodes should be located in the "mass-point" of […]

Categories
Ask Geographic Information System (GIS)

Creating complementary graph from GIS data (e.g., shapefiles)

I am new to GIS. I have some data about shapes, e.g., voting-districts, in several formats such as WMS, JSON, SHP. I want to create a graph (e.g., graphML) such that each district corresponds to a node, and edges indicate that two districts share a border. The nodes should be located in the "mass-point" of […]

Categories
Cryptocurrency Ethereum Mastering Development

Can not get a clear solcjs compile!

I’ve created my first smart contract and it compiles clear and deploys using Remix. But in node js when running "node compile.js", I get no output generated in the build folder. The code is below…and I’m sure of the following: It reads the source files. It puts together the object with all source files from […]

Categories
CMS Mastering Development Wordpress

malware undetectable by multiple scans

I would like to inform and request help from the community. What happens is this malware was in the folder / wp-content / uploads / 2020 / Named index.php And I found him in the year 2017 in the uploads folder. What I find strange is that it was not detectable by any online database […]

Categories
Mastering Development

Intelephense stub won’t load in CakePHP 2

I have some helper functions that I use everywhere in a CakePHP 2 application. They are underlined with red and reported as ‘undefined functions’ in the console. I know I can just ignore the errors, but I would like to have it working properly going forward, especially if I can manage to get alt-click working […]