Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
@BacLuc
BacLuc / WarmUp.java
Last active May 16, 2017 11:15
count two following x with overlapping
class Main{
int countXX(String str) {
boolean lastOneIsX = false;
int countXX = 0;
for(int i=0;i<str.length(); i++){
if(str.charAt(i)=="x".charAt(0)){
if(lastOneIsX){
countXX++;
}
lastOneIsX = true;
@BacLuc
BacLuc / listtest_Language.java
Created May 12, 2017 13:32
test remove elements with various methods
package listtest;
/**
* Created by lucius on 12.05.17.
*/
public class Language {
private String name;
public Language(String name) {
this.name = name;
@BacLuc
BacLuc / CsvResponse.php
Last active March 20, 2017 14:41 — forked from mathewbyrne/CsvResponse.php
A small Symfony 2 class for returning a response as a CSV file. Based on the Symfony JsonResponse class.
<?php
namespace Jb\AdminBundle\Http;
use Symfony\Component\HttpFoundation\Response;
class CsvResponse extends Response
{
protected $data;
protected $originalData;
@BacLuc
BacLuc / redirect to https
Created February 22, 2017 20:32
redirect to https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
<?php
/**
* Created by PhpStorm.
* User: lucius
* Date: 19.10.16
* Time: 16:49
*/
namespace Concrete\Package\BasicTablePackage\Src\DiscriminatorEntry;