w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘
Check with another constructor for htmlView: ContentType mimeType = new System.Net.Mime.ContentType("text/html"); var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage, mimeType);

Categories : Asp Net Mvc

eclipse:clean eclipse:eclipse - maven command usage
I am not sure the reason behind your problem " when i tried to access any of the generated class in my src directory, i get compiler error stating that the class is not defined. " But I can tell you the meaning of command you are using As far as I know in maven we can define more than one goal at a time to execute so eclipse:clean \Deletes the .project, .classpath, .wtpmodules files and .settings folder used by Eclipse. eclipse:eclipse \build the project into eclipse project like structure.

Categories : Eclipse

difference between NextResult and MARS
They're almost opposites. With .NextResult, a single piece of code is consuming multiple result sets sequentially. It works through (as much of) each result set in turn by calling .Read, and then when it no longer wants to work on that result set, it calls .NextResult to move onto the next one. Once you've called .NextResult, there's no way to continue consuming the previous result set. All of these result sets must have been requested as part of the original query that was submitted to generate the DataReader. (Either as separate SELECT statements, or calling a stored procedure that contains such calls, or a combination of the two) With MARS, whilst you're consuming a result set through a DataReader, you can submit a separate query on the same connection that generates a new, separate

Categories : C#

why blt instruction don't work? Mars mips assembly
Remove the line slt $t5,$t0,$t4, as you are using pseudoinstruction bgt/blt which already uses slt + bne to accomplish the task. Aside from that, your code will: Branch to Erro if the character is > 'A' Branch to zero if the character is < 'Z' Otherwise, it will branch to minuscula So there seems to be some logic errors there... For example, you should use bge instead of bgt and ble instead of blt because otherwise you will not check 'A' and 'Z' correctly. Aside from that, I guess the logic is not doing what you meant it to do...

Categories : Assembly

SQL command from eclipse using JDBC
Make sure you are not closing the ResultSet before you are trying to use it. This can happen when you return a ResultSet and try to use it elsewhere. If you want to return the data like this, use CachedRowSet: CachedRowSet crs = new CachedRowSetImpl(); crs.populate(ResultSet); CachedRowSet is "special in that it can operate without being connected to its data source, that is, it is a disconnected RowSet object" Edit: Saw you posted code so I thought I add some thoughts. If that is your ACTUAL code than the reason you are not getting anything is because the query is probably not returning anything. String query = "select '"+cid+"' from customer where password = '"+password+"'"; This is wrong, for two reasons. 1) If you are using prepared statements you should replace

Categories : Java

Leader command in Vrapper for Eclipse
Vrapper is not vim: don't expect anything you are accustomed to in vim to work in vrapper or any other vim emulator. <leader> is useful for configuration purpose because mapleader can be changed at runtime but that could be seen as a drawback by some... Anyway, these two mappings behave the same way so, if you don't use <leader> for very specific reasons, using the second one should be enough: nnoremap <leader>a dosomething nnoremap ,a dosomething

Categories : Eclipse

Eclipse PDE - ViewPart onExit command?
Upon further inspection I've spotted in the exact link I shared this: Subclasses may extend or reimplement the following methods as required: setInitializationData - extend to provide additional initialization when view extension is instantiated init(IWorkbenchPartSite) - extend to provide additional initialization when view is assigned its site dispose - extend to provide additional cleanup getAdapter - reimplement to make their view adaptable So yeah: dispose() is the answer. I'm still getting used to the naming conventions here. Anyway, I hope this is useful to somebody except me :)

Categories : Java

Is it possible to execut two handlers for the same command? (eclipse rcp)
I think I found a way to do this! After researching a lot I found this interface: IExecutionListener. The javadoc says: A listener to the execution of commands. This listener will be notified if a command is about to execute, and when that execution completes. It is not possible for the listener to prevent the execution, only to respond to it in some way. This is exactly what I want: Don't interfere with the existing command but get notified when it is executed. So here's the code to add an execution listener to the default copy command: public void addListenerToCopyCommand() { ICommandService commandService = (ICommandService) PlatformUI .getWorkbench().getAdapter(ICommandService.class); Command defaultCopyCommand = commandService .getCommand(org.eclipse.ui.IW

Categories : Java

How to set a command to be hidden by default in Eclipse?
Finally, I have found a solution: <extension point="org.eclipse.ui.perspectiveExtensions"> <perspectiveExtension targetID="*"> <hiddenToolBarItem id="command_id"> </hiddenToolBarItem> </perspectiveExtension> </extension>

Categories : Eclipse

Code doesn't run in eclipse but does in command window
Put bin folder in your classpath Process p = run.exec("java -cp path/to/bin Test1"); Currently, java is looking for Test1.class inside your project directory.

Categories : Java

Eclipse + CDT: how to build indexes from command line?
Just found this: https://aholzner.wordpress.com/2010/09/26/generating-c-index-files-for-eclipse-from-the-command-line-linux/ Unfortunately no CDT version is specified.

Categories : Eclipse

How to uninstall an eclipse plugin via command line
You can try using Eclipse Director and put com.beck.ep.feature.group as argument for -uninstallIU

Categories : Eclipse

Code not working when running normally, but working in debug (eclipse)
I had the same Problem, but with some more specification. The code was working fine in 32bit but I had this issue in 64bit (I am using native library so I need to maintain both). The solution I found is to add Thread.sleep() in the while loop. I don't know why it works, so your guess is as good as mine. A better solution would probably to implement an Observer Pattern instead of having an infinite loop. But that would require some re-factoring.

Categories : Java

Running JUnit 4 from command line on Eclipse project
Just take off the .class part. Java knows to look in that file when you specify the class name. java -cp /usr/share/java/junit.jar org.junit.runner.JUnitCore MySuite

Categories : Java

Running a Java program in Eclipse as if from command line
You need to go to: Run Configuration > Argument > Program argument. Then copy and paste "inputFile.txt" "inputFile2.txt" inside the box.

Categories : Java

Import module works with Eclipse but not in command Line
When the other module is in the same directory, you don't need to qualify it. Therefore, you simply need to do: from Secondary import Secondary The reason why it works in Eclipse is because Eclipse has added src to the PYTHON_PATH too.

Categories : Python

Debug in Eclipse while running from command line ubuntu
Is your application written in C or in Java? If your application is in C and you are using CDT, you can attach to existing project by: Run your application from terminal. In Eclipse CDT, go to main menu "Run"->"Debug Configurations...", double-click "C/C++ Attach to Application" and press "Debug" (you should not need to specify executable and/or project). For Java applications, see this

Categories : Eclipse

Executing the Eclipse generate javadoc from the command line
from the javadoc helptext you can use these flags/parameters: -public Show only public classes and members -protected Show protected/public classes and members (default) -package Show package/protected/public classes and members -private Show all classes and members -help Display command line options and exit -doclet <class> Generate output via alternate doclet -docletpath <path> Specify where to find doclet class files -sourcepath <pathlist> Specify where to find source files -classpath <pathlist> Specify where to find user class files -exclude <pkglist> Specify a list of packages to exclude -subpackages <subpkglist> Specify subpackages

Categories : Java

How to get command line arguments of an Eclipse 4 application from code
I've got it. It is not so intuitive, but it works for me. There is an instance implementing the IApplicationContext interface. (The interface depends on the org.eclipse.equinox.app.) The instance is reachable by the injection mechanism. The method getArguments() returns a map. But it does not return a map of some command line parameters and their values. It returns some map, where it is under the key "application.args" stored an array. Exampli gratia: @PostConstruct public void createControls(Composite parent, HtmlEditorService editorService, IApplicationContext iac) { System.out.println(iac.getArguments().get("application.args").getClass().getCanonicalName()); ... } Then it prints out java.lang.String[]. However the array contains just my custom arguments instead all arguments.

Categories : Misc

How to create eclipse android project from command prompt?
try this android create project --target <target-id> --name MyFirstApp --path <path-to-workspace>/MyFirstApp --activity MainActivity --package com.example.myfirstapp source http://developer.android.com/training/basics/firstapp/creating-project.html#CommandLine

Categories : Android

Problems opening file from command line in Eclipse
I found the solution here: http://www.sigasi.com/content/make-eclipse-open-files-command-line. The executable name must be the same as the one set in the appName property in the plugin.xml of the RCP. Now it works.

Categories : Eclipse

Tomcat running from command prompt but shows 404 Error in eclipse
Problem Resolved I did this: Previously it was using workspace metadata. I changed it to tomcat installation data. I guess there was some leftover stale data from previous installation. Took too long to figure this out.

Categories : Eclipse

How to create a maven project which will work in eclipse and from command line
Wow that's a lot of questions at once. I admit that setting up a webapp project with Maven and Eclipse can be tricky, so I'll try to answer them all. Creating a Web application project with Maven How do I create a java web project with servlets jsp and other classes with maven? It creates a simple directory structure, src->main->java. When you are creating a Java web project, the final product should be a WAR or EAR file. WAR and EAR files are JAR files with a specific structure that can be deployed in an application server or servlet container. As mentioned, the easiest way to set up a Maven project for web applications is to use archetypes: mvn archetype:generate -DarchetypeArtifactId=maven-archetype-webapp If we create a project with this archetype then a simple directory s

Categories : Eclipse

Checking for null selection variable value in the command framework of Eclipse RCP
Try using 'instanceof' and 'and'. Like: <and> <instanceof value="fully_qualified_class_name_of_your_selection_class"/> <equals value="0" /> </and> Hope this helps.

Categories : Eclipse

Eclipse RCP Plugin.xml Command binding enablement with a selection count of more than 1
Use <not> with <or> like that: <binding commandId="com.stackoverflow.commands.myCommand" rank="100"> <enablement> <not> <or> <count value="0" /> <count value="1" /> </or> </not> </enablement> I haven't tried it, but it should works.

Categories : Java

Eclipse plugin: How to change a JFace Tree model out of a command
Solution 1 - Use your own API You can inject die active MPart into your Handler and then use part.getObject() to get your contribution class. you can then access your own API to get the Model and the TreeViewer. @Execute public void executeHandler(@Named(IServiceConstants.ACTIVE_PART) MPart part) { MyPart myPart = (MyPart)part.getObject(); MyModel myModel = myPart.getMyModel(); TreeViewer viewer = myPart.getMyTreeViewer(); } Solution 2 - Use DI When you initialize your TreeViewer, put it into the IEclipseContext of the Part. You can then have the TreeViewer injected into your Handler. public class MyPart { @PostConstruct void postConstruct(Composite parent, IEclipseContext context) { TreeViewer viewer = new TreeViewer(parent); context.set(TreeViewe

Categories : Eclipse

PHPMailer working in browser but not working in command prompt
Maybe you have two different php.ini files, one for your http server and one for your command line client. Do a <?php phpinfo(); ?> and check in browser and command line which php.ini is loaded. Output should be something like "Loaded Configuration File c:xamppphpphp.ini" Related Question: How to find the php.ini file used by the command line?

Categories : PHP

Passing command line options to reducer in Hadoop Mapreduce in Eclipse
To pass command line argument you need to use -D name=value. For example you want to configure temp directory for all task then may use following command hadoop jar JAR.jar mainClass -D mapreduce.task.tmp.dir="/path/to/temp/dir" Don't forget to put space between -D and name=value Then you can configure useing GenericOptionsParser

Categories : Java

Executing Eclipse Selenium Webdriver Java Code in Command Line?
Have a look at the javac and java command line options. Heres what I did to run selenium tests without requiring eclipse or maven/ant. this compiles your class, with the jar file (i put it in the same directory, but ideally you will put the full path in the qoutemarks: javac -classpath "selenium-server-standalone-2.33.0.jar" Example.java Then you can run the generated class via: java -classpath ".;selenium-server-standalone-2.33.0.jar" Example Hope that helps.

Categories : Java

how to configure eclipse run configurations for System Properties (ssl/tls) in command line arguments
Yes, I got solution where to place the TLS/SSL keys in the eclipse Run -> Run Configurations -> under Main select the class which going to run, -> (X)Arguments provide the key details which you to include under the VM arguments,under Program Arguments pass the usual command line arguments. When running SSL layer client/server applications key list or key details should be included under the VM arguments. My program works well. In Details, Arguments are divided into Program Arguments, VM arguments in Eclipse, Program arguments are arguments that are passed to your application, which are accessible via the "args" String array parameter of your main method. VM arguments are arguments such as System properties that are passed to the Java s w interpreter. The VM arguments go after the call to

Categories : Java

BufferedImage bytes have a different byte order, when running from Eclipse and the command line
Before answering my own question I would like to really, really, REALLY thank @Joni and @haraldK that pointed me to the right direction. My knowledge for the internals of the BufferedImage, ColorModel, SampleModel and the like is not so great so they have helped me out. So here is what happened: First of all the different behaviour was caused by different JREs. A log statement for printing the java version revealed that Eclipse prints 1.6.0_16-b01 while the command line prints 1.6.0_31-b05. Apparently the implementation of the image loading (this would be the PNGImageReader class) has changed between versions and I suspect that it did during this change. Still though both versions use the same ColorModel and SampleModel so I couldn't understand this change (it seemed a real code-breake

Categories : Java

class not found: running successfully in eclipse but throws exception at command prompt
I can able to run you code through command prompt without getting any exception No modification i have done.

Categories : Java

How to change the color of ctrl/command+hover variable/method/class in eclipse
It in the General -> Editors -> Text Editors choose Hyperlink in the list on the right and uncheck System Default and select desired color.

Categories : Eclipse

Php Header command working in one file but not working on other
Don't use header redirects with relative paths. You should redirect to the front end URL path or absolute paths. It's possible that your "classes/login.php" is an included file into "index.php" -- so you're actually trying to step out of the web server directory - which is why it works locally but not on the server.

Categories : PHP

Perl -pi -e 's/ / /' filename not working inside perl script. but it working in command line
The line is shell command. Not perl script. This line calls perl and gives it program: s/ / / Plus sets certain options (-p, -i), but it is still shell program call, not Perl expression.

Categories : Perl

Emulator not working in Eclipse
It's working.. It is simply super slow ;) Keep waiting a while longer and it will boot eventually. It helps to choose smaller devices with less ram. Just a heads up, loading devices like tablets or the newest phones can easily take you 20-30 minutes.

Categories : Android

eclipse isn't working after reinstalling jre and jdk
i changed the workspace to one which i used with my ex-eclipse, a lot of the codes were underlined red showing they have errors. This may be because in your project settings, you have the old jre associated, which may no longer be existing. There are multiple jre libs that are used in any java project. So you may have to change the old jre settings with the newly installed jre. Here is how you can do it: In eclise go to menu->window->preferences->java->installed JREs-> remove the old unavailable jre and add the new one.

Categories : Android

JUnit 3 and 4 not working on eclipse 4.2
Not sure why you are seeing a hang in Eclipse. Perhaps its your Eclipse installation. More imporantly, when using JUnit 4, you need to annotate your test cases with @Test. Also your setUp and tearDown methods should be annotated with @Before and @After respectively. Check this post for a very simple JUnit test and brief explanation of the basic annoations. Here is a re-rewrite of your test... public class AA { @Before public void setUp() throws Exception { // Runs once before each method annotated with @Test } @After public void tearDown() throws Exception { // Runs once after each method annotated with @Test. } @Test public void testZabri() { // The Sample Test case fail("Not yet implemented"); } }

Categories : Java

Eclipse is not working properly
Check whether your eclipse and java are of the same version i.e both 32bit or both 64 bit. You can try on the command line: java -d64 -version If it's not a 64-bit version, you'll get a message that looks like: This Java instance does not support a 64-bit JVM. Please install the desired version. To check eclipse : Open eclipse.ini file and observe the following 4th line plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519 This shows eclipse is 32 bit

Categories : Eclipse

pep8 does not appear to be working in eclipse for me
I think that you have to actively run pep8 tests when you are ready - not sure where it is hidden in the menus or if there is a keyboard short cut - try looking under 'Tools' in the menus. The other possibility is that you may not have pep8 correctly installed where it is indicated - try copying the path from the above into a command prompt and seeing if it runs with a sample .py file and does not error. If it doesn't you should be able to install the pep8 checker from pypi under your current python installation and then point eclipse to it.

Categories : Python



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