How to print variables in Perl

How did Perl complain? print $ids should work, though you probably want a newline at the end, either explicitly with print as above or implicitly by using say or -l/$\. If you want to interpolate a variable in a string and have something immediately after it that would looks like part of the variable but isn’t, enclose the variable name in {}:

At least one object must implement IComparable

Well, you’re trying to use SortedSet<>… which means you care about the ordering. But by the sounds of it your Player type doesn’t implement IComparable<Player>. So what sort order would you expect to see? Basically, you need to tell your Player code how to compare one player with another. Alternatively, you could implement IComparer<Player> somewhere … Read more

Categories c# Tags

Angular 2 Sort table columns

I assume you are loading the data (selectedData) for this template asynchronously in the component’s class, so at the start it’s not yet returned form the service, hence selectedData = undefined. There are several things you can do to mitigate that: 1. Initialize the data in the component Set the selectedData class property to an empty array so … Read more

Redis: How to access Redis log file

Found it with: So if the setup was more standard that should be: This outputs the last 100 lines of the file. Where your log file is located is in your configs that you can access with: The log file may not always be shown using the above. In that case use

java.lang.IllegalStateException: Failed to introspect Class

Caused by: java.lang.ClassNotFoundException: org.springframework.data.elasticsearch.core.ElasticsearchOperations This error message means that the jar containing this class is not on the application classpath. Add spring-data-elasticsearch jar to it, and your error should be gone. if you are using maven, add the jar to the classpath this way : The version that you should use depends on the version … Read more

PHP date yesterday [duplicate]

date() itself is only for formatting, but it accepts a second parameter. To keep it simple I just subtract 24 hours from the unix timestamp. A modern oop-approach is using DateTime Or in your case (more readable/obvious) (Because DateInterval is negative here, we must add() it here) See also: DateTime::sub() and DateInterval