Skip to content

Instantly share code, notes, and snippets.

View afsinka's full-sized avatar

Afşin Kapusuzoğlu afsinka

View GitHub Profile
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
@afsinka
afsinka / pom.xml
Last active February 26, 2016 10:29
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>0.0.27</version>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
@afsinka
afsinka / HelloWorld.java
Last active August 7, 2016 15:48
Apache CXF Server Example
package com.cxf.server;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService
public interface HelloWorld {
String sayHi(@WebParam(name = "text") String text);
}
@afsinka
afsinka / Main.java
Created August 7, 2016 15:50
Apache CXF Client Example
package com.cxf.client;
public class Main {
public static void main(String[] args) {
HelloWorldService service = new HelloWorldService();
String response = service.getHelloWorldPort().sayHi("client");
System.out.println("Service said: " + response);
@afsinka
afsinka / index.html
Created August 2, 2017 18:32
Filter in Select Option List With Textbox
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<title>Title</title>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
@afsinka
afsinka / index.html
Created August 2, 2017 18:46
Filter in Select Option List With Textbox (Old Browser)
<script type="text/javascript">
$(document).ready(function() {
$("#searchBoxForOldBrowsers").keyup(function() {
searchInListForOldBrowsers();
});
});
import { NgModule } from "@angular/core";
import { HttpModule, Http } from "@angular/http";
import { FormsModule, FormBuilder } from "@angular/forms";
import { BrowserModule } from "@angular/platform-browser";
import { App } from "./app";
import { ReCaptchaModule } from 'angular2-recaptcha';
import { TranslateModule, TranslateLoader } from "@ngx-translate/core";
import { TranslateHttpLoader } from "@ngx-translate/http-loader";
export function HttpLoaderFactory(httpClient: Http) {
package com;
public class Main {
public static void main(String[] args) {
MyString myString = new MyString("x");
String str = "x";
System.out.println("1: " + myString.getName() + " " + str);
foo(myString, str);
public class MyClass {
private MyDatabase myDatabase;
public String getCustomerName(long customerNo) {
System.out.println("getCustomerName() is called!");
return myDatabase.query(customerNo)+"_FROM_DATABASE";
}
public MyDatabase getMyDatabase() {
import io.swagger.api.ImagesApi;
import io.swagger.model.GetImagesResponse;
import io.swagger.model.Image;
import java.io.InputStream;
import java.util.Base64;
import org.apache.commons.io.IOUtils;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;