This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def class App { | |
def estimateActuallity(subj: Subject) = for { | |
likel <- subj.getComponent[Likeability] | |
viral <- subj.getComponent[Viralability] | |
} yield likel.map(l => viral.flatMap(v => estimateLoyality(l, v)) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.dz.tele2.wsc.common; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.beans.BeansException; | |
import org.springframework.beans.factory.BeanCreationException; | |
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; | |
import org.springframework.beans.factory.support.BeanDefinitionRegistry; | |
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor; | |
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String... args) { | |
long someUnbelievableLongValue = 1_000_000_000L; | |
System.out.println( | |
"My Long value is 1000000000" + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.dz.tele2.wsc.service.impl; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.beans.factory.DisposableBean; | |
import org.springframework.beans.factory.InitializingBean; | |
import org.springframework.mail.javamail.JavaMailSender; | |
import javax.mail.internet.MimeMessage; | |
import java.util.concurrent.BlockingQueue; | |
import java.util.concurrent.LinkedBlockingQueue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JsDataInjectionInterceptor extends HandlerInterceptorAdapter { | |
@Override | |
public void postHandle( HttpServletRequest request, | |
HttpServletResponse response, | |
Object handler, | |
ModelAndView modelAndView ) throws Exception { | |
// | |
if (null == modelAndView) return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SubscriberServicesPage = extend.Page({ | |
delegatedEvents: { | |
"click [id^='js_#service_id_']": "manageService", | |
"click #js_save_services_changes": "saveChanges" | |
}, | |
initializeServicesList: function () { | |
var that = this; | |
$("[id^='" + this.jsServiceRowIdPrefix + "']").each(function () { | |
var $serviceRow = $(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by blvp on 09.06.15. | |
*/ | |
var extend = { | |
Page: function (prototypeProps) { | |
return function (staticOptions) { | |
return { | |
initialize: function () { | |
_.extend(this, prototypeProps); | |
_.extend(this, staticOptions); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.*; | |
import java.net.UnknownHostException; | |
import java.util.Optional; | |
import java.util.stream.Stream; | |
public class SomeApp { | |
public static void main(String[] args) throws UnknownHostException { | |
MongoClient client = new MongoClient(); | |
DB db = client.getDB("school"); |
NewerOlder