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
-- 1. Pick HELLOWORLD as the unique identifier. | |
-- 2. Pick /hiw and /hellow as slash commands (/hi and /hello are actual emotes) | |
SLASH_HELLOWORLD1, SLASH_HELLOWORLD2 = '/hiw', '/hellow'; -- 3. | |
function SlashCmdList.HELLOWORLD(msg, editbox) -- 4. | |
print("Hello, World!"); | |
end |
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
SLASH_HELLOWORLD1, SLASH_HELLOWORLD2 = '/hiw', '/hellow'; | |
local function handler(msg, editbox) | |
if msg == 'bye' then | |
print('Goodbye, World!'); | |
else | |
print("Hello, World!"); | |
end | |
end | |
SlashCmdList["HELLOWORLD"] = handler; -- Also a valid assignment strategy |
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
/** | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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
/** | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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
/** | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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
/** | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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 | |
function somecommand { | |
echo "$# args:" | |
for n in "$@"; do | |
echo "- $n" | |
done | |
echo | |
} |
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
26c26 | |
< <artifactId>guess</artifactId> | |
--- | |
> <artifactId>decorator</artifactId> | |
32c32 | |
< <finalName>guess</finalName> | |
--- | |
> <finalName>decorator</finalName> |
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
$ wget --no-check-certificate http://repository.apache.org/content/repositories/openejb-012/org/apache/openejb/openejb-standalone/3.1.2/openejb-standalone-3.1.2.zip | |
--16:53:23-- http://repository.apache.org/content/repositories/openejb-012/org/apache/openejb/openejb-standalone/3.1.2/openejb-standalone-3.1.2.zip | |
=> `openejb-standalone-3.1.2.zip.1' | |
Resolving repository.apache.org... 140.211.11.100 | |
Connecting to repository.apache.org|140.211.11.100|:80... connected. | |
HTTP request sent, awaiting response... 302 Found | |
Location: https://repository.apache.org/content/repositories/openejb-012/org/apache/openejb/openejb-standalone/3.1.2/openejb-standalone-3.1.2.zip [following] | |
--16:53:23-- https://repository.apache.org/content/repositories/openejb-012/org/apache/openejb/openejb-standalone/3.1.2/openejb-standalone-3.1.2.zip | |
=> `openejb-standalone-3.1.2.zip.1' | |
Connecting to repository.apache.org|140.211.11.100|:443... connected. |
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
import junit.framework.TestCase; | |
public class MemoryTest extends TestCase { | |
public void test() { | |
Runtime runtime = Runtime.getRuntime(); | |
System.out.println("maxMemory = " + runtime.maxMemory()); | |
System.out.println("freeMemory = " + runtime.freeMemory()); |