inspection

Do you require deep packet inspection on a server-only firewall?

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...

Ruby equivalent of Python's "dir"?

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? ...

How to enumerate column names with NHibernate?

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). ...

How can I set the application information on a session using the Oracle thin JDBC driver?

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...

How can I get the name of a python class?

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...

Inspect the names/values of arguments in the definition/execution of a JavaScript function

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...

as3 object serialization (to as3 code)

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...

Python Inspect - Lookup the data type for a property in a GAE db.model Class

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...

Is there a way to inspect the (differing) internal structures of Python objects that test as equal (==)?

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...

.NET Runtime Object Browser.

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...

ASP.NET based object inspector

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...

Is it possible to recover the name of the function from within the function in scala?

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. ...

Decorator changing function status from method to 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...

How to inspect mystery deserialized object in Python

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...

Can't get argspec for Python callables?

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...