text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
to create my own plugin "framework" as simple as possible.
I've done this for software I've written in the past, it's very handy. I did it by first creating an Interface that all my 'plugin' classes needed to implement. I then used the Java [ClassLoader](http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html) to load those classes and create instances of them.
One way you can go about it is this:
```
File dir = new File("put path to classes you want to load here");
URL loadPath = dir.toURI().toURL();
URL[] classUrl = new URL[]{loadPath};
ClassLoader cl = new URLClassLoader(classUrl);
Class loadedClass = cl.loadClass("classname"); // must be in package.class name format
```
That has loaded the class, now you | [
0.27497008442878723,
-0.03596009314060211,
0.31297245621681213,
-0.2022121697664261,
-0.23025968670845032,
-0.23351465165615082,
0.22950336337089539,
-0.3341413140296936,
-0.13250190019607544,
-0.7670736312866211,
0.08614593744277954,
0.6165760159492493,
-0.4768616855144501,
0.145720407366... | |
need to create an instance of it, assuming the interface name is MyModule:
```
MyModule modInstance = (MyModule)loadedClass.newInstance();
``` | [
-0.2878371775150299,
0.08475004881620407,
0.29529833793640137,
0.05830778926610947,
0.11417295783758163,
-0.22496788203716278,
0.3900817930698395,
0.08735689520835876,
-0.052525997161865234,
-0.8573036789894104,
-0.08822574466466904,
0.4881986081600189,
-0.38586950302124023,
0.242023065686... | |
While plenty of solutions exist for entering dates (such as calendars, drop-down menus, etc.), it doesn't seem like there are too many "standard" ways to ask for a time (or time range).
I've personally tried drop-down menus for the hour, minute, and second fields (and sometimes an "AM/PM" field, as well). I've also tried several clock-like input devices, most of which are too hard to use for the typical end-user. I've even tried "pop-out" time selection menus (which allow you to, for example, hover over the hour "10" to receive a sub-menu that contains ":00",":15",":30", and ":45") -- but none of | [
0.4248184263706207,
-0.10173043608665466,
0.3515992760658264,
0.2313293069601059,
0.264727920293808,
0.4246753752231598,
-0.03140735998749733,
0.19401510059833527,
-0.252767950296402,
-0.5215361714363098,
0.17595520615577698,
0.17159420251846313,
0.17374446988105774,
-0.002117389813065529,... | |
these methods seem natural.
So far, the best (and most universal) method I have found is just using simple text fields and forcing a user to manually populate the hour, minute, and second. Alternatively, I've had good experiences creating something similar to Outlook's "Day View" which allows you to drag and drop an event to set the start and end times.
Is there a "best way" to ask for this information? Is anybody using some type of time input widget that's really intuitive and easy to use? Or is there at least a way that's more efficient than using plain text boxes?
> | [
0.5258846879005432,
-0.31645429134368896,
0.21148723363876343,
0.3996143639087677,
-0.07586216926574707,
0.18425311148166656,
-0.03065675124526024,
0.1499374955892563,
-0.1774432510137558,
-0.7815536260604858,
0.19945628941059113,
0.49345579743385315,
-0.15253373980522156,
0.00076235091546... | |
You can always use a `template engine` to add `variables` and
> `calculated fields` to your CSS files. | [
0.3797241151332855,
0.006683171261101961,
-0.15035603940486908,
0.23776359856128693,
0.028528133407235146,
-0.42016538977622986,
-0.029201114550232887,
0.19170838594436646,
-0.16449153423309326,
-0.5932469964027405,
-0.058774277567863464,
0.4388626217842102,
-0.14743030071258545,
-0.151295... | |
I constantly hear how bad reflection is to use. While I generally avoid reflection and rarely find situations where it is impossible to solve my problem without it, I was wondering...
For those who have used reflection in applications, have you measured performance hits and, is it really so bad?
It is. But that depends on what you're trying to do.
I use reflection to dynamically load assemblies (plugins) and its performance "penalty" is not a problem, since the operation is something I do during startup of the application.
However, if you're reflecting inside a series of nested loops with reflection calls | [
0.8497470617294312,
0.17909550666809082,
-0.1418064385652542,
0.19337281584739685,
-0.25042372941970825,
-0.04774901643395424,
0.574115514755249,
-0.20218543708324432,
-0.18979190289974213,
-0.313062846660614,
0.296664834022522,
0.6395338177680969,
-0.18028587102890015,
-0.0924190506339073... | |
on each, I'd say you should revisit your code :)
For "a couple of time" operations, reflection is perfectly acceptable and you won't notice any delay or problem with it. It's a very powerful mechanism and it is even used by .NET, so I don't see why you shouldn't give it a try. | [
0.45628297328948975,
-0.09943979233503342,
0.25362634658813477,
0.38705143332481384,
0.015011242590844631,
-0.04381752014160156,
0.20357120037078857,
0.1295887678861618,
-0.14813125133514404,
-0.5712805986404419,
0.2329430878162384,
0.5993462800979614,
0.15888823568820953,
-0.1919017434120... | |
Is it possible to call a stored procedure from another stored procedure asynchronously?
**Edit:** Specifically I'm working with a DB2 database.
Executive summary: Yes, if your database has a message queue service.
You can push a message onto a queue and the queue processor will consume it asynchronously.
* Oracle: queues
* Sql Server: service broker
* DB2: event broker
For "pure" stored procedure languages (PL/Sql or T-Sql) the answer is no, since it works against the fundamental transaction model most databases have.
However, if your database has a queuing mechanism, you can use that to get the same result. | [
0.035500142723321915,
-0.06317014992237091,
-0.005167639348655939,
0.13741514086723328,
-0.04781118407845497,
0.10903827100992203,
0.007196005433797836,
0.02650737389922142,
-0.339937299489975,
-0.5088372826576233,
-0.21421433985233307,
0.3191583752632141,
-0.3094247281551361,
0.1520752459... | |
I'm trying to call an Antlr task in my Ant build.xml as follows:
```
<path id="classpath.build">
<fileset dir="${dir.lib.build}" includes="**/*.jar" />
</path>
...
<target name="generate-lexer" depends="init">
<antlr target="${file.antlr.lexer}">
<classpath refid="classpath.build"/>
</antlr>
</target>
```
But Ant can't find the task definition. I've put all of the following in that `dir.lib.build`:
* antlr-3.1.jar
* antlr-2.7.7.jar
* antlr-runtime-3.1.jar
* stringtemplate-3.2.jar
But none of those seems to have the task definition. (I've also tried putting those jars in my Ant classpath; same problem.)
The current Antlr-task jar is available at <http://www.antlr.org/share/1169924912745/antlr3-task.zip>
It can be found on the [antlr.org](http://antlr.org) website under the "File Sharing" heading. | [
-0.14385628700256348,
0.024565313011407852,
0.2875002324581146,
-0.2976836562156677,
-0.4868653416633606,
0.2683940529823303,
0.3459113538265228,
-0.06554443389177322,
-0.47070494294166565,
-1.0407371520996094,
0.3787190318107605,
0.3981512486934662,
-0.25551822781562805,
0.070352181792259... | |
What would be the Master Pages equivalent in the Java web development world? I've heard of Tiles, Tapestry and Velocity but don't know anything about them. Are they as easy to use as Master Pages?
I want something as easy as set up one template and subsequent pages derive from the template and override content regions, similar to Master Pages.
Any examples would be great!!
First, the equivalent of ASP.Net in Java is going to be a web framework, such as the ones you mention (Tiles, Tapestry and Velocity).
Master pages give the ability to define pages in terms of content slotted into | [
0.3284461796283722,
-0.2718171179294586,
0.10590048134326935,
0.4213448464870453,
-0.4953083395957947,
-0.0489858016371727,
0.0048850104212760925,
-0.1613098531961441,
-0.44245296716690063,
-0.9469155669212341,
0.13235196471214294,
0.32973188161849976,
-0.031033378094434738,
-0.13452532887... | |
a master template.
Master pages are a feature of ASP.Net (the .Net web framework), so you are looking for a feature similar to master pages in a Java web framework.
<http://tiles.apache.org/framework/tutorial/basic/pages.html> gives some basic examples using Tiles and JSP to implement something similar with Struts, a Java web framework. In this case, the Master Pages functionality is a plugin on top of Struts.
Velocity is a generic templating engine, not specialized for web pages and definitely more complicated than you need. (I've seen it used for code generation.)
Tapestry is more of a full featured web stack than Tile, and is probably good | [
0.5373522639274597,
-0.4508076608181,
0.2754238247871399,
0.4394775927066803,
-0.5387541055679321,
-0.3514096736907959,
0.13926804065704346,
-0.3335005044937134,
-0.536701500415802,
-1.039011836051941,
0.19288493692874908,
0.08236376196146011,
-0.313243567943573,
0.14477287232875824,
-0.... | |
for your purposes. Its templating functionality involves creating a component and putting all common markup in that. An example is at <http://www.infoq.com/articles/tapestry5-intro>.
The specifics of this differ based on which Java web framework you choose. | [
0.7345651388168335,
-0.42907536029815674,
0.12371370196342468,
-0.10127393901348114,
-0.11076608300209045,
-0.13749179244041443,
-0.13577227294445038,
0.09238122403621674,
-0.48085737228393555,
-0.5889378786087036,
-0.061345405876636505,
0.07118962705135345,
-0.17694762349128723,
0.0410031... | |
I need to keep the files & folders on two Windows-based, non-domain machines synchronized across a public network.
I was thinking rsync over SSH - but I was wondering if there is a simpler solution? Any possibility of using the sync framework over SFTP/SCP/SSH?
Or I'm open to better ideas?
Figured I'd post what I finally went with - WinSCP - <http://winscp.net>
Connects via GUI to an SFTP server + supports Local/Remote/Both synchronization + scriptable with command-line/batch interface. | [
0.296624094247818,
-0.07743121683597565,
0.6203203797340393,
0.10048829019069672,
0.13591688871383667,
-0.1323578655719757,
0.0874122753739357,
0.12480602413415909,
-0.27144718170166016,
-0.7670888304710388,
0.02664487436413765,
0.42773327231407166,
-0.26257285475730896,
0.0773953869938850... | |
We get a large amount of data from our clients in pdf files in varying formats [layout-wise], these files are typically report output, and are typically properly annotated [they don't usually need OCR], but not formatted well enough that simply copying several hundred pages of text out of acrobat is not going to work.
The best approach I've found so far is to write a script to parse the nearly-valid xml output (the comments are invalid and many characters are escaped in varying ways, é becomes [[[e9]]]é, $ becomes \$, % becomes \%...) of the command-line pdftoipe utility (to convert pdf | [
-0.0071391211822628975,
0.037428732961416245,
0.49379658699035645,
0.37732747197151184,
-0.07833828032016754,
-0.15207812190055847,
-0.06757025420665741,
-0.07728063315153122,
-0.0853038877248764,
-0.6594885587692261,
-0.3090030550956726,
0.5617759823799133,
-0.09136319905519485,
-0.154183... | |
files for a program called [ipe](http://tclab.kaist.ac.kr/ipe/)), which gives me text elements with their positions on each page [see sample below], which works well enough for reports where the same values are on the same place on every page I care about, but would require extra scripting effort for importing matrix [cross-tab] pdf files. pdftoipe is not at all intended for this, and at best can be compiled manually using cygwin for windows.
Are there libraries that make this easy from some scripting language I can tolerate? A graphical tool would be awesome too. And a pony.
pdftoipe output of [this sample](http://brunndahl.navarro.se/sida_002/?CoMeT_function=get_file&id=9_1 | [
0.17215728759765625,
-0.13476364314556122,
0.3885639011859894,
0.3539249300956726,
-0.28841155767440796,
-0.1424778699874878,
0.10118705034255981,
-0.3538227677345276,
-0.14720404148101807,
-0.4563151001930237,
0.23862089216709137,
0.3291085362434387,
-0.064676932990551,
-0.276245206594467... | |
"sample pdf file") looks like this:
```
<ipe creator="pdftoipe 2006/10/09"><info media="0 0 612 792"/>
<-- Page: 1 1 -->
<page gridsize="8">
<path fill="1 1 1" fillrule="wind">
64.8 144 m
486 144 l
486 727.2 l
64.8 727.2 l
64.8 144 l
h
</path>
<path fill="1 1 1" fillrule="wind">
64.8 144 m
486 144 l
486 727.2 l
64.8 727.2 l
64.8 144 l
h
</path>
<path fill="1 1 1" fillrule="wind">
64.8 144 m
486 144 l
486 727.2 l
64.8 727.2 l
64.8 144 l
h
</path>
<text stroke="1 0 0" pos="0 0" size="18" transformable="yes" matrix="1 0 0 1 181.8 707.88">This is a sample PDF fil</text>
<text stroke="1 0 0" pos="0 0" size="18" transformable="yes" matrix="1 0 0 1 356.28 707.88">e.</text>
<text stroke="1 0 0" pos="0 0" size="18" transformable="yes" matrix="1 0 0 | [
-0.23139970004558563,
0.08699530363082886,
0.8381503224372864,
0.02099495753645897,
-0.10129256546497345,
0.37590083479881287,
-0.043285127729177475,
-0.8851016759872437,
-0.07307720929384232,
-0.339387446641922,
0.03908372297883034,
0.3667938709259033,
-0.09674333781003952,
-0.20204901695... | |
1 368.76 707.88"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 692.4"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 677.88"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 663.36"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 648.84"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 634.32"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 619.8"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 | [
-0.3734380006790161,
-0.27346697449684143,
0.3623359799385071,
-0.12044507265090942,
-0.21312624216079712,
0.7291185855865479,
0.32420623302459717,
-0.7583823204040527,
-0.28528934717178345,
-0.5409479737281799,
-0.31411826610565186,
0.7994424700737,
-0.1449703872203827,
-0.216127842664718... | |
605.28"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 590.76"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 576.24"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 561.72"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 547.2"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 532.68"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 518.16"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 503.64"> </text>
<text | [
-0.25608980655670166,
-0.2839873731136322,
0.3614669442176819,
-0.07240840047597885,
-0.08113648742437363,
0.8346090316772461,
0.30324894189834595,
-0.7698782086372375,
-0.24371524155139923,
-0.6136577129364014,
-0.3194471597671509,
0.874735414981842,
0.05770822986960411,
-0.09767767786979... | |
stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 489.12"> </text>
<text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 474.6"> </text>
<text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 67.32 456.24">If you can read this</text>
<text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 214.92 456.24">,</text>
<text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 219.48 456.24"> you already have A</text>
<text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 370.8 456.24">dobe Acrobat </text>
<text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 | [
-0.2354675978422165,
-0.29643893241882324,
-0.042575933039188385,
-0.05667426809668541,
0.4387345612049103,
0.3013049066066742,
0.15317963063716888,
-0.275963693857193,
0.031928300857543945,
-0.19811679422855377,
0.06143162027001381,
0.5946961045265198,
-0.3726027309894562,
-0.338842034339... | |
1 67.32 437.64">Reader i</text>
<text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 131.28 437.64">n</text>
<text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 141.12 437.64">stalled on your computer.</text>
<text stroke="0 0 0" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 337.92 437.64"> </text>
<text stroke="0 0.502 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 342.48 437.64"> </text>
<image width="800" height="600" rect="-92.04 800.64 374.4 449.76" ColorSpace="DeviceRGB" BitsPerComponent="8" Filter="DCTDecode" length="369925">
feedcafebabe...
</image>
</page>
</ipe>
```
We use [Xpdf](http://www.foolabs.com/xpdf/about.html) in one of our applications. Its a c++ library which is primarily used for pdf rendering, although it does have a text extractor which could be useful | [
0.01976659893989563,
-0.09965510666370392,
0.6588162183761597,
0.21862812340259552,
-0.058140840381383896,
-0.04570832476019859,
0.012827686034142971,
-0.49564075469970703,
-0.0445394366979599,
-0.2680369019508362,
-0.02634967863559723,
0.5292835831642151,
-0.11831055581569672,
-0.23438100... | |
for this project. | [
0.3185604512691498,
0.10694796591997147,
0.05605480447411537,
0.2431250959634781,
0.2378615438938141,
0.07736145704984665,
0.037880025804042816,
-0.14058372378349304,
-0.05412501096725464,
-0.1955891251564026,
-0.014684654772281647,
0.28046590089797974,
0.23956932127475739,
0.0489018671214... | |
I am attempting to parse a string like the following using a .NET regular expression:
```
H3Y5NC8E-TGA5B6SB-2NVAQ4E0
```
and return the following using Split:
H3Y5NC8E
TGA5B6SB
2NVAQ4E0
I validate each character against a specific character set (note that the letters 'I', 'O', 'U' & 'W' are absent), so using string.Split is not an option. The number of characters in each group can vary and the number of groups can also vary. I am using the following expression:
```
([ABCDEFGHJKLMNPQRSTVXYZ0123456789]{8}-?){3}
```
This will match exactly 3 groups of 8 characters each. Any more or less will fail the match.
This works insofar as it correctly matches the input. However, when I | [
-0.009083203971385956,
0.1716659963130951,
0.12506774067878723,
-0.3313068151473999,
-0.2913731336593628,
0.23911155760288239,
0.5294919013977051,
-0.41571396589279175,
0.1277829259634018,
-0.4662766754627228,
-0.2584758698940277,
0.4759099781513214,
-0.2974722981452942,
-0.062455136328935... | |
use the Split method to extract each character group, I just get the final group. RegexBuddy complains that I have repeated the capturing group itself and that I should put a capture group around the repeated group. However, none of my attempts to do this achieve the desired result. I have been trying expressions like this:
```
(([ABCDEFGHJKLMNPQRSTVXYZ0123456789]{8})-?){4}
```
But this does not work.
Since I generate the regex in code, I could just expand it out by the number of groups, but I was hoping for a more elegant solution.
---
Please note that the character set does not include the entire alphabet. It is | [
-0.04021818935871124,
-0.021452780812978745,
0.18357306718826294,
-0.13103654980659485,
-0.202337384223938,
0.19999970495700836,
0.26818692684173584,
-0.130743145942688,
-0.0629250556230545,
-0.18227843940258026,
-0.36295151710510254,
0.1123223826289177,
-0.5302170515060425,
0.043316505849... | |
part of a product activation system. As such, any characters that can be accidentally interpreted as numbers or other characters are removed. e.g. The letters 'I', 'O', 'U' & 'W' are not in the character set.
The hyphens are optional since a user does not need top type them in, but they can be there if the user as done a copy & paste.
I have discovered the answer I was after. Here is my working code:
```
static void Main(string[] args)
{
string pattern = @"^\s*((?<group>[ABCDEFGHJKLMNPQRSTVXYZ0123456789]{8})-?){3}\s*$"; | [
0.1248527392745018,
0.07165008783340454,
0.40378984808921814,
-0.4493725299835205,
0.167437344789505,
0.21038754284381866,
0.22412361204624176,
-0.18985195457935333,
0.031195295974612236,
-0.31309011578559875,
-0.47580674290657043,
0.20349596440792084,
-0.4051361680030823,
0.17014952003955... | |
string input = "H3Y5NC8E-TGA5B6SB-2NVAQ4E0";
Regex re = new Regex(pattern);
Match m = re.Match(input);
if (m.Success)
foreach (Capture c in m.Groups["group"].Captures)
Console.WriteLine(c.Value);
}
``` | [
-0.2932365834712982,
-0.2508871853351593,
0.47080111503601074,
-0.43381890654563904,
0.4289037883281708,
0.07155967503786087,
0.35397350788116455,
-0.5518724322319031,
-0.16110673546791077,
-0.3723985254764557,
-0.5987315773963928,
0.49933621287345886,
-0.45184266567230225,
0.1883277297019... | |
Is there any python module to convert PDF files into text? I tried [one piece of code](http://code.activestate.com/recipes/511465/) found in Activestate which uses pypdf but the text generated had no space between and was of no use.
Try [PDFMiner](http://www.unixuser.org/~euske/python/pdfminer/index.html). It can extract text from PDF files as HTML, SGML or "Tagged PDF" format.
The Tagged PDF format seems to be the cleanest, and stripping out the XML tags leaves just the bare text.
A Python 3 version is available under:
* <https://github.com/pdfminer/pdfminer.six> | [
0.20320172607898712,
-0.07805386185646057,
0.2530086934566498,
-0.1403481662273407,
-0.4983004331588745,
-0.08638177067041397,
0.371139794588089,
-0.15967580676078796,
-0.05541712045669556,
-0.4434477984905243,
-0.2567157447338104,
0.5335906147956848,
-0.24305211007595062,
-0.1440498381853... | |
In a drop down list, I need to add spaces in front of the options in the list. I am trying
```
<select>
<option>  Sample</option>
</select>
```
for adding two spaces but it displays no spaces. How can I add spaces before option texts?
Isn't ` ` the entity for space?
```
<select>
<option> option 1</option>
<option> option 2</option>
</select>
```
Works for me...
### EDIT:
Just checked this out, there *may* be compatibility issues with this in older browsers, but all seems to work fine for me here. Just thought I should let you know as you may want to replace with ` ` | [
-0.009970001876354218,
-0.14561773836612701,
0.4734569489955902,
0.10213671624660492,
0.2363792359828949,
0.261097252368927,
-0.11944649368524551,
0.07749877125024796,
-0.27298709750175476,
-0.5853975415229797,
-0.10319584608078003,
0.45343536138534546,
-0.27218639850616455,
-0.13676564395... | |
I need to have a summary field in each page of the report and in page 2 and forward the same summary has to appear at the top of the page. Anyone know how to do this?
Ex:
```
>
> Page 1
>
> Name Value
> a 1
> b 3
> Total 4
>
> Page 2
> Name Value
> Total Before 4
> c 5
> | [
0.4745420217514038,
0.34220513701438904,
0.32361358404159546,
-0.07144881784915924,
-0.17094740271568298,
-0.20106111466884613,
0.1234685555100441,
-0.16881310939788818,
-0.12744076550006866,
-0.46380484104156494,
0.06531885266304016,
0.38623932003974915,
-0.04014575853943825,
0.1215189099... | |
d 1
> Total 10
```
Create a new Running Total Field called, for example "RTotal". In "Field to summarize" select "Value", in "Type of summary" select "sum", under "Evaluate" select "For each record". You can then drag this field into your report to use as the "Total" at the bottom of each page.
You cannot use this running total field in the page header too, however, because Crystal will add the value in the first row on the page to it | [
0.3006734251976013,
-0.1625986546278,
0.31151479482650757,
0.009455367922782898,
-0.1859787553548813,
-0.00998219009488821,
-0.1849285066127777,
-0.4090614914894104,
-0.2369145303964615,
-0.48191916942596436,
-0.1616433709859848,
0.4208044409751892,
-0.3021506071090698,
0.197811558842659,
... | |
first (so in your example it would show 9 rather than 4 at the top of page 2). To work around this, create a formula field which subtracts the current value of the Value field from the running total (e.g. {#RTotal}-{TableName.Value}), and put this formula field in your page header. | [
-0.04529295861721039,
0.06474439054727554,
0.4724161624908447,
0.04407993704080582,
0.12556475400924683,
-0.27223312854766846,
-0.03052988275885582,
-0.22188682854175568,
0.11782104521989822,
-0.5889623761177063,
-0.36047235131263733,
0.5544842481613159,
-0.2509479522705078,
-0.10958605259... | |
Given that my client code knows everything it needs to about the remoting object, what's the simplest way to connect to it?
This is what I'm doing at the moment:
```
ChannelServices.RegisterChannel(new HttpChannel(), false);
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(IRemoteServer), "RemoteServer.rem", WellKnownObjectMode.Singleton);
MyServerObject = (IRemoteServer)Activator.GetObject(
typeof(IRemoteServer),
String.Format("tcp://{0}:{1}/RemoteServer.rem", server, port));
```
The first two lines are in the server-side code, for marshaling out the server object, yes?
In that case, yes, the third line is the simplest you can get at client-side.
In addition, you can serve out additional server-side objects from the **MyServerObject** instance, if you include public accessors for them in **IRemoteServer** interface, | [
-0.21282042562961578,
0.021905701607465744,
0.9315332174301147,
0.017014486715197563,
0.12043105065822601,
0.03427046909928322,
0.36911144852638245,
-0.429334431886673,
-0.07319903373718262,
-0.9502220749855042,
-0.10309513658285141,
0.5878196358680725,
-0.2553410828113556,
0.1474223136901... | |
so, accessing those objects become the simple matter of method calls or property accesses on your main server object, so you don't have to use activator for every single thing:
```
//obtain another marshalbyref object of the type ISessionManager:
ISessionManager = MyServerObject.GetSessionManager();
``` | [
-0.09226030111312866,
0.014186816290020943,
0.2757123112678528,
0.35155749320983887,
0.0573282316327095,
-0.29007214307785034,
0.3596433699131012,
-0.44193193316459656,
-0.3086385130882263,
-0.5920873880386353,
-0.19297413527965546,
0.2556323707103729,
-0.31220051646232605,
0.2634516060352... | |
I'm playing around with a native (non-web) single-player game I'm writing, and it occured to me that having a daily/weekly/all-time **online highscore list** (think Xbox Live Leaderboard) would make the game much more interesting, adding some (small) amount of community and competition. However, I'm afraid people would see such a feature as an invitation to hacking, which would discourage regular players due to impossibly high scores.
I thought about the obvious ways of preventing such attempts (public/private key encryption, for example), but I've figured out reasonably simple ways hackers could circumvent all of my ideas (extracting the public key from the | [
0.4264935553073883,
0.20055007934570312,
0.020555054768919945,
0.1797821968793869,
0.17704404890537262,
-0.3397659659385681,
-0.0008564658928662539,
0.2493225783109665,
-0.10606785118579865,
-0.30914896726608276,
0.06962139159440994,
0.4859384000301361,
0.05362612009048462,
0.0740234851837... | |
binary and thus sending fake encrypted scores, for example).
Have you ever implemented an online highscore list or leaderboard? Did you find a reasonably hacker-proof way of implementing this? If so, how did you do it? What are your experiences with hacking attempts?
At the end of the day, you are relying on trusting the client. If the client sends replays to the server, it is easy enough to replicable or modify a successful playthrough and send that to the server.
Your best bet is to raise the bar for cheating above what a player would deem worth surmounting. To do this, there | [
0.5781752467155457,
0.00517153088003397,
-0.3410002887248993,
0.5488675832748413,
0.10217488557100296,
-0.2513069808483124,
0.38994452357292175,
0.2189594805240631,
-0.38441380858421326,
-0.4061588943004608,
0.007437490858137608,
0.6311107873916626,
-0.025090113282203674,
-0.18192231655120... | |
are a number of proven (but oft-unmentioned) techniques you can use:
1. Leave blacklisted cheaters in a honeypot. They can see their own scores, but no one else can. Unless they verify by logging in with a different account, they think they have successfully hacked your game.
2. When someone is flagged as a cheater, defer any account repercussions from transpiring until a given point in the future. Make this point random, within one to three days. Typically, a cheater will try multiple methods and will eventually succeed. By deferring account status feedback until a later date, they fail to understand what | [
0.4797387719154358,
-0.039561979472637177,
0.26911428570747375,
0.34318965673446655,
0.29055455327033997,
-0.3974074721336365,
0.35093364119529724,
0.1379650980234146,
-0.3990325629711151,
-0.2734409272670746,
-0.1647508144378662,
0.5556994080543518,
-0.015392004512250423,
-0.0963667482137... | |
got them caught.
3. Capture all game user commands and send them to the server. Verify them against other scores within a given delta. For instance, if the player used the shoot action 200 times, but obtained a score of 200,000, but the neighboring players in the game shot 5,000 times to obtain a score of 210,000, it may trigger a threshold that flags the person for further or human investigation.
4. Add value and persistence to your user accounts. If your user accounts have unlockables for your game, or if your game requires purchase, the weight of a ban is greater | [
0.6070931553840637,
-0.4347359240055084,
0.30531585216522217,
0.3868240416049957,
0.12975524365901947,
-0.29869505763053894,
0.5376611351966858,
-0.40848663449287415,
-0.5959319472312927,
-0.2545536458492279,
0.1691180169582367,
0.14115090668201447,
-0.3902009129524231,
-0.1194017827510833... | |
as the user cannot regain his previous account status by simply creating a new account through a web-based proxy. | [
-0.00909071322530508,
-0.06880397349596024,
0.17082281410694122,
0.11944814771413803,
0.37567946314811707,
0.014770308509469032,
0.639382541179657,
0.4919932782649994,
-0.48083359003067017,
-0.4025592803955078,
-0.4640878438949585,
0.12928506731987,
0.16187258064746857,
0.524707019329071,
... | |
Is there an easy way to iterate over an associative array of this structure in PHP:
The array `$searches` has a numbered index, with between 4 and 5 associative parts. So I not only need to iterate over `$searches[0]` through `$searches[n]`, but also `$searches[0]["part0"]` through `$searches[n]["partn"]`. The hard part is that different indexes have different numbers of parts (some might be missing one or two).
Thoughts on doing this in a way that's nice, neat, and understandable?
Nest two [`foreach` loops](http://php.net/foreach):
```
foreach ($array as $i => $values) {
print "$i {\n";
foreach ($values as $key => $value) { | [
-0.2419748455286026,
0.12784771621227264,
0.2594776749610901,
-0.17429275810718536,
-0.10187485069036484,
0.1941058337688446,
0.21501974761486053,
-0.3870707154273987,
-0.15465587377548218,
-0.44504305720329285,
-0.0346873439848423,
0.23904235661029816,
-0.21094803512096405,
-0.16519810259... | |
print " $key => $value\n";
}
print "}\n";
}
``` | [
-0.17349973320960999,
0.27648866176605225,
0.2302488088607788,
-0.3124113082885742,
0.43814152479171753,
-0.18707551062107086,
0.27805665135383606,
-0.23210953176021576,
0.00784152653068304,
-0.3414442837238312,
-0.6370841264724731,
0.7410545945167542,
-0.5443766117095947,
0.00678900536149... | |
I'm trying to programmatically restrict the memory consumption of plugins running in a .Net AppDomain, but I can't find any setup parameters for this, nor can I find a way to query an AppDomain to figure out how much memory it is consuming. Any ideas?
Here's the documentation for querying a process's memory usage. Not the same as the AppDomain, but it might be a place to start.
<http://msdn.microsoft.com/en-us/library/s80a75e5(VS.80).aspx>
You can ask the GC what it thinks is currently allocated also.
<http://msdn.microsoft.com/en-us/library/system.gc.gettotalmemory(VS.71).aspx> | [
0.09106949716806412,
0.19988805055618286,
0.3015349209308624,
0.035705845803022385,
0.1587437093257904,
0.06526706367731094,
-0.16995440423488617,
-0.07551680505275726,
-0.4937022924423218,
-0.8203088641166687,
-0.10857198387384415,
0.30526402592658997,
-0.19667492806911469,
0.260802268981... | |
When doing calculations on very large numbers where integral data types such as double or int64 falls short, a separate class to handle such large numbers may be needed.
Does anyone care to offer an efficient algorithm on how best to do this?
In C# 4.0 use the [BigInteger type](http://msdn.microsoft.com/en-us/library/system.numerics.biginteger.aspx) | [
-0.09100715816020966,
-0.05130673572421074,
0.06973489373922348,
0.1878359019756317,
0.014815755188465118,
-0.08115412294864655,
-0.038688793778419495,
-0.23348648846149445,
-0.39801615476608276,
-0.27411165833473206,
0.09724383801221848,
0.2257431000471115,
-0.260699063539505,
0.019366903... | |
I'm writing a C/C++ DLL and want to export certain functions which I've done before using a .def file like this
```
LIBRARY "MyLib"
EXPORTS
Foo
Bar
```
with the code defined as this, for example:
```
int Foo(int a);
void Bar(int foo);
```
However, what if I want to declare an overloaded method of Foo() like:
```
int Foo(int a, int b);
```
As the def file only has the function name and not the full prototype I can't see how it would handle the overloaded functions. Do you just use the one entry and then specify which overloaded version you want when passing in the properly prototyped function pointer to | [
0.20179198682308197,
0.23917065560817719,
0.025041503831744194,
-0.24795004725456238,
-0.12917543947696686,
-0.056921400129795074,
0.1453467160463333,
-0.21362373232841492,
0.02557220123708248,
-0.4269481599330902,
-0.011236864142119884,
0.5362102389335632,
-0.6951451301574707,
0.071025252... | |
LoadLibrary() ?
Edit: To be clear, this is on Windows using Visual Studio 2005
Edit: Marked the non-def (\_\_declspec) method as the answer...I know this doesn't actually solve the problem using def files as I wanted, but it seems that there is likely no (official) solution using def files. Will leave the question open, however, in case someone knows something we don't have overloaded functions and def files.
In the code itself, mark the functions you want to export using \_\_declspec(dllexport). For example:
```
#define DllExport __declspec(dllexport)
int DllExport Foo( int a ) {
// implementation
}
int DllExport Foo( int a, int b ) { | [
0.041657496243715286,
-0.09772838652133942,
0.21112002432346344,
-0.4200149178504944,
-0.17926090955734253,
-0.14222575724124908,
0.2694718539714813,
-0.23503834009170532,
-0.32005101442337036,
-0.5163108110427856,
-0.15827441215515137,
0.8237436413764954,
-0.7146963477134705,
-0.068277046... | |
// implementation
}
```
If you do this, you do not need to list the functions in the .def file.
Alternatively, you may be able to use a default parameter value, like:
```
int Foo( int a, int b = -1 )
```
This assumes that there exists a value for b that you can use to indicate that it is unused. If -1 is a legal value for b, or if there isn't or shouldn't be a default, this won't work.
Edit (Adam Haile): Corrected to use \_\_declspec as \_\_dllspec was not correct so I could mark this as the official answer...it was close enough.
Edit (Graeme): | [
0.2562028467655182,
0.023906821385025978,
-0.11958982050418854,
-0.16065004467964172,
0.08370023220777512,
0.11496429145336151,
0.3293616473674774,
-0.29788243770599365,
-0.24682064354419708,
-0.3068438172340393,
-0.45896589756011963,
0.5567135810852051,
-0.6919764280319214,
-0.14142808318... | |
Oops - thanks for correcting my typo! | [
0.06488896161317825,
0.5816171169281006,
0.10126204788684845,
0.5505449771881104,
0.012790515087544918,
0.006676947697997093,
0.0534864217042923,
0.5963724851608276,
0.07076609134674072,
-0.09342779964208603,
0.014657128602266312,
0.11293230950832367,
0.2673209011554718,
0.1611491888761520... | |
I have a couple of questions regarding VBScript and ASP Classic:
1. What is the preferred way to access an MS SQL Server database in VBScript/ASP?
2. What are best practices in regards to separating model from view from controller?
3. Any other things I should know about either VBScript or ASP?
If you haven't noticed, I'm new at VBScript coding. I realize numbers 2 & 3 are kind of giant "black hole" questions that are overly general, so don't think that I'm expecting to learn everything there is to know about those two questions from here.
ADO is an excellent way to access a | [
0.32455068826675415,
-0.09882191568613052,
0.3433791399002075,
0.2826389968395233,
-0.15867392718791962,
-0.13643771409988403,
0.08330292999744415,
-0.04750853031873703,
-0.22187170386314392,
-0.6542999744415283,
0.12271760404109955,
0.3967532515525818,
-0.2603048086166382,
0.2223207801580... | |
database in VBScript/Classic ASP.
```
Dim db: Set db = Server.CreateObject("ADODB.Connection")
db.Open "yourconnectionstring -> see connectionstrings.com"
Dim rs: Set rs = db.Execute("SELECT firstName from Employees")
While Not rs.EOF
Response.Write rs("firstName")
rs.MoveNext
Wend
rs.Close
```
More info here: <http://www.technowledgebase.com/2007/06/12/vbscript-how-to-create-an-ado-connection-and-run-a-query/>
One caveat is that if you are returning a MEMO field in a recordset, be sure you only select ONE MEMO field at a time, and make sure it is the LAST column in your query. Otherwise you will run into problems.
(Reference: <http://lists.evolt.org/archive/Week-of-Mon-20040329/157305.html> ) | [
-0.21826598048210144,
0.035151369869709015,
0.6147065758705139,
0.003814962226897478,
-0.08280712366104126,
-0.28632497787475586,
0.12032297253608704,
-0.38565945625305176,
-0.2765704393386841,
-0.6017287969589233,
-0.12031342089176178,
0.3166094422340393,
-0.5563945770263672,
0.3038972914... | |
I'd love to know if there is such a thing as a Gecko.NET ;) I mean, just like we can embed a WebView and that is an "instance" of IE7 inside any Windows Forms application (and tell it to `navigateto(fancy_url);`). I'd love to use Firefox or WebKit.
Anybody tried this?
**UPDATE**: Please bear in mind that although it is possible to embed Gecko using the mentioned controls, it is still impossible to **print** while using Gecko.
**UPDATE March 2010**: It’s still not possible to print natively using GeckoFX, however a couple of methods exist that *may* be enough, depending upon what you’re | [
0.3422173261642456,
0.20923124253749847,
0.4372161328792572,
0.05370331555604935,
-0.2976599931716919,
-0.2582933306694031,
0.4040549099445343,
0.2583555579185486,
-0.2870613634586334,
-0.7875019907951355,
-0.03666787967085838,
0.8484935760498047,
-0.15288832783699036,
-0.09182344377040863... | |
trying to do.
See: <http://geckofx.org/viewtopic.php?id=796> for more information.
**UPDATE October 2013**: I am no longer doing Windows development so I have no interest in this, but seems like the development of Gecko can be found here: <https://bitbucket.org/geckofx> and it seems to be recently updated. Leaving this here for future Windows devs ;)
**UPDATE January 2017**: I have gotten an email from a company called [TeamDev](http://www.teamdev.com). They created a Chromium-based .NET browser component called "DotNetBrowser" which can be used to display modern web pages in Windows Forms applications.
To quote the email directly:
> Here are some details about the component, which might be | [
0.536543607711792,
-0.1357758641242981,
0.20941995084285736,
0.03523285686969757,
-0.5482743978500366,
-0.0890544131398201,
0.325729101896286,
0.1396906077861786,
-0.2363613247871399,
-0.9633597135543823,
-0.0037659285590052605,
0.37676095962524414,
-0.06120043620467186,
-0.250585824251174... | |
helpful:
1. DotNetBrowser is based on Chromium, thus supporting HTML5, CSS3, JS and the latest web standards. The underlying Chromium version of the library is regularly updated.
2. The component is suitable for WPF as well as Windows Forms desktop applications, and works both for C# and VB.NET.
3. The library is licensed commercially, however free licences are provided for Open Source and academic projects.
**Disclaimer:** *I have not used this DotNetBrowser for I no longer do Windows Development but may be worth checking if you're looking for a solution to this.*
<http://code.google.com/p/geckofx/>
This is a nice .NET-wrapped version of Gecko | [
0.5820583701133728,
-0.06258641183376312,
0.5717431306838989,
0.09422434866428375,
0.02097756788134575,
-0.39048126339912415,
0.06843826919794083,
0.1888096183538437,
0.03175373002886772,
-0.7307355999946594,
-0.019519666209816933,
0.4518352150917053,
-0.3114033639431,
-0.06709286570549011... | |
Do you know if I can use Visio to forward-engineer a sequence diagram into code (c#)?
Can it be done with Visio alone or do I need a plugin?
What about other diagrams?
You have to get the Visio that for users of Visual Studio. See this link: [Visio for Enterprise Architects](http://msdn.microsoft.com/en-us/library/ms182014.aspx) for more details. The code generation capabilities are fairly weak and you might end up getting Visio into an inconsistent state. I know that Visio will let you forward and reverse engineer both code and databases, but both capabilities are very limited and I don't recommend doing it.
In my opinion, Visio | [
0.014688920229673386,
0.04038897156715393,
0.3482796549797058,
0.009688259102404118,
-0.3012375831604004,
-0.020287375897169113,
0.30710095167160034,
-0.28409257531166077,
-0.17183245718479156,
-0.6114788055419922,
0.12229838967323303,
0.6877180933952332,
-0.17727237939834595,
-0.151553809... | |
is a diagramming tool and it should be treated as such. | [
0.22596918046474457,
0.07390590757131577,
0.13685502111911774,
0.12319552898406982,
0.12469743192195892,
-0.209835022687912,
0.07212052494287491,
-0.033771198242902756,
-0.057757601141929626,
-0.653613805770874,
-0.33261191844940186,
0.31724223494529724,
-0.08724336326122284,
-0.1275130957... | |
Over the last few months/years, I have shared a folder or two with numerous people on my domain. How do I easily revoke those shares to keep access to my system nice and tidy?
Using computer management (an MMC snap-in. See Control Panel Administrative tools) you can see a list of all folders that are shared. You could delete the shares or change the permissions on the share to only allow access for certain people or groups. | [
0.5882046818733215,
0.37167638540267944,
0.23058392107486725,
0.18986763060092926,
0.22657309472560883,
-0.16914516687393188,
0.10345429927110672,
0.2419866919517517,
-0.6651009917259216,
-0.5617866516113281,
0.1231796070933342,
0.12868891656398773,
-0.011273516342043877,
0.587065756320953... | |
The first time I load the website in the production web server, it start very slow, subsequent pages load very quickly (included the home page).
I precompiled the site, but nothing changes.
I don't have any code at Application start.
I don't have cached items.
Any ideas? How can I find out what is happening?
It's just your app domain loading up and loading any binaries into memory. Also, it's initializing static variables, so if you have a static variable that loads up a lot of data from the db, it might take a bit. | [
0.44600746035575867,
0.19466358423233032,
0.0924919992685318,
0.10541331768035889,
-0.21274328231811523,
-0.10439574718475342,
0.2749723196029663,
0.12765121459960938,
-0.21191534399986267,
-0.650282621383667,
0.03370942920446396,
0.4412231147289276,
-0.23145818710327148,
0.247001796960830... | |
Do you know where I could find some useful third party (free) code snippets for VS 2008?
<http://gotcodesnippets.com/>
<http://www.codekeep.net/> has a VS add-in for their snippets, too | [
0.8930754661560059,
-0.29274141788482666,
0.12182106822729111,
0.6894691586494446,
-0.1653175801038742,
-0.11870963126420975,
0.31548184156417847,
0.24547936022281647,
-0.402129203081131,
-0.4633479118347168,
0.2734617292881012,
0.24349622428417206,
0.08369120955467224,
-0.1431945562362671... | |
I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file.
Here's what the command line looks like:
```
test.cmd admin P@55w0rd > test-log.txt
```
Here's how I did it:
```
@fake-command /u %1 /p %2
```
Here's what the command looks like:
```
test.cmd admin P@55w0rd > test-log.txt
```
The `%1` applies to the first parameter the `%2` (and here's the tricky part) applies to the second. You can have up to 9 parameters passed in this way. | [
0.48568516969680786,
0.3236358165740967,
0.41647812724113464,
-0.2570291757583618,
0.2573626935482025,
0.22792865335941315,
0.46030017733573914,
-0.25104302167892456,
0.12250848114490509,
-0.5465864539146423,
0.10239236801862717,
0.6867032647132874,
-0.08577532321214676,
0.1209750995039939... | |
I have a report with many fields that I'm trying to get down to 1 page horizontally (I don't care whether it's 2 or 200 pages vertically... just don't want to have to deal with 2 pages wide by x pages long train-wreck). That said, it deals with contact information.
My idea was to do:
```
Name: Address: City: State: ...
Jon Doe Addr1 ThisTown XX ... | [
0.573572039604187,
0.25801369547843933,
0.3809410035610199,
-0.27258265018463135,
0.2254973202943802,
-0.31909310817718506,
0.5623877048492432,
0.43315738439559937,
-0.32059428095817566,
-0.5934639573097229,
0.244139164686203,
-0.1158277839422226,
-0.6037403345108032,
0.03125496581196785,
... | |
Addr2
Addr3
-----------------------------------------------
Jane Doe Addr1 ThisTown XX ...
Addr2
Addr3
-----------------------------------------------
```
Is there some way to set a `textbox` to be multi-line (or the SQL result)? Have I missed something bloody obvious?
---
The CanGrow Property is on by default, and I've double checked that this is true. My problem | [
-0.0883246511220932,
0.27015021443367004,
0.5156607031822205,
0.046429380774497986,
-0.2611795961856842,
-0.2268156260251999,
0.4868561625480652,
-0.003064306452870369,
-0.22689345479011536,
-0.5249459743499756,
-0.056327782571315765,
0.6611843705177307,
-0.49794989824295044,
-0.1802661418... | |
is that I don't know how to force a line-break. I get the 3 address fields that just fills a line, then wraps to another. I've tried `/n`, `\n` (since I can never remember which is the correct slash to put), `<br>`, `<br />` (since the report will be viewed in a ReportViewer control in an ASP.NET website). I can't think of any other ways to wrap the text.
Is there some way to get the results from the database as 3 lines of text/characters?
Alter the report's text box to:
```
= Fields!Addr1.Value + VbCrLf +
Fields!Addr2.Value + VbCrLf + | [
0.11263187974691391,
0.04007704555988312,
0.5728704929351807,
-0.005461932625621557,
-0.29928213357925415,
0.10907582193613052,
0.376305490732193,
-0.3185952603816986,
-0.29158785939216614,
-0.5576263070106506,
-0.10908088088035583,
0.25193238258361816,
-0.25430983304977417,
0.090921729803... | |
Fields!Addr3.Value
``` | [
0.11277308315038681,
0.3752332925796509,
0.24204424023628235,
-0.4114658832550049,
-0.11554602533578873,
-0.192426398396492,
0.03946786746382713,
-0.2722635567188263,
-0.24457773566246033,
-0.19867070019245148,
-0.2053719460964203,
0.5423519611358643,
-0.6453656554222107,
0.276972740888595... | |
I want to parse some HTML in order to find the values of some attributes/tags etc.
What HTML parsers do you recommend? Any pros and cons?
[NekoHTML](http://sourceforge.net/projects/nekohtml/), [TagSoup](http://home.ccil.org/~cowan/XML/tagsoup/), and [JTidy](http://sourceforge.net/projects/jtidy/) will allow you to parse HTML and then process with XML tools, like XPath. | [
0.6634100675582886,
0.35737451910972595,
0.19450679421424866,
0.08524951338768005,
-0.00887907762080431,
-0.14061827957630157,
0.04658421874046326,
-0.08066081255674362,
-0.13894253969192505,
-0.7237285375595093,
0.2044667750597,
0.3161405324935913,
-0.16470372676849365,
-0.091301456093788... | |
I'm trying to re-install a DLL in the GAC, everything seems to work fine but the web application accessing it still seems to be using the old one.
The old DLL is the same version as the new one with only a minor edit, it will be used by 50 different sites so changing the version then changing the reference in the web.config is not a *good* solution.
Restarting the IIS server or the worker process isn't an option as there are already 50 sites running that must continue to do so.
does anyone know what i'm doing wrong or what i can | [
0.6998109817504883,
0.11813385784626007,
0.3829908072948456,
0.04068300127983093,
-0.051886092871427536,
-0.2767429053783417,
0.5171557068824768,
0.0210040844976902,
-0.29889729619026184,
-0.6506582498550415,
0.22533732652664185,
0.43089038133621216,
-0.39965665340423584,
0.513708353042602... | |
do to remedy this situation?
AFAIK, you need to restart IIS for it to get a fresh reference to the updated DLL. Your best bet is to perform the reset at a low traffic time. If you are running multiple servers with load balancing, you can prevent new connections from hitting one server until all connections have been closed. Afterwards, update the DLL, restart IIS, and bring the server back into the connection pool. Repeat for each server with no visible downtime to the end users. | [
0.1294344812631607,
-0.15967246890068054,
0.36291876435279846,
0.232540100812912,
-0.019102800637483597,
-0.2127198576927185,
0.41344547271728516,
0.04255415499210358,
-0.44838759303092957,
-0.5744957327842712,
-0.004125058185309172,
0.6367008686065674,
-0.47492703795433044,
0.115294039249... | |
How does the new Microsoft asp.net mvc implementation handle partitioning your application - for example:
```
--index.aspx
--about.aspx
--contact.aspx
--/feature1
--/feature1/subfeature/action
--/feature2/subfeature/action
```
I guess what I am trying to say is that it seems everything has to go into the root of the views/controllers folders which could get unwieldy when working on a project that if built with web forms might have lots and lots of folders and sub-folders to partition the application.
I think I get the MVC model and I like the look of it compared to web forms but still getting my head round how you would build a large project in practice.
There isn't any issues | [
0.19438986480236053,
-0.06694202125072479,
0.2531447112560272,
0.205418661236763,
-0.11607231199741364,
-0.1611403077840805,
-0.16734972596168518,
-0.1595350205898285,
-0.37767499685287476,
-0.6955235004425049,
0.005861399695277214,
0.4103423058986664,
-0.07250583171844482,
0.1615163832902... | |
with organizing your controllers. You just need to setup the routes to take the organization into consideration. The problem you will run into is finding the view for the controller, since you changed the convention. There isn't any built in functionality for it yet, but it is easy to create a work around yourself with a ActionFilterAttribute and a custom view locator that inherits off ViewLocator. Then when creating your controller, you just specify what ViewLocator to use, so the controller knows how to find the view. I can post some code if needed.
This method kind of goes along with | [
0.3212939202785492,
-0.4969044327735901,
0.3208920359611511,
0.1840382069349289,
-0.012365405447781086,
-0.09199369698762894,
-0.0007089102291502059,
-0.23922617733478546,
-0.501758337020874,
-0.5944331884384155,
0.08523736149072647,
0.5858796834945679,
-0.41749298572540283,
-0.09882114827... | |
some advice I gave another person for separating their views out for a portal using ASP.NET MVC. Here is the [link to the question](https://stackoverflow.com/questions/19746/views-in-seperate-assemblies-in-aspnet-mvc) as a reference. | [
0.26319393515586853,
-0.10822868347167969,
0.1650497317314148,
0.017694931477308273,
-0.0908423364162445,
-0.07939589768648148,
-0.0008663687622174621,
0.03534800186753273,
-0.5205596685409546,
-0.24966542422771454,
0.16017895936965942,
0.40318214893341064,
0.10677994787693024,
0.050474345... | |
```
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>workflow.WDispatcher</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>*NEXTEVENT*</url-pattern>
</servlet-mapping>
```
Above is the snippet from Tomcat's `web.xml`. The URL pattern `*NEXTEVENT*` on start up throws
> java.lang.IllegalArgumentException: Invalid <url-pattern> in servlet mapping
It will be greatly appreciated if someone can hint at the error.
```
<url-pattern>*NEXTEVENT*</url-pattern>
```
The URL pattern is not valid. It can either end in an asterisk or start with one (to denote a file extension mapping).
The url-pattern specification:
> * A string beginning with a ‘/’ character and ending with a ‘/\*’
> suffix is used for path mapping.
> * A string beginning | [
-0.13790462911128998,
0.008461781777441502,
0.6318619251251221,
0.06718721985816956,
-0.07045286893844604,
-0.2764661908149719,
0.310067743062973,
-0.1997019201517105,
-0.13122515380382538,
-0.7229668498039246,
-0.5487335324287415,
0.24128641188144684,
-0.21827636659145355,
0.1196791827678... | |
with a ‘\*.’ prefix is used as an extension
> mapping.
> * A string containing only the ’/’ character indicates the "default"
> servlet of the application. In this
> case the servlet path is the request
> URI minus the context path and the
> path info is null.
> * All other strings are used for exact matches only.
See section 12.2 of the [Java Servlet Specification](https://jcp.org/aboutJava/communityprocess/final/jsr340/index.html) Version 3.1 for more details. | [
-0.17486290633678436,
-0.16558882594108582,
0.5306004881858826,
-0.1263667494058609,
-0.10956814140081406,
-0.05138147994875908,
0.24144195020198822,
-0.4266344904899597,
-0.1586892157793045,
-0.5306366682052612,
-0.44687119126319885,
0.2361222356557846,
-0.4273507297039032,
0.345144510269... | |
What is the best way to use ResolveUrl() in a Shared/static function in Asp.Net? My current solution for VB.Net is:
```
Dim x As New System.Web.UI.Control
x.ResolveUrl("~/someUrl")
```
Or C#:
```
System.Web.UI.Control x = new System.Web.UI.Control();
x.ResolveUrl("~/someUrl");
```
But I realize that isn't the best way of calling it.
I use [System.Web.VirtualPathUtility.ToAbsolute](http://msdn.microsoft.com/en-us/library/system.web.virtualpathutility.aspx). | [
-0.0678863450884819,
-0.21930237114429474,
0.9235165119171143,
-0.09610489010810852,
0.024200791493058205,
0.00655993539839983,
0.016334936022758484,
0.0706552267074585,
-0.06981177628040314,
-0.5865322351455688,
-0.08199920505285263,
0.47995254397392273,
-0.22518831491470337,
0.0575619079... | |
I frequently have problems dealing with `DataRows` returned from `SqlDataAdapters`. When I try to fill in an object using code like this:
```
DataRow row = ds.Tables[0].Rows[0];
string value = (string)row;
```
What is the best way to deal with `DBNull's` in this type of situation.
Nullable types are good, but only for types that are not nullable to begin with.
To make a type "nullable" append a question mark to the type, for example:
```
int? value = 5;
```
I would also recommend using the "`as`" keyword instead of casting. You can only use the "as" keyword on nullable types, so make sure you're casting things that are | [
0.29689452052116394,
0.3159542679786682,
-0.060795120894908905,
-0.1744784116744995,
-0.376287579536438,
-0.1744491159915924,
0.45058995485305786,
-0.1665312647819519,
-0.08086906373500824,
-0.5500149130821228,
-0.03927052393555641,
0.28942760825157166,
-0.22088579833507538,
0.424122095108... | |
already nullable (like strings) or you use nullable types as mentioned above. The reasoning for this is
1. If a type is nullable, the "`as`" keyword returns `null` if a value is `DBNull`.
2. It's [ever-so-slightly faster than casting](http://www.codeproject.com/Articles/8052/Type-casting-impact-over-execution-performance-in) though [only in certain cases](https://stackoverflow.com/a/496167/392). This on its own is never a good enough reason to use `as`, but coupled with the reason above it's useful.
I'd recommend doing something like this
```
DataRow row = ds.Tables[0].Rows[0];
string value = row as string;
```
In the case above, if `row` comes back as `DBNull`, then `value` will become `null` instead of throwing an exception. Be aware that if | [
0.2544283866882324,
-0.12431556731462479,
0.36559247970581055,
-0.22837762534618378,
-0.22191940248012543,
-0.22357039153575897,
0.3443998098373413,
-0.30436283349990845,
-0.31610074639320374,
-0.47333550453186035,
-0.10894814878702164,
0.3622993230819702,
-0.1500852406024933,
0.2703020572... | |
your DB query changes the columns/types being returned, **using `as` will cause your code to silently fail** and make values simple `null` instead of throwing the appropriate exception when incorrect data is returned so it is recommended that you have tests in place to validate your queries in other ways to ensure data integrity as your codebase evolves. | [
0.3160187304019928,
0.199848473072052,
0.23936676979064941,
-0.06434392184019089,
-0.3383336067199707,
0.06705169379711151,
0.7384248375892639,
-0.3940659761428833,
0.12213762104511261,
-0.743291974067688,
-0.08418893814086914,
0.34746435284614563,
-0.28284963965415955,
0.21803443133831024... | |
I have an application, built using MVC, that produces a view which delivers summary information across a number of models. Further to that, some calculations are performed across the different sets of data.
There's no clear single model (that maps to a table at least) that seems to make sense as the starting point for this, so the various summaries are pulled from the contributing models in the controller, passed into the view and the calculations are performed there.
But that seems, well, *dirty*. But controllers are supposed to be lightweight, aren't they? And business logic shouldn't be in views, as I | [
0.32136112451553345,
0.18401303887367249,
0.07286224514245987,
0.4073460102081299,
-0.025499362498521805,
0.2035539448261261,
-0.18574322760105133,
-0.02055375650525093,
-0.2751598656177521,
-0.4423249065876007,
0.2201797515153885,
0.5898455381393433,
0.10252244770526886,
0.163182958960533... | |
have it as present.
So where should this information be assembled? A new model, that doesn't map to a table? A library function/module? Or something else?
(Although I see this as mostly of an architectural/pattern question, I'm working in Rails, FWIW.)
**Edit**: Good answers all round, and a lot of consensus, which is reassuring. I "accepted" the answer I did to keep the link to Railscasts at the top. I'm behind in my Railscast viewing - something I shall make strenuous attempts to rectify!
As Brian said, you can create another model that marshals out the work that needs doing. There is [a great | [
0.14291517436504364,
-0.012342149391770363,
0.23529599606990814,
0.20123271644115448,
-0.22764535248279572,
-0.35038653016090393,
0.2375587671995163,
-0.09128174185752869,
-0.3167973756790161,
-0.667239248752594,
-0.02639385685324669,
0.5461783409118652,
0.19660568237304688,
-0.18537765741... | |
Railscast](http://railscasts.com/episodes/121-non-active-record-model) on how to do this type of thing.
HTH | [
0.18808849155902863,
-0.38976022601127625,
0.213858500123024,
0.3841824531555176,
0.13114726543426514,
-0.5590870380401611,
0.2781045436859131,
0.07741260528564453,
-0.36955687403678894,
-0.5296461582183838,
0.1052587479352951,
0.32319140434265137,
0.026133591309189796,
-0.2137230187654495... | |
I have a large exiting C++ project involving:
* 4 applications
* 50+ libraries
* 20+ third party libraries
The project uses QMake (part of Trolltech's Qt) to build the production version on Linux, but I've been playing around at building it on MacOS.
I can build in on MacOS using QMake just fine but I'm having trouble producing the final .app. It needs collecting all the third party frameworks and dynamic libraries, all the project's dynamic libraries and making sure the application finds them.
I've read online about using install\_name\_tool but was wondering if there's a process to automate it.
(Maybe the answer is to use | [
0.4675541818141937,
0.2020530104637146,
0.2364920824766159,
-0.0551566556096077,
0.010232198983430862,
0.08835995197296143,
0.4106617569923401,
0.047858934849500656,
0.03738679736852646,
-0.8230695724487305,
-0.08477228879928589,
0.544838011264801,
-0.356794536113739,
0.3537195026874542,
... | |
XCode, see related question, but it would have issues with building uic and moc)
Thanks
I'm sure this could be of some great help for you :
[deployqt](https://blog.qt.io/blog/2007/08/23/deploying-mac-applications-without-the-hassle/)
Hope this helps ! | [
0.32369372248649597,
0.0955914631485939,
0.4987061619758606,
0.3358164429664612,
0.0113804517313838,
-0.43191128969192505,
0.3014261722564697,
0.44709065556526184,
-0.1213468611240387,
-0.6847497224807739,
-0.09345407783985138,
0.5224112868309021,
-0.16104890406131744,
-0.16116593778133392... | |
As someone who hasn't used either technology on real-world projects I wonder if anyone knows how these two complement each other and how much their functionalities overlap?
LINQ to SQL forces you to use the table-per-class pattern. The benefits of using this pattern are that it's quick and easy to implement and it takes very little effort to get your domain running based on an existing database structure. For simple applications, this is perfectly acceptable (and oftentimes even preferable), but for more complex applications devs will often suggest using a [domain driven design](http://en.wikipedia.org/wiki/Domain_driven_design) pattern instead (which is what NHibernate facilitates).
The problem | [
0.1200718879699707,
0.005628577899187803,
0.24096937477588654,
0.3872987627983093,
-0.38212189078330994,
-0.4639771580696106,
-0.26608484983444214,
-0.18128998577594757,
-0.3221857249736786,
-0.6538660526275635,
0.017915204167366028,
0.41844117641448975,
-0.3593878746032715,
0.140045776963... | |
with the table-per-class pattern is that your database structure has a direct influence over your domain design. For instance, let's say you have a Customers table with the following columns to hold a customer's primary address information:
* StreetAddress
* City
* State
* Zip
Now, let's say you want to add columns for the customer's mailing address as well so you add in the following columns to the Customers table:
* MailingStreetAddress
* MailingCity
* MailingState
* MailingZip
Using LINQ to SQL, the Customer object in your domain would now have properties for each of these eight columns. But if you were following a domain driven design pattern, you | [
0.35732027888298035,
0.026902852579951286,
0.5894789099693298,
0.09841089695692062,
-0.21658077836036682,
0.2565506100654602,
-0.14813926815986633,
-0.0717678964138031,
-0.24863110482692719,
-0.7216604351997375,
-0.04358423128724098,
-0.05248250812292099,
-0.32757237553596497,
0.3609620034... | |
would probably have created an Address class and had your Customer class hold two Address properties, one for the mailing address and one for their current address.
That's a simple example, but it demonstrates how the table-per-class pattern can lead to a somewhat smelly domain. In the end, it's up to you. Again, for simple apps that just need basic CRUD (create, read, update, delete) functionality, LINQ to SQL is ideal because of simplicity. But personally I like using NHibernate because it facilitates a cleaner domain.
Edit: @lomaxx - Yes, the example I used was simplistic and could have been optimized to | [
0.3157143294811249,
0.11334548890590668,
0.287160187959671,
0.47102558612823486,
0.1689966917037964,
-0.11232294887304306,
-0.18401381373405457,
0.05784142389893532,
-0.029518062248826027,
-0.4297175109386444,
0.13186827301979065,
0.6248859763145447,
-0.31559041142463684,
-0.09535078704357... | |
work well with LINQ to SQL. I wanted to keep it as basic as possible to drive home the point. The point remains though that there are several scenarios where having your database structure determine your domain structure would be a bad idea, or at least lead to suboptimal OO design. | [
0.3799668848514557,
0.2614518105983734,
0.3074782192707062,
0.05867311730980873,
0.06658884137868881,
-0.5182123184204102,
-0.24002249538898468,
0.02842848189175129,
0.16573433578014374,
-0.49253103137016296,
0.14697830379009247,
0.5353347659111023,
0.028499100357294083,
-0.074625074863433... | |
I have been in both situations:
* Creating too many custom Exceptions
* Using too many general Exception class
In both cases the project started OK but soon became an overhead to maintain (and refactor).
So what is the best practice regarding the creation of your own Exception classes?
[The Java Specialists](http://www.javaspecialists.eu/) wrote a post about [Exceptions in Java](http://www.javaspecialists.eu/archive/Issue162.html), and in it they list a few "best practices" for creating Exceptions, summarized below:
* Don't Write Own Exceptions (there are lots of useful Exceptions that are already part of the Java API)
* Write Useful Exceptions (if you have to write your own Exceptions, make sure | [
0.44846397638320923,
0.3906625807285309,
-0.13635556399822235,
-0.2941109240055084,
-0.24473796784877777,
-0.1958736926317215,
0.308369904756546,
-0.18016736209392548,
-0.41127750277519226,
-0.4197438061237335,
0.07225627452135086,
0.17152392864227295,
-0.055664148181676865,
-0.07263945043... | |
they provide useful information about the problem that occurred) | [
0.2343025654554367,
0.48046547174453735,
0.04304616525769234,
0.23578035831451416,
0.16630873084068298,
0.13253609836101532,
0.29289987683296204,
0.07942046970129013,
-0.22396501898765564,
-0.42793357372283936,
-0.2555265426635742,
0.4951874017715454,
0.17464956641197205,
-0.04293507337570... | |
What are some of the strategies that are used when implementing FxCop / static analysis on existing code bases with existing violations? How can one most effectively reduce the static analysis violations?
Make liberal use of [SuppressMessage] attribute to begin with. At least at the beginning. Once you get the count to 0 via the attribute, you then put in a rule that new checkins may not introduce FxCop violations.
Visual Studio 2008 has a nice code analysis feature that allows you to ensure that code analysis runs on every build and you can treat warnings as errors. That might slow | [
0.18472783267498016,
-0.02376340888440609,
0.26637735962867737,
0.0373593270778656,
-0.25629204511642456,
-0.11173396557569504,
0.44109323620796204,
-0.42175590991973877,
-0.27798840403556824,
-0.26199665665626526,
0.21679331362247467,
0.9312142133712769,
-0.35031601786613464,
-0.181774243... | |
things down a bit so I recommend setting up a continuous integration server (like CruiseControl.NET) and having it run code analysis on every checkin.
Once you get it under control and aren't introducing new violations with every checkin, start to tackle whole classes of FxCop violations at a time with the goal of removing the SuppressMessageAttributes that you used.
The way to keep track of which ones you really want to keep is to always add a Justification value to the ones you really want to suppress. | [
0.10188626497983932,
-0.19025765359401703,
0.47937506437301636,
0.2881947457790375,
0.223815456032753,
-0.2189280092716217,
0.34997665882110596,
-0.07165800034999847,
-0.38346490263938904,
-0.41120970249176025,
0.3946461081504822,
0.7166318893432617,
-0.1129647046327591,
-0.321398854255676... | |
When applying the Single Responsibility Principle and looking at a class's reason to change, how do you determine whether that reason too change is too granular, or not granular enough?
Make liberal use of [SuppressMessage] attribute to begin with. At least at the beginning. Once you get the count to 0 via the attribute, you then put in a rule that new checkins may not introduce FxCop violations.
Visual Studio 2008 has a nice code analysis feature that allows you to ensure that code analysis runs on every build and you can treat warnings as errors. That might slow things down | [
0.19478768110275269,
-0.2987762987613678,
0.11540719121694565,
0.07374473661184311,
-0.35523754358291626,
-0.04705606400966644,
0.38919907808303833,
-0.39119893312454224,
-0.24559928476810455,
-0.05052758380770683,
0.24684776365756989,
0.793997585773468,
-0.3178456425666809,
-0.30269160866... | |
a bit so I recommend setting up a continuous integration server (like CruiseControl.NET) and having it run code analysis on every checkin.
Once you get it under control and aren't introducing new violations with every checkin, start to tackle whole classes of FxCop violations at a time with the goal of removing the SuppressMessageAttributes that you used.
The way to keep track of which ones you really want to keep is to always add a Justification value to the ones you really want to suppress. | [
0.2356114238500595,
-0.16029688715934753,
0.34415653347969055,
0.26375624537467957,
0.1521623283624649,
-0.3204224109649658,
0.32603156566619873,
-0.11215539276599884,
-0.3476709723472595,
-0.2450525164604187,
0.4214385747909546,
0.7422661781311035,
-0.20059633255004883,
-0.367690145969390... | |
I want to compare 2 arrays of objects in JavaScript code. The objects have 8 total properties, but each object will not have a value for each, and the arrays are never going to be any larger than 8 items each, so maybe the brute force method of traversing each and then looking at the values of the 8 properties is the easiest way to do what I want to do, but before implementing, I wanted to see if anyone had a more elegant solution. Any thoughts?
EDIT: You cannot overload operators in current, common browser-based implementations of JavaScript interpreters.
To answer | [
0.04920521378517151,
-0.007232702802866697,
-0.11583290994167328,
0.2791995704174042,
-0.15399505198001862,
0.13821861147880554,
0.5148071646690369,
-0.3257490396499634,
-0.2995153069496155,
-0.7502803206443787,
0.019225291907787323,
0.4686479866504669,
-0.3912373483181,
-0.209313571453094... | |
the original question, one way you could do this, and mind you, this is a bit of a hack, simply [serialize the two arrays to JSON](https://github.com/douglascrockford/JSON-js/blob/master/json2.js) and then compare the two JSON strings. That would simply tell you if the arrays are different, obviously you could do this to *each* of the objects within the arrays as well to see which ones were different.
Another option is to use a library which has some nice facilities for comparing objects - I use and recommend [**MochiKit**](http://www.mochikit.com/).
---
**EDIT:** [The answer kamens gave](https://stackoverflow.com/questions/27030/comparing-arrays-of-objects-in-javascript#27932) deserves consideration as well, since a single function to compare two given | [
0.14511236548423767,
-0.31628546118736267,
0.008043952286243439,
0.12318684160709381,
-0.7396232485771179,
0.009092090651392937,
0.13391593098640442,
-0.44039779901504517,
-0.21209248900413513,
-0.5092999339103699,
0.009548848494887352,
0.387522429227829,
-0.24415381252765656,
-0.092498898... | |
objects would be much smaller than any library to do what I suggest (although my suggestion would certainly work well enough).
Here is a naïve implemenation that may do just enough for you - be aware that there are potential problems with this implementation:
```
function objectsAreSame(x, y) {
var objectsAreSame = true;
for(var propertyName in x) {
if(x[propertyName] !== y[propertyName]) {
objectsAreSame = false;
break;
}
}
return | [
-0.042137160897254944,
0.06888646632432938,
0.15428873896598816,
0.07348261028528214,
-0.035129331052303314,
-0.07958979904651642,
0.3824082911014557,
-0.5445606708526611,
-0.04934178292751312,
-0.5248486995697021,
-0.22086703777313232,
0.6380220651626587,
-0.04948244243860245,
0.186593502... | |
objectsAreSame;
}
```
The assumption is that both objects have the same exact list of properties.
Oh, and it is probably obvious that, for better or worse, I belong to the only-one-return-point camp. :) | [
-0.2578105926513672,
0.3093729019165039,
0.17396627366542816,
-0.10057154297828674,
-0.3460686504840851,
-0.05614164099097252,
0.04651862382888794,
-0.06960926204919815,
-0.0770755261182785,
-0.4737837016582489,
-0.06534656137228012,
0.37878158688545227,
-0.12911967933177948,
0.44174495339... | |
Do any of you know of a tool that will search for .class files and then display their compiled versions?
I know you can look at them individually in a hex editor but I have a lot of class files to look over (something in my giant application is compiling to Java6 for some reason).
Use the [javap](http://java.sun.com/javase/6/docs/technotes/tools/solaris/javap.html) tool that comes with the JDK. The `-verbose` option will print the version number of the class file.
```
> javap -verbose MyClass
Compiled from "MyClass.java"
public class MyClass
SourceFile: "MyClass.java"
minor version: 0
major version: 46
...
```
To only show the version:
```
WINDOWS> javap -verbose MyClass | | [
-0.07502897083759308,
0.16555814445018768,
0.2810482680797577,
-0.006855282932519913,
-0.34221911430358887,
0.058624137192964554,
0.2946793735027313,
0.05379355326294899,
-0.22327545285224915,
-0.9672638773918152,
-0.32141005992889404,
0.5890786051750183,
-0.1650257110595703,
0.07070715725... | |
find "version"
LINUX > javap -verbose MyClass | grep version
``` | [
-0.45505136251449585,
0.10019860416650772,
0.25042441487312317,
-0.09977500885725021,
0.12296225875616074,
-0.23711849749088287,
0.41112011671066284,
0.42651042342185974,
0.0633281022310257,
-0.9106331467628479,
-0.379925936460495,
0.3943711221218109,
-0.46018195152282715,
0.07305927574634... | |
When I do:
```
$ find /
```
It searches the entire system.
How do I prevent that?
(This question comes from an "[answer](https://stackoverflow.com/questions/18836/why-doesnt-find-find-anything#26182)" to another question.)
G'day,
Just wanted to expand on the suggestion from Jon to use -prune. It isn't the easiest of find options to use, for example to just search in the current directory the find command looks like:
```
find . \( -type d ! -name . -prune \) -o \( <the bit you want to look for> \)
```
this will stop find from descending into sub-directories within this directory.
Basically, it says, "prune anything that is a directory, whose name isn't ".", i.e. | [
0.0021076849661767483,
-0.007562208455055952,
0.40599656105041504,
-0.24016115069389343,
0.22969141602516174,
-0.4144969582557678,
0.21905751526355743,
0.19655416905879974,
-0.10058790445327759,
-0.6394039988517761,
-0.23359821736812592,
0.6322969794273376,
-0.11472798138856888,
0.29986867... | |
current dir."
The find command evals left to right for each item found in the current directory so after completion of the first element, i.e. the prune segment, it will then continue on with the matched item in your second -o (OR'd) expression.
HTH.
cheers,
Rob | [
-0.21982966363430023,
-0.25541746616363525,
0.9186334013938904,
-0.04878734052181244,
0.4248516261577606,
0.15857923030853271,
0.11360691487789154,
0.07254783809185028,
0.013596678152680397,
-0.2997419536113739,
-0.13830344378948212,
0.8740641474723816,
-0.032304320484399796,
-0.0321221128... | |
I am debugging my ASP.NET application on my Windows XP box with a virtual directory set up in IIS (5.1).
I am also running **VirtualPC** with XP and IE6 for testing purposes. When I connect to my real machine from the virtual machine, I enter the URL: <http://machinename/projectname>.
I get a security popup to connect to my machine (which I expect), but the User name field is disabled. I cannot change it from machinename\Guest to machinename\username in order to connect.
How do I get this to enable so I can enter the correct credentials.
G'day,
Just wanted to expand on the suggestion from Jon to | [
0.4327428936958313,
0.27635788917541504,
0.4085025191307068,
-0.057530418038368225,
0.04433613643050194,
-0.3623661398887634,
0.7414631843566895,
0.07625175267457962,
-0.2526565492153168,
-0.7385618090629578,
-0.15405011177062988,
0.5131969451904297,
-0.22567851841449738,
0.272525548934936... | |
use -prune. It isn't the easiest of find options to use, for example to just search in the current directory the find command looks like:
```
find . \( -type d ! -name . -prune \) -o \( <the bit you want to look for> \)
```
this will stop find from descending into sub-directories within this directory.
Basically, it says, "prune anything that is a directory, whose name isn't ".", i.e. current dir."
The find command evals left to right for each item found in the current directory so after completion of the first element, i.e. the prune segment, it will then continue on with | [
0.028531597927212715,
-0.24953067302703857,
0.5587267279624939,
-0.24944953620433807,
0.364307165145874,
0.10648229718208313,
-0.048233453184366226,
-0.1074962243437767,
-0.02988307923078537,
-0.5750300884246826,
0.031184837222099304,
0.8833358883857727,
-0.33838993310928345,
0.22417707741... | |
the matched item in your second -o (OR'd) expression.
HTH.
cheers,
Rob | [
0.1662702113389969,
0.07837183773517609,
0.6416290402412415,
0.4262915253639221,
0.08929964154958725,
0.32828760147094727,
0.30640819668769836,
0.21256527304649353,
0.11313973367214203,
-0.27812567353248596,
0.01614801213145256,
0.710052490234375,
0.36442995071411133,
-0.4835602343082428,
... | |
I have a bunch of perfmon files that have captured information over a period of time. Whats the best tool to crunch this information? Idealy I'd like to be able to see avg stats per hour for the object counters that have been monitored.
Perhaps look into using [LogParser](http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en).
It depends on how the info was logged (Perfmon doesn't lack flexibility)
If they're CSV you can even use the ODBC Text drivers and run queries against them!
(performance would be 'intriguing')
And here's the obligatory link to a [CodingHorror article](http://blog.codinghorror.com/microsoft-logparser/) on the topic ;-) | [
0.4912751615047455,
0.16208581626415253,
0.4088522493839264,
0.3008532226085663,
0.06131698936223984,
-0.22395354509353638,
0.16439880430698395,
0.1491362452507019,
-0.3169001638889313,
-0.7536661624908447,
0.06325823813676834,
0.3414757251739502,
0.19602864980697632,
0.10857784003019333,
... | |
I want to merge multiple rss feeds into a single feed, removing any duplicates. Specifically, I'm interested in merging the feeds for the [tags](https://stackoverflow.com/tags) I'm interested in.
[A quick [search](http://www.google.com/search?q=rss+merge+reader) turned up some promising links, which I don't have time to visit at the moment]
---
Broadly speaking, the ideal would be a reader that would list all the available tags on the site and toggle them on and off, allowing me to explore what's available, keep track of questions I've visited, new answers on interesting feeds, etc, etc . . . though I don't suppose such a things exists right now.
As I | [
0.9814878702163696,
-0.06357036530971527,
0.28316035866737366,
0.05112370476126671,
0.09298432618379593,
-0.23763319849967957,
-0.11103160679340363,
-0.06223820894956589,
-0.38664427399635315,
-0.695536732673645,
0.19797252118587494,
0.34324339032173157,
-0.4084140956401825,
0.129365935921... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.