w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How do I run Ubuntu Server headless using Parallels Desktop?
Make sure Parallels Desktop is not running. If it is running, the commands below will still create a console window. From Terminal.app, use the Parallels command line: prlctl # List available VMs prlctl list --all # Start a VM using its name prlctl start UbuntuServer # Stop the VM prlctl stop UbuntuServer # Pause and Resume prlctl pause UbuntuServer prlctl resume UbuntuServer # Reset and Restart prlctl reset UbuntuServer prlctl restart UbuntuServer

Categories : Osx

add google voice search to unity ubuntu 13.04
I managed to figure this out almost imediately, I feel silly! in the bash script I put xdotool keydown ctrl+shift+period sleep 3 xdotool keyup ctrl+shift+period Thats my first useful bit of bash, I feel proud of myself and I managed to figure it out all by myself!! ;-) love it when a plan comes together!

Categories : Bash

Tkinter method deiconify seems not working on ubuntu(12.04, unity)
What you are seeing is apparently the difference between Windows and non-Windows. It looks to me like the Windows behavior is a bug. At the very least, it's not expected behavior. What you are seeing on ubuntu is what I would expect to see. For a GUI to do anything, the event loop must be running. Everything that happens is the response to an event. The drawing of a window on the screen is a response to an event. A button click is a response to an event. The visual effect of a button being pressed is a response to an event. And so on. When you call iconify, that causes an event to be sent to the app saying "remove the window from the screen". The event loop sees the event, and redraws (or "un"draws) the window. The reverse happens when you call deiconify -- the system gets a redraw event

Categories : Python

Automatically invoke xprop at a named point on the desktop (X11, Ubuntu)
The problem is that xprop is blocking for the mouse click so it needs to be done in the background. The wait is not strictly necessary, but makes the script exit more cleanly by waiting for xprop to complete. #!/bin/bash xprop | grep WM_NAME(STRING) & pid=!$ sleep 1 xdotool mousemove 10 40 click 1 wait $pid

Categories : Ubuntu

Oracle Java 7 Installation in Ubuntu 12.04 - JB-java.desktop
this is how i installed sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer sudo apt-get install openjdk-6-jdk

Categories : Java

Unable to unzip tar.gz on ubuntu VM
Quote from the manpage: --format= Format of the resulting archive: tar or zip. If this option is not given, and the output file is specified, the format is inferred from the filename if possible (e.g. writing to "foo.zip" makes the output to be in the zip format). Otherwise the output format is tar. So you got probably a .tar file which not compressed, but just named .tar.gz. Try without the -z parameter.

Categories : Osx

Unable to install karma in Ubuntu
I had the same issue, fixed by downloading the source code for 0.10.15 version. ./configure && make && sudo make install then sudo npm install -g karma and it works!

Categories : Node Js

Unable to restart Apache2 in Ubuntu 11.04
I solve the problem by Restoring the server from last good backup so I remove my changes Then I edit /etc/apache2/sites-enabled/www.domainname.com.conf and change ServerName from www.domainname.com to legacy.domainname.com Restart apache (/etc/init.d/apache2 restart) And that is it Thanks

Categories : Apache

Ubuntu unable to locate package
The package cannot be found, because it is not in any of the archives listed in your sources.list file. This page explains what you need to do: http://docs.openstack.org/trunk/openstack-network/admin/content/install_ubuntu.html I modified the steps a bit for your case to be perfectly clear and as easy as possible: sudo su - echo deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/grizzly main >>/etc/apt/sources.list apt-get install ubuntu-cloud-keyring apt-get update apt-get install quantum-lbaas-agent

Categories : Ubuntu

Ubuntu unable to unpack tar.bz2 to /usr/local
You should change it to the path where you've actually put your bzip file. /path/to is a meta directory, meant to indicate the path to where the given file is. So, for example, if you've put the file in your system tmp directory, you would use /tmp/boost_1_54_0.tar.bz2. In the case where it's in /home/Downloads, that's what you'd use. Or, if you're actually in the directory where the file is, you can just use the file name without a path.

Categories : Ubuntu

Unable to install CBLAS on Ubuntu.
CBLAS is a wrapper of BLAS. CBLAS routines just call Fortran BLAS routines. First you need to compile BLAS. Then use BLLIB variable to point to .a file created after BLAS compilation.

Categories : C

Unable to install ARToolkit in Ubuntu 13.04
I found the solution on these sites by luck. Instructions from both sites were necessary for successful installation. Install ARToolKit 2.72.1 in Ubuntu 10.10 Install ARToolKit 2.72.1 in Ubuntu 11.10 and 12.04

Categories : Ubuntu

