text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
HttpMethod = "POST", UpdateTargetId = "divViewClaims", InsertionMode = InsertionMode.Replace, OnSuccess="hideAddClaim" }; %> <% using (Ajax.BeginForm("AddEditClaim", "Claim", ajaxOptions, new { @name = "ClaimControl", @id = "ClaimControl" })) { %> <fieldset> <legend><%= Model.Id==0?"Ad...
[ 0.15335749089717865, -0.32314997911453247, 0.5149798393249512, -0.06473276764154434, -0.19678522646427155, 0.0850854143500328, 0.3594668209552765, -0.3614591062068939, 0.01290116086602211, -0.7864717841148376, -0.2109336107969284, 0.46145474910736084, 0.10343927890062332, -0.00080587220145...
' ') ?? "", new { @class = "datepicker" })%> </p> ``` I appreciate any help on this. If the element is created after `document.ready` you should re-match the element to jQuery. Check out [jQuery Live](http://docs.jquery.com/Events/live)
[ 0.3597608804702759, -0.3527980148792267, 0.3202241361141205, 0.04268862307071686, 0.1714792400598526, -0.35859304666519165, 0.007348543964326382, 0.13554689288139343, -0.22342871129512787, -0.5006796717643738, -0.4238109290599823, 0.23395775258541107, -0.22390270233154297, -0.1286148875951...
Hello is there a way to use svn command line from eclipse? Within eclipse in my project browser i can righclick and then click team and than i have something like svn. Not sure which plugin it is. But it doesn't have button's to for example ignore files for uploading. That's why I want to to it command line. And my qu...
[ -0.08731326460838318, -0.21387098729610443, 0.4811379611492157, 0.039477284997701645, -0.4419008493423462, -0.2746165692806244, 0.24423553049564362, 0.2843925952911377, -0.4659310579299927, -0.7073339819908142, 0.03147432208061218, 0.5343552827835083, -0.45841681957244873, 0.16151680052280...
versions of Eclipse and Subclipse. In general subclipse should be enough and there is no need for the command line. For Windows XP I recommend [Tortoise SVN](http://tortoisesvn.tigris.org). It integrates with the Windows Explorer and offers you a graphical environment for all your needs. I would say that is much more ...
[ 0.19347408413887024, -0.2933414578437805, 0.5159871578216553, -0.21880418062210083, -0.2677989602088928, -0.33239975571632385, 0.29709553718566895, 0.16237205266952515, -0.30562373995780945, -0.7194928526878357, -0.2793852686882019, 0.8434091210365295, -0.2676209509372711, -0.2479740679264...
with Tortoise SVN or the command line and subclipse won't be affected. All svn clients work by writing and reading from hidden directories called .svn. There is one such directory in every folder under source control. As long as the svn client software is of the same version, an svn client can write to these hidden fol...
[ 0.2234099805355072, -0.03560194373130798, 0.34459546208381653, -0.1636253297328949, 0.0850292518734932, -0.048846010118722916, 0.6508046984672546, 0.06958616524934769, -0.4482825696468353, -0.5968356728553772, -0.20988769829273224, 0.9104107618331909, -0.1495266705751419, 0.005039296578615...
to read the information stored there. Upgrading them to the latest version will solve the problem.
[ 0.5133130550384521, 0.26254570484161377, 0.3041435480117798, 0.37204593420028687, 0.4157350957393646, -0.3418026566505432, 0.13211829960346222, -0.052613552659749985, -0.017503367736935616, -0.6442853212356567, -0.12019852548837662, 0.5889009833335876, 0.27463316917419434, -0.1151917725801...
**Please note the question is about using an asynchronous callback mode only on sockets**! I want to build a TCP client that will notify me when a packet is received and when i the socket is being closed,because the feautures that NET offers with beginRecv,endRecv doesn't inform if the connection is still available. ...
[ 0.2791321873664856, -0.20336098968982697, 0.28837329149246216, 0.11864598840475082, -0.26349663734436035, -0.328511506319046, 0.31095582246780396, 0.08201490342617035, -0.3064888119697571, -0.706673264503479, -0.13141804933547974, 0.6239749789237976, -0.33941972255706787, 0.306023180484771...
the WParams FD\_CLOSE FD\_READ FD\_WRITE. If there isn't.Can't I control my connection and my incoming packets at the same time? I don't want to call BeginRecv EndRecv all the time. -.- Thanks in advance! If you pass a state object which includes a reference to your socket, You'll have access to the socket itself. `...
[ 0.32334887981414795, -0.16482369601726532, 0.4422353506088257, -0.14562219381332397, 0.10536576062440872, -0.1652124524116516, 0.5059311985969543, -0.11169331520795822, -0.09139186143875122, -0.8342738151550293, -0.232504740357399, 0.5981068015098572, -0.44534578919410706, 0.20175544917583...
size, flags, CallBack, stateObject); //do some other stuff } public void CallBack(IAsyncResult result) { SocketState state = (SocketState)result.AsyncState; state.Socket.EndReceive(result); //do stuff with your socket. if(state.Socket.Available) mySocket.BeginReceive(buffer, offset, size, flags, CallBack,...
[ 0.14832821488380432, 0.04991741478443146, 0.2040560245513916, -0.306163489818573, 0.3935202956199646, -0.011464397422969341, 0.4251689910888672, -0.14405007660388947, -0.16712647676467896, -0.4818635582923889, -0.387840211391449, 0.6095659136772156, -0.3329097628593445, 0.2646244764328003,...
A static field in a generic class will have a separate value for each combination of generic parameters. It can therefore be used as a Dictionary<Type, *whatever*> Is this better or worse than a static Dictionary<Type, *whatever*>? In other words, which of these implementations is more efficient? ``` public static c...
[ -0.1758660227060318, -0.5090317726135254, 0.226342111825943, 0.09764218330383301, -0.18199972808361053, 0.195524200797081, 0.08963242918252945, -0.31986188888549805, -0.215272456407547, -0.412320077419281, -0.34452125430107117, 0.4915412962436676, -0.7426636219024658, 0.19753484427928925, ...
public static Action<T> GetMethod<T>() { //In production code, this would ReaderWriterLock Delegate method; if(!methods.TryGetValue(typeof(T), out method) methods.Add(typeof(t), method = CreateMethod<T>()); return method; } static Action<T> CreateMethod<T>() { /*......
[ -0.0010595513740554452, -0.307559996843338, 0.33446335792541504, -0.00630987761542201, -0.16758166253566742, -0.029246408492326736, 0.08718320727348328, -0.12662716209888458, -0.35980626940727234, -0.1707441508769989, -0.34735697507858276, 0.748224675655365, -0.6215858459472656, 0.12186703...
nested generic classes for precisely this purpose. The main thing I like about it is that it's hard *not* to get the initialization right this way (in terms of thread safety), given the way type initialization works. The only problem is what to do if initialization fails - occasionally I've resorted to remembering an ...
[ 0.11108716577291489, -0.056300729513168335, 0.19757167994976044, 0.07779012620449066, -0.26123255491256714, -0.08232550323009491, 0.3100529909133911, 0.09837651252746582, -0.3366309702396393, -0.4004194736480713, 0.008688829839229584, 0.3563249111175537, -0.28613361716270447, 0.27908578515...
I have created a usercontrol (a custom button control), how to apply skin on that control. What to write in the skin file for eg for a asp:button i will write `<asp:button SkinID ="btnSkinBlue" runat = "server"/>`. What to write for a user control? We require register tag <%@ Register Src="../../UserControls/RoundedBu...
[ 0.3459903597831726, -0.10696719586849213, 0.5398751497268677, -0.4565254747867584, -0.061259523034095764, 0.5791922807693481, 0.04741730913519859, -0.2962817847728729, -0.20089681446552277, -0.7025280594825745, 0.3826674520969391, 0.5902925729751587, -0.13340729475021362, -0.19288799166679...
I am trying to figure out how to select half the records where an ID is null. I want half because I am going to use that result set to update another ID field. Then I am going to update the rest with another value for that ID field. So essentially I want to update half the records someFieldID with one number and the r...
[ 0.14840351045131683, 0.04875904321670532, 0.14178436994552612, 0.25868698954582214, 0.08110597729682922, -0.17987239360809326, -0.32720428705215454, -0.29326340556144714, -0.15946811437606812, -0.5063243508338928, 0.02323194593191147, 0.5328211784362793, -0.13402679562568665, 0.08131472766...
PERCENT * from table ```
[ 0.34952178597450256, 0.5430987477302551, 0.26206833124160767, -0.06616450846195221, -0.11272703856229782, -0.05197376012802124, 0.0864134430885315, 0.026813657954335213, 0.09714893251657486, -0.40087437629699707, 0.14105799794197083, 0.7055703997612, 0.266539990901947, 0.25902602076530457,...
I'm using the URL Rewriting.NET tool with IIS 6. I've got my default page content set for default.aspx in IIS. What I'm trying to do is have /default.aspx provide a 301 redirect to the root directory (www.example.com/default.aspx -> www.example.com). I've tried turning off default documents, to no avail. What I'm hop...
[ 0.40954405069351196, 0.12800610065460205, 0.3771410286426544, -0.2607026994228363, -0.004461298231035471, -0.09116324037313461, 0.546906054019928, 0.2210080474615097, -0.2214738130569458, -0.8650289177894592, 0.05147528275847435, 0.5909028053283691, -0.2788904905319214, 0.12749607861042023...
default In the end I wound up using IIS 7 with the URL Rewrite module, which allows you to do this redirect properly. Edit : The rule is ``` <rule name="Default Redirect" stopProcessing="true"> <match url="^default\.aspx$" /> <action type="Redirect" url="/" redirectType="Permanent" /> </rule> ``` you can ...
[ -0.3691272735595703, -0.19544602930545807, 0.9783753752708435, -0.20461022853851318, 0.13181446492671967, -0.10449668020009995, 0.27503928542137146, -0.3816632926464081, -0.04994439706206322, -0.5772474408149719, -0.2681918740272522, 0.773420512676239, -0.2573317587375641, 0.18742644786834...
I have some Python Scripts which I would like to use from my VB.NET class library however instead of increasing the amount of files that I distribute is it possible to embed the script into my project/dll in Visual Studio and then run the script from the dll during my program runtime? Thanks for any help. Rob [Yes, i...
[ 0.887729823589325, 0.007713907863944769, -0.12474103271961212, 0.047154393047094345, 0.10681331902742386, -0.20999132096767426, 0.3558683693408966, 0.25813961029052734, -0.16068921983242035, -0.6511111259460449, -0.00048749035340733826, 0.7251171469688416, 0.0519908145070076, 0.01223972532...
I am making an activeresource call to a service, and I'd like some custom error messages as feedback. I have some validations that aren't normal model validations, so I can't just return @object.errors. So, for instance, one of my validations is this. Two objects have a many to many relationship, but I want to restric...
[ 0.18240630626678467, 0.20936772227287292, 0.39132553339004517, -0.2276061475276947, -0.051537927240133286, 0.21095557510852814, -0.06156070530414581, -0.16992539167404175, -0.13419131934642792, -0.6112773418426514, 0.1994573175907135, 0.6249602437019348, -0.3262540400028229, 0.117142759263...
is valid. ``` def add_user @user = User.find(params[:user_id]) @customer = Customer.find(params[:id]) if @customer.users.length > 2 render :xml => "ERR_only_2_users_allowed", :status => :unprocessable_entity end end ``` Here's my problem. In active resource, if the return status is an error, the client sid...
[ -0.020127112045884132, 0.14892731606960297, 0.9218952655792236, -0.15435494482517242, 0.12158165872097015, 0.07180793583393097, 0.5133367776870728, -0.7174001932144165, -0.21206171810626984, -0.5240263342857361, -0.28510698676109314, 0.7391833066940308, -0.144934743642807, -0.2436506301164...
#return error code end ``` but when I catch the 422 (unprocessable\_entity) response, I get nothing of the body back, so I don't get my custom error message. response = nil Does anyone know how I can achieve these custom error message with the proper response codes? This may or may not be your problem, but both of o...
[ 0.3079729676246643, 0.25532084703445435, 0.0650649219751358, -0.019615326076745987, 0.15799471735954285, 0.03982209414243698, 0.6195709705352783, -0.10092269629240036, -0.25462573766708374, -0.6902275085449219, -0.04159029200673103, 0.8727696537971497, -0.36135897040367126, -0.145327821373...
added when other methods are called it looks like you need to do it yourself. I had to add it to vendor/rails/activeresource/lib/active\_resource/custom\_methods.rb Here is what my diff from git looks like: old code: ``` def put(method_name, options = {}, body = '') connection.put(custom_method_element_url(method_...
[ 0.19337911903858185, -0.18491852283477783, 0.49188828468322754, -0.2571341395378113, 0.05966699495911598, 0.1257268786430359, -0.12021811306476593, -0.44632646441459656, -0.25866302847862244, -0.7226688265800476, 0.046846162527799606, 0.3962615132331848, -0.1626301258802414, 0.078880123794...
you should be good to go. Don't ask me why the activeresource folks thought validations should only work with their save method. the save method does a create or update, but calling 'put or post' is the exact same thing, IMO. If we want validations to work on save we want them to work on put and post...anyway give it ...
[ 0.6321830153465271, 0.029431089758872986, 0.2558177411556244, 0.17219670116901398, -0.28230518102645874, -0.5758972764015198, 0.28648751974105835, 0.12367913872003555, -0.22097286581993103, -0.11326121538877487, 0.3080213963985443, 0.5120511054992676, 0.24755048751831055, -0.30487039685249...
I'm having trouble calling rsync from java on windows vista with cygwin installed. Its strange as pasting the exact same command into a command shell works fine. My test java call looks like this. ``` String[] envVars = {"PATH=c:/cygwin/bin;%PATH%"}; File workingDir = new File("c:/cygwin/bin/"); Process p = Runtime.g...
[ -0.07718155533075333, 0.18887078762054443, 0.5330333709716797, -0.4923129379749298, -0.08859392255544662, 0.08082742989063263, 0.5224400162696838, -0.3702252209186554, -0.19425414502620697, -0.7768520712852478, -0.260339617729187, 0.6763308048248291, -0.32036638259887695, 0.357459813356399...
(code 14) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/pipe.c(57) [sender=3.0.4] ``` The rsync code where the error happens is pipe.c(57) which is this. ``` if (fd_pair(to_child_pipe) < 0 || fd_pair(from_child_pipe) < 0) { rsyserr(FERROR, errno, "pipe"); exit_cleanup(RERR_IPC); } ``` So, for some ...
[ 0.0965929850935936, 0.4063894748687744, 0.2764061391353607, -0.16749055683612823, 0.5746489763259888, 0.4111645817756653, 0.23228129744529724, -0.439725786447525, -0.13719280064105988, -0.6336615085601807, -0.0008702963241375983, 0.49324336647987366, -0.30412939190864563, 0.348836362361907...
errors.from_xml(error.response.body) end ``` Is only working with the standard save method. If you want errors added when other methods are called it looks like you need to do it yourself. I had to add it to vendor/rails/activeresource/lib/active\_resource/custom\_methods.rb Here is what my diff from git looks like...
[ -0.0804990902543068, 0.1885165125131607, 0.17814339697360992, -0.10268532484769821, 0.24190212786197662, 0.07805518060922623, 0.3782968521118164, -0.25319215655326843, -0.2899817228317261, -0.7488232254981995, 0.00455467589199543, 0.5921858549118042, -0.21262165904045105, -0.03927803039550...
which method it's calling exactly. Then add something like what I have and you should be good to go. Don't ask me why the activeresource folks thought validations should only work with their save method. the save method does a create or update, but calling 'put or post' is the exact same thing, IMO. If we want validat...
[ 0.7285231351852417, -0.12768210470676422, 0.23578931391239166, 0.16020342707633972, -0.251219779253006, -0.1398940086364746, 0.08169379830360413, 0.07513400912284851, -0.05820344388484955, -0.14594556391239166, 0.5348254442214966, 0.6834741234779358, -0.052805736660957336, -0.2603471279144...
it work. Erik
[ 0.5120181441307068, 0.03838177025318146, 0.11662952601909637, 0.22283835709095, 0.011753857135772705, 0.01424779836088419, 0.37059485912323, 0.045211873948574066, 0.2877623438835144, -0.2695199251174927, -0.001159807201474905, 0.5353700518608093, -0.07723796367645264, -0.1705475151538849, ...
Some exceptions (web service calls) of a Web Application are not handled, because I want to show them on a Custom Error Page, passing from the Application\_Exception method. Porting my Web Application to ASP.Net 2.0, these events started to appear in the Event Viewer (Web Events, new feature of ASP.Net 2.0). Is there...
[ 0.1415598839521408, 0.0652100071310997, 0.22594988346099854, 0.10431423038244247, -0.07343685626983643, -0.3228314220905304, 0.560690701007843, -0.10250593721866608, -0.5676039457321167, -0.4921042025089264, -0.13158509135246277, 0.3636758029460907, -0.4520072937011719, 0.18445120751857758...
I've got this little snippet of jQuery: ``` $('#showlink').click(function(){ $('#linkwindow').show('fast'); $('#linkwindow input').focus(); } ``` How do I call the focus only after the fade has ended? Sometimes it happens slightly before and I end up with a weird rendering bug. Try this, using the [callback](h...
[ 0.6129788756370544, -0.21015404164791107, 0.9139317274093628, -0.06457380205392838, -0.10601810365915298, -0.24897488951683044, -0.03745909780263901, 0.24191541969776154, -0.1725558489561081, -0.5625103116035461, -0.0867987871170044, 0.3880363702774048, -0.2714569568634033, 0.1694718748331...
I have a number of asp and asp.net 2.0 applications that I need to move to a new Win2003 server. I've created a test suite to verify that different aspects are installed and configured properly, but other than exporting the IIS metabase from the two servers and comparing manually, are there any tools or techniques I'...
[ 0.24487319588661194, 0.04165845736861229, 0.19225764274597168, -0.03452607989311218, 0.10487755388021469, -0.3033169209957123, 0.20012544095516205, -0.17715346813201904, -0.07492522150278091, -0.8342111110687256, -0.14655515551567078, 0.5628019571304321, 0.06940436363220215, -0.13424834609...
a Web site, automatically including content, configuration, certificates and databases. These packages can be directly deployed to a server or packaged and shared with others. IT Professionals can enable developers to deploy these packages to a server and delegate access to non-admins. IT Professionals can also use the...
[ 0.536256730556488, 0.08865382522344589, 0.38237935304641724, 0.16985438764095306, 0.05490722507238388, -0.32235732674598694, 0.2424047887325287, -0.08914732187986374, -0.2905611991882324, -0.829234778881073, -0.5191089510917664, 0.5485838651657104, -0.19210569560527802, 0.13192984461784363...
the target server (complete with a handy 'what if' mode).
[ 0.1793627291917801, -0.3153213560581207, 0.3843516409397125, 0.39001578092575073, -0.16258202493190765, 0.005736555904150009, 0.02327408269047737, 0.20622295141220093, 0.2120257169008255, -0.3207968473434448, -0.38322028517723083, 0.4982311725616455, -0.08641565591096878, -0.29370367527008...
This is the first time I've used a webservice for anything so the question may be a little basic. Anyhow, I have a webservice that acts as a proxy to our vendors site. It simplifies the "screen scrape" that we would usually have to do. The webservice function looks like this: ``` namespace foo { public class My...
[ 0.0747019574046135, 0.021572090685367584, 0.6169567704200745, -0.06898953765630722, 0.052149709314107895, 0.08282478898763657, -0.15728363394737244, -0.07055553793907166, -0.2870866060256958, -0.7985661029815674, 0.06644702702760696, 0.611966609954834, -0.284507155418396, 0.192418187856674...
} } } ``` The client throws an error when you try to give it the FileStream that the method asks for. In compilation somewhere, the webservice changed the type of the parameter from System.IO.FileStream to foo.FileStream. Does anyone have any ideas as to how I did this to myself? Thanks in advance! I would...
[ 0.20016895234584808, 0.07713388651609421, 0.2665296196937561, -0.252846896648407, 0.0443420484662056, -0.04368482157588005, 0.33193153142929077, 0.06549709290266037, -0.26427361369132996, -0.5256599187850952, 0.12104140222072601, 0.6404223442077637, -0.31747686862945557, 0.2305910140275955...
thus rendered to the browser. ``` public class JSONAttribute : ActionFilterAttribute { ... public override void OnActionExecuted( ActionExecutedContext filterContext) { var result = new JsonResult(); result.Data = ((ViewResult)filterContext.Result).Model; filterContext.Result = resu...
[ -0.2878316640853882, -0.6530901789665222, 0.6171234846115112, -0.35247936844825745, 0.12718307971954346, 0.048528485000133514, 0.47099608182907104, -0.3549790680408478, -0.3652099072933197, -0.5454229116439819, -0.6414831876754761, 0.5164746046066284, -0.5947452783584595, -0.18576054275035...
``` <html> <body> <img id="j_id58" width="800" border="0" height="400" src="c:/test/tmp/imageEE3A7BA3F55BC67061FD778F1B0136D6.png"/> </body> </html> ``` Why does this not render any image when I open it on firefox but does it on IE 6? I bet this will work if you use a `file://` URL instead of a filename. ``` <h...
[ 0.0375860370695591, 0.08260397613048553, 0.44793900847435, -0.12165842950344086, -0.25670191645622253, -0.1709539294242859, 0.44308412075042725, -0.33210575580596924, -0.03582030534744263, -1.141373634338379, 0.09998730570077896, 0.6417416930198669, -0.04060537368059158, -0.170260563492774...
I am using a Java based Portal Platform. I need to show within my portal information stored in Lotus Notes. Considering security issues, what are the recommended ways to do this? Are there any open source JSR 168 portlets out there that integrate with Lotus Notes? From my portal platform, I can call web services to g...
[ 0.3948112726211548, 0.3017427623271942, 0.06590107828378677, 0.2108081728219986, 0.02909235656261444, -0.15123210847377777, 0.23227255046367645, 0.049703169614076614, -0.21523448824882507, -0.7277565598487854, 0.2683262526988983, 0.09540629386901855, -0.22431305050849915, 0.225954145193099...
two main options. First you can talk to Domino (Notes is the client, Domino is the server) directly using the CORBA java interface over IIOP. This will give you full access to the Domino object model and allow you to write the code to do whatever it is you need to do in your java platform. Secondly you could go over ...
[ 0.11190850287675858, -0.05653103068470955, 0.24184046685695648, -0.1642581969499588, -0.3066234886646271, -0.0770568996667862, 0.000448387349024415, -0.07923305779695511, -0.3121095299720764, -0.7379890084266663, 0.14565607905387878, 0.2072812169790268, -0.4723040461540222, 0.2824556231498...
elements for you from a WSDL or method stub. From a security point of view, the user connecting to the service will need to be authenticated with Domino. This could be a system account or the actual user if you can proxy the login through. Another angle I've seen is to just proxy HTTP calls through the portlet to Dom...
[ 0.22058430314064026, -0.17140354216098785, 0.16965903341770172, 0.057176023721694946, 0.04914969205856323, -0.11879114806652069, 0.11215027421712875, -0.07158160209655762, -0.3464984893798828, -0.49596238136291504, 0.025504643097519875, 0.2718925476074219, -0.20804838836193085, 0.109945446...
Does anyone know of an alternative IDE for Sybase Powerbuilder? It feels pretty clunky, after working with VS2008 and Eclipse. If not, has anyone successfully worked with this language outside the IDE? I'm not against using a simple text editor, but I find edit-import-regenerate-test-export-edit is clunkier than simpl...
[ 0.1507391482591629, -0.3131555914878845, 0.32692816853523254, 0.17702336609363556, -0.21272128820419312, -0.1354181170463562, 0.2358189970254898, -0.12418058514595032, -0.09367278963327408, -0.575755774974823, 0.14944784343242645, 1.020198941230774, -0.17743879556655884, -0.248465925455093...
It would be a very nice thing to have, if it exists. EDIT: Well that was disappointing. The bounty apparently did not cause even 1 new person to look at the question. None that I'm aware of, although you could probably use a source control tool, edit in your source control repository, and Get Latest Version from the P...
[ 0.24630115926265717, 0.17162472009658813, -0.03946295380592346, 0.3353133499622345, -0.1824396848678589, -0.023151574656367302, 0.009656548500061035, 0.20544056594371796, -0.34209948778152466, -0.4448809027671814, -0.23792755603790283, 0.2991028428077698, 0.05599352717399597, 0.00381071865...
PB12 is coming with based on the Visual Studio shell, and will include things like collapsible code blocks, Intellisense, etc.... However, for PB12, this will only be used for WPF targets and a few .NET-type targets (like assemblies), last I heard. Win32 targets will continue to use the "classic" IDE. Good luck, Terr...
[ 0.1117524728178978, -0.16321177780628204, -0.03933611139655113, 0.311683714389801, -0.1695013791322708, -0.40314093232154846, 0.3579567074775696, -0.04871685802936554, -0.3049125373363495, -0.8325992226600647, -0.08635544031858444, 0.6029207706451416, -0.2131369560956955, -0.38738533854484...
Hi I have multiple country domains for one company and one top level .com domain. I am looking to consolidate these by have www.mydomain.com/us /uk /fr etc and point the country domains to each section but don't want to loose Google rankings. I also have add word accounts on each country domain. I want to know what is ...
[ 0.08532385528087616, 0.15204614400863647, 0.6909171938896179, -0.09603837132453918, -0.22344371676445007, -0.08470646291971207, 0.22778859734535217, 0.06452252715826035, -0.11625126749277115, -0.6266399621963501, 0.25271910429000854, 0.1777823120355606, -0.276998907327652, 0.55683553218841...
for your problem right now, but if you have a choice of database on future projects, I recommend using one with support for transactional DDL because it makes migrations much more pleasant. *Update - this is still true in 2017, on Rails 4.2.7 and MySQL 5.7, reported by Alejandro Babio in another answer here.*
[ -0.05600781738758087, -0.0888160914182663, 0.28796422481536865, 0.18714983761310577, 0.07127754390239716, -0.17120319604873657, 0.3327258825302124, 0.23303605616092682, -0.5165963768959045, -0.6446843147277832, -0.07633534073829651, 0.3831416368484497, -0.3395742177963257, -0.0246285665780...
I know there is not a direct way to take a screen shot of a web page with PHP. What would be the most straightforward way to accomplish this? Are there any command line tools that could do this that I might be able to execute from a PHP script (I'm thinking something that would run in a 'NIX OS (OS X and/or Linux in pa...
[ 0.4292834401130676, 0.11555592715740204, 0.2936058044433594, 0.31386813521385193, 0.010162721388041973, -0.20967958867549896, 0.09989643841981888, 0.01940104551613331, -0.2854732275009155, -0.5425290465354919, 0.3035198152065277, 0.5773988366127014, -0.11293937265872955, -0.051844254136085...
if anyone knows of anything. See [webkit2png](http://www.paulhammond.org/webkit2png/) for an OSX commandline program that does this. The page also mentions Linux alternatives. [edit]: [wkhtml2image](http://code.google.com/p/wkhtmltopdf/downloads/list) is the newest kid in town, and it works better then anything else ...
[ 0.03087174892425537, -0.4625754654407501, 1.2697784900665283, 0.24898087978363037, -0.02487565204501152, -0.386816143989563, 0.09485755115747452, 0.6595302820205688, -0.591699481010437, -0.6753333210945129, -0.04958930239081383, 0.27345970273017883, 0.049056440591812134, 0.1778216958045959...
I'm storing papers in SQL Server 2005 and am looking for a way to paste in the text of a paper and then search for potential plagiarism (copied content) in the database. What's the best way to go about this? Is there a way to get a gauge for the extent to which something is similar to something else using full-text in...
[ 0.26355093717575073, 0.27923867106437683, 0.3170369267463684, 0.2076125293970108, -0.055153101682662964, -0.08810866624116898, -0.05568573251366615, 0.07237817347049713, -0.2776123285293579, -0.5413200855255127, 0.39260756969451904, 0.4365758001804352, -0.18430693447589874, 0.1750028133392...
I'm currently working on a web project that involves several assemblies, structured something like this: ``` WebProject | +--> A (external assembly, Version 1.0.0.0) | +--> B (external assembly, Version 1.0.0.0) ``` The difficulty is that in order to keep track of what's deployed, I'd like to updated the version...
[ 0.544435977935791, 0.43514376878738403, -0.03006088174879551, -0.4308057427406311, -0.19867302477359772, -0.14154572784900665, 0.36655664443969727, -0.23692484200000763, -0.2910023629665375, -0.5942808985710144, 0.03445832431316376, 0.39493829011917114, -0.3792479634284973, 0.0856238156557...
references other than manually? **Update**: assemblies A & B live in one solution, while WebProject lives in another. Also, A & B are strongly named because they get deployed to IIS/SharePoint servers. Turns out I found a blog describing a way to use the subwcrev tool included with TortoiseSVN to replace 1.0.0.$REV$ ...
[ 0.69000643491745, 0.2153187096118927, 0.37111327052116394, -0.03163890913128853, -0.15516047179698944, -0.2423214167356491, 0.6022693514823914, -0.01744113489985466, -0.45833462476730347, -0.465230792760849, 0.16482657194137573, 0.27698084712028503, -0.19048601388931274, 0.2760895192623138...
How can I internationalize the button text of the file picker? For example, what this code presents to the user: ``` <input type="file" .../> ``` Pure CSS solution: ```css .inputfile { /* visibility: hidden etc. wont work */ width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden; position: abso...
[ -0.3494725227355957, -0.20298853516578674, 0.5634593963623047, 0.02368204854428768, 0.07638390362262726, 0.18631109595298767, 0.23107044398784637, -0.3201037645339966, -0.23648080229759216, -0.6247497200965881, -0.12722639739513397, 0.5281602144241333, -0.30274438858032227, -0.054825868457...
Usually not calling Dispose indicates a possible error or sloppy code and may lead to some hard to find bugs. Ideally I would like to spot if Disposed was not called during unit tests. One of the methods we used was to put Debug.Assert in the Finalizer ``` #if DEBUG ~MyClass() { Debug.Assert(false, “MyClass.Dispo...
[ 0.486624151468277, -0.11266687512397766, -0.08676010370254517, -0.11119868606328964, -0.2565533518791199, -0.06382858753204346, 0.4953247904777527, -0.3938513398170471, 0.14681853353977203, -0.6634186506271362, 0.22744400799274445, 0.8152217864990234, -0.3089694380760193, 0.169804438948631...
testing to catch this. So, your class may take a logger instance in its constructor, or provide a default one, and then behave like this: ``` public MyClass : IDisposable { IEventLogger _eventLogger; public MyClass() : this(EventLogger.CreateDefaultInstance()) { } public MyClass(IEventLogger eventLogger) { _eve...
[ 0.2070140391588211, -0.1270909458398819, -0.1867283135652542, 0.022846678271889687, 0.039314594119787216, -0.4829711318016052, 0.5033155083656311, -0.1374075561761856, -0.3631727397441864, -0.6601529121398926, -0.19361910223960876, 0.508944571018219, -0.4067162573337555, 0.0635498613119125...
Is there any documentation on exactly how expensive it is: ``` if (x.IsInvokeRequired) { beginInvoke . . . . } ``` * If you have a case where 90% of the time is on a background thread (and thus required) is it worth it? * If you have a case where 90% of the time is on a UI thread (and thus not required) is it wo...
[ 0.32853350043296814, -0.36376479268074036, 0.3694985806941986, 0.22747783362865448, 0.23373176157474518, -0.10327794402837753, 0.06612171232700348, -0.23918849229812622, 0.04484284296631813, -0.4934456944465637, 0.22613635659217834, 0.944322943687439, -0.13621407747268677, -0.2370808869600...
the expected ThreadId. If you look in reflector the code is slightly more complex but in effect that's what it's doing. This is fairly cheap as it's just a few function calls and a comparison. BeginInvoke involves taking several locks, adding delegates to an invoke queue and potentially a Marshal between threads. This...
[ 0.23639994859695435, -0.5311221480369568, 0.4588043689727783, 0.16527491807937622, -0.09263123571872711, -0.0863342434167862, 0.2613072097301483, -0.4746060371398926, -0.031489916145801544, -0.6877374053001404, 0.1089257299900055, 0.8915833234786987, 0.07975214719772339, 0.1539591401815414...
I need to create an iPhone app that supports user input in multiple languages. The user needs to be able to change his input language at runtime between English, Spanish, Chinese, Japanese, etc. Is there any way through the iPhone SDK to display a keyboard for a language other than the user's default language? No, you ...
[ 0.3865247964859009, 0.3584723472595215, 0.08042030036449432, -0.020710283890366554, 0.4410907030105591, 0.4233163297176361, 0.19387422502040863, 0.21606674790382385, -0.14885856211185455, -0.49114763736724854, -0.15799731016159058, 0.5058659315109253, -0.24943716824054718, -0.0577530413866...
apps using custom keyboards I guess it's OK with Apple rules.
[ 0.3659408390522003, 0.3520829975605011, 0.274783730506897, 0.1203211322426796, 0.17708410322666168, 0.07908850163221359, 0.08579740673303604, 0.2948601245880127, -0.40136945247650146, -0.4408550560474396, -0.019843673333525658, 0.7897615432739258, -0.43519872426986694, -0.4475012421607971,...
I am using web forms, C#, Asp.net. As we all know, in this model UI and business logic are often mixed in. How do I separate these effectively? The example I would like to use is: I have a GridView and a DataTable (GridView binds to the DataTable and DataTable is fed from the stored procedure). I would like the Grid...
[ 0.6317585110664368, 0.09042267501354218, 0.1836756020784378, 0.13043776154518127, -0.154061421751976, -0.16210773587226868, -0.20475167036056519, -0.24868454039096832, -0.16500796377658844, -0.883243978023529, 0.10788826644420624, 0.4353216588497162, -0.24218100309371948, 0.131892204284667...
would be awesome. And, as a final note I would like to say that ASP MVC is not an option right now, so don't recommend it. My database access layer returns a DataTable. Note that I HAVE to use this database layer as this is a company policy. I went through this recently while decoupling much the same thing from our UI...
[ 0.1863034963607788, -0.004345180466771126, 0.559844434261322, 0.045472439378499985, 0.034342072904109955, -0.28795549273490906, -0.008900100365281105, -0.17651739716529846, -0.3187457323074341, -0.49227142333984375, -0.18602249026298523, 0.6383921504020691, 0.11926830559968948, 0.025434836...
the DataTable from the Business object. You can do that by creating objects and `List<object>` that make up DataTables and Collections of DataTables, and then you can make a ListView that displays those Objects. I cover the latter steps in the links I posted above. And the former steps are as easy as the following: 1...
[ 0.3232356905937195, -0.24749714136123657, 0.38895195722579956, 0.039355285465717316, -0.07771237194538116, 0.06346061080694199, 0.0025152466259896755, -0.2762551009654999, -0.16117486357688904, -0.8561251163482666, -0.22932539880275726, 0.7347797751426697, -0.22341492772102356, 0.195139288...
Gridview won't be tightly coupled to the method that you are retrieving your data. What happens if you decide to get your data from a JSON query or a XML file later on? Then you'd have to build this into there. ### Step 1 - Getting Data From Database There are multiple methods to get data from a database, there's no ...
[ 0.5496932864189148, -0.25789690017700195, 0.594980776309967, 0.2930884063243866, 0.035297099500894547, -0.38265976309776306, -0.04203564673662186, -0.028907204046845436, -0.07250145077705383, -0.7781962752342224, 0.12659578025341034, 0.4997798204421997, -0.23675386607646942, 0.082931466400...
and are using an `SQLDataReader` to retrieve data. We'll pick up there. ### Class Diagram ``` Foo ---- id Name Description ``` And here's the method: ``` private void FillDefault(SqlDataReader reader, Foos foo) { try { foo.id = Convert.ToInt32(reader[Foo.Properties....
[ -0.2555594742298126, 0.026873178780078888, 0.5556513667106628, -0.08814840018749237, 0.20690451562404633, -0.05633088946342468, 0.08580435812473297, -0.4183550775051117, 0.22531385719776154, -0.629592776298523, -0.11707273125648499, 0.8008230924606323, -0.30161356925964355, 0.1739433556795...
if (!string.IsNullOrEmpty( reader[Foo.Properties.DESCRIPTION].ToString())) foo.Description = reader[Foo.Properties.DESCRIPTION].ToString(); else foo.Description = string.Empty; } catch (Exception ex)
[ -0.11240922659635544, -0.3042389452457428, 0.39229992032051086, -0.2831764221191406, 0.2777942419052124, -0.22075150907039642, 0.2940475046634674, -0.4155309200286865, -0.08576350659132004, -0.21728573739528656, -0.45313048362731934, 0.5375243425369263, -0.5107572078704834, 0.1712694615125...
{ throw new Exception( string.Format("Invalid Query. Column '{0}' does not exist in SqlDataReader.", ex.Message)); }
[ -0.05190066993236542, 0.050743911415338516, 0.019196990877389908, -0.153827503323555, 0.06156047806143761, -0.21165689826011658, 0.4783919155597687, -0.3451659679412842, -0.165352001786232, -0.42712685465812683, -0.2198035567998886, 0.3191843330860138, -0.36274486780166626, 0.1628855615854...
} ``` Once that happens, you can return a list by going through that process in a `while` loop that targets the `SQLDataReader.Read()` function. Once you do that, let's pretend that your `Foo` being returned is a List. If you do that, and follow the first link I gave above, you can replace `Dictionary<TKey, TValue>`...
[ 0.15418145060539246, 0.013380919583141804, 0.45603489875793457, -0.09803661704063416, 0.08447746187448502, -0.11726409196853638, 0.002966394415125251, -0.037545379251241684, -0.21594814956188202, -0.7960211634635925, -0.022299565374851227, 0.7170984745025635, -0.2936272919178009, 0.0936102...
this instance, I'd insert a Business Layer between the DataTable and the UI, and I've discussed what I'd do above. But a DataTable is not a business object; it is a visual representation of a database. You can't transport that to the UI layer and call it de-coupled. They say you have to use a DataTable, do they say tha...
[ -0.057675424963235855, -0.046045418828725815, 0.20137202739715576, 0.3685454726219177, -0.025264091789722443, -0.016304388642311096, -0.16575972735881805, 0.15048035979270935, -0.2868110239505768, -0.8653011322021484, -0.12860314548015594, 0.3093535602092743, -0.383676677942276, 0.43644344...
I have a query to return random distinct rows from an Access database. Here is the query: ``` SELECT * FROM (SELECT DISTINCT m.MemberID, m.Title, m.FullName, m.Address, m.Phone, m.EmailAddress, m.WebsiteAddress FROM Members AS m INNER JOIN MembersForType AS t ON m.MemberID = t.MemberID WHERE (Category = 'Me...
[ -0.29194769263267517, 0.04385896027088165, 0.6063171029090881, -0.06561408936977386, -0.07916567474603653, 0.2689329981803894, 0.16010019183158875, -0.29901131987571716, -0.4226718544960022, -0.6707413792610168, -0.03919532895088196, 0.33555564284324646, -0.2519629895687103, 0.631529271602...
time. Here is how I call it in my code-behind: ``` private void BindData() { using (AccessDataSource ds = new AccessDataSource("~/App_Data/mydb.mdb", GetSQLStatement())) { ds.DataSourceMode = SqlDataSourceMode.DataReader; ds.CacheDuration = 0; ds.CacheExpirationPolicy = DataSourceCacheE...
[ -0.04520067200064659, -0.35485726594924927, 0.7953545451164246, -0.15175819396972656, 0.5186278223991394, 0.05472534894943237, 0.4357945919036865, -0.5852002501487732, -0.08927826583385468, -0.8901667594909668, -0.21285395324230194, 0.6722322106361389, -0.2393384575843811, 0.33640098571777...
if (listing.Items.Count == 0) noResults.Visible = true; else noResults.Visible = false; } } ``` I added in all that stuff about caching because I thought maybe the query was being cached but the result was the same. I put a breakpoint in the code to make sure the query was the same...
[ 0.20782975852489471, 0.1355210244655609, 0.12148389965295792, -0.05244387686252594, 0.10766316950321198, -0.4209792912006378, 0.47799861431121826, -0.11798100173473358, -0.35284778475761414, -0.40199971199035645, -0.13759595155715942, 0.554975688457489, -0.5984677076339722, 0.1443776786327...
function against a new connection the same seed value is used each time. When using MS Access you are using the same connection each time, which explains why you get a different value each time. Consider these VBA examples: the first uses a new connection on each iteration: ``` Sub TestDiff() Dim con As Object S...
[ -0.01951557584106922, -0.45307737588882446, 0.4203082025051117, -0.13620488345623016, 0.11433595418930054, 0.2855474054813385, 0.2032654881477356, -0.4771629273891449, -0.21436813473701477, -0.644214391708374, -0.05451551824808121, 0.6886410713195801, -0.5216712355613708, 0.385629832744598...
.CursorLocation = 3 Dim i As Long For i = 0 To 2 .Open Debug.Print .Execute("SELECT RND FROM OneRowTable;")(0) .Close Next End With End Sub ``` Output: ``` 0.705547511577606 0.705547511577606 0.705547511577606 ``` Note the same value each time. The second example uses the ...
[ -0.3785336911678314, -0.1184011921286583, 0.7369509935379028, -0.3462775945663452, -0.13603940606117249, 0.030656222254037857, 0.2871215045452118, -0.40972378849983215, -0.020715074613690376, -0.5991935133934021, -0.16534146666526794, 0.4256294071674347, -0.604943037033081, 0.3779957890510...
"Provider=MSDataShape;Data " & _ "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=C:\Tempo\Test_Access2007.accdb" .CursorLocation = 3 .Open Dim i As Long For i = 0 To 2 Debug.Print .Execute("SELECT RND FROM OneRowTable;")(0) Next .Close End With End Sub ``` Ou...
[ -0.20382753014564514, -0.3317892551422119, 0.3010473847389221, -0.34122681617736816, 0.2998267412185669, 0.2584208548069, 0.24524632096290588, -0.5677164196968079, -0.1892184168100357, -0.4779808223247528, -0.014469725079834461, 0.39134952425956726, -0.40394356846809387, 0.4577536880970001...
but I don't think this can be done in ACE/Jet. One workaround is to use the least significant decimal portion of the ACE/Jet the NOW() niladic function e.g. something like: ``` SELECT CDBL(NOW()) - ROUND(CDBL(NOW()), 4) FROM OneRowTable ```
[ -0.26954469084739685, 0.14869707822799683, 0.3918076157569885, 0.12416467815637589, 0.23393020033836365, -0.2404671013355255, -0.45702940225601196, -0.20106855034828186, -0.07442367821931839, -0.20434437692165375, -0.07507001608610153, 0.6281111836433411, -0.050724051892757416, 0.124457351...
So I have a stored procedure in a SQLServer 2005 database, which retrieves data from a table, format the data as a string and put it into a varchar(max) output variable. However, I notice that although len(s) reports the string to be > 8,000, the actual string I receive (via SQLServer output window) is always truncate...
[ -0.05168499797582626, 0.058779049664735794, 0.3337245285511017, -0.046783462166786194, -0.2181619256734848, 0.24257254600524902, 0.3127804100513458, 0.05666932463645935, -0.3370213806629181, -0.2892996072769165, 0.17908498644828796, 0.296387642621994, -0.10765635967254639, 0.24671138823032...
read that output variable from, for instance, a .NET application, you'd see the full value.
[ 0.33025896549224854, -0.15221698582172394, 0.1020139828324318, 0.25117504596710205, -0.12234310060739517, -0.17651274800300598, -0.06520083546638489, 0.27595168352127075, -0.11183829605579376, -0.3480008840560913, 0.07903841137886047, 0.46996554732322693, -0.0032432752195745707, 0.15047448...
I'm using IntelliJ IDEA with the Scala plugin. If I reference HashMap in code, and then use Alt-Enter to add the import, the package gets imported as: ``` _root_.scala.collection.immutable.HashMap ``` What's the *root* part of this? It seems to work with and without it. It has to do scala imports being relative - `_...
[ -0.028441105037927628, 0.07840784639120102, 0.148061603307724, -0.2403276413679123, 0.08426768332719803, -0.018878107890486717, 0.19924993813037872, -0.17573611438274384, -0.18453064560890198, -0.7139345407485962, -0.07042732834815979, 0.6030470132827759, -0.36448898911476135, 0.0715827792...
How would you express the following Criteria query in HQL? ``` var idArray = new int[] { 1, 2, 3, 4, 5 }; Session.CreateCriteria(typeof(Foo)) .Add(Expression.In("Id", idArray) .List<Foo>(); ``` I am aware of that there is an "in" keyword in HQL, but as I understand it that keyword is for use with subqueries...
[ 0.14675940573215485, 0.17560864984989166, 0.2684388756752014, -0.13159187138080597, -0.18520665168762207, -0.03148332238197327, 0.21914494037628174, -0.3397524058818817, 0.09224621951580048, -0.5016409754753113, -0.08222243189811707, 0.5915946364402771, -0.2426423579454422, -0.033029399812...
f where f.Id in (:ids)") .SetParameterList("ids", idArray) .List<Foo>(); ```
[ -0.047932714223861694, -0.24208593368530273, 0.43854445219039917, -0.019723020493984222, 0.0688289925456047, 0.08788710087537766, 0.1490103006362915, -0.42774373292922974, -0.08268363773822784, -0.33475053310394287, -0.2027561515569687, 0.6916319131851196, -0.6189123392105103, -0.044953610...
I want to either enable or disable a button from another file,what should I do? This is the form class declaration: ``` public partial class Form1 : Form ``` I tried with ``` Form.btnName.enabled = false/true ``` but there's no btnName member. Thanks in advance! You need to expose the btnName member to other...
[ 0.2693524956703186, -0.1997830867767334, 0.36147886514663696, -0.2815231382846832, 0.04936075210571289, -0.12364502996206284, 0.508974552154541, -0.23469960689544678, -0.08196277171373367, -0.689385175704956, -0.3197617828845978, 0.4504685401916504, -0.4535578489303589, 0.08961231261491776...
I have been navigating the various [WebBrowser control stackoverflow questions](https://stackoverflow.com/search?q=WebBrowser+control), and I can't seem to find an answer to a problem I am having. I am trying to use the [WebBrowser control to print a web page](https://stackoverflow.com/questions/610183/printing-webbrow...
[ -0.14381130039691925, 0.18574251234531403, 0.6134580373764038, 0.061718400567770004, -0.04304751753807068, -0.18027976155281067, 0.16382722556591034, -0.20548412203788757, -0.07523196935653687, -0.5614124536514282, 0.13420499861240387, 0.4056505858898163, -0.20015406608581543, 0.2665793597...
<summary> /// The main entry point of the program. /// </summary> /// <param name="args">Program arguments.</param> [STAThread] public static void Main(string[] args) { string url = "https://stackoverflow.com/"; WebPagePrinter webPagePrinter = new...
[ -0.05614183098077774, -0.0287571232765913, 0.6901476383209229, -0.23705145716667175, -0.12743772566318512, 0.04293437302112579, 0.1475456804037094, -0.3262355327606201, -0.37280213832855225, -0.20957812666893005, -0.5460565686225891, 0.08408117294311523, -0.5337448120117188, 0.229668438434...
webPagePrinter.PrintWebPage(url); Console.ReadLine(); } } } namespace WebPrintingMadness { using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; /// <summary> /// This class is used to print a web page. /// </summary> int...
[ -0.06690508127212524, -0.10989771038293839, 0.17737962305545807, 0.15605784952640533, -0.2260623574256897, -0.4199029803276062, 0.269281804561615, -0.4981730282306671, 0.03359641134738922, -0.6524295210838318, 0.08937069773674011, 0.3226633369922638, -0.4552488625049591, 0.1059885695576667...
/// A System.Windows.Forms.WebBrowser control. /// </summary> private WebBrowser webBrowser; /// <summary> /// Initializes a new instance of the WebPagePrinter class. /// </summary> internal WebPagePrinter() { this.webBrowser = new WebBrowser();
[ 0.16046670079231262, -0.33671411871910095, 0.7141883373260498, 0.016346385702490807, 0.014192537404596806, -0.16270139813423157, 0.30878356099128723, -0.3566412627696991, -0.019758833572268486, -0.752895712852478, -0.24537897109985352, 0.464350163936615, -0.33868977427482605, 0.24496766924...
this.webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(this.WebBrowser_DocumentCompleted); this.webBrowser.ScriptErrorsSuppressed = true; } /// <summary> /// Disposes of this instance. /// </summary> public void Dispose() { ...
[ 0.14703258872032166, 0.04351317882537842, 0.5093926787376404, -0.09150449186563492, 0.28954604268074036, -0.38927850127220154, 0.5529138445854187, -0.6712630987167358, 0.02800859324634075, -0.46137163043022156, -0.16665178537368774, 0.7363703846931458, -0.3261961042881012, 0.35572463274002...
GC.SuppressFinalize(this); } /// <summary> /// Prints a web page. /// </summary> /// <param name="url">The url of the web page.</param> internal void PrintWebPage(string url) { this.webBrowser.Navigate(url); }
[ 0.33149245381355286, -0.11317452043294907, 0.7391630411148071, 0.08715613931417465, -0.14246922731399536, -0.09364867955446243, 0.41794559359550476, -0.5663554072380066, -0.20969757437705994, -0.3185803294181824, -0.11650490760803223, 0.5038514733314514, -0.5085065960884094, 0.118698574602...
/// <summary> /// Disposes of this instance. /// </summary> /// <param name="disposing">True if disposing, otherwise false.</param> protected virtual void Dispose(bool disposing) { if (disposing) {
[ 0.43134063482284546, 0.045512549579143524, -0.04332743212580681, -0.2252800315618515, 0.09048683196306229, 0.0704723373055458, 0.20232991874217987, -0.5758604407310486, -0.2948819100856781, -0.30886179208755493, -0.27604594826698303, 0.30895867943763733, -0.5846134424209595, 0.266901522874...
if (this.webBrowser != null) { this.webBrowser.Dispose(); this.webBrowser = null; } } }
[ -0.007267707493156195, -0.3620024621486664, 0.2923111021518707, -0.07383501529693604, 0.33888480067253113, -0.2918674051761627, 0.5083760023117065, -0.40513527393341064, 0.11210133135318756, -0.4450829327106476, -0.20210672914981842, 0.5760418176651001, -0.4252522885799408, 0.2812280058860...
/// <summary> /// Event handler for the webBrowser DocumentCompleted event. /// </summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event arguments.</param> private void WebBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEvent...
[ -0.1546306163072586, -0.22065481543540955, 0.6747345328330994, 0.22397185862064362, -0.07987149804830551, 0.12387021631002426, 0.4475821554660797, -0.4786970317363739, -0.316521555185318, -0.4863620698451996, -0.31411710381507874, 0.6487498879432678, -0.45824748277664185, 0.298400133848190...
if (navigated == null) { return; } navigated.Print(); navigated.Dispose(); } } } ``` However, the DocumentCompleted event never fires. Is it possible to use this Windows.Forms control in an
[ -0.16055703163146973, -0.09881578385829926, 0.6293694972991943, 0.1487485021352768, 0.31372058391571045, -0.5583553910255432, 0.4974314570426941, -0.1435297429561615, 0.027299869805574417, -0.8213548064231873, -0.20871077477931976, 0.44234853982925415, -0.3125667870044708, 0.30001905560493...
console application? The basic requirement of an STA thread is that it needs to run a message pump. In Windows Forms, you can use Application.Run. Or you could write the message pump by hand, using user32!GetMessage & DispatchMessage. But it's probably easier to use the one in WinForms or WPF.
[ 0.013817118480801582, -0.23420614004135132, 0.4567180275917053, -0.008240235038101673, -0.014533570036292076, 0.01800171099603176, 0.1000119149684906, 0.011247803457081318, 0.02911178581416607, -0.714667022228241, 0.06097312644124031, 0.7338993549346924, -0.38670480251312256, -0.0236551947...
I have a path made up of a list of 2D points. I want to turn these into a strip of triangles in order to render a textured line with a specified thickness (and other such things). So essentially the list of 2D points need to become a list of vertices specifying the outline of a polygon that if rendered would render the...
[ 0.2750368118286133, 0.2340177744626999, 0.23702441155910492, 0.16438905894756317, -0.2962441146373749, 0.5475462675094604, 0.08705109357833862, -0.1107277199625969, -0.18885913491249084, -0.8471125364303589, -0.10957585275173187, 0.2943951487541199, 0.032414134591817856, 0.0683278366923332...
with. Are there any *simple* resources around that can provide algorithm insight, code or any more information on doing this efficiently? I absolutely DO NOT want a full fledged 2D vector library (cairo, antigrain, OpenVG, etc.) with curves, arcs, dashes and all the bells and whistles. I've been digging in multiple s...
[ 0.36328595876693726, 0.05633333697915077, -0.06682974845170975, 0.2898149788379669, -0.41639310121536255, -0.06458882987499237, 0.22705233097076416, -0.250604510307312, -0.069085493683815, -1.0429669618606567, -0.15111428499221802, 0.3362489640712738, -0.6111545562744141, -0.05198363587260...
hours of trying to deal with them all. EDIT: Here's an example of one of those degenerate cases that causes ugliness if you were simply to go from vertex to vertex. Red is the original path. The orange blocks are rectangles drawn at a specified width aligned and centered on each segment. [![](https://i.stack.imgur.co...
[ 0.2149168848991394, -0.25618064403533936, 0.2326623797416687, 0.07891159504652023, -0.4820186197757721, 0.2783685028553009, 0.3909977674484253, 0.015948185697197914, -0.39811527729034424, -0.7056666612625122, 0.027893297374248505, 0.06877150386571884, -0.5566853284835815, -0.20349198579788...
approach: Write yourself a routine that checks if the joins can be constructed from simple geometry without problems. To do so you have to check the join-angle, the width of the line and the length of the joined line-segments (line-segments that are shorter than their width are a PITA). With some heuristics you should...
[ 0.10434184223413467, -0.18962624669075012, 0.1111312061548233, 0.20585975050926208, -0.28170245885849, 0.1302785724401474, 0.3934718668460846, -0.3796190917491913, -0.06605029851198196, -0.5566911101341248, -0.0882313996553421, 0.4038245379924774, -0.1385287642478943, -0.274002343416214, ...
geometry is a lot easier. Do so, and let a polygon CSG algorithm and a tesselation algorithm do the hard job. I've evaluated most of the available tesselation packages, and I ended up with the GLU tesselator. It was fast, robust, never crashed (unlike most other algorithms). It was free and the license allowed me to ...
[ -0.18752601742744446, -0.033133506774902344, 0.3998432457447052, 0.3608027398586273, -0.5813157558441162, 0.1315215826034546, -0.1399964541196823, 0.1974429339170456, -0.041121020913124084, -0.9700880646705627, -0.014941447414457798, 0.6256997585296631, -0.058849774301052094, 0.05662728101...
tesselation code from the free SGI OpenGL reference implementation, rewrote the entire front-end and added memory pools to get the number of allocations down. It took two days to do this, but it was well worth it (like factor five performance improvement). The solution ended up in a commercial OpenVG implementation btw...
[ -0.2770993709564209, -0.07616133987903595, 0.44151201844215393, 0.1467209756374359, -0.2299109548330307, 0.20604966580867767, 0.12462833523750305, -0.2352270483970642, 0.04770189896225929, -0.8009418249130249, -0.15434890985488892, 0.6172096729278564, -0.04986194893717766, -0.2421985566616...
I have a func which takes one parameter of Type T and returns one value. I want to store it in a dictionary, like so: ``` Dictionary<CustomerMilestones, Func<string, string>> coll = new Dictionary<CustomerMilestones, Func<string, string>>(); string Indicator = coll[CustomerMilestones.Ordered100Products].Invoke(custo...
[ -0.007752934005111456, 0.18530358374118805, 0.40767404437065125, -0.21227742731571198, -0.19718453288078308, 0.1724480390548706, 0.008360830135643482, -0.24646805226802826, -0.03723840042948723, -0.344767302274704, 0.12329918891191483, 0.4832559823989868, -0.3613039553165436, 0.08381467312...
Is there a function in Python to list the attributes and methods of a particular object? Something like: ``` ShowAttributes ( myObject ) -> .count -> .size ShowMethods ( myObject ) -> len -> parse ``` You want to look at the [`dir()`](http://diveintopython.net/power_of_introspection/built_in_functions...
[ -0.05886216089129448, 0.0109998295083642, 0.22542862594127655, -0.011916245333850384, -0.24440991878509521, 0.10026432573795319, 0.006392431445419788, -0.3240325450897217, -0.02125912345945835, -0.27995210886001587, -0.27629920840263367, 0.5830734372138977, -0.4528729319572449, -0.15716484...
No this will show all inherited methods as well. Consider this example: **test.py:** ``` class Foo: def foo(): pass class Bar(Foo): def bar(): pass ``` **Python interpreter:** ``` >>> from test import Foo, Bar >>> dir(Foo) ['__doc__', '__module__', 'foo'] >>> dir(Bar) ['__doc__', '__module__', 'bar', 'foo...
[ 0.22396346926689148, 0.015701131895184517, 0.12682096660137177, -0.24106338620185852, 0.025259733200073242, -0.09515932202339172, 0.09882530570030212, -0.45765724778175354, 0.049526579678058624, -0.3788250684738159, -0.257442444562912, 0.7014474272727966, -0.4965766370296478, 0.02259844355...
example, metaclass attributes are not > in the result list when the argument > is a class. Therefore it's not safe to use in your code. Use `vars()` instead. `Vars()` doesn't include information about the superclasses, you'd have to collect them yourself. --- If you're using `dir()` to find information in an inter...
[ -0.017186246812343597, -0.3063482642173767, -0.3898089826107025, 0.18635329604148865, -0.12753070890903473, -0.22576111555099487, 0.4216281771659851, 0.025906341150403023, 0.030187290161848068, -0.6318321228027344, -0.21773146092891693, 0.8200650215148926, -0.3158436715602875, -0.086531385...