Retaining Custom Validation Message OnChanged

vb.net
Question: I am using a gridview with CustomValidator on my different input types. Each input has its own CustomValidator. The problem I am running into is when my CustomValidator fires and my message displays, it dissapears if I have another validation error in a different row. I need to be able to retain the errors for each CustomValidator error thrown. I am adding a custom css class for each error and that is retained properly (see the red outline around the inputs). The first image shows an error with the dropdownlist on the far right. It checks values in the other input types in the same row. This is correct. The second image shows an error in the unit field on a different row. The validation summary only shows the…
Read More

Android: ExoPlayer – Audio stream playing in one app stops when exoplayer instance is initialised in another app

Uncategorized
Question: There are two apps using Exoplayer. AppA and AppB AppA starts streaming audio. AppB is then launched which initialises the exoplayer instance. NOTE: No stream is yet played on AppB. But right away AppA stops playing the audio. Could someone help understand this behaviour with the new initialisation of the exoplayer? Thanks. Answer: Probably ExoPlayer gets garbage collected. You should use foreground service, to make sure a service stays alive as much as possible without being killed by the system. Read more
Read More

Can physical credit card reader identify first & last name?

payment-gateway
Question: I'm looking into how physical credit card readers work, like the ones in grocery store. Can they identify who is paying, e.g. first name & last name that is printed on a credit card? What kind of data do they get? Do physical card readers get credit card number or just some token? Answer: Sort answer, no. When you visit a store and pay by card, they will send the card information (card number and expiry date) along with how much to debit your account to a payment gateway - they will route the request to the relevant merchant bank. They are responsible for contacting your bank to debit the account. The bank, and only the bank, has identifiable information. You prove your identity to the seller by presenting…
Read More

I can not read characteristic from thermometer with Ionic

android
Question: I am reading the characteristics of a thermometer, everything is fine, I can read the manufacturer, model and device name, However, when I try to read the temperature characteristic this returns a value with a coding that I do not know. For example, for when the temperature that marks the thermometer is 25.1 what brings me back is this: Image characteristic temperature Could you help me solve this problem? This is my code for read characterictic:$scope.attend = function(){ alert("***** SENT VALUES *****: nMAC ADDRESS:"+ $stateParams.id+"nID_SERVICE: "+service_id+"nID_CHARACTERISTIC: "+characteristic_id); ble.read( $stateParams.id, service_id, characteristic_id, function(response){ //lert("Value Response: "+response); //////////////////////////////////////////////////////////////////////////////////////////////////// var dbufferArray = String.fromCharCode.apply(null,new Uint8Array(response)); alert("Response: "+dbufferArray); console.log("Response: "+dbufferArray); //////////////////////////////////////////////////////////////////////////////////////////////////// I based this example: Ionic bluetoothLE app Answer: Read more
Read More

use PHP preg_match on directory name – Unknown modifier

Uncategorized
Question: can anyone advise the correct way to use preg_match on directory names. Ive used glob - to get a small array of files and I am wanting to use preg_match on the resulting foreach INCLUDING the directory.. however I am getting this error - preg_match(): Unknown modifier 'h' in .... H of course is the 1st letter of my directory after the initial slash - / EDIT - Code ($path includes the full path name) $temp="$path/$name-$type-$numbern"; // $temp=preg_replace("///","/",$temp); $files=glob("$path/$name*"); foreach($files as $ab => $ac) { $outlist.="'$ab' '$ac'n"; $outlist.="TEMP '$temp'n"; if(preg_match("/$temp/i",$ac)) { $outlist.="GOT '$ac'n"; } } Answer: so don't use the / as the delimiter for your regex. Or escape the slashes in your input. if(preg_match("~$temp~i",$ac)){$outlist.="GOT '$ac'n";} assuming the ~ is never part of $temp or by escaping:$temp2 = preg_quote($temp,…
Read More

How are getchar() and putchar() Macros?

c#
Question: From what I understand about macros in C, they are predefined constants that will be used throughout the program with their constant value, so we go ahead and define them to avoid further complications and make the code more readable, so people reading it will understand what is supposed to stay constant and what isn't. I have read here and there (C programming A Modern Approach, K.N King) that we can define these two functions as macro. Since I'm somewhat new to C, I can't wrap my head around how can these two be defined as macro? Answer: There are two types of macros: simple substitution macros and function-like macros. Substitution macros replace one instance of a symbol with another. For example:#define LEN 10 char str[LEN]; After preprocessing, this…
Read More

How to use spring MVC to connect to other pages, with page hyperlink tags < href > or through the spring MVC framework

Uncategorized
Question: How to use spring MVC to connect to other pages, with page hyperlink tags < href > or through the spring MVC framework, which way do you use it when dealing with similar issues? it is such ,i am creating a WEB store with Spring mvc framework when i want from 'index.jsp' page connect to 'login.jsp'page,i did't know use tags or through the spring MVC framework,which is best? also i don't know the principle. when i dealing it with framework but because there's a lot of connections in the page, if you go through the frame, you'll have a lot of controllers i think that there must be a good way to deal with similar questions but i don't know Any help is greatly appreciated spring mvc 中连接到其他页面是怎么处理,用页面超链接标签还是经过spring mvc框架处理,在处理类似问题的时候你用的是哪一种方式呢?…
Read More

Charity – The Charity Plus HTML Template

Uncategorized
Charity – The Charity Plus Html Template have elegant and modern design style. Template is designed gracefully for non profit Organization. Template follow all Charity Organization guidelines to meet all requirement and provide the features. Template helps Organization to get Crowd Funding. Html Template will help you to build an awesome site Charity, get get Donation, Fundraising easily on website. Charity – Non profit Organization Html Template consist of 23 pages elegant but attractive designs. Because of free Icons and Fonts used in this template, Any Designer can make changes into template easily. Template is easy to convert into any type of website like : WordPress, Joomla, static html, Custom Framework. Html files are fully layered and simply customization, all elements are in group and can easily identify by the…
Read More

How to add and remove CSS class names in Angular 2?

Uncategorized
Question: I get the data in the JSON format and must and I must to handle which item the user clicked on. I'm write this code and it correctly work. My Example with DOM-usage:@Component({ selector: 'my-app', template: ` {{person.name}} `, styles: ['.active { color: red; }'] }) export class App { toggleIsActive: boolean = false; personsList: any; constructor() { this.personsList = [ { "id": "1", "name": "Alex" }, { "id": "2", "name": "John" } ] } toggleStatus(id){ const span = document.getElementById(`${id}`); if (span.className.indexOf('active') >= 0) { span.classList.remove('active'); } else { span.classList.add('active'); } } } How I can add and remove CSS class names without DOM for a similar case? Answer: I'm just add "personIsActive" field, and use Class binding. @Component({ selector: 'my-app', template: ` {{person.name}} `, styles: ['.active { color:…
Read More