w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
sql server 2012 upgrade cannot select default instance
You'll need to apply Service Pack 1 (at least, SP2 is available too) to bring the version up to 10.50.2500 (at least, .2500 is SP1). Your current 10.50.1600 is RTM and an upgrade from this is not supported. FYI, the SQLEXPRESS instance is at SP2 already: 10.50.4000 (or 10.0.4000 if not R2)

Categories : Sql Server

How do I upgrade an existing NetBeans Java EE 6 Web project to Java EE 7?
NetBeans won't automatically update the project files when you update the version in project.properties. You'll have to do it by hand. Update the deployment descriptors in your project to use the Java EE 7 namespaces and schemas. Update the code to use the new APIs and features. Add a Java EE 7 server instance to your Servers, like GlassFish 4.0, and set it as the target server in the Run tab in Project Properties. It's also worth noting that the Java EE version in NetBeans projects doesn't actually affect anything, in my experience. You can have the Java EE version set to 6 in your project, but if it uses EE 7 features and is deployed to a Java EE 7 server, it will run correctly.

Categories : Java

windows 7 64-bit - can't upgrade upgrade to ruby 2.0 keeps showing 1.9.3 - can't switch to new installation
Jesse, Speaking from experience, Pik is a viable solution if you want to run both versions of Ruby on the same Windows box (at least until RVM 2 is released with Windows support). It should only require adding the Ruby from the RailsInstaller installation to Pik so that it is aware. Then, you should be able to use Pik and install other versions of Ruby. The other option that is a bit more complicated is using Cygwin. This will actually allow you to install RVM and run it in a sandboxed Unix environment on Windows. It's something that I've been meaning to write up how to do but just haven't gotten around to it. Cheers, Evan

Categories : Ruby On Rails

Upgrade Java SE to Java EE as well as Eclipse
Is there a way that I can 'upgrade' my Java SE to EE? Since EE is just basically a few extra libraries... Basically no. Your characterisation of Java EE is incorrect. Java EE is (typically) embodied as a "Web container" or "EJB application server", and large parts of it only make sense as part of a web container. (And indeed, a large part of an Java EE implementation is actually specific to the web / application container.) Having said that, some of the (abstract) APIs and some of the libraries are available as separate JARs and can be installed on a piece-meal basis. And if what you want to do is develop for EE, then there are Eclipse plugins/features/whatever for that ... So basically it's recommended (or safer) to just remove my Java SE, install Java EE. Then remove Ecli

Categories : Java

How to upgrade Eclipse for Java EE Developers?
Add the update URL to your available sites: Window > Preferences > Install/Update > Available Software Sites > Add... KEPLER = http://download.eclipse.org/releases/kepler/ LUNA = http://download.eclipse.org/releases/luna/ Then tell Eclipse to look for updates: Help > Check for updates. After the installation, Eclipse will restart and show the old splash screen. Next time you manually stop/start Eclipse it will correctly show the correct splash screen.

Categories : Java

Copying a WF4 instance store database from production environment to development environment?
Jesús López gave me the answer at this MSDN thread, where I asked exactly the same question as in this StackOverflow’s thread. First, he asked: “Is the [IIS] path to the workflow service (the xalmx file) the same in production than in development? If the path is different because the virtual directory is different then is also different the WorkflowHostType column and that might cause problems.” After letting him know that IIS site names were actually different in production and in development environment, even though the rest of the paths to workflow services were the same, he replied: “Both [IIS sites] must have the same name. I've just tested it. I changed the site name in IIS and suddenly WorkflowHostType changed. So idle persisted workflows won't load any more.” Then he

Categories : Dotnet

Existing java process not affected during rpm based JDK upgrade from 1.6 to 1.7 in linux
This is the way Unix/Linux handles open files. The uninstall of the old version requested the OS to unlink the files. However, they were still open (this can be shown with lsof), so are still considered valid. Once all open file handles are closed, the files will be "permanently" deleted. A little more info can be found here.

Categories : Linux

Maven points to incorrect java folder when I upgrade solr 4.4 in pom.xml
when we import any maven project into Eclipse, Eclipse makes some files on filesystem - .project, .classpath, a folder .settings,. It seems that Eclipse doesn't update these correctly. Delete these and import them again. Or alternatively you can check here . Window / Preferences / Java / Installed JREs and see is it pointing to default JRE , if yes then change to to your JDK , something like this C:Program FilesJavajdk1.X.X.X Thanks

Categories : Maven

IVR Development in java
There is far too little information here to provide a direct answer, but I'll try to give you some basics. The standards for IVR application development is VoiceXML for dialog (caller interaction) and CCXML for call control. The latter is not as commonly available. There are also numerous proprietary solutions. Your choice of an open standard versus a proprietary solution should be more about vendor/solution lock in. Even with the open standards, you'll likely use custom enhancements and have some amount of lock in, but portability will be easier. You can code directly to the telephony boards (challenging and usually poorly documented if you are someone new to telephony) or work with solutions that provide end to end capability. I find very few people porting IVR applications so I w

Categories : Java

When would I use ant for Java web development?
Ant is used as a build system. You do not have to use it--in fact there are quite a few better systems but since ant was one of the first it's still likely to be very common. It generally is used to compile your java files, create wars and often even put the .war files onto the tomcats. Maven is bigger and tries to do a lot more, but it's also rather strict in it's format and quite heavy--but it's quite common these days as well. Maven can gather all your dependencies automatically which is nice, with ant you still have to download everything yourself. There are others, but you get the idea. Response to comment: I don't use visual studio, but I think it is more limited. For instance, Eclipse can build all your java files into a jar or execute them directly (in fact, it uses ant int

Categories : Java

par files why do we use it in java development
Eclipse Virgo An OSGi application is packaged as a JAR file, with extension .par. A PAR artifact offers several benefits: A PAR file has an application name, version, symbolic name, and description. The artifacts of a PAR file are scoped so that they cannot be shared accidentally by other applications. The scope forms a boundary for automatic propagation of load time weaving and bundle refresh. The artifacts of a PAR have their exported packages imported by the synthetic context bundle which is used for thread context class loading. So, for example, hibernate will be able to load classes of any of the exported packages of the artifacts in a PAR file using Class.forName() (or equivalent). The PAR file is visible to management interfaces. The PAR file can be undeployed an

Categories : Java

Java development using INTEL SDK
There is a java tutorial out on the Perceptual Computing Download Site. This tutorial is in the SDK Documentation - look under "SDK Tutorials" and "My First Java Application" You will need to install JDK 1.7.0_11 or later. Set the environment variable JAVA_HOME to point to the installation directory for easy reference. 1.Create a directory called Java1. 2.Launch any editor and enter the Java code Java1.java. import intel.pcsdk.*; import java.lang.System.*; public class Java1 { public static void main(String s[]) { PXCUPipeline pp=new PXCUPipeline(); if (!pp.Init(PXCUPipeline.GESTURE)) { System.out.print("Failed to initialize PXCUPipeline "); System.exit(3); } for (;;) { if (!pp.AcquireFrame(true)) break; PXCMGesture.GeoNode[] nodes=new PXCMGest

Categories : Java

Java Game Development: Graphics
Main Problem 1): The program runs, and shows the JFrame, but on the JFrame it shows only the last added object/component- Box. It doesn't show the other one. Why? You do window.add(b1); window.add(b2);, by default JFrame has BorderLayout thus you are replacing the last added box when you do add(..). Main Problem 2): As far as I understand, i need layout manager. Why do I need it, if I just want to paint() at specific X,Y on the frame? If you are using JPanels as objects in the game than, this would be the only time to use setLayout(null) as we want full control over the JPanels placing. Main Problem 3): The JFrame shows up, it shows only 1 box(the green one wont show up, whatever you will do. Don't know why) and when it DOES move- it gets erased from the other s

Categories : Java

Development Environment for RIDC in Java
You need to install WebCenter Support API in JDeveloper. Search for the updates shown in the following image in Help->Check for Updates. I am in PS6.

Categories : Oracle

Asn.1 development tools, CDR convert to XML using Java
This question is best asked of the vendor of the ASN.1 Tool you are using. Another possibility is to try other ASN.1 Tools such as one of those listed at the ITU-T ASN.1 Project page (http://www.itu.int/ITU-T/asn1/links/index.htm). There is also the free online ASN.1 Compiler and Encoder/Decoder you could try at http://asn1-playground.oss.com. This free online tool can give you a detailed analysis of your CDR to give you an idea of what is wrong.

Categories : Misc

How to simplify Java EE development environment
You may use JRebel to reduce the deployment time. Using this eclipse plugin will drastically reduce your deployment time overhead. It's not free for commercial projects, but for open source and non-commercial projects you can get a free one year subscription. See their plans for details. You also may wanna check out the options provided here.

Categories : Eclipse

Is HTTP status code 426 Upgrade Required only meant signal an upgrade to a secure channel is required?
Quoting one of my previous answers: HTTP Upgrade is used to indicate a preference or requirement to switch to a different version of HTTP or to another protocol, if possible: The Upgrade general-header allows the client to specify what additional communication protocols it supports and would like to use if the server finds it appropriate to switch protocols. The server MUST use the Upgrade header field within a 101 (Switching Protocols) response to indicate which protocol(s) are being switched. Upgrade = "Upgrade" ":" 1#product For example, Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11 The Upgrade header field is intended to provide a simple mechanism for transition from HTTP/1.1 to some other, incompatible protocol. According to the IANA regist

Categories : Http

Make derived class instance given base class instance in Java
Make Parent instances immutable and you can just delegate to an instance of Parent. See Effective Java, Item 16: Favor composition over inheritance.

Categories : Java

how to pass a bitmap from Java to C++ with JNI in Android Development
This line: fwrite(img+(w*(h-i-1)*3),3,w,f); You are assuming the input BITMAP has 24 bites (3 bytes) per pixel. But there is no such pixel format in android. You also are assuming the width is exactly 640 pixels and the height is exactly 480 pixels. This can be truth in your case, but you should read this information, not hardcode the values. All these values are provided by the function AndroidBitmap_getInfo(). Why are you not using them? Just check the structure AndroidBitmapInfo: typedef struct { uint32_t width; uint32_t height; uint32_t stride; int32_t format; uint32_t flags; // 0 for now } AndroidBitmapInfo; You can directly read the dimensions of your BITMAP. Additionally you should check the parameter “format”, which can be one of t

Categories : Android

Alternatives to Maven for Java and Scala Development
There is a Scala plugin for Gradle. Alternatively you could use Scala's built-in Ant tasks and Ivy for dependency management (which is what SBT uses internally). Yet another option is Apache Buildr. Pretty much any build system designed for Java-based projects should work with Scala. Related: A Basic Ant+Ivy+Scala Setup Comparing SBT and Gradle Buildr vs. Gradle

Categories : Java

When exactly session is created in java web application development?
A user session is/(should be) created after the successful login of the user into the system and it will be valid till the user logs out of the system or the session expires after the session timeout.

Categories : Java

Android development Linking XML button to Java
There are several ways of doing this. What you can do is add this line to your <Button tag in xml android:onClick="setWifiOn" then change the parameter of that function to public void getWifiOn(View v){ return wifi_on; } with this you don't need the onClick or any listeners 2.You can do something similar if you want all Buttons to share the same function then give them all the function name like android:onClick="someFunction" then in Java do something like public void someFunction(View v) { Button btn = (Button)v; switch (v.getId()) { case (R.id.wifi_on: setWifiOn(btn); break; case (R.id.differentBtnId): // do some other things break; } } } 3.Less attractive in many situations, IMHO public class Mai

Categories : Java

Do any standards and practices exist for applying acceptance test driven development to non-development tasks?
Take a look at this post in StackExchange: Agile methodologies such as Scrum in non-software development projects Also there is a nice article called "Scrum is not just for software" written by the Agile Alliance (note that this is a PDF download)

Categories : Misc

how to call methods from a C++ library in java android development
via JNI Java Native Interface. using this keyword will let you find a tutorial: http://developer.android.com/training/articles/perf-jni.html

Categories : Android

Are Activities in Android development akin to Forms in C#, Panels in Java, etc.?
You are correct, an activity is a screen that the user will be presented which will consist of user interface elements such as edit texts, text views button etc that the user can interact with. The activity will load up an XML file which will contain the user interface elements and the layout of how the contents of the activity should be displayed. This XML file is found in res > layout. Its quite common for your layouts xml file to be the same as the activity name, i.e if you have an activity called MainActivity then you would have a layout file called main_activity.xml. Then in the activities onCreate method you would use setContentView(R.layout.main_activity); Hope this helps

Categories : Android

Best Restful WebService in Java for API Development for high volume data?
You have multiple choices, all the frameworks are very light and able to handle requests at a good request per second rate. I have used jersey and resteasy, both of them have no performance bottlenecks. Probably the reason is that they don't do much except intercepting all the incoming request to their servlet and forward them to the appropriate mapped class. You will gain from the object to JSON or vice-versa mapping functionality as a bonus from these frameworks. But you need to be careful with the business logic you will be writing, to get the desired performance. As I mentioned, there are no substantial overheads with any of the mentioned frameworks.

Categories : Java

Setup Blackberry Development Environment on Java + Linux + eclipse juno
Hmm..your logs say artifacts not found and so I guess you're using the eclipse blackberry plugin update site to download the jde which unfortunately is no more supported by blackberry. You'll need to download the blackberry eclipse jde bundle that is pre installed with blackberry jde. Check this out. Moreover I haven't seen any support for linux yet.

Categories : Java

Setting up a java/j2ee development environment with: Eclipse, Tomcat and Vagrant
What files/folders am I supposed to share? (not the whole eclipse workspace I suppose) IMHO, share the project you are working on is enough. This way you may have one VM for each project. You have two options to generate the war: build on host; build on VM (preferred). If you choose Option 1: Since your project folder is shared with VM, you can copy the war to $CATALINA_HOME/webapps once you ssh to VM. I would suggest Option 2 because you could keep the build environment as close to your production environment as possible. Am I better off using a exploded or a normal war archive? I would use normal war archive, but there's not much difference here. How do I configure Eclipse (which lives on the host) to see the remote Tomcat (the one that lives on the guest). You have two opt

Categories : Eclipse

Running only one instance of an application,(Quit new instance and Display old instance or give Focus)
What you need to do is to add this to your main class: [DllImport("user32.dll")] static extern bool SetForegroundWindow(IntPtr hWnd); Then you need to obtain a reference to the process that is already running, and then call the SetForegroundWindow method like this: SetForegroundWindow(SameProcess.MainWindowHandle); You do not need to kill the current process like you are currently doing, just return after focusing the other process' main window as shown above This is a full working example: [DllImport("user32.dll")] static extern bool SetForegroundWindow(IntPtr hWnd); /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { var currentProcess = Process.GetCurrentProcess(); foreach (Process p in Process.GetP

Categories : C#

Upgrade rows on app upgrade only
The typical design pattern for database updates in an app goes something like the code below and every time you update your application where a database change is required, you bump the database version used in your SQLiteOpenHelper-derived class. This, of course, presumes you used SQLiteOpenHelper to manage getting a reference to your SQLite DB in your provider: public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { if (oldVersion == 1) { // DO WORK TO UPGRADE FROM VERSION 1 to 2 oldVersion += 1; } if (oldVersion == 2) { // DO WORK TO UPGRADE FROM VERSION 2 to 3 oldVersion += 1; } if (oldVersion == 3) { // DO WORK TO UPGRADE FROM VERSION 3 to 4 oldV

Categories : Android

Example of an instance method? (Java)
If it's not a static method then it's an instance method. It's either one or the other. So yes, your method, public void example(String random) { // this doesn't appear to do anything } is an example of an instance method. Regarding and was wondering how exactly you might use an instance method You would create an instance of the class, an object, and then call the instance method on the instance. i.e., public class Foo { public void bar() { System.out.println("I'm an instance method"); } } which could be used like: Foo foo = new Foo(); // create an instance foo.bar(); // call method on it

Categories : Java

Instance creation in java
Object (or) Instance will be created for Honda class. Left side of the = symbol represents reference is of type Bike and right side is instance.

Categories : Java

Is it a common/acceptable pattern in Java development for a test class to extend the class being tested?
1) Well, I do not know if it is a general pattern but i already used it and found some drawbacks. 2) the reasons to not do it are fairy simple. It is recommended to use private accessor and final class or method. If you really apply the later, you will end up with producing many duplicate classes to test a class or a method. Also, How can you make sure somebody in your team will not end up using the dummy extended class in production? My solution to this problem was to use reflection to access private constructors and methods. It is somehow a bit tricky but afterwards it is a repetition. I am using now my utility reflection class for all my tests. Below is my reflection utility class: import static org.junit.Assert.fail; import java.lang.reflect.Constructor; import java.lang.reflect.F

Categories : Java

MultiThreading with instance variable java
anonymous inner class is only allowed access FINAL member variable. this is JVM specification. i doubt why there is no warning when your code be compiled. in fact i could get nothing out put when run these code. is there something wrong? i rewrite the codes, test it and find it can't access a member variable when the thread in anonymous inner class. please see the output from eclipse.

Categories : Java

In java, how can I get an Amazon EC2 Instance to see its own tags?
You should be able to get the current instance id by sending a request to: http://169.254.169.254/latest/meta-data/instance-id. This only works within ec2. With this you can access quite a bit of information about the instance. However, tags do not appear to be included. You should be able to take the instance id along with the correct authentication to get the instance tags. If you are going to run this on an instance, you may want to provide an IAM user with limited access instead of a user which has access to everything in case the instance is compromised.

Categories : Java

starting elasticsearch instance from java?
Starting an elasticsearch instance is extermely easy. You just have to use the Java API. That means you have to add the elasticsearch dependency to your project and create a node, as mentioned in the reference: // on startup Node node = nodeBuilder().node(); Client client = node.client(); // on shutdown node.close(); Once you created the node it will behave exactly the same as a node started from the command line. You can interact with it using the created client object, but by default it will also open the 9200 and 9300 (or following ones if busy) ports for rest calls and inter-node communication.

Categories : Java

Is there a way to tell java to always create a new instance instead of interning
One option to detect this type of issue is to perform static analysis on the code during your build. I believe FindBugs has a detector for reference equality. See: Suspicious Reference Comparison

Categories : Java

How java ensures only one instance of an enum per JVM
as you can read in this answer enum instances are static class fields and so are initialized as part of class loading when you 1st access the class. classloading is synchronized internally so that ensures enum instances are singletons (singletons within the same classloader, that is. if you have the same enum loaded by multiple loaders you will get multiple instances)

Categories : Java

Java: Enum instance name as an argument, is it possible?
Well, it is possible if you add in your imports: import static complete.package.of.ErrorMessage.*; This means that in code, ErrorMessage.FOO and FOO will be the same. Note: Java 5+, but nobody uses Java 4- today, right? :p Note 2: you can also override .toString() in an enum, just make it return messageText

Categories : Java

Java SwingWorker with same instance of Class?
Have all swing workers use a single factory bean that does synchronized lazy initialization: public class OpenNLPFactory { public synchronized OpenNLP getOpenNLP() { if(OpenNLP ready ) { return it } else { build it and return it. } } } The OpenNLP object returned will itself have to be thread safe of course...

Categories : Java



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