on-internet

How can I cheaply transport lots of baggage when travelling domestically in India when coming in or going out on an international flight?

I'm planning to travel to India from an international destination, and leaving back to the same international destination. My airline allows me to check two bags weighing 50 pounds each, and I plan to make full use of this allowance. However, when I was booking my ticket, I found that the ticket price to my final destination in India is significantly more expensive than booking a ticket to a major hub airport (e.g. DEL, BOM, etc.) and a separate domestic ticket to my intended destination. I'm aware that if I book a ticket straight through to my final destination, I can carry the full allowance

Join the discussion →

Codeigniter + MySQL - Search containing string

I have column in table of database with value: PL TOFLEX NEGRO/PRETO I search in my website: TOFLEX PRETO I need output: PL TOFLEX NEGRO/PRETO Can someone give me correct query to do this? I try: public function searchMaterial($nome) { $json = []; $this->load->database(); if(!empty($this->input->get("q"))){ $this->db->like('nomeMaterial', $nome, 'both'); $query = $this->db->select('idMaterial as id,nomeMaterial as text') ->limit(50) ->get("material"); $json = $query->result(); } echo json_encode($json); } but doesn't work.

Join the discussion →

Sklearn Pipeline: Get feature names after OneHotEncode In ColumnTransformer

I want to get feature names after I fit the pipeline. categorical_features = ['brand', 'category_name', 'sub_category'] categorical_transformer = Pipeline(steps=[ ('imputer', SimpleImputer(strategy='constant', fill_value='missing')), ('onehot', OneHotEncoder(handle_unknown='ignore'))]) numeric_features = ['num1', 'num2', 'num3', 'num4'] numeric_transformer = Pipeline(steps=[ ('imputer', SimpleImputer(strategy='median')), ('scaler', StandardScaler())]) preprocessor = ColumnTransformer( transformers=[ ('num', numeric_transformer, numeric_features), ('cat', categorical_transformer, categorical_fe

Join the discussion →

Need to parse SQS message

I am having some trouble parsing my AWS SQS message when I receive a message. My main issue is that while it seems to be somewhat of a string it also wants to act like an object. So far, I have just been trying to parse the message so it has been a lot of console.log() and typeof. sqs.receiveMessage(params, (err, data) => { if (err) console.log(err, err.stack); else { messages = data; console.log(typeof messages.Messages[2].Body); // #2 let validMessage = JSON.parse(messages.Messages[2].Body); // #1 console.log(`validMessage: ${validMessage}`); // Just doesn't print out console.log(typeof vali

Join the discussion →

Accessing WSL postgresql server from Windows PGadmin

I am running postgresql in WSL Ubuntu on windows. Everything is up to speed, my data is loaded and I wish to access the database through some graphical interface. I was thinking pgadmin4. Is it possible to accomplish this through a windows install of pgadmin4? I installed pgadmin4 on windows and tried to connect the traditional way in the GUI through localhost but am not getting a connection. I figure there may be a special method here.

Join the discussion →

Parsing escaped JSON String org.json.JSONException: Missing value at character 1

I have an escaped string in a variable and I am trying to make a JSON object from the string. It's throwing the following Exception: org.json.JSONException: Missing value at character 1 After thorough research, I couldn't find an answer on Stack Overflow. If the string is escaped you need to unescape it before trying to make a JSONObject out of it. Below is a snippet of my code: String escapedString = StringEscapeUtils.unescapeJava(escapedString); JSONObject Json = new JSONObject(escapedString); I am open to hearing any other solutions besides what I mentioned here.

Join the discussion →

How to solve H2 "Error executing DDL" error?

I want to create table via H2 in springboot, but when I run I've got following error; org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create table bank_account (id bigint not null, balance double not null, full name varchar(128) not null, primary key (id))" via JDBC Statement ... data.sql: Insert into Bank_Account(ID, Full_Name, Balance) values (1, 'Ibrahim', 2500); Insert into Bank_Account(ID, Full_Name, Balance) values (2, 'Ates', 4210); pom.xml; <dependency> <groupId>com.

Join the discussion →

Credentials are required to connect to the SQL source

I'm trying to get a token from my SQL server. Everytime I run it in VS2017 I'm prompted for credentials. The SQL connection should be made with integrated authentication but the datasource kind of SQL seems like I have a mismatch between what I can enter in the tester and what my code needs to connect. [DataSource.Kind="PQExtension1", Publish="PQExtension1.Publish"] shared PQExtension1.Contents = (optional message as text) => let _message = if (message <> null) then message else "(no message)", a = "Hello from PQExtension1: " & getToken() in a; getToken = () => let t = Sql.Database("sqlserver"

Join the discussion →

Como Eliminar Malware de Redireccion de Sitio web

se me ha presentado el siguiente problema: En mí hosting alojo varios sitios webs en los cuales había algunos hechos en wordpress, lo que sucede es que al ingresar a un dominio una vez cargue la web se redirige sin consentimiento a otras webs con publicidad. He revisado algunos foros y me ayudaron a detectar la instrucción maliciosa, pero borrarla no es la solución ya que sigue apareciendo. Quisiera saber si a alguno de esta comunidad le ha pasado algo similar y ha logrado resolverlo para que me apoye con la solución de mi problema. Les dejo la instrucción: var a1=function(){var _0x41tbc1=Stri

Join the discussion →

How to fix "While parsing a protocol message, the input ended unexpectedly in the middle of a field" error

Getting InvalidProtocolBufferException: While parsing a protocol message, the input ended unexpectedly in the middle of a field. error when parsing Protobuf Not sure why parsing failing ever though I can see the output if I call response.getContentAsString() method on response object. my Proto file: syntax = "proto2"; package com.test.protocol; option java_package = "com.test.protocol.v1"; option java_outer_classname = "Test1"; message Test2 { required int64 id = 1; required string value = 2 } I wrote API to return the Proto response which looks like below final Test2.Builder builder = TEST2.n

Join the discussion →

Access data of additional settings of region on Windows 10

You can change measurement system in: Windows settings => Time & Language => Additional date, time & regional settings => change date, time, or number formats => Additional settings => Measurement system When you use RegionInfo.CurrentRegion.IsMetric in C#, this data isn't related to what you have chosen in settings. How to access from C# code currently chosen Measurement system?

Join the discussion →

Run GTM(Google Tag Manager) within Angular SPA

I am building an Angular 6 SPA. When using Google Analytics, I am using the following code: <script> (function(i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); ga('create', 'XXXXXXX', 'auto'); //tracking code in index.html Since I want to trigger analytics for every page inside app.component.ts,

Join the discussion →

How to prevent that a lease is used twice in a distributed systems

I was wondering if it is possible to prevent that a lease is used twice. What is a lease? A lease is some sort of token that is given out to exactly one node at a time in a distributed setting. An example use case of a lease would be that only one node at the time can write to a database. What is a fencing token and why use it? With the lease as described above, we could run into problems. A node could stop (e.g. because of stop-the-world garbage collection) and still believe that his lease is valid, when in fact it is not. If we give each lease a fencing token (an incremental integer) the dat

Join the discussion →

C# issue calling EORI SOAP Service

I am trying to call the EORI validation open interface from within a C# application but am not getting anywhere. I've looked around the site and there doesn't seem to be any documentation on how to do this. Site: http://ec.europa.eu/taxation_customs/dds2/eos/news/newstar.jsp?Lang=en WSDL: http://ec.europa.eu/taxation_customs/dds2/eos/validation/services/validation?wsdl I've created a new C# Console App and added the WSDL as a service reference then tried calling the service but get the following exception... System.ServiceModel.CommunicationException: 'The server did not provide a meaningful r

Join the discussion →

Maven Build Failure with "mvn install" command

I was trying to generate and test my codes (if working) for Cucumber-Maven report then opened command prompt. I have tried "mvn clean", it was BUILD SUCCESS. After that, I have tried "mvn install" and encountered BUILD FAILURE (error was shown). [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 22.844 s [INFO] Finished at: 2019-02-05T13:14:51+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.

Join the discussion →

Spring boot : java.lang.AbstractMethodError: Receiver class org.springframework.jms.config.JmsListenerEndpointRegistry

Getting below error while running spring boot application : java.lang.AbstractMethodError: Receiver class org.springframework.jms.config.JmsListenerEndpointRegistry does not define or inherit an implementation of the resolved method abstract isAutoStartup()Z of interface org.springframework.context.SmartLifecycle. at org.springframework.context.support.DefaultLifecycleProcessor.lambda$startBeans$0(DefaultLifecycleProcessor.java:144) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE] at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) ~[na:na] at org.springframework.context.su

Join the discussion →

AWS - Any way to have cross-AZ redundancy with EBS

I'm looking for a redundancy solution for EBS. Ideally we would have an EBS volume in each AZ - in something similar to a master-slave configuration. Upon the failure of the primary EBS volume, all reads/writes would be directed to the secondary volume. The volume is to store user data for the application, no OS or application files or anything like that. The EC2 instances that will mount this volume are running centos, and I haven't looked into any sort of linux solution just quite yet. If there isn't any amazon solution, perhaps there is a linux one that you know of? It just doesn't make sen

Join the discussion →

fatal: could not read Username for 'https://github.com ': No such device or address - rubyonrails - aws

I have a rubyonrails website which function in such a way that when a user signup with his username it create a repo in that username in my github account. It is working flawlessly in heroku. When I switched to amazon web service I initially get intializing git sh: git: command not found sh: line 0: cd: /home/webapp: No such file or directory I overcome this error by adding a config file in .ebextensions like commands: 01_mkdir_webapp_dir: # use the test directive to create the directory # if the mkdir command fails the rest of this directive is ignored test: 'mkdir /home/webapp' command: 'ls

Join the discussion →

How to specify return type in an async Python function?

In TypeScript, you would do something like async function getString(word: string): Promise<string> { return word; } How can I do the same in Python? I tried the following: async def get_string(word: str) -> Coroutine[str]: return word And got this traceback: TypeError: Too few parameters for typing.Coroutine; actual 1, expected 3 So Coroutine expects 3 types. But why? And what should they be in this case? This is also specified in the docs, but I still don't understand

Join the discussion →

Why isn't the Flask-Login current_user.is_authenticated consistent?

I have an Angular app that is making API calls to the backend Flask app. The Flask app is using Flask-Login to authenticate users when they login. When the user logs in with the login() function I defined, current_user.is_authenticated returns True. When I call another function called get_is_logged_in(), current_user.is_authenticated returns False. My User class inherits from UserMixin, so it has all of the required properties and methods as explained in the documentation (https://flask-login.readthedocs.io/en/latest/#your-user-class). In the login() function, after calling login_user(), I che

Join the discussion →

Global scope preventing DB seeding

I am using Laravel spark, and I am restricting team access to models by employing a scope that is implemented in a trait namespace App\Scopes; use Illuminate\Database\Eloquent\Scope; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Builder; class TeamScope implements Scope { /** * Apply the scope to a given Eloquent query builder. * * @param \Illuminate\Database\Eloquent\Builder $builder * @param \Illuminate\Database\Eloquent\Model $model * @return void */ public function apply(Builder $builder, Model $model) { $builder->where('team_id', '=',Auth()->user()->currentTeam-

Join the discussion →

Position a link in HTML, using attributes

I am building a website, using django, CSS, HTML. I have posted some parts from an html file I am dealing with currently. I am a newbie in CSS/HTML. So I have problems with positioning the links which you can see below, using attributes top, left, right. The attributes margin-top, margin-left do not work either. Can you give advice on how to do this? {% extends "base.html" %} {% block style %} div{ margin-top:1px; float:right } .button1{ color:White; background-color:SaddleBrown; padding:5px; font-family:Comic Sans MS; font-size:20px; display: inline-block; cursor: pointer; border: none; borde

Join the discussion →

firewall config for gencam / GigE vision camera discovery and communication

I need to configure an otherwise closed firewall (to LAN) to allow gencam / GigE Vision camera discovery and communication. The standard itself is unfortunately not publicly available, but the communication seems to be happening at UDP/3956 (information based on this page and this page) but I am not sure if I need more than just opening open UDP/3956, whether this port is used also for discovery (besides control/data transfer) and so on. Anyone knowledgeable can answer?

Join the discussion →

Minimise width of the multi-line text in Flutter

I have a variable-width container (screen width) and fixed left and right margins. Remaining area gives me a constraint for maximum text width, where I'm placing text of variable content (multiple languages). I want text to fit into that width without truncation, wrapping if needed. Text is relatively short - it may fit into single line, likely to fit into 2 lines and will fit into 3 lines for sure. I want to avoid cases like (2) - where text wraps into long and a short line. It does not look nice. Instead I would like it to wrap more evenly, like in case (3). For the demo purposes I've hardco

Join the discussion →

how to resolve Request method 'GET' not supported

I am getting below warning as WARN [org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver] (default task-1) Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported] I have already set the method as POST but still I'm getting the above error. I'm getting this warning message for my delete controller all other CRUD operations are working fine, except delete. Please find below code Controller mapped deleteproducts : @RequestMapping(value="/deleteproducts", method= RequestMethod.POST) public String deleteProduct(@PathVariab

Join the discussion →

Pegar o início e fim do registro da jornada

Tenho a seguinte situação: Tenho o seguinte fiddle, com as matrículas e marcações de registro das pessoas. http://www.sqlfiddle.com/#!15/1405c/20 Tentei fazer esse segundo fiddle: http://www.sqlfiddle.com/#!15/1405c/17 Porém não está pegando os valores corretos de início de jornada. E também não consigo pegar o final da jornada. Eu precisava retornar algo assim: | | | | | |inicio |fim | | matr | nome |dia | inicio | fim |turno |turno | |------|--------------------|----|---------------------|---------------------|-------|-------| | 1646 | VINICIUS D | 17 | 2019-01-17 08:23:21 | 2019-01-17 19:36

Join the discussion →

How to calculate MACD using PHP?

I get similar MACD and Signal values, using the following class in Binance: I got this code from: https://github.com/hurdad/doo-forex/blob/master/protected/class/Technical%20Indicators/MACD.php How can I modify the class to arrive at the exact value?

Join the discussion →
Older stories