text:
Q: TemplateInputException or wrong NullPointerException while parsing JSON i am doing weather forecast website with some public API calls. And i am getting this error:
`java.lang.NullPointerException: Cannot invoke "com.weather.weather.json.hourly.HourlyInfo.getData()" because "hour" is null
    at com.weather.weather.controller.MainController.getDayWeather(MainController.java:34) ~[classes/:na]
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:577) ~[na:na]
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:207) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:152) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:884) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1080) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:973) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1003) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:895) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:705) ~[tomcat-embed-core-10.1.1.jar:6.0]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:880) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:814) ~[tomcat-embed-core-10.1.1.jar:6.0]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:223) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:365) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:100) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:170) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter.doFilterInternal(DefaultLogoutPageGeneratingFilter.java:58) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:188) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:174) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:116) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.context.SecurityContextHolderFilter.doFilterInternal(SecurityContextHolderFilter.java:69) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]

The problem is id basically does nothing. All information in showed properly.

The error is throwing is Runtime, while im refreshing a page.

I have tried debugging and i`ve got null response in this method:
public HourlyInfo getHourlyWeather(String city_name){
    hourlyInfo = gson.fromJson(request.sendHourRequest(city_name, "24"), HourlyInfo.class);

    return hourlyInfo;
}

But calling this method from contorller also throws exception, but information transfers to view well ( I have thymeleaf page).

I also have tried pasting that exactly in controller and the same result, but error is a bit different:
org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/weather.html]")
    at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:241) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parseStandalone(AbstractMarkupTemplateParser.java:100) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:666) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1103) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1077) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.spring6.view.ThymeleafView.renderFragment(ThymeleafView.java:372) ~[thymeleaf-spring6-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.spring6.view.ThymeleafView.render(ThymeleafView.java:192) ~[thymeleaf-spring6-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1414) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1158) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1097) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:973) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1003) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:895) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:705) ~[tomcat-embed-core-10.1.1.jar:6.0]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:880) ~[spring-webmvc-6.0.2.jar:6.0.2]
    at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:814) ~[tomcat-embed-core-10.1.1.jar:6.0]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:223) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:365) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:100) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter.doFilterInternal(DefaultLogoutPageGeneratingFilter.java:58) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:188) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:174) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.context.SecurityContextHolderFilter.doFilterInternal(SecurityContextHolderFilter.java:69) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191) ~[spring-security-web-6.0.0.jar:6.0.0]
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:351) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) ~[spring-web-6.0.2.jar:6.0.2]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.0.2.jar:6.0.2]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:119) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:400) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: "day.getCity_name()" (template: "weather" - line 24, col 9)
    at org.attoparser.MarkupParser.parseDocument(MarkupParser.java:393) ~[attoparser-2.0.6.RELEASE.jar:2.0.6.RELEASE]
    at org.attoparser.MarkupParser.parse(MarkupParser.java:257) ~[attoparser-2.0.6.RELEASE.jar:2.0.6.RELEASE]
    at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:230) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    ... 92 common frames omitted
Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "day.getCity_name()" (template: "weather" - line 24, col 9)
    at org.thymeleaf.spring6.expression.SPELVariableExpressionEvaluator.evaluate(SPELVariableExpressionEvaluator.java:292) ~[thymeleaf-spring6-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.standard.expression.VariableExpression.executeVariableExpression(VariableExpression.java:166) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.standard.expression.SimpleExpression.executeSimple(SimpleExpression.java:66) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.standard.expression.Expression.execute(Expression.java:109) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.standard.expression.AdditionExpression.executeAddition(AdditionExpression.java:96) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.standard.expression.ComplexExpression.executeComplex(ComplexExpression.java:62) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.standard.expression.Expression.execute(Expression.java:112) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.standard.expression.Expression.execute(Expression.java:138) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.standard.processor.AbstractStandardExpressionAttributeTagProcessor.doProcess(AbstractStandardExpressionAttributeTagProcessor.java:144) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.processor.element.AbstractAttributeTagProcessor.doProcess(AbstractAttributeTagProcessor.java:74) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.processor.element.AbstractElementTagProcessor.process(AbstractElementTagProcessor.java:95) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.util.ProcessorConfigurationUtils$ElementTagProcessorWrapper.process(ProcessorConfigurationUtils.java:633) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1314) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.engine.TemplateHandlerAdapterMarkupHandler.handleOpenElementEnd(TemplateHandlerAdapterMarkupHandler.java:304) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.templateparser.markup.InlinedOutputExpressionMarkupHandler$InlineMarkupAdapterPreProcessorHandler.handleOpenElementEnd(InlinedOutputExpressionMarkupHandler.java:278) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.standard.inline.OutputExpressionInlinePreProcessorHandler.handleOpenElementEnd(OutputExpressionInlinePreProcessorHandler.java:186) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.thymeleaf.templateparser.markup.InlinedOutputExpressionMarkupHandler.handleOpenElementEnd(InlinedOutputExpressionMarkupHandler.java:124) ~[thymeleaf-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.attoparser.HtmlElement.handleOpenElementEnd(HtmlElement.java:109) ~[attoparser-2.0.6.RELEASE.jar:2.0.6.RELEASE]
    at org.attoparser.HtmlMarkupHandler.handleOpenElementEnd(HtmlMarkupHandler.java:297) ~[attoparser-2.0.6.RELEASE.jar:2.0.6.RELEASE]
    at org.attoparser.MarkupEventProcessorHandler.handleOpenElementEnd(MarkupEventProcessorHandler.java:402) ~[attoparser-2.0.6.RELEASE.jar:2.0.6.RELEASE]
    at org.attoparser.ParsingElementMarkupUtil.parseOpenElement(ParsingElementMarkupUtil.java:159) ~[attoparser-2.0.6.RELEASE.jar:2.0.6.RELEASE]
    at org.attoparser.MarkupParser.parseBuffer(MarkupParser.java:710) ~[attoparser-2.0.6.RELEASE.jar:2.0.6.RELEASE]
    at org.attoparser.MarkupParser.parseDocument(MarkupParser.java:301) ~[attoparser-2.0.6.RELEASE.jar:2.0.6.RELEASE]
    ... 94 common frames omitted
Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1011E: Method call: Attempted to call method getCity_name() on null context object
    at org.springframework.expression.spel.ast.MethodReference.throwIfNotNullSafe(MethodReference.java:154) ~[spring-expression-6.0.2.jar:6.0.2]
    at org.springframework.expression.spel.ast.MethodReference.getValueRef(MethodReference.java:83) ~[spring-expression-6.0.2.jar:6.0.2]
    at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:70) ~[spring-expression-6.0.2.jar:6.0.2]
    at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:91) ~[spring-expression-6.0.2.jar:6.0.2]
    at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:112) ~[spring-expression-6.0.2.jar:6.0.2]
    at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:338) ~[spring-expression-6.0.2.jar:6.0.2]
    at org.thymeleaf.spring6.expression.SPELVariableExpressionEvaluator.evaluate(SPELVariableExpressionEvaluator.java:265) ~[thymeleaf-spring6-3.1.0.RELEASE.jar:3.1.0.RELEASE]

If you are interesting, here is the sendHouRequest method:

@SneakyThrows
public String sendHourRequest(String city, String hours) {

    HttpRequest request = HttpRequest.newBuilder()
            .uri(new URI("https://api.weatherbit.io/v2.0/forecast/hourly?city=" + city +
                    "&country=Ukraine&lang=uk&hours=" + hours + "&key=" + this.API_KEY))
            .GET().build();

    HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
    return response.body();

}

The url is good, i have tested it in postman. The problem is probably wrong return, but i dont know. The POJOs is also alright. Here is the short version of html page:

    <h2 th:text="'Weather in: ' + ${day.getCity_name()}"></h2>
    <h3 th:text="${day.getTimezone()}"></h3><br>

<table>

    <tr th:each="d, iter : ${day.getData()}">

            <td th:text="${d.datetime}" ></td>

            <td><a th:href="@{'/'+${day.getCity_name()}+'/'+${d.getDatetime()} }" th:text="${d.datetime}"/></td>
            <td th:text="${'Temperature: '+d.temp + 'C'}"/>

            <td th:text="${'Min/Max temp: '+ d.min_temp +'C /'+ d.max_temp +'C'}"/>
            <td th:text="${d.weather.getDescription()}"/>
            <td><img th:src="'https://www.weatherbit.io/static/img/icons/'+${d.weather.icon
                                    +'.png'}" alt="" width="50px"></td>

    </tr>


text:
Q: How to excute Fortran program in python for multiple input I have a Fortran program and want to execute it in python for multiple files. I have 2000 input files but in my Fortran code I am able to run only one file at a time. How should I call the Fortran program in python?
My Script:
import subprocess
import glob
input = glob.glob('C:/Users/Vishnu/Desktop/Fortran_Program_Rum/*.txt')
output = glob.glob('C:/Users/Vishnu/Desktop/Fortran_Program_Rum/Output/')
f = open("output", "w")
for i in input:
    subprocess.Popen(["FORTRAN ~/C:/Users/Vishnu/Desktop/Fortran_Program_Rum/phase1.f", "--domain "+i])
