Show More Tags:  MORE

Firebase onTokenRefresh() is not called

In my MainActivityin my log, I can see the token using FirebaseInstanceId.getInstance().getToken() and it display the generated token. But it seems like in my MyFirebaseInstanceIDService where it is extends to FirebaseInstanceIdService, the onTokenRefresh() is not called, where in this function it

How to add field in registration form in prestashop 1.7?

In my Prestashop I need not add some field in registration form. I tried in authentication.tpl and registration.tpl but not find any hint to add new field.Thanks in advance. You may start digging in classes/form/CustomerFormatter.php under getFormat() method. There is an array of fields for the r

Optional argument in sh script

I wonder if there is any way to execute script with argument that can be optional. For example./script (optional parameter X) pathSo typing ./script /Users/name/Documents would execute certain function (I assume that if statement will be crucial) and ./script X Users/mcichecki/Documents will execute

How to drag/drop to multiple Angular2 component using ng2-dragula

I have a Angular2 component using ng2-dragula to drag/drop like this:@Component({ selector: 'my-comp', directives: [ Dragula ], viewProviders: [ DragulaService ], template: ` <div class="my-div"> <div *ngFor="#item of items" [dragula]='"card-bag"' [dragulaModel]='items'&

Python: urllib2.URLError: <urlopen error [Errno 10060]

I have some problem with reading some urls.I try to use answer from this question Using an HTTP PROXY - Python but it didn't help and I get an error urllib2.URLError: <urlopen error [Errno 10060]I have a list ofавито&цветок%20киддиленд%20м

Angular2 Google Maps style marker

We are working with Angular2 Google Maps ('ve gotten the Styled Google Maps to work already with this Plunkr: { Directive } from '@angular/core';import { GoogleMapsAPIWrapper } from 'angular2-google-maps/core';@Directive({ s

Error 405 (Method Not Allowed) Laravel 5

Im trying to do a POST request with jQuery but im getting a error 405 (Method Not Allowed), Im working with Laravel 5THis is my code:jQuery<script type="text/javascript"> $(document).ready(function () { $('.delete').click(function (e){ e.preventDefault(); var ro

Tomcat 404 error: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists

This question already has an answer here: Servlet returns “HTTP Status 404 The requested resource (/servlet) is not available” 2 answers Problem solved, I've not added the index.html. Which is point

Display p:fileupload image in p:graphicImage preview without saving it

I am using PrimeFaces 5.3 <p:fileUpload> to upload a PNG image and I would like to show a preview of it in <p:graphicImage> before saving in database.Here's a MCVE:<h:form enctype="multipart/form-data"> <p:fileUpload value="#{bean.uploadedFile}" mode="simple" /> <p:g

Datatables: Cannot read property 'mData' of undefined

I have a issue with Datatables. I also went through this link which didnt yield me any result.I have inlcuded all the prerequisites where am parsing data directly into the DOM. Kindly help me to fix this issue. Script$(document).ready(function() { $('.viewCentricPage .teamCentric').dataTable({ "

ReflectionException - Class DatabaseSeeder does not exist , Laravel Seeder

I have database seeder clases in diferent folder. When i write db:seed the console shows this error:[ReflectionException] Class DatabaseSeeder does not exist , Laravel SeederOne class is this:namespace Database\Seeds;use Illuminate\Support\Facades\DB;use Illuminate\Database\Seeder;use Illuminate\D

How to check if a specified key exists in a given S3 bucket using Java

I would like to check if a key exists in a given bucket using Java. I looked at the API but there aren't any methods that are useful. I tried to use getObject but it threw an exception. Use the jets3t library. Its a lot more easier and robust than the AWS sdk. Using this library you can call, s3s

"Can't resolve all parameters for MdDialogRef: (?)" Error when testing NG2 Material Dialog component

I have a login component as follows: import { Component, OnInit } from '@angular/core';import { MdDialogRef } from '@angular/material';import { AuthService } from '../../core/services/auth.service';@Component({ templateUrl: './login.component.html', styleUrls: ['./login.component.scss']})export cl

changingThisBreaksApplicationSecurity angular2

Iam trying to load a pdf document in an tag in angular2 Dynamically, and when i am tring to change the URL iths throwing an error saying SafeResourceUrlImplchangingThisBreaksApplicationSecurity: "localhost:8002/pdf.pdf"proto: SafeValueImplconstructor: SafeResourceUrlImpl()getTypeName: ()proto:

Can't bind to 'routerLink' since it isn't a known property of 'a'

This question already has an answer here: Angular2 Exception: Can't bind to 'routerLink' since it isn't a known native property 9 answers The problem is that you forgot to add RouterModule to you

Validate form control based on other controls, access other control in validate function

I would like to validate email and phone based on the following:If both email and phone are empty or the value containing them are not valid then both are invalid with message "Please provide either a valid email or phone number."If the email address is invalid then it's invalid with possibly the ab

Rails, Deleting Children without Deleting Parent using :has_many

I haveclass MyContainer < ActiveRecord::Base :has_many MyObjects, :dependent => :destroyendI want to delete all the MyObjects in the container without having to delete the MyContainer. My model does have :dependent => :destroy, however I don't want to have to delete and re-create the objec

Encrypting zip files with a password based on Zip 2.0 encryption

I am trying to zip and encrypt files in Java (1.6) with a password based on the earlier Zip 2.0 encryption. I have used AES 256 bit encrytpion to encrypt zip files with password and have successfully been able to do so.Though AES is a stronger and a more secure encryption standard, i need to find a

DNX causing StackOverflowException?

I have now searched the entire Google (feels like) for this type of related problem, and found nothing...I have a .Net 4.5.1 website, when building I get a StackOverflowException, with the following Build Output:C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Comm

Shared library linking - undefined reference to symbol error

I built dynamic library as name .This library include __sin function from math.h .I want to use this shared library in CalculatorApp.cpp .CalculatorApp including main function.I used commands for compilations g++ -I ./inc -fpic -c src/Calculator.cpp -o obj/Calculator.o g++ -shar

How to hide shortcut bar in iOS9 UIWebview?

I would like to hide bar which is on top of keyboard (undo, redo, copy and back, forward buttons) when user clicks on textfield in UIWebView.Does anybody know how to do it?Thanks! I am able to hide those using these lines let item:UITextInputAssistantItem = self.textFieldName.inputAssistan

How to save a webpage with PhoneGap for offline use?

I am developing an RSS-Reader with PhoneGap. Everything is working out great so far, but now I want to download linked article pages in advance, so the user doesn't have to wait for a slow connection.Getting the HTML is easy via AJAX using JQuery, but I also want the images and CSS. I could get the

Rails tests with activeadmin

I am using activeadmin on my Rails project and I would like to know how to make test on it. I looked over on internet but there is no documentation about it.I have a settings resource, and I disabled the possibility to create a new one or to delete it.I would like to know how to test these routes do

JBoss Developer Studio is not deploying JBoss ESB project contents

I'm currently starting out using JBoss Enterprise SOA platform 5.0 (JBoss ESB 4.7, JBoss AS 5.1), and I'm trying to deploy the "helloworld" quickstart sample that comes with the platform.This project worked for me at one point, but recently I noticed that upon deployment, the contents of the project

Storing session data in cookies

Lately I have stumbled upon some articles that suggest using a cookie to store session data.I liked the idea and extended my session storage by adding a CookieStorage class which works fine (note that per user I use a unique hash key for sigining and encrypting data)However, there are a lot of other

$_FILE upload large file gives error 1 even though upload_max_size is bigger than the file size

I have a simple upload form with: enctype="multipart/form-data"/>and input type="hidden" name="MAX_FILE_SIZE" value="5900000" />and the following settings, that are applied (checked through phpini()) in php.ini: upload_max_filesize = 7MB memory_limit = 64M post_max_size = 8MB I try to upload a

appgyver steroids tint color of navigation bar does not work for Android 4.1.2

I'm building an app with AppGyver Steroids and would like to change the color of the navigation bar. After a short search I found this in the Documentation so I changedsteroids.config.navigationBar.tintColor = "#FFCC22"in the CoffeeScript file. Unfortunately I cannot get it to work on Android 4.1.2I

sharing an object between multiple applications in Delphi

I am trying figure out how to share an object between multiple applications in Delphi. I am aware that the way to do this is via IPC/windows shared memory calls (ie CreateFileMapping etc), however in all the example code I found they use a simple type like a string, whereas I need to share an object

Add File and FileTransfer Cordova Plugin for v3.4.0

I have a project started with cordova v3.4 and now I want to add File and FileTransfer to upload file to server (I use Camera plugin so)I try to upgrade cordova to v4.1.1 and now can upload file but all jquery.ajax funtions used in js file can not connect and through timeout exdeptionjQuery.ajax({

Android Toast with multi-colors

I want a toast with multi-colors. Like this:I looked at the different tutorials on changing the layout in the xml to create a custom Toast, but none of them explain adding different colors like this.How can I do this?================================ANSWER================================Using all you