Search Results

Search found 510 results on 21 pages for 'neil chen'.

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

  • Installing mysql on leopard: "Can't connect to local MySQL server through socket"

    - by Neil
    I migrated to a new machine and used migration assistant to copy across my files (which seemed to copy across the DBs) but I had to use macports to install Mysql (whereas last time I compiled from source via Dan Benjamin's guide). For some reason, mysql is intermittently throwing the following error; Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2) It does this no matter what I try, which has included setting the socket in /opt/local/etc/mysql5/my.cnf. Previously I've managed to temporarily fix this by restarting the machine, but right now it just doesn't want to know, despite grep mysql telling me I seem to have a pid; 0 46 1 0 0:00.01 ?? 0:00.01 /opt/local/bin/daemondo --label=mysql5 --start-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper restart ; --pid=none 0 70 1 0 0:00.01 ?? 0:00.01 /bin/sh /opt/local/lib/mysql5/bin/mysqld_safe --datadir=/opt/local/var/db/mysql5 --pid-file=/opt/local/var/db/mysql5/localhost.pid 74 100 70 0 0:09.22 ?? 1:02.68 /opt/local/libexec/mysqld --basedir=/opt/local --datadir=/opt/local/var/db/mysql5 --user=mysql --pid-file=/opt/local/var/db/mysql5/localhost.pid --socket=/tmp/mysql.sock 501 66217 65266 0 0:00.00 ttys001 0:00.00 grep mysql How do I fix this? Are there any steps I can take next? I've been trying for a few weeks now and I've read round all relevant blog posts, so I'm completely out of ideas.

    Read the article

  • Castle Windsor using wrong component to satisfy a dependency

    - by Neil Barnwell
    I have the following component mapping in Windsor xml: <component id="dataSession.DbConnection" service="System.Data.IDbConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" type="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" lifestyle="custom" customLifestyleType="MyCompany.Castle.PerOperationLifestyle.PerOperationLifestyleManager, MyCompany.Castle"> <parameters> <connectionString>server=(local);database=MyCompany;trusted_connection=true;application name=OperationScopeTest;</connectionString> </parameters> </component> <component id="dataSession.DataContext" service="System.Data.Linq.DataContext, System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" type="MyCompany.BusinessLogic.MyCompanyDataContext, MyCompany.BusinessLogic" lifestyle="custom" customLifestyleType="MyCompany.Castle.PerOperationLifestyle.PerOperationLifestyleManager, MyCompany.Castle"> <parameters> <connection>${dataSession.DbConnection}</connection> </parameters> </component> However, when I ask the container for a DataContext, it actually uses the constructor requiring a connection string, despite the ${dataSession.DbConnection} being an IDbConnection. Why is this, and how to I make Windsor use the correct constructor?

    Read the article

  • Certificate Trust Lists and IIS7

    - by Neil Deadman
    I need to generate a CTL for use with IIS7. I generated a CTL file using MakeCTL (on Win2k3 SDK) and put only my own RootCA certificate in the CTL. However, when I then use adsutil.vbs to set my website to use this CTL, I get: ErrNumber: -2147023584 (0x80070520) Error Trying To SET the Property: SslCtlIdentifier I'm using adsutil.vbs like this: cscript adsutil.vbs set w3svc/2/SslCtlIdentifier where is the friendly name of the CTL The problem is, I am not able to set a friendly name. At the end of the wizard it says "Friendly Name: ". In IIS6 I can create a CTL with a friendly name (showing in Certificates MMC) but if I export it from there, when I import it, it no longer has a friendly name. Can anyone show me how to do it please?

    Read the article

  • Castle Windsor upgrade causes TypeLoadException for generic types

    - by Neil Barnwell
    I have the following mapping in my Castle Windsor xml file which has worked okay (unchanged) for some time: <component id="defaultBasicRepository" service="MyApp.Models.Repositories.IBasicRepository`1, MyApp.Models" type="MyApp.Models.Repositories.Linq.BasicRepository`1, MyApp.Models" lifestyle="perWebRequest"/> I got this from the Windsor documentation at http://www.castleproject.org/container/documentation/v1rc3/usersguide/genericssupport.html. Since I upgraded Windsor, I now get the following exception at runtime: Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.TypeLoadException: GenericArguments[0], 'T', on 'MyApp.Models.Repositories.Linq.BasicRepository`1[TEntity]' violates the constraint of type parameter 'TEntity'. Source Error: Line 44: public static void ConfigureIoC() Line 45: { Line 46: var windsor = new WindsorContainer("Windsor.xml"); Line 47: Line 48: ServiceLocator.SetLocatorProvider(() = new WindsorServiceLocator(windsor)); I'm using ASP.NET MVC 1.0, Visual Studio 2008 and Castle Windsor as downloaded from http://sourceforge.net/projects/castleproject/files/InversionOfControl/2.1/Castle-Windsor-2.1.1.zip/download Can anyone shed any light on this? I'm sure the upgrade of Castle Windsor is what caused it - it's been working well for ages.

    Read the article

  • WPF WIN32 hwndhost WM_MOUSEMOVE WM_MOUSEHOVER

    - by Neil B
    I have a WPF app with a usercontrol that contains a HwndHost. The HwndHost is created as follows: hwndHost = CreateWindowEx(0, "static", "", WS_CHILD | WS_VISIBLE, 0, 0, hostHeight, hostWidth, hwndParent.Handle, (IntPtr)HOST_ID, IntPtr.Zero, 0); hwndControl = CreateWindowEx(0, "Static", "", WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN , 0, 0, hostHeight, hostWidth, hwndHost, (IntPtr)PICTUREBOX_ID, IntPtr.Zero, 0); I then hook into the message pump using HwndSourceHook and loads of messages come through. Except the ones I want i.e. WM_MOUSEMOVE, WM_MOUSEHOVER, WM_LBUTTONDOWN and WM_LBUTTONUP Also the OnMouseLeftButtonDown event is not fired in the WPF code on the main window or the control, I assume because windows is trapping it and throwing it away. Anybody know how I can get these to come through, either with or without using the WIN32 window messages?

    Read the article

  • Magento: Display sub-category list

    - by Neil Bradley
    Hi there, I'm building a Magento store and want to be able to display a list of categories and have each category link to its own page. I have a 'Brands' category with an ID of 42 and I want to display a list of the sub-categories and ensure that each one links to the designated URL key in the CMS. Has anyone had experience of doing this with Magento? Thank you.

    Read the article

  • Netflix OData API iPhone: Accessing more than just the title

    - by Neil Desai
    Netflix just recently announced that they have a new OData API which gives developers access to more of their catalog and is exactly what I've been looking for. Also, on odata.org they have a sample iphone objective-c sdk that accesses the netflix odata api and displays a few movie titles in a tableview with a navigationcontroller. http://odataobjc.codeplex.com/ I'm just messing around right now and I would like to access more than just the catalog titles but I have no idea how to. Preferably, I would like to just push another view controller that will implement a page that can display the synopsis etc. Any suggestions on how to access the other data elements of a movie? Thanks

    Read the article

  • C# Static constructors design problem - need to specify parameter

    - by Neil Dobson
    I have a re-occurring design problem with certain classes which require one-off initialization with a parameter such as the name of an external resource such as a config file. For example, I have a corelib project which provides application-wide logging, configuration and general helper methods. This object could use a static constructor to initialize itself but it need access to a config file which it can't find itself. I can see a couple of solutions, but both of these don't seem quite right: 1) Use a constructor with a parameter. But then each object which requires corelib functionality should also know the name of the config file, so this has to be passed around the application. Also if I implemented corelib as a singleton I would also have to pass the config file as a parameter to the GetInstance method, which I believe is also not right. 2) Create a static property or method to pass through the config file or other external parameter. I have sort of used the latter method and created a Load method which initializes an inner class which it passes through the config file in the constructor. Then this inner class is exposed through a public property MyCoreLib. public static class CoreLib { private static MyCoreLib myCoreLib; public static void Load(string configFile) { myCoreLib = new MyCoreLib(configFile); } public static MyCoreLib MyCoreLib { get { return myCoreLib; } } public class MyCoreLib { private string configFile; public MyCoreLib(string configFile) { this.configFile = configFile; } public void DoSomething() { } } } I'm still not happy though. The inner class is not initialized until you call the load method, so that needs to be considered anywhere the MyCoreLib is accessed. Also there is nothing to stop someone calling the load method again. Any other patterns or ideas how to accomplish this?

    Read the article

  • asp:CustomValidator / OnServerValidate

    - by Neil
    I have a CheckBoxList that I am trying to validate that at least one of the checkboxes is checked. Markup: <asp:CustomValidator ID="RequiredFieldValidator8" ValidationGroup="EditArticle" runat="server" ErrorMessage="At least one Category is required." OnServerValidate="topic_ServerValidate" /> <asp:CheckBoxList id="checkboxlistCategories" runat="server"></asp:CheckBoxList> Code-behind: protected void topic_ServerValidate(object source, ServerValidateEventArgs args) { int i = 0; foreach (ListItem item in checkboxlistCategories.Items) { if (item.Selected == true) i = i + 1; } if (i == 0) args.IsValid = false; else args.IsValid = true; } If I add ControlToValidate="checkboxlistCategories" in the CustomValidator control, it blows up! Am I missing something? Thanks in advance.

    Read the article

  • WinForms: Why is Control.Parent null?

    - by Neil Barnwell
    I'm trying to get the parent of a listview docked within a splitcontainer, and am finding that ListView.Parent is null. According to the documentation this should be: A Control that represents the parent or container control of the control. Can anyone explain why this property would be null? I've tried moving the ListView to the Form (in order to rule out weird behaviour when docked in a splitcontainer) to no avail.

    Read the article

  • iphone uitableview load next detail view from segmented control like mail app

    - by Neil
    Hi i have added a segmented control to a detailview header in a subview of a uitableview table and used images for up and down to create a up and down control like the one in mail.app. the buttons are working fine. im after some advice on how to get rid of that items view and reload the next item without having to go back to the main uitableview. im sure i saw some code on this website doing exactly that but i cant find it! can anyone point me in right direction or help? thanks

    Read the article

  • Regex to Strip Special Characters

    - by Neil
    I am trying to use regex.replace to strip out unwanted characters, but I need to account for spaces: string asdf = "doésn't work?"; string regie = @"([{}\(\)\^$&._%#!@=<>:;,~`'\’ \*\?\/\+\|\[\\\\]|\]|\-)"; Response.Write(Regex.Replace(asdf,regie,"").Replace(" ","-")); returns doésntwork instead of doésnt-work Ideas? Thanks!

    Read the article

  • Using a REST API and iPhone/Objective-C

    - by Neil Desai
    So I'm brand new to Netflix's API and have never used an API ever before. I'm ok with Objective-C and Cocoa Touch but just have no clue where to start when accessing the API and how to in general. Can someone help me get started with some code that will access titles in Netflix or just how to access a REST API in general with authentication. Thanks. Update: I've looked at the documents and I'm still a little lost because the Netflix API is a little weird with OAuth. Any help?

    Read the article

  • Good event calendaring / scheduling design guide?

    - by Neil McF
    Hello, In an application I'm designing, the user has to be able to specify rather complex event scheduling (continuous time-block vs. daily time-blocks, exception date/times, recurrence patterns etc.) Does anyone know of a good design page for such a thing online? For example, I was highly impressed with this page's description of how to do database audit trails, and would love something similar. Thanks.

    Read the article

  • OSCommerce checkout success page tracking

    - by Neil Bradley
    Hi there, I'm installing some tracking code into the checkout_success.php page. I need to be able to grab the coupon code/discount code name from the order, if one was used so that I can echo it out in my tracking script. I was wondering if anyone knows how to do this? I'm using this contribution of discount coupons; ot_discount_coupons.php, August 4, 2006, author: Kristen G. Thorson, ot_discount_coupon_codes version 3.0 It seems that the coupon code is not actually stored in the order_totals, but in a seperate discount_coupons_to_orders table. is there a query i can do on this table to find the matching coupon code used for this order? i tried the following but it return nothing; $coupon_query = tep_db_query("select coupons_id from discount_coupons_to_orders where orders_id = '".(int)$orders['orders_id']."' ORDER BY orders_id DESC LIMIT 1"); $coupon_id = tep_db_fetch_array($coupon_query); $couponid = $coupon_id['coupon_id']; Thank you.

    Read the article

  • How can I get this code involving unique_ptr and emplace_back to compile?

    - by Neil G
    #include <vector> #include <memory> using namespace std; class A { public: A(): i(new int) {} A(A const& a) = delete; A(A &&a): i(move(a.i)) {} unique_ptr<int> i; }; class AGroup { public: void AddA(A &&a) { a_.emplace_back(move(a)); } vector<A> a_; }; int main() { AGroup ag; ag.AddA(A()); return 0; } does not compile... (says that unique_ptr's copy constructor is deleted) I tried replacing move with forward. Not sure if I did it right, but it didn't work for me.

    Read the article

  • Linq Left Outer Join

    - by Neil
    I am new to LINQ and am trying to convert a SQL query to LINQ: SQL: left outer join PRODUCT_BEST_USE pbu on pbu.PRODUCT_GUID = @uProductId and pbu.BEST_USE_GUID = bu.BEST_USE_GUID LINQ: from PBU in PRODUCT_BEST_USE.Where(PBU=>PBU.PRODUCT_GUID == p.PRODUCT_GUID).DefaultIfEmpty() When I add and PBU.BEST_USE_GUID equals BU.BEST_USE_GUID, I get an error: "A query body must end with a select clause or a group clause" Here is the full Linq query: from p in PRODUCT join BU in BEST_USE on p.CATEGORY_GUID equals BU.CATEGORY_GUID from PBU in PRODUCT_BEST_USE.Where(PBU=>PBU.PRODUCT_GUID == p.PRODUCT_GUID).DefaultIfEmpty() and PBU.BEST_USE_GUID equals BU.BEST_USE_GUID where p.PRODUCT_GUID == new Guid("d317752b-581d-4f43-92fa-4a4af91009f5") select new { BU.NAME, PBU.PRODUCT_BEST_USE_GUID }

    Read the article

  • Creating colour schemes based on an existing scheme

    - by Neil Barnwell
    I have a colour scheme based around yellow, for warning messages on a website. It amounts to a slightly orange bordered box, with a pale yellow fill. The exact colours are: #FED626 (border) #FFF7C0 (fill) I want to know if it's possible to convert this scheme mathematically or algorithmically somehow, to come up with a blue version where the border is the "same amount" of blue as this one is yellow. Is this possible, or do I just "pin the tail on the donkey" on a colour pallet to get roughly the right one? I ask, because I'd quite like to be able to calculate this on the fly, to perhaps implement something in .less. To give you an idea, I tried swopping the red and blue values on those two, and came up with this: #26D6FE (border) #C0F7FF (fill) That wasn't too hard, but think about if I wanted a pink colour scheme... :)

    Read the article

  • Converting python collaborative filtering code to use Map Reduce

    - by Neil Kodner
    Using Python, I'm computing cosine similarity across items. given event data that represents a purchase (user,item), I have a list of all items 'bought' by my users. Given this input data (user,item) X,1 X,2 Y,1 Y,2 Z,2 Z,3 I build a python dictionary {1: ['X','Y'], 2 : ['X','Y','Z'], 3 : ['Z']} From that dictionary, I generate a bought/not bought matrix, also another dictionary(bnb). {1 : [1,1,0], 2 : [1,1,1], 3 : [0,0,1]} From there, I'm computing similarity between (1,2) by calculating cosine between (1,1,0) and (1,1,1), yielding 0.816496 I'm doing this by: items=[1,2,3] for item in items: for sub in items: if sub >= item: #as to not calculate similarity on the inverse sim = coSim( bnb[item], bnb[sub] ) I think the brute force approach is killing me and it only runs slower as the data gets larger. Using my trusty laptop, this calculation runs for hours when dealing with 8500 users and 3500 items. I'm trying to compute similarity for all items in my dict and it's taking longer than I'd like it to. I think this is a good candidate for MapReduce but I'm having trouble 'thinking' in terms of key/value pairs. Alternatively, is the issue with my approach and not necessarily a candidate for Map Reduce?

    Read the article

  • wcf metadata service page url

    - by Neil B
    I have a service with the metadata exposed. Trouble is when I browse to the wsdl the service page it has the machine name as below: MasterLibrary Service You have created a service. To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax: svcutil.exe http://mymachine/Master/Master.svc?wsdl How do I make it show it as: http://www.url.co.uk/Master/Master.svc?wsdl

    Read the article

  • Q on Python serialization/deserialization

    - by neil
    What chances do I have to instantiate, keep and serialize/deserialize to/from binary data Python classes reflecting this pattern (adopted from RFC 2246 [TLS]): enum { apple, orange } VariantTag; struct { uint16 number; opaque string<0..10>; /* variable length */ } V1; struct { uint32 number; opaque string[10]; /* fixed length */ } V2; struct { select (VariantTag) { /* value of selector is implicit */ case apple: V1; /* VariantBody, tag = apple */ case orange: V2; /* VariantBody, tag = orange */ } variant_body; /* optional label on variant */ } VariantRecord; Basically I would have to define a (variant) class VariantRecord, which varies depending on the value of VariantTag. That's not that difficult. The challenge is to find a most generic way to build a class, which serializes/deserializes to and from a byte stream... Pickle, Google protocol buffer, marshal is all not an option. I made little success with having an explicit "def serialize" in my class, but I'm not very happy with it, because it's not generic enough. I hope I could express the problem. My current solution in case VariantTag = apple would look like this, but I don't like it too much import binascii import struct class VariantRecord(object): def __init__(self, number, opaque): self.number = number self.opaque = opaque def serialize(self): out = struct.pack('>HB%ds' % len(self.opaque), self.number, len(self.opaque), self.opaque) return out v = VariantRecord(10, 'Hello') print binascii.hexlify(v.serialize()) >> 000a0548656c6c6f Regards

    Read the article

  • How can I get this code involving unique_ptr to compile?!

    - by Neil G
    #include <vector> #include <memory> using namespace std; class A { public: A(): i(new int) {} A(A const& a) = delete; A(A &&a): i(move(a.i)) {} unique_ptr<int> i; }; class AGroup { public: void AddA(A &&a) { a_.emplace_back(move(a)); } vector<A> a_; }; int main() { AGroup ag; ag.AddA(A()); return 0; } does not compile... (says that unique_ptr's copy constructor is deleted) I tried replacing move with forward. Not sure if I did it right, but it didn't work for me.

    Read the article

  • What is the security advantage of STS in web services?

    - by Neil McF
    Hello, I've started reading up on security (particularly authentication) with web services and I see a lot of references to security token services. From what I see, they take a username-password (or something) and, on validation, return a digital token. How is using this token any more secure then just relying on the username-password in the first place?

    Read the article

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