matches[pos].Groups[1].ToString();
Add-Type -IgnoreWarnings -TypeDefinition @'
using System;
using System.Text;
using System.Text.RegularExpressions;
public class Test {
public string findMatches(string text, int pos) {
MatchCollection matches = Regex.Matches(text,@"([a-z]+)", RegexOptions.Singleline | RegexOptions.IgnoreCase);
Console.Error.WriteLine(matches.Count);
Console.Error.WriteLine(matches[pos].Groups.Count);
return matches[pos].Groups[1].ToString();
}
}
'@
$o = new-object -TypeName 'Test'
write-output ('=> "{0}"' -f $o.findMatches("a b c d", 3))
perl-5.28.0
- установился при помощи cpanm. C другими версияме непробовал , со старым perl-5.8.9
действительно не собрался (компилировать я не стал).sudo /home/vagrant/perl5/perlbrew/bin/perlbrew use perl-5.28.0
perl -e 'use IO::Compress::Brotli; print $IO::Compress::Brotli::VERSION,$/'
0.004001
IO::Compress::Brotli
./mvnw
?.travis.yml
install: mvn install -DskipTests=true -Dgpg.skip=true -Dmaven.javadoc.skip=true -B -V
а не свои собственные скрипты[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
Add-Type -TypeDefinition @'
using System.Windows.Forms;
using System.Drawing;
public class A{
public static Point getPos(){
return Cursor.Position;
}
}
'@ -ReferencedAssemblies 'System.Windows.Forms.dll','System.Drawing.dll'
[A]::getPos()
IsEmpty X Y
------- - -
False 1112 316
Regex.IsMatch(peremennaya.Trim(), "Text")
@INC
? perl -e '{print join "\n", @INC}'
perl -e '{map { if (! -e $_) { print $_, "\n";}} @INC; }'
yum install iptables-service
iptables-services.x86_64 : iptables and ip6tables services for iptables
sudo iptables -L
для списка правил и уже смотреть Chain INPUT (policy ACCEPT)
target prot opt source destination
public void mouseReleased(MouseEvent mouseEvent) {
if (SwingUtilities.isLeftMouseButton(mouseEvent)) {
System.out.println("Left button released.");
System.err.println("Counting down from " + i);
// NOTE: SwingUtilities.invokeLater shows only the last update of the
// text
// SwingUtilities.invokeLater(new Runnable() {
// });
Runnable r = new Runnable() {
@Override
public void run() {
final int progress = i;
for (int cnt = progress; cnt > 0; cnt--) {
final int current = cnt;
String buttonText = String.format("Calculated %d of %d",
current, progress);
button.setVisible(false);
button.setText(buttonText);
button.doLayout();
button.setVisible(true);
System.err.println("updated butto text to " + buttonText);
try {
Thread.sleep(300);
} catch (InterruptedException e) {
System.err.println("Exception (ignored): " + e.toString());
}
}
}
};
Thread t = new Thread(r);
t.start();
}
groupBox1.Controls System.Windows.Forms.Control[]