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


Angular2 Final Release - "Error: Angular requires Zone.js prolyfill"

I have upgraded from RC4 to the Final release of Angular2. When I run npm start, the app is stuck on 'Loading...' the only error I get is about Zone.js:Basically, typeof Zone is undefined:Here is my package.json:"engines": {"node": ">= 4.2.1","npm": "3.10.7"},"dependencies": {"@angular/common": "


Header in the response must not be the wildcard '*' when the request's credentials mode is 'include'

I'm using Auth0 for my user authentication to only allow logged in users to access a Spring (Boot) RestController. At this point I'm creating a real-time message functionality where users can send messages from the Angular 2 client (localhost:4200) to the Spring server (localhost:8081) using stompjs


Is function return an array possible in Vivado HLS?

A function like tha:int * getRandom( ) { static int r[10]; int i; /* set the seed */ srand( (unsigned)time( NULL ) ); for ( i = 0; i < 10; ++i) { r[i] = rand(); printf( "r[%d] = %d\n", i, r[i]); } return r;}Is this one possible to be used in Vivado HLS. If possible, how c


Concatenate PDFs and preserve Extended Features in Acrobat Reader

We are using iText to automatically fill in form fields on a number of documents and then concatenating those documents into one resulting PDF.Adobe has introduced the Extend Features in Acrobat Reader option to allow users of Acrobat Reader to save the PDF with changes to the form fields.This is a


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


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({ "


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'&


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


Register virtual class with UVM factory

Does anyone have a way of registering virtual classes with the factory? Using the object_utils macro will define the type_id::create(...) method which calls new(...) for the virtual class which is illegal.Naturally, a type override would be mandatory for any virtual class registered with the factory


iOS: AVPlayer - getting a snapshot of the current frame of a video

I have spent the whole day and went through a lot of SO answers, Apple references, documentations, etc, but no success.I want a simple thing: I am playing a video using AVPlayer and I want to pause it and get the current frame as UIImage. That's it.My video is a m3u8 file located on the internet, it


Validate first before calling Bootstrap Modal

I'm new to Modals and jQuery. I need some help. I have a form and I am using a LiveValidation Library and also I have Bootstrap Modal. I'm using Modal to show the users input from the form and has a confirm submit button.The current setting is. When the user filled all fields the Modal will appear a


laravel 5.4: PHP Fatal error: Call to undefined method Illuminate\Foundation\Application::configure()

I am new to laravel. I am trying to use Snappy PDF from barryvdh. I have installed snappy pdf by following instruction from https://github.com/barryvdh/laravel-snappy. But when i run php artisan serve command following error is showed PHP Fatal error: Call to undefined method Illuminate\Foundation\


Invalid mongo configuration, either uri or host/port/credentials must be specified

I'm getting this exception : Caused by: java.lang.IllegalStateException: Invalid mongo configuration, either uri or host/port/credentials must be specified at org.springframework.boot.autoconfigure.mongo.MongoProperties.createMongoClient(MongoProperties.java:207) at org.springframework.boot.au


Change format of md-datepicker in Angular Material

Angular material introduced a new date picker component found here.I want the date returned by this component to be in the format yyy-mm-dd but I am not sure how is this done. By searching I found that $mdDateLocaleProvider can be used, but I could not find an example of using it.Can someone show me





R dplyr summarise multiple functions to selected variables

I have a dataset for which I want to summarise by mean, but also calculate the max to just 1 of the variables.Let me start with an example of what I would like to achieve:iris %>% group_by(Species) %>% filter(Sepal.Length > 5) %>% summarise_at("Sepal.Length:Petal.Width",funs(mean))whi


RHEL Environment Variable Path To Mongo Shell

I have installed mongodb in one of our environments & this has been done using MongoDb Operations Manager. Though i have my PATH variable set correctly i'm unable to connect mongo shell with my user account but able to connect as a sudo. could someone help me if i'm missing anything here.Details


animate.css is loading double time in firefox and chrome

Hi Anyone please help me on this in my page i used fadeInUp css from animate.css file. when i open in firefox it is loading double time.This is css i used.@-webkit-keyframes fadeInUp { from { opacity: 0; -webkit-transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0); } t


How to get a list of built-in modules in python?

I would like to get a list of names of built-in modules in python such that I can test the popularity of function's naming conventions (underline, CamelCase or mixedCase).I know there is a Global Module Index but I am wondering if there is a list of strings, which is easier to use :)Update:len(dir(_


Netbeans 8.2 with JDK9 BUILD160

I'm trying to add "JDK9 Build 160" as a platfrom in netbeans 8.2. After adding the platform, the class tab contains no platform classpaths. I tried many blogs and guides but gave no solution. Could someone help please? The simple answer is that JDK 9 does not work with NetBeans 8.2. To use JDK


botocore.exceptions.ClientError : Client Side KMS Encryption

I am trying to encrypt a pdf file in my application with a key I created in AWS IAM and upload the encrypted file to S3. I use boto3 to achieve this. I could upload the file to S3 without encryption though. Here is my function that does the encryption :def write(self): print 'Write to S3' clie


Equal, Not equal conditions on same field in single sql query

Following is schema of table called pages which is running on mysql 5.6 server+---------------+------------------+------+-----+---------+----------------+| Field | Type | Null | Key | Default | Extra |+---------------+------------------+------+-----+---------+-----------


Getting group by attribute in nested query

I am trying to find the most frequent value in a postgresql table. The problem is that I also want to "group by" in that table and only get the most frequent from the values that have the same name.So I have the following query:select name, (SELECT value FROM table where name=name GROUP BY value OR


geom_tile single color as 0, then color scale

I want to produce a heat map where with a color pallet of green to red, but values of 0 are in white. I got started with geom_tile heatmap with different high fill colours based on factor and others on SO but can't quite get what I need. For example, with the following database:df <- data.frame(e


Divide the columns in mysql into multiple columns

I am completely new to mysql. Here I am trying to make a query in mysql which divides a column col1 into 4 different columns based on its category(col2) in sorted order as shown below. I have written a query like this till now:select if(category = 'first',name ,NULL) as first,if(category = 'second',


MySQL nested select: am I able to use any data from outer select?

Let's imagine I have the following table users:id name1 John2 Mike3 MaxAnd table postsid author_id date title1 1 2014-12-12 Post 22 1 2014-12-10 Post 13 2 2014-10-01 Lorem ipsum...and so onAnd I'd like to have a query containing the following data:user namenumber


Nested MySQL Queries and Alphanumeric Ordering

So, I've been trying to use nested MySQL Queries in combination with alphanumeric ordering for a table, in my code for a while.Take for example the following table:Subprocess_has_Characteristic{ ID (PK) SubProcessID (FK) CharacteristicID (FK)}The following are example values for the table: ID&nb


Nested Select Query In MySql

Hi I have two tables in my database. suppose table 1 has a name of login and table two has user_infoTable Structureloginuid : integeruser_name : varcharpassword : varchartbl_name : varcharuser_infoid : intname : varchar.....suppose in login table for uid =1 tble_name is user_infothen how can I g


SQL Nested Query Homework SQL Fiddle

Find Insurance Company with the maximal number of members (patients).Thats the Database and my first attempt to get closer :http://sqlfiddle.com/#!3/4b2ed/27SELECT P.cid AS cid, COUNT ( P.pid ) AS CountPFROM Patient PGROUP BY P.cidhow do i get the max countp? Just order your results in


Co-related Nested Query in MySQL

Schema:Student (snum: integer, sname: char(30), major: char(25), level: char(2), age: integer)Faculty (fid: integer, fname: char(30), deptid: integer)Class (cname: char(40), meets_at: char(20), room: char(10), fid: integer | f