Search Results

Search found 1676 results on 68 pages for 'andrew philpott'.

Page 34/68 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • best practice for boolean REST results

    - by Andrew Patterson
    I have a resource /system/resource And I wish to ask the system a boolean question about the resource that can't be answered by processing on the client (i.e I can't just GET the resource and look through the actual resource data - it requires some processing on the backend using data not available to the client). eg /system/resource/related/otherresourcename I want this is either return true or false. Does anyone have any best practice examples for this type of interaction? Possibilities that come to my mind: use of HTTP status code, no returned body (smells wrong) return plain text string (True, False, 1, 0) - Not sure what string values are appropriate to use, and furthermore this seems to be ignoring the Accept media type and always returning plain text come up with a boolean object for each of my support media types and return the appropriate type (a JSON document with a single boolean result, an XML document with a single boolean field). However this seems unwieldy. I don't particularly want to get into a long discussion about the true meaning of a RESTful system etc - I have used the word REST in the title because it best expresses the general flavour of system I am designing (even if perhaps I am tending more towards RPC over the web rather than true REST). However, if someone has some thoughts on how a true RESTful system avoids this problem entirely I would be happy to hear them.

    Read the article

  • WCF, IIS6.0 (413) Request Entity Too Large.

    - by Andrew Kalashnikov
    Hello, guys. I've got annoyed problem. I've got WCF service(basicHttpBinding with Transport security Https). This service implements contract which consists 2 methods. LoadData. GetData. GetData works OK!. My client received pachage ~2Mb size without problems. All work correctly. But when I try load data by bool LoadData(Stream data); - signature of method I'll get (413) Request Entity Too Large. Stack Trace: Server stack trace: ? ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding) System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) I try this http://blogs.msdn.com/jiruss/archive/2007/04/13/http-413-request-entity-too-large-can-t-upload-large-files-using-iis6.aspx. But it doesn't work! My server is 2003 with IIS6.0. Please help.

    Read the article

  • How to run infinitely script in background on Linux?

    - by Andrew Bashtannik
    I have a PHP script with infinite loop. I need this script running forever. So, I run php /path/to/script.php > /dev/null & And it works in background in my current user's security context. But when I close terminal window (log off), of course, CentOS Linux kills my program. I see two guesses: run from a different user in background or make a daemon. I need help in each situation. Thanks a lot!

    Read the article

  • How important is W3C XHTML/CSS validation when finalizing work?

    - by Andrew G. Johnson
    Even though I always strive for complete validation these days, I often wonder if it's a waste of time. If the code runs and it looks the same in all browsers (I use browsershots.org to verify) then do I need to take it any further or am I just being overly anal? What level do you hold your code to when you create it for: a) yourself b) your clients P.S. Jeff and company, why doesn't stack overflow validate? :) EDIT: Some good insights, I think that since I've been so valid-obsessed for so long I program knowing what will cause problems and what won't so I'm in a better position than people who create a site first and then "go back and fix the validation problems" I think I may post another question on stack overflow; "Do you validate as you go or do you finish and then go back and validate?" as that seems to be where this question is going

    Read the article

  • iphone, get the object count without performing a fetch?

    - by Andrew
    Hi, I seem to recall that it's possible to return the resulting object count from an NSPredicate in CoreData without actually performing a fetch, but I can't find any reference to this. Can someone confirm that I wasn't dreaming (sad dream to have!), and would this be safe to do in another thread? Thanks Andy

    Read the article

  • 10035 error on a blocking socket

    - by Andrew
    Does anyone have any idea what could cause a 10035 error (EWOULDBLOCK) when reading on a blocking socket with a timeout? This is under Windows XP using the .NET framework version 3.5 socket library. I've never managed to get this myself, but one of my colleagues is getting it all the time. He's sending reasonably large amounts of data to a much slower device and then waiting for a response, which often gives a 10035 error. I'm wondering if there could be issues with TCP buffers filling up, but in that case I would expect the read to wait or timeount. The socket is definitely blocking, not non-blocking.

    Read the article

  • Trying to 'Make' CUDA SDK, ld cannot find library, ldconfig says it can.

    - by Andrew Bolster
    I know there are many other questions similar to this one, but none of the solutions posited there are working for me Basically, making the SDK sample files, i get /usr/bin/ld: cannot find -lcuda which would be an easy enough 'find the library and throw it to ldconfig', except ldconfig already says it has it... $ sudo ldconfig -v | grep cuda /usr/local/cuda/lib64: libcudartemu.so.3 -> libcudartemu.so.3.0.14 libcudart.so.3 -> libcudart.so.3.0.14 /usr/local/cuda/lib: libcudartemu.so.3 -> libcudartemu.so.3.0.14 libcudart.so.3 -> libcudart.so.3.0.14 libcuda.so.1 -> libcuda.so.195.36.15 libcuda.so.1 -> libcuda.so.195.36.15 libicudata.so.42 -> libicudata.so.42.1 And I checked, there is a symlink libcuda.so -> libcuda.so.1 but I'm still confused as to why libcuda.so -> ... doesnt show up I must be missing something really obvious. Any ideas?

    Read the article

  • Network Connection NSNotification for OSX?

    - by Andrew
    I simply need to have a notification post when a valid IP address is assigned. I have tried polling via SCReachability, but that seems to be inefficient. Any suggestions? This seems like it should be simple, but I've been struggling for several hours to get anything working.

    Read the article

  • Wireshark doesnt' recognises RTMP streams

    - by Andrew
    Hello! I found on the web few samples on tracking RTMP (Real Time Messaging Protocol) with Wireshark, but it doesn't work for me. All RTMPT packets rendered as basic TCP packet like this: 149 14.324999 85.115.xxx.xxx 192.168.1.20 TCP macromedia-fcs > 54557 [ACK] Seq=1 Ack=1452 Win=69 Len=0 I'm using Wireshark 1.2.8 with all protocols installed on Windows Vista. What can i do to fix it? Thx!

    Read the article

  • How do I program an AVR Raven with Linux or a Mac?

    - by Andrew McGregor
    This tutorial for programming these starts with programming the Ravens and Jackdaw with a Windows box. Can I do those initial steps with avrdude on a Linux or OS X machine instead? If so, how? Is there any risk of bricking the hardware if I just try? I have a USB JTAG ICE MKii clone, which is supposed to work for this. I'm totally new to AVR, but very experienced with C/C++ programming on Linux or OS X, up to and including kernel programming... so any hint at all would be appreciated, I can read man pages, but only if I know what I'm looking for.

    Read the article

  • How do I keep existing values from shifting to the right when entering keypresses into a jQuery Mask

    - by Andrew
    I have a text box I'm using as a timer display "hh:mm:ss" When I select the box and press a number, it inserts the number at the cursor location, but instead of replacing the value at that position, it shifts all existing values over. For example, the timer text box reads "01:00:35" and I replace the first minute position with 1, the timer text box will then read "01:10:03." Anybody know how to force the text box to replace, instead of insert, at the cursor position? I've tried intercepting onKeyPress, doing the replace manually, rewriting the entire timer text, and then returning false. But, that doesn't worked with a jQuery masked input, because my function runs first.

    Read the article

  • OOP: how much program logic should be encapsulated within related objects/classes as methods?

    - by Andrew
    I have a simple program which can have an admin user or just a normal user. The program also has two classes: for UserAccount and AdminAccount. The things an admin will need to do (use cases) include Add_Account, Remove_Account, and so on. My question is, should I try to encapsulate these use-cases into the objects? Only someone who is an Admin, logged in with an AdminAccount, should be able to add and remove other accounts. I could have a class-less Sub-procedure that adds new UserAccount objects to the system and is called when an admin presses the 'Add Account' button. Alternatively, I could place that procedure as a method inside the AdminAccount object, and have the button event execute some code like 'Admin.AddUser(name, password).' I'm more inclined to go with the first option, but I'm not sure how far this OO business is supposed to go.

    Read the article

  • Change Tweetmeme button colour under wordpress

    - by Andrew Bolster
    I've had a poke around in the TweetMeme plugin code and IANA JS Guru, but I cant find any sensible way to make specific styling changes; you can add div-specific CSS characteristics, but I'm talking about changing the resting colour and the hover colour of the button. I've googled around and noone seems to have asked it on here so I thought I should.

    Read the article

  • Not indent the first paragraph of a LaTeX document

    - by Andrew
    In the standard LaTeX article class (and probably others as well), paragraph indentation follows standard American publishing norms of not indenting the first paragraph after a section{} or subsection{}. I've redefined \maketitle in a LaTeX document and put the actual title left-aligned as the last line, fairly close to the actual text (kind of like this) Author Date Title Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Section title Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Since the title is left-aligned and so close to the text, I'd like the first paragraph of the document to not be indented, just like with the headings ... Title Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor... ... I've attempted to use @afterindentfalse, which is what the section commands use, inside my renewed commands, but it doesn't work. \makeatletter \def\noindentation{\let\@afterindentfalse} \newcommand{\mytitle}[1]{% \vskip 2em {\bf\sffamily\LARGE #1} \noindentation} \renewcommand{\@maketitle}{ \begin{flushleft}{ % Author \@author \par % Date \@date \par % Title \mytitle{\@title} } \end{flushleft} } \makeatother By default the first paragraph in the article class is indented, so this question is applicable whether or not I renew \maketitle. So, what's the best way to automatically not indent the first paragraph of the document? Thanks!

    Read the article

  • Varying performance of MSVC release exe

    - by Andrew
    Hello everyone, I am curious what could be the reason for highly varying performance of the same executable. Sometimes, I run it and it takes 20 seconds and sometimes it is 110. Source is compiled with MSVC in Release mode with standard options. The code is here: vector<double> Un; vector<double> Ucur; double *pUn, *pUcur; ... // time marching for (old_time=time-logfreq, time+=dt; time <= end_time; time+=dt) { for (i=1, j=Un.size()-1, pUn=&Un[1], pUcur=&Ucur[1]; i < j; ++i, ++pUn, ++pUcur) { *pUcur = (*pUn)*(1.0-0.5*alpha*( *(pUn+1) - *(pUn-1) )); } Ucur[0] = (Un[0])*(1.0-0.5*alpha*( Un[1] - Un[j] )); Ucur[j] = (Un[j])*(1.0-0.5*alpha*( Un[0] - Un[j-1] )); Un = Ucur; }

    Read the article

  • WPF Standard Commands - Where's Exit?

    - by Andrew Shepherd
    I'm creating a standard menu in my WPF application. I know that I can create custom commands, but I know there are also a bunch of standard commands to bind to. For example, to open a file I should bind to ApplicationCommands.Open, to close a file I should bind to ApplicationCommands.Close. There's also a large number of EditCommands, ComponentCommands or NavigationCommands. There doesn't seem to be an "Exit" command. I would have expected there to be ApplicationCommands.Exit. What should I bind to the "Exit" menu item? To create a custom command for something this generic just seems wrong.

    Read the article

  • binary file to string

    - by andrew
    i'm trying to read a binary file (for example an executable) into a string, then write it back FileStream fs = new FileStream("C:\\tvin.exe", FileMode.Open); BinaryReader br = new BinaryReader(fs); byte[] bin = br.ReadBytes(Convert.ToInt32(fs.Length)); System.Text.Encoding enc = System.Text.Encoding.ASCII; string myString = enc.GetString(bin); fs.Close(); br.Close(); System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); byte[] rebin = encoding.GetBytes(myString); FileStream fs2 = new FileStream("C:\\tvout.exe", FileMode.Create); BinaryWriter bw = new BinaryWriter(fs2); bw.Write(rebin); fs2.Close(); bw.Close(); this does not work (the result has exactly the same size in bytes but can't run) if i do bw.Write(bin) the result is ok, but i must save it to a string

    Read the article

  • Xpath > How can I select a node based on both its attributes and content?

    - by Andrew Kirk
    Sample XML: <assignments> <assignment id="911990211" section-id="1942268885" item-count="21" sources="foo"> <options> <value name="NumRetakes">4</value> <value name="MultipleResultGrading">6</value> <value name="MaxFeedbackAttempts">-1</value> <value name="ItemTakesBeforeHint">1</value> <value name="TimeAllowed">0</value> </options> </assignment> <assignment id="1425185257" section-id="1505958877" item-count="4" sources="bar"> <options> <value name="NumRetakes">0</value> <value name="MultipleResultGrading">6</value> <value name="MaxFeedbackAttempts">3</value> <value name="ItemTakesBeforeHint">1</value> <value name="TimeAllowed">0</value> </options> </assignment> <assignments> Using XPath, I would like to select all assignments/assignment/options/value nodes where the nodes "name" attribute is "MaxFeedbackAttempts" and the nodes content is "-1". That is to say, I want to return each node that looks like: <value name="MaxFeedbackAttempts">-1</value> I can get each assignments/assignment/options/value node with the specified attribute using: //assignment/options/value[@name="MaxFeedbackAttempts"] I am just not sure how to refine this path to also limit the results based on the nodes content. Is there any way to do this using XPath?

    Read the article

  • REDUX: How to overcome an incompatibility between the ksh on Linux vs. that installed on AIX/Solaris

    - by Andrew Stein
    I have uncovered another problem in the effort that we are making to port several hundreds of ksh scripts from AIX, Solaris and HPUX to Linux. See here for the previous problem. This code: #!/bin/ksh if [ -a k* ]; then echo "Oh yeah!" else echo "No way!" fi exit 0 (when run in a directory with several files whose name starts with k) produces "Oh yeah!" when called with the AT&T ksh variants (ksh88 and ksh93). On the other hand it produces and error message followed by "No way!" on the other ksh variants (pdksh, MKS ksh and bash). Again, my question are: Is there an environment variable that will cause pdksh to behave like ksh93? Failing that: Is there an option on pdksh to get the required behavior?

    Read the article

  • gtk2 auto translation is choosing the wrong language

    - by Andrew Heath
    Not sure if yall can help this time, as I'm just using this particular program not coding with it... I downloaded Deluge, a free torrent app, and it requires GTK2 Runtime which I've also installed. Unfortunately, on my English WinXP with East Asian Language support Deluge sets itself to Chinese menus and has no option to alter the language. A bit of poking around on the internet suggests this is due to GTK2 selecting the wrong default language. Does anyone know how I can override this?

    Read the article

  • How to get contents of Amazon shopping cart?

    - by Andrew Whitehouse
    I've been investigating whether it's possible to get a list of the saved items in my Amazon shopping basket programmatically ... Their Product Advertising API has methods for getting wishlists: http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?FindingItemsonLists.html and working with remote shopping carts: http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?CHAP_WorkingWithRemoteShoppingCarts.html but the shopping cart of items stored while on the Amazon web site is treated as a local shopping cart, and therefore is not accessible through the Product Advertising API. According to the last link: The opposite of a remote shopping cart is a local shopping cart, which is the shopping cart customers use while shopping on www.amazon.com. It is considered local because Amazon hosts the shopping web pages as well as the shopping cart. Product Advertising API operations work solely with remote shopping carts. Has anyone found a way of getting the contents of the "local" cart, apart from scraping the HTML? Thanks.

    Read the article

  • Piping a bash variable into awk and storing the output

    - by Andrew Smith
    Hello, To illustrate my problem, TEST="Hi my name is John" OUTP=`echo $TEST | awk '{print $3}'` echo $OUTP What I would expect this to do is pass the $TEST variable into awk and store the 3rd word into $OUTP. Instead I get "Hi: not found", as if it is expecting the input to be a file. If I pass just a string instead of a variable, however, there is no problem. What would be the best way to approach this? Thanks all!

    Read the article

  • DBMS for POS software

    - by Andrew Smith
    Hello, I want to develop a POS application in .NET (C#) that would be used to rent items. I have a good idea of what will be done and the famous question that I have is about the DBMS that I should use. I would like to use MySQL database. The question is: If some places use only one computer (no network, no internet connection), can I use a MySQL database in local? Do I need to install MySQL server on all thoses computers to be able to use such a database? I know SQLite but I'm not sure if the limitations can cause problems in the future... I also looked at SQLServer Express versions. (I must consider that other point of sales are using multiple computers and more transactions so there I can't put sqlexpress or sqlite) So can anybody suggest me what I should do in that situation? Thanks

    Read the article

  • possible to have a background color transition from color A to color B without repeating a pixel sti

    - by Andrew Heath
    For things like menubars and headers, a background color is nice. But a background color that gracefully transitions from say Blue to White is even nicer. I know this can be done by making a 1-pixel wide, X-pixel tall image file containing the desired fade and repeating it across the div, but does CSS have native support to just define colors and be done with it? Can any other language handle this?

    Read the article

  • What was "The Next Big Thing" when you were just starting out in programming?

    - by Andrew
    I'm at the beginning of my career and there are lots of things which are being touted as "The Next Big Thing". For example: Dependency Injection (Spring, etc) MVC (Struts, ASP.NET MVC) ORMs (Linq To SQL, Hibernate) Agile Software Development These things have probably been around for some time, but I've only just started out. And don't get me wrong, I think these things are great! So, what was "The Next Big Thing" when you were starting out? When was it? Were people sceptical of it at first? Why? Did you think it would catch on? Did it pan out and become widely accepted/used? If not, why not? EDIT It's been nearly a week since I first posted this question and I can safely say that I did not expect such explosive interest. I asked the question so that I could gain a perspective of what kinds of innovations in programming people thought were most important when they were starting out. At the time of writing this I have read ~95% of all answers. To answer a few questions, the "Next Big Things" I listed are ones that I am currently really excited about and that I had not really been exposed to until I started working. I'm hoping to implement some or all of these in the near future at my current workplace. To many people they are probably old news. In regards to the "is this a real question" debate, I can see that obviously hasn't been settled yet. I feel bad whenever I read a comment saying that these kinds of questions take away from the real meaning of SO. I'm not wholly convinced that it doesn't. On the other hand, I have seen a lot of comments saying what a great question it is. Anyway, I have chosen "The Internet!" as my answer to this question. I don't think (in my very humble opinion, and, it seems many SOers opinions) that many things related to programming can compare. Nowadays every business and their dog has a website which can do anything from simply supplying information to purchasing goods halfway around the world to updating your blog. And of course, all these businesses need people like us. Thanks to everyone for all the great answers!

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >