text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
to... Is there a well-known procedure to move objects from one collection into another one in NHibernate? Thanks in advance for any help. Regards, Eric. I'm assuming that you are using Cascade in the mapping for the class represented by objects A and B, i.e., A and B are both instances of some class X, and X's mapp...
[ 0.14065195620059967, -0.1433686912059784, -0.22832880914211273, 0.34152767062187195, -0.1825990080833435, 0.010058165527880192, -0.0029487067367881536, -0.13811451196670532, -0.4782906174659729, -0.49873536825180054, 0.015003169886767864, 0.06281063705682755, -0.33184024691581726, 0.348119...
existence that is independent of the two collections. If the transfer object doesn't get saved on its own, you will run into problems when you do the transfer because the transfered object is already known to the session. There are two ways out that I can think of. The better of the two is probably to treat the tran...
[ 0.20878399908542633, 0.08028696477413177, -0.10116748511791229, 0.28185567259788513, -0.34648337960243225, -0.13322539627552032, 0.49314528703689575, 0.17058584094047546, -0.28118738532066345, -0.6946296095848083, 0.13880595564842224, 0.3985912799835205, -0.34425970911979675, 0.49874928593...
the other that implies that somehow it is independent of the two objects having the collections. It does mean that you could end up with orphans. If you want to stick with using cascade in the mappings, then you will need to remove from object A in a different transaction than the add to object B. I suspect that isn't...
[ 0.3367879092693329, -0.23900610208511353, -0.12874934077262878, 0.43633508682250977, -0.10077891498804092, 0.11073528975248337, 0.081961989402771, -0.4808441400527954, -0.4637012481689453, -0.4596572518348694, 0.431758850812912, 0.0725150853395462, -0.4670255184173584, 0.36907556653022766,...
I'm trying to create some dynamic scrollbars for a project I'm working on in Flash (ActionScript 3). I had written scrollbars a while ago in AS2, but I can't seem to sort out everything in my mind for AS3. Basically, I'm looking for a tutorial exactly like the one at <http://tutorials.parseidon.com/code-script/action...
[ 0.01609291508793831, -0.011927234008908272, 0.5370925664901733, -0.04298964887857437, -0.3925793170928955, -0.04928958788514137, 0.2867652475833893, 0.13911589980125427, -0.20809395611286163, -0.6500482559204102, 0.18494640290737152, 0.42579880356788635, -0.01013963483273983, -0.0345369838...
about that as well.
[ 0.3366185128688812, 0.2073243409395218, 0.05860843136906624, 0.02565057948231697, -0.02403685450553894, -0.06541229039430618, -0.08954400569200516, 0.11264588683843613, -0.06944733113050461, -0.060441840440034866, 0.18163570761680603, 0.19127850234508514, 0.0966978371143341, 0.120775699615...
It is second nature for me to whip up some elaborate SQL set processing code to solve various domain model questions. However, the trend is not to touch SQL anymore. **Is there some pattern reference or conversion tool out there that helps convert the various SQL patterns to Linq syntax?** I would look-up ways to code...
[ 0.6319532990455627, 0.2022598832845688, 0.11177743226289749, 0.12648341059684753, -0.39600640535354614, -0.16904717683792114, 0.17735743522644043, -0.1846921741962433, -0.3978663682937622, -0.21799999475479126, 0.07718147337436676, 0.3537985384464264, -0.0732390508055687, -0.02785194292664...
a debugger?** I know you need to follow the enumeration, but I would assume just lookup the patterns somewhere. This is from the MSDN site which is their example of doing a SQL difference. I am probably wrong, but I wouldn't think this uses set processing on the server (I think it pulls both sets locally then takes th...
[ 0.38282302021980286, 0.2241959124803543, 0.24379077553749084, 0.007399706169962883, -0.1967668980360031, 0.0117641007527709, 0.36028653383255005, -0.31586581468582153, -0.026848677545785904, -0.33376544713974, 0.04768528416752815, 0.40214356780052185, -0.6220437288284302, 0.373150676488876...
[Microsoft's 101 Linq Samples in C#](http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx) is a closer means of constructing linq in a pattern to produce the SQL you want. I will post more as I find them. I am really looking for a methodology (patterns or a conversion tool) to convert SQL to Linq. -- Update (sql from...
[ -0.014555673114955425, 0.1616182178258896, 0.5950841307640076, 0.07028740644454956, -0.1428656429052353, -0.03169763460755348, -0.11104431748390198, -0.3700686991214752, -0.0956713929772377, -0.32507750391960144, -0.029792120680212975, 0.40897873044013977, -0.34668731689453125, -0.20480281...
as a function template argument: ``` var myList = DataContext.ExecuteQuery<MyRow>( "select * from myview"); ``` The "row" class exposes the columns as public properties. For example: ``` public class MyRow { public int Id { get; set; } public string Name { get; set; } .... } ``` You can decorate t...
[ 0.2716219127178192, 0.1278933882713318, 0.5858245491981506, -0.14419038593769073, -0.09592606872320175, 0.06131816282868385, 0.10532527416944504, -0.4766515791416168, -0.17567361891269684, -0.5778045058250427, -0.12891903519630432, 0.30134183168411255, -0.24730396270751953, 0.2579135000705...
does generate breaks down for large databases. What linq to sql does very well is expose stored procedures to your client. For example: ``` var result = DataContext.MyProcedure(a,b,c); ``` This allows you to store SQL in the database, while having the benefits of an easy to use, automatically generated .NET wrapper....
[ 0.15155842900276184, 0.3625820577144623, 0.48631131649017334, 0.24814599752426147, -0.19077260792255402, -0.3332912027835846, 0.17681340873241425, -0.3198425769805908, -0.15495844185352325, -0.41018810868263245, 0.060255762189626694, 0.4462546110153198, -0.3194788694381714, 0.0159022901207...
``` CGFloat* colors = CGColorGetComponents(hsbaColor.CGColor); ``` Does this return a float, or an array of floats? It looks like the asterisk is shorthand for creating an array. Is that correct? When I call this function on the CGColor property of an HSB UIColor object does it convert the values to RGB? Yes, it ret...
[ 0.2127891182899475, 0.08442266285419464, 0.4809044599533081, -0.18183594942092896, -0.13774259388446808, -0.09981945157051086, -0.06668172031641006, -0.35595694184303284, -0.3720006048679352, -0.3408328890800476, -0.19862858951091766, 0.6482016444206238, -0.5200110077857971, -0.13584840297...
I'm developing a game for Android. It's got a lot going on but is running reasonably smoothly. That is, of course, until the user touches the screen. While they're touching it, `onTouchEvent` is called (with `action = ACTION_MOVE`, `x = 0` and `y = 0`) roughly once every ten milliseconds at what appears to be a fairly...
[ 0.0938119888305664, -0.06063377484679222, 0.8609153032302856, -0.268742173910141, 0.23025593161582947, 0.19368259608745575, 0.14178840816020966, 0.15734033286571503, 0.05260065197944641, -0.8704440593719482, -0.19384221732616425, 0.5726719498634338, -0.0652228593826294, -0.1214323714375495...
persists in all three situations. Has anyone encountered this? Is there a way to reduce the rate at which `ACTION_MOVE` events are generated, or to ensure that they're only generated when there is actual movement, or use a polling method that just gets the current location of the touch? Or even just a way to disable i...
[ 0.03183590993285179, -0.29699939489364624, 0.7842328548431396, -0.067864790558815, 0.30632808804512024, -0.2210724949836731, 0.3405778408050537, -0.07524082809686661, -0.7286221385002136, -0.2911149561405182, 0.24836938083171844, 0.4606165289878845, -0.4818404018878937, 0.08486922830343246...
On Linux with the GNU toolchain, I know how to control exported symbols from a shared library with a version script (gcc -Wl,--version-script=symbols.map), but I would like to list exported symbols on the command line instead. IOW, I would like the equivalent of ``` link /EXPORT:foo ``` from the MS toolchain. Is it...
[ -0.05704696848988533, 0.054006073623895645, 0.32802531123161316, -0.09844278544187546, -0.06444187462329865, -0.21138210594654083, 0.052633512765169144, 0.1666274517774582, -0.21903257071971893, -0.7468512654304504, -0.00048487831372767687, 0.770862877368927, -0.6103190779685974, 0.0638044...
-o libfoo.so -soname libfoo.so ``` I would like to be able to do something like this instead: ``` gcc -shared foo.c -Wl,--export-symbol=foo1 -Wl,--export-symbol=foo2 -o libfoo.so -soname libfoo.so ``` I'm not sure that you can do this like you want. One way is with the linker version script like you mentioned. Anot...
[ 0.03181389346718788, 0.2950809597969055, 0.3967696726322174, -0.2992345988750458, 0.06142885982990265, -0.3214566707611084, 0.172760009765625, 0.07201085239648819, -0.21534352004528046, -0.6475964784622192, -0.1907283216714859, 0.657626211643219, -0.48888564109802246, 0.1645440310239792, ...
I just create a Solution that contains 3 projects. *Order by build order* 1. **Silverlight Application** that is included in /ClientBin of ASP.NET Web Application project 2. **Windows Form Application** that is used to optimize all xap in /ClientBin when Visual Studio pass build (post-build event). 3. **ASP.NET Web A...
[ 0.7132421135902405, 0.1130177229642868, 0.4940510392189026, -0.07121298462152481, -0.32234424352645874, -0.13478116691112518, 0.4227629005908966, -0.5368163585662842, -0.1854248195886612, -0.8983762264251709, -0.15519078075885773, 0.44572851061820984, -0.24246294796466827, 0.21958877146244...
files from Silverlight application project to ClientBin directory again. Why? I can't find any log about copy Xap files after post-build event (by using MSBuild project build output verbosity: Diagnostic) ``` Target "PostBuildEvent" in file "C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets": Task "Ex...
[ 0.03475727140903473, 0.05701225623488426, 0.44186273217201233, -0.07836990058422089, -0.06465509533882141, 0.16618944704532623, 0.6077970266342163, -0.5214909911155701, -0.021427547559142113, -0.49825015664100647, -0.3294680118560791, 0.45287761092185974, -0.4013836681842804, 0.11692938953...
as ('false'=='true'). Done building target "CoreBuild" in project "Higgs.Web.UI.csproj". Target "AfterBuild" in file "C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets": Done building target "AfterBuild" in project "Higgs.Web.UI.csproj". Target "Build" in file "C:\Windows\Microsoft.NET\Framework\v3.5\Mic...
[ 0.47701743245124817, 0.19869451224803925, 0.6095163822174072, -0.20171324908733368, -0.014129165560007095, 0.1775527447462082, 0.8250312805175781, -0.6771754026412964, -0.4282684624195099, -0.690756618976593, -0.5887554883956909, 0.3069212734699249, 0.11918749660253525, 0.24445368349552155...
Everything works fine. But I don't like this solution because It's very strange solution for me. From the [documentation](http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Container.html#add(java.awt.Component,%20java.lang.Object)): ``` Note: If a component has been added to a container that has been displayed, valida...
[ 0.5098074078559875, 0.08532419800758362, 0.19912667572498322, -0.22646622359752655, -0.03474907949566841, -0.1946677416563034, 0.15761041641235352, -0.17847856879234314, -0.3227667212486267, -1.0472023487091064, 0.11305323988199234, 0.5529285073280334, -0.23518969118595123, 0.1555317491292...
I wonder why **Java** 5 and above provide a printf-style formatter using a static method in class String like this: ``` public static String format(String format, Object... args) ``` instead of ``` public String format(Object... args) ``` so that we can write `"%02d".format(5)` to get `05` instead of `String.for...
[ 0.051435258239507675, 0.3044826090335846, 0.12782850861549377, -0.14565925300121307, -0.08646051585674286, -0.12116768956184387, 0.087326779961586, -0.17389850318431854, -0.14295834302902222, -0.5273197889328003, -0.07025022059679031, 0.6406402587890625, -0.30620551109313965, 0.18386937677...
instance methods `trim` and `substring` returns a new instance of string, so they should have done the same thing with `format`. Moreover, the `DateFormat` class also uses this: ``` public final String format(Date date) ``` for formatting dates. So if we consider the instance of DateFormat as the formatter, an ins...
[ 0.09173748642206192, 0.1657705157995224, 0.2296307384967804, -0.011364944279193878, -0.02950322814285755, -0.4115530550479889, -0.08631917089223862, -0.017720883712172508, -0.1110493540763855, -0.5306031703948975, -0.03684912249445915, 0.5814028978347778, -0.11969533562660217, 0.4087380170...
this can be avoided by saying that a static method in the `String` class can be used to format a string, rather than making some implicit statement about all `String`s in general.
[ 0.0700182244181633, 0.00014903613191563636, -0.2570027709007263, 0.03452610969543457, -0.1661527454853058, -0.2377631962299347, 0.18901744484901428, 0.19498780369758606, -0.10845531523227692, -0.16913747787475586, -0.36841097474098206, 0.382763147354126, -0.33478251099586487, 0.19247829914...
I'm going to apologize ahead of time. I'm new to ASP.NET and MVC and don't yet grok the internals and flow of operations. I'm trying to get the [ASP.NET MVC Membershp Starter](http://mvcmembership.codeplex.com) Kit integrated into a site I'm developing to get OpenID support. I've worked through several issues, but I'm...
[ 0.11667994409799576, 0.25034764409065247, 0.4453745484352112, -0.2805268466472626, -0.27145400643348694, -0.4344681203365326, 0.5517544150352478, -0.18331031501293182, -0.4359947144985199, -0.5009256601333618, -0.04373019561171532, 0.40067753195762634, -0.4087352752685547, 0.32003441452980...
while rendering this form. Specifically, the section that throws the exception is: ``` <% using(Html.Form( "OpenID", "Login" )){ %> <fieldset class="MvcMembership"> <legend>Login</legend> <div><label for="openid_identifier">OpenID Url:</label> <% =Html.TextBox( "openid_identifier" )%></div> <div><% =Html...
[ -0.36515307426452637, 0.15638533234596252, 0.631534218788147, -0.3342871069908142, -0.09907028824090958, -0.18801411986351013, 0.3189210295677185, -0.33019155263900757, -0.26377278566360474, -0.6347988843917847, -0.6147734522819519, 0.3917797803878784, -0.21281152963638306, 0.3722961544990...
constraints) at System.Web.Routing.Route.GetVirtualPath(RequestContext requestContext, RouteValueDictionary values) at System.Web.Routing.RouteCollection.GetVirtualPath(RequestContext requestContext, RouteValueDictionary values) at Microsoft.Web.Mvc.FormExtensions.Form(HtmlHelper helper, String controllerName,...
[ -0.357668399810791, -0.1683594435453415, 0.8395141959190369, 0.12146268039941788, 0.03802017122507095, 0.5224073529243469, -0.023845184594392776, -0.6069703698158264, -0.2565882205963135, -0.7105021476745605, -0.395108699798584, 0.5248042345046997, -0.08070200681686401, 0.19870097935199738...
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System....
[ -0.5111689567565918, 0.08080852776765823, 0.7156082987785339, 0.0923028290271759, 0.032619331032037735, 0.6721387505531311, 0.17034438252449036, -0.4283846318721771, -0.1558157056570053, -0.8517832159996033, -0.37391337752342224, 0.41305914521217346, 0.04732958972454071, 0.3363138437271118...
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.views_openid_login_a...
[ -0.5242762565612793, 0.022560646757483482, 0.8464406728744507, -0.03940668702125549, -0.04265745356678963, 0.37447234988212585, 0.18084588646888733, -0.7209801077842712, -0.4687478244304657, -0.8966614603996277, -0.316272109746933, 0.5204318165779114, -0.11202584952116013, 0.40739688277244...
at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext...
[ -0.4117439091205597, -0.47672346234321594, 0.9226599335670471, 0.22090470790863037, -0.09415063261985779, 0.0004049819544889033, 0.10562829673290253, -0.47905445098876953, -0.5022828578948975, -0.6851750016212463, -0.45183664560317993, 0.49781814217567444, -0.30874621868133545, 0.351329714...
var errors = new List<string>(); var rememberMe = false; var openid = new OpenIdRelyingParty(); //### stage 1: display login form to user if( openid.Response == null && Request.HttpMethod != "POST" ) return View(); ``` Obviously, this isn't the complete the controller, but...
[ -0.18317443132400513, -0.6109353303909302, 0.6793295741081238, -0.22246471047401428, 0.06580883264541626, -0.22984252870082855, 0.35247987508773804, -0.23563675582408905, -0.18105971813201904, -0.673720121383667, -0.35646873712539673, 0.7661949992179871, -0.4874833822250366, 0.264133751392...
time `openid.Response` is null and the request method is `"POST"`. Where do I begin looking for the problem? It looks like it might have something to do with routing, but I'm not sure. Perhaps `"%02d".format(5)` seems to imply that the object on which the `format` method is being called is a format string. In this ca...
[ 0.11891461163759232, -0.05931287631392479, 0.37106892466545105, -0.08280018717050552, -0.11099281162023544, -0.3502325713634491, 0.26992863416671753, 0.12181087583303452, -0.14138741791248322, -0.7469057440757751, -0.05958252772688866, 0.5236984491348267, -0.15966738760471344, 0.5485595464...
implicit statement about all `String`s in general.
[ 0.06842385977506638, 0.0270285215228796, -0.16302283108234406, -0.0490717776119709, -0.5828078389167786, -0.2435375452041626, 0.46196916699409485, 0.1670137494802475, 0.18506263196468353, -0.25978997349739075, -0.25004398822784424, 0.45319223403930664, -0.40858879685401917, 0.0438826456665...
My sys admin has me working on a server with Plesk, which requires me to have a unique username/password for each MySQL database I create. This is very annoying, does anyone know how to create a universal username login? **Update 10 Jan 2014** Plesk 11.5 has such functional from the box: ![enter image description here]...
[ 0.16802431643009186, 0.19445551931858063, 0.4157562553882599, 0.025263797491788864, -0.15673649311065674, -0.07808848470449448, 0.29055649042129517, 0.2701627314090729, -0.3542652726173401, -0.8464894890785217, -0.049810439348220825, 0.4576348066329956, -0.20754492282867432, 0.403663456439...
same username for multiple batabases.
[ 0.13445018231868744, 0.07482804358005524, -0.22591504454612732, 0.1279451698064804, -0.6893991827964783, 0.264766663312912, 0.29104292392730713, -0.2808871567249298, -0.15596815943717957, -0.4329604506492615, 0.09729872643947601, 0.3681401014328003, -0.36820438504219055, -0.243957370519638...
This is referring to the question i asked before, and got a really quick answaer ([max count together in an sql query](https://stackoverflow.com/questions/751156/max-count-together-in-an-sql-query)). The Problemset is similar, but the solution in the prevous question would force me to access a db in a loop which will c...
[ 0.30634331703186035, 0.0352475605905056, 0.2768048644065857, -0.1807919442653656, -0.21488778293132782, -0.09991979598999023, 0.05575842037796974, -0.558218777179718, -0.4003106653690338, -0.19692887365818024, 0.1303008645772934, 0.3186659812927246, -0.633073627948761, 0.02687404863536358,...
... | ... ``` As u can see, now the id is not a primary key anymore. What i want is to get the most used description for each id in the resultset. It should look something like this: ``` id | most_popular_description | times_the_desc_appeared_for_an_id 0 | bla |
[ 0.17815518379211426, 0.18040521442890167, 0.6868206262588501, 0.09831102937459946, 0.017984163016080856, -0.1341191977262497, -0.06024982035160065, 0.036223698407411575, -0.17213520407676697, -0.6621167659759521, -0.040069758892059326, 0.30717694759368896, 0.024507353082299232, 0.356163948...
2 1 | blablub | 1 ... | ... |
[ -0.2167946845293045, -0.09387953579425812, 0.06379042565822601, -0.46662652492523193, -0.48370420932769775, -0.10817717015743256, 0.23691461980342865, -0.3956557810306549, 0.004060961306095123, -0.42369043827056885, -0.1839836686849594, 0.02997395023703575, -0.916900098323822, -0.230099007...
... ``` If you only want the most popular items, then I believe this should give you the result set you're looking for. There are other ways of doing this, but [stats\_mode](http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions154.htm) is the easiest way to obtain the "most prevalent" value in a gro...
[ 0.025698687881231308, 0.01456904225051403, 0.30249395966529846, 0.11487961560487747, -0.3249337673187256, -0.06055910885334015, 0.000263605616055429, -0.1262582391500473, -0.3662551939487457, -0.8450378179550171, -0.5284789800643921, 0.5228142738342285, -0.3070984482765198, 0.1892925649881...
BY t.id, t.description; ``` Note that the nested query (inline view) is necessary since you also want the count.
[ 0.33097776770591736, 0.15750689804553986, 0.1530546098947525, 0.01844371110200882, -0.01738915592432022, -0.11695598810911179, -0.021504996344447136, -0.31832361221313477, -0.09458291530609131, -0.41842004656791687, -0.25838571786880493, 0.6369989514350891, -0.46912530064582825, 0.05391959...
I am using Virtual PC 2007 with Windows xp Pro as the Guest. Is it possible to add the Virtual PC to the network of the guest PC and to the domain of the Guest PC? I enabled NAT shared networking but that only allows internet access on the guest.. Thanks This shouldn't be a problem when you add the guest to host's phy...
[ 0.07460737973451614, -0.1361323446035385, 0.5515289902687073, 0.17123672366142273, -0.18638400733470917, -0.3172857165336609, 0.1653309464454651, 0.12739741802215576, -0.10971871018409729, -0.5584521293640137, 0.00748421298339963, 0.9947901964187622, -0.10611864179372787, 0.384744971990585...
to VMWare's Bridged Mode). That way, the guest will appear as a real computer on your network, and will work like a physical box on the network. IIRC, MS VPC bypasses the default Windows firewall on the host, so only the guest's firewall applies; for other FW products, you may need to enable something like "permit pac...
[ 0.02407914772629738, -0.2306998074054718, 0.8256427645683289, 0.11347987502813339, 0.22579601407051086, -0.3924586772918701, 0.3962935507297516, -0.20327411592006683, -0.3940196931362152, -0.5679452419281006, -0.5114964842796326, 0.3101235330104828, -0.40875759720802307, 0.4295144677162170...
I'm getting totally lost in shell programming, mainly because every site I use offers different tool to do pattern matching. So my question is what tool to use to do simple pattern matching in piped stream. context: I have named.conf file, and i need all zones names in a simple file for further processing. So I do ~$ ...
[ 0.22215698659420013, -0.004145284648984671, -0.04700089618563652, -0.04846189171075821, 0.20682105422019958, -0.21199798583984375, 0.38077160716056824, 0.5457311868667603, 0.019242536276578903, -0.9293401837348938, -0.0013668216997757554, 0.23644521832466125, -0.12040091305971146, 0.345699...
it's a **s**tream **ed**itor which will let you do replacements on a line-by-line basis. As you're explaining it, the command `cat named.local | grep zone' gives you an output a little like this: ``` zone "domain1.tld" { zone "domain2.tld" { zone "domain3.tld" { zone "domain4.tld" { ``` I'm guessing you want the ou...
[ 0.11105640977621078, -0.18696172535419464, 0.3816405236721039, 0.03389790654182434, -0.07182405143976212, -0.05950184911489487, 0.05426822230219841, 0.2558174729347229, -0.3536011874675751, -0.5119445323944092, -0.19991172850131989, 0.5465881824493408, -0.31779682636260986, -0.069801539182...
expression `/.o.e/` would match any line where there's a word with the 2nd letter was a lower-case `o`, and the 4th was `e`. This would match string containing words like "`zone`", "`tone`", or even "`I am tone-deaf.`" The trick there was to use the `.` (dot) character to mean "any letter". There's a couple of other s...
[ 0.10414410382509232, 0.003566926345229149, 0.4527800381183624, 0.05407451465725899, -0.31739863753318787, 0.017223702743649483, 0.41481295228004456, 0.18059462308883667, -0.07963567972183228, -0.3545486629009247, -0.3928030729293823, 0.49058133363723755, -0.06932796537876129, -0.1439534723...
about `sed` (and by the comments, you already do!) - it allows *backtracking*. Once you've told it how to recognize a word, you can have it use that word as part of the replacement. For example, let's say that you wanted to turn this list: ``` Billy "The Kid" Smith Jimmy "The Fish" Stuart Chuck "The Man" Norris ``` ...
[ 0.8461880683898926, 0.1372232586145401, -0.2570277452468872, 0.12782584130764008, 0.24960903823375702, -0.13310383260250092, 0.04022461175918579, 0.4136700928211212, 0.0423906035721302, -0.4939778447151184, 0.0913800299167633, 0.5930987596511841, -0.2456541508436203, 0.20158430933952332, ...
underscore, we'd do a replace: `s/"(.*)"/_/`, and that would leave us with: ``` Billy _ Smith Jimmy _ Stuart Chuck _ Norris ``` But we have backtracking! That'll let us recall what was inside the parens, using the symbol `\1`. So if we do now: `s/"(.*)"/\1/` we'll get: ``` Billy The Kid Smith Jimmy The Fish Stuart ...
[ 0.37765124440193176, 0.26501429080963135, -0.040728382766246796, -0.05259856954216957, 0.16855588555335999, 0.20576077699661255, 0.054218076169490814, 0.7592357397079468, -0.05084102973341942, -0.22755686938762665, -0.01816617138683796, 0.46197643876075745, -0.40333837270736694, 0.32856994...
use `s/^.*"(.*)".*$/\1/`, we'll get: ``` The Kid The Fish The Man ``` Why? Let's read the regular expression `s/^.*"(.*)".*$/\1/` from left-to-right: * `s/` - Start a **substitution** regular expression * `^` - Look for the beginning of the line. Start from there. * `.*` - Keep going, reading every character, until...
[ 0.13393262028694153, -0.07550999522209167, 0.2868148684501648, 0.07462387531995773, 0.17147409915924072, 0.26677554845809937, 0.09209264069795609, 0.3242112398147583, -0.05641345679759979, -0.689751148223877, -0.5591323375701904, 0.4731201231479645, -0.11948157101869583, -0.068563424050807...
the line! * `/` - use what's after this to replace what you matched * `\1` - paste the contents of the first group (what was in the parens) matched. * `/` - end of regular expression In plain English: "Read the entire line, copying aside the text between the double-quotes. Then replace the entire line with the content...
[ 0.10028959810733795, -0.017683276906609535, 0.38468465209007263, -0.029508933424949646, -0.11512121558189392, 0.3906858265399933, 0.29243868589401245, 0.21389555931091309, -0.022328434512019157, -0.3625907003879547, -0.5741844773292542, 0.572783350944519, -0.3385070264339447, 0.02145220339...
double-quotes and slashes and stuff.) So the whole command would be something like: ``` cat named.local | grep zone | sed -e "s/^.*\"\(.*\)\".*$/\"\1\"/" ```
[ -0.0990629568696022, -0.23895707726478577, 0.4596222937107086, -0.027923988178372383, 0.14144012331962585, 0.05137278512120247, 0.23567835986614227, 0.35803601145744324, -0.18670253455638885, -0.42484137415885925, -0.4917988181114197, 0.1574704647064209, -0.5249682068824768, 0.238707542419...
i have written a java program which currently runs as a desktop app, it is returning all results accurately as required in the console. I am now faced by a challenge to convert this application to a web application (JSP). Currently, the code for my projects is in user/workspace (as i am using eclipse) and my tomcat...
[ 0.6159848570823669, 0.3915068209171295, 0.23429378867149353, -0.1820995807647705, 0.025470128282904625, -0.08186616003513336, 0.18823587894439697, 0.10162557661533356, -0.27218058705329895, -0.7077149748802185, 0.015629557892680168, 0.6312973499298096, 0.027954062446951866, 0.1607057899236...
the jsp file? havent done it before so its as confusing as hell. it will be most helpful if you can point me in the right directon, or even provide some links so that I can use thm as a pointer Many Thanks in Advance. I suggest not to use the JSP technology anymore unless you have to (-> customer demands it). Instea...
[ 0.38868507742881775, -0.014499043114483356, 0.3094851076602936, 0.31899914145469666, -0.3337748944759369, -0.37352943420410156, 0.1731230914592743, 0.4275408089160919, -0.11301498115062714, -0.4307548701763153, -0.12524329125881195, 0.7481783032417297, -0.28861117362976074, -0.213036388158...
much more simple to understand as a .Net developer.
[ 0.06755154579877853, -0.1164286732673645, -0.14971081912517548, 0.20658867061138153, -0.36938557028770447, -0.2718977630138397, -0.14903241395950317, 0.09521588683128357, -0.06778189539909363, -0.6024763584136963, -0.026717161759734154, 0.4352157413959503, 0.04790351912379265, 0.0874180570...
I was wondering, I want to plant a JS tracking code (analytics) in a few websites to track their traffic. But I don't want that when viewing the site's source code people will be able to see that I've embedded the JS tracking code there. Is it possible? Maybe by using an Apache/PHP trick? Thanks, Roy. Nope it's not...
[ 0.8222241401672363, 0.2688099145889282, 0.11081872135400772, 0.33370721340179443, 0.10946596413850784, -0.2680600583553314, 0.5049219727516174, 0.45229998230934143, -0.340440958738327, -0.20337414741516113, 0.34001120924949646, 0.31718724966049194, -0.24344895780086517, -0.1812100112438202...
so anyone can use those to see anything you've attempted to load discretely. The more important question is why you want to hide that you're tracking people?
[ 0.6032937169075012, -0.052425943315029144, -0.2939676344394684, 0.45022812485694885, 0.08089381456375122, -0.3906055986881256, 0.06515360623598099, -0.14141809940338135, -0.7669573426246643, -0.13167887926101685, 0.3183932304382324, 0.41902604699134827, -0.044832292944192886, -0.2233866155...
I face a few problems when I use svn. Here is a list * at some point in time, all my commands like svn commit, svn add, etc worked, but I did something so that none of them would work without running them as root user (sudo). what specific actions would cause this, and how to fix it? * my other website created an imag...
[ 0.13314400613307953, -0.20546798408031464, 0.43361496925354004, -0.0014994459925219417, -0.42896920442581177, 0.06489383429288864, 0.5356259942054749, 0.025095077231526375, -0.44627711176872253, -0.6764358282089233, 0.17681963741779327, 0.31310099363327026, -0.35840722918510437, 0.28441721...
the image s folder were locked, and i needed to run cleanup. The cleanup also failed. Also it started showing the images directory with a '~' (tilde) implying that it was versioned at some point but something happened to it. I fixed the 'cant commit till break locks'-and-'cant break locks' cyclic problem as follows: +...
[ 0.2170262634754181, 0.04678444191813469, 0.6574583649635315, 0.11380492150783539, -0.07871183007955551, 0.05736715346574783, 0.38120347261428833, -0.17304877936840057, -0.3267926871776581, -0.36857157945632935, -0.09567134827375412, 0.41593503952026367, -0.34339046478271484, 0.375170171260...
above two cases. i suspect that in case 1, the problem had something to do with messed-up folder permissions, but I dont know exactly what, and how to fix it. I suspect I could take one of the following steps for folders that dont have the appropriate owners/groups set: * try to do 'sudo add folder\_with\_different\_u...
[ 0.21115583181381226, 0.08679948002099991, 0.3459790349006653, 0.0512964203953743, 0.022300470620393753, -0.15400636196136475, 0.2587161660194397, -0.25086018443107605, -0.22089076042175293, -0.7118428945541382, 0.03549981862306595, 0.7473137378692627, -0.19936758279800415, -0.2352391183376...
to use svn in each of the above cases, and how to successfully break locks etc when something like this happens? What you describe are permission problems, not SVN problems. I suggest to learn about Unix file permissions and what they mean, for example [here](http://www.dartmouth.edu/~rc/help/faq/permissions.html). If...
[ 0.5683542490005493, 0.0802140012383461, 0.13300682604312897, 0.31015175580978394, -0.16483598947525024, -0.5395028591156006, 0.30622079968452454, -0.19550347328186035, -0.3851880729198456, -0.44669395685195923, -0.1715463250875473, 0.609790563583374, -0.14160172641277313, 0.102620460093021...
Drawing on a `QPicture` should update its bounding rect. Like this: ``` >>> picture = QPicture() >>> painter = QPainter(picture) >>> picture.boundingRect() QRect(0,0,0,0) >>> painter.drawRect(20,20,50,50) >>> picture.boundingRect() QRect(20,20,50,50) ``` But if I draw text on it, the bounding rect isn't updated: ``...
[ -0.06545723229646683, -0.2861343026161194, 0.9982910752296448, -0.08004190027713776, -0.2683037221431732, 0.05320426821708679, 0.029798561707139015, -0.28687429428100586, -0.13532212376594543, -0.8408377170562744, 0.10280435532331467, 0.5523952841758728, -0.5645034313201904, -0.16116942465...
rectangle in the first argument's position): > Draws the given text within the > provided rectangle according to the > specified flags. The boundingRect (if > not null) is set to the what the > bounding rectangle should be in order > to enclose the whole text. [QPainter.drawText (1)](https://doc.qt.io/qt-4.8/qpainter...
[ -0.19899654388427734, -0.2831031084060669, 0.7714530229568481, -0.05942155048251152, -0.27705320715904236, 0.010420185513794422, -0.1789754182100296, -0.48329129815101624, 0.024337299168109894, -0.7506409287452698, -0.6290981769561768, 0.3967883884906769, -0.5109025239944458, -0.1899326294...
tells you > where the drawText() function will > draw when given the same arguments. > > > If the text does not fit within the > given rectangle using the specified > flags, the function returns the > required rectangle. [QPainter.boundingRect](https://doc.qt.io/qt-4.8/qpainter.html#boundingRect) I linked to Boundi...
[ 0.04795261099934578, 0.06773610413074493, 0.763757586479187, -0.05135272815823555, -0.044779084622859955, -0.2317294478416443, 0.29062819480895996, -0.2520136535167694, 0.47320836782455444, -0.7291666269302368, -0.32337990403175354, 0.5893495678901672, -0.5561999082565308, -0.0860857218503...
like Qt) and in addition, you have to specify alignment flags before you get a bounding rectangle given back to you. (I even included the p.end() as per Aaron Digulla's comment): ``` pic = Qt.QPicture() p = QtGui.QPainter(pic) brect = p.drawText(10,10,200,200, QtCore.Qt.AlignCenter, "blah") p.end() print brect print p...
[ 0.07589513063430786, -0.17773637175559998, 0.696058452129364, 0.021044738590717316, -0.1790921539068222, 0.2130085825920105, -0.18683692812919617, -0.5799978971481323, -0.18398511409759521, -0.5833579897880554, -0.13462167978286743, 0.3161994516849518, -0.4019796550273895, 0.08138479292392...
I hope someone else has the answer you're looking for, but I suspect you may want to report this bug.
[ 0.5494070649147034, 0.2216765135526657, -0.1710168719291687, 0.24318067729473114, 0.3262466490268707, -0.4791649878025055, 0.3852178752422333, 0.7222193479537964, -0.336991548538208, -0.23646661639213562, 0.04295485466718674, 0.06344161927700043, -0.030258867889642715, 0.1869061440229416, ...
On the current website I'm working on, I've got a directory of files for users to download which would be really nice to have some security method other than obscurity ;) I was wondering if there's any way to supply login information via PHP to htaccess as though a user were entering it. Alternately, if anyone knows ...
[ 0.4892667233943939, 0.20399414002895355, 0.2156348079442978, 0.2713087201118469, 0.15359756350517273, -0.12480282783508301, 0.2840404808521271, 0.4120638072490692, -0.3733987510204315, -0.5872204303741455, 0.2749558091163635, 0.4367932379245758, -0.015261606313288212, 0.13419921696186066, ...
best guess at doing it exclusively with PHP is to store files above the web root, then copy them to a web accessible folder temporarily, but this seems highly inefficient and I couldn't think up any way to remove them after the download has finished. Note: I don't own the server this is running on and don't have ssh a...
[ 0.3962307870388031, -0.1165003702044487, 0.27640339732170105, 0.10009898990392685, -0.014536666683852673, -0.18210341036319733, 0.46968817710876465, 0.08570745587348938, -0.31828221678733826, -0.46979501843452454, 0.0023221364244818687, 0.64069002866745, -0.12759806215763092, 0.07403624802...
this method you can put your files in protected (with .htaccess) directory so you can be sure that nobody who isn't authenticated can access them.
[ 0.19654542207717896, -0.10359247773885727, 0.2671635150909424, 0.37265512347221375, 0.3941792845726013, -0.672304630279541, 0.3275957703590393, -0.16884955763816833, -0.31335657835006714, -0.425620973110199, -0.08306975662708282, 0.419784814119339, 0.019880386069417, 0.16879954934120178, ...
I'm trying to design a layout with css, I got one main container(div) and two inner container(div\_upper and div\_lower). let say I want to resize div\_upper and div\_lower will automatically resize itself and both divs still fit in the main container. I'm sure this can be done in javascript, but is there any CSS to ac...
[ 0.4532569646835327, -0.02444617450237274, 0.3244631588459015, -0.0006373740034177899, -0.06384114921092987, 0.1751130372285843, 0.19123734533786774, -0.06220298632979393, -0.052667319774627686, -0.8590908050537109, 0.09647911787033081, 0.4765039086341858, -0.3178251385688782, 0.08390001207...
I've just come across a pattern I've seen before, and wanted to get opinions on it. The code in question involves an interface like this: ``` public interface MyCrazyAnalyzer { public void setOptions(AnalyzerOptions options); public void setText(String text); public void initialize(); public int getOcc...
[ 0.2509765625, -0.27763131260871887, 0.20659680664539337, 0.22214694321155548, 0.060391899198293686, -0.12603992223739624, 0.24604789912700653, -0.3375556170940399, -0.2462346851825714, -0.4033757746219635, -0.1809927225112915, 0.39067989587783813, -0.5529181957244873, 0.18286088109016418, ...
might want to do after doing the same expensive analysis on the data, but this can be refactored to a result class. Why I think this is so bad: the implementation is storing state in a way that isn't clearly indicated by the interface. I've also seen something similar involving an interface that required to call "prep...
[ 0.004466950427740812, -0.18349076807498932, 0.046105194836854935, 0.17670337855815887, -0.09850440919399261, -0.19589795172214508, 0.46356070041656494, -0.19944824278354645, -0.09524109959602356, -0.8824977278709412, -0.05733659490942955, 0.42317745089530945, -0.09200795739889145, -0.14506...
could have multiple implementations. I suppose anything related to including a "close" method that must be called is justified, since there isn't any other reasonable way to do it. In some cases, like JDBC, this is a consequence of a leaky abstraction, but in the two pieces of code I'm thinking of, it's pretty clearly ...
[ 0.4013194143772125, 0.24803732335567474, -0.007489405572414398, 0.05995213985443115, -0.2209577113389969, -0.23678231239318848, 0.39340195059776306, -0.2564775049686432, -0.04514583572745323, -0.6117647290229797, 0.17519670724868774, 0.29881513118743896, -0.5451676845550537, 0.203542008996...
only seem wrong to me because I have a preference for functional style and immutability? If this is common enough to deserve a name, I suggest the "Secret Handshake" anti-pattern for an interface that forces you to call multiple methods in a particular order when the interface isn't inherently stateful (like a Collect...
[ 0.4666992723941803, -0.07858434319496155, 0.28279271721839905, -0.008546918630599976, -0.17512530088424683, 0.11193334311246872, 0.14078424870967865, -0.2598421275615692, -0.10235980898141861, -0.38970184326171875, 0.02582288160920143, 0.3882400095462799, -0.5812796354293823, 0.29223105311...
I have an intranet application with several modules, I want them to separate when routing. For example: ``` http://intranet/calendar/... http://intranet/site_admin/... http://intranet/tasks/... ``` Each of module can have many or single controller. How to write such routes? You can try using namespaces: ``` map....
[ 0.2524084150791168, -0.006408095825463533, 0.3428891897201538, 0.17990019917488098, -0.13845424354076385, 0.050378136336803436, -0.04299662262201309, -0.0019312574295327067, -0.18308889865875244, -1.1002964973449707, 0.19004511833190918, 0.3338943421840668, -0.17690791189670563, 0.13197453...
I'm setting up a SQL Server 2008 server on a production server, which way is the best to backup this data? Should I use replication and then backup that server? Should I just use a simple command-line script and export the data? Which replication method should i use? The server is going to be pretty loaded so I need a...
[ 0.09563824534416199, 0.3504788875579834, 0.35900819301605225, 0.2518340051174164, -0.16000548005104065, -0.014861611649394035, -0.004537026863545179, 0.044848617166280746, -0.19265884160995483, -0.599337100982666, 0.3940791189670563, 0.4977104663848877, -0.25409215688705444, 0.241595596075...
"rails namespace".
[ 0.08681200444698334, -0.08007879555225372, -0.22799940407276154, 0.012413582764565945, 0.17978337407112122, -0.23006299138069153, 0.20457595586776733, 0.14780795574188232, -0.001549515756778419, -0.6261671781539917, -0.2531803250312805, 0.043630678206682205, -0.09497330337762833, 0.0411517...
I'm adding functionality to one of our existing (but broken) systems. It grabs an XML file from a web service, parses it and then does some stuff before packing it back into our database. the previous developer (who has now left) left me this little gem: <http://dl.getdropbox.com/u/109069/wut.GIF> and I wonder if th...
[ 0.3823019862174988, -0.09613341838121414, 0.4468555748462677, 0.048597078770399094, 0.11640886962413788, -0.133305624127388, 0.1818273663520813, -0.09162451326847076, -0.33756738901138306, -0.6152368783950806, 0.11693327873945236, 0.332457959651947, -0.09327595680952072, 0.3066339194774627...
property name of the current node //match to the property in the workorder class //set the value equal wo.<xn.name> = xn.innertext } ``` Now the only thing I found which gets close is this (from the interweb): ``` foreach (XmlNode xl in myXML) { object o = ...
[ -0.25256314873695374, -0.02994614839553833, 0.5878094434738159, -0.1869896650314331, 0.21224965155124664, -0.13414323329925537, 0.17817075550556183, -0.18610525131225586, 0.023939644917845726, -0.7852748036384583, -0.2237030416727066, 0.3193863332271576, -0.016826454550027847, 0.3728791475...
Type t = xl.Name.GetType(); PropertyInfo pi = t.GetProperty(xl.Name); pi.SetValue(o, xl.InnerText, null); } ``` but it returns a null reference exception on o. I am a little confused, any tips? I presume to do this, I need to use reflection or generics, but I've never hit upon these things befor...
[ 0.4704497754573822, 0.2592523396015167, 0.3617936372756958, 0.07661710679531097, -0.20360320806503296, -0.14808815717697144, 0.4495941400527954, 0.03666442632675171, 0.31364578008651733, -0.6146812438964844, 0.03524085879325867, 0.6001822352409363, -0.0828152522444725, 0.057589203119277954...
go to Fredrik and Rytmis - both of you are white knights in my drab office environment. Rytmis' code edits have solved the issue but I have learned much in this hour or so - Thanks guys, really appreciate it. I think your code may need a bit of adjustment. ``` foreach (XmlNode xl in myXML) { object o = Assembly.G...
[ 0.46946948766708374, 0.2780441641807556, 0.4975016117095947, 0.11015208810567856, 0.1163739413022995, -0.11002111434936523, 0.23684626817703247, -0.4761720895767212, -0.07523608207702637, -0.6204906105995178, -0.3331340253353119, 0.7200156450271606, -0.028542885556817055, 0.229458525776863...
from Name.GetType() which is actually typeof(String), and not typeof(WorkOrder) like you'd want it to be. Instead: ``` WorkOrder w = new WorkOrder(); Type t = typeof(WorkOrder); foreach (XmlNode xl in myXML) { PropertyInfo pi = t.GetProperty(xl.Name); pi.SetValue(w, xl.InnerText, null); } ``` [edit] You may ...
[ 0.4306105077266693, -0.1617409884929657, 0.5730624794960022, -0.10274101793766022, 0.027421439066529274, -0.2308724969625473, 0.1042913869023323, -0.5762143731117249, 0.01401538122445345, -0.610080897808075, -0.4053357243537903, 0.6419315338134766, -0.4456348717212677, 0.35036855936050415,...
Is the last comma required in a C enum declaration? i.e. is the comma after `VAL3` required? ``` enum { Val1, Val2, Val3, } someEnum; ``` Are there any side-effects of leaving it in/out Thanks It's not required. Section `6.7.2.2` of C99 lists the syntax as: ``` enum-specifier: enum identifieropt { enumerator...
[ 0.04430655762553215, 0.07413829118013382, 0.576713502407074, -0.3266327977180481, 0.013523319736123085, 0.0779726579785347, -0.03700408712029457, -0.08227995038032532, -0.19559027254581451, -0.1179126501083374, -0.8270244002342224, 0.6532000303268433, -0.14712947607040405, -0.3270543813705...
using it is in things like: ``` enum { Val1, Val2, Val3, } someEnum; ``` where, if you want to add in (for example) `Val4` and `Val5`, you just copy and paste the `Val3` line without having to worry about adjusting commas. It can also be to simplify automated code generators so that they don't have to h...
[ 0.004247129894793034, -0.051464326679706573, 0.300285667181015, -0.15279163420200348, -0.08931733667850494, 0.10286881029605865, -0.08767064660787582, -0.008249553851783276, -0.13541866838932037, -0.5222764611244202, -0.2565230131149292, 0.5717494487762451, -0.07051607966423035, -0.1052605...
there only so that you don't have to put a `where` before your first clause and an `and` before each subsequent one. You can just rely on the fact that the `where` is already there and just use `and` for all the ones you add. Some people may think this reeks of laziness and they're right, but that's not necessarily a ...
[ 0.3604937493801117, 0.015676040202379227, 0.11023706942796707, 0.09164908528327942, 0.13622072339057922, -0.4513198137283325, 0.29917111992836, 0.22315049171447754, 0.011031413450837135, -0.24967065453529358, -0.4388415515422821, 0.46554747223854065, -0.29966095089912415, 0.159936949610710...
I want to make a web service that runs other people's code locally. Naturally, I want to limit their code's access to a certain "sandbox" directory, so that they won't be able to connect to other parts of my server (DB, main webserver, etc.) What's the best way to do this? **Run VMware/Virtualbox:** * + I guess it's...
[ 0.6251925826072693, 0.30844205617904663, 0.08160252124071121, 0.08311230689287186, 0.162669837474823, -0.11580310016870499, 0.3097250461578369, -0.00670330785214901, -0.21869702637195587, -0.7269831895828247, 0.06416503340005875, 0.5892196297645569, -0.22882528603076935, 0.2382895499467849...
the host to the guest * - Wasting extra memory and CPU for managing the VM **Run underprivileged user:** * + Doesn't waste extra resources * + Sandbox directory is just a plain directory * ? Can't limit CPU and memory? * ? I don't know if it's secure enough **Any other way?** Server running Fedora Core 8, the "othe...
[ -0.06771979480981827, -0.026806451380252838, 0.41854050755500793, 0.09657222777605057, 0.03584287688136101, -0.2119530737400055, 0.3444160223007202, -0.2774030864238739, -0.3428405523300171, -0.5141783356666565, -0.16644223034381866, 0.585349440574646, -0.2708810567855835, 0.31277734041213...
my opinion, allowing running native code on your system in the first place is not a good idea from security point of view. Maybe you should reconsider allowing them to run *native* code, this will certainly reduce the risk.
[ 0.631811261177063, 0.39933425188064575, -0.46263986825942993, 0.19142720103263855, -0.06625623255968094, -0.22348852455615997, 0.6569743156433105, 0.3789438009262085, 0.002645369153469801, -0.5368679761886597, 0.1634870320558548, 0.46966543793678284, -0.08845509588718414, 0.243224754929542...
I need to sort a list of UK postcodes in to order. Is there a simple way to do it? UK postcodes are made up of letters and numbers: see for full info of the format: <http://en.wikipedia.org/wiki/UK_postcodes> But my problem is this a simple alpha sort doesn't work because each code starts with 1 or two letters let...
[ 0.2506219744682312, 0.39657944440841675, 0.3028188943862915, -0.3221411108970642, -0.3721175789833069, 0.3999860882759094, 0.2813248634338379, -0.20292305946350098, -0.10876203328371048, -0.523094892501831, -0.23394249379634857, -0.2769176661968231, -0.628528356552124, 0.16768009960651398,...
etc. Alpha sort cause the 10s to immediately follow the 1: ``` ... LS1 9ZZ LS10 1AA ... LS2 ``` I'm looking at creating a SQL function to convert the printable Postcode into a sortable postcode e.g. 'LS1 9ZZ' would become 'LS01 9ZZ', then use this function in the order by clause. Has anybody done this or anything...
[ 0.035091739147901535, 0.1009506806731224, 0.09551643580198288, -0.5360462069511414, -0.405155211687088, 0.24483394622802734, 0.20422634482383728, -0.42057186365127563, -0.1481148898601532, -0.4700617790222168, -0.23510359227657318, 0.08950158208608627, -0.700884997844696, -0.06754726171493...
down into those component parts then sorting should be easy enough. There is an exception with the GIR 0AA postcode but you can just hardcode a test for that one *edit: some more thoughts on tokenization* For the sample postcode SW1A 1AA, SW is the postcode area, 1A is the postcode district (which we'll break into tw...
[ 0.020367972552776337, -0.04908112809062004, 0.45367249846458435, -0.1452149599790573, -0.3229869306087494, 0.6206519603729248, 0.28413113951683044, -0.4675019383430481, -0.34562334418296814, -0.20557911694049835, -0.29123204946517944, -0.393785297870636, -0.07905464619398117, 0.05247722566...
AAA NAA (only for GIR 0AA code) AANN NAA AANA NAA So a rough algorithm would be (assuming we want to separate the sector and unit postcode): * code = GIR 0AA? Tokenize to GI/R/ /0/AA (treating R as the district simplifies things) * code 5 letters long e.g G1 3AF? Tokenize to G/1/ /3/AF * code 6 letters long wi...
[ 0.1758401244878769, 0.1972884237766266, 0.15516625344753265, -0.2672869861125946, -0.5920735001564026, 0.3506328761577606, 0.3523443937301636, -0.6532740592956543, -0.23870304226875305, -0.16810832917690277, -0.07076417654752731, -0.029339615255594254, -0.1952485889196396, 0.29295179247856...
EC1A 1BB? Tokenize to EC/1/A/1/BB * otherwise e.g. TW14 2ZZ, tokenize to TW/14/ /2/ZZ If the purpose is to display a list of postcodes for the user to choose from then I would adopt Neil Butterworth's suggestion of storing a 'sortable' version of the postcode in the database. The easiest way to create a sortable versi...
[ 0.25724804401397705, -0.05258060619235039, 0.4173605740070343, -0.0997692421078682, -0.16341209411621094, 0.23429736495018005, -0.014356336556375027, -0.48011133074760437, -0.14668594300746918, -0.39801204204559326, -0.29080307483673096, -0.26205363869667053, -0.3886861205101013, 0.0485304...
exception again. If you pad with spaces then the sort order should be correct. Examples using # to represent a space: * W1#1AA => W##1##1AA * WC1#1AA => WC#1##1AA * W10#1AA => W#10##1AA * W1W#1AA => W##1W#1AA * GIR#0AA => GI#R##0AA * WC10#1AA => WC10##1AA * WC1W#1AA => WC#1W#1AA You need to right-pad the area if it's...
[ -0.20534175634384155, 0.20814207196235657, 0.3384004533290863, -0.24919874966144562, -0.03548818454146385, 0.11140613257884979, 0.21495875716209412, -0.48540574312210083, -0.5342366099357605, -0.498090535402298, -0.6748526692390442, -0.042171280831098557, -0.4012735188007355, -0.3191230595...
the natural W1, W2, ..., W9, W10 order remains intact
[ 0.07202757894992828, 0.038900528103113174, -0.17502477765083313, -0.22434350848197937, 0.05854671820998192, 0.31085923314094543, 0.8511391878128052, -0.10906099528074265, -0.3796040117740631, -0.547285795211792, -0.1464816927909851, 0.47785335779190063, -0.03570050001144409, 0.297544151544...
I have a method that 'has no translation to SQL' that I want to perform on an IQueryable, is there a way to force the IQueryable to execute without having to store it in some intermediate class? Is the problem that you want your method to execute locally rather than in the database? If so, `AsEnumerable` is your friend...
[ -0.22758141160011292, 0.19744297862052917, 0.25966382026672363, 0.1385514885187149, -0.23876704275608063, -0.061525627970695496, -0.024376090615987778, -0.12885327637195587, -0.03173058480024338, -0.4345238208770752, 0.0063109551556408405, 0.5715059638023376, -0.33309921622276306, 0.281068...
be the LINQ to Objects ones instead of LINQ to SQL. For example: ``` var query = context.Employees // Filtering performed in SQL .Where(emp => emp.IsFullTime) .AsEnumerable() // Projection performed locally;
[ -0.19498316943645477, -0.39255863428115845, 0.44241976737976074, -0.058409757912158966, 0.1031036302447319, -0.047081783413887024, -0.21781225502490997, -0.27328118681907654, -0.15312492847442627, -0.6717904806137085, -0.38152575492858887, 0.4268137216567993, -0.3100147545337677, 0.0236032...
ComputeSalary has no // SQL equivalent .Select(emp => new { Employee = emp, Salary = ComputeSalary(emp) }); ``` You could call `ToList` as suggested elsewhere, but if
[ 0.05152865871787071, -0.3283894956111908, 0.47237929701805115, 0.07693108916282654, -0.02639799192547798, 0.19876845180988312, -0.11123806238174438, -0.003685598261654377, -0.3870297372341156, -0.3308964669704437, -0.2307950258255005, 0.34668558835983276, -0.14683237671852112, 0.0283046271...
you're doing filtering and don't really need the *full* list in memory, calling `AsEnumerable` and filtering *that* result will be more efficient than loading everything first.
[ 0.24631395936012268, -0.06906187534332275, -0.11911768466234207, 0.217988982796669, -0.059454359114170074, -0.18829640746116638, 0.15960237383842468, 0.05357766151428223, -0.4143315255641937, -0.7225738763809204, -0.07462556660175323, 0.3213147222995758, -0.07459420710802078, -0.0043189446...
I have no idea why, but every time I do something with a complex pattern for a RewriteRule in a .htaccess file, I get a 500 internal error. My current .htaccess file in its entirety is: ``` RewriteEngine on RewriteRule ^ups/sections/([A-Za-z]{3})/([A-Za-z0-9_-+\.]+)/?$ /dl.php?loct=sec&sec=$1&file=$2 [R=302] ``` I'v...
[ 0.056546133011579514, 0.22532430291175842, 0.5843068957328796, -0.32524430751800537, 0.05581045523285866, 0.1621658354997635, 0.5108790993690491, -0.255344957113266, -0.14083288609981537, -0.8453241586685181, -0.045920487493276596, 0.7331479787826538, -0.4936257004737854, 0.280889511108398...
just doesn't work. Note: I don't own this server and can't change apache config files. Any help would be appreciated. Object A references object B. Object B references object A. Neither object A nor object B is referenced by any other object. That's an island of isolation. Basically, an island of isolation is a gro...
[ 0.23033447563648224, 0.21361297369003296, 0.14377866685390472, 0.07211750000715256, 0.1304170936346054, -0.21835598349571228, 0.3251555860042572, 0.06748922169208527, -0.3883644640445709, -0.46124422550201416, -0.07444442063570023, 0.07523854821920395, -0.5285253524780273, 0.31579467654228...
myA; } /* later */ A a = new A(); B b = new B(); a.b = b; b.a = a; ```
[ 0.0699399933218956, 0.06896284967660904, 0.16110342741012573, -0.6604191660881042, 0.34977367520332336, 0.13965602219104767, 0.35600319504737854, -0.0019275483209639788, -0.0653906837105751, -0.3763313293457031, -0.6721048951148987, 0.5795443058013916, -0.1942850947380066, 0.47651913762092...
Quick question which I thought would be easily answered. I have a .net website, which has references to dlls in the GAC. When I build this and deploy to another server (in production) which doesn't have the same DLL references in the GAC, how can i get the dlls across? If this is a manual process where you copy acros...
[ 0.5722524523735046, -0.06909410655498505, 0.2580302953720093, 0.10926837474107742, -0.23410145938396454, -0.00629554595798254, -0.08685143291950226, -0.06116924062371254, -0.20487569272518158, -0.8465497493743896, -0.015602909959852695, 0.7543999552726746, -0.3013833165168762, 0.0643140524...
I found this XAML in an example: ``` <Window x:Class="TestDataTemplate123.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:TestDataTemplate123" Title="Window1" Height="300" Width="300"> <...
[ -0.16559207439422607, 0.44234901666641235, 0.4078287184238434, -0.12095843255519867, -0.011344990693032742, 0.015008674003183842, -0.021847859025001526, -0.1803990751504898, -0.02866598404943943, -0.3423697352409363, -0.08270830661058426, 0.22152818739414215, -0.19810917973518372, 0.009187...