text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
remove the Width and Height attributes in XAML. So at design-time you will have the preset width and height (including if you put the user control in a form) and at runtime it will dock depending on its parent container. Hope that helps.
[ 0.3221103549003601, -0.01847538910806179, 0.527916431427002, 0.010337462648749352, 0.24636565148830414, -0.15056933462619781, -0.024940019473433495, -0.046744246035814285, -0.22706638276576996, -0.7200303077697754, -0.25553256273269653, 0.3266233205795288, -0.09883739054203033, 0.057483155...
I have around 1000 pdf filesand I need to convert them to 300 dpi tiff files. What is the best way to do this? If there is an SDK or something or a tool that can be scripted that would be ideal. Use Imagemagick, or better yet, Ghostscript. <http://www.ibm.com/developerworks/library/l-graf2/#N101C2> has an example for imagemagick: ``` convert foo.pdf pages-%03d.tiff ``` <http://www.asmail.be/msg0055376363.html> has an example for ghostscript: ``` gs -q -dNOPAUSE -sDEVICE=tiffg4 -sOutputFile=a.tif foo.pdf -c quit ``` I would install ghostscript and read the man page for gs to see what exact options are needed and experiment.
[ 0.13063916563987732, 0.20695577561855316, 0.5690516233444214, 0.017038673162460327, -0.3180575668811798, 0.13521696627140045, 0.33269667625427246, -0.5526875257492065, -0.07524993270635605, -0.937609851360321, 0.18038390576839447, 0.6221268773078918, -0.14600081741809845, -0.10566852986812...
I have 28,000 images I need to convert into a movie. I tried ``` mencoder mf://*.jpg -mf w=640:h=480:fps=30:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2 -nosound -o ../output-msmpeg4v2.avi ``` But it seems to crap out at 7500 frames. The files are named webcam\_2007-04-16\_070804.jpg webcam\_2007-04-16\_071004.jpg webcam\_2007-04-16\_071204.jpg webcam\_2007-04-16\_071404.jpg Up to march 2008 or so. Is there another way I can pass the filenames to mencoder so it doesn't stop part way? ``` MEncoder 2:1.0~rc2-0ubuntu13 (C) 2000-2007 MPlayer Team CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping: 7) CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled with runtime CPU detection. success: format: 16 data: 0x0 - 0x0 MF file format detected. [mf] search
[ -0.08407215029001236, 0.35058408975601196, 0.5428630709648132, 0.02281862497329712, -0.24358873069286346, 0.16173893213272095, 0.3837435245513916, -0.4577188193798065, -0.6621846556663513, -0.4296112656593323, -0.11229125410318375, 0.7346334457397461, -0.1666889786720276, -0.00780909648165...
expr: *.jpg [mf] number of files: 28617 (114468) VIDEO: [IJPG] 640x480 24bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s) [V] filefmt:16 fourcc:0x47504A49 size:640x480 fps:30.00 ftime:=0.0333 Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder) ========================================================================== VDec: vo config request - 640 x 480 (preferred colorspace: Planar YV12) VDec: using Planar YV12 as output csp (no 3) Movie-Aspect is 1.33:1 - prescaling to correct movie aspect. videocodec: libavcodec (640x480 fourcc=3234504d [MP42]) Writing header... ODML: Aspect information not (yet?)
[ -0.3842872381210327, -0.11153589934110641, 1.0584876537322998, 0.020952915772795677, -0.06557916104793549, 0.30033811926841736, -0.16248247027397156, -0.4275631904602051, -0.5583637952804565, -0.37403395771980286, -0.3180422782897949, 0.7734510898590088, -0.23192551732063293, 0.14173102378...
available or unspecified, not writing vprp header. Writing header... ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Pos: 251.3s 7539f ( 0%) 47.56fps Trem: 0min 0mb A-V:0.000 [1202:0] Flushing video frames. Writing index... Writing header... ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Video stream: 1202.480 kbit/s (150310 B/s) size: 37772908 bytes 251.300 secs 7539 frames ``` Shove the list of images in a file, one per line. Then use `mf://@filename`
[ 0.14801380038261414, -0.12485580891370773, 1.0433244705200195, 0.173270583152771, -0.19089318811893463, 0.4372011125087738, 0.2379724234342575, -0.3684954345226288, -0.591615617275238, -0.46409907937049866, -0.34778741002082825, 0.49946579337120056, -0.16976039111614227, -0.039285212755203...
The following question answers how to get large memory pages on Windows : "[how do i run my app with large pages in windows](https://stackoverflow.com/questions/39059/how-do-i-run-my-app-with-large-pages-in-windows)". The problem I'm trying to solve is how do I configure it on Vista and 2008 Server. Normally you just allow a specific user to lock pages in memory and you are done. However on Vista and 2008 this only works if you are using an Administrator account. It doesn't help if the user is actually part of the Administrators group. All other users always get a 1300 error code stating that some rights are missing. Anyone have
[ 0.05665694177150726, 0.3931078612804413, 0.40230581164360046, 0.17954018712043762, 0.045801881700754166, -0.10312628000974655, 0.24838018417358398, -0.32692477107048035, -0.7202755212783813, -0.5419706106185913, -0.1832539141178131, 0.6462439298629761, -0.11040974408388138, 0.1118024289608...
a clue as to what else needs to be configured? Thanks, Staffan Assuming cmd is your SqlCeCommand.... ``` using(var dr = cmd.ExecuteReader()) { DataSet ds = new DataSet(); DataTable dt = ds.Tables.Add(); dt.Load(dr); ds.WriteXML(...); } ```
[ -0.11672192811965942, -0.18605351448059082, 0.6476208567619324, 0.19255180656909943, 0.031445734202861786, -0.129572331905365, 0.20875561237335205, -0.24592560529708862, -0.33449608087539673, -0.6835831999778748, -0.21138758957386017, 0.656083345413208, -0.3345320224761963, 0.1829108595848...
I have a web report that uses a Django form (new forms) for fields that control the query used to generate the report (start date, end date, ...). The issue I'm having is that the page should work using the form's initial values (unbound), but I can't access the cleaned\_data field unless I call `is_valid()`. But `is_valid()` always fails on unbound forms. It seems like Django's forms were designed with the use case of editing data such that an unbound form isn't really useful for anything other than displaying HTML. For example, if I have: ``` if request.method == 'GET': form
[ 0.47354862093925476, 0.5027123093605042, 0.4150474965572357, -0.18799647688865662, -0.2548788785934448, -0.662028431892395, 0.17671982944011688, -0.3025115132331848, -0.05717387795448303, -0.5165868997573853, 0.07008993625640869, 0.39984020590782166, -0.30052733421325684, 0.182845324277877...
= MyForm() else: form = MyForm(request.method.POST) if form.is_valid(): do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date']) ``` is\_valid() will fail if this is a GET (since it's unbound), and if I do: ``` if request.method == 'GET': form = MyForm() do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date']) else: form = MyForm(request.method.POST) if form.is_valid(): do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date']) ``` the first call to do\_query triggers exceptions on form.cleaned\_data, which is not a valid field because `is_valid()` has not been called. It seems like I have to do something like: ``` if request.method == 'GET': form = MyForm()
[ 0.14663653075695038, -0.014615378342568874, 0.9811298847198486, -0.43575048446655273, 0.18444417417049408, -0.2793494760990143, 0.4432113766670227, -0.49042707681655884, 0.17064082622528076, -0.7062506079673767, -0.6105554103851318, 0.44464820623397827, -0.027218004688620567, 0.32879441976...
do_query(form['start_date'].field.initial, form['end_date'].field.initial) else: form = MyForm(request.method.POST) if form.is_valid(): do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date']) ``` that is, there isn't a common interface for retrieving the form's values between a bound form and an unbound one. Does anyone see a cleaner way to do this? If you add this method to your form class: ``` def get_cleaned_or_initial(self, fieldname): if hasattr(self, 'cleaned_data'): return self.cleaned_data.get(fieldname) else:
[ 0.1331578493118286, -0.0020108784083276987, 0.5680632591247559, -0.26045870780944824, 0.1832989603281021, -0.3040412962436676, 0.18911705911159515, -0.6220822334289551, -0.02664002776145935, -0.5351350903511047, -0.22120851278305054, 0.21810898184776306, -0.10386081784963608, 0.32662290334...
return self[fieldname].field.initial ``` you could then re-write your code as: ``` if request.method == 'GET': form = MyForm() else: form = MyForm(request.method.POST) form.is_valid() do_query(form.get_cleaned_or_initial('start_date'), form.get_cleaned_or_initial('end_date')) ```
[ 0.13676093518733978, -0.0637291744351387, 0.6042359471321106, -0.5236848592758179, 0.0190784502774477, -0.02108684740960598, 0.3484015166759491, -0.4340243935585022, 0.13455544412136078, -0.6693422794342041, -0.03815344721078873, 0.4823525547981262, -0.08483624458312988, 0.1767504960298538...
I am writing picture editing windows forms application using vb.net/c#. i have a client requirement to capture the photo from digital still camera attached to computer. how can i capture a photo from USB connected digital still camera device in my windows application ? If you use the Windows Image Acquisition Library, you'll see events there for capturing camera new picture events. I had a similar requirement and wrote a test rig; we went down to the local camera store and tried every camera they had. The only cameras we could find that supported this functionality were the Nikon D-series cameras. We
[ 0.46537935733795166, 0.3628763258457184, 0.38972029089927673, -0.023758498951792717, 0.01758180372416973, -0.2226448953151703, 0.07412682473659515, -0.29839351773262024, -0.01798270456492901, -0.6052137017250061, 0.14478975534439087, 0.4529784023761749, -0.19484609365463257, -0.27295374870...
found that with most cameras, you can't even take a picture when they are plugged in. When you plug them in to the USB port, most cameras will switch into a mode where the only thing they'll do is transfer data. The quick way to find out if a camera will work at all is to plug it into a PC, then try to snap a picture. If it lets you do that you have a chance. It also needs to support PTP.
[ 0.4895932674407959, -0.34018754959106445, 0.3497600257396698, 0.4310377836227417, 0.32347244024276733, -0.3267507255077362, 0.09374067187309265, -0.07972133159637451, -0.3426624536514282, -0.40075111389160156, 0.15710695087909698, 0.6294518113136292, -0.1090279370546341, -0.187961384654045...
Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor. Will the destructor be called when the DLL is unloaded? In a Windows C++ DLL, all global objects (including static members of classes) will be constructed just before the calling of the DllMain with DLL\_PROCESS\_ATTACH, and they will be destroyed just after the call of the DllMain with DLL\_PROCESS\_DETACH. Now, you must consider three problems: 0 - Of course, global non-const objects are evil (but you already know that, so I'll avoid mentionning multithreading, locks, god-objects, etc.) 1 - The order of construction of
[ -0.5562492609024048, 0.04179031401872635, 0.2116699516773224, -0.18031421303749084, -0.0562896691262722, -0.05515243858098984, 0.3996330499649048, -0.024772541597485542, -0.0323246531188488, -0.41267332434654236, -0.3999612331390381, 0.7329676747322083, -0.5464227199554443, 0.3237326145172...
objects or different compilation units (i.e. CPP files) is not guaranteed, so you can't hope the object A will be constructed before B if the two objects are instanciated in two different CPPs. This is important if B depends on A. The solution is to move all global objects in the same CPP file, as inside the same compilation unit, the order of instanciation of the objects will be the order of construction (and the inverse of the order of destruction) 2 - There are things that are forbidden to do in the DllMain. Those things are probably forbidden, too, in
[ -0.029518870636820793, -0.0996280089020729, 0.4139067232608795, 0.3544127345085144, -0.12904424965381622, -0.1310754269361496, 0.21343450248241425, -0.2592332661151886, -0.706342875957489, -0.45502790808677673, -0.36286598443984985, 0.1883477121591568, -0.2899860441684723, 0.43812191486358...
the constructors. So avoid locking something. See Raymond Chen's excellent blog on the subject: * [Some reasons not to do anything scary in your DllMain](https://devblogs.microsoft.com/oldnewthing/20040127-00/?p=40873) * [Another reason not to do anything scary in your DllMain: Inadvertent deadlock](https://devblogs.microsoft.com/oldnewthing/20040128-00/?p=40853) * [Some reasons not to do anything scary in your DllMain, part 3](https://devblogs.microsoft.com/oldnewthing/20140821-00/?p=183) In this case, lazy initialization could be interesting: The classes remain in an "un-initialized" state (internal pointers are NULL, booleans are false, whatever) until you call one of their methods, at which point they'll initialize themselves. If you use those objects inside the main (or one of the main's descendant functions), you'll be
[ -0.4040411412715912, -0.13524794578552246, -0.009896472096443176, 0.09757736325263977, -0.21763838827610016, -0.28169167041778564, 0.6330522894859314, -0.12842929363250732, -0.32529088854789734, -0.2164923995733261, -0.42343372106552124, 0.31337040662765503, -0.3882196545600891, 0.32534921...
ok because they will be called after execution of DllMain. 3 - Of course, if some global objects in DLL A depend on global objects in DLL B, you should be very very careful about DLL loading order, and thus dependancies. In this case, DLLs with direct or indirect circular dependancies will cause you an insane amount of headaches. The best solution is to break the circular dependancies. P.S.: Note that in C++, constructor can throw, and you don't want an exception in the middle of a DLL loading, so be sure your global objects won't be using exception without a very,
[ -0.025321025401353836, 0.2061758041381836, 0.3098715543746948, 0.008376501500606537, -0.20239707827568054, -0.4258880317211151, 0.43969130516052246, -0.008767438121140003, -0.3962472975254059, -0.3055373430252075, -0.3169640898704529, 0.6999214887619019, -0.34869739413261414, 0.14149913191...
very good reason. As correctly written destructors are not authorized to throw, the DLL unloading should be ok in this case.
[ 0.15433362126350403, 0.05734279751777649, 0.2546544671058655, 0.20370382070541382, 0.00012096005229977891, -0.4658496081829071, 0.33929571509361267, -0.2073124200105667, -0.3500582277774811, -0.1285272091627121, -0.38935256004333496, 0.619107723236084, 0.01802135445177555, 0.00222551357001...
I've built a web part for Sharepoint that retrieves data from an external service. I'd like to display the items in a way that's UI-compatible with Sharepoint (fits in with its surroundings.) I'm aware of the "DataFormWebPart" but was unable to get one working properly. It requires a valid DataSource and I was unable to build one from the results of a web service call... Part of the problem is that my web service wrappers don't expose the XML return info, rather I have a bunch of deserialized objects. There doesn't seem to be an easy way to turn actual objects
[ 0.36339694261550903, 0.07433521747589111, 0.22262446582317352, 0.4164191782474518, 0.1276099532842636, 0.03896336257457733, 0.05914879962801933, -0.2330947369337082, -0.08992358297109604, -0.4493095576763153, 0.08792271465063095, 0.30103087425231934, -0.0958193838596344, 0.3279512822628021...
into a datasource, or populate a "generic" datasource from object data. I could use an SPGridView to get the same UI, but the grid control doesn't have much in the way of smarts -and- it forces every field into its own column. I'd prefer to render each list item as a single cell with complex rendering (for instance the way that StackOverflow shows its lists of questions.) I'd also like to get as much of the Sharepoint-standard UI as possible, such as the sorting, filtering, and paging controls. So, first: Has anyone here written a Sharepoint control that does this, and if
[ 0.12214424461126328, -0.26813095808029175, 0.44197943806648254, 0.41852492094039917, 0.030582278966903687, -0.1465843766927719, -0.21257048845291138, -0.05824011191725731, -0.25778570771217346, -0.741330623626709, -0.038425467908382416, 0.11228697746992111, -0.3200282156467438, 0.049096733...
so do you have sample code to share? If not: am I overlooking some useful control, whether MS-supplied or available in an external library? Thanks! Steve > Sharepoint: Best way to display lists > of non-Sharepoint content with > “compatible” UI? Take a look at the built in sharepoint web controls: [Microsoft.SharePoint.WebControls Namespace](http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.aspx) It contains all the controls used in sharepoint. I'd tell you more, but the documentation is very thorough.
[ 0.35789990425109863, 0.11389696598052979, -0.061471614986658096, 0.614984393119812, 0.1847553253173828, -0.22782759368419647, -0.024164600297808647, 0.13213485479354858, -0.25492554903030396, -0.6037347316741943, 0.15831081569194794, 0.20948989689350128, -0.220620259642601, -0.099565446376...
What's the best way to implement the enum idiom in Ruby? I'm looking for something which I can use (almost) like the Java/C# enums. Two ways. Symbols (`:foo` notation) or constants (`FOO` notation). Symbols are appropriate when you want to enhance readability without littering code with literal strings. ``` postal_code[:minnesota] = "MN" postal_code[:new_york] = "NY" ``` Constants are appropriate when you have an underlying value that is important. Just declare a module to hold your constants and then declare the constants within that. ``` module Foo BAR = 1 BAZ = 2 BIZ = 4 end flags = Foo::BAR | Foo::BAZ # flags = 3 ``` Added 2021-01-17 If you are
[ 0.4752834737300873, 0.2686765193939209, 0.3452521562576294, 0.21673719584941864, -0.042325541377067566, -0.07027719914913177, 0.29902711510658264, -0.32032310962677, -0.3065037131309509, -0.6543595790863037, -0.11200761049985886, 0.4050338864326477, -0.675037682056427, -0.05283115804195404...
passing the enum value around (for example, storing it in a database) and you need to be able to translate the value back into the symbol, there's a mashup of both approaches ``` COMMODITY_TYPE = { currency: 1, investment: 2, } def commodity_type_string(value) COMMODITY_TYPE.key(value) end COMMODITY_TYPE[:currency] ``` This approach inspired by andrew-grimm's answer <https://stackoverflow.com/a/5332950/13468> I'd also recommend reading through the rest of the answers here since there are a lot of ways to solve this and it really boils down to what it is about the other language's enum that you care about
[ 0.38660871982574463, -0.03645513951778412, 0.18603776395320892, 0.12434854358434677, -0.08724606782197952, 0.1715877205133438, -0.14212417602539062, -0.31908488273620605, -0.12497084587812424, -0.6503341794013977, 0.10418752580881119, 0.46434542536735535, -0.3564661145210266, 0.12165719270...
I assumed that the C# margin property had a meaning like in CSS - the spacing around the outside of the control. But Margin values seem to be ignored to matter what values I enter. Then I read on the SDK: > Setting the Margin property on a > docked control has no effect on the > distance of the control from the the > edges of its container. Given that I'm placing controls on forms, and perhaps docking them, what does the Margin property get me? The margin property is used by whatever layout engine your control host (Panel, for example) is
[ 0.24876943230628967, -0.022444188594818115, 0.4864949584007263, 0.22191652655601501, -0.03684595599770546, 0.04777660593390465, -0.3033488392829895, -0.12651003897190094, -0.10170063376426697, -0.6557701826095581, 0.18878014385700226, 0.3721362352371216, 0.05673445016145706, 0.067534804344...
using, in whatever way that layout engine sees fit. However, it is best used for spacing just as you assume. Just read the documentation for that specific layout engine. It can be very handy when using a FlowLayoutPanel or TableLayoutPanel, for example - to either reduce the default padding or space things out a bit. Obviously, if you write a custom layout provider, you can use Margin however you see fit.
[ 0.26748132705688477, -0.23615393042564392, 0.36166271567344666, 0.2651726305484772, -0.22625993192195892, -0.08913462609052658, -0.373565673828125, 0.025276273488998413, -0.3614879846572876, -1.0038284063339233, 0.343319296836853, 0.6426964998245239, -0.009625881910324097, 0.05341417714953...
I'm trying to insert a [Spry](http://en.wikipedia.org/wiki/Spry_framework) [accordion](http://en.wikipedia.org/wiki/Accordion_(GUI)) into an already existing [JSF](http://en.wikipedia.org/wiki/JavaServer_Faces) page using [Dreamweaver](http://en.wikipedia.org/wiki/Adobe_Dreamweaver). Is this possible? I've already tried several things, and only the labels show up. I'm not a Dreamweaver expert, but all Spry Accordian requires is the correct HTML structure. E.g.: ``` <div id="Accordion1" class="Accordion"> <div class="AccordionPanel"> <div class="AccordionPanelTab">Panel 1</div> <div class="AccordionPanelContent">
[ -0.02959120273590088, -0.10314934700727463, 0.47445788979530334, -0.15637074410915375, 0.3177878260612488, 0.34175997972488403, -0.14488129317760468, -0.33924466371536255, -0.2903614342212677, -0.7645395398139954, -0.005963291972875595, 0.39264145493507385, -0.0836661159992218, 0.090408712...
Panel 1 Content<br/> Panel 1 Content<br/> Panel 1 Content<br/> </div> </div> </div> ``` Provided you have the [JavaScript](http://en.wikipedia.org/wiki/JavaScript)
[ 0.09694702923297882, -0.00146984844468534, 0.39714378118515015, -0.247142031788826, -0.6013742685317993, -0.15174616873264313, -0.4451049864292145, -0.3415311574935913, -0.3869287967681885, -0.9185944199562073, -0.639270544052124, 0.3255995512008667, -0.1922721564769745, -0.354891061782836...
library loaded correctly, that should pretty much be all you need to do.
[ 0.5797311067581177, 0.22180716693401337, 0.19975268840789795, 0.427102267742157, 0.014448344707489014, -0.37962955236434937, 0.10541195422410965, 0.07318931072950363, -0.27355971932411194, -0.15101151168346405, 0.16070757806301117, 0.49484676122665405, -0.028417326509952545, -0.32152858376...
I need an algorithm that can determine whether two images are 'similar' and recognizes similar patterns of color, brightness, shape etc.. I might need some pointers as to what parameters the human brain uses to 'categorize' images. .. I have looked at hausdorff based matching but that seems mainly for matching transformed objects and patterns of shape. I have done something similar, by decomposing images into signatures using [wavelet transform](http://en.wikipedia.org/wiki/Wavelet). My approach was to pick the most significant *n* coefficients from each transformed channel, and recording their location. This was done by sorting the list of (power,location) tuples according to abs(power). Similar
[ 0.40537455677986145, -0.07685181498527527, 0.29709190130233765, 0.19635014235973358, -0.1292472928762436, 0.08083735406398773, 0.03708377107977867, -0.4331988990306854, -0.05897312983870506, -0.8758563995361328, 0.029012996703386307, 0.2345738261938095, -0.3418087065219879, 0.0316301733255...
images will share similarities in that they will have significant coefficients in the same places. I found it was best to transform in the image into YUV format, which effectively allows you weight similarity in shape (Y channel) and colour (UV channels). You can in find my implementation of the above in [mactorii](https://github.com/freespace/mactorii), which unfortunately I haven't been working on as much as I should have :-) Another method, which some friends of mine have used with surprisingly good results, is to simply resize your image down to say, a 4x4 pixel and store that as your signature. How similar 2 images are
[ 0.5703983306884766, 0.10311847925186157, 0.5629153847694397, 0.1400153487920761, -0.3471536338329315, 0.06383568048477173, 0.12745040655136108, -0.33573514223098755, -0.22164204716682434, -0.7762672901153564, 0.07266957312822342, 0.37264198064804077, -0.08402818441390991, 0.007133055478334...
can be scored by say, computing the [Manhattan distance](http://en.wikipedia.org/wiki/Manhattan_distance) between the 2 images, using corresponding pixels. I don't have the details of how they performed the resizing, so you may have to play with the various algorithms available for that task to find one which is suitable.
[ 0.2696302533149719, -0.3515608012676239, 0.30331653356552124, 0.44086548686027527, 0.11209513992071152, 0.25213873386383057, -0.08658979088068008, -0.4447194039821625, 0.08364015072584152, -0.678939700126648, 0.2660648226737976, 0.26908859610557556, 0.1371050626039505, -0.07572485506534576...
This may be a no-brainer for the WPF cognoscenti, but I'd like to know if there's a simple way to put text on the WPF ProgressBar. To me, an empty progress bar looks naked. That's screen real estate that could carry a message about **what** is in progress, or even just add numbers to the representation. Now, WPF is all about containers and extensions and I'm slowly wrapping my mind around that, but since I don't see a "Text" or "Content" property, I'm thinking I'm going to have to add something to the container that is my progress bar. Is
[ 0.4963184595108032, 0.062077596783638, 0.41627201437950134, 0.07859811931848526, 0.056699350476264954, 0.028904208913445473, 0.07212688773870468, -0.08231258392333984, -0.5350815653800964, -0.7142581939697266, 0.005368467886000872, -0.09222391247749329, -0.05644989758729935, 0.259749978780...
there a technique or two out there that is more natural than my original WinForms impulses will be? What's the best, most WPF-natural way to add text to that progress bar? If you are needing to have a reusable method for adding text, you can create a new Style/ControlTemplate that has an additional TextBlock to display the text. You can hijack the TextSearch.Text attached property to set the text on a progress bar. If it doesn't need to be reusable, simply put the progress bar in a Grid and add a TextBlock to the grid. Since WPF can compose elements together,
[ 0.26769185066223145, -0.3136664927005768, 0.18992914259433746, 0.16800034046173096, -0.17650873959064484, -0.01419270969927311, 0.1468498557806015, -0.5457639694213867, -0.05100839585065842, -0.8439149856567383, 0.1313551813364029, 0.6284930109977722, -0.34344738721847534, -0.4235681891441...
this will work nicely. If you want, you can create a UserControl that exposes the ProgressBar and TextBlock as public properties, so it would be less work than creating a custom ControlTemplate.
[ 0.1562071293592453, -0.2307908982038498, 0.0862952470779419, 0.44301992654800415, 0.014603504911065102, -0.2512456476688385, 0.20478588342666626, -0.10930755734443665, -0.0403800830245018, -0.7587619423866272, 0.050646401941776276, 0.507416307926178, -0.26042869687080383, 0.096295915544033...
I've always been told that adding an element to an array happens like this: > An empty copy of the array+1element is > created and then the data from the > original array is copied into it then > the new data for the new element is > then loaded If this is true, then using an array within a scenario that requires a lot of element activity is contra-indicated due to memory and CPU utilization, correct? If that is the case, shouldn't you try to avoid using an array as much as possible when you will be adding a lot of elements?
[ 0.5459741353988647, 0.021974535658955574, -0.04172438755631447, -0.03869407996535301, 0.05072111263871193, -0.11545883864164352, 0.2577553391456604, -0.14091847836971283, -0.21072445809841156, -0.49871668219566345, -0.0017753834836184978, 0.4151160717010498, -0.42083802819252014, 0.0752639...
Should you use iStringMap instead? If so, what happens if you need more than two dimensions AND need to add a lot of element additions. Do you just take the performance hit or is there something else that should be used? Look at the generic `List<T>` as a replacement for arrays. They support most of the same things arrays do, including allocating an initial storage size if you want.
[ 0.2121947705745697, -0.41978922486305237, -0.09631147980690002, 0.19042466580867767, -0.1814938187599182, -0.2662438750267029, -0.10594304651021957, -0.3075806498527527, -0.4273548126220703, -0.6264294981956482, 0.18983277678489685, 0.6049556136131287, -0.23644298315048218, -0.220718845725...
I seldom use inheritance, but when I do, I never use protected attributes because I think it breaks the encapsulation of the inherited classes. Do you use protected attributes ? what do you use them for ? In this [interview](http://www.artima.com/intv/blochP.html) on Design by Bill Venners, Joshua Bloch, the author of *Effective Java* says: > Trusting Subclasses > ------------------- > > > **Bill Venners:** *Should I trust subclasses more intimately than > non-subclasses? For example, do I make > it easier for a subclass > implementation to break me than I > would for a non-subclass? In > particular, how do you feel about > protected
[ 0.17001591622829437, 0.08178465068340302, -0.4578395187854767, -0.08867666870355606, -0.17972585558891296, -0.02377791330218315, 0.6552430987358093, -0.7039141654968262, -0.15890178084373474, -0.7042469382286072, -0.010831082239747047, 0.5144686102867126, -0.34179559350013733, -0.265950709...
data?* > > > **Josh Bloch:** To write something that is both subclassable and robust > against a malicious subclass is > actually a pretty tough thing to do, > assuming you give the subclass access > to your internal data structures. If > the subclass does not have access to > anything that an ordinary user > doesn't, then it's harder for the > subclass to do damage. But unless you > make all your methods final, the > subclass can still break your > contracts by just doing the wrong > things in response to method > invocation. That's
[ 0.30438101291656494, -0.06089768186211586, -0.050512369722127914, 0.18689954280853271, -0.06714950501918793, -0.08837972581386566, 0.6033055186271667, -0.4182913601398468, -0.22072046995162964, -0.2936887741088867, -0.1502261459827423, 0.4888050854206085, -0.45544371008872986, -0.138802915...
precisely why the > security critical classes like String > are final. Otherwise someone could > write a subclass that makes Strings > appear mutable, which would be > sufficient to break security. So you > must trust your subclasses. If you > don't trust them, then you can't allow > them, because subclasses can so easily > cause a class to violate its > contracts. > > > As far as protected data in general, > it's a necessary evil. It should be > kept to a minimum. Most protected data > and protected methods amount to > committing to
[ 0.11838627606630325, -0.14537125825881958, -0.20838403701782227, 0.1302059441804886, 0.009070347063243389, -0.42462795972824097, 0.6595854759216309, -0.1577729880809784, -0.12476120889186859, -0.6114742159843445, -0.20021630823612213, 0.5229939818382263, -0.29160505533218384, 0.41226795315...
an implementation > detail. A protected field is an > implementation detail that you are > making visible to subclasses. Even a > protected method is a piece of > internal structure that you are making > visible to subclasses. > > > The reason you make it visible is that > it's often necessary in order to allow > subclasses to do their job, or to do > it efficiently. But once you've done > it, you're committed to it. It is now > something that you are not allowed to > change, even if you later find a more >
[ 0.2063731551170349, -0.12860660254955292, -0.08989313244819641, 0.17415639758110046, -0.05264640972018242, -0.11619337648153305, 0.49292781949043274, -0.09846685081720352, -0.440413236618042, -0.8981543183326721, -0.2048996537923813, 0.30922678112983704, -0.34730255603790283, 0.03558496013...
efficient implementation that no > longer involves the use of a > particular field or method. > > > So all other things being equal, you > shouldn't have any protected members > at all. But that said, if you have too > few, then your class may not be usable > as a super class, or at least not as > an efficient super class. Often you > find out after the fact. My philosophy > is to have as few protected members as > possible when you first write the > class. Then try to subclass it. You >
[ -0.27940553426742554, -0.06603025645017624, 0.05999836325645447, 0.060002945363521576, 0.10228291153907776, -0.18969717621803284, 0.6520243287086487, 0.026272470131516457, 0.014512774534523487, -1.0826407670974731, -0.14870190620422363, 0.5832089781761169, -0.7262803912162781, -0.213820055...
may find out that without a particular > protected method, all subclasses will > have to do some bad thing. > > > As an example, if you look at > `AbstractList`, you'll find that there > is a protected method to delete a > range of the list in one shot > (`removeRange`). Why is that in there? > Because the normal idiom to remove a > range, based on the public API, is to > call `subList` to get a sub-`List`, > and then call `clear` on that > sub-`List`. Without this particular > protected method, however, the
[ 0.21900856494903564, -0.2366647720336914, 0.10061217099428177, -0.09015066176652908, -0.11564213782548904, -0.2165931612253189, 0.5390535593032837, -0.3442519009113312, -0.34653422236442566, -0.6324390172958374, -0.24006387591362, 0.5065943002700806, -0.4305979311466217, 0.1172763630747795...
only > thing that `clear` could do is > repeatedly remove individual elements. > > > Think about it. If you have an array > representation, what will it do? It > will repeatedly collapse the array, > doing order N work N times. So it will > take a quadratic amount of work, > instead of the linear amount of work > that it should. By providing this > protected method, we allow any > implementation that can efficiently > delete an entire range to do so. And > any reasonable `List` implementation > can delete a range more efficiently >
[ -0.05978604033589363, -0.2592049837112427, 0.2791827619075775, 0.05314633995294571, -0.1328434944152832, -0.1844167560338974, 0.29260700941085815, -0.3547316789627075, -0.3605656325817108, -0.519856870174408, -0.14892767369747162, 0.335214227437973, -0.49630510807037354, 0.1971626281738281...
all at once. > > > That we would need this protected > method is something you would have to > be way smarter than me to know up > front. Basically, I implemented the > thing. Then, as we started to subclass > it, we realized that range delete was > quadratic. We couldn't afford that, so > I put in the protected method. I think > that's the best approach with > protected methods. Put in as few as > possible, and then add more as needed. > Protected methods represent > commitments to designs that you may >
[ 0.17793717980384827, -0.19312843680381775, 0.2606518566608429, 0.1927238553762436, -0.21884086728096008, -0.15577596426010132, 0.20298020541667938, -0.5752356648445129, -0.010137097910046577, -0.5473601222038269, 0.03640070557594299, 0.7873032093048096, -0.3698726296424866, -0.127224907279...
want to change. You can always add > protected methods, but you can't take > them out. > > > **Bill Venners:** *And protected data?* > > > **Josh Bloch:** The same thing, but even more. Protected data is even more > dangerous in terms of messing up your > data invariants. If you give someone > else access to some internal data, > they have free reign over it. Short version: it breaks encapsulation but it's a necessary evil that should be kept to a minimum.
[ 0.6064931750297546, 0.01298685185611248, 0.16013406217098236, 0.08198288083076477, 0.36404111981391907, -0.1483372449874878, 0.46281155943870544, -0.06335581094026566, -0.43661677837371826, -0.5767025947570801, -0.017511771991848946, 0.44563210010528564, -0.5140960216522217, 0.057675320655...
Okay, I've seen but haven't programmed in C# before. You can assume I'm competent in C++, and advanced in C (for what good that'll do me). I understand inheritance, polymorphism, etc so OO concepts aren't going to be a huge problem. Let's say I've been given a task to prototype a quick and dirty program that won't be much different than what I could do in access in a short time. * It'll have a DB with 5-6 tables (mostly small, a few with have several thousand rows but only 4 or so columns, etc) * I'll need to have forms generated dynamically
[ 0.18519249558448792, 0.10103898495435715, 0.21478205919265747, 0.22512337565422058, -0.13343928754329681, 0.13806068897247314, 0.14487798511981964, -0.0762951523065567, -0.15208572149276733, -0.7509628534317017, 0.09806136041879654, 0.5327849388122559, 0.09378447383642197, -0.0482223518192...
from one of the DBs * The results of the forms will be stored in another table * The DB isn't multiuser Basically your run of the mill access app... except without access. I'm sure I can muddle my way through and create horrendously bad code, but I'm equally sure lots of people here can give me a push in the right direction (tutorials, wizards, info, differences and killers moving from C/C++ to C#, etc). Is there a simple DB I can plug in to get started aside from mdb, or is that the best choice for this particular nail? I'm aiming for a
[ 0.4757089912891388, 0.15103328227996826, 0.010394162498414516, 0.15676257014274597, -0.496737539768219, -0.12646067142486572, 0.24294231832027435, 0.121210977435112, -0.04806269332766533, -0.5762038230895996, 0.1261352002620697, 0.5330007672309875, -0.17030036449432373, 0.24513663351535797...
quick and dependency-less install. Thanks! -Adam It sounds like for this app, you could use [Microsoft Dynamic Data](http://www.asp.net/dynamicdata/) or [Castle Active Record](http://www.castleproject.org/activerecord/index.html), and have the application working a few minutes after you finished the database. These tools connect to a database and generate forms for inputing data. Take a look at them. Access is probably your best choice for database. MS Sql 2005/2008 Express would also work well, but that would require an install.
[ -0.21112920343875885, -0.2974725663661957, 0.4439634680747986, 0.10057194530963898, -0.13723935186862946, -0.13161353766918182, 0.3741391599178314, -0.10579363256692886, -0.32730531692504883, -0.6168330907821655, -0.01080810185521841, 0.7664237022399902, -0.12613755464553833, -0.0959420055...
In Microsoft IL, to call a method on a value type you need an indirect reference. Lets say we have an ILGenerator named "il" and that currently we have a Nullable on top of the stack, if we want to check whether it has a value then we could emit the following: ``` var local = il.DeclareLocal(typeof(Nullable<int>)); il.Emit(OpCodes.Stloc, local); il.Emit(OpCodes.Ldloca, local); var method = typeof(Nullable<int>).GetMethod("get_HasValue"); il.EmitCall(OpCodes.Call, method, null); ``` However it would be nice to skip saving it as a local variable, and simply call the method on the address of the variable already on the stack, something like: ``` il.Emit(/* not sure */); var method = typeof(Nullable<int>).GetMethod("get_HasValue"); il.EmitCall(OpCodes.Call, method, null); ``` The ldind
[ 0.21641288697719574, -0.34797602891921997, 0.2379687875509262, -0.12008844316005707, -0.3483634889125824, -0.128046914935112, 0.24607260525226593, -0.2899051308631897, 0.07965610176324844, -0.8456014394760132, -0.09374742209911346, 0.4506220817565918, -0.7808619141578674, -0.11613732576370...
family of instructions looks promising (particularly ldind\_ref) but I can't find sufficient documentation to know whether this would cause boxing of the value, which I suspect it might. I've had a look at the C# compiler output, but it uses local variables to achieve this, which makes me believe the first way may be the only way. Anyone have any better ideas? \*\*\*\* Edit: Additional Notes \*\*\*\* Attempting to call the method directly, as in the following program with the lines commented out, doesn't work (the error will be "Operation could destabilise the runtime"). Uncomment the lines and you'll see that it does
[ 0.3558482229709625, 0.14110572636127472, 0.08442491292953491, 0.0062413341365754604, 0.10344814509153366, -0.005738015752285719, 0.49163031578063965, -0.21532121300697327, -0.1225656121969223, -0.6130983829498291, -0.1021926999092102, 0.589769184589386, -0.4729284942150116, -0.053917884826...
work as expected, returning "True". ``` var m = new DynamicMethod("M", typeof(bool), Type.EmptyTypes); var il = m.GetILGenerator(); var ctor = typeof(Nullable<int>).GetConstructor(new[] { typeof(int) }); il.Emit(OpCodes.Ldc_I4_6); il.Emit(OpCodes.Newobj, ctor); //var local = il.DeclareLocal(typeof(Nullable<int>)); //il.Emit(OpCodes.Stloc, local); //il.Emit(OpCodes.Ldloca, local); var getValue = typeof(Nullable<int>).GetMethod("get_HasValue"); il.Emit(OpCodes.Call, getValue); il.Emit(OpCodes.Ret); Console.WriteLine(m.Invoke(null, null)); ``` So you can't simply call the method with the value on the stack because it's a value type (though you could if it was a reference type). What I'd like to achieve (or to know whether it is possible) is to replace the three lines that are shown commented out, but keep the program working, without using a temporary local. If the variable is already on the stack, you can go ahead
[ 0.23808670043945312, -0.24845200777053833, 0.6265966296195984, -0.43449223041534424, 0.03355514258146286, 0.20111742615699768, 0.5817908644676208, -0.6401038765907288, -0.22041629254817963, -0.820978045463562, -0.3034639060497284, 0.8136035203933716, -0.730414628982544, -0.1200160160660743...
and just emit the method call. It seems that the constructor doesn't push the variable on the stack in a typed form. After digging into the IL a bit, it appears there are two ways of using the variable after constructing it. You can load the variable that will store the reference onto the evaluation stack before calling the constructor, and then load that variable again after calling the constructor like so: ``` DynamicMethod method = new DynamicMethod("M", typeof(bool), Type.EmptyTypes); ILGenerator il = method.GetILGenerator(); Type nullable = typeof(Nullable<int>); ConstructorInfo ctor = nullable.GetConstructor(new Type[] { typeof(int) }); MethodInfo getValue = nullable.GetProperty("HasValue").GetGetMethod(); LocalBuilder value = il.DeclareLocal(nullable);
[ 0.22392962872982025, -0.3529159724712372, 0.4973497986793518, -0.2577380836009979, -0.09527208656072617, 0.02605808526277542, 0.35734230279922485, -0.5621150135993958, 0.016539249569177628, -0.6110509037971497, -0.108421191573143, 0.8005132675170898, -0.6954583525657654, 0.0554413981735706...
// load the variable to assign the value from the ctor to il.Emit(OpCodes.Ldloca_S, value); // load constructor args il.Emit(OpCodes.Ldc_I4_6); il.Emit(OpCodes.Call, ctor); il.Emit(OpCodes.Ldloca_S, value); il.Emit(OpCodes.Call, getValue); il.Emit(OpCodes.Ret); Console.WriteLine(method.Invoke(null, null)); ``` The other option is doing it the way you have shown. The only reason for this that I can see is that the ctor methods return void, so they don't put their value on the stack like other methods. It does seem strange that you can call Setloc if the new object isn't on the stack.
[ 0.357480525970459, -0.16721968352794647, 0.3418808877468109, -0.23457548022270203, 0.05239945277571678, -0.05246113985776901, 0.32092025876045227, -0.5385091304779053, -0.11817578226327896, -0.6217581629753113, -0.21267102658748627, 0.7702713012695312, -0.7427834272384644, 0.06520274281501...
In my SWT Java app I often want to return information from inside a Display.syncExec() call. The best way I've found so far to do this is: ``` final ArrayList<Integer> result = new ArrayList<Integer>(); GUI.display().syncExec(new Runnable(){ public void run() { MessageBox mb = /* ... */; /* set up messagebox */ result.add(mb.open()); }}); if (SWT.OK == result.get(0)) { /* ... */ } ``` I think this is allowed because ArrayList is thread-safe, but is there a better container I should be using, or an easier way altogether? [`ArrayList` is not thread-safe](http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html). You can obtain a thread-safe `List` with [`Collections.synchronizedList`](http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList%28java.util.List%29). However, it
[ 0.06931575387716293, -0.1888965517282486, 0.7847086191177368, -0.28865036368370056, -0.09283255785703659, 0.07462186366319656, 0.6298347115516663, -0.08855090290307999, -0.36907070875167847, -0.7442688345909119, -0.05521341785788536, 0.6084518432617188, -0.4841025471687317, 0.1201707720756...
is much simpler to use an `AtomicInteger` in your case or `AtomicReference` in a more general case. ``` final AtomicInteger resultAtomicInteger = new AtomicInteger(); Display.getCurrent().syncExec(new Runnable() { public void run() { MessageBox mb = /* ... */; /* set up messagebox */ resultAtomicInteger.set(mb.open()); }}); if (SWT.OK == resultAtomicInteger.get()) { /* ... */ } ```
[ -0.06207975372672081, -0.34303539991378784, 0.9460735321044922, -0.1357884556055069, 0.23816998302936554, 0.13775190711021423, 0.27290359139442444, -0.4007529020309448, -0.4658227264881134, -0.7345468997955322, -0.26777827739715576, 0.6044572591781616, -0.3512089252471924, 0.44278407096862...
I really want to get the google Calendar Api up an running. I found a [great article](http://www.ibm.com/developerworks/library/x-googleclndr/) about how to get started. I downloaded the Zend GData classes. I have php 5 running on my dev box and all the exetensions should be loading. I cant get openssl running and recieve the following error when I try to run any of the example page which should connect to my Google Calendar. ``` Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Unable to Connect to ssl://www.google.com:443. Error #24063472: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?' ``` I have
[ 0.31651920080184937, 0.1799691915512085, 0.3543469309806824, 0.013800794258713722, -0.390017032623291, -0.2590402364730835, 0.48420873284339905, -0.14774483442306519, -0.2665828466415405, -0.7895970344543457, -0.018524229526519775, 0.6937032341957092, -0.3474668860435486, -0.00126567506231...
looked in many places to try to get OpenSSL running on my machine and installed. Does anyone know of a simple failsafe tutorial to get this combination up and running? I think this use of SSL is part of the Zend GData library so I assume it is correct. I think not having OpenSSL correctly installed is my main issue.
[ 0.3722229599952698, 0.2839130461215973, 0.01786614954471588, 0.18137261271476746, -0.11574212461709976, -0.42758944630622864, 0.4432823657989502, 0.13535863161087036, -0.08594881743192673, -0.6717858910560608, 0.01737268455326557, 0.5762789845466614, -0.2769767940044403, 0.0695755407214164...
I have a SQL Insert query inside a stored proc, for inserting rows into a **linked server** table. Since the stored proc is getting called within a parent transaction, this Insert statement tries to use a DTC for inserting rows into the linked server. I would like to **avoid** DTC from getting involved. Is there any way I can do that (like a hint) for the Insert SQL statement to ignore transactional scope? My suggestion is that you store whatever you want to insert into a staging table, and once the procedure is over run the cross server insert. To my knowledge there is
[ 0.36262956261634827, 0.057753175497055054, 0.12861205637454987, -0.09782372415065765, 0.25340402126312256, -0.027036838233470917, -0.4509900212287903, 0.15195061266422272, -0.08676777780056, -0.639029860496521, 0.2891691327095032, 0.2912082076072693, -0.4111486077308655, 0.226270854473114,...
no way of ignoring the transaction you are in once you are within the SProc execution. In contrast, if you use .NET 2.0's System.Transaction namespace, you can tell specific statements not to participate in any parent scope transaction. This would require you to write some of your logic in code rather than stored procedures, but would work. Here's a [relevant link](http://decipherinfosys.wordpress.com/2007/02/01/simulating-autonomous-transaction-behavior-in-sql-server/). Good luck, Alan.
[ 0.1891828179359436, -0.19600582122802734, -0.10181456804275513, 0.30313435196876526, 0.2357989400625229, -0.6360765099525452, 0.3238755762577057, 0.08031012117862701, -0.4861885607242584, -0.3130888342857361, 0.06852433830499649, 0.5334292650222778, -0.2645511329174042, -0.0577602833509445...
XmlElement.Attributes.Remove\* methods are working fine for arbitrary attributes resulting in the removed attributes being removed from XmlDocument.OuterXml property. Xmlns attribute however is different. Here is an example: ``` XmlDocument doc = new XmlDocument(); doc.InnerXml = @"<Element1 attr1=""value1"" xmlns=""http://mynamespace.com/"" attr2=""value2""/>"; doc.DocumentElement.Attributes.RemoveNamedItem("attr2"); Console.WriteLine("xmlns attr before removal={0}", doc.DocumentElement.Attributes["xmlns"]); doc.DocumentElement.Attributes.RemoveNamedItem("xmlns"); Console.WriteLine("xmlns attr after removal={0}", doc.DocumentElement.Attributes["xmlns"]); ``` The resulting output is ``` xmlns attr before removal=System.Xml.XmlAttribute xmlns attr after removal= <Element1 attr1="value1" xmlns="http://mynamespace.com/" /> ``` The attribute seems to be removed from the Attributes collection, but it is not removed from XmlDocument.OuterXml. I guess it is because of the special meaning of this attribute. The question is how to remove the xmlns attribute using .NET XML API. Obviously I can just remove the
[ -0.12359236180782318, 0.09881222993135452, 0.6789999008178711, -0.07302173972129822, -0.05900561064481735, -0.19198814034461975, -0.04877898842096329, -0.5200256705284119, -0.06284519284963608, -0.575884997844696, -0.0943785309791565, 0.7702431082725525, -0.09941617399454117, 0.23593547940...
attribute from a String representation of this, but I wonder if it is possible to do the same thing using the API. @Edit: I'm talking about .NET 2.0. .NET DOM API doesn't support modifying element's namespace which is what you are essentially trying to do. So, in order to solve your problem you have to construct a new document one way or another. You can use the same .NET DOM API and create a new element without specifying its namespace. Alternatively, you can create an XSLT stylesheet that transforms your original "namespaced" document to a new one in which the elements will
[ 0.48177382349967957, -0.011257350444793701, 0.2530031204223633, 0.1551324874162674, -0.17549864947795868, -0.1687997728586197, 0.22374875843524933, -0.18367813527584076, -0.15790115296840668, -0.632993757724762, 0.0478067472577095, 0.6733056902885437, -0.5639957785606384, 0.186519652605056...
be not namespace-qualified.
[ 0.13154913485050201, 0.39477017521858215, -0.17233243584632874, -0.07266106456518173, 0.13027414679527283, -0.4314516484737396, 0.2808751165866852, 0.15971344709396362, 0.1343659907579422, -0.45934194326400757, -0.6571006774902344, 0.06417762488126755, -0.10761512815952301, -0.094899080693...
I'd like to create a module in DNN that, similar to the Announcements control, offers a template that the portal admin can modify for formatting. I have a control that currently uses a Repeater control with templates. Is there a way to override the contents of the repeater ItemTemplate, HeaderTemplate, and FooterTemplate properties? Building on the previous answer, a better solution that includes the label for the group box: ``` groupBox1.Paint += PaintBorderlessGroupBox; private void PaintBorderlessGroupBox(object sender, PaintEventArgs p) { GroupBox box = (GroupBox)sender; p.Graphics.Clear(SystemColors.Control); p.Graphics.DrawString(box.Text, box.Font, Brushes.Black, 0, 0); } ``` You might want to adjust the x/y for the text, but for my
[ 0.3417147696018219, 0.07412603497505188, 0.6955161094665527, -0.1613689810037613, -0.17211799323558807, 0.08711786568164825, 0.31565019488334656, -0.18031759560108185, 0.06569352000951767, -0.7458299994468689, 0.030309388414025307, 0.3139573335647583, -0.44421660900115967, 0.21334546804428...
use this is just right.
[ 0.3693477511405945, 0.23278431594371796, -0.24952569603919983, 0.06337601691484451, -0.07209549099206924, -0.02604127861559391, 0.0016424109926447272, -0.1325129121541977, 0.22424109280109406, -0.8490405678749084, 0.3402690291404724, 0.5050855278968811, 0.03143172338604927, -0.134430944919...
In JavaScript, using the Prototype library, the following functional construction is possible: ``` var words = ["aqueous", "strength", "hated", "sesquicentennial", "area"]; words.pluck('length'); //-> [7, 8, 5, 16, 4] ``` Note that this example code is equivalent to ``` words.map( function(word) { return word.length; } ); ``` I wondered if something similar is possible in F#: ``` let words = ["aqueous"; "strength"; "hated";"sesquicentennial"; "area"] //val words: string list List.pluck 'Length' words //int list = [7; 8; 5; 16; 4] ``` without having to write: ``` List.map (fun (s:string) -> s.Length) words ``` This would seem quite useful to me because then you don't have to write functions for every property to access them. I saw your request on the F# mailing list. Hope
[ -0.09880945831537247, 0.09143145382404327, 0.3129826784133911, -0.32213354110717773, -0.23212316632270813, 0.11838220804929733, 0.4529491364955902, -0.37758904695510864, -0.057711973786354065, -0.8999915719032288, -0.3232578635215759, 0.4680264890193939, -0.27301332354545593, -0.0999937877...
I can help. You could use type extension and reflection to allow this. We simple extend the generic list type with the pluck function. Then we can use pluck() on any list. An unknown property will return a list with the error string as its only contents. ``` type Microsoft.FSharp.Collections.List<'a> with member list.pluck property = try let prop = typeof<'a>.GetProperty property [for elm in list -> prop.GetValue(elm,
[ 0.0732307881116867, -0.14648064970970154, 0.2455662488937378, -0.0870993435382843, -0.048066675662994385, 0.08809717744588852, 0.4730990529060364, -0.42612725496292114, 0.04660995304584503, -0.5823712944984436, 0.056777410209178925, 0.6734020709991455, -0.3036912679672241, 0.17927986383438...
[| |])] with e-> [box <| "Error: Property '" + property + "'" + " not found on type '" + typeof<'a>.Name + "'"] let a = ["aqueous"; "strength"; "hated"; "sesquicentennial"; "area"] a.pluck "Length" a.pluck "Unknown" ``` which produces the follow result in the interactive window: ``` > a.pluck "Length" ;; val it : obj list = [7; 8;
[ -0.07642421126365662, -0.2332761436700821, 0.5210227370262146, -0.12593375146389008, 0.20454570651054382, 0.2680565118789673, -0.17938365042209625, -0.05575030297040939, -0.3639926314353943, -0.28919658064842224, -0.14617477357387543, 0.29738056659698486, -0.049471478909254074, 0.292839974...
5; 16; 4] > a.pluck "Unknown";; val it : obj list = ["Error: Property 'Unknown' not found on type 'String'"] ``` warm regards, DannyAsher > > > > > NOTE: When using `<pre`> the angle brackets around ``` <'a> ``` didn't show though in the preview window it looked fine. The backtick didn't work for me. Had to resort you the colorized version which is all wrong. I don't think I'll post here again until FSharp syntax is fully supported.
[ 0.07649912685155869, -0.05334562063217163, 0.31595927476882935, -0.10297617316246033, 0.049286678433418274, -0.09242390841245651, 0.4079015254974365, -0.08683700114488602, 0.15698488056659698, -0.7080379724502563, -0.1490454524755478, 0.570098876953125, -0.1064116582274437, 0.1851028949022...
I would like to call my unmanaged C++ libraries from my C# code. What are the potential pitfalls and precautions that need to be taken? Thank you for your time. This question is too broad. The only reasonable answer is P/Invoke, but that's kind of like saying that if you want to program for Windows you need to know the Win32 API. Pretty much entire books have been written about P/Invoke ([http://www.amazon.com/NET-COM-Complete-Interoperability-Guide/dp/067232170X](https://rads.stackoverflow.com/amzn/click/com/067232170X)), and of course entire websites have been made: <http://www.pinvoke.net/>.
[ 0.42823269963264465, 0.051219675689935684, -0.13206622004508972, 0.1012842133641243, -0.1171906590461731, -0.14592154324054718, 0.2663519084453583, -0.0553918331861496, -0.16305965185165405, -0.29574161767959595, -0.26077914237976074, 0.4472580850124359, -0.03207321837544441, 0.11269901692...
I'm in the process of designing a PHP-based content management system for personal use and eventually to be distributed. I know there are a lot of CMS's already out there, but I really haven't found one that meets my all of my needs and I also would like to have the learning experience. Security is a large focus, as are extensibility and ease of use. For those of you out there who have built your own CMS, what advice can you offer? What features are essential for a core? What are must have add-ons? What did you wish you knew
[ 0.30953648686408997, 0.3098733723163605, 0.014233791269361973, 0.4096197187900543, 0.0958036556839943, -0.19424539804458618, 0.1036076545715332, 0.24241609871387482, -0.2978771924972534, -0.6513047218322754, 0.03462234511971474, 0.40108752250671387, 0.07840041071176529, 0.03309654444456100...
before starting? What's the biggest potential roadblock/problem? Any and all advice is welcome. Edit: Any advice on marketing do's and don't's would also be appreciated. Well, building your own CMS actually implies that it is not an enterprise-level product. What this means is that you will not be able to actually implement all features that make CMS users happy. Not even most features. I want to clarify that by CMS I actually mean a platform for creating web applications or web sites, not a blogging platform or a scaled-down version. From personal experience I can tell you the things I want most
[ 0.6459551453590393, 0.23058894276618958, 0.17941145598888397, 0.2400290071964264, 0.12166939675807953, -0.11895616352558136, 0.09467128664255142, 0.3948006331920624, -0.36907029151916504, -0.4840123653411865, -0.05582493171095848, 0.5941206216812134, -0.017418110743165016, -0.1987626701593...
in a CMS. 1. Extensible - provide a clean and robust API so that a programmer can do most things through code, instead of using the UI 2. Easy page creation and editing - use templates, have several URLs for a single page, provide options for URL rewriting 3. Make it component-based. Allow users to add custom functionality. Make it easy for someone to add his code to do something 4. Make it SEO-friendly. This includes metadata, again URL rewriting, good sitemap, etc. Now there are these enterprise features that I also like, but i doubt you'll
[ 0.05922545865178108, 0.023626629263162613, 0.3985140919685364, 0.19788150489330292, -0.18681097030639648, -0.4984065592288971, 0.19940251111984253, -0.2578169107437134, -0.35938146710395813, -0.6939765214920044, -0.2968793213367462, 0.4654812514781952, -0.3685971200466156, -0.5044838786125...
have the desire to dive into their implementation from the beginning. They include workflow (an approval process for content-creation, customizable), Built-in modules for common functionality (blogs, e-commerce, news), ability to write own modules, permissions for different users, built-in syndication, etc. After all I speak from a developer's point of view and my opinion might not be mainstream, so you have to decide on your own in the end. Just as ahockley said - you have to know why you need to build your own CMS.
[ 0.4742835760116577, 0.42866280674934387, 0.20469915866851807, 0.17062245309352875, 0.10121379047632217, -0.037849366664886475, -0.2960061728954315, 0.013197761960327625, -0.27938491106033325, -0.6063299179077148, -0.19002234935760498, 0.3141072690486908, -0.06900881230831146, -0.0928595662...
fellow anthropoids and lily pads and paddlewheels! I'm developing a Windows desktop app in C#/.NET/WPF, using VS 2008. The app is required to install and run on Vista and XP machines. I'm working on a Setup/Windows Installer Project to install the app. My app requires read/modify/write access to a SQLCE database file (.sdf) and some other database-type files related to a third-party control I'm using. These files should be shared among all users/log-ins on the PC, none of which can be required to be an Administrator. This means, of course, that the files can't go in the program's own installation directory (as
[ 0.035960059612989426, 0.14772114157676697, 0.16885370016098022, 0.2297508269548416, 0.04430422931909561, 0.2843945026397705, 0.2756255269050598, 0.19077558815479279, -0.1673373430967331, -0.4661252498626709, 0.40054383873939514, 0.445803701877594, -0.31415989995002747, -0.10513368993997574...
such things often did before the arrival of Vista, yes, yes!). I had expected the solution to be simple. **Vista and XP both have shared-application-data folders intended for this purpose.** ("\ProgramData" in Vista, "\Documents and Settings\All Users\Application Data" in XP.) The .NET Environment.GetFolderPath(SpecialFolder.CommonApplicationData) call exists to find the paths to these folders on a given PC, yes, yes! **But I can't figure out how to specify the shared-application-data folder as a target in the Setup project.** The Setup project offers a "Common Files" folder, but that's intended for shared program components (not data files), is usually located under "\Program Files," and has the
[ 0.3823045790195465, 0.03027401864528656, 0.3078172504901886, 0.16257119178771973, 0.1289166957139969, -0.29468151926994324, 0.17145639657974243, -0.036615196615457535, -0.24103832244873047, -0.8992443680763245, -0.1451035588979721, 0.7363532781600952, -0.2913115322589874, -0.00831246655434...
same security restrictions anything else in "\Program files" does, yes, yes! The Setup project offers a "User's Application Data" folder, but that's a per-user folder, which is exactly what I'm trying to avoid, yes, yes! Is it possible to add files to the shared-app-data folder in a robust, cross-Windows-version way from a VS 2008 setup project? Can anyone tell me how? I have learned the answer to my question through other sources, yes, yes! Sadly, it didn't fix my problem! What's that make me -- a fixer-upper? Yes, yes! To put stuff in a sub-directory of the Common Application Data folder from a VS2008
[ 0.23950336873531342, 0.08180932700634003, 0.2873610556125641, 0.22102032601833344, 0.21834389865398407, -0.3699330985546112, 0.2610662579536438, -0.18033559620380402, -0.5232741236686707, -0.4497259557247162, -0.20100797712802887, 0.8439545035362244, -0.34913626313209534, -0.07068081200122...
Setup project, here's what you do: 1. Right-click your setup project in the Solution Explorer and pick "View -> File System". 2. Right-click "File system on target machine" and pick "Add Special Folder -> Custom Folder". 3. Rename the custom folder to "Common Application Data Folder." (This isn't the name that will be used for the resulting folder, it's just to help you keep it straight.) 4. Change the folder's DefaultLocation property to "[CommonAppDataFolder][Manufacturer]\[ProductName]". Note the similarity with the DefaultLocation property of the Application Folder, including the odd use of a single backslash. 5. Marvel for a moment at the ridiculous (yet undeniable) fact that
[ 0.8681478500366211, -0.03570739924907684, 0.32297390699386597, 0.11101382225751877, 0.07301326096057892, -0.05155400559306145, -0.00004103047103853896, -0.23249322175979614, -0.1288442611694336, -0.7564780712127686, -0.09250359237194061, 0.6556931734085083, -0.21270570158958435, 0.29071766...
there is a folder property named "Property." 6. Change the folder's Property property to "COMMONAPPDATAFOLDER". Data files placed in the "Common Application Data" folder will be copied to "\ProgramData\Manufacturer\ProductName" (on Vista) or "\Documents and Settings\All Users\Application Data\Manufacturer\ProductName" (on XP) when the installer is run. Now it turns out that under Vista, non-Administrators don't get modify/write access to the files in here. So all users get to read the files, but they get that in "\Program Files" as well. So what, I wonder, is the point of the Common Application Data folder?
[ 0.3490615487098694, 0.15965530276298523, 0.7674820423126221, 0.09350866079330444, 0.15956813097000122, -0.29250138998031616, 0.1792493462562561, -0.10010208934545517, -0.265262633562088, -0.820886492729187, -0.14321544766426086, 0.47320762276649475, -0.06185508891940117, 0.6362436413764954...
How cheap can MySQL be compared to MS SQL when you have tons of data (and joins/search)? Consider a site like stackoverflow full of Q&As already and after getting dugg. My ASP.NET sites are currently on SQL Server Express so I don't have any idea how cost compares in the long run. Although after a quick research, I'm starting to envy the savings MySQL folks get. MSSQL Standard Edition (32 or 64 bit) will cost around $5K *per CPU socket*. 64 bit will allow you to use as much RAM as you need. Enterprise Edition is not really necessary for most
[ 0.18410557508468628, -0.0015725133707746863, 0.23787027597427368, 0.2488911747932434, -0.2520563304424286, 0.03886866942048073, 0.053311124444007874, 0.06815089285373688, -0.14050811529159546, -0.849872350692749, 0.14713795483112335, 0.7806541919708252, -0.04804805666208267, -0.03870864957...
deployments, so don't worry about the $20K you would need for that license. MySQL is only free if you forego a lot of the useful tools offered with the licenses, and it's probably (at least as of 2008) going to be a little more work to get it to scale like Sql Server. In the long run I think you will spend much more on hardware and people than you will on just the licenses. If you need to scale, then you will probably have the cash flow to handle $5K here and there.
[ 0.2802025377750397, 0.0894356295466423, 0.17989271879196167, 0.1877635270357132, 0.0633748322725296, -0.5015897154808044, 0.2863348424434662, 0.38958999514579773, -0.533334493637085, -0.6600052118301392, 0.14884604513645172, 0.5300692915916443, 0.08122168481349945, -0.03563845530152321, ...
What are some general tips to make sure I don't leak memory in C++ programs? How do I figure out who should free memory that has been dynamically allocated? Instead of managing memory manually, try to use smart pointers where applicable. Take a look at the [Boost lib](http://www.boost.org/), [TR1](http://en.wikipedia.org/wiki/Technical_Report_1), and [smart pointers](http://www.boost.org/doc/libs/1_36_0/libs/smart_ptr/smart_ptr.htm). Also smart pointers are now a part of C++ standard called [C++11](http://en.wikipedia.org/wiki/Smart_pointer).
[ 0.2430572658777237, 0.028499551117420197, 0.11486215889453888, 0.20864728093147278, 0.05209936201572418, -0.0568566732108593, -0.154817596077919, -0.18616095185279846, -0.31213435530662537, -0.4536043107509613, -0.044379785656929016, 0.7658417224884033, -0.17238588631153107, -0.39473095536...
I want to load a different properties file based upon one variable. Basically, if doing a dev build use this properties file, if doing a test build use this other properties file, and if doing a production build use yet a third properties file. **Step 1**: Define a property in your NAnt script to track the environment you're building for (local, test, production, etc.). ``` <property name="environment" value="local" /> ``` **Step 2**: If you don't already have a configuration or initialization target that all targets depends on, then create a configuration target, and make sure your other targets depend on it. ``` <target name="config"> <!--
[ 0.570239245891571, 0.007461979985237122, -0.03005923330783844, -0.007017116528004408, 0.04818970337510109, -0.011853489093482494, 0.07784797996282578, -0.3913004398345947, -0.018736835569143295, -1.207457423210144, 0.13543401658535004, 0.7012618780136108, 0.01811768114566803, 0.02999540418...
configuration logic goes here --> </target> <target name="buildmyproject" depends="config"> <!-- this target builds your project, but runs the config target first --> </target> ``` **Step 3**: Update your configuration target to pull in an appropriate properties file based on the environment property. ``` <target name="config"> <property name="configFile" value="${environment}.config.xml" /> <if test="${file::exists(configFile)}"> <echo message="Loading ${configFile}..." /> <include buildfile="${configFile}" /> </if> <if test="${not file::exists(configFile) and environment != 'local'}"> <fail message="Configuration file '${configFile}' could
[ -0.10767031461000443, -0.3709332048892975, 0.20138467848300934, 0.11060631275177002, 0.27033790946006775, -0.08238384872674942, 0.09183347225189209, -0.47031906247138977, -0.18329276144504547, -0.7775556445121765, -0.1463807076215744, 0.9654055237770081, -0.23951923847198486, -0.1119862496...
not be found." /> </if> </target> ``` Note, I like to allow team members to define their own local.config.xml files that don't get committed to source control. This provides a nice place to store local connection strings or other local environment settings. **Step 4**: Set the environment property when you invoke NAnt, e.g.: * nant -D:environment=dev * nant -D:environment=test * nant -D:environment=production
[ 0.34462034702301025, -0.005093103740364313, -0.15503928065299988, -0.10745974630117416, 0.041659485548734665, -0.13682465255260468, 0.405873566865921, -0.35038313269615173, -0.10950148105621338, -0.6231815814971924, -0.09536156058311462, 0.6186739206314087, -0.1654096245765686, -0.01483028...
I have some curious behavior that I'm having trouble figuring out why is occurring. I'm seeing intermittent timeout exceptions. I'm pretty sure it's related to volume because it's not reproducible in our development environment. As a bandaid solution, I tried upping the sql command timeout to sixty seconds, but as I've found, this doesn't seem to help. Here's the strange part, when I check my logs on the process that is failing, here are the start and end times: * 09/16/2008 16:21:49 * 09/16/2008 16:22:19 So how could it be that it's timing out in thirty seconds when I've set the command timeout
[ 0.13829296827316284, 0.33907029032707214, 0.5670512318611145, -0.10363156348466873, -0.03897010162472725, -0.022342439740896225, 0.6414570212364197, -0.05335911363363266, -0.4075702726840973, -0.6706870198249817, 0.39054980874061584, 0.5799476504325867, 0.038913361728191376, 0.335480839014...
to sixty?? Just for reference, here's the exception being thrown: ``` System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior
[ 0.263052761554718, 0.01543413195759058, 0.41388219594955444, -0.015050051733851433, 0.016479628160595894, 0.31966108083724976, 0.10913663357496262, -0.2787799835205078, -0.15569917857646942, -0.4055967330932617, -0.05519583076238632, 0.5344289541244507, -0.12234863638877869, 0.254998922348...
runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader() at SetClear.DataAccess.SqlHelper.ExecuteReader(CommandType commandType, String commandText, SqlParameter[] commandArgs) ``` SQL commands time out because the query you're using takes longer than that to execute. Execute it in Query Analyzer or Management Studio, *with a representative amount of data in the database*, and look at the execution plan to find out what's slow. If something is taking a large percentage of the time and is described as a 'table scan' or 'clustered index scan', look at whether you can create an index that would turn that operation
[ 0.3913932144641876, -0.4149000942707062, 0.09355251491069794, 0.08076870441436768, 0.36095333099365234, 0.01289890706539154, 0.38220033049583435, -0.19528022408485413, -0.1860928237438202, -0.44140133261680603, -0.16933992505073547, 0.7324388027191162, -0.5186340808868408, -0.0305660981684...
into a key lookup (an index seek or clustered index seek).
[ -0.2807205319404602, -0.4322068393230438, 0.2357582151889801, 0.10517662018537521, 0.27059224247932434, -0.15891139209270477, -0.44418057799339294, -0.1408662647008896, 0.14685975015163422, -0.3935233950614929, -0.7192076444625854, 0.394948810338974, -0.28711998462677, 0.09079090505838394,...
DOING THE POST IS NOT THE PROBLEM! Formatting the message so that I get a response is the problem. Ideally I'd be able to construct a message and use WinHTTP to perform a post to a WCF service (hosted in IIS) and get a response, but so far I've been unable to construct something that works properly. Does anyone have an example of doing this that is straightforward? In the 2.0 Web Service world this was as easy as putting a setting in the web.config to get the service to respond to a post and then calling the appropriate web method with the
[ 0.500629723072052, -0.12258165329694748, 0.07824576646089554, -0.08164508640766144, -0.5691671967506409, -0.016880135983228683, 0.4972365200519562, -0.14259231090545654, -0.2709616720676422, -0.5186609625816345, -0.04750293493270874, 0.3776909410953522, -0.44781771302223206, -0.07453816384...
right parameters. There seems to be no analogue for this in the WCF world. As of now there is no option for me to convert the consumer (the vbscript end) into .NET. Assume at this point that at the endpoint I can convert to using whatever bindings are available right up to whatever is supported in .NET 3.5, but at the same time if this can be done using WsHttpBinding or BasicHttpBinding then the proper answer to this would be to describe how to format the message for either of those bindings in the context of VBScript or if there is no
[ 0.3489832580089569, -0.08871911466121674, 0.6145562529563904, -0.15819363296031952, -0.3248775899410248, -0.13206198811531067, 0.3150258958339691, -0.1293102204799652, 0.009957896545529366, -0.6685605049133301, -0.08563831448554993, 0.8161904811859131, -0.2912502586841583, 0.16359736025333...
way to do that then just say, you can't do it. If this can be done using WebHTTPBinding then I have not found a way to make it happen as I've already investigated the WebInvoke attribute and been unable to create a test from VBScript to WCF that worked properly. Assume that the posted data type is a string and the response is also a string. Also this question is not WinHTTP related. I already know how to perform the post using WinHTTP it's the construction of the message that the WCF service will respond to that is the problem. While I could
[ 0.4323553442955017, -0.2885293662548065, 0.18096262216567993, 0.1284554898738861, -0.22239376604557037, -0.30038660764694214, 0.7102742791175842, -0.16058064997196198, -0.1641845703125, -0.5644598603248596, -0.09990904480218887, 0.2968481779098511, -0.491220623254776, 0.13897109031677246, ...
use something other than WinHTTP to perform the post from ASP over to the WCF service such as XMLHTTP I still have the problem of constructing an XML message that the WCF service will respond to. I've tried variations on this and still am unable to fathom what sort of format I need to use to make this happen. I know theoretically that all the WCF service needs is a properly formatted message. I'm just unable to construct the message properly and usually while everyone has some suggestion on how to send the message I have yet to see someone give
[ 0.45389968156814575, -0.006727494299411774, 0.2749020457267761, -0.0735243409872055, -0.5938060283660889, -0.266675740480423, 0.3769790232181549, -0.09130197018384933, 0.014046150259673595, -0.7371482849121094, -0.2481601983308792, 0.3386552631855011, -0.3617020547389984, 0.147861018776893...
an actual example of what the proper message format would be in this situation since everyone is so used to using .NET to send the message and it's all done for you in that context. You don't specify one thing: What binding are you exposing your service as? If you're using WsHttpBinding or BasicHttpBinding, then there's no simple "http post" you can do, because you need to include at the very least the entire SOAP envelope (with the right SOAP version and potentially security headers and so forth). If you're using (or can migrate to) .NET 3.5, then there's a new binding
[ 0.5487886667251587, -0.2089202105998993, 0.27235689759254456, -0.02372688800096512, -0.3870815634727478, -0.3878326416015625, 0.30963248014450073, -0.351527601480484, -0.05950549989938736, -0.7866923213005066, -0.10358826071023941, 0.3058547377586365, -0.2883828282356262, 0.181585624814033...
explicitly created to support scenarios like this, where you want your service to be exposed not as a SOAP service but as fully REST-like service, or simply as XML/JSON over HTTP. It's called the WebHttpBinding. There are many options you can tweak, but it's very likely you might just be able to add a new endpoint with webHttpBinding and have that working almost right away. This might give you a head-start on the new programming model: <http://msdn.microsoft.com/en-us/library/bb412169.aspx>
[ 0.3600904941558838, -0.26284775137901306, 0.14219878613948822, 0.04178840294480324, -0.2859077751636505, -0.183128222823143, -0.005706383381038904, 0.06727781891822815, -0.19718948006629944, -0.716390073299408, -0.056605927646160126, 0.21014951169490814, -0.2991544306278229, 0.149536982178...
Is it possible to install the x86 Remote Debugger as a Service on a 64bit machine? I need to attach a debugger to managed code in a Session 0 process. The process runs 32bit but the debugger service that gets installed is 64bit and wont attach to the 32bit process. I tried creating the Service using the SC command, and was able to get the service to start, and verified that it was running in Task manager processes. However, when I tried to connect to it with visual studio, it said that the remote debugger monitor wasn't enabled. When I
[ 0.30137109756469727, -0.1852034032344818, 0.15257172286510468, 0.049109287559986115, 0.02368277497589588, -0.30223003029823303, 0.33200719952583313, 0.17414167523384094, -0.16871830821037292, -0.5415688157081604, -0.1821167767047882, 0.6230251789093018, -0.5530017614364624, 0.2493853271007...
stopped the x86 service, and started the x64 service and it was able to find the monitor, but still got an error. Here is the error when I try to use the remote debugger: Unable to attach to the process. The 64-bit version of the Visual Studio Remote Debugging Monitor (MSVSMON.EXE) cannot debug 32-bit processes or 32-bit dumps. Please use the 32-bit version instead. Here is the error when I try to attach locally: Attaching to a process in a different terminal server session is not supported on this computer. Try remote debugging to the machine and running the Microsoft Visual Studio Remote Debugging
[ 0.09162725508213043, 0.07245243340730667, 0.21222704648971558, -0.08517386019229889, -0.11919347196817398, -0.2689851224422455, 0.4698774516582489, 0.20054908096790314, -0.27626553177833557, -0.6323789954185486, -0.22227177023887634, 0.7513468861579895, -0.4648325741291046, 0.3879008293151...
Monitor in the process's session. If I try to run the 32bit remote debugger as an application, it wont work attach b/c the Remote Debugger is running in my session and not in session 0. This works on my machine(TM) after installing rdbgsetup\_x64.exe and going through the configuration wizard: ``` sc stop msvsmon90 sc config msvsmon90 binPath= "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86\msvsmon.exe /service msvsmon90" sc start msvsmon90 ```
[ 0.050827693194150925, 0.01994537189602852, 0.6882831454277039, -0.21438197791576385, 0.22961711883544922, -0.1259755939245224, 0.572643518447876, -0.053026460111141205, -0.37999388575553894, -0.8173584342002869, -0.08696299046278, 0.9182118773460388, -0.3313736617565155, -0.019986521452665...
What's the best library to use to generate RSS for a webserver written in Common Lisp? Most anything will probably do. Personally, I've been using xml-emitter for my blog's Atom feed, which has worked out well so far. Just choose whichever XML generation library you like and hack away, I'd say. As others have remarked, RSS is simple; it's little work to generate it manually. That said, I recommend not generating plain strings directly. Having to deal with quoting data is more of a hassle than installing an XML library, and it's also [insecure](http://en.wikipedia.org/wiki/Cross-site_scripting "Cross-site scripting") in case your feed contains data submitted
[ 0.7454946637153625, 0.027608031406998634, -0.0585220605134964, 0.20921637117862701, -0.35010412335395813, -0.2959604561328888, -0.03353384509682655, 0.09411372989416122, -0.1873258650302887, -0.5877674221992493, 0.1687963455915451, 0.5366460680961609, -0.4970281720161438, -0.15212155878543...
by visitors of your website.
[ 0.6330758929252625, 0.28352415561676025, 0.22448401153087616, 0.18368394672870636, 0.20227673649787903, -0.488171249628067, 0.1731015294790268, 0.5271613597869873, -0.3170364499092102, -0.5597745776176453, -0.6454964876174927, 0.449695348739624, 0.4149152338504791, 0.19792833924293518, 0...
At my house I have about 10 computers all different processors and speeds (all x86 compatible). I would like to cluster these. I have looked at openMosix but since they stopped development on it I am deciding against using it. I would prefer to use the latest or next to latest version of a mainstream distribution of Linux (Suse 11, Suse 10.3, Fedora 9 etc). Does anyone know any good sites (or books) that explain how to get a cluster up and running using free open source applications that are common on most mainstream distributions? I would like a load balancing
[ 0.6255336403846741, 0.4095785617828369, 0.1762734055519104, 0.08668926358222961, 0.409562885761261, 0.11479388177394867, -0.1363842934370041, 0.18371176719665527, -0.21290525794029236, -0.9403344988822937, 0.10199245810508728, 0.26634109020233154, -0.09387387335300446, 0.19589808583259583,...