Daily Archives

Articles indexed Tuesday April 10 2012

Page 6/17 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Problem with ebay AddItem API call [migrated]

    - by user1323572
    I am totally new to any sort of API application. Right now I am creating a listing application to list items on E-bay India site. API version being used is 767, sandbox url is https://api.sandbox.ebay.com/wsapi. I have sandbox account for ebay(buyer/seller) and developer account. I am getting error saying: 1) Sales Tax / VAT was dropped from the listing as per new sales tax / VAT policy. The items will be listed successfully, you may revise the listing to specify all inclusive price. 2) You have either not registered or are having problem with your payment method registration. ItemType type = new ItemType(); type.PaymentMethods = new BuyerPaymentMethodCodeTypeCollection(); type.PaymentMethods.Add(BuyerPaymentMethodCodeType.PaisaPayAccepted); Also do I have to specify taxation for each state? For VAT and shipping details here's my snippet: private ShippingDetailsType getShippingDetails() { // Shipping details. ShippingDetailsType sd = new ShippingDetailsType(); SalesTaxType salesTax = new SalesTaxType(); ReadSettings rs = new ReadSettings(); rs.GetSettings(); salesTax.SalesTaxPercent = 12f; salesTax.SalesTaxState = "MH"; SalesTaxType s = new SalesTaxType(); salesTax.ShippingIncludedInTax = true; salesTax.ShippingIncludedInTaxSpecified = true; sd.ApplyShippingDiscount = true; AmountType at = new AmountType(); at.Value = 2.8; at.currencyID = CurrencyCodeType.INR; sd.InsuranceFee = at; sd.InsuranceOption = InsuranceOptionCodeType.NotOffered; sd.PaymentInstructions = "These are my instructions."; VATDetailsType vd = new VATDetailsType(); vd.BusinessSeller = false; vd.BusinessSellerSpecified = false; vd.RestrictedToBusiness = false; vd.RestrictedToBusinessSpecified = false; vd.VATID = "VATSNO1234567890"; vd.VATPercent = 12f; vd.VATPercentSpecified = true; vd.VATSite = "None"; sd.ShippingType = ShippingTypeCodeType.Flat; // ShippingServiceOptionsType st1 = new ShippingServiceOptionsType(); sd.SalesTax = salesTax; st1.ShippingService = ShippingServiceCodeType.IN_Express.ToString(); at = new AmountType(); at.Value = 50; at.currencyID = CurrencyCodeType.INR; st1.ShippingServiceAdditionalCost = at; at = new AmountType(); at.Value = 50; at.currencyID = CurrencyCodeType.INR; st1.ShippingServiceCost = at; st1.ShippingServicePriority = 1; at = new AmountType(); at.Value = 1.0; at.currencyID = CurrencyCodeType.INR; st1.ShippingInsuranceCost = at; sd.ShippingServiceOptions = new ShippingServiceOptionsTypeCollection(new ShippingServiceOptionsType[] { st1 }); return sd; } Thank you for you efforts.

    Read the article

  • How does whitespace affect Python code?

    - by Codereview
    I've started programming about a year ago, I've learned the C and C++ languages and bits of Java. Recently I've started to learn the Python language (Notable: I'm using the Eclipse IDE). I'm used to formatting my code with whitespace, placing statements a bit to the right of my code for easier readability. Since I started working with Python it seems whitespace is a problem, I get some unnecessary whitespace warnings, and my code gets underlined (In eclipse). After a while I figured Python is very restrictive about whitespace for some reason, so I've been looking for the effects of whitespace on Python code. How does it affect the code? Does the code work different with unnecessary whitespace?

    Read the article

  • Coding style advice? [closed]

    - by user1064918
    I'm a newly grad. I've got a lot of complaints from my supervisor at work during code-review sessions with regard to my coding style (Surprise!). I don't know if it's just him being cranky or my style is really that annoying to read. I come from the low-level language world (assembly, mostly), so I've been taught to use bitwise ops and all the cool tricks to do math whenever possible. I also have the habits of doing some other things that've been regarded as "too excessively dense to read". So I'm hoping to get some feedback from any experienced programmers! :) Also how should I justify between code performance and readability? Thanks!!

    Read the article

  • Duck checker in Python: does one exist?

    - by elliot42
    Python uses duck-typing, rather than static type checking. But many of the same concerns ultimately apply: does an object have the desired methods and attributes? Do those attributes have valid, in-range values? Whether you're writing constraints in code, or writing test cases, or validating user input, or just debugging, inevitably somewhere you'll need to verify that an object is still in a proper state--that it still "looks like a duck" and "quacks like a duck." In statically typed languages you can simply declare "int x", and anytime you create or mutate x, it will always be a valid int. It seems feasible to decorate a Python object to ensure that it is valid under certain constraints, and that every time that object is mutated it is still valid under those constraints. Ideally there would be a simple declarative syntax to express "hasattr length and length is non-negative" (not in those words. Not unlike Rails validators, but less human-language and more programming-language). You could think of this as ad-hoc interface/type system, or you could think of it as an ever-present object-level unit test. Does such a library exist to declare and validate constraint/duck-checking on Python-objects? Is this an unreasonable tool to want? :) (Thanks!) Contrived example: rectangle = {'length': 5, 'width': 10} # We live in a fictional universe where multiplication is super expensive. # Therefore any time we multiply, we need to cache the results. def area(rect): if 'area' in rect: return rect['area'] rect['area'] = rect['length'] * rect['width'] return rect['area'] print area(rectangle) rectangle['length'] = 15 print area(rectangle) # compare expected vs. actual output! # imagine the same thing with object attributes rather than dictionary keys.

    Read the article

  • Which Qt4 Widgets whould I be using? [closed]

    - by Topo
    I'm using Qt 4 to design an IDE but I'm having a hard time with the GUI design. On the left side I want to put a widget that shows the files on the current project and on the left side a similar one but with the classes, methods, etc... Which widget should I use the Tree view or the tree widget? Also, I want to have a tab widget in the center with a text edit and this items the tree widgets and the tab widget to move and resize according to the window size. How can I accomplish this?

    Read the article

  • apt-get install kernel source error

    - by MA1
    apt-get source linux-image-$(uname -r) gives me the below error Reading package lists... Done Building dependency tree Reading state information... Done Picking 'linux' as source package instead of 'linux-image-3.0.0-12-generic' NOTICE: 'linux' packaging is maintained in the 'Git' version control system at: http://kernel.ubuntu.com/git-repos/ubuntu/ubuntu-oneiric.git Skipping already downloaded file 'linux_3.0.0-17.30.dsc' Need to get 99.9 MB of source archives. Err http://pk.archive.ubuntu.com/ubuntu/ oneiric-updates/main linux 3.0.0-17.30 (tar) 500 ( The request was rejected by the HTTP filter. Contact your ISA Server administrator. ) Err http://pk.archive.ubuntu.com/ubuntu/ oneiric-updates/main linux 3.0.0-17.30 (diff) 500 ( The request was rejected by the HTTP filter. Contact your ISA Server administrator. ) Failed to fetch http://pk.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_3.0.0.orig.tar.gz 500 ( The request was rejected by the HTTP filter. Contact your ISA Server administratorThe request was rejected by the HTTP filter. Contact your ISA Server administrator. ) Failed to fetch http://pk.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_3.0.0-17.30.diff.gz 500 ( The request was rejected by the HTTP filter. Contact your ISA Server administrator. ) E: Failed to fetch some archives. Can someone suggest a solution?

    Read the article

  • How to change Ubuntu Studio from XFCE to Gnome?

    - by Starx
    I have 12.04 Ubuntu Studio Installed at the moment. On removing a application called Terminal Emulator, I accidentally removed xfce too. As I am not very fond of xfce, I am OK with it as I can change the session to gnome 3 upon login. But session runs with occasional glitches. My question is how to remove xfce completely and turn it into pure gnome system. I am aware of the way to do apt-get install ubuntu-desktop But, this is going to change the ubuntu studio, I dont want that. I just want to change my ubuntu studio to pure gnome without uninstalling ubuntu-desktop. i.e. Something like ubuntustudio-12.04-gnome build. I've looked at this Q&A: How to remove xubuntu? The accepted answer removes some vital software from Ubuntu Studio such as Gimp, including ubuntustudio-desktop at the end.

    Read the article

  • Thinkpad x201 Tablet - Touch doesn't work correctly under 12.04

    - by Joachim
    running 12.04 on my Thinkpad X201t. On the login screen the touch works fine, the mouse cursor appears where I touch the screen. After I logged in, it doesn't work anymore. If I touch the display, the cursor stays on the point where it was before, it doesn't jump to the touchpoint. I can move it, yes, but its chaotic. With the pen it works fine, but without the touch-function it's not enought for real tablet usage. So, would be glad if touch-function can be fixed. I'm very new to Linux/Ubuntu, so don't know where I can start. Haven't found anything in the system settings & Compiz so far, also no luck in google etc. Would be glad for help ;-). Of course I could go back to 11.04... but I would prefer to stay with the new system. Best, Joachim

    Read the article

  • ifconfig : Command 'ifconfig' is available in '/sbin/ifconfig'

    - by Sahil Grover
    My question is related to another open question. My echo $PATH gives me an output which is like /home/sahil/.rvm/gems/ruby-1.9.3-p125/bin:/home/sahil/.rvm/gems/ruby-1.9.3-p125@global/bin:/home/sahil/.rvm/rubies/ruby-1.9.3-p125/bin:/home/sahil/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/sahil/.rvm/bin{}:/home/android-sdks/{}:/home/android-sdks/platform-tools/{}:/home/android-sdks/tools/{}:/home/sahil/android-sdks/tools{}:/home/sahil/android-sdks/tools:/home/sahil/android-sdks/platform-tools/ But running ifconfig gives me an output like Command 'ifconfig' is available in '/sbin/ifconfig' The command could not be located because '/sbin' is not included in the PATH environment variable. This is most likely caused by the lack of administrative privileges associated with your user account. ifconfig: command not found after running command like given in other question export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" it runs ifconfig but blocks other commands of ruby rails or rvm. Seeking help how to resolve this. Also why this happens?

    Read the article

  • Ubuntu for Android on the ASUS Transformer Prime

    - by sola
    I would like to use Ubuntu on my Transformer Prime in parallel with Android (not as a dual booting solution, I want to be able to switch between them instantaniously). I am aware of the traditional chrooting/VNC solution but I heard that it performs very poorly so I would like to use Ubuntu For Android (UFA) which has been announced recently by Canonical. That looks like a polished, highly integrated solution for Android devices. The Prime would be the ideal device for Ubuntu For Android since it has a powerful processor (Tegra3) capable of running a lot of processes in parallel on its 4 cores. Does anyone know if Canonical or anybody else is working on supporting UFA on the ASUS Transformer Prime? As far as I understand, the X11 driver is available for Tegra3 so, the biggest hurdle may be easily overcome.

    Read the article

  • No bass from the speakers

    - by Bhavesh Jogadia
    In Ubuntu 11.10 no bass sound at all when try to play mp3 or 2channels audio. I have 5.1/6 channels speakers. When I test speakers from the sound preference it works perfectly fine and then I try to play any MP3 there is no bass only the speakers work, I play 5.1 movies it plays fine bass sounds good. Also tried to to some changes as instructed with deamon.conf file but no go... When I turn my speakers on play speakers only mode it plays the bass but sound quality is not good compared to normal playing. I have a Creative 5.1 vx ca0160 sound card. In Windows also had the same problem unless I do bass redirection crossover frequency so is there any kinda software package or any kinda changes i can make in system file so that my speaker bass works fine or any thing who can let me change the bass redirection crossover frequency?

    Read the article

  • browser without gpu support

    - by manuzhang
    Google has an Easter egg that draws 3D graph but when I tried it out on chrome it complained about no WebGL support. I've also tested it on Firefox whose WebGL support was enabled but ended up with the same problem. Thus, I suspect it's an issue of my GPU. Some googling led me to chrome://gpu and here's what I got Graphics Feature Status Canvas: Software only, hardware acceleration unavailable HTML Rendering: Software only, hardware acceleration unavailable 3D CSS: Unavailable. Hardware acceleration unavailable WebGL: Unavailable. Hardware acceleration unavailable WebGL multisampling: Unavailable. Hardware acceleration unavailable Problems Detected GPU process was unable to boot. Access to GPU disallowed. GL driver is software rendered. Accelerated compositing is disabled.: 59302 Mesa drivers in linux older than 7.11 are assumed to be buggy. Accelerated 2d canvas is unstable in Linux at the moment. Version Information Data exported Tue Apr 10 2012 18:35:57 GMT+0800 (CST) Chrome version 18.0.1025.151 (Official Build 130497) Operating system Linux 3.0.0-0300-generic Software rendering list version 1.27 ANGLE revision 988 2D graphics backend Skia I wonder what each of the problem implies and How I may properly deal with it? I'm using Ubuntu 11.04

    Read the article

  • How to disable automatic login?

    - by iammilind
    I was playing around with "User accounts" and somehow set automatic login. Now, when I start my PC, it just has one button named as "login". Clicking that button, directly logs me in to my PC. There is no music or no asking for password while logging in. As a side effect, it asks me separately for keyring password How to disable auto login and make login/keyring password unified again like before? NOTE: Attempting to disable Automatic Login from System Settings User Accounts does not work. This is the content of my /etc/lightdm/lightdm.conf (where I have commented the autologin for my username mgandhi): [SeatDefaults] greeter-session=unity-greeter user-session=ubuntu #autologin-user=mgandhi

    Read the article

  • How can I access the scanner functionality of my Samsung CLX 3175N over the network?

    - by Roger De Backer
    I have a Samsung CLX 3175N network capable color laser printer/scanner which was sold as being Linux compatible. Whereas the printer undeed works in the network. It has been impossible up to now to get the scanner working under Ubuntu (safe for using Windows XP running in Virtualbox on the Ubuntu client), but that is not my understanding of Linux compatibility. Is there anybody who knows a method to access a network Scanner in Ubuntu?

    Read the article

  • Can't get vnc to connect

    - by Thom
    I have a server and my laptop. I want to be able to start vnc server on the server and then connect from my laptop. Both are running ubuntu 11.10 64 bit desktop On my server, i installed x11vnc. I set it up with a password, no view only password. I ssh to the box and typed vncserver :42 Now on my laptop, I installed gtkvncviewer and ran it. It popped up a box. I entered the picard:42 (the name of the server in my /etc/hosts file) and the password. I tried with and without the user. It always disconnects immediately. Can anyone point out what I'm doing wrong? Is it because I'm not running a GUI session currently on picard? If so, how can I start the Xwindows session remotely to connect with vncserver?

    Read the article

  • Cannot connect my Ubuntu to TV with HDMI

    - by Hannes Johannes
    Another problem in my way to Ubuntu world.. Trying to make things work Linux way, day 4, problem #5321: I have a Compaq laptop and Nvidia graphic adapter. I also have Panasonic TV, which I thought I could use as a second screen just like I used to to when I was still using Windows Vista with my laptop. Plug the screen to the comp and voilá, I can watch my videos on big screen. And a boll***s I can, not with ubuntu anyways. Nvidia x server (or whatever it's called) does recognize my tv. It's very badly designed gui as I can never be sure has it saved my changes or not (most often not), but I recon I've got that one sorted out. I haven't found a way to set a primary monitor there, but it does see there are two monitors, my laptop and the tv. So far so good. But then? Ubuntu's own monitor setting only sees the laptop screen. If I reboot (with the HDMI cable connected) I end up having a black screen. Then I have to take the cable away, cut the power off and restart the comp.. Please, help, any help would be appreciated! I would so much love to like this linux more than windows but it surely takes a lot of trying...

    Read the article

  • how to install EasyBCD on ubuntu 11.10

    - by Kriti
    I want to delete ubuntu 11.10 from dual boot system(windows 7 + ubuntu 11.10). I currently have ubuntu as main OS but I don't want to continue with it further.I don't have CD for win 7 so I am trying other sources. I have downloaded EasyBCD on another system and pasted it on ubuntu. It is .exe file and is not running on ubuntu. I am not aware of any commands regarding installation and further process. :( So,pls suggest what to do next,I would be very thankful. :)

    Read the article

  • Infrastructure to effectively set up experiements and learn from them

    - by David
    Open-org.com is in the early stages of creating our first product, a place on the web, where one can ask lawyers questions at a fraction of their normal costs. An early stage front page can be found here. I got inspired by this video, which is recommended by Jeff Atwood, which talks about getting feedback faster, which is the reason for this question. The problem Needless to say, we want our conversion rates to be as high as possible. Therefore, we want to be able to rapidly set up a new experiment where we change something on the site (like moving an image slightly, rewriting a sentence etc.). We then want to present the modified page to a random subset of the users. After that we will compare the conversion rates of the experiment with another version. I could very well imagine that we want to run 10-100 experiments simultaneously and it would be nice to have features, where experiments that obviously have worse results will be ended before schedule. My question Does infrastructure to support the whole process exist? A short description of our infrastructure... We use EC2 and PHP and have a script to automatically start up new instances with all needed software. Still, starting up a new server for every experiment, seems like a bit of overkill, so I am wondering what other options exist. Btw. If you feel like working for Open-org.com, you can pick a task, and start working, or suggest a new task. All profits are given out to the contributors.

    Read the article

  • CSS alignment differs per page, cant find reason [migrated]

    - by Floran
    I list products on my homepage and on a company details page. I use the exact same HTML, but for some reason the product appears different: The productname is "Artikel 1". Here the product is displayed correctly: http://www.zorgbeurs.nl/ Notice how the green price area is right below the product. But here: http://www.zorgbeurs.nl/bedrijven/76/mymedical the green price area is all the way at the bottom of the page. Why?

    Read the article

  • What's an acceptable "Avg. Page Load Time"?

    - by hawbsl
    Is there any industry rule of thumb for what's considered an unacceptable load time v. an OK one v. a blistering fast one? We're just reviewing some Google Analytics data and getting 0.74 Avg. Page Load Time reported. I guess that's OK. However it would be good if some meatier comparison data were available, or a blog post, or somewhere where there's some analysis of what speeds are generally being achieved by various kinds of sites. Any useful links to help someone interpret these speeds? If you Google it you just get a lot of results dealing with how to improve your speed. We're not at that stage yet.

    Read the article

  • Need a really simple client manage script to deliver graphics and revisions, please help?

    - by Mark R
    I am looking for a very simple client management script. The process flow of the script should be: Client orders (paypal etc) while giving specs on what they need given login details and thanked for their order backend for them consists of a 2 way communication. They ask questions we answer. We also upload the graphics here where they either accept them or as for revision. process complete. Now I cannot for the life of me find something as simple as this. It seems all the scripts out there are way too complicated. Does anyone know of one I can use to do this?

    Read the article

  • how to avoid getting negative points from google adsense

    - by Napster
    I have news based website, in which primary contents include news,image albums and videos. out of these i have copy rights for images and videos are just youtube embedded videos. Coming to news my site is kind of a mashup. It gathers data from various sites and presents them in more user friendly way for quick digestion and access. My problem here is that since the news part of the site can be found from other sites, my site could suffer in search rankings. Is there any solution to this. One thing I thought of is to put disallow on all the news ariticles pages, so google does not crawl them. Will this be helpful to me. When applying to google adsense does google crawl these pages (disallow) also.

    Read the article

  • How do I communicate with an IronPython component in a C#/XNA game?

    - by Jonathan Hobbs
    My XNA game is component-oriented, and has various components for position, physics representation, rendering, etc, all of which extend a base Component class. The player and enemies also have controllers which are currently defined in C#. I'd like to turn them into Python scripts, but I'm not sure how to interact with those scripts. The examples in Embedding IronPython in a C# Application suggest I'd have to create a wrapper class (e.g. a Script component) which compiles a Python script, and call the Update methods of the component in the script Is this the most effective way of working with a Python object? I feel that I'm missing something in my research - there must be a way to load up a script, instantiate a Python object and then work directly with it from within C#. Or is the wrapper required?

    Read the article

  • Organizing an entity system with external component managers?

    - by Gustav
    I'm designing a game engine for a top-down multiplayer 2D shooter game, which I want to be reasonably reuseable for other top-down shooter games. At the moment I'm thinking about how something like an entity system in it should be designed. First I thought about this: I have a class called EntityManager. It should implement a method called Update and another one called Draw. The reason for me separating Logic and Rendering is because then I can omit the Draw method if running a standalone server. EntityManager owns a list of objects of type BaseEntity. Each entity owns a list of components such as EntityModel (the drawable representation of an entity), EntityNetworkInterface, and EntityPhysicalBody. EntityManager also owns a list of component managers like EntityRenderManager, EntityNetworkManager and EntityPhysicsManager. Each component manager keeps references to the entity components. There are various reasons for moving this code out of the entity's own class and do it collectively instead. For example, I'm using an external physics library, Box2D, for the game. In Box2D, you first add the bodies and shapes to a world (owned by the EntityPhysicsManager in this case) and add collision callbacks (which would be dispatched to the entity object itself in my system). Then you run a function which simulates everything in the system. I find it hard to find a better solution to do this than doing it in an external component manager like this. Entity creation is done like this: EntityManager implements the method RegisterEntity(entityClass, factory) which registers how to create an entity if that class. It also implements the method CreateEntity(entityClass) which would return an object of type BaseEntity. Well now comes my problem: How would the reference to a component be registered to the component managers? I have no idea how I would reference the component managers from a factory/closure.

    Read the article

  • Merging $.get and $.ready

    - by cwolves
    Put simply I have an ajax call that sometimes completes before the page is loaded, so I tried wrapping the callback in $( fn ), but the callback doesn't fire if the page is loaded... Anyone have a good solution to this? $.get( '/foo.json', function( data ){ $( function(){ // won't get here if page ready beats the ajax call // process data $( '.someDiv' ).append( someData ); } ); } ); And yes, I know that if I flipped the order of those it would always work, but then my ajax calls would be needlessly deferred until the document is ready.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >