Search Results

Search found 1011 results on 41 pages for 'kirk patrick'.

Page 4/41 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Xceed DataGrid SelectedItem issue

    - by Patrick K
    In my project I have an Xceed data grid which is bound to a data source with many records and record details. I am attempting to create a context menu option that will allow the user to search for a specific detail in a specific column. While I have successfully completed the functionality there is a UI part that is giving me some trouble, in that when I select the row in C#, if that row is not in view the row is never focused on. Thus the user has to scroll up and down looking for the row with expanded details. I am able to set the SelectedRow and expand the details like so: this.grid.AutoFilterValues[userColumn].Clear(); this.grid.AutoFilterValues[userColumn].Add(userValue); if (this.creditLinesDataGridControl.Items.Count > 0) { this.grid.SelectedItem = this.grid.Items[0]; this.grid.ExpandDetails(this.grid.Items[0]); } else { MessageBox.Show("Value not found in column: " + userColumn); } this.grid.AutoFilterValues[userColumn].Clear(); where userColumn and userValue are set previously in the method. How can I make the grid focus on the row after I've set the SelectedItem and expanded the details? Thanks, Patrick

    Read the article

  • Fast sign in C++ float...are there any platform dependencies in this code?

    - by Patrick Niedzielski
    Searching online, I have found the following routine for calculating the sign of a float in IEEE format. This could easily be extended to a double, too. // returns 1.0f for positive floats, -1.0f for negative floats, 0.0f for zero inline float fast_sign(float f) { if (((int&)f & 0x7FFFFFFF)==0) return 0.f; // test exponent & mantissa bits: is input zero? else { float r = 1.0f; (int&)r |= ((int&)f & 0x80000000); // mask sign bit in f, set it in r if necessary return r; } } (Source: ``Fast sign for 32 bit floats'', Peter Schoffhauzer) I am weary to use this routine, though, because of the bit binary operations. I need my code to work on machines with different byte orders, but I am not sure how much of this the IEEE standard specifies, as I couldn't find the most recent version, published this year. Can someone tell me if this will work, regardless of the byte order of the machine? Thanks, Patrick

    Read the article

  • Maven Mojo & SCM Plugin: Check for a valid working directory

    - by Patrick Bergner
    Hi there. I'm using maven-scm-plugin from within a Mojo and am trying to figure out how to determine if a directory D is a valid working directory of an SCM URL U (i.e. a checkout of U to D already happened). The context is that I want to do a checkout of U if D is a working set or do an update if it isn't. The plan is to check out U to D if D does not exist, update D if D is a valid working directory of U, display an error if D exists and is not a valid working directory of U. What I tried is to call ScmManager.status(), ScmManager.list() and ScmManager.changelog() and try to guess something from their results. But that didn't work. The results from status and changelog always return something positive (isSuccess() = true, getChangedFiles() = valid List, no exceptions to catch), whereas list throws an exception in any case. ScmRepository and ScmFileSet don't seem to provide suitable methods as well. An option would be to always do an update if D exists but then I cannot tell if it is a working directory of U or any SCM working directory at all. The ideal solution would be independent of the actual SCM system and a specific ScmVersion. Thanks for your help! Patrick

    Read the article

  • Implementing a 1 to many relationship with SQLite

    - by Patrick
    I have the following schema implemented successfully in my application. The application connects desk unit channels to IO unit channels. The DeskUnits and IOUnits tables are basically just a list of desk/IO units and the number of channels on each. For example a desk could be 4 or 12 channel. CREATE TABLE DeskUnits (Name TEXT, NumChannels NUMERIC); CREATE TABLE IOUnits (Name TEXT, NumChannels NUMERIC); CREATE TABLE RoutingTable (DeskUnitName TEXT, DeskUnitChannel NUMERIC, IOUnitName TEXT, IOUnitChannel NUMERIC); The RoutingTable 'table' then connects each DeskUnit channel to an IOUnit channel. For example the DeskUnit called "Desk1" channel 1 may route to IOunit name "IOUnit1" channel 2, etc. So far I hope this is pretty straightforward and understandable. The problem is, however, this is a strictly 1 to 1 relationship. Any DeskUnit channel can route to only 1 IOUnit channel. Now, I need to implement a 1 to many relationship. Where any DeskUnit channel can connect to multiple IOUnit channels. I realise I may have to rearrange the tables completely, but I am not sure the best way to go about this. I am fairly new to SQLite and databases in general so any help would be appreciated. Thanks Patrick

    Read the article

  • Handling user interface in a multi-threaded application (or being forced to have a UI-only main thre

    - by Patrick
    In my application, I have a 'logging' window, which shows all the logging, warnings, errors of the application. Last year my application was still single-threaded so this worked [quite] good. Now I am introducing multithreading. I quickly noticed that it's not a good idea to update the logging window from different threads. Reading some articles on keeping the UI in the main thread, I made a communication buffer, in which the other threads are adding their logging messages, and from which the main thread takes the messages and shows them in the logging window (this is done in the message loop). Now, in a part of my application, the memory usage increases dramatically, because the separate threads are generating lots of logging messages, and the main thread cannot empty the communication buffer quickly enough. After the while the memory decreases again (if the other threads have finished their work and the main thread gradually empties the communication buffer). I solved this problem by having a maximum size on the communication buffer, but then I run into a problem in the following situation: the main thread has to perform a complex action the main thread takes some parts of the action and let's separate threads execute this while the seperate threads are executing their logic, the main thread processes the results from the other threads and continues with its work if the other threads are finished Problem is that in this situation, if the other threads perform logging, there is no UI-message loop, and so the communication buffer is filled, but not emptied. I see two solutions in solving this problem: require the main thread to do regular polling of the communication buffer only performing user interface logic in the main thread (no other logic) I think the second solution seems the best, but this may not that easy to introduce in a big application (in my case it performs mathematical simulations). Are there any other solutions or tips? Or is one of the two proposed the best, easiest, most-pragmatic solution? Thanks, Patrick

    Read the article

  • C++ Changing a class in a dll where a pointer to that class is returned to other dlls...

    - by Patrick
    Hello, Horrible title I know, horrible question too. I'm working with a bit of software where a dll returns a ptr to an internal class. Other dlls (calling dlls) then use this pointer to call methods of that class directly: //dll 1 internalclass m_class; internalclass* getInternalObject() { return &m_class; } //dll 2 internalclass* classptr = getInternalObject(); classptr->method(); This smells pretty bad to me but it's what I've got... I want to add a new method to internalclass as one of the calling dlls needs additional functionality. I'm certain that all dlls that access this class will need to be rebuilt after the new method is included but I can't work out the logic of why. My thinking is it's something to do with the already compiled calling dll having the physical address of each function within internalclass in the other dll but I don't really understand it; is anyone here able to provide a concise explanation of how the dlls (new internal class dll, rebuilt calling dll and calling dll built with previous version of the internal class dll) would fit together? Thanks, Patrick

    Read the article

  • Information about PTE's (Page Table Entries) in Windows

    - by Patrick
    In order to find more easily buffer overflows I am changing our custom memory allocator so that it allocates a full 4KB page instead of only the wanted number of bytes. Then I change the page protection and size so that if the caller writes before or after its allocated piece of memory, the application immediately crashes. Problem is that although I have enough memory, the application never starts up completely because it runs out of memory. This has two causes: since every allocation needs 4 KB, we probably reach the 2 GB limit very soon. This problem could be solved if I would make a 64-bit executable (didn't try it yet). even when I only need a few hundreds of megabytes, the allocations fail at a certain moment. The second problem is the biggest one, and I think it's related to the maximum number of PTE's (page table entries, which store information on how Virtual Memory is mapped to physical memory, and whether pages should be read-only or not) you can have in a process. My questions (or a cry-for-tips): Where can I find information about the maximum number of PTE's in a process? Is this different (higher) for 64-bit systems/applications or not? Can the number of PTE's be configured in the application or in Windows? Thanks, Patrick PS. note for those who will try to argument that you shouldn't write your own memory manager: My application is rather specific so I really want full control over memory management (can't give any more details) Last week we had a memory overwrite which we couldn't find using the standard C++ allocator and the debugging functionality of the C/C++ run time (it only said "block corrupt" minutes after the actual corruption") We also tried standard Windows utilities (like GFLAGS, ...) but they slowed down the application by a factor of 100, and couldn't find the exact position of the overwrite either We also tried the "Full Page Heap" functionality of Application Verifier, but then the application doesn't start up either (probably also running out of PTE's)

    Read the article

  • Coherence Special Interest Group: First Meeting in Toronto and Upcoming Events in New York and Calif

    - by [email protected]
    The first meeting of the Toronto Coherence Special Interest Group (TOCSIG). Date: Friday, April 23, 2010 Time: 8:30am-12:00pm Where: Oracle Mississauga Office, Customer Visitation Center, 110 Matheson Blvd. West, Suite 100, Mississauga, ON L5R3P4 Cameron Purdy, Vice President of Development (Oracle), Patrick Peralta, Senior Software Engineer (Oracle), and Noah Arliss, Software Development Manager (Oracle) will be presenting. Further information about this event can be seen here   The New York Coherence SIG is hosting its seventh meeting. Date: Thursday, Apr 15, 2010 Time: 5:30pm-5:45pm ET social and 5:45pm-8:00pm ET presentations Where: Oracle Office, Room 30076, 520 Madison Avenue, 30th Floor, Patrick Peralta, Dr. Gene Gleyzer, and Craig Blitz from Oracle, will be presenting. Further information about this event can be seen here   The Bay Area Coherence SIG is hosting its fifth meeting. Date: Thursday, Apr 29, 2009 Time: 5:30pm-5:45pm PT social and 5:45pm-8:00pm PT presentations Where: Oracle Conference Center, 350 Oracle Parkway, Room 203, Redwood Shores, CA Tom Lubinski from SL Corp., Randy Stafford from the Oracle A-team, and Taylor Gautier from Grid Dynamics will be presenting Further information about this event can be seen here   Great news, aren't they? 

    Read the article

  • Accenture Foundation Platform for Oracle (AFPO) – Your pre-build & tested middleware platform

    - by JuergenKress
    The Accenture Foundation Platform for Oracle (AFPO) is a pre-built, tested reference application, common services framework and development accelerator for Oracle’s Fusion Middleware 11g product suite that can help to reduce development time and cost by up to 30 percent. AFPO is a unique accelerator that includes documentation, day one deliverables and quick start virtual machine images, along with access to a skilled team of resources, to reduce risk and cost while improving project quality. It can be delivered all at once or in stages, on-site, hosted, or as a cloud solution. Accenture recently released AFPO v5 for use with their clients. Accenture added significant updates in v5 including Day 1 images & documentation for Webcenter & ADF Mobile that are integrated with 30 other Oracle Middleware products that signifigantly reduced the services aspect to standing these products up. AFPO v5 also features rapid configuration and implementation capabilities for SOA/BPM integrated with Oracle WebCenter Portal, Oracle WebCenter Content, Oracle Business Intelligence, Oracle Identity Management and Oracle ADF Mobile.  AFPO v5 also delivers a starter kit for Oracle SOA Suite which builds upon the integration methodology, leading practices and extended tooling contained within the Oracle Foundation Pack. The combination of the AFPO starter kit and Foundation Pack jump-start and streamline Oracle SOA Suite implementation initiatives, helping to reduce the risk of deploying new technologies and making architectural decisions, so clients can ultimately reduce cost, risk and the time needed for an implementation.  You'll find more information at: Accenture's website:  www.accenture.com/afpo YouTube AFPO Telestration:  http://www.youtube.com/watch?v=_x429DcHEJs Press Release Brochure Contacts: [email protected] Patrick J Sullivan (Accenture – Global Oracle Technology Lead), patrick[email protected] SOA & BPM Partner Community For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit  www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Mix Forum Technorati Tags: AFPO,Accenture,middleware platform,oracle middleware,SOA Community,Oracle SOA,Oracle BPM,Community,OPN,Jürgen Kress

    Read the article

  • Accenture Foundation Platform for Oracle (AFPO)

    - by Lionel Dubreuil
    The Accenture Foundation Platform for Oracle (AFPO) is a pre-built, tested reference application, common services framework and development accelerator for Oracle’s Fusion Middleware 11g product suite that can help to reduce development time and cost by up to 30 percent. AFPO is a unique accelerator that includes documentation, day one deliverables and quick start virtual machine images, along with access to a skilled team of resources, to reduce risk and cost while improving project quality. It can be delivered all at once or in stages, on-site, hosted, or as a cloud solution. Accenture recently released AFPO v5 for use with their clients. Accenture added significant updates in v5 including Day 1 images & documentation for Webcenter & ADF Mobile that are integrated with 30 other Oracle Middleware products that signifigantly reduced the services aspect to standing these products up. AFPO v5 also features rapid configuration and implementation capabilities for SOA/BPM integrated with Oracle WebCenter Portal, Oracle WebCenter Content, Oracle Business Intelligence, Oracle Identity Management and Oracle ADF Mobile.  AFPO v5 also delivers a starter kit for Oracle SOA Suite which builds upon the integration methodology, leading practices and extended tooling contained within the Oracle Foundation Pack. The combination of the AFPO starter kit and Foundation Pack jump-start and streamline Oracle SOA Suite implementation initiatives, helping to reduce the risk of deploying new technologies and making architectural decisions, so clients can ultimately reduce cost, risk and the time needed for an implementation.  You'll find more information at: Accenture's website:  www.accenture.com/afpo YouTube AFPO Telestration:  http://www.youtube.com/watch?v=_x429DcHEJs Press Release Brochure  Contacts: [email protected] Patrick J Sullivan (Accenture – Global Oracle Technology Lead), patrick[email protected]

    Read the article

  • Maven Integrated View for NetBeans IDE

    - by Geertjan
    Started working on an oft-heard request from Kirk Pepperdine for an integrated view for multimodule builds for Maven projects in NetBeans IDE, as explained here. I suddenly had some kind of brainwave and solved all the remaining problems I had, by delegating to the LogicalViewProvider's node, instead of the project's node, which means I inherit all the icons, actions, package nodes, and anything else that was originally defined within the original project, in this case for the open source JAnnocessor project: Above, you can see that the Maven submodules can either be edited in-line, i.e., within the parent project, or separately, by opening them in the traditional NetBeans way. Get the module here: http://plugins.netbeans.org/plugin/45180/?show=true Some people out there might be interested in how this is achieved. First, hide the original ModulesNodeFactory in the layer. Then create the following class, which creates what you see in the screenshot above: import java.util.ArrayList; import java.util.List; import javax.swing.event.ChangeListener; import org.netbeans.api.project.Project; import org.netbeans.spi.project.SubprojectProvider; import org.netbeans.spi.project.ui.LogicalViewProvider; import org.netbeans.spi.project.ui.support.NodeFactory; import org.netbeans.spi.project.ui.support.NodeList; import org.openide.nodes.FilterNode; import org.openide.nodes.Node; @NodeFactory.Registration(projectType = "org-netbeans-modules-maven", position = 400) public class ModulesNodeFactory2 implements NodeFactory { @Override public NodeList<?> createNodes(Project prjct) { return new MavenModulesNodeList(prjct); } private class MavenModulesNodeList implements NodeList<Project> { private final Project project; public MavenModulesNodeList(Project prjct) { this.project = prjct; } @Override public List<Project> keys() { return new ArrayList<Project>( project.getLookup(). lookup(SubprojectProvider.class).getSubprojects()); } @Override public Node node(final Project project) { Node node = project.getLookup().lookup(LogicalViewProvider.class).createLogicalView(); return new FilterNode(node, new FilterNode.Children(node)); } @Override public void addChangeListener(ChangeListener cl) { } @Override public void removeChangeListener(ChangeListener cl) { } @Override public void addNotify() { } @Override public void removeNotify() { } } } Considering that there's only about 5 actual statements above, it's pretty amazing how much can be achieved with so little code. The NetBeans APIs really are very cool. Hope you like it, Kirk!

    Read the article

  • Make ListView.ScrollIntoView Scroll the Item into the Center of the ListView (C#)

    - by Kirk
    ListView.ScrollIntoView(object) currently finds an object in the ListView and scrolls to it. If you are positioned beneath the object you are scrolling to, it scrolls the object to the top row. If you are positioned above, it scrolls it into view at the bottom row. I'd like to have the item be scrolled right into the center of my list view if it is currently not visible. Is there an easy way to accomplish this?

    Read the article

  • How do I get spring to inject my EntityManager?

    - by Trampas Kirk
    I'm following the guide here, but when the DAO executes, the EntityManager is null. I've tried a number of fixes I found in the comments on the guide, on various forums, and here (including this), to no avail. No matter what I seem to do the EntityManager remains null. Here are the relevant files, with packages etc changed to protect the innocent. spring-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:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd" xmlns:p="http://www.springframework.org/schema/p"> <context:component-scan base-package="com.group.server"/> <context:annotation-config/> <tx:annotation-driven/> <bean id="propertyPlaceholderConfigurer" class="com.group.DecryptingPropertyPlaceholderConfigurer" p:systemPropertiesModeName="SYSTEM_PROPERTIES_MODE_OVERRIDE"> <property name="locations"> <list> <value>classpath*:spring-*.properties</value> <value>classpath*:${application.environment}.properties</value> </list> </property> </bean> <bean id="orderDao" class="com.package.service.OrderDaoImpl"/> <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="persistenceUnitName" value="MyServer"/> <property name="loadTimeWeaver"> <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/> </property> <property name="dataSource" ref="dataSource"/> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="showSql" value="${com.group.server.vendoradapter.showsql}"/> <property name="generateDdl" value="${com.group.server.vendoradapter.generateDdl}"/> <property name="database" value="${com.group.server.vendoradapter.database}"/> </bean> </property> </bean> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory"/> <property name="dataSource" ref="dataSource"/> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="${com.group.server.datasource.driverClassName}"/> <property name="url" value="${com.group.server.datasource.url}"/> <property name="username" value="${com.group.server.datasource.username}"/> <property name="password" value="${com.group.server.datasource.password}"/> </bean> <bean id="executorService" class="java.util.concurrent.Executors" factory-method="newCachedThreadPool"/> </beans> persistence.xml <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"> <persistence-unit name="MyServer" transaction-type="RESOURCE_LOCAL"/> </persistence> OrderDaoImpl package com.group.service; import com.group.model.Order; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import java.util.List; @Repository @Transactional public class OrderDaoImpl implements OrderDao { private EntityManager entityManager; @PersistenceContext public void setEntityManager(EntityManager entityManager) { this.entityManager = entityManager; } @Override public Order find(Integer id) { Order order = entityManager.find(Order.class, id); return order; } @Override public List<Order> findAll() { Query query = entityManager.createQuery("select o from Order o"); return query.getResultList(); } @Override public List<Order> findBySymbol(String symbol) { Query query = entityManager.createQuery("select o from Order o where o.symbol = :symbol"); return query.setParameter("symbol", symbol).getResultList(); } }

    Read the article

  • Using Treelist Values to Query a Sitecore Item

    - by kirk.burleson
    I have an item named All Recipes that contains recipes named R1, R2, and R3. I have another item named My Recipes that has a treelist field named Recipes and it contains selected values R2 and R3 from the All Recipes item. The query I'm trying to write is for the Items field of an RSS Feed. What is the query syntax to show the items in All Recipes that appear in the Recipes field of My Recipes?

    Read the article

  • When am I ready for contracting work?

    - by Kirk Broadhurst
    What skills are required to work on a temp / contracting basis, and how does a developer know when they are ready to work in these circumstances? I have some colleagues who are suggesting contracting work is 'the way to go'; the pay is significantly better. It appears that when a permanent position pays (X times $10k) per year, the corresponding contract position pays almost $X per hour - which is close to twice as much. I look forward to doing this type of work as an experienced expert, but worry that by doing so right now I'd be turning away learning and development opportunities. My assumptions about contract work are the following: less / zero money invested on training and development less concern for job satisfaction and learning ("they won't be here in 12 months") possibly less concern about the overall quality of the project ("we won't be here in 12 months") There are similar questions on stack overflow at the moment but what I've really looking for is: What does the developer give up by moving to contract work? Is it preferable to have structured learning in a permanent position rather than seat-of-the-pants learning in a contract position? What skill leve should the contractor have before making the move? Is there still the same kind of growth in contracting that there is in permanent positions? Rightly or wrongly, I see this as a choice between $ (contracting) and learning / development (permanent). Is this fair?

    Read the article

  • Regex to Match White Space or End of String

    - by Kirk
    I'm trying to find every instance of @username in comment text and replace it with a link. Here's my PHP so far: $comment = preg_replace('/@(.+?)\s/', '<a href="/users/${1}/">@${1}</a> ', $comment); The only problem is the regex is dependent upon there being whitespace after the @username reference. Can anyone help me tweak this so it will also match if it is at the end of the string?

    Read the article

  • Code for decoding/encoding a modified base64 URL

    - by Kirk Liemohn
    I want to base64 encode data to put it in a URL and then decode it within my HttpHandler. I have found that Base64 Encoding allows for a '/' character which will mess up my UriTemplate matching. Then I found that there is a concept of a "modified Base64 for URL" from wikipedia: A modified Base64 for URL variant exists, where no padding '=' will be used, and the '+' and '/' characters of standard Base64 are respectively replaced by '-' and '_', so that using URL encoders/decoders is no longer necessary and has no impact on the length of the encoded value, leaving the same encoded form intact for use in relational databases, web forms, and object identifiers in general. Using .NET I want to modify my current code from doing basic base64 encoding and decoding to using the "modified base64 for URL" method. Has anyone done this? To decode, I know it starts out with something like: string base64EncodedText = base64UrlEncodedText.Replace('-', '+').Replace('_', '/'); // Append '=' char(s) if necessary - how best to do this? // My normal base64 decoding now uses encodedText But, I need to potentially add one or two '=' chars to the end which looks a little more complex. My encoding logic should be a little simpler: // Perform normal base64 encoding byte[] encodedBytes = Encoding.UTF8.GetBytes(unencodedText); string base64EncodedText = Convert.ToBase64String(encodedBytes); // Apply URL variant string base64UrlEncodedText = base64EncodedText.Replace("=", String.Empty).Replace('+', '-').Replace('/', '_'); I have seen the Guid to Base64 for URL StackOverflow entry, but that has a known length and therefore they can hardcode the number of equal signs needed at the end.

    Read the article

  • NHibernate HiLo generation and SQL 2005/8 Schemas

    - by Kirk Clawson
    I have an issue on my hands that I've spent several days searching for an answer to no avail... We're using HiLo Id generation, and everything seems to be working fine, as long as the entity table is in the same schema as the hibernate_unique_key table. The table structure is pretty simple. I have my hi value table in the db as dbo.hibernate_unique_key. Several entity table are also in the dbo schema, and they work without issue. Then we have tables under the "Contact" schema (such as Contact.Person and Contact.Address). In the Person Mapping file: <class name="Person" table="Person" schema="Contact"> <id name="Id" unsaved-value="0"> <generator class="hilo"> <param name="max_lo">100</param> </generator> </id> ... When I try to insert a Person entity, I get an error of "Invalid object name 'Contact.hibernate_unique_key'. That error is certainly clear enough. So I add: <param name="schema">dbo</param> to my mapping file/generator element. Now, when the SessionFactory is built, I get a "An item with the same key has already been added." error. So now I'm a bit stuck. I can't leave the HiLo generator without a schema, because it picks up the schema from the Class, and I can't specify the schema because it's already been added (presumably because it's my "default_schema" as identified in my XML cfg file). Am I completely hosed here? Must I either A) Keep all my tables in the dbo schema or B) Create a separate HiLo Key table for each unique schema in the DB? Neither of those scenarios is particularly palatable for my application, so I'm hoping that I can "fix" my mapping files to address this issue.

    Read the article

  • PHP Markdown Extra and Definition Lists

    - by Kirk Bentley
    I'm currently generating a definition list with PHP Markdown Extra with the following syntax: Term : Description : Description Two My Other Term : Description which generates the following HTML: <dl> <dt>Term</dt> <dd>Description</dd> <dd>Description Two</dd> <dt>My Other Term</dt> <dd>Description</dd> </dl> Does anyone know how I can get Markdown to create separate definition lists for each definition term and descriptions to create markup like this? <dl> <dt>Term</dt> <dd>Description</dd> <dd>Description Two</dd> </dl> <dl <dt>My Other Term</dt> <dd>Description</dd> </dl>

    Read the article

  • RegEx, Php, Preg_match, Phone numbers, Oh my!

    - by Kirk
    How do I find phone number of the following format and store them to a variable. It needs to match 3334445555, 333.444.5555, 333-444-5555, 333 444 5555, (333) 444 5555 and all combinations thereof. Here is the frame of it $regex = expression; if (preg_match ('/$regex/', matches)) { $phone = matches[1]; }

    Read the article

  • Xpath > How can I select a node based on both its attributes and content?

    - by Andrew Kirk
    Sample XML: <assignments> <assignment id="911990211" section-id="1942268885" item-count="21" sources="foo"> <options> <value name="NumRetakes">4</value> <value name="MultipleResultGrading">6</value> <value name="MaxFeedbackAttempts">-1</value> <value name="ItemTakesBeforeHint">1</value> <value name="TimeAllowed">0</value> </options> </assignment> <assignment id="1425185257" section-id="1505958877" item-count="4" sources="bar"> <options> <value name="NumRetakes">0</value> <value name="MultipleResultGrading">6</value> <value name="MaxFeedbackAttempts">3</value> <value name="ItemTakesBeforeHint">1</value> <value name="TimeAllowed">0</value> </options> </assignment> <assignments> Using XPath, I would like to select all assignments/assignment/options/value nodes where the nodes "name" attribute is "MaxFeedbackAttempts" and the nodes content is "-1". That is to say, I want to return each node that looks like: <value name="MaxFeedbackAttempts">-1</value> I can get each assignments/assignment/options/value node with the specified attribute using: //assignment/options/value[@name="MaxFeedbackAttempts"] I am just not sure how to refine this path to also limit the results based on the nodes content. Is there any way to do this using XPath?

    Read the article

  • SQL Server won't perform regular expression validation on XML column

    - by Kirk Broadhurst
    Hi I have an XML column in my table which contains this xsd snippet: <xsd:element name="Postcode" minOccurs="0"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:pattern value="^[0-9]{4}$" /> </xsd:restriction> </xsd:simpleType> </xsd:element> The regular expression should require a string containing 4 numerical digits. It validates perfectly in Visual Studio and is a correct regular expression. SQL Server, on the other hand, won't accept it. The error message I receive is: XML Validation: Invalid simple type value: '1234'. Location: / * : Donor[1]/*:Postcode[1]. I have an email address regex working fine, but can't get this simple numerical regex to work.

    Read the article

  • Why is my Map broken?

    - by Kirk
    Scenario: Creating a server which has Room objects which contain User objects. I want to store the rooms in a Map of some sort by Id (a string). Desired Behavior: When a user makes a request via the server, I should be able to look up the Room by id from the library and then add the user to the room, if that's what the request needs. Currently I use the static function in my Library.java class where the Map is stored to retrieve Rooms: public class Library { private static Hashtable<String, Rooms> myRooms = new Hashtable<String, Rooms>(); public static addRoom(String s, Room r) { myRooms.put(s, r); } public static Room getRoomById(String s) { return myRooms.get(s); } } In another class I'll do the equivalent of myRoom.addUser(user); What I'm observing using Hashtable, is that no matter how many times I add a user to the Room returned by getRoomById, the user is not in the room later. I thought that in Java, the object that was returned was essentially a reference to the data, the same object that was in the Hashtable with the same references; but, it isn't behaving like that. Is there a way to get this behavior? Maybe with a wrapper of some sort? Am I just using the wrong variant of map? Help?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >