text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
What are the most user-friendly color combinations for Web 2.0 websites, such as background, button colors, etc.?
[ColorSchemer](http://www.colorschemer.com/online.html) will suggest good schemes for you.
If you want to try something out on your own, try [Color Combinations](http://www.colorcombos.com/). | [
0.2805370092391968,
-0.4190785884857178,
0.23687554895877838,
0.17539380490779877,
0.3319304585456848,
-0.004739105701446533,
-0.011490262113511562,
0.1357509195804596,
-0.4096619486808777,
-0.6859549880027771,
-0.2613903284072876,
0.4596812129020691,
-0.3473914563655853,
-0.40783235430717... | |
I'm looking for a "safe" eval function, to implement spreadsheet-like calculations (using numpy/scipy).
The functionality to do this (the [rexec module](http://docs.python.org/lib/module-rexec.html)) has been removed from Python since 2.3 due to apparently unfixable security problems. There are several third-party hacks out there that purport to do this - the most thought-out solution that I have found is
[this Python Cookbok recipe](http://code.activestate.com/recipes/496746/), "safe\_eval".
Am I reasonably safe if I use this (or something similar), to protect from malicious code, or am I stuck with writing my own parser? Does anyone know of any better alternatives?
EDIT: I just discovered [RestrictedPython](http://pypi.python.org/pypi/RestrictedPython), which is part of | [
0.2245870977640152,
0.28347277641296387,
0.08515879511833191,
-0.17440193891525269,
0.0505201481282711,
-0.08175775408744812,
0.6411677002906799,
-0.0725838765501976,
-0.12291145324707031,
-0.19530411064624786,
-0.06731188297271729,
0.4095437526702881,
-0.3836697041988373,
-0.0561071634292... | |
Zope. Any opinions on this are welcome.
Depends on your definition of safe I suppose. A lot of the security depends on what you pass in and what you are allowed to pass in the context. For instance, if a file is passed in, I can open arbitrary files:
```
>>> names['f'] = open('foo', 'w+')
>>> safe_eval.safe_eval("baz = type(f)('baz', 'w+')", names)
>>> names['baz']
<open file 'baz', mode 'w+' at 0x413da0>
```
Furthermore, the environment is very restricted (you cannot pass in modules), thus, you can't simply pass in a module of utility functions like re or random.
On the other hand, you don't need to write your own parser, | [
0.1709040403366089,
0.15335051715373993,
0.26655033230781555,
0.06208450719714165,
0.16995057463645935,
-0.4529785215854645,
0.4362925887107849,
-0.13553433120250702,
-0.032834988087415695,
-0.6961905360221863,
-0.2774478495121002,
0.5336681604385376,
-0.3809607923030853,
0.074350066483020... | |
you could just write your own evaluator for the python ast:
```
>>> import compiler
>>> ast = compiler.parse("print 'Hello world!'")
```
That way, hopefully, you could implement safe imports. The other idea is to use Jython or IronPython and take advantage of Java/.Net sandboxing capabilities. | [
0.06672850996255875,
0.00817443709820509,
-0.16114726662635803,
-0.04116817191243172,
-0.21849460899829865,
-0.1326945424079895,
0.3246895968914032,
0.024516595527529716,
-0.20502625405788422,
-0.3202016055583954,
-0.07282094657421112,
0.531286895275116,
-0.4289228916168213,
-0.14279864728... | |
Has anybody managed to get the Android Emulator working behind a proxy that requires authentication?
I've tried setting the -http-proxy argument to
```
http://DOMAIN/USERNAME:PASSWORD@IP:PORT
```
but am having no success.
I've tried following the docs to no avail. I've also tried the `-verbose-proxy` setting but this no longer seems to exist.
Any pointers?
I Managed to do it in the Adndroid 2.2 Emulator.
```
Go to "Settings" -> "Wireless & Networks" -> "Mobile Networks" -> "Access Point Names" -> "Telkila"
```
Over there set the proxy host name in the property "Proxy"
and the Proxy port in the property "Port" | [
0.005026771686971188,
0.3419148027896881,
0.401225209236145,
-0.13517747819423676,
-0.005746981594711542,
0.19460473954677582,
0.26312899589538574,
-0.0686335489153862,
-0.09967171400785446,
-0.8362091183662415,
-0.042318474501371384,
0.7621795535087585,
-0.43440213799476624,
0.11131466925... | |
I have a development vm which is running sql server as well as some other apps for my stack, and I found that the other apps are performing awfully. After doing some digging, SQL Server was hogging the memory. After a quick web search I discovered that by default, it will consume as much memory as it can in order to cache data and give it back to the system as other apps request it, but this process often doesn't happen fast enough, apparently my situation is a common problem.
[There however is a way to limit the memory SQL | [
0.27740585803985596,
0.47168779373168945,
0.17490974068641663,
0.15638995170593262,
0.2696789503097534,
-0.0935048907995224,
0.06760186702013016,
0.08190614730119705,
-0.22879792749881744,
-0.42135560512542725,
0.3508455455303192,
0.587815523147583,
-0.22293853759765625,
0.4531638622283935... | |
Server is allowed to have](http://blog.stevehorn.cc/2007/10/limit-memory-usage-in-sql-server-2005.html). My question is, how should I set this limit. Obviously I'm going to need to do some guess and check, but is there an absolute minimum threshhold? Any recommendations are appreciated.
Edit:
I'll note that out developer machines have 2 gigs of memory so I'd like to be able to run the vm on 768 mb or less if possible. This vm will be only used for local dev and testing , so the load will be very minimal. After code has been tested locally it goes to another environment where the SQL server box is | [
0.15183481574058533,
0.09615924954414368,
0.7331348657608032,
-0.17162619531154633,
-0.26515552401542664,
-0.3093084394931793,
0.025833269581198692,
-0.09037376940250397,
-0.5173203349113464,
-0.237977996468544,
0.17042745649814606,
0.46120551228523254,
-0.17223164439201355,
0.248035386204... | |
dedicated. **What I'm really looking for here is recommendations on minimums**
Since this is a development environment, I agree with Greg, just use trial and error. It's not that crucial to get it perfectly right.
But if you do a lot of work in the VM, why not give it at least half of the 2GB? | [
0.9730029702186584,
0.12362415343523026,
0.052944887429475784,
0.25781282782554626,
-0.3006211817264557,
-0.26131609082221985,
0.10425020754337311,
0.11846835166215897,
-0.4736710786819458,
-0.7155001163482666,
0.21028874814510345,
0.8320491313934326,
-0.034750521183013916,
-0.103779368102... | |
What open source licenses are more corporate-friendly, i.e., they can be used in commercial products without the need to open source the commercial product?
I recommend the Apache License (specifically, version 2). It is not a “copy left” license and it addresses several matters that are important to established companies and their lawyers.
“Copy left” is the philosophy of the free software foundation requiring anything incorporating the licensed opens source code to also be licensed as open source. That philosophy is regarded as poison by established companies that want to keep their products proprietary.
Aside from not having “copy left” provisions, the Apache | [
0.7252950072288513,
0.6127796769142151,
0.056802332401275635,
0.19020499289035797,
-0.16359716653823853,
-0.9991596937179565,
0.19344256818294525,
-0.04140443727374077,
0.21708306670188904,
-0.24355395138263702,
0.03332356736063957,
0.6730338931083679,
-0.3129233717918396,
0.36531603336334... | |
license specifically addresses the grant of rights from project contributors and it expressly addresses the fact that modern companies are typically made up for more than one legal entity (for example, a parent company and its subsidiaries). Most open source licenses don’t address these points.
Whatever license you choose, if you want your code to be “corporate friendly,” in the sense that you want it to be incorporated into commercial, non-open source products, it is essential that you avoid GPL and other “copy left” type licenses. While it would be best to consult with your own lawyer before investing time or | [
0.7089077234268188,
0.4175761640071869,
0.0655079260468483,
0.24796399474143982,
-0.027792584151029587,
-0.9848942756652832,
0.00028681644471362233,
0.10572056472301483,
0.02141593210399151,
-0.34449514746665955,
-0.5286147594451904,
0.5002318620681763,
-0.12075059860944748,
0.296363890171... | |
money in a project for which this is an important factor, a quick shorthand for licenses that are and are not “copy left” can be found on the Free Software Foundation’s website. They identify which licenses they don’t find meet their standards as “copy left.” The ones FSF rejects are most likely the ones that will be corporate friendly in this sense.
(Although the question didn’t ask this, it is worth mentioning that, with very few exceptions, even GPL and other “copy left” type licenses are perfectly corporate friendly if they are only used internally by the commercial entities and not | [
0.697968602180481,
0.5455735921859741,
0.15403352677822113,
0.142996147274971,
0.06184786930680275,
-0.7209376096725464,
0.11826518177986145,
0.11088474094867706,
-0.1816263049840927,
-0.28288546204566956,
-0.1810196191072464,
0.577094554901123,
0.03502712771296501,
0.11887971311807632,
... | |
incorporated into their products.) | [
0.6799554824829102,
0.31135520339012146,
0.10920996218919754,
-0.032309114933013916,
0.5333287119865417,
0.14680977165699005,
0.07892617583274841,
-0.08790726214647293,
-0.16943517327308655,
-0.1673433631658554,
-0.17569726705551147,
0.21907024085521698,
-0.06237164884805679,
0.12146831303... | |
I'm trying to find a way to list the (static) dependency requirements of a jar file, in terms of which symbols are required at run time.
I can see that the methods exported by classes can be listed using "javap", but there doesn't seem to be an opposite facility to list the 'imports'. Is it possible to do this?
This would be similar to the dumpbin utility in Windows development which can be used to list the exports and imports of a DLL.
EDIT : Thanks for the responses; I checked out all of the suggestions; accepted DependencyFinder as it most closely meets | [
0.3996378183364868,
-0.051647040992975235,
-0.10427103191614151,
-0.039790842682123184,
-0.21746790409088135,
-0.029743153601884842,
0.2626214027404785,
-0.09819038957357407,
-0.13380120694637299,
-0.5406497716903687,
0.1503233164548874,
0.6314792037010193,
-0.41699278354644775,
-0.0010604... | |
what I was looking for.
You could use the [Outbound dependencies](http://depfind.sourceforge.net/Manual.html#ShowingOnlyOutboundDependencies) feature of [DependencyFinder](http://depfind.sourceforge.net/). You can do that entirely in the GUI, or in command line exporting XML. | [
0.2012009471654892,
-0.4095955789089203,
0.39703884720802307,
-0.08504728227853775,
0.17448802292346954,
-0.4410645067691803,
0.016577016562223434,
0.08373299241065979,
-0.3183508515357971,
-0.5250527858734131,
-0.3286427855491638,
0.7653008103370667,
-0.26152563095092773,
-0.1489496380090... | |
I'm in the process of refactoring some code which includes moving folders around, and I would like to regularly merge to keep things current. What is the best way to merge after I've moved folders around in my working copy?
You can move the files around in StarTeam also. Then merge after that.
Whatever you do, make sure you don't delete the files and re-add in StarTeam. You'll lose the file history if you do that. | [
0.534530520439148,
0.176523357629776,
0.2607739269733429,
0.16914810240268707,
0.3485855162143707,
-0.08703772723674774,
-0.03477611765265465,
0.20089936256408691,
-0.49648186564445496,
-0.9180238246917725,
0.20334838330745697,
0.21019724011421204,
-0.24512775242328644,
0.27532362937927246... | |
I want to do what myopenid does -- once you've logged, you can click a button that generates you an SSL certificate; the browser then downloads this certificate and stores it. When you later go back to yourid.myopenid.com, your browser can use its stored certificate for authentication so you don't ever need a password.
So my questions is what is required to get this working? How do I generate certificates? How do I validate them once they're presented back to me?
My stack is Rails on Apache using Passenger, but I'm not too particular.
These are usually referred to as client side certificates.
I've | [
0.43224820494651794,
0.2843388020992279,
0.39684125781059265,
-0.05481104925274849,
-0.1830347776412964,
-0.27853313088417053,
0.31712499260902405,
0.1741963028907776,
-0.08377984911203384,
-0.842235803604126,
0.20218439400196075,
0.20076577365398407,
0.02242998033761978,
0.408588886260986... | |
not actually used it but a modified version of restful-authentication can be found here [here](http://github.com/labria/restful-authentication/tree/master) that looks like what your after.
I found this via [Dr. Nic's post](http://drnicwilliams.com/2008/02/22/zero-sign-on-with-client-certificates/) | [
0.42750418186187744,
-0.24649949371814728,
0.33256831765174866,
0.06713126599788666,
-0.039678361266851425,
-0.6718342900276184,
0.39088425040245056,
-0.056190650910139084,
-0.15575407445430756,
-0.04926399141550064,
0.06098524481058121,
0.2970670461654663,
-0.18037353456020355,
-0.1771191... | |
Right now, I'm particularly interested in reading the data from MP3 files (ID3 tags?), but the more it can do (eg EXIF from images?) the better without compromising the ID3 tag reading abilities.
I'm interested in making a script that goes through my media (right now, my music files) and makes sure the file name and directory path correspond to the file's metadata and then create a log of mismatched files so I can check to see which is accurate and make the proper changes. I'm thinking Ruby or Python (see [a related question specifically for Python](https://stackoverflow.com/questions/8948/accessing-mp3-meta-data-with-python)) would be best for | [
0.36537089943885803,
0.14165329933166504,
0.061793673783540726,
0.2758742868900299,
-0.044333234429359436,
-0.20088547468185425,
0.0845455601811409,
-0.4074741303920746,
-0.3064134120941162,
-0.594756007194519,
0.08490815758705139,
0.9128105640411377,
-0.23813149333000183,
-0.0825109332799... | |
this, but I'm open to using any language really (and would actually probably prefer an application language like C, C++, Java, C# in case this project goes off).
There is a great post on using PowerShell and TagLibSharp on Joel "Jaykul" Bennet's [site](http://huddledmasses.org/editing-media-tags-from-powershell/). You could use TagLibSharp to read the metatdata with any .NET based language, but PowerShell is quite appropriate for what you are trying to do. | [
0.4775005578994751,
-0.16907495260238647,
0.1988801658153534,
0.3997038006782532,
-0.3509778380393982,
-0.3698882758617401,
0.17202304303646088,
0.18348771333694458,
-0.09349972754716873,
-0.46720263361930847,
0.2039632648229599,
0.49422019720077515,
-0.4993657171726227,
-0.070524811744689... | |
I'm using `ByteBuffers` and `FileChannels` to write binary data to a file. When doing that for big files or successively for multiple files, I get an `OutOfMemoryError` exception.
I've read elsewhere that using `Bytebuffers` with NIO is broken and should be avoided. Does any of you already faced this kind of problem and found a solution to efficiently save large amounts of binary data in a file in java?
Is the jvm option `-XX:MaxDirectMemorySize` the way to go?
I would say don't create a huge ByteBuffer that contains ALL of the data at once. Create a much smaller ByteBuffer, fill it with data, | [
0.46051743626594543,
0.04273148998618126,
-0.019909139722585678,
-0.01005471684038639,
-0.06901577860116959,
-0.172245591878891,
0.09009332209825516,
0.04559269919991493,
-0.34204617142677307,
-0.6787071228027344,
-0.054252706468105316,
0.5162397027015686,
-0.15350617468357086,
0.080165967... | |
then write this data to the FileChannel. Then reset the ByteBuffer and continue until all the data is written. | [
0.28684601187705994,
-0.10469379276037216,
0.4499658942222595,
-0.05527586489915848,
0.14479665458202362,
-0.06536529213190079,
0.20897816121578217,
-0.035734232515096664,
-0.20903900265693665,
-0.487133264541626,
-0.25410184264183044,
0.6642910838127136,
-0.027735266834497452,
0.195262014... | |
In Eclipse 3.2.2 on Linux content assist is not finding classes within the same project. Upgrading above 3.2 is not an option as SWT is not available above 3.2 for Solaris.
I have seen suggestions to clean the workspace, reopen the workspace, run eclipse with the `-clean` command, none of which has worked.
Thanks for your last comment it worked partially.
If there is any kind of errors, the content assist wont work. Once fixed, it partially works.
I say partially because, there appear to be a bug, when I do Perl EPIC inheritance ex:
```
package FG::CatalogueFichier;
use FG::Catalogue;
our @ISA = qw(FG::Catalogue);
use strict;
```
, the inheritted | [
0.35535332560539246,
0.09130790829658508,
0.22246447205543518,
-0.1833057850599289,
-0.3684329390525818,
-0.35063672065734863,
0.35641613602638245,
0.060103561729192734,
-0.05405566841363907,
-0.7665402293205261,
-0.24068179726600647,
0.8477862477302551,
-0.31346258521080017,
-0.0900301784... | |
subroutines are not displayed in the content assist. | [
-0.06132451444864273,
-0.027840565890073776,
0.22222056984901428,
0.33638885617256165,
0.036105766892433167,
-0.1854018121957779,
0.35552576184272766,
0.5678654909133911,
-0.2553976774215698,
-0.6215303540229797,
-0.7291516661643982,
0.21337738633155823,
-0.394561767578125,
-0.071037828922... | |
Is there a simple way of getting a HTML textarea and an input type="text" to render with (approximately) equal width (in pixels), that works in different browsers?
A CSS/HTML solution would be brilliant. I would prefer not to have to use Javascript.
Thanks
/Erik
You should be able to use
```css
.mywidth {
width: 100px;
}
```
```html
<input class="mywidth">
<br>
<textarea class="mywidth"></textarea>
``` | [
0.08544675260782242,
0.21444843709468842,
0.48659083247184753,
0.06921864300966263,
-0.2896065413951874,
0.12983718514442444,
0.11139370501041412,
0.07253538817167282,
-0.193881094455719,
-0.8432404398918152,
-0.026332074776291847,
0.5166094303131104,
0.10030137747526169,
-0.23530554771423... | |
I'm trying to improve performance under high load and would like to implement opcode caching. Which of the following should I use?
* APC - [Installation Guide](http://www.howtoforge.com/apc-php5-apache2-debian-etch)
* eAccelerator - [Installation Guide](http://www.howtoforge.com/eaccelerator_php5_debian_etch)
* XCache - [Installation Guide](http://www.howtoforge.com/xcache-php5-apache2-debian-etch)
I'm also open to any other alternatives that have slipped under my radar.
Currently running on a stock Debian Etch with Apache 2 and PHP 5.2
**[Update 1]**
HowtoForge installation links added
**[Update 2]**
Based on the answers and feedback given, I have tested all 3 implementations using the following Apache JMeter test plan on my application:
* Login
* Access Home Page
With 50 concurrent connections, the results are as follows:
No Opcode Caching | [
0.16160285472869873,
0.4783549904823303,
0.2492201328277588,
-0.17662790417671204,
-0.1419154852628708,
0.06790069490671158,
0.24268671870231628,
-0.3751356601715088,
-0.23710781335830688,
-0.7104659676551819,
0.033715952187776566,
0.4960688352584839,
-0.4018888473510742,
-0.18706315755844... | |

APC

eAccelerator

XCache

Performance Graph (smaller is better)

From the above results, eAccelerator has a slight edge in performance compared to APC and XCache. However, what matters most from the above data is that any sort of opcode caching gives a tremendous boost in performance.
I have decided to use APC due to the following 2 reasons:
* Package is available in official Debian repository
* More functional control panel
To summarize my experience:
Ease of Installation: APC > eAccelerator > XCache
Performance: eAccelerator > APC, XCache
Control Panel: APC > XCache > eAccelerator
I think the | [
0.14679689705371857,
0.3148488402366638,
0.26605120301246643,
-0.3159911334514618,
-0.3020343780517578,
-0.08465521037578583,
0.21292872726917267,
-0.37993094325065613,
-0.4379575252532959,
-0.6450372338294983,
-0.15794631838798523,
0.522385835647583,
-0.404631644487381,
-0.184159830212593... | |
answer might depend on the type of web applications you are running. I had to make this decision myself two years ago and couldn't decide between Zend Optimizer and eAccelerator.
In order to make my decision, I used ab (apache bench) to test the server, and tested the three combinations (zend, eaccelerator, both running) and proved that eAccelerator on its own gave the greatest performance.
If you have the luxury of time, I would recommend doing similar tests yourself, and making the decision based on your results. | [
0.2075485736131668,
0.015163506381213665,
-0.1133076623082161,
0.04190753400325775,
-0.22687873244285583,
0.183171346783638,
0.20014750957489014,
-0.48474428057670593,
0.054306771606206894,
-0.3614514172077179,
0.36716964840888977,
0.38110917806625366,
-0.25594842433929443,
-0.175101906061... | |
I recently ran out of disk space on a drive on a FreeBSD server. I truncated the file that was causing problems but I'm not seeing the change reflected when running `df`. When I run `du -d0` on the partition it shows the correct value. Is there any way to force this information to be updated? What is causing the output here to be different?
This probably centres on *how* you truncated the file. *du* and *df* report different things as [this post on unix.com explains](http://www.unix.com/unix-dummies-questions-answers/29223-sco-unix-disk-space.html). Just because space is not used does not necessarily mean that it's free... | [
0.5707244873046875,
0.2136547565460205,
-0.015466812066733837,
0.09365600347518921,
0.05972924456000328,
-0.19784419238567352,
0.1436770111322403,
0.03502466902136803,
-0.5177975296974182,
-0.5574468970298767,
-0.14898811280727386,
0.3105524480342865,
-0.0958012118935585,
0.665655672550201... | |
I recently upgraded a VS2005 web deployment project to VS2008 - and now I get the following error when building:
```
The specified task executable location "bin\aspnet_merge.exe" is invalid.
```
Here is the source of the error (from the web deployment targets file):
```
<Target Name="AspNetMerge" Condition="'$(UseMerge)' == 'true'" DependsOnTargets="$(MergeDependsOn)">
<AspNetMerge
ExePath="$(FrameworkSDKDir)bin"
ApplicationPath="$(TempBuildDir)"
KeyFile="$(_FullKeyFile)"
DelaySign="$(DelaySign)"
Prefix="$(AssemblyPrefixName)"
SingleAssemblyName="$(SingleAssemblyName)"
Debug="$(DebugSymbols)"
Nologo="$(NoLogo)" | [
0.04943888261914253,
-0.021932825446128845,
0.49980807304382324,
-0.254312127828598,
0.05297691747546196,
0.020852498710155487,
0.6190388798713684,
-0.38533222675323486,
-0.353748083114624,
-0.9121283888816833,
-0.23552905023097992,
0.5957658290863037,
-0.31255167722702026,
0.2075646966695... | |
ContentAssemblyName="$(ContentAssemblyName)"
ErrorStack="$(ErrorStack)"
RemoveCompiledFiles="$(DeleteAppCodeCompiledFiles)"
CopyAttributes="$(CopyAssemblyAttributes)"
AssemblyInfo="$(AssemblyInfoDll)"
MergeXmlDocs="$(MergeXmlDocs)"
ErrorLogFile="$(MergeErrorLogFile)"
/>
```
What is the solution to this problem?
Note - I also created a web deployment project from scratch in VS2008 and got the same error.
Apparently aspnet\_merge.exe (and all the other SDK tools) are NOT packaged in Visual Studio 2008. Visual Studio 2005 packaged these tools as part of its installation.
The place to get this is an installation of | [
0.026287952437996864,
0.2058081477880478,
0.516369640827179,
-0.08331737667322159,
-0.23050400614738464,
-0.07035490870475769,
0.4205873906612396,
-0.3117610514163971,
-0.12604065239429474,
-0.8585767149925232,
0.09028250724077225,
0.5015760660171509,
-0.5668920278549194,
0.113773502409458... | |
the Windows 2008 SDK ([latest download](http://www.microsoft.com/downloads/thankyou.aspx?familyId=e6e1c3df-a74f-4207-8586-711ebe331cdc&displayLang=en)).
Windows 7/Windows 2008 R2 SDK: [here](http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en)
The solution is to install the Windows SDK and make sure you set FrameworkSDKDir as an environment variable before starting the IDE. Batch command to set this variable:
```
SET FrameworkSDKDir="C:\Program Files\Microsoft SDKs\Windows\v6.1"
```
NOTE: You will need to modify to point to where you installed the SDK if not in the default location.
Now VS2008 will know where to find aspnet\_merge.exe. | [
-0.2707146406173706,
0.09338711947202682,
0.46840721368789673,
0.01879637874662876,
-0.16893573105335236,
-0.1941007375717163,
0.5244272351264954,
-0.3068872094154358,
-0.074238121509552,
-0.5446216464042664,
-0.30000659823417664,
0.6456223726272583,
-0.1916094869375229,
0.1141291335225105... | |
I've been taking a look at some different products for .NET which propose to speed up development time by providing a way for business objects to map seamlessly to an automatically generated database. I've never had a problem writing a data access layer, but I'm wondering if this type of product will really save the time it claims. I also worry that I will be giving up too much control over the database and make it harder to track down any data level problems. Do these type of products make it better or worse in the already tough case that | [
0.5123282074928284,
0.14595122635364532,
0.09129650890827179,
0.23458939790725708,
0.20543904602527618,
-0.17340832948684692,
0.05951027199625969,
0.24470870196819305,
-0.3191770613193512,
-0.6759907007217407,
0.24966755509376526,
0.4934190511703491,
-0.013880835846066475,
0.18584051728248... | |
the database and business object structure must change?
For example:
[Object Relation Mapping from Dev Express](http://www.devexpress.com/Products/NET/ORM/)
In essence, is it worth it? Will I save "THAT" much time, effort, and future bugs?
I have used SubSonic and EntitySpaces. Once you get the hang of them, I beleive they can save you time, but as complexity of your app and volume of data grow, you may outgrow these tools. You start to lose time trying to figure out if something like a performance issue is related to the ORM or to your code. So, to answer your question, I think it depends. I tend to | [
0.4362686276435852,
0.06276912242174149,
0.29794204235076904,
0.2989092171192169,
0.12254935503005981,
-0.030662057921290398,
0.34550464153289795,
-0.17305204272270203,
-0.24165114760398865,
-0.5053743720054626,
0.23014061152935028,
0.894945502281189,
0.025325188413262367,
-0.2569045722484... | |
agree with Eric on this, high volume enterprise apps are not a good place for general purpose ORMs, but in standard fare smaller CRUD type apps, you might see some saved time. | [
0.10480904579162598,
0.19942450523376465,
0.15751142799854279,
0.6530182957649231,
0.2201204001903534,
-0.45656585693359375,
0.09975174814462662,
0.085005983710289,
-0.30410170555114746,
-0.8085596561431885,
-0.12160884588956833,
0.4644638001918793,
0.13831113278865814,
-0.3215416073799133... | |
I have been doing some java development lately and have started using Eclipse. For the most part, I think it is great, but being a C/C++ guy used to doing all of his editing in vim, I find myself needlessly hitting the Esc key over and over.
It would be really nice if I got all the nice features of Eclipse, but still could do basic editing the same way I can in vim. Anyone know of any Eclipse pluggins that would help with this?
[Vrapper](http://vrapper.sourceforge.net/home/):
> an Eclipse plugin which acts as a wrapper for Eclipse text editors to provide a Vim-like | [
0.5207763314247131,
0.24711991846561432,
0.13633495569229126,
-0.11038757860660553,
-0.3989913761615753,
-0.28650784492492676,
0.006083407439291477,
0.11137992888689041,
-0.08537277579307556,
-0.5953197479248047,
0.03261353448033333,
0.9169678092002869,
-0.10329842567443848,
0.161991640925... | |
input scheme for moving around and editing text.
>
>
> Unlike other plugins which embed Vim in Eclipse, Vrapper imitates the behaviour of Vim while still using whatever editor you have opened in the workbench. The goal is to have the comfort and ease which comes with the different modes, complex commands and count/operator/motion combinations which are the key features behind editing with Vim, while preserving the powerful features of the different Eclipse text editors, like code generation and refactoring... | [
0.3081018030643463,
-0.22127830982208252,
0.7763291597366333,
0.22431248426437378,
-0.37180399894714355,
-0.27460023760795593,
0.019901301711797714,
-0.30173563957214355,
0.044269926846027374,
-0.8526285886764526,
0.029956713318824768,
0.7862839102745056,
-0.2525627911090851,
-0.0948261544... | |
Using the same **sort** command with the same input produces different results on different machines. How do I fix that?
The [man-page](http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/sort.1.html) on OS X says:
> \*\*\*\*\*\*\* WARNING \*\*\*\*\*\*\* The locale specified by the environment affects sort order. Set LC\_ALL=C to get
> the traditional sort order that uses native byte values.
which might explain things.
If some of your systems have no locale support, they would default to that locale (C), so you wouldn't have to set it on those. If you have some that supports locales and want the same behavior, set `LC_ALL=C` on those systems. That would be the way to | [
-0.01737653650343418,
-0.08872970938682556,
0.08476261794567108,
-0.016377776861190796,
0.20475709438323975,
-0.15455453097820282,
0.3245854079723358,
0.05955345928668976,
-0.6595554351806641,
-0.7894411683082581,
-0.48891904950141907,
0.22331416606903076,
-0.6801749467849731,
0.1739815026... | |
have as many systems as I know do it the same way.
If you don't have any locale-less systems, just making sure they share locale would probably be enough.
For more canonical information, see The Single UNIX ® Specification, Version 2 description of [locale](http://opengroup.org/onlinepubs/007908799/xbd/locale.html), [environment variables](http://opengroup.org/onlinepubs/007908799/xbd/envvar.html), [setlocale()](http://opengroup.org/onlinepubs/007908799/xsh/setlocale.html) and the description of the [sort(1)](http://opengroup.org/onlinepubs/007908799/xcu/sort.html) utility. | [
0.3892808258533478,
-0.21462322771549225,
0.4177146255970001,
-0.023532085120677948,
0.055275507271289825,
-0.2135440707206726,
0.09400790184736252,
0.12586228549480438,
-0.34467360377311707,
-0.7484405636787415,
-0.34252166748046875,
0.36380475759506226,
-0.1886659562587738,
0.13232925534... | |
I have an SQL server database that I am querying and I only want to get the information when a specific row is null. I used a where statement such as:
```
WHERE database.foobar = NULL
```
and it does not return anything. However, I know that there is at least one result because I created an instance in the database where 'foobar' is equal to null. If I take out the where statement it shows data so I know it is not the rest of the query.
Can anyone help me out?
Correct syntax is WHERE database.foobar IS NULL. See <http://msdn.microsoft.com/en-us/library/ms188795.aspx> for more info | [
0.09405738860368729,
0.38782167434692383,
0.03928900137543678,
-0.06661251932382584,
-0.04385393485426903,
-0.15853258967399597,
0.313829630613327,
0.23488247394561768,
-0.2548222839832306,
-0.6626999974250793,
0.15928781032562256,
0.4063733220100403,
-0.20330442488193512,
0.46391674876213... | |
Here is the scenario:
I'm writing an app that will watch for any changes in a specific directory. This directory will be flooded with thousands of files a minute each with an "almost" unique GUID. The file format is this:
GUID.dat where GUID == xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(the internal contents aren't relevant, but it's just text data)
My app will be a form that has one single text box that shows all the files that are being added and deleted in real time. Every time a new file comes in I have to update the textbox with this file, BUT I must first make sure | [
0.21749264001846313,
-0.10274558514356613,
0.5665333271026611,
0.15021491050720215,
-0.09941579401493073,
0.1717478483915329,
0.09665936976671219,
0.04347638785839081,
-0.11522719264030457,
-0.8711473941802979,
0.09892144799232483,
0.7016518115997314,
-0.36728522181510925,
-0.0935407057404... | |
that this semi-unique GUID is really unique, if it is, update the textbox with this new file.
When a file is removed from that directory, make sure it exists, then delete it, update textbox accordingly.
The problem is that I've been using the .NET filewatcher and it seems that there is an internal buffer that gets blown up every time the (buffersize + 1)-th file comes in. I also tried to keep an internal List in my app, and just add every single file that comes in, but do the unique-GUID check later, but no dice.
A couple of things that I have | [
0.27601370215415955,
0.2830904424190521,
-0.0826759785413742,
0.14380262792110443,
0.0005328934639692307,
-0.23738457262516022,
0.20541517436504364,
0.3072468042373657,
-0.29688119888305664,
-0.5079317688941956,
0.23536214232444763,
0.5076244473457336,
-0.09084886312484741,
0.3065006732940... | |
in my head:
* If the guid is *not* unique, would it not overwrite the file with the same name, or is the check based on a lookup which does some external action (e.g. check the archive)? (i.e. is this a YAGNI moment?)
* I've used FileSystemWatcher before with pretty good success, can you give us some ideas as to *how* your actually doing things?
* When you say "no dice" when working with your custom list, what was the problem? And how were you checking for file system changes without FileSystemWatcher?!
Sorry no answer as yet, just would like to know more about | [
0.7652167081832886,
-0.03483668714761734,
-0.15867428481578827,
0.26626089215278625,
-0.35742083191871643,
-0.08019578456878662,
-0.036132123321294785,
0.11469056457281113,
-0.5257667303085327,
-0.6255490183830261,
0.4416048228740692,
0.5208091735839844,
0.09928758442401886,
0.111182026565... | |
the problem :) | [
-0.30849745869636536,
0.33746591210365295,
0.21622413396835327,
0.12445733696222305,
-0.038994792848825455,
0.17410926520824432,
0.14500530064105988,
-0.3625657260417938,
-0.22049134969711304,
-0.4277738034725189,
-0.22352862358093262,
0.4449726641178131,
-0.20497466623783112,
0.2516727149... | |
I have a medium sized application that runs as a .net web-service which I do not control,
and I want to create a loose pythonic API above it to enable easy scripting.
I wanted to know what is the best/most practical solution for using web-services in python.
Edit:
I need to consume a complex soap WS
and I have no control over it.
[Jython](http://www.jython.org) and [IronPython](http://www.codeplex.com/IronPython) give access to great Java & .NET SOAP libraries.
If you need CPython, [ZSI](http://pywebsvcs.sourceforge.net/) has been flaky for me, but it could be possible to use a tool like [Robin](http://robin.python-hosting.com/) to wrap a good C++ SOAP library such as [gSOAP](http://gsoap2.sourceforge.net/) or | [
0.4866314232349396,
0.3426191210746765,
-0.10671467334032059,
-0.11827810108661652,
-0.2002355307340622,
-0.006681008730083704,
0.27523353695869446,
-0.07583656907081604,
-0.2431083768606186,
-0.588600218296051,
0.10587513446807861,
0.48055189847946167,
-0.14504292607307434,
-0.12559263408... | |
[Apache Axis C++](http://ws.apache.org/axis/cpp/index.html) | [
0.16031186282634735,
-0.06702917069196701,
0.350904256105423,
0.115768201649189,
-0.3749085068702698,
-0.19775791466236115,
0.2655017077922821,
0.07357437908649445,
-0.21534757316112518,
0.20420654118061066,
-0.21257531642913818,
0.028901482000947,
-0.46609583497047424,
0.05660161375999451... | |
Sometimes I need to quickly extract some arbitrary data from XML files to put into a CSV format. What's your best practices for doing this in the Unix terminal? I would love some code examples, so for instance how can I get the following problem solved?
Example XML input:
```html
<root>
<myel name="Foo" />
<myel name="Bar" />
</root>
```
My desired CSV output:
```
Foo,
Bar,
```
If you just want the name attributes of any element, here is a quick but incomplete solution.
(Your example text is in the file *example*)
> grep "name" example | cut -d"\"" -f2,2
> | xargs -I{} echo "{}," | [
-0.06383606791496277,
0.39050182700157166,
0.4687846601009369,
-0.06319456547498703,
-0.024697935208678246,
-0.12305471301078796,
0.04739405959844589,
-0.12819837033748627,
-0.1729617565870285,
-0.6687683463096619,
-0.0729902982711792,
0.3910555839538574,
-0.13757462799549103,
-0.162912443... | |
When I try to use an **ssh** command in a shell script, the command just sits there. Do you have an example of how to use **ssh** in a shell script?
Depends on what you want to do, and how you use it. If you just want to execute a command remotely and safely on another machine, just use
```
ssh user@host command
```
for example
```
ssh user@host ls
```
In order to do this safely you need to either ask the user for the password during runtime, or set up keys on the remote host. | [
0.5619074106216431,
0.22186507284641266,
-0.0009425378520973027,
0.00864696130156517,
0.17593048512935638,
-0.2274738848209381,
0.3225177526473999,
0.26214414834976196,
-0.11325472593307495,
-1.073728084564209,
-0.13410599529743195,
0.8250012993812561,
-0.074948750436306,
-0.00979192741215... | |
I came across a printed [article by Bertrand Meyer](http://www.eiffel.com/general/column/2008/02.html) where he states that tests can be generated from specifications. My development team does nothing like this, but it sounds like a good technique to consider. How are you generating tests from specifications? How would you describe the success your having in discovering program faults via this method?
There are all sorts of ways to do it, ranging from what I'd consider an 'art form' (and not necessarily good art) all the way to mathematically derived tests from formal specifications. At the end of the day, your development team needs to decided | [
0.9149121642112732,
0.4112125039100647,
-0.4843238890171051,
0.4908080995082855,
-0.19915516674518585,
0.059033218771219254,
0.2600499093532562,
-0.4675324857234955,
0.08751927316188812,
-0.41769301891326904,
0.19638706743717194,
0.31987160444259644,
0.039119474589824677,
-0.02749780006706... | |
on what they can do based on the schedule they are working with. That being said, being able to test software against specs is a Good Thing.
Only your team can gauge the 'depth' of your tests, and that will probably be a function of how good your specs are. If they say something like, 'the login UI needs to provide a cancel button and a login button, and they need to work', your tests are going to be pretty general. But keep in mind - even very general tests are a Good Thing. Testing is a Good Thing. Too many | [
0.8089780211448669,
0.13602061569690704,
-0.017516188323497772,
0.2540088891983032,
0.12412433326244354,
-0.5330585837364197,
0.29741141200065613,
0.039168622344732285,
-0.06870986521244049,
-0.3779936134815216,
0.1264810562133789,
0.8098591566085815,
0.17456917464733124,
-0.13247688114643... | |
developers have a bad attitude when it comes to testing, but at the end of the day, you're shipping software which should work, and to me, that means a lot.
The effectiveness your tests will having in finding program faults will depend on the detail you put into them. What is especially nice about having test procedures written to specs is that you can test each build to the same level of detail as the previous build (typically referred to as a regression test). | [
0.8007546663284302,
0.4483586251735687,
-0.2931711673736572,
0.2947099208831787,
-0.10153330117464066,
-0.2037109136581421,
0.30772992968559265,
-0.1003539189696312,
0.06403803080320358,
-0.5979463458061218,
0.233361154794693,
1.0015603303909302,
0.16609877347946167,
-0.14842522144317627,
... | |
Can anyone suggest a good implementation of a generic collection class that implements the `IBindingListView` & `IBindingList` interfaces and provides Filtering and Searching capabilities?
I see my current options as:
* Using a class that someone else has written and tested
* Inheriting from `BindingList<T>`, and implementing the `IBindingListView` interfaces
* Write a custom collection from scratch, implementing `IBindingListView` and `IBindingList`.
Obviously, the first option is my preferred choice.
I used and built upon an implementation I found on and old MSDN forum post from a few years ago, but recently I searched around again and found a sourceforge project called [BindingListView](http://blw.sourceforge.net/). It looks | [
0.5062404870986938,
-0.17845472693443298,
0.001329978695139289,
-0.0349159836769104,
-0.2743014693260193,
-0.030649729073047638,
0.04740928113460541,
-0.24100570380687714,
-0.2640218138694763,
-0.8442445397377014,
0.09331338107585907,
0.49663659930229187,
-0.23434258997440338,
0.1101199835... | |
pretty nice, I just haven't pulled it in to replace my hacked version yet.
nuget package: `Equin.ApplicationFramework.BindingListView`
Example code:
```
var lst = new List<DemoClass>
{
new DemoClass { Prop1 = "a", Prop2 = "b", Prop3 = "c" },
new DemoClass { Prop1 = "a", Prop2 = "e", Prop3 = "f" },
new DemoClass { Prop1 = "b", Prop2 = "h", Prop3 = "i" },
new DemoClass { Prop1 = "b", Prop2 = "k", Prop3 = "l" }
};
dataGridView1.DataSource = new BindingListView<DemoClass>(lst);
// you can now sort by clicking the column headings
//
// to | [
-0.05462026596069336,
-0.605736255645752,
0.6261067390441895,
0.0517488569021225,
0.21037040650844574,
0.1832098662853241,
0.3556659519672394,
-0.17676150798797607,
-0.28443047404289246,
-0.8386579751968384,
-0.17185981571674347,
0.759636640548706,
-0.12159156799316406,
-0.4217421710491180... | |
filter the view...
var view = (BindingListView<DemoClass>)dataGridView1.DataSource;
view.ApplyFilter(dc => dc.Prop1 == "a");
``` | [
0.2481776922941208,
-0.6276389956474304,
0.6586807370185852,
-0.2583284378051758,
-0.12687663733959198,
-0.009717663750052452,
0.5071627497673035,
-0.49105679988861084,
-0.09496977180242538,
-0.8327251672744751,
-0.2895951569080353,
0.5057423710823059,
-0.7535674571990967,
0.01626996695995... | |
I am using StretchImage because the box is resizable with splitters. It looks like the default is some kind of smooth bilinear filtering, causing my image to be blurry and have moire patterns.
I needed this functionality also. I made a class that inherits PictureBox, overrides `OnPaint` and adds a property to allow the interpolation mode to be set:
```
using System.Drawing.Drawing2D;
using System.Windows.Forms;
/// <summary>
/// Inherits from PictureBox; adds Interpolation Mode Setting
/// </summary>
public class PictureBoxWithInterpolationMode : PictureBox
{
public InterpolationMode InterpolationMode { get; set; }
protected override void OnPaint(PaintEventArgs paintEventArgs)
{ | [
0.46027252078056335,
-0.4409258961677551,
0.5609657764434814,
-0.4091961979866028,
-0.016075273975729942,
0.033867962658405304,
0.3053341507911682,
-0.4524827003479004,
-0.008578628301620483,
-0.8543261289596558,
0.11547259241342545,
0.5102341175079346,
-0.45317745208740234,
0.029354052618... | |
paintEventArgs.Graphics.InterpolationMode = InterpolationMode;
base.OnPaint(paintEventArgs);
}
}
``` | [
0.10200653970241547,
-0.03786748647689819,
0.23480460047721863,
-0.42845281958580017,
0.040020037442445755,
0.37440064549446106,
0.38887324929237366,
-0.1996893286705017,
-0.10555543005466461,
-0.7025387287139893,
-0.01820436492562294,
0.6526353359222412,
-0.5243763327598572,
-0.0420332551... | |
I was testing on a customer's box this afternoon which has Windows Vista (He had home, but I am testing on a Business Edition with same results).
We make use of a .DLL that gets the Hardware ID of the computer. It's usage is very simple and the sample program I have created works. The Dll is [This from AzSdk](http://www.azsdk.com/hardwareid.html).
In fact, this works perfectly under Windows XP. However, for some strange reason, inside our project (way bigger), we get this exception:
```
Exception Type: System.DllNotFoundException
Exception Message: Unable to load DLL | [
0.25297465920448303,
0.12556692957878113,
0.40286821126937866,
0.08252924680709839,
0.18764477968215942,
-0.2962469458580017,
0.08700817823410034,
-0.15066564083099365,
-0.09360376745462418,
-0.7735421657562256,
-0.3024958670139313,
0.5966382026672363,
-0.2314896583557129,
0.18850171566009... | |
'HardwareID.dll': Invalid access to memory location. (Exception from HRESULT: 0x800703E6)
Exception Target Site: GetHardwareID
```
I don't know what can be causing the problem, since I have full control over the folder. The project is a c#.net Windows Forms application and everything works fine, except the call for the external library.
I am declaring it like this: (note: it's *not* a COM library and it doesn't need to be registered).
```
[DllImport("HardwareID.dll")]
public static extern String GetHardwareID(bool HDD,
bool NIC, bool CPU, bool BIOS, string sRegistrationCode);
```
And then the calling code is quite simple:
```
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = GetHardwareID(cb_HDD.Checked, | [
0.3311735987663269,
0.4218791127204895,
0.43582430481910706,
-0.21924391388893127,
0.12516260147094727,
-0.3277246952056885,
0.29208624362945557,
-0.2296029031276703,
-0.08620233088731766,
-0.6267380118370056,
-0.374367356300354,
0.6514157652854919,
-0.43533554673194885,
0.4233123064041137... | |
cb_NIC.Checked,
cb_CPU.Checked, | [
0.4650559723377228,
0.20339302718639374,
-0.08942391723394394,
0.24791856110095978,
0.08087582141160965,
-0.12595005333423615,
0.04678703844547272,
-0.09540847688913345,
-0.24800658226013184,
-0.5217097997665405,
0.008655223064124584,
0.5728663206100464,
-0.40214282274246216,
0.05429312586... | |
cb_BIOS.Checked,
"*Registration Code*");
}
```
When you create a sample application, it works, but inside my projectit doesn't. Under XP works fine. Any ideas about what should I do in Vista to make this work?
As I've said, the folder and its sub-folders have Full Control for "Everybody".
**UPDATE:** I do not have Vista SP 1 installed.
**UPDATE 2:** I have installed Vista SP1 and now, | [
0.8097662925720215,
0.4192766547203064,
0.18272966146469116,
-0.20375072956085205,
0.0006902985624037683,
-0.4344567656517029,
0.2968307435512543,
-0.3849562108516693,
-0.40291309356689453,
-0.5225319862365723,
0.0196757260710001,
0.8186489939689636,
-0.40390121936798096,
-0.21674397587776... | |
with UAC disabled, not even the simple sample works!!! :( Damn Vista.
@[Martín](https://stackoverflow.com/questions/29284/windows-vista-unable-to-load-dll-xdll-invalid-access-to-memory-location-dllnotf#29400)
The reason you were not getting the UAC prompt is because UAC can only change how a process is **started**, once the process is running it must stay at the same elevation level. The UAC will prompt will happen if:
* Vista thinks it's an installer ([lots of rules here](http://msdn.microsoft.com/en-us/library/aa905330.aspx#wvduac_topic3), the simplest one is if it's called "setup.exe"),
* If it's flagged as "Run as Administrator" (you can edit this by changing the properties of the shortcut or the exe), or
* If the exe contains a manifest requesting admin privileges.
The first | [
0.19040541350841522,
0.0517234206199646,
0.5203474760055542,
0.10313647240400314,
0.31422874331474304,
-0.3683139681816101,
0.278656929731369,
-0.023044144734740257,
-0.2347828596830368,
-0.664132833480835,
-0.4564707279205322,
0.5897685885429382,
-0.34857168793678284,
0.21209660172462463,... | |
two options are workarounds for 'legacy' applications that were around before UAC, the correct way to do it for new applications is to [embed a manifest resource](http://msdn.microsoft.com/en-us/library/bb756929.aspx) asking for the privileges that you need.
Some program, such as [Process Explorer](http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) appear to elevate a running process (when you choose "Show details for all process" in the file menu in this case) but what they really do is start a new instance, and it's that new instance that gets elevated - not the one that was originally running. This is the recommend way of doing it if only some parts of your | [
0.09594231843948364,
-0.3801371455192566,
0.20707792043685913,
0.14647464454174042,
0.18120843172073364,
-0.05782889947295189,
-0.12997393310070038,
-0.21305708587169647,
-0.38075459003448486,
-0.7065414786338806,
-0.12331320345401764,
0.5681580901145935,
-0.15285539627075195,
0.1948409080... | |
application need elevation (e.g. a special 'admin options' dialog). | [
-0.06114068254828453,
0.39170029759407043,
0.7721888422966003,
0.12290500104427338,
0.45556849241256714,
-0.10327815264463425,
0.13019733130931854,
-0.009622943587601185,
0.06928031146526337,
-0.8295314311981201,
-0.6918876767158508,
0.37923088669776917,
0.18785808980464935,
-0.31803360581... | |
I'm deploying to Ubuntu slice on slicehost, using Rails 2.1.0 (from `gem`)
If I try `mongrel_rails` start or script/server I get this error:
```
Rails requires RubyGems >= 0.9.4. Please install RubyGems
```
When I type `gem -v` I have version `1.2.0` installed. Any quick tips on what to look at to fix?
Just finally found [this answer](http://www.shorepound.net/wpblog/?p=65)... I was missing a gem, and thrown off by bad error message from Rails... | [
0.21715997159481049,
-0.07531336694955826,
0.2903234660625458,
-0.5084239840507507,
-0.05671074613928795,
-0.027201298624277115,
0.5665034055709839,
-0.05132581666111946,
-0.05069165304303169,
-0.8630504012107849,
-0.21178647875785828,
0.6008638739585876,
-0.3085106611251831,
0.06773780286... | |
I'm working on building a development tool that is written in JavaScript.
This will not be an open source project and will be sold (hopefully) as a commercial product.
I'm looking for the best way to protect my investment. Is using an obfuscator (code mangler) enough to reasonably secure the code?
Are there other alternatives that I am not aware of?
(I'm not sure if obfuscator is the right word, it's one of the apps that takes your code and makes it very unreadable.)
I'm going to tell you a secret. Once you understand it, you'll feel a lot better about the fact that Javascript | [
0.6960063576698303,
0.18639759719371796,
-0.11640527844429016,
0.18961936235427856,
0.30704519152641296,
-0.5888048410415649,
0.4534878432750702,
0.26928797364234924,
0.00717173470184207,
-0.4391309916973114,
0.05153093487024307,
0.5002485513687134,
-0.340410053730011,
-0.07764820754528046... | |
obfuscation is only really useful for saving bandwidth when sending scripts over the wire.
Your source-code is not worth stealing.
I know this comes as a shock to the ego, but I can say this confidently without ever having seen a line of code you've written because outside the very few realms of development where serious magic happens, it's true of all source-code.
Say, tomorrow, someone dumped a pile of DVDs on your doorstep containing the source code for Windows Vista. What would you be able to do with it? Sure, you could compile it and give away copies, but that's just one | [
0.8615321516990662,
0.35105738043785095,
0.10044697672128677,
0.25669777393341064,
0.10638751089572906,
-0.38478410243988037,
0.46204137802124023,
0.3515686094760895,
0.09276407212018967,
-0.12322017550468445,
0.279092937707901,
0.5528987646102905,
-0.32344114780426025,
0.2260517030954361,... | |
step more effort than copying the retail version. You could painstakingly find and remove the license-checking code, but that's something some bright kid has already done to the binaries. Replace the logo and graphics, pretend you wrote it yourself and market it as "Vicrosoft Mista"? You'll get caught.
You could spend an enormous amount of time reading the code, trying to understand it and truly "stealing the intellectual property" that Microsoft invested in developing the product. But you'd be disappointed. You'd find the code was a long series of mundane decisions, made one after the other. Some would be smarter than | [
0.6738134026527405,
-0.026201646775007248,
-0.036416687071323395,
0.5632078647613525,
0.0443909652531147,
-0.06218261644244194,
0.3673519790172577,
0.16055381298065186,
0.06444185972213745,
-0.09083045274019241,
0.060546088963747025,
0.4453321099281311,
-0.09074166417121887,
0.245268151164... | |
you could think of. Some would leave you shaking your head wondering what kind of monkeys they're hiring over there. Most would just make you shrug and say "yeah, that's how you do that."
In the process you'll learn a lot about writing operating systems, but that's not going to hurt Microsoft.
Replace "Vista" with "Leopard" and the above paragraphs don't change one bit. It's not Microsoft, it's *software*. Half the people on this site could probably develop a Stack Overflow clone, with or without looking at the source of this site. They just haven't. The source-code of Firefox and WebKit are | [
0.6016973853111267,
0.4183231592178345,
-0.17846325039863586,
0.10678954422473907,
-0.0019892908167093992,
-0.19923068583011627,
0.20959921181201935,
0.18535828590393066,
-0.5047800540924072,
-0.6048247814178467,
-0.07825835794210434,
0.590083658695221,
-0.3057531416416168,
-0.036898519843... | |
out there for anyone to read. Now go write your own browser from scratch. See you in a few years.
Software development is an investment of time. It's utter hubris to imagine that what you're doing is so special that nobody could clone it without looking at your source, or even that it would make their job that much easier without an actionable (and easily detectable) amount of cut and paste. | [
0.7274329662322998,
0.18058398365974426,
0.23122884333133698,
0.17468805611133575,
0.3608070909976959,
-0.32040783762931824,
0.042337726801633835,
0.7577290534973145,
-0.2439451962709427,
-0.7359204888343811,
0.08915217220783234,
0.27595260739326477,
0.3576792776584625,
-0.0951765030622482... | |
I have `ci`, so our staging environment builds itself.
Should I have a script that not only builds production but does all the branching for it as well?
When you have one code base on two different urls with skinning, should they be required to build at once?
The only way to be too automated is if you are spending more time fighting with building or fixing automation scripts than you would just doing the job manually. As long as your automation scripts take less time and produce fewer errors than doing the job manually, then automation is great.
Scripts | [
0.9357266426086426,
0.26063272356987,
-0.0922079011797905,
0.12731461226940155,
0.17640569806098938,
-0.001151785021647811,
-0.08592957258224487,
-0.014897279441356659,
-0.14132794737815857,
-0.6096018552780151,
0.2077832669019699,
0.47888559103012085,
-0.03531257063150406,
0.0587906539440... | |
to build and branch for production are a great idea! | [
1.0000083446502686,
0.09031874686479568,
-0.030026378110051155,
0.144624724984169,
0.4023800194263458,
0.20561201870441437,
0.1394052356481552,
0.5195072293281555,
-0.47326627373695374,
-0.2356172502040863,
0.11870211362838745,
0.047568902373313904,
0.19559693336486816,
0.19147655367851257... | |
I'm using the .NET CF 3.5. The type I want to create does not have a default constructor so I want to pass a string to an overloaded constructor. How do I do this?
Code:
```
Assembly a = Assembly.LoadFrom("my.dll");
Type t = a.GetType("type info here");
// All ok so far, assembly loads and I can get my type
string s = "Pass me to the constructor of Type t";
MyObj o = Activator.CreateInstance(t); // throws MissMethodException
```
```
MyObj o = null;
Assembly a = Assembly.LoadFrom("my.dll");
Type t = a.GetType("type info here");
ConstructorInfo ctor = t.GetConstructor(new Type[] { typeof(string) });
if(ctor != null)
o = ctor.Invoke(new object[] { s });
``` | [
0.2818913757801056,
0.15052945911884308,
0.5446618795394897,
-0.3792240619659424,
0.11878987401723862,
-0.12356627732515335,
0.5498185157775879,
-0.32113245129585266,
0.04099619388580322,
-0.7996343970298767,
-0.26499035954475403,
0.6100919246673584,
-0.5806624293327332,
0.2095569223165512... | |
I know I can programatically make the taskbar item for a particular window start flashing when something changes, but is there any way I can stop it from flashing either programatically after a certain period of time or at least is there a keyboard shortcur I can give to my users to somehow stop the flashing?
The [FlashWindowEx](http://msdn.microsoft.com/en-us/library/ms679347%28VS.85%29.aspx) function which controls the flashing takes a [FLASHWINFO](http://msdn.microsoft.com/en-us/library/ms679348%28VS.85%29.aspx) struct which has a uCount field to control how many times it flashes. Also, a possible value for the dwFlags field is FLASHW\_STOP to cause the flashing to stop.
EDIT: Forgot was a C# tagged question | [
0.05917883291840553,
-0.045991986989974976,
0.5045247077941895,
0.09897534549236298,
-0.018183179199695587,
-0.15973307192325592,
0.4750079810619354,
-0.12458919733762741,
-0.24025630950927734,
-0.46501919627189636,
-0.09590595960617065,
0.5012195110321045,
-0.2853001058101654,
0.026905752... | |
... so [P/Invoke goodness found here](http://www.pinvoke.net/default.aspx/user32.FlashWindowEx). | [
-0.06316114962100983,
0.04526225104928017,
0.4922206997871399,
-0.1652669459581375,
0.014798149466514587,
0.31940463185310364,
0.3411143124103546,
-0.26031526923179626,
-0.2991655766963959,
-0.37938225269317627,
-0.058478258550167084,
0.37980324029922485,
-0.20148776471614838,
-0.019817598... | |
How do I cast an `int` to an `enum` in C#?
From an int:
```
YourEnum foo = (YourEnum)yourInt;
```
From a string:
```
YourEnum foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString);
// The foo.ToString().Contains(",") check is necessary for
// enumerations marked with a [Flags] attribute.
if (!Enum.IsDefined(typeof(YourEnum), foo) && !foo.ToString().Contains(","))
{
throw new InvalidOperationException(
$"{yourString} is not an underlying value of the YourEnum enumeration."
);
}
```
From a number:
```
YourEnum foo = (YourEnum)Enum.ToObject(typeof(YourEnum), yourInt);
``` | [
0.09955595433712006,
0.28231990337371826,
0.3412207067012787,
-0.1917688250541687,
0.33275988698005676,
-0.13864415884017944,
0.3308705687522888,
-0.40652740001678467,
0.2155853658914566,
-0.12095928937196732,
-0.2198484092950821,
0.736186146736145,
-0.25306206941604614,
0.1053119897842407... | |
I'd like to write a script/batch that will bunch up my daily IIS logs and zip them up by month.
ex080801.log which is in the format of ex*yymmdd*.log
ex080801.log - ex080831.log gets zipped up and the log files deleted.
The reason we do this is because on a heavy site a log file for one day could be 500mb to 1gb so we zip them up which compresses them by 98% and dump the real log file. We use webtrend to analyze the log files and it is capable of reading into a zip file.
Does anyone have any ideas on how to script | [
0.35820361971855164,
0.10933919250965118,
0.1752425730228424,
-0.05524265393614769,
-0.22608141601085663,
-0.05181487277150154,
0.28676915168762207,
0.04041720926761627,
-0.3058834969997406,
-0.7605538368225098,
0.16075418889522552,
0.3995083272457123,
-0.050020404160022736,
-0.12843440473... | |
this or would be willing to share some code?
You'll need a command line tool to zip up the files. I recommend [7-Zip](http://www.7-zip.org/download.html) which is free and easy to use. The self-contained command line version (7za.exe) is the most portable choice.
Here's a two-line batch file that would zip the log files and delete them afterwards:
```
7za.exe a -tzip ex%1-logs.zip %2\ex%1*.log
del %2\ex%1*.log
```
The first parameter is the 4 digit year-and-month, and the second parameter is the path to the directory containing your logs. For example: `ziplogs.bat 0808 c:\logs`
It's possible to get more elaborate (i.e. searching the filenames to determine which months to archive). You | [
0.5277611613273621,
-0.10978072881698608,
0.24438033998012543,
0.024315252900123596,
0.3720718324184418,
-0.04510341212153435,
0.35439884662628174,
0.043199069797992706,
-0.33335983753204346,
-0.5246301293373108,
-0.28191491961479187,
0.5196665525436401,
0.0815475732088089,
-0.014064616523... | |
might want to check out the Windows [FINDSTR](http://technet.microsoft.com/en-us/library/bb490907.aspx) command for searching input text with regular expressions. | [
0.06980109214782715,
-0.14195074141025543,
0.04414048790931702,
0.389679878950119,
0.3125203847885132,
-0.23294727504253387,
0.22550071775913239,
0.5527864098548889,
-0.35245653986930847,
-0.550249457359314,
-0.2945535480976105,
0.5148566365242004,
0.2065654695034027,
-0.19144093990325928,... | |
If all you see is the ugly no-char boxes, what tools or strategies do you use to figure out what went wrong?
(The specific scenario I'm facing is no-char boxes within a <select> when it should be showing Japanese chars.)
Firstly, "ugly no-char boxes" might not be an encoding problem, they might just be a sign you don't have a font installed that can display the glyphs in the page.
Most character encoding problems happen when strings are being passed from one system to another. For webapps, this is usually between the browser and the application, between the application and the filesystem and | [
0.15658077597618103,
0.0009795520454645157,
0.11465159058570862,
0.14537553489208221,
-0.14932376146316528,
-0.051398858428001404,
0.3997657895088196,
0.21345974504947662,
-0.26761505007743835,
-0.8103618025779724,
-0.2280736267566681,
0.30972933769226074,
-0.2634332478046417,
0.2646786570... | |
between the application and the database.
So you need to check where the mis-encoded data is coming from, what character encoding it has at the source, and what encoding it is being received as. The best way is to send through characters you know the system is having problems with, and examine them at each level of the app. What do they look like inside the app? In the database? When you get them back from the database? When they're displayed in the browser?
Sorry to be so general, but the question doesn't give much more to work with. | [
0.23019646108150482,
0.006468651350587606,
0.2236417531967163,
0.3239799439907074,
0.09959903359413147,
0.2764909863471985,
0.08217431604862213,
0.10462748259305954,
-0.09044225513935089,
-0.7977412939071655,
-0.11798803508281708,
0.4314350187778473,
-0.1798459142446518,
-0.086885020136833... | |
Is there a one line function call that quits the program and displays a message? I know in Perl it's as simple as:
```
die("Message goes here")
```
I'm tired of typing this:
```
puts "Message goes here"
exit
```
The `abort` function does this. For example:
```
abort("Message goes here")
```
Note: the `abort` message will be written to `STDERR` as opposed to `puts` which will write to `STDOUT`. | [
0.04316869005560875,
0.02906661666929722,
0.04103761538863182,
-0.3494642376899719,
-0.1904057413339615,
-0.1302035003900528,
0.45231276750564575,
0.2983343005180359,
-0.13554829359054565,
-0.3041151463985443,
-0.18888357281684875,
0.49191364645957947,
-0.5115612745285034,
0.09488160163164... | |
I've read time and time again that TDD/test first is more difficult with MSTest than it is with other testing frameworks such as nUnit, MBUnit, etc... What are some suggested manual workarounds and/or 3rd party bits that you suggest when MSTest is the only option due to infrastructure policy? I'm mainly wondering about VS 2008 Team Suite, but I suppose tips for VS 2008 Pro on up would be suitable too since some MSTest functionality is now included with those versions as well.
MSTest is certainly not as efficient or extensible as some of the open source frameworks, but it is | [
0.05300862342119217,
-0.16642025113105774,
0.12706176936626434,
0.28670060634613037,
-0.29128363728523254,
-0.27076366543769836,
0.48296600580215454,
-0.1493506133556366,
0.2086246907711029,
-0.7260112762451172,
0.08096404373645782,
0.8339311480522156,
-0.21225036680698395,
-0.207340076565... | |
workable. Since the question asks about making life easier with MSTest and not about alternatives, here are my MSTest tips.
* **Shortcuts**. Like Haacked said, take a few seconds to learn the shortcuts.
* **Current Context**. Since MSTest is so slow, run tests only in the current context when you can. (**`CTRL`+`R`**, **`CTRL`+`T`**). If your cursor is in a test method, this will only run the method. If your cursor is outside a method, but in a test class, this will only run the test. And with namespace, etc etc
* **Efficient tests and organization**. It's dog slow. Make things as best as | [
-0.12478644400835037,
0.038630276918411255,
0.2381712943315506,
0.2520325183868408,
0.15980271995067596,
-0.13253915309906006,
0.6276696920394897,
-0.17635764181613922,
0.07314271479845047,
-0.9310258626937866,
-0.10043271631002426,
0.7137380838394165,
-0.1291397213935852,
-0.6363439559936... | |
you can by writing efficient tests. Move slow tests to other test classes or projects so you can run the fast tests more frequently.
* **Testing with WCF**. If you're testing services, be sure to DEBUG tests rather than RUN tests so Visual Studio can fire up the ASP.NET development web servers. After these are up, then you can go back to RUN, but it can be easier to just always DEBUG so you don't have to think about it.
* **Config Files**. Edit your test-run configuration to move .config files into the test execution folder.
* **Integration with Source Safe**. You need | [
0.6561750769615173,
-0.12614493072032928,
-0.10462944954633713,
0.31671765446662903,
-0.17933988571166992,
-0.2597978115081787,
0.33727043867111206,
-0.09442667663097382,
-0.1986861675977707,
-0.9928218126296997,
-0.014059578999876976,
0.7846108675003052,
0.003511923598125577,
-0.210835874... | |
to be aware that MSTest hates SourceSafe and the feeling is mutual. Because MSTest wants to put test files under source control, and add them to the solution, it must check out the solution every time you run tests. So SourceSafe must be running in multi-check-out mode to avoid killing your fellow developers.
* **Ignore the fluff** With MSTest, you get a dozen different windows and views. Test Runs, Test View, Test Lists ... they're all less-than-helpful. Stick with Test Results and you'll be much happier.
* **Stick with "Unit Tests"**. When you add a new test, you can add an ordered | [
0.48949840664863586,
0.13683898746967316,
0.16892719268798828,
0.2953792214393616,
-0.03796395659446716,
-0.03805221617221832,
0.5387751460075378,
0.028831571340560913,
-0.23358158767223358,
-0.8101568818092346,
0.03848772123456001,
0.6351163983345032,
-0.33833518624305725,
0.0848531424999... | |
test, a unit test, or run through a wizard. Stick with just plain simple unit tests. | [
0.5758399963378906,
-0.027159854769706726,
-0.5193682909011841,
0.4200372099876404,
-0.5022099018096924,
-0.15178775787353516,
0.3133787512779236,
-0.26949676871299744,
0.051667481660842896,
-0.454059362411499,
-0.1925368309020996,
0.3136310279369354,
0.12947547435760498,
0.120781220495700... | |
I wrote a quick program in python to add a gtk GUI to a cli program. I was wondering how I can create an installer using distutils. Since it's just a GUI frontend for a command line app it only works in \*nix anyway so I'm not worried about it being cross platform.
my main goal is to create a .deb package for debian/ubuntu users, but I don't understand make/configure files. I've primarily been a web developer up until now.
**edit**: Does anyone know of a project that uses distutils so I could see it in action and, you know, actually try | [
0.6330716609954834,
0.17818135023117065,
-0.23401637375354767,
-0.016371168196201324,
-0.20167753100395203,
-0.318308562040329,
0.18545189499855042,
0.32799670100212097,
-0.060856908559799194,
-0.6606670618057251,
0.0025295806117355824,
0.6057587265968323,
-0.5335525870323181,
0.0836675688... | |
building it?
Here are a few useful links
---------------------------
* [Ubuntu Python Packaging Guide](https://wiki.ubuntu.com/PackagingGuide/Python)
This Guide is ***very*** helpful. I don't know how I missed it during my initial wave of gooling. It even walks you through packaging up an existing python application
* [The Ubuntu MOTU Project](https://wiki.ubuntu.com/MOTU/GettingStarted)
This is the official package maintaining project at ubuntu. Anyone can join, and there are lots of tutorials and info about creating packages, of all types, which include the above 'python packaging guide'.
* ["Python distutils to deb?" - Ars Technica Forum discussion](http://episteme.arstechnica.com/eve/forums/a/tpc/f/96509133/m/808004952931)
According to this conversation, you can't just use distutils. It doesn't follow the debian packaging format (or | [
0.9658035039901733,
0.33249595761299133,
-0.18401360511779785,
-0.06952280551195145,
-0.1265994906425476,
-0.22168505191802979,
0.022815480828285217,
0.05382051691412926,
-0.20289936661720276,
-0.43487218022346497,
-0.029611913487315178,
0.4683839678764343,
0.02761715278029442,
0.294566571... | |
something like that). I guess that's why you need dh\_make as seen in the Ubuntu Packaging guide
* ["A bdist\_deb command for distutils](http://osdir.com/ml/linux.debian.devel.python/2004-10/msg00013.html)
This one has some interesting discussion (it's also how I found the ubuntu guide) about concatenating a zip-file and a shell script to create some kind of universal executable (anything with python and bash that is). weird. Let me know if anyone finds more info on this practice because I've never heard of it.
* [Description of the deb format and how distutils fit in - python mailing list](http://mail.python.org/pipermail/distutils-sig/2000-May/001000.html)
See the [distutils simple example](http://docs.python.org/dist/simple-example.html). That's basically what it is like, except | [
0.5982663631439209,
-0.025765422731637955,
0.09336475282907486,
-0.09987654536962509,
-0.3936218321323395,
-0.33245399594306946,
0.16174687445163727,
0.2026439756155014,
-0.38993263244628906,
-0.4906163513660431,
-0.08502981811761856,
0.579616129398346,
-0.39223575592041016,
0.231953516602... | |
real install scripts usually contain a bit more information. I have not seen any that are fundamentally more complicated, though. In essence, you just give it a list of what needs to be installed. Sometimes you need to give it some mapping dicts since the source and installed trees might not be the same.
Here is a real-life (anonymized) example:
```
#!/usr/bin/python
from distutils.core import setup
setup (name = 'Initech Package 3',
description = "Services and libraries ABC, DEF",
author = "That Guy, | [
0.6825252175331116,
0.010410425253212452,
-0.1656864434480667,
-0.07512406259775162,
0.044115494936704636,
-0.281554251909256,
0.2637866735458374,
0.0338001474738121,
-0.0046962108463048935,
-0.5874037146568298,
-0.3491644859313965,
0.8280056715011597,
-0.3870796263217926,
-0.3923094868659... | |
Initech Ltd",
author_email = "that.guy@initech.com",
version = '1.0.5',
package_dir = {'Package3' : 'site-packages/Package3'},
packages = ['Package3', 'Package3.Queries'],
data_files = [
('/etc/Package3', ['etc/Package3/ExternalResources.conf']) | [
-0.02845885418355465,
0.08559666574001312,
0.1276005655527115,
-0.372258722782135,
-0.3763664662837982,
0.019856443628668785,
0.17319922149181366,
0.20906783640384674,
0.04619576781988144,
-0.24960660934448242,
-0.3913275897502899,
0.13253653049468994,
-0.4957582652568817,
-0.1680902242660... | |
])
``` | [
0.3585624396800995,
0.49301818013191223,
0.3274824917316437,
-0.20303578674793243,
0.14683817327022552,
-0.11048932373523712,
0.4696173667907715,
-0.2268766313791275,
-0.03916496783494949,
-0.38116341829299927,
-0.09551602602005005,
0.6603010892868042,
-0.3164790868759155,
0.26854825019836... | |
I have a few lines of PowerShell code that I would like to use as an automated script. The way I would like it to be able to work is to be able to call it using one of the following options:
1. One command line that opens PowerShell, executes script and closes PowerShell (this would be used for a global build-routine)
2. A file that I can double-click to run the above (I would use this method when manually testing components of my build process)
I have been going through PowerShell documentation online, and although I can find lots of scripts, I | [
0.3934061527252197,
0.21469669044017792,
0.03551601245999336,
0.13413205742835999,
0.11725643277168274,
-0.3446832001209259,
0.24776515364646912,
0.05112815648317337,
0.10784055292606354,
-0.7390241622924805,
-0.029464751482009888,
0.723861038684845,
-0.14596141874790192,
-0.07349022477865... | |
have been unable to find instructions on how to do what I need. Thanks for the help.
Save your script as a .ps1 file and launch it using powershell.exe, like this:
```
powershell.exe .\foo.ps1
```
Make sure you specify the full path to the script, and make sure you have set your execution policy level to at least "RemoteSigned" so that unsigned local scripts can be run. | [
0.46800461411476135,
-0.07333659380674362,
0.23590615391731262,
0.08128038048744202,
0.21813954412937164,
-0.4962899386882782,
0.5590304732322693,
0.39137333631515503,
-0.11233942955732346,
-0.9954878091812134,
-0.4555707275867462,
0.5511379837989807,
-0.23112629354000092,
0.07864138484001... | |
I need to specifically catch SQL server timeout exceptions so that they can be handled differently. I know I could catch the SqlException and then check if the message string Contains "Timeout" but was wondering if there is a better way to do it?
```
try
{
//some code
}
catch (SqlException ex)
{
if (ex.Message.Contains("Timeout"))
{
//handle timeout
}
else
{
throw;
}
}
```
To check for a timeout, I | [
0.1025887057185173,
0.11825022101402283,
0.06950121372938156,
-0.13852696120738983,
0.1758546233177185,
-0.2602604329586029,
0.38851773738861084,
-0.22303852438926697,
-0.15287663042545319,
-0.504545271396637,
0.007564176805317402,
0.375306636095047,
-0.3482913076877594,
0.1549212634563446... | |
believe you check the value of ex.Number. If it is -2, then you have a timeout situation.
-2 is the error code for timeout, returned from DBNETLIB, the MDAC driver for SQL Server. This can be seen by downloading [Reflector](http://www.red-gate.com/products/reflector/), and looking under System.Data.SqlClient.TdsEnums for TIMEOUT\_EXPIRED.
Your code would read:
```
if (ex.Number == -2)
{
//handle timeout
}
```
Code to demonstrate failure:
```
try
{
SqlConnection sql = new SqlConnection(@"Network Library=DBMSSOCN;Data Source=YourServer,1433;Initial Catalog=YourDB;Integrated Security=SSPI;");
sql.Open();
SqlCommand cmd = sql.CreateCommand();
cmd.CommandText = "DECLARE @i int WHILE EXISTS (SELECT 1 from sysobjects) BEGIN SELECT | [
0.6295185089111328,
0.16661374270915985,
0.5259053707122803,
0.06985551863908768,
0.04569179192185402,
-0.29785826802253723,
0.5671790838241577,
-0.44828879833221436,
-0.04840745031833649,
-0.24086114764213562,
0.1323002725839615,
0.665315568447113,
-0.2506425976753235,
0.34165310859680176... | |
@i = 1 END";
cmd.ExecuteNonQuery(); // This line will timeout.
cmd.Dispose();
sql.Close();
}
catch (SqlException ex)
{
if (ex.Number == -2) {
Console.WriteLine ("Timeout occurred");
}
}
``` | [
0.1457115262746811,
-0.14460663497447968,
0.7305171489715576,
-0.29158106446266174,
0.34727582335472107,
-0.046153441071510315,
0.5049375891685486,
-0.31842291355133057,
0.11231749504804611,
-0.3229691982269287,
0.010057592764496803,
0.28013888001441956,
-0.20777006447315216,
0.47341597080... | |
I'll have an ASP.net page that creates some Excel Sheets and sends them to the user. The problem is, sometimes I get Http timeouts, presumably because the Request runs longer than executionTimeout (110 seconds per default).
I just wonder what my options are to prevent this, without wanting to generally increase the executionTimeout in `web.config`?
In PHP, [`set_time_limit`](http://fr.php.net/manual/en/function.set-time-limit.php) exists which can be used in a function to extend its life, but I did not see anything like that in C#/ASP.net?
How do you handle long-running functions in ASP.net?
If you want to increase the execution timeout for this one request you can set
```
HttpContext.Current.Server.ScriptTimeout
```
But you | [
0.3163999617099762,
-0.15288399159908295,
0.5030632615089417,
0.05976524204015732,
-0.1585242748260498,
-0.14299984276294708,
0.27575182914733887,
-0.16760358214378357,
-0.22641266882419586,
-0.8424803018569946,
0.08943529427051544,
0.5971735715866089,
-0.03685811161994934,
-0.186735719442... | |
still may have the problem of the client timing out which you can't reliably solve directly from the server. To get around that you could implement a "processing" page (like Rob suggests) that posts back until the response is ready. Or you might want to look into AJAX to do something similar. | [
0.39645829796791077,
-0.2089797556400299,
0.045992620289325714,
0.17857570946216583,
-0.20349431037902832,
-0.004581707064062357,
0.17890365421772003,
0.18951493501663208,
-0.44472938776016235,
-0.3881027102470398,
0.2435496598482132,
0.3774164617061615,
0.021131625398993492,
-0.2889135181... | |
I have a large codebase without Javadoc, and I want to run a program to write a skeleton with the basic Javadoc information (e.g., for each method's parameter write @param...), so I just have to fill the gaps left.
Anyone know a good solution for this?
**Edit:**
JAutodoc is what I was looking for. It has Ant tasks, an Eclipse plugin, and uses Velocity for the template definition.
The [JAutodoc](http://jautodoc.sourceforge.net/) plugin for eclipse does exactly what you need, but with a package granularity :
right click on a package, select "Add javadoc for members..." and the skeleton will be added.
There are numerous interesting options | [
0.2704007029533386,
0.00941147468984127,
-0.2022833377122879,
-0.022124825045466423,
-0.2665550112724304,
-0.15926873683929443,
0.3364371359348297,
-0.04770732671022415,
-0.2686338722705841,
-0.6853626370429993,
0.08498415350914001,
0.37150847911834717,
-0.35728317499160767,
-0.26611271500... | |
: templates for javadoc, adding a TODO in the header of every file saying : "template javadoc, must be filled...", etc. | [
0.5304880738258362,
-0.13354745507240295,
-0.21492351591587067,
-0.06449894607067108,
0.09666898846626282,
-0.5271149277687073,
0.15114638209342957,
-0.21427778899669647,
-0.10221706330776215,
-0.3441346287727356,
-0.3617227375507355,
0.1893610954284668,
-0.6521409153938293,
-0.11165728420... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.