text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I have read in some of the ClickOnce posts that ClickOnce does not allow you to create a desktop icon for you application. Is there any way around this? In Visual Studio 2005, [ClickOnce](http://en.wikipedia.org/wiki/ClickOnce) does not have the ability to create a desktop icon, but it is now available in Visual Studio...
[ -0.28913819789886475, 0.020336780697107315, 0.6426188349723816, -0.09296991676092148, -0.23067501187324524, -0.002521735616028309, 0.1593637466430664, 0.28167611360549927, -0.6849682331085205, -0.7821859121322632, 0.14466653764247894, 0.560704231262207, -0.5179356336593628, -0.006669217254...
environment. Also, the icon is not removed when the application is uninstalled. This code creates a shortcut to the shortcut on the start menu that ClickOnce creates. ``` private void CreateDesktopIcon() { ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment; if (ad.IsFirstRun) { ...
[ 0.24317866563796997, 0.1763719916343689, 0.3594544231891632, -0.47815948724746704, 0.5046367645263672, -0.04301987588405609, 0.6814841628074646, 0.14222951233386993, -0.13820435106754303, -0.7022557854652405, -0.4144195318222046, 0.5852817893028259, -0.6703020334243774, 0.6493287682533264,...
if (Attribute.IsDefined(assembly, typeof(AssemblyCompanyAttribute))) { AssemblyCompanyAttribute ascompany = (AssemblyCompanyAttribute)Attribute.GetCustomAttribute( assembly, typeof(AssemblyCompanyAttribute)); company = ascompany.Company;
[ -0.3299749493598938, -0.1340041309595108, 0.30314940214157104, -0.25769904255867004, 0.435386061668396, 0.2447580248117447, 0.19285808503627777, -0.3135592043399811, 0.09065648913383484, -0.31593257188796997, -0.6659197807312012, 0.37745314836502075, -0.30838441848754883, 0.130562067031860...
} if (Attribute.IsDefined(assembly, typeof(AssemblyDescriptionAttribute))) { AssemblyDescriptionAttribute asdescription = (AssemblyDescriptionAttribute)Attribute.GetCustomAttribute( assembly, typeof(AssemblyDescriptionAttribute));
[ -0.312232106924057, -0.26827773451805115, 0.21114018559455872, -0.19786015152931213, 0.3462983965873718, -0.0760771706700325, 0.38828045129776, -0.354035884141922, 0.1848394125699997, -0.40091028809547424, -0.5419076681137085, 0.6011280417442322, -0.35603922605514526, 0.0613221749663353, ...
description = asdescription.Description; } if (!string.IsNullOrEmpty(company)) { string desktopPath = string.Empty; desktopPath = string.Concat(
[ -0.04561302065849304, -0.009939422830939293, 0.6642103791236877, -0.19753398001194, 0.5877637267112732, -0.0033949227072298527, 0.31049463152885437, 0.14451053738594055, -0.16663409769535065, -0.7279913425445557, -0.367703914642334, 0.6892735362052917, -0.651637613773346, 0.430178165435791...
Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "\\", description,
[ -0.11695918440818787, -0.21882487833499908, 0.3522530794143677, 0.005318270530551672, 0.3086467683315277, 0.09922715276479721, 0.24139471352100372, 0.11921842396259308, -0.12178017199039459, -0.991619348526001, -0.5251935720443726, 0.46384337544441223, -0.512257993221283, -0.01315715815871...
".appref-ms"); string shortcutName = string.Empty; shortcutName = string.Concat( Environment.GetFolderPath(Environment.SpecialFolder.Programs),
[ -0.3553350865840912, -0.18323776125907898, 0.56053626537323, -0.4229523241519928, 0.22421957552433014, 0.4796060621738434, 0.5565443634986877, -0.16929900646209717, -0.3377179205417633, -0.6769591569900513, -0.4857804477214813, 0.5402095913887024, -0.8602350950241089, 0.09704875946044922, ...
"\\", company, "\\",
[ 0.27082347869873047, 0.5812607407569885, 0.4050008952617645, -0.19289086759090424, 0.46306800842285156, 0.7398775815963745, -0.08821599930524826, 0.471976637840271, -0.11861933767795563, -0.2710612118244171, -0.6065319776535034, 0.35759881138801575, -0.28912028670310974, 0.6131206750869751...
description, ".appref-ms"); System.IO.File.Copy(shortcutName, desktopPath, true); } } } } ```
[ -0.17337578535079956, 0.21834997832775116, 0.6319705247879028, -0.10226495563983917, 0.2827860116958618, 0.337213933467865, 0.43262454867362976, 0.006029331590980291, -0.29436448216438293, -1.0803390741348267, -0.5383021831512451, 0.6855522394180298, -0.6937773823738098, 0.2583003640174866...
Boost range library (<http://www.boost.org/doc/libs/1_35_0/libs/range/index.html>) allows us to abstract a pair of iterators into a range. Now I want to combine two ranges into one, viz: given two ranges r1 and r2, define r which traverses [r1.begin(), r1.end()[ and then [r2.begin(), r2.end()[. Is there some way to de...
[ -0.03839263319969177, -0.19536767899990082, 0.6504246592521667, -0.5141683220863342, -0.04374906048178673, 0.318235844373703, 0.16240407526493073, -0.8194720149040222, -0.006517750211060047, -0.05640765652060509, -0.13500827550888062, 0.8288255929946899, -0.3281099200248718, -0.31068095564...
{1, 2, 3, 4}; int b[] = {7, 2, 3, 4}; boost::iterator_range<int*> ai(&a[0], &a[4]); boost::iterator_range<int*> bi(&b[0], &b[4]); boost::iterator_range< boost::range_detail:: join_iterator<int*, int*, int, int&, boost::random_access_traversal_tag> > ci ...
[ -0.14023014903068542, -0.2825506329536438, 0.5214883089065552, -0.24505066871643066, 0.2022186666727066, 0.4020422697067261, 0.02527499943971634, -0.8693510293960571, -0.045515336096286774, -0.4967844486236572, -0.4407691955566406, 0.6552503108978271, -0.4996824264526367, -0.24986781179904...
std::cout << i; //prints 12347234 } } ``` I found the output type using the compiler messages. C++0x `auto` will be relevant there as well.
[ 0.037806861102581024, 0.32260140776634216, 0.23477044701576233, -0.22489146888256073, 0.03635897859930992, 0.0973404124379158, 0.10454531759023666, -0.140514075756073, -0.060705818235874176, -0.4662199020385742, -0.3721652030944824, 0.4935709536075592, -0.4650367498397827, -0.2129163295030...
I am completely new to ruby and I inherited a ruby system for a product catalogue. Most of my users are able to view everything as they should but overseas users (specifically Mexico) cannot contact the server once logged in. They are an active user. I'm sorry I cannot be more specific, and the system is private so I c...
[ 0.7862045168876648, 0.44439539313316345, -0.1012922003865242, 0.04524897038936615, 0.015508195385336876, -0.4267481565475464, 0.5379219651222229, 0.44842007756233215, -0.36046302318573, -0.1358756422996521, 0.2095557004213333, 0.23417848348617554, -0.10163307934999466, 0.2560785114765167, ...
"Clueless administrator". There are many, many sites which generically block either large blocks of IP space or which geolocate and carve out big portions of the world. For example, a surprising number of American blogs block Asian countries (including Japan) out of a misplaced effort to avoid DDOS attacks (which act...
[ 0.4153331220149994, 0.25743043422698975, -0.15820126235485077, 0.5470180511474609, -0.03533567115664482, -0.4886341094970703, 0.41629600524902344, 0.9982953071594238, -0.1494203507900238, -0.16283762454986572, -0.053823743015527725, -0.014031791128218174, -0.42050519585609436, 0.1259309500...
are making it to the server at all, or whether they're being blocked somewhere earlier (router? firewall? etc). Then, to determine whether the problem is on your end or their end, I'd try to replicate the issue with you proxying your connection through a Mexican proxy and repeating the actions they took to cause the is...
[ 0.3273364007472992, 0.066590815782547, 0.3514995872974396, 0.2605322003364563, 0.22827862203121185, -0.4057995676994324, 0.40809741616249084, 0.30057790875434875, -0.3701646029949188, -0.4997389316558838, 0.07745082676410675, 0.05124826729297638, -0.34836024045944214, -0.023908985778689384...
on dynamic requests only. [1] We've seen some **really** weird bugs at work caused by a malfunctioning HTTPS accelerator.
[ 0.46025532484054565, -0.2324070930480957, 0.07947658747434616, 0.35599008202552795, 0.1585472822189331, -0.4390568435192108, 0.41317129135131836, 0.7413539886474609, -0.22828352451324463, -0.5259419679641724, -0.11029872298240662, 0.37746095657348633, -0.6879785656929016, -0.07950429618358...
I have a Delphi DLL with a function defined as: function SubmitJobStringList(joblist: tStringList; var jobno: Integer): Integer; I am calling this from C#. How do I declare the first parameter as a tStringList does not exist in C#. I currently have the declaration as: ``` [DllImport("opt7bja.dll", CharSet = CharSet....
[ 0.19002965092658997, -0.044519323855638504, 0.5159052014350891, -0.32183244824409485, -0.22721314430236816, -0.19236025214195251, 0.2533756494522095, -0.33635076880455017, -0.13162197172641754, -0.5404484868049622, -0.10993397235870361, 0.670063316822052, -0.19625040888786316, 0.0859841182...
implementation details may differ from what is possible with .NET. Take a look at the Delphi VCL source code (that is, if you have it) and try to find out if you can rebuild the class in C#, and pass it with the help of your best friend, the Interop Marshaller. Note that even the Delphi string type is different from th...
[ 0.37702587246894836, -0.15663902461528778, -0.07667383551597595, 0.15990124642848969, 0.09733999520540237, -0.08179221302270889, 0.3513604700565338, -0.09726284444332123, -0.24336418509483337, -0.7460305690765381, -0.038893233984708786, 0.6628642678260803, -0.13461780548095703, -0.15697169...
expose anything Delphi-specific in a DLL that is to be used by non-Delphi clients. Make the parameter an array of PChar and you should be fine.
[ 0.5989303588867188, -0.257324755191803, 0.11793757975101471, 0.3861050009727478, -0.20083922147750854, -0.624447762966156, 0.08097232133150101, 0.24438358843326569, -0.2765105366706848, -0.5956743359565735, -0.04262981936335564, 0.858158528804779, -0.43154752254486084, -0.08371049910783768...
Why isn't this project maintained anymore? I love this app, however not updating it seems like a crime against all .Net developers. There are several items that I would love to add to it given the chance of a future release. Can anyone share something I don't know? The NUnit 2.5 Alpha 4 Release was released on Septem...
[ 0.4227394759654999, -0.14003685116767883, 0.36480772495269775, 0.07758639752864838, -0.7008541226387024, -0.19768919050693512, 0.5812157988548279, 0.2568756937980652, 0.0368131659924984, -0.23768267035484314, 0.12997716665267944, 0.7660497426986694, -0.3708237111568451, 0.23245669901371002...
I'm looking for a decent sort implementation for arrays in VBA. A Quicksort would be preferred. Or any other [sort algorithm](http://web.archive.org/web/20180224071555/http://www.cs.ubc.ca:80/~harrison/Java/sorting-demo.html) other than bubble or merge would suffice. Please note that this is to work with MS Project 20...
[ -0.2274518758058548, -0.0869213417172432, 0.12505748867988586, -0.09104844182729721, -0.1697128266096115, 0.0789739266037941, 0.15096120536327362, -0.02262667752802372, -0.5401683449745178, -0.8136997222900391, -0.29886794090270996, 0.0680069550871849, -0.40350043773651123, -0.225765705108...
Call it simply by passing an array of values (string or numeric; it doesn't matter) with the **Lower Array Boundary** (usually `0`) and the **Upper Array Boundary** (i.e. `UBound(myArray)`.) > > > ***Example***: `Call QuickSort(myArray, 0, UBound(myArray))` > > > When it's done, `myArray` will be sorted and you can...
[ 0.01500729564577341, -0.46032190322875977, 0.5638001561164856, -0.08059028536081314, -0.14009225368499756, -0.021826792508363724, 0.07066220045089722, -0.09798774123191833, -0.31517449021339417, -0.45779281854629517, -0.4682329595088959, 0.2604081928730011, -0.2373398095369339, -0.05520627...
= inHi pivot = vArray((inLow + inHi) \ 2) While (tmpLow <= tmpHi) While (vArray(tmpLow) < pivot And tmpLow < inHi) tmpLow = tmpLow + 1 Wend While (pivot < vArray(tmpHi) And tmpHi > inLow) tmpHi = tmpHi - 1 Wend If (tmpLow <= tmpHi) Then tmpSwap = vArray(tmpLow) ...
[ -0.48473599553108215, -0.48391789197921753, 0.38250434398651123, -0.17925865948200226, -0.3367355167865753, 0.4997684359550476, 0.3042735457420349, -0.8699904084205627, 0.07123007625341415, -0.21363696455955505, -0.11495085805654526, 0.1797427088022232, -0.33827248215675354, -0.21603547036...
= vArray(tmpHi) vArray(tmpHi) = tmpSwap tmpLow = tmpLow + 1 tmpHi = tmpHi - 1 End If Wend If (inLow < tmpHi) Then QuickSort vArray, inLow, tmpHi If (tmpLow < inHi) Then QuickSort vArray, tmpLow, inHi End Sub ``` Note that this only works with **single-dimensional** (aka "normal"?) ...
[ -0.3922489583492279, -0.44482743740081787, 0.44595345854759216, -0.22426073253154755, -0.21098536252975464, 0.30258241295814514, 0.5006917715072632, -0.4558908939361572, -0.18030188977718353, -0.32932329177856445, -0.3398035764694214, 0.3780274987220764, -0.2965782880783081, -0.02513155154...
Does anybody know what user privileges are needed for the following code needs to successfully execute as a scheduled task on Windows Server 2003: ``` System.Diagnostics.Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName) ``` When NOT running as scheduled task i.e. under a logged in user, as long as ...
[ 0.21192140877246857, 0.3582804203033447, 0.26927271485328674, 0.12415019422769547, 0.038379330188035965, -0.4498547613620758, 0.4203057289123535, 0.1475246399641037, -0.4401477873325348, -0.4082687199115753, 0.12824244797229767, 0.7984498143196106, -0.06262221187353134, 0.08597012609243393...
Monitor Users" group. This is necessary for .NET Framework 1.1 implementation of System.Diagnostics. I have added the user to this group, and all is well.
[ 0.6297710537910461, 0.03546227142214775, 0.7391656041145325, -0.06313168257474899, -0.013877592980861664, -0.6104556322097778, 0.3371407985687256, 0.07154307514429092, 0.0019785393960773945, -0.8290385603904724, 0.22104866802692413, 0.7999371290206909, -0.3190886080265045, -0.1769879758358...
How to unit test WCF services? Any 3rd Party tools available? As aku says, if you're testing service methods (ie code behaviour) then you can unit test that directly and bypass the WCF infrastructure. Of course, if your code depends on WCF context classes (like OperationContext) then I suggest introducing wrappers much...
[ 0.5567513704299927, -0.159076526761055, -0.018351854756474495, 0.1376214325428009, -0.13648325204849243, -0.17377859354019165, 0.2270532101392746, -0.5650837421417236, 0.029691440984606743, -0.7097304463386536, -0.18522730469703674, 0.6179719567298889, -0.11536198854446411, 0.1163664236664...
spin up the ASP.NET Development Web Server or even IIS if you want to test WCF behaviour specific to those hosting environments (ie SSL, authentication methods). This gets tricky and can start making demands on the configuration of everyone's development machine and the build servers but is doable.
[ 0.6582821607589722, -0.2957480847835541, 0.26941975951194763, 0.2592335641384125, -0.2414848357439041, -0.654293417930603, 0.13067755103111267, -0.36819568276405334, -0.3858926594257355, -0.2805308699607849, -0.19942669570446014, 0.24416325986385345, -0.28716611862182617, 0.158145785331726...
I fill a collection one single time when my J2EE webapp starts. Then, several thread may access it at same time but only to read it. I know using a synchronized collection is mandatory for parallels write but do I still need it for parallels read ? Normally no because you are not changing the internal state of the col...
[ 0.3890259861946106, -0.17554514110088348, 0.28502222895622253, 0.15086211264133453, -0.058862682431936264, -0.1086978018283844, 0.23916804790496826, 0.021229825913906097, -0.4650515913963318, -0.8044316172599792, 0.0029831358697265387, 0.33220186829566956, -0.3029368817806244, 0.3074557483...
itself. Each collection element is still changeable. ``` class Test { public Test(final int a, final int b) { this.a = a; this.b = b; } public int a; public int b; } public class Main { public static void main(String[] args) throws Exception { List<Test> values = new Arra...
[ 0.4138126075267792, -0.07184500247240067, 0.036837078630924225, -0.21521729230880737, 0.14692503213882446, 0.13584548234939575, 0.42065659165382385, -0.40460193157196045, -0.11328825354576111, -0.4350251257419586, -0.4538764953613281, 0.2637508809566498, -0.4966697096824646, 0.295552968978...
Test(3, 4)); List<Test> readOnly = Collections.unmodifiableList(values); for (Test t : readOnly) { t.a = 5; } for (Test t : values) { System.out.println(t.a); } } } ``` This outputs: ``` 5 5 ``` --- Important considerations from @WMR answser. ...
[ 0.39941877126693726, -0.08946052938699722, 0.0822330117225647, -0.20905864238739014, 0.09921295940876007, -0.0684843510389328, 0.5188537836074829, -0.45093318819999695, -0.058503828942775726, -0.5780290365219116, -0.1714598387479782, 0.500039279460907, -0.24543461203575134, 0.2346220612525...
your collection are started > before or after you're filling it. If > they're started before you fill it, > you have no guarantees (without > synchronizing), that these threads > will ever see the updated values. > > > The reason for this is the Java Memory > Model, if you wanna know more read the > section "...
[ 0.2818118631839752, -0.0013298409758135676, 0.403032124042511, 0.16849923133850098, 0.27472686767578125, -0.2589237689971924, 0.04913926497101784, -0.12819214165210724, -0.702223539352417, -0.6686086058616638, -0.15564654767513275, 0.2936716377735138, -0.27296820282936096, 0.15181635320186...
operations (thanks [Michael > Bar-Sinai](https://stackoverflow.com/questions/152342/in-java-do-i-need-to-declare-my-collection-synchronized-if-its-read-only#152425), > I didn't know such collections > existed). > > > Another very interesting read on the > topic of concurrency which covers > topics like publishin...
[ -0.05729703977704048, 0.1989249736070633, -0.15231947600841522, -0.07139338552951813, -0.1382528394460678, 0.00781059917062521, 0.4799554646015167, -0.2589579224586487, -1.0381407737731934, -0.09075136482715607, -0.5255987644195557, 0.44590064883232117, -0.7748928666114807, -0.177234679460...
Given the following idioms: 1) ``` variable = value1 if condition variable = value2 ``` 2) ``` variable = value2 if not condition variable = value1 ``` 3) ``` if condition variable = value2 else variable = value1 ``` 4) ``` if not condition variable = value1 else variable = value2 ``` Which do you ...
[ -0.02889791876077652, 0.15584516525268555, 0.035588495433330536, -0.09621711075305939, -0.043409526348114014, -0.12480883300304413, 0.6489115357398987, -0.2204360067844391, 0.0827474445104599, -0.5205147862434387, -0.434044748544693, 0.8349131345748901, -0.3358441889286041, -0.250017732381...
more than one statement in the future.* ``` variable = condition ? value2 : value1 ... variable = value2 if condition else value1 ``` In theory, I prefer #3 as it avoids having to assign a value to the variable twice. In the real world though I use any of the four above that would be more readable or would express mor...
[ 0.23812702298164368, 0.175685852766037, -0.07027401030063629, -0.24638010561466217, -0.36619818210601807, -0.09880775958299637, 0.5641648173332214, -0.056764859706163406, -0.08307191729545593, -0.44788917899131775, -0.10207545012235641, 0.6264103651046753, -0.5618264675140381, -0.084663949...
I have been working as a native C++ programmer for last few years. Now we are starting a new project from the scratch. So what is your thoughts on shifting to C++\CLI at the cost of losing platform independent code. Are there are any special advantages that one can gain by shifting to C++\CLI? I would recommend the fol...
[ 0.3045101463794708, 0.05859358236193657, -0.11376900970935822, -0.08842334896326065, -0.11391599476337433, -0.07674519717693329, -0.09666746854782104, 0.114857517182827, -0.23797503113746643, -0.7363775372505188, 0.058721136301755905, 0.7399472594261169, -0.1313735991716385, 0.009052029810...
with .NET calling C++ classes and C++ calling .NET classes. I see no sense in just going to C++/CLI if you don't need it.
[ 0.2806587219238281, 0.073722705245018, -0.08424519747495651, 0.04502933844923973, -0.22524020075798035, -0.33015280961990356, -0.2374221235513687, 0.20263364911079407, -0.1416827291250229, -0.4404835104942322, 0.007059427909553051, 0.6500252485275269, -0.38249316811561584, 0.01722566783428...
What is the best way to change a user-password remotely in Unix? This must be performed by the user, in a Web-app or Windows-App, without using SSH or any direct connection between the user and the server (direct command line not allowed). Thanks --- Webmin seemed to be a good application to do that, but I found it ...
[ 0.005529860500246286, 0.12158746272325516, 0.44245317578315735, 0.2648986279964447, 0.2689425051212311, -0.18720951676368713, -0.052990544587373734, 0.3357349634170532, -0.15120217204093933, -0.6937913298606873, -0.02686610445380211, 0.7737426161766052, 0.12983207404613495, -0.003622327931...
You'll get a lot more than just password-changing, and you can remove functionality you don't want the user to have.
[ 0.37932828068733215, -0.08268392831087112, 0.16159644722938538, 0.37478551268577576, 0.5157668590545654, -0.4469035267829895, 0.17292755842208862, 0.163533017039299, -0.2946811318397522, -0.5850229859352112, -0.41296568512916565, 0.583843469619751, -0.06953287869691849, 0.24311238527297974...
I have recently come across a situation where code is dynamically loading some libraries, wiring them up, then calling what is termed the "application entry point" (one of the libraries must implement IApplication.Run()). Is this a valid "Appliation entry point"? I would always have considered the application entry ...
[ 0.3673577308654785, 0.02870696410536766, -0.007857730612158775, 0.03374243155121803, 0.006173743866384029, -0.12614083290100098, 0.15336959064006805, -0.04683134704828262, -0.2915433645248413, -0.33312004804611206, -0.1563643366098404, 0.3201126754283905, -0.24715863168239594, 0.1537461727...
is something with a UI, and a system is 'UI-less'. In general it's just a case of you say potato, I say potato. As for the example you use: that's just what a runtime (e.g. .NET or java) does: loading a set of libraries and calling the application entry point, i.e. the "main" method. So in your case, the code loading...
[ 0.29807811975479126, -0.20985931158065796, 0.027905307710170746, 0.0922442227602005, -0.09802520275115967, -0.016111159697175026, -0.10597752034664154, 0.2801010012626648, -0.3066132664680481, -0.8692573308944702, -0.2426363229751587, 0.17371441423892975, -0.15102045238018036, 0.1839378178...
Which of theese two alternatives do you find yourself using most often, and which is more "idiomatic"? 1. f arg (obj.DoStuff()) 2. f arg <| obj.DoStuff() Overall, I don't know that one or the other is more idiomatic. Personally, the only time I use <| is with "raise": ``` raise <| new FooException("blah") ``` Apar...
[ 0.08218839764595032, 0.22283287346363068, 0.39445921778678894, -0.4000636339187622, -0.30566826462745667, 0.24470515549182892, 0.15091127157211304, -0.18660683929920197, -0.06986591964960098, -0.5106578469276428, -0.23812438547611237, 0.7711648941040039, -0.305681437253952, -0.155913963913...
languages rules so that high-precedence applications bind even more tightly; right now ``` f g() ``` parses like ``` f g () ``` but a lot of people would like it to parse as ``` f (g()) ``` (the motivating case in the original question). If you have a strong opinion about this, leave a comment on this response...
[ -0.3637167513370514, 0.2527802884578705, 0.08750887960195541, -0.18977412581443787, 0.03904292359948158, -0.04291826859116554, 0.41287660598754883, 0.4914350211620331, -0.3152986466884613, -0.653931200504303, -0.41263216733932495, 0.29536494612693787, -0.3146485686302185, -0.46703714132308...
I have a specialized list that holds items of type `IThing`: ``` public class ThingList : IList<IThing> {...} public interface IThing { Decimal Weight { get; set; } Decimal Velocity { get; set; } Decimal Distance { get; set; } Decimal Age { get; set; } Decimal AnotherValue { get; set; } [...e...
[ 0.0735245943069458, 0.03779570013284683, 0.3981817960739136, 0.03559296950697899, -0.0673479363322258, -0.09621927887201309, -0.1013186126947403, -0.3926766514778137, -0.12330355495214462, -0.5700756907463074, -0.04381036385893822, 0.458391398191452, -0.05914473161101341, 0.262860089540481...
out: ``` public class ThingList : IList<IThing> { public Decimal GetMaximumWeight() { Decimal result = 0; foreach (IThing thing in this) { result = Math.Max(result, thing.Weight); } return result; } } ``` Thats very nice. But sometimes I need the minimum weight...
[ -0.14400766789913177, -0.12304828315973282, 0.4374575912952423, -0.14071126282215118, -0.044518426060676575, 0.1343608945608139, -0.04564563184976578, -0.553754985332489, -0.16768737137317657, -0.3970959782600403, -0.21666856110095978, 0.4172380566596985, -0.25730329751968384, -0.013516253...
property. One solution would be reflection. Something like (hold your nose, strong code smell!): ``` Decimal GetMaximum(String propertyName); Decimal GetMinimum(String propertyName); ``` Are there any better, less smelly ways to accomplish this? Thanks, Eric Edit: @Matt: .Net 2.0 Conclusion: There is no better w...
[ 0.47085040807724, 0.1493116021156311, 0.0008763935184106231, 0.2541305124759674, -0.5224809646606445, -0.06281416118144989, 0.41689762473106384, -0.2614193260669708, -0.020237311720848083, -0.6968420147895813, 0.14766722917556763, 0.8862284421920776, -0.12522971630096436, -0.20070812106132...
from other people (Konrad Rudolph, Matt Hamilton and Coincoin) which implement Sklivvz idea. I can only "accept" one answer, unfortunately. Thank you very much. You can all feel "accepted", altough only Sklivvz gets the credits ;-) Yes, you should use a delegate and anonymous methods. For an example see [here](http:/...
[ 0.4502542018890381, 0.05909112095832825, 0.3656756281852722, 0.30111733078956604, -0.14054344594478607, -0.27391940355300903, -0.026427101343870163, -0.46790555119514465, -0.27123793959617615, -0.4239835739135742, -0.0897497683763504, 0.35118886828422546, -0.14595763385295868, 0.1692336797...
this.theInt = theInt; this.theChar = theChar; this.theDateTime = theDateTime; } public string Dump() { return string.Format("I: {0}, S: {1}, D: {2}", theInt, theChar, theDateTime); } } public class ThingCollection: List<Thing> { public delegate Thing AggregateF...
[ 0.2619470953941345, -0.42336538434028625, 0.45142775774002075, -0.012701951898634434, 0.03183972090482712, -0.004888442344963551, 0.08837858587503433, -0.5536113381385803, -0.10716947913169861, -0.4096158742904663, -0.20490016043186188, 0.4654236137866974, -0.2510990500450134, 0.1211866214...
Thing Candidate); public Thing Aggregate(Thing Seed, AggregateFunction Func) { Thing res = Seed; foreach (Thing t in this) { res = Func(res, t); } return res; } } class MainClass { public static void Main(string[]
[ 0.0035767420195043087, -0.3965222239494324, 0.1274508833885193, -0.04631109535694122, 0.09220563620328903, 0.17398585379123688, 0.1381378024816513, -0.2986101508140564, 0.059145886451005936, -0.3296152949333191, -0.26940807700157166, 0.35269665718078613, -0.1520027369260788, 0.490670561790...
args) { Thing a = new Thing(1,'z',DateTime.Now); Thing b = new Thing(2,'y',DateTime.Now.AddDays(1)); Thing c = new Thing(3,'x',DateTime.Now.AddDays(-1)); Thing d = new Thing(4,'w',DateTime.Now.AddDays(2)); Thing e = new Thing(5,'v',DateTime.Now.AddDays(-2)); ThingCol...
[ -0.033253710716962814, -0.39203810691833496, 0.9832139015197754, -0.18478864431381226, 0.17147217690944672, 0.20974721014499664, 0.1345597207546234, -0.5887874364852905, -0.5721754431724548, -0.1308114379644394, -0.35279765725135803, 0.41698652505874634, -0.15703821182250977, 0.57569396495...
//Max by date result = tc.Aggregate(tc[0], delegate (Thing Best, Thing Candidate) { return (Candidate.theDateTime.CompareTo( Best.theDateTime) > 0) ?
[ 0.5042483806610107, -0.370596706867218, 0.5331313610076904, 0.21678081154823303, 0.31674855947494507, 0.20631957054138184, 0.1185949519276619, -0.3975360691547394, -0.010080639272928238, -0.2662377953529358, 0.10263968259096146, 0.3212164044380188, -0.009544904343783855, 0.2742753922939300...
Candidate : Best; } ); Console.WriteLine("Max by date: {0}", result.Dump()); //Min by char result = tc.Aggregate(tc[0], delegate (Thing Best, Thing Candidate)
[ -0.07121611386537552, -0.3993355333805084, 0.5969399809837341, 0.29030489921569824, 0.26739823818206787, 0.28136971592903137, 0.11961248517036438, -0.3142394423484802, 0.09439653903245926, -0.38125869631767273, -0.07566335052251816, 0.28130584955215454, 0.05081316828727722, 0.4316206872463...
{ return (Candidate.theChar < Best.theChar) ? Candidate : Best; } );
[ -0.8790271878242493, -0.12176192551851273, 0.1670982390642166, -0.16269686818122864, 0.279080331325531, 0.2776906192302704, 0.31753942370414734, -0.1776367574930191, 0.48029786348342896, -0.17589829862117767, -0.6753862500190735, 0.5063366293907166, -0.17060315608978271, 0.0745149329304695...
Console.WriteLine("Min by char: {0}", result.Dump()); } } ``` The results: `Max by date: I: 4, S: w, D: 10/3/2008 12:44:07 AM` `Min by char: I: 5, S: v, D: 9/29/2008 12:44:07 AM`
[ -0.7043404579162598, 0.26179367303848267, 0.8044298887252808, 0.14740745723247528, 0.4147339165210724, 0.09954600781202316, 0.3067914843559265, -0.08387884497642517, 0.20033997297286987, -0.8675979971885681, -0.14045833051204681, 0.784081220626831, 0.20660988986492157, 0.3068125247955322, ...
For an `std::map<std::string, std::string> variables`, I'd like to do this: ``` BOOST_CHECK_EQUAL(variables["a"], "b"); ``` The only problem is, in this context `variables` is `const`, so `operator[]` won't work :( Now, there are several workarounds to this; casting away the `const`, using `variables.count("a") ? v...
[ 0.20934566855430603, 0.14209431409835815, 0.22822532057762146, -0.12053828686475754, -0.0013742365408688784, -0.34405267238616943, 0.2514682114124298, -0.3799782395362854, -0.05566335842013359, -0.5242247581481934, -0.12526540458202362, 0.855778157711029, -0.32309630513191223, -0.198586344...
have to implement a support function. ``` template <typename K, typename V> V get(std::map<K, V> const& map, K const& key) { std::map<K, V>::const_iterator iter(map.find(key)); return iter != map.end() ? iter->second : V(); } ``` Improved implementation based on comments: ``` template <typename T> typename T...
[ -0.2661466896533966, -0.042845629155635834, 0.5015577673912048, -0.25437721610069275, 0.3065434992313385, 0.05906745791435242, 0.3084879219532013, -0.4872906804084778, 0.028215527534484863, -0.6097418665885925, -0.6953797340393066, 0.523663341999054, -0.3838673233985901, -0.039767164736986...
I have many items inside a list control. I want each item to have a different item template depending on the type of the item. So the first item in the list is a ObjectA type and so I want it to be rendered with ItemTemplateA. Second item is a ObjectB type and so I want it to have ItemTemplateB for rendering. At the mo...
[ 0.17787617444992065, -0.056924741715192795, 0.5270179510116577, 0.275138258934021, -0.2390931248664856, 0.20311787724494934, 0.18209262192249298, -0.2737028896808624, -0.15024110674858093, -0.9215194582939148, 0.19639165699481964, 0.6239947080612183, -0.29067444801330566, 0.269329071044921...
section and then just giving each one a `DataType`. This will automatically then use this `DataTemplate` if the items generator detects the matching data type? ``` <DataTemplate DataType={x:Type local:ObjectA}> ... </DataTemplate> ``` Also make sure that you have no `x:Key` set for the `DataTemplate`. Read mor...
[ 0.2800122797489166, 0.04668581113219261, 0.38177576661109924, 0.020666025578975677, -0.14813314378261566, -0.32397565245628357, 0.2051418274641037, -0.32923761010169983, -0.22997912764549255, -0.5337107181549072, -0.27076423168182373, 0.5319539308547974, -0.1512169986963272, -0.02853984571...
In Python, you can do this: ``` import webbrowser webbrowser.open_new("http://example.com/") ``` It will open the passed in url in the default browser Is there a ruby equivalent? Cross-platform solution: ------------------------ First, install the [Launchy](http://www.copiousfreetime.org/projects/launchy/) gem: `...
[ 0.6171695590019226, -0.20004232227802277, 0.15045861899852753, 0.139430969953537, -0.08007287234067917, -0.3381626009941101, -0.02758912742137909, -0.00016869674436748028, -0.2698684632778168, -0.2961529791355133, -0.4004618525505066, 0.6085007786750793, -0.33593836426734924, -0.1493807584...
I need to understand the differences between windows main/mdi/child/dialogs.... how win32 messages should be propagated... why some messages are present in one type and not other... **Main window** The application's top window. It is flagged as the process main window and this information can be readily accessed by cal...
[ 0.08691279590129852, 0.06499936431646347, 0.4632759988307953, 0.18944157660007477, 0.1058732196688652, -0.004449862986803055, 0.10192647576332092, 0.07654588669538498, -0.2071475088596344, -0.7800493240356445, -0.21081487834453583, 0.2252904623746872, -0.16508960723876953, 0.29844504594802...
in favor of multiple SDI windows (Word 2007). **Child** This is a child window of any other window. Its position, visibility and mostly everything is dependent on the parent window. The children send **notifications** to their parents. A notification is a specific kind of window message. **Dialog** Dialogs provides e...
[ 0.25496718287467957, -0.13820551335811615, 0.2653979957103729, 0.15350212156772614, -0.2987004220485687, 0.552909255027771, 0.08784471452236176, 0.1177343800663948, -0.09456226974725723, -1.1103609800338745, -0.043119266629219055, 0.12724997103214264, -0.08127433061599731, 0.09110596776008...
when you are using a modal one. The creation call will block until the user closes the dialog. This can make UI updating a little tricky in some situations.
[ 0.22520039975643158, -0.23140990734100342, 0.50095134973526, -0.02256614714860916, -0.12433061748743057, -0.3315657079219818, 0.6501253843307495, -0.10006725788116455, -0.0920368880033493, -0.8050029277801514, -0.4235035181045532, 0.4312848746776581, -0.34784215688705444, 0.060027379542589...
Is there any facility of transposing rows to columns in SQL Server (it is possible in MS-Access)? I was befuddled because this facility is available in MS-Access but not in SQL Server. Is it by design that this feature has not been included in SQL Server? The example at <http://jdixon.dotnetdevelopersjournal.com/pivot...
[ 0.1111815944314003, -0.12911055982112885, 0.44482824206352234, -0.13409802317619324, 0.07873454689979553, 0.10549969226121902, -0.1798700988292694, 0.010264265350997448, -0.39953848719596863, -0.5867344737052917, 0.22718152403831482, 0.5360154509544373, -0.3494173586368561, 0.0469589307904...
red size big city Chicago ``` I'm going to describe a technique that works. I've used it. I'm NOT promoting it, but it works. To pivot the data where you don't know what the values can be in advance, create a temp table on the fly with no columns. Then use a cursor to loop through your rows, issuing a dynamically ...
[ 0.18488967418670654, -0.07241935282945633, 0.480342835187912, 0.04222307726740837, -0.005709827411919832, 0.12321005761623383, -0.3929865062236786, 0.07146001607179642, -0.36345550417900085, -0.6388812065124512, -0.0015842329012230039, 0.42257076501846313, -0.7152671217918396, 0.1031247004...
usually joined with its parent entity, in effect making it seem like those custom variable/value pairs were like built-in columns in the original parent entity.
[ -0.04622390493750572, -0.0214278232306242, 0.39573830366134644, 0.291745662689209, -0.12443330883979797, -0.02397228591144085, 0.034164514392614365, 0.15865252912044525, -0.3417533338069916, 0.06933402270078659, -0.37240922451019287, -0.10676145553588867, -0.4364630877971649, 0.40055307745...
I want something like this: ``` <msxsl:script language="C#"> ??? getNodes() { ... return ... } </msxsl:script> <xsl:for-each select="user:getNodes()"> ... </xsl:for-each> ``` What return type should i use for `getNodes()` and what should i put in it's body? In principle you need to use the XPathNodeIterator ...
[ 0.30136552453041077, -0.159363254904747, 0.23304526507854462, 0.07042328268289566, -0.034639179706573486, -0.0037208523135632277, 0.09861570596694946, -0.26457035541534424, -0.21525706350803375, -0.5642241835594177, -0.06883544474840164, 0.32442203164100647, -0.3642328083515167, 0.14220380...
XmlDocument doc = new XmlDocument(); doc.PreserveWhitespace = true; doc.LoadXml("<root><fld>val</fld><fld>val2</fld></root>"); return doc.CreateNavigator().Select("/root/fld"); } </msxsl:script> ``` However, typically you would want to do something in your function that is not possible in xslt, l...
[ 0.011694543994963169, -0.5040141344070435, 0.4649227261543274, 0.017659014090895653, -0.07200326025485992, -0.17832711338996887, 0.09164541214704514, -0.3526899218559265, 0.003050207858905196, -0.776397168636322, -0.3340311348438263, 0.5647270679473877, -0.3445506691932678, 0.0044401278719...
simplicity I use a XPath based filtering but it could be anything: ``` <msxsl:script language="C#"> XPathNodeIterator getNodes(XPathNodeIterator NodesToFilter, string Criteria) { XPathNodeIterator x = NodesToFilter.Current.Select("SOMEVERYCOMPLEXPATH["+Criteria+"]"); return x; }...
[ -0.008651567623019218, -0.006464340724050999, 0.39564478397369385, -0.2365272492170334, 0.11221122741699219, -0.1538650095462799, 0.7401180267333984, -0.72491854429245, -0.10453451424837112, -0.6933492422103882, 0.014710140414536, 0.5913439393043518, -0.49711042642593384, 0.006324742920696...
XAMPP makes configuring a local LAMP stack for windows a breeze. So it's quite disappointing that enabling `.htaccess` files is such a nightmare. My problem: I've got a PHP application that requires apache/php to search for an `/includes/` directory contained within the application. To do this, `.htaccess` files must ...
[ 0.33314990997314453, 0.1407495141029358, 0.42439931631088257, -0.061107270419597626, -0.018103837966918945, -0.3445727825164795, 0.26234331727027893, -0.25641578435897827, -0.13668783009052277, -0.8766963481903076, -0.15916277468204498, 0.6504814624786377, -0.5975565314292908, 0.0506072938...
for some reason I just can't get Apache to play nice. This is my setup: `c:\xampp` `c:\xampp\htdocs` `c:\xampp\apache\conf\httpd.conf` - where I've made the changes listed below `c:\xampp\apache\bin\php.ini` - where changes to this file affect the PHP installation It is interesting to note that `c:\xampp\php\php.ini`...
[ 0.26792001724243164, -0.03942032903432846, 0.5661527514457703, 0.019955899566411972, -0.04844261705875397, -0.3463245928287506, 0.5066282749176025, -0.22678124904632568, -0.11073945462703705, -0.5705856680870056, -0.16424481570720673, 0.5707260370254517, -0.3634653091430664, 0.186777651309...
placed in # .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All # # Controls who can get stuff from this server. # Order allow,deny Allow from all </Directory> ``` The following is the entire `.htaccess` file contained i...
[ 0.027796199545264244, 0.28436294198036194, 0.6953145265579224, 0.023192008957266808, 0.16262345016002655, -0.12585964798927307, 0.5339536070823669, -0.6692577004432678, -0.20541918277740479, -0.43837442994117737, -0.422827810049057, 0.36483463644981384, -0.43916770815849304, 0.206731796264...
receive the following error: ``` Warning: require(include.general.inc) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\application\menu\logon.php on line 21 ``` Fatal error: require() [function.require]: Failed opening required `include.general.inc` (include\_path='.;C:\xampp\...
[ 0.14324991405010223, 0.31522899866104126, 0.2806253135204315, -0.12967494130134583, 0.08777383714914322, -0.013044198043644428, 0.588269829750061, -0.33307501673698425, -0.12149333953857422, -0.356040894985199, -0.4241665005683899, 0.7192139029502869, -0.4632473886013031, 0.104132220149040...
could be to simply add the include\_path to the PHP file, but I'm not going to have access to the `php.ini` file on the location I plan to deploy my app. I will, however, be able to request the server admin allows `.htaccess` files. renamed `htacces.txt` to `.htaccess` and ammended the appropriate directives in the `h...
[ 0.4157494008541107, -0.019916830584406853, 0.4874182343482971, -0.15302272140979767, -0.08884361386299133, -0.10333360731601715, 0.3878385126590729, -0.25298434495925903, 0.03405105322599411, -0.8249029517173767, -0.2296677678823471, 0.6384297609329224, -0.535362958908081, -0.0753092244267...
deployed to multiple locations so thanks especially for that pointer. 1. Why do you need to rename .htaccess to htaccess.txt 2. Try setting the include\_path using [set\_include\_path()](http://php.net/set_include_path()) and see if that helps (as an intermediate fix) 3. Verify which php.ini to use through a [phpinfo()...
[ 0.4374089539051056, -0.19852837920188904, 0.26793181896209717, -0.245987206697464, 0.13993427157402039, -0.4363061785697937, 0.38296282291412354, -0.2588368058204651, -0.3396536409854889, -0.7296279668807983, -0.2273997813463211, 0.32243943214416504, -0.6269723176956177, -0.219444245100021...
I just got started using Adobe Flex SDK. I was very excited because it's the first time I've found a good, **free** way to create Flash applications. But then I noticed something: Flex doesn't seem to be much about making animations or designs. It seems more like an application to build forms and menus and the like... ...
[ 0.6884210705757141, 0.013551071286201477, 0.11507991701364517, 0.19308394193649292, -0.397563099861145, -0.1393413096666336, -0.22508735954761505, 0.17644231021404266, -0.3958044648170471, -0.9048235416412354, 0.2197369486093521, 0.5732603073120117, 0.028593668714165688, 0.0594435147941112...
and the basic building blocks were designed to support *applications*. HTML, on the other hand was designed for displaying text, and the DOM is a sorry excuse for a component model -- and it was most definitely not designed with applications in mind. There is a plethora of JavaScript libraries that try to implement a...
[ 0.008315147832036018, 0.2232816219329834, 0.11101798713207245, 0.27617013454437256, -0.2975902557373047, -0.2305111438035965, 0.08887576311826706, -0.029674023389816284, -0.13530738651752472, -0.5063447952270508, -0.03978893160820007, 0.7331770062446594, -0.24074490368366241, -0.0334168747...
Dojo, YUI and jQuery are, they are limited by the platform, and it is limited indeed. Flex has all the benefits of the Flash Player platform, like vector graphics, remote objects, video support, cross-domain loading, sockets, font embedding, etc. but also a very good component model, data binding and skinning capabilit...
[ 0.004100104793906212, -0.24378077685832977, 0.24406303465366364, 0.3018382787704468, -0.5164254903793335, -0.37971535325050354, -0.30565905570983887, 0.17385417222976685, -0.33721134066581726, -0.7409306764602661, 0.06039133667945862, 0.5831505060195923, 0.05038924142718315, -0.41384148597...
For simplicity, I generally split a lot of my configuration (i.e. the contents of app.config and web.config) out into separate .config files, and then reference them from the main config file using the 'configSource' attribute. For example: ``` <appSettings configSource="appSettings.config"/> ``` and then placing al...
[ 0.15665185451507568, 0.16261377930641174, 0.4934135675430298, -0.015641354024410248, 0.037240996956825256, 0.036849867552518845, 0.012590499594807625, -0.37366926670074463, -0.12652461230754852, -0.8885142803192139, -0.3344760835170746, 0.5837323069572449, -0.46569305658340454, -0.23077319...
at some value from a configuration section that is stored in one of these external files. (I understand that most of these would likley be considered "integration tests", as they are relying on the Configuration system, and I do have "pure unit tests" as well, but those are the not the problem. I'm really looking to te...
[ 0.30401962995529175, -0.03133990988135338, -0.010960392653942108, 0.2677067816257477, 0.043708231300115585, 0.010509048588573933, 0.4176420569419861, -0.08302393555641174, 0.07474201172590256, -0.6418959498405457, -0.003833794966340065, 0.8059607148170471, 0.08213874697685242, -0.153750211...
never seems to be able to find those external files while the tests are executing. I've tried messing around with post build actions to make this work but with no luck. Is there a way to have these external files copied over into the correct output folder at run time? Found it: If you edit the test run configuration (...
[ 0.7178274393081665, -0.21375690400600433, 0.20094195008277893, 0.2439107596874237, 0.2893371284008026, -0.0865032821893692, 0.40619030594825745, 0.005415834952145815, -0.3448892831802368, -0.5276802182197571, 0.0508449450135231, 0.6525007486343384, -0.0014868334401398897, 0.034660156816244...
from anywhere in the solution that can be copied out with the compiled assemblies at run time to the correct folder. In this way, I can now actually just define most of my configuration in one set of external .config files and have them automatically copied out at the run of each test.
[ 0.6391441226005554, 0.1213691309094429, 0.10016586631536484, 0.033206816762685776, 0.24247223138809204, -0.14775729179382324, 0.01833331771194935, -0.21365156769752502, 0.013071144931018353, -0.9594351053237915, -0.021087009459733963, 0.6138964891433716, -0.12221792340278625, 0.04461805894...
When you think about it, doesn't the REST paradigm of being resource-oriented boil down to being object-oriented (with constrained functionality, leveraging HTTP as much as possible)? I'm not necessarily saying it's a bad thing, but rather that if they are essentially the same very similar then it becomes much easier ...
[ 0.09534664452075958, -0.33574026823043823, -0.32715991139411926, 0.1779451221227646, -0.14429302513599396, -0.273759126663208, 0.3845572769641876, 0.1576107144355774, -0.19498760998249054, -0.7464218139648438, -0.2359750121831894, 0.4835071265697479, -0.18251235783100128, 0.041627179831266...
While it is certainly true that REST does not retain client-specific state across requests, it **does** retain resource state across all clients. Resources **have** state, the same way classes have state. 4. REST resources are are globally uniquely identified by a URI in the same way that server objects are globally un...
[ -0.07245094329118729, -0.15241862833499908, 0.4129442572593689, 0.23286423087120056, -0.14281529188156128, 0.08729103207588196, 0.08631773293018341, 0.20715531706809998, -0.5055191516876221, -0.6241737604141235, -0.2776453495025635, 0.14076462388038635, -0.09668520092964172, 0.364385277032...
emphasizes encapsulation of state and **opacity**, using as many different methods necessary to operate on the state. REST is about transfer of (representation of) state and **transparency**. The number of methods used in REST is constrained and uniform across *all* resources. The closest to that in OOP is the `ToStrin...
[ 0.16644646227359772, -0.20592084527015686, 0.03000406175851822, 0.03351859375834465, -0.17049291729927063, -0.0647306889295578, 0.12076961249113083, -0.1416092813014984, -0.3767211139202118, -0.6358913779258728, -0.31435441970825195, 0.4419196844100952, -0.10324003547430038, -0.11185990273...
a single message and all you ever need to know regarding that message is sent back in a single response. In object-orientation, **there is no concept of universal object identity**--objects either get identity from their memory address at any particular moment, a framework-specific UUID, or from a database key. In RES...
[ 0.010690831579267979, 0.039145633578300476, 0.38734665513038635, 0.4926259517669678, 0.030199477449059486, -0.093502938747406, 0.28526434302330017, 0.1366887241601944, -0.5624728202819824, -0.5652898550033569, -0.5584696531295776, 0.15586969256401062, -0.16820190846920013, 0.21940718591213...
message won't change state) and **idempotence** (e.g., a PUT request sent multiple times has same effect as just one time). Although some guidelines for particular object-oriented technologies have something to say about how certain constructs affect state, there really isn't anything about object orientation that says...
[ 0.3616492748260498, -0.2983829379081726, 0.163385272026062, 0.24772371351718903, -0.30703696608543396, -0.048199187964200974, 0.577526867389679, -0.13973182439804077, -0.22384615242481232, -0.6280709505081177, -0.1603725254535675, 0.12178163230419159, -0.32347482442855835, 0.17763029038906...
I'm wondering if a Java library can be called from a VB.net application. (A Google search turns up lots of shady answers, but nothing definitive) No, you can't. Unless you are willing to use some "J#" libraries (which is not nearly the same as Java) or [IKVM](http://www.ikvm.net/) which is a Java implementation that r...
[ 0.5607039332389832, -0.018567277118563652, -0.24131816625595093, 0.18068309128284454, -0.0902232825756073, -0.328910768032074, 0.17343908548355103, 0.31608787178993225, -0.20091859996318817, -0.4565623998641968, 0.10224633663892746, 0.4709044098854065, -0.26283660531044006, 0.3813947737216...
Do you know an easy and straight-forward method/sub/module which allows me to convert a number (say 1234567.89) to an easily readable form - something like 1.23M? Right now I can do this by making several comparisons, but I'm not happy with my method: ``` if($bytes > 1000000000){ $bytes = ( sprintf( "%0.2f", $byt...
[ -0.062167469412088394, 0.2866972088813782, 0.19875377416610718, 0.04999689757823944, 0.12705083191394806, 0.22761060297489166, 0.1936822533607483, -0.25996455550193787, -0.22743886709213257, -0.6058275103569031, 0.04720927029848099, 0.30977949500083923, -0.25054439902305603, 0.066571243107...
$bytes = ( sprintf( "%0.2f", $bytes/1000 )). " Kb/s"; } else{ $bytes = sprintf( "%0.2f", $bytes ). "b/s"; } ``` Thank you for your help! The [Number::Bytes::Human](http://search.cpan.org/dist/Number-Bytes-Human) module should be able to help you
[ 0.001260252553038299, 0.364871621131897, 0.016926951706409454, 0.12860871851444244, 0.2027137279510498, 0.08801192045211792, 0.39605775475502014, -0.012434601783752441, -0.2035776674747467, -0.41314566135406494, -0.2436613142490387, 0.33015137910842896, -0.10460901260375977, 0.197387427091...
out. An example of how to use it can be found in its synopsis: ``` use Number::Bytes::Human qw(format_bytes); $size = format_bytes(0); # '0' $size = format_bytes(2*1024); # '2.0K' $size = format_bytes(1_234_890, bs => 1000); # '1.3M' $size = format_bytes(1E9, bs => 1000); # '1.0G' # the OO way $human...
[ -0.05944865196943283, 0.146530881524086, 0.21581731736660004, -0.13725554943084717, -0.06448489427566528, 0.14677126705646515, 0.015489053912460804, -0.30041733384132385, -0.28379809856414795, -0.6341272592544556, -0.2835557162761688, 0.329449325799942, -0.32424768805503845, 0.176923260092...
I've got two tables: ``` Employees: uid (number) | first_name (string) | last_name (string) | ... Projects: uid | project_title (string) | point_of_contact_id (FK: Employees.uid) | ... ``` I'd like to create a form for Projects with a "Point of Contact" combo box (dropdown) field. The display values should be "firs...
[ 0.07432820647954941, 0.19042226672172546, 0.6903643012046814, -0.23453472554683685, 0.014010214246809483, 0.0375986285507679, -0.1828150600194931, -0.015483766794204712, -0.1532137542963028, -0.6474965214729309, -0.04430238530039787, 0.3424251079559326, -0.1052340492606163, 0.1463731527328...
way to do this at the table design level, I would prefer that, since then I would only have to set a setting per UID column (and there are *many* tables), rather than one setting per UID field (and there are *many* forms, each with several UID fields). According to [the bug report](http://connect.microsoft.com/SQLServe...
[ 0.04122846946120262, -0.04014136269688606, 0.4155730605125427, -0.06520006060600281, 0.10110422968864441, -0.08256479352712631, 0.21080537140369415, 0.034272391349077225, -0.45054754614830017, -0.6066511273384094, 0.0703544020652771, 0.2362440824508667, -0.3629027307033539, 0.2899940907955...
Previously Visual Studio had templates for mobile web forms (not the mobile SDK). They appear to be gone in Visual Studio 2008 and the only solution I've seen is to download some templates from Omar here: <http://blogs.msdn.com/webdevtools/archive/2007/09/17/tip-trick-asp-net-mobile-development-with-visual-studio-2008...
[ 0.26146066188812256, 0.15669290721416473, 0.44634780287742615, 0.02072298154234886, -0.11918269097805023, -0.15980921685695648, 0.25592923164367676, -0.12085441499948502, -0.3724035620689392, -0.45234203338623047, 0.28054192662239075, 0.45336949825286865, -0.2833993136882782, 0.15640993416...
from MobilePage instead of Page and your controls to derive from MobileUserControl instead of UserControl. To access the controls in markup, reference the mobile namespace like this: and then you will be able to use the mobile controls like this: mobile:form, mobile:textview ... These are still the only way that I'v...
[ 0.23728908598423004, -0.06487985700368881, 0.8220710158348083, 0.14642196893692017, -0.301545649766922, -0.061733826994895935, 0.13905254006385803, -0.06344471871852875, -0.2942945659160614, -1.0084953308105469, -0.1289011538028717, 0.3777256906032562, -0.2639760971069336, 0.03155414015054...
I suppose this question is a [variation on a theme](https://stackoverflow.com/questions/21475/why-havent-torrents-replaced-http-downloads), but different. Torrents will never replace HTTP, or even FTP download options. This said, why aren't there torrent links next to those options on more websites? I'm imagining a w...
[ 0.5245274901390076, 0.07401324808597565, 0.398406445980072, 0.16350004076957703, -0.04870167747139931, -0.06313127279281616, -0.003492088057100773, 0.09782444685697556, -0.5406731963157654, -0.5611529350280762, -0.07575870305299759, 0.575861394405365, -0.14378909766674042, 0.29648175835609...
what is needed here. The autogenerated torrent file can include the normal HTTP server as a permanent seed, the extensions to do this are very well supported by most, if not all, of the major torrent clients and requires no reconfiguration or special things on the server end (it uses stock standard HTTP Range headers)...
[ 0.4252872169017792, 0.02739124372601509, 0.2625652551651001, 0.13961875438690186, -0.03796405345201492, -0.08591733872890472, 0.13530941307544708, 0.19423741102218628, -0.23426617681980133, -0.5047910809516907, -0.16709597408771515, 0.4289907217025757, -0.16224612295627594, 0.1562913507223...
or other website? first of all: <http://torrent.ubuntu.com/> for torrents on ubuntu. second of all: opera has a built in torrent client. third: I agree with the stigma attached to p2p. So much so that we have sites that need to be called legaltorrents and such like because by default a torrent would be an illegal thi...
[ 0.7400623559951782, -0.03172548487782478, 0.012744994834065437, 0.16436155140399933, -0.44489580392837524, -0.41322535276412964, 0.11918812245130539, 0.3870687782764435, -0.2989998459815979, -0.17110341787338257, -0.06913324445486069, 0.5867070555686951, -0.21641167998313904, 0.04858117550...
torrents these people (companies like microsoft and such like) would not be able to gather important information about who is doing the downloads (not personally identifiable information, and quickly aggregated away). with torrents, other people would be able to see this information, at least partially. A company would...
[ 0.6901463270187378, 0.37433168292045593, 0.308102011680603, 0.3404152989387512, -0.28887975215911865, -0.30369287729263306, 0.2772655189037323, 0.3493075966835022, -0.31409135460853577, -0.3887283205986023, -0.09400099515914917, 0.27423521876335144, -0.26629602909088135, 0.5439807772636414...
the reason why the vista download on microsofts sites, or its many service packs and SDKs are not in torrents. Another thing is that people just wont participate, and that is not difficult to figure out why because of the number of hoops you have to jump through. you got to figure out the firewall, the NAT thing, and ...
[ 0.6021009683609009, 0.17921309173107147, 0.07551578432321548, 0.4479677081108093, -0.20584864914417267, -0.4738503694534302, 0.40739285945892334, 0.44758284091949463, -0.25968465209007263, -0.6839808821678162, -0.013370898552238941, 0.621068000793457, -0.19902411103248596, 0.25988504290580...
of thing. I would probably feel funny seeding adobe acrobat, or some evaluation version or something, because those guys are making profits and I am not a fool to save money for them. Let them pay for http downloads. edit: (based on the comment by monoxide) For the freeware out there and for SF.net downloads, their pr...
[ 0.7146724462509155, 0.5706635117530823, 0.03999096155166626, 0.2686225473880768, 0.07308731973171234, -0.295146107673645, 0.25631919503211975, 0.29726642370224, -0.3786800801753998, -0.2283700704574585, 0.225521981716156, 0.7261515259742737, 0.02274586446583271, 0.18259546160697937, -0.1...