Search Results

Search found 308 results on 13 pages for 'the prop'.

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

  • Redefine Object.defineProperty in Javascript

    - by kwicher
    I would like to learn if it is possible to redefine the "definePropery" function of the Object(.prototype) in a subclass(.prototype) so that the setter not only sets the value of the property but also eg executes an additional method. I have tried something like that: Myclass.prototype.defineProperty = function (obj, prop, meth) { Object.defineProperty.call(this, obj, prop, { get: function () { return obj[prop] }, set: function () { obj[prop] = n; alert("dev") } }) } But id does not work

    Read the article

  • Toggle KML Layers, Infowindow isnt working

    - by user1653126
    I have this code, i am trying to toggle some kml layers. The problem is that when i click the marker it isn't showing the infowindow. Maybe someone can show me my error. Thanks. Here is the CODE <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=IzaSyAvj6XNNPO8YPFbkVR8KcTl5LK1ByRHG1E&sensor=false"> </script> <script type="text/javascript"> var map; // lets define some vars to make things easier later var kml = { a: { name: "Productores", url: "https://maps.google.hn/maps/ms?authuser=0&vps=2&hl=es&ie=UTF8&msa=0&output=kml&msid=200984447026903306654.0004c934a224eca7c3ad4" } // keep adding more if you like }; // initialize our goo function initializeMap() { var options = { center: new google.maps.LatLng(13.324182,-87.080071), zoom: 8, mapTypeId: google.maps.MapTypeId.TERRAIN } map = new google.maps.Map(document.getElementById("map_canvas"), options); createTogglers(); }; google.maps.event.addDomListener(window, 'load', initializeMap); // the important function... kml[id].xxxxx refers back to the top function toggleKML(checked, id) { if (checked) { var layer = new google.maps.KmlLayer(kml[id].url, { preserveViewport: true, suppressInfoWindows: true }); // store kml as obj kml[id].obj = layer; kml[id].obj.setMap(map); } else { kml[id].obj.setMap(null); delete kml[id].obj; } }; // create the controls dynamically because it's easier, really function createTogglers() { var html = "<form><ul>"; for (var prop in kml) { html += "<li id=\"selector-" + prop + "\"><input type='checkbox' id='" + prop + "'" + " onclick='highlight(this,\"selector-" + prop + "\"); toggleKML(this.checked, this.id)' \/>" + kml[prop].name + "<\/li>"; } html += "<li class='control'><a href='#' onclick='removeAll();return false;'>" + "Remove all layers<\/a><\/li>" + "<\/ul><\/form>"; document.getElementById("toggle_box").innerHTML = html; }; function removeAll() { for (var prop in kml) { if (kml[prop].obj) { kml[prop].obj.setMap(null); delete kml[prop].obj; } } }; // Append Class on Select function highlight(box, listitem) { var selected = 'selected'; var normal = 'normal'; document.getElementById(listitem).className = (box.checked ? selected: normal); }; </script> <style type="text/css"> .selected { font-weight: bold; } </style> </head> <body> <div id="map_canvas" style="width: 50%; height: 200px;"></div> <div id="toggle_box" style="position: absolute; top: 200px; right: 1000px; padding: 20px; background: #fff; z-index: 5; "></div> </body> </html>

    Read the article

  • Prevent Erroneous Property Assignment

    - by Gordon
    Porting android applications to iphone applications always gives me the following pattern that I accidentally create: - (void) myFunc:(id)prop { self.property = property; } Which instead should be: - (void) myFunc:(id)prop { self.property = prop; } This always causes my program to quietly break because property gets reset to its existing value rather than being set to the new value, 'prop'. I cannot name the parameter 'prop' to 'property' since the compile complains that the parameter masks the instance variables visibility. Is there a good way to avoid this situation? There are no compiler warnings. Is there a way to make xcode prevent this? I cannot see very many situations where you would set a property to the value of its underlying instance variable (maybe to trigger a KVO binding?), but I don't see myself doing that in majority of cases. I understand the above code is synthetic and should be done with @synthesize, but I am just using it as a simplified example to illustrate my point.

    Read the article

  • Deploying a SharePoint 2007 theme using Features

    - by Kelly Jones
    I recently had a requirement to update the branding on an existing Windows SharePoint Services (WSS version 3.0) site.  I needed to update the theme, along with the master page.  An additional requirement is that my client likes to have all changes bundled up in SharePoint solutions.  This makes it much easier to move code from dev to test to prod and more importantly, makes it easier to undo code migrations if any issues would arise (I agree with this approach). Updating the theme was easy enough.  I created a new theme, along with a two new features.  The first feature, scoped at the farm level, deploys the theme, adding it to the spthemes.xml file (in the 12 hive –> \Template\layouts\1033 folder).  Here’s the method that I call from the feature activated event: private static void AddThemeToSpThemes(string id, string name, string description, string thumbnail, string preview, SPFeatureReceiverProperties properties) { XmlDocument spThemes = new XmlDocument(); //use GetGenericSetupPath to find the 12 hive folder string spThemesPath = SPUtility.GetGenericSetupPath(@"TEMPLATE\LAYOUTS\1033\spThemes.xml"); //load the spthemes file into our xmldocument, since it is just xml spThemes.Load(spThemesPath); XmlNode root = spThemes.DocumentElement; //search the themes file to see if our theme is already added bool found = false; foreach (XmlNode node in root.ChildNodes) { foreach (XmlNode prop in node.ChildNodes) { if (prop.Name.Equals("TemplateID")) { if (prop.InnerText.Equals(id)) { found = true; break; } } } if (found) { break; } } if (!found) //theme not found, so add it { //This is what we need to add: // <Templates> // <TemplateID>ThemeName</TemplateID> // <DisplayName>Theme Display Name</DisplayName> // <Description>My theme description</Description> // <Thumbnail>images/mythemethumb.gif</Thumbnail> // <Preview>images/mythemepreview.gif</Preview> // </Templates> StringBuilder sb = new StringBuilder(); sb.Append("<Templates><TemplateID>"); sb.Append(id); sb.Append("</TemplateID><DisplayName>"); sb.Append(name); sb.Append("</DisplayName><Description>"); sb.Append(description); sb.Append("</Description><Thumbnail>"); sb.Append(thumbnail); sb.Append("</Thumbnail><Preview>"); sb.Append(preview); sb.Append("</Preview></Templates>"); root.CreateNavigator().AppendChild(sb.ToString()); spThemes.Save(spThemesPath); } } Just as important, is the code that removes the theme when the feature is deactivated: private static void RemoveThemeFromSpThemes(string id) { XmlDocument spThemes = new XmlDocument(); string spThemesPath = HostingEnvironment.MapPath("/_layouts/") + @"1033\spThemes.xml"; spThemes.Load(spThemesPath); XmlNode root = spThemes.DocumentElement; foreach (XmlNode node in root.ChildNodes) { foreach (XmlNode prop in node.ChildNodes) { if (prop.Name.Equals("TemplateID")) { if (prop.InnerText.Equals(id)) { root.RemoveChild(node); spThemes.Save(spThemesPath); break; } } } } } So, that takes care of deploying the theme.  In order to apply the theme to the web, my activate feature method looks like this: public override void FeatureDeactivating(SPFeatureReceiverProperties properties) { using (SPWeb curweb = (SPWeb)properties.Feature.Parent) { curweb.ApplyTheme("myThemeName"); curweb.Update(); } } Deactivating is just as simple: public override void FeatureDeactivating(SPFeatureReceiverProperties properties) { using (SPWeb curweb = (SPWeb)properties.Feature.Parent) { curweb.ApplyTheme("none"); curweb.Update(); } } Ok, that’s the code necessary to deploy, apply, un-apply, and retract the theme.  Also, the solution (WSP file) contains the actual theme files. SO, next is the master page, which I’ll cover in my next blog post.

    Read the article

  • JPA 2 and Hibernate 3.5.1 MEMBER OF query doesnt work.

    - by Ed_Zero
    I'm trying the following JPQL and it fails misserably: Query query = em.createQuery("SELECT u FROM User u WHERE 'admin' MEMBER OF u.roles"); List users = query.query.getResultList(); I get the following exception: ERROR [main] PARSER.error(454) | <AST>:0:0: unexpected end of subtree java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [SELECT u FROM com.online.data.User u WHERE 'admin' MEMBER OF u.roles] ERROR [main] PARSER.error(454) | <AST>:0:0: expecting "from", found '<ASTNULL>' ... ... Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [SELECT u FROM com.online.data.User u WHERE 'admin' MEMBER OF u.roles] I have Spring 3.0.1.RELEASE, Hibernate 3.5.1-Final and maven to glue dependencies. User class: @Entity public class User { @Id @Column(name = "USER_ID") @GeneratedValue(strategy = GenerationType.IDENTITY) private long id; @Column(unique = true, nullable = false) private String username; private boolean enabled; @ElementCollection private Set<String> roles = new HashSet<String>(); ... } Spring configuration: <?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:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/tx/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> <!-- Reading annotation driven configuration --> <tx:annotation-driven transaction-manager="transactionManager" /> <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" /> <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" /> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="${jdbc.driverClassName}" /> <property name="url" value="${jdbc.url}" /> <property name="username" value="${jdbc.username}" /> <property name="password" value="${jdbc.password}" /> <property name="maxActive" value="100" /> <property name="maxWait" value="1000" /> <property name="poolPreparedStatements" value="true" /> <property name="defaultAutoCommit" value="true" /> </bean> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory" /> <property name="dataSource" ref="dataSource" /> </bean> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="showSql" value="true" /> <property name="databasePlatform" value="${hibernate.dialect}" /> </bean> </property> <property name="loadTimeWeaver"> <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" /> </property> <property name="jpaProperties"> <props> <prop key="hibernate.hbm2ddl.auto">update</prop> <prop key="hibernate.current_session_context_class">thread</prop> <prop key="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.format_sql">false</prop> <prop key="hibernate.show_comments">true</prop> </props> </property> <property name="persistenceUnitName" value="punit" /> </bean> <bean id="JpaTemplate" class="org.springframework.orm.jpa.JpaTemplate"> <property name="entityManagerFactory" ref="entityManagerFactory" /> </bean> </beans> Persistence.xml <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence"> <persistence-unit name="punit" transaction-type="RESOURCE_LOCAL" /> </persistence> pom.xml maven dependencies. <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate</artifactId> <version>${hibernate.version}</version> <type>pom</type> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>${hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> <version>${hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>${hibernate.version}</version> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.2.2</version> <type>jar</type> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-taglibs</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-acl</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>javax.annotation</groupId> <artifactId>jsr250-api</artifactId> <version>1.0</version> </dependency> <properties> <!-- Application settings --> <spring.version>3.0.1.RELEASE</spring.version> <hibernate.version>3.5.1-Final</hibernate.version> Im running a unit test to check the configuration and I am able to run other JPQL queries the only ones that I am unable to run are the IS EMPTY, MEMBER OF conditions. The complete unit test is as follows: TestIntegration @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "/spring/dataLayer.xml"}) @Transactional @TransactionConfiguration public class TestUserDaoImplIntegration { @PersistenceContext private EntityManager em; @Test public void shouldTest() throws Exception { try { //WORKS Query query = em.createQuery("SELECT u FROM User u WHERE 'admin' in elements(u.roles)"); List users = query.query.getResultList(); //DOES NOT WORK } catch (Exception e) { e.printStackTrace(); throw e; } try { Query query = em.createQuery("SELECT u FROM User u WHERE 'admin' MEMBER OF u.roles"); List users = query.query.getResultList(); } catch (Exception e) { e.printStackTrace(); throw e; } } }

    Read the article

  • Passing in defaults within window.onload?

    - by Matrym
    I now understand that the following code will not work because I'm assigning window.onload to the result of the function, not the function itself. But if I remove the parens, I suspect that I have to explicitly call a separate function to process the config before the onload. So, where I now have: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <HEAD> <script type="text/javascript" src="lb-core.js"></script> <script type="application/javascript"> var lbp = { defaults: { color: "blue" }, init: function(config) { if(config) { for(prop in config){ setBgcolor.defaults[prop] = config[prop]; } } var bod = document.body; bod.style.backgroundColor = setBgcolor.defaults.color; } } var config = { color: "green" } window.onload = lbp.init(config); </script> </HEAD> <body> <div id="container">test</div> </body> </HTML> I imagine I would have to change it to: var lbp = { defaults: { color: "blue" }, configs: function(config){ for(prop in config){ setBgcolor.defaults[prop] = config[prop]; } }, init: function() { var bod = document.body; bod.style.backgroundColor = setBgcolor.defaults.color; } } var config = { color: "green" } lbp.configs(config); window.onload = lbp.init; Then, for people to use this script and pass in a configuration, they would need to call both of those bottom lines separately (configs and init). Is there a better way of doing this? Note: If your answer is to bundle a function of window.onload, please also confirm that it is not hazardous to assign window.onload within scripts. It's my understanding that another script coming after my own could, in fact, overwrite what I'd assigned to onload.

    Read the article

  • Spring MVC: How to resolve the path to subdirectories of the root 'JSP' folder in a web application

    - by chrisjleu
    What is a simple way to resolve the path to a JSP file that is not located in the root JSP directory of a web application using SpringMVCs viewResolvers? For example, suppose we have the following web application structure: web-app |-WEB-INF |-jsp |-secure |-admin.jsp |-admin2.jsp index.jsp login.jsp I would like to use some out-of-the-box components to resolve the JSP files within the jsp root folder and the secure subdirectory. I have a *-servlet.xml file that defines: an out-of-the-box, InternalResourceViewResolver: <bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property> <property name="prefix" value="/WEB-INF/jsp/"></property> <property name="suffix" value=".jsp"></property> </bean> a handler mapping: <bean id="handlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/index.htm">urlFilenameViewController</prop> <prop key="/login.htm">urlFilenameViewController</prop> <prop key="/secure/**">urlFilenameViewController</prop> </props> </property> </bean> an out-of-the-box UrlFilenameViewController controller: <bean id="urlFilenameViewController" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"> </bean> The problem I have is that requests to the JSPs in the secure directory cannot be resolved, as the jspViewResolver only has a prefix defined as /jsp/ and not /jsp/secure/. Is there a way to handle subdirectories like this? I would prefer to keep this structure because I'm also trying to make use of Spring Security and having all secure pages in a subdirectory is a nice way to do this. There's probably a simple way to acheive this but I'm new to Spring and the Spring MVC framework so any pointers would be appreciated.

    Read the article

  • automating hudson builds with ant throwing 403

    - by Christopher Dancy
    We have a hudson server which deploys builds. We have a few services which we want to be able to remotely tell hudson to deploy a certain build ... these services are using ant. So I'm trying to get it working but keeping getting a 403 response when giving a build number like so... <ac:post to="http://hostname:8080/hudson/job/test_release_indexes/build?" verbose="true" wantresponse="true"> <prop name="token" value="indexes"/> <prop name="BUILDNUMBER" value="0354"/> </ac:post> this throws the 403. I've also tried passing it props for the username and password like so ... <ac:post to="http://srulesre2:8080/hudson/job/test_dartmouth_indexes/build?" verbose="true" wantresponse="true"> <prop name="token" value="indexes"/> <prop name="BUILDNUMBER" value="0354"/> <prop name="username" value="test"/> <prop name="password" value="test"/> </ac:post> I've tried a hundred different variations on username and password ... like j_username and j_password or user and pass ... but nothing is working ... keep getting the same 403. And the username and password are valid because I can manually log in with admin privileges. Any ideas would be great

    Read the article

  • oracle hibernate + maven dependenciesm dbcp.basicdatasource exception

    - by Joe
    I'm trying to create a web application using maven, tomcat and hibernate. Now I'm getting a cannot find class for org.appache.commons.dbcp.basicdatasource for bean with name datasource... exception. Without the hibernate aspects it works fine, but if I add <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop> <prop key="hibernate.hbm2ddl.auto">create</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> <property name="mappingResources"> <list> </list> </property> </bean> to my applicationContext then I get the error. What I did was: -add org.hibernate to my pom -put ojdbc16.jar in my tomcat bin folder -add the above snippet to my applicationContext.xml I use a bat file to compile my project (using maven), copy it to my tomcat webapp folder and to start the server. Any input on what I'm doing wrong is welcome.

    Read the article

  • Maven profile properties are not "overriding"

    - by Nazar
    I have Maven multi-module project with such structure: parent-pom-project -- module1 -- module2 At the parent-pom-project I have such pom.xml <modules> <module>module1</module> </modules> ... <profiles> <profile> <id>local</id> <properties> <prop>local_prop</prop> </properties> </profile> <profile> <id>test</id> <modules> <module>module2</module> </modules> <properties> <prop>test_prop</prop> </properties> </profile> </profiles> At all pom.xml files I have such tag: <build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> <resource> <directory>src/test/resources</directory> <filtering>true</filtering> </resource> </resources> </build> At module1 and module2 in resource directory I have properties files with such text: prop=${prop} The problem is that after mvn clean install or mvn clean install -Ptest or even mvn clean install -P test I get prop=local_prop If I user test profile for build module2 is also builded, but properties are used from local profile. I use Maven 3.0.3. Anybody have any ideas?

    Read the article

  • This file does not have a program associated with it for performing

    - by Abu Hamzah
    update 2: HKEY_CLASSES_ROOT\folder ContentViewModeLayoutPatternForBrowse REG_SZ delta ContentViewModeForBrowse REG_SZ prop:~System.ItemNameDisplay;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;System.DateModified ContentViewModeLayoutPatternForSearch REG_SZ alpha ContentViewModeForSearch REG_SZ prop:~System.ItemNameDisplay;System.DateModified;~System.ItemFolderPathDisplay (Default) REG_SZ Folder EditFlags REG_BINARY D2030000 FullDetails REG_SZ prop:System.PropGroup.Description;System.ItemNameDisplay;System.ItemTypeText;System.Size NoRecentDocs REG_SZ ThumbnailCutoff REG_DWORD 0x0 TileInfo REG_SZ prop:System.Title;System.ItemTypeText HKEY_CLASSES_ROOT\folder\DefaultIcon (Default) REG_EXPAND_SZ %SystemRoot%\System32\shell32.dll,3 HKEY_CLASSES_ROOT\folder\shell HKEY_CLASSES_ROOT\folder\shell\explore HKEY_CLASSES_ROOT\folder\shell\explore\command HKEY_CLASSES_ROOT\folder\shell\open MultiSelectModel REG_SZ Document HKEY_CLASSES_ROOT\folder\shell\open\command DelegateExecute REG_SZ {11dbb47c-a525-400b-9e80-a54615a090c0} (Default) REG_EXPAND_SZ %SystemRoot%\Explorer.exe HKEY_CLASSES_ROOT\folder\shell\opennewprocess MUIVerb REG_SZ @shell32.dll,-8518 MultiSelectModel REG_SZ Document Extended REG_SZ LaunchExplorerFlags REG_DWORD 0x3 ExplorerHost REG_SZ {ceff45ee-c862-41de-aee2-a022c81eda92} HKEY_CLASSES_ROOT\folder\shell\opennewprocess\command DelegateExecute REG_SZ {11dbb47c-a525-400b-9e80-a54615a090c0} HKEY_CLASSES_ROOT\folder\shell\opennewwindow MUIVerb REG_SZ @shell32.dll,-8517 MultiSelectModel REG_SZ Document OnlyInBrowserWindow REG_SZ LaunchExplorerFlags REG_DWORD 0x1 HKEY_CLASSES_ROOT\folder\shell\opennewwindow\command DelegateExecute REG_SZ {11dbb47c-a525-400b-9e80-a54615a090c0} HKEY_CLASSES_ROOT\folder\ShellEx HKEY_CLASSES_ROOT\folder\ShellEx\ColumnHandlers HKEY_CLASSES_ROOT\folder\ShellEx\ColumnHandlers\{0561EC90-CE54-4f0c-9C55-E226110A740C} (Default) REG_SZ Haali Column Provider HKEY_CLASSES_ROOT\folder\ShellEx\ColumnHandlers\{F9DB5320-233E-11D1-9F84-707F02C10627} (Default) REG_SZ PDF Column Info HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\Adobe.Acrobat.ContextMenu (Default) REG_SZ {D25B2CAB-8A9A-4517-A9B2-CB5F68A5A802} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\BriefcaseMenu (Default) REG_SZ {85BBD920-42A0-1069-A2E4-08002B30309D} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\ESET Smart Security - Context Menu Shell Extension (Default) REG_SZ {B089FE88-FB52-11D3-BDF1-0050DA34150D} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\LavasoftShellExt (Default) REG_SZ {DCE027F7-16A4-4BEE-9BE7-74F80EE3738F} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\Library Location (Default) REG_SZ {3dad6c5d-2167-4cae-9914-f99e41c12cfa} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\MagicISO (Default) REG_SZ {DB85C504-C730-49DD-BEC1-7B39C6103B7A} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\MBAMShlExt (Default) REG_SZ {57CE581A-0CB6-4266-9CA0-19364C90A0B3} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\WinRAR (Default) REG_SZ {B41DB860-8EE4-11D2-9906-E49FADC173CA} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\WS_FTP (Default) REG_SZ {797F3885-5429-11D4-8823-0050DA59922B} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\XXX Groove GFS Context Menu Handler XXX (Default) REG_SZ {6C467336-8281-4E60-8204-430CED96822D} HKEY_CLASSES_ROOT\folder\ShellEx\DragDropHandlers HKEY_CLASSES_ROOT\folder\ShellEx\DragDropHandlers\WinRAR (Default) REG_SZ {B41DB860-8EE4-11D2-9906-E49FADC173CA} HKEY_CLASSES_ROOT\folder\ShellEx\DragDropHandlers\{BD472F60-27FA-11cf-B8B4-444553540000} (Default) REG_SZ HKEY_CLASSES_ROOT\folder\ShellEx\PropertySheetHandlers HKEY_CLASSES_ROOT\folder\ShellEx\PropertySheetHandlers\BriefcasePage (Default) REG_SZ {85BBD920-42A0-1069-A2E4-08002B30309D} HKEY_CLASSES_ROOT\folder\ShellNew Directory REG_SZ IconPath REG_EXPAND_SZ %SystemRoot%\system32\shell32.dll,3 ItemName REG_SZ @shell32.dll,-30396 MenuText REG_SZ @shell32.dll,-30317 NonLFNFileSpec REG_SZ @shell32.dll,-30319 HKEY_CLASSES_ROOT\folder\ShellNew\Config AllDrives REG_SZ IsFolder REG_SZ NoExtension REG_SZ update: HKEY_CLASSES_ROOT\Directory AlwaysShowExt REG_SZ (Default) REG_SZ File Folder EditFlags REG_BINARY D2010000 FriendlyTypeName REG_SZ @shell32.dll,-10152 FullDetails REG_SZ prop:System.PropGroup.Description;System.DateCreated;System.FileCount;System.TotalFileSize InfoTip REG_SZ prop:System.Comment;System.DateCreated NoRecentDocs REG_SZ PreviewDetails REG_SZ prop:System.DateModified;*System.SharedWith;*System.OfflineAvailability;*System.OfflineStatus PreviewTitle REG_SZ prop:System.ItemNameDisplay;System.ItemTypeText HKEY_CLASSES_ROOT\Directory\Background HKEY_CLASSES_ROOT\Directory\Background\shell HKEY_CLASSES_ROOT\Directory\Background\shell\cmd (Default) REG_SZ @shell32.dll,-8506 Extended REG_SZ NoWorkingDirectory REG_SZ HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\command (Default) REG_SZ cmd.exe /s /k pushd "%V" HKEY_CLASSES_ROOT\Directory\Background\shellex HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Gadgets (Default) REG_SZ {6B9228DA-9C15-419e-856C-19E768A13BDC} HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\igfxcui (Default) REG_SZ {3AB1675A-CCFF-11D2-8B20-00A0C93CB1F4} HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\New (Default) REG_SZ {D969A300-E7FF-11d0-A93B-00A0C90F2719} HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Sharing (Default) REG_SZ {f81e9010-6ea4-11ce-a7ff-00aa003ca9f6} HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\XXX Groove GFS Context Menu Handler XXX (Default) REG_SZ {6C467336-8281-4E60-8204-430CED96822D} HKEY_CLASSES_ROOT\Directory\DefaultIcon (Default) REG_EWindows Windows XPAND_SZ %SystemRoot%\System32\shell32.dll,3 HKEY_CLASSES_ROOT\Directory\shell (Default) REG_SZ none HKEY_CLASSES_ROOT\Directory\shell\cmd (Default) REG_SZ @shell32.dll,-8506 Extended REG_SZ NoWorkingDirectory REG_SZ HKEY_CLASSES_ROOT\Directory\shell\cmd\command (Default) REG_SZ cmd.exe /s /k pushd "%V" HKEY_CLASSES_ROOT\Directory\shell\find LegacyDisable REG_SZ SuppressionPolicy REG_DWORD 0x80 HKEY_CLASSES_ROOT\Directory\shell\find\command (Default) REG_EWindows Windows XPAND_SZ %SystemRoot%\EWindows Windows XPlorer.exe DelegateExecute REG_SZ {a015411a-f97d-4ef3-8425-8a38d022aebc} HKEY_CLASSES_ROOT\Directory\shell\find\ddeexec (Default) REG_SZ [FindFolder("%l", %I)] NoActivateHandler REG_SZ HKEY_CLASSES_ROOT\Directory\shell\find\ddeexec\application (Default) REG_SZ Folders HKEY_CLASSES_ROOT\Directory\shell\find\ddeexec\topic (Default) REG_SZ AppProperties HKEY_CLASSES_ROOT\Directory\shell\OneNote.Open (Default) REG_SZ Open as Notebook in OneNote HKEY_CLASSES_ROOT\Directory\shell\OneNote.Open\Command (Default) REG_SZ C:\PROGRA~1\Microsoft Office\Office12\ONENOTE.EXE "%L" HKEY_CLASSES_ROOT\Directory\shellex HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\CuteFTP 8 Professional (Default) REG_SZ {8f7261d0-d2b9-11d2-9909-00605205b24c} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\EncryptionMenu (Default) REG_SZ {A470F8CF-A1E8-4f65-8335-227475AA5C46} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\MagicISO (Default) REG_SZ {DB85C504-C730-49DD-BEC1-7B39C6103B7A} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\Sharing (Default) REG_SZ {f81e9010-6ea4-11ce-a7ff-00aa003ca9f6} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\ShellExtension HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\WinRAR (Default) REG_SZ {B41DB860-8EE4-11D2-9906-E49FADC173CA} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\XXX Groove GFS Context Menu Handler XXX (Default) REG_SZ {6C467336-8281-4E60-8204-430CED96822D} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153} HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers\FileSystem (Default) REG_SZ {217FC9C0-3AEA-1069-A2DB-08002B30309D} HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers\Sharing (Default) REG_SZ {40dd6e20-7c17-11ce-a804-00aa003ca9f6} HKEY_CLASSES_ROOT\Directory\shellex\DragDropHandlers HKEY_CLASSES_ROOT\Directory\shellex\DragDropHandlers\WinRAR (Default) REG_SZ {B41DB860-8EE4-11D2-9906-E49FADC173CA} HKEY_CLASSES_ROOT\Directory\shellex\DragDropHandlers\WS_FTP (Default) REG_SZ {1D83C7B3-C931-4850-BED0-D3FE8B3F5808} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\Sharing (Default) REG_SZ {f81e9010-6ea4-11ce-a7ff-00aa003ca9f6} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\{1f2e5c40-9550-11ce-99d2-00aa006e086c} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\{4a7ded0a-ad25-11d0-98a8-0800361b1103} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\{ECCDF543-45CC-11CE-B9BF-0080C87CDBA6} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\{ef43ecfe-2ab9-4632-bf21-58909dd177f0} (Default) REG_SZ I updated my IE9 from IE8 and after I reboot my machine and try to access my computer drive and I get this error message whenever I try to double click c:\ drive or other drives but other than that everything seems to be working fince except that I can not access my drives.... its very strange any help? <<<This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel>>> using Windows 7 32 bit

    Read the article

  • javamail smtp issue

    - by lepricon123
    I am using spring to send mail and for some reason its stripping the from email address. I ma sending the complete address form the sender to the mails server. Following is the log 10.105.21.299, taq02, 5/4/2010, 14:50:32, SMTPSVC1, taser10, 10.100.20.106, 2250, 11, 199, 250, 0, EHLO, -, taq02, 10.105.21.299, taq02, 5/4/2010, 14:50:32, SMTPSVC1, taser10, 10.100.20.106, 0, 14, 34, 250, 0, MAIL, -, FROM:<{}>, 10.105.21.299, taq02, 5/4/2010, 14:50:32, SMTPSVC1, taser10, 10.100.20.106, 0, 32, 35, 250, 0, RCPT, -, TO:<[email protected]>, 10.105.21.299, taq02, 5/4/2010, 14:50:32, SMTPSVC1, taser10, 10.100.20.106, 0, 681, 130, 250, 0, DATA, -, <27317520.11273009832239.JavaMail.root@taq02>, 10.105.21.299, taq02, 5/4/2010, 14:50:32, SMTPSVC1, taser10, 10.100.20.106, 0, 4, 78, 240, 2265, QUIT, -, taq02, 148.142.126.203, OutboundConnectionResponse, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1110, 0, 95, 0, 0, -, -, 220 *******************************************************************************************, 148.142.126.203, OutboundConnectionCommand, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1110, 0, 4, 0, 0, EHLO, -, TASER10.ccdomain.com, 148.142.126.203, OutboundConnectionResponse, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1188, 0, 65, 0, 0, -, -, 250-acsinet11.emailserver.com Hello [4.79.35.186], pleased to meet you, 148.142.126.203, OutboundConnectionCommand, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1188, 0, 4, 0, 0, MAIL, -, FROM:<{}@TASER10> SIZE=945, 148.142.126.203, OutboundConnectionResponse, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1328, 0, 34, 0, 0, -, -, 250 2.1.0 <{}@TASER10>... Sender ok, 148.142.126.203, OutboundConnectionCommand, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1328, 0, 4, 0, 0, RCPT, -, TO:<[email protected]>, 148.142.126.203, OutboundConnectionResponse, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1375, 0, 87, 0, 0, -, -, 553 5.1.8 <[email protected]>... Domain of sender address {}@TASER10 does not exist, 148.142.126.203, OutboundConnectionCommand, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1375, 0, 4, 0, 0, RSET, -, -, 148.142.126.203, OutboundConnectionResponse, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1407, 0, 21, 0, 0, -, -, 250 2.0.0 Reset state, 148.142.126.203, OutboundConnectionCommand, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1422, 0, 4, 0, 0, RSET, -, -, The mail server is taser10 and the sender is on taq02 erver as follows http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" <bean id="smtpAuthenticator" class="SmtpAuthenticator"> <constructor-arg value="[email protected]" /> <constructor-arg value="password" /> </bean> <bean id="mailSession" class="javax.mail.Session" factory-method="getInstance"> <constructor-arg> <props> <prop key="mail.smtp.auth">false</prop> <prop key="mail.smtp.socketFactory.port">465</prop> <prop key="mail.smtp.socketFactory.class"> javax.net.ssl.SSLSocketFactory</prop> <prop key="mail.smtp.socketFactory.fallback"> false </prop> </props> </constructor-arg> <constructor-arg ref="smtpAuthenticator" /> </bean> <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="10.100.20.106" /> </bean> <bean id="mailMessage" class="org.springframework.mail.SimpleMailMessage"> <property name="from" value="[email protected]" /> <property name="subject" value="Subject AB"/> </bean>

    Read the article

  • Spring hibernate ehcache setup

    - by Johan Sjöberg
    I have some problems getting the hibernate second level cache to work for caching domain objects. According to the ehcache documentation it shouldn't be too complicated to add caching to my existing working application. I have the following setup (only relevant snippets are outlined): @Entity @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE public void Entity { // ... } ehcache-entity.xml <cache name="com.company.Entity" eternal="false" maxElementsInMemory="10000" overflowToDisk="true" diskPersistent="false" timeToIdleSeconds="0" timeToLiveSeconds="300" memoryStoreEvictionPolicy="LRU" /> ApplicationContext.xml <bean class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="ds" /> <property name="annotatedClasses"> <list> <value>com.company.Entity</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.generate_statistics">true</prop> <prop key="hibernate.cache.use_second_level_cache">true</prop> <prop key="net.sf.ehcache.configurationResourceName">/ehcache-entity.xml</prop> <prop key="hibernate.cache.region.factory_class">net.sf.ehcache.hibernate.SingletonEhCacheRegionFactory</prop> .... </property> </bean> Maven dependencies <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> <version>3.4.0.GA</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-hibernate3</artifactId> <version>2.0.8</version> <exclusions> <exclusion> <artifactId>hibernate</artifactId> <groupId>org.hibernate</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache-core</artifactId> <version>2.3.2</version> </dependency> A test class is used which enables cache statistics: Cache cache = cacheManager.getCache("com.company.Entity"); cache.setStatisticsAccuracy(Statistics.STATISTICS_ACCURACY_GUARANTEED); cache.setStatisticsEnabled(true); // store, read etc ... cache.getStatistics().getMemoryStoreObjectCount(); // returns 0 No operation seems to trigger any cache changes. What am I missing? Currently I'm using HibernateTemplate in the DAO, perhaps that has some impact. [EDIT] The only ehcache log output when set to DEBUG is: SettingsFactory: Cache region factory : net.sf.ehcache.hibernate.SingletonEhCacheRegionFactory

    Read the article

  • Problem displaying tiles using tiled map loader with SFML

    - by user1905192
    I've been searching fruitlessly for what I did wrong for the past couple of days and I was wondering if anyone here could help me. My program loads my tile map, but then crashes with an assertion error. The program breaks at this line: spacing = atoi(tilesetElement-Attribute("spacing")); Here's my main game.cpp file. #include "stdafx.h" #include "Game.h" #include "Ball.h" #include "level.h" using namespace std; Game::Game() { gameState=NotStarted; ball.setPosition(500,500); level.LoadFromFile("meow.tmx"); } void Game::Start() { if (gameState==NotStarted) { window.create(sf::VideoMode(1024,768,320),"game"); view.reset(sf::FloatRect(0,0,1000,1000));//ball drawn at 500,500 level.SetDrawingBounds(sf::FloatRect(view.getCenter().x-view.getSize().x/2,view.getCenter().y-view.getSize().y/2,view.getSize().x, view.getSize().y)); window.setView(view); gameState=Playing; } while(gameState!=Exiting) { GameLoop(); } window.close(); } void Game::GameLoop() { sf::Event CurrentEvent; window.pollEvent(CurrentEvent); switch(gameState) { case Playing: { window.clear(sf::Color::White); window.setView(view); if (CurrentEvent.type==sf::Event::Closed) { gameState=Exiting; } if ( !ball.IsFalling() &&!ball.IsJumping() &&sf::Keyboard::isKeyPressed(sf::Keyboard::Space)) { ball.setJState(); } ball.Update(view); level.Draw(window); ball.Draw(window); window.display(); break; } } } And here's the file where the error happens: /********************************************************************* Quinn Schwab 16/08/2010 SFML Tiled Map Loader The zlib license has been used to make this software fully compatible with SFML. See http://www.sfml-dev.org/license.php This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. *********************************************************************/ #include "level.h" #include <iostream> #include "tinyxml.h" #include <fstream> int Object::GetPropertyInt(std::string name) { int i; i = atoi(properties[name].c_str()); return i; } float Object::GetPropertyFloat(std::string name) { float f; f = strtod(properties[name].c_str(), NULL); return f; } std::string Object::GetPropertyString(std::string name) { return properties[name]; } Level::Level() { //ctor } Level::~Level() { //dtor } using namespace std; bool Level::LoadFromFile(std::string filename) { TiXmlDocument levelFile(filename.c_str()); if (!levelFile.LoadFile()) { std::cout << "Loading level \"" << filename << "\" failed." << std::endl; return false; } //Map element. This is the root element for the whole file. TiXmlElement *map; map = levelFile.FirstChildElement("map"); //Set up misc map properties. width = atoi(map->Attribute("width")); height = atoi(map->Attribute("height")); tileWidth = atoi(map->Attribute("tilewidth")); tileHeight = atoi(map->Attribute("tileheight")); //Tileset stuff TiXmlElement *tilesetElement; tilesetElement = map->FirstChildElement("tileset"); firstTileID = atoi(tilesetElement->Attribute("firstgid")); spacing = atoi(tilesetElement->Attribute("spacing")); margin = atoi(tilesetElement->Attribute("margin")); //Tileset image TiXmlElement *image; image = tilesetElement->FirstChildElement("image"); std::string imagepath = image->Attribute("source"); if (!tilesetImage.loadFromFile(imagepath))//Load the tileset image { std::cout << "Failed to load tile sheet." << std::endl; return false; } tilesetImage.createMaskFromColor(sf::Color(255, 0, 255)); tilesetTexture.loadFromImage(tilesetImage); tilesetTexture.setSmooth(false); //Columns and rows (of tileset image) int columns = tilesetTexture.getSize().x / tileWidth; int rows = tilesetTexture.getSize().y / tileHeight; std::vector <sf::Rect<int> > subRects;//container of subrects (to divide the tilesheet image up) //tiles/subrects are counted from 0, left to right, top to bottom for (int y = 0; y < rows; y++) { for (int x = 0; x < columns; x++) { sf::Rect <int> rect; rect.top = y * tileHeight; rect.height = y * tileHeight + tileHeight; rect.left = x * tileWidth; rect.width = x * tileWidth + tileWidth; subRects.push_back(rect); } } //Layers TiXmlElement *layerElement; layerElement = map->FirstChildElement("layer"); while (layerElement) { Layer layer; if (layerElement->Attribute("opacity") != NULL)//check if opacity attribute exists { float opacity = strtod(layerElement->Attribute("opacity"), NULL);//convert the (string) opacity element to float layer.opacity = 255 * opacity; } else { layer.opacity = 255;//if the attribute doesnt exist, default to full opacity } //Tiles TiXmlElement *layerDataElement; layerDataElement = layerElement->FirstChildElement("data"); if (layerDataElement == NULL) { std::cout << "Bad map. No layer information found." << std::endl; } TiXmlElement *tileElement; tileElement = layerDataElement->FirstChildElement("tile"); if (tileElement == NULL) { std::cout << "Bad map. No tile information found." << std::endl; return false; } int x = 0; int y = 0; while (tileElement) { int tileGID = atoi(tileElement->Attribute("gid")); int subRectToUse = tileGID - firstTileID;//Work out the subrect ID to 'chop up' the tilesheet image. if (subRectToUse >= 0)//we only need to (and only can) create a sprite/tile if there is one to display { sf::Sprite sprite;//sprite for the tile sprite.setTexture(tilesetTexture); sprite.setTextureRect(subRects[subRectToUse]); sprite.setPosition(x * tileWidth, y * tileHeight); sprite.setColor(sf::Color(255, 255, 255, layer.opacity));//Set opacity of the tile. //add tile to layer layer.tiles.push_back(sprite); } tileElement = tileElement->NextSiblingElement("tile"); //increment x, y x++; if (x >= width)//if x has "hit" the end (right) of the map, reset it to the start (left) { x = 0; y++; if (y >= height) { y = 0; } } } layers.push_back(layer); layerElement = layerElement->NextSiblingElement("layer"); } //Objects TiXmlElement *objectGroupElement; if (map->FirstChildElement("objectgroup") != NULL)//Check that there is atleast one object layer { objectGroupElement = map->FirstChildElement("objectgroup"); while (objectGroupElement)//loop through object layers { TiXmlElement *objectElement; objectElement = objectGroupElement->FirstChildElement("object"); while (objectElement)//loop through objects { std::string objectType; if (objectElement->Attribute("type") != NULL) { objectType = objectElement->Attribute("type"); } std::string objectName; if (objectElement->Attribute("name") != NULL) { objectName = objectElement->Attribute("name"); } int x = atoi(objectElement->Attribute("x")); int y = atoi(objectElement->Attribute("y")); int width = atoi(objectElement->Attribute("width")); int height = atoi(objectElement->Attribute("height")); Object object; object.name = objectName; object.type = objectType; sf::Rect <int> objectRect; objectRect.top = y; objectRect.left = x; objectRect.height = y + height; objectRect.width = x + width; if (objectType == "solid") { solidObjects.push_back(objectRect); } object.rect = objectRect; TiXmlElement *properties; properties = objectElement->FirstChildElement("properties"); if (properties != NULL) { TiXmlElement *prop; prop = properties->FirstChildElement("property"); if (prop != NULL) { while(prop) { std::string propertyName = prop->Attribute("name"); std::string propertyValue = prop->Attribute("value"); object.properties[propertyName] = propertyValue; prop = prop->NextSiblingElement("property"); } } } objects.push_back(object); objectElement = objectElement->NextSiblingElement("object"); } objectGroupElement = objectGroupElement->NextSiblingElement("objectgroup"); } } else { std::cout << "No object layers found..." << std::endl; } return true; } Object Level::GetObject(std::string name) { for (int i = 0; i < objects.size(); i++) { if (objects[i].name == name) { return objects[i]; } } } void Level::SetDrawingBounds(sf::Rect<float> bounds) { drawingBounds = bounds; cout<<tileHeight; //Adjust the rect so that tiles are drawn just off screen, so you don't see them disappearing. drawingBounds.top -= tileHeight; drawingBounds.left -= tileWidth; drawingBounds.width += tileWidth; drawingBounds.height += tileHeight; } void Level::Draw(sf::RenderWindow &window) { for (int layer = 0; layer < layers.size(); layer++) { for (int tile = 0; tile < layers[layer].tiles.size(); tile++) { if (drawingBounds.contains(layers[layer].tiles[tile].getPosition().x, layers[layer].tiles[tile].getPosition().y)) { window.draw(layers[layer].tiles[tile]); } } } } I really hope that one of you can help me and I'm sorry if I've made any formatting issues. Thanks!

    Read the article

  • Map wont show rigth in Joomla

    - by user1653126
    I have the following code of a map using api google, I have tested the code in several html editor and its work perfectly, but when i upload in my web page doesn’t work. The map appears all zoomed in some random point in the ocean. I create an article in Joomla 1.5.20, paste the code. Its shows right in the preview but not in the web page. I disable filtering and use none editor and still won’t work. Thanks for the help. <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBInlv7FuwtKGhzBP0oISDoB2Iu79HNrPU&sensor=false"> </script> <script type="text/javascript"> var map; // lets define some vars to make things easier later var kml = { a: { name: "Productor", url: "https://maps.google.hn/maps/ms?authuser=0&vps=2&hl=es&ie=UTF8&msa=0&output=kml&msid=200984447026903306654.0004c934a224eca7c3ad4" }, b: { name: "A&S", url: "https://maps.google.hn/maps/ms?ie=UTF8&authuser=0&msa=0&output=kml&msid=200984447026903306654.0004c94bac74cf2304c71" } // keep adding more if ye like }; // initialize our goo function initializeMap() { var options = { center: new google.maps.LatLng(13.324182,-87.080071), zoom: 9, mapTypeId: google.maps.MapTypeId.TERRAIN } map = new google.maps.Map(document.getElementById("map_canvas"), options); var ctaLayer = new google.maps.KmlLayer('https://maps.google.hn/maps/ms?authuser=0&vps=5&hl=es&ie=UTF8&oe=UTF8&msa=0&output=kml&msid=200984447026903306654.0004c94bc3bce6f638aa1'); ctaLayer.setMap(map); var ctaLayer = new google.maps.KmlLayer('https://maps.google.hn/maps/ms?authuser=0&vps=2&ie=UTF8&msa=0&output=kml&msid=200984447026903306654.0004c94ec7e838242b67d'); ctaLayer.setMap(map); createTogglers(); }; google.maps.event.addDomListener(window, 'load', initializeMap); // the important function... kml[id].xxxxx refers back to the top function toggleKML(checked, id) { if (checked) { var layer = new google.maps.KmlLayer(kml[id].url, { preserveViewport: true, suppressInfoWindows: true }); google.maps.event.addListener(layer, 'click', function(kmlEvent) { var text = kmlEvent.featureData.description; showInContentWindow(text); }); function showInContentWindow(text) { var sidediv = document.getElementById('content_window'); sidediv.innerHTML = text; } // store kml as obj kml[id].obj = layer; kml[id].obj.setMap(map); } else { kml[id].obj.setMap(null); delete kml[id].obj; } }; // create the controls dynamically because it's easier, really function createTogglers() { var html = "<form><ul>"; for (var prop in kml) { html += "<li id=\"selector-" + prop + "\"><input type='checkbox' id='" + prop + "'" + " onclick='highlight(this,\"selector-" + prop + "\"); toggleKML(this.checked, this.id)' \/>" + kml[prop].name + "<\/li>"; } html += "<li class='control'><a href='#' onclick='removeAll();return false;'>" + "Limpiar el Mapa<\/a><\/li>" + "<\/ul><\/form>"; document.getElementById("toggle_box").innerHTML = html; }; // easy way to remove all objects function removeAll() { for (var prop in kml) { if (kml[prop].obj) { kml[prop].obj.setMap(null); delete kml[prop].obj; } } }; // Append Class on Select function highlight(box, listitem) { var selected = 'selected'; var normal = 'normal'; document.getElementById(listitem).className = (box.checked ? selected: normal); }; </script> <style type="text/css"> .selected { font-weight: bold; } </style> </head> <body> <div id="map_canvas" style="width: 80%; height: 400px; float:left"></div> <div id="toggle_box" style="position: absolute; top: 100px; right: 640px; padding: 10px; background: #fff; z-index: 5; "></div> <div id="content_window" style="width:10%; height:10%; float:left"></div> </body> </html>

    Read the article

  • WebDav And Exchange2007 HTTP1.1 404 Ressource not Found!

    - by adrien
    i have Exchange2007. and i am using the url: "https://exchange2007.exchange.server.com/Exchange/username/calendar"; 'calendar', or 'mailbox'( in your language! example, "boite de reception" in french or "calendário" in portuguese) with that url that i'm using i can list my ressources, but can't send a mail or write an appointement! why?!? See that i get a response of the server 207multistatus and ok, but the return a HTTP/1.1 404 Resource Not Found i wish a 201 created!!! (for my appointement) someone have better ideia ? thx. Console: >>>>>>> to server --------------------------------------------------- PROPPATCH /Exchange/marcelo/calend%C3%A1rio HTTP/1.1 Authorization: Basic bWFyY2Vsb0BleGNoYW5nZTptdXN0YWZhMSQ= Content-Type: text/xml; charset=utf-8 User-Agent: Jakarta Commons-HttpClient/2.0final Host: exchange2007.exchange.snap.com.br Content-Length: 1407 <D:propertyupdate xmlns:D="DAV:"> <D:set> <D:prop> <mapi xmlns="xmlns"> http://schemas.microsoft.com/mapi/ </mapi> <Cmd xmlns="urn:"> saveappt </Cmd> <dtEnd xmlns="urn:schemas:calendar"> 2009-06-30T10:30:00.000Z </dtEnd> <contentclass xmlns="DAV"> urn:content-classes:Appointment </contentclass> <Subject xmlns="urn:schemas:httpmail"> Changed Test Appointment Subject </Subject> <Location xmlns="urn:schemas:calendar"> do </Location> <responserequested xmlns="urn:schemas:calendar"> 0 </responserequested> <saveappt xmlns="urn:schemas:calendar:cmd"> 1 </saveappt> <ressource xmlns="DAV"> https://exchange2007.exchange.snap.com.br/Exchange/marcelo/calendárioassuntoteste.EML </ressource> <alldayevent xmlns="urn:schemas:calendar"> 0 </alldayevent> <to xmlns="urn:schemas:header"> adrien </to> <dtStart xmlns="urn:schemas:calendar"> 2009-06-30T10:00:00.000Z </dtStart> <isfolder xmlns="DAV"> 0 </isfolder> <cmd xmlns="Cmd"> saveappt </cmd> <HtmlDescription xmlns="urn:schemas:httpmail"> Let's meet here </HtmlDescription> <outlookmessageclass xmlns="http://schemas.microsoft.com/exchange/subject-utf8=Appointment"> IPM.Appointement </outlookmessageclass> <instancetype xmlns="urn:schemas:calendar"> 0 </instancetype> <meetingstatus xmlns="urn:schemas:calendar"> CONFIRMED </meetingstatus> <finvited xmlns="urn:schemas:mapi"> 0 </finvited> <BusyType xmlns="urn:schemas:calendar"> BUSY </BusyType> </D:prop> </D:set> </D:propertyupdate> ------------------------------------------------------------------------ <<<<<<< from server --------------------------------------------------- HTTP/1.1 207 Multi-Status Date: Thu, 16 Jul 2009 20:29:40 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET MS-Exchange-Permanent-URL: https://exchange2007.exchange.snap.com.br/Exchange/marcelo/-FlatUrlSpace-/b3ee92320938254c828a96e2e269a417-a6271d Repl-UID: <rid:b3ee92320938254c828a96e2e269a417000000a6282e> Content-Type: text/xml Content-Length: 825 ResourceTag: <rt:b3ee92320938254c828a96e2e269a417000000a6282eb3ee92320938254c828a96e2e269a41700545bb4844c> MS-WebStorage: 08.01.10240 <a:multistatus xmlns:a="DAV:" xmlns:b="xmlns" xmlns:c="urn:" xmlns:d="urn:schemas:calendar" xmlns:e="DAV" xmlns:f="urn:schemas:httpmail" xmlns:g="urn:schemas:calendar:cmd" xmlns:h="urn:schemas:header" xmlns:i="Cmd" xmlns:j="http://schemas.microsoft.com/exchange/subject-utf8=Appointment" xmlns:k="urn:schemas:mapi"> <a:response> <a:href> https://exchange2007.exchange.snap.com.br/Exchange/marcelo/Calend%C3%A1rio </a:href> <a:propstat> <a:status> HTTP/1.1 200 OK </a:status> <a:prop> <b:mapi> </b:mapi> <c:Cmd> </c:Cmd> <d:dtEnd> </d:dtEnd> <e:contentclass> </e:contentclass> <f:Subject> </f:Subject> <d:Location> </d:Location> <d:responserequested> </d:responserequested> <g:saveappt> </g:saveappt> <e:ressource> </e:ressource> <d:alldayevent> </d:alldayevent> <h:to> </h:to> <d:dtStart> </d:dtStart> <e:isfolder> </e:isfolder> <i:cmd> </i:cmd> <f:HtmlDescription> </f:HtmlDescription> <j:outlookmessageclass> </j:outlookmessageclass> <d:instancetype> </d:instancetype> <d:meetingstatus> </d:meetingstatus> <k:finvited> </k:finvited> <d:BusyType> </d:BusyType> </a:prop> </a:propstat> </a:response> </a:multistatus> ------------------------------------------------------------------------ >>>>>>> to server --------------------------------------------------- PROPFIND /Exchange/marcelo/calend%C3%A1rio HTTP/1.1 Authorization: Basic bWFyY2Vsb0BleGNoYW5nZTptdXN0YWZhMSQ= Content-Type: text/xml; charset=utf-8 User-Agent: Jakarta Commons-HttpClient/2.0final Host: exchange2007.exchange.snap.com.br Content-Length: 207 Depth: 0 <D:propfind xmlns:D="DAV:"> <D:prop> <D:displayname> </D:displayname> <D:getcontentlength> </D:getcontentlength> <D:getcontenttype> </D:getcontenttype> <D:resourcetype> </D:resourcetype> <D:getlastmodified> </D:getlastmodified> <D:lockdiscovery> </D:lockdiscovery> </D:prop> </D:propfind> ------------------------------------------------------------------------ <<<<<<< from server --------------------------------------------------- HTTP/1.1 207 Multi-Status Date: Thu, 16 Jul 2009 20:29:40 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Type: text/xml Accept-Ranges: rows MS-WebStorage: 08.01.10240 Transfer-Encoding: chunked <a:multistatus xmlns:a="DAV:" xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" xmlns:c="xml:"> <a:response> <a:href> https://exchange2007.exchange.snap.com.br/Exchange/marcelo/Calend%C3%A1rio/ </a:href> <a:propstat> <a:status> HTTP/1.1 200 OK </a:status> <a:prop> <a:displayname> Calendário </a:displayname> <a:getcontentlength b:dt="int"> 0 </a:getcontentlength> <a:resourcetype> <a:collection> </a:collection> </a:resourcetype> <a:getlastmodified b:dt="dateTime.tz"> 2009-07-16T20:29:40.098Z </a:getlastmodified> <lockdiscovery xmlns="DAV:"> </lockdiscovery> </a:prop> </a:propstat> <a:propstat> <a:status> HTTP/1.1 404 Resource Not Found </a:status> <a:prop> <a:getcontenttype> </a:getcontenttype> </a:prop> </a:propstat> </a:response> </a:multistatus>

    Read the article

  • FileInputStream throws NullPointerException.

    - by Mohamed
    I am getting nullpointerexception, don't know what actually is causing it. I read from java docs that fileinputstream only throws securityexception so don't understand why this exception pops up. here is my code snippet. private Properties prop = new Properties(); private String settings_file_name = "settings.properties"; private String settings_dir = "\\.autograder\\"; public Properties get_settings() { String path = this.get_settings_directory(); System.out.println(path + this.settings_dir + this.settings_file_name); if (this.settings_exist(path)) { try { FileInputStream in = new FileInputStream(path + this.settings_dir + this.settings_file_name); this.prop.load(in); in.close(); } catch (IOException e) { e.printStackTrace(); } } else { this.create_settings_file(path); try{ this.prop.load(new FileInputStream(path + this.settings_dir + this.settings_file_name)); }catch (IOException ex){ //ex.printStackTrace(); } } return this.prop; } private String get_settings_directory() { String user_home = System.getProperty("user.home"); if (user_home == null) { throw new IllegalStateException("user.home==null"); } return user_home; } and here is my stacktrace: C:\Users\mohamed\.autograder\settings.properties Exception in thread "main" java.lang.NullPointerException at autograder.Settings.get_settings(Settings.java:41) at autograder.Application.start(Application.java:20) at autograder.Main.main(Main.java:19) Java Result: 1 BUILD SUCCESSFUL (total time: 0 seconds) Line 41 is: this.prop.load(in);

    Read the article

  • Convert JSON flattened for forms back to an object

    - by George Jempty
    I am required (please therefore no nit-picking the requirement, I've already nit-picked it, and this is the req) to convert certain form fields that have "object nesting" embedded in the field names, back to the object(s) themselves. Below are some typical form field names: phones_0_patientPhoneTypeId phones_0_phone phones_1_patientPhoneTypeId phones_1_phone The form fields above were derived from an object such as the one toward the bottom (see "Data"), and that is the format of the object I need to reassemble. It can be assumed that any form field with a name that contains the underscore _ character needs to undergo this conversion. Also that the segment of the form field between underscores, if numeric, signifies a Javascript array, otherwise an object. I found it easy to devise a (somewhat naive) implementation for the "flattening" of the original object for use by the form, but am struggling going in the other direction; below the object/data below I'm pasting my current attempt. One problem (perhaps the only one?) with it is that it does not currently properly account for array indexes, but this might be tricky because the object will subsequently be encoded as JSON, which will not account for sparse arrays. So if "phones_1" exists, but "phones_0" does not, I would nevertheless like to ensure that a slot exists for phones[0] even if that value is null. Implementations that tweak what I have begun, or are entirely different, encouraged. If interested let me know if you'd like to see my code for the "flattening" part that is working. Thanks in advance Data: var obj = { phones: [{ "patientPhoneTypeId": 4, "phone": "8005551212" }, { "patientPhoneTypeId": 2, "phone": "8885551212" }]}; Code to date: var unflattened = {}; for (var prop in values) { if (prop.indexOf('_') > -1) { var lastUnderbarPos = prop.lastIndexOf('_'); var nestedProp = prop.substr(lastUnderbarPos + 1); var nesting = prop.substr(0, lastUnderbarPos).split("_"); var nestedRef, isArray, isObject; for (var i=0, n=nesting.length; i<n; i++) { if (i===0) { nestedRef = unflattened; } if (i < (n-1)) { // not last if (/^\d+$/.test(nesting[i+1])) { isArray = true; isObject = false; } else { isArray = true; isObject = false; } var currProp = nesting[i]; if (!nestedRef[currProp]) { if (isArray) { nestedRef[currProp] = []; } else if (isObject) { nestedRef[currProp] = {}; } } nestedRef = nestedRef[currProp]; } else { nestedRef[nestedProp] = values[prop]; } } }

    Read the article

  • Intercept Properties With Castle Windsor IInterceptor

    - by jeffn825
    Does anyone have a suggestion on a better way to intercept a properties with Castle DynamicProxy? Specifcally, I need the PropertyInfo that I'm intercepting, but it's not directly on the IInvocation, so what I do is: public static PropertyInfo GetProperty(this MethodInfo method) { bool takesArg = method.GetParameters().Length == 1; bool hasReturn = method.ReturnType != typeof(void); if (takesArg == hasReturn) return null; if (takesArg) { return method.DeclaringType.GetProperties() .Where(prop => prop.GetSetMethod() == method).FirstOrDefault(); } else { return method.DeclaringType.GetProperties() .Where(prop => prop.GetGetMethod() == method).FirstOrDefault(); } } Then in my IInterceptor: #region IInterceptor Members public void Intercept(IInvocation invocation) { bool doSomething = invocation.Method.GetProperty().GetCustomAttributes(true).OfType<SomeAttribute>().Count() > 0; } #endregion Thanks.

    Read the article

  • Does a recursive Ant task exist to recover properties from external file?

    - by Julia2020
    Hi, I ve got a problem in getting properties with ant from a properties file. With a simple target like this in my build.xml, i'd like to get at least two properties path1 and path2. I'd like to have a generic target to get this two properties.... in order to avoid modifying the build.xml (just adding a new prop) Any suggestions? Thanks in advance ! build.xml : <target name="TEST" description="test ant"> <property file="dependencies.properties"/> <svn> <export srcUrl="${path.prop}" destPath="${workspace}/rep/" /> </svn> </target> dependencies.properties : path1.prop = /path/to/src1 path2.prop = /path/to/src2

    Read the article

  • How to validate Data Annotations with a MetaData class

    - by Micah
    I'm trying to validate a class using Data Annotations but with a metadata class. [MetadataType(typeof(TestMetaData))] public class Test { public string Prop { get; set; } internal class TestMetaData { [Required] public string Prop { get; set; } } } [Test] [ExpectedException(typeof(ValidationException))] public void TestIt() { var invalidObject = new Test(); var context = new ValidationContext(invalidObject, null, null); context.MemberName = "Prop"; Validator.ValidateProperty(invalidObject.Prop, context); } The test fails. If I ditch the metadata class and just decorated the property on the actual class it works fine. WTH am I doing wrong? This is putting me on the verge of insanity. Please help.

    Read the article

  • Does Hibernate create tables in the database automatically.

    - by theJava
    http://www.vaannila.com/spring/spring-hibernate-integration-1.html Upon reading this tutorial, they have not mentioned anything over creating tables in the DB. Does the Hibernate handle it automatically by creating tables and fields once i specify them. Here is my beans configuration. <?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:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/jsp/" p:suffix=".jsp" /> <bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://127.0.0.1:3306/spring"/> <property name="username" value="monwwty"/> <property name="password" value="www"/> </bean> <bean id="mySessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="myDataSource" /> <property name="annotatedClasses"> <list> <value>uk.co.vinoth.spring.domain.User</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.hbm2ddl.auto">create</prop> </props> </property> </bean> <bean id="myUserDAO" class="uk.co.vinoth.spring.dao.UserDAOImpl"> <property name="sessionFactory" ref="mySessionFactory"/> </bean> <bean name="/user/*.htm" class="uk.co.vinoth.spring.web.UserController" > <property name="userDAO" ref="myUserDAO" /> </bean> </beans>

    Read the article

  • Anyone know how to use TValue.AsType<TNotifyEvent> properly?

    - by Mason Wheeler
    I'm trying to use RTTI to add an event handler to a control, that may already have an event handler set. The code looks something like this: var prop: TRttiProperty; val: TValue; begin prop := FContext.GetType(MyControl.ClassInfo).GetProperty('OnChange'); val := prop.GetValue(MyControl); FOldOnChange := val.AsType<TNotifyEvent>; prop.SetValue(MyControl, TValue.From<TNotifyEvent>(self.MyOnChange)); end; I want this so I can do this in MyOnChange: begin if assigned(FOldOnChange) then FOldOnChange(Sender); //additional code here end; Unfortunately, the compiler doesn't seem to like the line FOldOnChange := val.AsType<TNotifyEvent>;. It says E2010 Incompatible types: 'procedure, untyped pointer or untyped parameter' and 'TNotifyEvent' Anyone know why that is or how to fix it? It looks right to me...

    Read the article

  • Chrome and Safari strange behaviour in Javascript

    - by mck89
    Hi, i've written this peace of code: var a=function(){ }; a.name="test"; a.prop="test2"; Now if i debug the code with the console: console.log(a.name); console.log(a.prop); In Firefox i get a.name="test" and a.prop="test2", while in Safari and Chrome i get a.prop="test2" but a.name="". It seems that there's no way to assign a "name" property on a function in Webkit browsers. Do you know why? But the most important thing is, do you know a workaround for that?

    Read the article

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