w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Ubuntu: How to upgrade ubuntu 11 to ubuntu 13?
Ubuntu 11.04 is apparently not "supported" anymore... it was not a LTS (Long Term Support) release (http://www.omgubuntu.co.uk/2012/10/ubuntu-11-04-support-ends-today) There seems to be an option of "updating" things on "old-releases" (but they are not actively maintained/updated anymore), by editing your source repositories location: http://askubuntu.com/questions/101479/are-existing-updates-available-after-end-of-support. However, if you want to update to a 2013 version, probably the best you can do is to backup your data and configurations and install a new version from scratch. Pay attention to the fact that non-LTS versions stop being supported after around 2 years.

Categories : Ubuntu

How to combine two multidimensional arrays with showing duplicate keys or if duplicate, must add the values
$array1 = array( 'a1' => array(200,300,300), 'a2' => array(100,600,200)); $array2 = array( 'a1' => array('gen','gen2','gen'), 'a2' => array('gen2','gen3','gen3')); $result = array('a1' => array(), 'a2' => array()); foreach($array2 as $k => $v) { foreach ($v as $k2 => $v2){ if (array_key_exists($v2, $result[$k])){ $result[$k][$v2] += $array1[$k][$k2]; } else { $result[$k][$v2] = $array1[$k][$k2]; } } } Output: Array ( [a1] => Array ( [gen] => 500 [gen2] => 300 ) [a2] => Array ( [gen2] => 100 [gen3] => 800 ) )

Categories : PHP

Hudson server running app engine, duplicate shell script executions result in duplicate property errors
It might be the case that the dev_appserver is already running and then you run it again with hudson job. The best way will be to stop the dev_appserver instance first and then pump it up again.

Categories : Python

What platform (server installed on ubuntu vs ubuntu server) to prefer for website development?
There seems to be a lot of confusion in your post. Based on your lack of experience with GNU/Linux, I would suggest you use desktop Ubuntu. The difference between Ubuntu server and Ubuntu desktop is that the server edition is targetted to experienced users, so you get a very minimal distribution. No GUI, nothing preinstalled except the bare minimum. As for your comment about Apache/Glassfish, the two aren't comparable. Apache is the name of the open source community which looks after a lot of products. Very often people call Apache's httpd just "apache", which is a web server. Glassfish is a Java EE application server (Oracle's reference implementation) so probably a good place to start with Java EE.

Categories : Apache

Clojure performance - why does the "ugly" "array swap trick" improve lcs performance?
As Chas mentions, loops with primitive hints are problematic. Clojure attempts to keep ints unboxed when you provide a hint, but it will (for the most part) silently fail when it can't honor the hints. Therefore he is forcing it to happen by creating a deftype with mutable fields and setting those inside the loop. It's a ugly hack, but gets around a few limitations in the compiler.

Categories : Arrays

Ubuntu/Python- How to call ubuntu commands and 3rd party applications through Python
Take a look at os.path for directory navigation. To execute a shell command use os.system. The example you posted could go something along the lines of: os.chdir(os.path.expanduser('~/Documents/XDF_Thumbnails_Sci')) for file in os.listdir('.'): if os.path.splitext(file)[1] == ".feedme": os.system("~/galfit %s" % file)

Categories : Python

Same android cmake git project compiles well on one Ubuntu machine but does not compile on another Ubuntu machine even the entire project is the same
whoa! Solved! It was really a weird behaviour from cmake: I had three files conf.c that must be merged into a static library. When cmake run the AR program to create the library, it executed a command that was like: ar cr dir1/source1.c dir1/source2.c ... dft/conf.c rdft/conf.c ar r reodft/conf.c dir2/source3.c so, maybe due to the huge number of object files that were to be linked, cmake splitted ar commands in two command, BUT second command overwrited one of the two file conf.c that were added with the first command, so symbols defined with the first ar command were lost! This is clearly a bug in ar because even if the source file is the same, maybe the content may vary, thus symbols are not to be deleted. Thanks to all! Your suggestions brought me to the right solution!

Categories : Android

Difference between ubuntu and ARM Ubuntu
ARM Ubuntu according http://www.ubuntu.com/download/arm is for ARM-based systems only. It supports Calxeda ECX-1000 and Marvell Armadaxp (12.04 LTS only) production boards. Ubuntu update will not happen automatically. It checks if there is new updates automatically but never will update without yours permission. Security updates can be enabled to be updated automatically. For this you need to install unattended-upgrades: sudo apt-get install unattended-upgrades sudo dpkg-reconfigure unattended-upgrades If you want to have home server - install Ubuntu Server 12.04 LTS. It's reliable and the most important free. It will do all your detailed operations like file sharing and more.

Categories : Ubuntu

Cannot access ubuntu server from other machines other than the machine which is hosting the virtual machine which is my ubuntu server
First of all make sure in the setting of the virtual machine that it is in Bridged Adaptor type connectivity. Give a static ip to the virtual machine using sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0 the above is an example. You got what I mean. 3.Third, Try pinging the virtual machine with the base machine running the vbox to make sure they are connected. ping ipaddress-basemachine 4 . Now if everything is working fine from there then connect with this virtual machine with other base machine using Remote Desktop Viewer or any other similar application. Specify, the ip-address of the vbox and username, password. It will be able to connect with it now. 5 . If it still is not able to then try to check the firewall rules on both the virtual box machine and the base machine

Categories : Linux

Find duplicate values in an array which creates a new array with key as duplicate keys and values as the dupes
This should do what you want. Loop over the array, and see if the value was already in there. If so, add it to the result. $arr_duplicates = array(); foreach($array as $k=>$v){ // array_search returns the 1st location of the element $first_index = array_search($v, $array); // if our current index is past the "original" index, then it's a dupe if($k != $first_index){ $arr_duplicates[$k] = $first_index; } } DEMO: http://ideone.com/Kj0dUV

Categories : PHP

Windows Service performance vs. Windows Application performance
To answer the question, see Description of Performance Options in Windows: You can use the performance options to set Windows be optimized for either foreground programs or background services. The assumptions are that background services are relatively few in number and would be more efficient with more CPU time, and that program servers or interactive programs on desktop computers would be more efficient with shorter time slices to allow them to be more responsive to keyboard input and to service more threads (many thousands on Terminal Services in Application Server mode. ... The situation become more complex when you enable the Foreground Applications option. This introduces the "variable quantum" concept. In this case, background tasks receive a different quantum than th

Categories : Windows

Redundant/Better Performance Code VS Optimized/Less Performance Code
You should always go the way that is easier to understand and maintain first. This means reducing duplicate code to absolute minumum (DRY). In addition this kind of micro optimization is not that important for many systems. Also note that shorter code is not always better. I think I would go with somehting like this: string name = GetName(); // returned string could be empty bool nameIsEmpty = string.IsNullOrWhiteSpace(name); foreach (string s in GetListOfStrings()) { string messageAddition = ""; if (!nameIsEmpty) { messageAddition = " (Name is: " + name + ")"; } Console.WriteLine(s + messageAddition); // more code which uses the computed value.. // otherwise the condition can be moved out the loop } I find an extra if statement easier to rea

Categories : C#

Qt 4 On Ubuntu 13.04
apt-cache search libqt4 That should give you a list of all the packages needed to get the Qt 4 libs. Should include: libqt4-dev libqt4-core libqt4-gui ...etc

Categories : Ubuntu

ubuntu 13.04 and g++
For Ubuntu, the easiest way to get all the build tools including g++ is to sudo apt-get install build-essential I suggest you check AskUbuntu for more info.

Categories : Linux

Ubuntu libdispatch
It sounds like you are missing the library from your link line. When you compile your program into an executable, add the library to the command. I am guessing it should look something like this: clang x.c y.c z.c -ldispatch

Categories : C

how to use my own library c++ ubuntu
You might copy the library to /usr/local/lib and the linker should pick it up if you add it to the project. In my CMakeLists.txt I have: function(import_library target name) find_library(${target}_import_${name} ${name}) add_library(${${target}_import_${name}} SHARED IMPORTED) target_link_libraries(${target} ${name}) endfunction() function(project_import_library name) import_library(Project ${project}) endfunction( project_import_library(dependency) Replace Project/project and dependency by your names.

Categories : C++

How to upgrade PHP-FPM to PHP 5.5 on Ubuntu?
If you're willing to give up packages and build from source, you can have whatever version of PHP you want. Here're my notes for building PHP 5.5.0. https://github.com/triplepoint/web_development_vm_how_to/blob/master/docs/php_nginx_vm.md#install-php Be aware, it's a serious tradeoff of convenience to go this route. In the long run, I can't say I'd recommend building from source for anything other than a testing environment, but if you're just trying to test out the new features of 5.5, or if you're running a small server and don't mind maintaining it by hand, source is an option.

Categories : PHP

Trying to use LuaFileSystem on Ubuntu 10.04
The io.open call can be easily debugged by adding assert around it. This will print the error message when io.open fails to open the file: local f = assert(io.open('/home/alex/Desktop/SPLAY WORK/splay_client_commands_1.4/test1.txt', "r")) This "trick" is also described at: http://www.lua.org/pil/21.2.html

Categories : Lua

How to use SVN 1.8 with Eclipse under Ubuntu?
LET THERE BE LIGHT! Download the CollabNetSubversion-client rpm in the correct architecture (registration required). Install rpm sudo apt-get install rpm Install svn client without deps: sudo rpm -ivh --nodeps CollabNetSubversion-client-1.8.0-2. x86_64.rpm Find collabnet installation `sudo updatedb then locate *collabnet* (or use find or whatever you like), should be /opt/CollabNet_Subversion/bin/collabnetsvn-config Get the lib path, should be /opt/CollabNet_Subversion/lib Open your eclipse.ini Enter the lib path-Djava.library.path=/opt/CollabNet_Subversion/lib under the vmargs line. Install the SVN Plugin Subclipse (this does not seem to work with Subversive) Choose JavHL (JNI) 1.8.0 as your SVN interface CHECK THE #&%$§# PROJECTS OUT AND COMMIT THE $%&#§ OUT OF THEM!

Categories : Eclipse

Can't get php 5.4 on Ubuntu 10.04 lts plesk 10
Plesk don't comes with php on Ubuntu. Plesk installs PHP from available repositories registered in apt. So, you should find out how to upgrade PHP on ubuntu and that's all. As I know plesk don't have any restrictions if current PHP version will be upgraded. Just one of guides from Google: http://serverfault.com/questions/420286/how-do-i-upgrade-from-php-5-3-to-php-5-4-6-in-ubuntu

Categories : PHP

cannot find -lGL on Ubuntu 13.10
I can install any of the mentioned packages Do you mean you can't install any of the mentioned packages? Why not? Anyhow. You need two things here: figuring out what's the file name you're looking for figuring out how to locate the package containing that file name Given that you're looking for a shared library, and you're passing -lGL to the linker, then the file name you're looking for is libGL.so. Now, there are two strategies for figuring out which Ubuntu package contains what: Using apt-file: install it: apt-get install apt-file search for the file apt-file search libGL.so Using the online package search: point your browser to http://packages.ubuntu.com/ scroll to the "Search the contents of packages" section put libGL.so in the search field, and select your version (s

Categories : Linux

Maven in Ubuntu 10.4 -
Maven is trying to download a plugin it needs to to do project cleanup from http://repo1.maven.org/. Do you need to use a proxy to connect to the internet? If so, see this guide: http://maven.apache.org/guides/mini/guide-proxies.html If not, it might be that the network somewhere between your workstation and repo1.maven.org was having problems, which might be resolved now.

Categories : Maven

How to fix Nokogiri on Ubuntu?
Ran across your question researching an issue of my own. It looks like, for a time, the nokogiri team was overriding the system install of libxml at gem install time as indicated in this comment: https://github.com/sparklemotion/nokogiri/issues/829#issuecomment-16877522. Not sure if that helps you, but it seems relevant. Perhaps a new version of Nokogiri is in order.

Categories : Ruby

How to let vim behave on Mac OS X as on Ubuntu?
Terminal.app does not support the mouse. If you want the mouse you can to install iTerm2 which does support the mouse. In iTerm2: go to Preferences -> Profiles -> (current profile) -> Terminal and Make sure Enable xterm mouse reporting. After you select this you might need to restart iTerm2. To enable mouse support in vim add the following to your vimrc set mouse=a

Categories : Ubuntu

How do I remove Xen from Ubuntu?
You can just try sudo apt-get remove xen-hypervisor-amd64 or dpkg -i xen-hypervisor-amd64 to see which xen files have been installed in your machine

Categories : Linux

Cannot install qrscanner gem on ubuntu
read the documentation of the gem at https://github.com/andys/qrscanner and install these dependencies before you install the gem. Dependencies ------------ * Python (for ZXing build script) * ImageMagick: libMagick++, libMagickWand, libMagickCore * gcc, g++, libstd++ * Operating system with a PREFIX of "/usr".

Categories : Ruby

segmentation-error in ubuntu gcc
gets() is dereferencing an unitialized pointer, causing undefined behaviour. Allocate memory for ch and don't use gets() as there is no way to limit the number of characters read, meaning potentially writing beyond the bounds of the destination array. Example using fgets(): char ch[128]; if (fgets(ch, 128, stdin)) { }

Categories : C

ReviewBoard installation on ubuntu 12.04
I got the exact same error trying to upgrade reviewboard. It seems distribute and setuptools are clashing. I fixed it by simply removing the distribute egg like this: $ sudo rm -r /usr/local/lib/python2.7/dist-packages/distribute*

Categories : Python

MySQL Won't Install on Ubuntu 11.04
this question was having the same issue it solved by uninstalling but before that he tried to set the password that is the question and then he tried to solve it in chat maybe when you try to set a password it will be solved , just try Update: Type the following commands in your terminal in order to make a complete remove for mysql. sudo apt-get remove --purge mysql-server mysql-client mysql-common sudo apt-get autoremove sudo apt-get autoclean Also you need to remove the /var/lib/mysql folder if exist by typing the following command sudo rm -rf /var/lib/mysql Then follow the official ubuntu documentation to install. and don't forget to set your mysql password during installation. Also see this question its similar to the error you have got during the installation process.

Categories : Mysql

Ubuntu htaccess issue
Do you have this line in your Apache config file (/etc/apache2/sites-available/default by default)? AllowOverride None If so, change it to include the features you need in your .htaccess file (see the AllowOverride documentation). AllowOverride AuthConfig FileInfo ... There may also be problems with your .htaccess files. For example, you have: <IfModule mod_rewrite.c> Is mod_rewrite actually enabled? If not, you'll need to do that. You said you also tried: Redirect /index.html mynewwebsite.com/foldername This will only do anything if you actually go to /index.html in a browser.

Categories : Apache

Can't get Eclipse to work on Ubuntu
Looks like the Java classes were compiled with a different JDK version than what you're using to run them. Try to install JDK 1.5 and then in the Eclipse project settings, change to use that version.

Categories : Eclipse

No PHP processing (Ubuntu/Apache2)
Somewhere in you httpd.conf file there should be an instruction to pass php files to mod_php. For example: <FilesMatch .php$> SetHandler application/x-httpd-php </FilesMatch>

Categories : PHP

Is it possible to use systemtap 1.7/2.1 on Ubuntu 12.04 with 3.5.0/3.8.0 kernels?
You may need to update your version of systemtap, as a very old one (e.g. 1.7 is from early 2012) will often not work with a very new kernel (but vice versa is fine). OTOH, the original build-id error is a real version-mismatch problem within the ubuntu -dbgsym repositories. You need to ensure that your running-kernel version exactly matches the dbgsym one. With Ubuntu this can be tricky, because "uname -r" and the dpkg names do not contain a uniquely identify the build. See the difference between: #55-Ubuntu SMP Thu Jun 6 20:18:19 UTC 2013 and #55~precise1-Ubuntu SMP Fri Jun 7 16:25:50 UTC 2013 Why do you need kernel debug symbols for userspace probes though? Please include your stap script and stap-report output. Try also the stap-prep script. Another complicating factor is

Categories : Ubuntu

How to install GIT Client in Ubuntu 10.10?
One option is to download and install it from the source code. This way you'll ge the latest upstream version with the latest features: $ wget https://git-core.googlecode.com/files/git-1.8.3.1.tar.gz $ tar xvfz git-1.8.3.1.tar.gz $ cd git-1.8.3.1 $ make $ make install This will install the git binaries on your ~/bin/ directory. For other installation options, see the INSTALL file on the source directory root.

Categories : GIT

Setup ACL on Ubuntu 12.04 with Chef
Found a way to do it with Augeas: # Install ACL and remount the root volume with ACL enabled case node[:platform] when "debian","ubuntu" %w{acl augeas-tools}.each do |pkg| package pkg end execute "update_fstab" do command <<-EOF echo 'ins opt after /files/etc/fstab/*[file="/"]/opt[last()] set /files/etc/fstab/*[file="/"]/opt[last()] acl save' | augtool mount -o remount / EOF not_if "augtool match '/files/etc/fstab/*[file="/"]/opt' | grep acl" end end I don't really like the solution, but it seems to work. There's got to be a better way though, right?

Categories : Ubuntu

Eclipse C++ plugin on ubuntu 13.04
Uninstall everything Download Eclipse CDT x86 or Eclipse CDT x64 Extract to /usr/lib/eclipse Link /usr/bin/eclipse to /usr/lib/eclipse/eclipse You should now be able to select the C++ perspective and create C++ projects Alternatively: Uninstall everything Download Eclipse Standard x86 or Eclipse Standard x64 Extract to /usr/lib/eclipse Link /usr/bin/eclipse to /usr/lib/eclipse/eclipse Open Eclipse Help > Install New Software Add the CDT Repository: http://download.eclipse.org/tools/cdt/releases/kepler Select CDT and install it

Categories : C++

How to get started with Bluetooth for Ubuntu
I can only guess that you have an old version of the kernel, or one of the required libraries. Try updating your linux installation (e.g. to a 3.5.x kernel or thereabouts). I had no problem completing the steps you took. If you are looking for example programs, you can always look at the simpler tools. On my ubuntu box I'd do e.g. sudo apt-get build-dep bluez-tools apt-get source --compile bluez-tools which gets all build dependencies, sources and builds the bluez-tools package on your system.

Categories : Linux

Installing wxPython in Ubuntu 12.10
You need to install wxPython Phoenix, not 2.8. The 2.8 series and the 2.9 Classic series are only Python 2.x compatible. You'll have to grab a Phoenix snapshot to build against as it is the only version that is Python 3 compatible. You can get one here: http://wxpython.org/Phoenix/snapshot-builds/ Note that Phoenix is very beta in that it only supports the core widgets currently. Most of the custom widgets, like those in wx.lib, are still being ported. See http://wiki.wxpython.org/ProjectPhoenix for more information.

Categories : Python

Ubuntu libdispatch what to include
The solution was to run apt-get install libdispatch-dev instead of libdispatch0, which does not include header files, man pages and basically anything you would want if you want to make programs that use GCD. Apparently libdispatch0 is for people who want Ubuntu to use GCD internally.

Categories : C

How to install OGRE SDK in Ubuntu 13.04?
Have a look at the Quick Start Guide. The source code download page is currently pointing at OGRE 1.8.1 Source for Linux / OSX. Don't forget to read through the Prerequisites!

Categories : Ubuntu



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