f.write(i)

Error:
Traceback (most recent call last):
  File "<pyshell#14>", line 2, in <module>
subprocess.Popen(["FORTRAN ~/C:/Users/Vishnu/Desktop/Fortran_Program_Rum/phase1.f", "--domain "+i])
  File "C:\Users\Vishnu\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 947, in __init__
restore_signals, start_new_session)
  File "C:\Users\Vishnu\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

A: perhaps calling the fortran program with subprocess a la this thread?
Calling an external command in Python
e.g.
import subprocess
subprocess.call('fortran program.f', '-flags')

also, read the documentation

redpajama_set_name: RedPajamaStackExchange


text:
Q: Firefox crashes immediately on start-up I'm running a new install of Ubuntu 14.04 and my firefox crashes immediately upon starting up. Here is the error message I get in the terminal:
(firefox:6660): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6660): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:6660): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:6660): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
ExceptionHandler::GenerateDump cloned child 6704
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
Bus error (core dumped)

I've tried purging and reinstalling firefox with apt-get but it didn't help. I also get a crash reporter, here are the contents of it:
Add-ons: ubufox%40ubuntu.com:3.2,%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D:50.0.2,aushelper%40mozilla.org:1.0,webcompat%40mozilla.org:1.0,firefox%40getpocket.com:1.0.5,e10srollout%40mozilla.org:1.5,langpack-en-GB%40firefox.mozilla.org:50.0.2,langpack-en-ZA%40firefox.mozilla.org:50.0.2
AddonsShouldHaveBlockedE10s: 1
BuildID: 20161130094553
ContentSandboxCapabilities: 117
CrashTime: 1481203588
E10SCohort: disqualified-test
EMCheckCompatibility: true
FramePoisonBase: 7ffffffff0dea000
FramePoisonSize: 4096
InstallTime: 1481203057
Notes: OpenGL: Intel Open Source Technology Center -- Mesa DRI Intel(R) Kabylake GT2  -- 3.0 Mesa 11.2.0 -- texture_from_pixmap
FP(D000-L10000-W00000000-T0000)
ProductID: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
ProductName: Firefox
ReleaseChannel: release
SafeMode: 0
SecondsSinceLastCrash: 77
StartupTime: 1481203587
TelemetryEnvironment: {"build":{"applicationId":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","applicationName":"Firefox","architecture":"x86-64","buildId":"20161130094553","version":"50.0.2","vendor":"Mozilla","platformVersion":"50.0.2","xpcomAbi":"x86_64-gcc3","hotfixVersion":null},"partner":{"distributionId":null,"distributionVersion":null,"partnerId":null,"distributor":null,"distributorChannel":null,"partnerNames":[]},"system":{"memoryMB":15926,"virtualMaxMB":null,"cpu":{"count":4,"cores":2,"vendor":"GenuineIntel","family":6,"model":142,"stepping":9,"l2cacheKB":256,"l3cacheKB":4096,"speedMHz":2701,"extensions":["hasMMX","hasSSE","hasSSE2","hasSSE3","hasSSSE3","hasSSE4_1","hasSSE4_2","hasAVX","hasAVX2"]},"os":{"name":"Linux","version":"4.4.0-53-generic","locale":"en-US"},"hdd":{"profile":{"model":null,"revision":null},"binary":{"model":null,"revision":null},"system":{"model":null,"revision":null}},"gfx":{"D2DEnabled":null,"DWriteEnabled":null,"adapters":[{"description":"Intel Open Source Technology Center -- Mesa DRI Intel(R) Kabylake GT2 ","vendorID":"Intel Open Source Technology Center","deviceID":"Mesa DRI Intel(R) Kabylake GT2 ","subsysID":null,"RAM":null,"driver":null,"driverVersion":"3.0 Mesa 11.2.0","driverDate":null,"GPUActive":true}],"monitors":[],"features":{"compositor":"none"}}},"settings":{"blocklistEnabled":true,"e10sEnabled":false,"e10sCohort":"disqualified-test","telemetryEnabled":false,"locale":"en-US","update":{"channel":"release","enabled":true,"autoDownload":true},"userPrefs":{"browser.newtabpage.enhanced":true},"addonCompatibilityCheckEnabled":true,"isDefaultBrowser":false},"profile":{}}
Theme: classic/1.0
Throttleable: 1
UptimeTS: .6687318
Vendor: Mozilla
Version: 50.0.2
useragent_locale: en-US

This report also contains technical information about the state of the application when it crashed.

Anyone have any idea what could be causing this and how to fix it?

A: In case someone wants the fix for this same error, it got resolved when I upgraded my kernel to 4.8.14


text:
Q: Printing the Nth column to the Mth column I want to print the Nth column to the Mth column of a table; for example:
1 2 3 ... n ... m ...
X & $     #     !
@ $ %     (     *

to
n ... m
#     !
(     *

A: Do you mean that you want to print between two columns such as from the 4th column to the 10th column?
If so:
cut -d ' ' -f 4-8 table.txt

That will print columns 4-8.  cut will work well for this problem as long as the column delimiter is a single character.
Edit The cat wasn't necessary and I changed the delimiter to a space to fit your table.

A: a perl one-liner
perl -slane 'print join " ", @F[$n-1 .. $m-1]' -- -n=5 -m=8 file


text:
Q: How should I do my own version of a %Library.RelationshipObject collection, without subclassing it? I'm trying to have a collection class similar to %Library.RelationshipObject in that it manages saving and deleting the objects in the collection.  I'd like the flexibility to do this with my own objects, so I don't want to use the relationship keywords or subclass the %Library.RelationshipObject class.
I can't call my own Save() and Delete() methods on the parent object holding this collection, and have it call my collection class (and just have my classes call Save() instead of %Save()) because swizzling may call %Save() directly.
What I'm trying is to use the %OnAddToSaveSet method on my collection class and on my parent classes.  The parent classes put my collection class in the save set when the parent classes %OnAddToSaveSet is called.  The collection class calls saves and deletes the items in the collection as appropriate.
It seems that the right way to do this in my collection class is to Add the collection items to be saved into the save set using their %OnAddToSaveSet() method, and to delete the items that need deleting by using %Delete(), then setting
%objTX(5,+oref) = oref

for each of the deleted items.
Is this the right way to do it?  Have I missed anything?  Is this supported?  Can I change anything unsupported to something better supported?

A: I believe your code in %OnAddToSaveSet() should be calling yourObject.%AddToSaveSet() and yourObject.%RemoveFromSaveSet() to control which objects should (or should not) be included in the current save operation. I believe you should also be able to call %Delete() on objects that are no longer in the collection, if that's the behaviour you want to implement.

A: Instead of directly using %Library.RelationshipObject, better to use RelationShips
So you get more possibilities, for control parents and children objects.


text:
Q: Am I performance testing correctly? Library "Memored" storage vs. normal RAM storage in Node.js I am trying to compare the READ performance of a library called Memored to regular old RAM variables in Node.js.
I expected that the data stored with Memored to be at least slightly slower than RAM storage in terms of reading data, but the results show the opposite (read below for my outputs).
I am running this in the terminal of Visual Studio Code on Windows 10. It's all being done in Typescript, which gets compiled down to JavaScript later and then run with the "node" command.
This is my RAM test:
var normalRAM = {
    firstname: 'qwe',
    lastname: 'fsa'
}

var s = process.hrtime(); //start timer
console.log(normalRAM); // read from ram
var e = process.hrtime(s) //stop timer

console.log("end0", e[0]);  //results in seconds
console.log("end1", e[1]);  //results in nanoseconds

This is my Memored test:
// Clustering needed to show Memored in action
if (cluster.isMaster)
{
    // Fork workers.
    for (let i = 0; i < 1; i++)
    {
        cluster.fork();
    }
}
else
{
    var han = {
        firstname: 'Han',
        lastname: 'Solo'
    }

    // Store and read
    memored.store('character1', han, function ()
    {
        console.log('Value stored!');
        var hrstart = process.hrtime(); // start timer
        memored.read('character1', function (err: any, value: any)
        {
            var hrend = process.hrtime(hrstart) // stop timer
            console.log('Read value:', value);

            console.log("hrend0", hrend[0]); //results in seconds
            console.log("hrend1", hrend[1]); //results in nanoseconds

        });
    });
}

The results:
The RAM read speeds are around 6500000 nanoseconds.

The Memored read speeds are around 1000000 nanoseconds

Am I testing the speeds incorrectly here? What are the flaws in my methodology? Perhaps my initial assumption is wrong?

A: I switched the following two lines:
var hrend = process.hrtime(hrstart) // stop timer
console.log('Read value:', value);

To this:
console.log('Read value:', value);
var hrend = process.hrtime(hrstart) // stop timer

Which makes more sense in a real scenario since I would need to read it from RAM like that anyway after the data is returned. The answer to my question is probably "your Memored test is performing faster, because it's only testing when the data comes back for my callback to use, and not when I actually read it from the 'value' variable".


text:
Q: Python: how to add function to a class Let me say that I am pretty new in working with Object Oriented programming in Python, so let me explain the problem. I defined this class
class Driver(object):
        def __init__(self, name, raw_value, Ind1, Ind2, Ind3, Ind4, Ind5):
            self.name = name
            self.raw = raw_value
            self.Indicator1 = Ind1
            self.Indicator2 = Ind2
            self.Indicator3 = Ind3
            self.Indicator4 = Ind4
            self.Indicator5 = Ind5

Then for each indicator I have to do this operation where A is a list containing the values I need and A[i].Indicator1 contains the values of the Indicator1 for the driveri, A[i].Indicator2 the Indicator2, and so on.
indicator1 = {}
for i in range(0,len(A)):
    if not A[i].name in indicator1:
        indicator1[A[i].name] = [A[i].Indicator1]
    else:
        indicator1[A[i].name] += [A[i].Indicator1]

    for i in range(0,len(drivers)):
        tmp = []
        if len(indicator1[drivers[i]]) < 10: continue
        tmp = pd.concat(indicator1[drivers[i]]).values

similarly for the Indicator2
indicator2 = {}
for i in range(0,len(A)):
    if not A[i].name in indicator2:
        indicator2[A[i].name] = [A[i].Indicator2]
    else:
        indicator2[A[i].name] += [A[i].Indicator2]

    for i in range(0,len(drivers)):
        tmp = []
        if len(indicator2[drivers[i]]) < 10: continue
        tmp = pd.concat(indicator2[drivers[i]]).values

and so on for the other indicators.
I am wondering how to that using a special class function.


text:
Q: How to create a distributable RESTful API in python for a database? I apologize in advance if the below-given information looks insufficient.
The programming language to be used throughout is python.
I am trying to understand the procedure to create an API for a database that can be accessed by anybody around the world. Like an API "https://testing.org/api/someendpoint" where there is a proper hostname and want to create a API like that, not like "http://localhost:5000/users" this as explained in the link "https://www.roytuts.com/python-rest-api-crud-example-using-flask-and-mysql/".(please consider that i have no exp in  making a API)
I also don't know if i need to host my database(current location - local computer) somewhere else to create a global API.
So how do i go from making a local api link to a global api link.
The database is a normal database with a single table which contains information like name, id, sales info, time, etc.
Any help would be appreciated.

A: There are a couple of tools that can make this job a lot easier:
https://www.djangoproject.com/ which comes complete with a web interface, admin, and much else besides. The most useful thing is it has an ORM (https://en.wikipedia.org/wiki/Object-relational_mapping) - a way of treating database objects and python objects similarly.
You may also find https://www.django-rest-framework.org/ a useful addition - it makes REST APIs for Django. If your interface requirements are clean and well defined you should be able to get going in no time. You don't need it to make Django have a REST interface - but it takes a lot of the repetitive work away.

A:
I also don't know if i need to host my database(current location -
  local computer) somewhere else to create a global API.

You might want to host in the cloud e.g. Google Appengine or Google Compute Engine. You can do it with Google Appengine.
Implementation, which you mention that you already did, can be done in many ways. If you choose Google Appengine you can just base your code on the examples in that manual. Any implementation details may depend on your specific environment but you might want to consider my current way. I just read the data from a database and then output it as JSON.
Example:
    cursor = mariadb_connection.cursor()
    cursor.callproc('GetSomeDataYouWant') # Calling a stored procedure
    thelist = []
    for result in cursor.fetchall():
        my_dict = {
            "name": result[1],
            "sales": result[2],
            "info": result[3]
        }
        thelist.append(my_dict)
    cursor.close()
    mariadb_connection.close()
    return get_success_response(thelist)

Helper function:
def get_success_response(response):
  return {
    'statusCode': 200,
    'headers': {
      'Content-Type': 'application/json',
      'Access-Control-Allow-Origin' : '*' # Required for CORS support to work
    },
    'body': json.dumps(response)
  }


text:
Q: How to avoid any mutable things in this builder? I have a simple Scala class like this:
class FiltersBuilder {

  def build(filter: CommandFilter) = {
    val result = collection.mutable.Map[String, String]()
    if (filter.activity.isDefined) {
      result += ("activity" -> """ some specific expression """)
    } // I well know that manipulating option like this is not recommanded,
      //it's just for the simplicity of the  example
    if (filter.gender.isDefined) {
      result += ("gender" -> """ some specific expression """)
    }
    result.toMap //in order to return an immutable Map
  }
}

using this class so:
case class CommandFilter(activity: Option[String] = None, gender: Option[String] = None)

The result content depends on the nature of the selected filters and their associated and hardcoded expressions (String).
Is there a way to transform this code snippet by removing this "mutability" of the mutable.Map?

A: Since there are at most 2 elements in your Map:
val activity = filter.activity.map(_ => Map("activity" -> "xx"))
val gender = filter.gender.map(_ => Map("gender" -> "xx"))
val empty = Map[String, String]()
activity.getOrElse(empty) ++ gender.getOrElse(empty)

A: Map each filter field to a tuple while you add the result to a Seq, then filter out the Nones with flatten finally convert the Seq of tuples to a Map with toMap.
For adding more fields to filter you just have to add a new line to the Seq
    def build(filter: CommandFilter) = {
      // map each filter filed to the proper tuple
      // as they are options, map will transform just the Some and let the None as None
      val result = Seq(
        filter.activity.map(value => "activity" -> s""" some specific expression using $value """),
        filter.gender.map(value => "gender" -> s""" some specific expression using $value """)
      ).flatten // flatten will filter out all the Nones
      result.toMap // transform list of tuple to a map
    }

Hope it helps.
Gaston.

A: I've just managed to achieve it with this solution:
class FiltersBuilder(commandFilter: CommandFilter) {

   def build = {
     val result = Map[String, String]()
     buildGenderFilter(buildActivityFilter(result))
   }

   private def buildActivityFilter(expressions: Map[String, String]) =
     commandFilter.activity.fold(expressions)(activity => result + ("activity" -> """ expression regarding activity """))

   private def buildGenderFilter(expressions: Map[String, String]) =
     commandFilter.gender.fold(expressions)(gender => result + ("gender" -> """ expression regarding gender """))

}

Any better way?


text:
Q: Redirect old sitemaps to new sitemap.xml I accidently had three allowed sitemap urls:
domain.com/sitemap.php
domain.com/sitemap
domain.com/sitemap.xml

How can I redirect them all to domain.com/sitemap.xml, the sitemap file is sitemap.php?
I've been trying a few different ones but they seem to result in constant loops between the .xml and .php extensions and it breaks ...
#Sitemap
RewriteRule ^sitemap.xml sitemap.php [L, R=301]
RewriteRule ^sitemap$ http://domain.com/sitemap.xml [R=301]

A: Ok try this code:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+(sitemap)(/|\.php)?\s [NC]
RewriteRule ^ /%1.xml [R=301,L]

RewriteRule ^(sitemap)\.xml$ /$1.php [L,NC]


text:
Q: Find a number such that number of divider is $16$ and sum of divider is $4032$ I have solution where it write that we only can have a number in this shape $pqrs,p^3qr,p^3q^3,p^7q,p^{15}$. I understand why we can have only four divider but why we can have only number in that shape, why I can not write for example $p^2q^5$ and I still have $16$ divider, or $p^2qr^2$ and I still have $16$ divider?

A: $p^2q^5$ has $(2+1)(5+1)=18$ divisors $$1,q,q^2,q^3,q^4,q^5,p,pq,pq^2,pq^3,pq^4,pq^5,p^2,p^2q,p^2q^2,p^2q^3,p^2q^4,p^2q^5.$$
In other words, you want that the product of the incremented-by-one exponents is $16$. You only have to consider the factorizations $2\cdot 2\cdot 2\cdot 2=4\cdot 2\cdot 2=4\cdot 4=8\cdot 2=16$, corresponding exactly to the prime patterns listed.


text:
Q: is there a way to tell the VM budget for a device programmatically? is there a way programmatically to determine VM budget size?  I found lots of people commenting about exceeding it, but I was wondering if there was a way to determine it at run time.

A: I think you can use  Runtime.maxMemory().  Based on this documentation
Returns the maximum amount of memory that may be used by the virtual machine


text:
Q: Use a map for this object with arrays? I'm learning about JS and TypeScript and I need to generate a separate React component for each of these items:
Say I have this object
var regions = {
    NA: ["US", "ABC1"],
    EU: ["GB", "LX", "IT"],
    FE: ["JP", "DEF1"],
    CN: ["CN"]
}

I'm trying to loop through and return a component for each key (NA/EU/FE/CN) and each item in the array (US, ABC1, etc.)
I can print out the values I want in a for loop:
for (let key in region) {
    for (let item in region[key]) {
        console.log("key: " + key + " item " + region[key][item]);
    }
}

as a sanity test, but instead of doing this, I want each item to be mapped to a Component so that from the function, I can return an entire list of Components. Any recommended ways of doing this?

A: It's a little unclear exactly what you are looking for when you say "return a component", but I'll give it a go with what I think you are saying. To fit into your loop code you could do something like the following:
const regionComponents = [];
for (let key in regions) {
    for (let item in regions[key]) {
        regionComponents.push(<MyComponent region={regions[key][item]} />);
    }
}

return regionComponents;

Or if you wanted to shorten it a little bit:
return regions.map(region => region.map(subRegion => <MyComponent region={subRegion} />));

(Obviously that will return a 2D array with components, but if you are simply then putting that within JSX elsewhere to render React will handle de-nesting for you).
If this isn't what you were looking for, leave a comment / edit your post to be a little clearer and I'll try my best to update my answer.

A: I'm not totally certain this is what you're trying to do, but you could use something like lodash's mapValues function to iterate over your object, and then turn each item of each array into a new component.
Here's an example: https://codesandbox.io/s/ll5n988mwm


text:
Q: Select old kernel of vserver without console access I installed a new kernel on my vserver via SSH. After rebooting it doesn't start anymore.
I'm able to access to a "rescue-mode" where I can connect via SSH and access the vserver via a mount entry /rescue. This basically allows me to read/write files of the vserver.
How can I change back to the previously used kernel?
All solutions I found require a startable system (e.g. update-grub) or access to the console during startup (like press SHIFT during startup). It feels like a simple question where I should have found an existing question/answer - just I didn't :(
Edit:
The installation was done during a routine update task that I do. I start aptitude press u (update) press U (update package list) press twice g (mark upgradable/install).
More background info: my vserver provider says that their system does not support compressed kernels and that extracting the kernel would be the solution. They suggest using this  script + update-grub, this is why some kernels are named like vmlinuz-5.x.0-xx-generic.d. These are the two extracted kernels of the first installation (by the provider). Without knowing all of this, I run the previously described update and restarted. Now it is too late to follow the providers instruction and my plan is to activate one of the extracted kernels. BTW - I wonder why my provider cannot just run ubuntu kernels as they are installed by ubuntu, but that is another story.
List of existing files. However, I've already changed the symbolic links initrd.img and vmlinuz to the desired version. Before that it was 5.4.0-66.
root@RESCUESYSTEM:/rescue/boot# ls -lah
total 394M
drwxr-xr-x  3 root root 4.0K Mar 15 21:54 .
drwxr-xr-x 36 root root 4.0K Mar  3 19:34 ..
-rw-------  1 root root 3.9M May 11  2020 System.map-4.15.0-101-generic
-rw-------  1 root root 4.5M May 21  2020 System.map-5.3.0-55-generic
-rw-------  1 root root 4.6M May 21  2020 System.map-5.4.0-33-generic
-rw-------  1 root root 4.6M Sep 10  2020 System.map-5.4.0-48-generic
-rw-------  1 root root 4.6M Jan 18 16:31 System.map-5.4.0-65-generic
-rw-------  1 root root 4.6M Jan 27 21:44 System.map-5.4.0-66-generic
-rw-r--r--  1 root root 213K May 11  2020 config-4.15.0-101-generic
-rw-r--r--  1 root root 231K May 21  2020 config-5.3.0-55-generic
-rw-r--r--  1 root root 233K May 21  2020 config-5.4.0-33-generic
-rw-r--r--  1 root root 233K Sep 10  2020 config-5.4.0-48-generic
-rw-r--r--  1 root root 233K Jan 18 16:31 config-5.4.0-65-generic
-rw-r--r--  1 root root 233K Jan 27 21:44 config-5.4.0-66-generic
drwxr-xr-x  2 root root 4.0K Mar 15 22:26 grub
lrwxrwxrwx  1 root root   27 Mar 15 21:54 initrd.img -> initrd.img-5.4.0-33-generic
-rw-r--r--  1 root root  24M Mar 12 20:33 initrd.img-4.15.0-101-generic
-rw-r--r--  1 root root  25M Mar 12 20:33 initrd.img-5.3.0-55-generic
-rw-r--r--  1 root root  48M Mar 12 20:33 initrd.img-5.4.0-33-generic
-rw-r--r--  1 root root  26M Mar 12 20:32 initrd.img-5.4.0-48-generic
-rw-r--r--  1 root root  48M Mar 12 20:31 initrd.img-5.4.0-65-generic
-rw-r--r--  1 root root  48M Mar 12 20:30 initrd.img-5.4.0-66-generic
lrwxrwxrwx  1 root root   27 Feb 23 20:02 initrd.img.old -> initrd.img-5.4.0-65-generic
lrwxrwxrwx  1 root root   24 Mar 15 21:54 vmlinuz -> vmlinuz-5.4.0-33-generic
-rw-------  1 root root 8.0M May 11  2020 vmlinuz-4.15.0-101-generic
-rw-------  1 root root  11M May 21  2020 vmlinuz-5.3.0-55-generic
-rw-r--r--  1 root root  43M May 27  2020 vmlinuz-5.3.0-55-generic.d
-rw-------  1 root root  12M May 21  2020 vmlinuz-5.4.0-33-generic
-rw-r--r--  1 root root  43M Jun  4  2020 vmlinuz-5.4.0-33-generic.d
-rw-------  1 root root  12M Sep 10  2020 vmlinuz-5.4.0-48-generic
-rw-------  1 root root  12M Jan 18 16:45 vmlinuz-5.4.0-65-generic
-rw-------  1 root root  12M Jan 27 22:14 vmlinuz-5.4.0-66-generic
lrwxrwxrwx  1 root root   24 Feb 23 20:02 vmlinuz.old -> vmlinuz-5.4.0-65-generic


text:
Q: ListView Not Refreshing When New Record Added Can't seem to figure this out, I have gone through all the code without any success.  When I add a new bowler to an empty list it appears correctly, when I add a second or more bowlers to the list, the name of the bowler shows up as  the name of the first bowler  added. I have included several screenshots below to show what I mean.

Obviously the order of these images goes left to right.  I have include my BowlerActivity to this post  as well.  This is where I am creating and updating new and existing bowlers.
private BowlerAdapter mAdapter;
    private List<Bowler> bowlersList = new ArrayList<>();
    private CoordinatorLayout coordinatorLayout;
    private RecyclerView recyclerView;
    private TextView noBowlersView;

    private DatabaseHelper db;

    private TextView leagueId;
    private String savedLeagueId;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_bowler);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setDisplayShowHomeEnabled(true);

        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(getApplicationContext(),MainActivity.class));
                finish();
            }
        });

        savedLeagueId = String.valueOf(getIntent().getIntExtra("leagueId",2));
        leagueId = (TextView) findViewById(R.id.tvLeagueId);

        coordinatorLayout = findViewById(R.id.coordinator_layout);
        recyclerView = findViewById(R.id.recycler_view);
        noBowlersView = findViewById(R.id.empty_bowlers_view);

        db = new DatabaseHelper(this);

        bowlersList.addAll(db.getAllBowlers(savedLeagueId));

        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.add_bowler_fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                showBowlerDialog(false, null, -1);
            }
        });

        mAdapter = new BowlerAdapter(this, bowlersList);
        RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
        recyclerView.setLayoutManager(mLayoutManager);
        recyclerView.setItemAnimator(new DefaultItemAnimator());
        recyclerView.addItemDecoration(new MyDividerItemDecoration(this, LinearLayoutManager.VERTICAL, 16));
        recyclerView.setAdapter(mAdapter);

        toggleEmptyBowlers();

        //On Long Click On The RecyclerView Item An Alert Dialog Is Opened With The Option To Choose Edit/Delete
        recyclerView.addOnItemTouchListener(new RecyclerTouchListener(this,
                recyclerView, new RecyclerTouchListener.ClickListener() {
            @Override
            public void onClick(View view, final int position) {

                String seriesLeagueId = bowlersList.get(position).getLeagueId();
                int seriesBowlerId = bowlersList.get(position).getId();
                Intent myIntent = new Intent(BowlerActivity.this, SeriesActivity.class);
                myIntent.putExtra("seriesLeagueId", seriesLeagueId);
                myIntent.putExtra("seriesBowlerId", seriesBowlerId);
                startActivity(myIntent);

            }

            @Override
            public void onLongClick(View view, int position) {
                showActionsDialog(position);
            }
        }));
    }

    //Inserting New Bowler In The Database And Refreshing The List
    private void createBowler(String leagueId,  String bowlerName) {
        //Inserting Bowler In The Database And Getting Newly Inserted Bowler Id
        long id = db.insertBowler(leagueId, bowlerName);

        //Get The Newly Inserted Bowler From The Database
        Bowler n = db.getBowler(leagueId);

        if (n != null) {
            //Adding New Bowler To The Array List At Position 0
            bowlersList.add(0, n);

            //Refreshing The List
            mAdapter.notifyDataSetChanged();

            toggleEmptyBowlers();
        }
    }

    //Updating Bowler In The Database And Updating The Item In The List By Its Position
    private void updateBowler(String bowlerName, int position) {
        Bowler n = bowlersList.get(position);

        //Updating Bowler Text
        n.setLeagueId(savedLeagueId);
        n.setName(bowlerName);

        //Updating The Bowler In The Database
        db.updateBowler(n);

        //Refreshing The List
        bowlersList.set(position, n);
        mAdapter.notifyItemChanged(position);

        toggleEmptyBowlers();
    }

    //Deleting Bowler From SQLite Database And Removing The Bowler Item From The List By Its Position
    private void deleteBowler(int position) {
        //Deleting The Bowler From The Database
        db.deleteBowler(bowlersList.get(position));

        //Removing The Bowler From The List
        bowlersList.remove(position);
        mAdapter.notifyItemRemoved(position);

        toggleEmptyBowlers();
    }

    //Opens Dialog With Edit/Delete Options
    //Edit - 0
    //Delete - 0
    private void showActionsDialog(final int position) {
        CharSequence colors[] = new CharSequence[]{"Edit", "Delete"};

        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle("Choose option");
        builder.setItems(colors, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                if (which == 0) {
                    showBowlerDialog(true, bowlersList.get(position), position);
                } else {
                    deleteBowler(position);
                }
            }
        });
        builder.show();
    }

    //Show Alert Dialog With EditText Options to Enter/Edit A League
    //When shouldUpdate = true, It Will Automatically Display Old Bowler Name And Change The Button Text To UPDATE
    private void showBowlerDialog(final boolean shouldUpdate, final Bowler bowler, final int position) {
        LayoutInflater layoutInflaterAndroid = LayoutInflater.from(getApplicationContext());
        View view = layoutInflaterAndroid.inflate(R.layout.dialog_bowler, null);

        AlertDialog.Builder alertDialogBuilderUserInput = new AlertDialog.Builder(BowlerActivity.this);
        alertDialogBuilderUserInput.setView(view);

        leagueId.setText(savedLeagueId);
        final EditText inputBowlerName = view.findViewById(R.id.etBowlerNameInput);
        TextView dialogTitle = view.findViewById(R.id.dialog_title);
        dialogTitle.setText(!shouldUpdate ? getString(R.string.lbl_new_bowler_title) : getString(R.string.lbl_edit_bowler_title));

        if (shouldUpdate && bowler != null) {
            leagueId.setText(bowler.getLeagueId());
            inputBowlerName.setText(bowler.getName());

        }
        alertDialogBuilderUserInput
                .setCancelable(false)
                .setPositiveButton(shouldUpdate ? "update" : "save", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialogBox, int id) {

                    }
                })
                .setNegativeButton("cancel",
                        new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialogBox, int id) {
                                dialogBox.cancel();
                            }
                        });

        final AlertDialog alertDialog = alertDialogBuilderUserInput.create();
        alertDialog.show();

        alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                //Show Toast Message When No Text Is Entered
                if (TextUtils.isEmpty(inputBowlerName.getText().toString())) {
                    Toast.makeText(BowlerActivity.this, "Enter Bowler!", Toast.LENGTH_SHORT).show();
                    return;
                } else {
                    alertDialog.dismiss();
                }

                //Check If User Is Updating Bowler
                if (shouldUpdate && bowler != null) {

                    //Updating Bowler By Its Id
                    updateBowler(inputBowlerName.getText().toString(), position);

                } else {
                    //Creating New Bowler
                    createBowler(leagueId.getText().toString(), inputBowlerName.getText().toString());

                }
            }
        });
    }

    //Toggling List And Empty Bowler View
    private void toggleEmptyBowlers() {
        //You Can Check bowlerList.size() > 0

        if (db.getBowlersCount() > 0) {
            noBowlersView.setVisibility( View.GONE);
        } else {
            noBowlersView.setVisibility( View.VISIBLE);
        }
    }
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate( R.menu.menu_main, menu );
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected( item );
    }
}

I have also include the DatabaseHelper portion that contains the Bowler methods.
public long insertBowler(String leagueId, String bowlerName) {
        //Get Writable Database That We Want To Write Data Too
        SQLiteDatabase db = this.getWritableDatabase();

        ContentValues values = new ContentValues();
        //`id` and `timestamp` Will Be Inserted Automatically
        values.put(Bowler.COLUMN_LEAGUE_ID, leagueId);
        values.put(Bowler.COLUMN_NAME, bowlerName);

         //Insert Row
        long id = db.insert( Bowler.TABLE_NAME, null, values );

        //Close Database Connection
        db.close();

        //Return Newly Inserted Row Id
        return id;
    }

    public Bowler getBowler(String leagueId) {
        //Get Readable Database If We Are Not Inserting Anything
        SQLiteDatabase db = this.getReadableDatabase();

        Cursor cursor = db.query(Bowler.TABLE_NAME,
                new String[]{Bowler.COLUMN_ID, Bowler.COLUMN_LEAGUE_ID, Bowler.COLUMN_NAME, Bowler.COLUMN_TIMESTAMP},
                Bowler.COLUMN_LEAGUE_ID + "=?",
                new String[]{String.valueOf(leagueId)}, null, null, null, null);

        if (cursor.moveToFirst()) {

            //Prepare Bowler Object
        Bowler bowler = new Bowler(
                cursor.getInt(cursor.getColumnIndex(Bowler.COLUMN_ID)),
                cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_LEAGUE_ID)),
                cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_NAME)),
                cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_TIMESTAMP)));

        //Close Database Connection
        cursor.close();
        return bowler;
    } else {return null;}
}
    public List<Bowler> getAllBowlers(String leagueId) {
        List<Bowler> bowlers = new ArrayList<>();

        //Select All Query
        String selectQuery = "SELECT  * FROM " + Bowler.TABLE_NAME + " WHERE " + Bowler.COLUMN_LEAGUE_ID + " = '" + leagueId + "'" + " ORDER BY " +
                Bowler.COLUMN_TIMESTAMP + " DESC";

        SQLiteDatabase db = this.getWritableDatabase();
        Cursor cursor = db.rawQuery(selectQuery, null);

        //Looping Through All Rows And Adding To The List
        if (cursor.moveToFirst()) {
            do {
                Bowler bowler = new Bowler();
                bowler.setId(cursor.getInt(cursor.getColumnIndex(Bowler.COLUMN_ID)));
                bowler.setLeagueId(cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_LEAGUE_ID)));
                bowler.setName(cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_NAME)));
                bowler.setTimestamp(cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_TIMESTAMP)));
                bowlers.add(bowler);
            } while (cursor.moveToNext());
        }
        cursor.close();
        //Close Database Connection
        db.close();

        //Return Bowlers List
        return bowlers;
    }

    public int getBowlersCount() {
        String countQuery = "SELECT  * FROM " + Bowler.TABLE_NAME;
        SQLiteDatabase db = this.getReadableDatabase();
        Cursor cursor = db.rawQuery(countQuery, null);

        int count = cursor.getCount();
        cursor.close();

        //Return The Count
        return count;
    }

    public int updateBowler(Bowler bowler) {
        SQLiteDatabase db = this.getWritableDatabase();

        ContentValues values = new ContentValues();
        values.put(Bowler.COLUMN_LEAGUE_ID, bowler.getLeagueId());
        values.put(Bowler.COLUMN_NAME, bowler.getName());

        //Updating Row
        return db.update(Bowler.TABLE_NAME, values, Bowler.COLUMN_ID + " = ?",
                new String[]{String.valueOf(bowler.getId())});
    }

    public void deleteBowler(Bowler bowler) {
        SQLiteDatabase db = this.getWritableDatabase();
        db.delete( Bowler.TABLE_NAME, Bowler.COLUMN_ID + " = ?",
                new String[]{String.valueOf( bowler.getId())});
        db.close();
    }

And just in case its required I have posted the BowlerAdapter code as well.
public class BowlerAdapter extends RecyclerView.Adapter<BowlerAdapter.MyViewHolder> {

    private Context context;
    private List<Bowler> bowlersList;

    public class MyViewHolder extends RecyclerView.ViewHolder {
        public TextView bowlerLeagueId;
        public TextView name;
        public TextView timestamp;

        public MyViewHolder(View view) {
            super(view);
            bowlerLeagueId = view.findViewById( R.id.tvLeagueId);
            name = view.findViewById(R.id.tvBowlerName );
            timestamp = view.findViewById(R.id.timestamp);
        }
    }

    public BowlerAdapter(Context context, List<Bowler> bowlersList) {
        this.context = context;
        this.bowlersList = bowlersList;
    }

    @Override
    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View itemView = LayoutInflater.from(parent.getContext())
                .inflate(R.layout.listview_bowler, parent, false);

        return new MyViewHolder(itemView);
    }

    @Override
    public void onBindViewHolder(MyViewHolder holder, int position) {
        Bowler bowler = bowlersList.get(position);

        holder.bowlerLeagueId.setText(bowler.getLeagueId());
        holder.name.setText(bowler.getName());

        //Formatting And Displaying Timestamp
        holder.timestamp.setText(formatDate(bowler.getTimestamp()));
    }

    @Override
    public int getItemCount() {
        return bowlersList.size();
    }

    //Formatting TimeStamp to 'EEE MMM dd yyyy (HH:mm:ss)'
    //Input  : 2018-05-23 9:59:01
    //Output : Wed May 23 2018 (9:59:01)
    private String formatDate(String dateStr) {
        try {
            SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date date = fmt.parse(dateStr);
            SimpleDateFormat fmtOut = new SimpleDateFormat("EEE MMM dd yyyy (HH:mm:ss)");
            return fmtOut.format(date);
        } catch (ParseException e) { }

        return "";
    }

I am sure its is something very obvious, but I have been looking at the code for a few hours and I just don't see the issue.
Any assistance would be appreciated.
I have amended my code as you indicated, but when I add a new bowler now the screen comes back blank until I leave the BowlerActivity and come back into it, at this point the list has been updated.
//Inserting New Bowler In The Database And Refreshing The List
    private void createBowler(String leagueId,  String bowlerName) {
        //Inserting Bowler In The Database And Getting Newly Inserted Bowler Id
        long id = db.insertBowler(leagueId, bowlerName);

        //Get The Newly Inserted Bowler From The Database
        Bowler n = db.getBowler(leagueId);

        if (n != null) {
            //Adding New Bowler To The Array List At Position 0
            bowlersList.add(0, n);

            //Refreshing The List
            mAdapter.notifyDataSetChanged(bowlersList);

            toggleEmptyBowlers();
        }
    }

BowlerAdapter notifyDataSetChanged method
private List<Bowler> bowlersList;

    public void notifyDataSetChanged(List<Bowler> newbowlersList) {
        bowlersList.clear();
        bowlersList.addAll( newbowlersList );
        super.notifyDataSetChanged();
    }

Debugging Logs
this = {BowlerActivity@5027}
leagueId = "1"
bowlerName = "Robert"
id = 6
n = {Bowler@5032}
 id = 1
 league_id = "1"
 name = "b1"
 timestamp = "2018-06-07 20:03:19"
 shadow$_klass_ = {Class@4839} "class ca.rvogl.tpbcui.database.models.Bowler"
 shadow$_monitor_ = -2106571381
mAdapter = {BowlerAdapter@5033}
 bowlersList = {ArrayList@5037}  size = 0
 mHasStableIds = false
 mObservable = {RecyclerView$AdapterDataObservable@5088}
 shadow$_klass_ = {Class@4930} "class ca.rvogl.tpbcui.views.BowlerAdapter"
 shadow$_monitor_ = -2088753560

log.d log file snippet
06-08 13:00:53.807 29879-29879/ca.rvogl.tpbcui D/INSERTBOWLER: Number of bowlers in db = 4
06-08 13:00:53.814 29879-29884/ca.rvogl.tpbcui I/art: Do partial code cache collection, code=30KB, data=29KB
06-08 13:00:53.815 29879-29884/ca.rvogl.tpbcui I/art: After code cache collection, code=30KB, data=29KB
    Increasing code cache capacity to 128KB
06-08 13:00:53.815 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:00:53.831 29879-29879/ca.rvogl.tpbcui W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
06-08 13:01:00.552 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:01:02.336 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:01:04.023 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:01:04.040 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:01:04.050 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:01:04.059 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:01:04.534 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:01:04.542 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:01:05.034 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:01:11.363 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:01:11.373 29879-29879/ca.rvogl.tpbcui D/INSERTBOWLER: Number of bowlers in db = 5
06-08 13:01:11.380 29879-29895/ca.rvogl.tpbcui D/EGL_emulation: eglMakeCurrent: 0x9e6fa300: ver 3 0 (tinfo 0xa068a610)
06-08 13:01:11.393 29879-29879/ca.rvogl.tpbcui W/IInputConnectionWrapper: finishComposingText on inactive InputConnection

A: I believe that your issue is that you are not updating the actual source List within the adapter.

*

*Reading Is Java "pass-by-reference" or "pass-by-value"?
 may explain.

A resolution could be to be add a method to the BowlerAdapter e.g :-
public void notifyDatasetChanged(List<Bowler> newbowlerlist) {
    bowlersList.clear();
    bowlersList.addAll(newbowlerlist);
    super.notifyDataSetChanged();
}

And to then use this new method, passing the amended bowlerlist, rather than the stock notifyDatasetChanged method.
e.g. instead of :-
    if (n != null) {
        //Adding New Bowler To The Array List At Position 0
        bowlersList.add(0, n);

        //Refreshing The List
        mAdapter.notifyDataSetChanged();

        toggleEmptyBowlers();
    }

use :-
    if (n != null) {
        //Adding New Bowler To The Array List At Position 0
        bowlersList.add(0, n);

        //Refreshing The List
        mAdapter.notifyDataSetChanged(bowlerList);

        toggleEmptyBowlers();
    }

Based upon you code using the above, the following results are obtained:-
Initial Display

*

*2 Bowlers initially added when App starts.

*Added button rather than code all the dialog handling (so clicking the button will add a new bowler, if the EditText isn't blank).

After Adding new Bowler
A new bowler was added by :-

*

*Entering Howard in the EditText.

*Clicking the Add Bowler button.

*the List is refreshed displaying the added Bowler.

:-

Addition re comment :-

OK, insert is happening OK (you can remove the changes). Now make the
  following changes to the getAllBowlers method (1 write the
  selectQuery sql to the log, 2 write the number of rows retrieved to
  the log and 3 write the size of the bowlers ArrayList to the
  log). Run and report or fix.

public List<Bowler> getAllBowlers(String leagueId) {
    List<Bowler> bowlers = new ArrayList<>();

    //Select All Query
    String selectQuery = "SELECT  * FROM " + Bowler.TABLE_NAME + " WHERE " + Bowler.COLUMN_LEAGUE_ID + " = '" + leagueId + "'" + " ORDER BY " +
            Bowler.COLUMN_TIMESTAMP + " DESC";

    Log.d("GETALLBOWLERS-SQL","SQL used = >>>>" +selectQuery + "<<<<");

    SQLiteDatabase db = this.getWritableDatabase();
    Cursor cursor = db.rawQuery(selectQuery, null);

    Log.d("GETALLBOWLERS-CNT","Number of rows retrieved = " + String.valueOf(cursor.getCount()));

    //Looping Through All Rows And Adding To The List
    if (cursor.moveToFirst()) {
        do {
            Bowler bowler = new Bowler();
            bowler.setId(cursor.getInt(cursor.getColumnIndex(Bowler.COLUMN_ID)));
            bowler.setLeagueId(cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_LEAGUE_ID)));
            bowler.setName(cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_NAME)));
            bowler.setTimestamp(cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_TIMESTAMP)));
            bowlers.add(bowler);
        } while (cursor.moveToNext());
    }
    cursor.close();
    //Close Database Connection
    db.close();
    Log.d("GETALLBOWLERS-CNT","Number of elements in bowlerslist = " + String.valueOf(bowlers.size()));

    //Return Bowlers List
    return bowlers;
}

Working Example
I can't actually pinpoint your issue, although I do believe it's related to the original answer in that the Adapter works on/with a copy of of the bowler list, which is different to the bowler list passed to it. As such changing the bowlerlist in the activity does not change the bowlerlist in the adapter. As such issuing a onNotifyDatasetChanged after changing the bowlerlist is saying to the adapter that you've change the list in the adapter (i.e  it's copy, which hasn't been changed).
As such the copy on the bowler list has to be changed and then the onNotifyDatasetChanged should be issued. My guess is that you didn't correctly implement the above.
As such I have virtually re-created your code and have a version that works :-

*

*Instead of using an action bar a button is used to add a bowler.

*Instead of this being invoked by anther activity and getting the LeagueID from the Intent Extra, the LeagueID is hard coded.

*the ClickListener interface is included within the activity for my convenience.

The activity (I've called it BowlerActivity)
public class BowlerActivity extends AppCompatActivity {

    private BowlerAdapter mAdapter;
    private List<Bowler> bowlersList = new ArrayList<>();
    private RecyclerView recyclerView;
    private DatabaseHelper db;
    private Button addbowler;
    private EditText newbowler;
    private TextView leagueId, noBowlersView;
    private String savedLeagueId;
    Context mContext;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mContext = this;
        addbowler = this.findViewById(R.id.addbowler); // For testing
        leagueId = this.findViewById(R.id.tvLeagueId);
        noBowlersView = this.findViewById(R.id.noBowlersView);
        recyclerView = this.findViewById(R.id.recycler_view);
        db = new DatabaseHelper(this);

        savedLeagueId = "0"; //<<<< HARD CODED rather than get from IntentExtra
        leagueId.setText(savedLeagueId);
        bowlersList = db.getAllBowlers(leagueId.getText().toString());
        RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(this);
        mAdapter = new BowlerAdapter(this,bowlersList);
        recyclerView.setLayoutManager(mLayoutManager);
        recyclerView.setItemAnimator(new DefaultItemAnimator());
        //recyclerView.addItemDecoration(new MyDividerItemDecoration(this, LinearLayoutManager.VERTICAL, 16));
        recyclerView.setAdapter(mAdapter);

        addbowler.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                showBowlerDialog(false, null, -1);
            }
        });

        recyclerView.addOnItemTouchListener(new RecyclerTouchListener(this, recyclerView, new ClickListener() {
            @Override
            public void onClick(View view, int position) {
                Toast.makeText(mContext,"You clicked me", Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onLongClick(View view, int position) {
                Toast.makeText(mContext,"You long clicked me", Toast.LENGTH_SHORT).show();
                showActionsDialog(position);

            }
        }));
    }

    //Opens Dialog With Edit/Delete Options
    //Edit - 0
    //Delete - 0
    private void showActionsDialog(final int position) {
        CharSequence colors[] = new CharSequence[]{"Edit", "Delete"};

        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle("Choose option");
        builder.setItems(colors, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                if (which == 0) {
                    showBowlerDialog(true, bowlersList.get(position), position);
                } else {
                    deleteBowler(position);
                }
            }
        });
        builder.show();
    }

    //Toggling List And Empty Bowler View
    private void toggleEmptyBowlers() {
        //You Can Check bowlerList.size() > 0

        if (db.getBowlersCount() > 0) {
            noBowlersView.setVisibility( View.GONE);
        } else {
            noBowlersView.setVisibility( View.VISIBLE);
        }
    }

    //Inserting New Bowler In The Database And Refreshing The List
    private void createBowler(String leagueId,  String bowlerName) {
        //Inserting Bowler In The Database And Getting Newly Inserted Bowler Id
        long id = db.insertBowler(leagueId, bowlerName);

        //Get The Newly Inserted Bowler From The Database
       bowlersList = db.getAllBowlers(leagueId);
       mAdapter.notifyDatasetChanged(bowlersList);
       //mAdapter.notifyDataSetChanged();
    }

    //Updating Bowler In The Database And Updating The Item In The List By Its Position
    private void updateBowler(String bowlerName, int position) {
        Bowler n = bowlersList.get(position);

        //Updating Bowler Text
        n.setLeagueId(savedLeagueId);
        n.setName(bowlerName);

        //Updating The Bowler In The Database
        db.updateBowler(n);

        //Refreshing The List
        bowlersList.set(position, n); //<<<<< does not change the bowlerlist in the adapter
        //mAdapter.notifyItemChanged(position); // Saying that nothing has changed
        mAdapter.notifyDatasetChanged(db.getAllBowlers(savedLeagueId)); //<<<<< rebuilds adapter bowler list
        toggleEmptyBowlers();
    }

    //Deleting Bowler From SQLite Database And Removing The Bowler Item From The List By Its Position
    private void deleteBowler(int position) {
        //Deleting The Bowler From The Database
        db.deleteBowler(bowlersList.get(position));

        //Removing The Bowler From The List
        bowlersList.remove(position);
        //mAdapter.notifyItemRemoved(position); // Saying that nothing has changed
        mAdapter.notifyDatasetChanged(db.getAllBowlers(savedLeagueId));
        toggleEmptyBowlers();
    }

    public interface ClickListener{
        void onClick(View view,int position);
        void onLongClick(View view,int position);
    }

    //Show Alert Dialog With EditText Options to Enter/Edit A League
    //When shouldUpdate = true, It Will Automatically Display Old Bowler Name And Change The Button Text To UPDATE
    private void showBowlerDialog(final boolean shouldUpdate, final Bowler bowler, final int position) {
        LayoutInflater layoutInflaterAndroid = LayoutInflater.from(getApplicationContext());
        View view = layoutInflaterAndroid.inflate(R.layout.dialog_bowler, null);

        AlertDialog.Builder alertDialogBuilderUserInput = new AlertDialog.Builder(BowlerActivity.this);
        alertDialogBuilderUserInput.setView(view);

        leagueId.setText(savedLeagueId);
        final EditText inputBowlerName = view.findViewById(R.id.etBowlerNameInput);
        TextView dialogTitle = view.findViewById(R.id.dialog_title);
        dialogTitle.setText(!shouldUpdate ? getString(R.string.lbl_new_bowler_title) : getString(R.string.lbl_edit_bowler_title));

        if (shouldUpdate && bowler != null) {
            leagueId.setText(bowler.getLeagueId());
            inputBowlerName.setText(bowler.getName());

        }
        alertDialogBuilderUserInput
                .setCancelable(false)
                .setPositiveButton(shouldUpdate ? "update" : "save", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialogBox, int id) {

                    }
                })
                .setNegativeButton("cancel",
                        new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialogBox, int id) {
                                dialogBox.cancel();
                            }
                        });

        final AlertDialog alertDialog = alertDialogBuilderUserInput.create();
        alertDialog.show();

        alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                //Show Toast Message When No Text Is Entered
                if (TextUtils.isEmpty(inputBowlerName.getText().toString())) {
                    Toast.makeText(BowlerActivity.this, "Enter Bowler!", Toast.LENGTH_SHORT).show();
                    return;
                } else {
                    alertDialog.dismiss();
                }

                //Check If User Is Updating Bowler
                if (shouldUpdate && bowler != null) {

                    //Updating Bowler By Its Id
                    updateBowler(inputBowlerName.getText().toString(), position);

                } else {
                    //Creating New Bowler
                    createBowler(leagueId.getText().toString(), inputBowlerName.getText().toString());
                }
            }
        });
    }
}

*

*really the only change is using the onNotifyDatasetChanged(List<Bowler>) method rather than the stock onNotifyDatabsetChanged()
BowlerAdapter
public class BowlerAdapter extends RecyclerView.Adapter<BowlerAdapter.MyViewHolder> {

    private Context context;
    private List<Bowler> bowlersList;

    public class MyViewHolder extends RecyclerView.ViewHolder {
        public TextView bowlerLeagueId;
        public TextView name;
        public TextView timestamp;

        public MyViewHolder(View view) {
            super(view);
            bowlerLeagueId = view.findViewById(R.id.tvLeagueId);
            name = view.findViewById(R.id.tvBowlerName);
            timestamp = view.findViewById(R.id.timestamp);
        }
    }

    public BowlerAdapter(Context context, List<Bowler> bowlersList) {
        this.context = context;
        this.bowlersList = bowlersList;
    }

    @Override
    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        int fakeid = android.R.layout.simple_list_item_1;
        int realid = R.layout.listview_boweler;

        View itemView = LayoutInflater.from(parent.getContext())
                .inflate(realid, parent, false);

        return new MyViewHolder(itemView);
    }

    @Override
    public void onBindViewHolder(MyViewHolder holder, int position) {
        Bowler bowler = bowlersList.get(position);

        holder.bowlerLeagueId.setText(bowler.getLeagueId());
        holder.name.setText(bowler.getName());

        //Formatting And Displaying Timestamp
        holder.timestamp.setText(formatDate(bowler.getTimestamp()));
    }

    @Override
    public int getItemCount() {
        return bowlersList.size();
    }

    //<<<<<<<<<< Added >>>>>>>>>>
    // This will get the actual bowler from the list
    public Bowler getItemAtPosition(int position) {
        return bowlersList.get(position);
    }

    //Formatting TimeStamp to 'EEE MMM dd yyyy (HH:mm:ss)'
    //Input  : 2018-05-23 9:59:01
    //Output : Wed May 23 2018 (9:59:01)
    private String formatDate(String dateStr) {
        try {
            SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date date = fmt.parse(dateStr);
            SimpleDateFormat fmtOut = new SimpleDateFormat("EEE MMM dd yyyy (HH:mm:ss)");
            return fmtOut.format(date);
        } catch (ParseException e) {
        }
        return "";
    }

    public void notifyDatasetChanged(List<Bowler> newbowlerlist) {
        bowlersList.clear();
        bowlersList.addAll(newbowlerlist);
        super.notifyDataSetChanged();
    }
}

*

*Note the notifyDatasetChanged(List<Bowler) method, this takes the changed bowler list and rebuilds the adapter's copy that it works with and then calls the adapter's notfiydatasetChanged method.

*Added but not used is the getItemAtPosition method that can be used to return the bowler from the adapter at the given position (this could be used to circumvent altering the activity's copy of the bowlerlist).
DatabaseHelper
This just includes some changes that log's some information but is otherwise unchanged (although some missing code was added).
public class DatabaseHelper extends SQLiteOpenHelper {

    public static final String DBNAME = "leagueapp.db";
    public static final int DBVERSION = 1;

    SQLiteDatabase mDB;

    public DatabaseHelper(Context context) {
        super(context, DBNAME, null, DBVERSION);
        mDB = this.getWritableDatabase();
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(Bowler.CRTSQL);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }

    public long insertBowler(String leagueId, String bowlerName) {
        //Get Writable Database That We Want To Write Data Too
        SQLiteDatabase db = this.getWritableDatabase();

        Log.d("INSERTBOWLER","Number of bowlers in db = " + String.valueOf(DatabaseUtils.queryNumEntries(db,Bowler.TABLE_NAME)));

        ContentValues values = new ContentValues();
        //`id` and `timestamp` Will Be Inserted Automatically
        values.put(Bowler.COLUMN_LEAGUE_ID, leagueId);
        values.put(Bowler.COLUMN_NAME, bowlerName);

        //Insert Row
        long id = db.insertOrThrow( Bowler.TABLE_NAME, null, values );

        //Close Database Connection
        db.close();

        //Return Newly Inserted Row Id
        return id;
    }

    public Bowler getBowler(String leagueId) {
        //Get Readable Database If We Are Not Inserting Anything
        SQLiteDatabase db = this.getReadableDatabase();

        Cursor cursor = db.query(Bowler.TABLE_NAME,
                new String[]{Bowler.COLUMN_ID, Bowler.COLUMN_LEAGUE_ID, Bowler.COLUMN_NAME, Bowler.COLUMN_TIMESTAMP},
                Bowler.COLUMN_LEAGUE_ID + "=?",
                new String[]{String.valueOf(leagueId)}, null, null, null, null);

        if (cursor.moveToFirst()) {

            //Prepare Bowler Object
            Bowler bowler = new Bowler(
                    cursor.getLong(cursor.getColumnIndex(Bowler.COLUMN_ID)),
                    cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_LEAGUE_ID)),
                    cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_NAME)),
                    cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_TIMESTAMP)));

            //Close Database Connection
            cursor.close();
            return bowler;
        } else {return null;}
    }
    public List<Bowler> getAllBowlers(String leagueId) {
        List<Bowler> bowlers = new ArrayList<>();

        //Select All Query
        String selectQuery = "SELECT  * FROM " + Bowler.TABLE_NAME + " WHERE " + Bowler.COLUMN_LEAGUE_ID + " = '" + leagueId + "'" + " ORDER BY " +
                Bowler.COLUMN_TIMESTAMP + " DESC";

        Log.d("GETALLBOWLERS-SQL","SQL used = >>>>" +selectQuery + "<<<<");

        SQLiteDatabase db = this.getWritableDatabase();
        Cursor cursor = db.rawQuery(selectQuery, null);

        Log.d("GETALLBOWLERS-CNT","Number of rows retrieved = " + String.valueOf(cursor.getCount()));

        //Looping Through All Rows And Adding To The List
        if (cursor.moveToFirst()) {
            do {
                Bowler bowler = new Bowler();
                bowler.setId(cursor.getInt(cursor.getColumnIndex(Bowler.COLUMN_ID)));
                bowler.setLeagueId(cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_LEAGUE_ID)));
                bowler.setName(cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_NAME)));
                bowler.setTimestamp(cursor.getString(cursor.getColumnIndex(Bowler.COLUMN_TIMESTAMP)));
                bowlers.add(bowler);
            } while (cursor.moveToNext());
        }
        cursor.close();
        //Close Database Connection
        db.close();
        Log.d("GETALLBOWLERS-CNT","Number of elements in bowlerslist = " + String.valueOf(bowlers.size()));

        //Return Bowlers List
        return bowlers;
    }

    public int getBowlersCount() {
        String countQuery = "SELECT  * FROM " + Bowler.TABLE_NAME;
        SQLiteDatabase db = this.getReadableDatabase();
        Cursor cursor = db.rawQuery(countQuery, null);

        int count = cursor.getCount();
        cursor.close();

        //Return The Count
        return count;
    }

    public int updateBowler(Bowler bowler) {
        SQLiteDatabase db = this.getWritableDatabase();

        ContentValues values = new ContentValues();
        values.put(Bowler.COLUMN_LEAGUE_ID, bowler.getLeagueId());
        values.put(Bowler.COLUMN_NAME, bowler.getName());

        //Updating Row
        return db.update(Bowler.TABLE_NAME, values, Bowler.COLUMN_ID + " = ?",
                new String[]{String.valueOf(bowler.getId())});
    }

    public void deleteBowler(Bowler bowler) {
        SQLiteDatabase db = this.getWritableDatabase();
        db.delete( Bowler.TABLE_NAME, Bowler.COLUMN_ID + " = ?",
                new String[]{String.valueOf( bowler.getId())});
        db.close();
    }

    public int deleteBowlerChecked(Bowler bowler) {
        SQLiteDatabase db = this.getWritableDatabase();
        Log.d("DELETEBOWLER","Attempting to DELETE bowler " + bowler.getName());
        int rv = db.delete(Bowler.TABLE_NAME,Bowler.COLUMN_ID + "=?",
                new String[]{String.valueOf(bowler.getId())});
        if (rv < 1) {
            Log.d("DELETEBOWLER", "Bowler with an id of " + String.valueOf(bowler.getId()) + " was not deleted, as it didn't exist.");
        }
        return rv;
    }
}

RecyclerTouchListener
This wad added, it may or may not be the same as yours.
public class RecyclerTouchListener implements RecyclerView.OnItemTouchListener{

    private BowlerActivity.ClickListener clicklistener;
    private GestureDetector gestureDetector;

    public RecyclerTouchListener(Context context, final RecyclerView recycleView, final BowlerActivity.ClickListener clicklistener){

        this.clicklistener=clicklistener;
        gestureDetector=new GestureDetector(context,new GestureDetector.SimpleOnGestureListener(){
            @Override
            public boolean onSingleTapUp(MotionEvent e) {
                return true;
            }

            @Override
            public void onLongPress(MotionEvent e) {
                View child=recycleView.findChildViewUnder(e.getX(),e.getY());
                if(child!=null && clicklistener!=null){
                    clicklistener.onLongClick(child,recycleView.getChildAdapterPosition(child));
                }
            }
        });
    }

    @Override
    public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
        View child=rv.findChildViewUnder(e.getX(),e.getY());
        if(child!=null && clicklistener!=null && gestureDetector.onTouchEvent(e)){
            clicklistener.onClick(child,rv.getChildAdapterPosition(child));
        }

        return false;
    }

    @Override
    public void onTouchEvent(RecyclerView rv, MotionEvent e) {

    }

    @Override
    public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {

    }

}

Results/Testing
Initial Screen (empty db) :-

Add Bowler Button clicked :-

Bowler B1 entered and Save clicked :-

More Bowlers added :-

Bowler B5 updated :-

Bowlers B1 and  B6 deleted :-


text:
Q: youtube class video limit not working I want to change the video limit on my home page (getpopularvideos), but when I change the limit, it always only shows 20 videos.
What am I doing wrong?
protected function getPopularVideos($limit = NULL){
    // Set Limit
    if(!is_null($limit)) $this->limit = $limit;
    // Construct URL
    $part = "snippet,contentDetails,statistics";
    $this->url = "https://www.googleapis.com/youtube/v3/videos?key={$this->key}&part=$part&chart=mostPopular&maxResults={$this->limit}";
    if(!is_null($this->page)) $this->url = $this->url."&pageToken={$this->page}";
    // Get Data
    $data = Main::cache_get("popular_{$this->page}");
    if($data == NULL){
        $data = $this->http(TRUE);
        Main::cache_set("popular_{$this->page}", $data); $limit = 24;
    }
    $i = 1;
    $html = "
";
    foreach ($data->items as $yt) {
        $html .= $this->listVideo($yt);

        if($i%24 == 0) {
            $html .= "
{$this->ads(728)}
";
        }

        $i ++;
    }
    $html .= "
";
    $this->pagination = "
";
        if(isset($data->prevPageToken)){
            $this->pagination .= "
config["url"]}/popular/{$data->prevPageToken}' class='btn btn-ghost'> Previous
";
        }
        if(isset($data->nextPageToken)){
            $this->pagination .= "
config["url"]}/popular/{$data->nextPageToken}' class='btn btn-ghost'> Next
";
        }
    $this->pagination .= "
";
    return $html;
}

protected function getUserVideos4Home($q, $limit = NULL){
    if(!is_null($limit)) $this->limit = $limit;

    $part = "snippet";

    $this->url = "https://www.googleapis.com/youtube/v3/search?key={$this->key}&part=$part&order=date&type=video&channelId={$q}&maxResults={$this->limit}";
    if(!is_null($this->page)) $this->url = $this->url."&pageToken={$this->page}";
            $data = $this->http(TRUE);
    $i = 1;
    $return = new stdClass();
    $return->title = $data->items[0]->snippet->channelTitle;

    $html .= "";
    $vids = array();

    foreach ($data->items as $yt){
        $vids[] = $yt->id->videoId;
    }
    $videos2 = implode(",", $vids);

    $part = "snippet,contentDetails,statistics";

    $this->url = "https://www.googleapis.com/youtube/v3/videos?key={$this->key}&part={$part}&id={$videos2}";

    $data2 = $this->http(TRUE);

    $durations = Main::durations($vids);

    foreach ($data->items as $yt) {
        $html .= $this->listSearchVideo12($yt,$durations[$yt->id->videoId]);

        if($i%6 == 0) {
            $html .= "

Google AdSense
336 x 280

";
        }

        $i ++;
    }
    $html .= "";

    return $html;
}