Skip to content

Instantly share code, notes, and snippets.

View mahbub-shohag's full-sized avatar

Mahbub Alam Shohag mahbub-shohag

  • Jagannath university
  • Mohammadpur,Dhaka
View GitHub Profile
Add plugin in dependency plugin : compile "org.grails.plugins:rest-client-builder:2.1.1"
def sms(){
def rest = new RestBuilder()
MultiValueMap<String, String> form = new LinkedMultiValueMap<String, String>()
form.add("UserID", "****")
form.add("Passwor", "******")
form.add("stuID", "*******")
def resp = rest.post("http://localhost:8087/bankapi/student/CheckId") {
accept JSONObject, 'application/json'
contentType("application/x-www-form-urlencoded")
pom
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>
terminal :
mvn install:install-file -Dfile= [pathof downloaded jar ]ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
-- curl -s "https://get.sdkman.io" | bash
-- source "$HOME/.sdkman/bin/sdkman-init.sh"
-- sdk install grails 2.5.6
Go to directory where you want to create grail application
-- grails create-app
-- give a name of the application
-- grails run-app
-- connect to mysql database
Datasource :
tail -f /opt/tomcat/logs/catalina.out
extends SpringBootServletInitializer [in application]
Sublime Text :
1. Column Select : shif + mouse right [ubuntu]
2. select extra ctrl
3. deselect alt
Eclipse :
1. Column Select : alt + shift
in js : $(event.target).parent().addClass('selected_requisition');
in view : markAsSelected($event)
ng-class="{largeWidth: myVar == 'ok', smallWidth: myVar != 'ok'}"
$scope.markAsSelected = function(event){
console.log(event.target);
console.log($('tr.selected_requisition').parent());
$('tr.selected_requisition').parent().find('.selected_requisition').removeClass('selected_requisition');
if(event.target.type=='checkbox'){
$(event.target).parent().parent().addClass('selected_requisition');
$scope.purchaseOrderCheckChange = function(purorderobj){
if($scope.itemList.length>0)
{
var found = $scope.itemList.some(function(o){
return purorderobj.PUR_REQ_NO === o.PUR_REQ_NO;
})
if(!found){
$scope.itemList.push(purorderobj);
}else{
var index = $scope.itemList.indexOf(purorderobj);
https://www.digitalocean.com/community/tutorials/install-tomcat-9-ubuntu-1804
in module add : 'ngRoute','ngSanitize','ui.select'
js css : <link href="assets/uiselect/select.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.4.5/select2.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.8.5/css/selectize.default.css">
<script type="text/javascript" src="assets/js/vendor/angular-sanitize.min.js"></script>
<script type="text/javascript" src="assets/uiselect/select.js"></script>
#Use git log --diff-filter=D --summary to get all the commits which have deleted files and the files deleted;
#Use git checkout $commit~1 filename to restore the deleted file.
Where $commit is the value of the commit you've found at step 1, e.g. e4cf499627