text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
What's the best way (if any) to make an image appear "grayed out" with CSS (i.e., without loading a separate, grayed out version of the image)? My context is that I have rows in a table that all have buttons in the right most cell and some rows need to look lighter than others. So I can make the font lighter easily of...
[ 0.40280646085739136, 0.40991106629371643, 0.099674753844738, 0.04362773895263672, 0.18838003277778625, 0.13129904866218567, -0.17331463098526, 0.12370790541172028, -0.31917527318000793, -0.7015659213066101, 0.25621116161346436, 0.41620150208473206, 0.025842009112238884, -0.0513000674545764...
you could create a `<div>` overlay and set that to be gray (change the alpha to get the effect). * html: ``` <div id="wrapper"> <img id="myImage" src="something.jpg" /> </div> ``` * css: ```css #myImage { opacity: 0.4; filter: alpha(opacity=40); /* msie */ } /* or */ #wrapper { opacity: 0.4; f...
[ 0.1271369308233261, -0.30093300342559814, 0.2608200013637543, -0.07414405047893524, 0.06489813327789307, 0.03351171314716339, 0.16059447824954987, -0.08763685077428818, -0.16203375160694122, -0.9992268085479736, -0.3043806850910187, 0.28618326783180237, -0.427468478679657, -0.1050673574209...
I would like to make my application somewhat REST compliant. I am using Rails on the backend and [GWT](https://developers.google.com/web-toolkit/) on the frontend. I would like to do updates and deletes. I realize I can do something like mydomain.com/:id/delete (GET) and accomplish the same thing. However, as I stated ...
[ 0.21049825847148895, -0.06438560038805008, 0.7797134518623352, 0.056772518903017044, -0.1668885499238968, -0.3503047525882721, 0.4431600272655487, 0.04179496690630913, 0.0974050834774971, -0.8475292921066284, -0.08866188675165176, 0.5856529474258423, -0.024966340512037277, 0.14729237556457...
parameter. So, how can I accomplish this with a GWT RequestBuilder? Rails does this with hidden attributes. The easiest way to figure this out would be to create a new rails application, generate a scaffold and have a look at the HTML in a browser. Try this: ``` rails jp cd jp ./script/generate scaffold RequestBuilde...
[ 0.06587233394384384, -0.09297585487365723, 0.27440759539604187, 0.16707150638103485, -0.49372994899749756, -0.031836967915296555, 0.1618499904870987, -0.6526241302490234, 0.018315237015485764, -0.7407301068305969, 0.20938026905059814, 0.5017547607421875, -0.1311747133731842, 0.096593677997...
action="/request_builders/1" class="edit_request_builder" id="edit_request_builder_1" method="post"> <div style="margin:0;padding:0"> <input name="_method" type="hidden" value="put" /> <input name="authenticity_token" type="hidden" value="e76..." /> </div> ``` Of course the form is sent with POST, but ...
[ -0.011168617755174637, -0.5529673099517822, 0.45302003622055054, -0.048262421041727066, -0.22367386519908905, 0.11920890212059021, 0.35140708088874817, -0.7124602198600769, -0.2666705250740051, -0.32693302631378174, -0.32034918665885925, 0.5544804930686951, -0.2629043161869049, -0.32982942...
I'm quoting myself on a previous question I asked to further explain: *"I'm trying to run a freshly created ASP.NET Website using C#, however when I do so it launches FireFox and attempts to connect to <http://localhost:1295/WebSite1/Default.aspx> (for example), but after about 10-15 seconds it displays a "Connection ...
[ 0.351970374584198, 0.24250678718090057, 0.3354414999485016, -0.06038239598274231, -0.11165548861026764, -0.4086840748786926, 0.4759916365146637, 0.3045649826526642, -0.5986406803131104, -0.5637373924255371, -0.26501578092575073, 0.5286795496940613, -0.3482005298137665, 0.13890869915485382,...
ran the website, the notification for the ASP.NET Server-startup showed one port (1130 for example), and when the website failed to load; it turns out it was attempting to load the site on another port (In this case, 1128). It was suggested that an anti-virus program could have caused this kind of redirection; low and ...
[ 0.11682946979999542, 0.10918957740068436, 0.3958291709423065, -0.026698531582951546, 0.10512669384479523, -0.5698406100273132, 0.8530369400978088, 0.09641388058662415, -0.22495120763778687, -0.38468122482299805, 0.02041107788681984, 0.47477713227272034, -0.3522530794143677, -0.090981051325...
I want to build two-dimentional array of strings where length of one dimention is 2. Similar to this ``` string[,] array = new string[,] { {"a", "b"}, {"c", "d"}, {"e", "f"}, {"g", "h"} } ``` Doing ``` List<string[]> list = new List<string[]>(); list.Add(new string[2] {"a", "b"}); list.Add(new stri...
[ 0.19286362826824188, -0.12881696224212646, 0.4089283049106598, -0.12944892048835754, 0.14191053807735443, -0.027062751352787018, 0.30121415853500366, -0.2593107521533966, -0.27605512738227844, -0.7133215069770813, -0.13115638494491577, 0.5290632843971252, -0.45794031023979187, 0.1644449383...
(!source.Any()) { return new T[0,0]; } int width = source.First().Length; if (source.Any(array => array.Length != width)) { throw new ArgumentException("All elements must have the same length"); } T[,] ret = new T[source.Count(), width]; int row = 0; foreach (T[] a...
[ -0.07289371639490128, -0.2787279486656189, 0.711650550365448, -0.527814507484436, 0.07305335998535156, 0.1380634605884552, 0.3508715331554413, -0.5430355072021484, -0.20062273740768433, -0.5064359903335571, -0.28392210602760315, 0.6515441536903381, -0.2960398495197296, 0.09506139904260635,...
col++) { ret[row, col] = array[col]; } row++; } return ret; } ``` It's a slight shame that the above code uses T[] as the element type. Due to generic invariance I can't currently make source `IEnumerable<IEnumerable<T>>` which would be nice. An alternative might be to introduc...
[ -0.27639254927635193, -0.0619499646127224, 0.5550647377967834, -0.3029252886772156, -0.13358230888843536, 0.028595002368092537, 0.07489241659641266, -0.2180199921131134, -0.052998702973127365, -0.4499383866786957, -0.19582422077655792, 0.4239785671234131, -0.46025362610816956, 0.1882006824...
should work. (Obviously the implementation needs some changes too, but the basic principle is the same.)
[ 0.5002187490463257, 0.05583438649773598, 0.0727543979883194, 0.2388768196105957, 0.2895628809928894, -0.1234472244977951, 0.4088820219039917, -0.305555135011673, 0.04649992287158966, -0.42002490162849426, 0.05126054212450981, 0.7304193377494812, -0.019898302853107452, -0.1948726624250412, ...
Is it possible to build a .dmg file (for distributing apps) from a non-Mac platform? And if yes, how? It does seem possible to create DMG files with some third party tools. A quick google search reveals at least a few commercial tools: * [TransMac](http://www.asy.com/scrtm.htm) * [MagicISO](http://www.magiciso.com/dow...
[ 0.2824822962284088, 0.015027844347059727, 0.5248717665672302, 0.33063822984695435, -0.18573814630508423, -0.23639389872550964, -0.14412349462509155, -0.08216112852096558, -0.2689821720123291, -0.6709833145141602, -0.10270880162715912, 0.43218040466308594, -0.24572229385375977, 0.1819219738...
Does anyone know of an algorithm that I could use to find an "interesting" representative thumbnail for a video? I have say 30 bitmaps and I would like to choose the most representative one as the video thumbnail. The obvious first step would be eliminate all black frames. Then perhaps look for the "distance" betwe...
[ 0.4229467809200287, 0.02665369026362896, 0.2640489637851715, 0.3552076518535614, -0.2101670354604721, -0.12237519025802612, -0.08766492456197739, -0.28941887617111206, -0.2829335629940033, -0.4261055290699005, 0.0019242236157879233, 0.49979037046432495, -0.23030145466327667, 0.171355217695...
or nth frame to represent each shot. See [1]. However, let us assume you wish to find an interesting frame in a single continuous stream of frames taken from a single camera source. I.e. a shot. This is the "key frame detection" problem that is widely discussed in IR/CV (Information Retrieval, Computer Vision) texts. ...
[ 0.3266090750694275, -0.2314644306898117, 0.45120543241500854, 0.09664539247751236, -0.037028711289167404, 0.05877157673239708, 0.13825929164886475, -0.5403167009353638, -0.260212242603302, -0.6153163313865662, -0.18833903968334198, 0.35568395256996155, -0.14151091873645782, 0.0227014962583...
importance. As suggested by Beds, above. We pick the still frames using optic-flow and use that. * In [4] each frame is projected into some high dimensional content space, we find those frames at the corners of the space and use them to represent the video. * In [5] frames are evaluated for importance using their lengt...
[ 0.4185629189014435, -0.14024131000041962, 0.364520788192749, 0.4583764970302582, -0.2283303141593933, 0.03745239973068237, -0.6599282026290894, -0.11378445476293564, -0.36325740814208984, -0.46269941329956055, -0.15995244681835175, 0.31319287419319153, 0.12162777781486511, 0.23923307657241...
useful detailed summary of video abstraction (key-frame detection and summarisation). For your "find the best of 30 bitmaps" problem I would use an approach like [2]. Compute a frame representation space (e.g. a colour histogram for the frame), compute a histogram to represent all frames, and use the frame with the mi...
[ 0.10778884589672089, -0.0724538192152977, 0.14990369975566864, 0.2841159701347351, -0.3064466714859009, 0.15706069767475128, -0.1645187884569168, -0.6261897087097168, -0.22370770573616028, -0.5959149599075317, -0.0755174458026886, 0.2938513457775116, -0.0884600356221199, -0.151409566402435...
II, SPIE, 3229:46-55, 1997. 3. W. Wolf. Key frame selection by motion analysis. In IEEE International Conference on Acoustics, Speech, and Signal Processing, pages 1228-1231, 1996. 4. L. Zhao, W. Qi, S.Z. Li, S.Q. Yang, and H.J. Zhang. Key-frame extraction and shot retrieval using Nearest Feature Line. In IW-MIR, ACM M...
[ -0.13453739881515503, -0.2455637902021408, 0.20973096787929535, 0.31985267996788025, -0.6575871109962463, 0.13719135522842407, 0.08890789747238159, -0.7405909895896912, -0.33651378750801086, -0.23835349082946777, -0.42413902282714844, 0.6313889622688293, 0.04858740419149399, -0.05073069408...
I have a page P1 loading from site S1 which contains an iframe. That iframe loads a page P2 from another site S2. At some point P2 would like to close the browser window, which contains P1 loaded from S1. Of course, since P2 is loaded from another site, it can't just do parent.close(). I have full control over P1 and ...
[ 0.015169280581176281, 0.3653334975242615, -0.006224728189408779, -0.24941343069076538, -0.18123295903205872, -0.04548967629671097, 0.24891892075538635, 0.003812202485278249, -0.16530102491378784, -0.8162227272987366, -0.1431189328432083, 0.21759076416492462, -0.49585384130477905, 0.1112734...
rendered on is strictly prohibited due to security issues. However, if the iframe is pointed to the same site you can get to it like: ``` <iframe name = "frame1" src = "http://yoursite"> </iframe> <script type = "text/javascript"> alert(window.frames["frame1"].document); </script> ```
[ 0.1828603446483612, -0.016241487115621567, 0.6262390613555908, -0.4644326865673065, 0.1186530590057373, 0.20503006875514984, 0.4682074785232544, 0.16948352754116058, -0.10529038310050964, -0.6950397491455078, -0.5007004141807556, 0.4544704854488373, -0.2706759572029114, 0.12805761396884918...
Inspired by this [question](https://stackoverflow.com/questions/283561/extracting-leaf-paths-from-n-ary-tree-in-f) and [answer](https://stackoverflow.com/questions/283561/extracting-leaf-paths-from-n-ary-tree-in-f#283638), how do I create a generic permutations algorithm in F#? Google doesn't give any useful answers to...
[ -0.018915381282567978, -0.08351074904203415, 0.3688012659549713, 0.2995664179325104, -0.21215860545635223, -0.14919622242450714, 0.19045042991638184, -0.2614520490169525, -0.31506040692329407, -0.37212511897087097, 0.12836411595344543, 0.2821343243122101, -0.33304673433303833, -0.128093719...
for perm in permutations list (Set.add l taken) do yield l::perm } ``` The 'list' argument contains all the numbers that you want to permute and 'taken' is a set that contains numbers already used. The function returns empty list when all numbers all taken. Otherwise, it iterates over all numbers that ...
[ -0.12229955941438675, -0.09056425839662552, 0.5796619057655334, -0.46286025643348694, -0.0274403877556324, 0.3544873893260956, 0.004393943585455418, -0.614222526550293, -0.2908603847026825, -0.41361162066459656, -0.24614328145980835, 0.5720950961112976, -0.6762292981147766, 0.0691180527210...
because no numbers are used at the beginning: ``` permutations [1;2;3] Set.empty;; ```
[ -0.19439849257469177, 0.5213177800178528, 0.18890692293643951, -0.3017539381980896, -0.06384004652500153, -0.04281708225607872, 0.38687044382095337, -0.296222060918808, -0.11303771287202835, -0.27211475372314453, -0.8630914688110352, 0.16457384824752808, -0.4385441541671753, 0.301203727722...
It looks like the run-time compiler doesn't support the same language as the command-line compiler so if you want to use lambda expressions, extensions methods or LINQ, well, you're stuck. There's more detail here: <http://metadatalabs.com/blog/> Is this correct or is there a work-around? (Short of spawning the comm...
[ 0.7610948085784912, 0.5161886811256409, 0.11043550074100494, 0.06688064336776733, -0.11439324170351028, -0.19576531648635864, 0.7507134675979614, 0.06222307309508324, -0.3464546799659729, -0.2772994339466095, -0.06079399585723877, -0.0030519007705152035, -0.2441897988319397, 0.409331321716...
I was always wondering why such a simple and basic operation like swapping the contents of two variables is not built-in for many languages. It is one of the most basic programming exercises in computer science classes; it is heavily used in many algorithms (e.g. sorting); every now and then one needs it and one must ...
[ 0.0451318621635437, -0.29858967661857605, 0.0223318450152874, -0.008666937239468098, 0.09386736154556274, 0.02587909810245037, -0.2715921401977539, 0.02507362887263298, -0.02801677957177162, -0.49287840723991394, -0.14719967544078827, 0.3666616380214691, -0.35340383648872375, -0.3161873519...
created for reflecting the cumulative machine instructions, e.g. add ax,bx), or the ?? operator in C#. So, what is the reason? Or does it actually exist, and I always missed it? In my experience, it isn't that commonly needed in actual applications, apart from the already-mentioned sort algorithms and occasionally in ...
[ 0.3570155203342438, 0.14563699066638947, 0.17841707170009613, -0.141971156001091, -0.3337147831916809, 0.19259609282016754, 0.08995181322097778, 0.13406480848789215, -0.3691064417362213, -0.43893498182296753, 0.028688665479421616, 0.14465577900409698, -0.29197198152542114, -0.0939336121082...
additional semantics (e.g. being an atomic operation) it would be difficult to support on some processors, and if it didn't have the additional semantics then it's just (seldom used) synatatic sugar. The assigment operators (+= etc) were supported because these are much more common in real-world programs - and so the ...
[ -0.4022584557533264, -0.14772292971611023, 0.1373087614774704, 0.01744954288005829, -0.5321640968322754, 0.17097024619579315, 0.17684084177017212, 0.06734783947467804, -0.30582869052886963, -0.34777507185935974, -0.07711858302354813, 0.07331680506467819, -0.4936821162700653, -0.33285087347...
In relation to [another question](https://stackoverflow.com/questions/283431/why-would-an-command-not-recognized-error-occur-only-when-a-window-is-populated), how do you account for paths that may change? For example, if a program is calling a file in the same directory as the program, you can simply use the path ".\fo...
[ 0.28273555636405945, -0.021289736032485962, 0.12577641010284424, 0.053077615797519684, 0.0745823085308075, -0.12865377962589264, 0.16120369732379913, -0.12921042740345, -0.5133508443832397, -0.5281618237495422, -0.2321547269821167, 0.5924791693687439, -0.25819772481918335, -0.0915115252137...
the code. I want the program to be cross-platform, but I expect I may have to use **os.name** or something to determine which path code block to use. Simple answer: You work out the absolute path based on the environment. What you really need is a few pointers. There are various bits of runtime and environment inform...
[ 0.42997682094573975, -0.008493355475366116, 0.07116346806287766, 0.4569637179374695, 0.08760501444339752, -0.10368654131889343, 0.31699880957603455, 0.1245121881365776, -0.15670467913150787, -0.9036626219749451, -0.00014400047075469047, 0.7126004695892334, -0.2592235207557678, -0.225545033...
I once read in a book. 2. `__file__` - The location of the current module. 3. `sys.executable` - The location of the running Python. Now you can fairly much glean anything you want from these three sources. The functions from os.path will help you get around the tree: * `os.path.join('path1', 'path2')` - join path se...
[ -0.0652208924293518, -0.02944391965866089, 0.4869382083415985, -0.200968936085701, 0.0528712160885334, -0.08132985979318619, 0.23613321781158447, -0.08658512681722641, -0.19387879967689514, -0.8055674433708191, 0.03142716363072395, 0.6368241906166077, -0.1935044676065445, -0.22833929955959...
in the same directory import os this_script_path = os.path.abspath(__file__) this_dir_path = os.path.dirname(this_script_path) script2_path = os.path.join(this_dir_path, 'script2.py') print script2_path ``` And running it: ``` ali@work:~/tmp$ python script1.py /home/ali/tmp/script2.py ``` Now for your specific ca...
[ 0.18097348511219025, -0.09434423595666885, 0.339434951543808, -0.08212994784116745, 0.12523429095745087, -0.3556140661239624, 0.3876589238643646, -0.023678237572312355, -0.21580851078033447, -0.7952523231506348, -0.018304908648133278, 0.6934016942977905, -0.42069756984710693, 0.05554299056...
issues.
[ 0.007017891388386488, -0.004161785822361708, -0.004215272143483162, 0.083971306681633, 0.09288512915372849, 0.49960023164749146, -0.3130691945552826, -0.19004186987876892, -0.08855125308036804, -0.4507289528846741, -0.4864889085292816, 0.33270639181137085, 0.08658089488744736, -0.022279083...
I'm testing how the classes FileStream and StreamReader work togheter. Via a Console application. I'm trying to go in a file and read the lines and print them on the console. I've been able to do it with a while-loop, but I want to try it with a foreach loop. ``` using System; using System.Collections.Generic; using ...
[ 0.5259406566619873, 0.15341714024543762, 0.09973873943090439, -0.08194110542535782, 0.1264360100030899, 0.13762889802455902, 0.2464573085308075, -0.14912119507789612, -0.05148143693804741, -0.5002895593643188, 0.014442479237914085, 0.6522871851921082, -0.24140432476997375, 0.21659685671329...
Text Document.txt"; using(FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read)) { using(StreamReader sr = new StreamReader(fs)) { foreach(string line in file)
[ -0.014599847607314587, -0.27147674560546875, 0.8528183698654175, -0.3110733926296234, 0.13100731372833252, 0.22901538014411926, 0.2871164381504059, -0.26922541856765747, -0.049390796571969986, -0.7475706934928894, -0.46847718954086304, 0.6382468342781067, -0.20728538930416107, 0.2433937638...
{ Console.WriteLine(line); } } } } } } ``` The error I keep getting for
[ -0.12423097342252731, 0.3522595167160034, 0.40217146277427673, -0.2742821276187897, 0.3426784873008728, -0.1870253086090088, 0.4740562438964844, -0.04057616740465164, 0.12209837138652802, -0.5338204503059387, -0.06925767660140991, 0.5160185694694519, -0.1561468094587326, 0.3603506684303283...
this is: Cannot convert type 'char' to 'string' The while loop, which does work, looks like this: ``` while((line = sr.ReadLine()) != null) { Console.WriteLine(line); } ``` I'm probably overlooking something really basic, but I can't see it. To read all lines in New Text Document.txt: ``` using System; using S...
[ 0.1888647824525833, 0.020482219755649567, 0.37479066848754883, -0.21753671765327454, 0.06154928356409073, 0.10388743132352829, 0.4321741461753845, -0.14350208640098572, -0.059860583394765854, -0.48215511441230774, -0.3263112008571625, 0.49860256910324097, -0.3905266523361206, 0.24650365114...
using(FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read)) { using(StreamReader sr = new StreamReader(fs)) {
[ -0.032123684883117676, -0.42338019609451294, 0.5964425802230835, -0.004279855638742447, 0.17131179571151733, 0.08349210023880005, 0.14498409628868103, -0.35994192957878113, -0.16679738461971283, -0.7818597555160522, -0.36426272988319397, 0.6140426993370056, -0.16610601544380188, 0.20990225...
while(!sr.EndOfStream) { Console.WriteLine(sr.ReadLine()); } } } }
[ -0.3186698257923126, -0.23780988156795502, 0.42548617720603943, -0.3792731761932373, 0.520599901676178, 0.0630163699388504, 0.614724338054657, -0.007228342816233635, 0.31664595007896423, -0.377218097448349, -0.143850177526474, 0.5182546973228455, -0.12662410736083984, 0.08078493922948837, ...
} } ```
[ 0.17493881285190582, 0.41805654764175415, 0.05209751054644585, -0.04864929988980293, 0.437467485666275, -0.15825650095939636, 0.13202530145645142, 0.5446501970291138, 0.35430577397346497, -0.4846813380718231, -0.2295716553926468, 0.546978771686554, -0.3188462555408478, 0.2798506021499634, ...
I have a checkbox in GridViewColumn which i use for show/change database value. The click event for the checkbox is used for change value in the database. For handling the state of property "IsChecked" I'm using datatrigger and a setter, se xaml code below: ``` <Style TargetType="CheckBox"> <Setter Property="IsEna...
[ 0.10007525235414505, -0.002421828219667077, 0.6313868761062622, -0.13638749718666077, -0.11922185868024826, -0.3840368390083313, -0.0793851837515831, -0.6418554186820984, -0.18532583117485046, -1.0389864444732666, 0.12734359502792358, 0.3852558434009552, -0.12341050803661346, 0.18174518644...
until I click the checkbox. After I clicked the checkbox for the first time the state of the property "IsChecked" don't updates if a manually in the Database change the value which i mapped to the property "IsChecked". If I map for example the same value to the property "Content" of the checkbox the trigger works fine...
[ 0.15934023261070251, 0.07999882102012634, 0.5192667245864868, 0.019682100042700768, 0.09464006870985031, -0.4637218117713928, 0.39305436611175537, -0.479281485080719, -0.18724864721298218, -0.5117120146751404, -0.06228991225361824, 0.7706297039985657, -0.38039153814315796, 0.01213097479194...
</Style> ```
[ 0.42410463094711304, 0.4974881112575531, -0.12317495793104172, -0.07129047811031342, 0.08007148653268814, -0.25484296679496765, 0.3634651303291321, 0.3617338538169861, -0.08043818920850754, -0.6761009693145752, -0.5901734828948975, 0.2401956021785736, 0.0717342346906662, -0.013225332833826...
I want to print styled html pages with their images from a script. Can anyone suggest an open-source solution? I'm using linux (Ubuntu 8.04) but would be also be interested in solutions for other operating systems. You could give [html2ps](http://user.it.uu.se/~jan/html2ps.html) a try, it is written in Perl, so I gues...
[ 0.7135518789291382, -0.003913314081728458, 0.6167570352554321, 0.04815424233675003, -0.24565790593624115, -0.07359311729669571, 0.04566534608602524, 0.07957927137613297, -0.02432672120630741, -0.7795699238777161, 0.054929785430431366, 0.44254374504089355, -0.24522003531455994, 0.0250684767...
|lpr ``` Or pipe the output to ps2pdf to convert to a pdf file: ``` html2ps \ http://stackoverflow.com/questions/286583 \ |ps2pdf - stackoverflow.pdf ```
[ -0.20964258909225464, 0.1312708556652069, 0.6589414477348328, 0.03978303447365761, 0.05513478070497513, 0.007274242118000984, -0.27523326873779297, -0.3657308518886566, -0.38939857482910156, -0.46384990215301514, -0.3875579237937927, 0.4587562084197998, -0.348768949508667, -0.3377316892147...
I have been involved in a lot of projects, both old and new, and one thing that they have in common is that almost none of them have been using unit testing. I prefer to use it, but often the customer isn´t ready to pay for that, and suppose that the code just works as it should. So, do you use unit testing in your pr...
[ 1.1149661540985107, 0.4821312129497528, -0.5872271656990051, 0.16317827999591827, -0.05085287243127823, 0.2271709442138672, 0.32229140400886536, 0.22907555103302002, -0.046156372874975204, -0.6887494921684265, 0.2549114525318146, 0.52838534116745, 0.4036753475666046, -0.02855023182928562, ...
to understand and to refactor, with an untold reduction in maintenance time. A full discussion of the benefits here: [Is Unit Testing worth the effort?](https://stackoverflow.com/questions/67299/is-unit-testing-worth-the-effort)
[ 0.4656791090965271, 0.19297441840171814, -0.14325304329395294, 0.24936528503894806, -0.026369379833340645, 0.03527313470840454, 0.36048415303230286, -0.5227665901184082, -0.11738375574350357, -0.3234015107154846, 0.15342876315116882, 0.9475557208061218, 0.5231838822364807, -0.1725618243217...
I normally work on single threaded applications and have generally never really bothered with dealing with threads. My understanding of how things work - which certainly, may be wrong - is that as long as we're always dealing with single threaded code (i.e. no forks or anything like that) it will always be executed in ...
[ 0.6182553768157959, 0.007719061337411404, 0.12730851769447327, 0.044016193598508835, -0.2170117348432541, -0.30124571919441223, 0.35407987236976624, 0.19469095766544342, -0.3233753442764282, -0.5998497009277344, -0.05495553836226463, 0.5193819403648376, -0.27546465396881104, 0.117605738341...
on 10 threads) but I'm guessing that this shouldn't affect me? How does this apply to COM? For instance, if I were to create an instance of a COM component in my code; and that COM component writes some information to a thread-based location (using `System.Threading.Thread.GetData` for instance) will my application be...
[ 0.22673210501670837, 0.02376456931233406, 0.3068990111351013, 0.16150036454200745, 0.26750728487968445, 0.17442472279071808, 0.2306705266237259, -0.019247451797127724, -0.4067201614379883, -0.7962900400161743, 0.012556410394608974, 0.5300669074058533, -0.25962308049201965, 0.11736744642257...
stores some information in a thread-based location, can that be similarly retrievable from anywhere else? UI usually has the opposite constraint (sadly): it's single threaded and everything must happen on that thread. The easiest way to check if you are always in the same thread (for, say, a function) is to have an in...
[ 0.080864816904068, 0.048199497163295746, 0.45367157459259033, 0.38356542587280273, 0.3203529417514801, -0.45471301674842834, 0.2109348177909851, -0.02329367958009243, -0.20400461554527283, -0.6411679983139038, -0.14590702950954437, 0.23275557160377502, -0.19320759177207947, 0.5303937196731...
have a global scope ? About the second question, most COM code runs on a single thread and, most often, on the thread where your UI message processing lives - this is because most COM code is designed to be compatible with VB6 which is single-thread. The reason your program has about 10 threads is because both Window...
[ 0.10922273248434067, -0.025668790563941002, 0.5272006392478943, 0.16626112163066864, 0.016080990433692932, -0.08610943704843521, 0.17104727029800415, 0.30969783663749695, -0.7130841016769409, -0.6656486988067627, -0.046536896377801895, 0.4091011881828308, -0.12902048230171204, 0.0907707288...
Is there any open source Object Database available? I would like to have a look at the source code and see how stuffs are implemented. <http://www.zope.org/Wikis/ZODB> is the first coming to mind, but here's a list of both commercial and open source object databases: <http://www.odbms.org/vendors.html>
[ 0.5828865170478821, 0.029890771955251694, -0.11374679207801819, 0.3118184208869934, -0.0771128386259079, -0.3758700489997864, -0.19102534651756287, 0.4537167251110077, -0.4074733555316925, -0.42009761929512024, 0.25309306383132935, 0.37093213200569153, 0.024119999259710312, 0.2264269441366...
The Exception class in Delphi 2009 received a number of new features. A number of them are related to getting a stacktrace: * **property** StackTrace: **string** **read** GetStackTrace; * **property** StackInfo: Pointer **read** FStackInfo; * **class var** GetExceptionStackInfoProc: **function** (P: PExceptionRecord):...
[ -0.30169686675071716, -0.1053055003285408, 0.6249617338180542, -0.06005023792386055, -0.07551254332065582, -0.2657662034034729, 0.19828744232654572, -0.15101060271263123, -0.5131312608718872, -0.4542793929576874, 0.00566096929833293, 0.7149007320404053, -0.10738176107406616, -0.24908465147...
lot of depth. To me this looks like a framework where you can plug in your own stack tracing. I guess this might be used internally in the IDE with JCLDebug. Perhaps it's intended for users to be able to supply madExcept or another implementation.
[ 0.6007100939750671, -0.32418251037597656, -0.057764146476984024, 0.1305072009563446, -0.0946103185415268, -0.132149338722229, -0.1960737556219101, -0.031625524163246155, -0.1765916496515274, -0.3320330083370209, 0.38023462891578674, 0.42157667875289917, 0.0733875036239624, 0.03767531365156...
Is there a way to find all web pages that implement a specific master page in Visual Studio? I'm looking for a shortcut like shift F12 that will find all usages of a master page. When I do it on the master page class name it only takes me to the design view instead of showing all pages that use it. I do have Resharpe...
[ 0.638575553894043, -0.037534378468990326, 0.15379787981510162, 0.20377978682518005, -0.379638671875, -0.07229004055261612, 0.26579445600509644, 0.1329377144575119, -0.1823326200246811, -0.7325686812400818, 0.3397826850414276, 0.7121764421463013, 0.037116121500730515, -0.15213821828365326, ...
web.config or in the Page\_PreInit event, which make it impossible to know exactly which master page is going to be used. What MasterPage to you think is used here? ``` protected void Page_PreInit(object o) { this.Master = GetMasterFromDataBase(HttpContext.Current.User.Username); } ``` As you can see, there is no...
[ 0.3512464165687561, -0.11219392716884613, 0.4168967306613922, 0.030169684439897537, -0.037365008145570755, -0.5046753883361816, 0.28657227754592896, 0.12227582186460495, -0.49084895849227905, -1.0959683656692505, -0.23926487565040588, 0.2974364161491394, -0.4666474759578705, 0.446809172630...
What options do I have to read the roles of the current user from my JSP pages? I'm aware of the `visibleOnUserRole="myRole"` attribute on Tomahawk components, but I need roles for a bit more complicated things than simple visibility. The [ExternalContext](http://docs.oracle.com/javaee/6/api/javax/faces/context/Externa...
[ -0.3904385268688202, -0.15458492934703827, 0.5380730032920837, -0.1613338142633438, 0.08044414222240448, 0.3040893077850342, 0.3829139471054077, -0.15351910889148712, -0.3191266357898712, -0.5780279040336609, -0.15950721502304077, 0.782026469707489, -0.19277165830135345, -0.046775083988904...
return null; } return principal.getName(); } public String getUser() { FacesContext context = FacesContext.getCurrentInstance(); return context.getExternalContext().getRemoteUser(); } public boolean isManager() { FacesContext context = FacesContext.getCurrentIns...
[ -0.32220467925071716, -0.21764810383319855, 0.30215221643447876, -0.30591946840286255, 0.07469411939382553, -0.028984930366277695, 0.5367797613143921, -0.32416483759880066, -0.348986953496933, -0.446209192276001, -0.504647970199585, 0.6315844058990479, -0.46453163027763367, 0.1553564518690...
[HttpServletRequest](http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html). You can use managed beans to expose values to the view via the [Expression Language](http://docs.oracle.com/javaee/6/tutorial/doc/bnahq.html). ``` <f:view> <h:outputLabel value="#{rolesBean.userPrincipalName}" />...
[ 0.028752099722623825, 0.24462297558784485, 0.288307249546051, -0.3539898097515106, -0.042739853262901306, 0.26495376229286194, -0.1902041882276535, -0.03653629496693611, -0.29731252789497375, -0.6812685132026672, -0.24015843868255615, 0.5909243226051331, -0.2747683525085449, -0.12217374145...
I need to get a file from sourcesafe database programmatically. Any idea of how to do it? ps: I'll do that by using C#. ``` using System; using System.Collections.Generic; using SourceSafeTypeLib; namespace YourNamespace { public class SourceSafeDatabase { private readonly string dbPath; private readonly s...
[ 0.2946855127811432, 0.009859605692327023, 0.3269064128398895, -0.042719289660453796, 0.25225740671157837, -0.048534441739320755, 0.45281362533569336, -0.448224276304245, 0.29985201358795166, -0.9985480904579163, -0.008490510284900665, 0.5698174238204956, -0.168755441904068, 0.1242194995284...
= username; this.password = password; this.rootProject = rootProject; vssDatabase = new VSSDatabaseClass(); } public List<string> GetAllLabels() { List<string> allLabels = new List<string>(); VSSItem item = vssDatabase.get_VSSItem(rootProject, false); IVS...
[ -0.07839971780776978, -0.3109363317489624, 0.7818183898925781, -0.32017797231674194, 0.09027447551488876, 0.04141252487897873, 0.6526858806610107, -0.4246213138103485, -0.3702481687068939, -0.6334871649742126, -0.5360774993896484, 0.43432366847991943, -0.2640478014945984, 0.383129805326461...
{ if (version.Label.Length > 0) { allLabels.Add(version.Label); } } return allLabels; } public void GetLabelledVersion(string label, string project, string directory) {
[ 0.2972046732902527, -0.418742299079895, 0.49330106377601624, -0.07091501355171204, -0.07624896615743637, -0.05384809151291847, 0.37677001953125, -0.17149534821510315, -0.16346019506454468, -0.5012359023094177, -0.4048328697681427, 0.42618271708488464, -0.3525661528110504, 0.256383627653121...
string outDir = directory; vssDatabase.get_VSSItem(rootProject, false).get_Version(label).Get(ref outDir, (int)VSSFlags.VSSFLAG_RECURSYES + (int)VSSFlags.VSSFLAG_USERRONO); } public void Open() { vssDatabase.Open(dbPath, username, password); } public void Close() { vssD...
[ -0.08392572402954102, -0.04316655918955803, 0.5619011521339417, -0.308826208114624, 0.1386914998292923, 0.013417080976068974, 0.48540589213371277, -0.48906373977661133, 0.03055792674422264, -0.5788841843605042, -0.5277373790740967, 0.42599278688430786, -0.583625316619873, 0.357131898403167...
We are considering switching from MS Visual Studio 2003 to MS Visual Studio 2005 for our C++ development. I think jumping to 2008 might be better. In what ways are VS2008 better than VS2005 for C++ development? Are there any disadvantages of VS2008 over VS2005? There are very little difference between 2005 and 2008 f...
[ -0.19732044637203217, -0.25060880184173584, 0.6719820499420166, 0.11580345034599304, -0.31627726554870605, 0.27927348017692566, 0.08224505186080933, -0.11726120114326477, -0.33871355652809143, -0.4944981634616852, -0.07392384111881256, 0.6979214549064636, -0.38926148414611816, -0.054186362...
option for multicore compilation (a huge timesaver if you have a mutlicore computer) * some improved debugging options for multithreaded applications There are also some additional downloadable feature packs for 2008 only: * TR1 libraries * new MFC
[ -0.10291852802038193, -0.11342553794384003, 0.17537616193294525, 0.5290167331695557, 0.014543886296451092, -0.18754859268665314, 0.3688105046749115, -0.2271645963191986, -0.49844419956207275, -0.7099595665931702, -0.2750301957130432, 0.7250791192054749, -0.1851489245891571, -0.070273846387...
I have a MySQL (v 5, MyISAM) query that returns different rows depending on date string format. ``` (1) IFNULL(date1, ADDDATE('2008/10/31 23:59:59',INTERVAL 1 DAY)) > '2008-10-31 23:59:59' (2) IFNULL(date1, ADDDATE('2008/10/31 23:59:59',INTERVAL 1 DAY)) > '2008/10/31 23:59:59' (3) date1 > '2008-10-31 23:59:59' (4) da...
[ -0.22177451848983765, 0.054016754031181335, 0.8217809200286865, -0.16508743166923523, -0.21936583518981934, 0.35809627175331116, 0.2572367191314697, -0.22043399512767792, 0.12115113437175751, -0.5875843167304993, -0.2475038319826126, 0.26943182945251465, 0.02725512534379959, 0.352903962135...
parts. For example, '98-12-31 > 11:30:45', '98.12.31 11+30+45', > '98/12/31 11\*30\*45', and '98@12@31 > 11^30^45' are equivalent. In your examples 1 and 2 you're using ADDDATE... this will always return a date with a '-' separator, no matter what the input format: ``` +--------------------------------------------...
[ -0.374757319688797, -0.3975180983543396, 0.5701770186424255, 0.11065592616796494, -0.2543448209762573, 0.5489753484725952, 0.038770273327827454, -0.2880033254623413, -0.1880263090133667, -0.23468881845474243, -0.1710740327835083, 0.23908619582653046, 0.054297901690006256, 0.156944811344146...
a date: ``` mysql> SELECT IFNULL(null, ADDDATE('2008/10/31 23:59:59',INTERVAL 1 DAY)) > '2008/10/31 23:59:59'; +-------------------------------------------------------------------------------------+ | IFNULL(null, ADDDATE('2008/10/31 23:59:59',INTERVAL 1 DAY)) > '2008/10/31 23:59:59' | +-------------------------------...
[ -0.40673884749412537, -0.32106250524520874, 0.8216545581817627, -0.06529778242111206, -0.10322563350200653, 0.2619931995868683, 0.1803855150938034, -0.1221313625574112, -0.11179687082767487, -0.5277648568153381, -0.35490599274635315, 0.08345327526330948, -0.07834190875291824, 0.47535306215...
0 | +-------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> SELECT CAST(IFNULL(null, ADDDATE('2008/10/31 23:59:59',INTERVAL 1 DAY)) AS DATE) > '2008/10/31 23:59:59'; +-----------------------------------------------------------------------------------------...
[ -0.6326832175254822, -0.3531072735786438, 0.7983771562576294, 0.17533299326896667, 0.07116860896348953, 0.5066410303115845, 0.1325729787349701, -0.20810054242610931, 0.1754181832075119, -0.6740732789039612, -0.4330824017524719, 0.2822039723396301, -0.12642425298690796, 0.11683386564254761,...
1 | +---------------------------------------------------------------------------------------------------+ ```
[ -0.2519042193889618, 0.21732304990291595, 0.41192758083343506, -0.21198782324790955, -0.14250054955482483, -0.18485680222511292, 0.10185401886701584, -0.041130151599645615, 0.07032319158315659, -0.5954912304878235, -0.4372585117816925, 0.49588721990585327, -0.7189944982528687, -0.011678549...
I'm currently using abcPDF 7 to convert HTML to PDF. This is done via an ASPX page where I override the Render method. ``` Doc theDoc = new Doc(); theDoc.SetInfo(0, "License", m_License ); theDoc.HtmlOptions.Paged = true; theDoc.HtmlOptions.Timeout = 1000000; string callUrl = "http:// my app page"; theDoc.AddImageUrl...
[ 0.052807290107011795, 0.11252249032258987, 1.0941475629806519, -0.3113834857940674, -0.04214077442884445, 0.10792451351881027, 0.31266820430755615, -0.5333555936813354, -0.03503428399562836, -0.7621611952781677, -0.39944013953208923, 0.6953220367431641, -0.4073663651943207, -0.101777918636...
be found [here](http://www.websupergoo.com/helppdf5net/source/5-abcpdf5/doc/1-methods/addimagetochain.htm)
[ 0.11249058693647385, -0.20698054134845734, 0.13084779679775238, 0.18211787939071655, 0.18667730689048767, -0.01301252469420433, 0.1894499808549881, -0.12653151154518127, -0.38765856623649597, -0.36851930618286133, -0.320564329624176, 0.45837998390197754, -0.28188201785087585, -0.1217115148...
I like the idea of CardSpace but unlike OpenID it seems like a real PITA to support it in your ASP.NET web application. I've found many examples, even a tutorial in one of the books I own... but it would seem a lot more is required than what they suggest. Changes to the server and such? Can someone tell me: * What ...
[ 0.3753430247306824, 0.03919452056288719, 0.169161856174469, 0.026050612330436707, -0.04622381180524826, -0.2824832797050476, 0.2948814630508423, -0.0013456289889290929, -0.36948132514953613, -0.9157326817512512, 0.16524499654769897, 0.40699267387390137, -0.010078816674649715, -0.0974866375...
what others think about this, but lets not turn this into a flame war, I just want a solution and perhaps your thoughs in short) I have blogged about that, but it is in Swedish. I hope we can rely on google translate. :-) [Get Started](http://translate.google.com/translate?u=http%3A%2F%2Fweblogs.asp.net%2Fmikaelsoders...
[ 0.14955559372901917, 0.35650375485420227, 0.45874929428100586, 0.21538357436656952, -0.40667781233787537, -0.37500420212745667, 0.5020283460617065, -0.5473594069480896, -0.14198580384254456, -0.7823201417922974, -0.19666188955307007, 0.47132545709609985, 0.030152514576911926, 0.00556892575...
Here's the deal - I want a way to figure out specifically which methods were touched or changed within the last milestone/iteration so that the methods' Javadoc is checked for correct content, especially for the public API methods. Any ideas on how to do this, perhaps with an SVN hook? I'm pretty sure C-style casting ...
[ 0.5606727004051208, 0.07649540156126022, -0.06176995113492012, 0.12254288792610168, -0.08946780860424042, -0.2528989613056183, -0.030961498618125916, -0.12446269392967224, 0.01611623726785183, -0.4108216166496277, 0.11153554916381836, 0.7548539042472839, -0.13582120835781097, -0.1429381221...
In my application, originally built with Delphi 7, I use the SPHelpIntegration code to enable CHM help via the F1 interface. I figured that this wasn't needed in Delphi 2007, so I removed the units and built my app. I then press F1 and get a message that no help interface is installed. The online help doesn't tell me a...
[ -0.17992007732391357, 0.22647877037525177, 0.5598254799842834, -0.1915164291858673, -0.3504517674446106, 0.09161148965358734, 0.1558142751455307, 0.009247742593288422, -0.02922254614531994, -0.5574667453765869, 0.010999117977917194, 0.7308921217918396, -0.4073618948459625, -0.3307961523532...
issue in using them is they must exist on the local system (not a network share) to view properly. There is a registry hack to change this behavior, but I have found it easier to just install the help files locally on the system. Lately rather than CHM files, I used the [Adobe OpenPDFParameters API](http://www.adobe....
[ 0.18833258748054504, -0.10202039778232574, 0.26904597878456116, 0.3138670325279236, -0.16852685809135437, -0.18358035385608673, 0.25103476643562317, -0.4314320385456085, -0.27918609976768494, -0.41591399908065796, -0.17439493536949158, 0.44427281618118286, -0.3843453526496887, -0.240272179...
but who doesn't now days?
[ 0.33586257696151733, 0.1914786547422409, 0.2655028700828552, -0.05844784900546074, 0.08582915365695953, -0.07500367611646652, 0.27360275387763977, 0.361805260181427, -0.36694201827049255, -0.1799868643283844, 0.056076064705848694, -0.07690944522619247, 0.11121752858161926, 0.25966674089431...
I need a Javascript application that, when run, prompts a password to be entered, and if the password is correct, the script causes the webpage to close. If the password is incorrect, the script prompts for the password to be entered again. I'm planning on loading this script onto my cell phone, which doesn't have a p...
[ 0.04944188892841339, 0.252666175365448, 0.5183992385864258, -0.34721437096595764, 0.24858804047107697, -0.3192039430141449, 0.7341780066490173, -0.21654805541038513, 0.057935915887355804, -0.9993101954460144, -0.30671676993370056, 0.44252118468284607, -0.14543034136295319, -0.0036066002212...
I have a need to reference two different versions of the Sharepoint API dll. I have a webservice that needs to run under both Sharepoint 2 and Sharepoint 3, but also needs to work with new features provided by the Sharepoint 3 API (Checkout and Content Approval) What is the best way to acheive this - I'm currently lea...
[ 0.5792742371559143, 0.06657738983631134, 0.03716093674302101, 0.04414528235793114, -0.2502906024456024, -0.3257838785648346, 0.15878403186798096, -0.20897002518177032, 0.03626139834523201, -0.7443302869796753, 0.1996598094701767, 0.5932400226593018, -0.3582192361354828, -0.0038585946895182...
API and .NET 2.0 compiled against WSSv3 assembly. It will work for VS 2005 and 2008. You will need to use MSBEE <http://www.codeplex.com/Wiki/View.aspx?ProjectName=MSBee> [Working with .NET 1.1 with Visual Studio 2008](http://devlicio.us/blogs/ziemowit_skowronski/archive/2008/08/22/working-with-net-1-1-in-visual-stud...
[ 0.3277934491634369, -0.1529749631881714, 0.35329705476760864, -0.11640989035367966, -0.3155333995819092, 0.09736409783363342, 0.1068195179104805, -0.5270478129386902, -0.09622696042060852, -0.6033621430397034, 0.2888091206550598, 0.6838283538818359, -0.6597660183906555, -0.1982423961162567...
#endif ``` If you get a compiler error but the code looks right it may be that the error is only for .NET1.1 / WSSv2 and compiles fine in .NET2/WSSv3. Check the output tab to see for which target the error occurred You will also need to master some MSBUILD ninja moves to keep a 1 step build process and keep yourself...
[ 0.355225533246994, -0.21481145918369293, 0.2913876473903656, -0.13506945967674255, -0.1340254247188568, -0.08168953657150269, 0.8133641481399536, -0.4981873035430908, 0.022609800100326538, -0.4604538679122925, 0.08066889643669128, 0.9558908343315125, -0.18624892830848694, -0.04613912850618...
help you work out where errors occurred. ``` <Target Name="BeforeBuild"> <Message Text="--- Building for .NET 1.1 ---" Importance="high" Condition="'$(TargetFX1_1)'=='true'" /> <Message Text="--- Building for .NET 2.0 ---" Importance="high" Condition="'$(TargetFX1_1)'!='true'" /> </Target> <Target Name="AfterB...
[ -0.12277673929929733, 0.08777659386396408, 0.15793530642986298, -0.04629062861204147, 0.021022014319896698, -0.14063546061515808, 0.4799988865852356, -0.43754518032073975, 0.07191377878189087, -0.8610183000564575, -0.09161411225795746, 0.7318798899650574, -0.1523115038871765, -0.1965238749...
I have the VS2005 standard edition and MS says this: > Note: The Windows Service Application > project templates and associated > functionality are not available in the > Standard Edition of Visual Basic and > Visual C# .NET... Is it possible to write a Windows Service application without upgrading my VS2005 Stan...
[ 0.28563451766967773, -0.05468673259019852, 0.7306756377220154, -0.17995081841945648, 0.01719309203326702, -0.13306035101413727, 0.3637131452560425, -0.3133506774902344, -0.13431516289710999, -0.8111135959625244, -0.23190903663635254, 0.6983795166015625, -0.1651250571012497, 0.2097890824079...
System.ServiceProcess; using System.Text; using System.Timers; namespace SrvControl { public partial class Service1 : ServiceBase { Timer mytimer; public Service1() { InitializeComponent(); } protected override void OnStart(string[] args) { ...
[ 0.14088787138462067, -0.1893034130334854, 0.4332607686519623, -0.6238143444061279, 0.2528141438961029, 0.34383663535118103, 0.6801527738571167, -0.03651854768395424, -0.09524684399366379, -0.5252538919448853, -0.5432088971138, 0.34465935826301575, -0.27163130044937134, 0.4495866298675537, ...
mytimer = new Timer(5 * 1000.0); mytimer.Elapsed += new ElapsedEventHandler(mytimer_Elapsed); mytimer.Start(); } void mytimer_Elapsed(object sender, ElapsedEventArgs e) { var srv = new ServiceController("MYSERVICE");
[ 0.042380236089229584, -0.17244523763656616, 1.0438679456710815, -0.43890801072120667, 0.3898717164993286, 0.3420831263065338, 0.5412508249282837, -0.39883092045783997, -0.23033031821250916, -0.4464018940925598, -0.2978535294532776, 0.4968939423561096, -0.10575153678655624, 0.59408777952194...
AppLog.Log(string.Format("MYSERVICE Status {0}", srv.Status)); } protected override void OnStop() { mytimer.Stop(); } } public static class AppLog { public static string z = "SrvControl"; static EventLog Logger = null; public
[ -0.2935478687286377, -0.237850159406662, 0.6170853972434998, -0.0077763507142663, 0.40395990014076233, 0.183720663189888, 0.3169046938419342, -0.07367340475320816, -0.40574705600738525, -0.3167003393173218, -0.6738274693489075, 0.651235044002533, -0.6283848285675049, 0.06602797657251358, ...
static void Log(string message) { if (Logger == null) { if (!(EventLog.SourceExists(z))) EventLog.CreateEventSource(z, "Application"); Logger = new EventLog("Application");
[ -0.3341606557369232, -0.49380606412887573, 0.30342599749565125, -0.2162993997335434, 0.17429058253765106, 0.06470713019371033, 0.2815805971622467, -0.06029140204191208, -0.3000178039073944, -0.4785344898700714, -0.5944179892539978, 0.43922245502471924, -0.569980263710022, 0.240456148982048...
Logger.Source = z; } Logger.WriteEntry(message, EventLogEntryType.Information); } } } ```
[ -0.2933119535446167, -0.03457215055823326, 0.18798936903476715, -0.250105082988739, 0.09821036458015442, -0.19849133491516113, 0.31852298974990845, -0.01800045184791088, -0.10994517803192139, -0.5082349181175232, -0.33328545093536377, 0.486310750246048, -0.4168989360332489, 0.3333371579647...
**Let's share Java based web application architectures!** There are lots of different architectures for web applications which are to be implemented using Java. The answers to this question may serve as a library of various web application designs with their pros and cons. While I realize that the answers will be subj...
[ 0.8012669682502747, 0.42981958389282227, 0.023118706420063972, 0.3957578241825104, 0.01117586251348257, 0.03216329589486122, 0.30400165915489197, 0.07768677920103073, -0.042913567274808884, -0.7036154866218567, 0.2114657312631607, 0.4901743233203888, 0.038090962916612625, 0.011433896608650...
you describe. And last but not least, *when* should we use your architecture? I'll start... --- Overview of the architecture ============================ We use a 3-tier architecture based on open standards from Sun like Java EE, Java Persistence API, Servlet and Java Server Pages. * Persistence * Business * Prese...
[ 0.11386473476886749, 0.4034193754196167, 0.42412135004997253, 0.011792618781328201, -0.041975703090429306, -0.0790758952498436, 0.1653311848640442, -0.10521102696657181, -0.29325106739997864, -0.9614995121955872, -0.17754310369491577, 0.6145420670509338, -0.20667718350887299, 0.12309840321...
we are using ([Java Persistence API](http://java.sun.com/javaee/technologies/persistence.jsp)) JPA and we currently use [Hibernate](http://www.hibernate.org/) as our persistence provider and use [its EntityManager](http://www.hibernate.org/397.html). This layer is divided into multiple classes, where each class deals ...
[ 0.3092650771141052, -0.05897365137934685, 0.7598087787628174, 0.1703280508518219, 0.10619684308767319, -0.10698333382606506, 0.0080143753439188, -0.04746697098016739, -0.27597302198410034, -0.3496570587158203, -0.256356805562973, 0.2705545723438263, 0.01680620014667511, 0.4000156819820404,...
wants to pay for a product on-line using her/his credit card. It could just as well be creating a new user, deleting a user or calculating the outcome of a battle in a web based game. This layer is divided into multiple classes and each of these classes is annotated with `@Stateless` to become a [Stateless Session Bea...
[ 0.24249443411827087, -0.13066451251506805, 0.31225115060806274, 0.09676972776651382, 0.20372489094734192, -0.046267781406641006, -0.033820729702711105, -0.060478463768959045, -0.28917330503463745, -0.6027344465255737, -0.11804181337356567, 0.22510682046413422, -0.11795222014188766, 0.23542...
persistence layer. A rough sketch of two methods in `AccountManager` could be: ``` ... public void makeExpiredAccountsInactive() { AccountManagerPersistence amp = new AccountManagerPersistence(...) // Calls persistence layer List<Account> expiredAccounts = amp.getAllExpiredAccounts(); for(Account accou...
[ -0.0415138304233551, 0.054054584354162216, 0.8775703310966492, -0.27290135622024536, 0.20749631524085999, -0.14159901440143585, 0.2636980712413788, -0.40144073963165283, -0.2853735685348511, -0.4743010401725769, 0.007078996859490871, 0.8209405541419983, -0.14848880469799042, 0.184615239500...
hood is we initiate a transaction when entering the SLSB method and commit it (or rollback it) immediately before exiting the method. It's an example of convention over configuration, but we haven't had a need for anything but the default, Required, yet. Here is how The Java EE 5 Tutorial from Sun explains the [Requir...
[ 0.4593204855918884, -0.2148827612400055, 0.4233796298503876, -0.14475838840007782, -0.01865490712225437, -0.3661317229270935, 0.010694938711822033, -0.48550719022750854, -0.20931817591190338, -0.02042240835726261, 0.03056262992322445, 0.7030860185623169, -0.13005277514457703, -0.1988051831...
new transaction before running the > method. > > > The Required attribute is the implicit > transaction attribute for all > enterprise bean methods running with > container-managed transaction > demarcation. You typically do not set > the Required attribute unless you need > to override another transaction > ...
[ -0.041145116090774536, 0.0030335441697388887, 0.7874457240104675, 0.11928801983594894, -0.2747105360031128, -0.5098516345024109, -0.20426099002361298, -0.05733022838830948, -0.3478161692619324, -0.9031797647476196, -0.3030237555503845, 0.37631359696388245, -0.19754406809806824, 0.066240310...
old [Servlet](http://java.sun.com/products/servlet/)'s + Java Server Pages ([JSP](http://java.sun.com/products/jsp/)) combination. The layer calls methods in *managers* of the business layer to perform operations requested by the user and to receive information to show in the web page. Sometimes the information receiv...
[ 0.3182474374771118, 0.06190696731209755, 0.4116206467151642, 0.039617810398340225, 0.04413941130042076, -0.12295747548341751, 0.05107204616069794, -0.44203779101371765, -0.26895952224731445, -0.6900832653045654, -0.37505972385406494, 0.22582682967185974, -0.29680976271629333, 0.24545365571...
our presentation layer into something else, and it's likely that we will if we find something better. * Letting the EJB container manage transaction boundaries is nice. * Using Servlet's + JPA is easy (to begin with) and the technologies are widely used and implemented in lots of servers. * Using Java EE is supposed to...
[ 0.21924181282520294, -0.040939655154943466, 0.2751426100730896, 0.09554623067378998, -0.5698239207267761, -0.41683024168014526, 0.28871700167655945, 0.062306005507707596, -0.2722182273864746, -0.7903274297714233, -0.15118123590946198, 0.2101053148508072, -0.20333749055862427, 0.14310060441...
If you have as much as possible related to persistence in the persistence classes, as in our architecture, this will spread out the locations where you may find queries to include the JPA entities as well. It will be harder to overview persistence operations and thus harder to maintain. * We have JPA entities as part o...
[ 0.18969029188156128, 0.22494550049304962, 0.15025512874126434, 0.30982547998428345, -0.13923704624176025, 0.0005683692870661616, 0.41363683342933655, 0.2522904872894287, -0.2555297911167145, -0.6350525617599487, -0.07908450067043304, 0.5437172651290894, -0.04512239992618561, 0.145663961768...
are created like Data Transfer Objects ([DTO](http://en.wikipedia.org/wiki/Data_Transfer_Object)'s), also known as Value Objects (VO's). This results in an [anemic domain model](http://en.wikipedia.org/wiki/Anemic_Domain_Model) as the business objects have no logic of their own except accessor methods. All logic is don...
[ 0.354117214679718, 0.09430843591690063, 0.39385977387428284, 0.37163951992988586, 0.18660980463027954, -0.10308488458395004, 0.21318040788173676, 0.08303362131118774, -0.29805874824523926, -0.6917403340339661, -0.4936402142047882, 0.18820315599441528, -0.32904455065727234, 0.43230542540550...
There are lots of issues with using Servlet's + JPA. Use Google for more information about these issues. * As the transactions are closed when exiting the business layer we can't load any information from JPA entities which is configured to be loaded from the database when it's needed (using `fetch=FetchType.LAZY`) fro...
[ 0.23040971159934998, -0.23576167225837708, 0.48096397519111633, 0.22714029252529144, -0.37406474351882935, -0.24059796333312988, 0.22258295118808746, -0.19634847342967987, -0.29956287145614624, -0.494451642036438, -0.23681674897670746, 0.45530056953430176, -0.4393291175365448, 0.1475515812...
a little bit cumbersome. Ok I'll do a (shorter) one: * Frontend : [Tapestry](https://tapestry.apache.org/index.html) (3 for older projects, 5 for newer projects) * Business layer: Spring * DAO's : Ibatis * Database : Oracle We use Sping transaction support, and start transactions upon entering the service layer, prop...
[ 0.07456143200397491, -0.14916087687015533, 0.22873400151729584, 0.12832491099834442, -0.036164384335279465, 0.11258234083652496, -0.05954315885901451, -0.04661891981959343, -0.33957183361053467, -0.22160789370536804, -0.20748482644557953, 0.06419391185045242, 0.11987026035785675, -0.201462...