web-frontend

Infinite loop between JSP and webpack + AngularJS app

谁都会走 提交于 2019-12-08 09:19:30
问题 We are trying to integrate a JEE app (jsp on the frontend) with an angularJs app. The angularJS is being packaged with webpack so in the jsp we are linking the app thru a <script> tag The application is being manually bootstrapped once the modules are already defined. The result once the manual bootstrapping occurs is kind of an infinite loop between the jsp and the angular app. We can see the url alternating between these two: http://localhost:8080/app/initApplication?lang=ES&TOTAL_APPROVALS

How to create a only mute/unmute button (like youtube) in html

蓝咒 提交于 2019-12-08 05:54:01
问题 I was creating a website, I put background music, and my problem is I dont know how to create a button(only one) for mute/unmute the sound. I would like to have a mute button that can mute/unmute depending on the situation(if the music is muted then the button should have the image of a Loudspeaker,for hearing the sound, if you press it then you begin listening the music and the image of the button changes and vice versa) what I have now is this: <td width=10% valign="top" align="right"> <img

how to change the pagination bullet in a swiper to text?

左心房为你撑大大i 提交于 2019-12-06 11:03:29
问题 In my project : http://moransh4.github.io/Luca/ I need to change the swiper-pagination-bullet at the last section to this: The "active" change to green. I read ( from : http://idangero.us/swiper/api/) that i can customize with this : paginationBulletRender: function (index, className) { return '<span class="' + className + '">' + (index + 1) + '</span>'; } Sorry i go lost with it, How to do it? 回答1: You should instead use paginationCustomRender to create custom design.Define your names in

Grunt compass task not compatible with this directory structure?

倖福魔咒の 提交于 2019-12-06 05:11:16
I have the following directory structure (only showing the relevant bits for illustration purposes): proj \ \ Gruntfile.js \ package.json \ test \ (all my tests are in this folder structure) \ app \ \ index.html \ scripts \ (all my scripts are in here) \ views \ (all views are in here) \ styles \ \ style.css \ oldie.css \ print.css \ images \ \ hires \ (all high resolution images are here) \ lowres \ (all low resolution images are here) The compass section of my Gruntfile.js file looks like this: compass: { options: { require: "susy", sassDir: '<%= my.app %>/styles', cssDir: '.tmp/styles',

Is it possible to combine Dojo with other JS frameworks?

≯℡__Kan透↙ 提交于 2019-12-05 16:37:39
问题 We are using Dojo (1.9.3) as a JS framework for building a single page application. We are however spending too much time on the quirks of Dojo, so even simple tasks take a long time to implement. And since there is lack of proper documentation, we often have to resort to reading the source code and then implementing a workaround. I feel that we would speed up development, and make it easier to maintain the code if we moved to some other framework. Our codebase is rather large, since it is a

Angular2 import components/services from module

随声附和 提交于 2019-12-05 08:51:29
I am working on an Angular2 final application which (currently) has two modules: CoreModule: Contains shared components, services. AppModule: The root module of the application AppModule: /** * Created by jamdahl on 9/21/16. */ // Angular Imports import {NgModule} from '@angular/core'; import {BrowserModule} from '@angular/platform-browser'; import {HttpModule} from '@angular/http'; import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {CoreModule} from '../core-module/core.module'; import {UserService, AuthService, AuthComponent} from '../core-module/core.module'; //

How to embed an interactive Jupyter notebook into html?

假如想象 提交于 2019-12-05 04:47:10
I am trying to create a web application that allows users to create and share Jupyter notebooks. Currently, I have JupyterHub up and running and am able to spawn new servers for individual servers. However, I do not know how to embed a Jupyter notebook into a html page. I have tried nbconvert, but that gives me a static rendering of the noteboo. What I need is a dynamic notebook that users can edit and run. I plan to store notebooks in GitHub and allow users to view them through the web application. I have seen something similar to this in the website Quantopian. (Ex : Quantopian notebook ).

SASS output from one sass file to multiple css files

五迷三道 提交于 2019-12-05 04:27:31
I want to output multiple css files from one sass file. I have one file: schemes.scss , with code like this: $schemes: ( 'light': ( 'body-background': white, 'headline-color' : #111, 'subheadline-color': #222 ), 'dark': ( 'body-background': black, 'headline-color' : #ddd, 'subheadline-color' : #eee ), 'moderate': ( 'body-background': gray, 'headline-color' : black, 'subheadline-color' : #333 ) ); @each $scheme in $schemes{ //do something to export to separate file @include scheme-base-mixin($scheme); } so that the result are 3 separate css files: scheme-light.css : body{ background-color:

how to change the pagination bullet in a swiper to text?

扶醉桌前 提交于 2019-12-04 16:59:31
In my project : http://moransh4.github.io/Luca/ I need to change the swiper-pagination-bullet at the last section to this: The "active" change to green. I read ( from : http://idangero.us/swiper/api/ ) that i can customize with this : paginationBulletRender: function (index, className) { return '<span class="' + className + '">' + (index + 1) + '</span>'; } Sorry i go lost with it, How to do it? You should instead use paginationCustomRender to create custom design.Define your names in each div var mySwiper2 = new Swiper('.swiper-container.shoes', { // Optional parameters pagination: '.pag

How can i send emails without a server ? Only front-end Javascript with sendgrid or

落爺英雄遲暮 提交于 2019-12-04 10:25:09
问题 i was wondering lately how i could send emails with only a front-end language like Javascript through Email as a Service apps like sendgrid or mandrill or so. Sendgrid and mandrill have Curl APIS, so basically i can just do an AJAX post request to their API to send a mail but the thing is, i will have to put my API secret key in the JS file, this means it will be public... while it's supposed to be secret. On those two apps, there's nothing in the docs concerning front-end use except having