Daily Archives

Articles indexed Thursday May 13 2010

Page 1/119 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Self hosted WCF ServiceHost/WebServiceHost Concurrency/Peformance Design Options (.NET 3.5)

    - by Kyle
    So I'll be providing a few functions via a self hosted (in a WindowsService) WebServiceHost (not sure how to process HTTP GET/POST with ServiceHost), one of which may be called a large amount of the time. This function will also rely on a connection in the appdomain (hosted by the WindowsService so it can stay alive over multiple requests). I have the following concerns and would be oh so thankful for any input/thoughts/comments: Concurrent access - how does the WebServiceHost handle a bunch of concurrent requests. Are they queued and processes sequentially or are new instances of the contracts automagically created? WebServiceHost - WindowsService communication - I need some form of communication from the WebServiceHost to the hosting WindowsService for things like requesting a new session if one does not exist. Perhaps implementing a class which extends the WebServiceHost with events which the WindowsService subscribes to... (unless there is another way I can set off an event in the WindowsService when a request is made...) Multiple WebServiceHosts or Contracts - Would it give any real performance gain to be running multiple WebServiceHost instances in different threads (one per endpoint perhaps?) - A better understanding of the first point would probably help here. WSDL - I'm not sure why (probably just need to do more reading), but I'm not sure how to get the WebServiceHost base endpoint to respond with a WDSL document describing the available contract. Not required as all the operations will be done via GET requests which will not likely change, but it would be nice to have... That's about it for the moment ;) I've been reading a lot on WCF and wish I'd gotten into it long ago, but definitely still learning.

    Read the article

  • Comparison of ASP.Net Reporting Solutions

    - by Brian MacKay
    This week my team spent way too much time trying to do simple things in reporting services, and I've decided to start evaluating other options. I know there are some good options out there now that aren't too expensive. I've heard that Telerik, ActiveReports, and a few others are widely used. I was hoping to get some first hand accounts regarding reporting tools that you've used. Specifically, I definitely want to hear your thoughts about: Pain points and gotchas you ran into. Ease of use for report design. It's a little bizarre to me that Access still seems to hold the throne in this area! What's your favorite tool? Anything I've missed that seems important to you. Thanks a lot!

    Read the article

  • createSQLXML() AbstractMethodError (with DB2XADataSource?)

    - by Mike
    Environment: WASCE 2.0.0.4 (aka geronimo 2.1) db2jcc4.jar 4.3.85 (tried 4.8.x as well) tranql-connector-db2-xa 1.4 (tried 1.5 as well) SQLXML xml = c.createSQLXML(); Struggling with java.lang.AbstractMethodError: java/sql/ResultSet.getSQLXML(I)Ljava/sql/SQLXML; at [snip] at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56) at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406) at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) at org.apache.geronimo.tomcat.valve.ThreadCleanerValve.invoke(ThreadCleanerValve.java:40) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:736) It happens the connection handle is acquired via JNDI only. Works fine with the connection handle is acquired the traditional way. I made sure it is not a jar/version/classloading issue. got hints?

    Read the article

  • Rails, gmail: howto get plain/text from body

    - by atmorell
    Hello, I am loading am email with IMAP and parsing it with mail. This works very well, however the mail.body.decoded field contains a lot of formatting. How do I dig out the plain/txt body of the email - ignore attachements, formatting etc. It works fine if I try with an email without html. source = imap.uid_fetch(uid, ['RFC822']).first.attr['RFC822'] mail = Mail.new(source) This body content looks like this: Mail::Body:0x7f36ed468270 @epilogue="", @boundary="_004_4C49171DCB8C4540844E69DD39FDD98Ffirm_", @encoding="7bit", @raw_source="--_004_4C49171DCB8C4540844E69DD39FDD98Ffirm_\r\nContent-Type: multipart/alternative;\r\n\tboundary=\"_000_4C49171DCB8C4540844E69DD39FDD98Ffirm_\"\r\n\r\n--_000_4C49171DCB8C4540844E69DD39FDD98Ffirm_\r\nContent-Type: text/plain; charset=\"iso-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\ndasdsasda\r\n\r\n\r\n\r\nMed venlig hilsen / Med V=E4nlig H=E4lsning / Best Regards\r\r\nAsbj=F8rn Toke Morell. .\r\n+45 7020 0160\r\n+45 2152 0015\r\n[cid:[email protected]]\r\nhttp://www..dk\r\n\r\n\r\n--_000_4C49171DCB8C4540844E69DD39FDD98Ffirm_\r\nContent-Type: text/html; charset=\"iso-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n<html>headheadbody style3D"word-wrap: break-word; -webkit-nbsp-mode:=\r\n space; -webkit-line-break: after-white-space; ">dasdsasda<br><div apple-co=\r\nntent-edited=3D"true">\r\n<span class=3D"Apple-style-span" style=3D"border-collapse: separate; color:=\r\n rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: norma=\r\nl; font-variant: normal; font-weight: normal; letter-spacing: normal; line-=\r\nheight: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transf=\r\norm: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-borde=\r\nr-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-te=\r\nxt-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-tex=\r\nt-stroke-width: 0px; "><span class=3D"Apple-style-span" style=3D"font-famil=\r\ny: Calibri, sans-serif; font-size: 15px; "><span class=3D"Apple-style-span"=\r\n style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: Helv=\r\netica; font-size: medium; font-style: normal; font-variant: normal; font-we=\r\night: normal; letter-spacing: normal; line-height: normal; orphans: 2; text=\r\n-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-sp=\r\nacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical=\r\n-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-=\r\nadjust: auto; -webkit-text-stroke-width: 0px; "><span class=3D"Apple-style-=\r\nspan" style=3D"font-family: Calibri, sans-serif; font-size: 15px; "><div st=\r\nyle=3D"margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-=\r\nleft: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><font class=\r\n=3D"Apple-style-span" color=3D"#000080" face=3D"'Times New Roman', serif" s=\r\nize=3D"3"><span class=3D"Apple-style-span" style=3D"font-size: 13px; "><br =\r\nclass=3D"Apple-interchange-newline"><br></span></font></div><div style=3D"m=\r\nargin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0c=\r\nm; font-size: 11pt; font-family: Calibri, sans-serif; "><font class=3D"Appl=\r\ne-style-span" color=3D"#000080" face=3D"'Times New Roman', serif" size=3D"3=\r\n"><span class=3D"Apple-style-span" style=3D"font-size: 13px; "><br></span><=\r\n/font></div><div style=3D"margin-top: 0cm; margin-right: 0cm; margin-bottom=\r\n: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-s=\r\nerif; "><span style=3D"font-size: 10pt; font-family: 'Times New Roman', ser=\r\nif; color: navy; ">Med venlig hilsen / Med V=E4nlig H=E4lsning / Best Regar=\r\nds&nbsp;<br>firm<br>Asbj=F8rn Toke Morell... This is the ony relevant from information from the body: 'ndasdsasda\r\n\r\n\r\n\r\nMed venlig hilsen / Med V=E4nlig H=E4lsning / Best Regards\r\r\nAsbj=F8rn Toke Morell' Any ideas?

    Read the article

  • Are the svn ruby bindings provided as a gem?

    - by user30997
    I see a couple dozen gems that relate to svn, but what little documentation I can find on any of them shows that they are command-line wrappers and misc helpers. (svn-command, svn-hooks, etc.) I've seen code in the wild that does things like: require 'svn/core' and SVN.Repos.add(...), but the author of that module pulled his svn ruby tools via apt-get. This would not be an option for me, as I'm developing a windows/osx tool. Which gem am I after? From there, I'm happy to dig through code in lieu of documents, but with a call to gem query --name-matches svn --remote returning about 30 hits, I need to narrow it down a bit first.

    Read the article

  • Spring MVC defaultValue for Double

    - by mlathe
    Hi All, I'm trying to build a controller like this: @RequestMapping(method = {RequestMethod.GET}, value = "/users/detail/activities.do") public View foo(@RequestParam(value = "userCash", defaultValue="0.0") Double userCash) { System.out.println("foo userCash=" + userCash); } This works fine: http://localhost/app/users/detail/activities.do?userCash=123& but in this one userCash==null despite the default value http://localhost/app/users/detail/activities.do?userCash=& From some digging it seems like the first one works b/c of a Editor binding like this: binder.registerCustomEditor(Double.class, new CustomNumberEditor(Double.class, false)); The trouble is that the second param (ie false) defines whether blank values are allowed. If i set that to true, than the system considers the blank input as valid so i get a null Double class. If i set it to false then the system chokes on the blank input string with: org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'double'; nested exception is java.lang.NumberFormatException: empty String Does anyone know how to get the defaultValue to work for Doubles? Thanks --Matthias

    Read the article

  • Is there such a tool for testing

    - by kjack
    Say one has a structural codebase where lots of the code is in GUI control events and has no tests. So such code, to my knowledge is not suitable for unit testing Is there a tool that can test each routine automatically replacing references to code elements external to the routine (be they functions, variables or GUI controls) with appropriate mocks(?) and record the results in a database for later comparison after code changes? So the testing program would have the duty of writing, running and reporting tests with minimal intervention?

    Read the article

  • Only send populated object properties over WCF?

    - by dlanod
    I have an object that is being sent across WCF that is essentially a property holder - it can potentially have a large number of properties, i.e. up to 100, but in general only a small subset will be set, up to 10 for instance. Example: [DataContract(Namespace = "...")] public class Monkey { [DataMember] public string Arms { get; set; } [DataMember] public string Legs { get; set; } [DataMember] public string Heads { get; set; } [DataMember] public string Feet { get; set; } [DataMember] public string Bodies { get; set; } /* repeat another X times */ } Is there a way to tell WCF to only send the populated properties over the wire? It seems like a potential waste of bandwidth to send over the full object.

    Read the article

  • Sending email from various domains

    - by IMHO
    We are building hosted software service that is used by multiple customers. These customers want to communicate with their customers (end customer). So, today we send it from our domain: example.com However, we would like to send email to come from their specific domains. When we put their customer emails in Reply-To - it shows up as "on behalf" in clients like outlook. What are the ways to send email from their domain without installing software on their network?

    Read the article

  • [PyGTK] How to Create a Multiline Button

    - by EShull
    I'm trying to create a multiline button with PyGTK. I have a label added to my subclass of gtk.Button, but I'm having trouble sizing the label to the button. If the label makes it's own size, there is no text wrapping even with label.set_line_wrap(True) because the label simply resizes beyond the bounds of the button. I would set the size of the label to that of the button, but unless I explicitly set the size of the button using set_size_request, I haven't been able to find out how big the button is (it's packed in a table). Any suggestions?

    Read the article

  • How to allow tap-to-focus on the camera using an overlay

    - by AJJ
    The standard 3GS iPhone camera includes tap-to-focus (I can tap to the region I want to focus on). However when I use a custom overlay using the UIImagePickerController class, the tap to focus does not seem to work. Everything else in terms of capturing images programmatically etc is working btw. Note that my overlay view is only a small rectangle (UIView) at the bottom of the screen. It does not cover the other areas of the camera. So I believe the taps should go through (unless I am missing something). I have seen other apps use an overlay and still provide a tap-to-focus functionality, so there must be a way to do this. I use all the default controls set to be hidden as: imagePicker.showsCameraControls = NO; imagePicker.toolbarHidden = YES; imagePicker.navigationBarHidden = YES; Of course changing the above does not let me tap-to-focus (it just enables the toolbars, etc). I could not find any answers on the UIImagePickerController class reference. Any help would be greatly appreciated. Thanks!

    Read the article

  • sql query for 3 tables

    - by greffe
    i have 3 tables (A,B,C) Table A - ID Name 1 Sam 2 Manuel 3 Jane Table B ID Tab_A_ID Name 1 1 Meer 2 1 Kutti 3 2 Mikaro Table C ID Tab_B_ID Price 1 1 255.11 2 1 30.52 3 3 125.22 I need a query that shall pick up the top price for TableA-Name from TableC. So only 1 top price for 1 nae record. e.g.- Sam - 255.11 Manuel - 125.22 How can i get this?

    Read the article

  • How to befriend a templated class's constructor?

    - by Kyle
    Why does class A; template<typename T> class B { private: A* a; public: B(); }; class A : public B<int> { private: friend B<int>::B<int>(); int x; }; template<typename T> B<T>::B() { a = new A; a->x = 5; } int main() { return 0; } result in ../src/main.cpp:15: error: invalid use of constructor as a template ../src/main.cpp:15: note: use ‘B::B’ instead of ‘B::class B’ to name the constructor in a qualified name yet changing friend B<int>::B<int>() to friend B<int>::B() results in ../src/main.cpp:15: error: no ‘void B::B()’ member function declared in class ‘B’ while removing the template completely class A; class B { private: A* a; public: B(); }; class A : public B { private: friend B::B(); int x; }; B::B() { a = new A; a->x = 5; } int main() { return 0; } compiles and executes just fine -- despite my IDE saying friend B::B() is invalid syntax?

    Read the article

  • MSSQL EXPRESS 2008 Stored Procedure execution time spikes periodically

    - by user156241
    I have a big stored procedure on a MSSQL 2008 Express SP2 database that gets run about every 200 ms. Normal execution time is about 50ms. What I am seeing is large inconsistencies in this run time. It will execute for while, say 50-100 times at 40-60ms which is expected, then seemingly at random the same stored procedure will take way longer, say 900ms or 1.5 seconds to run. Sometimes more than one call of the same procedure in a row will take longer too. It appears that something is causing sql server to slow down dramatically every minute or so, but I can't figure out what. There is no timing pattern between the occurences. I have the same setup on two different computers, one of which is a clean XP Pro load with no virus checking and nothing installed except SQL server. Also, The recovery options for all the databases are set to "Simple".

    Read the article

  • Image map popup on rollover, with popup text drawn from database

    - by lbholland
    I have a custom map of the USA with about 20 polygonal hot spots. I would like a box to pop up next to each hot spot on hover, with text and links drawn from my DB specific to the location. I would have thought this is a common situation, but I can't find a solution that works. I tried using an asp:imagemap and an ajax popup extender but you can't assign IDs to hotspots and it doesn't support mouseover events. I tried css with an html image map but I can't figure out how to use css solutions with polygonal hot spots, and I also don't know how to link it to get the data from the db without asp targets (I'm not very familiar with jquery, which would work, I am guessing). Anyone know of any simple-ish solutions out there?

    Read the article

  • Webkit iPhone App : How to dynamically change the user zoom (or scale, pich & zoom) in the viewport

    - by Samuel Michelot
    I use JQTouch for an iPhone app. JQtouch disable by default the possibility to pinch&zoom the page. For one page (containing a big image), i need to enable the pinch & zoom feature. This is easy : var viewport = $("head meta[name=viewport]"); viewport.attr('content', 'width=320, initial-scale=1, maximum-scale=10.0, minimum-scale=1, user-scalable=1'); But after user has play with the pinch & zoom, I need to dynamically reset the zoom (scale) to the default. I tried to reset the viewport: viewport.attr('content', 'width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;'); After calling the above code, it's not possible to zoom anymore (because of user-scalable=0;), but it doesn't change the current scale to the default. I am looking for something like setScale(1), or to change an attribute like current-scale=1 Any idea ?

    Read the article

  • SQL - .NET - SqlParameters - AddWithValue - Are there any negative performance implications when Par

    - by hamlin11
    http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlparametercollection.addwithvalue.aspx I'm used to adding sql parameters to a sqlCommand using the add() function. This allows me to specify the type of the sqlParameter, but it requires another line to set the value. It's nice to use the AddWithValue function, but it skips the "specify the parameter type" step. I'm guessing this causes the parameters to be sent over as strings contained within single quotes (''), but I'm not sure. Is this the case, and does this cause significantly slower performance of the stored procedures? Note: I understand that it is nice to validate user data on the .NET side of things by specifying the data type for params -- I'm only concerned about reflection-type overhead of AddWithValue either on the .NET or SQL side.

    Read the article

  • Powerful search-replace GUI app for Mac?

    - by fig-gnuton
    What's the best dedicated search-and-replace GUI tool on a Mac? "Find & Replace It!" seems decent, but they've ridiculously disabled the replace function in the demo, so I can't give it a real test before paying. Is there anything else comparable or better?

    Read the article

  • Windows Cannot Boot - 0xc0000225

    - by B__
    I've had Windows 7 installed for months on my Thinkpad T60 laptop and today out of the blue when I tried to boot, it started the Windows loading screen and immediately I got this error: Status: 0xc0000225 Info: The boot selection failed because a required device is inaccessible. Through some research, I see people get this problem when a repartitioning goes wrong or there's a problem with their dual boot. I'm not dual booting my machine and I haven't messed with my partitions since I installed the OS. This error is truly out of the blue. I've run memory diagnostics from a Windows boot disc and hard drive diagnostics from my BIOS and neither found a problem. I don't have any backups to restore from so I'm hoping to find a fix for this. Anyone seen this kind of thing before? Thanks

    Read the article

  • What Gets Measured Gets Managed

    - by steve.diamond
    OK, so if I were to claim credit for inventing that expression, I guess I could share the mantle with Al Gore, creator of the Internet. But here's the point: How many of us acquire CRM systems without specifically benchmarking several key performance indicators across sales, marketing and service BEFORE and AFTER deployment of said system? Yes, this may sound obvious and it might provoke the, "Well of course, Diamond!" response, but is YOUR company doing this? Can you define in quantitative terms the delta across multiple parameters? I just trolled the Web site of one of my favorite sales consultancy firms, The Alexander Group. Right on their home page is a brief appeal citing the importance of benchmarking. The corresponding landing page states, "The fact that hundreds of sales executives now track how their sales forces spend time means they attach great value to understanding how much time sellers actually devote to selling." The opportunity is to extend this conversation to benchmarking the success that companies derive from the investment they make in CRM systems, i.e., to the automation side of the equation. To a certain extent, the 'game' is analogous to achieving optimal physical fitness. One may never quite get there, but beyond the 95% threshold of "excellence," she/he may be entering the realm of splitting infinitives. But at the very start, and to quote verbiage from the aforementioned Alexander Group Web page, what gets measured gets managed. And getting to that 95% level along several key indicators would be a high quality problem indeed, don't you think? Yes, this could be a "That's so 90's" conversation, but is it really?

    Read the article

  • SVN Workflow - Chicken Before the Egg - Before merging V1 with V2, I need code from V1 to work on V2

    - by Jake
    Hi, Our distributed team (3 internal devs and 3+ external devs) use SVN to manage our codebase for a web site. We have a branch for each minor version (4.1.0, 4.1.1, 4.1.2, etc...). We have a trunk which we merge each version into when we do a release and publish to our site. An example of the problem we are having is thus: A new feature is added, lets call it "Ability to Create A Project" to 4.1.1. Another feature which depends on the one in 4.1.1 is scheduled to go in 4.1.2, called "Ability to Add Tasks to Projects". So, on Monday, we say 4.1.1 is 'closed' and needs to be tested. Our remote developers usually will start working on features/tickets for 4.1.2 at this point. Throughout the week we will test 4.1.1 and fix any bugs and commit them back to 4.1.1. Then, on Friday or so, we will tag 4.1.1, merge it with trunk, and finally, merge it with 4.1.2. But, for the 4-5 days we are testing, 4.1.2 doesn't have the code from 4.1.1 that some of the new features for 4.1.2 depend on. So a dev who is adding the "Ability to Add Tasks To Projects" feature, doesn't have the "Ability to Create a Project" feature to build upon, and has to do some file copy shenanigans to be able to keep working on it. What could/should we do to smooth out this process? P.S. Apologies if this question has been asked before - I did search but couldn't find what I'm looking for.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >