Skip to content

Instantly share code, notes, and snippets.

View MFQ's full-sized avatar
🎯
Focusing

Muhammad Fazil Qureshi MFQ

🎯
Focusing
View GitHub Profile
/*
* Copyright (c) 2018 The Emirates Group. All Rights Reserved. The information specified here is confidential and remains property of the Emirates Group.
* groupId - com.emirates.ocsl
* artifactId - reservation-bookings-service
* name - reservation-bookings-service
* description - reservation bookings service
* 2019
*/
package com.emirates.ocsl.reservation.bookings.http.handlers;
{
"timestamp": "2020-04-14 17:14:49.892",
"level": "ERROR",
"thread": "main",
"logger": "org.springframework.boot.SpringApplication",
"message": {
"input": "Application run failed"
},
"context": "default",
"exception": "org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pnrRetrievalServiceClientImpl' defined in file [/Users/mfq/workspace/emirates/ocsl/reservation-bookings-service/target/classes/com/emirates/ocsl/reservation/bookings/client/mrp/PnrRetrievalServiceClientImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pnrRetrievalService': Unsatisfied dependency expressed through field 'webServiceTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webServiceTemplate' defined in class path resource [com/emirates/ocsl/soap/mrp/pnr/configuration/Pnr
Hash: dd2c28fc02944277e936
Version: webpack 3.10.0
Time: 41010ms
PublicPath: /static/
Entrypoint main [big] = main.dd2c28fc02944277e936.js main.a68ba9c3c727530008fba2169708891f.css main.21b21c2830871de18f6c2acf4dabc7a0.css
chunk {14} 14.b82f6dffdffdd0eca369.js 10.8 kB {0} [rendered]
> [1366] 2:1-4:3
2 modules
chunk {0} 0.64f405803ad279c6c289.js 9.16 MB {27} [rendered]
> [946] 2:1-4:3
{
"name": "bappo-web",
"private": true,
"version": "1.0.0",
"description": "Bappo web app",
"scripts": {
"start": "node ./webpack/start.js",
"start:ssr": "NODE_ENV=production node build/server.js",
"test": "NODE_ENV=test mocha-webpack --require app/tests/configureJsDom.js --webpack-config webpack/webpack.config.test.js \"src/**/*.test.js\"",
"test:watch": "npm test -- --watch",
➜ gcse-ionic git:(develop) ✗ npm run build-android-sdk-production
> gcse@1.0.0 build-android-sdk-production /Users/mfq/workspace/outsourcing/gcse-ionic
> npm run conf-production-package && npm run build-android-sdk
> gcse@1.0.0 conf-production-package /Users/mfq/workspace/outsourcing/gcse-ionic
> npm run create-dirs && gulp config:production-package
require 'nokogiri'
xml_source = '<item id="0001" type="donut">
<batters>
<batter>Regular</batter>
<batter data-target="neat">Regular</batter>
<batter>Regular</batter>
</batters>
</item>'
doc = Nokogiri::XML(xml_source)
'use strict';
const moment = require('moment');
const now = moment().format('YYYY-MM-DD HH:mm:ss Z');
module.exports = {
up: function (queryInterface, Sequelize) {
return queryInterface.bulkInsert("Estimates", [
{
name: 'When was the last time your property received a cleanup ?',
Error: EstimateCondition (conditions) is not associated to EstimateCondition!
at Model.validateIncludedElement (/home/mfq/workspace//grazer-backend/node_modules/sequelize/lib/model.js:558:11)
at /home/mfq/workspace//grazer-backend/node_modules/sequelize/lib/model.js:440:29
at Array.map (native)
at Model.validateIncludedElements (/home/mfq/workspace//grazer-backend/node_modules/sequelize/lib/model.js:436:37)
at Model.build (/home/mfq/workspace//grazer-backend/node_modules/sequelize/lib/model.js:1760:32)
at Model.create (/home/mfq/workspace//grazer-backend/node_modules/sequelize/lib/model.js:1815:15)
at Model.models.EstimateCondition.findById.then (/home/mfq/workspace//grazer-backend/controllers/estimations.js:175:39)
at bound (domain.js:280:14)
at Model.runBound (domain.js:293:12)
{ SequelizeDatabaseError: type "enum_estimates_type" does not exist
at Query.formatError (/home/mfq/workspace/grazer-backend/node_modules/sequelize/lib/dialects/postgres/query.js:357:14)
at Query.<anonymous> (/home/mfq/workspace/grazer-backend/node_modules/sequelize/lib/dialects/postgres/query.js:88:19)
at emitOne (events.js:96:13)
at Query.emit (events.js:188:7)
at Query.handleError (/home/mfq/workspace/grazer-backend/node_modules/pg/lib/query.js:143:8)
at Connection.<anonymous> (/home/mfq/workspace/grazer-backend/node_modules/pg/lib/client.js:180:26)
at emitOne (events.js:96:13)
at Connection.emit (events.js:188:7)
at Socket.<anonymous> (/home/mfq/workspace/grazer-backend/node_modules/pg/lib/connection.js:136:12)
#all_path_breadth function will let you traverse directores from an origin and then a code block will make it more productive.
#Below I wrote two different calls for #all_path_breadth, in the first call #virus I am creating a file named "test" at each location and in #anti_virus I am deleting that same file.
def all_path_breadth(origin, &block)
current_directories = []
Dir.entries(origin).each{ |p| current_directories.push(p) if p != "." && p != ".." && File.directory?(origin+"/"+p) }
block.call(origin) if current_directories.empty?
current_directories.each do |p|
path_r = origin+"/"+p
block.call(path_r)