PHP intermittently unable to load json.so (PHP 5.4.19 on Ubuntu 12.04 LTS)
Since you're saying that the json extension is loaded in phpinfo()'s output you could be dealing with a bug. Have you checked if the module file is actually there in the filesystem? You have the following options: Compile PHP 5.4 from source with Apache 2.4 Upgrade to the same repo's stable version which will give you PHP 5.5 + Apache 2.4. Submit a bug with the Ondrej in Ubuntu's PPAs and wait for it to be resolved. For more information check the debphp site. Submitting a bug is a must, since if it is a real one it must be fixed for all users. You could firstly go with option 2 if you don't conflict with the Migration guidelines like backward compatibility, deprecated functions, etc.. SO check it and decide. It also strongly varies depending on the machine you have to do this with.

Categories : PHP

Unable to run lessc on Ubuntu 13.04. Not even a "command not found"
I've encountered this in the past and solved it by adding a symlink to a directory on my path: sudo ln -s /usr/lib/node_modules/less/bin/lessc /usr/local/bin/lessc I see you've worked around your issue, but someone else may find this information useful.

Categories : Node Js

Freeling : Unable to compile the Java API on Ubuntu
So it appears that you are far superior than me, but I noticed that you set-up your environmental variable's path, did you also check to make sure which version of java your system is using as the default overall? Try using sudo update-alternatives --config java and making sure the right JDK is being used. If you already solved this issue, I'd love to hear your solution (since you posted this awhile ago).

Categories : C++

Unable to create user on Ubuntu on Amazon EC2
You are probably thinking of adduser which has interactive prompts for most of the fields. See this question. useradd and userdel are for creating accounts in scripts where you don't want to be prompted. By default they will only create the user and requires additional command line options to create the home directory etc. You will find it did create the account (look in /etc/passwd) and the complaint about "already exists" confirms this. How do you remember the difference? No idea. Seems to be one of those historical things you just need to know.

Categories : Amazon

Unable to compile Objective-C code on Ubuntu
+(id)new is a function of the NSObject class. However, you are subclassing a runtime object. To use most of the Apple methods you're used to using in OS X, you'll need to subclass NSObject instead. Also, you declare an object's superclass in the interface, not the implementation. You need to change @implementation CDB : NSObject to @implementation CDB, then, in your header file, place @interface CDB : NSObject { ...

Categories : Objective C

Unable to install laravel 4 using composer on ubuntu
I had the same issue, this is what worked for me: Backup your composer.json Edit comooser.json and remove the whole "scripts" block Save composer install Restore original composer.json composer update Seems like we don't have all the dependencies needed to run artisan on a bare install, but once everything has been fetched by composer, it runs fine.

Categories : Laravel

Unable to connect to Mongodb which is on windows server from ubuntu using php
A few comments: Please use new MongoClient instead of new Mongo. This should not output anything at all. You're just selecting a database and assigning it to a variable. Is that your whole code snippet? What did you expect the output to be? To figure out what is actually happening under the hood with connections you can use MongoLog. With this functionality you can track down what the driver is doing internally. You'd use it like: MongoLog::setLevel(MongoLog::ALL); MongoLog::setModule(MongoLog::RS); MongoLog::setCallback( 'printMsgs' ); function printMsgs($a, $b, $msg) { echo $msg, " "; }

Categories : PHP

Unable to move mp4 files to another directory in ubuntu using python
When python I/O is given a filename, it assumes that the file is in the current directory, or somewhere on it's path; if it's not in any of those places, it yields an IOError. Therefore, when you are accessing files in directories other than your current directory, it's important to specific the path to that file. In your code, calling shutils.move with f is just supplying the function a file name---the path to that filename has been stripped off. Therefore, your call to shutils.move should look like shutil.move(os.path.join(root, f), dest)

Categories : Python

Unable to run IntelliJ IDEA CE 12 with Ubuntu Oracle Java 8
It's a known issue, JDK 8 has removed a method that IDEA is using. It was fixed in IDEA 12.1.5. We recommend using supported and released JDK versions to avoid problems, like JDK 1.7.

Categories : Java

Java-Unable to get MAC Address for Ubuntu Device using getHardwareAddress()
This is almost a duplicate of Why does java NetworkInterface.getHardwareAddress return empty byte array on Windows? but it's reversed Linux/Windows so I supposed I'll try to answer it. It looks like you're getting the loopback interface in the address variable, which doesn't register as having a hardware address since it isn't associated with hardware. Try making sure you're getting an InetAddress associated with network hardware. The linked thread has an example of iterating over the list.

Categories : Java

