Comment by rechandler on Multiple threads can move the same file using...
@AndrewHenle Still 2 or more threads can rename my file without any exception.
View ArticleComment by rechandler on Spring OAuth2 not redirecting back to client on form...
Hi, also have the same issue. OP or @pborbas do you resolve it?
View ArticleComment by rechandler on Spring slice test with OAuth2
@TwiN It's not my only test so I get this: java.lang.IllegalStateException: Configuration error: found multiple declarations of @BootstrapWith for test class...
View ArticleComment by rechandler on How to make final variables declared in a try block...
@TimBiegeleisen I'm guessing it's code style, according to this: stackoverflow.com/questions/137868/…
View ArticleComment by rechandler on Why Hashtable not allowed null value?
I didn't downvote, but also think that's not right answer because HashMap allows null for values
View ArticleComment by rechandler on Best practice to access static object, 'public...
Check this blog: yegor256.com/2014/09/16/getters-and-setters-are-evil.html
View ArticleComment by rechandler on Sort, copy value from table to another table and...
I have to on my own create dates. In real scenario I'll have few days gaps, so I need something to read dates from left table and based on that data, create right table.
View ArticleComment by rechandler on Prometheus-operator completely broke down whole...
@rabello remotely, but DO cluster has orange icon instead of green and also metrics such as CPU, memory, etc., are not collected. So I do not think this is connection issues.
View ArticleComment by rechandler on How to parse kubernetes pattern log with Filebeat
@Adiii unfortunately not, the question you pasted was about how to parse JSON, I know how to parse JSON in Filebeat. I need to parse example I provide.
View ArticleComment by rechandler on Why does the main Spring Boot application always...
Not true anymore since PMD 7.0.0 :(
View ArticleComment by rechandler on OAuth2 with CAS 6.1.4: is a client secret needed for...
WOW. Thanks a lot, I was close to give up on that matter
View ArticleHow to change CommandTarget
I have class DesignerCanvas where I have RoutedCommand.public class DesignerCanvas{ public static RoutedCommand SelectAll = new RoutedCommand(); public DesignerCanvas() { this.CommandBindings.Add(new...
View ArticleCreate refreshable scope variable in HTML
I'm trying create variable in HTML but ngInit don't refresh it.Here's code:<div class="table-days" data-ng-repeat="day in currentWeek"><div class="table-responsive day-table-margin...
View ArticleException when connecting to device
I have a problem with connection to my Bluetooth device (HC-05). When call BluetoothClient.Connect(), sometimes exception occures - "An invalid argument was supplied.", or another. But sometimes device...
View ArticleBuild odd and even hanoi tower
I've got problem with hanoi tower. I know how to build normal hanoi tower, it's simple:void solveTowers(char src, char dst, char mid, int n){ if (n == 0) { return; } solveTowers(src, mid, dst, n - 1);...
View ArticleGenerate video thumbnails on client side
I have videojs and videojs-markers plugin and when the marker is shown up I also want to display thumbnail this particular video moment. But I have no idea how can I generate this thumbnails.I found...
View ArticleGet element background color in EA
How can I get color of element (eg. boundary) by using official API?I assume that it's save in database in t_objects -> backcolor, but I cannot find property/method in Element to get it.
View ArticleFull size of videojs
I have div on specific width (100%) and I'd like to inside this place videojs. But when I use height="auto" and width="auto" it doesn't work. I try also:.vjs-tech { position: relative !important;}But...
View ArticleElasticSearch nested object query
I'm using Elasticsearch provided by JHipster. I have made relation between entities, but I can't search by field in relation.Eg. My model looks like this:[ {"id": 0,"text": "","content": "","time":...
View ArticleAnswer by rechandler for Passing var as T parameter
Follow the documentation Activator.CreateInstance return object, so you have to cast it to destination type or you can use dynamic type, but than compiler can't check types.
View ArticleHow to show setting flyout by using button instead of setting charms
By using Callisto I wrote a code that adds setting charms.Underneath I attach one:// Register handler for CommandsRequested events from the setting...
View ArticleCreate mock bean in Spring
First of all, I found solution for my problem, but I don't understand why it's working.I've got Spring Configuration with bean:@Configurationpublic class SomeContext { @Profile("default") @Bean(name =...
View ArticleAnswer by rechandler for How to bind the "publish version" property in visual...
First of all you have to reference in your project to System.Deployment.dll than you can try this code: public string PublishVersion { get { if...
View ArticleSame RewriteCond and multiple RewriteRule
I've got in my application some review rules here's example:RewriteCond %{HTTP_HOST} ^(.*)-street\.RewriteRule ^(.*)/(.*)\.html$ index.php?street=%1&$1=$2 [L]RewriteCond %{HTTP_HOST}...
View ArticleAnswer by rechandler for Multiple threads can move the same file using...
I finally resolved my problem just add synchronized to moveFileToPendingState method.
View ArticleAnswer by rechandler for I want to display a variable value where the...
You can use simple Map to do this:Map<String, Integer> map = new HashMap<>();map.put("priceOneRed", 100);... Integer price = map.get(concatedString);
View ArticleAnswer by rechandler for How to make final variables declared in a try block...
If you use at least Java 7 you can use try-with-resources Statement to close your resources. Here's the code:public StringBuffer readFile(final File inputFile) { String tempLine; // variable...
View ArticleAnswer by rechandler for Can't use lombok @NoArgsConstructor on a class
It's known issue from lombok version 1.16.20. https://github.com/rzwitserloot/lombok/issues/1563You can do this:@Getter@Builder@JsonDeserialize(builder = AccountItem.AccountItemBuilder.class)public...
View ArticleAnswer by rechandler for What is the purpose of having hashCode in Optional
From JavaDoc:Returns the hash code value of the present value, if any, or 0 (zero) if no value is present.So you can check if objects inside Optional is equals to each others. It also correspond well...
View ArticleAnswer by rechandler for Why Hashtable not allowed null value?
Hashtable is considered legacy code. You should use HashMap and it allow null for values and also one key can be null.EDITAfter deeper search I may have argument for such decision. Hashtable is...
View ArticleAnswer by rechandler for C# int.ParseInt() performance issue
If your Parse method throws an exception it can be cause of performance impact.From Exceptions and Performance MSDN:One common concern related to exceptions is that if exceptions are used for code that...
View ArticleAnswer by rechandler for Java Optimization - Local Variable vs Object Property
I would say it depends.In your example it doesn't change anything. Create local variable is as fast as use length property.But it's not very common to use fields from class, instead of this we all use...
View ArticleAnswer by rechandler for Java generalize approach to validate the null in the...
That wasn't be strict answer to the question but I want to improve your code.You call get twice. Instead of this:if(map.get("attribute1") !=null) { map.get("attribute1").add(price);} else {...
View ArticleSort, copy value from table to another table and calculate new value
I want to create spreadsheet to calculate my current bank balance. I want to write down all history of payment. Here's the exampleSo I need formula to create from table "buy - sell" tale "balance"Is it...
View ArticleUsing if expression in getter
Is it correct to just use a public property or should I rather make a private field _count? I have read some info on the topic, but I can't find an answer.public int Count{ get { if...
View ArticleAnswer by rechandler for Class is Private and members are Public what its scope?
If your private class implements some interface you can access to public methods via the interface. Here's piece of code:public interface ITest{ void Test(); }public class Program{ public static void...
View ArticleConfiguration of OpenId Connect token expiration in CAS
I'm looking for properties to set expiration time of OpenId Connect token. Default is 8 hours, but I want to change it. How can I do that?I'm using CAS 6.5.4
View Article
More Pages to Explore .....