text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Whenever I drop a new database object from server explorer into the dbml, Visual Studio replaces the connection string in the designer file with a new one that it automatically adds to the connection strings in my config file. They both have exactly the same parameters, just different names. How do I force Visual Stud...
[ -0.11376823484897614, -0.06841772794723511, 0.5360457897186279, -0.11724458634853363, -0.05972670763731003, -0.04271666705608368, -0.05413933843374252, -0.2839197814464569, -0.2971940338611603, -0.947587788105011, -0.2907474637031555, 0.5911500453948975, -0.49953317642211914, 0.15015998482...
whenever I drag a database object to the dbml. I want the designer.cs to use DefaultConnstring. There's a good post that pretty much explains your options here: <http://blog.jongallant.com/2007/11/linq-web-app-connection-strings.html#.UGA8Q42PUg0>
[ 0.11400960385799408, -0.0979059562087059, 0.12088871002197266, -0.13977327942848206, 0.014974088408052921, -0.009054615162312984, 0.33647462725639343, 0.010574300773441792, -0.45116499066352844, -0.5552052855491638, -0.11508800834417343, 0.46563878655433655, -0.35531672835350037, -0.055593...
We don't need multiuser. Just relational. Our app currently uses Access but Access isn't exactly zero-administration because it's prone to corruption. Is SQLite rock, rock solid, pure zero-administration? Or...is there a way to configure SQL Server as a desktop engine so that it is pure zero admin? Or...is there s...
[ 0.2582436800003052, 0.4427102208137512, 0.29258960485458374, 0.3865036070346832, -0.00837369542568922, -0.11985268443822861, 0.0878438949584961, 0.06243868172168732, -0.1247817724943161, -0.46114614605903625, 0.17953065037727356, 0.8064646124839783, -0.48331567645072937, 0.2474006414413452...
Access, but I'm not aware of anything that's as easy to use, and as easy for an end user to understand. Access (like SourceSafe) is always called "prone to corruption", but few and far between are the first-hand accounts of this. Most people "read it somewhere." Consider just including a backup routine with your app t...
[ 0.2696824371814728, 0.3414647877216339, 0.023892764002084732, 0.536857008934021, 0.036146972328424454, -0.5455830693244934, -0.007143933326005936, 0.3834021985530853, -0.2755468189716339, -0.5417061448097229, -0.008640359155833721, 0.7135913968086243, -0.0008602677844464779, 0.311571836471...
and a few DLLs. Unlike SQL Server Express Edition, SQL Server CE doesn't leave a background process running all the time.
[ -0.1289428174495697, 0.27631309628486633, 0.32263198494911194, -0.02590499445796013, -0.13332590460777283, -0.3746078908443451, -0.11610983312129974, 0.3642187714576721, -0.048986226320266724, -0.8812018036842346, -0.32393214106559753, 0.09669629484415054, -0.3055966794490814, 0.2472931295...
I need to replace some 2- and 3-digit numbers with the same number plus 10000. So ``` Photo.123.aspx ``` needs to become ``` Photo.10123.aspx ``` and also ``` Photo.12.aspx ``` needs to become ``` Photo.10012.aspx ``` I know that in .NET I can delegate the replacement to a function and just add 10000 to the...
[ 0.6245800852775574, 0.12046422064304352, 0.202964648604393, 0.1305374652147293, 0.15725262463092804, 0.11336611211299896, -0.14769701659679413, -0.43318188190460205, -0.06993332505226135, -0.5684889554977417, 0.3704957365989685, 0.30768242478370667, -0.5979703068733215, 0.02331072837114334...
expression in place of the explicit delegate because its more compact and readable. ``` using System; using System.Text.RegularExpressions; namespace RenameAspxFile { sealed class Program { private static readonly Regex _aspxFileNameRegex = new Regex(@"(\S+\.)(\d+)(\.aspx)", RegexOptions.Compiled | Re...
[ 0.2557731866836548, -0.25031620264053345, 0.5569039583206177, -0.2827264666557312, 0.2425677478313446, 0.20153367519378662, 0.604753315448761, -0.5448287129402161, -0.29292377829551697, -0.5126802325248718, -0.6445850729942322, 0.6673455238342285, -0.4294890761375427, 0.22829461097717285, ...
program.Run(); } void Run() { foreach (string aspxFileName in _aspxFileNames) { Console.WriteLine("Renamed '{0}' to '{1}'", aspxFileName, AddTenThousandToPhotoNumber(aspxFileName)); }
[ 0.12367735058069229, -0.4502065181732178, 0.4510471224784851, -0.3563104569911957, 0.5026537179946899, 0.25579962134361267, 0.49048635363578796, -0.2622855603694916, -0.16784855723381042, -0.39439040422439575, -0.3573327660560608, 0.613422155380249, -0.38724392652511597, 0.2251070439815521...
} string AddTenThousandToPhotoNumber(string aspxFileName) { return _aspxFileNameRegex.Replace(aspxFileName, match => String.Format("{0}{1}{2}", match.Result("$1"), Int32.Parse(match.Result("$2")) + 10000, match.Result("$3"))); } } } ```
[ 0.01782674714922905, -0.11214561015367508, 0.6975163221359253, -0.32205861806869507, 0.4274836778640747, 0.06531988084316254, 0.19439272582530975, -0.5035585761070251, -0.20805051922798157, -0.3307175040245056, -0.2907721996307373, 0.7977050542831421, -0.4414345622062683, -0.03236160427331...
Im currently using ie as an active x com thing on wxWidgets and was wanting to know if there is any easy way to change the user agent that will always work. Atm im changing the header but this only works when i manually load the link (i.e. call setUrl) The only way that will "always work," so far as I've been able to ...
[ 0.19983966648578644, 0.03516969084739685, 0.6209919452667236, -0.39902421832084656, 0.011323900893330574, 0.028035197407007217, 0.353654146194458, -0.05408423766493797, -0.23187485337257385, -0.9208508133888245, 0.11478682607412338, 0.5055408477783203, -0.6549018621444702, -0.0937143713235...
for a new user > agent via `DISPID_AMBIENT_USERAGENT` > when navigating to clicked hyperlinks. > This ambient property can be > overridden, but it is not used when > programmatically calling the Navigate > method; it will also not cause the > userAgent property of the DOM's > navigator object or clientInformati...
[ 0.007458837702870369, -0.03195305913686752, 0.8049220442771912, -0.16720762848854065, 0.0879376232624054, -0.2670396566390991, 0.5179139971733093, -0.08789895474910736, 0.10638438910245895, -0.9199885725975037, -0.057161178439855576, 0.6956114768981934, -0.31682148575782776, 0.252093821763...
I have been working with T-SQL in MS SQL for some time now and somehow whenever I have to insert data into a table I tend to use syntax: ``` INSERT INTO myTable <something here> ``` I understand that keyword `INTO` is optional here and I do not have to use it but somehow it grew into habit in my case. My question i...
[ 0.28126829862594604, 0.34156906604766846, -0.06369197368621826, -0.12519444525241852, 0.03587407246232033, -0.35019898414611816, -0.30167603492736816, 0.09373631328344345, -0.08285430073738098, -0.5919979214668274, -0.042983077466487885, 0.4538061320781708, -0.09935085475444794, -0.0267412...
it's required in a few, so it's a good idea to include it to ensure that your code is portable. You can find links to several versions of the SQL standard [here](http://en.wikipedia.org/wiki/SQL#Standardization). I found an HTML version of an older standard [here](http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992....
[ 0.7354109883308411, 0.04086614027619362, 0.13272805511951447, 0.12220365554094315, 0.28747397661209106, -0.21417556703090668, -0.10999498516321182, -0.0844060629606247, -0.4764857590198517, -0.4745175242424011, 0.10871413350105286, 0.40064123272895813, 0.09634369611740112, -0.1894093155860...
I have a great deal of data to keep synchronized over 4 or 5 sites around the world, around half a terabyte at each site. This changes (either adds or changes) by around 1.4 Gigabytes per day, and the data can change at any of the four sites. A large percentage (30%) of the data is duplicate packages (Perhaps packaged...
[ 0.639217734336853, 0.3322693705558777, 0.33942270278930664, -0.045204583555459976, 0.19811280071735382, -0.10031957924365997, 0.3512636721134186, 0.02355450950562954, -0.4953291416168213, -0.7566050887107849, 0.012668943032622337, 0.23905476927757263, -0.1653059720993042, 0.395792424678802...
issue, this is not a codebase per-se. I'm just interested if there are any solutions out there (preferably open-source) that get close to such a thing? My baby script using rsync doesn't cut the mustard any more, I'd like to do more complex, intelligent synchronization. Thanks Edit : This should be UNIX based :) H...
[ 0.5202925205230713, -0.24682237207889557, 0.1003032773733139, 0.23272842168807983, -0.09721043705940247, -0.15416185557842255, 0.20590367913246155, 0.36357834935188293, -0.32169243693351746, -0.5332186818122864, 0.10020036995410919, 0.4754771590232849, -0.28375089168548584, -0.239716276526...
I am trying to link to a file that has the '#' character in via a window.open() call. The file does exist and can be linked to just fine using a normal anchor tag. I have tried escaping the '#' character with '%23' but when the window.open(myurl) gets processed, the '%23' becomes '%2523'. This tells me that my url str...
[ -0.07698618620634079, 0.09262745082378387, 0.3915606141090393, -0.2988416254520416, -0.06885682791471481, 0.2119835615158081, 0.66858971118927, -0.3372398912906647, 0.031227391213178635, -0.6763759255409241, -0.3324531614780426, 0.30426761507987976, -0.5435474514961243, 0.18752583861351013...
- doesn't work // newUrl = url.replace("#", "\\#"); return newUrl; } </script> <a href="#top" onclick="url = '\\\\MyUNCPath\\PropertyRushRefi-Add#1-ABCDEF.RTF'; window.open(escapePound(url)); return true;">Some Doc</a> ``` URL that yells says "file://MyUNCPath/PropertyRushRefi-Add%25231-ABCDEF.RTF" cannot be ...
[ 0.27782270312309265, 0.24873104691505432, 0.6992009878158569, -0.11741577088832855, 0.4978537857532501, -0.09332660585641861, 0.8219389319419861, -0.6848300695419312, 0.126478910446167, -0.39444008469581604, -0.43217140436172485, 0.5696991682052612, -0.3391572833061218, 0.19598710536956787...
I have an array I've created in JavaScript. The end result comes out to element1,element2,,,element5,element6,,,element9.... etc Once passed to ColdFusion, it removes the null elements, I end up with element1,element2,element5,element6,element9 I need to maintain these spaces, any ideas? My problem may begin before t...
[ 0.20593754947185516, 0.27035942673683167, 0.4666263163089752, 0.009822243824601173, 0.018773725256323814, 0.19228661060333252, 0.1346179097890854, -0.22689884901046753, -0.09094582498073578, -0.5096811056137085, 0.14878857135772705, 0.03930380195379257, -0.5708937048912048, 0.1431318223476...
be my best option. Any ideas? Are you deserializing the jS array into a list? CF ignores empty list fields using its built-in functions. This can be worked around by processing the text directly. Someone has already done this for you, fortunately. There are several functions at cflib.org, like: * [ListFix](http://cfl...
[ 0.6918395161628723, -0.22278015315532684, 0.4270241856575012, -0.19401071965694427, -0.1211896613240242, -0.1222136840224266, 0.060449037700891495, -0.029376501217484474, -0.3778266906738281, -0.624977171421051, 0.1391887068748474, 0.7549358606338501, -0.4613272547721863, -0.22173839807510...
I have the following code: ``` MemoryStream foo(){ MemoryStream ms = new MemoryStream(); // write stuff to ms return ms; } void bar(){ MemoryStream ms2 = foo(); // do stuff with ms2 return; } ``` Is there any chance that the MemoryStream that I've allocated will somehow fail to be disposed o...
[ 0.24691495299339294, 0.2503673732280731, 0.44447970390319824, -0.21193380653858185, 0.3973946273326874, -0.06434936076402664, 0.15113741159439087, -0.1491614729166031, -0.3502553701400757, -0.5413556694984436, -0.18868452310562134, 0.42774060368537903, -0.41375532746315, 0.2531794309616089...
should be using a `using` statement in your `bar()` method to make sure `ms2` gets Disposed. It will eventually get cleaned up by the garbage collector, but it is always good practice to call Dispose. If you run FxCop on your code, it would flag it as a warning.
[ 0.7687529921531677, 0.014785104431211948, -0.0037513375282287598, -0.20252779126167297, 0.26276692748069763, -0.26732492446899414, -0.02093946747481823, -0.1465815305709839, -0.3175278604030609, -0.5692541599273682, -0.05942416563630104, 0.6059103608131409, -0.3676896393299103, 0.049679551...
I have a complex .NET Remoting server app that provides a couple of services. Clients can currently use tcp and http channels to connect to the server. Now I need to implement some new administration services, but I want to restrict their availability to the local machine, i.e. I want to create an administration tool ...
[ 0.5202307105064392, 0.14099273085594177, 0.4767489731311798, 0.09706959873437881, -0.08761260658502579, -0.2939944565296173, 0.15704865753650665, -0.06898064911365509, -0.4070048928260803, -0.7725542783737183, 0.15431800484657288, 0.3982774615287781, -0.2188117653131485, 0.4124415218830108...
server for use by the admin tool. Now comes the problem: how can I prevent remote clients connecting to these new admin services using the tcp or http channel? Can I say something like "register service x, implemented by class C in assembly A, usable only via ipc", "register service y, implemented by class D in assembl...
[ 0.1289222687482834, 0.21274800598621368, 0.5133314728736877, 0.14044766128063202, -0.16892752051353455, -0.1893569380044937, 0.32356709241867065, -0.001470070332288742, -0.22043396532535553, -0.87062007188797, 0.02713972143828869, 0.5789241194725037, -0.464065819978714, 0.37098079919815063...
channel to register on, nor are there any methods on the IPCServerChannel to register a service, so none of that will work. The best I can think of is writing a ChannelSink that filters your messages or provides security. These can be added to the constructor of your TcpChannel and HttpChannel to filter out admin only...
[ 0.4088306725025177, -0.18683189153671265, 0.5800624489784241, 0.28931358456611633, -0.1938895285129547, -0.3768649995326996, 0.4163665175437927, 0.0463605597615242, 0.0008357000187970698, -0.8369947671890259, 0.2035883367061615, 0.499463826417923, -0.5225192308425903, 0.3085266053676605, ...
We have a highly specialized DAL which sits over our DB. Our apps need to use this DAL to correctly operate against this DB. The generated DAL (which sits on some custom base classes) has various 'Rec' classes (Table1Rec, Table2Rec) each of which represents the record structure of a given table. Here is a sample Pseu...
[ 0.004714444279670715, -0.15509699285030365, 0.41196903586387634, 0.041784875094890594, -0.16711419820785522, 0.1733584702014923, -0.24145056307315826, -0.4208816885948181, 0.09520870447158813, -0.17599539458751678, -0.14842741191387177, 0.21123699843883514, -0.29324400424957275, 0.18538607...
mField2isNull = True End Sub Public Property Field1() As String Get Return mField1 End Get Set(ByVal value As String) mField1 = value mField1isNull = False End
[ -0.23385070264339447, -0.30442386865615845, 0.3794521987438202, -0.5289689898490906, 0.12270639836788177, -0.2513262629508972, 0.25747692584991455, -0.3610366880893707, 0.047937359660863876, -0.0852508693933487, -0.48538970947265625, 0.9076376557350159, -0.37904950976371765, 0.154302403330...
Set End Property Public ReadOnly Property Field1isNull() As Boolean Get Return mField1isNull End Get End Property Public Property Field2() As Integer Get Return mField2 End Get Set(ByVal value As Integer)
[ -0.3575558662414551, -0.027849938720464706, 0.3401792347431183, -0.27855828404426575, -0.041140224784612656, -0.29114606976509094, -0.03375902771949768, -0.3360632658004761, 0.012234103865921497, -0.08503717184066772, -0.5745738744735718, 0.6874483227729797, -0.3278377652168274, 0.26640969...
mField2 = value mField2isNull = False End Set End Property Public ReadOnly Property Field2isNull() As Boolean Get Return mField2isNull End Get End Property End Class ``` Each class has properties for each of the fields... Thus I can write... ``` Dim Rec as ...
[ -0.2196027934551239, -0.10849376767873764, 0.623559296131134, -0.3223510980606079, 0.2734430730342865, -0.551543653011322, 0.18115662038326263, -0.4368951618671417, 0.1419609934091568, -0.28975948691368103, -0.45866090059280396, 0.8742610812187195, -0.11831618845462799, 0.5176035165786743,...
Table1Rec Table1Rec.Field1 = "SomeString" Table2Rec.Field2 = 500 ``` Where a field can accept a NULL value, there is an additional property which indicates if the value is currently null. Thus.... ``` Dim Rec as New Table1Rec Table1Rec.Field1 = "SomeString" If Table1Rec.Field1Null then ' This clearly is not tr...
[ 0.03955688700079918, -0.012643344700336456, 0.6100005507469177, -0.23682452738285065, 0.0038414683658629656, -0.0216563418507576, 0.21905973553657532, -0.10635021328926086, -0.12014758586883545, -0.29278311133384705, -0.19003735482692719, 0.552204430103302, -0.07484134286642075, 0.10463273...
(which I of course intend to secure) and have discovered that while the structure of the 'Rec' class remains intact over the web... All logic is lost.. If someone were to run the previous piece of code remotely they would notice that neither condition would prove true as there is no client side code which sets null to...
[ 0.618790864944458, 0.29275599122047424, 0.1415122151374817, 0.16186106204986572, -0.04809161275625229, -0.43532320857048035, 0.39720967411994934, -0.15201544761657715, -0.1812899261713028, -0.7353840470314026, -0.27624842524528503, 0.6640539169311523, -0.20991703867912292, 0.36780488491058...
System.Web Imports System.Web.Services Imports System.Web.Services.Protocols <WebService(Namespace:="http://tempuri.org/")> _ <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Public Class Testing Inherits System.Web.Services.WebSe...
[ 0.23148640990257263, -0.2551964819431305, 0.18919728696346283, 0.167602077126503, -0.27304747700691223, -0.09561271220445633, 0.39855295419692993, -0.4836413860321045, -0.1351226568222046, -0.6541987061500549, -0.33335962891578674, 0.3300183415412903, -0.48385611176490784, 0.54578065872192...
Public Sub New() _name = String.Empty _id = Nothing End Sub Public Sub New(ByVal id As Nullable(Of Integer), ByVal name As String) _name = name _id = id End Sub
[ -0.23830147087574005, -0.42083966732025146, 0.4554784297943115, 0.0068544321693480015, 0.11159725487232208, -0.2810729444026947, 0.4699561595916748, -0.10657388716936111, -0.14155037701129913, -0.29850295186042786, -0.4585130214691162, 0.35299479961395264, -0.018898095935583115, 0.58052116...
Private _name As String Public Property Name() As String Get Return _name End Get Set(ByVal value As String) _name = value
[ -0.1849902719259262, -0.1277306228876114, 0.3200952708721161, -0.004786693025380373, 0.026292867958545685, -0.20395603775978088, 0.18956954777240753, -0.3067439794540405, -0.047883015125989914, 0.019084597006440163, -0.38200223445892334, 0.7064558863639832, -0.15490661561489105, 0.34850117...
End Set End Property Private _id As Nullable(Of Integer) Public Property ID() As Nullable(Of Integer) Get Return _id End Get Set(ByVal value As Nullable(Of Integer))
[ -0.44664016366004944, -0.04551560804247856, 0.4646405875682831, 0.018482234328985214, -0.009809003211557865, -0.23578323423862457, 0.04538971558213234, -0.29677602648735046, 0.09591429680585861, -0.08374592661857605, -0.4723820686340332, 0.43319252133369446, -0.366866797208786, 0.102633431...
_id = value End Set End Property End Class End Class ``` outputs this (with nullable areas) ``` <?xml version="1.0" encoding="utf-8" ?> <ArrayOfTestObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/"> <TestOb...
[ -0.18260370194911957, 0.09204834699630737, 0.0024533953983336687, 0.09339865297079086, -0.34616902470588684, -0.2613888084888458, -0.004648112691938877, -0.485066294670105, 0.06750848144292831, -0.4774132966995239, -0.2017468363046646, 0.14932942390441895, -0.17867296934127808, 0.353112190...
How do you create an application shortcut (.lnk file) in C# or using the .NET framework? The result would be a .lnk file to the specified application or URL. It's not as simple as I'd have liked, but there is a great class call [ShellLink.cs](http://www.vbaccelerator.com/home/NET/Code/Libraries/Shell_Projects/Creating...
[ 0.3712650239467621, -0.07244575023651123, 0.34580501914024353, -0.271863728761673, -0.10149069130420685, 0.04200847074389458, 0.18248887360095978, -0.2866838872432709, -0.07658465206623077, -0.7289837002754211, 0.024498779326677322, 0.49046841263771057, -0.35259488224983215, -0.03601554036...
shortcut.Description = "My Shorcut Name Here"; shortcut.DisplayMode = ShellLink.LinkDisplayMode.edmNormal; shortcut.Save(STARTUP_SHORTCUT_FILEPATH); } } ```
[ 0.013770502991974354, -0.043726857751607895, 0.37127164006233215, -0.43350690603256226, 0.3204984664916992, -0.00019679783144965768, 0.3925943672657013, 0.17628467082977295, -0.13288503885269165, -0.7575498819351196, -0.11523087322711945, 0.7227605581283569, -0.23240534961223602, 0.1990431...
Are pipes considered dangerous to use in Windows, from a security standpoint? Pipes aren't a particular security risk in Windows. If you're worried about security, make sure you set the security descriptor on the pipe to an appropriate DACL. If your usage requires that the pipe is open for anyone to connect to, then yo...
[ 0.5679770112037659, 0.006270550657063723, 0.46142929792404175, 0.14374609291553497, 0.3257620930671692, -0.33132418990135193, 0.11185616999864578, 0.08467047661542892, -0.3357604742050171, -0.7422946095466614, -0.29693329334259033, 0.45232513546943665, -0.13727910816669464, 0.0493226423859...
C# .NET 3.5. I'm trying to understand the intrinsic limitation of the C# Action object. Within the lamda (are those, in fact, lamdas?), we can perform assignments, call functions, even execute a ternary operation, but we can't execute a multi-statement operation. Is this because the single-statement execution is just ...
[ 0.3488205671310425, -0.22808435559272766, -0.32551953196525574, -0.00211519468575716, -0.1502019464969635, -0.26235926151275635, 0.38044559955596924, -0.4810892641544342, -0.30252695083618164, -0.11803589761257172, -0.1418740600347519, 0.40248405933380127, -0.505671501159668, -0.1246858090...
// Does not work, throws compile error Action action = () => { if(m_Count < 10) m_Count++; value = m_Count; } // Works Action action2 = () => value = delegate(){ if(m_Count < 10) m_Count++; return m_Count;
[ 0.1968071311712265, -0.2673441171646118, 0.288290798664093, -0.280685156583786, 0.22220009565353394, 0.20190727710723877, 0.640677273273468, -0.7706612348556519, -0.43771687150001526, -0.4933108985424042, -0.4310506284236908, 0.6009660363197327, -0.381041556596756, -0.4315634071826935, -...
}; // Works Action action3 = () => value = m_Count; // Works Action action4 = () => value = m_Count < 10 ? m_Count++ : 0; // Works Action action5 = () => value = Increment(); } public int Increment() {
[ -0.07608138769865036, -0.3914530575275421, 0.7143964171409607, -0.37505677342414856, 0.08252730220556259, 0.5916121602058411, 0.3542925715446472, -0.5537728071212769, -0.48073825240135193, -0.2147415578365326, -0.42818698287010193, 0.6557660698890686, -0.4657711684703827, -0.11763852834701...
if (m_Count < 10) m_Count++; return m_Count; } } ``` EDIT: Grr, sorry for the noise. Originally, I had ``` Action action = () => if(m_Count < 10) m_Count++; value = m_Count; ``` Which threw a compile error, but then right before the post I thought I'd try wrapping it in braces ``` Action...
[ -0.015517801977694035, -0.028370605781674385, 0.1913122534751892, -0.41314786672592163, -0.1760719120502472, 0.39935484528541565, 0.6128759384155273, -0.5951794385910034, -0.6238474249839783, -0.4329415261745453, -0.18080757558345795, 0.4286803901195526, -0.6332371234893799, -0.36553698778...
the same problem. It works, though, if I toss in a semi-colon after the braces ``` Action action = () => { if(m_Count < 10) m_Count++; value = m_Count; }; ``` Sorry for the noise! EDIT 2: Thanks cfeduke, you posted that at the same time as my edit above - went ahead and marked as answer. You are missing a semi-colo...
[ 0.15330770611763, 0.033375371247529984, 0.2548087239265442, -0.24657779932022095, -0.40064579248428345, 0.206383615732193, 0.43289878964424133, -0.470492959022522, -0.4591061770915985, -0.500007152557373, -0.11196602135896683, 0.5293269753456116, -0.44105634093284607, -0.34791186451911926,...
I'm trying to come up with a Java regex that will match a filename only if it has a valid extension. For example it should match "foo.bar" and "foo.b", but neither "foo." nor "foo". I've written the following test program ``` public static void main(String[] args) { Pattern fileExtensionPattern = Pattern.compile("\...
[ 0.1485714465379715, -0.19861100614070892, 0.719357967376709, -0.2925458252429962, 0.030248630791902542, 0.0037694836501032114, 0.2725977301597595, -0.5474430322647095, -0.04264450818300247, -0.6126753091812134, 0.11546741425991058, 0.6174768209457397, -0.5177143812179565, 0.020340789109468...
all 4 cases. Where am I going wrong? Cheers, Don The [Matcher.matches()](http://java.sun.com/javase/6/docs/api/java/util/regex/Matcher.html#matches()) function tries to match the pattern against the entire input. Thus, you have to add `.*` to the beginning of your regex (and the `\\Z` at the end is superfluous, too), ...
[ 0.23170703649520874, 0.3050345480442047, 0.6910011768341064, -0.23247893154621124, -0.13301514089107513, -0.1434108167886734, 0.24830971658229828, -0.21382169425487518, 0.08157247304916382, -0.46572521328926086, 0.0124637046828866, 0.7192238569259644, -0.23712196946144104, -0.0234423931688...
Before I get flamed and down-voted without mercy, my company will not allow the install of .NET3.5 on non-dev machines yet (others are currently on 3.0). I have a managed exe on network share that needs to be able to run from there. This is a common problem with pre-.NET3.5SP1, but I cannot figure out how to solve it....
[ 0.3457448184490204, 0.22930550575256348, 0.3764069676399231, 0.09504377841949463, -0.011054998263716698, -0.4872867465019226, 0.47904160618782043, -0.03476662561297417, -0.379657119512558, -0.5731666088104248, -0.09635530412197113, 0.5425276756286621, -0.2591417729854584, 0.256851196289062...
found in the articles. The only way I've found to get it to run from the network is to make it a click-once application and publish it; which is unacceptable because it creates a bunch of different files in the published directory (which confuses our less-than-technical users) and creates entries in the Add/Remove Prog...
[ 0.7426115274429321, 0.24689221382141113, 0.16762715578079224, 0.22516947984695435, 0.1786181926727295, -0.4215613007545471, 0.34576019644737244, 0.318621426820755, -0.15192380547523499, -0.3669925928115845, 0.09337728470563889, 0.6185268759727478, -0.28071609139442444, 0.34153714776039124,...
Is it even possible without setting machine/domain security/software policies (which I don't have access to)? **Edit** Ok... I expected to get voted down; however, it would be really nice if people would explain why they down-voted. This is a serious question that many people seem to be having a problem with; and a...
[ 0.27647531032562256, -0.11432825028896332, 0.28260543942451477, 0.11340659111738205, -0.2865566313266754, -0.24632783234119415, 0.3211177587509155, -0.2103528082370758, -0.15103518962860107, -0.5535776615142822, -0.02945932187139988, 0.7862268090248108, -0.1315879076719284, -0.111763164401...
on each machine and set the security level for the Local Intranet zone to FullTrust. The security risk with this approach is that now you're trusting *all* .NET code that's available on your intranet, which may not be what your organisation wants. The more surgical approach is to give your .NET assemblies a strong nam...
[ 0.5081504583358765, 0.07741227746009827, 0.07499831169843674, -0.00010452191781951115, -0.06357740610837936, -0.43610838055610657, 0.5530875325202942, -0.19809560477733612, -0.2515713572502136, -0.5855838656425476, -0.4243743121623993, 0.4021902084350586, -0.29401808977127075, 0.0325818583...
no matter where they're physically located.
[ 0.6448760628700256, 0.27164602279663086, 0.1793840229511261, 0.25648233294487, 0.38163647055625916, -0.08179868012666702, 0.24135318398475647, 0.33487385511398315, -0.07909345626831055, -0.17173151671886444, -0.2913241684436798, 0.35780611634254456, -0.03403257578611374, -0.038532491773366...
I'm using Chris Pederick's Firefox addon ["Web Developer 1.1.6"](http://chrispederick.com/work/web-developer/). I get this warning when hitting a certain web page on my site: > Unknown property 'MozOpacity'. Declaration dropped. What does this mean and how can I fix this on my site? It's customary for browsers to pr...
[ 0.3966343104839325, 0.47220852971076965, 0.11061567068099976, -0.17234574258327484, -0.022280177101492882, -0.04346960037946701, 0.41963258385658264, 0.05302438139915466, -0.4531847834587097, -0.43855488300323486, -0.09952422231435776, 0.5206058025360107, -0.39832958579063416, 0.0013146980...
the IE team, but then again IE is so behind the pack it probably never came up ;)
[ 0.1506361961364746, -0.20334096252918243, 0.3915126621723175, -0.08382336795330048, -0.19902606308460236, -0.30362945795059204, 0.42894691228866577, -0.20432162284851074, 0.12620575726032257, -0.4997483193874359, -0.14190690219402313, 0.5420003533363342, 0.040894895792007446, -0.3189538717...
I have to create a site definition for a client that must contain pre-defined web part pages. I can create the web part pages but am at a loss when it comes to attaching them to the site on creation. I know web part pages created through SharePoint are stored in a Document Library. Do I need to pre-populate a "Web Par...
[ 0.4191949665546417, 0.02327846735715866, 0.42609235644340515, 0.2215549349784851, 0.0281462874263525, 0.03655487298965454, 0.14338700473308563, 0.0040820566937327385, -0.23265492916107178, -0.7474013566970825, 0.03252526745200157, 0.471102237701416, 0.08014845848083496, 0.2157430201768875,...
page in onet? You can follow this methodology which uses Feature Stapling. I used this to automatically add web parts to My Sites when they are created: <http://blogs.msdn.com/sharepoint/archive/2007/03/22/customizing-moss-2007-my-sites-within-the-enterprise.aspx>
[ -0.037868682295084, -0.45604875683784485, 0.5581662654876709, -0.04802563413977623, -0.15203653275966644, 0.08891379088163376, 0.002481528092175722, -0.04854221269488335, -0.31940945982933044, -0.5504809021949768, 0.08954444527626038, 0.32692593336105347, -0.4967387616634369, -0.0015291258...
I recently stumbled across [this entry in the google testing blog](http://googletesting.blogspot.com/2008/08/by-miko-hevery-so-you-decided-to.html) about guidelines for writing more testable code. I was in agreement with the author until this point: > Favor polymorphism over conditionals: If you see a switch statement...
[ 0.6495322585105896, -0.12938183546066284, -0.6879872679710388, -0.020487502217292786, -0.28698453307151794, -0.103445865213871, 0.5472007989883423, -0.1460682898759842, -0.28055310249328613, -0.4267093241214752, 0.05353837087750435, 0.18702886998653412, -0.2421754002571106, 0.2304154187440...
around that. I can understand using polymorphism instead of RTTI (or DIY-RTTI, as the case may be), but that seems like such a broad statement that I can't imagine it actually being used effectively in production code. It seems to me, rather, that it would be easier to add additional test cases for methods which have s...
[ 0.8881432414054871, 0.08088085800409317, -0.5121127963066101, 0.18626737594604492, 0.08954434841871262, -0.2313283383846283, -0.032065097242593765, -0.15236976742744446, -0.28216665983200073, -0.15490928292274475, 0.03548818454146385, 0.5169787406921387, -0.44854623079299927, 0.11239229142...
it. Can someone explain to me exactly what is meant by this testing guideline? Actually this makes testing and code easier to write. If you have one switch statement based on an internal field you probably have the same switch in multiple places doing slightly different things. This causes problems when you add a new ...
[ 0.6192876696586609, -0.28013715147972107, -0.19884498417377472, 0.35353806614875793, 0.10649216175079346, -0.38731932640075684, 0.10874409973621368, -0.2523139715194702, -0.028372982516884804, -0.6089854836463928, 0.04034241661429405, 0.5440411567687988, -0.4167204797267914, 0.204816639423...
to be checked it is all isolated for each class. ``` class Animal { public: Noise warningNoise(); Noise pleasureNoise(); private: AnimalType type; }; Noise Animal::warningNoise() { switch(type) { case Cat: return Hiss; case Dog: return Bark; } } Noise Animal::p...
[ 0.16505904495716095, -0.28383785486221313, -0.14363180100917816, -0.41153761744499207, -0.013332271948456764, 0.1333511620759964, 0.2835163176059723, -0.4775673747062683, -0.002266091061756015, -0.46247944235801697, -0.2721934914588928, 0.7287201881408691, -0.7467026710510254, 0.2480316460...
case Dog: return Bark; } } ``` In this simple case every new animal causes requires both switch statements to be updated. You forget one? What is the default? BANG!! Using polymorphism ``` class Animal { public: virtual Noise warningNoise() = 0; virtual Noise pleasureNoise() = 0; }; class...
[ 0.015308871865272522, -0.04556306079030037, -0.08760730922222137, -0.17513993382453918, 0.24442973732948303, -0.12395942211151123, 0.32235634326934814, -0.4138134717941284, -0.2773008346557617, -0.46167874336242676, -0.2749377489089966, 0.734200656414032, -0.7249690890312195, 0.13634900748...
cat. }; ``` By using polymorphism you can test the Animal class. Then test each of the derived classes separately. Also this allows you to ship the Animal class (**Closed for alteration**) as part of you binary library. But people can still add new Animals (**Open for extension**) by deriving new classes derived...
[ 0.37375426292419434, -0.1674446165561676, -0.30902865529060364, -0.016908839344978333, 0.07932963222265244, -0.13326942920684814, 0.27174970507621765, -0.32210201025009155, -0.1730951964855194, -0.5350468158721924, 0.0404985286295414, 0.584654688835144, -0.6095969080924988, 0.1726233661174...
I'm looking into some possible options for unit testing C++ classes. So, short and to the point, what are you using? I'm using [cppunit](http://sourceforge.net/projects/cppunit). It is a pretty good port of the iconic JUnit to c++.
[ 0.22832190990447998, -0.3164360523223877, 0.03492505103349686, -0.08539513498544693, -0.2513881027698517, -0.09352622926235199, -0.18885718286037445, 0.40444573760032654, -0.2245190441608429, -0.615705132484436, 0.31021663546562195, 0.640022337436676, -0.20260530710220337, -0.1831314414739...
This was something originally discussed during a presentation given by Charles Brian Quinn of the [Big Nerd Ranch](http://www.bignerdranch.com/) at [acts\_as\_conference](http://www.actsasconference.com). He was discussing what he had learned from instructing a Ruby on Rails Bootcamp to many people both new to programm...
[ 0.39638811349868774, 0.22793421149253845, -0.3538280129432678, -0.2315138429403305, -0.21259817481040955, -0.2642762362957001, 0.5541375875473022, 0.06433188170194626, -0.23077765107154846, -0.39367246627807617, -0.013763881288468838, 0.26786813139915466, -0.37305086851119995, 0.1664192527...
to foo bar placeholders but then realize my mistake and make the example make a lot more sense by using a real world scenario. This is especially applicable when trying to teach someone who has had no programming exposure and you end up needing explain foo and bar before explaining what you're actually trying to teac...
[ 0.5067578554153442, 0.48676609992980957, -0.1630321443080902, 0.05560387670993805, -0.09733600914478302, 0.0038244083989411592, 0.3166801631450653, -0.0493258498609066, -0.003471112111583352, -0.2550995647907257, 0.04058689996600151, 0.6759084463119507, -0.16712896525859833, -0.23002766072...
comprehend. And in some cases where I'm reading a question on a particular language and I'm doing so to help understand that language better. If applicable variable names are used instead of foo and bar, it makes it much easier to understand and interpret the problem. So for seasoned developers, the construct seems a b...
[ 0.41606101393699646, 0.5136971473693848, -0.09718584269285202, 0.0767204761505127, -0.19063442945480347, -0.09133688360452652, 0.6718801259994507, -0.10951273888349533, 0.03730718046426773, -0.559018075466156, -0.03843344375491142, 0.6967988014221191, -0.23391534388065338, 0.11062566936016...
a few things just for the snippet to be "complete", and those few things are not the core of what you are showing. For example, if you want to show how to throw an exception, I believe it is ok to present a snippet like ``` public void foo() { // Do some things if (errorCondition) { throw new Exceptio...
[ 0.6003034114837646, 0.09355073422193527, -0.035596512258052826, 0.03239421918988228, -0.0520867221057415, -0.5036192536354065, 0.3090492784976959, 0.013631684705615044, -0.34436753392219543, -0.3002611994743347, -0.18682703375816345, 0.42190706729888916, -0.27630287408828735, -0.0790641158...
me. What I would not accept (in this same example) would be ``` public void foo() { // Do some things if (bar) { throw new Exception(baz); } } ``` as it is obscuring what you are trying to teach.
[ 0.5479329824447632, 0.2630128860473633, 0.012881447561085224, -0.4003222584724426, -0.08003205060958862, -0.23679891228675842, 0.4862920343875885, -0.11028917133808136, 0.06120017170906067, -0.5182042717933655, -0.20981426537036896, 0.4444386959075928, -0.5344511866569519, 0.46939566731452...
I'm wondering whether anyone here has ever used a [skip list](http://en.wikipedia.org/wiki/Skip_list). It looks to have roughly the same advantages as a balanced binary tree but is simpler to implement. If you have, did you write your own, or use a pre-written library (and if so, what was its name)? Years ago I impleme...
[ 0.2967829406261444, -0.1732611507177353, -0.2266823649406433, 0.14452502131462097, -0.22774744033813477, -0.0631001815199852, -0.1436426341533661, 0.0248047336935997, -0.7994401454925537, -0.3984730839729309, 0.2604941129684448, 0.027464469894766808, -0.3930521607398987, -0.333241432905197...
think the implementation is also simpler than binary tries in general. There is a nice discussion and some sample c++ code here: <http://www.ddj.us/cpp/184403579?pgno=1> There's also an applet with a running demonstration. Cute 90's Java shininess here: <http://www.geocities.com/siliconvalley/network/1854/skiplist.h...
[ 0.32480037212371826, -0.27074307203292847, -0.2353718876838684, 0.24133151769638062, 0.1959490031003952, 0.184738889336586, 0.1494537740945816, 0.1514589786529541, -0.35189884901046753, -0.37001940608024597, 0.03275260329246521, 0.34906983375549316, -0.051346566528081894, -0.28181478381156...
One problem that I come across regularly and yet don't have a solution to is to restrict or permit access to specific entities in a system. Some companies (banks, for example) have very strict policies regarding which employees may access certain information. For example, an employee at a specific branch may access acc...
[ 0.7626650333404541, 0.1894821971654892, 0.02098894491791725, 0.3110141456127167, 0.33455583453178406, -0.4983018636703491, 0.26705682277679443, 0.6113359332084656, -0.49017035961151123, -0.32633110880851746, 0.014507008716464043, 0.04294371232390404, -0.049925487488508224, 0.49825537204742...
users belong to a specific entity (such as a company) and may access information regarding that entity only and not other entities. If the number of entities is small and fixed, this is not a problem. Simply specify domain groups in the active directory (if you're working in Microsoft environments, which is the case f...
[ 0.3400961458683014, 0.36983901262283325, 0.1878972053527832, 0.010122121311724186, 0.15886813402175903, -0.2529377341270447, 0.07191432267427444, 0.2674681842327118, -0.30977863073349, -0.6818828582763672, 0.08326313644647598, 0.34037262201309204, -0.6222232580184937, 0.3576589822769165, ...
I'd make sure the user is a member of that group. This is not really the way the AD is intended to be used, but for a small number of entities I've found it reasonable. The complexity increases when the number of entities change often and when the requirements become more detailed. I've seen security requirements that...
[ 0.691045880317688, 0.34882456064224243, 0.3784305155277252, 0.08694091439247131, 0.13682417571544647, -0.1975104808807373, 0.027397625148296356, -0.24167604744434357, -0.11261122673749924, -0.551741361618042, -0.11039174348115921, 0.5637058019638062, -0.10374142229557037, 0.047588672488927...
avoid situations like these because they tend to be a nightmare to model and code and they usually become complex to administer, but the customers I work with often need solutions to this problem. Like I said, I have never actually solved this problem in a *good* way. How would you go about modeling and developing a s...
[ 0.6040315628051758, 0.26949888467788696, -0.32987749576568604, 0.26317763328552246, 0.20535998046398163, -0.0737135112285614, 0.4348064661026001, 0.3577432334423065, -0.6491096019744873, -0.3102372884750366, 0.3130737841129303, 0.43130800127983093, -0.2406967431306839, -0.03593694791197777...
hierarchy, where every domain class is an branch in the tree, and instances are leaves of that branch. Leaves can have veins if you need to secure parts of instances. Each branch has its own assigned actions (such as "Read", "Write", "Delete", "Publish"). Use the same hierarchy for security but the root then becomes a ...
[ -0.23018485307693481, -0.2915795147418976, 0.26149025559425354, 0.46370929479599, -0.0315772145986557, -0.17004245519638062, 0.3515565097332001, 0.087811678647995, -0.39188653230667114, -0.5636243224143982, -0.2884753346443176, -0.2112586796283722, -0.4054940938949585, 0.5219555497169495, ...
Person: actions (Read, Create, Update, Suspend) ``` and an office admin who can process forms and make new people: ``` <group> Office Administrator |- <class> Person: actions (Create) |- <class> FormX: actions (Approve, Deny) ``` and then John can do stuff with his own profile: ``` <user> John |- <class> Person |...
[ -0.10038464516401291, 0.11317293345928192, 0.11832399666309357, 0.12973657250404358, -0.04283377155661583, -0.0030833964701741934, 0.1295131891965866, -0.5286738872528076, -0.3369680941104889, -0.3864321708679199, -0.24646341800689697, 0.2468813955783844, -0.1593262106180191, -0.1833772808...
or other (I had `<group>`s - not security groups - in the domain above class for ease of maintenance). Its also important to include - though I did not illustrate it - that each action was a permission, not a boolean, where the permission values were `{ Allow, None, Deny }` with Allow granting access to that verb exce...
[ -0.11363255232572556, -0.14569702744483948, -0.0622650571167469, 0.28555476665496826, -0.26148855686187744, -0.12629728019237518, 0.5278577208518982, -0.19163429737091064, -0.46577581763267517, -0.056218165904283524, -0.40666463971138, 0.23410910367965698, -0.18574023246765137, -0.04088144...
same API. In my specific implementation I added custom metadata attributes to methods and properties and I had to invoke a `SecurityManager.Test` method in each "secured" function as a final layer of authorization (`SecurityManager.Test` was normally invoked to determine whether to show or hide pieces of a form, and d...
[ 0.6187910437583923, -0.09052940458059311, 0.28336039185523987, 0.103352390229702, 0.0953747034072876, -0.27304044365882874, 0.0071066939271986485, -0.525698721408844, -0.2026093304157257, -0.5114386081695557, 0.16533614695072174, 0.3285214304924011, -0.30661889910697937, -0.039763707667589...
in C# .net 2.0, is there a quick and easy way to retrieve a message (including its possible attachments) from exchange 2003 and save it to disk in .MSG (outlook) format. Thanks, I've had a lot of luck using [WebDav.NET](http://www.independentsoft.de/webdavex/index.html) to interact with exchange from C# code. You shou...
[ -0.156978577375412, 0.18189945816993713, 0.38618695735931396, -0.07257311791181564, 0.08837949484586716, -0.2917308211326599, -0.11810330301523209, 0.16247190535068512, -0.3444410562515259, -0.6359745860099792, 0.14281871914863586, 0.5804831385612488, -0.0025740042328834534, -0.51998299360...
I have been tasked to optimize some sql queries at work. Everything I have found points to using Explain Plan to identify problem areas. The problem I can not find out exactly what explain plan is telling me. You get Cost, Cardinality, and bytes. What do this indicate, and how should I be using this as a guide. Are l...
[ 0.10920590162277222, 0.08362014591693878, 0.21640492975711823, 0.5695072412490845, 0.001660764217376709, 0.13933426141738892, -0.10029367357492447, 0.08889542520046234, -0.20282632112503052, -0.6718639731407166, 0.25353381037712097, 0.5051233172416687, -0.05479893833398819, 0.0515196360647...
this [explain plan](http://www.oracle-base.com/articles/8i/ExplainPlanUsage.php) page. I'm assuming a little bit here that you are using Oracle and know how to run the script to display the plan output. What may be more important to start with is looking at the left hand side for the use of a particular index or not an...
[ 0.502103865146637, -0.028423309326171875, -0.08357489109039307, 0.31514424085617065, 0.05503995716571808, -0.2208128571510315, -0.17749708890914917, -0.10548229515552521, 0.109495148062706, -0.4702613055706024, 0.14655695855617523, 0.31351882219314575, -0.35097968578338623, -0.160466119647...
is not using an index you may get a very large cost. You may also want to read details about the [explain plan columns](http://www.cs.umbc.edu/help/oracle8/server.815/a67775/ch13_exp.htm).
[ 0.17939361929893494, -0.03857798129320145, 0.23956841230392456, 0.3780427873134613, 0.13748730719089508, -0.29069262742996216, 0.02900846116244793, -0.018895532935857773, -0.38979148864746094, -0.5484625697135925, -0.06468912959098816, 0.1101255789399147, -0.08732233941555023, -0.053032182...
We have a Procedure in Oracle with a SYS\_REFCURSOR output parameter that returns the data we want to bind to an ASP.NET GridView control. I've seen this done before but I can't find the original reference I used to solve the problem. Here is what the procedure looks like: ``` create or replace PROCEDURE GETSOMEDATA ...
[ -0.0010349077638238668, -0.11176816374063492, 0.358247309923172, 0.12100819498300552, -0.2143503874540329, -0.08453760296106339, -0.10779179632663727, -0.21573582291603088, -0.1434321105480194, -0.7238239645957947, -0.13675016164779663, 0.39902010560035706, -0.3439795970916748, 0.150237739...
Dim OrclConn as New OracleConnection("Connectionstring") Dim OrclCmd as New Oraclecommand("GETSOMEDATA", OrclConn) OrclCmd.CommandType = CommandType.StoredProcedure OrclCmd.Parameters.Add("P_Data", OracleType.Cursor).Direction = ParameterDirection.Output 'Or ParameterDirection.ReturnValue ...
[ -0.23268574476242065, -0.5408743023872375, 0.6639314889907837, -0.006558897905051708, -0.02503967098891735, -0.05316819250583649, -0.07203816622495651, -0.1768958866596222, -0.004200522787868977, -0.2001924365758896, -0.39208948612213135, 0.4332908093929291, -0.4134175777435303, 0.20440849...
End Function ```
[ -0.4068526327610016, 0.41112765669822693, 0.6725146770477295, -0.17919883131980896, -0.0032628984190523624, -0.34527266025543213, 0.13350555300712585, 0.29136183857917786, 0.4702033996582031, -0.23470176756381989, -0.5417158603668213, 0.5734140276908875, -0.24169832468032837, 0.46069028973...
I have a custom control that inherits from WebControl and implements IValidator, but I also want to have a property for ValidationGroup. From research, it appears I need to inherit from BaseValidator to do so. Can anybody provide a successfull example from a ASP.Net custom control that implements both BaseValidator and...
[ 0.11752698570489883, 0.14967846870422363, 0.3020528256893158, 0.0010190666653215885, -0.23653852939605713, -0.1131604015827179, 0.27322348952293396, -0.3057979345321655, -0.11285952478647232, -0.5531299710273743, 0.13508199155330658, 0.500831663608551, -0.22009679675102234, 0.0285976473242...
Which algorithm does the JavaScript `Array#sort()` function use? I understand that it can take all manner of arguments and functions to perform different kinds of sorts, I'm simply interested in which algorithm the vanilla sort uses. I've just had a look at the WebKit (Chrome, Safari …) [source](http://trac.webkit.org/...
[ -0.1700335144996643, -0.05503125488758087, 0.1491154134273529, -0.22716304659843445, -0.2588910758495331, 0.3669186532497406, 0.06624644994735718, -0.34326934814453125, -0.40599921345710754, -0.5488989353179932, -0.29807960987091064, -0.015068812295794487, -0.4876788258552551, -0.134925082...
if no merge sort is available. For other types (non-contiguous arrays and presumably for associative arrays) WebKit uses either [selection sort](http://en.wikipedia.org/wiki/Selection_Sort) (which they call [“min” sort](http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp?rev=138530#L6...
[ 0.048334285616874695, -0.21684420108795166, 0.15875816345214844, -0.14487025141716003, -0.13861405849456787, 0.36241820454597473, 0.09038261324167252, -0.24696692824363708, -0.42123943567276, -0.8853825330734253, -0.20202048122882843, 0.14674828946590424, -0.20386387407779694, -0.001569296...
“fixes” this has a better understanding of asymptotic runtime than the writer of this comment, and realises that [radix sort has a slightly more complex runtime description](https://stackoverflow.com/a/474040/1968) than simply O(N). (Thanks to phsource for pointing out the error in the original answer.)
[ -0.33239370584487915, 0.18746475875377655, 0.3379563093185425, -0.15864835679531097, 0.24447952210903168, 0.39915764331817627, 0.15009039640426636, -0.1822364181280136, -0.5655173659324646, -0.20336315035820007, -0.2677503228187561, 0.21013090014457703, -0.5194091200828552, -0.052834518253...
I was recently approached by a network-engineer, co-worker who would like to offload his minor network admin duties to a junior-level helpdesk tech. The specific location in need of management acts as an ISP for tenants on its single-site property, so there's a lot of small adjustments being made on a daily basis. I a...
[ 0.6351008415222168, -0.09564021229743958, 0.5607606172561646, 0.2230527102947235, 0.5737908482551575, 0.15384577214717865, 0.08118107169866562, -0.0921105444431305, -0.0414014607667923, -0.3096507489681244, -0.14649318158626556, 0.6791782379150391, -0.025123748928308487, -0.189301490783691...
valuable. **My initial thought was to emulate a telnet session** with the network device; utilizing my network-engineer's familiarity with the command-line / IOS interaction. Minimal time would be required to learn Cisco IOS conventions, myself. **Though while searching for solutions, it appears that most people favo...
[ 0.15196630358695984, -0.19689998030662537, 0.41040274500846863, 0.19623419642448425, 0.2552124261856079, -0.28977271914482117, 0.0447649322450161, 0.00169217714574188, -0.09863530844449997, -0.482331246137619, -0.08047407865524292, 0.672304630279541, 0.20555901527404785, -0.387176036834716...
a new config to a Cisco IOS device using a combination of SNMP and TFTP. But sending a whole new config is a pretty blunt instrument for controlling your router or switch). One of the other commenters mentioned the Cisco IOS XR XML API. It's important to note that the IOS XR XML API is only available on devices that ...
[ 0.23209860920906067, -0.27196162939071655, 0.8485010266304016, 0.1872110813856125, 0.19803184270858765, -0.2861213982105255, 0.03350798040628433, 0.05531183257699013, 0.022146575152873993, -0.5052657723426819, -0.32343339920043945, 0.4489031732082367, -0.5721133351325989, -0.10954289138317...
or HTTP (many Cisco routers, switches, AP, etc. have an optional web interface). But I'd recommend against either of those. To my knowledge, the web interface isn't very consistent across devices, and a rather surprising number of Cisco devices don't support SSH, or at least don't support it in the base license. Telne...
[ 0.3695620000362396, -0.3479895293712616, 0.3765670359134674, 0.34889715909957886, -0.007389321457594633, -0.2389315962791443, 0.16608667373657227, 0.5771450996398926, -0.07698526978492737, -0.7126673460006714, -0.16683736443519592, 0.6533077359199524, -0.2598133087158203, -0.13970243930816...
I would like to redirect `www.example.com` to `example.com`. The following htaccess code makes this happen: ``` RewriteCond %{HTTP_HOST} ^www\.example\.com [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] ``` But, is there a way to do this in a generic fashion without hardcoding the domain name? ``` RewriteEn...
[ 0.22142472863197327, 0.2921086847782135, 0.644826352596283, -0.24362890422344208, 0.06277288496494293, -0.037647951394319534, 0.364068865776062, -0.1933591216802597, -0.36382800340652466, -0.4866091012954712, 0.19895580410957336, 0.46897438168525696, -0.3272845447063446, 0.1605780869722366...
Good afternoon, This should be an easy one. I've done the cookie-cutter default ASP.NET 2.0 installation, but I have a couple of programming errors in my application. When I access the webpage on the server itself, I get a detailed ASP error message. However, when i try to run the same thing from a client machine, I ...
[ 0.30012473464012146, 0.11742943525314331, 0.4987723231315613, 0.033429574221372604, -0.19628523290157318, -0.33330240845680237, 0.41665133833885193, 0.0550633929669857, -0.26194077730178833, -0.5977840423583984, -0.09247102588415146, 0.6722541451454163, -0.04603920131921768, 0.069537185132...
detailed ASP.NET errors are shown to the remote clients and to the local host.
[ 0.1272355616092682, 0.07863350957632065, 0.1415872573852539, 0.08769389986991882, 0.19131530821323395, 0.14284829795360565, 0.3263327181339264, 0.060284413397312164, -0.2731943428516388, -0.4226468503475189, -0.003929907456040382, 0.5047821402549744, -0.08385498821735382, -0.31230157613754...
I was reading some 3rd party code and I found this: ``` x.Flags = x.Flags ^ Flags.Hidden; ``` What does it do? I've used '&' and '|' for bitwise 'and' and 'or' with enums, but it's the first time I see the that symbol... ^ is the bitwise XOR operator in C#. EDIT: a ^ b returns true if a is true and b is false or ...
[ 0.13224433362483978, -0.07353904098272324, 0.10183574259281158, -0.1188904270529747, -0.1825346052646637, -0.03271528333425522, 0.26606035232543945, -0.059729378670454025, -0.07460387796163559, -0.1606723666191101, -0.20084704458713531, 0.471426397562027, -0.35581615567207336, -0.079190053...
The TIBCO EMS user's guide (pg 292) says: > The backup server **will work indefinitely** to either A) become the > primary server or B) reconnect to the primary server. It also says > **clients may receive fail-over notification** when the switch is successful (see also TIBCO EMS .NET reference pg 220). I have some...
[ -0.08875942975282669, -0.11568190902471542, 0.7937714457511902, -0.16609765589237213, 0.16939640045166016, -0.17022238671779633, 0.5341225266456604, -0.20840229094028473, -0.34535324573516846, -0.7461601495742798, -0.2531951665878296, 0.6994377374649048, -0.30718815326690674, -0.0934750661...
fixed at this time? or do I need to get a new instance?) I hope the scenario is clear, any related information or advice would be appreciated too. I can at least answer #1 above. If you have enabled Tibems.SetExceptionOnFTSwitch(true); and have set up an exception handler to capture the messages the server sends to t...
[ 0.1992824226617813, -0.025743737816810608, 0.5227890014648438, -0.05676316097378731, 0.13056530058383942, -0.24162651598453522, 0.32863983511924744, 0.32112523913383484, -0.6316353678703308, -0.4790162146091461, -0.23170949518680573, 0.8319780826568604, -0.5835011601448059, 0.3266979753971...
answer is to allow the EMS library to handle as much as possible. Once we got the EMS reconnect functionality to work, it gracefully tried to reconnect until the server became available again and once it reconnected, it was like there was never a problem. The only gotcha is probably if you try to publish a message befo...
[ -0.1279376745223999, 0.10583379119634628, 0.43021562695503235, 0.4344409704208374, 0.03532848507165909, -0.47857001423835754, 0.4790427088737488, 0.17433956265449524, -0.009488901123404503, -0.6004282832145691, 0.17692255973815918, 0.6185750961303711, -0.29385533928871155, -0.0615027509629...
don't know is how do you tell when you've exhausted all reconnect attempts. Anyway, Seems like our two worlds are closely related when it comes to EMS - hope our findings (based on your comments on my questions) help you.
[ 0.575751543045044, -0.09978145360946655, 0.5521087646484375, 0.28999635577201843, 0.2649219036102295, -0.0410030223429203, 0.19947883486747742, 0.2157745212316513, 0.12718048691749573, -0.4376194477081299, 0.3249985873699188, 0.23461179435253143, 0.11274110525846481, 0.0823470950126648, ...
The situation is as follows: I've got 2 models: 'Action' and 'User'. These models refer to the tables 'actions' and 'users', respectively. My action table contains a column `user_id`. At this moment, I need an overview of all actions, and the users to which they are assigned to. When i use `$action->fetchAll()`, I onl...
[ -0.12681423127651215, -0.27111944556236267, 0.433948814868927, -0.2026076763868332, 0.00025101337814703584, 0.3901996612548828, -0.026707712560892105, -0.3439111113548279, -0.32992303371429443, -0.5185171365737915, 0.039567168802022934, 0.47980237007141113, -0.15660175681114197, -0.0998382...