how to install php 5.4 install on ubuntu desktop 12.04?
Maybe this tutorial will help http://www.barryodonovan.com/index.php/2012/05/22/ubuntu-12-04-precise-pangolin-and-php-5-4-again

Categories : PHP

Unable to grep file in Ubuntu, matching lines are blank?
It sounds like your file might be using CRLF (carriage-return + line-feed) for line endings, instead of just LF (line-feed). (This might happen if, for example, your file was ever edited on a Windows machine.) So, I'd suggest running dos2unix on it, to remove any stray carriage-returns, and see if that fixes it.

Categories : Ubuntu

Detect Desktop and Redirect mobile browser to Desktop Main Website
So if you want to detect a desktop trying to view the mobile version put this in your .htaccess file: Options +FollowSymlinks <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^m.domain.com$ RewriteCond %{HTTP_USER_AGENT} !(android|bbd+|meego).+mobile|avantgo|bada/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)/|plucker|pocket|psp|series(4|6)0|symbian|treo|up.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino [NC] RewriteCond %{HTTP_USER_AGENT} !^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|

Categories : PHP

Facebook Unity SDK has error when send request with custom friends in Unity Webplayer
One of the Facebook software engineers here. Are you passing in null to the data or title param for FB.AppRequest()? There's a bug where it doesn't handle that correctly currently. Either exclude that or pass in an empty string. We'll get that fix ASAP. Thanks for finding that. Update: The latest SDK version has that fix.

Categories : Facebook

Is it practical to start a Unity game from an Android app and revert back from Unity to the app?
You should be able to have two activities in your app, one using your java code and another with the Unity game. Android is already pretty good at switching between activities. Check out this: http://developer.android.com/training/basics/firstapp/starting-activity.html You'll probably need to add your Java project as a plugin in Unity and override the AndroidManifest.xml in the Unity project to load the Java activity. Check out this documentation on extending android projects in Unity: http://docs.unity3d.com/Documentation/Manual/PluginsForAndroid.html

Categories : Android

Xcode cannot parse exported project from Unity 4 after being upgraded from unity 3
Some Unity packages install editor scripts that modify the XCode project after it's generated. These scripts can cause the symptom described, if they have a bug, or if they subtly interfere with each other. Search your project for OnPostprocessBuild calls, try disabling them one-by-one, generate a fresh XCode project each time, and see if it starts opening with XCode. If it does start working, diff the working and non-working versions of Unity-iPhone/project.pbxproj, and see if you can figure out why.

Categories : IOS

Unity Register For One Interface Multiple Object and Tell Unity Where to Inject them
In the example below you have an interface implemented twice and injected on demand into two different client classes, just as you request. The trick is to use named registrations. class Program { static void Main(string[] args) { IUnityContainer container = new UnityContainer(); container.RegisterType<IFoo, Foo1>("Foo1"); container.RegisterType<IFoo, Foo2>("Foo2"); container.RegisterType<Client1>(new InjectionConstructor(new ResolvedParameter<IFoo>("Foo1"))); container.RegisterType<Client2>(new InjectionConstructor(new ResolvedParameter<IFoo>("Foo2"))); Client1 client1 = container.Resolve<Client1>(); Client2 client2 = container.Resolve<Client2>(); } } public interface IF

Categories : C#

Unity iOs - screen gets black when changing rotation while Unity is paused
Not sure if you have fixed this, Its been a while... But the reason that your UnityViewController is not functioning properly is because a view controller that is not visible will not receive rotation events. Because you are setting your view controller as the root view controller, the UnityDefaultViewController defined in "iPhone_View.mm" is not receiving rotation events. I have been studying Unity's rotation for a while now as I have my own issue with a similar setup. There are a few things that you might be able to try: In iPhone_View.mm there is a function that is defined called: UpdateOrientationFromController(UIViewController* controller) that might be able to solve your problem. You would want to call this function on the view controller that you designed yourself where you plac

Categories : IOS

Unity.AutoRegistration ?? Convention Based Registration Unity
It appears that what you are looking for is this: container.ConfigureAutoRegistration() .LoadAssemblyFrom(typeof(ITest).Assembly.Location) .LoadAssemblyFrom(typeof(Test).Assembly.Location) .Include(If.ImplementsITypeName, Then.Register()) .ApplyAutoRegistration(); This will tell Unity.AutoRegistration to register all types where there is an interface with the same name, prefixed with I.

Categories : C#

