Search Results

Search found 933 results on 38 pages for 'simon cooper'.

Page 24/38 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • IIS7 Modules - managed or native?

    - by Simon Linder
    Hi all, as the old ISAPI filters are going to die sooner or later, I want to rewrite an old ISAPI filter that was used in IIS 6 into a module for use in IIS 7. The module will be used globally, meaning it will be used within each site, on a Windows Server 2008 R2 with IIS 7.5 installed, that will host several thousand web sites and managing about 50 application pools. My question now is if I should write that module in managed or unmanaged code? One of my concerns regarding managed code is the massive memory consumption due to the .NET framework overhead. I don't know how this would effect the server's performance. I already wrote modules in managed as well as in unmanaged code. So this is not the bothering my decision. But I would prefer to write the module in C# if there are no huge drawbacks. Any suggestions about that issue?

    Read the article

  • Can a large transaction log cause cpu hikes to occur

    - by Simon Rigby
    Hello all, I have a client with a very large database on Sql Server 2005. The total space allocated to the db is 15Gb with roughly 5Gb to the db and 10 Gb to the transaction log. Just recently a web application that is connecting to that db is timing out. I have traced the actions on the web page and examined the queries that execute whilst these web operation are performed. There is nothing untoward in the execution plan. The query itself used multiple joins but completes very quickly. However, the db server's CPU hikes to 100% for a few seconds. The issue occurs when several simultaneous users are working on the system (when I say multiple .. read about 5). Under this timeouts start to occur. I suppose my question is, can a large transaction log cause issues with CPU performance? There is about 12Gb of free space on the disk currently. The configuration is a little out of my hands but the db and log are both on the same physical disk. I appreciate that the log file is massive and needs attending to, but I'm just looking for a heads up as to whether this may cause CPU spikes (ie trying to find the correlation). The timeouts are a recent thing and this app has been responsive for a few years (ie its a recent manifestation). Many Thanks,

    Read the article

  • mysqli insert problem

    - by Simon
    Hello i have this error: Warning: mysqli_stmt::bind_param() [mysqli-stmt.bind-param]: Number of elements in type definition string doesn't match number of bind variables in E:\wamp\www\classes\UserLogin.php on line 31 and i dont know what it is :/ here is my code function createUser($username, $password) { $mysql = connect(); if($stmt = $mysql->prepare('INSERT INTO users (username, password, alder, hood, fornavn, efternavn, city, ip, level, email) VALUES (?,?,?,?,?,?,?,?,?,?)')) { $stmt->bind_param($username,$password, $alder, $hood, $fornavn, $efternavn, $city, $ip, $level, $email); $stmt->execute(); $stmt->close(); } else { echo 'error: ' . $mysql->error; } then my user create the user they only need to type username and password, and later they can edit the profile and edit, email,alder,hood and like that :). Thanks for helping me

    Read the article

  • Unit test complex classes with many private methods

    - by Simon G
    Hi, I've got a class with one public method and many private methods which are run depending on what parameter are passed to the public method so my code looks something like: public class SomeComplexClass { IRepository _repository; public SomeComplexClass() this(new Repository()) { } public SomeComplexClass(IRepository repository) { _repository = repository; } public List<int> SomeComplexCalcualation(int option) { var list = new List<int>(); if (option == 1) list = CalculateOptionOne(); else if (option == 2) list = CalculateOptionTwo(); else if (option == 3) list = CalculateOptionThree(); else if (option == 4) list = CalculateOptionFour(); else if (option == 5) list = CalculateOptionFive(); return list; } private List<int> CalculateOptionOne() { // Some calculation } private List<int> CalculateOptionTwo() { // Some calculation } private List<int> CalculateOptionThree() { // Some calculation } private List<int> CalculateOptionFour() { // Some calculation } private List<int> CalculateOptionFive() { // Some calculation } } I've thought of a few ways to test this class but all of them seem overly complex or expose the methods more than I would like. The options so far are: Set all the private methods to internal and use [assembly: InternalsVisibleTo()] Separate out all the private methods into a separate class and create an interface. Make all the methods virtual and in my tests create a new class that inherits from this class and override the methods. Are there any other options for testing the above class that would be better that what I've listed? If you would pick one of the ones I've listed can you explain why? Thanks

    Read the article

  • .NET Hashtable - "Same" key, different hashes

    - by Simon Lindgren
    Is it possible for two .net strings to have different hashes? I have a Hashtable with amongst others the key "path". When I loop through the elements in the table to print it, i can see that the key exists. When trying to looking it up however, there is no matching element. Debugging suggests that the string I'm looking for has a different hash than the one I'm supplying as the key. This code is in a Castle Monorail project, using brail as a view engine. The key I'm looking for is inserted by a brail line like this: UrlHelper.Link(node.CurrentPage.LinkText, {@params: {@path: "/Page1"}}) Then, in this method (in a custom IRoutingRule): public string CreateUrl(System.Collections.IDictionary parameters) { PrintDictionaryToLog(parameters); string url; if (parameters.Contains("path")) { url = (string)parameters["path"]; } else { return null; } } The key is printed to the log, but the function returns null. I didn't know this could even be a problem with .net strings, but I guess this is some kind of encoding issue? Oh, and this is running mono.

    Read the article

  • Using authsmtp from a Grails server

    - by Simon
    This is quite a specific question, and I have had no luck on the grails nabble forum, so I thought I would post here. I am using the grails mail plug-in, but I think my question is a general one about using authsmtp as an email gateway from my server. I am having trouble sending mail from my app using authsmtp. I have installed and configured the mail plugin and was originally using my ISP's SMTP server to send mails. However when I deployed to AWS EC2 this failed because my elastic IP was blocked by the SMTP host. So I bought myself an authsmtp account and set up my server email address as an accepted one at authsmtp. I then changed my configuration in SecurityConfig.groovy to point to the authsmtp server that I had been designated... mailHost = "mail.authsmtp.com" mailUsername = "myusername" mailPassword = "mypassword" mailProtocol = "smtp" mailFrom = "[email protected]" mailPort = 2525 ...and I'm just trying to get this to work locally before I deploy back up to AWS. Sending mail fails and in my log I have this exception: 2010-02-13 10:59:44,218 [http-8080-1] ERROR service.EmailerService - Failed to send emails: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 513 5.0.0 Your email system must authenticate before sending mail. org.springframework.mail.MailSendException; nested exception details (1) are: Failed message 1: com.sun.mail.smtp.SMTPSendFailedException: 513 5.0.0 Your email system must authenticate before sending mail. at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388) at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583) I'm a bit lost since the username and password I provide in the configuration are definitely correct. A terse and not very helpful conversation with authsmtp support suggests that I need to MD5 and/or base64 encode my credentials before sending, so my question is in three parts... 1) any idea what's going on with the failure and why that message is appearing? 2) how would I encode the credentials to pass to authsmtp and how would I configure that for the mail plugin 3) has anyone successfully connected and sent mail through authsmtp from the mail plugin and specifically from AWS EC2?

    Read the article

  • Finding out if LDAP user in Sun Directory Server 5.2 is locked out, in Java

    - by simon
    I'm developing an application using Java, Tomcat, Spring Framework and Spring LDAP 1.2.1 for LDAP access. According to our LDAP administrator, it is not possible to find out programmatically, if a specific user is locked out in the directory - the user is just not returned. This makes life difficult for me, as I need to identify locked out users. Is our administrator right, or is it possible somehow to find out, if a particular user is locked out? If yes, how?

    Read the article

  • C# Reading and Writing a Char[] to and from a Byte[]

    - by Simon G
    Hi, I have a byte array of around 10,000 bytes which is basically a blob from delphi that contains char, string, double and arrays of various types. This need to be read in and updated via C#. I've created a very basic reader that gets the byte array from the db and converts the bytes to the relevant object type when accessing the property which works fine. My problem is when I try to write to a specific char[] item, it doesn't seem to update the byte array. I've created the following extensions for reading and writing: public static class CharExtension { public static byte ToByte( this char c ) { return Convert.ToByte( c ); } public static byte ToByte( this char c, int position, byte[] blob ) { byte b = c.ToByte(); blob[position] = b; return b; } } public static class CharArrayExtension { public static byte[] ToByteArray( this char[] c ) { byte[] b = new byte[c.Length]; for ( int i = 1; i < c.Length; i++ ) { b[i] = c[i].ToByte(); } return b; } public static byte[] ToByteArray( this char[] c, int positon, int length, byte[] blob ) { byte[] b = c.ToByteArray(); Array.Copy( b, 0, blob, positon, length ); return b; } } public static class ByteExtension { public static char ToChar( this byte[] b, int position ) { return Convert.ToChar( b[position] ); } } public static class ByteArrayExtension { public static char[] ToCharArray( this byte[] b, int position, int length ) { char[] c = new char[length]; for ( int i = 0; i < length; i++ ) { c[i] = b.ToChar( position ); position += 1; } return c; } } to read and write chars and char arrays my code looks like: Byte[] _Blob; // set from a db field public char ubin { get { return _tariffBlob.ToChar( 14 ); } set { value.ToByte( 14, _Blob ); } } public char[] usercaplas { get { return _tariffBlob.ToCharArray( 2035, 10 ); } set { value.ToByteArray( 2035, 10, _Blob ); } } So to write to the objects I can do: ubin = 'C'; // this will update the byte[] usercaplas = new char[10] { 'A', 'B', etc. }; // this will update the byte[] usercaplas[3] = 'C'; // this does not update the byte[] I know the reason is that the setter property is not being called but I want to know is there a way around this using code similar to what I already have? I know a possible solution is to use a private variable called _usercaplas that I set and update as needed however as the byte array is nearly 10,000 bytes in length the class is already long and I would like a simpler approach as to reduce the overall code length and complexity. Thank

    Read the article

  • Mapping two tables 0..n in Hibernate

    - by simon
    I have a table Users CREATE TABLE "USERS" ( "ID" NUMBER NOT NULL , "LOGINNAME" VARCHAR2 (150) NOT NULL ) and I have a second table SpecialUsers. No UserId can occur twice in the SpecialUsers table, and only a small subset of the ids of users in the Users table are contained in the SpecialUsers table. CREATE TABLE "SPECIALUSERS" ( "USERID" NUMBER NOT NULL, CONSTRAINT "PK_SPECIALUSERS" PRIMARY KEY ("USERID") ) ALTER TABLE "SPECIALUSERS" ADD CONSTRAINT "FK_SPECIALUSERS_USERID" FOREIGN KEY ("USERID") REFERENCES "USERS" ("ID") / Mapping the Users table in Hibernate works ok <hibernate-mapping package="com.initech.domain"> <class name="com.initech.User" table="USERS"> <id name="id" column="ID" type="java.lang.Long"> <meta attribute="use-in-tostring">true</meta> <generator class="sequence"> <param name="sequence">SEQ_USERS_ID</param> </generator> </id> <property name="loginName" column="LOGINNAME" type="java.lang.String" not-null="true"> <meta attribute="use-in-tostring">true</meta> </property> </class> </hibernate-mapping> But I'm struggling in creating the mapping for the SpecialUsers table. All the examples (e.g. in Hibernate documentation) in Internet I found don't have this type of self-reference. I tried a mapping like this: <hibernate-mapping package="com.initech.domain"> <class name="com.initech.User" table="SPECIALUSERS"> <id name="id" column="USERID"> <meta attribute="use-in-tostring">true</meta> <generator class="foreign"> <param name="property">user</param> </generator> </id> <one-to-one name="user" class="User"/> </class> </hibernate-mapping> but got the error Invocation of init method failed; nested exception is org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.initech.User How should I map the SpecialUsers table? What I need on the application level is a list of the User objects contained in the SpecialUsers table.

    Read the article

  • using document() function in .NET XSLT generates error

    - by Simon
    I'd like to use embedded resources in my XSLT file, but while invoking 'document(...)' C# complains that "Error during loading document ..." I'd like to use defined resources in XSLT file and get them by this: "document('')//my:resources/"... How can i do that?? ex xsl: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my="xslt-gruper-v1.2.xsl" exclude-result-prefixes="my"> <my:resources> <one>tryb</one> </my:resources> <xsl:variable name="res" select="document('')/*/my:resources/("/> </xsl:stylesheet> How can i get access to such structure without exceptions in C#? I'll add that during static transform via ex. Opera everything works fine.

    Read the article

  • NHibernate Projections to retrieve a Collection?

    - by Simon Söderman
    I´m having some trouble retrieving a collection of strings in a projection: say that I have the following classes public class WorkSet { public Guid Id { get; set; } public string Title { get; set; } public ISet<string> PartTitles { get; protected set; } } public class Work { public Guid Id { get; set; } public WorkSet WorkSet { get; set; } //a bunch of other properties } I then have a list of Work ids I want to retrieve WorkSet.Title, WorkSet.PartTitles and Id for. My tought was to do something like this: var works = Session.CreateCriteria<Work>() .Add(Restrictions.In("Id", hitIds)) .CreateAlias("WorkSet", "WorkSet") .SetProjection( Projections.ProjectionList() .Add(Projections.Id()) .Add(Projections.Property("WorkSet.Title")) .Add(Projections.Property("WorkSet.PartTitles"))) .List(); The Id and Title loads up just fine, but the PartTitles returns null. Suggestions please!

    Read the article

  • How can I tell if AUCTeX is available?

    - by Simon Wright
    I have a package which has various features that depend on AUCTeX. As it stands, it requires hand-configuration: (defvar AucTeX-used nil) (if AucTeX-used (progn (require 'tex-site) (require 'latex)) (require 'latex-mode) (setq TeX-command-list nil)) Is there a way to find out whether AUCTeX is available on the machine, to avoid having to set AucTeX-Used by hand? (I'm using GNU Emacs 23.1.1 for Max OS X).

    Read the article

  • Objectdatasource and Gridview : Sorting, paging, filtering

    - by Simon
    Hi there, Im using entity framework 1.0 and trying to feed out a Gridview with a objectdatasource that have access to my facade. The problem is, that it seems to be particulary difficult and haven't seen anything that realy do what i want it to do on the internet. For those who know, a gridview feeded with an objectdatasource, it can't sort automaticaly then you must do it manually. It's not that bad. Where it becomes a nightmare, its when we add paging and filter settings to a gridview's datasource. After many hours searching on the internet, i'm asking you, guys, if anyone knows a link that can explain me how to mix Pagging, Sorting and filtering for a gridview and an objectdatasource! Thanks in advance and sorry for my english.

    Read the article

  • Ext.TabPanel html help...

    - by Simon
    add({ title: args.node.id, iconCls: 'tabs', items: [{html: '<code class="prettyprint"><?php\necho \'Hello World!\';</code>', width: '100%', hieght: '100%', plain: true}], closable: true }).show(); I am running the above method on Ext.TabPanel and it is returning '' as the html... If I do <code class="prettyprint"><html><head><title>Whatever</title></head><body.The body!</body></html></code> It just renders The body!... how can I get it to display the source code?? Many thanks...

    Read the article

  • Cleaning up nasty characters in PHP

    - by Simon Hume
    Hi folks, Got a little issue where my client is pasting in content from Word into my little text editor in a CMS. The double quotes are coming back encoded in what looks like some form of UTF. Any ideas if I can strip/replace these using PHP when they get displayed out of my mySQL table. Here is the link to the page that spits out the dodgy characters, you can see the 'black diamonds of doom' which are causing the headaches. http://linq.milkbarstudios.com/news_detail.php?id=3 Any suggestions would be greatly accepted!

    Read the article

  • Checked status not updated in CheckBox template

    - by Simon
    Hey there. I'm trying to create an hyperlink that changes its text depending on a boolean value. I thought I could leverage the IsChecked method of a CheckBox. So I wrote this ControlTemplate for a CheckBox: <CheckBox Checked="CheckBox_Checked" IsChecked="{Binding Path=SomeBool, Mode=TwoWay}"> <CheckBox.Template> <ControlTemplate TargetType="{x:Type CheckBox}"> <BulletDecorator> <BulletDecorator.Bullet> <TextBlock> <Hyperlink> <TextBlock x:Name="TextBoxHyperlink">Unchecked</TextBlock> </Hyperlink> </TextBlock> </BulletDecorator.Bullet> <ContentPresenter /> </BulletDecorator> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="TextBoxHyperlink" Property="Text" Value="Checked" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </CheckBox.Template> </CheckBox> But when I click on the hyperlink, nothing happens. The checked status is not changed and the Text property of the TextBlock is not updated. Any ideas?

    Read the article

  • Can any linux API or tool watch for any change in any folder below e.g. /SharedRoot or do I have to

    - by Simon B.
    I have a folder with ~10 000 subfolders. Can any linux API or tool watch for any change in any folder below e.g. /SharedRoot or do I have to setup inotify for each folder? (i.e. I loose if I want to do this for 10k+ folders). I guess yes, since I've already seen examples of this inefficient method, for instance http://twistedmatrix.com/trac/browser/trunk/twisted/internet/inotify.py?rev=28866#L345 My problem: I need to keep folders time-sorted with most recently active "project" up top. When a file changes, each folder above that file should update its last-modified timestamp to match the file. Delays are ok. Opening a file (typically MS Excel) and closing again, its file date can jump up and then down again. For this reason I need to wait until after a file is closed, then queue the folder of that file for checking, and only a while later do I go and look for the newest file in its folder, since the filedate of the triggering file could already be back-dated to its original timestamp by Excel or similar programs. Also in case several files from same folder are used/created, it makes sense to buffer timestamping of that folders' parents to at least get a bunch of updates collapsed into one delayed update. I'm looking for a linux solution. I have some code that can be run on a windows server, most of the queing functionality is here: http://github.com/sesam/FolderdateFollowsFiles/blob/master/FolderdateFollowsFiles/Follower.vb Available API:s The relative of inotify on windows, ReadDirectoryChangesW, can watch a folder and its whole subtree; see bWatchSubtree on http://msdn.microsoft.com/en-us/library/aa365465(VS.85).aspx Samba? Patching samba source is a possibility, but perhaps there are already hooks available? Other possibilities, like client side (various windows versions) and spying on file activities in order to update folders recursively?

    Read the article

  • Import received e-mails from Outlook to MSSQL database

    - by _simon_
    How can I automatically import some data from received e-mail from Outlook to MSSQL database? So, when I receive an e-mail (from a preset sender), Outlook should be able to run an external application with the subject and body as parameter. This application will then parse the body of the e-mail and send it to database. Is it possible to set this in 'Rules and alerts' in Outlook (I don't think so)? Or is it possible to do it with macros (an example would be nice). Or else...? I am using Microsoft Outlook 2007 (no Exchange Server), let's say, that incoming mail is from @gmail domain, the externam application would probably be a C# console application, database is SQL SERVER 2005.

    Read the article

  • Sort file as Month name in ColdFusion

    - by Simon Guo
    I have a directory, it contains files like: january2009.xml, february2009.xml, march2009.xml,april2009.xml,january2010.xml, february2010.xml, march2010.xml,april2010.xml ... I use the cfdirectory to get the file by year. Right now, I want to display it as sorted order in month. Say If I only want year 2009 data. I want it sorted as january2009.xml, february2009.xml, march2009.xml,april2009.xml but not april2009.xml, february2009.xml, january2009.xml, march2009.xml Anyone has easy way to do it in ColdFusion?

    Read the article

  • Java equivalent of C# @

    - by Simon Rigby
    Hi all, Quick question. Is there an equivalent of @ as applied to strings in Java: For example I can do @"c:\afolder\afile" in C# and have it ignore the escape characters when processing instead of having to do "c:\afolder\aFile". Is there a Java equivalent? hmmm: stackoverflow is escaping on me .. lol. The second example should read: c:(double-backslash)afolder(double-backslash)aFile

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >