text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
of 0 2008-12-31 09:31:41.756 Concentration[18604:20b] on nil value has retain count of 0 2008-12-31 09:31:41.757 Concentration[18604:20b] after init value has retain count of 2147483647 ``` I am calling it like: ``` Test *test = [[Test alloc] initWithValue:@"some text"]; ``` Shouldn't value have a retain count of ...
[ -0.0329294316470623, 0.21347054839134216, 0.282878041267395, -0.009127914905548096, -0.11730379611253738, -0.09736798703670502, 0.6231053471565247, -0.35223111510276794, 0.1226932555437088, -0.462815523147583, 0.03197406604886055, 0.5026535391807556, 0.11045614629983902, 0.4023123979568481...
If i create a program, which in one small out of the way area, uses Excel automation: will the application fail when Excel is needed or will the application fail to start? --- Update ------ Let me ask the same question, but in a more drawn out way: Will the application be usable by * > 99.9% of the users who nev...
[ 0.2971499562263489, 0.10166540741920471, 0.19429324567317963, 0.09222184121608734, 0.011775811202824116, 0.007202572654932737, 0.07568608224391937, -0.28038281202316284, -0.018357664346694946, -0.9083060622215271, -0.26696932315826416, 0.6813651919364929, -0.28999245166778564, -0.122023686...
but references the COM interop DLL's fail to start? --- *Let me ask the same question another way:* Will an application that doesn't use Excel be usable if Excel is not installed, if that application has a dependancy on the Office Primary Interop dlls? --- *Let me ask the same question another way:* If my applica...
[ 0.22074805200099945, 0.2753645181655884, 0.30439460277557373, 0.16681288182735443, 0.06208884343504906, -0.11495892703533173, 0.17828597128391266, 0.0052132876589894295, -0.1262049525976181, -0.7876492142677307, -0.13645359873771667, 0.6168671250343323, -0.3418588638305664, -0.005051529966...
Is it possible to convert a .pfx (Personal Information Exchange) file to a .cer (Security Certificate) file? Unless I'm mistaken, isn't a .cer somehow embedded inside a .pfx? I'd like some way to extract it, if possible. the simple way I believe is to import it then export it, using the certificate manager in Windows M...
[ 0.3299163579940796, 0.3252396285533905, 0.4062351584434509, 0.20605607330799103, 0.21836891770362854, -0.3974023461341858, -0.2122821807861328, 0.1026366651058197, -0.18660371005535126, -0.6475696563720703, -0.2453327476978302, 0.3240765929222107, 0.009074578993022442, 0.12714284658432007,...
I need to show a screen or something, saying 'Loading' or whatever while long process are working. I am creating a application with the Windows Media Encoder SDK and it takes awhile to initialize the encoder. I would like for a screen to pop up saying 'Loading' while it is starting the encoder, and then for it to disa...
[ 0.6431001424789429, 0.10684939473867416, 0.6603060960769653, 0.008928527124226093, 0.008107760921120644, -0.3898657560348511, -0.26616278290748596, 0.07337706536054611, -0.09478646516799927, -0.8212939500808716, 0.04763071984052658, 0.41355404257774353, -0.292881578207016, 0.04138393700122...
it to stop the user from interacting with the form that is showing the loading dialog. The loading dialog should be coded in such a way that when it loads, it uses a `BackgroundWorker` to initialize the encoder on a separate thread. This ensures the loading dialog will remain responsive. Here's an example of what the ...
[ 0.2845279276371002, -0.407381534576416, 0.5138041377067566, -0.005131077952682972, 0.08415791392326355, -0.002300059888511896, 0.1399392932653427, -0.29783394932746887, -0.18478994071483612, -0.5352742671966553, -0.13583847880363464, 0.6771954894065857, -0.5896122455596924, 0.0972910076379...
_worker = New BackgroundWorker() AddHandler _worker.DoWork, AddressOf WorkerDoWork AddHandler _worker.RunWorkerCompleted, AddressOf WorkerCompleted _worker.RunWorkerAsync() End Sub ' This is executed on a worker thread and will not make the dialog unresponsive. If you want ' to in...
[ 0.08725762367248535, -0.04845409840345383, 0.461613267660141, -0.3002544045448303, 0.26100534200668335, 0.1938997209072113, 0.5944374799728394, -0.22578875720500946, -0.2904024124145508, -0.642092227935791, -0.16427265107631683, 0.2542147636413574, -0.5750084519386292, 0.3324500322341919, ...
WorkerDoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs) ' Initialize encoder here End Sub ' This is executed on the UI thread after the work is complete. It's a good place to either ' close the dialog or indicate that the initialization is complete. It's safe to work with ' controls ...
[ 0.024464452639222145, 0.03227401524782181, 0.4429512619972229, -0.14701201021671295, 0.26526355743408203, 0.14366087317466736, 0.3831263482570648, -0.19637538492679596, -0.149057999253273, -0.5816062092781067, -0.42779019474983215, 0.3423963189125061, -0.2898400127887726, 0.151136085391044...
Me.Close() End Sub End Class ``` And, when you're ready to display the dialog, you would do so like this: ``` Dim frm As New LoadingForm() frm.ShowDialog() ``` There are more elegant implementations and better practices to follow, but this is the simplest.
[ 0.1566970944404602, 0.033045023679733276, 1.0905719995498657, -0.22069847583770752, -0.12023943662643433, -0.3351709842681885, -0.1952018439769745, -0.09623198211193085, 0.09172015637159348, -0.5329031348228455, -0.28712230920791626, 0.5214971899986267, -0.18205533921718597, 0.170894026756...
I have code that looks like: ``` //System.Data.IDataRecord dr try { Consolidated = Utility.NullConvert.ToBool(dr[Constants.Data.Columns.cConsolidated], false); } catch (IndexOutOfRangeException) { } //swallow ``` I don't know if the consolidated column will be present in the datareader, so I do that...
[ 0.4889478087425232, 0.36051955819129944, 0.030368974432349205, -0.013492695055902004, 0.10368555784225464, 0.09493429958820343, 0.26208367943763733, 0.05438908562064171, -0.31152260303497314, -0.47670233249664307, 0.2155754715204239, 0.2066788524389267, -0.24455416202545166, 0.266866803169...
only right here; not everywhere). Yes, you can use the GetSchemaTable() method of the datareader to get a list of columns, then you can see if that column exists. You might find [this very similar question](https://stackoverflow.com/questions/373230/check-for-column-name-in-a-sqldatareader-object) helpful.
[ 0.16292765736579895, -0.13875891268253326, 0.46945688128471375, 0.3009757995605469, 0.06503545492887497, -0.17028933763504028, 0.12349212914705276, -0.014882921241223812, -0.40327534079551697, -0.3992355167865753, -0.04236272722482681, 0.4423690736293793, -0.18521450459957123, 0.0163371656...
--- The Question ------------ My question is: **Does C# nativly support late-binding IDispatch?** --- *Pretend* i'm trying to automate Office, while being compatible with whatever version the customer has installed. In the .NET world if you developed with Office 2000 installed, every developer, and every customer...
[ 0.11399371922016144, 0.07754960656166077, 0.4354783296585083, -0.041653361171483994, 0.19128946959972382, -0.1704169064760208, 0.14968721568584442, 0.11219485849142075, -0.034081872552633286, -0.5086822509765625, -0.3024711310863495, 0.7256656289100647, -0.5831131339073181, 0.0154136605560...
null, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER, IUnknown, out unk); ``` And now we're off to the races - able to use Excel from inside my application. Of course, if *really* you want to use the object, you have to call have some way of calling methods. We *could* get ahold of the various **interface*...
[ 0.012380480766296387, 0.2559834122657776, 0.444355845451355, -0.019373411312699318, -0.10091323405504227, -0.17021721601486206, 0.2517141103744507, -0.15302754938602448, -0.20837974548339844, -0.49197983741760254, -0.13214702904224396, 0.49279090762138367, -0.2984157204627991, 0.0074086249...
downside of using interfaces: we have to get ahold of the various interface declarations, transated into our language. And we're stuck using method-based invocations, having to specify all parameters, e.g.: ``` ExcelWorkbook workbook = xl.Workbooks.Add(template, lcid); xl.Worksheets.Add(before, after, count, type, lci...
[ 0.11232186108827591, 0.15855278074741364, 0.40931224822998047, -0.0717863067984581, -0.250619113445282, -0.2785247564315796, 0.30267027020454407, -0.30469807982444763, -0.005977506283670664, -0.7843560576438904, -0.12883000075817108, 0.650472104549408, -0.5347511768341064, -0.2014826685190...
with a reason of why i want to use IDispatch. Not every COM object is Excel. Some COM objects have no support other than through IDispatch. You can, relativly, use late-binding IDispatch binding in C#. <http://support.microsoft.com/kb/302902> Here's some sample for using Excel. This way you don't need to add a needle...
[ 0.09355705976486206, 0.09479869157075882, 0.3460799753665924, 0.17571648955345154, -0.17018619179725647, 0.01660485379397869, 0.11156679689884186, -0.45928648114204407, -0.057348642498254776, -0.8172962069511414, -0.22362200915813446, 0.5479941368103027, -0.46201643347740173, 0.11518656462...
null ); //Get the worksheets collection. // sheets = book.Worksheets; Object sheets = book.GetType().InvokeMember( "Worksheets", BindingFlags.GetProperty, null, book, null ); Object[] parameters; //Get the first worksheet. // sheet = sheets.Item[1] parameters = new Object[1]; parameters[0] = 1; Object shee...
[ -0.14809349179267883, -0.07246562838554382, 0.6485990881919861, -0.17356880009174347, 0.04702039808034897, 0.26784807443618774, 0.20297999680042267, -0.5288796424865723, -0.4130779504776001, -0.5893855690956116, -0.5534362196922302, 0.2552625238895416, -0.5388742089271545, 0.30509722232818...
= "Hello, World!"; objRange_Late.GetType().InvokeMember( "Value", BindingFlags.SetProperty, null, range, parameters ); //Return control of Excel to the user. // xl.Visible = true; // xl.UserControl = true; parameters = new Object[1]; parameters[0] = true; xl.GetType().InvokeMember( "Visible", BindingFlags.S...
[ -0.3145887553691864, 0.1829969435930252, 0.6617261171340942, -0.2462434470653534, 0.18571634590625763, 0.11800134181976318, 0.4534970223903656, -0.20835959911346436, 0.17688295245170593, -0.41158169507980347, -0.7223847508430481, 0.5385909676551819, -0.5099789500236511, 0.04364775493741035...
I want to move a file with Ruby. How do I do that? You can use FileUtils to do this. ``` #!/usr/bin/env ruby require 'fileutils' FileUtils.mv('/tmp/your_file', '/opt/new/location/your_file') ``` Remember; if you are moving across partitions, "mv" will copy the file to new destination and unlink the source path.
[ 0.35991647839546204, 0.002281497698277235, 0.5949755311012268, -0.3075246512889862, 0.1365940123796463, -0.1356753557920456, 0.1062345951795578, -0.28209570050239563, -0.38417676091194153, -0.9165966510772705, -0.16611218452453613, 0.5595881342887878, -0.4351453185081482, 0.352937638759613...
I have a table, with 2 important columns DocEntry, WebId Sample data is like ``` DocEntry WebId 1 S001 2 S002 3 S003 4 S005 ``` Now as we can notice here, in column WebId, S004 is missing. How can we locate such missing numbers, with a query. Further explanation: The web id should...
[ -0.06702390313148499, 0.3073750436306, 0.4036451280117035, 0.1542430818080902, 0.0027255213353782892, 0.15657900273799896, -0.06186620891094208, -0.2003682404756546, -0.25086909532546997, -0.6970191597938538, 0.29227322340011597, 0.10230620205402374, -0.17884743213653564, 0.364811390638351...
do not have any separate table for the possible entries, as that is not practical. I've to find the missing numbers on a month to month basis, taking the starting and ending value of each month as the boundaries and than finding the missing numbers, if any. A very simple approach :) ``` mysql> select * from test; +---...
[ -0.021928247064352036, 0.2662246525287628, 0.6079123616218567, 0.08120276033878326, 0.11495934426784515, 0.1052236557006836, 0.4488387107849121, -0.023916278034448624, -0.36353856325149536, -0.5194260478019714, -0.1689334511756897, -0.09908807277679443, -0.09971461445093155, 0.278275817632...
| S005 | | 5 | S006 | | 6 | S007 | | 7 | S008 | | 8 | S010 | +----------+-------+ 8 rows in set (0,00 sec) mysql> SELECT right(t1.webid,3) +1 as missing_WebId FROM test t1 left join test t2 on right(t1.webid,3)+1 = right(t2.webid,3) where t2.webid is null; +---------------+ | missing_W...
[ -0.38560229539871216, -0.11636215448379517, 0.3533356189727783, 0.06464188545942307, 0.17077726125717163, 0.24878810346126556, 0.31745046377182007, -0.34356164932250977, -0.09969084709882736, -0.4837585389614105, -0.38108351826667786, 0.12380065023899078, -0.2841595709323883, 0.11909078061...
| | 11 | +---------------+ 3 rows in set (0,01 sec) ``` good luck, Maurice
[ -0.24027329683303833, 0.5386315584182739, 0.13018296658992767, -0.07634644210338593, 0.27661803364753723, 0.007368255872279406, 0.5451052784919739, -0.13927683234214783, -0.3015872836112976, -0.7384206056594849, -0.14995533227920532, 0.38719868659973145, -0.08198263496160507, -0.1453858613...
Why does the following code NOT give an error, nor any type of a warning about an implicit conversion? ``` std::wstring str = L"hi"; if(str[0] == 'h') cout<<"strange"<<endl; ``` The proper normal code is: ``` std::wstring str = L"hi"; if(str[0] == L'h') cout<<"strange"<<endl; ``` Compiler: visual stud...
[ -0.13553713262081146, 0.21253548562526703, 0.39206841588020325, -0.23566268384456635, -0.3379141092300415, -0.34995776414871216, 0.33428895473480225, -0.3312106430530548, -0.21367178857326508, -0.39222297072410583, -0.1167997196316719, 0.6402274370193481, -0.6547555923461914, -0.1923713684...
and they're not required to warn about this or anything else)
[ 0.5536839962005615, 0.41344621777534485, 0.20141911506652832, -0.07446585595607758, 0.1906309425830841, -0.08556129038333893, 0.5668256878852844, 0.12058605998754501, -0.37543633580207825, -0.03528381139039993, -0.3114820122718811, 0.43275439739227295, -0.21410304307937622, -0.029291480779...
I am currently stuck in the design of this solution. The data layer design consists of the following: * Recipe (parent high level object) + Language Detail (name, description by language) (many) - Headers (many) - Steps (many) * Ingredients (many) * Quantities (many) * Procedures (many) - Notes (many)...
[ 0.46249425411224365, 0.3483761250972748, 0.3500079810619354, 0.25471916794776917, 0.39415624737739563, 0.09439659118652344, 0.0038361421320587397, -0.289325475692749, 0.03986939415335655, -0.8159705400466919, 0.27152660489082336, 0.2943211793899536, 0.1298331618309021, 0.5038354396820068, ...
BL is directly coupled to the DAL, we basically need the injection of WCF between the BL and DAL. I have read in [this thread](https://stackoverflow.com/questions/135339/linqtosql-and-wcf) that using L2S isn't a good idea over WCF, but since the design isn't new, we have to use this type of methodology, and then move ...
[ 0.33389660716056824, -0.31566017866134644, 0.7164834141731262, -0.061372920870780945, -0.45940351486206055, -0.29639485478401184, -0.400522381067276, -0.3297100067138672, -0.3230147957801819, -0.4197516441345215, 0.05587343871593475, 0.2635639011859894, -0.4572738707065582, 0.1911980509757...
but you can create a set of classes that Linq populates and then serialize that. For example: ``` [DataContract] public class Recipe { [DataMember] public string Name { get; set; } [DataMember] public string Description { get; set; } [DataMember] public List<Ingredient> Ingredients { get; se...
[ 0.7003269791603088, -0.048989277333021164, 0.4273853600025177, 0.06882687658071518, 0.35121816396713257, -0.14717333018779755, -0.1494315266609192, -0.5908352136611938, -0.11233963072299957, -0.5037825107574463, -0.12917514145374298, 0.5872417688369751, -0.22813133895397186, 0.058711513876...
Recpie { Name = r.name, Description = r.description, Ingredients =
[ 0.5906020402908325, -0.3931664824485779, 0.17539379000663757, -0.08909032493829727, 0.16176682710647583, 0.04118659719824791, 0.18229492008686066, -0.49015823006629944, -0.08030784130096436, -0.27851974964141846, -0.4109705984592438, 0.4394190311431885, -0.4783545434474945, 0.1594892889261...
(Linq code to make list of ingredients) }).ToList(); ``` And then sending the list down the line with WCF becomes a piece of cake.
[ 0.35741090774536133, 0.04296453669667244, 0.839148998260498, -0.35366249084472656, 0.06898549944162369, -0.027680853381752968, 0.21654784679412842, -0.49347949028015137, 0.014989417977631092, -0.4191259741783142, -0.19629280269145966, 0.24066542088985443, -0.25940248370170593, 0.2284492850...
There have been several questions recently about database indexing and clustered indexing and it has been kind of new to me until the last couple weeks. I was wondering how important it is and what kind of performance gains can be expected from creating them. **Edit:** What is usually the best type of fields to look a...
[ 0.05582370609045029, 0.14179502427577972, 0.3900752365589142, -0.09124867618083954, -0.3626084327697754, -0.2578459680080414, 0.08303665369749069, -0.27678370475769043, 0.015550234355032444, -0.6043928265571594, -0.06268540024757385, 0.6190998554229736, -0.20047582685947418, -0.02331972494...
of queries going to happen on the database, making a large number of trade-offs and understanding the implication of a specific index in the specific DB engine. But it's very important nevertheless. **EDIT:** Basically, clustered indexes usually should have short lengths. They should be created on queries which reflec...
[ 0.2535800337791443, 0.14401212334632874, 0.10977315902709961, 0.2720782458782196, -0.16421176493167877, -0.23371200263500214, 0.38524529337882996, 0.06707485765218735, -0.1551436185836792, -0.6191166043281555, 0.09422862529754639, 0.32793232798576355, -0.15759804844856262, -0.0782985612750...
years of experience and knowledge and by no means it's something to explain in a single paragraph. It's the primary thing that makes DB experts expert (It's not the only thing, but it's primitive to other important things, such as concurrency issues, availability, ...)!
[ 0.29943332076072693, 0.4696206748485565, -0.0011277414159849286, 0.2963525354862213, -0.20438550412654877, -0.4975402057170868, 0.42796704173088074, -0.19107688963413239, -0.13618606328964233, -0.24630801379680634, -0.06567823141813278, 0.5070803165435791, 0.11047467589378357, 0.1719229817...
I'm trying to connect a C# application (using Visual C# 2008 Express Edition) to a remote MySQL server. I have the drivers for this, but when I followed the tutorials (including adding the pooling and connection reset properties), I get an error that: *Object reference not set to an instance of an object.* I've include...
[ -0.001529853674583137, 0.07800498604774475, 0.4137699007987976, -0.0728655755519867, 0.0016107772244140506, -0.11604031175374985, 0.4058920443058014, 0.04260082170367241, -0.09231697022914886, -0.7683233022689819, 0.00017916786600835621, 0.5289270877838135, -0.5068327784538269, 0.206776723...
connection string outside of the constructor to help narrow down the issue: ``` MySqlConnection connect = new MySqlConnection(); //Do you get the null exception in this next line? connect.ConnectionString = "your conn string here"; connect.Open(); //-> If you get the exception here then the problem is with the connect...
[ -0.25122714042663574, 0.014911362901329994, 0.2878853976726532, -0.10292872041463852, 0.019808640703558922, -0.19303329288959503, 0.39508625864982605, 0.1919487714767456, -0.10052015632390976, -0.7547364234924316, -0.2397541105747223, 0.6361551880836487, -0.5540884137153625, 0.377366572618...
Is there something available that could help me convert a XSD into SQL relational tables? The XSD is rather big (in my world anyway) and I could save time and boring typing if something pushed me ahead rather than starting from scratch. The XSD is [here](http://www.grip.no/kjemikalier/XMLstandardformat/hmsdatablad.xsd...
[ 0.15798835456371307, -0.18613234162330627, 0.6179884076118469, 0.36392179131507874, -0.3189921975135803, -0.2119467407464981, -0.028871329501271248, 0.16839814186096191, -0.36768028140068054, -0.6574726104736328, 0.11657312512397766, 0.28771495819091797, 0.08627942949533463, 0.112529970705...
from an XSD file. They have outlined it in two parts [here](http://annlewkowicz.blogspot.com/2007/03/create-ddl-from-dataset-xsd-file.html) and [here](http://annlewkowicz.blogspot.com/2008/01/create-ddl-from-xsd-file-part-ii.html). I might have to try this out myself for future use... EDIT: Just found this question a...
[ 0.3224966824054718, 0.15002363920211792, 0.42442718148231506, -0.07701524347066879, -0.2654368579387665, -0.23990444839000702, -0.1423007696866989, -0.15468889474868774, -0.2351914495229721, -0.5780025124549866, -0.04947508126497269, 0.26521918177604675, -0.19870224595069885, 0.11275413632...
I have just started writing my own *JavaScript Framework* (just for the learning experience), and have prefixed some private members with a **\_**, like such: ``` var _isFireBugEnabled = function () { return (window.console && window.console.firebug); }; ``` When I ran my code against Crockford's [JSLint](http:/...
[ 0.13593986630439758, 0.23308320343494415, 0.3443339765071869, -0.2633725106716156, 0.005891844630241394, -0.1492147296667099, 0.48922601342201233, -0.09027893841266632, -0.07559888809919357, -0.7593775391578674, -0.0939115583896637, 0.642306387424469, -0.1916951835155487, 0.100908078253269...
in the [book](https://rads.stackoverflow.com/amzn/click/com/0596517742)* The reason is that Douglas Crockford hates about 78% of Javascript\*. Many people think he's a bit strict, and in fact many libraries do use leading underscores in production code. I don't see much wrong with it. There are no side effects. Additi...
[ 0.18675851821899414, 0.6910768151283264, 0.19713161885738373, -0.07645665854215622, 0.04653146490454674, -0.3485701382160187, 0.44427290558815, -0.20231877267360687, -0.07426748424768448, -0.2766518294811249, -0.27210336923599243, 0.026671821251511574, -0.5140348076820374, 0.33620527386665...
The dollar sign is > intended for use only in mechanically > generated code. \*Note: I'm being facetious. He really only hates about half, and he typically has good reason. I'd disagree with Crockford here, but he's usually very right.
[ 0.7024726867675781, 0.6285015940666199, 0.0155877023935318, -0.003933575004339218, 0.08111115545034409, -0.01717001013457775, 0.19508303701877594, 0.22386442124843597, 0.17686250805854797, -0.47040295600891113, 0.20994876325130463, 0.5373839139938354, -0.2858521640300751, 0.281772702932357...
I want to overlay one image with another using CSS. An example of this is the first image (the background if you like) will be a thumbnail link of a product, with the link opening a lightbox / popup showing a larger version of the image. On top of this linked image I would like an image of a magnifying glass, to show...
[ 0.6820502877235413, -0.02801033854484558, 0.3777485191822052, 0.0198347270488739, -0.032826099544763565, -0.04340788722038269, -0.13176608085632324, 0.32753685116767883, -0.12330105155706406, -0.658204972743988, 0.006368102505803108, 0.381666898727417, -0.11297934502363205, 0.1711020022630...
class="gallerypic" title=""> <img src="[thumbnail pic]" height="90" width="140" alt="[Gallery Photo]" class="pic" /> <span class="zoom-icon"> <img src="/images/misc/zoom.gif" width="32" height="32" alt="Zoom"> </span> </a> ``` Then using CSS: ``` a.gallerypic{ width:140px; text-decoration:none; pos...
[ -0.18759843707084656, -0.31892654299736023, 0.835722804069519, 0.03036774881184101, -0.15790501236915588, 0.25200316309928894, -0.09491785615682602, -0.6313249468803406, -0.24071110785007477, -0.007096739485859871, 0.10085520148277283, 0.4945443272590637, -0.17921406030654907, -0.388899654...
through the magnifying glass. Hope this helps. EDIT: To clarify for your example - you could ignore the `visibility:hidden;` and kill the `:hover` execution if you wanted, this was just the way I did it.
[ 0.6036229729652405, 0.128059983253479, 0.1557762622833252, -0.03143387660384178, -0.2744867205619812, -0.10151544958353043, 0.5692163109779358, 0.05251077190041542, -0.24078801274299622, -0.4057244062423706, -0.02654668316245079, 0.3445228636264801, -0.08199971169233322, -0.066976241767406...
I have a View class (OrderView.aspx) which shows the details of an order (Account Name, Order Date) as well as a list of order lines via the Repeater control. Each order line is represented by a User Control View (OrderLineView.ascx) which shows the details of the order line (Item Name, Quantity, Price). I have a model...
[ 0.1673216074705124, -0.01156382355839014, 0.6223208904266357, -0.10031626373529434, 0.013021090999245644, 0.4849527180194855, 0.10071967542171478, 0.07361558824777603, -0.2611212134361267, -0.7335329055786133, -0.16381004452705383, 0.5489586591720581, -0.08798404037952423, 0.26850840449333...
form within the OrderLine control to a Save method on the Controller and then RedirectToAction back to the same Order page (this refreshes the whole page, nothing AJAXy about it). I have the Delete button linking to a method on the Controller that tries to delete, and then RedirectToAction back to the same Order page. ...
[ -0.062121156603097916, -0.08296388387680054, 0.7615351676940918, -0.057902105152606964, 0.03742487356066704, 0.05259810760617256, 0.4105817675590515, -0.10619451105594635, -0.0896456241607666, -0.9398021101951599, -0.039575740694999695, 0.541695773601532, -0.25156357884407043, 0.0202659647...
one I clicked). My questions: 1 - How do I pass this data from my Controller method to the specific User Control? Should I somehow add it in to the model? Seems like a bad idea (since it really isn't part of the model). 2 - Should I have a OrderLineController for the OrderLine operations as well as a OrderController ...
[ -0.15192945301532745, -0.2392929345369339, 0.7880966067314148, -0.034422047436237335, 0.09409669041633606, -0.03311378136277199, 0.08303344249725342, -0.46451035141944885, -0.17804674804210663, -0.5976707339286804, 0.0067499177530407906, 0.5302229523658752, -0.6095649003982544, 0.052957624...
Message = "blabla"}); ``` but this makes the Message value show up in the URL string. I am OK with that, but would prefer that it doesn't show if possible. 4 - Also, for accessing properties of the Model from within the view, I find myself doing this all of the time: ``` foo(((someModelType) this.ViewData.Model).So...
[ 0.1057678759098053, 0.17048655450344086, 0.46305933594703674, -0.36147844791412354, -0.20346543192863464, -0.07959498465061188, 0.30796703696250916, 0.08139986544847488, -0.16608528792858124, -0.39658308029174805, -0.04431721568107605, 0.6792688965797424, -0.5088424682617188, 0.35447078943...
like this: ``` foo(ModelEval("SomeProperty")); ``` Is there such a thing? I have written my own, but would like it if I didn't have to. 1 = Check out ModelState. ``` ViewData.ModelState.AddModelError("something.Name", "Please enter a valid Name"); ``` ModelState is actually a dictionary, so you could identify th...
[ 0.3080960810184479, 0.14052027463912964, 0.24844098091125488, -0.04706515371799469, 0.07830854505300522, -0.22574496269226074, 0.36570197343826294, -0.15842778980731964, -0.029903780668973923, -0.5689868927001953, 0.08228636533021927, 0.6919800043106079, -0.2453695684671402, -0.07450550794...
strong type there is no more tightly coupled than having a magic string point to that property of the model anyway. The former just gives you type safety and the glory that is intellisense.
[ -0.05022236704826355, -0.3419542908668518, 0.4451223909854889, 0.29512667655944824, -0.3063565194606781, -0.5607296228408813, 0.4982365667819977, -0.2570358216762543, 0.1706630140542984, -0.3840491771697998, 0.09265287965536118, 0.526698887348175, -0.14724484086036682, -0.0631868913769722,...
I have a template I made that sets variables that rarely change, call my headers, calls my banner and sidebar, loads a variable which shows the individual pages, then calls the footer. In one of my headers, I want the URL of the page in the user's address bar. Is there a way to do this? Currently: ``` <?php $title = ...
[ 0.36390992999076843, 0.17124228179454803, 0.8310235738754272, 0.10703872889280319, -0.10089470446109772, -0.07440876960754395, 0.13981063663959503, -0.13692009449005127, -0.17578336596488953, -0.6389221549034119, 0.05724477022886276, 0.4482314884662628, -0.16811519861221313, 0.156966969370...
ton of other useful variables worth remembering in $\_SERVER, so either just: ``` print_r($_SERVER); ``` or just visit the doc at <http://php.net/manual/en/reserved.variables.server.php>
[ 0.17911073565483093, 0.3074488937854767, 0.011464632116258144, 0.006322552915662527, -0.15479794144630432, -0.026186173781752586, 0.1431417614221573, 0.2986446022987366, -0.186501607298851, -0.5094171762466431, 0.10091699659824371, 0.6783481240272522, 0.055657658725976944, 0.14811348915100...
What are extension methods in .NET? EDIT: I have posted a follow up question at [Usage of Extension Methods](https://stackoverflow.com/questions/403619/usage-of-extension-methods) > **Extension methods** allow developers to add new methods to the public > contract of an existing CLR type, > without having to sub-cla...
[ 0.07766745239496231, -0.16524618864059448, 0.5171260237693787, -0.1739926040172577, -0.09414755553007126, -0.0889587327837944, 0.056348055601119995, -0.1774105280637741, -0.32768821716308594, -0.3573158085346222, -0.3207378685474396, 0.45058009028434753, -0.2810856103897095, -0.19527299702...
s) { Regex regex = new Regex(@"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$"); return regex.IsMatch(s); } ``` Now, the above method can be called directly from any string, like such: ``` bool isValid = "so@mmas.com".IsValidEmailAddress(); ``` The added methods will then also appear in IntelliSense: [![alt text](https...
[ 0.23030978441238403, -0.31913918256759644, 0.7819350957870483, -0.2790807783603668, 0.21018360555171967, 0.035098057240247726, 0.13465756177902222, -0.6341119408607483, -0.32318389415740967, -0.5734818577766418, -0.4806925654411316, 0.5168071985244751, -0.23523585498332977, 0.1165064349770...
static float Average(this Extended extnd) { return extnd.Sum() / 3; } } ``` As you see, the class `Extending` is adding a method named average to class `Extended`. To get the average, you call `average` method, as it belongs to `extended` class: ``` Extended ex = new Extended(); Console.WriteLine(ex.ave...
[ -0.06678391247987747, -0.31457164883613586, 0.5726040601730347, -0.3190312385559082, -0.13097915053367615, -0.015065508894622326, -0.08254976570606232, -0.06715065985918045, -0.08933525532484055, -0.23482783138751984, -0.03842998296022415, 0.4866328239440918, -0.435859739780426, -0.0070289...
I am tasked with improving the performance of a particular page of the website that has an extremely high response time as reported by google analytics. Doing a few google searches reveals a product that came with VS2003 called ACT (Application Center Test) that did load testing. This doesn't seem to be distributed an...
[ 0.22603721916675568, -0.132660374045372, 0.25242969393730164, 0.2832920551300049, 0.08294189721345901, -0.10088604688644409, 0.26536551117897034, -0.17492912709712982, -0.1439172327518463, -0.7414008378982544, 0.12104134261608124, 0.5046489238739014, -0.12194496393203735, -0.37021756172180...
taking a while within the page using trace. What are the best practices and tools surrounding performance and load testing? I'm mainly looking to be able to see results not how to accomplish them. Here is an article showing how to profile using VSTS profiler. [If broken it is, fix it you should](http://blogs.msdn.co...
[ 0.25067028403282166, -0.11944512277841568, 0.1634587049484253, 0.24048660695552826, -0.00954018346965313, -0.20859231054782867, 0.2640693783760071, 0.16538365185260773, -0.43301287293434143, -0.42151984572410583, 0.027650261297822, 0.680586040019989, 0.04226575419306755, 0.0084453476592898...
configure HealthMonitoring?](http://msdn.microsoft.com/en-us/library/ms998306.aspx) Also, for reference to some checklist have a look at the following rules/tips from yahoo.... [High performance website rules/tips](http://developer.yahoo.com/performance/rules.html) HttpWatch is also a good tool to for identifying sp...
[ 0.2730562388896942, -0.14274239540100098, 0.291471928358078, 0.12165763974189758, -0.06299662590026855, -0.2118130326271057, 0.21838828921318054, -0.18861448764801025, -0.07162386178970337, -0.5796722173690796, 0.2611147463321686, 0.7470154166221619, 0.056767404079437256, -0.27055919170379...
- When does using extension methods make sense? - Does adding extension methods to a type affect performance? These questions are follow up to the question i asked earlier about [Extension Methods](https://stackoverflow.com/questions/403539/what-are-extension-methods). When does using extension methods make sense? ---...
[ 0.20923131704330444, -0.11276491731405258, 0.4266788065433502, 0.20558206737041473, -0.12564104795455933, -0.13339678943157196, 0.12376360595226288, -0.48371151089668274, -0.41794252395629883, -0.6461004018783569, -0.09611260145902634, 0.7409651279449463, -0.08829625695943832, -0.246517121...
often help readability and the expressiveness of your code when it is used reasonably Does adding extension methods to a type affect performance? ----------------------------------------------------------- Note that an extension method call like: ``` instance.SomeExtensionMethod() ``` gets compiled to: ``` Static...
[ -0.09578194469213486, -0.04002157971262932, 0.32759445905685425, 0.17441320419311523, 0.07761678099632263, -0.22972945868968964, 0.16561545431613922, -0.1556583046913147, -0.0463777631521225, -0.6435104608535767, -0.34457501769065857, 0.7829136252403259, -0.021056292578577995, -0.114286899...
The xpath of my elements are becoming extremely hard to read. //div[@id='main\_content']/div[2]/div[2]/div[2]/div[4]/table/tbody/tr[2]/td/form/fieldset/p[1]/input It would be nice if I could store most of that as a variable and use it later like this: | assertElementPresent | ${myForm} . /fieldset/p[1]/input | Is s...
[ 0.513893187046051, 0.022032376378774643, 0.47038495540618896, 0.2667325437068939, -0.037992071360349655, -0.12071966379880905, 0.22581492364406586, -0.3963213264942169, 0.16145779192447662, -0.42276090383529663, 0.2415008246898651, 0.21332953870296478, 0.13956432044506073, -0.0335859619081...
make testing easier. We've learned to accept that we write java code in a special way to make it testable, and I think it's ok for HTML too.
[ 0.6576982736587524, 0.14541785418987274, -0.27047327160835266, 0.048725374042987823, -0.20281203091144562, -0.4716106057167053, 0.33567115664482117, 0.1522851288318634, -0.16175642609596252, -0.5298106074333191, 0.1825655698776245, 0.2830195426940918, -0.051838237792253494, -0.205375790596...
I need to search across multiple columns from two tables in my database using Full-Text Search. The two tables in question have the relevant columns full-text indexed. The reason I'm opting for Full-text search: 1. To be able to search accented words easily (cafè) 2. To be able to rank according to word proximity, etc...
[ 0.026483824476599693, 0.38732776045799255, 0.4949193596839905, -0.07292775064706802, -0.22820964455604553, 0.2099570780992508, 0.08677176386117935, 0.009985451586544514, -0.31373918056488037, -0.8555680513381958, 0.015116478316485882, 0.37264102697372437, -0.05563446134328842, 0.0092107513...
View:** This would have been my preferred method, but I can't do this because for a view to be full-text indexed, it needs to be schemabound, not have any outer joins, have a unique index. The view I will need to get my data does not satisfy these constraints (it contains many other joined tables I need to get data fro...
[ -0.00823743361979723, -0.024397047236561775, 0.48359599709510803, -0.18222813308238983, -0.44101381301879883, 0.051008764654397964, 0.09507638961076736, -0.09586084634065628, -0.2704302668571472, -0.6303983926773071, 0.1287396401166916, 0.38272568583488464, -0.37861403822898865, 0.25927001...
default. I can combine two individual CONTAINS queries on the two linked tables, but I don't know of a way to extract the **combined** rank from the two search queries. For example, if I search for 'Arthur', the results of both the Book query and the Author query should be taken into account and weighted accordingly. U...
[ -0.032064490020275116, 0.18394921720027924, 0.2753013074398041, -0.03572205826640129, -0.1070123016834259, 0.050157301127910614, 0.37172624468803406, -0.23374848067760468, -0.11627494543790817, -0.6096268892288208, -0.15495193004608154, 0.5979040265083313, -0.4221760630607605, 0.1540910303...
= a.AuthorID INNER JOIN FREETEXTTABLE(Book, Name, @criteria) bkt ON b.ContentID = bkt.[Key] LEFT JOIN FREETEXTTABLE(Author, Name, @criteria) akt ON a.AuthorID = akt.[Key] ORDER BY [Rank] DESC ``` Note that I simplified your schema for this example.
[ -0.08096366375684738, 0.1454792022705078, 0.3501453399658203, -0.06586460769176483, -0.2737704813480377, -0.12645316123962402, 0.15920336544513702, -0.20402047038078308, -0.1506403535604477, -0.4371415972709656, -0.5169094204902649, 0.11462246626615524, -0.4123063087463379, 0.2440678030252...
I'm having some weird issues with Xcode, and this is pretty much impossible to find answers by simply googling around. I have a few icon image files (just PNGs) in my Xcode project, and when I modify some of them in Photoshop, they don't get updated when I do another build in Xcode. In order to fix this I have to re-a...
[ 0.6663728356361389, 0.38495415449142456, 0.30197519063949585, 0.02805490791797638, -0.044189196079969406, -0.0939803346991539, 0.3923945426940918, 0.11699933558702469, -0.4774208068847656, -0.6893503665924072, 0.2609436511993408, 0.2736509144306183, -0.49910685420036316, 0.2857179939746856...
directly from Photoshop, so I assumed that it would just get reloaded and the new version would show up. UPDATE: Looks like what happened was that when I first imported the image files into my project, they got added to my "Classes/" sub-directory. So when I was updating them, it was just adding them to the root of my...
[ 0.7708632349967957, -0.09872886538505554, 0.2587299942970276, 0.21361078321933746, -0.08748159557580948, -0.2047411948442459, 0.11291380226612091, 0.09376580268144608, -0.28257644176483154, -0.5000196695327759, 0.23242181539535522, 0.5078592896461487, -0.21318981051445007, -0.1152774766087...
simulator, try **cleaning** all build targets first to ensure that your project actually builds again before launching the simulator.
[ 0.8387677073478699, 0.12805427610874176, 0.04829483851790428, 0.511185884475708, 0.045955970883369446, 0.12374728173017502, 0.4064422845840454, -0.18778692185878754, 0.00950120110064745, -0.9799332618713379, -0.0459800660610199, 0.6622307896614075, 0.10691288113594055, -0.20632119476795197...
So I've been seeing people using `.build`, `.create`, and `.create!` within their controllers more and more lately. What's the difference from just using `.new` and passing the param'd object and then `.save`? Are there pros and cons? Does using these other methods offer benefits? There are a couple differences, but th...
[ 0.4837067723274231, -0.2926270663738251, 0.05097048729658127, 0.2541179358959198, -0.1552405059337616, -0.37351226806640625, 0.13876263797283173, 0.05743030831217766, -0.11358725279569626, -0.6274394989013672, 0.2318667322397232, 0.4010024964809418, -0.18815827369689941, 0.2505958676338196...
3](https://stackoverflow.com/questions/4954313/build-vs-new-in-rails-3) and another way in Rails < 3.x The most important part, however, is that these methods can be called through an association (`has_many`, etc.) to automatically link the two models.
[ 0.11268775910139084, 0.016688207164406776, 0.2525705397129059, -0.24878443777561188, -0.21017232537269592, -0.21492847800254822, 0.08855241537094116, -0.49194592237472534, -0.3227919042110443, -0.4842623174190521, 0.1354757845401764, 0.4595073163509369, -0.1869754046201706, -0.082254841923...
This is inspired by the question [OK-Cancel or Cancel-OK?](https://stackoverflow.com/questions/50335/ok-cancel-or-cancel-ok). I remember reading somewhere about the concept of switching OK-Cancel/Cancel-OK in certain situations to prevent the user from clicking through information popups or dialog boxes without readin...
[ -0.0029352274723351, -0.15814413130283356, 0.010554519481956959, 0.017988691106438637, 0.06812872737646103, -0.1277707815170288, -0.23443691432476044, 0.09323194622993469, -0.4042114317417145, -0.5301898121833801, 0.057446323335170746, 0.39816367626190186, -0.41576144099235535, 0.058839924...
a safety-related application, where thoughtlessly pressing OK out of habit can result in a potentially dangerous situation whereas Cancel would lead to a safe state. Please don't do this unless you are really, really, *really* sure it's absolutely required. This is a case of trying to fix carelessness and stupidity by ...
[ 0.36467528343200684, 0.04483261704444885, -0.2003367394208908, 0.24933265149593353, -0.017191456630825996, -0.3682636320590973, 0.48357170820236206, 0.11545971781015396, -0.11475078761577606, -0.2556833028793335, -0.405857652425766, 0.490057110786438, -0.40896546840667725, -0.3452380001544...
Back in 2005 I worked on a dotnet desktop application. At the time I was looking for installers to create the install package. During my search I cam across a neat tool that would bind your application with dotnet itself only including the parts of dotnet that were required for the application to run. It did this using...
[ 0.8794282674789429, 0.017633814364671707, 0.43833455443382263, -0.08717929571866989, 0.13500212132930756, -0.21025067567825317, -0.0023751386906951666, -0.1154630184173584, -0.11410709470510483, -0.5225321054458618, 0.3961286246776581, 0.6295996308326721, -0.4480164051055908, 0.03661743551...
you remember the name or have a link to their site? EDIT: To clarify, when using this product you did not need to check that dotnet was installed or which version was installed and there was need to install dotnet. dotnet simply was linked into the application itself so the application and dotnet where indistinguishab...
[ 0.392916738986969, -0.09634923934936523, 0.4940885305404663, -0.13657042384147644, -0.11146443337202072, -0.05083164572715759, 0.18635383248329163, -0.10775478929281235, -0.40475475788116455, -0.6597861051559448, -0.05842071399092674, 0.1323951929807663, -0.4077981114387512, 0.096571587026...
I am attempting to center my entire page using only CSS and it is proving more complicated than i first expected. Currently my code works in IE but not in Firefox which makes a change. The page can be seen [here](http://www.ronnieweb.co.cc/test/index.html). Below is the code portion involved: ``` #wrap { width: 96...
[ 0.42636990547180176, 0.14267295598983765, 0.9574618935585022, -0.26250284910202026, -0.22371596097946167, -0.2005508989095688, 0.10428775101900101, -0.3003106117248535, -0.29778555035591125, -0.6351833343505859, -0.0630602315068245, 0.5147436261177063, -0.1256984919309616, -0.2629304826259...
resolved if i add a 'float: left' to the wrap div but then obviously everything floats left rather than center. Any help would be greatly appreciated. Change your markup to ``` <body> <div id="wrap"> Gubbins in here. </div> </body> ``` EDIT: Looking at the link, you've already done that. You'll want to either ...
[ -0.025365738198161125, -0.053709711879491806, 0.5793554782867432, -0.24018831551074982, 0.04596224054694176, -0.37556731700897217, 0.023398688063025475, -0.08389072865247726, -0.2968713641166687, -0.5783341526985168, -0.4227485954761505, 0.4674420654773712, -0.2189662754535675, 0.018322361...
In the current C++ standard (C++03), there are too few specifications about text localization and that makes the C++ developer's life harder than usual when working with localized texts (certainly the C++0x standard will help here later). ### Assuming the following scenario (which is from real PC-Mac game development ...
[ -0.28239989280700684, -0.03691468760371208, 0.8461747765541077, -0.00599804800003767, -0.3239853084087372, -0.24359926581382751, 0.2731761336326599, -0.013951507396996021, -0.2543649673461914, -0.9579104781150818, -0.6680771112442017, 0.7052534222602844, -0.248575359582901, -0.423286437988...
should not be compiled in the application (nor having one application per language), you get the chosen language information at application launch - which implies some kind of text loading. 4. **cross-platform**: the application is be coded with cross-platform in mind (Windows - Linux/Ubuntu - Mac/OSX) so the localized...
[ 0.14913830161094666, 0.28573930263519287, 0.2695038616657257, -0.04899623245000839, -0.10444732755422592, -0.36724427342414856, 0.113355852663517, 0.13557946681976318, -0.0746191069483757, -0.6888518929481506, -0.6697514057159424, 0.46162790060043335, -0.2892548441886902, -0.23318022489547...
in this kind of application? ----------------------------------------------------------------------------------------- I looked into this last year that and the only things I'm sure of are that you should use `std::wstring` or `std::basic_string<ABigEnoughType>` to manipulate the texts in the application. I stopped my...
[ 0.14059558510780334, 0.18571588397026062, 0.03796951100230217, -0.09873032569885254, -0.09579335898160934, 0.024255555123090744, -0.16006261110305786, -0.055197399109601974, -0.07411283254623413, -0.5856683850288391, -0.08245354145765305, 0.5826814770698547, -0.2394401878118515, -0.0258820...
for a game called Lionel Trains DS. We localized into English, Spanish, French, and German. We knew all the languages up front, so including them at compile time was the only option. (They are burned to a ROM, you see) I can give you information on some of the things we did. Our strings were loaded into an array at st...
[ 0.08821471780538559, -0.20400692522525787, 0.19615507125854492, 0.3701944053173065, -0.13297410309314728, 0.1405562311410904, 0.2353852242231369, 0.15506669878959656, 0.0008784024976193905, -0.30144983530044556, 0.03539387136697769, 0.06983757764101028, -0.2942240238189697, 0.2146205604076...
and so on. We keyed the arrays off of an `enum`, as `integer` indexing is very fast, and in games, speed is everything. ( The solution linked in one of the other answers uses `string` lookups, which I would tend to avoid.) When displaying the strings, we used a `printf()` type function to replace markers with values. "...
[ -0.11565887928009033, -0.4461107850074768, 0.4518512189388275, 0.18832547962665558, -0.22210834920406342, 0.06565521657466888, 0.3545703887939453, -0.06638716906309128, 0.12819921970367432, -0.6614157557487488, -0.30804136395454407, 0.11960063874721527, -0.36386653780937195, 0.012569751590...
something like `printf()` and your string is "*Train %d is departing city %d.*" the German will end up saying "*From City 3, Train 1 is departing.*" which is completely wrong. We solved this by forcing the translation to retain the same word order, but we ended up with some pretty broken German. Were I to do it again, ...
[ 0.3044341504573822, -0.06104521080851555, 0.2072533667087555, 0.010011433623731136, -0.20056618750095367, -0.05850133299827576, 0.5768295526504517, 0.17766663432121277, 0.049179282039403915, -0.8194466829299927, -0.2781287729740143, 0.22138050198554993, -0.46446090936660767, 0.010332981124...
that a POSIX-compliant `printf()` supports using `%2$s` type markers where the `2$` portion instructs the `printf()` to fill that marker with the second additional parameter. That would be quite handy, so long as it is fast enough. A custom solution may still be faster, so you'll want to make sure and test both.*** 2)...
[ 0.10462765395641327, 0.22916623950004578, -0.053951527923345566, 0.19582049548625946, -0.018954388797283173, 0.10250502079725266, 0.3271777033805847, 0.21038493514060974, -0.044453252106904984, -0.42299461364746094, -0.2086503803730011, 0.4666278064250946, -0.014840313233435154, -0.5846330...
if you are doing any work where the text must fit in a defined box, you will want to consider this. To solve this issue, we stripped as many adjectives from our text as possible for other languages. This shortened the sentence, but preserved the meaning, if loosing a bit of the flavor. I later designed an application t...
[ 0.36485862731933594, 0.2191394567489624, -0.08475006371736526, -0.14276067912578583, -0.2788942754268646, 0.0575227253139019, 0.7889086604118347, 0.1319693773984909, -0.08796966820955276, -0.4259066581726074, -0.0769323855638504, 0.38828644156455994, -0.2676643431186676, -0.355314522981643...
scrolling areas of text, if you have this problem. 3) As far as cross platform goes, we wrote pretty much pure C++ for our Localization system. We wrote custom encoded binary files to load, and a custom program to convert from a CSV of language text into a `.h` with the enum and file to language map, and a `.lang` for...
[ 0.030821766704320908, 0.021237170323729515, 0.4633833169937134, 0.10517618060112, -0.14979764819145203, 0.12061025202274323, -0.26944664120674133, 0.17713738977909088, -0.055104535073041916, -0.5552823543548584, 0.21264399588108063, 0.5640016794204712, -0.2524219751358032, -0.3050642907619...
In my quest in trying to learn more about OOP in PHP. I have come across the constructor function a good few times and simply can't ignore it anymore. In my understanding, the constructor is called upon the moment I create an object, is this correct? But why would I need to create this constructor if I can use "normal...
[ 0.5396198034286499, 0.32912784814834595, 0.09329365193843842, -0.019771846011281013, -0.32510557770729065, -0.24354912340641022, 0.16309292614459991, 0.12528374791145325, -0.0878339558839798, -0.3242330551147461, 0.04525325819849968, 0.6682276129722595, -0.12691116333007812, 0.204344049096...
var $val; // This function is called when someone does $foo = new Bar(); // But this constructor has also an $var within its definition, // So you have to do $foo = new Bar("some data") function __construct($var) { // Assign's the $var from the constructor to the $val variable // w...
[ 0.08654926717281342, 0.025181952863931656, 0.6251689195632935, -0.5791215896606445, 0.128434419631958, 0.058500804007053375, 0.07933206856250763, -0.3614695370197296, -0.05381607264280319, -0.269479900598526, -0.17301230132579803, 0.7684198617935181, -0.5289307236671448, 0.1682833731174469...
new Bar("baz"); echo $foo->val // baz // You can also do this to see everything defined within the class print_r($foo); ``` UPDATE: A question also asked why this should be used, a real life example is a database class, where you call the object with the username and password and table to connect to, which the cons...
[ 0.4004337191581726, 0.11341375857591629, 0.1328057199716568, -0.3806108832359314, 0.056386034935712814, -0.07548312097787857, 0.22253523766994476, -0.1913759708404541, -0.22733627259731293, -0.6258184909820557, -0.22837018966674805, 0.5542638301849365, -0.47613662481307983, 0.0887539610266...
I'm trying for the past several hours to figure out how to do this, but with no luck. There are several potential solutions for this when searching Google, but nothing seems to work. I'm trying to customize the background color of the standard UILabel that goes in a UITableViewCell (since I already customized the back...
[ 0.12868912518024445, -0.01812492124736309, 0.6500884890556335, 0.029753807932138443, -0.21544033288955688, 0.02403891831636429, 0.33819296956062317, -0.16862821578979492, 0.05346233397722244, -0.8280606865882874, 0.08376248180866241, 0.295638769865036, -0.47834914922714233, 0.4333058893680...
resulting table view still has a bunch of cells with labels with black text and white background in it. Any clues on what I am doing wrong here? UPDATE: If I try to do the following instead: ``` UILabel* label = [[[UILabel alloc] init] autorelease]; label.textColor = [UIColor blueColor]; label.backgroundColor = [UIC...
[ -0.004029539413750172, 0.04975059628486633, 0.5983468890190125, 0.04755064472556114, -0.03995310887694359, 0.054709404706954956, 0.1979261338710785, -0.2982761561870575, -0.17627781629562378, -0.6901372075080872, -0.07784020900726318, 0.29790374636650085, -0.44602373242378235, 0.0975445359...
in the constructor: ``` label = [[UILabel alloc] initWithFrame:myFrame]; ```
[ -0.27032119035720825, 0.19461014866828918, 0.47183290123939514, -0.012339427135884762, -0.14885827898979187, -0.008138597011566162, 0.11639568954706192, -0.01935194432735443, 0.19877414405345917, -0.8587493896484375, -0.29335516691207886, 0.19816292822360992, -0.12626565992832184, 0.387730...
I have a function that identify coordinates on a page, and I am returning them as a ``` Dictionary<int, Collection<Rectangle>> GetDocumentCoordinates(int DocumentId) ``` However, later I need information about each page - if it was validated, what is the page resolution, color/bw, etc. I could create another functio...
[ -0.08296257257461548, 0.1008121445775032, 0.6692007184028625, 0.22332964837551117, -0.16680800914764404, -0.029918676242232323, -0.14887720346450806, -0.46717825531959534, 0.1563807725906372, -0.9217165112495422, -0.1443714201450348, 0.41506657004356384, -0.2865462899208069, 0.022929580882...
the page information: ``` class DocumentInfo { Dictionary<int, Collection<Rectangle>> Coordinates { get; set;} Dictionary<int, PageInfo> PageAttributes { get; set; } } ``` and then define: ``` DocumentInfo GetDocumentInfo(int DocumentId); ``` I'm leaning towards the last option, but your insights are very...
[ -0.009875255636870861, 0.11832548677921295, 0.8298398852348328, 0.23257537186145782, 0.06645912677049637, -0.28080883622169495, 0.053870830684900284, -0.18974030017852783, 0.08159798383712769, -0.9636979699134827, -0.4332713782787323, 0.587622344493866, -0.13710704445838928, -0.19920814037...
your methods operate on this data without altering the *interfaces* of your objects. Obviously, your data object shouldn't implement an interface; at most, have a base class with the minimum interface and then pass references to the base around. Second, you may find your data gets complex to the point where you will n...
[ 0.44219741225242615, 0.09263385832309723, -0.04953594133257866, 0.59300696849823, -0.23492111265659332, -0.17992901802062988, 0.40084177255630493, -0.4805014729499817, -0.24080890417099, -0.45497018098831177, 0.15178298950195312, 0.30165666341781616, -0.27505096793174744, 0.234895706176757...
I have inherited a Java application (servlets) that runs under Tomcat. For historical reasons, the code has different "look and feel" options based on where the application will be deployed (essentially a matter of branding). There are several constants that control this branding process, which have different function...
[ 0.6821722388267517, 0.15973396599292755, 0.5024858713150024, -0.1067940816283226, -0.0003571081324480474, -0.06495851278305054, 0.14704430103302002, -0.13357391953468323, 0.03725636377930641, -0.672130823135376, -0.006201846990734339, 0.1745501607656479, -0.040836039930582047, 0.3206002712...
automate this process assuming at least Ant 1.8 and Java 6.x? I know that there have not been any good solutions using compiler arguments (like one could do in C or C++), and am leaning to some "best way" to edit either the source file containing the constants, or putting them into another file and swapping them out u...
[ 0.5202679634094238, -0.04666680097579956, 0.23161721229553223, -0.011039773002266884, -0.052259113639593124, -0.007811427116394043, 0.5408579111099243, -0.31155428290367126, 0.12086527794599533, -0.7461286187171936, -0.06888575851917267, 0.8850280046463013, -0.4718063175678253, -0.28571575...
Consider the following code: ``` #include <stdio.h> namespace Foo { template <typename T> void foo(T *, int) { puts("T"); } template <typename T> struct foo_fun { static void fun() { foo((T *)0, 0); }; }; } namespace Foo { void foo(int *, int) { puts("int"); } } using namespace Foo; int main() { ...
[ 0.35451722145080566, -0.009003892540931702, 0.24397337436676025, -0.33030030131340027, -0.07881474494934082, 0.22082296013832092, 0.024040820077061653, -0.2977805435657501, -0.38848692178726196, -0.36508116126060486, -0.3115168511867523, 0.633968710899353, -0.4339704215526581, -0.087872110...
order of overloading/specialization in this case defined by the current standard? The second `void foo(...` is an overload (and not a specialization) which is not visible at the definition of `foo_fun::fun` so it won't be found in the context of the template definition. Because `T*` is a dependent type, resolution of `...
[ -0.17233501374721527, -0.12644004821777344, 0.4043496251106262, -0.31289055943489075, -0.01485211681574583, -0.07138548046350479, 0.02159721404314041, -0.4369693100452423, -0.34952831268310547, -0.452413946390152, -0.29455065727233887, 0.5201154351234436, -0.5603644847869873, 0.23761285841...
point of definition of the template are considered. There are no function arguments from the `Foo` namespace so no argument dependent lookup occurs, hence the template version of `foo` is called and not the non-template overload. Many thanks to litb for the corrections to this answer. If you made it a specialization ...
[ 0.112418033182621, -0.10347014665603638, 0.08059190213680267, -0.13412511348724365, 0.0585460364818573, 0.043186888098716736, -0.2464386224746704, -0.22127068042755127, -0.16814769804477692, -0.7386916875839233, -0.12132638692855835, 0.573032021522522, -0.3375847637653351, 0.24352481961250...
{ puts("int"); } } ``` Chapter 14 of the current standard, but it's not very readable :) Edit: If I had to pick the most relevant part of the standard it would probably be 14.6 [temp.res] para 9. (Slightly abbreviated) If a name does not depend on a *template-parameter*, a declaration for that name shall be in scope...
[ 0.7976678609848022, 0.10702365636825562, 0.1991712599992752, -0.27072545886039734, 0.15075258910655975, -0.2841957211494446, 0.19814564287662506, -0.3416396975517273, -0.1003754511475563, -0.7015094757080078, -0.2701115906238556, 0.4493344724178314, -0.15530651807785034, 0.0482267811894416...
into account 14.6.4.2 [temp.dep.candidate]. It is very difficult and dangerous to try and reference the standard because of all the interdependencies, this answer is a case in point.
[ 0.40107253193855286, 0.280244380235672, 0.11281433701515198, 0.02613026835024357, 0.14851686358451843, -0.04443103447556496, 0.235700324177742, -0.6228737831115723, 0.042298704385757446, -0.40620824694633484, -0.11940408498048782, 0.26114100217819214, 0.023673556745052338, 0.17417493462562...