w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Right way to configure JPA to work with any JPA implementation
First of all JPA is a specification, which is being implemented by the ORM framework providers such as Hibernate, Eclipselink etc. To make your application compatible with any implementation of JPA, you should strictly follow JPA specifications, you should not be using any ORM vendor specific features, this will allow your application to work with any ORM framework, however you have to specify the dialect class by your self to interact with a particular database. One thing you can do here is write a properties file which will have all the database name with corrosponding dialect class for that particular database, you can ask user to choose the database and can fetch the related class name(Dialect class name) from the properties file. About using the same application as standalone and

Categories : Java

Configure eclipse to work with tomcat
Do you want to set docBase to your project's root folder? If this is the case, you can change Default output folder from YourProject/build/classes to YourProject/WebContent/WEB-INF/classes in Java Build Path. And, set docBase to YourProjectRootWebContent in your server.xml. Hope this helps.

Categories : Eclipse

Configure Jenkins to work with SVN branches
The Subversion plugin should include a drop-down build parameter option. You can include your base repository and then select either the branches, tags, or trunk. Check this out: How to configure a single Jenkins job to make the release process from trunk or branches? And more info here: https://issues.jenkins-ci.org/browse/JENKINS-10678

Categories : Svn

How do I configure Logback to work on CloudBees
You need to have it log to STDOUT or STDERR as appropriate: for example see: file and stdout appenders in logback.xml (might be some better ones out there) - that ensures logs can go to any subsystem and work clustered and when apps migrate.

Categories : Java

PyGTK, "do-configure-event" doesn't work?
Name your sources! It seems you're trying to adapt example code from Zetcode you do not fully comprehend. Your problem is: to put your class attribute __gsignals__ into use, you have to derive from gtk.Window. The window instance looks up the signals and therefore its gsignals dictionary has to be filled. At the moment, this dictionary resides in pyapp.

Categories : Misc

How to configure Intellij Idea 12 Community Edition to work with JSF 2.x?
Well, as stated in Intellij Idea's comparision matrix Java EE frameworks, such as Servlets, JSP, JSF, Web Services, CDI, Bean Validation, Web Beans, etc. are supported only in Ultimate Edition. So the answer is JSF is not supported. In order to use CE for this technology you would have to configure everything on your own. I would suggest you to use other IDE, like Eclipse or Netbeans.

Categories : JSF

How do I configure a Ruby Mechanize agent to work through the Charles web proxy?
A web proxy is not normally defined by just a port, but is usually a full host name. Charles is very likely installed on localhost. Therefore the following adjustment may work for you: @agent ||= Mechanize.new do |agent| agent.set_proxy("localhost", 8888) end

Categories : Ruby

How do I configure Tomcat and HAProxy to work with the WebSocket Framework Atmosphere?
Okay here is what I would do. Install the APR Connector on your Tomcat server. This will speed up the production environment. Download APR and follow the install instructions to compile it on your os. You do not need the NIO Connector anymore. Edit your server.xml: <Connector port="8080" protocol="org.apache.coyote.http11.Http11AprProtocol" URIEncoding="UTF-8" maxThreads="250" redirectPort="8443" /> Do not use the org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptor this causes errors for me. Your HAProxy config is fine. You should also use the atmosphere-runtime-native.jar instead of the atmosphere-runtime.jar. Your errors might occur because you connect with a browser that does not support websockets to your

Categories : Tomcat

How configure Apache HTTP so URL will work without context for three Tomcat 7 Java apps
Name your web applications context1, context2, and context3 in each Tomcat instance and change your httpd.conf mappings to these: JkMount /context1|/* worker1 JkMount /context2|/* worker2 JkMount /context3|/* worker3 If you want users to be able to go to / instead of /context1 then you are going to have to use different VirtualHosts on Apache httpd and configure each webapp to be the ROOT webapp on each Tomcat instance.

Categories : Apache

Configure Github pull request plugin to work reliably on several builds
The solution to this is to configure your GitHub PR builder build as a jenkins build-flow Job: build("unit-tests"); parallel ( // osx and windows will be scheduled in parallel. { build("osx-integration") }, { build("windows-integration") }, ) https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin This way the build-flow job will stay "running" until all builds are finished and fail the entire build if any sub-build fails.

Categories : Github

Any way configure to configure visual studio mvc build views release mode
Are you specifically setting something to compile the views like the Razor Generator? (http://razorgenerator.codeplex.com/) If not views in MVC are not compiled.

Categories : Asp Net Mvc

TFS 2012 Configure Features Error - Unable to configure Planning Tools
Try this: Rename your User Story to "Product Backlog Item". Set the Initial State of you "Bug" to "Active". Try the Upgrade Rename your User Story Type back to "User Story". Remove the "Active" Initial State. Export your Common Process Config and add in your "Proposed" State into the Bug Configuration (see below). Import your Common Process Config. Example BugWorkItems <BugWorkItems category="Microsoft.BugCategory"> <States> <State type="Proposed" value="Proposed" /> <!-- more --> </States> </BugWorkItems>

Categories : Tfs

Javascript - How do I get a statement to work once, not work if it did it 1 time already, then work again?
You could use an auxiliary array with gets emptied from time to time, and refilled then. Leaving hp and stuff aside, it's something like: player.TALK=['you pwn the dragon','you kick the dragon','you eviscerate the dragon']; player.AUXTALK=player.TALK.slice(0); function killdragon(player) { var talkindex = Math.floor(Math.random() * player.AUXTALK.length); console.log(player.AUXTALK[talkindex]); delete player.AUXTALK[talkindex]; if (player.AUXTALK.length==0) player.AUXTALK=player.TALK.slice(0); }

Categories : Javascript

How to configure ASP.NET site on IIS 7.0
Is your TradeSite db hosted in SQL Server? If so, open up the database in SQL Server Management Studio, select Security, and ensure that Network Service has access to at least read from the database.

Categories : Asp Net

Configure AWS to allow for regular FTP
If you are using wordpress, you can actually enable direct install. The webserver user needs permission to write to wp-content. You may also need to enable a flag in your wp-config.php file in some cases as well. define('FS_METHOD', 'direct'); So if you want to enable FTP access, you need to first start by installing an FTP server. Depending on the AMI you used, you may or may not have one already installed. The only caveat is that due to how networking is configured in EC2, you can only configure the server to run in passive mode. This configuration varies by the ftp server you choose to use.

Categories : Amazon

Can't configure JPA project
This is your problem: private Long id; id is a Long, which is null since it's not instantiated. When JPA is accessing it through the getId() method, it expects a long and not Long, so the accessor is trying to convert a null to a primitive value, hence a NullPointerException. Best solution is to either 1) change your id to be a long and add a @NotNull annotation to the getId() method. I hope this helps.

Categories : Java

Configure the XSL defination for both xml's
If you want to run this when condition for first XML where 'ClassificationIdScheme' element is absent, change your when condition with this one: <xsl:when test="./ClassificationIdScheme = 'FirstClassification' or not(./ClassificationIdScheme)"> <xsl:value-of select="./ClassificationId"/> </xsl:when>

Categories : Xml

Configure different $projectroot on one Git-Web
use different name based virtual host Sample config below ServerName www.cart.com DocumentRoot /usr/share/gitweb SetEnv GITWEB_CONFIG /home/gitmaster/gitweb.conf Options FollowSymLinks +ExecCGI AddHandler cgi-script .cgi AllowOverride AuthConfig

Categories : GIT

How to configure Hibernate with UCP
You will have to implement a ConnectionProvider to interface the OracleConnectionPool with Hibernate. Here is an example of such implementation: https://forum.hibernate.org/viewtopic.php?p=2452561.

Categories : Hibernate

How do I configure maven to use Tor?
Since tor is not an HTTP proxy (like you commonly find in corporate environments) you have to specify the Java networking properties for SOCKS proxies on the command line. See this answer to the question you linked to.

Categories : Maven

Using app.configure in express
It is optional and remain for legacy reason, according to the doc. In your example, the two piece of codes have no difference at all. http://expressjs.com/api.html#app.configure Update 2015: @IlanFrumer points out that app.configure is removed in Express 4.x. If you followed some outdated tutorials and wondering why it didn't work, You should remove app.configure(function(){ ... }. Like this: var express = require('express'); var app = express(); app.use(...); app.use(...); app.get('/', function (req, res) { ... });

Categories : Node Js

how to configure solr on my web?
First you secure your entire tomcat web admin gui by requiring authentication. First, create a new user in /etc/tomcat6/tomcat-users.xml <tomcat-users> <role rolename="admin"/> <role rolename="manager"/> <role rolename="proxyUsers"/> <user username="jorno" password="XXXXX" roles="admin,manager,proxyUsers"/> <user username="proxyUser" password="XXXXXX" roles="proxyUsers"/> </tomcat-users> Add the security constraint in the file /etc/tomcat6/web.xml <security-constraint> <web-resource-collection> <web-resource-name> Solr authenticated application </web-resource-name> <url-pattern>/*</url-pattern> <http-method>GET</http-method> <http-method>P

Categories : Solr

Configure help output in Pry
You are in luck, as it is simply Ruby. Go ahead and type edit help and it will open up the Pry class for editing. Modify away! Of course, you are welcome to fork the project, make your changes, create the gem and install it on your system with your customization.

Categories : Ruby

How to configure endpoint
To add custom behaviors, you need to add your derived behavior as a behavior extension in config file and need to add a new Behavior extension type. Refer to this post - Custom Behavior won't register in my web.config public class ArrayInQueryStringBehaviorExtension : BehaviorExtensionElement { public override Type BehaviorType { get { return typeof(ArrayInQueryStringWebHttpBehavior); } } protected override object CreateBehavior() { return new ArrayInQueryStringWebHttpBehavior(); } } Config file (you need to specify your assembly name where I have marked square brackets below) <extensions> <behaviorExtensions> <add name=" ArrayInQueryStringWebHttpBehavior " type="[Namespace]. ArrayInQueryStringBehaviorExtension, [Assembly Name], [Assembly Version

Categories : Wcf

How do I configure JpaPersistModule?
You can try to use two injectors: Initialize one injector with the modules that builds the properties Get the properties from the previous injector Use theese properties at the module where you initialize the JpaPersistModule

Categories : Java

Configure job memory in Hadoop 1.2.0
Try using: <property> <name>mapred.map.child.java.opts</name> <value>-Xmx64m</value> </property> <property> <name>mapred.reduce.child.java.opts</name> <value>-Xmx64m</value> </property> in your conf/mapred-site.xml on each data node.

Categories : Hadoop

configure.ac "post script"
You can put any arbitrary shell code in your configure.ac. Since AC_OUTPUT should be the last line of your configure.ac, anything after it will be run after config.status is run. To make hello-world.sh execute after config.status, just append it to your configure.ac: AC_CONFIG_FILES([Makefile]) AC_OUTPUT $srcdir/hello.sh $srcdir is required if building out of the srcdir.

Categories : Misc

how to configure phabricator with a non root url?
This is not supported, and we do not plan to support it. The install documentation should probably make this more clear, although it is mentioned in the Configuration Guide: You can either install Phabricator on a subdomain (like phabricator.example.com) or an entire domain, but you can not install it in some subdirectory of an existing website. We don't plan to support this because support would be complex and have security implications, and only a tiny number of very small installs would benefit.

Categories : Apache

How do I configure my vimrc to use different theme?
See :help :colorscheme. You can type :colo and then ctrl-d to list all available colorschemes. Put your colorscheme in either $HOME/.vim/colors (Unix) or %USERPROFILE%vimfilescolors (Windows). Example: Put your colorscheme foo.vim into $HOME/.vim/colors and then colorscheme foo into your vimrc.

Categories : Vim

Configure S4 Device with Eclipse
It should be in Developer Options. If your device is running Android 4.2, Developer Options is hidden by default. To enable it: • Go into Settings > About • Tap on the Build Number entry seven times (Toasts will appear to help you keep count) • Press BACK, and Developer Options should be in the Settings list

Categories : Android

How to configure y-axis using seqIplot in R?
When a ylim is given in seqIplot, it is used for all groups. To make the plot heights proportional to the weighed number of sequences in each group, the upper ylim should be set as the value for to the most frequent group. group <- mvad$gcse5eq (nseq <- xtabs(mvad$weight ~ group)) (nmax <- max(nseq)) seqIplot(mvad.seq, group=group, withlegend=TRUE, border=NA, xtstep=3, sortv="from.start", ylim=c(0, nmax) ) The tick labels on the y axis are sequence indexes. You can suppress them with by giving yaxis = FALSE to seqIplot. To display your own labels you can then issue something like (see the help of the axisfunction for details) axis(2, at = c(1, nseq[1])) but in that case you should generate the seqIplot separately for each group with withlegend=FALSE and o

Categories : R

Configure an App to use the proxy from settings
You are trying to use SNTP trough a proxy that only allows HTTP/HTTPS. Your alternative is to use some HTTP service providing the current time, which will be more than enough for most user level applications. Give http://www.timeapi.org/utc/now a try, however if you are publishing an application using this service you should check the terms and conditions.

Categories : Java

Configure Twitter Gem on Ruby
This mistake was caused by not making the values strings by putting them in double quotes. Fixed code looks like require 'rubygems' require 'twitter' Twitter.configure do |config| config.consumer_key = "YOUR_CONSUMER_KEY" config.consumer_secret = "YOUR_CONSUMER_SECRET" config.oauth_token = "YOUR_OAUTH_TOKEN" config.oauth_token_secret = "YOUR_OAUTH_TOKEN_SECRET" end Twitter.update("I'm tweeting with @gem!")

Categories : Ruby

Configure Apache CXF in Geronimo
Go to varconfig directory. Open config.xml file. check "org.apache.geronimo.configs/cxf/3.0.1/car", "org.apache.geronimo.configs/cxf-deployer/3.0.1/car" Set load="true" if it exist. Otherwise, Download and install it. Set GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.provider=cxf"

Categories : Apache

How to configure a module in JBoss 7.1.1
You should read the documentation : https://community.jboss.org/wiki/JackrabbitDeploymentInAS6AndAS7 Basically the rar is to be deployed through the console.

Categories : Java

Configure EasyTracker programmatically
You can use multiple tracker each with a different ga_trackingId as stated in the documentation here: https://developers.google.com/analytics/devguides/collection/android/v2/advanced#multiple-trackers Instead of "changing" ga_trackingId, you should put some condition to use one tracker or another based on your needs.

Categories : Android

configure .net assemblies exception
This is not possible, if the application itself does not support it explicitly. The exception probably get's thrown, because the assembly creates a FileStream with FileMode.CreateNew, resulting in an System.IO.IOException. The only thing you can probably do is writing your own application, that checks if the file that get's created by the 3rd party application exists and if so, delete it. Then your application launches the 3rd party app.

Categories : Dotnet

How to configure settings.py for mongodb ?
If you are using pymongo directly, you can just leave out the entire DATABASES variable from settings.py. If you don't want to use pymongo directly, consider looking into mongoengine.

Categories : Python

how to configure dependencies in maven pom.xml?
You need to either remove the dependencyManagement tags that surround dependencies or add the dependencies again but nested within the project tag, i.e. at the same level as dependencyManagement. dependencyManagement allows you to fix information about dependencies across a multi-module project - e.g. like version numbers - however you still need to provide a dependencies section alongside that so that Maven knows to include them. If your project is not a multi-module project I would be tempted to not use a dependencyManagement section at all.

Categories : Java

Configure logging in Python
Wrap your code in a try:, except Exception: block and call logger.exception(): try: print a except Exception: logger.exception('Oops, something went wrong') You could add a raise statement to that to re-raise the caught exception. Demo: >>> import logging >>> logging.basicConfig() >>> logger = logging.getLogger() >>> def foo(): ... print a ... >>> def bar(i=0): ... if i < 3: ... bar(i + 1) ... else: ... foo() ... >>> def baz(): ... try: ... bar() ... except Exception: ... logger.exception('Oops, something went wrong') ... >>> def spam(): baz() ... >>> spam() ERROR:root:Oops, something went wrong Traceback (most recent call last): File "<stdin&g

Categories : Python

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.