Search Results

Search found 503 results on 21 pages for 'alan mendelevich'.

Page 10/21 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • npgsql Leaking Postgres DB Connections: Way to monitor connections?

    - by Alan
    Background: I'm moving my application from npgsql v1 to npgsql v2.0.9. After a few minutes of running my application, I get a System.Exception: Timeout while getting a connection from the pool. The web claims that this is due to leaking connections (opening a db connection, but not properly closing them). So I'm trying to diagnose leaking postgres connections in npgsql. From the various web literature around; one way to diagnose leaking connections is to setup logging on npgsql, and look for the leaking connection warning message in the log. Problem is, I'm not seeing this message in the logs anywhere. I also found utility that monitors npgsql connections, but it's unstable and crashes. So I'm left manually inspecting code. For everyplace that creates an npgsql connection, there is a finally block disposing of it. For everyplace that opens a datareader, CommandBehavior.CloseConnection is used (and the datareader is disposed). Any other places to check or can someone recommend a way to look for leaking pool connections?

    Read the article

  • How to pass interface type/GUID reference to an automation method in Delphi

    - by Alan Clark
    In Delphi you can pass class references around to compare the types of objects, and to instantiate them. Can you do the same with interface references being passed to a COM automation server? For example, you can define a method taking a GUID parameter using the type library editor: function ChildNodesOfType(NodeType: TGUID): IMBNode; safecall; In this function I would like to return automation types that support the interface specified by NodeType, e.g. if Supports(SomeNode, NodeType) then result := SomeNode; But the Supports call always fails, I tried passing in the Guids defined in the type library but none of the different types (Ixxx, Class_xxxx, IId_Ixxxx) seem to work.

    Read the article

  • Sending mass email using PHP

    - by Alan
    I am currently writing a music blog. The administrator posts a new article every 2-3 days. Once the administrator posts an article, a mass email will be sent to around 5000 subscribers immediately. What is the best way to implement the mass mail feature? Does the following function work? function massmail() { $content = '...'; foreach ($recipients as $r) { $_content = $content . '<img src="http://xxx/trackOpenRate.php?id='.$r.'">'; mail($r, 'subject', $_content); } } Another question: If all 5000 subscribers are using Yahoo Mail, will Yahoo treat it as a DDOS attack and block the IP address of my SMTP server?

    Read the article

  • How can I make this SQL query more efficient? PHP.

    - by Alan Grant
    Hi all, I have a system whereby a user can view categories that they've subscribed to individually, and also those that are available in the region they belong in by default. So, the tables are as follows: Categories UsersCategories RegionsCategories I'm querying the db for all the categories within their region, and also all the individual categories that they've subscribed to. My query is as follows: Select * FROM (categories c) LEFT JOIN users_categories uc on uc.category_id = c.id LEFT JOIN regions_categories rc on rc.category_id = c.id WHERE (rc.region_id = ? OR uc.user_id = ?) At least I believe that's the query, I'm creating it using Cake's ORM layer, so the exact one is: $conditions = array( array( "OR" => array ( 'RegionsCategories.region_id' => $region_id, 'UsersCategories.user_id' => $user_id ) )); $this->find('all', $conditions); This turns out to be incredibly slow (sometimes around 20 seconds or so. Each table has around 5,000 rows). Is my design at fault here? How can I retrieve both the users' individual categories and those within their region all in one query without it taking ages? Thanks!

    Read the article

  • How to create a custom ADO Multi Demensional Catalog with no database

    - by Alan Clark
    Does anyone know of an example of how to dynamically define and build ADO MD (ActiveX Data Objects Multidimensional) catalogs and cube definitions with a set of data other than a database? Background: we have a huge amount of data in our application that we export to a database and then query using the usual SQL joins, groups, sums etc to produce reports. The data in the application is originally in objects and arrays. The problem is the amount of data is so large the export can take 2 hours. So I am trying to figure out a good way of querying the objects in memory, either by a custom OLAP algorithm or library, or ADO MD. But I haven't been able to find an example of using ADO MD without a database behind it. We are using Delphi 2010 so would use ADO ActiveX but I imagine the ADO.NET MD is similar. I realize that if the application data was already stored in a database the problem would solve itself. Also if Delphi had LINQ capability I could query the objects and arrays that way.

    Read the article

  • What/Where are the Naming Rules for Controller actions in a Zend_Application App

    - by Alan Storm
    I've created a Zend_Application using the zf tool that's bundled with Zend Framework (1.96, if that matters) What at the rules for formatting action names and how those action names get translated into into URL paths, and where in the Framework codebase does this happen? I ask because I tried to create an action like public function createFooAction() { } and it wouldn't load with a URL like http://example.com/controller/createFoo BUT, the following did work public function createfooAction() { } http://example.com/controller/createfoo I also know non-alphanumeric characters get treated differently, and I'd like to know the base rules I'm dealing with.

    Read the article

  • C# Console Application: Preventing Control-C from being printed?

    - by Alan
    Hi. I have a console app, and I want to capture Control-C and shutdown gracefully. I have the following code: Console.CancelKeyPress += new ConsoleCancelEventHandler((o, e) => { Logger.Log("Control+C hit. Shutting down."); resetEvent.Set(); }); And the output windows shows: 6/16/2010 3:24:34 PM: Control+C hit. Shutting down. ^C Is there a way to prevent the control-c character ^C from appearing? It's not a huge deal, but for some reason Ill be fixated on it because I'm anal like that.

    Read the article

  • EXC_BAD_ACCESS on button press for button dynamically added to UIView within UIScrollView

    - by alan
    OK. It's an iPad app. Within the DetailViewController I have added a UIScrollView through IB and within that UIScrollView I have added a UIView (also added through IB) which holds various dynamically added UITableViews, UILabels and UIButtons. My problem is that I'm getting errors on the UIButton clicks. I have defined this method: - (void)translationSearch:(id)sender { NSLog(@"in transearch"); [self doSearch]; } This is how I'm adding the UIButton to the UIView: UIButton *translationButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; translationButton.frame = CGRectMake(6, 200, 200, 20); translationButton.backgroundColor = [UIColor clearColor]; [translationButton setTitle:@"testing" forState:UIControlStateNormal]; [translationButton addTarget:self action:@selector(translationSearch:) forControlEvents:UIControlEventTouchUpInside]; [verbView addSubview:translationButton]; Now the button is added to the form without any issue but, when I press it, I am getting an EXC_BAD_ACCESS error. I'm sure it's staring me in the face but I've passed my usual time limit for getting a bug like this fixed so any help would be greatly appreciated. The only thing I can think is the fact that the UIButton is within a UIView which is within a UIScrollView which is within the view controller is somehow causing an issue. Cheers.

    Read the article

  • Pass a Delphi class to a C++ function/method that expects a class with __thiscall methods.

    - by Alan G.
    I have some MSVC++ compiled DLL's for which I have created COM-like (lite) interfaces (abstract Delphi classes). Some of those classes have methods that need pointers to objects. These C++ methods are declared with the __thiscall calling convention (which I cannot change), which is just like __stdcall, except a this pointer is passed on the ECX register. I create the class instance in Delphi, then pass it on to the C++ method. I can set breakpoints in Delphi and see it hitting the exposed __stdcall methods in my Delphi class, but soon I get a STATUS_STACK_BUFFER_OVERRUN and the app has to exit. Is it possible to emulate/deal with __thiscall on the Delphi side of things? If I pass an object instantiated by the C++ system then all is good, and that object's methods are called (as would be expected), but this is useless - I need to pass Delphi objects. Edit 2010-04-19 18:12 This is what happens in more detail: The first method called (setLabel) exits with no error (though its a stub method). The second method called (init), enters then dies when it attempts to read the vol parameter. C++ Side #define SHAPES_EXPORT __declspec(dllexport) // just to show the value class SHAPES_EXPORT CBox { public: virtual ~CBox() {} virtual void init(double volume) = 0; virtual void grow(double amount) = 0; virtual void shrink(double amount) = 0; virtual void setID(int ID = 0) = 0; virtual void setLabel(const char* text) = 0; }; Delphi Side IBox = class public procedure destroyBox; virtual; stdcall; abstract; procedure init(vol: Double); virtual; stdcall; abstract; procedure grow(amount: Double); virtual; stdcall; abstract; procedure shrink(amount: Double); virtual; stdcall; abstract; procedure setID(val: Integer); virtual; stdcall; abstract; procedure setLabel(text: PChar); virtual; stdcall; abstract; end; TMyBox = class(IBox) protected FVolume: Double; FID: Integer; FLabel: String; // public constructor Create; destructor Destroy; override; // BEGIN Virtual Method implementation procedure destroyBox; override; stdcall; // empty - Dont need/want C++ to manage my Delphi objects, just call their methods procedure init(vol: Double); override; stdcall; // FVolume := vol; procedure grow(amount: Double); override; stdcall; // Inc(FVolume, amount); procedure shrink(amount: Double); override; stdcall; // Dec(FVolume, amount); procedure setID(val: Integer); override; stdcall; // FID := val; procedure setLabel(text: PChar); override; stdcall; // Stub method; empty. // END Virtual Method implementation property Volume: Double read FVolume; property ID: Integer read FID; property Label: String read FLabel; end; I would have half expected using stdcall alone to work, but something is messing up, not sure what, perhaps something to do with the ECX register being used? Help would be greatly appreciated. Edit 2010-04-19 17:42 Could it be that the ECX register needs to be preserved on entry and restored once the function exits? Is the this pointer required by C++? I'm probably just reaching at the moment based on some intense Google searches. I found something related, but it seems to be dealing with the reverse of this issue.

    Read the article

  • Jetty with a custom JUL logger

    - by Alan Williamson
    I feel this should be easier, or I am missing something obvious. I am trying to use our custom JUL logging library with Jetty. No matter where I put the JAR file for the custom logger, it is not found. I have tried the usual suspects; /lib/, /lib/ext/, /WEB-INF/lib/ and even manually added it to the classpath. 2011-06-29 15:27:34.518::INFO: Started [email protected]:8080 Can't load log handler "net.aw20.logshot.client.LogShotHandler" java.lang.ClassNotFoundException: net.aw20.logshot.client.LogShotHandler java.lang.ClassNotFoundException: net.aw20.logshot.client.LogShotHandler at java.net.URLClassLoader$1.run(URLClassLoader.java:217) I am starting up Jetty using "-jar start.jar" technique. Searching around, I have spotted a couple of threads that talk about this problem, but with no resolution. Or if there was, they didn't answer with their solution. Can anyone help on this front? Thanks

    Read the article

  • Redis version on Cloudbees is out of date?

    - by Alan Krueger
    I'm setting up an OSS build in Cloudbees with /usr/sbin/redis-server being started as one of the build tasks: + /usr/sbin/redis-server [204] 04 Nov 03:52:58 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf' [204] 04 Nov 03:52:58 * Server started, Redis version 2.0.3 The (Redis site)[http://redis.io/download] shows 2.6.2 to be the current version and 2.4.17 as "legacy". On the extended downloads page, version 2.0.3 is deprecated. Am I launching it the wrong server executable, or are there plans to support a more recent version of Redis?

    Read the article

  • Experience with Take home Programming Test for Interviews

    - by Alan
    Okay this is not "programming" related per-se, but it is a situation that I believe the SO audience would be more familiar with, than say an ask.yahoo.com audience, so please forgive me. I had a phone screen the other day with a company that I really want to work for. It went pretty well, based on cues from the HR person, such as "Next step we're going to send you a programming test," and "Well, before I get ahead of myself, do you want to continue the interviewing process." and "We'll send out the test later this afternoon. It doesn't sound like you'll have trouble with it, but I want to be honest we do have a high failure rate on it." The questions asked weren't technical, just going down my resume, and talking about the work I've done, and how it relates to the position. Nothing I couldn't talk through. This was last Thursday. It's now Tuesday, and haven't received the test yet. I sent a follow up email yesterday to the lady who interviewed me, but haven't gotten a response. Anyone had a similar experience? Am I reading too much into this? Or was I off the mark by thinking I had moved on to the next step in the interview process. Since this is a company I really want to work for, I'm driving myself insane enumerating all the various what-if scenarios.

    Read the article

  • Is there a way to detect when a WSS default.aspx page is updated?

    - by Alan
    That is detect when the user makes web part changes and selects to exit editing the page. I want to be able to capture a page event, then create a SharePoint task to instruct a user to translate that page to another language (note that MOSS and variations is not an option because the client wants to use the free version of SharePoint). So the customer wants essentially the same WSS site in multiple languages.

    Read the article

  • jQuery Color **Swatch** Picker

    - by Alan Storm
    Has anyone coded up a jQuery query color picker that lets you pick colors from a predetermined list of colors? Something like a product color picker on an Ecommerce site. Most of the searching I've done reveals a lot of general purpose, pick-any-color-in-the-rgb-spectrum, but few options for picking specific colors.

    Read the article

  • Swap CSS class on the basis of Scroll Position with Javascript

    - by Alan
    I have followed answer given by CMS in relation to getting a menu to stay in one place on the page whilst you scroll the page as per this original question and it works very well but I also have a number of images on the page where I'm using the jquery fancylink plugin to show an enlarged image on click. The problem is when you then close the fancylink popup and scroll to the top of the page the static DIV then decides to stick to the very top of the page. Any ideas or help would this would be greatly appreciated.

    Read the article

  • Is there any benefit to my rather quirky character sizing convention?

    - by Paul Alan Taylor
    I love things that are a power of 2. I celebrated my 32nd birthday knowing it was the last time in 32 years I'd be able to claim that my age was a power of 2. I'm obsessed. It's like being some Z-list Batman villain, except without the colourful adventures and a face full of batarangs. I ensure that all my enum values are powers of 2, if only for future bitwise operations, and I'm reasonably assured that there is some purpose (even if latent) for doing it. Where I'm less sure, is in how I define the lengths of database fields. Again, I can't help it. Everything ends up being a power of 2. CREATE TABLE Person ( PersonID int IDENTITY PRIMARY KEY ,Firstname varchar(64) ,Surname varchar(128) ) Can any SQL super-boffins who know about the internals of how stuff is stored and retrieved tell me whether there is any benefit to my inexplicable obsession? Is it more efficient to size character fields this way? Can anyone pop in with an "actually, what you're doing works because ....."? I suspect I'm just getting crazier in my older age, but it'd be nice to know that there is some method to my madness.

    Read the article

  • What are All the Ways a Programmer Could use PHP to Send an Email?

    - by Alan Storm
    I'm looking for a list of built in PHP functions that a programmer could use to send an email. The obvious answer here is mail(), but I'm also looking for a list of functions someone might use to manually open a connection to an MTA, or spawn a process on the local machine which might in turn send an email using sendmail, postfix, etc. The context here is I want to scan a large, unknown codebase for code that's sending out email (because we already located a call to mail(), and that's not doing it)

    Read the article

  • Ruby: how does constant-lookup work in instance_eval/class_eval?

    - by Alan O'Donnell
    I'm working my way through Pickaxe 1.9, and I'm a bit confused by constant-lookup in instance/class_eval blocks. I'm using 1.9.2. It seems that Ruby handles constant-lookup in *_eval blocks the same way it does method-lookup: look for a definition in receiver.singleton_class (plus mixins); then in receiver.singleton_class.superclass (plus mixins); then continue up the eigenchain until you get to #<Class:BasicObject>; whose superclass is Class; and then up the rest of the ancestor chain (including Object, which stores all the constants you define at the top-level), checking for mixins along the way Is this correct? The Pickaxe discussion is a bit terse. Some examples: class Foo CONST = 'Foo::CONST' class << self CONST = 'EigenFoo::CONST' end end Foo.instance_eval { CONST } # => 'EigenFoo::CONST' Foo.class_eval { CONST } # => 'EigenFoo::CONST', not 'Foo::CONST'! Foo.new.instance_eval { CONST } # => 'Foo::CONST' In the class_eval example, Foo-the-class isn't a stop along Foo-the-object's ancestor chain! And an example with mixins: module M CONST = "M::CONST" end module N CONST = "N::CONST" end class A include M extend N end A.instance_eval { CONST } # => "N::CONST", because N is mixed into A's eigenclass A.class_eval { CONST } # => "N::CONST", ditto A.new.instance_eval { CONST } # => "M::CONST", because A.new.class, A, mixes in M

    Read the article

  • Why isn't this company contacting me? [closed]

    - by Alan
    I had a phone screen the other day with a company that I really want to work for. It went pretty well, based on cues from the HR person, such as "Next step we're going to send you a programming test," and "Well, before I get ahead of myself, do you want to continue the interviewing process." and "We'll send out the test later this afternoon. It doesn't sound like you'll have trouble with it, but I want to be honest we do have a high failure rate on it." The questions asked weren't technical, just going down my resume, and talking about the work I've done, and how it relates to the position. Nothing I couldn't talk through. This was last Thursday. It's now Tuesday, and haven't received the test yet. I sent a follow up email yesterday to the lady who interviewed me, but haven't gotten a response. Anyone had a similar experience? Am I reading too much into this? Or was I off the mark by thinking I had moved on to the next step in the interview process. Since this is a company I really want to work for, I'm driving myself insane enumerating all the various what-if scenarios.

    Read the article

  • Problem with TabHost UI layout.

    - by Alan B
    What I'm trying to do is create a layout like this: +--------+ Search |EditText| [Button] +--------+ +---------+ |Tab 1 |---------+ | |Tab 2 | |---------+---------+-----------------+ | ListView Item 1 | | ListView Item 2 | | ListView Item 3 | | ListView Item 4 | | ListView Item 5 | | ListView Item 6 | | ListView Item 7 | | ListView Item 8 | | ListView Item 9 | | ListView Item 10 | +-------------------------------------+ So that's a TextView saying 'Search', an EditText and a button. Then below it the tabs - Tab 1 has a ListView, Tab 2 some other stuff. I can get a simple TabHost setup with two tabs working fine but can't get the above to lay out properly. Any hints ? I'd create the UI in the Eclipse designer and check the XML from that, except the designer doesn't work with TabHost. And DroidDraw doesn't seem to know about TabHost.

    Read the article

  • xcode compile console application - c programming

    - by Alan
    Is it possible to use Xcode using iPhone 3.1.3 SDK to compile a standard C program that will work on the iphone? I'm trying to use xcode to compile a basic 'hello world' but to no avail. Do I need to obtain an additional application template or am I just missing something?

    Read the article

  • Is MobiForms for Android worth investigating ?

    - by Alan B
    I'm working my way through the NotePad tutorial, and that's all fine - I'm not a Java programmer but it's close enough to C# (or vice versa) to make it easy to pick up. I'm surprised that there aren't any RAD tools for Android apart from Mobiforms. Is there anyone out there with experience of Mobiforms ?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >