text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
also has a shared drive of the same share name which the developers have mapped to S:. This allows them to get the latest working build should they need it. All this is so someone can get on a new PC, and open a project without having to copy references to varying locations, and ensuring that dev a is referencing the ...
[ 0.6118183135986328, 0.27550292015075684, 0.4710475206375122, 0.3480360805988312, -0.02592322789132595, -0.2610456347465515, 0.07492935657501221, -0.1470860093832016, -0.19606465101242065, -0.5728437900543213, 0.17596937716007233, 0.310153603553772, 0.11457087844610214, 0.015113245695829391...
network share. I think you can get away with creating a virtual drive letter for a local folder using the windows subst command for example... ``` subst R: "C:\.Net %VERSION%\Project\%SOMETHING%" ``` The advantage here is that an arbitrary path can be routed to a standard well defined path for assemblies hence for e...
[ 0.4643130600452423, -0.17391200363636017, 0.06092355400323868, 0.08297912776470184, -0.2607758045196533, -0.39461585879325867, 0.09978995472192764, 0.3779347836971283, -0.2989867925643921, -1.005235195159912, 0.2320675104856491, 0.6167920231819153, -0.36113888025283813, 0.3393172025680542,...
According to [this article](http://msdn.microsoft.com/en-us/magazine/cc163610.aspx) rebasing is not necessary for .NET assemblies due to JIT compilation of the code. The article states: *"JIT-compiled code does not have a rebasing problem since the addresses are generated at run time based on where the code is placed...
[ -0.08910214155912399, 0.33638250827789307, 0.07094158232212067, -0.1324562430381775, -0.15150924026966095, -0.09035125374794006, 0.6400924324989319, -0.09625325351953506, -0.2424173504114151, -0.5494855642318726, -0.2614615261554718, -0.08420079201459885, -0.22631876170635223, 0.2970278561...
I do a `listdlls /r` for my process all my .NET assemblies are in fact rebased per default. If I assign addresses myself, no rebasing is done. My question is: What is rebased in this case and why? EDIT: I should add that I am not talking about NGen'ed assemblies. CLR Loading mechanism uses LoadLibrary behind the sce...
[ 0.5250060558319092, 0.14995631575584412, 0.25032734870910645, -0.14746932685375214, -0.20307908952236176, -0.33614465594291687, 0.4096929132938385, -0.16164222359657288, -0.37838682532310486, -0.5367497801780701, -0.17289192974567413, 0.5923426151275635, -0.5143640041351318, 0.305891215801...
the loaded base-address. CLR does not have this problem (not sure about static data in the application, which is the second part of those fix-ups, I would need to read up on this), because MSIL code is loaded on-demand when you call a function in the managed code. The MSIL then gets jitted and placed on the heap, a dif...
[ -0.3705817759037018, -0.0005011223838664591, 0.7146902084350586, 0.23090505599975586, -0.05651019513607025, -0.20765648782253265, -0.036447007209062576, 0.07990934699773788, -0.2545441687107086, -0.24333536624908447, -0.42149221897125244, 0.39746806025505066, -0.28940707445144653, 0.147948...
**Questions**: * What does the kernel do if you stick a shell-script into the shebang line? * How does the Kernel know which interpreter to launch? **Explanation**: I recently wanted to write a wrapper around */usr/bin/env* because my CGI Environment does not allow me to set the *PATH* variable, except globally (whi...
[ 0.1223372146487236, -0.25119858980178833, 0.19681736826896667, 0.08554963767528534, -0.0073041836731135845, -0.024329252541065216, 0.3741578459739685, -0.1040344387292862, -0.14553050696849823, -0.7550908923149109, -0.06697455793619156, 0.7865445613861084, -0.14146184921264648, -0.14132377...
so good. But look what happens to "Hello World!". ``` # Shebang is #!/usr/bin/env python $ test-env.py Hello World! # Shebang is #!/usr/bin/env.1 python $ test-env.1.py Warning: unknown mime-type for "Hello World!" -- using "application/*" Error: no such file "Hello World!" ``` I guess I am missing something pretty...
[ 0.10832654684782028, 0.42190080881118774, -0.0057661933824419975, -0.16755780577659607, 0.14659440517425537, -0.3520497977733612, 0.3215557038784027, 0.44101682305336, -0.30893534421920776, -0.06567160785198212, -0.12822937965393066, 0.7140270471572876, -0.013531149365007877, 0.28038886189...
of why. Second - the `env` command has two main uses. One is to print the current environment; the other is to completely control the environment of a command when it is run. The third use, which you are demonstrating, is to modify the environment, but frankly there's no need for that - the shells are quite capable of...
[ 0.3227435052394867, -0.13053804636001587, 0.2916364073753357, -0.13824638724327087, 0.07016506046056747, -0.29338759183883667, 0.1567649096250534, -0.30662068724632263, -0.039062947034835815, -0.5540076494216919, -0.15619704127311707, 0.914422333240509, -0.4593368470668793, -0.025851473212...
can do that fine with regular (civilized) shells. (That means "not C shell" - again, there are other questions on SO with answers that explain that.) For example, you could perfectly well do: ``` #!/bin/bash export PATH=${PREPENDPATH:?}:$PATH exec python "$@" ``` This insists that `$PREPENDPATH` is set to a non-empt...
[ 0.20493724942207336, -0.024742668494582176, 0.22380343079566956, -0.18690438568592072, -0.01572483777999878, -0.47741180658340454, 0.3529568612575531, -0.2617036700248718, 0.023703977465629578, -0.40831053256988525, -0.16831880807876587, 1.0971002578735352, -0.47439873218536377, -0.0472273...
the `python` found on the pre-existing PATH, albeit with the new value of PATH in the process's environment. So, in the example, you'd end up executing Python from `/usr/bin` and not the one from `/home/pi/prepend/bin`. In your situation, I would probably not use `env` and would just use an appropriate variant of the ...
[ 0.20185530185699463, -0.1924043595790863, 0.12905751168727875, -0.26959556341171265, -0.221287801861763, -0.026420902460813522, 0.3454822897911072, -0.16089141368865967, -0.23360241949558258, -0.36193546652793884, -0.2577832341194153, 0.7363356947898865, -0.28681012988090515, -0.1003450602...
should come before or after the double dash. I actually have a series of scripts for running (different versions of) a database server. These scripts really use `env` (and a bunch of home-grown programs) to control the environment of the server: ``` #!/bin/ksh # # @(#)$Id: boot.black_19.sh,v 1.3 2008/06/25 15:44:44 j...
[ 0.18069986999034882, -0.037330228835344315, 0.4824325740337372, -0.04690530523657799, 0.09906879812479019, -0.06288836896419525, 0.6613197326660156, -0.24450775980949402, 0.073677659034729, -0.926006555557251, -0.24997639656066895, 0.5298125743865967, -0.5551750063896179, 0.030806364491581...
mkdir -p $tmpdir fi # Specialized programs carried to extremes: # * asroot sets UID and GID values and then executes # * env, which sets the environment precisely and then executes # * daemonize, which makes the process into a daemon and then executes # * oninit, which is what we really wanted to run in the fi...
[ 0.09480948746204376, -0.3672551214694977, 0.4014410972595215, 0.07652460038661957, -0.006207509897649288, 0.09797964990139008, 0.23617027699947357, -0.30017995834350586, -0.17733629047870636, -0.716010570526123, -0.09869924187660217, 0.3485206663608551, -0.5581745505332947, 0.0144645581021...
its # controlling terminal and therefore causes cron-jobs that restart # it to hang, and interactive shells that started it to hang, and # tracing programs. # ??? Anyone want to integrate truss into this sequence? asroot -u informix -g informix -C -a dbaao -a dbsso -- \ env -i HOME=$IXD \ INFOR...
[ -0.19026489555835724, -0.11734772473573685, 0.7585465312004089, 0.28375327587127686, 0.14001478254795074, -0.0025576672051101923, 0.040546201169490814, 0.10547681152820587, -0.30440059304237366, -0.7411420345306396, 0.10519305616617203, 0.1580674797296524, -0.6739514470100403, 0.2084382921...
ONCONFIG=onconfig.$IXS \ PATH=/usr/bin:$IXD/bin \ SHELL=/usr/bin/ksh \ TZ=UTC0 \ $DAEMONIZE -act -d $IXD -o $stdout -e $stderr -- \ $ONINIT "$@" case "$*" in (*v*) track-oninit-v $stdout;; esac ```
[ -0.09937337785959244, -0.154495507478714, 0.5097665786743164, 0.10354768484830856, 0.3781087398529053, 0.2911132872104645, 0.47066399455070496, -0.03560960665345192, -0.30395975708961487, -0.6107763051986694, -0.34530115127563477, 0.679388165473938, -0.5153532028198242, 0.11051658540964127...
How can I extend a builtin class in python? I would like to add a method to the str class. I've done some searching but all I'm finding is older posts, I'm hoping someone knows of something newer. Just subclass the type ``` >>> class X(str): ... def my_method(self): ... return int(self) ... >>> s = X("H...
[ -0.08047162741422653, 0.21118007600307465, 0.6041195392608643, -0.09487824141979218, 0.05578235536813736, 0.08135542273521423, 0.3039426803588867, -0.14507021009922028, -0.10644138604402542, -0.4894919991493225, -0.07476785033941269, 0.20195065438747406, -0.0764533132314682, 0.395735293626...
I'd like to create an XPS document for storing and printing. What is the easiest way to create an XPS document (for example with a simple grid with some data inside) in my program, and to pass it around? Nothing easy about it. But it can be done. I've got some (sadly, still buggy) sample code and information on my blo...
[ 0.6221892833709717, 0.3078775405883789, 0.21346698701381683, 0.3367854058742523, 0.04308820515871048, -0.22288216650485992, -0.020322535187005997, -0.0711488351225853, -0.12967844307422638, -0.6919220685958862, 0.21695135533809662, 0.5501536130905151, -0.09219268709421158, -0.1232196986675...
can skip that part and just return the document: ``` public static byte[] ToXpsDocument(IEnumerable<FixedPage> pages) { // XPS DOCUMENTS MUST BE CREATED ON STA THREADS!!! // Note, this is test code, so I don't care about disposing my memory streams // You'll have to pay more attention to their lifespan. Y...
[ 0.37571877241134644, 0.2590859830379486, 0.5187376141548157, 0.09298251569271088, 0.09575935453176498, -0.4054139256477356, 0.2862517237663269, -0.18010486662387848, -0.232753723859787, -0.42275500297546387, -0.5524359941482544, 0.5995757579803467, -0.2652340233325958, 0.10396955162286758,...
Thread t = new Thread(new ThreadStart(() => { // A memory stream backs our document MemoryStream ms = new MemoryStream(2048); // a package contains all parts of the document Package p = Package.Open(ms, FileMode.Create, FileAccess.ReadWrite); // the package store manages pack...
[ 0.06377717107534409, -0.10171966254711151, 0.810027003288269, -0.2811376452445984, 0.15842461585998535, -0.07171469926834106, 0.17530713975429535, -0.22352120280265808, -0.16898153722286224, -0.6634933948516846, -0.3652735948562622, 0.21063180267810822, -0.40231794118881226, 0.440227717161...
PackageStore.AddPackage(u, p); // the document uses our package for storage XpsDocument doc = new XpsDocument(p, CompressionOption.NotCompressed, u.AbsoluteUri); // An xps document is one or more FixedDocuments containing FixedPages FixedDocument fDoc = new FixedDocument(); PageC...
[ 0.1235336884856224, -0.05460767075419426, 0.8874155282974243, 0.027053816244006157, 0.07306771725416183, 0.1599966287612915, -0.15147827565670013, -0.18576954305171967, -0.21927602589130402, -0.41554054617881775, -0.6063007116317749, 0.6581737995147705, -0.3419138491153717, -0.121131919324...
// this part of the framework is weak and hopefully will be fixed in 4.0 pc = new PageContent(); ((IAddChild)pc).AddChild(fp); fDoc.Pages.Add(pc); } // we use the writer to write the fixed document to the xps document XpsDocumentWriter writer;
[ 0.196628138422966, 0.025398582220077515, 0.7939807772636414, -0.09164555370807648, 0.09284068644046783, -0.10500942170619965, 0.20629598200321198, -0.24292275309562683, 0.18057513236999512, -0.6922146677970886, -0.17742426693439484, 0.6020793318748474, -0.3759261965751648, -0.0688631013035...
writer = XpsDocument.CreateXpsDocumentWriter(doc); // The paginator controls page breaks during the writing process // its important since xps document content does not flow writer.Write(fDoc.DocumentPaginator); // p.Flush(); // this part serializes the doc to a stream...
[ 0.010167095810174942, 0.01703479140996933, 0.7291532754898071, -0.16178308427333832, 0.23374433815479279, 0.061818402260541916, 0.1156415194272995, -0.22370943427085876, -0.11631498485803604, -0.6002804636955261, -0.21954455971717834, 0.5114085078239441, -0.27695465087890625, -0.1487875878...
var writer = new XpsSerializerFactory().CreateSerializerWriter(ms); writer.Write(doc.GetFixedDocumentSequence()); retval = ms.ToArray(); })); // Instantiating WPF controls on a MTA thread throws exceptions t.SetApartmentState(ApartmentState.STA); // adjust as needed t.Priority = Thr...
[ 0.2142813354730606, -0.3595300018787384, 0.9481543898582458, -0.07629159092903137, 0.38654616475105286, 0.22201143205165863, 0.9059865474700928, -0.6439998149871826, -0.2212998867034912, -0.5466029644012451, -0.18995536863803864, 0.4172235429286957, -0.10926585644483566, 0.1895144581794738...
Thread.Sleep(1); //Ditch the thread if(t.IsAlive) t.Abort(); // If we time out, we return null. return retval; } ``` Note the crappy threading code. You can't do this on MTA threads; if you are on an STA thread you can get rid of that as well.
[ 0.482616126537323, -0.07115157693624496, 0.14211823046207428, -0.1703842580318451, 0.3043361008167267, -0.4286768138408661, 0.6354402899742126, 0.007759284693747759, -0.13811278343200684, -0.6664937138557434, -0.2462102472782135, 0.6011655330657959, -0.4831436574459076, 0.33913594484329224...
This is a bit of a long question, but here we go. There is a version of FormatDateTime that is said to be thread safe in that you use ``` GetLocaleFormatSettings(3081, FormatSettings); ``` to get a value and then you can use it like so; ``` FormatDateTime('yyyy', 0, FormatSettings); ``` Now imagine two timers...
[ 0.2843370735645294, -0.2261408120393753, 0.7645272612571716, -0.01763339154422283, -0.024815240874886513, -0.05579666793346405, -0.10197913646697998, -0.18036115169525146, -0.22066684067249298, -0.6904315948486328, 0.1696392446756363, 0.70998615026474, -0.09582830220460892, 0.1003312692046...
have the following code; ``` for i := 1 to 10000 do begin FormatDateTime('yyyy', 0, FormatSettings); end; ``` Note there is no assignment. This produces access violations almost immediatley, sometimes 20 minutes later, whatever, at random places. Now if you write that code in C++Builder it never crashes. The heade...
[ 0.409318745136261, 0.1392502337694168, 0.33194443583488464, -0.015670867636799812, -0.18827515840530396, -0.2942022383213043, 0.3356904685497284, -0.43714919686317444, -0.1355486512184143, -0.7374616861343384, -0.13723379373550415, 0.8219242691993713, -0.16300734877586365, 0.08375631272792...
FormatDatTime looks to be re-entrant. Any ideas or thoughts from anyone who may have seen this before. **UPDATE:** To narrow this down a bit, FormatSettings is passed in as a const, so does it matter if they use the same copy (as it turns out passing a local version within the function call yeilds the same problem)? ...
[ 0.4977080523967743, -0.15566106140613556, 0.8430449366569519, 0.07923619449138641, -0.30796152353286743, -0.5433068871498108, 0.16476520895957947, 0.23418331146240234, -0.2657497823238373, -0.6800791621208191, -0.05757652223110199, 0.41790440678596497, 0.027561120688915253, 0.2997954785823...
is being accessed, so no locking is required. WT\_EXECUTEINTIMERTHREAD is used to simplify the problem. I was under the impression you should only use it for very short tasks because it may mean it'll miss the next interval if it is running something long? If you use a plain old TThread the problem doesn't occur. Wha...
[ 0.01828574761748314, 0.027269670739769936, 0.2781384587287903, -0.0004961289232596755, 0.07883008569478989, -0.4274473190307617, 0.34464147686958313, -0.012610320933163166, -0.16981962323188782, -0.7183277010917664, -0.007479796651750803, 0.6863709092140198, -0.2542877197265625, 0.31696191...
code as mentioned before also fails (but takes longer), after a while, CS := TCriticalSection.Create; ``` CS.Acquire; for i := 1 to LoopCount do begin FormatDateTime('yyyy', 0, FormatSettings); end; CS.Release; ``` And now for the bit I really don't understand, I wrote this as suggested; ``` function ...
[ 0.4647340476512909, 0.08515217900276184, 0.3659988045692444, -0.21363332867622375, 0.12374784797430038, -0.004589797463268042, 0.6354805827140808, -0.5011820197105408, 0.04991159588098526, -0.4538998305797577, -0.00888267531991005, 0.6147215366363525, -0.15552037954330444, 0.15068735182285...
place inside the CPU window etc. Sometimes it's an access violation and sometimes it might be an invalid pointer operation. I am using Delphi 2009 btw. **UPDATE 2:** Roddy (below) points out the Ontimer event (and unfortunately also Winsock, i.e. TClientSocket) use the windows message pump (as an aside it would be ni...
[ 0.17298123240470886, -0.009008392691612244, 0.4884248971939087, 0.0042373547330498695, 0.0846690908074379, -0.4879436790943146, 0.43325281143188477, 0.060216449201107025, -0.2732282280921936, -0.8465766310691833, 0.08154703676700592, 0.5498401522636414, -0.2931757867336273, 0.1302674114704...
sure if it is good form to post an "Answer" to my own question but it seemed logical, let me know if that is uncool. I think I have found the problem, the thread local storage idea lead me to follow a bunch of leads and I found this magical line; IsMultiThread := True; From the help; "IsMultiThread is set to true ...
[ 0.3036869466304779, -0.024157997220754623, 0.4320356249809265, 0.19915154576301575, 0.13254913687705994, -0.005131960846483707, 0.46154969930648804, 0.05181070789694786, -0.18158935010433197, -0.4302559792995453, 0.08777026832103729, 0.6718364953994751, 0.1522771120071411, 0.27078637480735...
when you use TThread. If I set it manually the problem goes away. In C++Builder, I do not use a TThread but it appears by using the following code; ``` if (IsMultiThread) { ShowMessage("IsMultiThread is True!"); } ``` that is it set for you somewhere automatically. I am really glad for peoples input so that I c...
[ 0.31400561332702637, 0.37700948119163513, 0.22854799032211304, -0.40549173951148987, -0.009118485264480114, -0.4573277533054352, 0.8943955898284912, -0.030450351536273956, 0.08745238929986954, -0.594635546207428, -0.2086096704006195, 0.9416239261627197, 0.04400217533111572, -0.009152618236...
I have four tables containing exactly the same columns, and want to create a view over all four so I can query them together. Is this possible? (for tedious reasons I cannot/am not permitted to combine them, which would make this irrelevant!) Assuming that in addition to having the same column names, columns of the s...
[ 0.13209748268127441, 0.24604582786560059, 0.5328323841094971, -0.14266766607761383, -0.10135024785995483, 0.12341433763504028, 0.098110631108284, -0.39904290437698364, -0.17639586329460144, -0.6703473925590515, 0.16009797155857086, 0.4813189208507538, -0.4042876064777374, 0.247985482215881...
I have an existing database of a film rental system. Each film has a has a rating attribute. In SQL they used a constraint to limit the allowed values of this attribute. ``` CONSTRAINT film_rating_check CHECK ((((((((rating)::text = ''::text) OR ((rating)::text = 'G'::text)) OR ((rating)::te...
[ 0.49205079674720764, 0.4610587954521179, 0.6535889506340027, 0.03500845655798912, 0.14403541386127472, -0.2624873220920563, -0.10794209688901901, -0.5569192171096802, -0.10205664485692978, -0.18625737726688385, -0.07343164086341858, 0.7136523723602295, -0.09297270327806473, 0.1898086220026...
((rating)::text = 'NC-17'::text))) ``` I think it would be nice to use a Java enum to map the constraint into the object world. But it's not possible to simply take the allowed values because of the special char in "PG-13" and "NC-17". So I implemented the following enum: ``` public enum Rating { UNRATED ( "" )...
[ -0.2619474530220032, 0.2451091706752777, 0.6934974193572998, -0.12910322844982147, 0.09359350800514221, 0.12879160046577454, 0.38298460841178894, -0.6145227551460266, -0.2874533534049988, 0.1616704761981964, -0.5269073247909546, 0.7468639016151428, -0.23567983508110046, 0.05494252964854240...
private String rating; private Rating(String rating) { this.rating = rating; } @Override public String toString() { return rating; } } @Entity public class Film { .. @Enumerated(EnumType.STRING) private Rating rating; .. ``` With the toString() method the directi...
[ 0.5245842337608337, -0.02510123699903488, 0.7645391225814819, 0.09442969411611557, 0.07970153540372849, -0.40764784812927246, 0.1929856389760971, -0.4887574017047882, -0.009733661077916622, 0.10088226944208145, 0.06225180998444557, 0.8349624276161194, -0.12900066375732422, 0.42598795890808...
(Oracle > TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): > oracle.toplink.essentials.exceptions.DescriptorException Exception > Description: No conversion value provided for the value [NC-17] in > field [FILM.RATING]. Mapping: > oracle.toplink.essentials.mappings.DirectToFieldMapping[rating-->FILM.RATI...
[ 0.23821258544921875, 0.37225326895713806, 0.5111528038978577, 0.1498764455318451, -0.2310122847557068, -0.13266485929489136, 0.017349792644381523, -0.6624354124069214, -0.18147434294223785, 0.32745417952537537, -0.3319118618965149, 0.739800214767456, -0.17334982752799988, -0.25519478321075...
I use [System.Web.Services.WebMethodAttribute](http://msdn.microsoft.com/en-us/library/system.web.services.webmethodattribute.aspx) to make a public static method of an ASP.NET page callable from a client-side script: ***test.aspx.cs*** ``` [System.Web.Services.WebMethod] public static string GetResult() { return...
[ 0.24781736731529236, 0.1895974725484848, 0.4765602946281433, 0.04860082268714905, -0.12806618213653564, -0.14733800292015076, 0.5425010919570923, -0.4403526782989502, -0.006897567771375179, -0.6791219115257263, -0.22516296803951263, 0.3747045397758484, -0.18537631630897522, -0.025912608951...
i remember there being a way of marking a section of code in eclipse (special comment or annotation?) which made the autoformatter ignore that section. Or I may have drempt this... Used mainly when I have strings which wrap onto several lines and i don't want the autoformatter to rearrange this. Since eclipse 3.5 (or ...
[ 0.5976451635360718, -0.05524308234453201, 0.33980026841163635, -0.07614012062549591, -0.29007384181022644, -0.2642556130886078, 0.13246069848537445, -0.13614369928836823, -0.21024909615516663, -0.5440787672996521, -0.09833894670009613, 0.5004581212997437, -0.40351805090904236, -0.110653065...
I have to interface with a slightly archaic system that doesn't use webservices. In order to send data to this system, I need to post an XML document into a *form* on the other system's website. This XML document can get very large so I would like to compress it. The other system sits on IIS and I use C# my end. I cou...
[ 0.2651786506175995, 0.20647086203098297, 0.33929455280303955, 0.2605302035808563, 0.16357508301734924, -0.15892547369003296, 0.17683029174804688, 0.15670497715473175, -0.211723193526268, -0.9259412884712219, -0.0989394262433052, 0.25044703483581543, -0.13723652064800262, 0.2369958907365799...
don't own it. I have heard vague things about enabling compression / http 1.1 in IIS and the browser but I have no idea how to translate that to my program. Basically, is there some property I can set in my program that will make my program automatically compress the data that it is sending to IIS and for IIS to seam...
[ 0.6599685549736023, 0.14907288551330566, -0.1368097960948944, 0.1052861362695694, 0.5102630257606506, -0.2551393508911133, 0.00041323938057757914, -0.088685043156147, -0.07489604502916336, -0.4373050630092621, -0.26544690132141113, 0.5339174270629883, -0.35803475975990295, 0.27698445320129...
Stream myRequestStream = null; Stream myResponseStream = null; HttpWebRequest myWebRequest = (HttpWebRequest)System.Net .WebRequest.Create("http://example.com"); byte[] bytMessage = null; bytMessage = Encoding.ASCII.GetBytes("data=xyz"); myWebReques...
[ 0.26749372482299805, -0.033963173627853394, 0.37603098154067993, -0.00046831832150928676, -0.07738181948661804, 0.20221185684204102, 0.5317746996879578, 0.07954151928424835, -0.09669961780309677, -0.6906023621559143, -0.20342102646827698, 0.10016509145498276, -0.4963802695274353, 0.5426235...
// Set the content type as form so that the data // will be posted as form myWebRequest.ContentType = "application/x-www-form-urlencoded"; //Get Stream object myRequestStream = myWebRequest.GetRequestStream(); //Writes a sequence of bytes to the current stream
[ 0.3888757824897766, -0.06837432086467743, 0.7807027697563171, 0.0009634607704356313, 0.17242902517318726, 0.07135367393493652, 0.20205560326576233, 0.10026160627603531, -0.05799298360943794, -0.6249784827232361, -0.1857481300830841, -0.005285925697535276, -0.31639134883880615, 0.3633204698...
myRequestStream.Write(bytMessage, 0, bytMessage.Length); //Close stream myRequestStream.Close(); WebResponse myWebResponse = myWebRequest.GetResponse(); myResponseStream = myWebResponse.GetResponseStream(); } ``` "data=xyz" will actually be "data=[a several MB XML document]". I am a...
[ 0.09782886505126953, 0.049379486590623856, 0.7991544604301453, 0.00924881361424923, 0.03801584988832474, -0.15585030615329742, 0.31946277618408203, 0.034949954599142075, -0.01835404895246029, -0.6367804408073425, -0.10955889523029327, 0.4239555895328522, -0.28061187267303467, 0.15382631123...
the Content-Encoding header on the outgoing message to `gzip`. I believe that the Length should be the length of the zipped message, although you may want to play with making it the length of the unencoded message if that doesn't work. Good luck. **EDIT** I think the issue is whether the ISAPI filter that supports co...
[ 0.22988377511501312, -0.05993986129760742, 0.555676281452179, 0.17592187225818634, -0.004784225020557642, -0.36195605993270874, 0.525425374507904, 0.2560458481311798, -0.034599751234054565, -0.7867753505706787, -0.3495614528656006, 0.8398239016532898, -0.28359130024909973, -0.0887260288000...
What do you think is the best way for obtaining the results of the work of a thread? Imagine a Thread which does some calculations, how do you warn the main program the calculations are done? You could poll every X milliseconds for some public variable called "job finished" or something by the way, but then you'll rec...
[ 0.4488374590873718, -0.07144122570753098, 0.16465885937213898, 0.5025317072868347, -0.03537267446517944, 0.12000919133424759, -0.04129396006464958, -0.07582762092351913, -0.47433409094810486, -0.4254381060600281, 0.5187146067619324, 0.35250651836395264, -0.0757300928235054, 0.1393900513648...
be aware that the Thread, or some Threads, have finished their work? Sorry if it looks similar to this other [question](https://stackoverflow.com/questions/289434/how-to-make-a-java-thread-wait-for-another-threads-output), that's probably the reason for the *eben* answer, I suppose. What I meant was running lots of th...
[ 0.6954237818717957, 0.1478220820426941, 0.0549507774412632, 0.07702095061540604, -0.34285399317741394, -0.3795333802700043, 0.33501094579696655, -0.0020194787066429853, -0.3775410056114197, -0.5515545606613159, 0.12421724200248718, 0.3390220105648041, 0.19445352256298065, -0.06611628830432...
for your support. Although I also liked the answer by ***erickson***, I think ***saua***'s the most complete, and the one I'll use in my own code. Don't use low-level constructs such as threads, unless you absolutely need the power and flexibility. You can use a [ExecutorService](http://java.sun.com/javase/6/docs/api/...
[ 0.15935854613780975, -0.05443304404616356, 0.3627717196941376, 0.14504389464855194, -0.009816627018153667, -0.2808486223220825, 0.21543723344802856, -0.1314162313938141, -0.5275089740753174, -0.5325246453285217, -0.3067665100097656, 0.31068623065948486, -0.34426426887512207, 0.088035471737...
want to run some tasks (the `Callable`s) that do some work (calculation, resource access, ...) where you don't need the result *right now*. You can just depend on the `Executor` to run your code whenever it wants (if it's a `ThreadPoolExecutor` then it will run whenever a free Thread is available). Then at some point i...
[ 0.4169304072856903, -0.2921668589115143, 0.34408023953437805, 0.22089406847953796, 0.3856016993522644, -0.05802775174379349, 0.16078607738018036, 0.13848133385181427, -0.4854603409767151, -0.5642399191856384, -0.1282927393913269, 0.552992582321167, -0.20881743729114532, 0.03828098624944687...
will wait until the task is completed. This is usually desired since you can't continue without the tasks result anyway. When you don't need the value to continue, but would like to know about it if it's already available (possibly to show something in the UI), then you can easily call `isDone()` and only call `get()`...
[ 0.043129630386829376, -0.48222941160202026, 0.4809322953224182, 0.14714033901691437, 0.1981322169303894, -0.33169853687286377, 0.30191555619239807, -0.03803228214383125, -0.1635676473379135, -0.7021657228469849, -0.4007313549518585, 0.7635712027549744, 0.04953848198056221, -0.0053400890901...
I currently trying to find a solution, how to ensure that a test fails if an exception occurs in a thread which is spawn by the test method. I DON'T want to start a discussion about more than one thread in a unit test. => "unit test".Replace("unit","integration"); I already read a lot of threads in several forums, I ...
[ 0.1905130296945572, 0.08022367209196091, 0.1210242211818695, 0.05250992625951767, -0.1350598782300949, 0.08270028978586197, 0.4911983609199524, -0.2748013436794281, -0.030915455892682076, -0.6866438984870911, 0.15776757895946503, 0.3952265977859497, -0.2635049521923065, 0.3234952986240387,...
Is it possible to integrate [Hudson](http://hudson.dev.java.net/ "hudson: an extensible continuous integration engine") with MS Test? I am setting up a smaller CI server on my development machine with Hudson right now, just so that I can have some statistics (ie. [FxCop](http://blogs.msdn.com/fxcop/ "Code Analysis Tea...
[ -0.0006675813929177821, -0.18422740697860718, -0.018357673659920692, -0.030973253771662712, 0.12078817933797836, 0.06092546880245209, 0.04014643654227257, -0.15505902469158173, 0.023919735103845596, -0.5330639481544495, 0.3514319062232971, 0.727546215057373, -0.2352968454360962, -0.3156650...
MS Test results, yet. Does anyone know whether the TRX files generated by `MSTest.exe` can be transformed to the [JUnit](http://www.junit.org/) or [NUnit](http://www.nunit.org/) result format (because those are supported by Hudson), or whether there is any other way to integrate MS Test unit tests with Hudson? Hudson h...
[ 0.07877443730831146, -0.25120800733566284, 0.09798704832792282, 0.1959173083305359, 0.29159489274024963, 0.0411900132894516, 0.22551193833351135, 0.028929416090250015, -0.15322841703891754, -0.5741856694221497, 0.09621547907590866, 0.6807951927185059, -0.12172441929578781, 0.03065265342593...
I just finished reading this post: <https://developer.yahoo.com/performance/rules.html#flush> and have already implemented a flush after the top portion of my page loads (head, css, top banner/search/nav). Is there any performance hit in flushing? Is there such a thing as doing it too often? What are the best practice...
[ 0.27937448024749756, -0.14779157936573029, 0.4114125072956085, -0.08775052428245544, -0.23511579632759094, -0.28595519065856934, 0.2273058444261551, -0.24670588970184326, -0.2795719504356384, -0.6719449758529663, 0.2991020083427429, 0.5732735991477966, 0.2968915104866028, -0.27227139472961...
end is small compared to transmission time; also, this saves the user about 0.5 seconds, according to your source. Is that a significant amount of time for you? 2) this technique doesn't work with gzip output buffering 3) if you flush too often, you'll be sending an almost-empty packet on flush, which might actually ...
[ -0.04259283095598221, -0.4149973690509796, 0.2773852050304413, 0.10497863590717316, -0.03998621925711632, -0.15330162644386292, 0.2651675045490265, -0.3352324962615967, -0.22346344590187073, -0.5512667894363403, -0.08136838674545288, 0.44613590836524963, -0.08193247020244598, 0.03899016976...
if you expect your script to run for a loooong time (20+ seconds), it may be needed to send some data (spaces, for example) to keep the browser from timing out the connection.
[ 0.373544305562973, -0.2341551035642624, 0.17315207421779633, 0.19385544955730438, 0.22302134335041046, -0.20477351546287537, 0.485490620136261, 0.2320662885904312, -0.13446277379989624, -0.6664857268333435, -0.25078508257865906, 0.06572717428207397, 0.1294611096382141, -0.10848046839237213...
I would like to do something like this: a rotating cube on a form. I don't want to use any external library or dll, just pure .NET 3.5 (without directx). And a cube build with lines only. Could you please tell me how to do this? I don't want to use external libraries because I don't need > 100 MB library to do this th...
[ 0.4793173670768738, -0.006662752479314804, 0.4394277036190033, 0.09337964653968811, -0.4106554388999939, 0.18765181303024292, 0.03593171760439873, -0.16171905398368835, -0.13890738785266876, -0.8721394538879395, 0.32821929454803467, 0.29885604977607727, -0.19645248353481293, 0.338439941406...
When I asked for tools to profile Rails apps, someone [pointed at DTrace](https://stackoverflow.com/questions/350470/what-tools-do-you-recommend-to-profile-rails-apps#351842). Since I work on MacOSX stations and deploy on OpenSolaris, it is a valid way to go. But I have little knowledge of DTrace. Besides the usual su...
[ 0.1121736541390419, 0.12965570390224457, -0.09294162690639496, 0.1552468240261078, -0.20232580602169037, -0.08011271804571152, 0.17831000685691833, 0.06692992150783539, -0.06536635011434555, -0.5747137069702148, 0.17937913537025452, 0.6951465606689453, -0.18380649387836456, -0.317664027214...
This is a question regarding Unix shell scripting (any shell), but any other "standard" scripting language solution would also be appreciated: I have a directory full of files where the filenames are hash values like this: ``` fd73d0cf8ee68073dce270cf7e770b97 fec8047a9186fdcc98fdbfc0ea6075ee ``` These files have di...
[ 0.131486177444458, 0.05725952237844467, 0.19268947839736938, -0.22491031885147095, -0.0036460973788052797, -0.09375391900539398, 0.1296091079711914, -0.1591617912054062, -0.2239314466714859, -0.5518136620521545, -0.2876265347003937, 0.5465751886367798, -0.25208982825279236, 0.1984344422817...
`ext` is mime-based. """ import fileinput import mimetypes import os import sys from subprocess import Popen, PIPE if len(sys.argv) > 1 and sys.argv[1] == '--rename': do_rename = True del sys.argv[1] else: do_rename = False for filename in (line.rstrip() for line in fileinput.input()): output, _ ...
[ 0.13945253193378448, -0.23477303981781006, 0.5625643730163574, -0.23822355270385742, -0.06130201369524002, 0.37684181332588196, 0.4663747549057007, -0.4566135108470917, 0.0836397036910057, -0.7263780236244202, -0.5891112685203552, 0.7750372290611267, -0.5753353238105774, -0.004768923856317...
print filename_ext if do_rename: os.rename(filename, filename_ext) ``` Example: ``` $ ls *.file? | python add-ext.py --rename avi.file.avi djvu.file.undefined doc.file.dot gif.file.gif html.file.html ico.file.obj jpg.file.jpe m3u.file.ksh mp3.file.mp3 mpg.file.m1v pdf.file.pdf pdf.file2.pdf pdf.file3.pdf...
[ 0.07705914229154587, 0.1123780906200409, 0.6634393334388733, -0.14303402602672577, 0.012433663941919804, 0.25781840085983276, -0.014190347865223885, -0.5169728398323059, -0.15014706552028656, -0.7012050151824951, -0.7783175706863403, 0.4459938704967499, -0.4466431438922882, 0.1765922605991...
["application/rdf+xml","rdf"], ["application/smil","smi","smil"], ["application/srgs","gram"], ["application/srgs+xml","grxml"], ["application/vnd.adobe.apollo-application-installer-package+zip","air"], ["application/vnd.mif","mif"], ["application/vnd.mozilla.xul+xml","xul"], ["application/v...
[ 0.12975411117076874, 0.18278956413269043, 0.7929462790489197, 0.15000830590724945, 0.07287805527448654, 0.4620990455150604, -0.4564601182937622, -0.10046663135290146, -0.24482282996177673, -0.5378949642181396, -0.7218255996704102, 0.3368951082229614, -0.3005494773387909, 0.1359688639640808...
["application/x-koan","skp","skd","skt","skm"], ["application/x-latex","latex"], ["application/x-netcdf","nc","cdf"], ["application/x-sh","sh"], ["application/x-shar","shar"], ["application/x-shockwave-flash","swf"], ["application/x-stuffit","sit"], ["application/x-sv4cpio","sv4cpio"], [...
[ 0.08476703613996506, 0.10140296816825867, 0.6793234944343567, 0.22655272483825684, -0.032520972192287445, 0.2637360394001007, -0.2607520818710327, 0.046509165316820145, -0.19978228211402893, -0.44242578744888306, -0.839060366153717, 0.4642585813999176, -0.34036949276924133, 0.1329169422388...
["audio/midi","mid","midi","kar"], ["audio/mpeg","mp3","mpga","mp2"], ["audio/x-aiff","aif","aiff","aifc"], ["audio/x-mpegurl","m3u"], ["audio/x-pn-realaudio","ram","ra"], ["audio/x-wav","wav"], ["chemical/x-pdb","pdb"], ["chemical/x-xyz","xyz"], ["image/bmp","bmp"], ["image/cgm","cg...
[ 0.018399881199002266, 0.17474991083145142, 0.6418122053146362, 0.18209995329380035, -0.21943959593772888, 0.40511354804039, -0.4629925787448883, -0.17455720901489258, -0.40548259019851685, -0.39039096236228943, -0.5960959196090698, 0.6019405722618103, -0.16253453493118286, 0.00183900597039...
["image/x-xbitmap","xbm"], ["image/x-xpixmap","xpm"], ["image/x-xwindowdump","xwd"], ["model/iges","igs","iges"], ["model/mesh","msh","mesh","silo"], ["model/vrml","wrl","vrml"], ["text/calendar","ics","ifb"], ["text/css","css"], ["text/html","html","htm"], ["text/plain","txt","asc"]...
[ 0.2631778120994568, -0.19779226183891296, 0.816171407699585, 0.3186247646808624, 0.05236970633268356, 0.12356020510196686, -0.14193043112754822, -0.003952526021748781, -0.2268526703119278, -0.4041278064250946, -0.6843152046203613, 0.5684327483177185, -0.31545689702033997, 0.015862096101045...
dict(x[:2] for x in mime2exts_list) if __name__ == '__main__': import fileinput, os.path from subprocess import Popen, PIPE for filename in (line.rstrip() for line in fileinput.input()): output, _ = Popen(['file', '-bi', filename], stdout=PIPE).communicate() mime = output.split(';', 1)[0]....
[ 0.08431437611579895, -0.16202940046787262, 0.4649265706539154, -0.30947890877723694, -0.22731710970401764, 0.27062538266181946, 0.5164351463317871, -0.09850993007421494, -0.030613824725151062, -0.6422997117042542, -0.3314451277256012, 0.6630302667617798, -0.7731813192367554, -0.01780434139...
import os import sys # this version supports only stdin (part of fileinput.input() functionality) lines = sys.stdin.read().split('\n') for line in lines: filename = line.rstrip() output = os.popen('file -bi ' + filename).read() mime = output.split(';')[0].lower().strip()...
[ 0.03107692301273346, -0.4031844437122345, 0.5416229963302612, -0.15372630953788757, -0.1107071191072464, 0.4058164656162262, 0.25188443064689636, -0.10544077306985855, -0.32222452759742737, -0.640711784362793, -0.238748699426651, 0.4842885434627533, -0.6349619030952454, -0.1625024378299713...
ext = 'undefined' print filename + '.' + ext ``` It should work on Python 2.3.5 (I guess).
[ 0.09769368171691895, -0.05947014316916466, 0.5074127912521362, -0.4683004319667816, 0.07215586304664612, -0.11424822360277176, 0.3137965202331543, 0.0118638277053833, -0.04051923006772995, -0.25373703241348267, -0.23391208052635193, 0.6122351884841919, -0.47677916288375854, -0.216555804014...
The Eclipse IDE has a neat little feature that I really miss in Visual Studio. If I place the cursor on a variable or method name, the IDE will automatically highlight all references to it in the current document within the relevant scope. I can't seem to find an option to turn on similar behaviour in VS2008 or Resha...
[ 0.48672038316726685, -0.03288811445236206, 0.161467045545578, 0.007370469626039267, -0.4639216661453247, -0.30761417746543884, 0.03675439953804016, 0.0225908774882555, -0.20363777875900269, -0.6292695999145508, 0.34507089853286743, 0.7990170121192932, -0.27296149730682373, -0.0824567601084...
Place your cursor on the variable you want to find usages of, and press the Shift-Alt-F11 combination.
[ -0.19616776704788208, -0.21792630851268768, 0.3856399655342102, -0.21488900482654572, -0.09376543760299683, 0.3096323311328888, -0.15977267920970917, 0.07585778832435608, -0.013435703702270985, -0.41304779052734375, -0.2368745356798172, 0.71876060962677, -0.387197881937027, -0.303320676088...
I have a little project with some jsp deployed on an Tomcat 5.5. Recently the Servlets which are also deployed with the jsp files (one war archive) stopped working. I also checked out a previous version from my svn which should work. What I noticed that the `displayname` (I use a german version of Tomcat , so I guess t...
[ 0.32058531045913696, 0.03500852361321449, 0.08552604913711548, 0.09627919644117355, -0.042609672993421555, -0.09093467146158218, 0.3926703929901123, 0.43215441703796387, -0.4237649440765381, -0.49177122116088867, -0.15653978288173676, 0.6616858839988708, -0.13920491933822632, 0.05122982338...
the `<display-name>` element in the web.xml file? Is the `web.xml` file in the WAR and at `/WEB-INF/web.xml`? Does it validate (eclipse can do that, or try [w3c.org's validation service](http://validator.w3.org/))?
[ 0.50108402967453, 0.01252065971493721, 0.2670746445655823, 0.31439778208732605, -0.4112510085105896, -0.10890615731477737, -0.2660004496574402, -0.19676323235034943, -0.33479106426239014, -0.2239534556865692, 0.06976715475320816, 0.3568579852581024, -0.04508977755904198, -0.140537142753601...
I've been doing a `convert(varchar,datefield,112)` on each date field that I'm using in 'between' queries in SQL server to ensure that I'm only accounting for dates and not missing any based on the time part of datetime fields. Now, I'm hearing that the converts aren't indexable and that there are better methods, in S...
[ 0.020680807530879974, 0.1920202523469925, 0.31162500381469727, -0.08164459466934204, -0.09742104262113571, -0.07198070734739304, -0.11059781908988953, -0.18303579092025757, -0.03970478102564812, -0.41324424743652344, 0.13262765109539032, 0.5890045166015625, -0.2904241681098938, 0.187469795...
the best performing method of doing what you are looking for. Its not really about index-able, because the actual column type is date time. If you are looking for the best way query for dates, then your example is right, but you may want to take into account the 3 ms precision difference in MSSQL. It can mean that re...
[ -0.22400245070457458, -0.09511031955480576, 0.49586763978004456, 0.16632434725761414, 0.2583649456501007, 0.06633289903402328, -0.06173703074455261, -0.24718254804611206, -0.2859981954097748, -0.6297769546508789, 0.1064823791384697, 0.34367167949676514, 0.06095615401864052, 0.0681040957570...
I was reading about Clojure and found a discussion about Java not supporting tail calls, in the current version, and that people were throwing exceptions to simulate tail calling in the JVM, anyways it sounds like people are doing some crazy stuff out there. So this got me wondering about C#'s tail calling, same issues...
[ 0.11185695976018906, 0.06110779568552971, 0.23317188024520874, -0.0670347660779953, -0.33198612928390503, -0.5441311001777649, 0.13484567403793335, -0.12833277881145477, -0.379831999540329, 0.09835870563983917, -0.0682569369673729, 0.543478786945343, -0.528203547000885, -0.0013329832581803...
I have some code which I did not originally create that uses \_beginthreadex and \_endthreadex. For some reason, when it calls \_endthreadex(0), the call just hangs and never returns. Any ideas as to what would normally cause this call to hang? \_endthreadex ends the thread, so it can't return. That's the whole point o...
[ 0.5294913053512573, -0.002246317220851779, 0.34996581077575684, 0.05732531473040581, 0.010529905557632446, -0.36286842823028564, 0.06798723340034485, 0.2125752717256546, -0.31597569584846497, -0.3275485634803772, -0.0687265694141388, 0.3741467297077179, -0.4989977478981018, 0.6737598776817...
I am modifying a SQL table through C# code and I need to drop a NOT NULL constraint if it exists. How do I check to see if it exists first? ``` select is_nullable from sys.columns where object_id = OBJECT_ID('tablename') and name = 'columnname'; ```
[ 0.24374128878116608, 0.3719339966773987, 0.3289240896701813, -0.2322491854429245, 0.14673104882240295, 0.006901480257511139, 0.24230024218559265, 0.036618880927562714, -0.04921003803610802, -0.5553755760192871, -0.17134279012680054, 0.3397671580314636, -0.5515052676200867, 0.25125589966773...
I'd like to use sqlmetal to generate dbml data contexts for my project, but the data context and all classes created are marked as `public`. As this is supposed to be an API layer I'd like to instead mark many of these classes or at least the context itself as `internal`. Is there a way to do this in sqlmetal or some o...
[ 0.4551907479763031, 0.271254301071167, -0.08967461436986923, -0.06213220953941345, -0.33159518241882324, -0.19433417916297913, 0.23521852493286133, 0.231779083609581, -0.06044071540236473, -0.4854459762573242, -0.05063822120428085, 0.5280295014381409, -0.34000423550605774, 0.23292081058025...
this isn't a tricky change, so you should be able to automate it with a basic command-line tool.
[ 0.1175570860505104, -0.03340993821620941, 0.1298939436674118, 0.08946961164474487, 0.4262631833553314, -0.23666028678417206, 0.01833401434123516, -0.0662844181060791, -0.1637059450149536, -0.5421684980392456, -0.1545885056257248, 0.7800484299659729, 0.03594588115811348, -0.2260611057281494...
I would like to be able to query whether or not a service is running from a windows batch file. I know I can use: > sc query "ServiceName" but, this dumps out some text. What I really want is for it to set the `errorlevel` environment variable so that I can take action on that. Do you know a simple way I can do thi...
[ 0.44719380140304565, 0.12311065942049026, 0.08486554771661758, 0.15062536299228668, 0.0721365362405777, -0.1579645723104477, 0.7701389193534851, 0.2507692277431488, -0.17301584780216217, -0.6705349087715149, 0.14630670845508575, 0.5200062990188599, -0.08747981488704681, 0.09388162940740585...
to bite the bullet and write a console program to get this right. ``` sc query "ServiceName" | find "RUNNING" ```
[ 0.13888590037822723, 0.19943100214004517, 0.08185897022485733, -0.05335039272904396, 0.222772017121315, -0.30351924896240234, 0.2592082619667053, -0.04337718337774277, 0.34695520997047424, -0.4581238329410553, 0.07433891296386719, 0.9503388404846191, -0.3649681806564331, 0.1524238735437393...
I'm brand new to Erlang. How do you do modulo (get the remainder of a division)? It's % in most C-like languages, but that designates a comment in Erlang. Several people answered with rem, which in most cases is fine. But I'm revisiting this because now I need to use negative numbers and rem gives you the remainder of...
[ 0.09677834063768387, 0.30761000514030457, 0.5093200206756592, -0.2894570827484131, -0.15245290100574493, -0.05016185715794563, 0.27608349919319153, -0.23027896881103516, -0.15409551560878754, -0.1411714106798172, -0.11236108094453812, 0.36714407801628113, -0.19752781093120575, -0.222476691...
-2 * 3 + 1.` Does this do what you want? ``` mod(X,Y) when X > 0 -> X rem Y; mod(X,Y) when X < 0 -> Y + X rem Y; mod(0,Y) -> 0. ```
[ 0.05410268157720566, 0.1414496898651123, 0.6246419548988342, -0.46839892864227295, -0.18261514604091644, -0.19324991106987, 0.4202844798564911, -0.6692735552787781, -0.0687008649110794, -0.11786004155874252, -0.6715511679649353, 0.6747783422470093, -0.4660627841949463, -0.21450698375701904...
Quite a while ago, I heard about Object databases. Cool concept and all. Now, with the event of ORMs everywhere, does anyone still use any of the Object oriented Databases systems? Are they relevant? Are they practical? OO databases never got out of a niche market. They are good for some applications - where the data s...
[ 0.08433157950639725, 0.22891655564308167, 0.20890502631664276, 0.24423366785049438, 0.1626933515071869, -0.2626333236694336, 0.07554209977388382, 0.6195563673973083, -0.30615147948265076, -0.5888359546661377, -0.06829444319009781, 0.5204533338546753, -0.131352499127388, -0.0662649646401405...
mismatch. However, there are still several OODBMS vendors such as [Gemstone](http://www.gemstone.com), [Versant](http://www.versant.com/) or [Cardinal](http://www.jadeworld.com/) who are doing quite nicely with their products. The technology is useful for some types of data structures and can be more efficient than a ...
[ 0.1174999549984932, -0.15091286599636078, 0.43664059042930603, 0.1738317757844925, -0.09889489412307739, -0.12692908942699432, 0.328583687543869, 0.07107414305210114, -0.2639477550983429, -0.18373505771160126, -0.10430540144443512, 0.5304171442985535, 0.08351349085569382, 0.129771471023559...
it a bit more attention to the OODBMS paradigm.
[ 0.0914139449596405, -0.0025828927755355835, 0.1862313151359558, 0.2618868947029114, -0.22962716221809387, -0.17610310018062592, 0.15167337656021118, 0.2450556606054306, 0.09980899095535278, -0.4467041492462158, 0.08429045975208282, 0.30927667021751404, 0.16689272224903107, -0.2424648553133...
I just started diving into ADO.NET Data Services for a project, and I quickly ran into a problem. At first I was amazed by the performance, but then I realized that the data was cached. My project relies on real-time data, and I'd love to use the ADO.NET Data Services REST query syntax (without needing to use WCF or SO...
[ 0.3149260878562927, 0.3780733048915863, -0.04928938299417496, -0.07982631772756577, 0.07877165079116821, -0.17808514833450317, 0.1178930327296257, -0.03634815663099289, -0.09972268342971802, -0.5639002323150635, 0.1972619742155075, 0.3838030993938446, -0.09678032994270325, 0.24488756060600...
off the cache? By default the data context has MergeOption set to AppendOnly. This means that re-requests will only add new entities and will not update existing ones. Try setting MergeOption to OverwriteChanges: ``` this.context.MergeOption = MergeOption.OverwriteChanges; ``` This worked for me when I noticed this!...
[ 0.27721771597862244, -0.0724705159664154, 0.3110336661338806, -0.07030705362558365, 0.33545735478401184, 0.0705299973487854, 0.3357052505016327, -0.028378289192914963, -0.08902014046907425, -0.5417138934135437, -0.02386198192834854, 0.7132788896560669, -0.4634753465652466, -0.0415812730789...
i know its a new thing , more powerful and a lot more options added to it, but is linq2sql is part of the new EF ? if not , what is the main different between the two frameworks? I've written a couple of opinion pieces about LINQ-to-Entities, and its relation to LINQ-to-SQL: <http://www.hackification.com/2008/12/03/...
[ -0.135782852768898, -0.06385039538145065, 0.7754818797111511, -0.05173828452825546, 0.005036742892116308, -0.28796419501304626, 0.14314186573028564, -0.08709435909986496, -0.19034141302108765, -0.35461747646331787, 0.14324812591075897, 0.634801983833313, -0.18140563368797302, -0.2666639983...
(IMHO) feels more like a beta.
[ -0.1855137199163437, 0.2062801718711853, -0.038537707179784775, -0.24333597719669342, -0.18866021931171417, -0.20607516169548035, 0.14937347173690796, -0.22487708926200867, 0.11416564881801605, -0.14179649949073792, -0.07348034530878067, 0.13544005155563354, -0.509270191192627, 0.110572725...
We have lots of logging calls in our app. Our logger takes a System.Type parameter so it can show which component created the call. Sometimes, when we can be bothered, we do something like: ``` class Foo { private static readonly Type myType = typeof(Foo); void SomeMethod() { Logger.Log(myType, "SomeMethod...
[ 0.4236035943031311, 0.11235704272985458, 0.27357980608940125, -0.09569771587848663, 0.05908773094415665, -0.13003119826316833, 0.21712739765644073, 0.06355467438697815, -0.19986730813980103, -0.4564898610115051, 0.1486378312110901, 0.6942573189735413, -0.40880218148231506, 0.14648959040641...
problem, but hey, what's StackOverflow for?) I strongly suspect that GetType() will take significantly less time than any actual logging. Of course, there's the possibility that your call to Logger.Log won't do any actual IO... I still suspect the difference will be irrelevant though. EDIT: Benchmark code is at the bo...
[ 0.25895535945892334, 0.10071916878223419, 0.3891269564628601, -0.03930235281586647, 0.07107067108154297, 0.14847484230995178, 0.47971028089523315, -0.41867393255233765, -0.3783263564109802, -0.5366458892822266, 0.2405153214931488, 0.7764301300048828, -0.15995945036411285, -0.15810286998748...
even if it doesn't write anything out. (I could be wrong, of course - you'd have to try that yourself.) In other words, as normal, I'd go with the most readable code rather than micro-optimising. ``` using System; using System.Diagnostics; using System.Runtime.CompilerServices; class Test { const int Iterations ...
[ 0.27704283595085144, -0.01778223365545273, -0.06057620793581009, -0.18147476017475128, 0.06353312730789185, 0.23729443550109863, 0.6368892788887024, -0.12956780195236206, -0.1267128735780716, -0.45408353209495544, -0.16491420567035675, 0.43767353892326355, -0.11742895841598511, 0.328384876...
Stopwatch sw = Stopwatch.StartNew(); for (int i = 0; i < Iterations; i++) { total += Log(typeof(Test)); } sw.Stop(); Console.WriteLine("typeof(Test): {0}ms", sw.ElapsedMilliseconds); sw = Stopwatch.StartNew(); for (int i = 0; i < Iterations; i++)
[ 0.0571170412003994, -0.5728989243507385, 0.8870417475700378, -0.28570494055747986, 0.08752714097499847, 0.5496737957000732, 0.38207483291625977, -0.3438996374607086, -0.2517719268798828, -0.5233780741691589, 0.05822330713272095, 0.3918023109436035, -0.23170416057109833, 0.21783633530139923...
{ total += Log(TestType); } sw.Stop(); Console.WriteLine("TestType (field): {0}ms", sw.ElapsedMilliseconds); Test test = new Test(); sw = Stopwatch.StartNew(); for (int i = 0; i < Iterations; i++) {
[ 0.2790016233921051, -0.5146133899688721, 0.7212988138198853, -0.3451559841632843, 0.250266432762146, 0.349373459815979, 0.4980084300041199, -0.380038857460022, -0.0556754395365715, -0.483294278383255, -0.07429103553295135, 0.46686890721321106, -0.09761764109134674, 0.21343563497066498, 0...
total += Log(test.GetType()); } sw.Stop(); Console.WriteLine("test.GetType(): {0}ms", sw.ElapsedMilliseconds); } // I suspect your real Log method won't be inlined, // so let's mimic that here [MethodImpl(MethodImplOptions.NoInlining)] static int Log(Type type) { ...
[ 0.2055761069059372, -0.42460691928863525, 0.7488030791282654, -0.1386563926935196, 0.028535235673189163, 0.09694109857082367, 0.5035824775695801, -0.4044298231601715, -0.28694310784339905, -0.2761022448539734, 0.134898841381073, 0.6230214238166809, -0.1479024887084961, 0.21679134666919708,...
`DBCC SHRINKFILE` always works when I run it manually on a log file, even when I get the following message: ``` 'Cannot shrink log file 2 (Claim_Log) because all logical log files are in use.' ``` When I run it from a job, however, it only shrinks the log about one third of the time. The other times, it just remains...
[ 0.32174256443977356, 0.17799592018127441, 0.4959646761417389, -0.21054743230342865, -0.0005943143623881042, -0.09813199192285538, 0.15382182598114014, -0.2960875630378723, -0.31588369607925415, -0.6823976635932922, -0.11182521283626556, 0.7887913584709167, -0.1599837690591812, 0.1393627971...
do to get more information on why this isn't working? Edit: Here is the full message from the log: ``` 'Executed as user: *. Cannot shrink log file 2 (Claim_Log) because all logical log files are in use. [SQLSTATE 01000] (Message 9008) DBCC execution completed. If DBCC printed error messages, contact your system ad...
[ 0.2304350584745407, 0.15973740816116333, 0.42745307087898254, -0.1288161277770996, -0.1025540828704834, -0.23439998924732208, 0.5327162146568298, -0.18738362193107605, -0.3241138458251953, -0.5278761982917786, -0.33570629358291626, 0.4715149700641632, -0.2957834005355835, 0.445468038320541...
a replication task to finish before it can reuse the log space. However replication had never been used on our DB nor on our server. You should be able to clear the state by running 'sp\_removedbreplication'; however for me 'sp\_removedbreplication' didn't solve the issue. Instead SQL just returned saying that the Dat...
[ 0.03363808989524841, 0.1263478696346283, 0.34535273909568787, 0.041000355035066605, -0.1997433602809906, -0.02985353209078312, 0.2590104639530182, -0.394573450088501, -0.4513964354991913, -0.39640012383461, 0.1551474630832672, 0.26781272888183594, -0.3660944402217865, 0.7465770840644836, ...
= 1 GO DBCC ShrinkFile({LogFileName},0) GO Execute SP_ReplicationDbOption {DBName},Publish,false,1 GO ```
[ 0.06985055655241013, -0.048669733107089996, 0.32510456442832947, -0.040802229195833206, -0.017132112756371498, -0.08870847523212433, 0.42985108494758606, -0.4450959861278534, -0.14767411351203918, 0.00040604767855256796, -0.15906964242458344, 0.46446216106414795, -0.5446733832359314, 0.377...
It appears that each app has access to its own config settings, which could be kept after app be shutdown. I am wondering whether one app's config setting could be accessed from other app. Should I save sensitive data like password to the app config? Is there some better way? The Keychain is where passwords or other...
[ 0.2985161542892456, -0.02381519041955471, 0.4680893123149872, 0.4106253981590271, 0.1465691328048706, 0.13635703921318054, 0.02121569961309433, 0.1785586178302765, -0.29583603143692017, -0.6523482799530029, -0.041554972529411316, 0.6249029636383057, -0.0772443413734436, 0.06315156072378159...