text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
EXPLICITLY bind them to the ONE contract they apply to is VERY dangerous. **EDIT** After reading your post again I would say that there isn't a point in storing the GIFs or the PDFs. You should have a hard copy somewhere of the signed document (and if you are losing hard copies of contracts, then there are SERIOUS o...
[ 0.8894580006599426, 0.06322680413722992, 0.33972564339637756, 0.2649964988231659, -0.03282057121396065, -0.7042131423950195, 0.3873714804649353, 0.03429976478219032, -0.12138228863477707, -0.7301274538040161, -0.10160581767559052, 0.46138235926628113, -0.1323510706424713, -0.03019659779965...
signature again. If you need to prove they signed it, go back to the hard copy.
[ 0.5208984017372131, 0.2665848135948181, 0.4688664376735687, 0.1950402557849884, 0.23898234963417053, -0.19989600777626038, 0.01889905147254467, 0.023035697638988495, -0.4540388882160187, -0.6564945578575134, 0.060945022851228714, 0.3335663974285126, 0.11212998628616333, -0.0566831193864345...
My company wants to migrate to Eclipse, I was wondering what options besides an Ant build are there to move our projects from Netbeans to Eclipse. I have recently 'migrated' from Netbeans to Eclipse and found it amazingly easy. The reason it was easy though is that all of our projects are IDE independent standard ant a...
[ 0.7223255038261414, 0.11349984258413315, 0.04174427688121796, -0.02522345632314682, -0.28038808703422546, -0.010131270624697208, -0.33956342935562134, 0.22288964688777924, -0.034547071903944016, -0.828344464302063, 0.19274932146072388, 0.3981783986091614, -0.2790219783782959, 0.21130606532...
not already that way, I would recommend that you take that same path on your migration. Just create some standard ant (and ivy) build scripts. Eclipse knows how to slurp those in and there will be no future migration issues.
[ 0.7493920922279358, 0.12140144407749176, -0.22660014033317566, 0.2547133266925812, 0.27375611662864685, -0.055046092718839645, -0.04867509752511978, 0.37055251002311707, -0.017223620787262917, -0.8941320180892944, 0.21568037569522858, 0.26799091696739197, -0.173302561044693, -0.37453284859...
What are some good tips and/or techniques for optimizing and improving the performance of calculation heavy programs. I'm talking about things like complication graphics calculations or mathematical and simulation types of programming where every second saved is useful, as opposed to IO heavy programs where only a cert...
[ 0.4365513026714325, 0.11824218928813934, 0.07493846118450165, 0.5718279480934143, 0.044606294482946396, 0.05330003798007965, -0.05709727481007576, -0.06273597478866577, -0.35360923409461975, -0.6456010937690735, 0.3975652754306793, 0.7498813271522522, -0.22136880457401276, -0.0990075469017...
known, so there are few if any algorithms on the web, but I'm looking for any good advice on how to proceed and what to look for. I am exploring the differences in effectiveness between evolutionary algorithms and more straightforward approaches for a particular group of related problems. I have written three evolutio...
[ 0.075593002140522, 0.23949716985225677, 0.07503148168325424, 0.07667975127696991, -0.09510364383459091, 0.03971181809902191, 0.32366663217544556, 0.11786156892776489, -0.1873200386762619, -0.599916398525238, -0.10414079576730728, 0.5947791337966919, -0.4842550754547119, -0.2690523266792297...
expression trees). By expressions I mean things like x^2 + 4 or anything else like that which would be parsed into an expression tree. My algorithms all create and manipulate these trees to try to find better approximations. But I wanted to put the question out there in a general way in case it would help anyone else. ...
[ 0.15959161520004272, 0.24305692315101624, 0.154331237077713, 0.16374556720256805, -0.028479043394327164, 0.29933708906173706, 0.29763004183769226, 0.027371324598789215, -0.04718104749917984, -0.8547474145889282, -0.09583956003189087, 0.5739292502403259, -0.4715723991394043, -0.119054690003...
the evolutionary stuff compares to traditional methods. If your optimization problem is (quasi-)convex or can be transformed into such a form, there are far more efficient algorithms than evolutionary search. If you have large matrices, pay attention to your linear algebra routines. The right algorithm can make shave...
[ -0.14425908029079437, 0.09465907514095306, -0.2873055934906006, 0.30239710211753845, 0.20019569993019104, 0.16610218584537506, -0.15457399189472198, -0.040644723922014236, -0.020731428638100624, -0.8292407393455505, 0.1731736958026886, 0.3668191432952881, -0.2919861674308777, -0.1453018188...
can with the data while it's in the fastest memory. Try to avoid unnecessary memory allocation and de-allocation. Here's where it can make sense to back away from a purely OO approach.
[ 0.13819675147533417, -0.02691698633134365, -0.05369701236486435, 0.3441718816757202, 0.19915740191936493, -0.21849685907363892, -0.12376663088798523, -0.028085051104426384, -0.17561966180801392, -0.5830035209655762, -0.06494376808404922, 0.6339017748832703, 0.10581787675619125, -0.19076964...
I would like to know where is the best place to set my db object with my model. Should I hard coded it since my model should be designed for one project, so i set it inside my constructor or wherever i do initialization ? or Should I pass my db object to my constructor when instancing my object ? What is the best way...
[ 0.41016829013824463, 0.0743056908249855, -0.1047617495059967, 0.2399478554725647, -0.08368492871522903, -0.17533384263515472, 0.06307044625282288, -0.10856873542070389, -0.14529846608638763, -0.6974900960922241, 0.2166333943605423, 0.17583023011684418, -0.08648647367954254, 0.1580262184143...
read up on it. 2. Typically I define my database connections in a configuration file which can easily be changed between environments (development, stage, production). 3. I'll then instantiate my database connection in a bootstrap file using the aforementioned Singleton pattern and configuration file. 4. My models will...
[ 0.2987547814846039, 0.10042127966880798, 0.5219181776046753, 0.019264085218310356, 0.009290022775530815, -0.20317405462265015, 0.01391618512570858, -0.23664040863513947, -0.2937583029270172, -0.9159518480300903, 0.030817106366157532, 0.5295270681381226, -0.4709852933883667, 0.2043611258268...
Uses default adapter, Singleton pattern! $table = Db::loadTable('user'); $table->update( array('username'=>$username), Db::quoteInto('userid = ?', $userid) ); } } ``` This is pretty much an introduction to the [Model](http://framework.zend.com/manual/en/zend.db.table.html) in the [Zend Frame...
[ 0.1963394433259964, -0.07480709999799728, 0.3304778039455414, -0.19342468678951263, -0.055775515735149384, -0.2947736978530884, 0.1023068055510521, -0.4743626117706299, -0.028667347505688667, -0.7030227184295654, -0.01382681354880333, 0.5822080969810486, -0.381520539522171, 0.0371499396860...
I've created a UserControl, similar to the following: ``` <UserControl> <StackPanel Orientation="Vertical"> <StackPanel x:Name="Launch" Orientation="Horizontal" Visibility="Collapsed"> <!-- Children here --> </StackPanel> <ToggleButton x:Name="ToggleLaunch" IsChecked="False" Con...
[ 0.04556988179683685, 0.12499728798866272, 0.3654346466064453, -0.28399431705474854, 0.11992930620908737, -0.18866144120693207, 0.247037872672081, -0.09972842037677765, -0.3180663585662842, -0.7554172277450562, -0.3347148597240448, 0.13119915127754211, -0.18144765496253967, 0.04465622082352...
be of type EventTrigger". I've tried adding it to the trigger collection of the UserControl and StackPanel with no success. My trigger XAML looks like the following: ``` <DataTrigger Binding="{Binding ElementName=ToggleLaunch, Path=IsChecked}" Value="True"> <Setter TargetName="Launch" Property="UIElement.Visibilit...
[ 0.011950990185141563, -0.29180988669395447, 0.6385534405708313, -0.08226298540830612, -0.21643921732902527, -0.2703699469566345, 0.17926673591136932, -0.3709879219532013, 0.10125581920146942, -0.3650589883327484, -0.18450385332107544, 0.46587130427360535, -0.3794231116771698, -0.1925653964...
Storyboard.TargetName="LaunchButtons"> <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
[ 0.35427871346473694, -0.3317450284957886, -0.12877970933914185, 0.314192533493042, 0.2682921588420868, 0.01405426487326622, 0.05395267531275749, 0.19637000560760498, -0.05649535357952118, -0.4020789861679077, -0.12182632833719254, 0.5061159729957581, -0.10806302726268768, -0.25032141804695...
</ObjectAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger> <EventTrigger RoutedEvent="ToggleButton.Unchecked"> <BeginStoryboard> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyb...
[ -0.039948560297489166, -0.3126467168331146, 0.19955237209796906, 0.01231480948626995, -0.09166792035102844, 0.015214521437883377, 0.22598262131214142, -0.11270564794540405, -0.31018561124801636, -0.46199992299079895, -0.23435059189796448, 0.40621960163116455, -0.09880193322896957, -0.12823...
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger> ```
[ -0.045470111072063446, -0.24210557341575623, 0.14516901969909668, 0.0884610265493393, 0.1870833784341812, -0.12706561386585236, 0.0799061730504036, -0.0057438816875219345, -0.10256662219762802, -0.4295118749141693, -0.14342880249023438, 0.4583585560321808, 0.10812043398618698, 0.0630006343...
So I have an IP address as a string. I have this regex `(\d{1-3})\.(\d{1-3})\.(\d{1-3})\.(\d{1-3})` How do I print the matching groups? Thanks! ``` import java.util.regex.*; try { Pattern regex = Pattern.compile("(\\d\\{1-3\\})\\.(\\d\\{1-3\\})\\.(\\d\\{1-3\\})\\.(\\d\\{1-3\\})"); Matcher regexMatcher = regex....
[ -0.36772364377975464, -0.22114843130111694, 0.41294530034065247, -0.07686281204223633, 0.020129842683672905, -0.061185456812381744, 0.2510140836238861, -0.7223754525184631, 0.035287052392959595, -0.7305004000663757, -0.10279803723096848, 0.1746731698513031, -0.431815505027771, -0.278464585...
match end: regexMatcher.end(i) } } } catch (PatternSyntaxException ex) { // Syntax error in the regular expression } ```
[ -0.13549141585826874, -0.40419885516166687, 0.1767154037952423, -0.2511269748210907, 0.2540152072906494, -0.28139275312423706, 0.281719833612442, -0.15738464891910553, 0.0516519621014595, -0.43357786536216736, -0.08785980939865112, 0.5762069821357727, -0.743689775466919, -0.092046938836574...
Suppose the following table structure: ``` Event: id: integer start_date: datetime end_date: datetime ``` Is there a way to query all of the events that fall on a particular day of the week? For example, I would like to find a query that would find every event that falls on a Monday. Figuring out if the `star...
[ -0.0545046329498291, -0.017754891887307167, 0.43065133690834045, 0.019352350383996964, -0.006628800183534622, -0.2509719729423523, -0.038366734981536865, 0.10439494997262955, -0.3589403033256531, -0.5023677349090576, -0.025630313903093338, 0.31953713297843933, -0.16678498685359955, 0.23021...
does not handle stored procedures as well. ``` SELECT * FROM event WHERE EXISTS ( SELECT 1 FROM dual WHERE MOD(start_date - TO_DATE(1, 'J') + level - 1, 7) = 6 CONNECT BY level <= end_date - start_date + 1
[ -0.17254169285297394, -0.23497837781906128, 0.41925668716430664, -0.02572917751967907, 0.3515278398990631, -0.22434136271476746, 0.4009955823421478, -0.0364658460021019, -0.14256612956523895, -0.5935793519020081, -0.13103921711444855, 0.4249608516693115, -0.015864191576838493, 0.4353456199...
) ``` The subquery iterates all days from `start_date` to `end_date`, checks each day, and if it's a `Monday`, returns `1`. You can easily extend this query for more complex conditions: check whether an event falls on `ANY Monday OR Friday 13th`, for instance: ``` SELECT * FROM event WHERE EXISTS ( S...
[ 0.14173246920108795, -0.19618509709835052, 0.570281445980072, -0.21254383027553558, 0.23620596528053284, -0.12205708771944046, 0.3788303732872009, 0.061471689492464066, -0.3526220917701721, -0.3064762055873871, -0.3040253520011902, 0.35493162274360657, -0.007492616772651672, 0.570081651210...
OR (MOD(start_date - TO_DATE(1, 'J') + level - 1, 7) = 3 AND TO_CHAR(start_date + level - 1, 'DD') = '13') CONNECT BY level <= end_date - start_date + 1 ) ``` Note that I use `MOD(start_date - TO_DATE(1, 'J') + level - 1, 7)` instead of `TO_CHAR('D')`. This is because `TO_CHAR('D')` is...
[ -0.10580553859472275, -0.11488945037126541, 0.5692355632781982, -0.16861119866371155, 0.43936002254486084, -0.249596506357193, 0.3417067527770996, -0.13044586777687073, -0.1512504369020462, -0.7079563140869141, -0.3821740746498108, 0.5601641535758972, 0.26653364300727844, 0.476071506738662...
not be used for checking for a certain day of week. This query does not use any indexes and always performs a full table scan. But this is not an issue in this specific case, as it's highly probable that a given interval will contain a `Monday`. Even if the intervals are `1` day long, the index will return `14%` of v...
[ 0.032412074506282806, -0.25139734148979187, 0.4621601402759552, 0.08199714869260788, 0.060011126101017, -0.1510157436132431, 0.3690536618232727, 0.13164116442203522, -0.5201998353004456, -0.49248063564300537, -0.20360876619815826, 0.3680684566497803, -0.09512312710285187, 0.179129824042320...
extensibility. See the entry in my blog for more detail: * [**Checking event dates**](http://explainextended.com/2009/05/07/checking-event-dates/)
[ -0.15290987491607666, -0.2799750566482544, -0.028883522376418114, 0.19529949128627777, 0.08463571965694427, -0.5026770234107971, 0.40474003553390503, 0.2743120789527893, -0.148304283618927, -0.3356328010559082, -0.24464043974876404, 0.4888657033443451, -0.2535715401172638, 0.17416533827781...
How i can use IDisposable interface with asp.net mvc. This is not such a bad question as some might think. It's just asked in a wrong way. Consider the following code: ``` ActionResult UserList() { using (var ctx = new DbCtx()) { return View(ctx.Users) } } ``` Won't work since ctx is disposed long before view ...
[ 0.24502058327198029, -0.19294048845767975, 0.455233097076416, -0.03827621415257454, -0.03034178912639618, -0.19512689113616943, 0.23296621441841125, -0.257036417722702, -0.03496241942048073, -0.9515895247459412, 0.11120933294296265, 0.8090811967849731, -0.35338300466537476, 0.2465313374996...
When I try to create a soap object, I get a fault when I first initialize the class. I can't set driver.options["protocol.http.ssl\_config.verify\_mode"] = OpenSSL::SSL::VERIFY\_NONE because its already faulted. Any ideas? > require 'soap/wsdlDriver' > => [] > > > > > wsdl = "<https://somesiteinhttps.com>" > > d...
[ -0.2759220004081726, 0.1289239227771759, 0.3660268187522888, -0.050245288759469986, -0.2789729833602905, 0.3245109021663666, 0.8134481310844421, -0.7807496190071106, 0.06410546600818634, -0.4531616270542145, -0.13204337656497955, 0.5677449703216553, -0.5340768098831177, 0.2253509759902954,...
/usr/lib/ruby/1.8/wsdl/xmlSchema/importer.rb:30:in `import' from /usr/lib/ruby/1.8/wsdl/importer.rb:18:in `import' from /usr/lib/ruby/1.8/soap/wsdlDriver.rb:124:in `import' from /usr/lib/ruby/1.8/soap/wsdlDriver.rb:28:in `initialize' from (irb):15:in `new' from (irb):15>> driver = SOAP::WSDLDriverFactory.new(wsdl) ```...
[ 0.035895198583602905, -0.12759040296077728, 0.6310468912124634, -0.20497652888298035, 0.07552080601453781, 0.07260321825742722, 0.21828068792819977, -0.6825713515281677, -0.31604862213134766, -0.50107342004776, -0.29041168093681335, 0.7333143353462219, -0.4458763301372528, 0.17339389026165...
though.
[ 0.15222668647766113, 0.18374358117580414, 0.16491205990314484, 0.15662463009357452, 0.1170257031917572, -0.116843082010746, 0.013766837306320667, 0.07925733923912048, 0.018293000757694244, -0.1869489848613739, 0.09705705940723419, 0.1628899872303009, 0.028368176892399788, 0.045601882040500...
Looking for a way to add a background layer to existing photoshop files with c# code? Any ideas? Thanks -c Photoshop has a COM interface and here is a document on how to access it via C#. The specifics of what you want to do will require a bit more digging into Photoshops actual documentation, but [this will get you...
[ 0.6888834238052368, 0.278499037027359, 0.2484782487154007, 0.35880476236343384, -0.068396657705307, -0.24917812645435333, 0.12577170133590698, 0.2658037841320038, -0.2322886437177658, -0.47192490100860596, 0.05346627160906792, 0.6002798676490784, -0.11965572088956833, -0.1175977885723114, ...
I would like to take advantage of all the goodness of the newer Vector class for FP10, but it seems it is marked as final. I am doing some intensive mathematical processing in Actionscript, and repeatedly process arrays of Numbers. I have previously been using my own subclass of Array(I call it `NumericArray`), with a...
[ -0.05323968827724457, 0.05370020866394043, 0.2514670193195343, -0.1307469606399536, -0.2478622943162918, 0.22537486255168915, 0.15639209747314453, -0.26686039566993713, -0.08173684775829315, -0.757053017616272, 0.19536319375038147, 0.34143590927124023, -0.15882235765457153, -0.096603803336...
arrays. I want to use a Vector, as it provides some performance enhancements. I want to specifically use a `Vector.<Number>`. Unfortunately, I cannot subclass Vector as it is marked final. What is the best and cleanest way to imitate what I was previously doing with a subclass of Array, to a `Vector.<Number>`? I hav...
[ 0.3263436555862427, -0.1565571278333664, 0.16691209375858307, 0.0694679468870163, -0.293459951877594, 0.08592482656240463, -0.09159491211175919, -0.1365896463394165, -0.27732014656066895, -1.0561878681182861, 0.2035200297832489, 0.5860528349876404, -0.5045056343078613, 0.1115720197558403, ...
could create a wrapper class for the Vector. Something along these lines? ``` import flash.utils.Proxy; import flash.utils.flash_proxy; use namespace flash_proxy; public class NumericVector extends Proxy { private var vector:Vector.<Number>; public function NumericVector(vector:Vector.<Number> = null) ...
[ -0.16754190623760223, -0.22552752494812012, 0.34285077452659607, -0.03638690337538719, -0.21622391045093536, 0.19106630980968475, -0.07040106505155563, -0.08030527830123901, -0.07111803442239761, -0.7115684747695923, -0.08304866403341293, 0.47759512066841125, -0.4496101140975952, 0.0561442...
{ this.vector = vector; } } override flash_proxy function nextName(index:int):String { return vector[index - 1].toString(); } override flash_proxy function nextNameIndex(index:int):int { // implementation }
[ -0.4130220413208008, -0.20832309126853943, 0.5531167984008789, -0.20399893820285797, -0.016139991581439972, -0.027621978893876076, -0.10508309304714203, -0.28176021575927734, -0.0654144287109375, -0.7089159488677979, -0.09693150967359543, 0.6027470827102661, -0.35495859384536743, 0.1066899...
public function sum():Number { // do whatever you intend to do } ... } ```
[ -0.02534942887723446, 0.0727422758936882, 0.044009216129779816, 0.04082288593053818, -0.1089261919260025, -0.0003043206233996898, 0.0060332538560032845, -0.20336787402629852, -0.12947125732898712, -0.21516293287277222, -0.3820849657058716, 0.458125501871109, -0.6223602294921875, 0.04332144...
How do I programatically take a screenshot of an application in Linux? I'm using c++. Any idea? For windows there are a lot of resources but I can't find anything for linux Any help? Thanks If you just want a screen recorder, try using [xvidcap](http://xvidcap.sourceforge.net/). If you want to make your own, try looki...
[ 0.731990396976471, -0.03543539345264435, 0.05783173814415932, 0.3352683484554291, -0.06485563516616821, -0.3840634822845459, 0.019978070631623268, 0.5310584306716919, -0.3400365710258484, -0.7689088582992554, 0.36491096019744873, 0.5788456797599792, -0.14822396636009216, 0.2075090557336807...
I'm planning to develop a web application that targets the iPhone. I will use APT.NET to develop the application. I will probably use ASP.NET MVC. I'm researching how I will imitate the native iPhone look and feel in my web application. I'm looking for an approach that will be easy to use with the ASP.NET platform. ...
[ 0.5499957799911499, 0.17944739758968353, 0.05788279324769974, 0.07866452634334564, -0.30854514241218567, 0.3393414616584778, 0.15484867990016937, 0.10582594573497772, -0.0031765440944582224, -0.9065992832183838, 0.05946400389075279, 0.4835701584815979, -0.09554826468229294, -0.082016058266...
imitate the native iPhone look and feel in a web app developed with the ASP.NET platform? Regards, Syl Take a look at these: 1. [Rock the iPhone with ASP.NET MVC](http://www.aaronlerch.com/blog/2008/06/08/rock-the-iphone-with-aspnet-mvc/) 2. [Create iPhone Applications using ASP.NET AJAX](http://steveorr.net/article...
[ 0.28161293268203735, 0.2583919167518616, 0.008072271011769772, 0.08119359612464905, -0.2285909801721573, 0.006627305876463652, 0.38415881991386414, -0.2596684694290161, -0.18729595839977264, -0.24679231643676758, 0.2923825681209564, 0.5068777203559875, -0.24376587569713593, -0.213754266500...
I have some static resources (images and HTML files) that will be localized. One piece of software I've seen do this is Apache, which appends the locale to the name; for example, `test_en_US.html` or `test_de_CH.html`. I'm wondering whether this naming scheme is considered standard, or whether every project does it dif...
[ 0.43262988328933716, 0.32678213715553284, 0.442080020904541, 0.006071474403142929, -0.11384759098291397, -0.40073275566101074, 0.3503364622592926, 0.2885690927505493, -0.1527174562215805, -0.6789652705192566, -0.5175966024398804, -0.11803434044122696, -0.04956277832388878, 0.32471361756324...
for UK English) Why? This is the most typical format used by operating systems, globalization tools (such as Trados and WorldServer), and programming languages. So unless you have a particular fondness for a different format, I see no reason to deviate from what most other folks are doing. It may save you some integra...
[ 0.2968417704105377, -0.06337955594062805, 0.3102717101573944, -0.049563199281692505, -0.015513165853917599, -0.1857617348432541, 0.10294991731643677, 0.6260027885437012, -0.14939750730991364, -0.41162726283073425, -0.2640405297279358, 0.6136571764945984, -0.14965583384037018, -0.3837469220...
I'm experimenting with a tagging system which is a many-to-one relationship. My schema is: **items** table: * item\_id * comment **comment \_ tags**: * item\_id * tag\_id **tags** table: * tag\_id * tag\_name I've been reading of implementation designs at the links at the bottom but got stuck. I can insert tags ...
[ 0.36540624499320984, 0.16240690648555756, 0.3165096640586853, -0.241136834025383, -0.13921239972114563, 0.26165565848350525, -0.24777641892433167, -0.5448540449142456, -0.25573426485061646, -0.6371316909790039, 0.06302317976951599, 0.5776137709617615, -0.28219664096832275, 0.20560696721076...
Can anyone tell me what's wrong with this code? ``` class Dataset < ActiveRecord::Base has_many :dataitems def self.get_hash(dataset_id) @dataitems = Dataset.find_by_id(24).dataitems @dataitems.each do |di| dataset_hash[di.axis0value] = di.axis1value #assign value for each category value end return ...
[ -0.00025940575869753957, 0.023240260779857635, 0.5842762589454651, 0.27376532554626465, -0.1686253845691681, -0.31426993012428284, 0.9094128012657166, -0.40425968170166016, -0.15305736660957336, -0.5716487169265747, 0.08981306850910187, 0.7216295599937439, -0.3165012001991272, 0.2249761074...
1[0m [4;36;1mDataitem Load (0.000646)[0m [0;1mSELECT * FROM dataitems WHERE (dataitems.dataset_id = 24) [0m NameError (undefined local variable or method `dataset_hash' for Dataset:Class): /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ba...
[ -0.061880744993686676, -0.05154401808977127, 0.6767623424530029, -0.026930253952741623, 0.04180885851383209, -0.13422679901123047, 0.5208643078804016, -0.6425135135650635, -0.35138222575187683, -0.36355212330818176, -0.1049797311425209, 0.6476621627807617, -0.34812742471694946, 0.040097955...
I need to redirect users to the Change Password page if their password has expired. I want to place this code in one place so that any request can be redirected to the change password page. I've looked into extending the AuthorizeAttribute, and overriding OnActionExecuting, but neither work/allow me to short circuit ...
[ 0.024180449545383453, 0.06382125616073608, 0.9040624499320984, -0.14553171396255493, 0.28195255994796753, 0.030183618888258934, 0.31183040142059326, -0.3262183964252472, -0.11398077756166458, -0.7575788497924805, 0.0008895671926438808, 0.35832905769348145, -0.26199549436569214, 0.204581186...
think I'm going to go with extending the AuthorizeAttribute. I'll use that everywhere ***except*** the password change controller methods. ``` public class DenyExpiredPasswordAttribute : AuthorizeAttribute { public override void OnAuthorization(AuthorizationContext filterContext) { IPrincipal user = fi...
[ 0.13482050597667694, -0.1455250084400177, 0.6950913667678833, -0.3039807379245758, 0.45215192437171936, -0.24833406507968903, 0.3874906003475189, -0.3370596468448639, -0.07304276525974274, -0.6716102361679077, -0.13244642317295074, 0.5325388312339783, -0.4034971296787262, 0.102198608219623...
if (CurrentUser.PasswordExpired) // your checking of password expiration { filterContext.HttpContext.Response.Redirect("~/Account/ChangePassword?reason=expired"); } } } base.OnAuthorization(filterContext); } } ``` this works fine, jus...
[ 0.008557802066206932, -0.2059006690979004, 0.7117992639541626, -0.2658349871635437, 0.4453551471233368, -0.3650452196598053, 0.33179259300231934, -0.35866779088974, -0.1119060292840004, -0.7707535028457642, -0.029933366924524307, 0.46912339329719543, -0.2237692028284073, 0.0261141043156385...
every controller with this attribute exclude "Account" one. This way no user with expired attribute able to continue until change password.
[ 0.05077049136161804, -0.2894490361213684, 0.5586876273155212, 0.4208292067050934, 0.19403809309005737, -0.5672924518585205, 0.24222788214683533, 0.11872611939907074, -0.3703981041908264, -0.3497973680496216, -0.13803547620773315, 0.1825578361749649, -0.25249165296554565, 0.3611918389797210...
I would like to produce a character list of all of the first letters of column in my database. The SQL below illistrats what I would like to return. ``` SELECT DISTINCT first_character(name) FROM mydatabase ``` Is there a way to do this in MySQL? **EDIT** What is the advantage of using SUBSTRING over LEFT and vice...
[ -0.16535574197769165, 0.3557330369949341, 0.4258314371109009, -0.1022864431142807, -0.032222505658864975, 0.4507383108139038, -0.057411592453718185, 0.07882016897201538, -0.3393516540527344, -0.8309363722801208, 0.23534029722213745, 0.19107647240161896, -0.1067851260304451, 0.3009697794914...
added changed it to the following to get it the list in alpha-numeric order: ``` SELECT DISTINCT LEFT(name, 1) as letter FROM mydatabase ORDER BY letter ``` Works like a charm.
[ -0.0856538712978363, 0.12840202450752258, 0.6189091205596924, -0.22425392270088196, -0.35540837049484253, -0.010939610190689564, 0.14788571000099182, -0.09388729184865952, -0.00013549190771300346, -0.4617244303226471, -0.09097794443368912, 0.1522294580936432, -0.0765906572341919, 0.2774207...
In the tutorials for ASP.Net MVC, the LINQ to Entities code looks like: ``` public class MyController : Controller { private Models db; public ActionResult Index() { db = new Models(); var foo = (from f in db.foo select f).ToList(); return View(foo); } } ``` I'm guessing this...
[ 0.03131502866744995, -0.26875850558280945, 0.6301149725914001, 0.03509726747870445, 0.16746769845485687, -0.082839734852314, 0.16962802410125732, -0.22434435784816742, -0.5444617867469788, -0.278782457113266, -0.11862195283174515, 0.5590577721595764, -0.390272855758667, 0.28456053137779236...
this way: ``` public class MyController : Controller { private readonly Models db = new Models(); public ActionResult Index() { var foo = (from f in db.foo select f).ToList(); return View(foo); } } ``` I just put together a tip that covers this in quite a lot of detail. Your educate...
[ 0.2977581322193146, -0.4044594466686249, 0.46161773800849915, 0.08375589549541473, 0.15901020169258118, -0.12148746103048325, 0.1464194506406784, -0.30654340982437134, -0.4607190191745758, -0.5058490037918091, -0.11955614387989044, 0.6201026439666748, -0.4889200031757355, 0.218574494123458...
situations where this rule of thumb doesn't hold but they are pretty rare. See this: [Tip 18 - How to decide on a lifetime for your ObjectContext](http://blogs.msdn.com/alexj/archive/2009/05/07/tip-18-how-to-decide-on-a-lifetime-for-your-objectcontext.aspx)
[ -0.09616633504629135, -0.4683815836906433, 0.6224491000175476, 0.21558572351932526, 0.4745151996612549, -0.4399554133415222, -0.07434823364019394, -0.10306736081838608, -0.4494507312774658, -0.23049595952033997, -0.1524236649274826, 0.5062335133552551, -0.30209463834762573, -0.037741150707...
After the user fills my backing bean with info through the forms, I want to process the instance in Java code (such as JAXB marshalling). So at the moment i'm doing this like so: ``` <% OtherBean.method(myBackingBean); %> ``` which is - if i'm right - not quite an up to date solution :) So how can I make this happe...
[ 0.09244870394468307, 0.2164335697889328, 0.08511769771575928, -0.12322437018156052, 0.01968764141201973, -0.03555544465780258, 0.20365630090236664, -0.21939848363399506, -0.020914612337946892, -0.5390739440917969, -0.07634244859218597, 0.3996679484844208, -0.47326719760894775, 0.0670587271...
{ // TODO: real work System.out.println("forename=" + forename); System.out.println("surname=" + surname); return null; // optional navigation rule } public String getForename() { return forename; } public void setForename(String forename) { this.forename = forename; } public Stri...
[ -0.022410336881875992, -0.16636711359024048, 0.4938904345035553, -0.31986454129219055, 0.24633781611919403, 0.1878805160522461, 0.3255215883255005, -0.39209771156311035, -0.20988763868808746, -0.8352294564247131, -0.43326014280319214, 0.5324607491493225, -0.290029376745224, 0.0825648903846...
the this JSP: ``` <?xml version="1.0" encoding="UTF-8" ?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <jsp:directive.page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" /> <jsp:t...
[ -0.12298141419887543, -0.0875089094042778, 0.6661553978919983, -0.3003321588039398, -0.2311929315328598, -0.11783897131681442, -0.14993759989738464, -0.5583718419075012, -0.284464955329895, -0.790076732635498, -0.4357357919216156, 0.40184301137924194, -0.3159961700439453, -0.24260208010673...
<h:outputText value="surname:" /> <h:inputText id="it2" value="#{simpleBean.surname}" /> </h:panelGrid> <h:commandButton action="#{simpleBean.processData}" value="process" /> </h:form> </f:view> </body> </html> </jsp:root> ``` Note the method binding #{simpleBean.processData}. Th...
[ -0.07739264518022537, -0.10047470778226852, 0.532062828540802, -0.32595881819725037, -0.21024583280086517, 0.046068768948316574, 0.05938413739204407, -0.37245282530784607, -0.21834696829319, -0.48354411125183105, -0.5360218286514282, 0.4265592396259308, -0.35686951875686646, -0.11772246658...
I have a basic question, in the Django template language how can you tell if you are at the last loop iteration in a `for` loop? You would use [`forloop.last`](http://docs.djangoproject.com/en/dev/ref/templates/builtins/#for). For example: ``` <ul> {% for item in menu_items %} <li{% if forloop.last %} class='last'...
[ 0.1965530961751938, -0.09404581040143967, 0.2826845347881317, -0.2330692708492279, 0.04368705675005913, -0.06618903577327728, -0.12303882092237473, -0.20780174434185028, -0.23162826895713806, -0.7329950928688049, 0.0016994716133922338, 0.2864590287208557, -0.1727266013622284, -0.0181179381...
I have a web site that spits out links to third party sites. Now these third parties want MY site to track their clicks. How do I do this without ruining the SEO-friendly nature of a plain link? Currently an ad link is just an anchor: ``` <a href="http://adsiteA.com">Come Visit Site A!</a> ``` I can easily change t...
[ 0.6530157923698425, 0.3995573818683624, 0.5315203666687012, -0.09931129217147827, -0.1816418170928955, -0.30164310336112976, 0.16180504858493805, 0.11320781707763672, -0.26490479707717896, -0.3495277464389801, 0.16229644417762756, 0.4151032269001007, -0.5126296877861023, 0.2007102817296981...
says they're not supposed to benefit your advertiser's PageRank. (In fact you could get penalized for trying to subvert this) <http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=66736>
[ 0.7531402707099915, 0.13378088176250458, 0.3983023464679718, 0.42696529626846313, -0.04892696812748909, -0.1608062982559204, 0.37328267097473145, -0.2738923728466034, -0.22782792150974274, 0.02006932720541954, -0.13359414041042328, 0.11299466341733932, -0.11766990274190903, -0.103473260998...
Visual Studio is x86 until ~~at least the 2010 release comes around~~ **update:** this is still an issue in VS2010, there is no native 64bit Cassini support. My question is can anyone think of a way or know of an independent ASP.NET debug server that's x64 for 2008 or 2010? Background: Our ASP.NET application runs aga...
[ 0.43458980321884155, 0.028399493545293808, 0.2090221345424652, 0.09243215620517731, -0.5480257868766785, -0.09799446910619736, 0.1610282063484192, 0.1540115922689438, -0.1423233300447464, -0.46046027541160583, -0.04190894588828087, 0.7050132751464844, -0.11878833174705505, -0.0479944236576...
~~Visual Studio 2008 SP1~~ Visual Studio 2010 In IIS the application pool runs as 64-bit, uses the Oracle drivers as intended, however since **WebDev.WebServer.exe** is 32-bit you'll get a **BadImageFormatException** because it's trying to load 64-bit driver DLLs in a 32-bit environment. All of our developers would li...
[ -0.23822693526744843, 0.11269157379865646, 0.3140650689601898, 0.0065415361896157265, -0.47184911370277405, 0.05176234245300293, 0.22393298149108887, -0.06471551209688187, 0.026079226285219193, -0.5127453804016113, -0.046246033161878586, 0.6895666122436523, -0.4145359396934509, -0.15649563...
We would like to match our Dev/Val/Prod tiers as much as possible, so everything running in x64 would be ideal. --- **Update for VS 2010** ---------------------- A lot of changes to this question since it was first posted, first VS2010 is out now, it still has the same issues here, however the project I'm on does no...
[ 0.6172422170639038, -0.1518179327249527, 0.4852931499481201, 0.19608819484710693, -0.2940475046634674, -0.10469669103622437, 0.40769684314727783, -0.17034046351909637, -0.12818776071071625, -0.8310902714729309, 0.18827413022518158, 0.8776258230209351, -0.14638037979602814, -0.1835464090108...
web.config, like this: ``` <configuration> <runtime> <assemblyBinding> <dependentAssembly> <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" processorArchitecture="amd64" /> <bindingRedirect oldVersion="2.0.0.0-10.9.9.9" newVersion="2.102.3.2" /> </depende...
[ 0.05770949274301529, -0.16484834253787994, 0.4589371681213379, -0.010862048715353012, -0.02749796025454998, -0.13093559443950653, 0.17262621223926544, -0.14137737452983856, -0.3170296847820282, -0.8516368269920349, 0.08525905013084412, 0.39553993940353394, -0.4987616539001465, 0.0378647856...
of `Oracle.DataAccess` [into the GAC](http://msdn.microsoft.com/en-us/library/dkkx7f79.aspx). The 32-bit versions are `10.xxx` for Oracle 10g, the 64-bit versions are `2.1xxx`, so just [swapping the binding using `<assemblyBinding>` works](http://msdn.microsoft.com/en-us/library/7wd6ex19(VS.71).aspx). The second, more...
[ 0.2051035761833191, 0.08726756274700165, 0.40049800276756287, -0.0442507341504097, -0.0946950688958168, -0.18911206722259521, 0.1777212768793106, -0.18359684944152832, -0.10410679131746292, -0.376950204372406, -0.19199278950691223, 0.5020219683647156, -0.37444981932640076, 0.13788846135139...
try and explain in more detail. Two ideas: 1. Cobble something together with XSP from the [Mono](http://www.mono-project.com/) project. 2. Test in a totally 32bit environment, deploy to a 64bit environment.
[ 0.5746809840202332, -0.21805880963802338, -0.4720683693885803, 0.21020427346229553, -0.10904651135206223, -0.4508267045021057, 0.08959504216909409, -0.4535132646560669, 0.02232844941318035, -0.36695364117622375, -0.10986100137233734, 0.4622223377227783, -0.5040619969367981, -0.371580481529...
This is a very generic 'best practice' question, but here's an example. Let's say I have a movie cataloging app. I want to give my users the chance to specify, say, IMDb or Metacritic for their synopsis/ rating info. Do I do this: ``` if (preferredSupplier == "imdb"){ getIMDbRating(movieName); }else{ get...
[ 0.42612940073013306, 0.08376257866621017, 0.4607701301574707, 0.12160000205039978, -0.017006298527121544, -0.34987884759902954, -0.10553548485040665, -0.27773740887641907, 0.06436228007078171, -0.5303701162338257, 0.16911940276622772, 0.913947343826294, -0.03457752987742424, 0.130509361624...
combine them? As in getRating() acts as a wrapper function, and calls getIMDbRating() or getMetacriticRating() depending on the value of the second param. The second one allows you to extend the number of preferred suppliers over time, and you can still (internally) implement these as two seperate methods. If this wer...
[ 0.9733834862709045, -0.538213312625885, 0.470477819442749, 0.09031691402196884, 0.08726724237203598, 0.2143104374408722, -0.14536592364311218, -0.5662460327148438, -0.14103303849697113, -0.5867554545402527, 0.37096279859542847, 0.5893679857254028, -0.3337373733520508, -0.029087083414196968...
whether you need to go to town on this, but an API where you can getRatings in a uniform way regardless of where they actually came from would, to me, be a better API than one where you have to make those decisions by chosing one method or the other.
[ 0.686581552028656, 0.06807443499565125, -0.06684635579586029, 0.27118125557899475, -0.11065972596406937, 0.17884743213653564, 0.08987398445606232, -0.2582584321498871, -0.10254044830799103, -0.3153620958328247, 0.29923781752586365, 0.36399930715560913, 0.07184523344039917, -0.2067752927541...
I'd like to create a deferrable unique functional index in Oracle 10g. I know how to create a unique functional index: ``` create unique index LIST_ITEM_ENTRY_NO_UNIQ on LIST_ITEM (case status when 'cancel' then null else LIST_KEY end, case status when 'cancel' then null else ENTRY_NO end); ``` I know...
[ -0.28500673174858093, 0.18138517439365387, 0.21233198046684265, 0.1997314691543579, -0.39646387100219727, 0.0198418777436018, -0.1386021375656128, -0.4682856798171997, -0.017250455915927887, -0.5741088390350342, 0.3349555432796478, 0.6135159134864807, -0.34084025025367737, 0.49927988648414...
STATUS when 'cancel' then null else ENTRY_NO end) deferrable initially deferred; ``` But I get an "ORA-00904 : invalid identifier" error. Either I've got the syntax wrong, or perhaps Oracle doesn't support deferrable functional indices? Could someone provide me with a solution or else a definitive answer? Nice try, b...
[ -0.09359659999608994, 0.0925634503364563, 0.3612349033355713, 0.07110259681940079, 0.12448465824127197, -0.13190941512584686, 0.11074458807706833, -0.17472976446151733, -0.1133107990026474, -0.49439501762390137, -0.20479996502399445, 0.7300615310668945, -0.36649206280708313, 0.050908036530...
| table_index_clause | bitmap_join_index_clause } ; table_index_clause ::= [ schema. ]table [ t_alias ] (index_expr [ ASC | DESC ] [, index_expr [ ASC | DESC ] ]...) [ index_properties ] index_expr ::= { column | column_expression } ``` Therefore CREATE INDEX allows column\_expr...
[ -0.44641366600990295, 0.04974003881216049, 0.7541136145591736, 0.05593830719590187, 0.03638364002108574, -0.024222614243626595, 0.02707005850970745, -0.5879798531532288, -0.13644170761108398, -0.37055686116218567, -0.25395482778549194, 0.4950081706047058, -0.547731339931488, 0.011637600138...
constraint_clauses | alter_table_partitioning | alter_external_table_clauses | move_table_clause ] [ enable_disable_clause | { ENABLE | DISABLE } { TABLE LOCK | ALL TRIGGERS } [ enable_disable_clause | { ENABLE | DISABLE } { TABLE LOCK | ALL TRIGGERS } ]... ] ; constraint_clauses ::...
[ -0.43782490491867065, -0.20983824133872986, 0.7068357467651367, -0.11730318516492844, 0.13175927102565765, 0.2679719924926758, 0.19257541000843048, -0.6055118441581726, -0.3509133458137512, -0.2773675322532654, -0.3912889063358307, 0.4473620653152466, -0.8996277451515198, -0.28366675972938...
| PRIMARY KEY | UNIQUE (column [, column ]...) } constraint_state | RENAME CONSTRAINT old_name TO new_name | drop_constraint_clause } out_of_line_constraint ::= [ CONSTRAINT constraint_name ] { UNIQUE (column [, column ]...) | PRIMARY KEY (column [, column ]...) | FOREIGN KEY (column [, colu...
[ -0.4804363250732422, 0.12607157230377197, 0.5040568709373474, -0.09170593321323395, 0.15282973647117615, 0.13818609714508057, 0.1406894326210022, -0.615920901298523, -0.3232593238353729, -0.6018493175506592, -0.3231295347213745, 0.3631974458694458, -0.42448654770851135, 0.3387932777404785,...
earlier most people tend to create derived columns (along with the burden of keeping them up-to-date programmatically).
[ 0.06851331144571304, 0.11335421353578568, 0.05773336812853813, 0.08720505982637405, -0.08678371459245682, 0.08251834660768509, 0.059059225022792816, -0.12528657913208008, -0.11158185452222824, -0.5344884395599365, -0.20393595099449158, 0.045443225651979446, 0.03748616576194763, -0.20040214...
I'm looking for a Log4J Layout/Formatter that helps me prune stack-traces in exceptions a little better than the defaults. That the stack-execution is somewhere below main() is quite obvious and unnecessary for me to know, and that the exception occurred deeply within some other library is really nothing I can do too m...
[ 0.27812790870666504, 0.20409883558750153, -0.020875276997685432, 0.10733278095722198, -0.010079490020871162, 0.10061780363321304, 0.2430395483970642, -0.3121066987514496, -0.35456007719039917, -0.5700996518135071, 0.33419638872146606, 0.3142450153827667, -0.058820661157369614, -0.108167365...
for this as well but didn't find anything satisfactory so I wrote up a custom ThrowableRenderer which prunes out extraneous stack frames. I've open sourced the code for others to use. Check out my [blog post](http://blog.delphix.com/zubair/log4j-stack-trace-pruning/) on it; you can find a link to the code there.
[ 0.4639045000076294, -0.02607836201786995, 0.01867927983403206, -0.12491517513990402, -0.029403310269117355, -0.2151174545288086, 0.017078248783946037, -0.20036581158638, -0.29843568801879883, -0.4562043845653534, 0.04192625358700752, 0.2196013629436493, -0.22667337954044342, 0.077486380934...
I would want to search up, down, and match case if possible. Even links to get me started would be appreciated. Not sure about the up searching but as far as finding you can use something like this ``` int selStart = ControltoSearch.SelectionStart; int selLength = ControltoSearch.SelectionLength; int newLength = Searc...
[ -0.034297242760658264, -0.04082631319761276, 0.6889506578445435, -0.09273611754179001, 0.07553000003099442, 0.08131404966115952, 0.25132790207862854, -0.3240593373775482, 0.034445781260728836, -0.7462477087974548, -0.3183635175228119, 0.5855046510696411, -0.2645942270755768, 0.224273473024...
Is there a way to have `\n` make a line break in a `TextBlock`? ``` <TextBlock Text="line1\nLine2" /> ``` Or is there a better way to force a middle line break, inside the `Text` attribute? ``` <LineBreak /> ``` This doesn't work for me, it needs to be the value of the `Text` attribute, because the text string is...
[ -0.027739958837628365, -0.2008455991744995, 0.42234376072883606, -0.028364399448037148, -0.1042347326874733, 0.06770370900630951, 0.49576228857040405, -0.2316957414150238, -0.18246230483055115, -0.5865246057510376, -0.3463793694972992, 0.44983983039855957, -0.5304014682769775, -0.130505025...
more of the HTML encoded characters check out [w3schools](http://www.w3schools.com/TAGS/ref_ascii.asp)
[ 0.18259577453136444, -0.23365147411823273, 0.1133122369647026, -0.0034993356093764305, -0.10251738131046295, -0.20589114725589752, 0.25116097927093506, -0.07601750642061234, -0.5171916484832764, -0.6140366196632385, -0.4836164116859436, -0.11600647866725922, -0.2962706387042999, -0.0938660...
I have a directory on my webserver. It does not have an index page. so when u access the directory via a web browser it lists the files in it. Now i want to create a htaccess file that can block the directory listing so that when you access it via the web browser, the files in the directory would not be listed but woul...
[ 0.459188312292099, 0.3330453038215637, 0.4658184349536896, 0.15997815132141113, -0.08949969708919525, -0.22489884495735168, -0.13791009783744812, 0.10219208896160126, -0.1643446683883667, -0.6047449707984924, 0.1404392570257187, 0.36486080288887024, -0.3094315230846405, 0.5383325219154358,...
to restrict access from all but files with a particular extention. Thanks. ``` Options -Indexes Order allow,deny Deny from all <Files "*.gif"> Allow from all Deny from none </Files> ```
[ -0.04615026339888573, 0.2284599095582962, 0.3282668888568878, 0.2314305156469345, -0.030206264927983284, -0.4319128394126892, 0.25596609711647034, -0.11607219278812408, -0.24337950348854065, -0.3334973156452179, -0.3588312864303589, 0.5245658159255981, -0.32178622484207153, 0.4035990536212...
I'm working on a Map Editor for an XNA game I'm designing in my free time. The pieces of art used in the map are stored on a single texture and rectangles are stored with coordinates and widths etc. In the winforms application I can add segments by selecting the segment I want from a listbox, which is populated from ...
[ 0.4056374132633209, 0.08639604598283768, 0.04799603298306465, 0.16374114155769348, -0.21861149370670319, 0.11439497768878937, -0.14646659791469574, 0.1003849133849144, -0.22010792791843414, -1.1362859010696411, 0.3754000961780548, 0.46894371509552, -0.1996438354253769, 0.03972679376602173,...
Is there anyway of using the rectangle information (.x, .y, .width, .height) to display only the section of the image in a picturebox, or to blit the section to a bitmap and display that? Many Thanks Michael Allen You probably want to look into the GDI library. Using the Image or Bitmap object and the Graphics.DrawIm...
[ 0.3223600685596466, -0.14892259240150452, 0.46954146027565, 0.07178239524364471, -0.03687715157866478, 0.0610855370759964, 0.09542234987020493, -0.41372284293174744, -0.21124884486198425, -0.8733580112457275, -0.17760063707828522, 0.6249929070472717, -0.4599391222000122, -0.312488615512847...
Create rectangle for source image. Rectangle srcRect = new Rectangle(50, 50, 150, 150); GraphicsUnit units = GraphicsUnit.Pixel; // Draw image to screen. e.Graphics.DrawImage(newImage, destRect, srcRect, units); } ``` You also might be interested in using XNA within your WinForm instead of using Pict...
[ 0.2968338429927826, -0.47086799144744873, 0.4593628942966461, -0.01537669263780117, -0.23709088563919067, 0.09074714779853821, -0.04249207675457001, -0.37764397263526917, -0.17790184915065765, -0.8850645422935486, -0.030353141948580742, 0.36526304483413696, -0.1630292385816574, 0.134857669...
I'm implementing a datasource object for an UIScrollView. Is that part of the Controller, or part of the Model? I think Controller, but not sure. It delivers the data. But the data could be in sqlite3, files, from the net. So actually I would say it's not from the Data part, since it should be flexible to from where th...
[ 0.36015740036964417, -0.18361476063728333, 0.5889265537261963, 0.21693098545074463, -0.12783531844615936, 0.07208796590566635, -0.31306198239326477, 0.2478102594614029, -0.18483072519302368, -0.6761420965194702, 0.10117578506469727, 0.6393192410469055, -0.08831548690795898, 0.2945839464664...
I am writing a C++ application and I was wondering what the C++ conventional way of storing a byte array in memory. Is there something like a string, except specifically made for binary data. Right now I am using a \*unsigned char\*\* array to store the data, but something more STL/C++ like would be better. I'd use...
[ 0.12810344994068146, 0.05330057814717293, 0.08220570534467697, -0.05095149949193001, -0.02733471803367138, 0.04512810707092285, 0.06323130428791046, 0.02765817381441593, -0.28273069858551025, -0.47131288051605225, 0.0008803713135421276, 0.7274641394615173, -0.3015747666358948, -0.120671309...
If I do **not** create an "Edit->Copy" menu item and assign it the shortcut keys "CTRL+C", then I can select a control (RichTextBox, DataGridView, etc..) and hit "CTRL+C" and the control itself will handle the copy. I can copy text out, and paste it into notepad, etc.. Now throughout my whole form, I have a lot of con...
[ 0.12667162716388702, -0.0014129838673397899, 0.6849324107170105, -0.12859155237674713, 0.07852020114660263, -0.1937953531742096, 0.27246996760368347, 0.03858489915728569, 0.01223643496632576, -0.7454330325126648, -0.3251246511936188, 0.7209162712097168, -0.3148649036884308, 0.0672290697693...
'click' event on that menu item. If I explicitly put in code to handle the copy, then it works: ``` public void menuEditCopy_Click(object sender, EventArgs e) { myCustomControl.Copy(); } ``` However, now Copy does not work on any other type of control. My first inclination was to find out the type of control tha...
[ 0.04704016447067261, -0.07685661315917969, 0.5305160284042358, -0.05367889255285263, 0.26338428258895874, -0.10354314744472504, 0.06058763712644577, 0.0012486933264881372, -0.07054423540830612, -0.5762125849723816, -0.3537520170211792, 0.7919051051139832, -0.6137533783912659, 0.06829227507...
is RichTextBox) { ((RichTextBox)this.ActiveControl).Copy(); } } ``` etc... However, my controls are added to a SplitContainer, and debugging shows that this.ActiveControl is set to the splitcontainer instance, not the control, even though I know that control is selected. So my last thought is to lit...
[ 0.01626325212419033, -0.511345624923706, 0.6313146948814392, 0.0032764081843197346, 0.2185823917388916, -0.20286573469638824, 0.1713683009147644, 0.12114472687244415, -0.09285502135753632, -0.6727341413497925, -0.517013669013977, 0.7878499031066895, -0.5846554040908813, -0.0483462698757648...
richTextBox1.Copy(); } } ``` I would like to avoid this if possible, it is a lot of controls, and if I add a new control, I would need to update it. Is there a better way of doing this? Thanks A `SplitContainer` implements `ContainerControl`, so you could check for either one and look for it's `ActiveControl` in...
[ -0.1926797777414322, -0.3522152304649353, 0.08140529692173004, 0.06952544301748276, 0.13780419528484344, -0.3401276171207428, 0.10127054154872894, 0.0014151810901239514, -0.06352241337299347, -0.7331795692443848, -0.19571703672409058, 0.6018620133399963, -0.712731659412384, 0.0831958353519...
is MyCustomControl) ((MyCustomControl)control).Copy(); else if(control is RichTextBox) ((RichTextBox)control).Copy(); else throw new NotSupportedException("The selected control can't copy!"); } void menuEditCopy_Click(object sender, EventArgs e) { DoCopy(this.ActiveControl); } ```
[ -0.21439477801322937, -0.22806090116500854, 0.5727512240409851, 0.02827076055109501, 0.48126259446144104, -0.21236644685268402, 0.3508955240249634, -0.1948152631521225, -0.1157274916768074, -0.5265721082687378, -0.6556478142738342, 0.7234175801277161, -0.5695796012878418, 0.363878846168518...
I have a program that receives an audio (mono) stream of bits from TCP/IP. I am wondering whether the speech (speech-recognition) API in Mac OS X would be able to do a speech-to-text transform for me. (I don't mind saving the audio into .wav first and read it as oppose to do the transform on the fly). I have read the...
[ 0.5044602155685425, 0.1498466432094574, 0.16419227421283722, 0.1636730581521988, -0.2639729976654053, -0.09926477074623108, 0.3702515661716461, -0.005583576392382383, 0.08135827630758286, -0.550675094127655, -0.11872398108243942, 0.7680143117904663, -0.2466842085123062, 0.14224857091903687...
you install XCode. Cocoa class for speech recognition is [NSSpeechRecognizer](http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSSpeechRecognizer_Class/index.html). I've not used it but as far as I know speech recognition requires you to build a grammar to help the engine choose from a n...
[ 0.30344700813293457, 0.36377188563346863, 0.07117356359958649, -0.19953304529190063, -0.14163443446159363, -0.08860012143850327, 0.4349973201751709, 0.3789472281932831, -0.13268119096755981, -0.8606886863708496, -0.1852491945028305, 0.39759963750839233, -0.30931708216667175, -0.19673365354...
Our team is now beginning to look at jumping from 2.0 to 3.5 and have been reviewing all the new stuff.... So, with the whole Linq to SQL not being heavily improved in the future should we ignore it completely? It seems that it may fit of our needs very well BUT I imagine so could entity framework even if it may add ...
[ 0.2525324523448944, 0.07189422845840454, 0.34762799739837646, 0.17318423092365265, -0.05809670314192772, -0.421631395816803, 0.07851457595825195, -0.11246757209300995, -0.25419366359710693, -0.5162789225578308, 0.13879624009132385, 0.6555318832397461, -0.4385349452495575, -0.11813739687204...
it is simpler, and when you finish your application, and are looking at optimizing, and refactoring, then you can try Entities, and see if you have any performance improvements, or if it makes the code better. I tend to start with the simpler, faster-to-develop, method, to get the functionality finished, then I refact...
[ 0.45065557956695557, 0.20888832211494446, 0.11082041263580322, 0.1149856373667717, 0.08794941008090973, 0.01328945904970169, 0.2228231430053711, -0.13631287217140198, -0.13014839589595795, -0.7214359045028687, 0.040247708559036255, 0.8307926654815674, -0.16114193201065063, -0.2605126202106...
I'm a C# developer and I have to change my display resolution regularly. There are plenty of examples on how to read the current display resolutions: [SystemInformation.PrimaryMonitorSize](http://msdn.microsoft.com/en-us/library/system.windows.forms.systeminformation.primarymonitorsize.aspx) I found the [ChangeDispla...
[ 0.08786027133464813, -0.06760063022375107, 0.7901585698127747, -0.09568460285663605, -0.06869585812091827, 0.12741577625274658, -0.0254768468439579, -0.365875244140625, -0.4473629295825958, -0.7545353770256042, 0.21887166798114777, 0.5869210362434387, -0.164774090051651, 0.2800298631191253...
I am new to F#, and I am trying to write a function that calculates a powerset. I am getting an error from Mono (running this on a Mac) that is below. For example, I would pass calcPowerSet ([1;2;3], []) to start the function. Any ideas on how to solve the issue? ``` System.InvalidProgramException: Invalid IL code...
[ 0.2161846160888672, 0.04616294801235199, 0.6233954429626465, -0.12100544571876526, -0.025359302759170532, -0.008948002010583878, 0.45513275265693665, -0.29267990589141846, -0.049671720713377, -0.6615574955940247, -0.302157461643219, 0.6786006093025208, -0.4245382845401764, 0.08023246377706...
rec calcPowerSet = function | ([], []) -> [[]] | ((head::tail), (cHead::cTail)) -> calcPowerSet (tail, (cHead::cTail)) @ calcPowerSet (tail, (head::cHead::cTail)) | ((head::tail), []) -> calcPowerSet (tail, []) @ calcPowerSet (tail, [head]) | ([], collect) -> [collect];; ``` Should you wait for what? If you ...
[ 0.4091090261936188, -0.4345640540122986, 0.6557866930961609, 0.19117063283920288, -0.07928372174501419, -0.4083103537559509, 0.16763931512832642, -0.3755621612071991, -0.37050744891166687, -0.38279417157173157, -0.1435365378856659, 0.9430254697799683, -0.4347369372844696, -0.26593530178070...
in many cases its quite a bit more worked. The IJW ( it just works! ) factor of LINQ is truly incredible, its one of the most elegant technologies to come out of Microsoft in a very long time. Will there be something better in the future? Most likely. But we live and code in the present and waiting for the future is a ...
[ 0.5516970753669739, 0.0266282856464386, 0.19486023485660553, 0.49209895730018616, 0.06563597172498703, -0.1536242514848709, -0.052478060126304626, 0.2798058092594147, -0.10707538574934006, -0.6848536133766174, 0.1296399086713791, 0.5168329477310181, 0.03040316142141819, 0.11829517781734467...
in my data layer without breaking the rest of my application? If you can answer yes, you probably have a pretty good design. Doing a proper data layer really isn't that hard and it allows you the flexibility to switch out from Linq, to any other ORM ( Link to Entities, nHibernate, etc... ) or even to switch to a comple...
[ 0.5408507585525513, 0.03369572386145592, 0.23457126319408417, 0.32826903462409973, -0.10862322896718979, -0.5176977515220642, 0.02257726527750492, -0.0013987458078190684, -0.24268464744091034, -0.4989747405052185, -0.15542997419834137, 0.4652518928050995, -0.21307943761348724, 0.0994829684...