w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
What could cause Magento to change new address back to default address on Paypal redirect?
I had a similar bug and maybe its the same with you. If you select an address as your default address in the address book it screws up the one page checkout. Say I have 3 people in my address book: John, Suzy and Bill. One day I happen to be in my address book and I select John as my default billing and shipping address. Then I go to my cart, order some items, select John as billing, and select ship to a different address. On the next step I select Suzy as my ship to address. I click next to go to the shipping method step, but whoa, wait! Suzy's address has been overwritten and replaced with Johns address. Its exactly the same issue posted about here (although I dont think the guy understands what happened, but the screenshots are the same result): http://www.magentocommerce.com/boards/

Categories : Magento

Need to find IP address of network interface on Ubuntu with PHP
$_SERVER['REMOTE_ADDR']; should do the trick. And if that doesn't work you could always mess around with shell_exec($command);. But keep in mind that you need set your php file rights to be able to execute.

Categories : PHP

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

Is it possible to address localhost from linux ubuntu to a virtualbox virtual machine
In the default network configuration (NAT) for VirtualBox you can accesss the host machine with the IP, so in the browser you would use that instead of localhost. (I can't find this in the official documentation though?)

Categories : Linux

Any way to replace a DNS Server address in my /etc/resolv.conf using python in Ubuntu 12.04?
For this sort of editing task sed is often your best friend. To accomplish your example, the following would work: sed -i ' s/ s/ ' /etc/resolv.conf This uses the search-and-replace operator, s//. The -i flag causes sed to modify the file in place, rather than printing the modified version on stdout. Note that I am escaping the periods (.) in the match expression because in regular expressions, which sed uses for it's match syntax, the . character is a wildcard. However, if you're simply switching between two different configurations, just replacing the file is probably the simplest solution: cp /etc/resolv.conf.config1 /etc/resolv.conf

Categories : Python

How to check if address is contained in a continent or close to another address in android google maps api v2?
For the start I assume you are familiar with the GeoCoder and / or GeoCoding API to get the addresses for your locations. If you use the GeoCoder you will get a List of Address objects. The Address class provides some methodes to get the country or city name f.e. These methods you can use for your filter. The Location class includes the methods distanceBetween() and distanceTo(). These you can use to check the distance between your locations.

Categories : Android

How to succinctly link files in Ubuntu where the library files have long address
You can define environment variables and use those during compilation. For example, say: INCDIR=/home/me/dir1/dir2 LIBDIR=/home/me/dir1/dir2/lib and execute gfortran by saying: gfortran myprog.f90 -I${INCDIR} -L${LIBDIR}

Categories : Ubuntu

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

how to change gcc compiler to c++11 on ubuntu
gcc 4.6.3 supports many c++11 features. However, they are disabled by default. To enable them, use the following flag: g++ -std=c++0x ... This flag also disables GNU extensions; to keep them enabled, use -std=gnu++0x flag.

Categories : C++

Change .emacs directory in Ubuntu
This works for OSX, so perhaps for you too . . . just change the paths to whatever suits your needs. The user-emacs-directory is where you would set the equivalent of .emacs.d. I have everything related to Emacs in my user-emacs-directory. If you use package manager, the elpa directory would be automatically crated there also. (setq default-directory "~/.0.data/") (setq user-emacs-directory "~/.0.data/.0.emacs/") (setq diary-file "~/emacs/diary")

Categories : Emacs

change background color in zsh (ubuntu 12.04)
Changing the background color should dependent on your terminal emulator. This answers some questions using setterm: Change the background color in Gnome terminal through a command? Another link for xterm: xterm: how to change the background color?

Categories : Shell

How to change url in address bar?
You can use the history manipulation api: //Change address to http://www.test.com/page.php: history.pushState('', '', 'http://www.test.com/page.php'); See How to do awesome refreshless page changes like GitHub or https://github.com/blog/760-the-tree-slider

Categories : Ruby On Rails

change ip address for docker
from https://github.com/dotcloud/docker/issues/866#issuecomment-19218300: You could try to reset all the networking/iptables: pkill docker iptables -t nat -F ifconfig docker0 down brctl delbr docker0 docker -d It will force docker to recreate the bridge and reinit all the network rules.

Categories : Linux

Change IP address in ruby
You can connect through a proxy, and if you have a list of proxy addresses then you can tell ruby to change proxy every x minutes, this will result in a change of the IP that the website thinks you have. Here's a code to scrape google search results through a proxy, to use a proxy list just extend the code a bit. require 'rubygems' require 'mechanize' agent = Mechanize.new agent.set_proxy '', 8080 page = agent.get('http://www.google.com/') google_form = page.form('f') google_form.q = 'new york city council' page = agent.submit(google_form, google_form.buttons.first) page.links.each do |link| if link.href.to_s =~/url.q/ str=link.href.to_s strList=str.split(%r{=|&}) url=strList[1] puts url end end

Categories : Ruby

static address with gdb. change without gdb
By default gdb disable address space randomization (ASLR). To see randomization state in gdb: (gdb) show disable-randomization To enable it in gdb: (gdb) set disable-randomization To disable address randomization for your processes: sudo sysctl -w kernel.randomize_va_space=0 To disable address randomization for a specific program: setarch `uname -m` -R program [program_arguments]

Categories : C

Primefaces how to change URL address
Use normal links or buttons instead of command links or buttons. E.g. <p:button value="Go to button1 page" outcome="button1" /> It'll open button1.xhtml and point to /myApp/button1.xhtml. To get rid of the file extension, consider PrettyFaces or FacesViews. See also: When should I use h:outputLink instead of h:commandLink? How to make URL reflect the current page (and not the previous one)

Categories : JSF

Change c# WebReference url address
Create a CustomSoapHttpClientProtocol: public class CustomSoapHttpClientProtocol : SoapHttpClientProtocol { public string SoapActionUrl { get; private set; } public CustomSoapHttpClientProtocol(string soapActionUrl) { this.SoapActionUrl = soapActionUrl; } protected override WebResponse GetWebResponse(WebRequest request) { const string soapAction = "SOAPAction"; if (request.Headers.Count > 0 && request.Headers.AllKeys.Contains(soapAction)) { request.Headers[soapAction] = SoapActionUrl; } WebResponse response = base.GetWebResponse(request); return response; } Then in your proxy class replace SoapHttpClientProtocol with your CustomSoapHttpClientProtocol.

Categories : C#

vsphere api to change ip address of VirtualMachine
VMware API don’t have a setting to set IP address on virtual machine guest OS, because the IP address setting depends on version guest OS. You could use two ways to do it: 1) You could use GuestOperationsManager from VMware vSphere API to launch the script of IP address setting on guest OS. Prerequisites: You should write scripts of IP address setting for each supported OS (Linux, Windows, etc.) VMware Tools must be installed on each supported VM (for use GuestOperationsManager). Update2. The following simplified example of running a script on the guest OS. This example does not include error handling, getting logs of the script, VM power on, etc. using System; using System.IO; using System.Net; using Vim25Api; namespace RunScriptOnGuestOsTest { class Program { st

Categories : C#

How can I change the service reference address?
Take a look at web.config transforms. http://msdn.microsoft.com/en-us/vs2010trainingcourse_webdevelopment_topic4.aspx

Categories : Visual Studio

How to change ?
actually,the file "HelloWorld.wsdl" which you edit is just use to show the information.it can not effect anyother things of you project,you should edit by you code.like endpoint.publish("..."); see if this help

Categories : Java

How can I change the class of an
  • when I click on an address inside that
  • This should work: <li class="{{a==1 && 'current'}}"><a href ng:click="a=1">A1</a></li> <li class="{{a==2 && 'current'}}"><a href ng:click="a=2">A2</a></li> <li class="{{a==3 && 'current'}}"><a href ng:click="a=3">A3</a></li>

    Categories : Angularjs

    Sqlalchemy change decimal IP address to dotted
    Get the decimal value from DB and do the conversion in Python code. Install IPy module and do the following: from IPy import IP ip_dotted = str(IP(ip_dec)) If you were using Python 3.3, there's ipaddress in stdlib: from ipaddress import ip_address ip_dotted = str(ip_address(ip_dec)) If RDBMS in use is PostgreSQL, conversion can be done at DB level: from sqlalchemy.sql import cast, func from sqlalchemy.dialects.postgresql import INET session.query(func.host(cast('', INET) + SomeTable.ip_dec)).scalar() Finally, you can do calculations yourself, so there won't be any dependencies on specific libraries, Python versions or RDBMS: segments = [] # From 3 to 0. for n in range(3, -1, -1): p = 256 ** n segments.append(str(ip_dec // p)) ip_dec %= p ip_dotted = '.'.join(s

    Categories : SQL

    Can I change the server address when committing using TortoiseSVN?
    You need to perform a relocate to point your WC at the correct server URL. For TortoiseSVN For the command-line But this will only work if your server at home is accessible from outside your home network.

    Categories : Svn

    why image address must change when controller changed?
    Use Url.Content to get the relative path: @Url.Content("~/files/mypic.bmp") The issue is that, when you use relative paths like those listed in the OP, the browser interprets them as relative to the current URL. Hence, they resolve to different places depending on whether the current URL is home or homeserver.

    Categories : Asp Net Mvc

    Magento change email address of form
    It should still be in that file, it will just be function serviceAction() inside of IndexController.php. If it's not there, see if there is a corresponding IndexController.php somewhere inside of the app/code/local directory. Often the forms pull from an email address set in the System configuration under Contacts. EDIT The line you're looking to change is Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT), That address is pulled from the system configuration. You can hardcode the email address, or set it to another configured email address.

    Categories : PHP

    install android sdk on ubuntu
    Download Android SDK for Linux from Here Extract the folder. Now navigate to eclipse folder and run eclipse from there. android sdk is already integrated in this eclipse package and you will also get the latest SDK with this package. UPDATE: Directory path for QT Android SDK Location: /home/vipul/dev/android-sdk-linux Android SDK Location: /home/vipul/dev/android-ndk-r8e JDK Location: /usr/lib/jvm/java-6-openjdk-i386

    Categories : Android

    How can I programmatically change the IP address of an Azure Cloud Service or VM?
    You cannot programmatically change a deployment's IP address, aside from shutting down the deployment (which releases the IP address) and then re-starting it (and that you can do programmatically, or through PowerShell). Also note that if you have several Virtual Machines in the same deployment, each VM will share the same public IP address. Note that with Virtual Machines (vs. web/worker role cloud services), if you have a single Virtual Machine, you can stop the VM, then restart it, and you'll get a new IP address (ok, actually, there's no guarantee you'll get a different IP address, so more accurately you'll be assigned an IP address) while retaining the state of your VM. Shutdown and startup are not an instantaneous operatios however, and it's not going to provide you a per-minute IP

    Categories : Azure

    How to Change the IP Address List Order returned by gethostbyname?
    I have seen something similar. This doesn't totally answer your question, but this is what I have. remoteHost = gethostbyname(ac); int i = 0; if (remoteHost->h_addrtype == AF_INET) { //while (remoteHost->h_addr_list[i] != 0) //{ // addr.s_addr = *(u_long *) remoteHost->h_addr_list[i++]; //} addr.s_addr = *(u_long *) remoteHost->h_addr_list[0]; } I've commented out the while loop. That part just keeps looping over the list of adapters, eventually stopping on the last one (which in our case, is the VMware adapters). Using the h_addr_list[0] gives my physical adapter. However, I'm not sure how the order is actually determined, or how I can tell which is physical, and which is virtual. Hope that helps a little.

    Categories : Windows

    How to change font size of address bar in Chrome programmatically
    Generally, the font size of the address bar is determined by your OS's default font size. Read comments here: https://code.google.com/p/chromium/issues/detail?id=46472. So if you want to adjust it, change your OS default. If you build your own version of Chrome, you can change the look and feel of the browser, but you'll have to write different code for each platform you want to support. If you don't want to build your own version of Chrome, then on Windows, you can inject yourself into the Chrome process with SetWindowsHook or SetWindowsHookEx, find the window handle corresponding to the address bar, and then do anything you want to it. Similar idea on OSX. Not sure about Linux. This isn't a recommended approach; it's invasive and subject to breakage. As far as a Chrome API for an exte

    Categories : Google Chrome

    Program to check and change IP address ranges and not allow overlap
    Take a look at the Net::IP module on cpan, it has a procedural interface that enables you to specify ip ranges and determine whether they overlap. Ideally you would use its object implementation, but then you will need to know what object oriented programming is and how to do it in perl. Then that module will enable you to create subnet objects and determine whether any subnet objects have overlapping ranges.

    Categories : PHP

    Can't get MailChimp API listUpdateMember to change a user's email address
    It turns out the answer is very simple. https://twitter.com/MailChimp_API/status/351674145609748480 Apparently NEW-EMAIL isn't needed at all in the merge_vars - just EMAIL. So the working code in my case is: $member_details = array( // grabbed from config and working (also API key handled by bundle) 'id' => $id, // passed from function - corresponds to the old email address 'email_address' => $mailchimp_old_email, 'merge_vars' => array( // new email address 'EMAIL' => $mailchimp_new_email, ), 'replace_interests' => FALSE, ); $response = Mailchimp::listUpdateMember($member_details); This works straight out. Feels like "NEW-EMAIL" really isn't necessary (or EMAIL should be removed and just use "NEW-EMAIL" as it's

    Categories : PHP

    When receiving email's I only get my email address as "sent from." although it was sent from another email address. What should I add or change?
    Have a look at php:mail manual in the example#3 you can see, <?php mail('nobody@example.com', 'the subject', 'the message', null,'-fwebmaster@example.com'); ?> You can see The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path.

    Categories : PHP

    Can I connect any android device with ubuntu?
    Under linux no driver is needed for adb connectivity. Although a little setup is required to change the adb device file permissions to make it accessible by non-root users. Personally I use this universal udev rule which works for all android devices regardless of the manufacturer: ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:ff420?:*", MODE="0666" Also for some noname devices you might need to add their VendorID to the ~/.android/adb_usb.ini. Just run the following commands with the device plugged in: find -L /sys/bus/usb/devices -maxdepth 2 -path "*/modalias" -printf "%h " -exec cat {} ; | awk -F: '/icFFisc42ip01/ {print $1}' | xargs -i cat {}/idVendor | awk '{print" 0x"$1}' >>~/.android/adb_usb.ini grep ^0x ~/.android/adb_usb.ini | so

    Categories : Android

    [Help]How to Initializing android Environment in Ubuntu 10.04
    You just have to do this if your home directory is on NFS or some other non-local filesystem. "By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well." If this isn't the case just skipt this step.

    Categories : Android

    ubuntu (or Glovebox) like sidebar in android
    There is the ActionBar which can contain custom items with custom icons. though its meant to be on top (expanding on bottom too), and not on right or left side.. ..OR.. ..you can have a look on Drawers, which you can find HERE. There are several different types of drawers, maybe the navigation-drawer suits your expectations.

    Categories : Android

    Can't show android device in ubuntu 13.04
    I added the vender ID to ~/.android/adb_usb.ini and finally found the device. Steps: First: $lsusb example result: Bus 001 Device 025: ID 18d1:0003 Google Inc. The 18d1 is the vender ID, add it to ~/.android/adb_usb.ini by Second: echo 0x18d1 >> ~/.android/adb_usb.ini Third: $sudo adb kill-server $sudo adb start-server $adb devices

    Categories : Android

    How to change the default from address of email send by Linux root
    You should be able to use the -f flag of the sendmail command to specify the envelope from address, and you should me able to specify the meesage from address in headers of the message itself. For example: /usr/sbin/sendmail -f from@from.com to@to.com < message.txt

    Categories : Linux

    How to set text formatted in Android Studio in ubuntu
    Hey Now I have your answer. You need to change Ubuntu key shortcuts for Lock Screen For this. Go to System Tools -> System Settings -> Keyboard -> Shortcuts Tab -> System -> Lock Screen Select the row New Accelerator... will be visible then press any Special key with Alpha key (like Shift + L). You changed the key shortcuts. Now check format key in Studio.

    Categories : Android

    Android SDK not installing components on linux (ubuntu)
    is there a way to launch the sdk as superuser via command-line? sudo .../tools/android where ... is the path to your Android SDK installation. In your case, from the error message, this would appear to expand to: sudo /opt/android-studio/sdk/tools/android

    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

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