This file contains 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
/** | |
* AlsoIf.alsoIf(xxx,xxx,xx).alsoIf().get() | |
* 进行长条件判断.如果条件成立,则执行相应的操作.主要用于LambadaQuery上 | |
* java lambda for predicate and do things | |
*/ | |
@Slf4j | |
public class BizAlsoIf<R> { | |
R obj; |
This file contains 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
@Slf4j | |
public class BizLambdaUtil { | |
public static<R> R alsoIf(R obj,boolean isIf,Consumer<R> consumer){ | |
try { | |
if(isIf){ | |
consumer.accept(obj); | |
} | |
return obj; |
This file contains 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
#!/bin/bash | |
# Set the path to the Google Chrome binary | |
set +x | |
export url=$1 | |
export desktop_folder="${HOME}/.local/share/application/" | |
origin_title=$(echo "$1"|awk -F "." '{print $2}') | |
title=$(curl -s $url| grep -o '<title>.*</title>' | sed -e 's/<title>//g' -e 's/<\/title>//g') | |
if [[ $title == "" ]];then | |
title=${origin_title} |
This file contains 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
#!/bin/bash | |
# Set the path to the Google Chrome binary | |
set +x | |
export url=$1 | |
export desktop_folder="${HOME}/.local/share/application/" | |
origin_title=$(echo "$1"|awk -F "." '{print $2}') | |
title=$(curl -s $url| grep -o '<title>.*</title>' | sed -e 's/<title>//g' -e 's/<\/title>//g') | |
if [[ $title == "" ]];then | |
title=${origin_title} |
OlderNewer