text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I use NHibernate in my ASP.NET application to connect to an MS SQL Server 2005 database. In some cases I need to write my own SQL queries. However, I noticed that the SQL server thread leaks about 50 KB of memory every time I execute the following piece of code: ``` NHibernate.ISession session = NHibernateSessionManag...
[ -0.39102351665496826, 0.24819719791412354, 0.46913468837738037, -0.45145919919013977, -0.3370616137981415, 0.11246544122695923, 0.5839637517929077, -0.5120148658752441, -0.1832791119813919, -0.49652719497680664, 0.28459352254867554, 0.5155195593833923, -0.4144425690174103, 0.43715095520019...
this code. Here is the really interesting part. If I, in the code above, replace `"yyyy-MM-dd HH:mm:ss"` with `"yyyy-MM-dd HH:mm"` (i.e. I remove the seconds) the memory leaks stop. *Update: Apparently the memory leaks doesn't actually stop. They just show once a minute instead. Presumably when the SQL query changes....
[ 0.31764736771583557, 0.3282693028450012, 0.22889964282512665, 0.07608642429113388, -0.032879333943128586, -0.3257310092449188, 0.4685893952846527, -0.10917443782091141, -0.2995198965072632, -0.5254303216934204, -0.15880566835403442, 0.6692764759063721, -0.08641467988491058, 0.2537799775600...
first used. If you are concerned about this, every time you make schema changes (e.g. tables, views, triggers, procedures), run a `DBMS_UTILITY.compile_schema` (or have your DBA do it). This will force compile all the packages and let you know where, or if, there are errors before you find them the hard way.
[ 0.29961374402046204, -0.15433375537395477, -0.11355951428413391, -0.20823653042316437, -0.08148336410522461, -0.5514712333679199, 0.023837246000766754, -0.15802621841430664, -0.27352312207221985, -0.6387592554092407, -0.46526411175727844, 0.6278699636459351, -0.6234154105186462, -0.1643429...
When I try printing an HTML-email with a table that stretches multiple pages then Windows-Mail and IE7 will only print whatever fits on the first page but Firefox prints everything just fine. Any thoughts how I can make the Microsoft products print the entire thing? Regards, Pieter Changing anything object that a pac...
[ 0.41170722246170044, 0.15573923289775848, 0.19868701696395874, -0.06637267023324966, -0.09506780654191971, -0.25420933961868286, 0.25159865617752075, -0.11215993016958237, -0.4120427370071411, -0.5756677985191345, -0.049232255667448044, 0.5305936932563782, -0.4530879259109497, -0.188685819...
a `DBMS_UTILITY.compile_schema` (or have your DBA do it). This will force compile all the packages and let you know where, or if, there are errors before you find them the hard way.
[ 0.2918665409088135, -0.12234656512737274, -0.03177091106772423, 0.15687382221221924, -0.09050929546356201, -0.5760260820388794, 0.21534878015518188, -0.24428832530975342, -0.10395866632461548, -0.5584558844566345, -0.3664255142211914, 0.5057529807090759, -0.4144990146160126, -0.03816720098...
I'm building a recipe-finder for a new food blog. The design I have basically involves the user selecting ingredients, one at a time, from a drop down `<select>`, the option disappearing from the list (so they can't select it again) and appearing on another HTML list with a link to remove it from the list. Once they're...
[ 0.5996703505516052, -0.16091902554035187, 0.12057208269834518, 0.0015281857922673225, -0.0003883239405695349, 0.5313677191734314, -0.38617566227912903, 0.0975927785038948, 0.17944903671741486, -0.48148107528686523, 0.39867788553237915, 0.23062846064567566, 0.049765922129154205, -0.13893161...
not drastically complex but it does raise a few questions on how I'm going to do some of these things. I'm using jquery. 1. I need to store the selected items in memory so I know what to send to the search page when they've done selecting items. What's the best way of doing that in your opinion as each item has two va...
[ 0.13655498623847961, -0.4778248071670532, 0.12434455752372742, 0.24890229105949402, 0.08855102956295013, 0.2576824426651001, -0.09626779705286026, -0.10400841385126114, -0.1642770916223526, -0.7900809645652771, 0.07437155395746231, 0.5358776450157166, 0.03089221939444542, -0.18129889667034...
list of things they're searching for, how do I delete that item from the available items? Can I just "hide" or disable it (safely)? 4. If in #3 I have to delete it from the DOM, when I add it again, can I sort the list (based on either value) and keep the please-select option at the top? 1.) You can append hidden form ...
[ -0.07943146675825119, -0.4029482305049896, 0.5724762678146362, -0.15262022614479065, 0.23401013016700745, -0.005092781502753496, 0.2826119065284729, -0.2719220221042633, -0.3581424653530121, -0.5191786885261536, -0.4552277624607086, 0.8346510529518127, -0.34750980138778687, -0.044893212616...
option:first");
[ -0.32498976588249207, -0.280606746673584, 0.2944576144218445, -0.18819886445999146, -0.044977277517318726, 0.2402081936597824, -0.17361801862716675, -0.29936063289642334, 0.18637540936470032, -0.2890748679637909, -0.720432698726654, 0.9607421159744263, -0.30977439880371094, -0.173312008380...
### Duplicate: > [Image icon beside the site URL](https://stackoverflow.com/questions/120420/image-icon-beside-the-site-url) > > > [What is currently the best way to get a favicon to display in all browsers that support Favicons?](https://stackoverflow.com/questions/37073/what-is-currently-the-best-way-to-get-a-favi...
[ 0.1196349710226059, -0.012710611335933208, 1.0804585218429565, 0.009518437087535858, -0.016388578340411186, 0.22781065106391907, 0.0770760327577591, -0.09801652282476425, -0.4169541001319885, -0.6466329097747803, -0.082240991294384, 0.2639373242855072, -0.26152482628822327, -0.217797428369...
type="image/png" href="/path/image.png"/> ``` See also this document from W3C: [How to Add a Favicon to your Site](http://www.w3.org/2005/10/howto-favicon) You might also want to refer to these other answers to the question: * [Image icon beside the site URL](https://stackoverflow.com/questions/120420/image-icon-be...
[ -0.24231411516666412, -0.1621038317680359, 1.008589506149292, -0.028446195647120476, -0.09065063297748566, 0.01619816944003105, 0.14676600694656372, -0.06950553506612778, -0.36191123723983765, -0.5105808973312378, -0.3186872899532318, 0.31549012660980225, -0.17884643375873566, -0.261830091...
After much help from all my StackOverFlow brethren, I managed to create a C++ DLL that calls my C# classes via COM and passes data back and forth to an external application. There was much celebration in the kingdom after that code started working. Now I have a new problem. I'm expanding the DLL so that it can call di...
[ 0.4698541462421417, 0.06167177855968475, 0.43067675828933716, -0.34288060665130615, -0.389585018157959, 0.12593141198158264, 0.10904029756784439, -0.023025179281830788, -0.299754798412323, -0.41663262248039246, 0.1224379763007164, 0.2829897403717041, -0.2507272958755493, 0.5367144346237183...
What is the best way to switch between classes when calling the DLL? ``` // Initialize COM. HRESULT hr = CoInitialize(NULL); // I want to do something like this....but how? if (strcmp(modelType, "Model1") == 0) { IUnitModelPtr pIUnit(__uuidof(ClassOne)); } if (strcmp(modelType, "Model2") == 0...
[ 0.21959996223449707, -0.3161594867706299, 0.31340983510017395, -0.18520097434520721, 0.045065466314554214, 0.02301633358001709, 0.14652468264102936, -0.3649486303329468, -0.16962094604969025, -0.61983323097229, 0.06039736419916153, 0.7309597730636597, -0.29350587725639343, 0.17010536789894...
challenge for me. edit: Im sure there are some super elegant ways to achieve this (reflection?) but please limit your suggestions to stuff that can be implemented easily....efficiency is not important here and maintainability is not really an issue. Do smth like this: ``` GUID classId = GUID_NULL; if( strcmp( modelT...
[ -0.2499842345714569, -0.1809721440076828, 0.6424603462219238, 0.13131284713745117, -0.22222374379634857, -0.18037766218185425, 0.3570995330810547, -0.4203881621360779, -0.26060423254966736, -0.7736300826072693, -0.056451182812452316, 0.7114954590797424, -0.18418249487876892, 0.213254690170...
Which folders may I not commit to subversion server? I'm talking about an standard asp.net web application in Visual Studio 2.008. I think the bin folder because it's files are regenerated, is there any other? We put this string as the svn:ignore property on all our projects: ``` *.pdb *.exe *.dll debug/* re...
[ 0.2936098873615265, -0.12046150118112564, 0.3339625298976898, 0.01801045425236225, 0.004907987080514431, -0.2746516168117523, 0.37047719955444336, 0.2182064801454544, -0.50470370054245, -0.33703097701072693, -0.24125543236732483, 0.438047856092453, -0.49602028727531433, 0.2551327347755432,...
In my .NET application I need to add a checkbox to each row in a dynamically created asp:Table. Is it possible to do that by dynamically creating an asp:CheckBox for each row and somehow put it inside a TableCell object? (In that case how?) Or do I need to replace the asp:table control with something else, like a Repe...
[ 0.29262247681617737, -0.14068856835365295, 0.1929512768983841, 0.32255318760871887, -0.17408059537410736, -0.06323268264532089, 0.19872796535491943, 0.2190561294555664, -0.18110236525535583, -1.0085030794143677, -0.03244832530617714, 0.3205656409263611, -0.3586254119873047, 0.0303409975022...
refreshed, you would have to recreate those checkboxes, which would mean new checkboxes every load, which also would mean your checkbox controls info will be lost because they are not on the client side, so all updated info done by the user (checkbox checked)will be lost, so you want be able to find out what is checked...
[ 0.3256630599498749, -0.20704345405101776, 0.4571012556552887, 0.14513109624385834, -0.1823660135269165, -0.20437079668045044, 0.08057303726673126, -0.17025445401668549, -0.40178704261779785, -0.8441784977912903, 0.05582641065120697, 0.6284432411193848, -0.15173576772212982, -0.040022369474...
Gridview.Datasource=//ex:data; Gridview.Databind(); ``` As shown in the example on this page [here](http://www.codeproject.com/KB/miscctrl/GridViewCheckBox.aspx) but if you are using MVC then you would add them in the client code in a form as so: ``` <% using (Html.BeginForm("Presentation", "Home")) %> ...
[ -0.00825884472578764, -0.45803582668304443, 1.0167750120162964, -0.2911159098148346, -0.09942416846752167, -0.03432682156562805, -0.11479658633470535, -0.2677845358848572, -0.35739755630493164, -0.958496630191803, -0.23280605673789978, 0.25411197543144226, -0.14988522231578827, 0.095441937...
runat="server"></th> <th id="Description" runat="server"></th> </tr> </thead> <tbody > <%try { %> <% foreach (var SamAuditLog in ViewData.Model) { %> <tr> <td class="style1" align="center"><%=Html.CheckBox(""+data.ID) %></td> <td><%= data.DateTime%></td> ...
[ -0.037785355001688004, -0.3961087763309479, 0.5259841680526733, -0.14909513294696808, -0.050748471170663834, 0.2528250813484192, 0.10631261765956879, -0.43063873052597046, -0.16874024271965027, -0.6408141255378723, -0.36256465315818787, 0.1207926794886589, -0.5439249873161316, 0.0283143650...
<% } %> <%} %> </tbody> ```
[ 0.2515791058540344, 0.4352186620235443, -0.2648859918117523, -0.11781712621450424, 0.1945926994085312, 0.014411100186407566, 0.40155962109565735, 0.08159495145082474, 0.16891728341579437, -0.6830505728721619, -0.5006723999977112, 0.3707030117511749, -0.57850182056427, 0.2733440399169922, ...
So I have this annoying issue with Visual Studio (when working with C#), I've been digging around in the C# formatting options, general VS options and on google and MSDN but can't really find a fix for this - I'm assuming there's just a checkbox somewhere and I've just overlooked it. Here it is: I like to format my co...
[ 0.400908499956131, 0.5429697036743164, 0.11603439599275589, -0.16288433969020844, -0.4631155729293823, -0.32802703976631165, 0.2762765884399414, 0.18540893495082855, -0.21377094089984894, -0.6131740212440491, 0.0638803094625473, 0.6726581454277039, -0.5505976676940918, 0.3496828079223633, ...
feature **off**? In the Formatting Options, In the Spacing section: there is an option called **'Ignore spaces in declaration statements'**. Check that option, and VS.NET will not re-format the declarations that you make. So, this should work: ``` int i = 5; int melp = 4; ``` But, when you do this, VS.NET w...
[ 0.3131839632987976, -0.06670286506414413, 0.22613808512687683, -0.27987048029899597, 0.03111080639064312, -0.0030107779894024134, 0.4824323058128357, -0.20636244118213654, -0.3586210012435913, -0.5498394966125488, -0.36527007818222046, 0.8234658241271973, -0.35264188051223755, -0.112743481...
i would like a working example, that uses a asp.net session state server, to share a session variable between two .net 2.0 web applications both running on the same domain, just in different folders ( same parent folder) directory structure: parent site: [localhost/testSite] web app 1 site: [localhost/testSite/webapp...
[ 0.39123857021331787, 0.14194843173027039, 0.38213905692100525, 0.03232570365071297, -0.09350955486297607, -0.08975261449813843, 0.17619356513023376, -0.4585997760295868, -0.03130989894270897, -0.76523357629776, -0.05754056200385094, 0.4200488328933716, -0.31365418434143066, -0.026197208091...
be a way of doing this, im told there is, but no one has offered any proof, and a working demo for .net 2.0 framework, using asp.net state server. [Here](http://blogs.lessthandot.com/index.php/WebDev/ServerProgramming/ASPNET/sharing-asp-net-session-state-between-we) is an article with code sample.
[ 0.6729378700256348, -0.19828727841377258, -0.03302453085780144, 0.052904997020959854, 0.02527041547000408, -0.319191038608551, 0.32448527216911316, -0.2358182966709137, -0.04960347339510918, -0.5477272868156433, 0.3067709803581238, 0.1707511842250824, -0.13172852993011475, 0.01039105188101...
Is there a way to search for the existence of a given WCF service in any of the computer of a local Network? For example, I am looking for the Math/Add2Numbers service and I want to know which machines on the LAN provide it, is there any way to do that? Here is a super simple discovery example. It does not use a confi...
[ 0.15513303875923157, 0.07493402063846588, 0.3094668686389923, 0.14206808805465698, 0.02708449587225914, -0.32595008611679077, 0.12725506722927094, -0.09795555472373962, -0.2053876370191574, -0.9781973361968994, 0.1734534204006195, 0.5394176840782166, -0.3050422966480255, 0.0830642804503440...
code in the host program ``` public class WcfPingTest : IWcfPingTest { public const string magicString = "djeut73bch58sb4"; // this is random, just to see if you get the right result public string Ping() {return magicString;} } public void WcfTestHost_Open() { string hostname = System.Environment.MachineName; ...
[ 0.20174294710159302, 0.0031245385762304068, 0.5696431994438171, 0.03686327859759331, -0.07989993691444397, -0.13156470656394958, 0.6318830251693726, -0.43244925141334534, -0.08057646453380585, -0.8752036094665527, -0.2660455107688904, 0.7185012698173523, -0.2747792601585388, 0.343033790588...
= new ServiceMetadataBehavior(); smb.HttpGetEnabled = true; smb.MetadataExporter.PolicyVersion = PolicyVersion.Policy15; h.Description.Behaviors.Add(smb); // create endpoint var binding = new BasicHttpBinding(BasicHttpSecurityMode.None); h.AddServiceEndpoint(typeof(IWcfPingTest) , binding, ""); h.Open(...
[ 0.018103154376149178, -0.1162571907043457, 0.8409140706062317, -0.16235581040382385, 0.10195711255073547, -0.25894781947135925, 0.8846396207809448, -0.36812809109687805, -0.03468071669340134, -0.7746174931526184, -0.3484592139720917, 0.5591538548469543, -0.31396177411079407, 0.540105760097...
the first channel, but it may not work. // you have to do some logic to decide which uri to use from the discovered uris // for example, you may discover "127.0.0.1", but that one is obviously useless. // also, catch exceptions when no endpoints are found and try again. return fr.Endpoints[0].Address.Uri; } p...
[ 0.2931230366230011, -0.24481846392154694, 1.0112606287002563, -0.1453670859336853, 0.02254197560250759, 0.0017898472724482417, 0.3952920138835907, -0.6715688705444336, -0.06398521363735199, -0.8646985292434692, -0.11160492897033691, 0.47449934482574463, -0.508980929851532, 0.51001626253128...
//string result = channel.Ping(); //Console.WriteLine("ping result = " + result); } public void WcfTestClient_Ping() { Console.WriteLine("pinging host"); string result = channel.Ping(); Console.WriteLine("ping result = " + result); } ``` on the host, simply call the WcfTestHost\_Open() function, then sleep fo...
[ 0.06319064646959305, 0.013655584305524826, 0.6025569438934326, -0.18111099302768707, 0.29444748163223267, -0.3361656665802002, 0.41374123096466064, -0.19266685843467712, -0.4618372619152069, -0.8480064272880554, -0.1538999378681183, 0.7580302953720093, -0.29577112197875977, 0.4954768121242...
fast.
[ 0.06305094808340073, -0.14261536300182343, 0.051232241094112396, 0.4325392544269562, -0.261624813079834, -0.11490125954151154, 0.35304689407348633, 0.17288018763065338, -0.09838937968015671, -0.4982990324497223, -0.06416851282119751, 0.3322116732597351, -0.006778618786484003, 0.12406068295...
having a problem passing ViewData.Model to the partial views. It always is defaulting to null even if I equate it to a result query. I cannot access the strongly typed data because the Model is null. My current code is this, ViewPage ``` <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> ...
[ -0.40557506680488586, 0.12496250867843628, 0.7965537309646606, -0.18605220317840576, -0.028219126164913177, 0.06826213747262955, 0.3667193055152893, -0.27364009618759155, -0.2673158049583435, -0.6705464124679565, -0.16770125925540924, 0.5510247945785522, -0.29410630464553833, 0.19822944700...
Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<testMVCProject.Models.information>" %> <% using (Ajax.BeginForm( "pressureV2", "Home", new { id = ViewData.Model.id }, new AjaxOptions { UpdateTargetId = "userControls",
[ -0.35762226581573486, -0.34151989221572876, 0.44046199321746826, 0.139077290892601, 0.28091612458229065, 0.0590188167989254, 0.1883518397808075, -0.4150918424129486, -0.08896556496620178, -0.5853694081306458, -0.12473864108324051, 0.5449395179748535, -0.3849557936191559, -0.070198580622673...
HttpMethod = "GET" }, new { @id = "genInfoLinkForm" })) {%> <%= Html.SubmitButton("hey", "Lol") %> <%} %> ``` Controller ``` public ActionResult header(int id) { var headerResults = from
[ -0.032915838062763214, -0.800147533416748, 0.7056406736373901, 0.1265132576227188, -0.11938764154911041, -0.05653129518032074, 0.34177982807159424, -0.38548848032951355, -0.10628510266542435, -0.7303820252418518, -0.32698705792427063, 0.3844337463378906, -0.26265570521354675, 0.07052347064...
c in db.information where c.id == id select new information
[ 0.18422558903694153, 0.08247317373752594, 0.1281585544347763, 0.24698501825332642, -0.13290953636169434, -0.1523461490869522, -0.06405523419380188, -0.4471369683742523, 0.25116848945617676, -0.5278559923171997, -0.34629982709884644, 0.32876893877983093, -0.14350196719169617, 0.449526101350...
{ id = c.id, type = c.type
[ 0.12384455651044846, 0.18153560161590576, -0.23202699422836304, 0.11560328304767609, 0.2958710193634033, 0.005544962827116251, 0.08850402384996414, -0.16539950668811798, 0.16902731359004974, -0.15196359157562256, -0.32663193345069885, 0.5807617902755737, -0.31872498989105225, 0.24076524376...
}; ViewData.Model = headerResults.FirstOrDefault(); return View(ViewData.Model); } public ActionResult pressureV2(int id) { var pressureVResults = from c in db.pressure_volume_tests
[ 0.08178745210170746, -0.49563100934028625, 0.4486611783504486, -0.32202407717704773, 0.049232665449380875, 0.1678357571363449, 0.38844600319862366, -0.5761131048202515, -0.22222517430782318, -0.34928321838378906, -0.3077661097049713, 0.7682013511657715, -0.14090831577777863, 0.188794821500...
where c.id == id select new pressureVT {
[ 0.010632683522999287, -0.30346056818962097, 0.6640438437461853, -0.18351295590400696, 0.39493247866630554, 0.035867877304553986, -0.03697972372174263, -0.5710790157318115, 0.07725482434034348, -0.2768513858318329, -0.16058407723903656, 0.9102662205696106, -0.07413865625858307, 0.1526569575...
bottomCVP = c.bottom_CVP, topCVP = c.top_CVP
[ -0.5706579089164734, 0.060831859707832336, 0.32057610154151917, -0.06558550894260406, 0.43488699197769165, 0.04341387748718262, -0.32289037108421326, 0.051086392253637314, -0.5408651232719421, -0.29844358563423157, -0.5222868323326111, 0.5120189785957336, -0.3483280539512634, -0.0654072612...
}; ViewData.Model = pressureVResults.FirstOrDefault(); return View(ViewData.Model); } ``` In the comments you have said that the view is not strongly typed. Because of that: ``` <% Html.RenderPartial("header", this.ViewData.Model); %> <% Html.RenderPartial("test", this.ViewData.Model)...
[ -0.09748020768165588, -0.2614901065826416, 0.5281848311424255, -0.17498384416103363, -0.06143759936094284, 0.032436802983284, 0.42282846570014954, -0.39969027042388916, -0.05488552898168564, -0.4217440187931061, -0.2783512771129608, 0.6654433012008667, -0.32442131638526917, 0.0510191656649...
Given are two sets of three-dimensional points, a source and a destination set. The number of points on each set is arbitrary (may be zero). The task is to assign one or no source point to every destination point, so that the sum of all distances is minimal. If there are more source than destination points, the additio...
[ 0.15594689548015594, -0.00701684458181262, 0.18179787695407867, 0.25944995880126953, -0.09640984982252121, 0.26870083808898926, -0.10909581184387207, -0.10069149732589722, 0.0540071465075016, -0.7721469402313232, -0.12240417301654816, 0.3091053068637848, -0.2821659743785858, 0.334356218576...
not given here. I'm interested in both approximations and exact solutions. Edit: Haha, yes, I suppose it does sound like homework. Actually, it's not. I'm writing a program that receives positions of a large number of cars and i'm trying to map them to their respective parking cells. :) Off the top of my head, spatia...
[ 0.6144097447395325, 0.3524438142776489, 0.28851044178009033, 0.3158605098724365, 0.33600056171417236, 0.4231187105178833, -0.20968815684318542, -0.24284932017326355, -0.029426537454128265, -0.5072667598724365, 0.25187352299690247, 0.5300620198249817, 0.1104990616440773, -0.2079636752605438...
to explore the nearby space. This is heuristic, getting you a good answer though not necessarily the best, and it should be fairly efficient due to the initial grid sort.
[ 0.5127516388893127, -0.07918548583984375, 0.2971535921096802, 0.36001190543174744, 0.23436540365219116, -0.224672332406044, -0.007851543836295605, -0.16102832555770874, -0.03801834210753441, -0.4734395146369934, -0.04117288812994957, 0.39342328906059265, 0.1431189626455307, -0.065199933946...
let's say that you want to select all rows from one table that have a corresponding row in another one (the data in the other table is not important, only the presence of a corresponding row is important). From what I know about DB2, this kinda query is better performing when written as a correlated query with a EXISTS...
[ 0.33825016021728516, -0.01324430387467146, -0.024009155109524727, 0.06846924871206284, -0.37135422229766846, -0.21276286244392395, 0.1227743998169899, -0.054046280682086945, -0.07464410364627838, -0.3726497292518616, 0.19596673548221588, 0.4883643090724945, -0.3676585555076599, 0.177861824...
about any performance question I would recommend running the test on your own environment; With SQL server Management Studio this is easy (or SQL Query Analyzer if your running 2000). Just type both statements into a query window, select Query|Include Actual Query Plan. Then run the query. Go to the results tab and you...
[ 0.4009818732738495, -0.13836520910263062, -0.20640525221824646, 0.2578454315662384, -0.11290152370929718, -0.11809007078409195, 0.33334943652153015, -0.33516764640808105, 0.25898823142051697, -0.628489077091217, 0.18698108196258545, 0.6637588143348694, 0.07997786998748779, -0.3364633917808...
``` var a = [1,4,5]; var e = a.length--; ``` Here `e` variable will contain 5. But if I do: ``` var e = a.length-=1; ``` Here `e` will contain 2 the number of elements array. So the first is a language 'tip' to simulate a pop() array methods? In the language syntax doing: ``` a-- ``` or ``` a-=1 ``` is sem...
[ 0.11663953214883804, 0.1912078857421875, 0.40145349502563477, 0.02491218037903309, -0.03966506943106651, 0.21717238426208496, 0.32068800926208496, -0.6206757426261902, -0.14516833424568176, -0.023019393905997276, -0.4690404236316681, 0.5763537287712097, -0.30879196524620056, -0.02619570121...
4, 5]; var e = --a.length; ``` In other words: x-- returns the value before decreasing whereas --x (and x -= 1) returns the value after decreasing. All these code snippets pop the last element off the array a. Note that in the first example, `e = a.length--`, e will have the value 3, not 5, therefore it is *not* the...
[ 0.1576714813709259, -0.0480956956744194, 0.4283662438392639, -0.3650524616241455, 0.2310437560081482, 0.10577399283647537, 0.3584589958190918, -0.5393263697624207, -0.15714600682258606, -0.19736631214618683, -0.5708664655685425, 0.47285982966423035, -0.3491593599319458, 0.11174402385950089...
I have searched and found a couple of solutions on this site, that didn't work for me. My case is that I perform a XPath search (contains function) in the XML, and lists the results. I want those results listed alphabetically. The results are laying in an array, and looks like this: ``` Array ( [0] => SimpleXMLEle...
[ 0.1677531749010086, 0.10304555296897888, 0.3554166257381439, 0.041474826633930206, 0.14907748997211456, 0.005674009211361408, 0.37095165252685547, -0.15564049780368805, -0.28782323002815247, -0.6813921332359314, -0.057040587067604065, 0.27027544379234314, -0.05518336221575737, 0.3195847868...
) [1] => SimpleXMLElement Object ( [DISID] => 1118735 [StopName] => Huldrefaret ) [2] => SimpleXMLElement Object ( [DISID] => 2200752 [StopName] => Jernbanetorget
[ -0.3133353292942047, -0.2726682424545288, 0.4881630539894104, -0.1340312361717224, -0.1467619687318802, 0.21581891179084778, 0.448066771030426, -0.3016761541366577, -0.20003697276115417, -0.3896007239818573, -0.4786549210548401, 0.448677659034729, -0.525539219379425, -0.10928743332624435, ...
) ) ``` I am listing the data like this: ``` $xml = new SimpleXMLElement(file_get_contents("StopPointList.xml")); $query = strtolower($_GET["q"]); $upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ"; $lower = "abcdefghijklmnopqrstuvwxyzæøå"; $result = $xml->xpath("//StopPoint[contains(translate(StopName, '$upper', '$lower')...
[ -0.11381000280380249, 0.2018251121044159, 0.701408863067627, -0.29843422770500183, -0.24576020240783691, 0.003193019423633814, 0.37341588735580444, -0.5797178149223328, -0.3411533236503601, -0.4735749363899231, -0.6213496327400208, 0.27189400792121887, -0.39413267374038696, 0.0001742499443...
What is the impact of namespaces in c++ linkages compared to linkages in c? Is it possible to make a name that has internal linkage to external linkage just by using namespace.Similarly the other way around. In general, namespace name is prepended to any enclosed entity's name before the name is mangled and goes to th...
[ 0.1409732848405838, -0.19997669756412506, 0.023149127140641212, 0.46560922265052795, -0.07184375077486038, -0.25245338678359985, -0.11311846226453781, -0.06039367988705635, -0.33288586139678955, -0.728746235370636, 0.05383797362446785, 0.2802298665046692, -0.43665242195129395, 0.1940461844...
again link together just fine.
[ 0.33817824721336365, -0.11862331628799438, 0.6486425995826721, 0.27092450857162476, -0.18655134737491608, -0.10261151194572449, 0.8668074607849121, -0.050737760961055756, -0.4398342967033386, -0.894846498966217, 0.12203971296548843, 0.1274648904800415, 0.18354114890098572, 0.06030216813087...
I have a database table which could contain many records and I'd like to count the current total in the table. I was going to do a simple: ``` DataContext.Table.Count(c => c.condition); ``` Until I realized the return type for `Count` is `int`. What if the table is to hold more values than can be represented in 32 b...
[ 0.18958795070648193, 0.04945123940706253, 0.17106831073760986, 0.028950706124305725, 0.15405000746250153, 0.10466283559799194, -0.04155397042632103, -0.38931751251220703, -0.4198788106441498, -0.4030461311340332, 0.32508182525634766, 0.4845849275588989, -0.23596422374248505, 0.317534029483...
We are in the processing of configuring a portal to use ISA Server as our front end security provider. So we are using ISA Server 2006 SP1. Unfortunately when we access .net applications through ISA Server, the first time they are accessed. i.e. They are not compiled yet, the following error appears: Error Co...
[ 0.005538960453122854, 0.1941157877445221, 0.5262880325317383, 0.05294589698314667, 0.2853620648384094, -0.2747471332550049, 0.36872997879981995, -0.18326976895332336, -0.2815491259098053, -0.39318686723709106, 0.118893101811409, 0.6191240549087524, -0.12302497029304504, 0.0598737969994545,...
never appears. Does anyone know how to resolve this, so the site works correctly the first time? Some additional information: * The websites accessed are running on windows server 2008 64 bit - standard edition, and occurs for Sharepoint as well as standard .net websites. * ISA Server is running on Windows server...
[ 0.40167009830474854, 0.08620470762252808, 0.33721908926963806, 0.0409124456346035, 0.09224815666675568, -0.4701966345310211, 0.4880419075489044, 0.25302940607070923, -0.2716071307659149, -0.43083131313323975, 0.2546543776988983, 0.3486017882823944, -0.38633793592453003, 0.20615142583847046...
find a solution to receiving ICMP packets on Windows 7 (don't know about Vista, which the original question was about but I suspect this solution would work). The two key points are that the socket has to be bound to a single specific IP address rather than IPAddress.Any and the IOControl call which sets the SIO\_RCV...
[ -0.34862378239631653, -0.22437548637390137, 0.9834639430046082, 0.18306434154510498, 0.3076862096786499, 0.08087535202503204, 0.3331826329231262, -0.3008364140987396, -0.17028853297233582, -0.7801212668418884, -0.26149842143058777, 0.2722737491130829, -0.3664998710155487, 0.203582599759101...
" from " + remoteEndPoint); Console.ReadLine(); ``` I also had to set a firewall rule to allow ICMP Port Unreachable packets to be received. ``` netsh advfirewall firewall add rule name="All ICMP v4" dir=in action=allow protocol=icmpv4:any,any ```
[ 0.018134694546461105, -0.33025798201560974, 0.7708064913749695, -0.0729982927441597, 0.008963705971837044, -0.2679508328437805, 0.5277502536773682, -0.20403404533863068, -0.18480832874774933, -0.5487761497497559, -0.36210474371910095, 0.6256061792373657, -0.43429630994796753, 0.45858043432...
I have the following table: ``` CREATE TABLE [dbo].[EntityAttributeRelship]( [IdNmb] [int] IDENTITY(1,1) NOT NULL, [EntityIdNmb] [int] NOT NULL, [AttributeIdNmb] [int] NOT NULL, [IsActive] [bit] NOT NULL CONSTRAINT [DF_EntityAttributeRelship_IsActive] DEFAULT ((0)), CONSTRAINT [PK_EntityAttributeRelsh...
[ -0.11328576505184174, -0.04250141605734825, 0.6559609174728394, -0.10711954534053802, -0.0026539720129221678, -0.0011860171798616648, -0.09357012063264847, -0.5970268249511719, -0.1442061811685562, -0.6653801798820496, -0.07001471519470215, 0.4516894519329071, -0.40631103515625, 0.18931376...
7 0 2 22 8 0 3 22 9 0 4
[ -0.6280841827392578, 0.2751101553440094, 0.1534052938222885, -0.22242972254753113, -0.26833295822143555, 0.6478388905525208, 0.1896725594997406, 0.3945111036300659, -0.2631368041038513, -0.754469633102417, 0.1555214673280716, -0.38299864530563354, -0.08194885402917862, 0.3827158510684967, ...
22 10 1 ``` I want to add a constraint to make sure that no one adds or updates a record to have IsActive = 1, if there is already a record for the EntityIdNmb where IsActive = 1. How do I do this? If you are using SQLServer you can create a clustered indexed view. ``` CREATE VIEW dbo.VIEW_...
[ -0.13105334341526031, 0.1041911318898201, 0.6365228295326233, -0.000677667383570224, -0.21661531925201416, -0.04095573350787163, -0.11032789945602417, -0.1696607619524002, -0.21131086349487305, -0.6663280129432678, 0.054323580116033554, 0.2953154146671295, -0.39962756633758545, 0.152560457...
ON dbo.VIEW_EntityAttributeRelship (EntityIdNmb) ``` This ensures there's only one EntityIdNmb in your table with IsActive = 1.
[ -0.1625589281320572, 0.2075911909341812, 0.4227558672428131, -0.024060755968093872, 0.0419185608625412, -0.3553999960422516, 0.22554853558540344, -0.0755276307463646, -0.0323590412735939, -0.6309673190116882, 0.022692520171403885, 0.6762056350708008, -0.1798020601272583, 0.1029792800545692...
I have a pdf that has been created using the Foxit form designer. On my design system, I have the barcode font installed. The barcode font is used in one of the AcroFields. It appears that foxit does not embed the font in the document. I also have customers that do not have the barcode font installed in their compute...
[ 0.3149697780609131, 0.1196451410651207, 0.32358747720718384, 0.386573851108551, -0.08565846085548401, -0.07275483012199402, -0.03114273212850094, 0.0784112960100174, 0.17800365388393402, -0.6460980176925659, 0.1277889907360077, 0.6213060021400452, -0.2304365038871765, -0.06722330302000046,...
the text, but not the fields, Therefore the font(barcode) will not print. I'm almost sure that you got an answer by now, but maybe others would like to get a detailed view on the solution. Below is the sample java code I used to embed fonts in the generated PDF (useful only in some cases, as the size of the documents i...
[ 0.13154244422912598, 0.09687752276659012, 0.6013621091842651, -0.08487694710493088, -0.2815336287021637, 0.04523647204041481, 0.014757322147488594, -0.3778128921985626, -0.005270245019346476, -0.8086889982223511, -0.08164245635271072, 0.47629761695861816, -0.2943103313446045, -0.1757843792...
= BaseFont.createFont(unicodeFontPath, BaseFont.IDENTITY_H, BaseFont.EMBEDDED); PdfStamper stamper = new PdfStamper(pdfTemplate, out); //assigning the font to the field stamper.getAcroFields().setFieldProperty("myField", "textfont", unicode, null); stamper.getAcroFields().setField("myField", someValue); stamper.close()...
[ -0.09561634808778763, 0.16945715248584747, 0.6435586214065552, -0.2477584034204483, -0.039318475872278214, 0.38639044761657715, 0.010201964527368546, -0.38981571793556213, -0.009917856194078922, -0.3655714690685272, -0.6020341515541077, 0.252262145280838, -0.3675469160079956, -0.2460277229...
Basically, I have a UISearchBar searching an NSMutableArray of stories that make up an RSS feed, and when you select a story, it loads in my app's UIWebView. It's difficult to explain, but I have a list of entries 1, 2, 3, and 4 and you search for '4'. 4 will be the first entry in the now-filtered list of data, right? ...
[ 0.8327686786651611, -0.04059230163693428, 0.40275144577026367, 0.5163155198097229, -0.1768164336681366, -0.1779603660106659, 0.0962957814335823, 0.20626911520957947, -0.3470539152622223, -0.2352345883846283, -0.1453341394662857, 0.5518657565116882, -0.13894687592983246, 0.31060490012168884...
first entry in the *un*filtered array of data, so it loads entry 1. Everything looks right in my code, but obviously it isn't. I know it's a confusing problem, but I hope I made it somewhat clear. Anyway, here's the relevant source so that you may see exactly what I mean: Search.h: <http://www.scribd.com/doc/131078...
[ 0.09615886211395264, 0.10573358088731766, 0.4556150436401367, 0.05214560031890869, -0.13708029687404633, -0.31772512197494507, -0.036715224385261536, -0.01898203231394291, -0.17663247883319855, -0.7608566880226135, -0.21959324181079865, 0.205620676279068, -0.1620076298713684, 0.01330406405...
increases dramatically). As a free tool to create the PDF forms, I have used the OpenOffice writer, by adding forms inside the documents and exporting the documents as PDF files : ``` PdfReader pdfTemplate = new PdfReader(templateName); ByteArrayOutputStream out = new ByteArrayOutputStream(); BaseFont unicode = BaseF...
[ 0.0008838201756589115, 0.07506178319454193, 1.0370078086853027, -0.16654300689697266, -0.2161654233932495, 0.23586033284664154, -0.006632080301642418, -0.6297800540924072, 0.05768478661775589, -0.6419445872306824, -0.37991178035736084, 0.49620354175567627, -0.28221553564071655, -0.22299920...
(Edited to add an example and hopefully make it a bit clearer) I'm mainly a VB6 developer, but am currently trying to write a web service using VB.Net to allow for communication between our product and a third-party. The third-party software will invoke our web service to update various data. I've read up various th...
[ 1.136461615562439, 0.374879390001297, 0.2184990793466568, -0.05949607118964195, -0.05790940672159195, -0.3155938982963562, -0.08592625707387924, 0.18174298107624054, -0.2613775432109833, -0.8148577213287354, 0.20793305337429047, 0.4989416003227234, -0.030263500288128853, 0.2125183790922165...
so I want to make sure I get it right. Therefore, I have the following assumptions/questions: The web service will receive various fields that should be updated. To keep this flexible, I thought that this could be a single XML parameter. I'm guessing this is why our clients want the XSD. Is this assumption correct? Is...
[ 0.5474518537521362, 0.07564608007669449, 0.4903433620929718, 0.19335728883743286, 0.03283019736409187, -0.10497408360242844, -0.3049764633178711, -0.05745381861925125, -0.19728514552116394, -0.7432045936584473, -0.0810275450348854, 0.6789317727088928, -0.2802221179008484, 0.012682848609983...
parameter be an instance of this class, rather than an XML document based on the XSD? For example, the fields to be updated relate to client data. There are many possible fields that can be updated, but only a few will probably be updated at a time. Clearly, I don't want a method with 40 parameters for each possible f...
[ 0.24268373847007751, -0.0030045723542571068, 0.328351229429245, 0.32240623235702515, -0.2058800309896469, 0.08043208718299866, -0.1674320548772812, -0.18598432838916779, -0.12920953333377838, -0.32803887128829956, 0.16199421882629395, 0.6675877571105957, -0.2602466642856598, 0.150796979665...
request from our clients for the XSD came about so that we can make sure that the XML parameter will only include valid fields. But at the same time, I generated an XSD using Visual Studio based on a sample class I created. But now I'm not sure which is best to use i.e. either: a) XML: cliData As Xml.XmlDocument: Appe...
[ 0.2688337564468384, -0.13974343240261078, 0.647168755531311, 0.2144915759563446, -0.27002838253974915, -0.03344215452671051, -0.2932966649532318, -0.3122286796569824, -0.21669308841228485, -0.5937373042106628, -0.21569016575813293, 0.49394258856773376, -0.42382028698921204, 0.1408776491880...
don't think this gives me the option to only includes a few fields, and isn't this equivalent to having loads of parameters? c) String: cliData As String: Pass in some sort of string, unravel it manually, but then no validation. I initially planned to return the status of the web service (e.g. "OK" or some failure me...
[ 0.4319663345813751, -0.01593770459294319, 0.20544898509979248, 0.12417399883270264, -0.20843929052352905, -0.047192588448524475, 0.5499087572097778, -0.09317610412836075, -0.16110917925834656, -0.28735315799713135, -0.13336911797523499, 0.3052748143672943, -0.19540971517562866, 0.283956855...
and the internet in general, but have become so overloaded with information, that I'm ending up with more questions than answers! Thanks, Olli It really sounds like you are making your life more complicated than you have to. ASP.NET will handle all the dirty work of a web service for you. To be honest, I am not sure w...
[ 0.743764340877533, 0.023237138986587524, 0.15519917011260986, 0.5555179715156555, -0.353524386882782, -0.28255635499954224, 0.019376268610358238, 0.37591591477394104, -0.3320639133453369, -0.40377771854400635, 0.17346259951591492, 0.4725250005722046, -0.165395125746727, 0.23261083662509918...
with this. <http://msdn.microsoft.com/en-us/library/ms972326.aspx>
[ -0.0574667751789093, 0.10245314985513687, 0.2283903807401657, 0.2359165996313095, 0.2414356768131256, -0.1692270040512085, 0.1609429121017456, 0.09875369071960449, -0.3446038067340851, -0.5087326765060425, -0.5105082392692566, 0.1572502702474594, -0.05389713868498802, 0.10336455702781677, ...
i am trying to create a simple puzzle game.. and i have an int[8][8] array that reprents the map.. each cell has a value which represents some item. now i want to draw this map on the screen, i have an image file for each item. (each item has the same width and height) i tried to do this with creating a UIImageView ...
[ 0.2508026361465454, 0.005750636104494333, 0.4299318194389343, 0.06317297369241714, -0.16709354519844055, 0.2583100497722626, 0.22557252645492554, -0.3461121916770935, -0.3370895981788635, -0.8434904217720032, 0.1995721161365509, 0.3487086892127991, -0.24620142579078674, 0.36654895544052124...
reccommend me to draw the map ? Thank you, chris IF u see this blog i think will never go to other webservices :) <http://springkbase.blogspot.com/2009/06/spring-webservice-with-castor.html>
[ 0.197628915309906, -0.23766471445560455, 0.3415779769420624, 0.28472641110420227, -0.1590268611907959, 0.06598221510648727, -0.01202523522078991, 0.28088000416755676, -0.4412502944469452, -0.4492875039577484, 0.29054760932922363, 0.22478264570236206, 0.05403348058462143, -0.196102693676948...
I have a couple of classes that want to pass each other some information and be called back later, using that information (Callback pattern). Within my application, this mechanism serves two purposes: * scheduled / delayed execution * asynchronous execution involving messaging My objects basically say to each other ...
[ 0.28814658522605896, -0.04566648602485657, 0.20616185665130615, -0.08227331936359406, -0.2820664346218109, 0.015022492967545986, 0.44301390647888184, 0.04111558943986893, -0.21290087699890137, -0.469338595867157, -0.07662247866392136, 0.36788931488990784, -0.14463932812213898, 0.2394448816...
would implement some "Job" class containing one plus the arguments it needs. For example, in PHP this structure would have to store a class name, a function name and an array of arguments. In C, it would be a pointer to the function and I'd have to make the arguments the same number and type for all calls. In Java, th...
[ -0.053272705525159836, 0.10855109244585037, 0.03359414264559746, -0.13966870307922363, -0.19085876643657684, 0.13657477498054504, 0.054138440638780594, -0.05083427578210831, 0.03060176596045494, -0.5606452226638794, 0.10947858542203903, 0.564141571521759, -0.6282933950424194, 0.15499812364...
called back might have a different set of methods to take the call * the caller is not the one to decide what call should be made Maybe my problem is that I'm trying to have a common data structure and calling procedure for the various callbacks, but in principle, it seems to make sense to me. What's a good design pa...
[ 0.04440184310078621, -0.018892282620072365, 0.20757876336574554, 0.18032574653625488, -0.21066750586032867, 0.06312941759824753, 0.2071678787469864, -0.19612181186676025, -0.0684739500284195, -0.4636474847793579, -0.024776525795459747, 0.5445224046707153, -0.4323647618293762, 0.00137909676...
method. If your receiver class needs to have multiple handlers, you can use anonymous inner classes that implement the Interface, one for each type of handler you need. For instance, if the sender uses an interface called "ListenerInterface", your receiver might define an anonymous inner class that implements the Lis...
[ 0.19829526543617249, -0.23976580798625946, 0.32685327529907227, -0.1993866264820099, -0.19007869064807892, 0.09478028118610382, 0.2762519121170044, -0.46703818440437317, -0.012041409499943256, -0.3001064360141754, 0.09717445075511932, 0.5729221701622009, -0.8479786515235901, 0.285618454217...
This question is a more special case of the problem described (and solved) in [this question](https://stackoverflow.com/questions/223918/java-efficient-equivalent-to-removing-while-iterating-a-collection). I have two methods, stopAndRemove(ServerObject server) and a close() method. The later should close all servers a...
[ -0.1836176961660385, -0.008547873236238956, 0.5787163376808167, -0.16803990304470062, -0.04173517972230911, -0.12226025760173798, 0.08918743580579758, -0.17385250329971313, -0.31428834795951843, -0.3486543297767639, -0.2533460557460785, 0.4630076587200165, -0.5684443712234497, 0.2770518064...
the list ``` List<ServerObject> copyList = new ArrayList<ServerObject>(this.servers); ``` and use that as the list for the foreach-loop. But then it might be possible that an other thread appends a Server to the servers list while I am iterating over copyList but closeCurrentlyOpen is supposed to result in an emtpy...
[ 0.1735621988773346, 0.1047443225979805, 0.821912944316864, -0.15281429886817932, 0.12461566179990768, -0.048761866986751556, 0.16589391231536865, -0.18082422018051147, -0.3662950098514557, -0.4424681067466736, -0.034602608531713486, 0.47846662998199463, -0.6065512299537659, 0.5104998946189...
not synchronize the code in the stopAndRemove method which is necessary if it is directly called. I seems to me that the design of this three methods probably needs a workover. Ideas anybody? Split off a method stop() from stopAndRemove(). Then write the loop with an explicit iterator, do the stop and then iterator.re...
[ 0.7627922296524048, 0.24134086072444916, 0.06176923215389252, 0.06275749951601028, 0.10950761288404465, -0.2899782657623291, 0.3496650159358978, -0.17862479388713837, 0.05581687390804291, -0.3636457920074463, 0.015665940940380096, 0.5931065082550049, -0.4753681421279907, -0.075291953980922...
I have two versions of a very large and complicated directory structure with tens of thousands of individual files and I want to look for significant file changes from one version to another. Each and every file has changed in some minor way. For example you might have a file called intro.txt which would contain [Bui...
[ 0.7132077217102051, 0.44683364033699036, 0.2589442729949951, -0.20163272321224213, 0.2685967683792114, 0.23854908347129822, 0.354599267244339, 0.2103838175535202, -0.12000943720340729, -0.8612044453620911, -0.13819508254528046, 0.5880974531173706, -0.21643812954425812, 0.15739597380161285,...
really want to do is pull out which files have changed in a more major way. One way they might have changed is for a lot of extra content to have been added which would increase the filesize - that's the kind of change I am interested in. So, how would you recursively parse through the directories looking for files th...
[ 0.5253193378448486, 0.013116391375660896, 0.21307921409606934, 0.07377050071954727, 0.0003913520195055753, -0.1302565038204193, -0.10414571315050125, 0.1472197026014328, -0.5569053292274475, -0.5201776027679443, 0.13051292300224304, 0.6923344731330872, -0.3633310794830322, -0.0843664556741...
are missing from one or other side ([left\_only](http://docs.python.org/library/filecmp.html#filecmp.dircmp.left_only) and [right\_only](http://docs.python.org/library/filecmp.html#filecmp.dircmp.right_only)). Then for the [diff\_files](http://docs.python.org/library/filecmp.html#filecmp.dircmp.diff_files) you need to...
[ 0.12179363518953323, 0.19451694190502167, 0.3474881947040558, 0.06180901452898979, 0.3277640640735626, 0.09710957854986191, -0.055793385952711105, -0.20553113520145416, -0.5677064657211304, -0.6433594226837158, -0.412225604057312, 0.5228849649429321, -0.11607413738965988, 0.200383752584457...
I'm aware of the "Enable just my code" debug option, but that only works for managed code. I'm looking for a way to step into a function call without having to step through, for example, an STL string cast operator because there is an implicit conversion from a char\* to a string in one of the function's parameters. I...
[ 0.36818772554397583, -0.14518247544765472, -0.18420174717903137, -0.14930522441864014, 0.05881037563085556, -0.034899983555078506, 0.6492759585380554, -0.10713563859462738, -0.19947797060012817, -0.5533862709999084, -0.07808659970760345, 0.6336148381233215, -0.39189115166664124, -0.0531887...
entry for each function that you don't want to step into under this registry key (assuming VS 2005): ``` **32 bit Windows** \\HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\8.0\NativeDE\StepOver **64 bit Windows** \\HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\8.0\NativeDE\StepOver ``` ...
[ -0.1625317484140396, -0.20782127976417542, 0.553038477897644, 0.08276429772377014, 0.005249675363302231, 0.4152653217315674, 0.17988894879817963, -0.4205341339111328, -0.15560753643512726, -0.5926138758659363, -0.058778416365385056, 0.4541641175746918, -0.23414002358913422, -0.154709115624...
boost::scoped\_ptr functions. The rules are evaluated from high to low values until a matching pattern is found, or there are no rules left. In that case the function is stepped into. Function names are regular expressions. Colons need to be quoted with a backslash. You can specify StepInto as well as NoStepInto. T...
[ -0.05336231738328934, -0.38752272725105286, 0.4901387393474579, -0.11297155916690826, 0.12204122543334961, -0.12563534080982208, 0.44206300377845764, -0.24303466081619263, -0.14033572375774384, -0.3851498067378998, -0.1860462874174118, 0.9026575684547424, -0.27482861280441284, -0.229011610...
What's the difference between tuples/lists and what are their advantages/disadvantages? Apart from tuples being immutable there is also a semantic distinction that should guide their usage. Tuples are heterogeneous data structures (i.e., their entries have different meanings), while lists are homogeneous sequences. **T...
[ 0.09085438400506973, 0.0558883398771286, 0.24574576318264008, 0.3287193179130554, -0.3351480960845947, 0.20315775275230408, 0.26279217004776, 0.14411814510822296, -0.19358304142951965, -0.7792916893959045, -0.6255519986152649, -0.1585044413805008, -0.17832964658737183, 0.17832711338996887,...
other hand could be used to store multiple locations. Naturally one might want to add or remove locations from the list, so it makes sense that lists are mutable. On the other hand it doesn't make sense to add or remove items from an existing location - hence tuples are immutable. There might be situations where you w...
[ -0.03517475351691246, -0.2282111793756485, 0.39156192541122437, 0.28101763129234314, -0.22486372292041779, -0.019159020856022835, 0.30297935009002686, 0.03435618057847023, -0.5094836354255676, -0.6909257769584656, -0.2887953221797943, -0.024804266169667244, -0.3067489266395569, 0.516933619...
immutable data like this is a cornerstone of value types and functional programming techniques, which can have substantial advantages. There are some interesting articles on this issue, e.g. ["Python Tuples are Not Just Constant Lists"](http://jtauber.com/blog/2006/04/15/python_tuples_are_not_just_constant_lists/) or ...
[ -0.0062734587118029594, -0.1139756515622139, 0.2396271526813507, 0.0764412209391594, -0.40806666016578674, -0.22827519476413727, 0.16484320163726807, 0.0016888760728761554, -0.38585421442985535, -0.39842429757118225, -0.5096219182014465, 0.3020699918270111, -0.5972699522972107, 0.015459695...
difference is very obvious. Finally there is the [namedtuple](http://docs.python.org/dev/library/collections.html#collections.namedtuple) in Python, which makes sense because a tuple is already supposed to have structure. This underlines the idea that tuples are a light-weight alternative to classes and instances.
[ 0.03280634433031082, -0.07032214105129242, 0.1019444689154625, 0.050336673855781555, -0.48200300335884094, -0.024458304047584534, 0.3047233521938324, 0.3223007321357727, -0.3948087692260742, -0.4491945505142212, -0.5885645747184753, 0.019302692264318466, -0.11129074543714523, -0.0131000392...
When a TCP Server does a socket accept on a port, it gets a new socket to work with that Client. The accepting socket remains valid for that port and can accept further clients on that port. Why did the original FTP specification [RFC 959](http://www.faqs.org/rfcs/rfc959.html) decide to create both a control port ...
[ 0.13832780718803406, -0.11524626612663269, 0.31673744320869446, 0.22338593006134033, -0.14802037179470062, -0.159681037068367, 0.015380126424133778, -0.21686993539333344, -0.4089392125606537, -0.44979432225227356, -0.1373153030872345, 0.3567386567592621, -0.5216449499130249, 0.396983504295...
would have been much better. For a general protocol implementation, the only reason I could think that you would want to do this is so that you can serve the files from a different host than the commands are going to. The initial rationale behind this was so that you could: * Continue sending and receiving control i...
[ 0.3392627537250519, -0.3804914951324463, 0.1018316000699997, 0.1622687727212906, 0.029981808736920357, 0.0647200345993042, 0.19403544068336487, -0.09118137508630753, -0.21803130209445953, -0.5001111626625061, 0.03549753129482269, 0.45498499274253845, -0.30230918526649475, 0.008365829475224...
to the FTP protocol, but since at that time NAT was a non issue, they chose to use what already existed, TCP ports. Here is an example: Alice wants two files from Bob. Alice connects to Bob port 21 and asks for the files. Bob open connections to Alice port 20 when it's ready and send the files there. Meanwhile, Charl...
[ 0.1609690636396408, -0.19590634107589722, 0.4403908848762512, 0.043839987367391586, 0.04304990544915199, 0.1087406724691391, 0.267461895942688, -0.28574076294898987, -0.7747383713722229, -0.49318233132362366, -0.1794155389070511, 0.19004905223846436, -0.8054999113082886, 0.3246451020240783...
and port 20 is for servers connecting to clients, but those clients could still serve files on 21. Both ports serve a totally different purpose, and again for sake of simplicity, they chose to use two different ports instead of implementing a negotiation protocol.
[ -0.3514546751976013, -0.2771246135234833, 0.4061943292617798, 0.1213025227189064, 0.11632496118545532, 0.21645019948482513, 0.04338306561112404, -0.1905946135520935, -0.5814195871353149, -0.8933693766593933, -0.12823523581027985, 0.3688202202320099, -0.4426332712173462, 0.415995329618454, ...
Apropos of [This question](https://stackoverflow.com/questions/541329/is-it-possible-to-programmatically-construct-a-python-stack-frame-and-start-execu), there is a bit of scaffolding within the interpreter to inspect frame objects, which can be retrieved by `sys._getframe()`. The frame objects appear to be read only, ...
[ -0.02791033871471882, 0.48607543110847473, 0.4501097500324249, -0.4904342293739319, -0.13047349452972412, 0.20618270337581635, 0.24886029958724976, -0.4698363244533539, -0.3351469039916992, -0.281083345413208, -0.17467139661312103, 0.5426065921783447, -0.40352320671081543, -0.2671748399734...
being writable when run from the current frame in an interactive shell. From CPython source, `Objects/frameobject.c`: ```c static PyMemberDef frame_memberlist[] = { {"f_back", T_OBJECT, OFF(f_back), RO}, {"f_code", T_OBJECT, OFF(f_code), RO}, {"f_builtins", T_OBJECT, OFF(...
[ -0.013849812559783459, -0.35825076699256897, 0.8689972758293152, -0.02235323004424572, 0.17961867153644562, 0.4176067113876343, 0.2116895318031311, -0.10417278856039047, -0.6044347882270813, -0.47684288024902344, -0.43395113945007324, 0.4135205149650574, -0.5459963083267212, 0.248897925019...
OFF(f_lasti), RO}, {"f_exc_type", T_OBJECT, OFF(f_exc_type)}, {"f_exc_value", T_OBJECT, OFF(f_exc_value)}, {"f_exc_traceback", T_OBJECT, OFF(f_exc_traceback)}, {NULL} /* Sentinel */ }; ... static PyGetSetDef frame_getsetlist[] = { {"f_locals", (getter)frame_getlocals, NULL, NU...
[ 0.04124871641397476, -0.46450334787368774, 0.6589029431343079, 0.021659817546606064, 0.1533106565475464, 0.2541657090187073, 0.16646318137645721, -0.31561675667762756, -0.36622920632362366, -0.4401603937149048, -0.2793314456939697, 0.5302874445915222, -0.539882481098175, 0.1842138171195984...
{"f_trace", (getter)frame_gettrace, (setter)frame_settrace, NULL}, {"f_restricted",(getter)frame_getrestricted,NULL, NULL}, {0} }; ``` For the `PyMemberDef`, the flags `RO` or `READONLY` means it's attributes are read-only. For the `PyGetSetDef`, if it only has a getter, it's read only. This means all att...
[ -0.2155960649251938, 0.0887535884976387, 0.4235815405845642, -0.005204521119594574, 0.4442853033542633, 0.04937735199928284, 0.17311544716358185, -0.2979259490966797, -0.12960170209407806, -0.4364410936832428, -0.40536361932754517, 0.7317659854888916, -0.2987883687019348, -0.18359287083148...