Search Results

Search found 47660 results on 1907 pages for 'name resolution'.

Page 130/1907 | < Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >

  • Can you change the name of a flash drive on the boot menu?

    - by Mark Kramer
    I have two Staples brand Flash Drives. They work fine and they boot okay, but they have the same name on the boot menu, so when I have them both in the computer, I can't tell which one is the one I want to boot into. One has Ubuntu on it, the other BackTrack 5. However, the name of those drives show up different on different BIOS. What parameters affect what name shows up for a boot device and how

    Read the article

  • How to save POST&GET headers of a web page with "Wireshark"?

    - by brilliant
    Hello everybody, I've been trying to find a python code that would log in to my mail box on yahoo.com from "Google App Engine". I was given this code: import urllib, urllib2, cookielib url = "https://login.yahoo.com/config/login?" form_data = {'login' : 'my-login-here', 'passwd' : 'my-password-here'} jar = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(jar)) form_data = urllib.urlencode(form_data) # data returned from this pages contains redirection resp = opener.open(url, form_data) # yahoo redirects to http://my.yahoo.com, so lets go there instead resp = opener.open('http://mail.yahoo.com') print resp.read() The author of this script looked into HTML script of yahoo log-in form and came up with this script. That log-in form contains two fields, one for users' Yahoo! ID and another one is for users' password. However, when I tried this code out (substituting mu real Yahoo login for 'my-login-here' and my real password for 'my-password-here'), it just return the log-in form back to me, which means that something didn't work right. Another supporter suggested that I should send an MD5 hash of my password, rather than a plain password. He also noted that in that log-in form there are a lot other hidden fields besides login and password fields (he called them "CSRF protections") that I would also have to deal with: <input type="hidden" name=".tries" value="1"> <input type="hidden" name=".src" value="ym"> <input type="hidden" name=".md5" value=""> <input type="hidden" name=".hash" value=""> <input type="hidden" name=".js" value=""> <input type="hidden" name=".last" value=""> <input type="hidden" name="promo" value=""> <input type="hidden" name=".intl" value="us"> <input type="hidden" name=".bypass" value=""> <input type="hidden" name=".partner" value=""> <input type="hidden" name=".u" value="bd5tdpd5rf2pg"> <input type="hidden" name=".v" value="0"> <input type="hidden" name=".challenge" value="5qUiIPGVFzRZ2BHhvtdGXoehfiOj"> <input type="hidden" name=".yplus" value=""> <input type="hidden" name=".emailCode" value=""> <input type="hidden" name="pkg" value=""> <input type="hidden" name="stepid" value=""> <input type="hidden" name=".ev" value=""> <input type="hidden" name="hasMsgr" value="0"> <input type="hidden" name=".chkP" value="Y"> <input type="hidden" name=".done" value="http://mail.yahoo.com"> He said that I should do the following: Simulate normal login and save login page that I get; Save POST&GET headers with "Wireshark"; Compare login page with those headers and see what fields I need to include with my request; I really don't know how to carry out the first two of these three steps. I have just downloaded "Wireshark" and have tried capturing some packets there. However, I don't know how to "simulate normal login and save the login page". Also, I don't how to save POST$GET headers with "Wireshark". Can anyone, please, guide me through these two steps in "Wireshark"? Or at least tell me what I should start with. Thank You.

    Read the article

  • Can an LDAP query on AD provide the netbios domain name for a single account when using the Global Catalog?

    - by Kirk Liemohn
    I am using ADSI Edit to look at LDAP properties of a single user account in AD. I see properties such as userPrincipalName, but I do not see one for the fully qualified domain name (FQDN) or the netbios domain name. We will be setting up the Global Catalog (GC) to give us LDAP access to multiple domains and through configuration in an application we map LDAP properties to user profile properties within the application. With typical AD the FQDN and netbios domain name are the same for all users, but with the GC involved we need this additional information. We really only need the netbios domain name (the FQDN is not good enough). Maybe there is a LDAP query that can be done to request this information from a more top-level object in AD?

    Read the article

  • SMTP host name vs. domain in "From:" address vis-a-vis Email Deliverability

    - by Jared Duncan
    I'm trying to implement (or make sure that I'm correctly following) email sending best practices to improve deliverability, but the role of the smtp server's host name vs the domain name of the From: email address seems to be unclear, even after reading dozens of people's articles/input. Specifically, I understand that to satisfy the reverse DNS check, there must be a PTR record for the IP address of the sending machine that yields a domain name that matches the host name of the sending machine / SMTP server. Some say it needs to match the one given by the "hostname" command, most say it's the one provided with the HELO / EHLO statement, and this guy even says they MUST be the same (according to / enforced by what, I don't know; that's only a minor point of confusion, anyhow). First, what I can't find anywhere is whether or not the domain name of the From: email address needs to match the domain name of the SMTP server. So in my case, I have a VPS with linode. It primarily hosts a particular domain of mine, example.com, but I also sometimes do work on other projects: foo.com and bar.com. So what I'm wondering is if I can just leave the default linode PTR record (which resolves to abc.def.linode.com), make sure that abc.def.linode.com is what my mail server (qmail) is configured to say at HELO, and then proceed to use it to send out emails for example.com, foo.com, et al. If so, then I am confused by the advice given here, specifically (in a listing of bad case scenarios): No SPF record for the domain being used in the HELO command Why would THAT domain need an SPF record? And if it does, which domain should it provide whitelisting for: the HELO domain, or the domain of the From: email address (envelope sender)? Also, which domain would need to accept mail sent to [email protected]? If the domains must be the same, that would seem rather limiting to me, because then for every domain you wanted to send email from, you'd have to get another IP address for it. It would also compromise or ruin one's ability to do non-email sending things (e.g. wget) relatively anonymously. However, the upside--if this is the case--is that it would make for a far less confusing setup. I'm currently using the linode.com SMTP+PTR domain and example.com From: address combination without much of any deliverability issue, but my volume is very low and I'd like to know if someone out there has experience with larger volumes and has specifically tested the difference and/or has inside knowledge and/or has an authoritative answer (and source) for this particular question. I'm happy to clarify anything, let me know. Thanks in advance.

    Read the article

  • 1000 HZ linux kernel necessary if I have tickless and high resolution timer?

    - by Bob
    I am trying to improve performance on my server. I have a few processes that need low jitter (less than 10ms variance). I have a load average of 4 maximum on an i7-920 (4 physical cores, 8 with HT). There are about 10 processes ranging from 40% to 90% of a core user mode. System usage is 3% total. Total CPU usage is 80% max. Will setting the kernel from 100hz to 1000hz improve the jitter if tickless and high resolution timers are already set? This page seems to indicate it still does something. https://lkml.org/lkml/2009/4/28/401 How about changing from voluntary (PREEMPT_VOLUNTARY) to preemptible (PREEMPT)?

    Read the article

  • How can I make my monitor run at it's native resolution under Kubuntu 9.10?

    - by Adam Matan
    Hi, I have installed Kubuntu 9.10 afresh on an HP desktop computer with a Samsung SyncMaster 2243 and Intel integrated graphics card. The screen resolution is fixed on 1280x1024 instead of the native 1680x1050, which makes my eyes bleed. $ lspci -k |grep "VGA" -A2 00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10) Kernel driver in use: i915 Kernel modules: i915 and my xorg.conf: /etc/X11$ cat xorg.conf Section "Device" Identifier "Configured Video Device" Driver "vesa" EndSection Section "Monitor" Identifier "Configured Monitor" EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" EndSection Any ideas how to make this driver work? I found no working solutions on Google searches. Thanks, Adam

    Read the article

  • How to update Sharepoint 2010 user profile for user whose account name has changed in AD?

    - by Daniel Root
    We have an issue with User Profile Sync in SharePoint 2010 when the following happens: A new user is added to AD (ie DOMAIN\jdoh) The user is synched successfully to SharePoint Time passes The user's account name is changed in AD (ie because it was originally misspelled: DOMAIN\jdoe) The user is re-synced to SharePoint The behavior appears to be that the account name is not changed. In the above example, accountname will continue to be DOMAIN\jdoh in SharePoint, though other properties are synced correctly- I would assume by SID. This means that the users' my profile and mysite links still refer to the 'old' name (ie Person.aspx?accountname=Domain\jdoh). What steps should be taken to fix this in SharePoint when an account name is changed in AD?

    Read the article

  • Multiple "My Documents" folders?

    - by Flasimbufasa
    I am having the issue, where, I have 2 folders called "My Documents". I recently edited my registry to make "Document" link in the Windows 7 start menu be a FOLDER link and not a LIBRARY link.. Here is the Registry Key information for the Documents key: Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7b0db17d-9cd2-4a93-9733-46cc89022e7c} Class Name: <NO CLASS> Last Write Time: 3/2/2011 - 2:33 AM Value 0 Name: Attributes Type: REG_DWORD Data: 0x1 Value 1 Name: Category Type: REG_DWORD Data: 0x4 Value 2 Name: Icon Type: REG_EXPAND_SZ Data: %SystemRoot%\system32\imageres.dll,-1002 Value 3 Name: LocalizedName Type: REG_EXPAND_SZ Data: @%SystemRoot%\system32\shell32.dll,-34575 Value 4 Name: Name Type: REG_SZ Data: Documents Value 5 Name: PublishExpandPath Type: REG_DWORD Data: 0x1 Value 6 Name: PrecCreate Type: REG_DWORD Data: 0x1 Value 7 Name: RelativePath Type: REG_SZ Data: Documents Value 8 Name: Roamable Type: REG_DWORD Data: 0x1 Also, Navigating through computer to "C:\Users\Flasimbufasa\" Only shows one folder called "Documents" However, whenever I navigate to user profile from "Desktop\Flasimbufasa" I get 2 Document folders. Any help?

    Read the article

  • FWBuilder DNS Object Run Time - when exactly does it resolve the DNS name?

    - by Jakobud
    In Firewall Builder, when you use the DNS Object and set it to run time, when exactly does the firewall (iptables in our case) actually resolve the DNS name? Is it whenever a call is made to that DNS name in the firewall? So the firewall would resolve the name on the fly whenever someone/something tries to access that DNS name? Or is it when you execute the fw script to load the rules into iptables? So in this case, it would resolve the DNS name that one time and then hard-code the resulting ip address into the iptable rules? From what I read, I think its #1, but it's just not 100% clear to me. We have two servers for a certain function on our network. One is the primary server and one is backup. alpha0.domain.com alpha1.domain.com In DNS we have this: alpha.domain.com -> alpha0.domain.com If the primary server goes down and we need to switch to the backup, I just change our local DNS record to point to alpha1.domain.com instead. So back to the firewall, if I just put in a Domain Object as alpha.domain.com, do I have to reload the firewall rules every time we switch to the backup alpha server and change the DNS record? Or will the firewall automatically resolve to the correct address even after the switch?

    Read the article

  • How do you hide a computer name on a network? (OS X 10.6)

    - by George
    I regularly plug my Macbook Pro into a network at work, but because of the way Mac networking works, my computer's name instantly becomes available to any other Mac on the network. Is there a way to hide my computer's name so that I do not appear on the network list of other people's computers? Also, can I set this up so as a network specific profile? For instance, I would like my computer's name to show up on my home network, but not my work network.

    Read the article

  • When did Apple stop using the name "Macintosh" in favor of "Mac", and does anyone know why?

    - by schnapple
    As of a few months ago I finally joined the ranks of Macintosh owners. Except "Macintosh" doesn't seem to exist anymore for some reason. I noticed everything was "Mac", i.e. Mac OS X, MacBook, Mac mini, Mac Pro, etc. I didn't pay a whole lot of attention, but I always thought everyone was using shorthand. I mean "MacBook" is the real name of the computer, as is "iMac", but I always thought when people said "Mac Pro" they were just shortening the real name, "Macintosh Pro". And yet now when you go to the Apple site, a search for "Macintosh" turns up several instances of the name being used on various things (system requirements for old versions of QuickTime, the occasional piece of software with "for the Macintosh" in the name) but nothing from the main Mac pages. Near as I can tell they're really no longer called "Macintoshes" they're just "Macs" When did this happen, and does anyone know why Apple ditched the term "Macintosh"?

    Read the article

  • How can i automatically move files based on their name?

    - by Pasha
    I have 13 folders containing scanned photographs. Some photographs have been renamed to the date on which they were taken, resulting in YYYY.MM.DD.tif name. It could potentially be YYYY.MM.DD (###).tif where ### is just a number. Others are just named IMG_###.tif I would like to move the files with the YYYY.MM.DD name to a YYYY\MM\DD folder structure. While the files are being moved, I would also like to append the original folder name to the end of the file name. So, a file 01\2012.06.26 (1).tif should end up 2012\06\26\2012.06.26 (1) - 01.tif Is there a Windows tool that can help me with this? Or do I need to resort to writing a custom app?

    Read the article

  • Pinging computer name in LAN results in public IP?

    - by Bob
    Hi, I recently introduced a new machine to my LAN. The computer name for this machine is 'server'. Historically I've been able to access machines from my home network (from a web browser or RDP) using the machine name and it resolves to a local IP address just fine. However, I can't seem to do this anymore. When I ping the computer name, I get the following: C:\Users\Robert>ping server Pinging server.router [67.215.65.132] with 32 bytes of data: Reply from 67.215.65.132: bytes=32 time=24ms TTL=54 Reply from 67.215.65.132: bytes=32 time=23ms TTL=54 Reply from 67.215.65.132: bytes=32 time=24ms TTL=54 Reply from 67.215.65.132: bytes=32 time=24ms TTL=54 I notice also that it appends the 'router' suffix to my domain name for some reason. 'router' is the name of my router, obviously. I'm also using OpenDNS as my DNS provider (configured through my router so it gets passed down through DHCP). Why is this not working for me? Can someone explain how the DNS resolution should take place? For LAN resolution, it shouldn't go straight to OpenDNS. I thought that each Windows machine kept it's own sort of "mini DNS server" that knows about all machines on the local network and it first tries to resolve using that. Please let me know what I can do to get this working!

    Read the article

  • How do I change the console resolution of Ubuntu 9.10 Server running on VMWare?

    - by Raam Dev
    I'm running Ubuntu 9.10 Server in VMWare Fusion (on a Mac) and I'm having trouble changing the console resolution. It seems to be stuck on 640x480. Ubuntu 9.10 uses Grub2, so there is no /etc/grub/menu.lst. I tried adding vga=791 to the kernel parameters (both during boot and by adding it to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and then running update-grub2) and neither had any effect. When using vga=791, grub says that vga=791 is depreciated and that I should use gfxpayload=1024x768x16,1024x768 instead. However, that also does absolutely nothing. I have a feeling this problem is specific to running Ubuntu 9.10 in VMWare, but Google hasn't turned up anything.

    Read the article

  • Simplest way to host a domain name just so i can forward it to a wordpress blog?

    - by Max Williams
    Hi all. I have a domain name, and a wordpress account. The domain name isn't hosted anywhere at the moment. I just want to set it up so that my wordpress blog uses the domain. According to the wordpress help page on this issue, i have to do the following: Update your domain’s name servers to the following. Make sure to remove any existing name servers that are already there. NS1.WORDPRESS.COM NS2.WORDPRESS.COM NS3.WORDPRESS.COM So, this is the only thing that i need a server for - if i even need a server at all? Is there a really simple way i can do this for free? Or for very cheap? I'm a bit ignorant about this stuff: i do rails coding but don't get involved in the really technical stuff to do with servers and dns and what have you.

    Read the article

  • Changing 127.0.0.1:81 to Internal Domain Name ?

    - by Tom
    Hi, I was wondering the steps I can take to change the localhost name to a test development domain name like "website.dev" on Win7 x64 ? Currently, when my test website builds its assigned to 127.0.0.1:81 but I want this to instead have a name like "website.dev" that is accessible on my local network ? [and sure any Virtual PCs built on this local PC] I think this is done via the hosts file but I am little unsure how to do this ? Would someone be able to assist ? Thx

    Read the article

  • How is a nameserver chosen when DNS resolution occurs?

    - by Richard
    I have a few domains hosted on nameservers at Zerigo. Zerigo have 5 nameservers and I have all 5 in the nameserver records for my domains. The nameservers are in different geographical locations (3 in the US, one in London, and one in Amsterdam). When someone goes to a domain of mine and the DNS resolution occurs, how will it choose a nameserver? Will it always go to the nearest geographical one? Will it go to the one with fewest hops? Will it just choose one at random? (This is assuming all 5 are functioning perfectly). Thanks EDIT: And does it make any difference which order I list the nameservers in on the domain name records?

    Read the article

  • What is name server of my domain, pointing to hosted site on Github Pages?

    - by nournia
    I've got one domain name and I want to set it up for my hosted site on Github Pages service. In the documentation this point is mentioned that If you are using a top-level domain like example.com, you must use an A record pointing to 204.232.175.78. But my domain registrar doesn't permit me to add a DNS Record. But only asks me to fill one table like this: Name Server (NS Record) Server Name ......... | Server IP ns53.parsihost.com | 94.232.173.52 ns2.parsihost.com | 206.223.171.254 I asked the registrar about this problem and they said to me "You must put Github's name server in those cells". So, what is the mapping from this table to DNS Records, and what is your advice for filling this kind of table?

    Read the article

  • Connecting Dell XPS 17/HP Pavilion dv7 (nvidia GT 650M) to Apple LED Cinema Display for 2560x1440 resolution from notebook

    - by alphaTrader
    Is there any way to run higher than 1080p resolution from a Dell XPS 15/17 or HP Pavilion laptop? Specifically, I am planning to buy Dell XPS L721X or HP Pavilion dv7-7005tx with nvidia GeForce GT 650M and connect it to the Apple LED Cinema display via mini Displayport (I don't think Thunderbolt is supported on these notebooks). The idea is to get 1080p on the notebook and 2560x1440 on the main display. Only one of the montitors is active at any time. I asked Dell and they weren't of much help.

    Read the article

  • What laptops can run an external 27" or 30" screen at 2560x1600 native resolution? [closed]

    - by Moin Zaman
    SU Folks, What laptops do you know off that can run a 27" or 30" external monitor as a secondary display (Extending desktop onto second screen, without switching off the laptop's own built in screen) at the screens native resolution of 2560x1600. I'm not interested docks or USB video adapters etc. Just via the laptop's built in display ports. List the port used and cable as well if possible. Reference links / posts that confirm it are an added bonus. I'm hoping people who've tried it themselves and / or confirmed it can list specific models of laptops so we can build up a good list.

    Read the article

  • nvidia ignores the resolution listed in xorg.conf, even though I have 'nvidia-settings --load-config-only' on startup

    - by ihadanny
    when my machine boots, I see a nice 1920X1080 resolution screen, but the minute I login to my user, it's reverted to an ugly 720Xwhatever. When I run nvidia-settings and select 1920X1080, it's ok again. What am I missing??? my /etc/X11/xorg.conf contains: Section "Screen" ... Option "metamodes" "nvidia-auto-select +0+0; 1920x1080 +0+0" ... EndSection I'm using unity 3.8.16 on ubuntu 11.04, and when I check on gnome-session-properties I see that I have sh -c '/usr/bin/nvidia-settings --load-config-only on my startup.

    Read the article

  • Multiboot USB (OSX only): How to customize partition name?

    - by wrk2bike
    Trying to deal with all the Mac OSX recovery disks I've got by moving them to bootable USB images. I've got a big USB drive with multiple partitions for each recovery disk, and it's easy to use Disk Utility to "restore" the recovery DVD to a partition. When I boot my target Mac while holding down the Alt key, I can see all my bootable images and they work great. Problem is, they've all got the same name: "Mac OS X Install DVD." I manage Macs of various vintages. If my target Mac needs 10.6.3 for example, my only option seems to be to try each one until I get past the "Mac OSX can't be installed on this computer" message. I originally named my partitions with the OSX revision number, but that name is replaced by the disk image name during Disk Utility restore. Is there any way to customize the name during or after Disk Utility restore? I tried making a new DVD image on disk first and renaming it, but when I restore it to my recovery partition it has the original name. EDIT: After booting to the wrong partition, and getting the "..can't be installed" message, I can open the Startup Disk menu and see the other partitions - and as I select each one, the info at the bottom indicates which OS revision is on that partition. So I know the info is in there! Just want it at the boot screen if possible.

    Read the article

  • Spring Security 3.1 xsd and jars mismatch issue

    - by kmansoor
    I'm Trying to migrate from spring framework 3.0.5 to 3.1 and spring-security 3.0.5 to 3.1 (not to mention hibernate 3.6 to 4.1). Using Apache IVY. I'm getting the following error trying to start Tomcat 7.23 within Eclipse Helios (among a host of others, however this is the last in the console): org.springframework.beans.factory.BeanDefinitionStoreException: Line 7 in XML document from ServletContext resource [/WEB-INF/focus-security.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans:beans", must match DOCTYPE root "null". org.xml.sax.SAXParseException: Document root element "beans:beans", must match DOCTYPE root "null". my security config file looks like this: <?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd"> Ivy.xml looks like this: <dependencies> <dependency org="org.hibernate" name="hibernate-core" rev="4.1.7.Final"/> <dependency org="org.hibernate" name="com.springsource.org.hibernate.validator" rev="4.2.0.Final" /> <dependency org="org.hibernate.javax.persistence" name="hibernate-jpa-2.0-api" rev="1.0.1.Final"/> <dependency org="org.hibernate" name="hibernate-entitymanager" rev="4.1.7.Final"/> <dependency org="org.hibernate" name="hibernate-validator" rev="4.3.0.Final"/> <dependency org="org.springframework" name="spring-context" rev="3.1.2.RELEASE"/> <dependency org="org.springframework" name="spring-web" rev="3.1.2.RELEASE"/> <dependency org="org.springframework" name="spring-tx" rev="3.1.2.RELEASE"/> <dependency org="org.springframework" name="spring-webmvc" rev="3.1.2.RELEASE"/> <dependency org="org.springframework" name="spring-test" rev="3.1.2.RELEASE"/> <dependency org="org.springframework.security" name="spring-security-core" rev="3.1.2.RELEASE"/> <dependency org="org.springframework.security" name="spring-security-web" rev="3.1.2.RELEASE"/> <dependency org="org.springframework.security" name="spring-security-config" rev="3.1.2.RELEASE"/> <dependency org="org.springframework.security" name="spring-security-taglibs" rev="3.1.2.RELEASE"/> <dependency org="net.sf.dozer" name="dozer" rev="5.3.2"/> <dependency org="org.apache.poi" name="poi" rev="3.8"/> <dependency org="commons-io" name="commons-io" rev="2.4"/> <dependency org="org.slf4j" name="slf4j-api" rev="1.6.6"/> <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.6"/> <dependency org="org.slf4j" name="slf4j-ext" rev="1.6.6"/> <dependency org="log4j" name="log4j" rev="1.2.17"/> <dependency org="org.testng" name="testng" rev="6.8"/> <dependency org="org.dbunit" name="dbunit" rev="2.4.8"/> <dependency org="org.easymock" name="easymock" rev="3.1"/> </dependencies> I understand (hope) this error is due to a mismatch between the declared xsd and the jars on the classpath. Any pointers will be greatly appreciated.

    Read the article

  • jQuery encoding values differently than expected for jQuery.ajax data elements

    - by Adam Tuttle
    I'm using jQuery.ajax() to make a PUT request to a REST web service, but seeing some really strange serialization behavior. (Before you say it: Yes, I know that not all browsers support PUT -- this is just an example implementation for an api/framework, and ultimately will not be called by a browser, but rather by a server-side library that does support the extra http verbs.) Here's the form: <form action="/example/api/artist" method="put" id="update"> First Name: <input type="text" name="firstname" /><br/> Last Name: <input type="text" name="lastname" /><br/> Address: <input type="text" name="address" /><br/> City: <input type="text" name="city" /><br/> State: <input type="text" name="state" /><br/> Postal Code: <input type="text" name="postalcode" /><br/> Email: <input type="text" name="email" /><br/> Phone: <input type="text" name="phone" /><br/> Fax: <input type="text" name="fax" /><br/> Password: <input type="text" name="thepassword" /><br/> <input type="hidden" name="debug" value="true" /> <input type="submit" value="Update Artist" /> <input type="reset" value="Cancel" id="updateCancel" /> </form> And the JS: $("#update").submit(function(e){ e.preventDefault(); var frm = $(this); $.ajax({ url: frm.attr('action'), data:{ firstname: $("#update input[name=firstname]").val(), lastname: $("#update input[name=lastname]").val(), address: $("#update input[name=address]").val(), city: $("#update input[name=city]").val(), state: $("#update input[name=state]").val(), postalcode: $("#update input[name=postalcode]").val(), email: $("#update input[name=email]").val(), phone: $("#update input[name=phone]").val(), fax: $("#update input[name=fax]").val(), thepassword: $("#update input[name=thepassword]").val() }, type: frm.attr('method'), dataType: "json", contentType: "application/json", success: function (data, textStatus, xhr){ console.log(data); reloadData(); }, error: function (xhr, textStatus, err){ console.log(textStatus); console.log(err); } }); }); When using FireBug, I see the request go through as this: firstname=Austin&lastname=Weber&address=25463+Main+Street%2C+Suite+C&city=Berkeley&state=CA&postalcode=94707-4513&email=austin%40life.com&phone=555-513-4318&fax=510-513-4888&thepassword=nopolyes That's not horrible, but ideally I'd rather get %20 instead of + for spaces. I tried wrapping each field value lookup in an escape: firstname: escape($("#update input[name=firstname]").val()) But that makes things worse: firstname=Austin&lastname=Weber&address=25463%2520Main%2520Street%252C%2520Suite%2520C&city=Berkeley&state=CA&postalcode=94707-4513&email=austin%40life.com&phone=555-513-4318&fax=510-513-4888&thepassword=nopolyes In this case, the value is being escaped twice; so first the space is encoded to %20, and then the % sign is escaped to %25 resulting in the %2520 for spaces, and %252C for the comma in the address field. What am I doing wrong here?

    Read the article

  • Parse an XML file

    - by karan@dotnet
    The following code shows a simple method of parsing through an XML file/string. We can get the parent name, child name, attributes etc from the XML. The namespace System.Xml would be the only additional namespace that we would be using. string myXMl = "<Employees>" + "<Employee ID='1' Name='John Mayer'" + "Address='12th Street'" + "City='New York' Zip='10004'>" + "</Employee>" + "</Employees>"; XmlDocument xDoc = new XmlDocument();xDoc.LoadXml(myXMl);XmlNodeList xNodeList = xDoc.SelectNodes("Employees/child::node()");foreach (XmlNode xNode in xNodeList){ if (xNode.Name == "Employee") { string ID = xNode.Attributes["ID"].Value; //Outputs: 1 string Name = xNode.Attributes["Name"].Value;//Outputs: John Mayer string Address = xNode.Attributes["Address"].Value;//Outputs: 12th Street string City = xNode.Attributes["City"].Value;//Outputs: New York string Zip = xNode.Attributes["Zip"].Value; //Outputs: 10004 }} Lets look at another XML: string myXMl = "<root>" + "<parent1>..some data</parent1>" + "<parent2>" + "<Child1 id='1' name='Adam'>data1</Child1>" + "<Child2 id='2' name='Stanley'>data2</Child2>" + "</parent2>" + "</root>"; XmlDocument xDoc = new XmlDocument();xDoc.LoadXml(myXMl);XmlNodeList xNodeList = xDoc.SelectNodes("root/child::node()"); //Traverse the entire XML nodes.foreach (XmlNode xNode in xNodeList) { //Looks for any particular nodes if (xNode.Name == "parent1") { //some traversing.... } if (xNode.Name == "parent2") { //If the parent node has child nodes then //traverse the child nodes foreach (XmlNode xNode1 in xNode.ChildNodes) { string childNodeName = xNode1.Name; //Ouputs: Child1 string childNodeData = xNode1.InnerText; //Outputs: data1 //Loop through each attribute of the child nodes foreach (XmlAttribute xAtt in xNode1.Attributes) { string attrName = xAtt.Name; //Outputs: id string attrValue = xAtt.Value; //Outputs: 1 } } }}  

    Read the article

< Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >