I have 2 variables that manipulate the same image
In the html:
<i class="fa fa-trash-o" aria-hidden="true" ng-click="vm.deleteMessage()" ng-show="!vm.instance.deleted" ng-show="!vm.flagDelete"></i>
but it never changes, what is my mistake?
I have 2 variables that manipulate the same image
In the html:
<i class="fa fa-trash-o" aria-hidden="true" ng-click="vm.deleteMessage()" ng-show="!vm.instance.deleted" ng-show="!vm.flagDelete"></i>
but it never changes, what is my mistake?
I have the following code
(function () {
'use strict';
angular
.module('socialChat')
.component('messageItem', {
controller: 'MessageItemController',
bindings: {
chatUser: '<',
instance: '<'
},
templateUrl: '/js/social-chat/components/message-item/message-item.html'
});
})();
I do not understand this part
bindings: {
chatUser: '<',
instance: '<'
},
what do those < operators mean, and I think there are =,&
I made the following code:
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.lang.Math; // headers MUST be above the first class
// one class needs to have a main() method
public class HelloWorld
{
// arguments are passed using the text field below this editor
public static void main(String[] args)
{
String ori = "kdya";
String pa = "[kd]";
Pattern pat = Pattern.compile(pa);
Matcher mat = pat.matcher(ori);
System.out.println(mat.matches());
}
}
I want to match the start of the original String (the first character) with any character in the pattern list.
It doesn't match, but it does exist. It's wrong?
I have to validate a word that can start with y
, g
or h
.
For example, it can be yugo...
, hugo...
or gugo...
.
var original = "gugoss",
regex = /[ygh]/,
coincid = original.match(regex);
console.log(coincid);
How can I make it match 1 of those letters at the start of the String, regardless of the rest of the characters it contains?
The event:
@Autowired
private ApplicationEventPublisher publisher;
send:
eventPublisher.publish(new CreateParticipantEvent(conversation, participant));
Do you send notifications to everyone? How does it work?
I was reviewing code, and I see everywhere the LOG class
is it to log in?
@Component
class ApplicationEventListener {
@SuppressWarnings("unused")
private static Logger LOG = LoggerFactory.getLogger(ApplicationEventListener.class);
and calls the same class.
i am using spring
How do I download(clone) and push changes to a branch in git?
I have been using git for a long time, to download the latest version I used
git -pull
and to upload my changes I did it with
git push
but it overwrites the changes that my friend made, so how do I make it work in sync?
for example reviewing this code
@Aspect
class CommandExecuteInterceptor implements ApplicationContextAware {
private ApplicationContext context;
what does @aspect mean, why use it, when to use it?
According to law, each method has its objective:
post to insert records,
get to get/display records,
put to modify records,
delete to remove records
I made the following code, which adds a new book to the database, so I should use the post method, but I did it with the get method, I want to convert it to a post method, how to do it?
@RequestMapping(value = "/add/{id}/{name}/{author}/{price}")
public Book addBook(@PathVariable int id, @PathVariable String name, @PathVariable String author,
@PathVariable long price) {
Book book = new Book();
book.setId(id);
book.setName(name);
book.setAuthor(author);
book.setPrice(price);
bookService.saveBook(book);
return book;
}
I don't know how to create a new project with spring initializr that contains @repository, @service, and @controller, for the controller dependency to exist it is necessary to check the following box, here is a screenshot:
but for the others, what should be marked?, or how do I add them manually
According to @luiggiMendoza's comment, the other 2 are from the core, but which framework?
what is the @services dependency
what is the dependency of @repositories
what is the @controllers dependency
i mean dependencies in pom.xml file
If I'm not mistaken @controllers has the dependency
starter.web
and what are the dependencies for repositories and services?