import

Creating an MSVC import library from a DLL that uses stdcall

I have a dll that exports extern "C" __declspec(dllexport) int __stdcall Foo( void ); A dump of the dll shows ****************************************************************************** Section: Exports File Offset: 00001400 (5120) Flags: 00000000 Time Stamp: 00000000 Major Version: ...

Python: Classname same as file/module name leads to inheritence issue?

My code worked fine when it was all in one file. Now, I'm splitting up classes into different modules. The modules have been given the same name as the classes. Perhaps this is a problem, because MainPage is failing when it is loaded. Does it think that I'm trying to inherit from a module? Can module/class namespace collisions happen? M...

Remove variable labels attached with foreign/Hmisc SPSS import functions

As usual, I got some SPSS file that I've imported into R with spss.get function from Hmisc package. I'm bothered with labelled class that Hmisc::spss.get adds to all variables in data.frame, hence want to remove it. labelled class gives me headaches when I try to run ggplot or even when I want to do some menial analysis! One solution wo...

import strategy whithin django applications

I would like to know what is the best import strategy whithin django reusable applications. Say I have an application called usefulapp. Inside my app, I will need to access, say, the models. Should I use an explicit import as: import usefulapp.models or simply, since I am inside this very app, I could use: import models Which one ...

Does importing of packages change visibility of classes?

I jsut learned that A class may be declared with the modifier public, in which case that class is visible to all classes everywhere. If a class has no modifier (the default, also known as package-private), it is visible only within its own package. This is a clear statement. But this information interfere with my unders...

What is the fastest way to load a text file to an access Database ?

I have Text file that contains data separated with a comma ,. How do I load this to access in the fastest way? The Text file contains 200,000 rows. I work with C#. ...

Why can you reference an imported module using the importing module in python

I am trying to understand why any import can be referenced using the importing module, e.g #module master.py import slave and then >>>import master >>>print master.slave gives <module 'slave' from 'C:\Documents and Settings....'> What is the purpose of the feature? I can see how it can be helpful in a package's __init__.py file, b...

import excel data to gridview C#

hi... i need the code for import excel data to gridview in windows forms application... Plz anyone can tell me that code.... ...

Take a screenshot of X display from SSH

I'm trying to take a screenshot of a particular X display with imagemagick using the following syntax : import -window root -geometry 640:480 -display :9999 myfile01.pcx So taking the screenshot of root at display :999, but i get a : import: unable to open X server `:9999' @ import.c/ImportImageCommand/367. I'm logged in with SSH,...

How to only pay the dependency penalty for the implementation you use in Python?

I have a fairly simple set of functionality for which I have multiple implementations, e.g., a datastore that could be backed by Redis, MongoDB, or PostgreSQL. How should I structure/write my code so that code that wants to use one of these implementations only needs the dependencies for that implementation, e.g., they don't need to have...

Circular import issues with Django apps that have dependencies on each other

Hi, I am writing a couple of django apps wich by design is coupled together. But i get sircular import problems. I know it might be bad design, so please give examples of better solutions, but i cant seem to find a better suited design. So if there isnt a better design, how to solve this one? It is basically two django apps, with some ...

Why isn't my static member function recognised across assemblies?

I have a helper assembly which includes a function to identify object types: namespace Util { using namespace System; public ref class CastingHelpers { public: template < class T, class U > static System::Boolean isinst(U u); static bool Test() {return true;} }; } ...but for some reason, ...

Does importing a "non-relevant" dll has a performance penalty?

I'm using c#. In many cases I'm writing code that can benefit from a very simple class/method located in a "non-relevant" dll. For example, I'm writing some algorithm with no UI but it can benefit from a Point class in System.Drawing, or I need some xml manipulation method from System.Web even though I'm writing a console app (these are ...

Get function import path

from pack.mod import f How to get from object f information about import - 'pack.mod' I can get it using f.__module__ but if function def in module where i get this attribute (f.__module__) it return '__main__'. But i need real path here - 'pack.mod' I found this way to get this information: inspect.getmodule(f).__file__ then i ca...

Sharepoint: Modify the versions of a file/item

Hi all Is it possible to manually add and modify the versions of a document using the object model? As example I want to be able to get the SPListItemVersion object of a document and modify its properties. It seems to me that all properties are read-only, so it is not possible to modify anything. Is there any workaround for this avail...

Python ImportError when executing 'import.py', but not when executing 'python import.py'

I am running Cygwin Python version 2.5.2. I have a three-line source file, called import.py: #!/usr/bin/python import xml.etree.ElementTree as ET print "Success!" When I execute "python import.py", it works: C:\Temp>python import.py Success! When I run the python interpreter and type the commands, it works: C:\Temp>python Python ...

Smartest way to import massive datasets into a Rails application?

I've got multiple massive (multi gigabyte) datasets I need to import into a Rails app. The datasets are currently each in their own database on my development machine, and I need to read from them and create rows in tables in my Rails database based on the information they contain. The tables in my Rails database will not be exactly th...

objective c import once

I have a header file with a bunch on statics like static NSString * SOME_NAME = @"someMeaning"; What is the best way to import this? Should I define them some other way? I tried just using the #import statement but any file that imports it gives me a warning saying SOME_NAME defined but not used... ...

Interspire to Magento migration

Hello, I recently started with Magento and decided to migrate Interspire shopping cart I already made time ago to it. At first look Magento seems a very huge beast - lots of options, maybe lack of simplicity resulting in some performance loss. I've got user guide from which I am not getting much of benefit since there're just description...

Slow select when inserting large amounts of data (MYSQL)

I have a process that imports a lot of data (950k rows) using inserts that insert 500 rows at a time. The process generally takes about 12 hours, which isn't too bad. Normally doing a query on the table is pretty quick (under 1 second) as I've put (what I think to be) the proper indexes in place. The problem I'm having is trying to run a...