Search Results

Search found 1393 results on 56 pages for 'brian postow'.

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

  • Mapping to a JSON method with url-pattern

    - by Brian
    I'm creating a Spring MVC application that will have a controller with 'RequestMapping'-annotated methods, including a JSON method. It currently has static content that resides in webapps/static, and the app itself resides in webapps/myapp. I assume that Catalina's default servlet is handling the static content, and my *.htm url-pattern in web.xml is returning the request for my JSP page, but I haven't been able to get the JSON method to be called. How do I write the url-pattern in the servlet mapping to do so? Using /* has not worked; it prevents the app from being accessed at all. Is there anything else to be aware of? EDIT: The url-pattern '/' appears to allow the JSON request through, because a 406 error is returned. What then would need to be modified to allow JSON to be returned?

    Read the article

  • can I read exactly one UDP packet off a socket?

    - by Brian Palmer
    Using UNIX socket APIs on Linux, is there any way to guarantee that I read one UDP packet, and only one UDP packet? I'm currently reading packets off a non-blocking socket using recvmsg, with a buffer size a little larger than the MTU of our internal network. This should ensure that I can always receive the full UDP packet, but I'm not sure I can guarantee that I'll never receive more than one packet per recvmsg call, if the packets are small. The recvmsg man pages reference the MSG_WAITALL option, which attempts to wait until the buffer is filled. We're not using this, so does that imply that recvmsg will always return after one datagram is read? Is there any way to guarantee this? Ideally I'd like a cross-UNIX solution, but if that doesn't exist is there something Linux specific?

    Read the article

  • Design Patterns: What's the antithesis of Front Controller?

    - by Brian Lacy
    I'm familiar with the Front Controller pattern, in which all events/requests are processed through a single centralized controller. But what would you call it when you wish to keep the various parts of an application separate at the presentation layer as well? My first thought was "Facade" but it turns out that's something entirely different. In my particular case, I'm converting an application from a sprawling procedural mess to a clean MVC architecture, but it's a long-term process -- we need to keep things separated as much as possible to facilitate a slow integration with the rest of the system. Our application is web-based, built in PHP, so for instance, we have an "index.php" and an IndexController, a "account.php" and an AccountController, a "dashboard.php" and DashboardController, and so on.

    Read the article

  • Helicon ISAPI_REWRITE for masking folder

    - by Brian
    Hello, I would like to use the Helicon ISAPI_REWRITE module to rewrite a url: 123.45.67.89/folder to www.site.com I need to mask the IP/folder due to an IIS structure change. The reason why I don't want to get into, but it's valid based on the setup. Any help would be appreciated. Thanks.

    Read the article

  • Create a binary indicator matrix in R

    - by Brian Vanover
    I have a list of data indicating attendance to conferences like this: Event Participant ConferenceA John ConferenceA Joe ConferenceA Mary ConferenceB John ConferenceB Ted ConferenceC Jessica I would like to create a binary indicator attendance matrix of the following format: Event John Joe Mary Ted Jessica ConferenceA 1 1 1 0 0 ConferenceB 1 0 0 1 0 ConferenceC 0 0 0 0 1 Is there a way to do this in R? Sorry for the poor formatting.

    Read the article

  • Does a Collection<T> wrap an IList<T> or enumerate over the IList<T>?

    - by Brian Triplett
    If I am exposing a internal member via a Collection property via: public Collection<T> Entries { get { return new Collection<T>(this.fieldImplimentingIList<T>); } } When this property is called what happens? For example what happens when the following lines of code are called: T test = instanceOfAbove.Entries[i]; instanceOfAbove[i] = valueOfTypeT; It's clear that each time this property is called a new reference type is created but what acctually happens? Does it simply wrap the IList<T> underneath, does it enumerate over the IList<T> and to create a new Collection<T> instance? I'm concerned about performance if this property is used in a for loop.

    Read the article

  • Using a .Net Workstation Program With a LAMP Server

    - by Brian
    Hi, I am currently working on a project for a company with a Ubuntu LAMP server set up. All the workstations are on Windows XP/Vista. What we are trying to do is create a program to track parts in our warehouse. Server side would be programmed in PHP. However, I was thinking about using C# on the workstation side. Is this possible? If so, is this practical? What kind of problems could arise from something like this?

    Read the article

  • Alternatives to using web.config to store settings (for complex solutions)

    - by Brian MacKay
    In our web applications, we seperate our Data Access Layers out into their own projects. This creates some problems related to settings. Because the DAL will eventually need to be consumed from perhaps more than one application, web.config does not seem like a good place to keep the connection strings and some of the other DAL-related settings. To solve this, on some of our recent projects we introduced a third project just for settings. We put the setting in a system of .Setting files... With a simple wrapper, the ability to have different settings for various enviroments (Dev, QA, Staging, Production, etc) was easy to achieve. The only problem there is that the settings project (including the .Settings class) compiles into an assembly, so you can't change it without doing a build/deployment, and some of our customers want to be able to configure their projects without Visual Studio. So, is there a best practice for this? I have that sense that I'm reinventing the wheel. Some solutions such as storing settings in a fixed directory on the server in, say, our own XML format occurred to us. But again, I would rather avoid having to re-create encryption for sensitive values and so on. And I would rather keep the solution self-contained if possible. EDIT: The original question did not contain the really penetrating reason that we can't (I think) use web.config ... That puts a few (very good) answers out of context, my bad.

    Read the article

  • is there any way to group css styles based on their ids?

    - by Brian
    If I have a chunk of css styles that are applied within a certain page element, I would like to group them rather than identify the containing page element for each style. For example, I would like to turn: #bodywrap #leftcolumn p {...} #bodywrap #leftcolumn div {...} #bodywrap #leftcolumn .highlight {...} into something like: #bodywrap #leftcolumn [ p {...} div {...} .highlight {...} ] where everything contained in the brackets respects the containing declarations. Is this possible with css, and what would be the syntax?

    Read the article

  • Avoiding a large number of custom EventArgs?

    - by Brian Ortiz
    The class library I'm refactoring has a large number of events (over 50) each with its own Delegate, even though many have the same arguments. I starting switching them all over to use EventHandler and custom EventArgs but it is proving to be tedious and time consuming. Is there an easier way to handle a situation like this, when you have a huge number of events?

    Read the article

  • Is there a version of the removeElement function in Go for the vector package like Java has in its V

    - by Brian T Hannan
    I am porting over some Java code into Google's Go language and I converting all code except I am stuck on just one part after an amazingly smooth port. My Go code looks like this and the section I am talking about is commented out: func main() { var puzzleHistory * vector.Vector; puzzleHistory = vector.New(0); var puzzle PegPuzzle; puzzle.InitPegPuzzle(3,2); puzzleHistory.Push(puzzle); var copyPuzzle PegPuzzle; var currentPuzzle PegPuzzle; currentPuzzle = puzzleHistory.At(0).(PegPuzzle); isDone := false; for !isDone { currentPuzzle = puzzleHistory.At(0).(PegPuzzle); currentPuzzle.findAllValidMoves(); for i := 0; i < currentPuzzle.validMoves.Len(); i++ { copyPuzzle.NewPegPuzzle(currentPuzzle.holes, currentPuzzle.movesAlreadyDone); copyPuzzle.doMove(currentPuzzle.validMoves.At(i).(Move)); // There is no function in Go's Vector that will remove an element like Java's Vector //puzzleHistory.removeElement(currentPuzzle); copyPuzzle.findAllValidMoves(); if copyPuzzle.validMoves.Len() != 0 { puzzleHistory.Push(copyPuzzle); } if copyPuzzle.isSolutionPuzzle() { fmt.Printf("Puzzle Solved"); copyPuzzle.show(); isDone = true; } } } } If there is no version available, which I believe there isn't ... does anyone know how I would go about implementing such a thing on my own?

    Read the article

  • iPad launch orientation

    - by Brian
    After reading many posts, I still haven't got a clue how to solve this problem... The first view of my app is a tableViewController. I override (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation and it always returns YES. If I hold my iPad upright under landscape orientation, it rotates right after I launch the app. However, if I put my iPad flat on the table, even though my homepage is in landscape orientation, it launches in protrait orientation. So I guess the problem is, how can I get the orientation of my homepage and launch my app with that orientation?

    Read the article

  • Formatting Controls in ASP.NET

    - by Brian
    I feel as though this this is a simple question, but can't find an answer anywhere. We've got an interface we're trying to move to an ASP.NET control. It currently looks like: <link rel=""stylesheet"" type=""text/css"" href=""/Layout/CaptchaLayout.css"" /> <script type=""text/javascript"" src=""../../Scripts/vcaptcha_control.js""></script> <div id="captcha_background"> <div id="captcha_loading_area"> <img id="captcha" src="#" alt="" /> </div> <div id="vcaptcha_entry_container"> <input id="captcha_answer" type="text"/> <input id="captcha_challenge" type="hidden"/> <input id="captcha_publickey" type="hidden"/> <input id="captcha_host" type="hidden"/> </div> <div id="captcha_logo_container"></div> </div> However all the examples I see of ASP.NET controls that allow for basical functionality - i.e. public class MyControl : Panel { public MyControl() { } protected override void OnInit(EventArgs e) { ScriptManager.RegisterScript( ... Google script, CSS, etc. ... ); TextBox txt = new TextBox(); txt.ID = "text1"; this.Controls.Add(txt); CustomValidator vld = new CustomValidator(); vld.ControlToValidate = "text1"; vld.ID = "validator1"; this.Controls.Add(vld); } } Don't allow for the detailed layout that we need. Any suggestions on how I can combine layout and functionality and still have a single ASP control we can drop in to pages? The ultimate goal is for users of the control to just drop in: <captcha:CaptchaControl ID="CaptchaControl1" runat="server" Server="http://localhost:51947/" /> and see the working control. Sorry for the basic nature of this one, any help is greatly appreciated.

    Read the article

  • Equivalent of valign=center for <p> with css

    - by Brian
    I have the following code on my page: <p align="justify" style="font-size:10pt;display:block;height:200px;vertical-align:middle;"> Content </p> I want the text to be vertically aligned in the center of the p tag, but vertical-align:middle doesn't seem to be doing the trick. Is there a way to do this?

    Read the article

  • Should you remove all warnings in your Verilog or VHDL design? Why or why not?

    - by Brian Carlton
    In (regular) software I have worked at companies where the gcc option -Wall is used to show all warnings. Then they need to be dealt with. With non-trivial FPGA/ASIC design in Verilog or VHDL there are often many many warnings. Should I worry about all of them? Do you have any specific techniques to suggest? My flow is mainly for FPGAs (Altera and Xilinx in particular), but I assume the same rules would apply to ASIC design, possibly more so due to the inability to change the design after it is built.

    Read the article

  • Reading data from a socket, considerations for robustness and security

    - by w.brian
    I am writing a socket server that will implement small portions of the HTTP and the WebSocket protocol, and I'm wondering what I need to take into consideration in order to make it robust/secure. This is my first time writing a socket-based application so please excuse me if any of my questions are particularly naive. Here goes: Is it wrong to assume that you've received an entire HTTP request (WebSocket request, etc) if you've read all data available from the socket? Likewise, is it wrong to assume you've only received one request? Is TCP responsible for making sure I'm getting the "message" all at once as sent by the client? Or do I have to manually detect the beginning and end of each "message" for whatever protocol I'm implementing? Regarding security: What, in general, should I be aware of? Are there any common pitfalls when implementing something like this? As always, any feedback is greatly appreciated.

    Read the article

  • Adding resources to solution explorer in experimental hive

    - by Brian Webb
    Hi, I'm currently working on a project using DSL tools in Visual Studio 2008. Is there a way to automatically add a resource into the solution explorer of the experimental hive at runtime? I'm creating new diagrams based on what is on screen, and saving them into the directory the project is stored in. I would like to know if there is a way to get them to automatically get added to the solution explorer? (I don't want to have to drag the files in manually each time)

    Read the article

  • A Question About Embedding HTML In PHP

    - by Brian
    Hello all Some time ago I read a posting on a board where the person was talking poorly about people that have HTML embedded/within their PHP. I do quite a bit of PHP development but I still interleave HTML and PHP in the same document. Is there a better way to do this, am I doing it wrong? I know that in JSP/JSF they use an XML document with namespaces to insert their HTML code so I was wondering if there was a similar function that PHP uses that I should be taking advantage of. Thanks for taking the time to read. :-)

    Read the article

  • What is actually happening to this cancelled HTTP request?

    - by Brian Schroth
    When a user takes a particular action on a page, an AJAX call is made to save their data. Unfortunately, this call is synchronous as they need to wait to see if the data is valid before being allowed to continue. Obviously, this eliminates a lot of the benefit of using Asynchronous Javascript And XML, but that's a subject for another post. That's the design I'm working with. The request is made using the dojo.xhrPost function, with a 60s timeout parameter, and the error handler redirects to an error page. What I am finding in testing is that in Firefox, if I initiate the ajax request and then press ESC, the page hangs waiting for a response, and then eventually after exactly 90s (not 60s, the function's timeout), the error handler will kick in and redirect to the error page. I expected this to happen, but either immediately as soon as the request was cancelled, or after 60s due to the timeout value being 60s. What I don't understand is why is it 90s? What is actually happening under the hood when the user cancels their request in Firefox, and how does it differ from IE, where everything works fine exactly the same as if the request had not been cancelled? Is the 90s related to any user-configurable browser settings?

    Read the article

  • why doesn't winmain set the errorlevel?

    - by Brian R. Bondy
    int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { MessageBox(NULL, _T("This should return 90 no?"), _T("OK"), MB_OK); return 90; } Why does the above program correctly display the message box, but does not set the error level? I compile this program to the name a.exe. Then from command prompt I type: c:\> a.exe (message box is displayed, I press ok) c:\> echo %ERRORLEVEL% 0 I get the same results if I do exit(90); right before the return. It still says 0. I also tried to start the program via CreateProcess and obtain the result with GetExitCodeProcess but it also returns 0 to me. I did error checking to ensure it was all started correctly. I originally seen this problem in a more complex program. But made this simple program to verify the problem. Results are the same, both programs that have WinMain return 0 always. I tried both x64, x86 and unicode and MBCS compiling options. All give 0 as an error level/status code.

    Read the article

  • In LaTeX, how can one add a header/footer in the document class Letter?

    - by Brian M. Hunt
    In LaTeX, how can one create a document using the Letter documentclass, but with customized headers and footers? Typically I would use: \usepackage{fancyhdr} \pagestyle{fancy} \lhead{\footnotesize \parbox{11cm}{Custom left-head-note} } \lfoot{\footnotesize \parbox{11cm}{\textit{#2}}} \rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}} \renewcommand\headheight{24pt} \renewcommand\footrulewidth{0.4pt} However, with \documentclass{letter}, this doesn't work at all. Suggestions are duly appreciated. EDIT: Here is sample code that doesn't work (for any apparent reason): \documentclass[12pt]{letter} \usepackage{fontspec}% font selecting commands \usepackage{xunicode}% unicode character macros \usepackage{xltxtra} % some fixes/extras % page counting, header/footer \usepackage{fancyhdr} \usepackage{lastpage} \pagestyle{fancy} \lhead{\footnotesize \parbox{11cm}{Draft 1} } \lfoot{\footnotesize \parbox{11cm}{\textit{2}}} \cfoot{} \rhead{\footnotesize 3} \rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}} \renewcommand{\headheight}{24pt} \renewcommand{\footrulewidth}{0.4pt} \begin{document} \name{ Joe Laroo } \signature{ Joe Laroo } \begin{letter}{ To-Address } \renewcommand{\today}{ February 16, 2009 } \opening{ Opening } Content of the letter. \closing{ Yours truly, } \end{letter} \end{document}

    Read the article

  • Convert a Delphi example using TDatabase and local paradox table to server storage

    - by Brian Frost
    I am looking at the Developer Express Quantum Grid example 'IssueList' which is a useful bug reporting and tracking application that's almost ready to go out of the box. It uses a TDatabase component with several paradox (.db) tables. Is it simple to rejig the TDatabase settings to use a database on a shared machine so that several of us can access it together across the network? If so, what would be the steps needed please?

    Read the article

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