JS – add click event listener for all elements matching a querySelectorAll

I have li elements to which I’m trying to add click events that match the querySelector : .sidebar-nav li:not(.top). I have this code : var sidebarItems = document.querySelectorAll(“.sidebar-nav li:not(.top)”); // For each sidebar item, register a click function for (var i = 0; i === sidebarItems.length; i++) { sidebarItems[i].addEventListener(“click”, function() { console.log(“fromage”); }) }; However,…

Details

Border radius not dependent on height and width

I need a border-radius rule that will make that element will be rounded the same not matter what is the size(height) of the element. Here is my example: <div class=”container”> <div class=”element first”></div> <div class=”element sec”></div> <div class=”element third”></div> </div> $blue: #0084ff; .container { display: flex; flex-flow: column; .element { background-color: $blue; border-radius: 100px; width:…

Details

Geting NoSuchBeanDefinitionException

Exception in thread “main” org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘greetingControler’ available at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:805) at org.springframework.beans.factory.support.AbstracBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1278) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) at vill.example.village.VillageApplication.main(VillageApplication.java:15) The class that generate this exceptin is package controllers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.stereotype.Controller; import services.GreetingService; @Controller public class GreetingControler { private GreetingService greetingService; @Autowired public void setGreetingService(GreetingService greetingService) { this.greetingService =…

Details

Why am i getting “module not found” error right after installing an NPM module?

I installed react-onclickoutside to run a method whenever user clicks outside the component. (i’m actually trying to hide it) in my project REPO1. as soon as I install and import, this project builds successfully but in another project (REPO2) where I am using this is throwing some weird error: ERROR in ../node_modules/REPO1/dist/bundles/REPO1.umd.js Module not found:…

Details

Smart cast to ‘Bitmap!’ is impossible, because ‘bitmap1’ is a mutable property that could have been changed by this time

bitmap1 = Bitmap.createScaledBitmap( bitmap1, // <—- error is here (width.toInt()), (height.toInt()), false) numberOfInvaders ++ I also used bitmap2 and bitmap 1 in another class : if (uhOrOh) { canvas.drawBitmap(Invader.bitmap1, // <— error is here invader.position.left, invader.position.top, paint) } else { canvas.drawBitmap(Invader.bitmap2, // <—- and here invader.position.left, invader.position.top, paint) } here its says : Type mismatch,…

Details

Delete Child Span after Child Span Delete remaing Child auto rearrange why?

Here is my Javascript code: function validspan() { var data = document.querySelector(‘.keyword-input’).value; var nodes = document.querySelectorAll(‘.keywords-list span’); var str = Array.prototype.map.call(nodes, function(node) { return node.textContent; }).filter(a => !!a).join(“,”); var arr = str.split(‘,’); for (var k = 0; k < arr.length; k++) { if (data == arr[k]) { alert(“Don’t Enter Same Skill”); let list = document.querySelector(‘.keywords-list’);…

Details

Is there a format string for SimpleDateFormat to get milliseconds date-time value instead of human-readable form?

By means of classes like SimpleDateFormat it is possible to format time and date in a suitable format. Examples here https://developer.android.com/reference/java/text/SimpleDateFormat#examples In Java it starts with milliseconds value and then that value gets translated into human readable format. Sometime it is useful to have that value instead of the human readable form. Example: If I…

Details

Prism 4.1 How to loading modules with directory scan andapply them to mvvm pattern for navigation

In prism 4.1 I want to use module loading and build my project using mvvm. Now I register the module using directory scanning,but navigation is not possible in the view model the code for the module [Module(ModuleName = “ModuleA”, OnDemand = true)] public class ModuleAModule : IModule { private IRegionManager RegionManager { get; set; }…

Details