text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
new MimeMessage(session); msg.setFrom(new InternetAddress("mail@tovare.com"));; msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse("tov.are.jacobsen@iss.no", false)); msg.setSubject("Heisann "+System.currentTimeMillis()); msg.setText("Med vennlig hilsennTov Are Jacobsen"); msg.setHeader("X-Mailer", "Tov Are's program"); msg.setSentDate(new Date()); SMTPTransport t = (SMTPTransport)session.getTransport("smtps"); t.connect("smtp.gmail.com", "admin@tovare.com",
[ 0.04829384759068489, -0.1621677726507187, 0.9745003581047058, -0.0016339023131877184, 0.11192265152931213, 0.2085515558719635, 0.7112265825271606, -0.21054674685001373, -0.3875938653945923, -0.7261074185371399, -0.7215616106987, 0.34228941798210144, -0.4938563406467438, 0.2507512867450714,...
"<insert password here>"); t.sendMessage(msg, msg.getAllRecipients()); System.out.println("Response: " + t.getLastServerResponse()); t.close(); } } ``` Now, do it this way only if you would like to keep your project dependencies to a minimum, otherwise i can warmly recommend using classes from apache <http://commons.apache.org/email/> Regards Tov Are Jacobsen
[ 0.3807578682899475, 0.18593449890613556, 0.41072389483451843, -0.07673882693052292, -0.2057494819164276, -0.12820978462696075, 0.4965978264808655, -0.3812636137008667, -0.180848628282547, -0.41774219274520874, -0.42418909072875977, 0.6645725965499878, -0.057885508984327316, 0.1599015295505...
If you have a JSF `<h:commandLink>` (which uses the `onclick` event of an `<a>` to submit the current form), how do you execute JavaScript (such as asking for delete confirmation) prior to the action being performed? ``` <h:commandLink id="myCommandLink" action="#{myPageCode.doDelete}"> <h:outputText value="#{msgs.deleteText}" /> </h:commandLink> <script type="text/javascript"> if (document.getElementById) { var commandLink = document.getElementById('<c:out value="${myPageCode.myCommandLinkClientId}" />'); if (commandLink && commandLink.onclick) { var commandLinkOnclick = commandLink.onclick; commandLink.onclick = function() { var result =
[ 0.11017517000436783, -0.143035426735878, 0.7631760239601135, -0.331104040145874, -0.0020205918699502945, -0.06860952079296112, 0.48407286405563354, -0.7567796111106873, -0.1233472004532814, -0.5592155456542969, -0.5214094519615173, 0.35567426681518555, -0.11438018083572388, -0.306423366069...
confirm('Do you really want to <c:out value="${msgs.deleteText}" />?'); if (result) { return commandLinkOnclick(); } return false; } } } </script> ``` Other Javascript actions (like validating form input etc) could be performed by replacing the call to `confirm()` with a call to another function.
[ 0.668562650680542, -0.2741715908050537, 0.3840709626674652, 0.02867744117975235, 0.2734498083591461, -0.4038219451904297, 0.20717433094978333, -0.23858493566513062, 0.4381781220436096, 0.006692217197269201, -0.1553965061903, 0.5295939445495605, -0.1391228437423706, -0.07514525949954987, ...
Has anyone implements Subversion with Siteminder as authentication provider ? If yes, would it be possible to provide an overview of how the whole setup is done ? Since I am using only HTTP authentication, I think it would be easier to integrate with SM, but I am not able to find much help on this on the net. Is there any pitfall with this setup ? is this even possible ? SVN with Siteminder has been implemented and is working now. Since there is not much of information out there on this, I would like to post the overview of steps followed: 1.
[ 0.5135290026664734, -0.28155869245529175, 0.14125396311283112, 0.039575014263391495, -0.2994266748428345, -0.5041711926460266, 0.41561660170555115, 0.1358606070280075, -0.23933127522468567, -0.36789119243621826, 0.201407328248024, 0.276761531829834, -0.3361881375312805, 0.1491416096687317,...
Cookie based authentcation was disabled on Siteminder end 2. HTTP AUTH was enabled (in Siteminder) and all webdav methods were added to policy server to be handled by SiteMinder 3. Authentication was disabled on apache end (HTTP Auth) for SVN
[ -0.2349260449409485, -0.11824285984039307, 0.45135536789894104, 0.008234968408942223, -0.5116954445838928, -0.07967977970838547, 0.596755862236023, -0.21857526898384094, -0.058442845940589905, -0.48805174231529236, -0.25136440992355347, 0.6379571557044983, -0.47716039419174194, 0.175258368...
I'm failing at finding the commands I need to send to authenticate to a SMTP server using NTLM. I think it goes something like: ``` AUTH NTLM <bae64encode something> 334 <bae64encode something> 235 ``` SVN with Siteminder has been implemented and is working now. Since there is not much of information out there on this, I would like to post the overview of steps followed: 1. Cookie based authentcation was disabled on Siteminder end 2. HTTP AUTH was enabled (in Siteminder) and all webdav methods were added to policy server to be handled by SiteMinder 3. Authentication was disabled on apache end (HTTP Auth) for SVN
[ -0.06436575949192047, -0.22348399460315704, 0.6662245988845825, -0.17766128480434418, -0.3830072283744812, -0.28275445103645325, 0.62204909324646, -0.32397446036338806, -0.08656731992959976, -0.6680020689964294, -0.10191923379898071, 0.5487750172615051, -0.2926000654697418, 0.2122002840042...
I talked to a friend of mine and he told me that it's possible to create an image in an image editor (gimp/photoshop) and then use it as a button . He said that's the way applications that have great GUIs do it. He also said that there is a file describing which parts of the image make up the button. Is this possible , or is he "crazy"? :) This needs to be clarified with a language of choice, etc. In general, most languages (WinForms, Java AWT/SWT, etc) have an image or background image property that allows you to use images
[ 0.26139870285987854, -0.07302667200565338, 0.22679847478866577, 0.16065384447574615, 0.03050951473414898, -0.15794110298156738, 0.04479886591434479, -0.049341507256031036, -0.27149632573127747, -0.6499958634376526, -0.07438624650239944, 0.5420150756835938, -0.5191434025764465, -0.207445576...
for buttons. There are even skinning frameworks that will let you use images for all controls in an easy-to-define manner. If you are talking about HTML, there is a button input type that can allow an image to be used as a button for a form. @Vhaerun [CodeProject](http://www.codeproject.com) is a good place to find lots of skinning libraries. I used [this one](http://www.codeproject.com/KB/library/SkinCtrl.aspx) a long time ago. [Winamp](http://www.winamp.com) is a great example of a skinned application, where users can actually create their own templates to completely change the look of the application without changing code whatsoever. Actually, most media players have some
[ 0.6752960085868835, -0.38414686918258667, 0.37321045994758606, 0.04518947750329971, -0.12845799326896667, 0.2878338396549225, -0.29067713022232056, -0.0822375938296318, -0.4067608416080475, -0.7151434421539307, 0.46671852469444275, 0.6702116131782532, -0.31174272298812866, -0.1489357650279...
sort of skinning available.
[ 0.36904993653297424, -0.3095983862876892, -0.008696375414729118, 0.13981686532497406, 0.010658717714250088, 0.1440304070711136, -0.05492481589317322, 0.5434466600418091, -0.18463841080665588, -0.5106440186500549, 0.22132760286331177, 0.38886478543281555, 0.07961435616016388, -0.16770085692...
``` #include <iostream> using namespace std; int main() { double u = 0; double w = -u; cout << w << endl; return 0; } ``` Why does this great piece of code output `-0` and not `0`, as one would expect? The IEEE 754 standard for floating-point numbers has the sign bit separate from the mantissa, which allows for zero to be negative. [Wikipedia](http://en.wikipedia.org/wiki/IEEE_754) should be able to help explain this.
[ 0.08744731545448303, 0.23564554750919342, 0.2226458191871643, -0.1680411398410797, 0.007651267573237419, 0.08175024390220642, 0.3452725112438202, -0.23849105834960938, -0.44712111353874207, -0.28702276945114136, -0.026985451579093933, 0.11108886450529099, -0.3159410059452057, 0.14575120806...
The following will cause infinite recursion on the == operator overload method ``` Foo foo1 = null; Foo foo2 = new Foo(); Assert.IsFalse(foo1 == foo2); public static bool operator ==(Foo foo1, Foo foo2) { if (foo1 == null) return foo2 == null; return foo1.Equals(foo2); } ``` How do I check for nulls? Use `ReferenceEquals`: ``` Foo foo1 = null; Foo foo2 = new Foo(); Assert.IsFalse(foo1 == foo2); public static bool operator ==(Foo foo1, Foo foo2) { if
[ -0.3160114288330078, -0.04509055241942406, 0.4805976152420044, -0.3409997820854187, 0.050190895795822144, 0.00006014203609083779, 0.45343318581581116, -0.5646028518676758, 0.01784287393093109, -0.10863316059112549, -0.3695729374885559, 0.8967288136482239, -0.6005603075027466, 0.05524443089...
(object.ReferenceEquals(null, foo1)) return object.ReferenceEquals(null, foo2); return foo1.Equals(foo2); } ```
[ -0.02265331894159317, 0.3918944001197815, 0.5745072364807129, -0.0749192163348198, -0.07923359423875809, 0.03699053078889847, 0.43645814061164856, -0.348535418510437, 0.049789540469646454, -0.25726693868637085, -0.15846115350723267, 0.8697255849838257, -0.6512694358825684, 0.30887278914451...
I have a dropdownlist with the autopostback set to true. I want the user to confirm if they really want to change the value, which on post back fires a server side event (selectedindexchanged). I have tried adding an onchange attribute "return confirm('Please click OK to change. Otherwise click CANCEL?';") but it will not postback regardless of the confirm result and the value in the list does not revert back if cancel selected. When I remove the onchange attribute from the DropdownList tag, the page does postback. It does not when the onchange attribute is added. Do I still need to wire the event handler
[ 0.2960456907749176, -0.12283294647932053, 0.44119635224342346, 0.09763137996196747, -0.08891776204109192, -0.12845738232135773, 0.499178409576416, -0.0448114313185215, -0.09700269997119904, -0.2759265899658203, 0.171596959233284, 0.5941565036773682, -0.35546010732650757, 0.1507566720247268...
(I'm on C# .Net 2.0 ). Any leads will be helpful. Thanks! Have you tried to set the onChange event to a javascript function and then inside the function display the javascript alert and utilize the \_\_doPostback function if it passes? i.e. ``` drpControl.Attributes("onChange") = "DisplayConfirmation();" function DisplayConfirmation() { if (confirm('Are you sure you want to do this?')) { __doPostback('drpControl',''); } } ```
[ 0.300067663192749, -0.09003786742687225, 0.7551888227462769, 0.062588170170784, 0.31079572439193726, -0.20810651779174805, 0.2998829185962677, -0.1252218782901764, -0.13514012098312378, -0.6873117089271545, 0.08554024249315262, 0.737350344657898, -0.3269478976726532, -0.10756770521402359, ...
If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process? Better yet, is there a good library that abstracts the whole 'sendmail -versus- smtp' choice? I'll be running this script on a bunch of unix hosts, only some of which are listening on localhost:25; a few of these are part of embedded systems and can't be set up to accept SMTP. As part of Good Practice, I'd really like to have the library take care of header injection vulnerabilities itself -- so just dumping a string to `popen('/usr/bin/sendmail', 'w')` is
[ 0.374665766954422, -0.10622576624155045, 0.06341270357370377, -0.0671568289399147, -0.36617714166641235, -0.15360453724861145, 0.3945194184780121, 0.05330071970820427, -0.19620101153850555, -0.5391097068786621, -0.06215663254261017, 0.37851041555404663, -0.5301821231842041, 0.0953441932797...
a little closer to the metal than I'd like. If the answer is 'go write a library,' so be it ;-) Header injection isn't a factor in how you send the mail, it's a factor in how you construct the mail. Check the [email](https://docs.python.org/2/library/email.html) package, construct the mail with that, serialise it, and send it to `/usr/sbin/sendmail` using the [subprocess](https://docs.python.org/2/library/subprocess.html) module: ``` import sys from email.mime.text import MIMEText from subprocess import Popen, PIPE msg = MIMEText("Here is the body of my message") msg["From"] = "me@example.com" msg["To"] = "you@example.com" msg["Subject"] = "This is the subject." p = Popen(["/usr/sbin/sendmail", "-t", "-oi"], stdin=PIPE) # Both Python 2.X and 3.X p.communicate(msg.as_bytes() if sys.version_info >= (3,0) else msg.as_string())
[ 0.4292033016681671, 0.12802323698997498, 0.33708807826042175, -0.09660512208938599, -0.25497967004776, 0.1429206281900406, 0.21348783373832703, -0.37008023262023926, -0.0905727818608284, -0.708869457244873, -0.28317710757255554, 0.44362014532089233, -0.46596765518188477, -0.228412017226219...
# Python 2.X p.communicate(msg.as_string()) # Python 3.X p.communicate(msg.as_bytes()) ```
[ -0.0004127499705646187, 0.23480084538459778, 0.40775057673454285, -0.3269036114215851, -0.3174137473106384, 0.16413374245166779, 0.4370811879634857, -0.09575071185827255, -0.2536948025226593, -0.5029469728469849, -0.464784175157547, 0.47353896498680115, -0.6566524505615234, -0.356639295816...
Currently, I am working on a new version control system as part of a final year project at University. The idea is to make it highly adaptable and pluggable. We're using the OSGi framework (Equinox implementation) to manage our plug ins. My problem is that I can't find a simple & easy to use method for testing OSGi bundles. Currently, I have to build the bundle using Maven and then execute a test harness. I'm looking for something like the JUnit test runner for Eclipse, as it will save me a bunch of time. Is there a quick and easy way to test
[ 0.43351560831069946, -0.2374657243490219, 0.1433955878019333, 0.222135528922081, -0.13991883397102356, -0.23958809673786163, -0.02251710183918476, -0.049896057695150375, 0.0735473558306694, -0.8079306483268738, 0.0051180534064769745, 0.6291245222091675, -0.03452414646744728, -0.17746281623...
OSGi bundles? EDIT: I don't need something to test Eclipse plug ins or GUI components, just OSGi bundles. EDIT2: Is there some framework that supports JUnit4? Spring Dynamic Modules has excellent support for [testing OSGi bundles](http://static.springframework.org/osgi/docs/current/reference/html/testing.html).
[ 0.36357560753822327, -0.3293386399745941, 0.09191779792308807, 0.19804975390434265, -0.29216694831848145, -0.2400335669517517, -0.11768093705177307, -0.2990756332874298, -0.2663251757621765, -0.3140870928764343, -0.01621520146727562, 0.3543374836444855, -0.23892810940742493, -0.43323516845...
Has anyone run into issues serializing components into a file and reading them back, specifically in the area where the component vendor upgrades the VCL components. For example a file serialized with DelphiX and then years later read back with delphiY. Do the serialization formats change and if so what can be done to prevent errors reading in the componets when upgrading. The built-in RTTI based system for serializing published properties is vulnerable to changes in the components. Going forwards is manageable as long as old properties are kept in new objects. I.e. you leave the property interface as is, but
[ 0.07781899720430374, -0.020600667223334312, 0.38078656792640686, 0.2578527331352234, -0.14437061548233032, -0.32052576541900635, 0.3252781629562378, -0.45049330592155457, -0.5015458464622498, -0.5230455994606018, -0.0555281788110733, 0.5775012373924255, 0.13029681146144867, 0.2306416481733...
can toss away the contents if you like. Going backwards is worse - as a newer version saved property can't be opened in older version load, and that will be a problem. There are components / libs (<http://www.torry.net/quicksearchd.php?String=RTTI&Title=Yes>) that can add serialization in XML format and this may help a bit as you can choose to skip content you don't know. You still need to be mindful about how you design your published content and should probably find a way to "ignore but propagate" content that your current version don't understand. This will allow you to open and change a file in
[ 0.32638633251190186, -0.07935385406017303, 0.11886084079742432, 0.39700639247894287, -0.014683866873383522, -0.34600362181663513, 0.1910262256860733, -0.09904374927282333, -0.5662199258804321, -0.4171546697616577, -0.21365337073802948, 0.49652624130249023, -0.07650503516197205, 0.245313376...
a newer format while attempting to keep newer attributes, instead of stripping them.
[ 0.18895602226257324, 0.0380791537463665, 0.18531684577465057, 0.42943504452705383, 0.15103855729103088, -0.35157132148742676, -0.00009795750520424917, -0.01952667534351349, -0.1200680360198021, -0.6524327397346497, -0.4165489971637726, 0.41766878962516785, 0.17856012284755707, 0.0300040114...
In IE, the dropdown-list takes the same width as the dropbox (I hope I am making sense) whereas in Firefox the dropdown-list's width varies according to the content. This basically means that I have to make sure that the dropbox is wide enough to display the longest selection possible. This makes my page look very ugly :( Is there any workaround for this problem? How can I use CSS to set different widths for dropbox and the dropdownlist? Here's another [jQuery](http://jquery.com) based example. In contrary to all the other answers posted here, it takes all keyboard and mouse events into account, especially
[ 0.24812641739845276, 0.0016873825807124376, 0.4604690968990326, -0.17527629435062408, -0.2565932869911194, -0.2622378468513489, 0.20814889669418335, -0.04842620715498924, -0.12361329048871994, -0.9012433886528015, -0.07827337831258774, 0.5652174949645996, -0.272226482629776, -0.22386075556...
clicks: ``` if (!$.support.leadingWhitespace) { // if IE6/7/8 $('select.wide') .bind('focus mouseover', function() { $(this).addClass('expand').removeClass('clicked'); }) .bind('click', function() { $(this).toggleClass('clicked'); }) .bind('mouseout', function() { if (!$(this).hasClass('clicked')) { $(this).removeClass('expand'); }}) .bind('blur', function() { $(this).removeClass('expand clicked'); }); } ``` Use it in combination with this piece of CSS: ``` select { width: 150px; /* Or whatever width you want. */ } select.expand { width: auto; } ``` All you need to do is to add the class `wide`
[ 0.1975875198841095, -0.20835725963115692, 0.6971134543418884, -0.3786259591579437, -0.07786379754543304, 0.008099709637463093, 0.03605754300951958, -0.007967792451381683, -0.16069507598876953, -0.6988931894302368, -0.2895854711532593, 0.607927680015564, -0.5148897171020508, 0.2077290117740...
to the dropdown element(s) in question. ``` <select class="wide"> ... </select> ``` [Here is a jsfiddle example](http://jsfiddle.net/HnV9Q/). Hope this helps.
[ 0.3242947459220886, -0.2914770841598511, 0.25652629137039185, -0.11618003994226456, -0.005823221523314714, -0.35839712619781494, 0.24490799009799957, -0.01993362233042717, -0.44453561305999756, -0.40438970923423767, -0.31599271297454834, 0.4166228175163269, -0.18534021079540253, 0.01632096...
I would like to turn the HTML generated by my CFM page into a PDF, and have the user prompted with the standard "Save As" prompt when navigating to my page. You should use the cfdocument tag (with format="PDF") to generate the PDF by placing it around the page you are generating. You'll want to specify a filename attribute, otherwise the document will just stream right to your browser. After you have saved the content as a PDF, use cfheader and cfcontent in combination to output the PDF as an attachment ("Save As") and add the file to the response stream. I
[ 0.496278315782547, 0.04597609490156174, 0.6942756772041321, 0.04075869545340538, -0.08405124396085739, -0.17206323146820068, -0.23863866925239563, -0.08976231515407562, -0.03835996612906456, -0.750583827495575, -0.2607250511646271, 0.8134878873825073, -0.30171412229537964, 0.00714528746902...
also added deletefile="Yes" on the cfcontent tag to keep the file system clean of the files. ``` <cfdocument format="PDF" filename="file.pdf" overwrite="Yes"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Hello World</title> </head> <body> Hello World </body> </html> </cfdocument> <cfheader name="Content-Disposition" value="attachment;filename=file.pdf"> <cfcontent type="application/octet-stream" file="#expandPath('.')#\file.pdf" deletefile="Yes"> ``` As an aside: I'm just using file.pdf for the filename in the example below, but you might want to use some random or session generated string for the filename to avoid problems resulting from race conditions.
[ 0.28710904717445374, -0.16750214993953705, 0.4861338138580322, 0.30111750960350037, -0.07949068397283554, -0.23116625845432281, 0.10218629240989685, -0.11110913753509521, -0.2757445275783539, -0.6294457912445068, -0.27082008123397827, 0.44479134678840637, -0.07207661122083664, 0.1837704032...
I am a bit rusty on my cursor lingo in PL/SQL. Anyone know this? An implicit cursor is one created "automatically" for you by Oracle when you execute a query. It is simpler to code, but suffers from * inefficiency (the ANSI standard specifies that it must fetch twice to check if there is more than one record) * vulnerability to data errors (if you ever get two rows, it raises a TOO\_MANY\_ROWS exception) Example ``` SELECT col INTO var FROM table WHERE something; ``` An explicit cursor is one you create yourself. It takes more code, but gives more control - for example, you can just
[ -0.17994706332683563, 0.1070152074098587, 0.10775809735059738, 0.043356187641620636, -0.3216519057750702, 0.08240147680044174, -0.03164086863398552, -0.17462076246738434, -0.12810342013835907, -0.5559881925582886, 0.08049856126308441, 0.5799480080604553, -0.45855674147605896, -0.1267215758...
open-fetch-close if you only want the first record and don't care if there are others. Example ``` DECLARE CURSOR cur IS SELECT col FROM table WHERE something; BEGIN OPEN cur; FETCH cur INTO var; CLOSE cur; END; ```
[ -0.4457060694694519, -0.004557350650429726, 0.7341506481170654, -0.1757657676935196, -0.17647814750671387, -0.1692275106906891, -0.17089217901229858, -0.059031255543231964, -0.11869046092033386, -0.368521124124527, -0.38230273127555847, 0.5485724210739136, -0.48597100377082825, 0.327873349...
How can I specify the filename when dumping data into the response stream? Right now I'm doing the following: ``` byte[] data= GetFoo(); Response.Clear(); Response.Buffer = true; Response.ContentType = "application/pdf"; Response.BinaryWrite(data); Response.End(); ``` With the code above, I get "foo.aspx.pdf" as the filename to save. I seem to remember being able to add a header to the response to specify the filename to save. Add a content-disposition to the header: ``` Response.AddHeader("content-disposition", @"attachment;filename=""MyFile.pdf"""); ```
[ 0.16136910021305084, 0.07634836435317993, 0.8077085614204407, -0.2452349215745926, -0.0745304748415947, 0.05923797935247421, 0.07421308010816574, -0.29967883229255676, -0.16214004158973694, -0.5726192593574524, -0.5077638030052185, 0.6053345799446106, -0.17394094169139862, -0.0195836499333...
I wrote a script to export twitter friends as foaf rdf description. Now I'm looking for a tool to visualize the friend networks. I tried <http://foafscape.berlios.de/> but for 300+ Nodes it is really slow and does a bad job on auto formatting. Any hints for good graph visualization tools? It's ok if they do not support foaf directly, but they should be able to use images for graph nodes and be able to display large graphs. Linux support would be nice. Oh, and I'm searching for an interactive tool where I can move nodes by hand. **Update:** Thanks for your input. I know
[ 0.2281312793493271, -0.05329470336437225, 0.20133768022060394, 0.16044282913208008, -0.2724951207637787, 0.050665296614170074, 0.39530155062675476, 0.370116263628006, -0.26939958333969116, -0.8235446214675903, 0.26985296607017517, 0.3574668765068054, -0.08649399131536484, -0.15138554573059...
graphviz and for static images it is really great. But for large datasets I need to be able to select nodes and highlight all neighbours. * **Prefuse** looks great: <http://prefuse.org/gallery/graphview/> * trough prefuse I found **vizster**, which is exactly what I search (just need to find some sourcecode) <http://jheer.org/vizster/> perhaps the [prefuse](http://prefuse.org/) visualization toolkit might help you. It's based on Java and has many sample apps including a [graph viewer](http://prefuse.org/gallery/graphview/).
[ 0.24030736088752747, -0.3505849540233612, 0.6317400932312012, 0.05836779624223709, -0.6376172304153442, -0.16812896728515625, 0.14663732051849365, -0.010423801839351654, -0.08126277476549149, -0.8631047010421753, 0.1433614045381546, 0.45559558272361755, -0.2676078975200653, -0.054264195263...
I'm using a C# MailMessage to attach a wave file (8K) to an email message. I'd like to provide a player within the body of that email message that will play that wave file if the user chooses to do so. I've tried using the embedded <object> version of WMP, and a cid: reference to the file, but Outlook 2003 rejects the object tag and won't run it. If it helps, I know my users will be on Outlook 2003. If you know the message recipients are running Outlook (which implies you're using this internally), you might be able to accomplish
[ 0.23318670690059662, 0.0818711593747139, 0.4481527507305145, -0.22952556610107422, -0.03778702765703201, -0.2138253003358841, -0.002666966989636421, 0.03831123188138008, -0.3855052888393402, -0.5683313608169556, 0.23450584709644318, 0.83732008934021, -0.05560888722538948, 0.174782603979110...
something even better by incorporating your player controls into a [custom Outlook form](http://www.outlookcode.com/article.aspx?id=35).
[ 0.023380696773529053, -0.23451809585094452, 0.4069526493549347, 0.2878333032131195, 0.18346700072288513, 0.05174631252884865, -0.07020141929388046, -0.034734781831502914, -0.1452929973602295, -0.19678030908107758, 0.245442196726799, 0.2276826947927475, 0.009738019667565823, -0.119888976216...
I have been playing with this for a while, but the closest I have gotten is a button that opens the `Paste Special` dialog box and requires another couple of mouse clicks to paste the contents of the clipboard as unformatted text. So often I am doing a `copy-paste` from a web site into a document where I don't want the additional baggage of the HTML formatting, it would be nice to be able to do this with a shortcut key or a toolbar button. Make the button call the macro: ``` public sub PasteSpecialUnformatted() selection.pastespecial datatype:=wdpastetext end sub ```
[ 0.3012198805809021, -0.015436620451509953, 0.6444316506385803, -0.2008344829082489, 0.08534029126167297, -0.07636765390634537, 0.08155528455972672, 0.05848957598209381, -0.11831287294626236, -0.8181182146072388, -0.08406905084848404, 0.5730246305465698, -0.3268556296825409, 0.1773849874734...
Is there a general rule of thumb to follow when storing web application data to know what database backend should be used? Is the number of hits per day, number of rows of data, or other metrics that I should consider when choosing? My initial idea is that the order for this would look something like the following (but not necessarily, which is why I'm asking the question). 1. Flat Files 2. BDB 3. SQLite 4. MySQL 5. PostgreSQL 6. SQL Server 7. Oracle It's not quite that easy. The only general rule of thumb is that you should look for another solution when the current one can't keep
[ 0.6077647805213928, 0.14715634286403656, 0.48021045327186584, 0.13191884756088257, -0.06306654959917068, -0.31209635734558105, -0.03502504900097847, 0.08515211194753647, -0.35839971899986267, -0.6130897998809814, 0.13838402926921844, 0.7996364831924438, -0.2599410116672516, 0.1597844064235...
up anymore. That could include using different software (not necessarily in any globally fixed order), hardware or architecture. You will probably get a lot more benefit out of caching data using something like [memcached](http://danga.com/memcached/) than switching to another random storage backend.
[ 0.5247161388397217, -0.07133977115154266, 0.24712711572647095, 0.3460422456264496, 0.11994963139295578, -0.351980596780777, -0.0911417007446289, 0.17676414549350739, -0.7308211326599121, -0.5678793787956238, -0.23895050585269928, 0.1875695139169693, -0.22339913249015808, 0.3185167908668518...
I have an ext combobox which uses a store to suggest values to a user as they type. An example of which can be found here: [combobox example](http://extjs.com/deploy/ext/examples/form/combos.html) Is there a way of making it so the **suggested text list** is rendered to an element in the DOM. Please note I do not mean the "applyTo" config option, as this would render the whole control, including the textbox to the DOM element. You can use plugin for this, since you can call or even override private methods from within the plugin: ``` var suggested_text_plugin = { init: function(o) {
[ 0.3294837772846222, -0.08460675179958344, 0.35832762718200684, -0.23532342910766602, 0.04842127487063408, -0.07006651908159256, 0.06958064436912537, -0.47730395197868347, 0.30811479687690735, -0.7631627917289734, 0.0037332952488213778, 0.48277902603149414, -0.4439799189567566, 0.0385686196...
o.onTypeAhead = function() { // Original code from the sources goes here: if(this.store.getCount() > 0){ var r = this.store.getAt(0); var newValue = r.data[this.displayField]; var len = newValue.length;
[ 0.058046404272317886, -0.08092762529850006, 0.5838877558708191, -0.5158946514129639, 0.5419548153877258, 0.4399147033691406, 0.2869878113269806, -0.4655951261520386, -0.035128600895404816, -0.5144559741020203, -0.2774912416934967, 0.6231990456581116, -0.2680400311946869, 0.2084765285253524...
var selStart = this.getRawValue().length; if(selStart != len){ this.setRawValue(newValue); this.selectText(selStart, newValue.length); }
[ -0.20853255689144135, -0.5483066439628601, 0.460747629404068, -0.4444805383682251, 0.05026675760746002, 0.00005182899258215912, 0.7324284911155701, -0.47226232290267944, -0.0036191348917782307, -0.5127458572387695, -0.6324859261512756, 0.5194573998451233, -0.23138149082660675, 0.1003628820...
} // Your code to display newValue in DOM ......myDom.getEl().update(newValue); }; } }; // in combobox code: var cb = new Ext.form.ComboBox({ .... plugins: suggested_text_plugin, .... }); ``` I think it's even possible to create a whole chain of methods, calling original method before or after yours, but I haven't tried this yet. Also, please don't push me hard for using non-standard plugin definition and invocation methodics (undocumented).
[ 0.1997053474187851, 0.019298847764730453, 0.3532819449901581, -0.2196132242679596, 0.2803153395652771, -0.1556907594203949, 0.34362122416496277, -0.3010729253292084, -0.12410075962543488, -0.7038738131523132, -0.11967878043651581, 0.7371513247489929, -0.3430357575416565, 0.1924581229686737...
It's just my way of seeing things. EDIT: I think the method chain could be implemented something like that (untested): ``` .... o.origTypeAhead = new Function(this.onTypeAhead.toSource()); // or just o.origTypeAhead = this.onTypeAhead; .... o.onTypeAhead = function() { // Call original this.origTypeAhead(); // Display value into your DOM element ...myDom.... }; ```
[ 0.30501678586006165, -0.04894674941897392, 0.9039062261581421, -0.4006212651729584, 0.44605720043182373, -0.11267733573913574, 0.336582213640213, -0.25292646884918213, -0.19427312910556793, -0.5770118832588196, 0.005047752521932125, 0.7475178241729736, -0.347526490688324, 0.228982031345367...
I'm doing a website for a family member's wedding. A feature they requested was a photo section where all the guests could go after the wedding and upload their snaps. I said this was a stellar idea and I went off to build it. Well there's just the one problem: logistics. Upload speeds are slow and photos from modern cameras are huge (2-5+Megs). I will only need ~800px wide images and some of them might require rotating so ideally I'm looking about using a client-side editor to do three things: 1. Let users pick multiple files 2. Let them rotate some images so
[ 0.5587718486785889, -0.009268858470022678, 0.6914653778076172, 0.13369040191173553, 0.10552547127008438, -0.00430044811218977, 0.10197288542985916, -0.32453063130378723, -0.31489378213882446, -0.23357146978378296, 0.254801481962204, 0.5754173398017883, 0.13346733152866364, 0.08883050084114...
they're the right way up 3. Resize them and then upload And in my dream world, it'd be free and open source. Any ideas? Just a reminder: this is something the guests have to use. Some of them will be pretty computer savvy but others will be almost completely illiterate. Installing desktop apps isn't really an option. And I assume 98% of them have Flash and Java installed. Edit: I'd prefer a Flash/Java option over SilverLight, not least because it has a smaller install rate at the moment, but also because I'm on Linux and I'd like to test it =) The most common solution
[ 0.5067347884178162, 0.27144187688827515, 0.6733357906341553, 0.28691932559013367, 0.21009433269500732, -0.12209724634885788, 0.34043416380882263, -0.20034058392047882, -0.4625093638896942, -0.5826610326766968, -0.25985187292099, 0.5002543926239014, -0.10184905678033829, -0.4221555292606354...
for this is a java applet, although most of them are not free. Examples: * <http://www.jumploader.com/> * <http://www.aurigma.com/Products/ImageUploader/OnlineDemo.aspx> * <http://www.javaatwork.com/java-upload-applet/details.html> * JUpload, mentioned by ScArcher2
[ 0.17540526390075684, -0.26751962304115295, 0.019313978031277657, -0.1312495768070221, -0.27032360434532166, 0.007237012963742018, 0.07944696396589279, 0.03403044492006302, -0.45269855856895447, -0.5325798392295837, -0.03040114790201187, 0.3102521598339081, -0.4479006826877594, -0.042737949...
If I attempt to connect to Mac OS X 10.5 Leopard's built in vnc server at a low color depth from Windows, the client bombs after connecting. It only works when I set it to the highest color depth. I've tried with at least 3 windows VNC clients. Any ideas? There some setting I can set in Mac OS X? It takes about 20 seconds to repaint the screen with my current connection and high bit depth setting. Not with the builtin VNC server. [Vine Server](http://sourceforge.net/projects/osxvnc/) allows you to change the bit depth that clients connect at though.
[ 0.570997416973114, -0.18942701816558838, 0.4169797897338867, -0.16839727759361267, 0.03975332900881767, -0.06800428777933121, 0.657871663570404, 0.05111536756157875, -0.473677396774292, -1.0731918811798096, 0.1295611411333084, 0.6376163959503174, -0.17445296049118042, 0.10623584687709808, ...
I'm developing a website on an XP virtual machine and have an SMTP virtual server set up in IIS -- it delivers mail just fine. What I would *like* is to confirm that any emails the site sends are only going to a specific domain. The XP firewall seems to only involve incoming connections, I can't block outgoing TCP on port 25. And I haven't been able to configure the SMTP server to filter by delivery address. With this setup, is there any easy way to filter outgoing email by destination address? Here's one idea: Under `Advanced Delivery` options (`SMTP Virtual Server Properties` >
[ 0.19488739967346191, 0.11731778085231781, 0.39039346575737, -0.05788161978125572, -0.30300599336624146, -0.22892379760742188, 0.33622264862060547, 0.03163646161556244, -0.21547554433345795, -0.7004402279853821, -0.084288589656353, 0.2563762366771698, -0.40896299481391907, 0.117798693478107...
`Delivery` tab > `Advanced`). There you can set a "Smart Host" which is the SMTP server that will be used to actually send the mail, so you could possibly have it deliver directly to the specific domain's incoming SMTP server.
[ -0.03628553822636604, -0.4934346377849579, 0.436898797750473, -0.007066523656249046, -0.0785195603966713, -0.02738872542977333, 0.20320624113082886, 0.048730749636888504, -0.06470897793769836, -0.7684105634689331, -0.20112144947052002, 0.007722101639956236, -0.19739052653312683, 0.17908209...
Implementing Equals() for reference types is harder than it seems. My current canonical implementation goes like this: ``` public bool Equals( MyClass obj ) { // If both refer to the same reference they are equal. if( ReferenceEquals( obj, this ) ) return true; // If the other object is null they are not equal because in C# this cannot be null. if( ReferenceEquals( obj, null ) ) return false; // Compare data to evaluate equality return _data.Equals( obj._data ); } public override bool Equals( object obj ) {
[ -0.16695958375930786, 0.25169989466667175, 0.5890373587608337, -0.15078561007976532, -0.25419527292251587, -0.03620648756623268, 0.33340024948120117, -0.2613911032676697, 0.22847101092338562, -0.5953365564346313, 0.1763932704925537, 0.6567208170890808, -0.729465663433075, 0.011708684265613...
// If both refer to the same reference they are equal. if( ReferenceEquals( obj, this ) ) return true; // If the other object is null or is of a different types the objects are not equal. if( ReferenceEquals( obj, null ) || obj.GetType() != GetType() ) return false; // Use type-safe equality comparison return Equals( (MyClass)obj ); } public override int GetHashCode() { // Use data's hash code as our hashcode return _data.GetHashCode(); } ``` I think that this covers all corner (inheritance and such) cases but I
[ -0.13017867505550385, 0.21908338367938995, 0.488850474357605, -0.13655072450637817, -0.10268577188253403, 0.11691242456436157, 0.3213717043399811, -0.6083778738975525, 0.14130891859531403, -0.5415521860122681, -0.014299288392066956, 0.4629805088043213, -0.4523923695087433, 0.22053726017475...
may be wrong. What do you guys think? I wrote a fairly comprehensive guide to this a while back. For a start your equals implementations should be shared (i.e. the overload taking an object should pass through to the one taking a strongly typed object). Additionally you need to consider things such as your object should be immutable because of the need to override GetHashCode. More info here: <http://gregbeech.com/blog/implementing-object-equality-in-dotnet>
[ 0.44992348551750183, 0.005952420644462109, 0.19692865014076233, 0.03197326883673668, -0.04796162247657776, -0.3547518253326416, 0.5454294085502625, -0.08978062123060226, -0.3508117198944092, -0.5246474742889404, 0.31159552931785583, 0.5629935264587402, -0.39554041624069214, 0.0620641782879...
I am interested in writing static code analyzer for vb.net to see if it conforms to my company standard coding guidelines. Please advise from where i have to start. [FXCop](http://go.microsoft.com/fwlink/?LinkId=70294) is a good start for coding problems/mistakes, [StyleCop](http://blogs.msdn.com/sourceanalysis/) is good for coding style (obviously), but if neither of those two work then you then you can either write a parser yourself or use the [VBCodeProvider](http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.vbcodeprovider.aspx) class in the .Net Framework
[ 0.4125541150569916, 0.08162552863359451, 0.1491611748933792, -0.02962557226419449, -0.26050615310668945, 0.09602952748537064, -0.0014040424721315503, -0.021232612431049347, 0.004792515188455582, -0.6736405491828918, 0.2079048603773117, 0.6924288868904114, -0.1840844601392746, -0.3092498481...
Can't understand why the following takes place: ``` String date = "06-04-2007 07:05"; SimpleDateFormat fmt = new SimpleDateFormat("MM-dd-yyyy HH:mm"); Date myDate = fmt.parse(date); System.out.println(myDate); //Mon Jun 04 07:05:00 EDT 2007 long timestamp = myDate.getTime(); System.out.println(timestamp); //1180955100000 -- where are the milliseconds? // on the other hand... myDate = new Date(); System.out.println(myDate); //Tue Sep 16 13:02:44 EDT 2008 timestamp = myDate.getTime(); System.out.println(timestamp); //1221584564703 -- why, oh, why? ``` What milliseconds? You are providing only minutes information in the first example, whereas your second example grabs current date from the system with milliseconds, what is it you're looking for? ``` String date = "06-04-2007 07:05:00.999"; SimpleDateFormat fmt = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss.S"); Date myDate = fmt.parse(date); System.out.println(myDate); long timestamp
[ -0.2168925702571869, -0.007142576854676008, 1.0773162841796875, -0.1791238784790039, 0.03785644844174385, 0.06014745309948921, 0.267095685005188, -0.2820821702480316, -0.4775325357913971, -0.23983320593833923, -0.36353355646133423, 0.37716639041900635, 0.1440274566411972, 0.520527899265289...
= myDate.getTime(); System.out.println(timestamp); ```
[ 0.32470405101776123, -0.10940538346767426, 0.4958585798740387, -0.4926491379737854, 0.32343539595603943, -0.05540155619382858, 0.32241031527519226, 0.01445613894611597, -0.17000244557857513, -0.5906789302825928, -0.22428898513317108, 0.18566665053367615, -0.16653193533420563, 0.53929591178...
How do you guys manage the information overflow? What are the tools that you guys use? One of the usefull tool is RSS feed reader. Does Any body uses any other tools or any other ways to effectively manage the information? Be an information snob. If the blog doesn't absolutely rock your world, don't read it. It's so easy to get bogged down, even obsessed, with too much information. No matter what tools you have, you're still human and can only read so many words per day.
[ 0.7541832327842712, 0.0206715427339077, 0.02247251383960247, 0.6438726782798767, -0.34207600355148315, -0.5647835731506348, 0.32342737913131714, 0.673399031162262, -0.162551611661911, -0.3511405885219574, 0.18097549676895142, 0.4892638623714447, -0.14677397906780243, 0.07134604454040527, ...
Is it possible to listen for a certain hotkey (e.g:`Ctrl``-``I`) and then perform a specific action? My application is written in C, will only run on Linux, and it doesn't have a GUI. Are there any libraries that help with this kind of task? EDIT: as an example, amarok has global shortcuts, so for example if you map a combination of keys to an action (let's say `Ctrl``-``+`, `Ctrl` and `+`) you could execute that action when you press the keys. If I would map `Ctrl``-``+` to the volume increase action, each time I press `ctrl``-``+` the volume should increase by
[ -0.01416772697120905, -0.1432008296251297, 0.25886332988739014, 0.004710121545940638, -0.01847017928957939, 0.040346696972846985, 0.3971008062362671, -0.22587934136390686, -0.3511001765727997, -0.5948832631111145, -0.027587885037064552, 0.9469576478004456, -0.3733522295951843, -0.232874274...
a certain amount. Thanks How global do your hotkeys need to be? Is it enough for them to be global for a X session? In that case you should be able to open an Xlib connection and listen for the events you need. Ordinarily keyboard events in X are delivered to the window that currently has the focus, and propagated up the hierarchy until they are handled. Clearly this is not what we want. We need to process the event before any other window can get to it. We need to call [XGrabKey](http://tronche.com/gui/x/xlib/input/XGrabKey.html) on the root window with the keycode and modifiers of
[ 0.0541345439851284, -0.06795185059309006, 0.4255700409412384, 0.2698320746421814, -0.10164962708950043, -0.0946599468588829, 0.10654245316982269, 0.34732916951179504, -0.2828262448310852, -0.5978115200996399, -0.1996382176876068, 0.6489232778549194, -0.3876515030860901, -0.1396141350269317...
our hotkey to accomplish this. I found a good example [here](http://ubuntuforums.org/showpost.php?p=5419687&postcount=1).
[ 0.265286922454834, 0.05852019414305687, 0.18378733098506927, 0.09215342998504639, 0.14517052471637726, -0.2586710453033447, -0.023164330050349236, 0.22721552848815918, -0.2315501868724823, -0.33508825302124023, -0.4506473243236542, 0.03065093234181404, 0.04260377213358879, 0.13198615610599...
What should I type on the Mac OS X terminal to run a script as root? As in any unix-based environment, you can use the [`sudo`](http://xkcd.com/149/) command: ``` $ sudo script-name ``` It will ask for your password (your own, not a separate `root` password).
[ -0.3746671974658966, -0.1157580092549324, 0.23653779923915863, -0.030724283307790756, 0.13735193014144897, -0.07703975588083267, 0.37298792600631714, 0.3504658341407776, -0.006004916969686747, -0.6648826003074646, -0.11987250298261642, 0.3793172538280487, -0.035212837159633636, 0.266972213...
I cannot seem to compile mod\_dontdothat on Windows. Has anybody managed to achieve this? Edit: I've tried compiling the file according to the readme on the site and I've tried to add extra libs to reduce the link errors. Ive got the following installed: 1. Apache 2.2.9 2. Visual Studio 2008 3. ActivePerl 4. apxs-win32 from ApacheLounge 5. Subversion libs and headers I run the following command line: ``` C:\Program Files\Apache Software Foundation\Apache2.2\bin>apxs -c -I ..\include\ svn_config.h -L ..\lib -L C:\Progra~1\Micros~1.0\VC\lib -l apr-1.lib -l aprutil- 1.lib -l svn_subr-1.lib -l libapr-1.lib -l libaprutil-1.lib -l libhttpd.lib -l l ibsvn_subr-1.lib -l mod_dav.lib mod_dontdothat.c ``` Then I get the following errors: ``` cl /nologo /MD /W3 /O2 /D WIN32 /D
[ -0.017938844859600067, 0.378843754529953, 0.6512228846549988, -0.11770397424697876, -0.09853102266788483, -0.24743275344371796, 0.9887266755104065, -0.09026245772838593, -0.19161532819271088, -0.5935585498809814, -0.08105897903442383, 0.8967964053153992, -0.41809147596359253, -0.0637709870...
_WINDOWS /D NDEBUG -I"C:\PROGRA~1\APACHE~ 1\Apache2.2\include" /I"..\include\svn_config.h" /c /Fomod_dontdothat.lo mod_d ontdothat.c mod_dontdothat.c link kernel32.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"C:\PRO GRA~1\APACHE~1\Apache2.2\lib" /out:mod_dontdothat.so /libpath:"..\lib" /libpat h:"C:\Progra~1\Micros~1.0\VC\lib" apr-1.lib aprutil-1.lib svn_subr-1.lib libapr -1.lib libaprutil-1.lib libhttpd.lib libsvn_subr-1.lib mod_dav.lib mod_dontdot hat.lo Creating library mod_dontdothat.lib and object mod_dontdothat.exp mod_dontdothat.lo : error LNK2019: unresolved external symbol _dav_svn_split_uri @32 referenced in function _is_this_legal svn_subr-1.lib(io.obj) : error LNK2001: unresolved external symbol __imp__libint l_dgettext svn_subr-1.lib(subst.obj) : error LNK2001: unresolved external symbol __imp__lib intl_dgettext svn_subr-1.lib(config_auth.obj) : error LNK2001: unresolved external symbol __im p__libintl_dgettext svn_subr-1.lib(time.obj) : error LNK2001: unresolved external symbol __imp__libi ntl_dgettext svn_subr-1.lib(nls.obj) : error LNK2001: unresolved external symbol __imp__libin tl_dgettext svn_subr-1.lib(dso.obj) : error LNK2001: unresolved external symbol __imp__libin tl_dgettext svn_subr-1.lib(path.obj) : error LNK2001:
[ -0.4704371392726898, 0.21183021366596222, 0.5432206988334656, 0.008867141790688038, 0.023281069472432137, 0.30553632974624634, 0.3290519416332245, -0.40900281071662903, -0.4082934558391571, -0.6009769439697266, -0.3370205760002136, 0.6235367655754089, -0.4704216420650482, 0.208975762128829...
unresolved external symbol __imp__libi ntl_dgettext svn_subr-1.lib(prompt.obj) : error LNK2001: unresolved external symbol __imp__li bintl_dgettext svn_subr-1.lib(error.obj) : error LNK2019: unresolved external symbol __imp__lib intl_dgettext referenced in function _print_error svn_subr-1.lib(config.obj) : error LNK2001: unresolved external symbol __imp__li bintl_dgettext svn_subr-1.lib(utf.obj) : error LNK2001: unresolved external symbol __imp__libin tl_dgettext svn_subr-1.lib(cmdline.obj) : error LNK2001: unresolved external symbol __imp__l ibintl_dgettext svn_subr-1.lib(utf.obj) : error LNK2019: unresolved external symbol __imp__libin tl_sprintf referenced in function _fuzzy_escape svn_subr-1.lib(path.obj) : error LNK2001: unresolved external symbol __imp__libi ntl_sprintf svn_subr-1.lib(cmdline.obj) : error LNK2019: unresolved external symbol __imp__l ibintl_fprintf referenced in function _svn_cmdline_init svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp __SHGetFolderPathA@20 referenced in function _svn_config__win_config_path svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp __SHGetFolderPathW@20 referenced in function _svn_config__win_config_path svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol
[ -0.8860311508178711, 0.34828245639801025, 0.5724158883094788, -0.003140601795166731, -0.16239909827709198, 0.6098365783691406, 0.4155244529247284, -0.3753127455711365, -0.45407336950302124, -0.45331522822380066, -0.2848888635635376, 0.6530164480209351, -0.4009501338005066, 0.30625945329666...
__imp __RegCloseKey@4 referenced in function _svn_config__parse_registry svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp __RegEnumKeyExA@32 referenced in function _svn_config__parse_registry svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp __RegOpenKeyExA@20 referenced in function _svn_config__parse_registry svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp __RegQueryValueExA@24 referenced in function _parse_section svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp __RegEnumValueA@32 referenced in function _parse_section svn_subr-1.lib(win32_xlate.obj) : error LNK2019: unresolved external symbol __im p__CoUninitialize@0 referenced in function _svn_subr__win32_xlate_open svn_subr-1.lib(win32_xlate.obj) : error LNK2019: unresolved external symbol __im p__CoInitializeEx@8 referenced in function _svn_subr__win32_xlate_open svn_subr-1.lib(win32_xlate.obj) : error LNK2019: unresolved external symbol __im p__CoCreateInstance@20 referenced in function _get_page_id_from_name svn_subr-1.lib(nls.obj) : error LNK2019: unresolved external symbol __imp__libin tl_bindtextdomain referenced in function _svn_nls_init svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _inflate referenced
[ -0.5044617652893066, 0.4249666631221771, 0.60459965467453, -0.05740413814783096, -0.18233290314674377, 0.7274885177612305, 0.3247520923614502, -0.349290132522583, -0.4725705087184906, -0.5011286735534668, 0.004064070526510477, 0.6232762932777405, -0.4605252742767334, 0.18953630328178406, ...
in function _read_handler_gz svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _inflateI nit_ referenced in function _read_handler_gz svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _deflate referenced in function _write_handler_gz svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _deflateI nit_ referenced in function _write_handler_gz svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _deflateE nd referenced in function _close_handler_gz svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _inflateE nd referenced in function _close_handler_gz mod_dontdothat.so : fatal error LNK1120: 21 unresolved externals apxs:Error: Command failed with rc=6291456 . ``` I'm not too much of a C guru, so any help in finding these unresolved external symbols will be much appreciated! I managed to compile the module. Prerequisites: * Apache 2.2.11 * [apxs-win32](http://www.apachelounge.com/download/apxs_win32.zip) from www.apachelounge.com * Visual
[ -0.13943912088871002, 0.28310632705688477, 0.5889223217964172, -0.06327053159475327, -0.24111196398735046, 0.10091788321733475, 0.8926604390144348, -0.43099117279052734, -0.16866138577461243, -0.44853824377059937, -0.04744334891438484, 0.7374441027641296, -0.0764247253537178, -0.2263574451...
Studio 2005 * [Active Perl 5.8.8](http://www.activestate.com/activeperl/) (you need perl for apxs-win32 installation) Here is a step-by-step guide. Download these packages: * <http://subversion.tigris.org/files/documents/15/44595/svn-win32-1.5.5_dev.zip> (we need the libraries and header files from this package) * <http://subversion.tigris.org/downloads/subversion-1.5.5.zip> (we will be using the `mod_dav_svn` sources to compile a static lib) Unpack the dev package to `c:\temp\svn` and the other package to `c:\temp\svn-src` and the `mod_dontdothat` files to `C:\Temp\dontdothat`. One of the dependencies of `mod_dontdothat` module is `mod_dav_svn` module. Unfortunately you'll find the `mod_dav_svn` binary only as a shared library (DLL). You cannot link against a DLL. So the first step is to build a static `mod_dav_svn` library: ``` cd C:\Temp\svn-src\subversion\mod_dav_svn apxs -c -I ..\include
[ 0.3758796751499176, -0.05358397960662842, 0.29836252331733704, -0.15256686508655548, -0.5316278338432312, -0.3804980516433716, 0.2917720079421997, -0.4358552098274231, -0.24446912109851837, -0.2813926339149475, -0.29471802711486816, 0.8632418513298035, -0.3069143295288086, -0.3266482651233...
-L C:\Temp\svn\lib -l libsvn_delta-1.lib -l libsvn_diff-1.lib -l libsvn_fs-1.lib -l libsvn_fs_base-1.lib -l libsvn_fs_fs-1.lib -l libsvn_fs_util-1.lib -l libsvn_repos-1.lib -l libsvn_subr-1.lib -l libapr-1.lib -l libaprutil-1.lib -l libhttpd.lib -l mod_dav.lib -l xml.lib -n mod_dav_svn mod_dav_svn.c activity.c authz.c deadprops.c liveprops.c lock.c merge.c mirror.c repos.c util.c version.c reports\dated-rev.c reports\file-revs.c reports\get-locations.c reports\get-location-segments.c reports\get-locks.c reports\log.c reports\mergeinfo.c reports\replay.c reports\update.c ``` The apxs call will print the commands it executes. The last command is a link call which builds the DLL. Copy it replace "link" by "lib", remove the "/dll" param, and change the "out" param file name to "`libmod_dav_svn.lib`". You should get something similar to: ``` lib kernel32.lib /nologo /subsystem:windows /machine:I386
[ -0.18650047481060028, 0.05773156136274338, 0.7901687026023865, -0.1349121779203415, -0.1728517860174179, 0.22387047111988068, 0.16525226831436157, -0.1507815718650818, -0.36061716079711914, -0.585034191608429, -0.49752816557884216, 0.3087090849876404, -0.5667209625244141, 0.081865146756172...
/libpath:"C:\PROGRA~1\APACHE~1\Apache2.2\lib" /out:libmod_dav_svn.lib /libpath:"C:\Temp\svn\lib" libsvn_delta-1.lib libsvn_diff-1.lib libsvn_fs-1.lib libsvn_fs_base-1.lib libsvn_fs_fs-1.lib libsvn_fs_util-1.lib libsvn_repos-1.lib libsvn_subr-1.lib libapr-1.lib libaprutil-1.lib libhttpd.lib mod_dav.lib xml.lib reports\update.lo reports\replay.lo reports\mergeinfo.lo reports\log.lo reports\get-locks.lo reports\get-location-segments.lo reports\get-locations.lo reports\file-revs.lo reports\dated-rev.lo version.lo util.lo repos.lo mirror.lo merge.lo lock.lo liveprops.lo deadprops.lo authz.lo activity.lo mod_dav_svn.lo ``` You will get some link warnings. You can ignore them. Copy the `libmod_dav_svn.lib` to the `mod_dontdothat` directory. Now start the compilation process for `mod_dontdothat`: ``` C:\Temp\dontdothat apxs -c -I C:\Temp\svn\include -L C:\Temp\svn\lib -l libsvn_subr-1.lib -l libapr-1.lib -l libaprutil-1.lib -l libhttpd.lib -l mod_dav.lib -l xml.lib -l libmod_dav_svn.lib mod_dontdothat.c apxs -i -n dontdothat mod_dontdothat.so ``` This should do the trick.
[ -0.08069758862257004, 0.06865361332893372, 0.6714146137237549, -0.058065950870513916, 0.11944915354251862, -0.23819127678871155, 0.6354745030403137, -0.03736649453639984, -0.27802005410194397, -0.8680723309516907, -0.3596601188182831, 0.5099762678146362, -0.5199663043022156, 0.046314213424...
The JPEG compression encoding process splits a given image into blocks of 8x8 pixels, working with these blocks in future lossy and lossless compressions. [[source]](http://en.wikipedia.org/wiki/Jpeg#JPEG_codec_example) It is also mentioned that if the image is a multiple 1MCU block (defined as a Minimum Coded Unit, 'usually 16 pixels in both directions') that lossless alterations to a JPEG can be performed. [[source]](http://en.wikipedia.org/wiki/Jpeg#Lossless_editing) I am working with product images and would like to know both if, and how much benefit can be derived from using multiples of 16 in my final image size (say, using an image with size 480px by 360px) vs. a non-multiple
[ 0.5861980319023132, -0.06636358797550201, 0.16409383714199066, -0.015176445245742798, -0.42794397473335266, 0.3563384413719177, -0.059226855635643005, -0.6652290225028992, -0.452688068151474, -0.6491392850875854, -0.15770086646080017, 0.11348029971122742, -0.3458264172077179, 0.11025165021...
of 16 (such as 484x362). In this example I am not interested in further alterations, editing, or recompression of the final image. To try to get closer to a specific answer where I know there must be largely generalities: Given a 480x360 image that is 64k and saved at maximum quality in Photoshop [[example]](http://enstxzrnsprxt.6hops.net/Random_Bill_Blass_Pen_and_Pencil_Set___2_PacklewStandard.jpg): * Can I expect any quality loss from an image that is 484x362 * What amount of file size addition can I expect (for this example, the additional space would be white pixels) * Are there any other disadvantages to growing larger than the 8px grid? I know it's arbitrary to
[ 0.6004100441932678, -0.01232145819813013, 0.4098488390445709, -0.07252666354179382, -0.14381791651248932, 0.059985801577568054, -0.1559508740901947, -0.330010324716568, -0.5438695549964905, -0.5327037572860718, -0.06993980705738068, 0.32616689801216125, -0.42313921451568604, 0.005829736124...
use that specific example, but it would still be helpful (for me and potentially any others pondering an image size) to understand what level of compromise I'd be dealing with in breaking the non-8px grid. The key issue here is a debate I've had is whether 8-pixel divisible images are higher quality than images that are not divisible by 8-pixels. 8 pixels is the cutoff. The reason is because JPEG images are simply an array of 8x8 DCT blocks; if the image resolution isn't mod8 in both directions, the encoder has to pad the sides up to the next mod8 resolution. This
[ 0.20496611297130585, -0.2096736580133438, 0.35843735933303833, 0.23856179416179657, -0.5515853762626648, 0.012011953629553318, 0.005887593608349562, -0.4413907825946808, -0.28337955474853516, -0.5966390371322632, 0.07426907867193222, 0.34787192940711975, -0.1358281970024109, -0.01890699565...
in practice is not very expensive bit-wise; what's much worse are the cases when an image has sharp black lines (such as a letterboxed image) that don't lie on block boundaries. This is especially problematic in video encoding. The reason for this being a problem is that the frequency transform of a sharp line is a Gaussian distribution of coefficients--resulting in an enormous number of bits to code. For those curious, the most common method of padding edges in intra compression (such as JPEG images) is to mirror the lines of pixels before the edge. For example, if you need to
[ 0.21575017273426056, -0.27276965975761414, 0.35409781336784363, 0.25796616077423096, -0.5259035229682922, 0.015787273645401, 0.030106790363788605, -0.3351518511772156, -0.09566625207662582, -0.7673620581626892, -0.13215984404087067, 0.7887600660324097, 0.012870249338448048, 0.2124031633138...
pad three lines and line X is the edge, line X+1 is equal to line X, line X+2 is equal to line X-1, and line X+3 is equal to line X-2. This quite effectively minimizes the cost in transform coefficients of the extra lines. In inter coding, however, the padding algorithms generally simply duplicate the last line, because the mirror method does not work well for inter compression, such as in video compression.
[ -0.26767250895500183, -0.35733547806739807, 0.9657226204872131, -0.1262984424829483, -0.560380220413208, 0.41431137919425964, -0.2896658778190613, -0.39885982871055603, -0.19223253428936005, -0.791943371295929, -0.10480943322181702, 0.24233779311180115, -0.20407734811306, -0.12421057373285...
I'm developing a .NET 3.5 XBAP application that runs perfectly fine in FF3 and IE6/7 etc. I'm just wondering if its possible to get these to run under other browsers, specifically (as its in the limelight at the moment) Google Chrome. XBAP applications do work in google chrome, however you have to set your environments PATH variable to the directory where xpcom.dll is located. for example SET PATH=PATH;"C:\Program Files\Mozilla Firefox"
[ 0.4693107008934021, 0.2737778425216675, 0.4949871003627777, -0.001778968027792871, 0.04025981202721596, -0.37078824639320374, 0.1726721227169037, 0.14232832193374634, -0.22659701108932495, -0.7086136937141418, -0.13353915512561798, 0.8099510073661804, -0.6438068747520447, 0.008151297457516...
When running any kind of server under load there are several resources that one would like to monitor to make sure that the server is healthy. This is specifically true when testing the system under load. Some examples for this would be CPU utilization, memory usage, and perhaps disk space. What other resource should I be monitoring, and what tools are available to do so? As many as you can afford to, and can then graph/understand/look at the results. Monitoring resources is useful for not only capacity planning, but anomaly detection, and anomaly detection significantly helps your ability to detect security events. You have
[ 0.48437172174453735, 0.05617149546742439, 0.021430466324090958, 0.25048208236694336, 0.12315097451210022, -0.14303293824195862, 0.267453670501709, -0.04296259209513664, -0.5245168805122375, -0.7622807621955872, 0.18693086504936218, 0.6263670921325684, -0.13578329980373383, -0.0474655181169...
a decent start with your basic graphs. I'd want to also monitor the number of threads, number of connections, network I/O, disk I/O, page faults (arguably this is related to memory usage), context switches. I really like munin for graphing things related to hosts.
[ 0.17200638353824615, -0.2676946818828583, -0.007475817576050758, 0.3665933310985565, -0.36840492486953735, -0.17193056643009186, 0.1770392209291458, 0.18387484550476074, -0.4989907443523407, -0.839545488357544, 0.3440319001674652, 0.6200591325759888, -0.32416027784347534, 0.119947321712970...
As popular as Ruby and Rails are, it seems like this problem would already be solved. JRuby and mod\_rails are all fine and dandy, but why isn't there an Apache mod for just straight Ruby? The basic problem is this: for a long time, MRI was the only feasible Ruby Implementation. MRI has a number of problems that make it hard to embed it into another application (which is basically what [mod\_ruby](http://ModRuby.Net/) does: it embeds MRI in Apache), especially a multi-threaded one (which Apache is). It is not particularly thread-safe and it has quite a bit of global state. This global state
[ 0.11560731381177902, -0.06505169719457626, 0.3693110942840576, 0.030868295580148697, -0.4780510663986206, -0.3832463026046753, 0.45181044936180115, 0.10290499776601791, -0.10443109273910522, -0.573619544506073, 0.2374534010887146, 0.4927942156791687, -0.44712716341018677, 0.227160081267356...
means for example that if one Rails application modifies some class, then *all other* Rails applications that run on the same Apache server, will *also* see this modified class. Another problem is that the MRI source code is not easily hackable. MRI is now more than 15 years old, and it's starting to show. As a result of these problems, mod\_ruby has never *really* properly worked, and at some point the maintainers simply gave up. The C based PHP interpreter, on the other hand, was designed from day one to be run as mod\_php inside Apache. Indeed, for the first couple of versions,
[ 0.035394929349422455, 0.11979750543832779, 0.5012692213058472, -0.255896657705307, -0.32652202248573303, -0.4500057101249695, 0.6068198084831238, -0.17785580456256866, 0.14036686718463898, -0.4877817630767822, 0.5326681137084961, 0.3229876756668091, -0.307535320520401, 0.2247399538755417, ...
there wasn't even a commandline version of the interpreter, mod\_php was the *only* way to run PHP. [Phusion Passenger (aka mod\_rack aka mod\_rails)](http://ModRails.Com/) solves this problem by basically giving up and sidestepping the problem: they simply run a seperate copy of MRI in a seperate process for every application. It works great, and not only for Ruby. It supports [WSGI](http://WSGI.Org/) (standard interface for Python Web Frameworks), [Rack](http://Rack.RubyForge.Org/) (standard interface for Ruby Web Frameworks) and direct support for Ruby on Rails. My hopes are on [mod\_rubinius](https://GitHub.Com/rue/mod_rubinius/), which unfortunately doesn't exist yet. [Rubinius](http://Rubini.us/) was designed from the beginning to be thread-safe, embeddable, free of
[ 0.08234276622533798, -0.07920610904693604, 0.3908625841140747, -0.05674591287970543, -0.38318586349487305, -0.021563628688454628, 0.46056246757507324, -0.06750035285949707, 0.13651515543460846, -0.6565269231796265, 0.3686504662036896, 0.28392186760902405, -0.3151334524154663, 0.14600095152...
global state, not use the C stack and so on. It was designed to be able to run multiple Rubinius VMs inside one Rubinius process. This makes mod\_rubinius infinitely easier to implement and maintain than mod\_ruby. Unfortunately, of course, Rubinius is not released yet, and the real work on mod\_rubinius cannot even begin until Rubinius is released. The good news is that mod\_rubinius already has more manpower behind it than mod\_ruby ever had, because it has paid developers working on it by a Rails hosting company that *desperately* wants to use it themselves.
[ -0.23816947638988495, 0.05244583263993263, 0.46407365798950195, 0.06180178374052048, 0.06394913047552109, -0.1517355889081955, 0.535847544670105, 0.6501909494400024, -0.23991531133651733, -0.8113782405853271, 0.1242804005742073, 0.5806989669799805, -0.46118366718292236, 0.34887805581092834...
How to you find the URL that represents the documentation of a .NET framework method on the MSDN website? For example, I want to embed the URL for the .NET framework method into some comments in some code. The normal "mangled" URL that one gets searching MSDN isn't very friendly looking: <http://msdn.microsoft.com/library/xd12z8ts.aspx>. Using a Google search URL isn't all that pretty looking either. What I really want a URL that can be embedded in comments that is plain and easy to read. For example, // blah blah blah. See http://<....>/System.Byte.ToString for more information It's simple -- just add the name of the method to
[ 0.45414677262306213, 0.05726484954357147, 0.15789328515529633, 0.3167731463909149, -0.13112680613994598, -0.39121612906455994, 0.09209150075912476, 0.22302767634391785, -0.19469515979290009, -0.7533770203590393, 0.23172800242900848, 0.3705257177352905, -0.019784828647971153, 0.289270341396...
the end of <http://msdn.microsoft.com//library/>. For example, to find the URL for the System.Byte.ToString method go to <http://msdn.microsoft.com//library/System.Byte.ToString>
[ -0.2413777858018875, -0.06440047174692154, 0.7118173241615295, 0.04973829910159111, 0.0189034566283226, -0.08444401621818542, -0.1563049703836441, 0.1065148338675499, -0.1895723044872284, -0.4278715252876282, -0.24884846806526184, 0.07094541937112808, -0.06887034326791763, 0.40266728401184...
I need to provide statistics on how many lines of code `(LOC)` associated with a system. The application part is easy but I need to also include any code residing within the SQL Server database. This would apply to stored procedures, functions, triggers, etc. How can I easily get that info? Can it be done (accurately) with **TSQL** by querying the system `tables\sprocs`, etc? In Management Studio, right click the database you want a line count for... select Tasks -> Generate Scripts, you can select script options in the Scripts Wizard to include or exclude objects, when you have it set
[ 0.45244190096855164, -0.057008046656847, 0.11874554306268692, 0.30534812808036804, 0.08440807461738586, -0.11162450164556503, 0.06822855770587921, -0.08942046016454697, -0.2225237637758255, -0.7165719866752625, 0.12799377739429474, 0.5434133410453796, -0.06097711622714996, -0.1108908280730...
the way you like it can generate to a new query window
[ 0.39165353775024414, -0.31827521324157715, 0.41033339500427246, 0.2719893157482147, -0.10429158061742783, -0.21031753718852997, -0.11993487179279327, 0.17955878376960754, -0.3315381109714508, -0.7307529449462891, -0.08966966718435287, 0.4998187720775604, -0.2757817208766937, 0.174925610423...
I've been asked to implement some code that will update a row in a MS SQL Server database and then use a stored proc to insert the update in a history table. We can't add a stored proc to do this since we don't control the database. I know in stored procs you can do the update and then call execute on another stored proc. Can I set it up to do this in code using one SQL command? Either run them both in the same statement (separate the separate commands by a semi-colon) or a use a transaction so you
[ 0.3554195165634155, 0.01742376573383808, 0.22759859263896942, -0.03386982902884483, 0.1659582257270813, 0.13812799751758575, -0.06190858781337738, -0.24444183707237244, -0.28711968660354614, -0.6200196146965027, 0.17106696963310242, 0.6620241403579712, -0.5666495561599731, 0.18136100471019...
can rollback the first statement if the 2nd fails.
[ -0.0072874221950769424, -0.1837792545557022, -0.033405765891075134, 0.1240725964307785, 0.028971955180168152, -0.23585069179534912, 0.13805072009563446, -0.0037644871044903994, 0.051568079739809036, -0.23703910410404205, -0.6482985615730286, 0.7429238557815552, -0.11060623824596405, -0.202...
The problem is simple, but I'm struggling a bit already. ``` Server server = new Server(8080); Context context = new Context(server, "/", Context.NO_SESSIONS); context.addServlet(MainPageView.class, "/"); context.addServlet(UserView.class, "/signup"); server.start(); ``` That's a pretty standard piece of code that you can find anywhere in Jetty world. I have an application that embeds Jetty as a servlet engine and has some servlets. Instantiation of some of these servlets requires heavy work on startup. Say – reading additional config files, connecting to the database, etc. How can I make the servlet engine instantiate all servlets eagerly, so that I can do all the hard work upfront and not on the
[ -0.12568064033985138, 0.15612082183361053, 0.495337575674057, -0.01594717800617218, -0.18638116121292114, -0.1646500825881958, 0.16472302377223969, -0.3077471852302551, -0.4618287682533264, -0.6413871645927429, 0.043052271008491516, 0.6456248760223389, -0.3740197420120239, -0.0307104419916...
first user request? I'm not sure why using Guice make's Justin's option not work for you. What exactly is getting injected in? I'm not sure if this would help you at all because it is very similar to what Justin wrote above but if you do it this way, Jetty will do the actually instantiating. ``` Context context = new Context(server, "/", Context.NO_SESSIONS); ServletHolder mainPageViewHolder = new ServletHolder(MainPageView.class); // Do this to force Jetty to instantiate the servlet mainPageViewHolder.getServlet(); context.addServlet(mainPageViewHolder, "/"); ```
[ 0.093646340072155, -0.37975725531578064, 0.5055102109909058, -0.10963163524866104, -0.10407768934965134, -0.06638181209564209, 0.23635537922382355, -0.34608888626098633, -0.07552136480808258, -0.8388801217079163, -0.08584968000650406, 0.4426240921020508, -0.4329819083213806, 0.001262818579...
The Visual Studio compiler does not seem to warn on signed/unsigned assignments, only on comparisons. For example the code below will generate a warning on the if statement but not the initial assignments. Is there anyway to make it catch these? I'm already at W4 but thought (hoped) there may be another setting somewhere. Thanks, ``` int foo(void) { unsigned int fooUnsigned = 0xffffffff; int fooSigned = fooUnsigned; // no warning if (fooSigned < fooUnsigned) // warning { return 0; }
[ 0.2935183346271515, 0.1288248747587204, -0.18557508289813995, -0.2592048645019531, -0.20421133935451508, -0.16787508130073547, 0.41595739126205444, -0.15664611756801605, -0.3358798623085022, -0.4102344512939453, -0.03497711196541786, 0.7947105765342712, -0.4109300374984741, -0.083278365433...
return fooSigned; } ``` Update: Quamrana is right, this is controlled by warning 4365 which appears to be off by default, even at W4. However you can explicitly enable it for a given warning level like so; ``` #pragma warning (4 : 4365) ``` Which results in; ``` warning C4365: 'initializing' : conversion from 'unsigned int' to 'int', signed/unsigned mismatch ``` You need to enable warning 4365 to catch the assignment. That might be tricky - you need to enable ALL warnings - use /Wall which enables lots of warnings, so you may have some trouble seeing the warning occur, but it does.
[ 0.009621740318834782, 0.019071463495492935, 0.11619211733341217, -0.3752395808696747, 0.19728179275989532, -0.3288019299507141, 0.5291205644607544, -0.15115606784820557, -0.09962443262338638, -0.201304629445076, -0.42798876762390137, 0.7830433249473572, -0.5268161296844482, -0.051827944815...
I am using URLDownloadToFile to retrieve a file from a website. Subsequent calls return the original file rather than an updated version. I assume it is retrieving a cached version. Call DeleteUrlCacheEntry with the same URL just prior to calling URLDownloadToFile. You will need to link against Wininet.lib
[ 0.3480582535266876, 0.1253160983324051, 0.3063223659992218, -0.059790197759866714, 0.1059035137295723, -0.3309175372123718, 0.5357795357704163, 0.058460019528865814, -0.032400257885456085, -0.6757346987724304, -0.05053337290883064, 0.5743454694747925, -0.16522957384586334, 0.62798810005187...
What method do I call to get the name of a class? ``` In [1]: class Test: ...: pass ...: In [2]: Test.__name__ Out[2]: 'Test' ```
[ 0.11179214715957642, 0.19125992059707642, -0.123836949467659, 0.09553596377372742, -0.049869734793901443, -0.10497156530618668, 0.23490813374519348, -0.18057361245155334, 0.021718192845582962, -0.20828767120838165, -0.1868039071559906, 0.2365189641714096, -0.27515706419944763, 0.1836676299...
As part of the Nant copy task, I would like to change the properties of the files in the target location. For instance make the files "read-write" from "read-only". How would I do this? Use the <[attrib](http://nant.sourceforge.net/release/0.85-rc1/help/tasks/attrib.html)> task. For example, to make the file "test.txt" read/write, you would use ``` <attrib file="test.txt" readonly="false"/> ```
[ 0.4985945522785187, 0.119256392121315, -0.09982030093669891, -0.004606957547366619, 0.15175800025463104, -0.01448263693600893, 0.09489457309246063, -0.1682918667793274, -0.10512989014387131, -0.8202400207519531, 0.033118464052677155, 0.5180392861366272, -0.15860863029956818, 0.225195199251...
I am serving all content through apache with `Content-Encoding: zip` but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are requested. This is something that, I believe, `mod_gzip` did in Apache 1.x automatically, but just having the file with .gz next to it. That's no longer the case with `mod_deflate`. This functionality was misplaced in mod\_gzip anyway. In Apache 2.x, [you do that with content negotiation](http://httpd.apache.org/docs/2.2/content-negotiation.html). Specifically, you need to enable `MultiViews` with the [`Options` directive](http://httpd.apache.org/docs/2.2/mod/core.html#options) and you need
[ 0.6091710329055786, 0.11629458516836166, 0.6909303665161133, -0.24533793330192566, -0.3060619533061981, -0.4767053425312042, 0.3740096390247345, -0.06710325181484222, -0.21375934779644012, -0.7584421038627625, -0.43219292163848877, 0.7124121189117432, -0.17494960129261017, 0.11097885668277...
to specify your encoding types with the [`AddEncoding` directive](http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addencoding).
[ 0.308009535074234, 0.07942754030227661, 0.04222344979643822, -0.07474116235971451, 0.29552584886550903, -0.0357954204082489, 0.23710201680660248, -0.07993513345718384, -0.08896857500076294, -0.6671177744865417, -0.2957584857940674, 0.41701483726501465, -0.354557603597641, -0.28866368532180...
I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP. I've created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that's not to say they don't work. Any advice? Thanks. The parseDate and formatDate tags work, but they work with Date objects. You can call new java.util.Date(longvalue) to get a date object, then pass that to the standard tag. somewhere other than the jsp create your date object. ``` long longvalue = ...;//from database. java.util.Date dateValue
[ 0.6228083372116089, 0.016133885830640793, 0.22866688668727875, -0.18899589776992798, 0.26995494961738586, -0.2654942274093628, -0.21571142971515656, 0.04688233509659767, -0.2578558027744293, -0.33107098937034607, -0.07965069264173508, 0.44424909353256226, -0.41828739643096924, 0.1655617356...
= new java.util.Date(longvalue); request.setAttribute("dateValue", dateValue); ``` put it on the request and then you can access it in your tag like this. ``` <fmt:formatDate value="${dateValue}" pattern="MM/dd/yyyy HH:mm"/> ```
[ 0.3149109184741974, -0.27474939823150635, 0.8012586236000061, -0.30961015820503235, 0.32322701811790466, -0.14341644942760468, 0.10177293419837952, -0.3359709680080414, -0.20682959258556366, -0.5246402025222778, -0.3739283084869385, 0.3182253837585449, -0.3411843180656433, 0.18814603984355...
When creating a UserControl in WPF, I find it convenient to give it some arbitrary Height and Width values so that I can view my changes in the Visual Studio designer. When I run the control, however, I want the Height and Width to be undefined, so that the control will expand to fill whatever container I place it in. How can I acheive this same functionality without having to remove the Height and Width values before building my control? (Or without using DockPanel in the parent container.) The following code demonstrates the problem: ``` <Window x:Class="ExampleApplication3.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
[ -0.16702280938625336, -0.03771013766527176, 0.411599338054657, -0.2301563322544098, -0.028404900804162025, 0.045132946223020554, -0.050190556794404984, -0.24791567027568817, -0.2618551552295685, -0.4735366702079773, -0.04952472448348999, 0.538547933101654, -0.29001671075820923, -0.02296594...
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:loc="clr-namespace:ExampleApplication3" Title="Example" Height="600" Width="600"> <Grid Background="LightGray"> <loc:UserControl1 /> </Grid> </Window> ``` The following definition of `UserControl1` displays reasonably at design time but displays as a fixed size at run time: ``` <UserControl x:Class="ExampleApplication3.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="300" Width="300"> <Grid Background="LightCyan" /> </UserControl> ``` The following definition of `UserControl1` displays as a dot at design time but expands to fill the parent `Window1` at run time: ``` <UserControl x:Class="ExampleApplication3.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
[ -0.3878094553947449, -0.041198648512363434, 0.8976587057113647, -0.24954654276371002, -0.17092964053153992, 0.21731485426425934, -0.16900837421417236, -0.24834676086902618, -0.4442809224128723, -0.7243767976760864, -0.13810208439826965, 0.3140288293361664, -0.3704698979854584, -0.049370042...
<Grid Background="LightCyan" /> </UserControl> ``` In Visual Studio add the Width and Height attribute to your UserControl XAML, but in the code-behind insert this ``` public UserControl1() { InitializeComponent(); if (LicenseManager.UsageMode != LicenseUsageMode.Designtime) { this.Width = double.NaN; ; this.Height = double.NaN; ; } } ``` This checks to see if the control is running in Design-mode. If not (i.e. runtime) it will set the Width and Height to NaN (Not a number) which is the value you set it to if you
[ 0.06118352338671684, -0.30447492003440857, 0.4552321434020996, -0.259475439786911, -0.009717069566249847, 0.013491335324943066, 0.05209512636065483, -0.2983841896057129, -0.21516448259353638, -0.8405478000640869, -0.17736972868442535, 0.6903336048126221, -0.18458044528961182, -0.0975235402...