Add class to div if error return angular js

code is working fine, and get data through API(http.get), if there is a wrong entry, its return 401 error, how to add class "error" to div, <form name="form" ng-submit="vm.frmmn()"> <div class="form-group"

Hide Web Services to a Lay User in NodeJS

I have a PEAN (Postgre, Express, Angular, NodeJS) Stack Application. The web services are written using Node and Express Consumed in AngularJS service.js using factory methods. Now For eg,When I hit the URL deployed on Heroku account like xyz.herokua

AsyncTask error ANDROID

I am trying to implement an asynctask for a method but i met with an error. I dont know what is the problem or where did i done wrong. Below is my code class abc extends AsyncTask<String, String, String> { protected String doInBackground(String... m

Erlang - Student Question on Mathematics and Codes

Its a very tiny bit of math and more a question of the most efficient, most elegant way possible. If I give an integer such as 1.50 or 1.22 or 10.99 How can I get rid of the number to the left of the decimal and output the right side as an integer or

WebLogic Client Jar

I want to use Java with JMX to monitor WebLogic. I need to use wlclient.jar which is provided into WebLogic lib directory. Is there any maven repository which I can use to download the wlclient.jar? The only way that I found is to manually import the

How to verify the session in a central location

I have a webforms application. Almost all pages in my website are protected by login. Currently I am checking session exists or not in Page_Load event of all forms. Is there a way that I can do it in just one place which applies to all pages.Create a

External Left Output Problem

I have a SQL query with a few subqueries. The subqueries essentially pull data from other tables together in order to combine records to be accessed from a single source. It is setup that when accesses it pulls the most recent record added. However,

How to sort the dynamic list in c #

function void sortDynamicData(typeOfClass,SortKey) { List<dynamic> results = null; //results might be of any type it may contain students data or books data or professors data, hence I took as dynamic results = services.GetMyresults(typeOfClass); //

Is it useful to switch from AjaxControlToolkit to jQuery?

I keep hearing all these things about how awesome jQuery is and how the AjaxControlToolkit sucks. Unfortunately, I only heard about this after I built my entire WebForms site using the toolkit. Now I am considering switching, if not entirely, mostly

large c ++ static library file after link

I am building a library from my source code which contain both header (.hpp) and source (.cpp) files. I have a make file which compiles all the source files into respective object file individually and then a library creation (ar rcs ..) statements w

Opening a file on the click of a link on a jsp page

I have a link(say open file) on a JSP page. On clicking that link, I need to open a file. The location of the file is present in a table on the Database. Since "onclick" event is a Javascript event, I am clueless on how to obtain the file locati

C - Infinite loop when used for loop

Please tell me what wrong with my code : #include "stdio.h" struct rights_on_cmd{ char *gtm_cmd; /*set ,zrite ,kill...*/ char value; /*y or n*/ } ; struct usr_rights{ char *username;/*user name*/ struct rights_on_cmd rights[]; /*list gtm command

React.js - reactive-google-maps events return

I'm using the react-google-maps package in React but I'm struggling to get the onDrag event from the component. My code is as follows: import React, {Component} from 'react'; import GoogleAddressAutocomplete from './googleaddressautocomplete.js'; imp

F # can not take TimeoutException

My question is really simple. Please take a look at screenshot: How could that happen? I explicitly put call to Async.RunSyncronously into try ... with.try/with in F# async workflows do not map directly to CLR protected blocks - instead if exception

The minimum css required for the jQuery UI dialog box?

I'm going through the css and combining declarations. For example the header for the dialog is in ui-widget-header and ui-dialog-titlebar. The issue is when I have jquery UI tabs, for example, within a dialog. Even through they are both scoped to dif

Convert charAt () does not match the same string

This question already has an answer here: How do I compare strings in Java? 23 answers My problem is hidden in next code: public class saturo { public String primer, d; public void start() { primer = "545640"; //d = "0"; d = String.val

SQL - Delete the double in a field

I've updated the names for a number of courses in a school database with the prefix "2015/2016 - ", in order to mark them as belonging to the just finished school year. update course left join courseterm on course.courseID = CourseTerm.courseID

Demo Odoo9 source code installation data

How to get the demo data on source code in Odoo9 as the demo data of package installation is not there in source code installation. Upon selection of the load demo data checkbox it give a internal server error. The console fails on some demo file in

How to update ListView when data is retrieved from the Server

This is how my ListFragment looks public class TransactionListFragment extends ListFragment { private List<Transaction> mTransactions; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getActivity().setT

Name the tuples in a list

I have the following list a = [[a1, b1, c1, [d1, e1, f1], [a2, b2, c2, [d2, e2, f2], [a3, b3, c3, [d3, e3, f3]] How can I make this into a list of named tuples such that a[0].val1 >>> a1 a[1].val2 >>> b2 a[0].box >>> [d1, e1, f1

VBA Calculate the percentage

So i need some help. Im pretty new to VBA so im having some trouble. Well i have multiple sheets in my work book (excel). what im trying to do is, calculate the percentage of how many cells have the word "IMCOMPLETE" in column D and putting the