Search Results

Search found 1254 results on 51 pages for 'mister smith'.

Page 41/51 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • .htaccess template, suggestions needed

    - by purpler
    # Defaults AddDefaultCharset UTF-8 DefaultLanguage en-US FileETag None Header unset ETag ServerSignature Off SetEnv TZ Europe/Belgrade # Rewrites Options +FollowSymLinks RewriteEngine On RewriteBase / # Redirect to WWW RewriteCond %{HTTP_HOST} ^serpentineseo.com RewriteRule (.*) http://www.serpentineseo.com/$1 [R=301,L] # Redirect index to root RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/ RewriteRule ^(.*)index\.html$ /$1 [R=301,L] # Cache media files: ExpiresActive On ExpiresDefault A0 # Month <filesMatch "\.(gif|jpg|jpeg|png|ico|swf|js)$"> Header set Cache-Control "max-age=2592000, public" </filesMatch> # Week <FilesMatch "\.(css|pdf)$"> Header set Cache-Control "max-age=604800" </FilesMatch> # 10 Min <FilesMatch "\.(html|htm|txt)$"> Header set Cache-Control "max-age=600" </FilesMatch> # Do not cache <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> Header unset Cache-Control </FilesMatch> # Compress output <IfModule mod_deflate.c> <FilesMatch "\.(html|js|css)$"> SetOutputFilter DEFLATE </FilesMatch> </IfModule> # Error Documents ErrorDocument 206 /error/206.html ErrorDocument 401 /error/401.html ErrorDocument 403 /error/403.html ErrorDocument 404 /error/404.html ErrorDocument 500 /error/500.html # Prevent hotlinking RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?serpentineseo.com/.*$ [NC] RewriteRule \.(gif|jpg|png)$ http://www.serpentineseo.com/images/angryman.png [R,L] # Prevent offline browsers RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR] RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:[email protected] [OR] RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR] RewriteCond %{HTTP_USER_AGENT} ^Custo [OR] RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR] RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR] RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR] RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR] RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR] RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR] RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR] RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR] RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR] RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR] RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR] RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR] RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR] RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR] RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR] RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR] RewriteCond %{HTTP_USER_AGENT} ^HMView [OR] RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR] RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR] RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR] RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR] RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR] RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR] RewriteCond %{HTTP_USER_AGENT} ^larbin [OR] RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR] RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR] RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR] RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR] RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR] RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR] RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR] RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR] RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR] RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR] RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR] RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR] RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR] RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR] RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR] RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR] RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR] RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR] RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR] RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR] RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR] RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR] RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR] RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR] RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR] RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR] RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR] RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR] RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR] RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR] RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR] RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR] RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR] RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR] RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR] RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR] RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR] RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR] RewriteCond %{HTTP_USER_AGENT} ^Wget [OR] RewriteCond %{HTTP_USER_AGENT} ^Widow [OR] RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR] RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR] RewriteCond %{HTTP_USER_AGENT} ^Zeus RewriteRule ^.*$ http://www.google.com [R,L] # Protect against DOS attacks by limiting file upload size LimitRequestBody 10240000 # Deny access to sensitive files <FilesMatch "\.(htaccess|psd|log)$"> Order Allow,Deny Deny from all </FilesMatch>

    Read the article

  • .htaccess template, suggestions needed

    - by purpler
    DefaultLanguage en-US FileETag None Header unset ETag ServerSignature Off SetEnv TZ Europe/Belgrade # Rewrites Options +FollowSymLinks RewriteEngine On RewriteBase / # Redirect to WWW RewriteCond %{HTTP_HOST} ^serpentineseo.com RewriteRule (.*) http://www.serpentineseo.com/$1 [R=301,L] # Redirect index to root RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/ RewriteRule ^(.*)index\.html$ /$1 [R=301,L] # Cache media files: ExpiresActive On ExpiresDefault A0 # Month <filesMatch "\.(gif|jpg|jpeg|png|ico|swf|js)$"> Header set Cache-Control "max-age=2592000, public" </filesMatch> # Week <FilesMatch "\.(css|pdf)$"> Header set Cache-Control "max-age=604800" </FilesMatch> # 10 Min <FilesMatch "\.(html|htm|txt)$"> Header set Cache-Control "max-age=600" </FilesMatch> # Do not cache <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> Header unset Cache-Control </FilesMatch> # Compress output <IfModule mod_deflate.c> <FilesMatch "\.(html|js|css)$"> SetOutputFilter DEFLATE </FilesMatch> </IfModule> # Error Documents ErrorDocument 206 /error/206.html ErrorDocument 401 /error/401.html ErrorDocument 403 /error/403.html ErrorDocument 404 /error/404.html ErrorDocument 500 /error/500.html # Prevent hotlinking RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?serpentineseo.com/.*$ [NC] RewriteRule \.(gif|jpg|png)$ http://www.serpentineseo.com/images/angryman.png [R,L] # Prevent offline browsers RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR] RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:[email protected] [OR] RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR] RewriteCond %{HTTP_USER_AGENT} ^Custo [OR] RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR] RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR] RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR] RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR] RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR] RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR] RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR] RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR] RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR] RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR] RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR] RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR] RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR] RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR] RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR] RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR] RewriteCond %{HTTP_USER_AGENT} ^HMView [OR] RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR] RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR] RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR] RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR] RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR] RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR] RewriteCond %{HTTP_USER_AGENT} ^larbin [OR] RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR] RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR] RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR] RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR] RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR] RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR] RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR] RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR] RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR] RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR] RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR] RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR] RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR] RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR] RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR] RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR] RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR] RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR] RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR] RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR] RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR] RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR] RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR] RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR] RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR] RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR] RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR] RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR] RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR] RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR] RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR] RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR] RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR] RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR] RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR] RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR] RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR] RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR] RewriteCond %{HTTP_USER_AGENT} ^Wget [OR] RewriteCond %{HTTP_USER_AGENT} ^Widow [OR] RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR] RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR] RewriteCond %{HTTP_USER_AGENT} ^Zeus RewriteRule ^.*$ http://www.google.com [R,L] # Protect against DOS attacks by limiting file upload size LimitRequestBody 10240000 # Deny access to sensitive files <FilesMatch "\.(htaccess|psd|log)$"> Order Allow,Deny Deny from all </FilesMatch>

    Read the article

  • PostgreSQL, Ubuntu, NetBeans IDE (Part 3)

    - by Geertjan
    To complete the picture, let's use the traditional (that is, old) Hibernate mechanism, i.e., via XML files, rather than via the annotations shown yesterday. It's definitely trickier, with many more places where typos can occur, but that's why it's the old mechanism. I do not recommend this approach. I recommend the approach shown yesterday. The other players in this scenario include PostgreSQL, as outlined in the previous blog entries in this series. Here's the structure of the module, replacing the code shown yesterday: Here's the Employee class, notice that it has no annotations: import java.io.Serializable; import java.util.Date; public class Employees implements Serializable {         private int employeeId;     private String firstName;     private String lastName;     private Date dateOfBirth;     private String phoneNumber;     private String junk;     public int getEmployeeId() {         return employeeId;     }     public void setEmployeeId(int employeeId) {         this.employeeId = employeeId;     }     public String getFirstName() {         return firstName;     }     public void setFirstName(String firstName) {         this.firstName = firstName;     }     public String getLastName() {         return lastName;     }     public void setLastName(String lastName) {         this.lastName = lastName;     }     public Date getDateOfBirth() {         return dateOfBirth;     }     public void setDateOfBirth(Date dateOfBirth) {         this.dateOfBirth = dateOfBirth;     }     public String getPhoneNumber() {         return phoneNumber;     }     public void setPhoneNumber(String phoneNumber) {         this.phoneNumber = phoneNumber;     }     public String getJunk() {         return junk;     }     public void setJunk(String junk) {         this.junk = junk;     } } And here's the Hibernate configuration file: <?xml version="1.0"?> <!DOCTYPE hibernate-configuration PUBLIC       "-//Hibernate/Hibernate Configuration DTD 3.0//EN"     "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration>     <session-factory>         <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>         <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/smithdb</property>         <property name="hibernate.connection.username">smith</property>         <property name="hibernate.connection.password">smith</property>         <property name="hibernate.connection.pool_size">1</property>         <property name="hibernate.default_schema">public"</property>         <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>         <property name="hibernate.current_session_context_class">thread</property>         <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>         <property name="hibernate.show_sql">true</property>         <mapping resource="org/db/viewer/employees.hbm.xml"/>     </session-factory> </hibernate-configuration> Next, the Hibernate mapping file: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping>     <class name="org.db.viewer.Employees"            table="employees"            schema="public"            catalog="smithdb">         <id name="employeeId" column="employee_id" type="int">             <generator class="increment"/>         </id>         <property name="firstName" column="first_name" type="string" />         <property name="lastName" column="last_name" type="string" />         <property name="dateOfBirth" column="date_of_birth" type="date" />         <property name="phoneNumber" column="phone_number" type="string" />         <property name="junk" column="junk" type="string" />             </class>     </hibernate-mapping> Then, the HibernateUtil file, for providing access to the Hibernate SessionFactory: import java.net.URL; import org.hibernate.cfg.AnnotationConfiguration; import org.hibernate.SessionFactory; public class HibernateUtil {     private static final SessionFactory sessionFactory;         static {         try {             // Create the SessionFactory from standard (hibernate.cfg.xml)             // config file.             String res = "org/db/viewer/employees.cfg.xml";             URL myURL = Thread.currentThread().getContextClassLoader().getResource(res);             sessionFactory = new AnnotationConfiguration().configure(myURL).buildSessionFactory();         } catch (Throwable ex) {             // Log the exception.             System.err.println("Initial SessionFactory creation failed." + ex);             throw new ExceptionInInitializerError(ex);         }     }         public static SessionFactory getSessionFactory() {         return sessionFactory;     }     } Finally, the "createKeys" in the ChildFactory: @Override protected boolean createKeys(List list) {     Session session = HibernateUtil.getSessionFactory().getCurrentSession();     Transaction transac = null;     try {         transac = session.beginTransaction();         Query query = session.createQuery("from Employees");         list.addAll(query.list());     } catch (HibernateException he) {         Exceptions.printStackTrace(he);         if (transac != null){             transac.rollback();         }     } finally {         session.close();     }     return true; } Note that Constantine Drabo has a similar article here. Run the application and the result should be the same as yesterday.

    Read the article

  • ArchBeat Link-o-Rama for 2012-09-27

    - by Bob Rhubart
    Understanding Oracle BI 11g Security vs Legacy Oracle BI 10g | Christian Screen "After conducting a large amount of Oracle BI 10g to Oracle BI 11g upgrades and after writing the Oracle BI 11g book," says Oracle ACE Christian Screen, "I still continually get asked one of the most basic questions regarding security in Oracle BI 11g; How does it compare to Oracle BI 10g? The trail of questions typically goes on to what are the differences? And, how do we leverage our current Oracle BI 10g security table schema in Oracle BI 11g?" Process Oracle OER Events using a simple Web Service | Bob Webster Bob Webster's post "provides an example of a simple web service that processes Oracle Enterprise Repository (OER) Events. The service receives events from OER and utilizes the OER REX API to implement simple OER automations for selected event types." Oracle Fusion Middleware Security: Attaching OWSM policies to JRF-based web services clients | Andre Correa "OWSM (Oracle Web Services Manager) is Oracle's recommended method for securing SOAP web services," says Oracle Fusion Middleware A-Team member Andre Correa. "It provides agents that encapsulate the necessary logic to interact with the underlying software stack on both service and client sides. Such agents have their behavior driven by policies. OWSM ships with a bunch of policies that are adequate to most common real world scenarios." His detailed post shows how to make it happen. WebCenter Content (WCC) Trace Sections | ECM Architect ECM Architect Kevin Smith shares a detailed technical post covering WebCenter Content (WCC) Trace sections. Thought for the Day "A complex system that works is invariably found to have evolved from a simple system that worked." — John Gall Source: SoftwareQuotes.com

    Read the article

  • How can I move mysites to a new location

    - by Bob
    I recently restored my content and was instructed to create mysites in a different location than was originally used. Now I have several users mysites in /personal. The new desired location is /mysites. From what I found in the documentation I should back them up and restore them to the new location. Here's what I've done: Backup individual site collection for user mysite stsadm -o backup -url "https://myUrl/personal/john_smith" -filename johnsmith.bkup Restore individual site collection for user mysite stsadm -o restore -url "https://myUrl/mysites/john_smith" -filename johnsmith.bkup -overwrite The result of this and the problem is when i enumerate sites i end up with this: <Site Url="https://myUrl/mysites" Owner="domainname\john.smith" ContentDatabase="WSS_Content_MySites" StorageUsedMB="1.6" StorageWarningMB="90000" StorageMaxMB="100000" /> it leaves off the username part of the url. and if I restore more that one they want to overwrite each other.

    Read the article

  • How to achieve a loosely coupled REST API but with a defined and well understood contract?

    - by BestPractices
    I am new to REST and am struggling to understand how one would properly design a REST system to both allow for loose coupling but at the same time allow a consumer of a REST API to understand the API. If, in my client code, I issue a GET request for a resource and get back XML, how do I know what to do with that xml? e.g. if it contains <fname>John</fname><lname>Smith</lname> how do I know that these refer to the concept of "first name", "last name"? Is it up to the person writing the REST API to define in documentation some place what each of the XML fields mean? What if producer of the API wants to change the implementation to be <firstname> instead of <fname>? How do they do this and notify their consumers that this change occurred? Or do the consumers just encounter the error and then look at the payload and figure out on their own that it changed? I've read in REST in Practice that using a WADL tool to create a client implementation based on the WADL (and hide the fact that you're doing a distributed call) is an "anti-pattern". But I was planning to do this-- at least then I would have a statically typed API call that, if it changed, I would know at compile time and not at run time. Why is this a bad thing to generate client code based on a WADL? And how do I know what to do with the links that returned in the response of a POST to a REST API? What defines this contract and gives true meaning to what each link will do? Please help! I dont understand how to go from statically-typed or even SOAP/RPC to REST!

    Read the article

  • Exchange Server Contact Categories - How to Remove/Update All

    - by ben
    I've been tasked with cleaning up our companies contact database sitting on our Exchange Server 2003. The rub is this database of contacts has been neglected for the past couple of years and is now a bit messy. My issue is I have say a person named 'Bob Smith', and Bob is listed in multiple categories, 'Students' and 'Student'. I would really like to remove the 'Student' category from Bob and anyone else out there that has the same category. My question is, is there an easy way to edit the master category lists for contacts on the exchange server? I feel like I am missing something simple here since if I were playing with the categories that I use, to say organize email its very easy to do so, but I can't seem to find the proper way to do it for categories that are up on the server. I'm attempting to work through Outlook 2007 and Exchange 2003. Any insight would be very helpful as I really don't want to change 8000+ contacts by hand.

    Read the article

  • Let Devoxx 2011 begin!

    - by alexismp
    Devoxx 2011 is kicking off today and Oracle will be well represented for all its Java efforts. Here's a quick rundown of the Java EE and GlassFish side of things. Cameron Purdy, now responsible for the entire Oracle middleware stack (WebLogic, GlassFish, TopLink, Coherence) will host the Java EE keynote, mostly focused on Java EE 7. There will be sessions on individual JSRs by spec leads : Nigel Deakin for JMS 2.0, Marek Potociar for JAX-RS 2.0, and Greg Luck (EHCache) for JSR107 / javax.cache. Oracle's Shaun Smith will also cover JPA 2.1 with some of the unique EclipseLink features such as multi-tenancy. BOFs on Java EE.next and CDI are also planned during the week. Finally, Arun Gupta will be delivering a complete Java EE 6 hands-on lab. There will also be GlassFish-related sessions. A first one will focus on the current state of the community and product (3.1.x) with customers production stories, while GlassFish architect Jerome Dochez will walk you through the enhancements the team is working on for Java EE 7 and GlassFish 4 - virtualization, PaaS, elasticity and more. Last but not least, our good friends from Serli will discuss their latest GlassFish contributions on Application versioning and high-availability rolling upgrades.

    Read the article

  • Java Spotlight Episode 98: Cliff Click on Benchmarkings

    - by Roger Brinkley
    Interview with Cliff Click of 0xdata on benchmarking. Recorded live at JFokus 2012. Right-click or Control-click to download this MP3 file. You can also subscribe to the Java Spotlight Podcast Feed to get the latest podcast automatically. If you use iTunes you can open iTunes and subscribe with this link:  Java Spotlight Podcast in iTunes. Show Notes News Bean Validation 1.1 Java EE 7 Roadmap Java JRE Update 7u7 and 6u35 available. Change to Java SE 7 and Java SE 6 Update Release Numbers JCP 2012 Award Nominations Announced Griffon JavaFX Plugin Events Sep 3-6, Herbstcampus, Nuremberg, Germany Sep 10-15, IMTS 2012 Conference,  Chicago Sep 12,  The Coming M2M Revolution: Critical Issues for End-to-End Software and Systems Development,  Webinar Sep 30-Oct 4, JavaONE, San Francisco Oct 3-4, Java Embedded @ JavaONE, San Francisco Oct 15-17, JAX London Oct 30-Nov 1, Arm TechCon, Santa Clara Oct 22-23, Freescale Technology Forum - Japan, Tokyo Nov 2-3, JMagreb, Morocco Nov 13-17, Devoxx, Belgium Feature Interview Cliff Click is the CTO and Co-Founder of 0xdata, a firm dedicated to creating a new way to think about web-scale data storage and real-time analytics. I wrote my first compiler when I was 15 (Pascal to TRS Z-80!), although my most famous compiler is the HotSpot Server Compiler (the Sea of Nodes IR). I helped Azul Systems build an 864 core pure-Java mainframe that keeps GC pauses on 500Gb heaps to under 10ms, and worked on all aspects of that JVM. Before that I worked on HotSpot at Sun Microsystems, and am at least partially responsible for bringing Java into the mainstream. I am invited to speak regularly at industry and academic conferences and has published many papers about HotSpot technology. I hold a PhD in Computer Science from Rice University and about 15 patents. What’s Cool Shaun Smith’s Devoxx 2011 talk "JPA Multi-Tenancy & Extensibility" now freely available at Parleys.

    Read the article

  • We'll be at QCon San Francisco!

    - by Carlos Chang
    Oracle Technology Network is a Platinum sponsor at QCon San Francisco. Don’t miss these great developer focused sessions: Shay Shmeltzer - How we simplified Web, Mobile and Cloud development for our own developers? - the Oracle Story Over the past several years, Oracle has beendeveloping a new set of enterprise applications in what is probably one of the largest Java based development project in the world. How do you take 3000 developers and make them productive? How do you insure the delivery of cutting edge UIs for both Mobile and Web channels? How do you enable Cloud based development and deployment? Come and learn how we did it at Oracle, and see how the same technologies and methodologies can apply to your development efforts. Dan Smith - Project Lambda in Java 8 Java SE 8 will include major enhancements to the Java Programming Language and its core libraries.  This suite of new features, known as Project Lambda in the OpenJDK community, includes lambda expressions, default methods, and parallel collections (and much more!).  The result will be a next-generation Java programming experience with more flexibility and better abstractions.   This talk will introduce the new Java features and offer a behind-the-scenes view of how they evolved and why they work the way that they do. Arun Gupta - JSR 356: Building HTML5 WebSocket Applications in Java The family of HTML5 technologies has pushed the pendulum away from rich client technologies and toward ever-more-capable Web clients running on today’s browsers. In particular, WebSocket brings new opportunities for efficient peer-to-peer communication, providing the basis for a new generation of interactive and “live” Web applications. This session examines the efforts under way to support WebSocket in the Java programming model, from its base-level integration in the Java Servlet and Java EE containers to a new, easy-to-use API and toolset that are destined to become part of the standard Java platform. The complete conference schedule is here: http://qconsf.com/sf2012/schedule/wednesday.jsp But wait, there’s more! At the Oracle booth, we’ll also be covering: Oracle ADF Mobile Oracle Developer Cloud Service Oracle ADF Essentials NetBeans Project Easel Hope to see you there! 

    Read the article

  • Inverted LACK Table Serves as a Perfect Gear Rack [DIY]

    - by Jason Fitzpatrick
    We’ve seen IKEA gear hacked to hold audio and computer gear before, but this mod adds in a simple and effective twist. LACK end tables are, conveniently, the same width as a standard server rack. This makes it super simple for DIYers to mount their gear right into the legs of the table with no modification necessary. In this case, however, Winston Smith included a clever update to the mod. Rather than leave it like a standard table, he flipped the table upside down for increased stability and a stronger connection between the legs of his improvised audio rack and the table-top-turned-floor-plate. He then finished it with a matching LACK shelf piece to serve as a turn-table stand. His gear is stored cleanly, off the floor, and in a sturdy container all for about $25–a definite bargain when it comes to storage racks. Hit up the link below for more information and pictures. LACK Rack & EXPEDIT Desktop [IKEA Hackers] HTG Explains: How Windows Uses The Task Scheduler for System Tasks HTG Explains: Why Do Hard Drives Show the Wrong Capacity in Windows? Java is Insecure and Awful, It’s Time to Disable It, and Here’s How

    Read the article

  • SOA Cloud and Service Technology Symposium December 4-5th 2013 in Mexico

    - by JuergenKress
    Do you want to attend the SOA; Cloud and Service Technology Symposium December 4-5th 2013 in Mexico? Please feel free to use the promotional code “Q14CB324” for a 50% discount. Here are the Conference presentations from Partners and Oracle: "Cloud Service Brokers" Jürgen Kress, Oracle, Rolando Carrasco, S&P Solutions "Fast Data - Delivering High-Velocity and Volume Big Data Business Value in Real Time" Robin Smith, Oracle, Robert Greene, Oracle "Unlocking the Value of Big Data" Raul Goycoolea Seoane, Oracle "Modeling Business Process Architecture on BPMN 2.0 and Decomposing it to Service Inventory" Jorge Heredia, Itehl Consulting "BPM and Dynamic/Adaptive Case Management - Friends or Foes?" Manas Deb, Oracle "Building SOA and MDM Solutions to Enable Cloud Adoption" Luis Weir, HCL, John Dunn, HCL "Secure Applications in the Cloud: Security & Privacy Patterns and Mechanisms" Ricardo Puttini, University of Brasília, Anderson Nascimento, University of Brasília "SOA, Data Grids, Mobile and Clouds - Where Next for SOA?" Matt Brasier, C2B2 Consulting LTD "Achieving Greater Responsiveness with BPM" Andre Boaventura, Oracle Do you want to meet the Oracle team at the conference? Please send us a message on twitter @soacommunity. Do you want to network at the conference? Please use the #soacommunity. For details and registrations please visit the conference website. 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 Facebook Wiki Mix Forum Technorati Tags: SOA Symposium,Thmas Erl,Service Technolgy Symosium,SOA Community,Oracle SOA,Oracle BPM,Community,OPN,Jürgen Kress

    Read the article

  • Videos: Getting Started with Java Embedded

    - by Tori Wieldt
    Are you a Java developer? That means you can write applications for embedded processors! There are new six new videos up on the YouTube/Java channel that you can watch to get more information. To get an overview, watch James Allen of Oracle Global Business Development give OTN a tour of the Oracle booth at ARM Techcon. He also explains the huge opportunity for Java in the embedded space. These videos from Oracle Engineering show you how to leverage your knowledge to seamlessly develop in a space that is really taking off. Java SE Embedded Development Made Easy, Part 1 This video demonstrates how developers already familiar with the Java SE development paradigm can leverage their knowledge to seamlessly develop on very capable embedded processors. Part one of a two-part series. Java SE Embedded Development Made Easy, Part 2 This video demonstrates how developers already familiar with the Java SE development paradigm can leverage their knowledge to seamlessly develop on very capable embedded processors. Part two of a two-part series. Mobile Database Synchronization - Healthcare Demonstration This video demonstrates how a good portion of Oracle's embedded technologies (Java SE-Embedded, Berkeley DB, Database Mobile Server) can be applied to a medical application. Tomcat Micro Cluster See how multiple embedded devices installed with Java Standard Edition HotSpot for Armv5/Linux and Apache Tomcat can be configured as a micro cluster. Java Embedded Partnerships Kevin Smith of Oracle Technical Business Development explains what's new for partners and Java developers in the embedded space. Learn how you can start prototyping for Qualcomm's new Orion board before it's available. (Sorry about the video quality, the booth lights were weird.)   Visit the YouTube/Java channel for other great Java videos. <fade to black>

    Read the article

  • How can I move mysites to a new location

    - by Bob
    I recently restored my content and was instructed to create mysites in a different location than was originally used. Now I have several users mysites in /personal. The new desired location is /mysites. From what I found in the documentation I should back them up and restore them to the new location. Here's what I've done: Backup individual site collection for user mysite stsadm -o backup -url "https://myUrl/personal/john_smith" -filename johnsmith.bkup Restore individual site collection for user mysite stsadm -o restore -url "https://myUrl/mysites/john_smith" -filename johnsmith.bkup -overwrite The result of this and the problem is when i enumerate sites i end up with this: <Site Url="https://myUrl/mysites" Owner="domainname\john.smith" ContentDatabase="WSS_Content_MySites" StorageUsedMB="1.6" StorageWarningMB="90000" StorageMaxMB="100000" /> it leaves off the username part of the url. and if I restore more that one they want to overwrite each other.

    Read the article

  • Get to Know a Candidate (19-25 of 25): Independent Candidates

    - by Brian Lanham
    DISCLAIMER: This is not a post about “Romney” or “Obama”. This is not a post for whom I am voting.  Information sourced for Wikipedia. The following independent candidates have gained access to at least one state ballot. Richard Duncan, of Ohio; Vice-presidential nominee: Ricky Johnson Candidate Ballot Access: Ohio - (18 Electoral)  Write-In Candidate Access: Alaska, Florida, Indiana, Maryland Randall Terry, of West Virginia; Vice-presidential nominee: Missy Smith Candidate Ballot Access: Kentucky, Nebraska, West Virginia - (18 Electoral)  Write-In Candidate Access: Colorado, Indiana Sheila Tittle, of Texas; Vice-presidential nominee: Matthew Turner Candidate Ballot Access: Colorado, Louisiana - (17 Electoral) Jeff Boss, of New Jersey; Vice-presidential nominee: Bob Pasternak Candidate Ballot Access: New Jersey - (14 Electoral) Dean Morstad, of Minnesota; Vice-presidential nominee: Josh Franke-Hyland Candidate Ballot Access: Minnesota - (10 Electoral)  Write-In Candidate Access: Utah Jill Reed, of Wyoming; Vice-presidential nominee: Tom Cary Candidate Ballot Access: Colorado - (9 Electoral)  Write-In Candidate Access: Indiana, Florida Jerry Litzel, of Iowa; Vice-presidential nominee: Jim Litzel Candidate Ballot Access: Iowa - (6 Electoral) That wraps it up people. We have reviewed 25 presidential candidates in the 2012 U.S. election. Look for more blog posts about the election to come.

    Read the article

  • Organizing files relationally in Windows 7?

    - by Cayetano Gonçalves
    I just took a new job as a policy analyst, and after even one week keeping track of hundreds of files- lawsuits, legislation, letters, etc- in Windows 7 is proving difficult. In my last job I was a database architect and I helped build Linux based servers to track files among an entire department, however there is no way for me to do that at this time in this job. Is there any way to track files/indices/locations/tags/themes and store them in some kind of RDBMS system, instead of storing the files in folders that only allow for flat and fixed storage? For example, if I have a file that deals with: ELID organization Appeals court John Smith It really is inconvenient to have to decide which one of these tags to create into a folder and place the file into it, when it falls under all the categories. Even if I could place tags the way you can in Stack Exchange on files, it would solve a lot of heart ache.

    Read the article

  • Which is better for multi-use auth, MySQL, PostgreSQL, or LDAP?

    - by Fearless
    I want to set up an Oracle Linux 6 server that gives users secure IMAP email (with dovecot), Jabber IM, FTP (with vsftpd), and calDav. However, I want each user logon to be able to authenticate all services (e.g. Joe Smith signs up once for a username and password that he can use for email, ftp, and his calendar). My question is, which database service will be best suited for that application? Also, is there a way to link the database with the preexisting server shell logins (e.g. so I can read the root account's LogCheck emails on a different device)?

    Read the article

  • What are all the components of a "Facebook App"?

    - by pnongrata
    I am a developer who has never personally partaken in social media (in any form) for reasons completely outside the scope of this question. I am "off the grid" (no Facebook, Twitter, etc accounts). I'm currently building a web app and would like the app to have a presence on Facebook, and possibly even "port" my app over as a Facebook app. My understanding of Facebook Apps is that they're just normal web apps that get <iframe>d into a Facebook page. The app is actually hosted on your server (not FB's servers). But this got me thinking: Don't Facebook Apps have "profile pages"? Is there anything developers can do to customize the behavior of their own profile pages? Do apps have the ability to do things like MySpace themes used to do (i.e., customize and interact with User profile pages, Groups, etc.)? Do Facebook Apps gain any sort of extra capabilities (inside of Facebook) that a normal web app would not have? It seems to me like if all a Facebook App is, is an iframed-web app, that it would still need to communicate with Facebook via its many APIs, just like a normal app would have to, right? If it's not possible to write an app that can customize the UI or behavior of user profiles and other pages, then how do games like "Farmville" interact with User profiles so that you see updates to profiles like "John Smith reached level 2 of Farmville"? Basically, I'm asking any battle-worn Facebook app developers if my understanding of Facebook Apps is correct, or if I'm missing anything big here. It's my understanding that for security reasons (obviously) Facebook doesn't allow apps to customize anything outside of the iframe it lives in. So if I want my app to appear like it's "interacting" with its Facebook users, it looks like I just need to publish stuff to the users' news feeds to try and encourage people to use my app (please correct me if I'm wrong here!). Thanks in advance for any corrections, clarifications, advice or suggestions!

    Read the article

  • Create an array from mysql with column names and values [on hold]

    - by ScaZ
    i'm trying to create an array with PHP and MySQL, but i always get errors. The code i'm using function db_listar_usuarios(){ $link=db_connect(); $query = "select * from usuarios" or die("Problemas en el select: " . mysqli_error($link)); $result = $link->query($query); while($row = mysqli_fetch_assoc($result)) { $row['nombre'] . array(; foreach ($row as $col => $val) { $col => $val; } } } And what I want to create with this code is: array( 'john' => array('address' => 'st 123', 'age' => '25', 'surname' => 'doe'), 'ane' => array('address' => 'av 456', 'age'=> '32', 'surname' => 'smith'), ); To use then like something like this: private $contacts = db_listar_usuarios(); I use 2 files: functions.php and server.php server.php is a downloaded file example to do a REST API. Here are both of them. server.php - pastebin.com/5j54m1Mz functions.php - pastebin.com/N7jMhSBa Thank you in advance!

    Read the article

  • How do I copy hyperlink only (and not text) to another cell?

    - by OfficeLackey
    I have a spreadsheet where column A displays names. There are a few hundred names and each has a different hyperlink (which links to that person's web page). I want to transfer those hyperlinks across to a different column which has different text in and no hyperlinks. Not every cell in column A has a hyperlink. There are groups of cells merged together, so A2:A7 has one link, A8:A13 the next, A9:10 the next (i.e. number of cells merged is not uniform). e.g. where A2:A7 reads "Bob" and links to www.bob.com, I want I2:I7, which reads, "Smith," and does not link to anything, to link to www.bob.com. I want to do this repeatedly, copying links from A2:A579 into I2:I579. The information is copied from a table within a web page, and that is where the hyperlinks come from.

    Read the article

  • How to map email addresses on subdomains

    - by Glen Little
    Is it possible to create email addresses like these: [email protected] [email protected] [email protected] and have them all handled by one mail server, as three different mail boxes? (Many examples I've seen talk about directing mail to [email protected] into the same mail box as [email protected] - but this is not what I'm looking for.) I haven't specified the server technology being used because I'm wondering if this is generally possible. If you know that server x can do this, please mention it in your answer! Is it correct that MX records can be set to direct email to all subdomains *.mydomain.com to one mail server? Is that still true if there are also web sites at those subdomains (using A records)? Thanks!

    Read the article

  • how to setup a ssh acount with no terminal but port forwarding?

    - by admalledd
    I am trying to set up a new user account I can give to friends so they can SSH into my forward computer, and only allow forwarding of certain ports. I do not want my friends to have a shell, or be able to change what ports to where they are allowed to forward. example session: joe(friend) connects using PuTTY (that I have pre-set, he isn't good with computers) to example.com(my Internet facing computer) forwarding ports 8080,1990,25565 to him(with what ever end ports he wants, preferably they stay the same numbers) example ssh command to do similar (but he can still change the ports on my computer!) ssh -N [email protected] -p443 -L8080:192.168.1.2:8080 -L1990:127.0.0.1:1990 -L25565:127.0.0.1:25565 then, same story with other friend smith(same ports, same user even) except he is using linux, so cant use putty. is it possible to also leave default SSH functinality for all other users but this one? I found this when I was searching google, but alas, I did not quite understand what was being suggested, and I don't think they covered restricting port forwarding

    Read the article

  • Wednesday at Oracle OpenWorld 2012 - Must See Session: “Event-Driven Patterns and Best Practices: Even More Important with Big Data”

    - by Lionel Dubreuil
    Don’t miss this “CON8636 - Event-Driven Patterns and Best Practices: Even More Important with Big Data“ session: Speakers: Faisal Nazir - Senior Solutions Architect, Motorola Shinichiro Takahashi - Senior Manager, Service Platform Department, NTT DOCOMO, INC. Robin Smith - Product Management/Strategy Director - Oracle Event Processing, Oracle Date: Wednesday, Oct 3 Time: 10:15 AM - 11:15 AM Location: Moscone South - 310 As the demand for big data analytics and integration grows across all industries, this session focuses on the role of the Oracle event-driven solution platform in delivering vital real-time integrated analysis intelligence to the data streams consumed and emitted from these large distributed data stores. Objectives for this session are to: Increase awareness of Oracle Event Processing, showcasing tight alignment with big data solutions Highlight emerging usage patterns in relation to streaming event data and distributed data stores Show a significant Oracle competitive advantage over IBM solutions advertised in this domain Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif";}

    Read the article

  • How can I dynamically change auto complete entries in a C# combobox or textbox?

    - by Sam Hopkins
    I have a combobox in C# and I want to use auto complete suggestions with it, however I want to be able to change the auto complete entries as the user types, because the possible valid entries are far too numerous to populate the AutoCompleteStringCollection at startup. As an example, suppose I'm letting the user type in a name. I have a list of possible first names ("Joe", "John") and a list of surnames ("Bloggs", "Smith"), but if I have a thousand of each, then that would be a million possible strings - too many to put in the auto complete entries. So initially I want to have just the first names as suggestions ("Joe", "John") , and then once the user has typed the first name, ("Joe"), I want to remove the existing auto complete entries and replace them with a new set consisting of the chosen first name followed by the possible surnames ("Joe Bloggs", "Joe Smith"). In order to do this, I tried the following code: void InitializeComboBox() { ComboName.AutoCompleteMode = AutoCompleteMode.SuggestAppend; ComboName.AutoCompleteSource = AutoCompleteSource.CustomSource; ComboName.AutoCompleteCustomSource = new AutoCompleteStringCollection(); ComboName.TextChanged += new EventHandler( ComboName_TextChanged ); } void ComboName_TextChanged( object sender, EventArgs e ) { string text = this.ComboName.Text; string[] suggestions = GetNameSuggestions( text ); this.ComboQuery.AutoCompleteCustomSource.Clear(); this.ComboQuery.AutoCompleteCustomSource.AddRange( suggestions ); } However, this does not work properly. It seems that the call to Clear() causes the auto complete mechanism to "turn off" until the next character appears in the combo box, but of course when the next character appears the above code calls Clear() again, so the user never actually sees the auto complete functionality. It also causes the entire contents of the combo box to become selected, so between every keypress you have to deselect the existing text, which makes it unusable. If I remove the call to Clear() then the auto complete works, but it seems that then the AddRange() call has no effect, because the new suggestions that I add do not appear in the auto complete dropdown. I have been searching for a solution to this, and seen various things suggested, but I cannot get any of them to work - either the auto complete functionality appears disabled, or new strings do not appear. Here is a list of things I have tried: Calling BeginUpdate() before changing the strings and EndUpdate() afterwards. Calling Remove() on all the existing strings instead of Clear(). Clearing the text from the combobox while I update the strings, and adding it back afterwards. Setting the AutoCompleteMode to "None" while I change the strings, and setting it back to "SuggestAppend" afterwards. Hooking the TextUpdate or KeyPress event instead of TextChanged. Replacing the existing AutoCompleteCustomSource with a new AutoCompleteStringCollection each time. None of these helped, even in various combinations. Spence suggested that I try overriding the ComboBox function that gets the list of strings to use in auto complete. Using a reflector I found a couple of methods in the ComboBox class that look promising - GetStringsForAutoComplete() and SetAutoComplete(), but they are both private so I can't access them from a derived class. I couldn't take that any further. I tried replacing the ComboBox with a TextBox, because the auto complete interface is the same, and I found that the behaviour is slightly different. With the TextBox it appears to work better, in that the Append part of the auto complete works properly, but the Suggest part doesn't - the suggestion box briefly flashes to life but then immediately disappears. So I thought "Okay, I'll

    Read the article

  • Using bindings to control column order in a DataGrid

    - by DanM
    Problem I have a WPF Toolkit DataGrid, and I'd like to be able to switch among several preset column orders. This is an MVVM project, so the column orders are stored in a ViewModel. The problem is, I can't get bindings to work for the DisplayIndex property. No matter what I try, including the sweet method in this Josh Smith tutorial, I get: The DisplayIndex for the DataGridColumn with Header 'ID' is out of range. DisplayIndex must be greater than or equal to 0 and less than Columns.Count. Parameter name: displayIndex. Actual value was -1. Is there any workaround for this? I'm including my test code below. Please let me know if you see any problems with it. ViewModel code public class MainViewModel { public List<Plan> Plans { get; set; } public int IdDisplayIndex { get; set; } public int NameDisplayIndex { get; set; } public int DescriptionDisplayIndex { get; set; } public MainViewModel() { Initialize(); } private void Initialize() { IdDisplayIndex = 1; NameDisplayIndex = 2; DescriptionDisplayIndex = 0; Plans = new List<Plan> { new Plan { Id = 1, Name = "Primary", Description = "Likely to work." }, new Plan { Id = 2, Name = "Plan B", Description = "Backup plan." }, new Plan { Id = 3, Name = "Plan C", Description = "Last resort." } }; } } Plan Class public class Plan { public int Id { get; set; } public string Name { get; set; } public string Description { get; set; } } Window code - this uses Josh Smith's DataContextSpy <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfApplication1" xmlns:mwc="http://schemas.microsoft.com/wpf/2008/toolkit" Title="Main Window" Height="300" Width="300"> <Grid> <mwc:DataGrid ItemsSource="{Binding Plans}" AutoGenerateColumns="False"> <mwc:DataGrid.Resources> <local:DataContextSpy x:Key="spy" /> </mwc:DataGrid.Resources> <mwc:DataGrid.Columns> <mwc:DataGridTextColumn Header="ID" Binding="{Binding Id}" DisplayIndex="{Binding Source={StaticResource spy}, Path=DataContext.IdDisplayIndex}" /> <mwc:DataGridTextColumn Header="Name" Binding="{Binding Name}" DisplayIndex="{Binding Source={StaticResource spy}, Path=DataContext.NameDisplayIndex}" /> <mwc:DataGridTextColumn Header="Description" Binding="{Binding Description}" DisplayIndex="{Binding Source={StaticResource spy}, Path=DataContext.DescriptionDisplayIndex}" /> </mwc:DataGrid.Columns> </mwc:DataGrid> </Grid> </Window> Note: If I just use plain numbers for DisplayIndex, everything works fine, so the problem is definitely with the bindings. Update 5/1/2010 I was just doing a little maintenance on my project, and I noticed that when I ran it, the problem I discuss in this post had returned. I knew that it worked last time I ran it, so I eventually narrowed the problem down to the fact that I had installed a newer version of the WPF Toolkit (Feb '10). When I reverted to the June '09 version, everything worked fine again. So, I'm now doing something I should have done in this first place: I'm including the WPFToolkit.dll that works in my solution folder and checking it into version control. It's unfortunate, though, that the newer toolkit has a breaking change.

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >