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

"The selected directory is not a valid home for JDK" Android Studio
Did you follow the instructions on the install page? Known issue: On some Windows systems, the launcher script does not find where Java is installed. If you encounter this problem, you need to set an environment variable indicating the correct location. Select Start menu > Computer > System Properties > Advanced System Properties. Then open Advanced tab > Environment Variables and add a new system variable JAVA_HOME that points to your JDK folder, for example C:Program FilesJavajdk1.7.0_21. Make sure you have a JAVA_HOME environment variable point to the correct path (C:Program FilesJavajdk1.7.0_25 in your case)

Categories : Android

How to get the hadoop home environment variable?
Assuming that these are set in your login script, or that you have already set them in some other way: printenv HADOOP_HOME printenv JAVA_HOME or echo $HADOOP_HOME echo $JAVA_HOME

Categories : Hadoop

Mac: Updated HOME environment variable in /etc/launchd.conf and now machine wont boot
I'll give you two options, but first a warning: both of these involve using the command line to undo the damage, and if you do it wrong there's a possibility you'll make it even worse. A backup would've been a good idea, but it's a little late for that (well, actually, there are still ways to do it, but they also involve a risk of getting it wrong...). So whatever your do, be careful. Option 1: use single-user mode (Command-S at startup). This will leave you running as root, which means you are not subject to normal file permissions; after remounting the startup disk for write access (mount -uw /) you should not get permissions errors. You said this didn't work; the most likely thing is that you mistyped the command (I see this happen a lot -- people either leave out the "/", or the space

Categories : Osx

Is there way to get Visual Studio environment variable in SQL seeding script?
Here is the general process for using project variables in SQL in your database project from MSDN: How to: Define Variables for Database Projects This depends on what version of Visual Studio you're using (and whether you're using a database project -- highly recommended), but the general idea is you can assign some of your project variables as SQLCMD variables, build a SQLCMD script using those variables and when you run a build, the system will use SQLCMD to invoke your script, applying the variables as necessary to run your script. Even more to the point, the database project's recommended practice for "seeding" scripts and other post-build artifacts is to designate one SQL script as the post-build script and have it use SQLCMD syntax to invoke other .sql script files. So in my proj

Categories : SQL

"Unauthorized Payment" error with valid credit card in Live environment
Perhaps this is the same issue discussed at https://github.com/paypal/PayPal-iOS-SDK/issues/28#issuecomment-22742094? In any case, the solution is to contact merchant technical support, as this is likely a problem with the specific account.

Categories : IOS

Executable cannot access an environment variable, but it can if launched from Visual Studio (C#)
I suspect the environment variable is not defined for the user the process is running under. http://support.microsoft.com/kb/310519 There are system and user specific environment variables. You can type env (or set) at the prompt to list what's set and what isn't.

Categories : C#

Set debug/run environment variable in Visual Studio 2010 C# project?
This is possible in the C++ IDE, not the C# IDE. I'd guess it was omitted intentionally because C# has better ways to configure a program. Environment variables are awkward since they require an installer that tinkers with the user's system environment when the app is deployed. That's brittle, another installer can easily destroy that and they often do. The C# way is to use an application setting. Project + Properties, Settings tab. A possible alternative is to use a command line argument. You'll get it in your Main() method, you specify a value in the Project + Properties, Debug tab. You can still get what you want with a trick that takes using the C++ IDE to start your program: Add a new project to your solution and select the Visual C++, General, Makefile project template. C

Categories : C#

Android Studio: Gradle: error: cannot find symbol variable
You shouldn't be importing android.R. That should be automatically generated and recognized. This question contains a lot of helpful tips if you get some error referring to R after removing the import. Some basic steps after removing the import, if those errors appear: Clean your build, then rebuild Make sure there are no errors or typos in your XML files Make sure your resource names consist of [a-z0-9.]. Capitals or symbols are not allowed for some reason. Perform a Gradle sync (via Tools > Android > Sync Project with Gradle Files)

Categories : Android

Android studio offline installation
There is no need to download Maven. Android Studio only uses Gradle. However, the first time you build your project, you'd need to have a internet connection so that the Android Gradle plugin and all its dependencies are downloaded and cached on your local disk. With an active internet connection, do: $ cd /path/to/project $ /path/to/gradle assembleDebug Once that works, then you shouldn't need an internet connection. Android Studio will eventually support such an offline mode.

Categories : Android

Unable to start Android Studio after installation
You need to set your JAVA_HOME path, which will allow Android Studio to run. Have you done that? Here is how to do that: Right click your Computer icon, and click Properties Windows 8 Users: Then click Advanced System settings to your left. Now, go to the advanced tab, click Environment variables, under system variables, click New, and add a JAVA_HOME variable, it should look like this (relative to your jdk version, if its the latest it should be identical). If you already have that covered I found a solution here that can help you: Go to your AndroidStudio directory where you installed your studio Like D:UserAndroidStudio In AndroidStudio go to AndroidStudiopluginsgradlelib and copy gradle.jar Paste this gradle.jar file to AndroidStudiolib directory. Download gradle directly fr

Categories : Android

Android Studio installation issue in ubuntu
Use following steps, to set JDK Path in uBuntu edit your ~/.bashrc file and add the paths as follows: insert following lines: export JAVA_HOME=/usr/java/<your version of java> export PATH=${PATH}:${JAVA_HOME}/bin

Categories : Java

Visual Studio 2012 Installation gives error
Just install the available windows updates , also check this thread

Categories : Visual Studio 2012

Visual Studio 2012 Update 3 installation Error
Please try the steps mentioned in this blog post: http://blogs.msdn.com/b/smondal/archive/2013/09/23/the-pipe-is-being-closed.aspx

Categories : Visual Studio

Android Studio - get error: java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor
One of the jar library files has been compressed in an unusual way. Decompress the offending jar archives (you may have to rename to .jar to .zip before you can do this). Then recompress (I use 7-Zip archiver). Make sure you compress as zip, use compression level "store", and make sure the folder hierarchy remains the same. Remember to rename .zip back .jar.

Categories : Android

java getenv Windows system environment variable
By the time your process receives the environment, it has all been merged into a single list of key/value pairs. The separation into System and User variables is a Windows-only subtlety that does not propagate down to programs... unless you write non-portable code to read the Windows registry directly.

Categories : Java

Using an environment variable for java classpath not working within shell script
The symptoms you describe are rather puzzling. I can't see the problem (the script looks correct), but I've got an idea on how to start tracking it down. Get rid of the commented out lines from the script. Add a #!/bin/sh line to the start of the script to make sure that you are actually using the right shell to execute it. (It is always a good idea to do this ... even if you think that you will get the right shell by default. That might change, depending on the platform.) To figure out what the shell is doing, add set -vx as after the #!/bin/sh line. The "-v" says echo each script line read, and the "-x" says echo the actual command lines that are executed. This will tell you exactly what commands are being run ... so that you can figure out what the command arguments really are

Categories : Java

Java: how do I point at an array item through a variable?
In your example: String[] names; int test = 10; String myName = names[test]; The variable myName is a reference to the String in the array, but giving it new value: myName = "fred"; will do nothing to the array - all you'd be doing is assigning a new reference to that variable. To give the array element a bew value, do this: names[test] = "fred";

Categories : Java

Jenkins installation - Unable to create the home directory despite its existence and writeability
It looks like the problem may be that jenkins cannot see /home/myuser, and therefore it cannot access the jenkins folder inside this (even though it has write permissions in /home/myuser/jenkins, I believe the fact it can't read /home/myuser causes a problem). Try running the below command and then see if Jenkins works after that: chmod +r /home/myuser

Categories : Jenkins

Android camera app gives error on back and home button
I was having a similar issue, the trick is to also setup the camera inside of onResume(). The issue was that the app does not call onCreate() every time you go to an activity with the back button, sometimes it simply pauses the activity. onResume() is called whenever the activity returns to the foreground and is a more reliable place to set up the camera. @Override protected void onResume() { super.onResume(); if( camera == null ) { camera = Camera.open(); } }

Categories : Android

Fatal Error Detected by the Java Runtime Environment
My guess -- and it's only a guess at this point -- is that one of the methods FindClass or GetStaticMethodId is not succeeding for some reason, and since you're not checking for errors, your program eventually crashes trying to call a method through a bad method pointer. Minimally, check the return values of both of these methods against NULL, and fail if that's what they return. At @TimBender's urging, I looked at your code again, and I agree -- it's probably FindClass. You definitely can't include a ~ in your classpath -- only the shell knows how to interpret that, and that parameter won't go through a shell before the JVM sees it. Use a full, absolute path to the location of the class -- the root of the package hierarchy, actually.

Categories : Java

java.lang.IllegalArgumentException: Not a valid class name: ANDROID NDK javah
after further research.... i did it. i set arguments to -d ${workspace_loc:/MyProject/jni} -classpath C:Paulandroid-sdk-windowsplatformsandroid-17android.jar;${workspace_loc:/MyProject/bin/classes} com.myproject.MainActivity

Categories : Android

"Interface name is not valid at this point"
This is var ret = IEnumerable<decimal>(); just not valid C# code, that is. You may want to do something like: var ret = new List<decimal>(); Remeber that List, quoting documentation, derives from IEnumerable<T> too. public class List<T> : IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable so the code like public IEnumerable<decimal> SomeOtherKeys { get { var ret = new List<decimal>(); // do stuff with ret return ret; } } is perfectly valid.

Categories : C#

Ruby script that sets environment variable fails with Invalid argument - ruby_setenv (Errno::EINVAL) when started from a Java process on Windows
The problem was that when I started the Ruby script from Eclipse I had a different environment. Specifically, I had a CLASSPATH environment variable that looked really strange. I think the cause of this is the size of the CLASSPATH variable. It is really really long before being passed on to my sub process but within the sub process it is truncated and looks broken. I am suspecting I am running into problems with the max size of the Windows environment block (see details here: http://blogs.msdn.com/b/oldnewthing/archive/2010/02/03/9957320.aspx). I will not investigate this further but have fixed my code to remove the CLASSPATH variable before starting the process. Path path = FileSystems.getDefault().getPath("c:", "temp", "rb-test"); ProcessBuilder pb = new ProcessBuilder("ruby.exe","foo

Categories : Java

Installation Error - D/InstallAppProgress(): Installation error code: -25
Check the version number in your Manifest. If the version is less than the one on the device, you will not be able to over-install. You can install it using adb by using the -r flag. See here http://developer.android.com/tools/help/adb.html

Categories : Android

Android Studio & Gradle: Add outside java classes to Android main project
you might want to make your Dir a own module add include 'Dir' to your settings.gradle create a build.gradle inside your Dir directory with this content apply plugin: java now you can go into your main projects build.gradle and add to dependencies: compile project(':Dir') if your Dir uses android related stuff, you might want to use the New > Module(right click on your project in Android Studio) Function of Android Studio to create an Android Library. But i haven't tested that feature yet. If Android Studio throws an Exception when trying to use the New Module, you should try to update Android Studio, in the latest Version it works for me. You might also want to check the Gradle User Guide and the DSL Reference both are very helpfull in getting into Gradle and understanding i

Categories : Java

Gem installation error during MYSQL gem installation in ruby
You need to install mysql before installing mysql gem. Follow this link on how to install mysql on windows

Categories : Mysql

cannot resolve R into variable after Android studio update
You seem to have updated the Android SDK Tools to version 22, but you might not have updated the Android SDK Build-Tools to the latest version. Update it from the sdk manager and restart. See this answer on similar question: Eclipse giving error, missing R.java file after recent update . Hope this helps

Categories : Android

Java - JPanel contains point method error
The contains method checks if the Point is within the boundaries of the JPanel but using a coordinate system relative to the JPanel. Instead consider using findComponentAt(Point p). For example: import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.GridBagLayout; import java.awt.GridLayout; import java.awt.Point; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.*; public class TestMouseListener { private static final int SIDE_COUNT = 4; private JPanel mainPanel = new JPanel(); private MyGridCell[][] grid = new MyGridCell[SIDE_COUNT][SIDE_COUNT]; public TestMouseListener() { mainPanel.setLayout(new GridLayout(SIDE_COUNT, SIDE_COUNT)); for (int i = 0; i < grid.length; i++) {

Categories : Java

rendered="#{search.journeyRecord.valid}": Cannot convert valid of type class java.lang.String to class java.lang.Integer
Sorry. It was my mess, but I think the question can be useful for other people. Here in JSF: ... <rich:column style="text-align:center;"> <f:facet name="header">Protocol Number</f:facet> <h:outputText value="#{search.journeyRecord.journeyNumber}" rendered="#{search.journeyRecord.valid}" /> </rich:column> ... search.journeyRecord is a List<JourneyRecord>. The attribute type was changed by another person of the team. As @BalusC suggested, it's a complex type. EL tries to get its contents using toString() method, and convert it to Integer afterwards. I changed search.journeyRecord to another transient attribute that returns only an element and worked. Thanks to all that commented.

Categories : JSF

Android Studio Error: "You must install the Android Support Repository though the SDK Manager"
you must manualy run SDK Manager folder android-studio/sdk/tools search android or android-sdk new Support Repository must be already selected, and need only click "install" button

Categories : Android

create-android-project.sh:line 103:/home/laschweinski/android/android-sdk-linux_86/tools/android:No such file or directory
Open create-android-project.sh file, you should see two line codes like this: NDK_ROOT_LOCAL="/home/laschweinski/android/android-ndk-r5" ANDROID_SDK_ROOT_LOCAL="/home/laschweinski/android/android-sdk-linux_86" Then what you just need replace these paths with yourself's paths, as mentioned in your post NDK_ROOT_LOCAL="D:AndroidGameToolAndroid-ndk" ANDROID_SDK_ROOT_LOCAL="D:Softwareadt-bundle-windows-x86_64-20130522sdk"

Categories : Java

Android studio is not starting in windows 8, jdk installed and environmental variable set
Have you set your enviroment variable correct? If not add in Control panel -> System -> Advance system settings -> Environment variable: JAVA_HOME (value = c:program FilesJavajdk1.7.0_21)) Further more, have you looked at these topics? Problems with Android Studio are discussed detailed here and most are caused by an incorrect enviroment variable.

Categories : Android

GIT refs/heads/master does not point to a valid object
Does this differ from your result: $ mkdir foo; cd foo $ git init Initialized empty Git repository in /private/tmp/foo/.git/ $ echo 'a' > a; git add a; git commit -m 'a' [master (root-commit) 235e657] a 1 file changed, 1 insertion(+) create mode 100644 a $ cd .. $ git clone --bare foo foo.git Cloning into bare repository 'foo.git'... done. $ ls foo.git/ HEAD config hooks/ objects/ refs/ branches/ description info/ packed-refs if so, I'd suggest something is wrong with your 'project' repository. For example, if you never committed in 'project' then this occurs: $ mkdir bar; cd bar; git init Initialized empty Git repository in /private/tmp/bar/.git/ $ echo 'a' > a; git add a $ cd .. $ git clone --bare bar bar.git Cloning into bare repository 'bar.git'

Categories : GIT

Error Building Project in Android Studio "Error: No resource found that matches the given name (at ____ with value '@drawable/')
Alright, so after fussing with the rebuild for hours trying different methods (renaming particular files [i.e. those with the problems], rebuilding the app after renaming folders inside the build folder, etc) I finally decided that I would go to the source of the problem and see if it worked like other IDE's. Indeed it did, this is how I performed the fix: Find the location of the problem - For me, all four of the errors I had were inside the 'build' folder of the project. Close any open instances of the project While the project is closed, rename this folder from windows explorer (or other if youre using a different OS) (i.e. If the folders name is "build", rename it to "build.old") Open the project once more Go to Build > Rebuild Project You should not have any issues doing this, lik

Categories : Android

Import an Android Project from Eclipse to Android Studio and I have this error message "failed to find Build Tools revision 8.0.0"
Your build.gradle is trying to use Android SDK tools 8 which isn't installed on your machine. If you look at your build.gradle file you probably have this line buildToolsVersion "8". You want your build.gradle file to point to the Android SDK tools that you currently have installed (preferably the latest). Just open the Android SDK manager and see which tools you have installed and change the buildToolsVersion "8" to the right version.

Categories : Android

List of Inherited Classes Listbox Class Name not Valid at this Point
change this: if (customerListBox.SelectedItem.GetType() == Parent.ChildA) to: if (customerListBox.SelectedItem is Parent.ChildA) or as you was doing: if (customerListBox.SelectedItem.GetType() == typeof(Parent.ChildA)) Realize that using operator "is" avoid to check if the object is null.

Categories : C#

Simple UPnP / DLNA control point for Android using CyberGarage CyberLink for Java
I lifted your code, compiled it using Eclipse ADT and it ran perfectly on a virtual machine (VMWare player) running Android 4.0 (eeepc). There is an Android section on CyberGarage website that does say that CyberLink doesn't run on the emulator yet as it doesn't support multicast yet, perhaps that is/was your problem. Hope not too late to help. Andrew

Categories : Java

Processing android mode installation error: could not move mode "Android Mode" to the sketchbook
I needed to download Android mode manually. The steps are given below: Download "Android Mode" zip file from here. Unzip the downloaded "Android Mode" in the directory "C:/ Users/User/My Documents/Processing/modes/". Restart Processing. For more information, visit here.

Categories : Android

what is point cut and java point in springs and where we are using in cross cutting concerns in AOP
A JoinPoint is any method in your app's code that you wrote whether you were using AOP or not. An advice is code you want to run when that JoinPoint method is being called, without adding the code directly into your app's method. An Aspect is the class that holds the advice code. Check this for more details : http://www.coderanch.com/t/465799/Spring/Joinpoint-Pointcut

Categories : Spring



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