text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
the responsibilty of something it wasn't primarily designed for or doing some other ad-hoc thing that dilute the simplicity of an object, then violate whatever principle you want. But I find that it's easier to get SRP correct then to do something more elaborate that is just as robust.
[ 0.05567128211259842, 0.22897717356681824, 0.02574964053928852, 0.048384860157966614, -0.23361288011074066, 0.04143853485584259, 0.6531873941421509, -0.5392087697982788, 0.09026060253381729, -0.4249646067619324, -0.03411940857768059, 0.7047773003578186, 0.08326428383588791, -0.0678411200642...
In my example below I'm using a `dijit.form.DateTextBox`: ``` <input type="text" name="startDate" dojoType="dijit.form.DateTextBox" constraints="{datePattern:'MM/dd/yyyy'}" value='<c:out value="${sessionScope.adminMessageForm.startDate}"/>' /> ``` So for example, if the user starts to enter "asdf" into the date the field turns yellow and a popup error message appears saying `The value entered is not valid.`. Even if I remove the `constraints="{datePattern:'MM/dd/yyyy'}"` it still validates. Without going into details as to why, I would like to be able keep the dojoType and still prevent validation in particular circumstances. Try overriding the validate method in your markup. This will work (just tested): ``` <input type="text" name="startDate" dojoType="dijit.form.DateTextBox" constraints="{datePattern:'MM/dd/yyyy'}" value='<c:out value="${sessionScope.adminMessageForm.startDate}"/>'
[ 0.27620750665664673, 0.07834313809871674, 0.677693247795105, -0.26344120502471924, 0.055222973227500916, -0.39786824584007263, 0.23376667499542236, -0.3198481798171997, -0.0020027265418320894, -0.5009931325912476, -0.2283036708831787, 0.5217790603637695, -0.03756553307175636, 0.09234425425...
validate='return true;' /> ```
[ 0.15180736780166626, 0.3393579423427582, 0.20787619054317474, 0.1348515897989273, -0.027022842317819595, -0.3372485041618347, 0.6919817328453064, -0.32709118723869324, 0.39837488532066345, -0.06893954426050186, -0.3157959580421448, 0.7234861254692078, -0.09450044482946396, 0.05791855603456...
If I press `Ctrl`+`B` that ought to give me ASCII code 2, but `Ctrl`+`C` is going to be interpreted as a Break. So I figure I've got to redirect a file in. How do I get these characters into a file? `Ctrl`-`V` escapes the next keystoke. That's how you can get a `Ctrl`-`C` out: `Ctrl`-`V` `Ctrl`-`C`
[ -0.03443988412618637, 0.1958330124616623, 0.3145502805709839, -0.06725048273801804, 0.19768933951854706, 0.19823084771633148, 0.473418265581131, -0.199714794754982, -0.2876228392124176, -0.2871711254119873, -0.2897481918334961, 0.45186474919319153, -0.03433902934193611, -0.0642946735024452...
I understand what [System.WeakReference](http://msdn.microsoft.com/en-us/library/ms404247.aspx) does, but what I can't seem to grasp is a practical example of what it might be useful for. The class itself seems to me to be, well, a hack. It seems to me that there are other, better means of solving a problem where a WeakReference is used in examples I've seen. What's the canonical example of where you've really got to use a WeakReference? Aren't we trying to get *farther* away from this type of behavior and use of this class? One useful example is the guys who run DB4O object oriented database. There, WeakReferences
[ 0.19417282938957214, -0.10186309367418289, -0.10830141603946686, 0.32502973079681396, -0.29651132225990295, -0.21625201404094696, 0.3825457990169525, 0.4193449020385742, -0.23247133195400238, -0.5440738797187805, 0.10446499288082123, 0.40553852915763855, -0.22025437653064728, 0.23217177391...
are used as a kind of light cache: it will keep your objects in memory only as long as your application does, allowing you to put a real cache on top. Another use would be in the implementation of weak event handlers. Currently, one big source of memory leaks in .NET applications is forgetting to remove event handlers. E.g. ``` public MyForm() { MyApplication.Foo += someHandler; } ``` See the problem? In the above snippet, MyForm will be kept alive in memory forever as long as MyApplication is alive in memory. Create 10 MyForms, close them all, your 10 MyForms will still be in
[ 0.29580366611480713, 0.14103208482265472, 0.18664424121379852, 0.10445863753557205, 0.048831645399332047, -0.03979064151644707, 0.4723277986049652, 0.2369462251663208, -0.29511457681655884, -0.7832614183425903, -0.2476823329925537, 0.28534066677093506, -0.2338114082813263, 0.37039205431938...
memory, kept alive by the event handler. Enter WeakReference. You can build a weak event handler using WeakReferences so that someHandler is a weak event handler to MyApplication.Foo, thus fixing your memory leaks! This isn't just theory. Dustin Campbell from the DidItWith.NET blog posted [an implementation of weak event handlers](http://diditwith.net/PermaLink,guid,aacdb8ae-7baa-4423-a953-c18c1c7940ab.aspx) using System.WeakReference.
[ 0.06323997676372528, -0.044773999601602554, -0.2097126990556717, 0.13493309915065765, -0.03120552748441696, 0.14346660673618317, 0.48958611488342285, -0.13513344526290894, -0.24874991178512573, -0.3340860903263092, -0.07094823569059372, 0.3983387053012848, -0.4883970618247986, -0.029554776...
I have a few C# `.dll` projects which are common to many applications. Currently, I have one big repository. I have each DLL stored as a separate project within the repository and every application project stored as a project within the same repository. I recently switched to Subversion for source control and I fear that I did not do a good job of structuring the repository. I would like to hear what others are doing. using the branch/trunk/tag repository structure is pretty standard, but if I'm understanding you properly, your issue is that you have a set of common dll projects that
[ 0.5132025480270386, 0.12586073577404022, 0.12912841141223907, -0.038726806640625, -0.2767179012298584, -0.4206653833389282, 0.1495911180973053, 0.27550968527793884, -0.28663501143455505, -0.37925976514816284, -0.07508617639541626, 0.44258803129196167, -0.3941568434238434, 0.491700798273086...
get used across multiple projects. This can definately become tricky to manage. So the typical scenario here is that you have some class library called Common.Helpers that has code that is common to all your applications. Let's say I'm starting a new application called StackOverflow.Web that needs to reference Common.Helpers. Usually what you would do is create a new solution file and add a new project called Stackoverflow.Web and add the existing Common.Helpers project and then reference it from the new Stackoverflow.Web project. What I usually try and do is create a repository for the Common.Helpers project and then in subversion reference it as
[ 0.3076452314853668, 0.014073316007852554, 0.2597900927066803, 0.3329896032810211, 0.045647118240594864, -0.19795078039169312, -0.0704483836889267, -0.050276998430490494, -0.4551214873790741, -0.7216687202453613, 0.13356441259384155, 0.36102232336997986, -0.33050858974456787, 0.482096850872...
an [external](http://svnbook.red-bean.com/en/1.1/ch07s04.html). That way you can keep the code under source control in a single location, but still use it seperately in multiple projects.
[ 0.38704797625541687, 0.11338721215724945, 0.14493663609027863, -0.05844642221927643, -0.16525980830192566, -0.10177984088659286, 0.24920174479484558, -0.03997761011123657, -0.21486948430538177, -0.4868086278438568, -0.3490157723426819, 0.3569898009300232, -0.1910575032234192, 0.16130708158...
So, you are all ready to do a big SVN Commit and it bombs because you have inconsistent line endings in some of your files. Fun part is, you're looking at 1,000s of files spanning dozens of folders of different depths. What do you do? I don't think the [pre-commit](http://svnbook.red-bean.com/nightly/en/svn.ref.reposhooks.pre-commit.html) hook can actually change the data that is being committed - it can disallow a commit, but I don't think it can do the conversion for you. It sounds like you want the [property](http://svnbook.red-bean.com/nightly/en/svn.ref.properties.html) 'svn:eol-style' set to 'native' - this will automatically convert newlines to whatever is used on your platform (use 'CRLF',
[ 0.3589688539505005, -0.43101271986961365, 0.43629035353660583, 0.011699740774929523, 0.07263355702161789, -0.369058221578598, 0.30208882689476013, -0.39527666568756104, -0.17402321100234985, -0.5842052102088928, -0.014179994352161884, 0.5840663909912109, -0.16701002418994904, -0.0083087142...
'CR' or 'LF' to get those regardless of what the OS wants). You can use [auto-properties](http://subversion.apache.org/faq.html#auto-props) so that all future files you create will have this property set (auto props are handled client-side, so you'd have to set this up for each user).
[ 0.48153936862945557, 0.029433920979499817, 0.4905638098716736, 0.08715272694826126, 0.1878747045993805, 0.07859332114458084, -0.27942028641700745, -0.27724772691726685, -0.5051063299179077, -0.48654457926750183, -0.32537972927093506, 0.6116489768028259, -0.16066226363182068, 0.059650219976...
It's been mentioned to me that I'll be the sole developer behind a large new system. Among other things I'll be designing a UI and database schema. I'm sure I'll receive some guidance, but I'd like to be able to knock their socks off. What can I do in the meantime to prepare, and what will I need to keep in mind when I sit down at my computer with the spec? A few things to keep in mind: I'm a college student at my first real programming job. I'll be using Java. We already have SCM set up with automated testing,
[ 0.766574501991272, 0.22776208817958832, 0.22220276296138763, 0.13070815801620483, 0.2526950538158417, -0.18016761541366577, 0.0523952879011631, -0.019893310964107513, -0.2617000639438629, -0.6860601305961609, 0.10439614951610565, 0.5636826753616333, 0.38667526841163635, -0.1434756368398666...
etc...so tools are not an issue. Do you know much about OOP? If so, look into Spring and Hibernate to keep your implementation clean and [orthogonal](http://codebetter.com/blogs/jeremy.miller/archive/2007/01/08/Orthogonal-Code.aspx). If you get that, you should find TDD a good way to keep your design compact and lean, especially since you have "automated testing" up and running. UPDATE: Looking at the first slew of answers, I couldn't disagree more. Particularly in the Java space, you should find plenty of mentors/resources on working out your application with Objects, **not a database-centric approach**. Database design is typically the first step for Microsoft folks (which I do daily, but am
[ 0.5816425085067749, -0.17329277098178864, -0.1460813730955124, 0.23676961660385132, -0.3939427435398102, -0.26667800545692444, 0.2188510298728943, -0.22387835383415222, -0.09506147354841232, -0.5871299505233765, -0.019126908853650093, 0.6080371141433716, 0.14898844063282013, -0.26470974087...
in a recovery program, er, Alt.Net). If you keep the focus on what you need to deliver to a customer and let your ORM figure out how to persist your objects, your design should be better.
[ -0.023458587005734444, -0.08760151267051697, 0.12060679495334625, 0.18981672823429108, -0.035249922424554825, 0.2099401354789734, 0.14424163103103638, -0.1100904792547226, -0.32256022095680237, -0.5644353032112122, -0.42710986733436584, 0.6261582970619202, 0.1415438950061798, -0.0620047524...
I've recently been looking into targeting the .NET Client Profile for a WPF application I am building. However, I was frustrated to notice that the Client Profile is only valid for the following OS configurations: * Windows XP SP2+ * Windows Server 2003 **Edit:** [Appears](http://blogs.windowsclient.net/trickster92/archive/2008/05/21/introducing-the-net-framework-client-profile.aspx) the Client Profile will not install on Windows Server 2003. In addition, the client profile is **not** valid for x64 or ia64 editions; and will also not install if *any previous version of the .NET Framework has been installed*. I'm wondering if the effort in adding the extra OS configurations to the testing matrix is worth the effort.
[ 0.11306513845920563, 0.08742621541023254, 0.7019074559211731, -0.20861858129501343, -0.1346745491027832, -0.5046300888061523, 0.5544701814651489, 0.18303611874580383, -0.14076431095600128, -0.32462024688720703, 0.03549257665872574, 0.8103085160255432, -0.36830729246139526, -0.0427644997835...
Is there any metrics available that state the percentage of users that could possibly benefit from the client profile? I believe that once the .NET Framework has been installed, extra information is passed to a web server as part of a web request signifying that the framework is available. Granted, I would imagine that Windows XP SP2 users without the .NET Framework installed would be a large amount of people. It would then be a question of whether my application targeted those individuals specifically. Has anyone else determined if it is worth the extra effort to target these specific users? **Edit: It
[ 0.6676190495491028, 0.18026326596736908, 0.1883946806192398, 0.02756800875067711, -0.16482199728488922, -0.11931432038545609, 0.27493816614151, -0.12271850556135178, -0.1680857241153717, -0.3741978406906128, 0.005992880091071129, 0.8342573642730713, -0.04515474662184715, -0.363456219434738...
seems that it is possible to get a compiler warning if you use features not included in the Client Profile. As I usually run with warnings as errors, this will hopefully be enough to minimise testing in this configuration.** Of course, this configuration will still need to be tested, but it should be as simple as testing if the install/initial run works on XP with SP2+. Ultimately, it will not hurt any users if you target the Client Profile. This is because the client profile is a subset of the .net framework v3.5 sp1, and if v3.5 sp1 is already installed
[ 0.4200305938720703, 0.15922465920448303, 0.3135046660900116, -0.08686772733926773, -0.14306172728538513, -0.39944151043891907, 0.6035163402557373, -0.1201421394944191, -0.1148657351732254, -0.6392773985862732, -0.11674771457910538, 0.8785992860794067, -0.179575577378273, -0.139759913086891...
you don't need to install anything. The assemblies in the client profile are the same binaries as the full framework, so unless you're loading assemblies dynamically, then you shouldn't need to do any additional testing. My thinking is that unless you must use assemblies which are NOT in the client profile, then you should target it. As for the OS requirements, WPF won't run on pre-XP sp2, so if you need to run on other OSes, then you'll have to use WinForms anyways. EDIT: > On IE, yes. It sends the .NET Framework version as part of the UA string, e.g.: Actually so
[ 0.6119446754455566, -0.06675621122121811, 0.30787813663482666, -0.14168226718902588, -0.1593419909477234, -0.33864954113960266, 0.3929992914199829, -0.15062086284160614, -0.11501765251159668, -0.8601239323616028, -0.1149427592754364, 0.6057848334312439, -0.44361451268196106, -0.12737706303...
does FF3+3.5sp1: > Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 (.NET CLR 3.5.30729)
[ 0.4108024537563324, 0.2088177502155304, 0.42757371068000793, 0.05554528534412384, 0.07195787876844406, -0.2606004774570465, 0.42632606625556946, -0.5543988943099976, -0.32953014969825745, -0.07155699282884598, -0.07030041515827179, 0.5529221296310425, -0.4279543459415436, -0.30870723724365...
One of my favourite tools for linux is [lsof](http://en.wikipedia.org/wiki/Lsof "Wikipedia") - a real swiss army knife! Today I found myself wondering which programs on a WinXP system had a specific file open. Is there any equivalent utility to lsof? Additionally, the file in question was over a network share so I'm not sure if that complicates matters. Use [Process Explorer](http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx "Process Explorer") from the Sysinternals Suite, the Find Handle or DLL function will let you search for the process with that file open.
[ 0.21641628444194794, -0.17650452256202698, 0.09928879886865616, 0.04947184771299362, -0.2457638680934906, 0.028657633811235428, -0.12499641627073288, 0.21134495735168457, -0.3882124423980713, -0.7249210476875305, 0.0003547397500369698, 0.3955661952495575, 0.08920708298683167, 0.06406510621...
I have created a UserControl that has a `ListView` in it. The ListView is publicly accessible though a property. When I put the UserControl in a form and try to design the `ListView` though the property, the `ListView` stays that way until I compile again and it reverts back to the default state. How do I get my design changes to stick for the `ListView`? You need to decorate the ListView property with the DesignerSerializationVisibility attribute, like so: ``` [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public ListView MyListView { get { return this.listView1; } } ``` This tells the designer's code generator to output code for it.
[ 0.3651241064071655, -0.09463117271661758, 0.8100729584693909, -0.09487437456846237, -0.10523224622011185, -0.1879788339138031, 0.15227010846138, -0.2915412187576294, -0.23479750752449036, -0.8842072486877441, -0.17740635573863983, 0.4838269352912903, -0.26665163040161133, 0.206108227372169...
I'm generating some xml files that needs to conform to an xsd file that was given to me. How should I verify they conform? The Java runtime library supports validation. Last time I checked this was the Apache Xerces parser under the covers. You should probably use a [javax.xml.validation.Validator](http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/validation/Validator.html). ``` import javax.xml.XMLConstants; import javax.xml.transform.Source; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.*; import java.net.URL; import org.xml.sax.SAXException; //import java.io.File; // if you use File import java.io.IOException; ... URL schemaFile = new URL("http://host:port/filename.xsd"); // webapp example xsd: // URL schemaFile = new URL("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"); // local file example: // File schemaFile = new File("/location/to/localfile.xsd"); // etc. Source xmlFile = new StreamSource(new File("web.xml")); SchemaFactory schemaFactory = SchemaFactory .newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); try { Schema schema
[ 0.6106719374656677, 0.22198036313056946, 0.6296773552894592, 0.05558253824710846, -0.22651976346969604, -0.04123086482286453, 0.36476409435272217, -0.5824410319328308, -0.0972323790192604, -0.7055631875991821, -0.024953918531537056, 0.40583762526512146, -0.2929147183895111, 0.2293241918087...
= schemaFactory.newSchema(schemaFile); Validator validator = schema.newValidator(); validator.validate(xmlFile); System.out.println(xmlFile.getSystemId() + " is valid"); } catch (SAXException e) { System.out.println(xmlFile.getSystemId() + " is NOT valid reason:" + e); } catch (IOException e) {} ``` The schema factory constant is the string `http://www.w3.org/2001/XMLSchema` which defines XSDs. The above code validates a WAR deployment descriptor against the URL `http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd` but you could just as easily validate against a local file. You should not use the DOMParser to validate a document (unless your goal is to create a document object model anyway). This will start creating DOM objects as it parses the document - wasteful if
[ 0.05576285719871521, 0.0572403147816658, 0.6736480593681335, -0.1290484219789505, -0.12539857625961304, -0.053650882095098495, 0.39494866132736206, -0.6087474822998047, -0.32188186049461365, -0.4153168499469757, -0.20787641406059265, 0.3529447317123413, -0.3787630498409271, 0.3116623461246...
you aren't going to use them.
[ 0.7786279916763306, 0.361186683177948, -0.4391862154006958, 0.24369564652442932, 0.08157511055469513, 0.019518492743372917, 0.1648128777742386, -0.2448943704366684, -0.26454055309295654, -0.3794040381908417, 0.07608405500650406, 0.5030820965766907, -0.2499670386314392, 0.05287561193108559,...
I know that there is no official API for Google Analytics but is there a way to access Google Analytics Reports with C#? **Update**: Google launched a Google Analytics API today. [Google Analytics Blog - API Launched](http://analytics.blogspot.com/2009/04/attention-developers-google-analytics.html)
[ 0.4508432447910309, 0.17164044082164764, 0.6285427212715149, 0.23658031225204468, -0.03969903662800789, -0.20269839465618134, 0.1282830834388733, 0.19355535507202148, -0.29002609848976135, -0.39592134952545166, 0.15532876551151276, 0.5597997307777405, -0.16284692287445068, -0.0520582497119...
I need to validate an XML string (and not a file) against a DTD description file. How can that be done in `python`? Another good option is [lxml's validation](http://lxml.de/validation.html) which I find quite pleasant to use. A simple example taken from the lxml site: ``` from StringIO import StringIO from lxml import etree dtd = etree.DTD(StringIO("""<!ELEMENT foo EMPTY>""")) root = etree.XML("<foo/>") print(dtd.validate(root)) # True root = etree.XML("<foo>bar</foo>") print(dtd.validate(root)) # False print(dtd.error_log.filter_from_errors()) # <string>:1:0:ERROR:VALID:DTD_NOT_EMPTY: Element foo was declared EMPTY this one has content ```
[ 0.29574811458587646, 0.08769495040178299, 0.4244150221347809, -0.16861388087272644, -0.25365325808525085, -0.03754553943872452, 0.20459812879562378, -0.6396650671958923, -0.058223746716976166, -0.41244450211524963, 0.058153603225946426, 0.6923268437385559, -0.17374888062477112, -0.11558798...
The product we are working on allows the user to easily set it up to run automatically whenever the computer is started. This is helpful because the product is part of the basic work environment of most of our users. This feature was implemented not so long ago and for a while all was well, but when we started testing this feature on Vista the product started behaving really weird on startup. Specifically, our product makes use of another product (lets call it X) that it launches whenever it needs its services. The actual problem is that whenever X
[ 0.5521407723426819, 0.05116627365350723, 0.15356861054897308, 0.3006885349750519, 0.3036271333694458, -0.46151819825172424, -0.0029157614335417747, 0.30878156423568726, 0.08418609946966171, -0.4178125560283661, 0.008458773605525494, 0.614234983921051, -0.2260025441646576, 0.179213523864746...
is launched immediately after log-on, it crashes or reports critical errors related to disk access (this happens even when X is launched directly - not through our product). This happens whenever we run our product by registering it in the "Run" key in the registry or place a shortcut to it in the "*Startup*" folder inside the "*Start Menu*", even when we put a delay of ~20 seconds before actually starting to run. When we changed the delay to 70 seconds, all is well. We tried to reproduce the problem by launching our product manually immediately after logon (by double-clicking on a
[ 0.40480664372444153, 0.03824380785226822, 0.30688732862472534, 0.1820196807384491, 0.27657875418663025, -0.3846262991428375, 0.015900487080216408, 0.3475876450538635, -0.1335553675889969, -0.42455294728279114, -0.5220667719841003, 0.5337590575218201, -0.1465599089860916, 0.1913266927003860...
shortcut placed on the desktop) but to no avail. Now how is it possible that applications that run normally a minute after logon report such hard errors when starting immediately after logon? This is the effect of a new feature in Vista called "Boxing": Windows has several mechanisms that allow the user/admin to set up applications to automatically run when windows starts. This feature is mostly used for one of these purposes: 1. Programs that are part of the basic work environment of the user, such that the first action the user would usually take when starting the computer is to start them. 2. All
[ 0.33053117990493774, -0.01711215451359749, 0.2131429761648178, -0.015422685071825981, 0.09336378425359726, -0.17026454210281372, 0.15173615515232086, 0.010788138024508953, -0.20998089015483856, -0.4618017375469208, -0.18369005620479584, 0.6717338562011719, -0.003052154090255499, -0.2104510...
sorts of background "agents" - skype, messenger, winamp etc. When too many (or too heavy) programs are registered to run on startup the end result is that the user can't actually do anything for the first few seconds/minutes after login, which can be really annoying. In comes Vista's "Boxing" feature: Briefly, Vista forces all programs invoked through the Run key to operate at low priority for the first 60 seconds after login. This affects both **I/O priority (which is set to Very Low) and CPU priority**. Very Low priority I/O requests do not pass through the file cache, but go directly to
[ 0.24707503616809845, -0.19285565614700317, 0.2170611321926117, 0.10808805376291275, 0.31330662965774536, -0.3595074713230133, 0.538504958152771, 0.09530134499073029, -0.436334490776062, -0.40992558002471924, -0.42204171419143677, 0.7215574383735657, -0.31184905767440796, -0.265577703714370...
disk. Thus, they are much slower than regular I/O. The length of the boxing period is set by the registry value: "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\DelayedApps\Delay\_Sec". For a more detailed explanation see [here](http://blogs.technet.com/askperf/archive/2008/03/28/startup-programs-on-windows-vista-inside-the-box.aspx) and [here](http://myitforum.com/cs2/blogs/scassells/archive/2008/02/05/boxing-and-the-case-of-the-slow-or-hanging-logon-script-in-vista.aspx)
[ 0.08869972079992294, 0.12826892733573914, 0.40202072262763977, 0.0794864296913147, -0.012248056940734386, -0.03498491272330284, -0.07505439966917038, 0.07206837087869644, -0.2990328371524811, -0.351062536239624, -0.4150804579257965, 0.6820690035820007, 0.2033504843711853, 0.015674443915486...
I need to read from Outlook .MSG file in .NET *without* using COM API for Outlook (cos it will not be installed on the machines that my app will run). Are there any free 3rd party libraries to do that? I want to extract From, To, CC and BCC fields. Sent/Receive date fields would be good if they are also stored in MSG files. **Update:** I have found a 3rd party COM library called [Outlook Redemption](http://www.dimastr.com/redemption/) which is working fine for me at the moment. If you use it via COM-Interop in .NET, don't forget to release every COM object after
[ 0.5197831988334656, 0.003062993288040161, 0.20186087489128113, 0.10695326328277588, 0.04497320204973221, 0.0662052109837532, 0.18633875250816345, 0.2843536138534546, -0.22893540561199188, -0.7224628925323486, 0.050160814076662064, 0.7858743071556091, 0.023057376965880394, 0.029962867498397...
you are done with it, otherwise your application crashes randomly.
[ 0.41372665762901306, 0.13950927555561066, 0.13617876172065735, 0.37823641300201416, 0.36000221967697144, -0.44498372077941895, 0.06484086066484451, 0.21138569712638855, 0.19438210129737854, -0.4898834526538849, -0.3603859841823578, 0.2548677623271942, 0.46574142575263977, 0.296531260013580...
I'm using NHibernate on a project and I need to do data auditing. I found [this article](http://www.codeproject.com/KB/cs/NHibernate_IInterceptor.aspx) on codeproject which discusses the IInterceptor interface. What is your preferred way of auditing data? Do you use database triggers? Do you use something similar to what's dicussed in the article? For NHibernate 2.0, you should also look at [Event Listeners](http://knol.google.com/k/fabio-maulo/nhibernate-chapter-11/1nr4enxv3dpeq/14#view). These are the evolution of the IInterceptor interface and we use them successfully for auditing.
[ 0.035900797694921494, 0.05721966549754143, 0.1726830154657364, -0.04737018048763275, -0.5463070869445801, -0.43290257453918457, 0.42625442147254944, -0.5964328050613403, -0.16124418377876282, -0.4502558708190918, 0.2686028480529785, 0.6389604210853577, -0.3256721794605255, 0.12731996178627...
What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do something like this: ``` StatusEnum MyStatus = StatusEnum.Parse("Active"); ``` but that isn't a valid code. In .NET Core and .NET Framework ≥4.0 [there is a generic parse method](https://msdn.microsoft.com/en-us/library/dd783499%28v=vs.110%29.aspx): ``` Enum.TryParse("Active", out StatusEnum myStatus); ``` This also includes C#7's new inline `out` variables, so this does the try-parse, conversion to
[ -0.0030458527617156506, 0.20049917697906494, 0.6286463737487793, -0.0321846567094326, 0.12359476089477539, -0.06243931129574776, 0.32852861285209656, -0.00043307800660841167, -0.08031322807073593, -0.562915027141571, -0.3471050560474396, 0.4459412097930908, -0.3616630434989929, -0.16884966...
the explicit enum type and initialises+populates the `myStatus` variable. If you have access to C#7 and the latest .NET this is the best way. Original Answer --------------- In .NET it's rather ugly (until 4 or above): ``` StatusEnum MyStatus = (StatusEnum) Enum.Parse(typeof(StatusEnum), "Active", true); ``` I tend to simplify this with: ``` public static T ParseEnum<T>(string value) { return (T) Enum.Parse(typeof(T), value, true); } ``` Then I can do: ``` StatusEnum MyStatus = EnumUtil.ParseEnum<StatusEnum>("Active"); ``` One option suggested in the comments is to add an extension, which is simple enough: ``` public static T ToEnum<T>(this string value) { return (T) Enum.Parse(typeof(T), value, true); } StatusEnum MyStatus = "Active".ToEnum<StatusEnum>(); ``` Finally, you may want to have a default enum to
[ 0.09173008799552917, -0.0603538416326046, 0.7720654606819153, -0.14398345351219177, 0.24247333407402039, 0.17094779014587402, 0.26525455713272095, 0.0591149739921093, 0.18750950694084167, -0.6907023191452026, -0.32573390007019043, 0.7407529950141907, -0.374150812625885, 0.10347869247198105...
use if the string cannot be parsed: ``` public static T ToEnum<T>(this string value, T defaultValue) { if (string.IsNullOrEmpty(value)) { return defaultValue; } T result; return Enum.TryParse<T>(value, true, out result) ? result : defaultValue; } ``` Which makes this the call: ``` StatusEnum MyStatus = "Active".ToEnum(StatusEnum.None); ``` However, I would be careful adding an extension method like this to `string` as (without namespace control) it will appear on all instances of `string` whether they hold an enum or not (so `1234.ToString().ToEnum(StatusEnum.None)` would be valid but nonsensical) .
[ 0.02216562069952488, -0.3157077431678772, 0.49816957116127014, -0.21513700485229492, 0.43009594082832336, -0.33394962549209595, 0.4396187663078308, -0.19647245109081268, -0.09321370720863342, -0.44989877939224243, -0.6053773164749146, 0.6794446706771851, -0.357404887676239, 0.1165056824684...
It's often be best to avoid cluttering Microsoft's core classes with extra methods that only apply in very specific contexts unless your entire development team has a very good understanding of what those extensions do.
[ 0.34271112084388733, 0.21145246922969818, -0.3127574920654297, 0.2229045331478119, 0.23033398389816284, -0.1346714198589325, 0.2955644130706787, 0.24555034935474396, -0.06858940422534943, -0.4044804573059082, -0.4985746741294861, 0.30025508999824524, 0.24770791828632355, -0.198668941855430...
I have a user that want to be able to select a textbox and have the current text selected so that he doesn't have to highlight it all in order to change the contents. The contents need to be handle when enter is pushed. That part I think I have figured out but any suggestions would be welcome. The part I need help with is that once enter has been pushed, any entry into the textbox should clear the contents again. **Edit:** The textbox controls an piece of RF hardware. What the user wants to be able to do is enter
[ 0.41474127769470215, 0.2149144411087036, 0.5540655255317688, -0.07393824309110641, 0.13222388923168182, -0.1797792762517929, -0.24666884541511536, -0.35173842310905457, 0.1319691240787506, -0.5673866271972656, -0.05125713348388672, 0.9634450674057007, -0.19220615923404694, 0.13894800841808...
a setting and press enter. The setting is sent to the hardware. Without doing anything else the user wants to be able to type in a new setting and press enter again. Hook into the KeyPress event on the TextBox, and when it encounters the Enter key, run your hardware setting code, and then highlight the full text of the textbox again (see below) - Windows will take care of clearing the text with the next keystroke for you. ``` TextBox1.Select(0, TextBox1.Text.Length); ```
[ 0.19039230048656464, -0.026881519705057144, 0.9581649899482727, -0.06774081289768219, 0.5568673014640808, -0.11590373516082764, -0.07281050831079483, -0.3370707929134369, 0.10855524241924286, -0.7882040739059448, -0.32963383197784424, 0.9452841877937317, -0.23973524570465088, -0.2275725752...
Can I get some recommendations (preferably with some reasons) for good log analysis software for Apache 2.2 access log files? I have heard of [Webalizer](http://www.webalizer.org/) and [AWStats](http://awstats.sourceforge.net/), but have never really used any of them, and would like to know: * What they can do * Why they are useful * Interesting uses for them Any and all comments and thoughts are welcome. AWStats and Webalizer are both good and free (I think both free speech as well as free beer). I generally prefer the look of AWStats - it has a nice modern look whereas Webalizer looks like something created in about 1992. They both give
[ 0.7557986378669739, 0.25175654888153076, 0.02012534998357296, 0.19093862175941467, -0.3929784297943115, -0.48128166794776917, 0.20957809686660767, 0.19239534437656403, -0.032861657440662384, -0.5966810584068298, 0.17233732342720032, 0.7156996726989746, -0.012094993144273758, -0.02994365803...
roughly the same information which includes: * Most frequently accessed pages * Which hosts (IPs and Domain Names) visitors come from * Proportion of users using different browsers * Proportion of downloads of different file types All of this information is usually viewable on a hour by hour, day by day, month by month and year by year basis. Normally the raw data is available but also with bar charts and pie charts. Both AWStats and Webalizer will (I think) try and work out where your visitors come from by using services such as GeoIP, although I never bothered to set this up. Some also
[ 0.3884148895740509, 0.03187008574604988, 0.5926122069358826, 0.3923228979110718, -0.017503298819065094, 0.10062110424041748, 0.2855706512928009, 0.4328405559062958, -0.4339412450790405, -0.7505114674568176, -0.1851789951324463, -0.04686173051595688, 0.09633234143257141, 0.41259267926216125...
try to work out what order people have visited pages in and things like that - but that is very difficult to do so the results are guesses at the best. I generally find them both useful - even if just to get an overview of what is going on with my server and who is accessing it. They are both relatively easy to install - although I seem to remember Webalizer being a little easier than AWStats, and they both have varied configuration options to let you decide exactly what you want to get out of them. For more information see
[ 0.48949041962623596, -0.0033798501826822758, 0.24873673915863037, 0.3114180862903595, -0.06333961337804794, -0.1928924024105072, 0.018407627940177917, 0.276880145072937, -0.31233954429626465, -1.0898228883743286, 0.3066900074481964, 0.6076433062553406, 0.09665551781654358, 0.13771836459636...
their sites at [awstats.sourceforge.net/](http://awstats.sourceforge.net/) and <http://www.webalizer.org/>. Hope that helps. Robin
[ 0.8759587407112122, -0.0899188295006752, -0.194192573428154, -0.0587790422141552, 0.030505139380693436, 0.022962156683206558, 0.6440199613571167, 0.2912254333496094, -0.4623771607875824, -0.4749932289123535, -0.04625575989484787, 0.06106700375676155, 0.15560373663902283, -0.156496539711952...
**Is there a way in PHP to overwrite a method declared by one interface in an interface extending that interface?** The Example: I'm probably doing something wrong, but here is what I have: ``` interface iVendor{ public function __construct($vendors_no = null); public function getName(); public function getVendors_no(); public function getZip(); public function getCountryCode(); public function setName($name); public function setVendors_no($vendors_no); public function setZip($zip); public function setCountryCode($countryCode); } interface iShipper extends iVendor{ public function __construct($vendors_no = null, $shipment
[ 0.15376898646354675, -0.09335120022296906, 0.7412168979644775, -0.08003503084182739, 0.35028180480003357, -0.06318507343530655, 0.0783470869064331, -0.4303288757801056, -0.4034222662448883, -0.5535569787025452, -0.1810610294342041, 0.4588205814361572, -0.2513901889324188, 0.159395307302474...
= null); public function getTransitTime($shipment = null); public function getTransitCost($shipment = null); public function getCurrentShipment(); public function setCurrentShipment($shipment); public function getStatus($shipment = null); } ``` Normally in PHP, when you extend something, you can overwrite any method contained therein (right?). However, when one interface extends another, it won't let you. Unless I'm thinking about this wrong... When I implement the iShipper interface, I don't have to make the Shipper object extend the Vendor object (that implements the iVendor interface). I just say: ``` class FedEx implements iShipper{} ``` and make FedEx implement
[ 0.22470681369304657, -0.06141642853617668, 0.53115314245224, -0.08064688742160797, 0.12585999071598053, -0.08489617705345154, 0.1201309859752655, -0.25071313977241516, -0.2450619339942932, -0.3809877336025238, -0.28478845953941345, 0.44633716344833374, -0.5384249091148376, 0.37780159711837...
all of the methods from iVendor and iShipper. However, I need the `__construct` functions in iVendor and iShipper to be unique. I know I could take out the `$shipment = null`, but then it wouldn't be as convenient to create Shippers (by just passing in the vendors\_no and the shipment while instantiating). Anyone know how to make this work? My fallback is to have to set the shipment by calling `$shipper->setShipment($shipment);` on the Shipper after I instantiate it, but I'm hoping for a way to get around having to do that... *A little more explanation for the curious:* *The FedEx Object
[ 0.4541063904762268, 0.13335764408111572, 0.23203562200069427, 0.1577952653169632, 0.06832444667816162, -0.12938858568668365, -0.12110781669616699, 0.03793150186538696, -0.518786609172821, -0.554010808467865, 0.22132544219493866, 0.5538734793663025, -0.3115127980709076, 0.40823543071746826,...
has methods that go to the FedEx site (using cURL) and gets an estimate for the Shipment in question. I have a UPS Object, a BAXGlobal Object, a Conway Object, etc. Each one has COMPLETELY different methods for actually getting the shipping estimate, but all the system needs to know is that they are a "shipper" and that the methods listed in the interface are callable on them (so it can treat them all exactly the same, and loop through them in a "shippers" array calling `getTransitX()` to find the best shipper for a shipment).* *Each "Shipper" is also a
[ 0.45155608654022217, -0.040750470012426376, 0.49677976965904236, 0.4599666893482208, 0.18871335685253143, 0.23162797093391418, -0.3116798996925354, 0.038964711129665375, -0.497526079416275, -0.6344032883644104, 0.13863809406757355, 0.4093922972679138, -0.10512841492891312, 0.11263701319694...
"Vendor" though, and is treated as such in other parts of the system (getting and putting in the DB, etc. Our data design is a pile of crap, so FedEx is stored right alongside companies like Dunder Mifflin in the "Vendors" table, which means it gets to have all the properties of every other Vendor, but needs the extra properties and methods supplied by iShipper).* [@cmcculloh](https://stackoverflow.com/questions/16155/making-one-interface-overwrite-a-method-it-inherits-from-another-interface-in-p#16196) Yeah, in Java you don't define constructors in Interfaces. This allows you to both extend interfaces and also have a class that implements multiple interfaces (both allowed, and very useful in many cases) without worrying
[ 0.0973929837346077, 0.13642571866512299, 0.23355284333229065, 0.16836722195148468, -0.049614664167165756, -0.3307522237300873, -0.14994293451309204, -0.15581732988357544, -0.2769644856452942, -0.5399869680404663, 0.1167384460568428, 0.3718712329864502, -0.014413929544389248, 0.109389260411...
about having to satisfy a particular constructor. *EDIT:* *Here's my new model:* *A. Each interface no longer has a constructor method.* *B. All Shippers (UPS, FedEx, etc) now implement iShipper (which extends iVendor) and extend the abstract class Shipper (which has all common non-abstract methods for shippers defined in it, getName(), getZip() etc).* *C. Each Shipper has it's own unique \_construct method which overwrites the abstract \_\_construct($vendors\_no = null, $shipment = null) method contained in Shipper (I don't remember why I'm allowing those to be optional now though. I'd have to go back through my documentation...).* So: ``` interface iVendor{ public
[ 0.35686132311820984, 0.04365876317024231, 0.5922126770019531, 0.10217434167861938, 0.2763999402523041, 0.023508796468377113, -0.0803811326622963, -0.02170679159462452, -0.5557466149330139, -0.731624186038971, -0.2455432415008545, 0.5222082138061523, -0.35851961374282837, 0.4252890348434448...
function getName(); public function getVendors_no(); public function getZip(); public function getCountryCode(); public function setName($name); public function setVendors_no($vendors_no); public function setZip($zip); public function setCountryCode($countryCode); } interface iShipper extends iVendor{ public function getTransitTime($shipment = null); public function getTransitCost($shipment = null); public function getCurrentShipment(); public function setCurrentShipment($shipment); public function getStatus($shipment = null); } abstract class Shipper implements iShipper{ abstract public function __construct($vendors_no = null, $shipment =
[ 0.04864080995321274, -0.3185192942619324, 0.6769255995750427, 0.05225830525159836, 0.2731502056121826, 0.3681047558784485, -0.011473385617136955, -0.28818053007125854, -0.5631170868873596, -0.3820098638534546, -0.5800361037254333, 0.566015899181366, -0.36399710178375244, 0.3880371451377868...
null); //a bunch of non-abstract common methods... } class FedEx extends Shipper implements iShipper{ public function __construct($vendors_no = null, $shipment = null){ //a bunch of setup code... } //all my FedEx specific methods... } ``` *Thanks for the help!* *ps. since I have now added this to "your" answer, if there is something about it you don't like/think should be different, feel free to change it...*
[ 0.2724241316318512, -0.06259729713201523, 0.28539058566093445, 0.06955117732286453, 0.3414636552333832, -0.01944614015519619, 0.09255696833133698, -0.29215753078460693, -0.19976717233657837, -0.4960164725780487, -0.15538130700588226, 0.45092421770095825, -0.49006277322769165, 0.33194264769...
You can easily use the `PropertyChanges` events to set the flag. But how do you easily reset it after a save to the `ObjectContext`? For your specific example, there is no need to worry about it. Web browsers perform typographical rendering and place the correct amount of space between periods and whatever character follows (and it's different depending on the next character, according to kerning rules.) If you want line breaks, <br/> isn't really a big deal, is it? --- Not sure what's worthy of a downmod here... You should not be forcing two spaces after a period, unless you're using a monospace font.
[ 0.03991231694817543, -0.24188989400863647, 0.25519296526908875, 0.09769076108932495, 0.048316508531570435, 0.0585145428776741, 0.27145078778266907, 0.26019203662872314, -0.4880450367927551, -0.8231111168861389, -0.2805804908275604, 0.2289147526025772, 0.09026658535003662, -0.17521087825298...
For proportional fonts, the rederer kerns the right amount of space after a period. See [here](http://www.webword.com/reports/period.html) and [here](http://everything2.com/node/540926) for detailed discussions.
[ -0.17082911729812622, -0.15178246796131134, 0.48230046033859253, -0.1165163442492485, -0.2652681767940521, 0.48051896691322327, -0.04664688557386398, -0.4360733926296234, -0.46931737661361694, -0.526975691318512, -0.36247843503952026, 0.09786880016326904, 0.22847267985343933, -0.0567268617...
Problem: I have an address field from an Access database which has been converted to SQL Server 2005. This field has everything all in one field. I need to parse out the address's individual sections into their appropriate fields in a normalized table. I need to do this for approximately 4,000 records, and it needs to be repeatable. Assumptions: 1. Assume an address in the US (for now) 2. assume that the input string will sometimes contain an addressee (the person being addressed) and/or a second street address (i.e. Suite B) 3. states may be abbreviated 4. zip code could be standard 5 digits or
[ 0.42632564902305603, 0.17746788263320923, 0.42403697967529297, 0.1400844305753708, 0.525303840637207, 0.20863685011863708, 0.3111518323421478, -0.24553132057189941, -0.3285101056098938, -0.6121565699577332, -0.1463346928358078, 0.081935353577137, -0.2525707483291626, 0.21517589688301086, ...
zip+4 5. there are typos in some instances UPDATE: In response to the questions posed, standards were not universally followed; I need need to store the individual values, not just geocode and errors means typo (corrected above) Sample Data: * A. P. Croll & Son 2299 Lewes-Georgetown Hwy, Georgetown, DE 19947 * 11522 Shawnee Road, Greenwood DE 19950 * 144 Kings Highway, S.W. Dover, DE 19901 * Intergrated Const. Services 2 Penns Way Suite 405 New Castle, DE 19720 * Humes Realty 33 Bridle Ridge Court, Lewes, DE 19958 * Nichols Excavation 2742 Pulaski Hwy Newark, DE 19711 * 2284 Bryn Zion Road, Smyrna, DE 19904 * VEI Dover Crossroads, LLC
[ 0.08172325789928436, -0.09995515644550323, 0.6478888988494873, 0.12339945882558823, 0.32787856459617615, 0.18605244159698486, 0.20002244412899017, -0.4293684959411621, -0.42386525869369507, -0.3544046878814697, -0.09464363008737564, -0.06571516394615173, -0.2922581732273102, 0.119028039276...
1500 Serpentine Road, Suite 100 Baltimore MD 21 * 580 North Dupont Highway Dover, DE 19901 * P.O. Box 778 Dover, DE 19903 I've done a lot of work on this kind of parsing. Because there are errors you won't get 100% accuracy, but there are a few things you can do to get most of the way there, and then do a visual BS test. Here's the general way to go about it. It's not code, because it's pretty academic to write it, there's no weirdness, just lots of string handling. (Now that you've posted some sample data, I've made some minor changes) 1.
[ 0.2895566523075104, 0.42423784732818604, 0.22708478569984436, 0.06886664032936096, 0.0239435825496912, -0.03884641081094742, 0.26811763644218445, 0.279530793428421, -0.1989438384771347, -0.8953784704208374, 0.2711077034473419, 0.19649283587932587, -0.1863669604063034, -0.23939666152000427,...
Work backward. Start from the zip code, which will be near the end, and in one of two known formats: XXXXX or XXXXX-XXXX. If this doesn't appear, you can assume you're in the city, state portion, below. 2. The next thing, before the zip, is going to be the state, and it'll be either in a two-letter format, or as words. You know what these will be, too -- there's only 50 of them. Also, you could soundex the words to help compensate for spelling errors. 3. before that is the city, and it's *probably* on the same line as the state.
[ 0.2358444780111313, 0.1603076159954071, 0.3400740325450897, 0.060307323932647705, -0.0163341723382473, 0.31617748737335205, 0.3054657280445099, -0.02581653743982315, -0.22360120713710785, -0.8805909752845764, -0.40024253726005554, -0.06866942346096039, 0.10651026666164398, -0.0088715236634...
You could use a [zip-code database](http://zipinfo.com) to check the city and state based on the zip, or at least use it as a BS detector. 4. The street address will generally be one or two lines. The second line will generally be the suite number if there is one, but it could also be a PO box. 5. It's going to be near-impossible to detect a name on the first or second line, though if it's not prefixed with a number (or if it's prefixed with an "attn:" or "attention to:" it could give you a hint as to whether it's a
[ 0.7881061434745789, -0.2739676237106323, 0.7454710006713867, 0.30028364062309265, 0.2815508246421814, -0.07673583924770355, 0.20939087867736816, -0.4089014232158661, -0.30801090598106384, -0.5849180221557617, -0.3048419654369354, -0.19404831528663635, -0.17078709602355957, -0.2254276871681...
name or an address line. I hope this helps somewhat.
[ 0.32518577575683594, 0.07965144515037537, 0.21142743527889252, 0.22515994310379028, 0.2501051425933838, 0.05839795246720314, 0.08570604026317596, 0.20729658007621765, -0.42327678203582764, -0.5440685749053955, 0.0068073635920882225, -0.024484602734446526, 0.15934044122695923, 0.08637038618...
Are there any good online resources for how to create, maintain and think about writing test routines for numerical analysis code? One of the limitations I can see for something like testing matrix multiplication is that the obvious tests (like having one matrix being the identity) may not fully test the functionality of the code. Also, there is the fact that you are usually dealing with large data structures as well. Does anyone have some good ideas about ways to approach this, or have pointers to good places to look? It sounds as if you need to think about testing in at least
[ 0.7071160078048706, 0.23619729280471802, -0.4098926782608032, 0.4683970808982849, 0.042589347809553146, -0.31170907616615295, 0.2979357838630676, 0.048002276569604874, -0.2857964336872101, -0.37642115354537964, 0.40389055013656616, 0.46177470684051514, -0.01414101105183363, -0.201367869973...
two different ways: 1. Some numerical methods allow for some meta-thinking. For example, invertible operations allow you to set up test cases to see if the result is within acceptable error bounds of the original. For example, matrix *M-inverse* times the matrix *M* \* random vector *V* should result in *V* again, to within some acceptable measure of error. Obviously, this example exercises matrix inverse, matrix multiplication and matrix-vector multiplication. I like chains like these because you can generate quite a lot of random test cases and get statistical coverage that would be a slog to have to write by
[ 0.4751170873641968, -0.08550155907869339, -0.22546519339084625, 0.20531080663204193, -0.40924468636512756, -0.17527441680431366, -0.05022119730710983, -0.37791043519973755, -0.13520030677318573, -0.48443639278411865, 0.3137573301792145, 0.5777944922447205, -0.5552704930305481, 0.2904279530...
hand. They don't exercise single operations in isolation, though. 2. Some numerical methods have a closed-form expression of their error. If you can set up a situation with a known solution, you can then compare the difference between the solution and the calculated result, looking for a difference that exceeds these known bounds. Fundamentally, this question illustrates the problem that testing complex methods well requires quite a lot of domain knowledge. Specific references would require a little more specific information about what you're testing. I'd definitely recommend that you at least have [Steve Yegge's recommended book list](http://steve-yegge.blogspot.com/2006/03/math-for-programmers.html) on hand.
[ -0.024536048993468285, 0.5224484205245972, -0.2067347764968872, -0.14088141918182373, -0.4105806350708008, -0.1251308172941208, 0.3008902072906494, -0.19982126355171204, -0.16050520539283752, -0.48763135075569153, 0.120660200715065, 0.49211591482162476, 0.03845180571079254, -0.226565852761...
I need to call a web service written in .NET from Java. The web service implements the WS-Security stack (either WSE 2 or WSE 3, it's not clear from the information I have). The information that I received from the service provider included WSDL, a policyCache.config file, some sample C# code, and a sample application that can successfully call the service. This isn't as useful as it sounds because it's not clear how I'm supposed to use this information to write a Java client. If the web service request isn't signed according to the policy then it is rejected by the
[ 0.5078294277191162, 0.24616356194019318, 0.16196602582931519, -0.06703164428472519, 0.08429455757141113, -0.19006599485874176, 0.2728371024131775, -0.469507098197937, 0.20093216001987457, -0.5242701172828674, 0.14649517834186554, 0.47969305515289307, -0.13013909757137299, -0.07314410060644...
service. I'm trying to use Apache Axis2 and I can't find any instructions on how I'm supposed to use the policyCahce.config file and the WSDL to generate a client. There are several examples that I have found on the Web but in all cases the authors of the examples had control of both the service and the client and so were able to make tweaks on both sides in order to get it to work. I'm not in that position. Has anyone done this successfully? This seems to be a popular question so I'll provide an overview of what we did in our
[ 0.5270577669143677, -0.044745687395334244, 0.4666796624660492, -0.04919235035777092, -0.18166176974773407, -0.247060626745224, 0.47728392481803894, -0.27389436960220337, -0.07778966426849365, -0.44501355290412903, 0.0803012028336525, 0.5771443843841553, 0.06380031257867813, 0.0893617868423...
situation. It seems that services built in .NET are following an older ws-addressing standard (<http://schemas.xmlsoap.org/ws/2004/03/addressing/>) and axis2 only understands the newer standard (<http://schemas.xmlsoap.org/ws/2004/08/addressing/>). In addition, the policyCache.config file provided is in a form that the axis2 rampart module can't understand. So the steps we had to do, in a nutshell: * Read the policyCache.config and try to understand it. Then rewrite it into a policy that rampart could understand. (Some [updated docs](http://www.scribd.com/doc/466238/Official-Documentation-ws-apache-org-Axis2-Part-2) helped.) * Configure rampart with this policy. * Take the keys that were provided in the .pfx file and convert them to a java key store. There is a utility that comes with Jetty
[ -0.17945241928100586, -0.21114224195480347, 0.3047192394733429, -0.04119037836790085, 0.07153324037790298, -0.0024923866149038076, 0.276947021484375, -0.34938204288482666, -0.31817755103111267, -0.42550715804100037, -0.08499396592378616, 0.7730608582496643, -0.20665885508060455, -0.1994356...
that can do that. * Configure rampart with that key store. * Write a custom axis2 handler that backward-converts the newer ws-addressing stuff that comes out of axis2 into the older stuff expected by the service. * Configure axis2 to use the handler on outgoing messages. In the end it was a lot of configuration and code for something that is supposed to be an open standard supported by the vendors. Although I'm not sure what the alternative is...can you wait for the vendors (or in this case, the one vendor) to make sure that everything will inter-op? As a postscript I'll add that I didn't
[ 0.45234954357147217, -0.10562124848365784, 0.24686075747013092, 0.28868368268013, -0.2579389214515686, 0.08752799779176712, 0.375845730304718, 0.10391141474246979, -0.26629289984703064, -0.6244739294052124, 0.23415562510490417, 0.5505598783493042, -0.2757289409637451, 0.07710401713848114, ...
end up doing the work, it was someone else on my team, but I think I got the salient details correct. The other option that I was considering (before my teammate took over) was to call the WSS4J API directly to construct the SOAP envelope as the .NET service expected it. I think that would have worked too.
[ 0.6067632436752319, -0.2773035764694214, -0.11093127727508545, -0.005725753493607044, -0.16801631450653076, -0.07653412967920303, 0.13527388870716095, -0.13053202629089355, 0.015628017485141754, -0.39497488737106323, 0.331076443195343, 0.3551706373691559, -0.158018559217453, -0.20797190070...
Say we have the following method: ``` private MyObject foo = new MyObject(); // and later in the class public void PotentialMemoryLeaker(){ int firedCount = 0; foo.AnEvent += (o,e) => { firedCount++;Console.Write(firedCount);}; foo.MethodThatFiresAnEvent(); } ``` If the class with this method is instantiated and the `PotentialMemoryLeaker` method is called multiple times, do we leak memory? Is there any way to unhook that lambda event handler after we're done calling `MethodThatFiresAnEvent`? Yes, save it to a variable and unhook it. ``` DelegateType evt = (o, e) => { firedCount++; Console.Write(firedCount); }; foo.AnEvent += evt; foo.MethodThatFiresAnEvent(); foo.AnEvent -= evt; ``` And yes, if you don't, you'll *leak* memory, as you'll hook up a new delegate
[ 0.14908626675605774, -0.13575685024261475, 0.5286791920661926, 0.014139021746814251, 0.4633336663246155, 0.00615456560626626, 0.2296454757452011, -0.38369253277778625, -0.14707933366298676, -0.40311822295188904, -0.2490430623292923, 0.8117380142211914, -0.3079738914966583, 0.26423260569572...
object each time. You'll also notice this because each time you call this method, it'll dump to the console an increasing number of lines (not just an increasing number, but for one call to MethodThatFiresAnEvent it'll dump any number of items, once for each hooked up anonymous method).
[ -0.16475093364715576, -0.26894432306289673, 0.6097986102104187, 0.4382486343383789, -0.08675263822078705, 0.16786082088947296, 0.20388871431350708, -0.16741783916950226, -0.37532132863998413, -0.49984580278396606, 0.08076989650726318, 0.320892870426178, -0.1940663456916809, 0.3546399474143...
I am using SourceForge for some Open Source projects and I want to automate the deployment of releases to the SourceForge File Release System. I use Maven for my builds and the standard SFTP deployment mechanism doesn't seem to work unless you do some manual preparation work. I have come across some old postings on other forums suggesting that the only approach is to write a Wagon specifically for SourceForge. Has anybody had any recent experience with this? I'm not able to test this to confirm, but I believe it is possible without writing any plugins. You can [deploy to SourceForge using SCP](http://sourceforge.net/apps/trac/sourceforge/wiki/SCP),
[ 0.7307854294776917, 0.31857916712760925, 0.19568872451782227, -0.1880115121603012, -0.14768636226654053, -0.1719857156276703, -0.027885138988494873, 0.014837932772934437, -0.6034870743751526, -0.8033329248428345, 0.0811065137386322, 0.3176715075969696, 0.0777287408709526, -0.10235082358121...
and the maven-deploy-plugin can be configured to [use SCP](http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html) so it should work. You can also deploy your [site to SourceForge](http://maven.apache.org/plugins/maven-site-plugin/examples/site-deploy-to-sourceforge.net.html) via SCP. You would configure the SourceForge server in your settings.xml to use a "combined" username with a comma separator. With these credentials: ``` SourceForge username: foo SourceForge user password: secret SourceForge project name: bar Path: /home/frs/project/P/PR/PROJECT_UNIX_NAME/ - Substitute your project UNIX name data for /P/PR/PROJECT_UNIX_NAME ``` The server element would look like this: ``` <server> <id>sourceforge</id> <username>foo,bar</username> <password>secret</password> </server> ``` And the distributionManagement section in your POM would look like this: ``` <!-- Enabling the use of FTP --> <distributionManagement> <repository> <id>ssh-repository</id>
[ 0.019878234714269638, 0.18715940415859222, 0.692874550819397, -0.3142535984516144, 0.3561466932296753, 0.04227527603507042, -0.21960286796092987, -0.34052425622940063, -0.4299394190311432, -0.6193721890449524, -0.44895967841148376, 0.5799948573112488, -0.1926286667585373, -0.05888577178120...
<url> scpexe://frs.sourceforge.net:/home/frs/project/P/PR/PROJECT_UNIX_NAME</url> </repository> </distributionManagement> ``` Finally declare that ssh-external is to be used: ``` <build> <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ssh-external</artifactId> <version>1.0-alpha-5</version> </extension> </extensions> </build> ``` --- If this doesn't work, you may be able to use the recommended approach in the site reference above, i.e. create a shell on shell.sourceforge.net with your username and project group: ``` ssh -t <username>,<project name>@shell.sf.net create ``` Then use shell.sourceforge.net (instead of web.sourceforge.net) in your site URL in the diestributionManagement section: ``` <url>scp://shell.sourceforge.net/home/frs/project/P/PR/PROJECT_UNIX_NAME/</url> ```
[ -0.005203631706535816, 0.31550174951553345, 0.5993117094039917, -0.26393717527389526, -0.15620023012161255, -0.2138272374868393, 0.26148200035095215, -0.35349029302597046, -0.30856528878211975, -0.5193256139755249, -0.30123135447502136, 0.36760663986206055, -0.0473206527531147, 0.428665757...
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a solution? If so, did you find it useful? Did the "automatic implementation" feature work ok? I used to use it a lot. This designer worked good for stubbing out prototype projects, but ultimately I found myself wasting a lot of time moving the mouse around when I could be typing. It seemed like an awesome idea to be able to print out the class diagrams to show APIs to other developers while I was prototyping, but it proved quite limiting and it looks awful on a non-color printer. Now I
[ 0.5861433744430542, -0.043341245502233505, 0.11649642884731293, 0.006882015615701675, 0.11635752022266388, -0.1729779839515686, 0.2758573293685913, -0.23006829619407654, -0.2980734705924988, -0.8201296925544739, 0.4088366627693176, 0.5342485904693604, -0.3057853877544403, 0.099265016615390...
just use the text editor and some [AutoHotkey](http://www.autohotkey.com) macros to get everything done.
[ 0.3367540240287781, 0.11561556905508041, 0.09373608976602554, 0.14829641580581665, 0.303854376077652, -0.24389667809009552, 0.26657918095588684, 0.2745063304901123, -0.12943021953105927, -0.685313880443573, -0.23873421549797058, 0.8171600699424744, -0.08763329684734344, -0.2667586505413055...
I am having some trouble with the [Google Maps API](http://code.google.com/apis/maps/documentation/reference.html). I have an array which holds a ojbect I created to store points. My array and class: ``` var tPoints = []; function tPoint(name) { var id = name; var points = []; var pointsCount = 0; ... this.getHeadPoint = function() { return points[pointsCount-1]; } } ``` tPoint holds an array of [GLatLng](http://code.google.com/apis/maps/documentation/reference.html#GLatLng) points.
[ -0.14118999242782593, 0.2777922451496124, 0.7885739803314209, -0.3101996183395386, -0.17202909290790558, 0.0857854038476944, -0.007203735876828432, -0.17318908870220184, 0.021901587024331093, -0.5904715061187744, 0.12973594665527344, 0.09448540955781937, -0.20533210039138794, 0.35738813877...
I want to write a function to return a [GLatLngBounds](http://code.google.com/apis/maps/documentation/reference.html#GLatLngBounds) object which is extended from the current map bounds to show all the HeadPoints. Heres what I have so far.. ``` function getBounds() { var mBound = map.getBounds(); for (var i = 0; i < tPoints.length; i++) { alert(mBound.getSouthWest().lat() + "," + mBound.getSouthWest().lng()); alert(mBound.getNorthEast().lat() + "," + mBound.getNorthEast().lng()); currPoint = trackMarkers[i].getHeadPoint();
[ 0.1902473270893097, -0.11541559547185898, 0.9591735601425171, -0.35702648758888245, 0.240995392203331, 0.014829706400632858, 0.351725310087204, -0.34989315271377563, -0.32849037647247314, -0.6636614799499512, -0.22816219925880432, 0.49598902463912964, -0.5038118362426758, 0.011519340798258...
if (!mBound.containsLatLng(currPoint)) { mBound.extend(currPoint); } } return mBound; } ``` Which returns these values for the alert. (Generally over the US) > "19.64258,NaN" > "52.69636,NaN" > "i=0" > > "19.64258,NaN" > "52.69636,-117.20701" > "i=1" I don't know why I am getting NaN back. When I use the bounds to get
[ 0.06650269031524658, 0.04874280095100403, 0.46331650018692017, -0.3073859214782715, 0.1978018879890442, -0.1388636827468872, 0.6310266852378845, -0.2993485629558563, -0.25520220398902893, -0.30348727107048035, -0.2963086664676666, 0.7427960634231567, -0.4454379975795746, -0.026592230424284...
a zoom level I think the NaN value is causing the map.getBoundsZoomLevel(bounds) to return 0 which is incorrect. Am I using [GLatLngBounds](http://code.google.com/apis/maps/documentation/reference.html#GLatLngBounds) incorrectly? Maybe a CLR stored procedure is what you are looking for. These are generally used when you need to interact with the system in some way.
[ 0.28882959485054016, -0.1611333042383194, 0.46560078859329224, 0.15578345954418182, 0.0029420244973152876, -0.38670870661735535, 0.3829529583454132, -0.13873682916164398, -0.10879228264093399, -0.3450606167316437, 0.004603566136211157, 1.0184979438781738, -0.24287866055965424, -0.124910175...
What options are there in the industry for enterprise reporting? I'm currently using SSRS 2005, and know that there is another version coming out with the new release of MSSQL. But, it seems like it might also be a good time to investigate the market to see what else is out there. What have you encountered? Do you like it/dislike it? Why? Thank you. I've used Cognos Series 7, Cognos Series 8, Crystal Reports, Business Objects XI R2 WebIntelligence, Reporting Services 2000, Reporting Services 2005, and Reporting Services 2008. Here's my feedback on what I've learned: **Reporting Services 2008/2005/2000** PROS 1. Cost: Cheapest enterprise business intelligence solution
[ -0.04048546403646469, -0.04065485671162605, 0.21401917934417725, 0.29071223735809326, -0.25825420022010803, 0.0001073928942787461, 0.21888096630573273, 0.2161169946193695, -0.3702229857444763, -0.5887643694877625, 0.22422005236148834, 0.6396915912628174, -0.11295343190431595, -0.1202474534...
if you are using MS SQL Server as a back-end. You also have a best-in-class ETL solution at no additional cost if you throw in SSIS. 2. Most Flexible: Most flexible reporting solution I've ever used. It has always met all my business needs, particularly in its latest incarnation. 3. Easily Scalable: We initially used this as a departmental solution supporting about 20 users. We eventually expanded it to cover a few thousand users. Despite having a really bad quality virtual server located in a remote data center, we were able to scale to about 50-100 concurrent user requests. On good hardware
[ 0.11585629731416702, -0.21338048577308655, 0.6384320259094238, 0.18570765852928162, -0.1021496132016182, -0.06902999430894852, 0.08345875144004822, -0.1411091536283493, -0.5137224793434143, -0.7111960649490356, -0.05693911761045456, 0.36092638969421387, -0.2125026434659958, -0.009687745943...
at a consulting gig, I was able to scale it to a larger set of concurrent users without any issues. I've also seen implementations where multiple SSRS servers were deployed in different countries and SSIS was used to synch the data in the back-ends. This allowed for solid performance in a distributed manner at almost no additional cost. 4. Source Control Integration: This is CRITICAL to me when developing reports with my business intelligence teams. No other BI suite offers an out-of-box solution for this that I've ever used. Every other platform I used either required purchasing a 3rd party add-in
[ 0.25326481461524963, -0.17892935872077942, 0.16206948459148407, 0.43622565269470215, -0.11478152126073837, -0.12483038008213043, 0.18171314895153046, -0.23833854496479034, -0.23389093577861786, -0.577031135559082, -0.02766595035791397, 0.4332156777381897, -0.2131292074918747, -0.0265291277...
or required you to promote reports between separate development, test, and production environments. 5. Analysis Services: I like the tight integration with Analysis Services between SSRS and SSIS. I've read about instances where Oracle and DB2 quotes include installing a SQL Server 2005 Analysis Services server for OLAP cubes. 6. Discoverability: No system has better discoverability than SSRS. There are more books, forums, articles, and code sites on SSRS than any other BI suite that I've ever used. If I needed to figuire out how to do something in SSRS, I could almost always find it with a few minutes or hours
[ 0.4179728925228119, -0.01664992980659008, -0.02358684130012989, 0.27208608388900757, -0.32200881838798523, -0.1964467614889145, 0.18945471942424774, -0.19963768124580383, -0.4187324345111847, -0.5317894816398621, 0.23651498556137085, 0.3739137649536133, -0.03203089162707329, -0.08150763064...
of work. CONS 1. IIS Required for SSRS 2005/2000: Older versions of SSRS required installing IIS on the database server. This was not permissible from an internal controls perspective when I worked at a large bank. We eventually implemented SSRS without authorized approval from IT operations and basically asked for forgiveness later. **This is not an issue in SSRS 2008 since IIS is no longer required.** 2. Report Builder: The web-based report builder was non-existant in SSRS 2000. The web-based report builder in SSRS 2005 was difficult to use and did not have enough functionality. The web-based report builder in SSRS 2008 is
[ -0.14619997143745422, -0.10009258985519409, 0.3197566568851471, -0.0771692544221878, -0.16827552020549774, -0.23235362768173218, 0.5240131616592407, -0.35804206132888794, -0.34976962208747864, -0.4844263792037964, 0.1976824700832367, 0.31322935223579407, -0.3684840500354767, 0.197210773825...
definitely better, but it is still too difficult to use for most business users. 3. Database Bias: It works best with Microsoft SQL Server. It isn't great with Oracle, DB2, and other back-ends. **Business Objects XI WebIntelligence** PROS 1. Ease of Use: Easiest to use for your average non-BI end-user for developing ad hoc reports. 2. Database Agnostic: Definitely a good solution if you expect to use Oracle, DB2, or another database back-end. 3. Performant: Very fast performance since most of the page navigations are basically file-system operations instead of database-calls. CONS 1. Cost: Number one problem. If I want to scale up my implementation of Business Objects
[ -0.30846574902534485, -0.049609288573265076, 0.3176783323287964, 0.4933428168296814, -0.3172386586666107, -0.2780757248401642, 0.08192643523216248, -0.0732407495379448, -0.1960291862487793, -0.769566535949707, 0.14079827070236206, 0.5486529469490051, -0.30413249135017395, -0.27713519334793...
from 30 users to 1000 users, then SAP will make certain to charge you a few hundred thousands of dollars. And that's just for the Business Objects licenses. Add in the fact that you will also need database server licenses, you are now talking about a very expensive system. Of course, that could be the personal justification for getting Business Objects: if you can convince management to purchase a very expensive BI system, then you can probably convince management to pay for a large BI department. 2. No Source Control: Lack of out-of-the-box source control integration leads to errors in accidentally
[ 0.37672746181488037, 0.059707481414079666, 0.23777072131633759, 0.50166255235672, -0.0770692229270935, -0.0780978798866272, 0.2684636414051056, -0.16767385601997375, -0.28960296511650085, -0.3502037227153778, 0.04861604794859886, 0.5784729719161987, -0.4507790803909302, 0.14789795875549316...
modifying and deploying old report definitions by mistake. The "work-around" for this is promote reports between environments -- a process that I do NOT like to do since it slows down report development and introduces environmental differences variables. 3. No HTML Email Support: You cannot send an HTML email via a schedule. I regularly do this in SSRS. You can buy an expensive 3rd party add-in to do this, but you shouldn't have to spend more money for this functionality. 4. Model Bias: Report development requires universes -- basically a data model. That's fine for ad hoc report development, but I prefer
[ 0.37386274337768555, 0.19654765725135803, 0.3150542080402374, 0.1881999373435974, -0.23651599884033203, -0.4540756642818451, 0.6633610129356384, 0.014584782533347607, -0.3962445855140686, -0.588462233543396, 0.2033831775188446, 0.644536554813385, -0.47017019987106323, -0.10175526142120361,...
to use stored procedures to have full control of performance. I also like to build flat tables that are then queried to avoid costly complex joins during report run-time. It is silly to have to build universes that just contain flat tables that are only used by one report. You shouldn't have to build a model just to query a table. Store procedure support is also not supported out of the box without hacking the SQL Overrides. 5. Poor Parameter Support: Parameter support is terrible in BOXI WebIntelligence reports. Although I like the meta-data refresh options for general business users, it
[ 0.22410033643245697, 0.13149705529212952, 0.07694125920534134, 0.3357049226760864, -0.04253449663519859, -0.2571324110031128, 0.6390940546989441, -0.11541467905044556, -0.183454692363739, -0.4675784707069397, 0.15266433358192444, 0.6552608609199524, -0.4024958908557892, -0.0089838681742548...
just isn't robust enough when trying to setup schedules. I almost always have to clone reports and alter the filters slightly which leads to unnecessary report definition duplication. SSRS beats this hands down, particularly since you can make the value and the label have different values -- unlike BOXI. 6. Inadequate Report Linking Support: I wanted to store one report definition in a central folder and then create linked reports for other users. However, I quickly found out end-users needed to have full rights on the parent object to use the object in their own folder. This defeated the entire purpose
[ 0.3839179575443268, -0.263147234916687, 0.07720664143562317, 0.3452833890914917, -0.08812936395406723, -0.2484213262796402, 0.272434800863266, -0.2517108619213104, -0.25114497542381287, -0.3242984712123871, 0.28495335578918457, 0.22892090678215027, -0.4353795647621155, 0.16518528759479523,...
of using a linked report object. Give me SSRS! 7. Separate CMC: Why do you have to launch another application just to manage your object security? Worse, why isn't the functionality identical between CMC and InfoSys? For example, if you want to setup a scheduled report to retry on failed attempts, then you can specify the number of retries and the retry interval in CMC. However, you can't do this in InfoSys and you can't see the information either. InfoSys allows you to setup event-driven schedules and CMC does not support this feature. 8. Java Version Dependency: BOXI works great on end-user
[ 0.2709639072418213, -0.4142445921897888, 0.31791263818740845, 0.11739842593669891, -0.28613513708114624, -0.30711790919303894, 0.2288540154695511, -0.25510260462760925, -0.5506261587142944, -0.3203180730342865, 0.08808384835720062, 0.351801335811615, -0.6242080926895142, -0.142524927854537...
machines so long as they are running the same version of java as the server. However, once a newer version of java is installed on your machine, things starts to break. We're running Java 1.5 on our BOXI R2 server (the default java client) and almost everyone in the company is on Java 1.6. If you use Java 1.6, then prompts can freeze your IE and FoxFire sessions or crash your report builder unexpectedly. 9. Weak Discoverability: Aside from BOB (Business Objects Board), there isn't much out there on the Internet regarding troubleshooting Business Objects problems. **Cognos Series 8** PROS 1. Ease of Use:
[ 0.1339229941368103, 0.3045714497566223, 0.22397048771381378, 0.0888618752360344, 0.02223285846412182, -0.19808991253376007, 0.6976326107978821, -0.02804645337164402, -0.5382180213928223, -0.5911373496055603, 0.00196482939645648, 0.6571757793426514, -0.37219926714897156, -0.0392281077802181...
Although BOXI is easier to use for writing simple reports for general business users, Cognos is a close 2nd in this area. 2. Database Agnostic: Like BOXI this is definitely a good solution if you expect to use Oracle, DB2, or another database back-end. 3. FrameWork Manager: This is definitely a best-in-class meta-data repository. BOXI's universe builder wishes it was half as good. This tool is well suited to promoting packages across Development, Test, and Production environments. CONS 1. Cost: Same issue as Business Objects. Similar cost structure. Similar database licensing requirements as well. 2. No Source Control: Same issue as Business Objects. I'm not
[ 0.3006384074687958, -0.08060752600431442, 0.05734068900346756, 0.17504362761974335, -0.38345959782600403, -0.3977105915546417, 0.2293611615896225, -0.4044698476791382, 0.023500552400946617, -0.6211810111999512, 0.0442972257733345, 0.48691773414611816, -0.379166841506958, -0.155056416988372...
aware of any 3rd party tools that resolve this issue, but they might exist. 3. Model Bias: Same issue as Business Objects. Has better support for stored procedures in FrameWork Manager, though. 4. Poor Parameter Support: Same issue as Business Objects. Has better support for creating prompt-pages if you can code in Java. Buggy behavior, though, when users click the back-button to return to the prompt-page. SSRS beats this out hands-down. 5. Inadequate Error Handling: Error messages in Cognos are nearly impossible to decipher. They generally give you a long negative number and a stack dump as part of the error message. I
[ -0.25291708111763, -0.180141881108284, 0.17561699450016022, 0.1689142882823944, -0.331219345331192, -0.12247639894485474, 0.4755394160747528, -0.08881158381700516, -0.2584383487701416, -0.6526482105255127, 0.3517070710659027, 0.4674273729324341, -0.3265526592731476, -0.13301491737365723, ...
don't know how many times we "resolved" these error messages by rebuilding reports from scratch. For some reason, it is pretty easy to corrupt a report definition. 6. No Discoverability: It is very hard to track down any answers on how to troubleshoot problems or to implement functionality in Cognos. There just isn't adequate community support in Internet facing websites for the products. As you can guess from my answer, I believe Microsoft's BI suite is the best platform on the market. However, I must state that most articles I've read on comparisons of BI suites usually do not rate Microsoft's offering
[ 0.5486271977424622, 0.13725388050079346, 0.15997886657714844, 0.34867510199546814, -0.1536666750907898, -0.21297264099121094, 0.13723404705524445, -0.033405598253011703, 0.035452187061309814, -0.5569143295288086, 0.09523015469312668, 0.5408917665481567, -0.13172955811023712, 0.204709604382...
as well as SAP's Business Objects and Cognos's Series 8 products. Also, I've also seen Microsoft come out on the bottom in internal reviews of BI Suites in two separate companies after they were review by the reigning CIO's. In both instances, though, it seemed like it all boiled down to wanting to be perceived as a major department that justified a large operating budget.
[ 0.21223552525043488, 0.02123652957379818, -0.15597230195999146, 0.35092929005622864, -0.23853297531604767, -0.06421494483947754, -0.05213542282581329, 0.0003581794735509902, -0.17987804114818573, -0.02891414612531662, -0.14521166682243347, 0.3601135313510895, 0.25215527415275574, 0.3002681...
I'm trying to do a simple test php script for sessions. Basically it increments a counter (stored in `$_SESSION`) every time you refresh that page. That works, but I'm trying to have a link to destroy the session which reloads the page with the `?destroy=1` parameter. I've tried a couple of if statements to see if that parameter is set and if so to destroy the session but it doesn't seem to work. I've even put an if statement in the main body to pop-up a message if the parameter is set - but it doesn't seem to be picked up. I
[ 0.6113719940185547, 0.4459788203239441, -0.04284869134426117, -0.02369852364063263, -0.41718748211860657, -0.13142050802707672, 0.704486608505249, 0.11352864652872086, -0.012268961407244205, -0.500190258026123, 0.23125161230564117, 0.5448626279830933, -0.260370671749115, 0.3181354105472564...
know I'm doing something silly (I'm a PHP newbie) but I can't seem to find what it is... See code here: ``` <?php if ($_POST['destroy']) { session_destroy(); } else { session_start(); } ?> <html> <head> <title>Session test</title> </head> <body> <?php if (isset($_POST['destroy'])) { echo "Destroy set"; } $_SESSION['counter']++; echo "You have visited this page " . $_SESSION['counter'] . " times"
[ 0.7255095839500427, 0.20168370008468628, 0.23228642344474792, -0.09699294716119766, 0.18903221189975739, -0.36848199367523193, 0.8567596673965454, -0.41601842641830444, -0.032398074865341187, -0.5259460806846619, -0.09105747938156128, 0.4440489411354065, -0.06367714703083038, 0.29436710476...
. "<BR>"; echo "I am tracking you using the session id " . session_id() . "<BR>"; echo "Click <a href=\"" . $_SERVER['PHP_SELF'] . "?destroy=1\">here</a> to destroy the session."; ?> ``` I think you put ``` $_POST['destroy'] ``` Instead of ``` $_GET['destroy'] ``` You need to use a form if you'd like to use a $\_POST variable. $\_GET variables are stored in the URL.
[ 0.47753605246543884, 0.15469548106193542, 0.43790164589881897, -0.16899871826171875, 0.008323118090629578, -0.34913891553878784, 0.830644428730011, -0.31358203291893005, 0.060164567083120346, -0.48403045535087585, -0.19956739246845245, 0.6475649476051331, -0.5312075614929199, 0.13221620023...
I need to periodically download, extract and save the contents of <http://data.dot.state.mn.us/dds/det_sample.xml.gz> to disk. Anyone have experience downloading gzipped files with C#? To compress: ``` using (FileStream fStream = new FileStream(@"C:\test.docx.gzip", FileMode.Create, FileAccess.Write)) { using (GZipStream zipStream = new GZipStream(fStream, CompressionMode.Compress)) { byte[] inputfile = File.ReadAllBytes(@"c:\test.docx"); zipStream.Write(inputfile, 0, inputfile.Length); } } ``` To Decompress: ``` using (FileStream fInStream = new FileStream(@"c:\test.docx.gz", FileMode.Open, FileAccess.Read)) { using (GZipStream zipStream = new GZipStream(fInStream, CompressionMode.Decompress)) {
[ 0.21535684168338776, 0.05765872448682785, 0.9231633543968201, 0.0864599421620369, 0.2530366778373718, -0.09771311283111572, 0.267268568277359, -0.44291722774505615, -0.040878258645534515, -0.8398379683494568, -0.3040606379508972, 0.6477022767066956, -0.14791657030582428, 0.1628802120685577...