text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
either destroys the purpose of doing something ("It's not a hobby if I get paid—it's a job.") or reduces the intrinsic value of doing it ("I'm not helping out society—I'm helping out me."). The same is true for Open Source contributions. People **do** get paid for Open Source work. But normally by companies who are us...
[ 1.008650302886963, 0.2961077094078064, -0.0768461599946022, 0.39837461709976196, -0.07815985381603241, -0.20921207964420319, 0.4581407904624939, 0.2546183466911316, -0.3640612065792084, -0.22494572401046753, -0.33346593379974365, 0.42731720209121704, 0.006097129546105862, -0.07106694579124...
a better way to "push" Open Source is to use Open Source. If a project is missing a feature, you'll need to add it yourself or find someone else who will. Any scheme that offers money for a feature directly will likely not work. And if the feature does get added, it'll be added by someone who wants to get paid rather t...
[ 0.8150330781936646, 0.038520220667123795, -0.023817721754312515, 0.3185369074344635, -0.17671866714954376, 0.07265318930149078, -0.10708058625459671, 0.035292621701955795, -0.19651582837104797, -0.43000590801239014, -0.11992347240447998, 0.6046204566955566, -0.12282055616378784, 0.12659938...
I have an ASP.NET page that uses the [ASP.NET Ajax Control Toolkit TabContainer](http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Tabs/Tabs.aspx). In the `Page_Load` event, I am hiding some of the tabs based on the data given to the page. I then want to make one of the tabs active based on the value of an (optional) ...
[ -0.08335145562887192, -0.06538932025432587, 0.26384004950523376, -0.10677200555801392, -0.1493804156780243, -0.11915351450443268, 0.0917130559682846, -0.16371631622314453, -0.1958482414484024, -0.5893726348876953, -0.25461769104003906, 0.5468330383300781, -0.2802087664604187, -0.0363136045...
PreselectCorrectTab(); } } private void PreselectCorrectTab () { if ( ctlTabContainer.Visible ) { if ( !string.IsNullOrEmpty( Request.QueryString[ "tabIndex" ] ) ) { int tabIndex = 0; if ( int.TryParse( Request.QueryString[ "tabIndex" ], out tabIndex ) ) ...
[ -0.24246661365032196, -0.39331966638565063, 0.7762814164161682, -0.320177286863327, 0.355946809053421, 0.027518121525645256, 0.3031574785709381, -0.141437366604805, 0.17985108494758606, -0.5418742895126343, -0.31679266691207886, 0.41203612089157104, -0.35329777002334595, 0.3289600312709808...
if ( ( ctlTabContainer.Tabs.Count > tabIndex ) && ctlTabContainer.Tabs[ tabIndex ].Visible ) { ctlTabContainer.ActiveTabIndex = tabIndex; } } } } } ``` If I
[ -0.1015445664525032, -0.28194719552993774, 0.5032559633255005, -0.5123506784439087, 0.11329391598701477, -0.005065870936959982, 0.3221438527107239, -0.04533093050122261, 0.12578004598617554, -0.56363844871521, -0.36004993319511414, 0.6753444671630859, -0.515325129032135, 0.3617425858974457...
hit the page with the `tabIndex` query string parameter set, the entire tab container disappears. The strange thing is that if I change `LoadDataIntoTabs()` to **not** hide tabs that contain no data, everything works as you would expect (i.e. the correct tab is selected when the page renders). Any ideas? --- **EDI...
[ 0.23955751955509186, -0.224411278963089, 0.8623003959655762, -0.10471697151660919, 0.03232002258300781, -0.026697304099798203, 0.5698089003562927, -0.2894752323627472, -0.17664453387260437, -0.5977783203125, -0.15942338109016418, 0.9144992828369141, -0.4546200633049011, 0.08962301909923553...
) { tbpPendingWidgets.Visible = true; tbpPendingWidgets.HeaderText = String.Format( "Pending Widgets ({0})", pendingWidgets.Count ); grdPendingWidgets.DataSource = pendingWidgets; grdPendingWidgets.DataBind(); } else { tbpPendingWidgets.Visible = false; } } ...
[ 0.2300664633512497, -0.2720142900943756, 0.784693717956543, -0.1992277055978775, 0.11589587479829788, 0.2117658257484436, 0.463422566652298, -0.14659734070301056, -0.37044620513916016, -0.4248878061771393, -0.45066726207733154, 0.7461493015289307, -0.5041388273239136, 0.20489253103733063, ...
page via ActiveTab. I'am using the AjaxControlToolkit Release 30930 (September 2009).
[ -0.023656954988837242, -0.08523795753717422, 0.3010368347167969, -0.16779343783855438, 0.11173798888921738, -0.17050369083881378, 0.5740631818771362, 0.4051796495914459, -0.2941933274269104, -0.9095966219902039, -0.37882402539253235, 0.3654995262622833, -0.21846982836723328, -0.23441626131...
I'm setting up multiple SQL instances on an active/active cluster, and on our existing SQL Cluster, the cluster name is SQLCLUSTER, but we access the instances as SQLCLUSTERINST1\Instance1, SQLCLUSTERINST2\Instance2, etc. Since each instance has its own IP and network name anyway, can I install SQL as the "Default" ins...
[ -0.17965717613697052, 0.3170059621334076, 0.42653515934944153, 0.153939887881279, 0.019484983757138252, -0.05982284992933273, -0.15184497833251953, 0.07881029695272446, -0.1595301777124405, -0.7124226689338684, -0.002358601428568363, 0.4618546962738037, -0.24399903416633606, 0.247386351227...
instance. Does anybody know if I can do this? I'm about to install the first instance, and I wanted to get an answer to this before I start installing them as named instances if I don't need to. It just seems reduntant, and potentially unnecessary, to have to give the instance cluster name and the instance name to con...
[ -0.08823178708553314, 0.414753794670105, 0.23894108831882477, 0.15116746723651886, -0.23585006594657898, -0.07422194629907608, 0.27587807178497314, 0.07743646204471588, -0.37257587909698486, -0.802937924861908, 0.10496186465024948, 0.42082202434539795, -0.4465778172016144, 0.31669870018959...
I installed named instances on the cluster, I can access them using port 1433 on each DNS name, so I don't have to provide the instance name to connect, which is what I was after. To get this accomplished, I have to modify the listener configuration to force each instance to listen on port 1433 on its dedicated IP, ra...
[ -0.11567514389753342, 0.35465988516807556, 0.307951420545578, -0.3120560944080353, 0.004242321010679007, -0.14023959636688232, 0.5429123640060425, -0.10183049738407135, -0.05823260918259621, -0.692480742931366, -0.010806471109390259, 0.6073119044303894, -0.22176598012447357, 0.438788294792...
I'm having a problem with imports in one of my java applications. I've Taken a working JSP out of one Eclipse project, Jar'd up all the classes from that project and put it into a new project. In the new Project I've imported the jar file generated from the original, and pasted the jsp code into a new JSP document. ...
[ 0.44262686371803284, 0.37483522295951843, -0.20503896474838257, -0.08818266540765762, -0.2974042296409607, -0.03357991948723793, 0.3075098395347595, -0.08719274401664734, -0.33509624004364014, -0.7753981351852417, 0.2746583819389343, 0.7673706412315369, -0.3865058124065399, 0.1374204158782...
should fix it. It's an Eclipse bug. Edit: The above answer is assuming the jar is actually on the build path.
[ 0.41853028535842896, 0.29781225323677063, 0.04870961233973503, 0.19310928881168365, 0.17472372949123383, 0.026678120717406273, 0.45799970626831055, 0.284096896648407, -0.2744998633861542, -0.3683042824268341, 0.06694375723600388, 0.44443681836128235, -0.023148413747549057, -0.0687545612454...
I have run into this problem before but never quite solved it. I have a form with several validators and also a CustomValidator. ``` <asp:Label ID="lblMemberNum" runat="server" Text="Membership #:" CssClass="LabelMedium" ></asp:Label> <asp:TextBox ID="txtMemberNum" runat="server" CssClass="TextBox" ></asp:TextBox> <a...
[ -0.10543308407068253, 0.23370981216430664, 0.8524875044822693, -0.1000753864645958, -0.12561166286468506, 0.27423974871635437, 0.26958417892456055, -0.6428791284561157, -0.21563945710659027, -0.4104524552822113, -0.003298411378636956, 0.6529220342636108, -0.029674094170331955, 0.0941118374...
ErrorMessage="This membership number is already registered">*</asp:CustomValidator> <asp:ValidationSummary ID="ValidationSummary1" runat="server" CssClass="ValidationMessage" ShowMessageBox="True" ShowSummary="False" /> ``` and on the server side: ``` protected void cvMemberNum_Validate(object source, Ser...
[ 0.23124650120735168, 0.11797657608985901, 0.6920468807220459, -0.22762824594974518, -0.060170650482177734, 0.008598288521170616, 0.5574730634689331, -0.29668381810188293, -0.35394981503486633, -0.28735122084617615, 0.06614243239164352, 0.53645920753479, -0.1919402927160263, -0.052949618548...
answer. Try using a ValidationGroup property across all your validators and the ValidationSummary. **EDIT:** Another possibility could be the Server Validation Code ``` args.IsValid = (!CampaignRegistration.IsMemberRegistered(args.Value)); ``` if `CampaignRegistration.IsMemberRegistered(args.Value)` is returning fa...
[ 0.24931618571281433, 0.010612478479743004, 0.6393887996673584, 0.11772987246513367, -0.1121974065899849, -0.07661744952201843, 0.35662856698036194, -0.4475899338722229, -0.23302578926086426, -0.4210062623023987, -0.0012519527226686478, 0.4880654811859131, -0.2289373129606247, -0.0322483405...
OnServerValidate="cvMemberNum_Validate" ClientValidationFunction = "ClientValidate" ErrorMessage="This membership number is already registered">*</asp:CustomValidator> //JavaScript Code. function ClientValidate(source, args) { args.IsValid = false; //you need to add validation logic he...
[ 0.015785831958055496, 0.04338950291275978, 0.8291867971420288, -0.26524466276168823, 0.1829245388507843, -0.05084101855754852, 0.5677353143692017, -0.4778138995170593, -0.38580361008644104, -0.37553972005844116, -0.1787889301776886, 0.7595444917678833, -0.2416733205318451, 0.17326290905475...
isValid = (!CampaignRegistration.IsMemberRegistered(args.Value)); } catch { isValid = false; } args.IsValid = isValid; if(!isValid) { if(!Page.IsClientScriptBlockRegistered("CustomValidation")) Page.RegisterClientScriptBlock("CustomValidation", "<script>alert('This...
[ -0.2495259940624237, -0.343382865190506, 0.7900147438049316, -0.3297173082828522, 0.1277153640985489, -0.09417102485895157, 0.42693257331848145, -0.5054099559783936, -0.5391546487808228, -0.686983048915863, -0.24409596621990204, 0.34347495436668396, -0.3321685194969177, -0.1233812123537063...
I am new to testing and mocking. I'm trying to test a business logic class which performs calculations, calls into the DAL and updates the database, and manages transactions. I'm using mocks to do unit testing, but how does full integration testing fit into all of this. Do I basically have the exact same tests, but use...
[ 0.8626322150230408, 0.3273831605911255, -0.239647775888443, 0.1770269125699997, -0.27339932322502136, 0.14941033720970154, 0.09262323379516602, -0.18100371956825256, 0.16658209264278412, -0.3976892828941345, 0.372793048620224, 0.5042403936386108, 0.1795891374349594, 0.09853918850421906, ...
of code in an automated validation system; so that each part of your system conforms to its design. This way, you can rely on each component is not relying on unspecified features of other components.
[ 0.531459391117096, 0.31924623250961304, -0.07524577528238297, 0.33149853348731995, 0.02544308826327324, 0.04445960745215416, 0.3946983814239502, -0.3253733515739441, -0.14009009301662445, -0.3468574583530426, -0.2650042474269867, 0.4353705048561096, -0.06615690141916275, -0.161240354180336...
I have a list of objects and each and every object in the list have a position which may not change unless explicitly changed, in other words, the objects are in a queue. What collection should I use in my entity class to store these objects and how should that collection be annotated? I currently have this ``` @Enti...
[ 0.29145145416259766, 0.07542415708303452, 0.3690686523914337, -0.14911337196826935, -0.16361883282661438, 0.11692609637975693, 0.04140390828251839, -0.24016189575195312, -0.4122121334075928, -0.6594449281692505, 0.14290682971477509, 0.10247895866632462, -0.3126882314682007, 0.3108148574829...
people, the problem is not that Java wouldn't preserv the order, I know most collections do, the problem is that I don't know a smart way for JPA to preserv the order. Having an order id and making the query order by it is possible, but in my case maintaining the order id is laborious (because the user interface allows...
[ 0.30054226517677307, 0.1927565485239029, -0.02530328556895256, 0.19378328323364258, -0.39805367588996887, 0.07445760071277618, 0.1482541561126709, -0.08475960046052933, -0.5639448761940002, -0.46843910217285156, 0.03913654014468193, 0.29022571444511414, -0.36347901821136475, 0.073818348348...
rather than list-oriented. You can then either sort after you fetch them back, or make sure your query specifies the ordering too. If you give the entity an auto-generated integer ID this *might* work, but I wouldn't like to guarantee it.
[ 0.5361508727073669, -0.15676309168338776, 0.045583389699459076, 0.08453459292650223, -0.016141284257173538, -0.01663157343864441, -0.13212968409061432, 0.01253342442214489, -0.4410185217857361, -0.41274774074554443, -0.08264274895191193, 0.5393748879432678, -0.31774577498435974, -0.0171216...
I have a 2giga mpeg file of people runnig,jogging,walking etc. in it. I will use it in a image classification project but I need to segmentate the video depending on per person an per action. for example; there are 25 people in video which repeat these actions in order 1st person -runs -walks 2nd person -runs -walk...
[ 0.3034427762031555, -0.5536296367645264, 0.21807648241519928, 0.15910649299621582, -0.5049272775650024, 0.07967124879360199, 0.349014014005661, -0.549738883972168, -0.656822681427002, -0.3610294461250305, 0.20697273313999176, 0.2534480094909668, -0.3174765706062317, -0.16751736402511597, ...
t2 of course I will select time intervals for each video. OS:Winxp pro if it can be done by matlab ,can you describe it? any help??? Matlab can do such video split operations. There are two built in functions (*aviread* and *mmreader*) for reading video files. Both will create objects which contain the individual fr...
[ 0.3533204197883606, -0.33399060368537903, 0.21894732117652893, -0.05354830250144005, -0.23972207307815552, -0.0011086433660238981, 0.1226729154586792, -0.16176661849021912, -0.3073955178260803, -0.6919588446617126, -0.29904332756996155, 1.011357069015503, -0.29563847184181213, -0.275450289...
I got a function which checks if some input fields are changed: ``` var somethingchanged = false; $(".container-box fieldset input").change(function() { somethingchanged = true; }); ``` And a function which waits on `window.onload` and fires this: ``` window.onbeforeunload = function(e) { if (somethingchange...
[ 0.1635044515132904, -0.2874157130718231, 0.6806931495666504, -0.10533930361270905, 0.21963447332382202, 0.1603584587574005, 0.1401042938232422, 0.011207540519535542, -0.21136099100112915, -0.4807673990726471, -0.02940634824335575, 0.5689632892608643, -0.08874164521694183, 0.239799723029136...
if (e) { e.returnValue = message; } return message; } } ``` But if I edit some of the fields and hit the save button, the event triggers, because there is a post-back and the fields have been edited. Is there anyway around this, so the event does not fire upon clicking the save butto...
[ 0.22768814861774445, -0.11325070261955261, 0.5640650391578674, -0.38301339745521545, 0.09563048928976059, -0.3450452983379364, 0.5073724389076233, -0.17616131901741028, -0.3290715515613556, -0.48565158247947693, -0.4068433344364166, 0.6326403021812439, -0.3469548225402832, 0.03854430839419...
I don't want to go through the dirty check I just set the variable to false. You can do this on the client side click event of the button. The nice thing about this is that there might be other cases where you don't want to prompt, the user you might have other buttons which do other post backs for example. This way y...
[ 0.4441971182823181, 0.012340440414845943, 0.397714227437973, -0.20664839446544647, -0.00307854893617332, -0.17404882609844208, 0.5313947200775146, -0.3144194483757019, 0.02162700705230236, -0.4284467101097107, 0.1260686069726944, 0.8115530610084534, -0.3881288170814514, 0.2274620234966278,...
showDirtyPrompt=true; } ```
[ 0.35244426131248474, 0.19461467862129211, 0.3478080928325653, -0.3307759761810303, 0.05755572021007538, -0.283688485622406, 0.43096664547920227, -0.06236298754811287, 0.04586753621697426, -0.22433143854141235, -0.2686995267868042, 0.8599573373794556, -0.4691315293312073, 0.1069345027208328...
I'm working on some existing c++ code that appears to be written poorly, and is very frequently called. I'm wondering if I should spend time changing it, or if the compiler is already optimizing the problem away. I'm using Visual Studio 2008. Here is an example: ``` void someDrawingFunction(....) { GetContext().Dr...
[ 0.010842163115739822, 0.03301236033439636, 0.3550022840499878, -0.3225455582141876, -0.04134608060121536, -0.11110220849514008, 0.24941343069076538, -0.4531080424785614, -0.11833003908395767, -0.7079582214355469, 0.026661481708288193, 0.8137391805648804, -0.47662582993507385, -0.1927441060...
or an inline function), then the compiler is going to HAVE to call it every time, because the compiler can't necessarily see what it's doing, and thus, the compiler probably won't know that it can eliminate the call. Of course, you'll need to make sure that GetContext ALWAYS returns the same thing, and that this 'opt...
[ -0.10409647971391678, -0.15685024857521057, 0.4242449104785919, 0.17770028114318848, -0.011257754638791084, -0.12409638613462448, 0.4146255552768707, 0.06843838840723038, -0.06139860674738884, -0.3495648503303528, -0.3635910153388977, 0.7873397469520569, -0.6223893165588379, -0.07335023581...
For a long time in the Java/JSP world I used to use the [Display Tag](http://displaytag.sourceforge.net/1.2/) library to generate a table that would allow you to sort a table, and export the table as a CSV file. Is there anything like this in a PHP library that I could use? The answer, from my searching, appears to be...
[ 0.2908523976802826, -0.01969733275473118, 0.2905212938785553, -0.042068418115377426, -0.28117623925209045, -0.1274164468050003, 0.04085180163383484, 0.012223250232636929, -0.5489763617515564, -0.8490278720855713, 0.0704815536737442, -0.028494464233517647, -0.4081173539161682, 0.13117434084...
javascript to do paging and sorting, and roll your own php export functionality. The state of the web is significantly different than it was when displaytag was created (ie, AJAX supported with a rich toolset), so I'm not sure there ever will be a full replacement. Why do sorting and paging with a call to the server w...
[ 0.151301771402359, 0.19875463843345642, 0.04321980103850365, -0.1289936751127243, -0.44707784056663513, 0.09113340824842453, 0.04288672283291817, 0.22021251916885376, -0.3457156717777252, -0.8281340599060059, 0.1798381209373474, 0.32857292890548706, -0.5172811150550842, -0.2903074622154236...
Here's [one that looked good](http://snipplr.com/view/2234/export-mysql-query-results-to-csv/) to me.
[ 0.11771891266107559, 0.032829541712999344, 0.31499436497688293, 0.03956131264567375, -0.16122666001319885, -0.030493589118123055, -0.2085820734500885, 0.4655017852783203, -0.43618103861808777, -0.0697941780090332, 0.0012695601908490062, -0.0861954391002655, -0.004168504849076271, -0.093983...
I am used to the c-style `getchar()`, but it seems like there is nothing comparable for java. I am building a lexical analyzer, and I need to read in the input character by character. I know I can use the scanner to scan in a token or line and parse through the token char-by-char, but that seems unwieldy for strings s...
[ 0.13626457750797272, 0.09822756052017212, 0.2876428961753845, -0.038316912949085236, -0.14690637588500977, 0.3507331311702728, 0.0005506774759851396, -0.1906648576259613, 0.1352425068616867, -0.7864350080490112, 0.10447125136852264, 0.38764089345932007, -0.06528180837631226, -0.04490947723...
-1 means end of stream; else, cast to *char*. This code reads character data from a list of file arguments: ``` public class CharacterHandler { //Java 7 source level public static void main(String[] args) throws IOException { // replace this with a known encoding if possible Charset encoding =...
[ -0.006793078500777483, -0.08809240162372589, 0.24546074867248535, -0.4330735206604004, 0.13247767090797424, 0.33086511492729187, 0.18627166748046875, -0.0928022563457489, 0.12830941379070282, -0.5348577499389648, -0.24076814949512482, 0.4263896048069, -0.47333094477653503, 0.14915595948696...
handleFile(file, encoding); } } private static void handleFile(File file, Charset encoding) throws IOException { try (InputStream in = new FileInputStream(file); Reader reader = new InputStreamReader(in, encoding); // buffer for efficiency
[ -0.18665629625320435, -0.3233872652053833, 0.2423296868801117, -0.09115269780158997, 0.021068334579467773, 0.3889216482639313, 0.02585534006357193, -0.33923929929733276, 0.07388085871934891, -0.7345643639564514, -0.01843234710395336, 0.5646989941596985, -0.39745423197746277, 0.039802059531...
Reader buffer = new BufferedReader(reader)) { handleCharacters(buffer); } } private static void handleCharacters(Reader reader) throws IOException { int r; while ((r = reader.read()) != -1) { char ch = (char) r;
[ -0.3660833239555359, 0.14838378131389618, 0.425346314907074, -0.3100186884403229, 0.03127065673470497, 0.49648529291152954, 0.22163830697536469, -0.41347482800483704, 0.18459811806678772, -0.3569948673248291, -0.29321378469467163, 0.5276798605918884, -0.4998871982097626, 0.3768793344497680...
System.out.println("Do something with " + ch); } } } ``` The bad thing about the above code is that it uses the system's default character set. Wherever possible, prefer a known encoding (ideally, a Unicode encoding if you have a choice). See the [Charset](http://java.sun.com/javase/6/docs/api/java/nio/ch...
[ 0.1347021758556366, -0.01719677448272705, -0.0017843869281932712, -0.05238470807671547, 0.16308286786079407, -0.09949564933776855, 0.39756134152412415, -0.0006797300884500146, -0.47374477982521057, -0.5251230597496033, -0.31518515944480896, 0.40022528171539307, -0.3601624071598053, 0.08758...
this is an edge case that probably won't apply to homework.)*
[ 0.2577325701713562, 0.14129862189292908, 0.23835402727127075, -0.0524468794465065, 0.14541669189929962, -0.057503752410411835, 0.26645970344543457, 0.19667477905750275, -0.23514583706855774, -0.6557157635688782, 0.14275123178958893, 0.32599741220474243, 0.1991623342037201, -0.0232526175677...
I have come across some articles on the web about .Net applets and I was wondering how it differed from an activex control (created using a .Net language)? (to clarify, this is with regards to applets that run inside a web-browser) (Is the difference: ActiveX controls written in a .Net language are called .Net Applets...
[ 0.34561237692832947, -0.09557060152292252, 0.19194579124450684, 0.35020649433135986, -0.008917486295104027, -0.07243935018777847, -0.11653266102075577, 0.1994764655828476, -0.14936290681362152, -0.8205057978630066, -0.15390178561210632, 0.5606050491333008, -0.4037655293941498, -0.046398624...
web-page, activeX controls are referenced using their CLSID, whereas the .NET applets seem to be referenced by a full name (path, dll name, namespace and class) ActiveX controls are simply COM objects that, at a minimum, implement IUnknown. Recent versions of IE have started to also require the object to implement IObj...
[ 0.07854162156581879, 0.002419970231130719, 0.5404722094535828, 0.1678275316953659, -0.04895232245326042, -0.24338187277317047, 0.06647355109453201, 0.20548661053180695, -0.16541369259357452, -0.7189371585845947, -0.1568789929151535, 0.4977908134460449, -0.40553799271583557, 0.0391684882342...
the tag, you can also use the [AppId](http://blogs.msdn.com/larryosterman/archive/2006/01/04/509436.aspx) if you register one. You can also write some managed code and get that running inside IE as well. The way that works is the CLR registers a [MIME filter](http://msdn.microsoft.com/en-us/library/aa767916(VS.85).as...
[ 0.31137773394584656, -0.06360091269016266, 0.7111007571220398, 0.05834934487938881, -0.08170341700315475, -0.33407071232795715, 0.14162446558475494, -0.2269917130470276, -0.21071165800094604, -0.3898111581802368, -0.09562982618808746, 0.6112111806869507, -0.3623619079589844, -0.13348314166...
be done in this security zone. Some trade-offs: Ease of Installation: ActiveX controls require you to pack everything up into a .CAB file with an .INI file that describes the installation requirements in a fairly cryptic manner. If you have to install additional dependencies with your modules (such as ATL/MFC dlls, o...
[ 0.6193159222602844, -0.05383329838514328, 0.4790237843990326, 0.07439795881509781, 0.19269554316997528, -0.6291569471359253, 0.4066866934299469, -0.4300994575023651, -0.19472935795783997, -0.6947011351585388, -0.3104814291000366, 0.7793933749198914, -0.6330633759498596, -0.2486733794212341...
are just native code running on the users system, so in theory they can do whatever they want. In practice LoRIE limits it in many cases and you have to do a bunch of special casing of things like Registry and File System access (see [Understanding and Working in Protected Mode](http://msdn.microsoft.com/en-us/library/...
[ 0.10804528743028641, -0.25474968552589417, 0.4125024974346161, 0.29411643743515015, -0.0809960663318634, -0.37292924523353577, 0.2515154480934143, -0.2530142068862915, -0.4501505494117737, -0.4617527723312378, -0.20767684280872345, 0.4252905249595642, -0.3358246982097626, 0.127333238720893...
using [the GIT](http://msdn.microsoft.com/en-us/library/ms678517(VS.85).aspx) or COM Marshalling [functions](http://msdn.microsoft.com/en-us/library/ms693316.aspx). I'm not sure if the .net applets run on the browsers UI thread or not, but it's easier to handle in C# I'm sure. Browser Objects: If you want to use IE / ...
[ 0.22168079018592834, -0.11262210458517075, 0.21943514049053192, 0.06425310671329498, -0.15222883224487305, 0.021673938259482384, 0.19487212598323822, -0.03273732215166092, -0.4320313334465027, -0.9670426249504089, -0.15190789103507996, 0.5165406465530396, -0.36357659101486206, 0.1421359032...
all, but I think with the 3.x versions it has started to become possible to an extent. The upshot is if you target .net 2.0 and someone else already loaded .net 1.0 as part of their browser extension, you lose. In general IE and the Windows Shell don't support managed extensions. This .net app MIME filter stuff may be ...
[ 0.3456211984157562, 0.06460907310247421, 0.128596231341362, 0.009301310405135155, -0.12205832451581955, -0.5149517059326172, 0.5830714702606201, 0.35439324378967285, -0.23759916424751282, -0.7296044230461121, -0.17727938294410706, 0.5611848831176758, -0.4668676555156708, 0.1383709907531738...
I've inherited a project that stores basic HTML formatting (i.e. - `<`b`>`, `<`i`>` tags) in a database and writes it out to a Word document. This is my first Word automation assignment, so be gentle! Currently, there is a complicated function that runs after the document is complete that searches and replaces these t...
[ 0.2470402866601944, 0.07353215664625168, 0.37816667556762695, -0.16886629164218903, 0.07749555259943008, 0.10984998941421509, 0.35045671463012695, -0.2820965051651001, -0.2630850076675415, -0.725997269153595, 0.21935567259788513, 0.43318766355514526, -0.14595656096935272, -0.03518319129943...
and pushes the line break down to the next page, resulting in a mostly blank page. I believe the fix for this is to format the text as it comes from the database so the positioning logic will be correct. I don't want to call the complicated procedure multiple times as it is time consuming and our end users need this d...
[ 0.3867812156677246, 0.018116265535354614, 0.2423717975616455, 0.19509334862232208, 0.028573375195264816, -0.09433110803365707, 0.26544633507728577, 0.058992087841033936, -0.25175604224205017, -0.5452173948287964, 0.14607642590999603, 0.3258364796638489, -0.11449816077947617, 0.179088145494...
this automatically. Thanks in advance if you can point me in the right direction. Try this: First, save the HTML you are about to insert as an ordinary ".htm" file. Then use the Range object and it's [InsertFile method](http://msdn.microsoft.com/en-us/library/bb217015.aspx) to insert the ".htm" file at any given posi...
[ 0.24078305065631866, -0.15354745090007782, 0.7734139561653137, -0.030937543138861656, -0.06070808321237564, -0.21112582087516785, 0.4824228584766388, -0.3386782109737396, 0.300388902425766, -0.753738284111023, -0.46021050214767456, 0.8871009349822998, -0.07538603246212006, -0.2569024860858...
I'm working on migrating to Amazon EC2 for our servers and need to try out internal DNS options. I'm looking for the equivalent of Tomcat (a standard well know easy to use servlet container) in the DNS area. BIND is the only one I'm familiar with by name, but I'm wondering if there are other "better" options or if that...
[ 0.2086978405714035, -0.11019879579544067, 0.4542597234249115, -0.016173435375094414, -0.24385367333889008, -0.4700143337249756, -0.012970025651156902, 0.17602422833442688, -0.2673163115978241, -0.7362866997718811, -0.1665879487991333, 0.2999499440193176, -0.3201952874660492, 0.457528442144...
a few others. I must also recommend the book DNS and BIND if you go the BIND route, it helped me a lot back in the day. I hope it's been updated since though, considering the more recent updates to BIND.
[ 0.594069242477417, -0.011225583963096142, 0.17116054892539978, 0.27060654759407043, -0.1140938401222229, -0.3784323036670685, 0.040296658873558044, 0.5844013690948486, -0.33978721499443054, -0.5240160822868347, 0.32245200872421265, 0.46958479285240173, 0.2619534432888031, 0.132893189787864...
I want to add support for searching for local Outlook contacts to my ATL/WTL app. Does anyone know of the Outlook COM interface (Office 2003 or greater) allows you to search for contacts? I already have LDAP lookup support but users want to be able to search their private contacts as well. Any information would be wel...
[ 0.08184245973825455, -0.10283689200878143, 0.5477978587150574, 0.12343059480190277, -0.019437387585639954, -0.1467389613389969, -0.028391242027282715, 0.15820161998271942, -0.1568744033575058, -0.981146514415741, 0.21727122366428375, 0.603324294090271, -0.16217999160289764, -0.011449473910...
the Find function on the items.
[ -0.22840116918087006, -0.03940202295780182, 0.24671947956085205, 0.23786616325378418, 0.03551580011844635, -0.06725560128688812, -0.07760392874479294, 0.011678293347358704, 0.0975455790758133, -0.40061914920806885, -0.29145312309265137, 0.6983834505081177, 0.018130488693714142, -0.01878604...
I am writing an application in java (1.6) using swing. I currently have a JXBusyLabel on a JXLayer over the content area of my program acting as a busy indicator. I want to provide a way to allow others working with me to create a task that pops up the busy label while it's executing. The catch is, the task must be can...
[ 0.5460984706878662, -0.08753186464309692, 0.12538109719753265, -0.11279450356960297, -0.3270571827888489, -0.42803555727005005, 0.16131095588207245, -0.2319464236497879, -0.24013321101665497, -0.6531084179878235, -0.043725091964006424, 0.43963849544525146, -0.4141729176044464, -0.150899693...
public <T> Future<T> execute(Callable<T>) Wraps the callable in a FutureValue that is run() on a separate thread and returns that FutureValue. The question then becomes, how to keep track of all FutureValue's generated and how to ensure that they can be cancelled. (e.g. cancel(true) always cancels) I have never use...
[ 0.3774053156375885, -0.2982187867164612, 0.19472089409828186, 0.08400426059961319, -0.006969617214053869, -0.2707765996456146, 0.24223506450653076, -0.037597160786390305, -0.2906525731086731, -0.32068803906440735, 0.0009807221358641982, 0.6238791942596436, -0.43706488609313965, 0.069994911...
a Callable (Java version of a closure?) How can I: 1. Return the value of call() to the user w/o blocking (I think I need to use a Future for this) 2. Tell the JXLayer to lock (starts painter), execute the supplied callable, and then unlock the JXLayer (stops painter) 3. Ensure that, no matter what thread calls my bus...
[ -0.061105262488126755, -0.23916111886501312, 0.5833673477172852, -0.13767950236797333, 0.02557929791510105, -0.3226182460784912, 0.4059241712093353, -0.23486272990703583, -0.14075425267219543, -0.5005783438682556, -0.48969602584838867, 0.4598757326602936, -0.5864470601081848, 0.12332458049...
#2. Should I have busyExec() spin off a new thread that blocks until no background tasks are running? Should I try for some sort of queue. Is there an object that will do this all for me already? Okay. For anyone interested here is what I am currently using to implement my request. I have a method that will take a Cal...
[ 0.3811671733856201, -0.43922266364097595, 0.7525981664657593, -0.0026268961373716593, 0.2968643009662628, -0.10074899345636368, 0.1252628117799759, -0.07011780887842178, -0.07632876187562943, -0.8659147620201111, -0.08945845812559128, 0.5892865061759949, -0.35527411103248596, -0.0189808756...
in a special list. A Runnable is created that: calls run() on the FutureTask, removes the FutureValue (and thread) from the list, and if the list is empty, unlocks the JXLayer and stops the JXBusyLabel. This Runnable is launched in a new Thread with normal priority. When the user hits the cancel button. The list is it...
[ 0.11555036902427673, -0.6052466034889221, 0.5793370604515076, 0.05780467018485069, 0.3630337715148926, -0.18870794773101807, 0.48901769518852234, 0.10137491673231125, -0.284649133682251, -0.4410371482372284, -0.6367153525352478, 0.5982210040092468, -0.49172669649124146, 0.3214760422706604,...
explains that this could make the app unstable. If yes, stop() the thread running the task. This might bring the app down. In all cases, the UI is unlocked. The documentation for other team members states that they must be aware that the task can be killed. They are not to call get() until isDone() is true. They are e...
[ -0.015887662768363953, -0.21721084415912628, 0.4383314251899719, 0.21660669147968292, 0.13207872211933136, -0.24343502521514893, 0.7615636587142944, -0.31780415773391724, -0.4512265920639038, -0.30178460478782654, -0.48423635959625244, 0.4644959270954132, -0.2710053622722626, -0.0287668481...
If I define a Ruby functions like this: ``` def ldap_get ( base_dn, filter, scope=LDAP::LDAP_SCOPE_SUBTREE, attrs=nil ) ``` How can I call it supplying only the first 2 and the last args? Why isn't something like ``` ldap_get( base_dn, filter, , X) ``` possible or if it is possible, how can it be done? This isn't...
[ 0.14899922907352448, -0.24372665584087372, 0.5126715302467346, -0.14651207625865936, -0.17546971142292023, -0.1710018664598465, 0.21700803935527802, -0.2563028037548065, 0.08292196691036224, -0.5000936985015869, -0.33541858196258545, 0.8206688165664673, -0.5785304307937622, -0.184907287359...
||= LDAP::LDAP_SCOPE_SUBTREE ... do something ... end ``` Now if you call the method as above, the behaviour will be as you expect.
[ 0.1548006236553192, -0.05367826297879219, 0.36383262276649475, -0.3063083291053772, -0.07848098129034042, -0.4982202351093292, 0.33444809913635254, -0.14523570239543915, -0.11603783816099167, -0.4473125636577606, -0.21676641702651978, 0.6512219905853271, -0.5304693579673767, -0.05576985701...
I got the following code from this question: [What is the best way to clean a string for placement in a URL, like the question name on SO?](https://stackoverflow.com/questions/539920/what-is-the-best-way-to-clean-a-string-for-placement-in-a-url-like-the-question) ``` $str = strtolower( preg_replace( array('/[^a-z0-...
[ 0.36133256554603577, 0.1038675382733345, 0.4545896351337433, -0.052699048072099686, -0.30035048723220825, -0.12254724651575089, 0.3175368309020996, -0.23999491333961487, -0.10142415761947632, -0.46863269805908203, 0.151810422539711, 0.47193291783332825, -0.15568093955516815, -0.03588352352...
easiest to do it with two regex replace calls, though you *could* rewrite it into one using the `Replace` overload with `MatchEvaluator` (it would be a bit hacky). ``` using System.Text.RegularExpressions; // ... var str = Regex.Replace(Regex.Replace(urlPart, @"[^a-z0-9\- ]/i", ""), @"[ \-]+", "-").ToLower(); ``` ...
[ -0.1703086495399475, -0.06797198951244354, 0.4918377101421356, 0.0020943235140293837, 0.24335351586341858, -0.15065898001194, 0.4482612609863281, -0.2172205150127411, -0.1356082260608673, -0.7622970342636108, -0.4387732148170471, 0.831994354724884, -0.3633045554161072, -0.346642404794693, ...
In our group we primarily do search engine architecture and content integration work and most of that code base is in Python. All our build tools and Python module dependencies are in source control so they can be checked out and the environment loaded for use regardless of os/platform, kinda similar to the approach [v...
[ 0.3846597373485565, -0.011780580505728722, 0.03317004814743996, -0.009451398625969887, -0.028296256437897682, -0.17989371716976166, 0.29933053255081177, -0.09979167580604553, 0.04666922241449356, -0.33530399203300476, -0.1478240042924881, 0.5620114207267761, -0.03682282567024231, -0.223148...
since 2.3 came out in ~2004. We've recently decoupled our build environment from dependencies on the commercial product's environment and can use any version of Python (or Java) we want. Its been about a month or so since we standardized on Python 2.6 as the newest version of Python that is backwards compatible with p...
[ 0.37869060039520264, -0.013203922659158707, 0.32342010736465454, -0.332307368516922, -0.43509963154792786, -0.3144986629486084, 0.5119489431381226, 0.05359065160155296, -0.04106219485402107, -0.4966399073600769, -0.19164042174816132, 0.6256740689277649, -0.3936115801334381, -0.213900268077...
like class decorators, but many modules we depend on cause the Python 2.6 interpreter to spout various depreciation warnings. Another tool we're interested in for managing EC2 cloud cluster nodes, [Supervisor](http://supervisord.org/ "Supervisor") doesn't even work correctly with Python 2.6. Now I am wondering if we ...
[ 0.37556201219558716, 0.19592435657978058, -0.07854638993740082, 0.07945331186056137, -0.000436615664511919, -0.22531980276107788, 0.17985452711582184, 0.0619841106235981, -0.3106081783771515, -0.4911153316497803, 0.06596926599740982, 0.6263158321380615, -0.24210473895072937, -0.05941348150...
because of deprecation warnings; those will disappear over time. (You can use the `-W ignore` option to the Python interpreter to prevent them from being printed out, at least) But if modules you need to use actually don't work with Python 2.6, that would be a legitimate reason to stay with 2.5. Python 2.5 is in wide u...
[ 0.5710856318473816, 0.029116537421941757, 0.14928576350212097, -0.1751198172569275, 0.12069850414991379, -0.3169103264808655, 0.5579131245613098, -0.07194928079843521, -0.22797450423240662, -0.47082504630088806, -0.21673867106437683, 1.0751413106918335, -0.2599048614501953, -0.121850430965...
only because it's the version that happens to be available in Gentoo (Linux)'s package repository. When the Gentoo maintainers declare Python 2.6 "stable"`*`, I'll switch to that. Of course, this reasoning wouldn't necessarily apply to you. `*` Python 2.6 actually is stable, the reason it's not declared as such in Gen...
[ 0.25293421745300293, 0.1514698714017868, 0.19411326944828033, -0.0468769446015358, 0.0793759822845459, -0.6941335201263428, 0.24811382591724396, 0.10763445496559143, 0.05326543375849724, -0.3278632164001465, -0.2238016277551651, 0.9525251388549805, -0.36879995465278625, -0.0206662137061357...
My XPath is a little bit rusty... Let's say I have this simple XML file: ``` <?xml version="1.0" encoding="utf-8" ?> <States xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <States> <StateProvince name="ALABAMA" abbrev="AL" /> .... <StateProvince name="AMERICAN SAMOA...
[ 0.3472635746002197, 0.41371843218803406, 0.3120637536048889, -0.0914410874247551, 0.005042501259595156, 0.020069343969225883, 0.3775162100791931, -0.32362422347068787, -0.020213589072227478, -0.5262548327445984, 0.3108924329280853, 0.6907522082328796, -0.2434380203485489, -0.00509382085874...
it causes the whole document (subtree rooted at the context node) to be scanned*. **The above XPath expression avoids the use of the** **`//`** **abbreviation** by taking into account the structure of the originally-provided XML document. *Only if the structure of the XML document is completely unknown (and the XPat...
[ 0.052720215171575546, 0.010152745060622692, 0.23042204976081848, 0.01959119737148285, -0.11949783563613892, -0.4875091016292572, 0.2681457996368408, -0.14633026719093323, -0.04837852716445923, -0.6779977679252625, -0.4877130389213562, 0.22532689571380615, -0.2760125994682312, -0.0175935886...
Scenario: * I start to type M-x to type a command * I switch to another emacs window/buffer because I realise I'm executing the command in the wrong window * I start to type M-x again to execute the command in the correct window Result: I get the dreaded "Command attempted to use minibuffer while in minibuffer" This...
[ 0.11342735588550568, -0.06212552264332771, 0.10832943767309189, -0.33889687061309814, 0.1705300360918045, 0.33037495613098145, 0.526717483997345, -0.06583936512470245, -0.4264971911907196, -0.6975308060646057, -0.11358609050512314, 0.24960613250732422, -0.4917636513710022, 0.28016221523284...
just cancels the first minibuffer and replaces it with a new one? Indeed this emacs "feature" is aggressive and annoying. I found this to be the right answer to the problem .Most likely you lost focus of the minibuffer because you switched windows with the mouse and NOT a minibuffer command. So whenever you lose focus ...
[ 0.6135069727897644, -0.007103919051587582, 0.2812458276748657, 0.16843287646770477, 0.17329657077789307, -0.33846649527549744, 0.5517989993095398, 0.24845701456069946, -0.2839357256889343, -0.19145545363426208, 0.016298828646540642, 0.8269352912902832, -0.5576342344284058, 0.17203007638454...
I get a JS error and I can't figure out how to fix it. When my page loads up, IE7 notifies me of a run time error. In addition, my Firebug on Firefox warns me of an error: ``` $ is not defined (?) [Break on this error] $(document).ready(function() { $("a#sin...Out': 300, 'overlayShow': false }); }); ``` When I go ...
[ 0.17202430963516235, 0.029237428680062294, 0.655698299407959, -0.20478376746177673, 0.021091481670737267, 0.024058111011981964, 0.6515330672264099, -0.4667218327522278, 0.006686828564852476, -0.5801385045051575, -0.4405042231082916, 0.5272265672683716, -0.5267050266265869, -0.1595357209444...
of jQuery, and not the whole thing. Try including just the JQuery.js file, without specification as to what part.
[ 0.4603520929813385, -0.0644717887043953, 0.07049344480037689, 0.35422417521476746, -0.02711937017738819, -0.5197646021842957, -0.23261843621730804, 0.2686147093772888, -0.18949715793132782, -0.09112837165594101, -0.18499498069286346, 0.4484303295612335, -0.2166091501712799, -0.226708009839...
I am reading the article: [Nine Options for Managing Persistent User State in Your ASP.NET Application](http://msdn.microsoft.com/en-us/magazine/cc300437.aspx) by Steven A. Smith (Doesn't he host a show on ESPN?) In the article, Steven makes the following statement: "When dealing with a single ASP.NET page, ViewState...
[ 0.3382391929626465, 0.03275376930832863, 0.05474819615483284, 0.19596543908119202, -0.08953465521335602, -0.08000537008047104, 0.35110655426979065, 0.12832486629486084, -0.3502192795276642, -0.5915418267250061, 0.07042542099952698, 0.31997397541999817, -0.2759796977043152, 0.14876922965049...
the maximum size of a URL (2048 bytes in IE, other browsers are more accommodating). Aside from tampering, storing random bits of state in the QueryString would lead to very ugly URLs - and therefore URLs that are unfriendly to search engines.
[ -0.16738088428974152, 0.004432538524270058, 0.3759835958480835, 0.22924263775348663, -0.07701129466295242, -0.24270299077033997, 0.41707664728164673, 0.003623406635597348, -0.10282867401838303, -0.4685441851615906, -0.33431118726730347, 0.1469823271036148, -0.13940371572971344, 0.308833897...
Is there a way to auto-cast Spring beans to the class defined in the application context XML? I'd like to avoid putting type information about the beans in 2 places.... in the xml configuration file and also in the code as a cast. For instance, given this config file ``` <bean id="bean-name" class="SimpleSpringBean" ...
[ -0.01764780655503273, 0.2575169503688812, 0.16329984366893768, -0.29627740383148193, -0.023094909265637398, 0.10835593193769455, -0.0016610275488346815, -0.3232640027999878, -0.31252312660217285, -0.20565812289714813, 0.04608774557709694, 0.4731940031051636, -0.4663199186325073, -0.1357811...
that Spring can get the class info (`ApplicationContext.getType`) or by getting the type from the bean itself, but no way to automatically cast the type without programmer intervention. I agree with Sii, you should avoid calling getBean as much as you can. Just wire your beans to classes that depends on them. Still, i...
[ 0.21686136722564697, -0.21046112477779388, 0.2998166084289551, -0.09333934634923935, -0.11258678883314133, 0.0060564992018043995, 0.04484425485134125, -0.15541043877601624, -0.4148842990398407, -0.11670994758605957, -0.031085412949323654, 0.44839414954185486, -0.39954105019569397, 0.039573...
return (T)appContext.getBean(beanName); } } ``` Then you can call it without casting ``` MyClass mc = MyContextHolder.getBean("myClassBean"); ```
[ -0.2150333821773529, 0.0520901195704937, 0.4237562417984009, -0.30409470200538635, 0.18586651980876923, -0.03227463364601135, 0.3660338819026947, 0.04220390319824219, -0.04602900147438049, -0.5627449750900269, -0.3369111716747284, 0.7181487679481506, -0.4730272591114044, 0.2080403864383697...
I am not very familiar with databases and what they offer outside of the CRUD operations. My research has led me to **triggers**. Basically it looks like triggers offer this type of functionality: > (from [Wikipedia](http://en.wikipedia.org/wiki/Database_trigger)) > > > There are typically three triggering events t...
[ 0.45347487926483154, 0.02946995198726654, -0.09486127644777298, -0.12877796590328217, -0.1246754452586174, -0.17981623113155365, 0.22067038714885712, -0.5042814612388611, -0.5255870223045349, -0.24714124202728271, 0.05014906823635101, 0.6353948712348938, -0.3489558696746826, -0.07304046303...
database when a record is Updated/Deleted/Inserted using some sort of trigger semantics? What might be some alternate solutions to this problem? How can I listen to database events? **The main reason I want to do this is a scenario like this**: I have 5 client applications all in different processes/existing across ...
[ 0.4495355784893036, 0.2513679563999176, 0.09717957675457001, 0.14349724352359772, 0.041977476328611374, -0.08581583201885223, 0.3728730380535126, 0.12676118314266205, -0.43193724751472473, -0.6345635056495667, 0.25942814350128174, 0.3003588318824768, -0.12916435301303864, 0.477985888719558...
instead of them querying for the data at some interval. Using Oracle you can setup a Trigger on a table and then have the trigger send a JMS message. Oracle has two different JMS implementations. You can then have a process that will 'listen' for the message using the JDBC Driver. I have used this method to push change...
[ 0.203669935464859, -0.09810768067836761, 0.14933036267757416, 0.11308690905570984, -0.3053445518016815, 0.0022581047378480434, -0.07635143399238586, -0.3936813473701477, -0.18155425786972046, -0.6102863550186157, 0.2142253816127777, 0.5080510973930359, -0.47452056407928467, -0.149601176381...
How can I correctly handle exceptions thrown from controllers in ASP.NET MVC? The `HandleError` attribute seems to only process exceptions thrown by the MVC infrastructure and not exceptions thrown by my own code. Using this web.config ``` <customErrors mode="On"> <error statusCode="401" redirect="/Errors/Http401...
[ -0.04190429300069809, -0.018814146518707275, 0.43694329261779785, 0.12932679057121277, 0.15949009358882904, -0.1061633825302124, 0.16055996716022491, -0.4576343894004822, -0.3720756769180298, -0.4503713548183441, -0.0668744221329689, 0.41450440883636475, -0.09892838448286057, 0.32228240370...
throw new HttpException(401, "Unauthorized"); } } } ``` doesn't result in what I was hoping for. Instead I get the generic ASP.NET error page telling me to modify my web.config to see the actual error information. However, if instead of throwing an exception I return an invalid View, I get the /Shared/Vie...
[ 0.35275375843048096, 0.09418287873268127, 0.14812801778316498, 0.17151902616024017, -0.1515502780675888, -0.18623077869415283, 0.5958711504936218, 0.009235575795173645, -0.29048797488212585, -0.7921748161315918, 0.10297023504972458, 0.47983336448669434, -0.2506435215473175, 0.2480559498071...
play nice with the MVC infrastructure? Thanks to kazimanzurrashaid, here is what I wound up doing in Global.asax.cs: ``` protected void Application_Error() { Exception unhandledException = Server.GetLastError(); HttpException httpException = unhandledException as HttpException; if (httpException == null) ...
[ 0.04669039696455002, -0.22322000563144684, 0.3419651687145233, -0.22275763750076294, 0.1834971010684967, -0.054615553468465805, 0.6612063050270081, -0.10293161123991013, 0.02737085148692131, -0.7096946835517883, -0.05988263338804245, 1.0771536827087402, -0.5150994062423706, -0.046131990849...
switch (httpCode) { case (int) HttpStatusCode.Unauthorized: Response.Redirect("/Http/Error401"); break; } } } ``` I'll be able to add more pages to the HttpContoller based on any additional HTTP error codes I need to support.
[ 0.35591983795166016, -0.0803564190864563, 0.46095240116119385, 0.006514272186905146, 0.21761885285377502, -0.1132478415966034, 0.3774969279766083, -0.07631055265665054, -0.1550239622592926, -0.8998522758483887, 0.06703195720911026, 0.6115216612815857, -0.1911003589630127, 0.100355044007301...
I'm doing something in Java SE that would require me to use SSL in an unusual way. The required steps would be something like: * Establish an SSL session; * Exchange some private information; * Renegotiate connection parameters to stop using cryptographic operations. I haven't found in the Java API a way to to thi...
[ 0.5022804737091064, 0.05782030150294304, -0.09139786660671234, 0.03296387940645218, -0.11261039227247238, -0.4833618998527527, 0.42880919575691223, 0.010135101154446602, -0.04668712243437767, -0.6113919615745544, 0.021845819428563118, 0.4637785851955414, -0.3434129059314728, 0.094294801354...
that such functionality would be available in other languages and frameworks (C, PHP, Ruby, .NET, Perl, Python, etc.)? Thanks for the help, Luís M. Costa You could do something like this in Java, but it's definitely not standard. I can't vouch for other platforms having the necessary support for this. The JSSE pr...
[ 0.6806464791297913, -0.04884941503405571, 0.2725073993206024, 0.12140095978975296, -0.07635721564292908, -0.39721810817718506, 0.03951946645975113, 0.19585731625556946, -0.48156240582466125, -0.7272263765335083, -0.1525832861661911, 0.4610614776611328, -0.19355365633964539, -0.131836026906...
expense of negotiating the SSL session. If it is for the sake of performance, you can renegotiate the cipher suite to use "NULL" confidentiality and integrity protocols, as long as both parties allow it. You'd still have a little overhead in the SSL record layer. However, the overhead of SSL after the session parameter...
[ 0.4190378189086914, 0.14780877530574799, 0.08760468661785126, 0.3073260188102722, 0.0766914039850235, -0.4045969843864441, 0.07566720992326736, -0.4475763738155365, -0.04446645826101303, -0.804384171962738, -0.09109947830438614, 0.8830498456954956, 0.17549347877502441, -0.2584614157676697,...
I would like to create random folder names on my website to store images and their thumbnails, but instead of using the full version of a generated guid, i was thinking about using just part of it, maybe just the first 8 characters and possibly base64 encode it. i am worried about possible collisions though. Can some...
[ 0.4313714802265167, 0.13863733410835266, 0.076154425740242, 0.19728149473667145, 0.07808706164360046, -0.037214625626802444, 0.3441009223461151, 0.33495262265205383, -0.2528012692928314, -0.564287543296814, 0.01314335223287344, 0.2824423611164093, 0.09442077577114105, -0.03445659577846527,...
away from path.GetRandomFileName , since it uses raw guid and it is not 12 chars long ... Why not just use something like this, and loop round until you can create the file without conflict? ``` const string ValidChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; static string GenerateName(Random random, int length) ...
[ -0.038790810853242874, -0.18017230927944183, 0.4199405908584595, -0.09684887528419495, 0.025378534570336342, 0.16839975118637085, 0.40862175822257996, -0.2705143392086029, 0.10744063556194305, -0.4584410488605499, 0.10553459078073502, 0.4819657504558563, -0.5563977360725403, 0.312476247549...
RNG is to avoid the typical problems of creating a new RNG in the method (duplicates when called in quick succession) while not using a static RNG (which isn't threadsafe). An alternative would be to have a single static readonly RNG, and serialize calls within `GenerateName` by locking. The main point is that *someh...
[ 0.08930064737796783, -0.08201815187931061, 0.227131649851799, -0.12162474542856216, 0.02675146423280239, -0.03599078953266144, 0.3962705135345459, -0.2761317491531372, -0.47317278385162354, -0.348214328289032, -0.23839101195335388, 0.09672264754772186, -0.6443710327148438, 0.38194707036018...
I have an internal application that I needs to have a drop down list for two date type elements: **Month** and **Year**. These values are not in a database or other repository of information. I know I could just setup a list with the values I need by adding them to a dictionary like object (I need to correlate the Mon...
[ 0.13327494263648987, 0.21838539838790894, 0.32788005471229553, 0.045836977660655975, -0.07374638319015503, 0.4114823639392853, 0.2258756458759308, 0.24559929966926575, -0.40744221210479736, -0.3247286081314087, 0.10101575404405594, -0.037929799407720566, 0.20028391480445862, 0.322517752647...
in a generic list. Is there a better way to handle these data elements? Something built in, or a good design pattern that I should be implementing? You could use this to get a list of all the Month names and loop through it. ``` CultureInfo.CurrentCulture.DateTimeFormat.MonthNames ``` You can use it like this...usi...
[ 0.3039509057998657, -0.09250371903181076, 0.6902488470077515, 0.05352979898452759, -0.1134934350848198, -0.002496361033990979, 0.005027402192354202, -0.059598229825496674, -0.4133560061454773, -0.3960166573524475, -0.01680600829422474, 0.1632116585969925, -0.2113295942544937, 0.63442051410...
I have a class that takes objects from a `BlockingQueue` and processes them by calling `take()` in a continuous loop. At some point I know that no more objects will be added to the queue. How do I interrupt the `take()` method so that it stops blocking? Here's the class that processes the objects: ``` public class My...
[ 0.009306557476520538, -0.16708238422870636, 0.2523646056652069, -0.21218162775039673, -0.022482208907604218, 0.05433480441570282, 0.29026123881340027, 0.08474984019994736, -0.17183704674243927, -0.42023253440856934, -0.10498591512441635, 0.22528286278247833, -0.561147153377533, 0.370958685...
MyObj obj = queue.take(); // process obj here // ... } } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } ``` And here's the method that uses this class to process objects: ``` public void testHandler() { BlockingQueue<MyObj> queue = new ArrayBlockin...
[ -0.13335676491260529, -0.21877263486385345, 0.38899940252304077, -0.3576778173446655, 0.14505596458911896, 0.28895437717437744, 0.3379665017127991, -0.19356852769851685, -0.38812658190727234, -0.4968818724155426, -0.22245895862579346, 0.3495710492134094, -0.6039382219314575, 0.252935528755...
queue.put(i.next()); } // what code should go here to tell the handler // to stop waiting for more objects? } ``` If interrupting the thread is not an option, another is to place a "marker" or "command" object on the queue that would be recognized as such by MyObjHandler and break out of the loop.
[ 0.2883424162864685, -0.214349627494812, 0.25228673219680786, -0.28728029131889343, 0.11429747939109802, -0.2330676019191742, 0.2061861902475357, 0.2067522406578064, -0.380522221326828, -0.5792921185493469, -0.22243289649486542, 0.32338860630989075, -0.5607470273971558, 0.46634697914123535,...
In Hibernate, implementing a **PostUpdateEventListener** allows you to plug into Hibernate's workflow and gives you the opportunity to inspect and compare the old and new values of an Entity's properties as it is being saved (**PostUpdateEvent** has methods **getOldState()** and **getState()** that return an array of t...
[ 0.09808003902435303, -0.1884131133556366, 0.5046232342720032, 0.07260753214359283, -0.16869714856147766, -0.19881896674633026, 0.3487950265407562, -0.3758871257305145, -0.028727611526846886, -0.7671062350273132, -0.2858990430831909, 0.4431207478046417, -0.21791650354862213, -0.002376846503...
you can only see the latest i.e. "new" contents of that Collection. Anyone know if there is a way to determine how the elements of a Collection owned by an Entity have changed at this point in the workflow? I figured out a way to do this, so I'll post it in case its of use to anyone else. This code loops through all t...
[ 0.32016387581825256, 0.06947886198759079, 0.3425544798374176, 0.06095662713050842, 0.255196750164032, -0.10820479691028595, 0.15752331912517548, -0.09493625164031982, -0.296445369720459, -0.6498450040817261, -0.23800598084926605, 0.17440107464790344, -0.09982415288686752, 0.394510626792907...