I have a server behind a firewall. It runs a web application (Java servlets under Apache Tomcat) and responds only to port 443 (HTTPS). There is no scripting code in the pages served - the forms use HTTP POST to receive the form, process the data (with appropriate input filtering) and then output an HTTP result page.
I am currently usin...
In Python we can "dir" a module, like this:
>>> import re
>>> dir(re)
And it lists all functions in the module. Is there a similar way to do this in Ruby?
...
I've got a class with a bunch of [ColumnName("foo")] NHibernate attributes.
Is there an easy way to ask NHibernate to list all of the ColumnNames for a given class?
It sounds like it should be really easy but I'm just not seeing any kind of inspection in the NHibernate docs (or maybe I'm just blind today).
...
I'd like to change the application information that is shown when inspecting
Oracle 10g sessions using the Oracle Enterprise Manager application:
Application Information
Program 'my program'
Module 'something'
Command UNKNOWN
I'm using the JDBC thin driver to connect, and I have to admit I'd rather not
use the OC...
When I have an object foo, I can get it's class object via
str(foo.__class__)
What I would need however is only the name of the class ("Foo" for example), the above would give me something along the lines of
"<class 'my.package.Foo'>"
I know I can get it quite easily with a regexp, but I would like to know if there's a more "clean...
I'm looking to do the equivalent of Python's inspect.getargspec() in Javascript.
I do know that you can get the arguments list from a Javascript function, but what I'm really looking for is the names of the arguments from the originally defined function.
If this is in fact impossible, I'm going to have to 'brute-force' it by getting th...
Hello
what i'm trying to do is walk an object that is also a complex tree of objects and output the actionscript 3 code it took (or takes) to create instantiate and populate that object and all its children.
so for instance if you saw something like this in your debugger
myObjectToParse (ParseMe@173e239)
----------[0]someBlob (SomeBlo...
class Employee(db.Model):
firstname = db.StringProperty()
lastname = db.StringProperty()
address1 = db.StringProperty()
timezone = db.FloatProperty() #might be -3.5 (can contain fractions)
class TestClassAttributes(webapp.RequestHandler):
"""
Enumerate attributes...
Yesterday I asked ("A case of outwardly equal lists of sets behaving differently under Python 2.5 (I think …)") why list W constructed as follows:
r_dim_1_based = range( 1, dim + 1)
set_dim_1_based = set( r_dim_1_based)
def listW_fill_func( val):
if (val == 0):
return set_dim_1_based
else:
return set( [val])
W...
Is there a framework which can be used in your application, to make it expose internal objects on some port for inspection.
for.e.g. after i start my application in this case a GUI Application, and then say launch http://localhost:9100 then it should show me the statistics of the app.
I played a bit with HttpListener accepting connec...
I'm currently writing some code that uses Flee to evaluate a number of rules and I'd like to include an ASP.NET based object inspector in the configuration screen so users can inspect the values of objects that are made available.
I've put together a fairly basic routine to recurse an objects properties and spit it out but before I go a...
I'd like to do something like
def getMeASammy() {println "getMeASammy"}
def getMeADrink() {println "getMeADrink"}
def getMeASub() {println "getMeASub"}
But, I don't want to explicitly type out the name of the function.
...
[Updated]: Answer inline below question
I have an inspecting program and one objective is for logic in a decorator to know whether the function it is decorating is a class method or regular function. This is failing in a strange way. Below is code run in Python 2.6:
def decorate(f):
print 'decorator thinks function is', f
ret...
I'm trying to load JSON back into an object. The "loads" method seems to work without error, but the object doesn't seem to have the properties I expect.
How can I go about examining/inspecting the object that I have (this is web-based code).
results = {"Subscriber": {"firstname": "Neal", "lastname": "Walters"}}
subscriber = jso...
I'm playing with Python callable. Basically you can define a python class and implement __call__ method to make the instance of this class callable. e.g.,
class AwesomeFunction(object):
def __call__(self, a, b):
return a+b
Module inspect has a function getargspec, which gives you the argument specification of a function. H...