Search Results

Search found 594 results on 24 pages for 'seth johnson'.

Page 8/24 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Getting Started With XML Indexes

    XML Indexes make a huge difference to the speed of XML queries, as Seth Delconte explains; and demonstrates by running queries against half a million XML employee records. The execution time of a query is reduced from two seconds to being too quick to measure, purely by creating the right type of secondary index for the query. Schedule Azure backupsRed Gate’s Cloud Services makes it simple to create and schedule backups of your SQL Azure databases to Azure blob storage or Amazon S3. Try it for free today.

    Read the article

  • encodingStyle usage in XmlSerializer.Serialize

    - by Vishal Seth
    Can somebody please explain the use of 4th parameter of public void Serialize( XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, string encodingStyle ) My issue is this: I've following string in one of the fields of my object: "reviewed ?" // music notation When I serialize it, it becomes & # x E; // see it as one word, w/o spaces it won't let me type And it fails when I try to transform this .NET generated XML through another XSL file Is it happening because its serializing using UTF-16? Is there any way I can make it transform using UTF-8 and make this "error" go away? **

    Read the article

  • Automapper: Map an Enum to its [Description] attribute

    - by Seth Petry-Johnson
    I have a source object that looks like this: private class SourceObject { public Enum1 EnumProp1 { get; set; } public Enum2 EnumProp2 { get; set; } } The enums are decorated with a custom [Description] attribute that provides a string representation, and I have an extension method .GetDescription() that returns it. How do I map these enum properties using that extension? I'm trying to map to an object like this: private class DestinationObject { public string Enum1Description { get; set; } public string Enum2Description { get; set; } } I think a custom formatter is my best bet, but I can't figure out how to add the formatter and specify which field to map from at the same time.

    Read the article

  • Standalone GUI client for TFS 2010 Source Control

    - by Seth Reno
    I'm looking for a TFS 2010 GUI client that I can use outside of an IDE. I'm only looking to use the source control features in this case. I'm not talking about work items or build management. Ideally it would be a complete client that can be used on a machine where Visual Studio is not installed. Options I know about and why I'm not satisfied with them: TFS Power Tools - Windows Shell Extension Must have a working copy to use... see chicken or the egg Missing features: view history, branch / merge, revert SvnBridge TFS 2010 not yet supported Are there others that I don't know about?

    Read the article

  • Selenium Grid with parallel testing using C#/NUnit

    - by seth
    I've got several unit tests written with NUnit that are calling selenium commands. I've got 2 win2k3 server boxes setup, one is running selenium grid hub along with 2 selenium rc's. The other box is running 5 selenium rc's. All of them are registered with the hub as running Firefox on Windows (to keep it simple). In my unit test setup method I've got it connected to the hub's hostname at port 4444. When running the tests, they only run sequentially (as expected). I've done a lot of reading on NUnit's roadmap and how they are shooting for parallel testing abilities. I've seen lots of pointers to using PNUnit in the meantime. However this seems to completely defeat the purpose of the Selenium Grid. Have any of you successfully implemented parallel testing using C#/NUnit connected to a Selenium Grid setup? If so, please elaborate. I'm at a complete loss at how this will/can work using NUnit as it exists now (I'm using version 2.9.3)

    Read the article

  • Spring Security DB Authentication w/Hibernate and hashed passwords?

    - by Seth
    I'm trying to set up spring security 3 to authenticate users against my hibernate 3 database. I'm storing only sha1 hashes of the passwords in the database (not plaintext). I've looked at this and this, which tell me to implement my own UserDetailsService. Unfortunately, the UserDetails that loadUserByUsername spits out seem to need the plaintext password, which I don't have. How is this usually handled? Can Spring Security actually do what I need here? Am I missing something?

    Read the article

  • ASP .NET, Javascript, AjaxControlToolkit - get results with Selenium??

    - by Seth
    I'm a newbie to web stuff. However, I wish to scrape some data from multiple websites. I'm currently using the following technologies: Selenium; Python; and BeautifulSoup; I believe the site I am trying to scrape is using a combination of ASP.NET, javascript and the AjaxControlToolkit. I believe the key results I am looking for are in the following script: <script type="text/javascript"> //<![CDATA[ Sys.Application.initialize(); Sys.Application.add_init(function() { $create(AjaxControlToolkit.AutoCompleteBehavior, {"completionInterval":50,"completionListCssClass":"autocomplete_completionListElement","completionListItemCssClass":"autocomplete_listItem","completionSetCount":20,"delimiterCharacters":"","highlightedItemCssClass":"autocomplete_highlightedListItem","id":"ctl00_ContentPlaceHolder1_AutoCompleteExtender1","minimumPrefixLength":4,"serviceMethod":"GetSchoolNames","servicePath":"AutoComplete.asmx"}, {"itemSelected":ItemSelected}, null, $get("ctl00_ContentPlaceHolder1_SchoolNameTextBox")); }); Sys.Application.add_init(function() { $create(AjaxControlToolkit.AutoCompleteBehavior, {"completionInterval":50,"completionListCssClass":"autocomplete_completionListElement","completionListItemCssClass":"autocomplete_listItem","delimiterCharacters":"","highlightedItemCssClass":"autocomplete_highlightedListItem","id":"ctl00_ContentPlaceHolder1_AutoCompleteExtender2","minimumPrefixLength":2,"serviceMethod":"GetSuburbNames","servicePath":"AutoComplete.asmx"}, null, null, $get("ctl00_ContentPlaceHolder1_SuburbTownTextBox")); }); //]]> </script> Is there an easy way to get the results of the above script processed using Selenium so that I may pass it using BeautifulSoup?

    Read the article

  • Ruby SerialPorts Gem

    - by Seth Archer
    Using Ruby SerialPorts Gem to interact with hardware. When I write a byte array to the hardware using a program called "Serial Port Monitor" the hardware responds correctly. However, when I write the same byte array using ruby it doesn't work unless I do a read request just before the write request. This device doesn't respond correctly with this sp = SerialPort.new(args) sp.write [200.chr, 30.chr, 6.chr, 5.chr, 1.chr, 2.chr, 0.chr, 244.chr] But it does if I add a read request before the write. Like this sp SerialPort.new(args) sp.read sp.write [200.chr, 30.chr, 6.chr, 5.chr, 1.chr, 2.chr, 0.chr, 244.chr] This works, but I'm at a loss as to why. I should also add that the first snippet does work occasionally maybe 1/10 of the time.

    Read the article

  • TeeChart VCL vs .NET

    - by Seth
    Is TeeChart .NET built from the same source as TeeChart VCL? I'm just wandering as we have a VCL application heavily dependent on TeeChart and I would like to redevelop the GUI component in .NET so I can switch from the Codegear IDE to Visual Studio.

    Read the article

  • Rails ActionMailer problems on Mac

    - by seth
    I've been working on learning to use Rails the last couple days and I've run into something that I haven't been able to solve with Google. So I'm just creating a basic contact form that sends an email. Everything seems to be working ok in testing, which tells me that the form is working, and ActionMailer was implemented correctly, however, I'm having trouble configuring ActionMailer. I'm running OSX 10.6.2. I have postfix running and have verified that it's running using telnet localhost 25. When I try to use the form I get a "Connection refused" error. This is my current configuration: config.action_mailer.smtp_settings = { :address => 'localhost', :port => 25 } I thought I might need to set :domain but I'm kind of confused on what that should be set to in this situation.

    Read the article

  • CSS margin collapsing?

    - by Seth P
    I'm working with Google Chrome on OS X, and I seem to be running into a margin collapse issue. I have two divs stacked on top of each other, both with a margin-top of 2px and a margin-bottom of 5px, and both with a 1px border. According to my arithmetic, there should be 1+1+2+5=7px of space between the "content" areas of the divs, since the border prevents the margins from collapsing? More confusing is that, in a location where I have a div with a 3px border and a 0 margin-top underneath one of the previously described divs, I end up with 9px of space (as I so dearly desire). The only difference between the divs is the additional class that shrinks the border and redefines the margins, so both divs have the same padding (only padding-bottom is 0). Can anyone point out where I've gone wrong?

    Read the article

  • Collection.contains(Enum.Value) in HQL?

    - by Seth
    I'm a little confused about how to do something in HQL. So let's say I have a class Foo that I'm persisting in hibernate. It contains a set of enum values, like so: public class Foo { @CollectionOfElements private Set<Bar> barSet = new HashSet<Bar>(); //getters and setters here ... } and public enum Bar { A, B } Is there an HQL statement I can use to fetch only Foo instances who'se barSet containst Bar.B? List foos = session.createQuery("from Foo as foo " + "where foo.barSet.contains.Bar.B").list(); Or am I stuck fetching all Foo instances and filtering them out at the DAO level? List foos = session.createQuery("from Foo as foo").list(); List results = new ArrayList(); for(Foo f : foos) { if(f.barSet.contains(Bar.B)) results.add(f); } Thanks!

    Read the article

  • Spring MVC annotation config problem

    - by Seth
    I'm trying to improve my spring mvc configuration so as to not require a new config file for every servlet I add, but I'm running into problems. I've tried using this tutorial as a starting point, but I'm running into an issue that I can't figure out. The problem is that when I do a GET to my servlet, I get back a 404 error. Here's my config and a representative java snippet from a Controller: web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <display-name>SightLogix Coordination System</display-name> <description>SightLogix Coordination System</description> <servlet> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/application-context.xml /WEB-INF/application-security.xml </param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> <url-pattern>/slcs/*</url-pattern> </servlet-mapping> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/application-context.xml /WEB-INF/application-security.xml </param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> application-context.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd" default-init-method="init" default-destroy-method="destroy"> <mvc:annotation-driven /> <context:component-scan base-package="top.level" /> </beans> application-security.xml: <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> <http> <intercept-url pattern="/**" access="ROLE_MANAGER" requires-channel="https" /> <http-basic /> </http> <authentication-manager> <authentication-provider user-service-ref="myUserDetailsService"> <password-encoder hash="sha"/> </authentication-provider> </authentication-manager> <beans:bean id="myUserDetailsService" class="path.to.my.UserDetailsServiceImpl"> </beans:bean> </beans:beans> Snippet of a Controller class (one of many, but they all look essentially like this): @Controller @RequestMapping("/foo.xml") public class FooController { @RequestMapping(method=RequestMethod.GET) public void handleGET(HttpServletRequest request, HttpServletResponse response) throws IOException { ... Can anyone tell me what I'm doing incorrectly? Thanks!

    Read the article

  • Updating records with their subordinates via CTE or subquery

    - by Mike Jolley
    Let's say I have a table with the following columns: Employees Table employeeID int employeeName varchar(50) managerID int totalOrganization int managerID is referential to employeeID. totalOrganization is currently 0 for all records. I'd like to update totalOrganization on each row to the total number of employees under them. So with the following records: employeeID employeeName managerID totalOrganization 1 John Cruz NULL 0 2 Mark Russell 1 0 3 Alice Johnson 1 0 4 Juan Valdez 3 0 The query should update the totalOrganizations to: employeeID employeeName managerID totalOrganization 1 John Cruz NULL 3 2 Mark Russell 1 0 3 Alice Johnson 1 1 4 Juan Valdez 3 0 I know I can get somewhat of an org. chart using the following CTE: WITH OrgChart (employeeID, employeeName,managerID,level) AS ( SELECT employeeID,employeeName,0 as managerID,0 AS Level FROM Employees WHERE managerID IS NULL UNION ALL SELECT Employees.employeeID,Employees.employeeName,Employees.managerID,Level + 1 FROM Employees INNER JOIN OrgChart ON Employees.managerID = OrgChart.employeeID ) SELECT employeeID,employeeName,managerID, level FROM OrgChart; Is there any way to update the Employees table using a stored procedure rather than building some routine outside of SQL to parse through the data?

    Read the article

  • Go - How to read/write to file?

    - by Seth Hoenig
    I've been trying to learn Go / Golang on my own, but I've been stumped on trying read and write to ordinary files. I can get as far as: inFile,_ := os.Open(INFILE,0,0); but actually getting the content of the file doesn't make sense, since the read function takes a []byte as a parameter?? func (file *File) Read(b []byte) (n int, err Error)

    Read the article

  • MPI signal handling

    - by Seth Johnson
    When using mpirun, is it possible to catch signals (for example, the SIGINT generated by ^C) in the code being run? For example, I'm running a parallelized python code. I can except KeyboardInterrupt to catch those errors when running python blah.py by itself, but I can't when doing mpirun -np 1 python blah.py. Does anyone have a suggestion? Even finding how to catch signals in a C or C++ compiled program would be a helpful start. If I send a signal to the spawned Python processes, they can handle the signals properly; however, signals sent to the parent orterun process (i.e. from exceeding wall time on a cluster, or pressing control-C in a terminal) will kill everything immediately.

    Read the article

  • What library is used for the main menu in the facebook iOS app?

    - by Seth
    I'm making an app that has more options than will easily fit into a UITabBarController. I wanted to use something like what the facebook app has for its main menu. My guess is that it isn't proprietary to facebook, because the SCVNGR app uses something similar. This library lets you re-order the icons the way you can re-order the apps from the main menu (i.e. press and hold - icons jiggle - you can drag them around). Does anyone know what library provides this UIView? I'd like to use it if possible. Thanks!

    Read the article

  • Spring @PostConstruct function in a @Repository called multiple times

    - by Seth
    I have a DAO that I'm trying to inject into a couple different places: @Repository public class FooDAO { @Autowired private HibernateManager sessionFactory; @PostConstruct public void doSomeDatabaseStuff() throws DataAccessException { ... } } And my application-context.xml is a fairly simple context:component-scan: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd" default-init-method="init" default-destroy-method="destroy"> <context:component-scan base-package="top.level"/> </beans> The DAO is accessed from a couple servlets in my application server through @Autowired properties. As far as I understand, anything annotated with @Repository should default to being a singleton and thus doSomeDatabaseStuff() should only be called once (as is my intention). The problem is that I'm seeing doSomeDatabaseStuff() called multiple times. What's going on here? Have I set something up incorrectly? I'm using spring 3.0.0. Thanks for the help.

    Read the article

  • How do I use continuations on Scala 2.8?

    - by Seth Tisue
    Scala 2.8.0.RC1 includes the continuations plugin on trunk for the first time, but the details of how to use it have changed from previous releases, so it's difficult to follow the blog entries and SO answers out there that talk about continuations but were written for previous versions.

    Read the article

  • hibernate column uniqueness question

    - by Seth
    I'm still in the process of learning hibernate/hql and I have a question that's half best practices question/half sanity check. Let's say I have a class A: @Entity public class A { @Id @GeneratedValue(strategy=GenerationType.AUTO) private Long id; @Column(unique=true) private String name = ""; //getters, setters, etc. omitted for brevity } I want to enforce that every instance of A that gets saved has a unique name (hence the @Column annotation), but I also want to be able to handle the case where there's already an A instance saved that has that name. I see two ways of doing this: 1) I can catch the org.hibernate.exception.ConstraintViolationException that could be thrown during the session.saveOrUpdate() call and try to handle it. 2) I can query for existing instances of A that already have that name in the DAO before calling session.saveOrUpdate(). Right now I'm leaning towards approach 2, because in approach 1 I don't know how to programmatically figure out which constraint was violated (there are a couple of other unique members in A). Right now my DAO.save() code looks roughly like this: public void save(A a) throws DataAccessException, NonUniqueNameException { Session session = sessionFactory.getCurrentSession(); try { session.beginTransaction(); Query query = null; //if id isn't null, make sure we don't count this object as a duplicate if(obj.getId() == null) { query = session.createQuery("select count(a) from A a where a.name = :name").setParameter("name", obj.getName()); } else { query = session.createQuery("select count(a) from A a where a.name = :name " + "and a.id != :id").setParameter("name", obj.getName()).setParameter("name", obj.getName()); } Long numNameDuplicates = (Long)query.uniqueResult(); if(numNameDuplicates > 0) throw new NonUniqueNameException(); session.saveOrUpdate(a); session.getTransaction().commit(); } catch(RuntimeException e) { session.getTransaction().rollback(); throw new DataAccessException(e); //my own class } } Am I going about this in the right way? Can hibernate tell me programmatically (i.e. not as an error string) which value is violating the uniqueness constraint? By separating the query from the commit, am I inviting thread-safety errors, or am I safe? How is this usually done? Thanks!

    Read the article

  • Document.ready() failing on popup

    - by Seth Duncan
    I am using ASP.Net and jQuery/jQuery UI and I am trying to use the datepicker control. It works fine on every page, except when I have to use the popup (to add new data into the database and then i refresh the current page to reflect the new data being entered). It seems that document.ready() is failing when I use the popup. I can invoke the datepicker control manually with adding a click event to fire off the showcalendar function, however I want to try and make it work. Does anyone have any ideas of why a popup would fail document.ready() ? Thanks!

    Read the article

  • Custom array sort in perl

    - by ABach
    I have a perl array of to-do tasks that looks like this: @todos = ( "1 (A) Complete online final @evm4700 t:2010-06-02", "3 Write thank-you t:2010-06-10", "4 (B) Clean t:2010-05-30", "5 Donate to LSF t:2010-06-02", "6 (A) t:2010-05-30 Pick up dry cleaning", "2 (C) Call Chris Johnson t:2010-06-01" ); That first number is the task's ID. If a task has ([A-Z]) next to, that defines the task's priority. What I want to do is sort the tasks array in a way that places the prioritized items first (and in order): @todos = ( "1 (A) Complete online final @evm4700 t:2010-06-02", "6 (A) t:2010-05-30 Pick up dry cleaning", "4 (B) Clean t:2010-05-30", "2 (C) Call Chris Johnson t:2010-06-01" "3 Write thank-you t:2010-06-10", "5 Donate to LSF t:2010-06-02", ); I cannot use a regular sort() because of those IDs next to the tasks, so I'm assuming that some sort of customized sorting subroutine is needed. However, my knowledge of how to do this efficiently in perl is minimal. Thanks, all.

    Read the article

  • Ruby SerialPorts

    - by Seth Archer
    I'm using the ruby serial port gem. After I open up the port I send the data I want like this. sp.write [200.chr, 30.chr, 7.chr, 5.chr, 1.chr, 2.chr, 0.chr, 245.chr].to_s It doesn't work, but if I put it in a loop of around 200 times: 200.times do sp.write [200.chr, 30.chr, 7.chr, 5.chr, 1.chr, 2.chr, 0.chr, 245.chr].to_s end It works. Any ideas on why this is happening?

    Read the article

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