Search Results

Search found 1514 results on 61 pages for 'adam fisher'.

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

  • StyleCop XML Documentation Header - Using 3 /// instead of 2 //

    - by Adam Jenkin
    I am using XML documentation headers on my c# files to pass the StyleCop rule SA1633. Currently, I have to use the 2 slash commenting rule to allow StyleCop to recognize the header. for example: // <copyright file="abc.ascx.cs" company="MyCompany.com"> // MyCompany.com. All rights reserved. // </copyright> // <author>Me</author> This works fine for StyleCop, however I would like to use the 3 slash commenting rule to enable visual studio to understand the comments as XML and provide the XML functionality (highlighting, auto indenting etc) /// <copyright file="abc.ascx.cs" company="MyCompany.com"> /// MyCompany.com. All rights reserved. /// </copyright> /// <author>Me</author> The problem is that when using 3 slashes, StyleCop no longer see's the header and throws the SA1633 warning. Is there anyway to configure stylecop to understand the header is contained in XML using 3 slashes? Thanks, Adam

    Read the article

  • Errors with shotgun gem and msvcrt-ruby18.dll when running my Sinatra app

    - by Adam Siddhi
    Greetings, Every time I make a change to a Sinatra app I'm working on and try to refresh the browser (located at http://localhost:4567/) the browser will refresh and, the console window seems to restart the WEB brick server. The problem is that the content in the browser window does not change. A friend of mine told me it was a shotgun issue and referred me to rtomayko's shotgun gem: http://github.com/rtomayko/shotgun On this page I read that the shotgun gem would basically solve my problem, allowing the changes made to my app to show up in the browser window after I refresh it. So I installed the shotgun gem. The installation was successful. To activate the shotgun function you have to type shotgun before the file name. In this case my Sinatra app's file name is shortener.rb When I type shotgun shortener.rb to run my Sinatra app I get this error: C:\ruby\sinatrashotgun shortener.rb c:/Ruby19/lib/ruby/gems/1.9.1/gems/shotgun-0.6/bin/shotgun:137:in `': No such f ile or directory - uname (Errno::ENOENT) from c:/Ruby19/lib/ruby/gems/1.9.1/gems/shotgun-0.6/bin/shotgun:137:in block in ' from c:/Ruby19/lib/ruby/gems/1.9.1/gems/shotgun-0.6/bin/shotgun:136:in each' from c:/Ruby19/lib/ruby/gems/1.9.1/gems/shotgun-0.6/bin/shotgun:136:in find' from c:/Ruby19/lib/ruby/gems/1.9.1/gems/shotgun-0.6/bin/shotgun:136:in <top (required)>' from c:/Ruby19/bin/shotgun:19:inload' from c:/Ruby19/bin/shotgun:19:in `' I should also mention that before testing the shotgun method out to see if it worked, I installed the mongrel (I realize I should have checked to see if shotgun worked before doing this as installing mongrel has complicated this problem). So on top of getting the error message above I also get a pop up window from Ruby.exe saying: Ruby.exe - Unable to load component This application has failed to start because msvcrt-ruby18.dll was not found. Re-installing the application may fix this problem. I have no idea what msvcrt-ruby18.dll is but I know that installing either shotgun and/or mongrel created this problem. Where to go from here? Thanks, Adam

    Read the article

  • HOW TO: Draggable legend in matplotlib

    - by Adam Fraser
    QUESTION: I'm drawing a legend on an axes object in matplotlib but the default positioning which claims to place it in a smart place doesn't seem to work. Ideally, I'd like to have the legend be draggable by the user. How can this be done? SOLUTION: Well, I found bits and pieces of the solution scattered among mailing lists. I've come up with a nice modular chunk of code that you can drop in and use... here it is: class DraggableLegend: def __init__(self, legend): self.legend = legend self.gotLegend = False legend.figure.canvas.mpl_connect('motion_notify_event', self.on_motion) legend.figure.canvas.mpl_connect('pick_event', self.on_pick) legend.figure.canvas.mpl_connect('button_release_event', self.on_release) legend.set_picker(self.my_legend_picker) def on_motion(self, evt): if self.gotLegend: dx = evt.x - self.mouse_x dy = evt.y - self.mouse_y loc_in_canvas = self.legend_x + dx, self.legend_y + dy loc_in_norm_axes = self.legend.parent.transAxes.inverted().transform_point(loc_in_canvas) self.legend._loc = tuple(loc_in_norm_axes) self.legend.figure.canvas.draw() def my_legend_picker(self, legend, evt): return self.legend.legendPatch.contains(evt) def on_pick(self, evt): if evt.artist == self.legend: bbox = self.legend.get_window_extent() self.mouse_x = evt.mouseevent.x self.mouse_y = evt.mouseevent.y self.legend_x = bbox.xmin self.legend_y = bbox.ymin self.gotLegend = 1 def on_release(self, event): if self.gotLegend: self.gotLegend = False ...and in your code... def draw(self): ax = self.figure.add_subplot(111) scatter = ax.scatter(np.random.randn(100), np.random.randn(100)) legend = DraggableLegend(ax.legend()) I emailed the Matplotlib-users group and John Hunter was kind enough to add my solution it to SVN HEAD. On Thu, Jan 28, 2010 at 3:02 PM, Adam Fraser wrote: I thought I'd share a solution to the draggable legend problem since it took me forever to assimilate all the scattered knowledge on the mailing lists... Cool -- nice example. I added the code to legend.py. Now you can do leg = ax.legend() leg.draggable() to enable draggable mode. You can repeatedly call this func to toggle the draggable state. I hope this is helpful to people working with matplotlib.

    Read the article

  • Defining an Entity Framework 1:1 association

    - by Craig Fisher
    I'm trying to define a 1:1 association between two entities (one maps to a table and the other to a view - using DefinedQuery) in an Entity Framework model. When trying to define the mapping for this in the designer, it makes me choose the (1) table or view to map the association to. What am I supposed to choose? I can choose either of the two tables but then I am forced to choose a column from that table (or view) for each end of the relationship. I would expect to be able to choose a column from one table for one end of the association and a column from the other table for the other end of the association, but there's no way to do this. Here I've chosen to map to the "DW_ WF_ClaimInfo" view and it is forcing me to choose two columns from that view - one for each end of the relationship. I've also tried defining the mapping manually in the XML as follows: <AssociationSetMapping Name="Entity1Entity2" TypeName="ClaimsModel.Entity1Entity2" StoreEntitySet="Entity1"> <EndProperty Name="Entity2"> <ScalarProperty Name="DOCUMENT" ColumnName="DOCUMENT" /> </EndProperty> <EndProperty Name="Entity1"> <ScalarProperty Name="PK_DocumentId" ColumnName="PK_DocumentId" /> </EndProperty> </AssociationSetMapping> But this gives: Error 2010: The Column 'DOCUMENT' specified as part of this MSL does not exist in MetadataWorkspace. Seems like it still expects both columns to come from the same table, which doesn't make sense to me. Furthermore, if I select the same key for each end, e.g.: <AssociationSetMapping Name="Entity1Entity2" TypeName="ClaimsModel.Entity1Entity2" StoreEntitySet="Entity1"> <EndProperty Name="Entity2"> <ScalarProperty Name="DOCUMENT" ColumnName="PK_DocumentId" /> </EndProperty> <EndProperty Name="Entity1"> <ScalarProperty Name="PK_DocumentId" ColumnName="PK_DocumentId" /> </EndProperty> </AssociationSetMapping> I then get: Error 3021: Problem in Mapping Fragment starting at line 675: Each of the following columns in table AssignedClaims is mapped to multiple conceptual side properties: AssignedClaims.PK_DocumentId is mapped to <AssignedClaimDW_WF_ClaimInfo.DW_WF_ClaimInfo.DOCUMENT, AssignedClaimDW_WF_ClaimInfo.AssignedClaim.PK_DocumentId> What am I not getting?

    Read the article

  • WPF Update Binding when Bound directly to DataContext w/ Converter

    - by Adam
    Normally when you want a databound control to 'update,' you use the "PropertyChanged" event to signal to the interface that the data has changed behind the scenes. For instance, you could have a textblock that is bound to the datacontext with a property "DisplayText" <TextBlock Text="{Binding Path=DisplayText}"/> From here, if the DataContext raises the PropertyChanged event with PropertyName "DisplayText," then this textblock's text should update (assuming you didn't change the Mode of the binding). However, I have a more complicated binding that uses many properties off of the datacontext to determine the final look and feel of the control. To accomplish this, I bind directly to the datacontext and use a converter. In this case I am working with an image source. <Image Source="{Binding Converter={StaticResource ImageConverter}}"/> As you can see, I use a {Binding} with no path to bind directly to the datacontext, and I use an ImageConverter to select the image I'm looking for. But now I have no way (that I know of) to tell that binding to update. I tried raising the propertychanged event with "." as the propertyname, which did not work. Is this possible? Do I have to wrap up the converting logic into a property that the binding can attach to, or is there a way to tell the binding to refresh (without explicitly refreshing the binding)? Any help would be greatly appreciated. Thanks! -Adam

    Read the article

  • Oracle command hangs when using view for "WHERE x IN..." subquery

    - by Calvin Fisher
    I'm working on a web service that fetches data from an oracle data source in chunks and passes it back to an indexing/search tool in XML format. I'm the C#/.NET guy, and am kind of fuzzy on parts of Oracle. Our Oracle team gave us the following script to run, and it works well: SELECT ROWID, [columns] FROM [table] WHERE ROWID IN ( SELECT ROWID FROM ( SELECT ROWID FROM [table] WHERE ROWID > '[previous_batch_last_rowid]' ORDER BY ROWID ) WHERE ROWNUM <= 10000 ) ORDER BY ROWID 10,000 rows is an arbitrary but reasonable chunk size and ROWID is sufficiently unique for our purposes to use as a UID since each indexing run hits only one table at a time. Bracketed values are filled in programmatically by the web service. Now we're going to start adding views to the indexing, each of which will union a few separate tables. Since ROWID would no longer function as a unique identifier, they added a column to the views (VIEW_UNIQUE_ID) that concatenates the ROWIDs from the component tables to construct a UID for each union. But this script does not work, even though it follows the same form as the previous one: SELECT VIEW_UNIQUE_ID, [columns] FROM [view] WHERE VIEW_UNIQUE_ID IN ( SELECT VIEW_UNIQUE_ID FROM ( SELECT VIEW_UNIQUE_ID FROM [view] WHERE ROWID > '[previous_batch_last_view_unique_id]' ORDER BY VIEW_UNIQUE_ID ) WHERE ROWNUM <= 10000 ) ORDER BY VIEW_UNIQUE_ID It hangs indefinitely with no response from the Oracle server. I've waited 20+ minutes and the SQLTools dialog box indicating a running query remains the same, with no progress or updates. I've tested each subquery independently and each works fine and takes a very short amount of time (<= 1 second), so the view itself is sound. But as soon as the inner two SELECT queries are added with "WHERE VIEW_UNIQUE_ID IN...", it hangs. Why doesn't this query work for views? In what important way are they not interchangeable here?

    Read the article

  • Signup form using Braintree Transparent Redirect

    - by Robin Fisher
    Hi, I'm developing an application in Rails and want the user to be able to signup and provide their card details on one form. I'm using the Braintree API and their transparent redirect, which means that the form data is posted directly to Braintree. How can I store and later retrieve the non-payment related information provided by the user from that form e.g. account name, username? These values are not returned in the response provided by Braintree. If you look at the Basecamp signup process, this is the result I want to achieve. Thanks Robin

    Read the article

  • Call Multiple Stored Procedures with the Zend Framework

    - by Brian Fisher
    I'm using Zend Framework 1.7.2, MySQL and the MySQLi PDO adapter. I would like to call multiple stored procedures during a given action. I've found that on Windows there is a problem calling multiple stored procedures. If you try it you get the following error message: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. I found that to work around this issue I could just close the connection to the database after each call to a stored procedure: if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { //If on windows close the connection $db->closeConnection(); } This has worked well for me, however, now I want to call multiple stored procedures wrapped in a transaction. Of course, closing the connection isn't an option in this situation, since it causes a rollback of the open transaction. Any ideas, how to fix this problem and/or work around the issue. More info about the work around Bug report about the problem

    Read the article

  • Date since 1600 to NSDate?

    - by Steven Fisher
    I have a date that's stored as a number of days since January 1, 1600 that I need to deal with. This is a legacy date format that I need to read many, many times in my application. Previously, I'd been creating a calendar, empty date components and root date like this: self.gregorian = [[[NSCalendar alloc] initWithCalendarIdentifier: NSGregorianCalendar ] autorelease]; id rootComponents = [[[NSDateComponents alloc] init] autorelease]; [rootComponents setYear: 1600]; [rootComponents setMonth: 1]; [rootComponents setDay: 1]; self.rootDate = [gregorian dateFromComponents: rootComponents]; self.offset = [[[NSDateComponents alloc] init] autorelease]; Then, to convert the integer later to a date, I use this: [offset setDay: theLegacyDate]; id eventDate = [gregorian dateByAddingComponents: offset toDate: rootDate options: 0]; (I never change any values in offset anywhere else.) The problem is I'm getting a different time for rootDate on iOS vs. Mac OS X. On Mac OS X, I'm getting midnight. On iOS, I'm getting 8:12:28. (So far, it seems to be consistent about this.) When I add my number of days later, the weird time stays. OS | legacyDate | rootDate | eventDate ======== | ========== | ==========================|========================== Mac OS X | 143671 | 1600-01-01 00:00:00 -0800 | 1993-05-11 00:00:00 -0700 iOS | 143671 | 1600-01-01 08:12:28 +0000 | 1993-05-11 07:12:28 +0000 In the previous release of my product, I didn't care about the time; now I do. Why the weird time on iOS, and what should I do about it? (I'm assuming the hour difference is DST.) I've tried setting the hour, minute and second of rootComponents to 0. This has no impact. If I set them to something other than 0, it adds them to 8:12:28. I've been wondering if this has something to do with leap seconds or other cumulative clock changes. Or is this entirely the wrong approach to use on iOS?

    Read the article

  • Maven artifacts could not be resolved

    - by Adam Fisher
    I added the spring and jboss repositories to my pom.xml like below: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <name>MyProject</name> <url>http://www.myproject.com</url> <modelVersion>4.0.0</modelVersion> <groupId>com.myproject</groupId> <artifactId>myproject</artifactId> <version>1.0-SNAPSHOT</version> <packaging>war</packaging> <dependencies> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.1.3-b02</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-impl</artifactId> <version>2.1.3_01</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.0.2</version> <scope>runtime</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>3.0-alpha-1</version> <scope>runtime</scope> </dependency> <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <version>1.1.2</version> <scope>runtime</scope> </dependency> <!-- SPRING DEPENDENCIES --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring</artifactId> <version>3.0.6.RELEASE</version> </dependency> <!-- HIBERNATE DEPENDENCIES --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate</artifactId> <version>3.5.4-Final</version> </dependency> <!-- PRIMEFACES --> <dependency> <groupId>org.primefaces</groupId> <artifactId>primefaces</artifactId> <version>3.0.M4</version> </dependency> <dependency> <groupId>org.primefaces.themes</groupId> <artifactId>aristo</artifactId> <version>1.0.1</version> </dependency> <!-- OTHER DEPENDENCIES --> <dependency> <groupId>org.jsoup</groupId> <artifactId>jsoup</artifactId> <version>1.5.2</version> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.5</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.18</version> <scope>provided</scope> </dependency> <dependency> <groupId>net.authorize</groupId> <artifactId>java-anet-sdk</artifactId> <version>1.4.2</version> </dependency> <dependency> <groupId>com.amazonaws</groupId> <artifactId>aws-java-sdk</artifactId> <version>1.2.12</version> </dependency> <dependency> <groupId>com.ocpsoft</groupId> <artifactId>prettyfaces-jsf2</artifactId> <version>3.3.2</version> </dependency> <dependency> <groupId>javax</groupId> <artifactId>javaee-web-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> </dependencies> <properties> <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <netbeans.hint.j2eeVersion>1.6</netbeans.hint.j2eeVersion> <netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server> </properties> <repositories> <repository> <id>jsf20</id> <name>Repository for library Library[jsf20]</name> <url>http://download.java.net/maven/2/</url> <layout>default</layout> </repository> <repository> <id>prime-repo</id> <name>PrimeFaces Maven Repository</name> <url>http://repository.primefaces.org</url> <layout>default</layout> </repository> <repository> <id>jboss-public-repository-group</id> <name>JBoss Public Maven Repository Group</name> <url>https://repository.jboss.org/nexus/content/repositories/releases/</url> <layout>default</layout> </repository> <repository> <id>spring-release</id> <name>Spring Release Repository</name> <url>http://maven.springframework.org/release</url> <layout>default</layout> </repository> </repositories> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> <compilerArguments> <endorseddirs>${endorsed.dir}</endorseddirs> </compilerArguments> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.1</version> <executions> <execution> <phase>validate</phase> <goals> <goal>copy</goal> </goals> <configuration> <outputDirectory>${endorsed.dir}</outputDirectory> <silent>true</silent> <artifactItems> <artifactItem> <groupId>javax</groupId> <artifactId>javaee-endorsed-api</artifactId> <version>6.0</version> <type>jar</type> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> </plugins> <finalName>${project.artifactId}</finalName> </build> <!--pluginRepositories> <pluginRepository> <id>caucho</id> <name>Caucho</name> <url>http://caucho.com/m2</url> </pluginRepository> </pluginRepositories--> </project> But when I build, I get an error: The following artifacts could not be resolved: org.springframework:spring:jar:3.0.6.RELEASE, org.hibernate:hibernate:jar:3.5.4-Final: Could not find artifact org.springframework:spring:jar:3.0.6.RELEASE in jsf20 (http://download.java.net/maven/2/) -> [Help 1] It's like maven only looks at the first repository and not the ones defined for spring and hibernate.

    Read the article

  • PostgreSQL: Auto-partition a table

    - by Adam Matan
    Hi, I have a huge database which holds pairs of numbers (A,B), each ranging from 0 to 10,000 and stored as floats. e.g., (1, 9984.4), (2143.44, 124.243), (0.55, 0), ... Since the PostgreSQL table which stores these pairs grew quite large, I have decided to partition it into inheriting sub-tables. I intend to create 100 such tables, each storing a range of 1000x1000. The problem is that these numbers tend to come in large chunks of nearby numbers. It means that in the future, some tables will be nearly empty and some will hold a very large portion of the database. Unfortunately, the distribution of future pairs is yet unknown. I am looking for a way to automatically repartition my table. That means that if a certain subtable holds more than a specific number of pairs, it will be automatically partitioned into four sub-sub tables, and so on. My questions are: Is recursive partitioning and inheritance possible in PostgreSQL 8.3? Will indexes and query plans understand it? What's the best way to split a subtable once it grew too large? I should point out that this isn't a live database, so a downtime of few hours every week is totally acceptable. Thanks in advance, Adam

    Read the article

  • Codility-like sites for code golfs

    - by Adam Matan
    Hi, I've run into codility.com new cool service after listening to one of the recent stackoverflow.com podcasts. In short, it presents the user with a programming riddle to solve, within a given time frame. The user writes code in an online editor, and has the ability to run the program and view the standard output. After final submission, the user sees its final score and which tests failed him. Quoting Joel Spolsky: You are given a programming problem, you can do it in Java, C++, C#, C, Pascal, Python and PHP, which is pretty cool, and you have 30 minutes. And it gives you an editor in a webpage. And you've got to just start typing your code. And it's going to time you, basically you have to do it in a certain amount of time. And it actually runs your code and determines the performance characteristics of your code. It is intended for job interview screenings, but the idea seems very cool for code-golfs and for practicing new languages. Do you know if there's any proper open replacement? Adam

    Read the article

  • How do you tell if your migrations are up to date with migratordotnet?

    - by Lance Fisher
    I'm using migratordotnet to manage my database migrations. I'm running them on application setup like this, but I would also like to check on application startup that the migrations are up to date, and provide the option to migrate to latest. How do I tell if there are available migrations that need to be applied? I see that I can get the migrations that were applied like this var asm = Assembly.GetAssembly(typeof(Migration_0001)); var migrator = new Migrator.Migrator("SqlServer", setupInfo.DatabaseConnectionString, asm); var applied = migrator.AppliedMigrations; I like to do something like this: var available = migrator.AvailableMigrations; //this property does not exist.

    Read the article

  • Strange ng-model behavior inside ng-repeat

    - by Mike Fisher
    I'm trying to build up a complex post request to run a report in my Angular app. I have a list of inputs all dynamically generated via an ng-repeat a simple version of my html looks like this. <div ng-repeat="filter in lists.filters"> <input type="checkbox" ng-model="report.options.filters[filter.value]['type']/> <input type="text" ng-model="report.options.filters[filter.value]['values']/> </div> ng-repeat is looping over this array [ {name: 'Advertisers', value: 'advertisers'}, {name: 'Sizes', value: 'sizes'}, {name: 'Campaign IDs', value: 'campaigns'}, {name: 'Creative IDs', value: 'creatives'}, {name: 'Publishers', value: 'publishers'}, {name: 'Placement IDs', value: 'placements'}, {name: 'Seller Types', value: 'seller_types'}, {name: 'Impression Types', value: 'impression_types'}, {name: 'Bid Types', value: 'bid_types'}, {name: 'Seller Members', value: 'seller_members'}, {name: 'Buyer Members', value: 'buyer_members'}, {name: 'Insertion Order Ids', value: 'insertion_orders'}, {name: 'Countries', value: 'countries'}, {name: 'Site Ids', value: 'sites'}, {name: 'Sources', value: 'sources'} ]; The JSON I'm sending back needs to be structured like this: "filters": { "state": "all", "campaigns": {type:"include", values":[1,2]}, "creatives": {type:"exclude","values":[1,2]}, "publishers": {"values":[1,2]}, "placements": {type:"exclude",values":[1,2]}, "advertisers": {"values":[1,2]}, "sizes": {"values":[1,2]}, "countries": {"values":[1,2]}, "insertion_orders": {"values":[1,2]}, "sites": {"values":[1,2]}, "bid_types": {"values":[1,2]}, "seller_types": {"values":[1,2]}, "impression_types": {"values":[1,2]}, "seller_members": {"values":[1,2]}, "buyer_members": {"values":[1,2]}, "sources": {"values":[1,2]} } When I do this Angular throws an error: 'Cannot set property 'values' of undefined' and 'Cannot set property 'type' of undefined' Yet if I do this (inside ng-repeat) <input type="text" ng-model="report.options.filters[filter.value]/> Or this outside of ng-repeat <input type="text" ng-model="report.options.filters[filter.value]['values']/> No errors are thrown and everything works fine. I'm positive that filter.value is defined and available on the scope even though Angular thinks it's not for some reason. I'm not quite sure what I'm doing wrong. Any help is much appreciated.

    Read the article

  • Deserialize an XML file - an error in xml document (1,2)

    - by Lindsay Fisher
    I'm trying to deserialize an XML file which I receive from a vendor with XmlSerializer, however im getting this exception: There is an error in XML document (1, 2).InnerException Message "<delayedquotes xmlns=''> was not expected.. I've searched the stackoverflow forum, google and implemented the advice, however I'm still getting the same error. Please find the enclosed some content of the xml file: <delayedquotes id="TestData"> <headings> <title/> <bid>bid</bid> <offer>offer</offer> <trade>trade</trade> <close>close</close> <b_time>b_time</b_time> <o_time>o_time</o_time> <time>time</time> <hi.lo>hi.lo</hi.lo> <perc>perc</perc> <spot>spot</spot> </headings> <instrument id="Test1"> <title id="Test1">Test1</title> <bid>0</bid> <offer>0</offer> <trade>0</trade> <close>0</close> <b_time>11:59:00</b_time> <o_time>11:59:00</o_time> <time>11:59:00</time> <perc>0%</perc> <spot>0</spot> </instrument> </delayedquotes> and the code [Serializable, XmlRoot("delayedquotes"), XmlType("delayedquotes")] public class delayedquotes { [XmlElement("instrument")] public string instrument { get; set; } [XmlElement("title")] public string title { get; set; } [XmlElement("bid")] public double bid { get; set; } [XmlElement("spot")] public double spot { get; set; } [XmlElement("close")] public double close { get; set; } [XmlElement("b_time")] public DateTime b_time { get; set; } [XmlElement("o_time")] public DateTime o_time { get; set; } [XmlElement("time")] public DateTime time { get; set; } [XmlElement("hi")] public string hi { get; set; } [XmlElement("lo")] public string lo { get; set; } [XmlElement("offer")] public double offer { get; set; } [XmlElement("trade")] public double trade { get; set; } public delayedquotes() { } }

    Read the article

  • Infopath 2007 and WCF Data Connection

    - by Nathan Fisher
    I am having trouble trying to connect an Infopath 2007 form to an WCF web service. I appears that the Infopath only wants to communicate via a SOAP 1.0 message. To get around the issue for the moment I have created an .asmx web service. Should I consider continuing down this workaround or figure out a way to get WCF to dish out SOAP 1.0 1.1 messages?

    Read the article

  • Show cue banner for wpf ComboBox with grouping

    - by Adam Duston
    I have a ComboBox in my WPF form: <ComboBox Margin="75,0,15,102" Name="videoFormatCombo" Height="23" VerticalAlignment="Bottom" DataContext="{StaticResource GroupedVideoFormats}" ItemsSource="{Binding}" ItemTemplate="{StaticResource VideoFormatTemplate}"> <ComboBox.GroupStyle> <GroupStyle HeaderTemplate="{StaticResource GroupHeader}"/> </ComboBox.GroupStyle> </ComboBox> As you might be able to guess, GroupedVideoFormats is a CollectionViewSource with grouping. I need to get a cue banner to display for this ComboBox. I've attempted the solution that is (very verbosely) outlined in this blog post, but it will not work for a ComboBox with grouped data. The two solutions outlined in superfluousprefixhttp://stackoverflow.com/questions/2548757/how-can-the-blank-space-in-a-c-combobox-be-filled-as-a-hint-for-the-user are for Windows Forms ComboBoxes only, and won't work with WPF. If it would help to see all the original source, this particular form is on github: superfluousprefixhttp://github.com/8planes/mirovideoconverter/blob/master/MSWindows/Windows/FileSelect.xaml . It's an open-source project, so the entire project is on github: superfluousprefixhttp://github.com/8planes/mirovideoconverter/tree/master/MSWindows . Thank you for any advice! Adam P.S. stackoverflow wouldn't let me make more than one anchor tag in my post, hence the long urls with the superfluous prefix. Sorry!

    Read the article

  • How do I use a custom authentication mechanism for a Java web application with Spring Security?

    - by Adam
    Hi, I'm working on a project to convert an existing Java web application to use Spring Web MVC. As a part of this I will migrate the existing log-on/log-off mechanism to use Spring Security. The idea at this stage is to replicate the existing functionality and replace only the web layer, leaving the service classes and objects in place. The required functionality is simple. Access is controlled to URLs and to access certain pages the user must log on. Authentication is performed with a simple username and password along with an extra static piece of information that comes from the login page. There is no notion of a role: once a user has logged on they have access to all of the pages. Behind the scenes, the service layer has a class with a simple authentication method: doAuthenticate(String username, String password, String info) throws ServiceException An exception is thrown if the login fails. I'd like to leave this existing service object that does the authentication intact but to "plug it into" the Spring Security mechanism. Can somebody suggest the best approach to take for this please? Naturally, I'd like to take the path of least resistance and leave the work where possible to Spring... Thanks in advance, Adam.

    Read the article

  • How can I merge multiple Compass Resources into one, with one score?

    - by Brent Fisher
    I am trying to integrate compass into my platform using the JDBC ResultSetToResourceMapping. What I want to do is set it up so that I could have multiple result set mappings, tied to one Resource, that produces one result, with one score, and a merged score. I have tried to trick Compass into doing this by mapping the same id across them, even though the property fields are different, but it just ends up giving me separate hits for each. E.g. I have the following Data Model, Cases and Comments. One case might have several comments. Say I search for a term that appears in multiple comments. Right now, I a hit for each one, each with a different score. Is there a way that I could merge or aggregate those hits into one hit? Say, instead of Score Entity ID Snippets 100.0% Case 3558 ... The fox jumped over the lazy dog ... 60.0% Case 3558 ... In Alabama today, three jumping turtles were ... 25.0% Case 3558 ... Three jumpers fled the scene... I get Score Entity ID Snippets 100.0% Case 3558 The fox jumped over the lazy dog ...In Alabama today, three jumping turtles were ... Three jumpers fled the scene... Where the latter score is an aggregated score.

    Read the article

  • Python many-to-one mapping (creating equivalence classes)

    - by Adam Matan
    Hi, I have a project of converting one database to another. One of the original database columns defines the row's category. This coulmn should be mapepd to a new category in the new databse. For example, let's assume the original categories are:parrot, spam, cheese_shop, Cleese, Gilliam, Palin Now that's a little verbose for me, And I want to have these rows categorized as sketch, actor - That is, define all the sketches and all the actors as two equivalence classes. >>> monty={'parrot':'sketch', 'spam':'sketch', 'cheese_shop':'sketch', 'Cleese':'actor', 'Gilliam':'actor', 'Palin':'actor'} >>> monty {'Gilliam': 'actor', 'Cleese': 'actor', 'parrot': 'sketch', 'spam': 'sketch', 'Palin': 'actor', 'cheese_shop': 'sketch'} That's quite awkward- I would prefer having something like: monty={ ('parrot','spam','cheese_shop'): 'sketch', ('Cleese', 'Gilliam', 'Palin') : 'actors'} But this, of course, sets the entire tuple as a key: >>> monty['parrot'] Traceback (most recent call last): File "<pyshell#29>", line 1, in <module> monty['parrot'] KeyError: 'parrot' Any ideas how to create an elegant many-to-one dictionary in Python? Thanks, Adam

    Read the article

  • How to load JPG file into NSBitmapImageRep?

    - by Adam
    Objective-C / Cocoa: I need to load the image from a JPG file into a two dimensional array so that I can access each pixel. I am trying (unsuccessfully) to load the image into a NSBitmapImageRep. I have tried several variations on the following two lines of code: NSString *filePath = [NSString stringWithFormat: @"%@%@",@"/Users/adam/Documents/phoneimages/", [outLabel stringValue]]; //this coming from a window control NSImageRep *controlBitmap = [[NSImageRep alloc] imageRepWithContentsOfFile:filePath]; With the code shown, I get a runtime error: -[NSImageRep imageRepWithContentsOfFile:]: unrecognized selector sent to instance 0x100147070. I have tried replacing the second line of code with: NSImage *controlImage = [[NSImage alloc] initWithContentsOfFile:filePath]; NSBitmapImageRep *controlBitmap = [[NSBitmapImageRep alloc] initWithData:controlImage]; But this yields a compiler error 'incompatible type' saying that initWithData wants a NSData variable not an NSImage. I have also tried various other ways to get this done, but all are unsuccessful either due to compiler or runtime error. Can someone help me with this? I will eventually need to load some PNG files in the same way (so it would be nice to have a consistent technique for both). And if you know of an easier / simpler way to accomplish what I am trying to do (i.e., get the images into a two-dimensional array), rather than using NSBitmapImageRep, then please let me know! And by the way, I know the path is valid (confirmed with fileExistsAtPath) -- and the filename in outLabel is a file with .jpg extension. Thanks for any help!

    Read the article

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