Using .NET desktop application with DevExpress over Remote Desktop
I'm working with DevExpress .Net controls (and moreover sometimes with their controls source code) since 2007. And it seems I know the possible reasons of visual drawback of these controls under RDP. These reasons are: - Skinning technology (which is bitmap-based) - Double-buffered painting So, let me explain. When the user is connected via a Remote Desktop Connection, all drawing operations performed by control are transferred over the network connection to the RDP client for display. If control draw a line, the "DrawLine" command is sent over the network to the client. If control draw a text, a "DrawText" command is sent (along with the text to draw). But if control draw a bitmap, the entire bitmap needs to be transferred over the network. Thus this can be a main bottleneck when using

Categories : Dotnet

RVM is completely messed up. Need help to reinstall
rvm implode should do the trick. Incase you are getting permission denied errors, just change its permission using sudo chmod 777 -R <FILE_OR_DIR_NAME_HERE> or run sudo rvm implode

Categories : Ruby On Rails

How to reinstall VS 2012 to different directory?
If you look at your C:ProgramDataPackage Cache folder, or if by any chance your ProgramData folder is located elsewhere type %ProgramData%Package Cache in your Run box you'll notice a whole lot of folders and files taking over 2GB of space. That is where the VS 2012 data is stored and that is where it is getting the data from when you install to a different location. Deleting the 'Old Folder' was therefore a bad idea because not all VS 2012 files were stored there, you must first uninstall VS 2012 which will remove the 'Old Folder' AND the C:ProgramDataPackage Cache at which point you can install into 'New Folder' and while VS 2012 installation will again copy all those files to the same folder it will also fix all the registy entries to point to your 'New Folder' instead. Alternatively

Categories : Visual Studio

Reinstall Ruby to use libyaml
If you built from source and kept the source code, then you should be able to run: $ cd path/to/ruby/source $ make uninstall You might need to sudo it. If you haven't kept the source code, then it's messier. You will have to locate all of the files created by the installation and remove them manually. On CentOS you should have the locate command, so just run: $ sudo updatedb $ locate ruby That will give you a long list of files. You should be able to work out which ones were installed and remove them. While you're rebuilding, include libreadline (might not be the exact name). I've had to re-build ruby for this a number of times.

Categories : Ruby

Do I need to reinstall Django for new virtualenv?
The easiest way to go is to freeze your requirements into requirements.txt and then install them in the new virtualenv: pip freeze > requirements.txt pip install -r requirements.txt Another option is to make your virtual environment relocateable and copy each time you need a new one. This is somewhat harder to do, see: virtualenv-clone virtualenv relocatable -- does it really work Making a virtualenv based on another virtualenv FYI, virtualenvwrapper has cpvirtualenv command, but you should use it with caution: Copying virtual environments is not well supported. Each virtualenv has path information hard-coded into it, and there may be cases where the copy code does not know to update a particular file. Use with caution.

Categories : Python

Can't uninstall/reinstall NuGet package
In your Solution or Project you will find a file called packages.config. Open this file and you will see all the packages that NuGet has installed. The file will look something like this: <?xml version="1.0" encoding="utf-8"?> <packages> <package id="Json" version="2.0.3" targetFramework="net45" /> </packages> Simply delete the line of your package and save the file. <?xml version="1.0" encoding="utf-8"?> <packages> </packages> Then run NuGet again and it should install. The JSON.NET NuGet package should just work with a Windows Phone 8.0 project. Adding it in VS2012 NuGet manager pulls in the WP7 version of JSON.NET. (packagesNewtonsoft.Json.4.5.10libsl3-wpNewtonsoft.Json.dll) JSON.NET is now also available as a Portable Class Library

Categories : C#

Flask on Ubuntu is unable to find Flask.json
In version 0.9 json (but it is in 0.10) is not a module. You can use it like this: from flask import json json.dumps(..) json.JSONEncoder This is actually a backwards-compatibiliy bug in the flask-wtf. This is fixed in the latest version of flask-wtf See the git diff here: https://github.com/ajford/flask-wtf/commit/6dea39dd2f130571c0028f1de6e489260fa01d47#flask_wtf/recaptcha/widgets.py I suggest you both use the latest versions of both flask-wtf and flask itself.

Categories : Python

Reinstall Linux Package with File Backup
To completly remove all files and dependency packages try apt-get --purge autoremove apache2 After that you can do a fresh install of apache2 apt-get install apache2

Categories : Linux

Stop, remove, reinstall service in chef
For the most part the recipe will match exactly the pseudo-code you've defined in the question. One thing you need to consider however is how you will make the recipe idempotent. One of the core concepts in Chef is that if the machine is already in the correct state (i.e. you have the correct version of your app deployed already) then you shouldn't perform any work. While I've not used them you should probably take a look at the application and application_nodejs cookbooks which expose LWRPs for deploying applications.

Categories : Ruby



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