text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
It appears to me that C++ does not allow member template specialization in any scope other than namespace and global scope (MS VSC++ Error C3412). But to me it makes sense to specialize a base class's primary member template in the derived class because that is what derived classes do - specialize things in the base cl...
[ 0.12812693417072296, -0.14339643716812134, 0.0021388304885476828, -0.0637415274977684, -0.15696561336517334, -0.1550481915473938, 0.07221702486276627, -0.4382094442844391, -0.05351028963923454, -0.4200691282749176, -0.12488513439893723, 0.4110700190067291, -0.4797482192516327, 0.2759247720...
Kind <float> { typedef double type; }; }; int main(void) { Base::Kind<float>::type f; // float type desired Derived::Kind<float>::type i; // double type desired but does not work. } ``` My question is why isn't it allowed? I get what you're trying to do, but you are not doing it right. Try this : ``...
[ 0.1288326382637024, -0.2319486141204834, 0.3104497790336609, -0.15252922475337982, -0.01999739557504654, -0.138936847448349, 0.3989931046962738, -0.4238050580024719, 0.41171082854270935, -0.5604938268661499, 0.09271851181983948, 0.3537508547306061, -0.5717275142669678, -0.08169450610876083...
Kind<Base, T> { }; // ... and the specialization for float template<> struct Kind<Derived, float> { typedef double type; }; ```
[ 0.08703840523958206, -0.23270167410373688, 0.23323649168014526, -0.19958727061748505, -0.07897888869047165, 0.08011233806610107, -0.025399193167686462, -0.21539248526096344, 0.24461638927459717, -0.5719344019889832, -0.019435228779911995, 0.22267453372478485, -0.6086589694023132, 0.0527462...
I am very much new to the Continous Integration. Could anyone please let me know whether we could build a website using MSbuild? You can build a Web Site project using the AspNetCompiler MSBuild task. <http://msdn.microsoft.com/en-us/library/ms164291.aspx> Your MSBuild file might look something like this: ``` <Proje...
[ 0.2872641980648041, -0.011365390382707119, 0.3393653929233551, 0.0913819670677185, -0.16274480521678925, -0.3114188611507416, 0.12447532266378403, 0.23381082713603973, -0.18711026012897491, -0.9866774678230286, 0.02598639763891697, 0.46588248014450073, -0.16480155289173126, 0.2296458482742...
VirtualPath = "DeployTemp" PhysicalPath = "C:\ccnet\myProject\WebSite" TargetPath = "C:\ccnet\myProject\PreCompiled" Force = "true"
[ 0.041856586933135986, -0.4769916832447052, 0.5538433790206909, 0.15540209412574768, 0.11104442179203033, 0.16667614877223969, 0.32063862681388855, 0.17222405970096588, -0.33293789625167847, -0.7040289640426636, -0.14384320378303528, 0.7441527247428894, -0.19132252037525177, -0.238143280148...
Debug = "true" Updateable = "true"/> </Target> </Project> ``` And then within your ccnet.config, you would add something like the following in the tasks block for your project: ``` <msbuild> <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable> <work...
[ 0.028476238250732422, -0.13145820796489716, 0.30403903126716614, 0.23367585241794586, 0.2398277223110199, -0.026895741000771523, 0.37451305985450745, -0.3339112102985382, -0.23503881692886353, -0.4594317376613617, -0.39842623472213745, 0.5264585614204407, -0.22332802414894104, 0.3772207200...
Someone is FTPing a file of size 10Mb to folder on a linux server. While the file is in transition a cron wakes up and fires off a Perl script that is designed to look at the ftp folder and move whatever it finds there to some alternate folder. I'm using the `move()` function from [File::Copy](http://search.cpan.org/di...
[ 0.29597362875938416, 0.11544487625360489, 0.6051697731018066, -0.18961361050605774, 0.3453676402568817, -0.031473558396101, 0.02206052839756012, 0.044198647141456604, -0.5297762155532837, -0.5589480400085449, -0.5259494185447693, 0.3955182135105133, -0.37572774291038513, 0.1809576600790023...
and return 0? No, move should just let complete the download process on the new position . You are just moving the inode from one position to another. The open file descriptor from the download program should still point to it. I just want to repeat what a few others mentioned. This only works as long as the move oper...
[ -0.0789945051074028, -0.09204266965389252, 0.47964373230934143, 0.10278087854385376, 0.22224563360214233, 0.1112239882349968, -0.3013400733470917, 0.05469880253076553, -0.2679404616355896, -0.5884566307067871, -0.007373493164777756, 0.3115607798099518, -0.04713631793856621, 0.5107358694076...
the new location while the program still downloads in the old inode which is not anymore attached to a file and therefor can not be used.
[ 0.08150620758533478, -0.07265626639127731, 0.34988099336624146, 0.15947647392749786, 0.5069688558578491, -0.11549368500709534, 0.2496357411146164, 0.19874630868434906, -0.004531362559646368, -0.6043481826782227, -0.46215635538101196, 0.2951836585998535, 0.06287485361099243, 0.4605302214622...
What is the difference between a webservice and an API? Is the difference more than the protocol used to transfer data? thanks. An API (Application Programming Interface) is the means by which third parties can write code that interfaces with other code. A Web Service is a type of API, one that almost always operates o...
[ 0.6650292873382568, -0.024026790633797646, 0.19969382882118225, 0.18565994501113892, -0.22336991131305695, 0.027997784316539764, 0.12170609086751938, 0.02202555164694786, -0.2953029274940491, -0.800935685634613, -0.33218130469322205, 0.23948052525520325, -0.23257958889007568, 0.14583460986...
[XML-RPC](http://en.wikipedia.org/wiki/XML-RPC). For an example of another type of API, one written in C for use on a local machine, see the [Linux Kernel API](http://kernelbook.sourceforge.net/kernel-api.html/). As far as the protocol goes, a Web service API almost always uses HTTP (hence the Web part), and definitel...
[ 0.3850889503955841, -0.04727014899253845, 0.1361503005027771, 0.1451113522052765, -0.17172983288764954, 0.0506155788898468, -0.05637529864907265, 0.1026354506611824, -0.3000637888908386, -0.501258134841919, -0.3902297914028168, 0.4424780607223511, -0.45108476281166077, 0.26998621225357056,...
I have a GridView that is bound with a dataset. I have my footer, whichis separated by the column lines. I want to merge 2 columns; how do I do that? ``` <asp:TemplateField HeaderText="Name" SortExpression="Name"> <ItemTemplate> ... </ItemTemplate> <FooterTemplate > Grand Total: </div> </FooterTe...
[ -0.1785837560892105, -0.05197453498840332, 0.40722084045410156, -0.166214257478714, -0.06120915710926056, 0.4212670624256134, 0.2227015644311905, -0.48586079478263855, -0.09059183299541473, -0.983259379863739, 0.19205166399478912, 0.0993092879652977, 0.11180473119020462, 0.1991823762655258...
Protected Sub Page_SaveStateComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SaveStateComplete Dim DG As GridView = GridView1 Dim Tbl As Table = DG.Controls(0) Dim tr As GridViewRow Dim i As Integer Dim j As Integer tr = Tbl.Rows(Tbl.Rows....
[ -0.05903450399637222, -0.15800485014915466, 0.7410645484924316, -0.14208772778511047, 0.06999307125806808, 0.09051226079463959, 0.26170989871025085, -0.23158283531665802, -0.08513086289167404, -0.6181953549385071, -0.2362387478351593, 0.5376824736595154, -0.28290462493896484, 0.39687231183...
tr.Cells(0).ColumnSpan = 2 'if you have 3 columns then colspan = 3 instead For j = 1 To 1 'if you have 3 columns then j = 1 To 2 instead tr.Cells(j).Visible = False
[ -0.08288247883319855, 0.041515152901411057, 0.34253522753715515, -0.23363330960273743, -0.08543577045202255, 0.3618519902229309, 0.5827937722206116, -0.27114975452423096, -0.3135562241077423, -0.4607064127922058, -0.3587215840816498, 0.1291341483592987, -0.48225337266921997, -0.15072959661...
Next End Sub ```
[ -0.07995210587978363, 0.47659578919410706, 0.4597882926464081, -0.1031084954738617, -0.18094663321971893, -0.13466088473796844, 0.2996765375137329, 0.345367968082428, -0.0977560356259346, -0.38337552547454834, -0.3398846387863159, 0.04467729479074478, -0.19101662933826447, 0.42265430092811...
I'm getting an error when I run any project with the [JSON-Framework](http://code.google.com/p/json-framework/) installed: Xcode could not locate source file: NSString+SBJSON.m (line: 50) I assumed this means it can't find the sdk, the strange this is that the project builds and runs up until I make my first JSON cal...
[ 0.13666880130767822, 0.18389487266540527, -0.052527155727148056, -0.19344520568847656, -0.017006510868668556, -0.1308174431324005, 0.7617403864860535, 0.005150781478732824, -0.3870275318622589, -0.3023807108402252, -0.09219028800725937, 0.4838622212409973, -0.3719870150089264, -0.049149543...
have set something up wrong, any ideas? As stated in the above comments, I just added the source code directly. Not the ideal solution, but it worked. I'm sure installation will get better...
[ 1.083383321762085, 0.1815711259841919, 0.21776847541332245, 0.028933970257639885, 0.14586864411830902, -0.10712216794490814, 0.3127393424510956, 0.07986382395029068, 0.018657943233847618, -0.31613314151763916, 0.2742878794670105, 0.5050705075263977, -0.03600852191448212, -0.133366405963897...
I'm reviewing a couple of my web sites to make sure my SEO bases are covered. There are no private pages on the site in question, and we want all pages to be indexed. Does including a robots.txt file anyway, even if it isn't needed, make my site look more reputable and important to Google? I would just include a blank ...
[ 0.6065648794174194, 0.14034058153629303, 0.4156915843486786, 0.18145368993282318, 0.011769541539251804, -0.26062142848968506, 0.19325248897075653, 0.19336985051631927, -0.6222419142723083, -0.494365930557251, 0.16613230109214783, 0.3790246546268463, -0.26968103647232056, 0.0526271723210811...
I would like to encode some plain text using Ruby and the [Crypt library](http://crypt.rubyforge.org/blowfish.html). I would like to then transmit this encrypted text (along with some other data) as an ASCII hexadecimal string within an XML file. I have the following code snippet: ``` require 'rubygems' require 'cry...
[ 0.28879690170288086, 0.3138049244880676, 0.15331090986728668, -0.18063408136367798, 0.05282258242368698, -0.11712890863418579, 0.16973307728767395, -0.5166423320770264, -0.06817876547574997, -0.3711637556552887, -0.22087348997592926, 0.4445399045944214, -0.25773513317108154, -0.10139545053...
after the decimal point. In particular, you might be able to use a regex facet. I've never tried this, and don't even know if it's valid, but it's a direction to look at. You'd be restricting the lexical space rather than the value space, but that's what you want.
[ 0.03557327389717102, -0.05401437357068062, 0.19120724499225616, 0.20454251766204834, 0.0057469317689538, 0.3894485533237457, -0.3901773989200592, 0.192867249250412, -0.114161916077137, -0.3320889174938202, 0.03891168162226677, 0.42158806324005127, 0.10314559936523438, 0.09921757876873016, ...
I have a rails application that about 3 years old, and I'm having a problem with my pages making too many queries. Every page that loads has several lines that look like this: ``` ReqTdsLink Columns (1.0ms) SHOW FIELDS FROM `req_tds_links` ``` what sort of method call would cause this output in the log? I can't f...
[ 0.3553881347179413, 0.2751898169517517, 0.4377867877483368, -0.07098814845085144, -0.19019503891468048, -0.19788430631160736, 0.23834989964962006, 0.11164142191410065, -0.3440936505794525, -0.6194882392883301, 0.5849764347076416, 0.3935037851333618, -0.212782621383667, 0.001435960293747484...
file for something that might cause this. thanks, -C Are you running in development or production mode? `SHOW FIELDS FROM foo` is done by your model, as you noted, so it knows which accessor methods to generate. In development mode, this is done every request so you don't need to reload your webserver so often, b...
[ 0.4273344874382019, 0.14369651675224304, 0.03150591254234314, 0.0021856685634702444, -0.04948041960597038, -0.4047907590866089, 0.38085466623306274, 0.28354689478874207, -0.29232531785964966, -0.4906504154205322, -0.04473160579800606, 0.7048993706703186, -0.1532570719718933, -0.16759949922...
How can one programmatically fire the SelectedIndexChanged event of a ListView? I've intended for the first item in my ListView to automatically become selected after the user completes a certain action. Code already exists within the SelectedIndexChanged event to highlight the selected item. Not only does the item fa...
[ 0.12685498595237732, -0.08766024559736252, 0.22496452927589417, -0.14417828619480133, -0.11604350060224533, -0.05506894737482071, 0.7141388058662415, -0.6241477131843567, -0.22209560871124268, -0.6171939969062805, -0.3124639093875885, 0.6302686333656311, -0.45436781644821167, -0.0774661451...
(.Selected = false) was included to deselect the ListViewItem in the .Items collection just in case it may have been selected by default and therefore setting it to 'true' would have no effect. The 'Application.DoEvents()' call is yet another last ditch method. Shouldn't the above code cause the SelectedIndexChanged e...
[ 0.06138204038143158, -0.04523848742246628, 0.2612231969833374, 0.08236866444349289, 0.09049652516841888, -0.009520245715975761, 0.4819696843624115, -0.6540316939353943, -0.3861355185508728, -0.6230905055999756, -0.17550887167453766, 0.8055284023284912, -0.28558602929115295, 0.1827682256698...
"" eth0/* ``` This forms a nice list of `key:value` pairs.
[ 0.28761956095695496, 0.22122563421726227, 0.2015269696712494, -0.013468392193317413, 0.0439397357404232, -0.26334190368652344, -0.12294847518205643, -0.19765916466712952, 0.0395251028239727, -0.36502471566200256, -0.12025779485702515, 0.3703117370605469, 0.006273455917835236, 0.10147915035...
I know of the ruby gem "ruby-debug" that allows you to place a **debugger** call inside your code. Using it, it's possible to have breakpoints in your code. I used **script/console** a bit for some tests, and I would like to know if I can call it from my code. Thanks ! EDIT: here is some sample ruby code ``` req...
[ 0.33099833130836487, 0.1988864541053772, 0.02144543081521988, -0.07075920701026917, -0.03076803684234619, -0.10422536730766296, 0.4781905710697174, -0.3927604556083679, 0.003039736533537507, -0.4097214937210083, 0.03997482359409332, 0.5444533228874207, -0.14745347201824188, 0.2876467704772...
thing, but using the rails console. Do you have the debug version of the Flash player installed on your system (it could have been overwritten/corrupted). Are you using Flex Builder?
[ 0.33048924803733826, -0.1285327672958374, -0.1745571792125702, 0.3337584435939789, 0.2763836085796356, -0.5033964514732361, 0.4174117147922516, 0.11338893324136734, -0.11313173919916153, -0.6819921135902405, 0.2146008461713791, 0.9255500435829163, -0.27421221137046814, -0.325594961643219, ...
Our Network people insist on having antivirus (eTrust) software on ALL servers, including all of our SQL Server 2005 machines. How can I best demonstrate that this is hurting performance? I wouldn't be surprised if you lost your argument to not have eTrust installed on the machine. I would suggest rather then arguing ...
[ 0.21270005404949188, 0.31131380796432495, 0.25337356328964233, 0.05991387367248535, 0.01943005435168743, -0.533986508846283, 0.32889893651008606, 0.23076219856739044, -0.3012045919895172, -0.4849238395690918, 0.331888347864151, 0.7472034096717834, -0.12009255588054657, 0.019644971936941147...
[eTrust antiVirus](http://www.colorado.edu/its/security/antivirus/files/AV_Implemenation_ENU.pdf) That should give you an idea how to configure it properly.
[ 0.3833160102367401, 0.4185866117477417, 0.4319732189178467, 0.2556459307670593, 0.2445104420185089, -0.37473639845848083, 0.3010013997554779, 0.04070301353931427, -0.330746591091156, -0.17693687975406647, -0.04872514680027962, 0.5073290467262268, 0.04482673853635788, -0.031016798689961433,...
I have the following need I have a logging table which logs som leads generated each day. Now I need to pull a report over the amount of leads for each day over the last 10 days. Lets say the table looks like this: ``` tbl_leads id int, first_name nvarchar(100), last_name nvarchar(100), created_date datetime ``` ...
[ 0.13750486075878143, -0.09860692918300629, 0.7016653418540955, -0.08884236961603165, 0.022640112787485123, -0.021695343777537346, 0.08742140233516693, -0.3690904378890991, -0.6041419506072998, -0.2673904001712799, 0.3604103624820709, 0.22286459803581238, -0.07906566560268402, 0.19985611736...
| 2009-04-28 7 | 2009-04-27 ``` ... and so on Anyone know how to do this the best possible way? My current solution is iterating with a foreach in c# but I would very much like to hand it on the sql server instead in a sp. You can use: ``` Select count(created_date) as counted_leads, created_...
[ 0.10645861178636551, 0.09874662011861801, 0.7475653290748596, -0.11367929726839066, 0.017039978876709938, -0.17697077989578247, -0.04819810017943382, -0.21744991838932037, -0.26521334052085876, -0.372347891330719, -0.00012205749226268381, 0.34330326318740845, -0.13303345441818237, -0.01600...
I can't get the following function in VBScript to work. I am trying to get all of the files in a folder and loop through them to get the highest numbered file. (file name format is log\_XXX.txt) The problem that I am having is that the code never enters my `For Each` loop. I am new to VBScript, but I don't seem to unde...
[ 0.3843477964401245, -0.0636497288942337, 0.608543872833252, -0.3212467133998871, -0.0691928043961525, 0.02419872209429741, 0.2311803251504898, -0.4394743740558624, -0.35493001341819763, -0.594111979007721, -0.32722318172454834, 0.5535544753074646, -0.5509389638900757, -0.1099795326590538, ...
Set fc = f.Files WScript.Echo fc.Count : rem prints 3 Set tempHighNum = "000" For Each f1 in fc WScript.Echo f1.Size : rem does not print WScript.Echo f1.Type : rem does not print WScript.Echo f1.Name : rem does not print s = Right(f1.name,3) IF NOT(ISNULL(s)) THEN ...
[ 0.13237932324409485, -0.31724685430526733, 0.634887158870697, -0.42860859632492065, -0.22138656675815582, 0.29821768403053284, 0.6393153071403503, -1.190783977508545, -0.03258593752980232, -0.2230907678604126, -0.2958040237426758, 0.15064534544944763, -0.5102028250694275, -0.44741022586822...
tempHighNum = s END IF END IF Next GetFileNumber = tempHighNum End Function ``` Change this line: ``` Set tempHighNum = "000" ``` to the following: ``` tempHighNum = "000" ``` You are attempting to set the tempHighNum variable to a string type. Therefore, you should not use the *Set* keyword....
[ 0.23806336522102356, -0.006762997712939978, 0.4940205514431, -0.1402757167816162, -0.023707255721092224, 0.012491795234382153, 0.265097975730896, -0.23332680761814117, 0.12979942560195923, -0.2593533992767334, -0.3332168459892273, 0.6345025897026062, -0.35053548216819763, -0.10301285237073...
What type of Python objects should I use to parse files with a specific syntax? Also what sort of loop should be followed to make it through the file. Should one pass be sufficient? Two, three? It depends on the grammar. You can use [pyparsing](http://pyparsing.wikispaces.com/) instead of implementing your own parser. ...
[ 0.18358807265758514, 0.21575796604156494, -0.14324617385864258, -0.01665782928466797, -0.3846360743045807, 0.19400277733802795, 0.48028939962387085, -0.07563558965921402, -0.38399192690849304, -0.3842203915119171, -0.006465307902544737, 0.2576085031032562, -0.3780529499053955, -0.235381588...
I am wondering if anyone has used the userInteractionEnabled method on a UILabel to allow the label to act like a button (or just to fire off a method). Any help would be greatly appreciated. Cheers! Update (4/30/09 @1:07pm) Clarification: I have a standard InfoButton and next to it I want to place a label with the te...
[ 0.3684733510017395, -0.07259353995323181, 1.1575533151626587, 0.09288614988327026, -0.23945854604244232, -0.7116928100585938, 0.12337745726108551, 0.1745050847530365, -0.054928008466959, -0.8878834247589111, -0.11904202401638031, 0.715669572353363, 0.2800995111465454, -0.07008850574493408,...
method fires off. The infoButton is already working and is using an IBAction to trigger the method. I would like to know how to wire up the label to implement the same method. That is all. Cheers! `userInteractionEnabled` is not a method but a property. But I think you will want to set this to `YES` to allow events to...
[ -0.06146826967597008, 0.08515888452529907, 0.9382081627845764, 0.1037563905119896, -0.023404443636536598, -0.686163067817688, 0.2332872748374939, -0.17474482953548431, 0.030547836795449257, -0.5696965456008911, -0.06292109191417694, 0.8277046084403992, -0.08248639851808548, 0.0455512292683...
That is, does the `CGPoint` element `[touch locationInView]` intersect with with the `CGRect` element `[infoLabel bounds]`? Look into the function `CGRectContainsPoint` to run this test. If so, then fire off an `NSNotification` that calls the same `IBAction` selector as the `UIButton`.
[ -0.12325532734394073, -0.1734011471271515, 0.5678770542144775, -0.0760473683476448, 0.3830321729183197, -0.3019031286239624, -0.0016153303440660238, -0.1661818027496338, 0.26511985063552856, -0.5483812093734741, 0.06180824711918831, 0.8571521639823914, -0.16236314177513123, -0.077797852456...
I was learning python using the tutorial that comes with the standard python installation. One of the benefits that the author states about python is "maybe you’ve written a program that could use an extension language, and you don’t want to design and implement a whole new language for your application" - My question ...
[ 0.40409016609191895, 0.12207899242639542, -0.2961561679840088, -0.07748252153396606, 0.12120970338582993, -0.13262304663658142, 0.28574156761169434, 0.24564968049526215, -0.4088001251220703, -0.34189069271087646, 0.1073523610830307, 0.7222999334335327, -0.16888858377933502, -0.199288606643...
pointers on how to design .NET programs that have an interactive shell. I would then like to use python script in the shell to "extend" or interact with the program. **EDIT:** This question partly stems from the demo give by Miguel de Icaza during PDC 2008 where he showed the interactive csharp command prompt, C# 4.0 ...
[ 0.2184208780527115, 0.25891393423080444, -0.14974108338356018, 0.15618525445461273, -0.14978554844856262, -0.18144330382347107, 0.029969900846481323, 0.17375078797340393, -0.07303805649280548, -0.40049120783805847, 0.3177195191383362, 0.6588135957717896, -0.1413598358631134, -0.40098455548...
extend the features provided by the program. Also, i started thinking about this kind of functionality after reading one of Steve Yegge's essays where he talks about systems that live forever. This sounds like a great use of [IronPython](http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython). It's fairly easy...
[ 0.7309271097183228, 0.253736287355423, -0.17116676270961761, 0.01561745721846819, -0.1025925874710083, -0.048999711871147156, 0.32429441809654236, -0.10968107730150223, -0.2616775929927826, -0.42899858951568604, -0.1708674132823944, 0.42796066403388977, -0.26370421051979065, -0.00725359376...
very question, albeit in a generic DLR-centric way -- this would allow you to host IronPython, IronRuby, or whatever DLR languages you want to support. I've used these examples in the past to create an IronPython environment inside a private installation of [ScrewTurn Wiki](http://www.screwturn.eu/) - it allowed me to...
[ 0.27449530363082886, 0.2096213847398758, 0.0303649865090847, 0.0025663753040134907, 0.03593538701534271, 0.03842013701796532, 0.11063466221094131, 0.004226026125252247, -0.08555808663368225, -0.538276731967926, -0.08298265188932419, 0.36611098051071167, -0.11529845744371414, 0.057283569127...
I've created two classes, with one of them having an implicit cast between them: ``` public class Class1 { public int Test1; } public class Class2 { public int Test2; public static implicit operator Class1(Class2 item) { return new Class1{Test1 = item.Test2}; } } ``` When I create a new...
[ 0.2828226387500763, -0.05395535007119179, 0.1370396912097931, -0.1575959175825119, 0.022971611469984055, 0.25773367285728455, 0.4528920650482178, -0.4934128522872925, 0.10151061415672302, -0.6720426082611084, -0.08577343076467514, 0.451922208070755, -0.28111183643341064, 0.1509482562541961...
items) { Console.WriteLine(item.Test1); } ``` Why is the implicit cast not called when using Cast<T>? Because, looking at the code via Reflector, Cast doesnt attempt to take any implicit cast operators (the LINQ Cast code is heavily optimised for special cases of all kinds, but nothing in that direction) into acc...
[ 0.23602727055549622, -0.08693861961364746, 0.11928264051675797, 0.04826502129435539, -0.3805783987045288, -0.047065284103155136, 0.45893165469169617, -0.37894895672798157, 0.03866681456565857, -0.4078209698200226, -0.0685308501124382, 0.3762590289115906, -0.4467630386352539, 0.049490861594...
Is there a simple way to create a copy of a database or schema in PostgreSQL 8.1? I'm testing some software which does a lot of updates to a particular schema within a database, and I'd like to make a copy of it so I can run some comparisons against the original. If it's on the same server, you just use the CREATE DAT...
[ 0.64275062084198, 0.16832169890403748, 0.05288361757993698, 0.08275552839040756, 0.03520134091377258, -0.4998379349708557, -0.1117532029747963, 0.21141059696674347, -0.16632652282714844, -0.7139724493026733, 0.19999919831752777, 0.6265668869018555, -0.5783786177635193, 0.1524534821510315, ...
I have a thread that appends rows to self.output and a loop that runs until self.done is True (or the max execution time is reached). Is there a more efficient way to do this other than using a while loop that constantly checks to see if it's done. The while loop causes the CPU to spike to 100% while it's running.. ...
[ 0.11327269673347473, -0.11017414927482605, 0.527005672454834, -0.1051349937915802, 0.0986594706773758, 0.1575133353471756, 0.18259888887405396, -0.1943352222442627, -0.12991540133953094, -0.6004815697669983, 0.30179181694984436, 0.5788279175758362, -0.016027243807911873, 0.3139972686767578...
yield "Maximum Execution Time Exceeded %s seconds" % time.clock() break ``` Are your threads appending to self.output here, with your main task consuming them? If so, this is a tailor-made job for [Queue.Queue](http://docs.python.org/library/queue.html). Your code should become something like: ``` import Queu...
[ 0.3173813223838806, -0.1595650017261505, 0.47713354229927063, -0.3350895345211029, -0.014610473066568375, 0.2738582193851471, -0.07385741919279099, -0.09216625243425369, -0.4844833016395569, -0.7398335933685303, 0.12871088087558746, 0.4442014992237091, -0.18196755647659302, 0.4589726626873...
break yield next_item except Queue.Empty: print "Timeout exceeded" ``` Your producer threads add items to the queue with `queue.put(item)` **[Edit]** The original code has a race issue when checking self.done (for example multiple items may be appended to the queue before the flag is set, causing the co...
[ 0.21741235256195068, -0.11495722830295563, -0.05634015426039696, -0.12910084426403046, 0.05491628870368004, 0.05761773884296417, 0.3553052246570587, -0.41399356722831726, -0.46359366178512573, -0.37291520833969116, -0.09394136071205139, 0.2299399971961975, -0.28507599234580994, 0.187596008...
when they're all finished. You could accomplish this with the same strategy - each thread a Finished marker and the consumer terminates when it sees num\_threads markers.
[ 0.38808581233024597, -0.1427544355392456, 0.3437477648258209, 0.1322132796049118, 0.3021218180656433, 0.092972032725811, 0.09863144904375076, 0.22358767688274384, -0.14803491532802582, -0.6956397294998169, -0.20190578699111938, 0.08232279866933823, 0.1310308277606964, 0.7357754707336426, ...
I created an image-viewing control for my boss that incorporates panning, zooming via the mouse wheel, and drawing a box to zoom to. The control needs to support very large image files (i.e. several thousand pixels on each side). It all works, but whenever the code is scaling the image the control UI becomes unrespons...
[ 0.14808033406734467, -0.011363862082362175, 0.5995925068855286, 0.3109387457370758, -0.07119470834732056, 0.07620267570018768, -0.10507994145154953, -0.03594210371375084, -0.24722863733768463, -0.7087497711181641, 0.5429058074951172, 0.6174201369285583, -0.21867944300174713, 0.073004633188...
Scaling code. Let me know if this isn't enough to help me and I'll post whatever code you need! UPDATE: Here's the control code in its entirety. [link text](http://www.2shared.com/file/5570562/25a25962/ZoomPictureBox.html) The SSIS variable designer did not, in my case, show the Decimal or Numeric data types to select...
[ -0.2262938916683197, -0.13039003312587738, 0.6435255408287048, -0.05683212727308273, -0.045963872224092484, 0.4243636429309845, 0.054716791957616806, -0.31134769320487976, -0.19334065914154053, -0.4256937801837921, 0.35419055819511414, 0.5939904451370239, -0.42381271719932556, -0.156126692...
for you.
[ 0.48026570677757263, 0.2626650333404541, -0.04092003405094147, 0.041094228625297546, -0.010719617828726768, 0.09581850469112396, 0.14491835236549377, -0.056555621325969696, -0.09295427054166794, -0.3049659729003906, -0.3166050910949707, 0.23210075497627258, -0.3027842342853546, 0.251926422...
Would it be possible through c# to actually do a windows search (the one you find in Vista from the menu with higlighting (e.g you write 'fire' and get 'firefox')). Thanks :) Yes, this is possible with the Windows Desktop Search (WDS) API. You'll need the [SDK](http://www.microsoft.com/downloads/details.aspx?FamilyID=...
[ -0.09412030130624771, 0.0009591149864718318, 0.5652227997779846, 0.10832679271697998, 0.21858716011047363, -0.2778400182723999, 0.17208465933799744, -0.33350980281829834, -0.2959579527378082, -0.7536291480064392, -0.29961058497428894, 0.47370535135269165, -0.12602680921554565, 0.1081755906...
SYSTEMINDEX", conn); rdr = cmd.ExecuteReader(); while (rdr.Read()) { Console.WriteLine(rdr[0]); } rdr.Close(); conn.Close(); ``` When I used this in a project awhile back, the query string I used was built something like this: ``` CSearchManager SearchManager = new CSearchManager(); CSearchCatalogManager Cata...
[ -0.1546209752559662, -0.0182479415088892, 0.7208222150802612, -0.08853933215141296, 0.07780881226062775, -0.21034649014472961, 0.284921795129776, -0.2934168577194214, -0.4448103606700897, -0.8430108428001404, -0.19121772050857544, 0.5084536075592041, -0.2727242410182953, 0.4307078719139099...
Menu links (%appdata%\Microsoft\Windows\Start Menu & C:\ProgramData\Microsoft\Windows\Start Menu), then asynchronously loading WDS results in the background, which replicates Start Search behavior better than relying solely on WDS.
[ -0.17373712360858917, 0.12859603762626648, 0.4251728951931, -0.1683025360107422, 0.15768051147460938, 0.13452094793319702, 0.20064538717269897, 0.1151682510972023, -0.23723280429840088, -0.6629340648651123, -0.6586929559707642, 0.30100759863853455, -0.44585320353507996, 0.15632830560207367...
This is a similar problem: [Link](https://stackoverflow.com/questions/724156/keyboard-input-hesitation-when-held-down) Which was solved by calling GetAsyncKeyState(). While all fine and dandy, I need a Linux alternative. I need to know if a button is being *held* down, not just being pressed (because of the keyboard b...
[ -0.17182223498821259, -0.23367895185947418, 0.45377403497695923, -0.21307781338691711, -0.43545153737068176, -0.18933023512363434, 0.1686641126871109, -0.019247107207775116, -0.36864951252937317, -0.6785385608673096, -0.10794319212436676, 0.486159086227417, -0.26292064785957336, 0.22252903...
to get key state without the keyboard buffer delay. Edit: I know almost nothing about Glut, but it looks like you can use [`glutKeyboardFunc`](http://www.opengl.org/resources/libraries/glut/spec3/node49.html) to detect normal keys, and [`glutSpecialFunc`](http://www.opengl.org/resources/libraries/glut/spec3/node54.htm...
[ -0.03610136732459068, -0.2730022370815277, 0.4032454788684845, -0.12306328117847443, 0.029815275222063065, 0.024113589897751808, 0.35347825288772583, 0.05319693312048912, -0.1278669536113739, -0.45650410652160645, -0.2566218078136444, 0.8465200662612915, -0.17135189473628998, -0.1637977510...
How can I optimize this query? It seems there should be a much easier way to do this. The goal is that it will still be able to be readily turned into a delete statement. ``` SELECT * FROM team WHERE team_id IN ( SELECT team_id FROM (
[ -0.07590150088071823, -0.12362349778413773, 0.07057748734951019, -0.015087415464222431, 0.10393165051937103, -0.3105195164680481, 0.40254464745521545, -0.24268367886543274, 0.005745717324316502, -0.6016350984573364, -0.11989538371562958, 0.6076414585113525, -0.4134393036365509, -0.18626049...
SELECT team.team_id, ( SELECT COUNT(*)
[ 0.10185735672712326, -0.21267059445381165, -0.2976515293121338, 0.14025329053401947, 0.2293449342250824, -0.26225849986076355, 0.20440970361232758, -0.2753715515136719, -0.5175067782402039, -0.6596249938011169, 0.027369048446416855, 0.21850703656673431, -0.4936503767967224, -0.296663016080...
FROM signup WHERE signup.team_id = team.team_id ) AS members
[ 0.3131895363330841, -0.10455446690320969, 0.05119851231575012, -0.15145008265972137, -0.10095129907131195, -0.22761765122413635, 0.10843345522880554, -0.05898267403244972, -0.5444470047950745, -0.5623540282249451, -0.22140802443027496, -0.0034313672222197056, -0.2361534684896469, -0.223129...
FROM team, schedule, event WHERE team.schedule_id = schedule.schedule_id AND schedule.event_id = event.event_id
[ -0.1535685509443283, -0.09760294109582901, -0.2627268135547638, 0.1671610176563263, -0.004470703192055225, -0.01776960864663124, -0.2261054515838623, 0.16713488101959229, -0.6903989911079407, -0.7466164231300354, -0.023937391117215157, 0.3125460147857666, -0.24253074824810028, -0.050658166...
AND event.event_id =183) AS t WHERE members = 0 ) ``` A quick glance at this query gives me this: ``` select t.* from team t inner join schedule s on t.schedule_id = s.schedule_id inner join event e on s.event_id = e.event_id left outer join signup sp on t.team_...
[ 0.17075906693935394, -0.3856157958507538, 0.30053195357322693, -0.22811663150787354, -0.1144130602478981, 0.03954165428876877, 0.12111726403236389, -0.4437935948371887, -0.4671195447444916, -0.6885886788368225, -0.22126218676567078, 0.49913591146469116, -0.222903773188591, -0.2461419403553...
sp.team_id where e.event_id = 183 and sp.team_id is null ``` It looked like you're trying to find all teams that are in an event but are not in the signup table. Is this accurate? Also, I wanted to note that it will be faster to do joins then a bunch of subqueries, especially if the subqueries depend on each...
[ 0.1678960770368576, 0.08168280124664307, 0.2909013330936432, 0.09570831060409546, -0.2423870861530304, -0.4953344464302063, 0.21786673367023468, -0.22540436685085297, -0.8654444813728333, -0.7487432360649109, 0.043145500123500824, 0.4188764691352844, -0.26354923844337463, -0.46053746342658...
I have a SafeInvoke Control extension method similar to the one [Greg D discusses here](https://stackoverflow.com/questions/714666/is-it-appropriate-to-extend-control-to-provide-consistently-safe-invoke-begininvo) (minus the IsHandleCreated check). I am calling it from a `System.Windows.Forms.Form` as follows: ``` p...
[ 0.23228459060192108, -0.007849558256566525, 0.534875214099884, -0.3666314482688904, 0.13618479669094086, -0.39837712049484253, 0.4488610625267029, -0.5052174925804138, 0.18081146478652954, -0.4144699275493622, -0.262728750705719, 0.5886619687080383, -0.4994547367095947, 0.26250043511390686...
synchronous) > at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) > at System.Windows.Forms.Control.Invoke(Delegate method) > at DriverInterface2.UI.WinForms.Dialogs.FormExtensions.SafeInvoke[T](T control, Action`1 action) > in C:\code\DriverInterface2\DriverInterface2.UI.WinForms\Dialogs\FormExten...
[ 0.16019773483276367, 0.13329964876174927, 0.3443385064601898, 0.2337573766708374, 0.2110356092453003, 0.054757747799158096, 0.5253893136978149, -0.1802641749382019, -0.12952829897403717, -0.5620172619819641, 0.05763407424092293, 0.600218653678894, -0.5297061800956726, 0.20958732068538666, ...
MSDN](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.invokerequired.aspx): > This means that InvokeRequired can > return false if Invoke is not required > (the call occurs on the same thread), > or **if the control was created on a > different thread but the control's > handle has not yet be...
[ -0.1418083906173706, -0.25015053153038025, 0.49094995856285095, 0.10584960877895355, 0.06799442321062088, -0.11553966253995895, 0.20740774273872375, -0.4679078459739685, -0.16082239151000977, -0.4566236436367035, -0.06704617291688919, 0.5539469718933105, -0.4776392877101898, 0.283778756856...
and making the > application unstable. > > > You can protect against this case by > also checking the value of > IsHandleCreated when InvokeRequired > returns false on a background thread. > If the control handle has not yet been > created, you must wait until it has > been created before calling Invoke or > ...
[ -0.006708782631903887, -0.26675769686698914, 0.23890382051467896, -0.038494497537612915, 0.10855390131473541, -0.31206223368644714, 0.5561866164207458, -0.11298998445272446, -0.2381497621536255, -0.4938639998435974, -0.2375544160604477, 0.5674394369125366, -0.3284752070903778, 0.3207962214...
what this means for you. (This would be easier to reason about if we saw your implementation of SafeInvoke also) Assuming your implementation is identical to the referenced one with the exception of the check against [IsHandleCreated](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.ishandlecreated...
[ -0.028101837262511253, -0.3041362464427948, 0.4278261661529541, -0.0010806515347212553, 0.2321310043334961, -0.15778407454490662, 0.3033061623573303, -0.36958378553390503, -0.1939588487148285, -0.48226359486579895, -0.39658814668655396, 0.6523162722587585, -0.3911660313606262, -0.016860339...
uiElement.Invoke((Action)delegate { SafeInvoke(uiElement, updater, forceSynchronous); }); } else { uiElement.BeginInvoke((Action)delegate { SafeInvoke(uiElement, updater, forceSynchronous); }); } } else { if (uiElement.IsDisposed) {
[ -0.1598365306854248, -0.348139226436615, 0.37336719036102295, -0.09899599850177765, 0.22901353240013123, 0.08622781187295914, 0.3553544282913208, -0.5645365118980408, -0.18579356372356415, -0.625342845916748, -0.7076324224472046, 0.34643080830574036, -0.3570065200328827, -0.210313469171524...
throw new ObjectDisposedException("Control is already disposed."); } updater(); } } ``` Consider the case where we're calling `SafeInvoke` from the non-gui thread for a control whose handle has not been created. `uiElement` is not null, so we check `uiElement.InvokeRequired`. Per the MSDN docs (...
[ 0.10838468372821808, -0.16277894377708435, 0.3940531313419342, 0.006095648743212223, 0.18357272446155548, -0.26171445846557617, 0.49917343258857727, -0.48007965087890625, 0.020758915692567825, -0.43111398816108704, -0.3782621920108795, 0.4646357297897339, -0.1588944047689438, 0.34727993607...
to call the submitted action... **from the background thread**! At this point, all bets are off re: that control because its handle has been created on a thread that doesn't have a message pump for it, as mentioned in the second paragraph. Perhaps this is the case you're encountering?
[ 0.46080610156059265, -0.09414445608854294, 0.454395592212677, 0.15046676993370056, 0.11293256282806396, -0.19931142032146454, 0.17368973791599274, -0.1056973934173584, -0.4633113145828247, -0.25732672214508057, 0.1395571082830429, 0.35380643606185913, -0.23969048261642456, 0.26744180917739...
Is it better to have a different CSS file for each user-agent or is it better to use CSS Hacks that only certain browsers can see? Neither. The best is to write code that works in all browsers without the need of browser specific code or css hacks. It's of course not quite as easy to accomplish, which is why many peop...
[ 0.07496429234743118, 0.02466476708650589, 0.13094443082809448, 0.37042585015296936, -0.14176979660987854, -0.15044710040092468, 0.19433417916297913, 0.15632878243923187, -0.17906370759010315, -0.897816002368927, 0.2622489929199219, 0.5363743305206299, -0.14854836463928223, -0.2297862917184...
the border line of being hacks is using code that doesn't affect browsers that work correctly, but fixes problems for a specific browser. That could be things like specifying a height for an element that normally shouldn't need one, or specifying `display:inline` on a floating element. The page [Position is everything...
[ 0.6004583835601807, -0.22983887791633606, 0.11905945837497711, 0.17680774629116058, 0.08918303996324539, -0.12681370973587036, 0.33808162808418274, 0.335045725107193, -0.2586401104927063, -0.5793114304542542, -0.02839011140167713, 0.34306854009628296, -0.23774069547653198, -0.0840143710374...
I am using asp.net and i would like to define the elements of a dataset in my html code. The problem is when i attempt to use: ``` <%@Using namespace="System.Data" %> ``` this is giving me an error also I am using ``` foreach (DataRow row in ds.Tables[0].Rows) {.....} ``` DataSet ds is obtained fro...
[ 0.1305185854434967, -0.004164678044617176, 0.39202243089675903, 0.08251138031482697, -0.29961854219436646, -0.11406887322664261, 0.3069305419921875, -0.1532038152217865, -0.386574387550354, -0.9691304564476013, 0.013551723212003708, 0.3038199543952942, -0.3255941867828369, -0.1092809364199...
I have two (very large) text files. What is the fastest way - in terms of run time - to create a third file containing all lines of file1 that do not appear in file2? So if file1 contains: ``` Sally Joe Tom Suzie ``` And file2 contains: ``` Sally Suzie Harry Tom ``` Then the output file should co...
[ 0.26497596502304077, 0.1472322791814804, 0.4429798126220703, -0.31621506810188293, 0.1570151001214981, 0.5285128355026245, 0.04756765812635422, 0.0879814624786377, -0.38108906149864197, -0.5275843739509583, -0.23900815844535828, 0.653008222579956, -0.2001485973596573, 0.23807092010974884, ...
you have to read the input. Perl implementation: ``` #!/usr/bin/env perl use warnings; use strict; use Carp (); my $file1 = 'file1.txt'; my $file2 = 'file2.txt'; my %map; { open my $in, '<',$file2 or Carp::croak("Cant open $file2"); while (<$in>) { $map{$_} = 1; } close($in) or Carp::carp("err...
[ -0.153303325176239, 0.20336616039276123, 0.3944881558418274, -0.2426406294107437, 0.09142693877220154, 0.0760248675942421, 0.23060300946235657, 0.13781258463859558, -0.12143243104219437, -0.8097403645515442, -0.5811516642570496, 0.4553847908973694, -0.28713804483413696, 0.15928184986114502...
2 is so large that the hashmap doesn't fit in memory, then we have a different problem at hand. A possible solution is then to use the above solution on chunks of file 2 (small enough to fit into memory), outputing the results to temporary files. Provided there are sufficient matches between file 1 and file 2, then tot...
[ -0.3347206115722656, -0.16013526916503906, 0.6894147396087646, 0.024496832862496376, 0.010355405509471893, -0.020266855135560036, 0.06529171019792557, -0.29551705718040466, -0.19527047872543335, -0.6979534029960632, -0.39796361327171326, 0.033670954406261444, -0.3421851694583893, -0.108062...
I have a set of assembly function which I want to use in C programs by creating a header file. For instance, if I have asm\_functions.s which defines the actual assembly routines and asm\_functions.h which has prototypes for the functions as well as some standard #define's I needed. My goal is to use a C program, say t...
[ 0.24983973801136017, 0.29784515500068665, 0.13732697069644928, -0.10076984763145447, -0.013321872800588608, 0.09256337583065033, 0.16404026746749878, -0.44905370473861694, -0.05692121013998985, -0.49050378799438477, -0.12588071823120117, 0.6061729192733765, -0.2721620500087738, -0.04372631...
C calling conventions \*/ ret test\_\_asm.c: ``` #include "asm_foo.h" ``` int main() { uint8\_t res = asm\_foo( 1, 2, 3); return 0; } In a situation like this what would be the proper way to compile a link the program? I was trying something like this: ``` gas -o asm_foo.o asm_foo.s gcc -o test_asm test_asm...
[ 0.17895880341529846, 0.05486772954463959, 0.3922196328639984, 0.052283819764852524, -0.09342678636312485, -0.37441501021385193, 0.2072148621082306, -0.14213158190250397, -0.1950683295726776, -0.3502136468887329, -0.03835500031709671, 0.7601123452186584, -0.5229188203811646, 0.1660233289003...
undefined reference to`READ_CONFIG_BYTE' /tmp/ccY0SmMN.o: In function `_pci_bios_read_byte': (.text+0x18): undefined reference to`PCI_BIOS_FUNCTION_INT' /tmp/ccY0SmMN.o: In function `_pci_bios_read_byte': (.text+0x1b): undefined reference to`BAD_REGISTER_NUMBER' /tmp/ccY0SmMN.o: In function `_pci_bios_read_word': (.tex...
[ 0.15240445733070374, 0.41224512457847595, 0.3573056161403656, -0.28634947538375854, 0.2776127755641937, 0.2818288207054138, 0.128508061170578, -0.27191683650016785, -0.15127532184123993, -0.45567625761032104, -0.16010892391204834, 0.5587783455848694, -0.5068026185035706, 0.1263853609561920...
: ``` #include "asm_const.h" .section .text .globl asm_foo .type asm_foo, @function asm_foo: mov $ASM_CONST_1, %eax /* asm code with proper stack manipulation for C calling conventions */ ret ``` test\_asm.c : ``` #include "asm_functions.h" int main() { return asm_foo( 1, 2, 3); } ``` Please note that you...
[ 0.1658218801021576, 0.31720858812332153, 0.21163296699523926, -0.1711772382259369, 0.015346452593803406, 0.23511044681072235, 0.5045798420906067, -0.6040470004081726, -0.35228967666625977, -0.26939085125923157, -0.39048877358436584, 0.4765760600566864, -0.3781779110431671, 0.03268602117896...
test_asm.o ``` The single-command gcc takes care of compiling the .S file using gas, the .c file with GCC's C compiler, and linking the resulting temporary .o files together using ld. gcc runs all those commands with the appropriate flags by default. On some systems (but not on Linux with the default GCC installatio...
[ 0.361926406621933, 0.15026801824569702, 0.19448180496692657, -0.16558459401130676, -0.10496535897254944, -0.24611487984657288, 0.15107794106006622, -0.19669927656650543, -0.08132432401180267, -0.3731704354286194, -0.3771008253097534, 0.5321047902107239, -0.3982483148574829, 0.0828314125537...
This may or may not be clear, leave me a comment if I am off base, or you need more information. Perhaps there is a solution out there already for what I want in PHP. I am looking for a function that will add or subtract a distance from a longitude OR latitude value. Reason: I have a database with all Latitudes and ...
[ 0.3139289319515228, 0.158347949385643, 0.591389536857605, 0.4760741889476776, -0.05512720346450806, -0.08723735064268112, 0.2903708815574646, 0.2079072892665863, -0.26261666417121887, -0.7196551561355591, -0.11784045398235321, -0.07538708299398422, -0.26133549213409424, 0.374976247549057, ...
> Y1 and Latitude < Y2) Where X1 = Longitude - (distance) Where X2 = Longitude + (distance) Where Y1 = Latitude - (distance) Where Y2 = Latitude + (distance) ``` I am working in PHP, with a MySql Database. Open to any suggestions also! :) This is a MySQL query that will do exactly what you want. Keep in mind ...
[ 0.315243124961853, 0.30335545539855957, 0.7649443745613098, 0.12134694308042526, 0.15851138532161713, 0.019191471859812737, 0.36342889070510864, -0.083406962454319, 0.05235259607434273, -0.6904720067977905, 0.05721494182944298, 0.022029537707567215, 0.0055165416561067104, 0.213136598467826...
$longitude. ``` $res = mysql_query("SELECT * FROM your_table WHERE ( (69.1 * (latitude - " . $latitude . ")) * (69.1 * (latitude - " . $latitude . ")) ) + ( (69.1 * (longitude - " . $longitude . ") * COS(" . $latitude . " / 57.3)) * (69.1 * (longitude - " . $longitud...
[ 0.1249602660536766, 0.35476261377334595, 0.7283802032470703, 0.21834613382816315, 0.49656662344932556, 0.16284924745559692, 0.24750488996505737, -0.10978174209594727, -0.09869156032800674, -0.7431952357292175, -0.20134598016738892, 0.29329967498779297, -0.0043180594220757484, 0.56935304403...
COS(" . $latitude . " / 57.3)) ) < " . pow($radius, 2) . " ORDER BY ( (69.1 * (latitude - " . $latitude . ")) * (69.1 * (latitude - " . $latitude . ")) ) + ( (69.1 * (longitude - " . $longitude . ") * COS(" . $latitude . " / 57.3)) * (69.1
[ -0.09565097838640213, 0.4526919722557068, 0.5450916886329651, -0.016582340002059937, 0.35004863142967224, 0.454562783241272, 0.20821857452392578, -0.38208791613578796, -0.17276673018932343, -0.29600319266319275, -0.2873122990131378, -0.07748643308877945, -0.03770958259701729, 0.27073734998...
* (longitude - " . $longitude . ") * COS(" . $latitude . " / 57.3)) ) ASC"); ```
[ 0.26817265152931213, 0.4144686460494995, 0.9017341136932373, -0.007821439765393734, 0.4358879029750824, 0.23164409399032593, 0.03452390804886818, -0.01837215945124626, -0.08581529557704926, -0.340436190366745, -0.5856252312660217, 0.23433753848075867, -0.05360463634133339, 0.31691324710845...
I need to come up with a smarter/simpler way of doing ajax calls in our current .net webforms app. I know jQuery basics and I like it alot. I'm thinking of proposing to my team the use of jQuery to directly call .net Page Methods as described [here](http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-aja...
[ 0.25633862614631653, -0.011303204111754894, 0.095645010471344, 0.1384018361568451, -0.47781020402908325, -0.2982490360736847, 0.14316964149475098, 0.05857844278216362, -0.2540287971496582, -0.6515439748764038, 0.10238431394100189, 0.7913969159126282, -0.11920582503080368, -0.20974202454090...
like this are approximations generally, as the earth is not perfectly spherical nor does this take into account mountains, hills, valleys, etc.. We use this code on [AcademicHomes.com](http://www.academichomes.com "AcademicHomes.com") with PHP and MySQL, it returns records within $radius miles of $latitude, $longitude....
[ 0.24443891644477844, 0.1966332048177719, 0.8017281889915466, 0.2216198742389679, 0.26757147908210754, -0.1114513948559761, 0.4711058735847473, -0.11419939994812012, -0.32719236612319946, -0.39264827966690063, -0.024705206975340843, -0.039612188935279846, 0.024405989795923233, 0.70128285884...
(69.1 * (longitude - " . $longitude . ") * COS(" . $latitude . " / 57.3)) * (69.1 * (longitude - " . $longitude . ") * COS(" . $latitude . " / 57.3)) ) < " . pow($radius, 2) . " ORDER BY ( (69.1 * (latitude - " . $latitude . ")) * (69.1 * (latitude - " . $latitude . "))
[ 0.015860525891184807, 0.5792807340621948, 0.4033065438270569, 0.1589525192975998, 0.36597785353660583, 0.6089426875114441, 0.29694950580596924, -0.3286582827568054, -0.1951838731765747, -0.3428190052509308, -0.44224175810813904, 0.039064403623342514, 0.009035816416144371, 0.228099599480628...
) + ( (69.1 * (longitude - " . $longitude . ") * COS(" . $latitude . " / 57.3)) * (69.1 * (longitude - " . $longitude . ") * COS(" . $latitude . " / 57.3)) ) ASC"); ```
[ 0.15863074362277985, 0.5204247236251831, 0.9128269553184509, -0.16705183684825897, 0.5254552960395813, 0.2616119384765625, -0.04423278197646141, -0.17205144464969635, -0.17761075496673584, -0.21026833355426788, -0.6852058172225952, 0.4633881449699402, -0.20041775703430176, 0.21720366179943...
Modern browsers are [supposed to support the CSS page-break properties](https://stackoverflow.com/questions/117772/which-browsers-support-page-break-manipulation-using-css-and-the-page-break-insid/117834#117834) to some degree. However I haven't been able to get any browser to print any differently when I use `avoid`, ...
[ 0.1726694405078888, 0.29762840270996094, 0.3487088680267334, 0.02769237384200096, 0.04273371398448944, -0.19509057700634003, 0.41064539551734924, 0.06654639542102814, -0.4242248833179474, -0.8628836274147034, -0.18805961310863495, 0.2905600070953369, -0.1238257884979248, 0.1625345349311828...
p { page-break-inside: avoid; orphans: 2; widows: 2; } ``` Browser support for printing sucks. Not just a little bit, but completely totally and without compare. About once every other year (for the past 10), I've played around with this and I always come back to the same conclusion: d...
[ 0.4350558817386627, 0.35618874430656433, 0.5701965093612671, 0.13981546461582184, -0.10968639701604843, -0.09682904928922653, 0.10917938500642776, 0.16876395046710968, -0.4019937217235565, -0.6984387040138245, -0.22087682783603668, 0.40116357803344727, -0.13275028765201569, 0.0532264225184...
file on the fly and let the user print that.
[ 0.6940241456031799, 0.1139724925160408, 0.27035143971443176, 0.20516453683376312, 0.24930527806282043, -0.4627062976360321, -0.18226341903209686, 0.3617818355560303, 0.027205171063542366, -0.5147064924240112, -0.1655375063419342, 0.5751743912696838, -0.4143429100513458, 0.14997372031211853...
### Exact Duplicate > [Table Naming Dilemma: Singular vs. Plural Names](https://stackoverflow.com/questions/338156/table-naming-dilemma-singular-vs-plural-names) Is it better to use singular or plural database table names ? Is there an accepted standard ? I've heard arguments for and against it, what do you guys thi...
[ -0.13098135590553284, 0.10016749799251556, 0.0018275014590471983, 0.20751290023326874, -0.17123067378997803, 0.15798600018024445, -0.27222663164138794, 0.2270563691854477, -0.44275814294815063, -0.5884952545166016, 0.19817517697811127, 0.4755953550338745, -0.11375511437654495, 0.2488863021...
I need to get the size of a directory, recursively. I have to do this every month so I want to make a [PowerShell](http://en.wikipedia.org/wiki/Windows_PowerShell) script to do it. How can I do it? Try the following ``` function Get-DirectorySize() { param ([string]$root = $(resolve-path .)) gci -re $root | ?...
[ 0.19028247892856598, -0.05467425286769867, 0.6794275641441345, 0.0002896348014473915, 0.17277418076992035, -0.07936731725931168, 0.2622189223766327, -0.37172842025756836, -0.5970222353935242, -0.6621987819671631, 0.007228733506053686, 0.5084805488586426, -0.1062052771449089, 0.174641340970...
this work? Let's break it down by components of the pipeline. The `gci -re $root` command will get all items from the starting `$root` directory recursively and then push them into the pipeline. So every single file and directory under the `$root` will pass through the second expression `?{ -not $_.PSIsContainer }`. E...
[ 0.2985856831073761, -0.1944839209318161, 0.4834008812904358, -0.21867570281028748, 0.2692221701145172, 0.01896444335579872, 0.19916954636573792, -0.1480618566274643, -0.056108709424734116, -0.5278216004371643, -0.2517966330051422, 0.6387428641319275, -0.5189784169197083, 0.3932048380374908...
expression is only keeping files values. The final cmdlet measure-object will sum the value of the property Length on all values remaining in the pipeline. So it's essentially calling Fileinfo.Length for all files under the current directory (recursively) and summing the values.
[ 0.06426330655813217, -0.20728729665279388, 0.7500536441802979, 0.03800974786281586, 0.14807721972465515, -0.10633102059364319, 0.0903380885720253, -0.46736156940460205, 0.037434838712215424, -0.47323474287986755, 0.05090324208140373, 0.6915538907051086, -0.19836775958538055, -0.04377080500...
I'd like to be able to dispatch from one controller action to another conditionally, based on a combination of query parameters and data in the database. What I have right now is something like: ``` class OldController < ApplicationController def old_controller_action if should_use_new_controller new_para...
[ -0.03428489342331886, -0.17246966063976288, 0.7035661935806274, 0.13740241527557373, -0.08462727069854736, -0.031114105135202408, 0.020217834040522575, -0.5465589165687561, -0.6797717213630676, -0.6340504288673401, -0.24460700154304504, 0.27270427346229553, -0.4819931089878082, 0.289468437...
end end ``` This works just fine, but it issues an HTTP redirect, which is slow. I'd like to be able to do this same thing, but within the same HTTP request. Is there a clean way to do this? **Edit:** The bounty will go to someone who can show me a clean way to do this that leaves the controllers and their actions ...
[ 0.2711353003978729, 0.10173723846673965, 0.6338807344436646, 0.05928071588277817, 0.039270251989364624, -0.27964726090431213, 0.16524331271648407, -0.31490930914878845, -0.16926231980323792, -0.6908155679702759, -0.0813368484377861, 0.5548426508903503, -0.33285537362098694, 0.0613101087510...