This file contains hidden or 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
| @Test | |
| public void test_GetAllFields_Returns_All_Fields_With_AbstractClass() throws Exception { | |
| abstract class MySuperClass { | |
| public String baz; | |
| public void myBaz() {} | |
| } | |
| class MyClass extends MySuperClass { | |
| public String foo; | |
| public int[] bar; |
This file contains hidden or 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
| public class ReflectUtil { | |
| public static Field[] getAllFields(Class<?> c) { | |
| List<Field> listOfFields = new ArrayList<Field>(); | |
| getAllFields(c, listOfFields); | |
| Field[] arrayOfFields = new Field[listOfFields.size()]; | |
| listOfFields.toArray(arrayOfFields); | |
| return arrayOfFields; | |
| } |
This file contains hidden or 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
| package com.test | |
| import grails.test.ControllerUnitTestCase | |
| import grails.test.mixin.* | |
| import org.junit.* | |
| /** | |
| * See the API for {@link grails.test.mixin.web.ControllerUnitTestMixin} for usage instructions | |
| */ |
This file contains hidden or 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
| src/FbTk/FontImp.hh:28:10: fatal error: 'X11/Xlib.h' file not found | |
| #include <X11/Xlib.h> | |
| ^ | |
| 1 error generated. | |
| make[2]: *** [src/FbTk/libFbTk_a-XmbFontImp.o] Error 1 | |
| make[1]: *** [all-recursive] Error 1 | |
| make: *** [all] Error 2 |
This file contains hidden or 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
| interactions: | |
| - request: | |
| body: null | |
| headers: | |
| Accept: ['*/*'] | |
| Accept-Encoding: ['gzip, deflate'] | |
| Connection: [keep-alive] | |
| User-Agent: [python-requests/2.4.3 CPython/2.7.8 Darwin/13.4.0] | |
| method: GET | |
| uri: https://10.12.254.137:443//sdk/vimServiceVersions.xml |
This file contains hidden or 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
| interactions: | |
| - request: | |
| body: <vcServer xmlns="http://www.vmware.com/UM"><hostname>10.12.254.111</hostname><username>toor</username><password>bad | |
| password</password></vcServer> | |
| headers: | |
| Accept: ['*/*'] | |
| Accept-Encoding: ['gzip, deflate'] | |
| Connection: [keep-alive] | |
| Content-Length: ['146'] | |
| Content-Type: [text/xml] |
This file contains hidden or 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
| Groovy Shell (1.8.6, JVM: 1.7.0_67) | |
| Type 'help' or '\h' for help. | |
| -------------------------------------------------------------------------------------------------------------------------------------------- | |
| groovy:000> foo.each{} | |
| ERROR groovy.lang.MissingPropertyException: | |
| No such property: foo for class: groovysh_evaluate | |
| at groovysh_evaluate.run (groovysh_evaluate:2) | |
| ... | |
| groovy:000> |
This file contains hidden or 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
| from __future__ import unicode_literals | |
| from xml.etree.ElementTree import Element | |
| from xml.etree.ElementTree import SubElement | |
| from xml.etree.ElementTree import tostring | |
| def _build_customer_payload(customer): | |
| """ | |
| <customer xmlns="http://www.vmware.com/UM"> |
This file contains hidden or 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
| List buildRDMInformation(Inventory inventory) { | |
| // To store the RDM information | |
| List rdmInfos = [] | |
| // For each VM in the inventory | |
| inventory.vms.each { vm -> | |
| // Get the host | |
| Host h = (Host) vm.host |
This file contains hidden or 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
| >>> children = content.rootFolder.childEntity | |
| >>> hosts = children[0].hostFolder.childEntity | |
| >>> hosts[0].host[0].licensableResource | |
| (vim.LicenseManager.LicensableResourceInfo) { | |
| dynamicType = <unset>, | |
| dynamicProperty = (vmodl.DynamicProperty) [], | |
| resource = (vmodl.KeyAnyValue) [ | |
| (vmodl.KeyAnyValue) { | |
| dynamicType = <unset>, | |
| dynamicProperty = (vmodl.DynamicProperty) [], |