w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Getting error while running AppFuse project: "Failed to execute goal on project"
As you said you are using modular appfuse application. In appfuse modular application two module exists: core and web. Web module depends to core module. So you should first install the core module. Try this code in your core module directory: mvn install

Categories : Java

Running a .py script from bash, how can I pass a python variable back to the terminal once the .py is done running?
You can write your variable and its value into an ini file from the python script. In Values.ini file my_var="value" After executing python script, just invoke Values.ini using . operator . Values.ini Now your shell variable $my_var will be having the assigned value. The advantage with this method is that you can assign any number of variables like this. var1="value1" var2="value2" var3="value3"

Categories : Python

Running pig script gives the error as: job has failed. Stop running all dependent jobs
After some research, I found that the problem here is LeaseExpiredException. This might be because the output of mapper was removed. One of the reason for this might be due to the quota allocated for the user. In my case, I was running this script in a very large data, and my quota was insufficient to process/store the data. We can check the quota by the following command: hadoop fs -count -q /user/username Thank you.

Categories : Hadoop

Running python script on crontab is causing permissions errors but running via terminal is fine
@Lucas Ou-Yang @Hyperboreus as Hyperboreus said it depends on the user privilege who run it . i think that if you give the /tmp/ dir a 777 permission from the root account it'll be fixed : chmod 777 -R /tmp/ okay try with : chmod 777 /tmp/ if the error still check if the directory /tmp/ exist !

Categories : Python

Re-installing Linux O.S. and then running bunch of commands in a .sh script , how to stop the script if something fails?
You can check the error code from commands you run #!/bin/bash function test { "$@" status=$? if [ $status -ne 0 ]; then echo "error with $1" exit 255 fi return $status } test ls test ps -ef test not_a_command taken from here for more information Bash Beginner Check Exit Status

Categories : Linux

sys module giving different output when running Python script through IDLE and by double-clicking the script
print os.path.dirname(sys.executable) is what you should use. When you click it it is probably running through python.exe so you are removing the extra char from the w.

Categories : Python

How to run a script that it has to connect 3 solaris servers, do some operations and create files in the machine where the script is running?
Use sshfs to mount the needed directories of your three servers. Afterwards you can run the script locally accessing the remote data as local files.

Categories : Bash

Cron not running Python script is script not in home folder
cron is running crontab(5) entries from the home directory of the user. You need to change appropriately the directory i.e. to call the chdir(2) syscall (either thru the cd shell builtin, or inside your python script using os.chdir). You should query the current directory (using getcwd(3), or the pwd command, or the os.getcwd in Python) in your script. Also check your PATH if running commands.

Categories : Python

error with global name when running a script from another script - python
This is a pretty interesting problem. First a quick workaround, you can provide dictionaries to use as the local and global namespace when calling execfile(), using an empty dictionary for globals works fine: # test_fun1.py a = 1 def test1(): print a execfile('test_fun2.py', {}) test1() Alternatively, if you want the code to execute within the global scope of your module you can use globals() instead of {}. Now on to why this isn't working... from the documentation on execfile(): If both dictionaries are omitted, the expression is executed in the environment where execfile() is called. Here "both dictionaries" is referring to the optional globals and locals arguments to execfile(). In this case "the environment where execfile() is called" is the local scope of the fun

Categories : Python

Mac Error Create Android Project - "Errors running builder 'Android Resource Manager' on project"
workaround 1. create the project android create project --target [target-id] --name MyFirstApp --path [path-to-workspace]/MyFirstApp --activity MainActivity --package com.example.myfirstapp 2. import the created project in Eclipse

Categories : Android

When running Python's pdb as a script, how do I autostart the script?
that's probably not the way to do to it. you should modify/extend the existing pdb.py. the code looks like this: while True: try: pdb._runscript(mainpyfile) if pdb._user_requested_quit: break print "The program finished and will be restarted" except: traceback.print_exc() print "Uncaught exception. Entering post mortem debugging" print "Running 'cont' or 'step' will restart the program" t = sys.exc_info()[2] pdb.interaction(None, t) print "Post mortem debugger finished. The "+mainpyfile+" will be restarted" it looks like you could replace `pdb._runscript(mainpyfile)' with something like runpy.run_module(sys.argv[0], run_name="__main__", alter_sys=True) (from PEP 338). not a complete solutio

Categories : Python

Running a variable script with parameters through a script
If you do this: #!/bin/sh for app in "$@"; do sh "jboss-$app" restart done Then you can pass a space-separated list of app names to the script ./restart-apps app1 app2 app3 ...

Categories : Shell

Cannot copy script to Google Script Project
You've got one very long line, perhaps that's overwhelming the editor. (There are 132000+ characters in line 10.) You will able to paste the code into an Apps Script file by putting it through a prettifier first. A better alternative would be to use the development version, which isn't minified.

Categories : Google Apps Script

[three.js]: script running in IE10, not running as HTA
Okay, problem understood... solution is tricky. When using Three.js code within an HTML application (HTA), then the HTA uses IE7 quicks mode by default. You can easily add the following line to the Three.js HTA: <meta http-equiv="X-UA-Compatible" content="IE=IE10" /> But then, no more HTA mark-up is understood (windowstate, applicationname - to mention just a few) since the MS IE team wants to "focus more on standards" :-( But there is a trick which works... Create an empty HTA using all the mark-up code that you like, for example: <hta:application windowstate="minimize" border="none" icon="myIcon.ico" /> Do NOT use the IE10 X-UA-Compatible meta statement here. Create an onload javascript function within that HTA that loads the THREE.js HTML page to document.location.

Categories : Internet Explorer

Running Dynamic Web Project in Eclipse
The first thing I would check is that the "Dynamic Web Project" Facet is enabled on that project on that computer. (I find that when copying/migrating Eclipse projects from one computer to another, I often have to fix settings like that....) To check facets: right-click on the project, click "Properties". Click "Project Facets" in the left-hand column. Verify that "Dynamic Web Module" is checked. Note that if "Project Facets" does not appear in the Properties dialog, there will be a few extra steps -- a Stack Overflow search will help out here.

Categories : Java

Running a GWT project takes a lot of space
GWT generates a lot of temporary files, some of them relatively big, but cleans up after itself. That's unless you run DevMode from within Eclipse, in which case it'll kill DevMode so abruptly that it cannot do the cleaning. This is a known issue of the Google Plugin for Eclipse: https://code.google.com/p/google-plugin-for-eclipse/issues/detail?id=74 You'll find various workaround in the issue originally reported against GWT: https://code.google.com/p/google-web-toolkit/issues/detail?id=5261 Files are all in the temporary folder anyway, which you should clean regularly anyway (for example, setup a scheduled task to do it when you start or shutdown your computer, as is done on most other OSes)

Categories : Gwt

NumberFormatException while running the project in NetBeans
The exception is most likely thrown by this line: int x = Integer.parseInt(s); and the cause is that the value of s is not a valid integer. Indeed, this message: java.lang.NumberFormatException: null tells us that the value of s is null! And that implies that the request being processed does not have a "t1" parameter. I can't immediately see what is causing that, but the prime suspect is the HTML form. Here are a couple of ideas: Try composing a request URL in your browser's URL bar. Use your browser's web debugger to see what request URL is being sent to the server when you use your form.

Categories : Java

Error while running Calendar project
You may to add the following dependencies as well. https://android.googlesource.com/platform/frameworks/ex/ https://android.googlesource.com/platform/frameworks/opt/colorpicker/ https://android.googlesource.com/platform/frameworks/opt/calendar/ https://android.googlesource.com/platform/frameworks/opt/datetimepicker/ https://android.googlesource.com/platform/frameworks/opt/timezonepicker/

Categories : Android

Error while running codeigniter php project
At first make sure mod_rewrite is enabled in httpd.conf file and after that, overwrite your .htaccess file which is located your project root folder with the following code.. RewriteEngine on RewriteCond $1 !^(index.php|public|.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?$1 And then set your base url like following.. $BASE_URL = "http://".$_SERVER['SERVER_NAME']."/PRS/"; And change your config file like following.. $config['index_page'] = ''; And finally use the following url to access.. prs.net/PRS/login Or, you can check the following url to get some help.. Cannot remove index.php from CodeIgniter URL

Categories : Codeigniter

Project stopped running at Windows XP (32-bit)
Try using corflags with /32bit+ and see if it works. More information: http://msdn.microsoft.com/en-us/library/ms164699.aspx

Categories : Vb.Net

Running the project by build is not working in MAC OSX 10.7
Without the code of alertEnd:returnCode:cInfo: it's hard to tell, but it generally appears like something in that function is killing the for loop. What exactly are you trying to achieve with: if (i>240 && i<250) Can you post the code for the 'alertEnd:returnCode:cInfo'. Also it would probably be easier to read if you used a __block for alert sheets. If the alertEnd:returnCode:cInfo isn't referred to more than once, I'd keep it as a block. If you reuse the code within alertEnd:returnCode:cInfo then promote it to it's own void/function.

Categories : Objective C

Taking over a project running on EC2 and having access issues
It depends where the data is being stored. If its on EBS volumes, getting access to it should be easy. Create a new instance with a new key, and attach volumes from an exiting instance. You should be able to mount that volume and replace the key pair stored on the volume. Now if ephemeral volumes are being used, you wont have many options. Ephemeral volumes are lost when an instance is stopped.

Categories : Linux

Running UiAutomatorTestcase in AndroidJunit Test Project
As standard, UI Automator tests are compiled and built into a jar file, on a desktop computer, they are then deployed to the device by pushing the jar file to the device using adb. They are then run on the device, in the Android runtime by using adb shell uiautomator ... Thanks to http://stackoverflow.com/users/363437/vidstige for correcting my earlier post which was inaccurate. Probably the fastest way to help you get your tests running is for you to post your code as part of your question. Update 22 July 2013 I have not seen anyone else trying to run the test cases directly on the device rather than building them following the approach Google (Android) document. It might be possible, however you may have to work hard to discover whether your approach is possible or viable. UIAutomator

Categories : Java

when i am running gradle project via eclipse i got some exception
It's likely you haven't installed a JDK. Even though you have "jdk1.7", you may have only the runtime environment. You may need to install the "-devel" option for the package, for example, both these would be required: java-1.7.0-openjdk java-1.7.0-openjdk-devel If you can't find the right package, tell us your distro and the exact name of the jdk1.7 package you have so we can help more.

Categories : Java

Codeigniter project is not running other AMP server except XAMP
Thats a weird htaccess but whatever. Have you activated the Apache rewrite_module, by default I dont think it is activated. Left click the wamp manager icon in the system tray -> Apache -> Apache Modules -> rewrite_module Find it in the menu list and if it is not ticked, click it and wait 10seconds for Apache to be restarted and then you should be good to go.

Categories : PHP

VS2012 project x86 target not running on 32 bit Windows XP
Make sure you target .NET 4.0 (not 4.5). Also make sure both .NET 4.0 Runtime and Reliability Update 2 have been installed on your XP machine (it must be an XP SP3 machine).

Categories : C#

Running meteor project on a newer version
Meteor 0.6.x changed variable scoping across multiple files : each source file is encapsulated inside an anonymous function making its local var/function declarations visible only to the concerned file. To enable exporting symbols and reference them in other files, you now have to use this syntax : myVar=value; // instead of var myVar=value; myFunc=function(){...}; // instead of function myFunc(){...} If you did something like function displayName(){...} in model.js, try replacing it with displayName=function(){...}; I'm pretty sure it will do the trick.

Categories : Meteor

Windows Closes my SFML project after running
Your program shows Not responding because it returned a non-zero value. Somehow, SFML is not able to play the file. Check what the exact error is by reading the SFML documentation. Where is your OGG file located? Is it in the Debug builds folder, or in the Release builds folder? Try providing the absolute path like C:/Path/To/Your/File/music.ogg

Categories : C++

Set my ASP.NET MVC 3 project automatically perceive which Language is running
The first we need is add new routes for make for example ur main language by default context.MapRoute( name: "lang", url: "{lang}/{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }, constraints : new { lang = @"zh|en" }, namespaces: new[] { "NamespaceToControllers" } ); context.MapRoute( name : "default", url : "{controller}/{action}/{id}", defaults : new { controller = "Home", action = "Index", id = UrlParameter.Optional, lang = "zh" }, namespaces : new [] { "NamespaceToControllers" } ); Second part - we must modified DefaultController to change c

Categories : Javascript

Error when running dynamic web project in eclipse
It seems that port 8005 is already in use.. Use TCP View (if really on Windows 7) to figure out which process is binding it.

Categories : Java

Having problems running my .net project after changing framework to 4.5 from 4.0
Basically, your application is targeting AnyCPU, but it references x86 assemblies. You should change your target to x86 to resolve these warnings (and allow it to run successfully). Note that, in 4.5, this would still run since the default includes the (new in 4.5) "Prefer 32-bit" option, which causes AnyCPU to use x86 still.

Categories : Dotnet

Running Visual Studio Test project from outside
mstest.exe is the command line test runner. It is documented on MSDN: http://msdn.microsoft.com/en-us/library/jj155804.aspx I see no reason this will not work from PowerShell.

Categories : C#

Creating an HttpContext in MVC/StructureMap project running as a non-web app
To do as you suggest: For<RequestContext>().Use(ctx => { //TODO: Create unittest.html as required. SimpleWorkerRequest request = new SimpleWorkerRequest("/unittest", @"c:inetpubwwwrootunittest", "unittest.html", null, new StringWriter()); HttpContext context = new HttpContext(request); return HttpContext.Current = context; }); As was recommended though, abstracting the dependency upon the context would be a better long way to go.

Categories : C#

Running a PHP script
What you need to do is to fork the process before you terminate it. This way when you exit the process (or close your ssh connection) the secondary process will continue to run. $pid = pcntl_fork(); if ($pid == -1) { die('could not fork'); } else if ($pid) { // parent pcntl_wait($status); } else { // child // write your code here! }

Categories : PHP

Don't run script if it's already running
Try using ignore_user_abort(true); it will continue to run even if the person leaves and closes the browser. you might also want to put a number instead of true false in the db record and set a maximum number of processes that can run together

Categories : PHP

running pig script
I have not used node.js. But here I find a link to show how to execute a unit command in node.js: http://www.dzone.com/snippets/execute-unix-command-nodejs For example, if you want to run a pig script called foo.pig. Then you can try the following code: var sys = require('sys') var exec = require('child_process').exec; function puts(error, stdout, stderr) { sys.puts(stdout) } exec("pig -f foo.pig", puts); You can replace pig -f foo.pig to any command that you use to run your pig script.

Categories : Node Js

Error when running envdte project from console application
Will's comment above was the answer to my question - I ended up using the following reference: http://msdn.microsoft.com/en-us/library/ms228772(v=vs.100).aspx

Categories : C#

We don't need to stop running project due to server side datas changes
To see the immediate changes you can copy your js files and paste it in your target folder of entrypoint project. And a browser refresh will suffice. Sometimes clearing of browser cache also required. This might not be a classy solution but it will reflect the changes and in cases where you don't want to restart the server again and again to check whether it works or not.

Categories : Gwt

PyDev dependant project not found when running outside Eclipse
You have to set your PYTHONPATH properly when running outside of PyDev (PyDev takes care of that when you set your source folders, which are the folders added to the PYTHONPATH). Among the options to set your PYTHONPATH, you can do that in your shell by setting the PYTHONPATH environment variable or you could change sys.path from inside the interpreter.

Categories : Python

database Project not running Post Deployment scripts
As it's a couple of months after I posted the question, and http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/ I guess I should state what the outcome was... I couldn't find rhyme or reason for the issue other than removing the comments resolved the issue. Now that this has in effect been included in our rules to follow, we haven't come across this issue since.

Categories : Sql Server



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