text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Procs that will need to be modified to support any new tables, but that is inevitable anyway when columns are added.
thanks in advance for any thoughts.
You cannot use generic constraints in this way. How can the compiler guarantee that the type parameter is a `Client` simply because it implements the `IClient` interf... | [
-0.11291785538196564,
-0.0098872110247612,
0.3232003152370453,
0.13197827339172363,
-0.07172419875860214,
0.09967418760061264,
0.05600124970078468,
-0.062159206718206406,
-0.3510436415672302,
-0.6297371983528137,
-0.13667356967926025,
0.6029011011123657,
-0.6479178667068481,
-0.26553618907... | |
IList<T> clients = new List<T>();
clients.Add(new Client(3));
// ...
}
```
and once doing that I am wondering if you need a generic method at all:
```
public IList<Client> GetClientsByListofID(IList<int> ids)
{
IList<Client> clients = new List<Client>();
clients.Add(new Client(3));
// ...
}
``` | [
0.22167424857616425,
-0.18136164546012878,
0.5996173620223999,
-0.14282885193824768,
-0.32338008284568787,
0.028216512873768806,
0.28896450996398926,
-0.44213810563087463,
-0.3295743465423584,
-0.8785602450370789,
-0.09041229635477066,
0.5997682809829712,
-0.9545199275016785,
0.02276691794... | |
I was wondering if it is possible to send a Fax via ASP.NET without using proprietary Fax software (i.e. using all .NET native classes)
All I am after is to send a generated PDF to a remote fax machine rather than a printer.
There is [this](https://stackoverflow.com/questions/545173/sending-fax-with-net) question al... | [
0.5320172905921936,
0.05109952762722969,
0.5530673861503601,
0.09191404283046722,
-0.38222071528434753,
-0.21491739153862,
-0.04155231639742851,
-0.12492893636226654,
-0.3067891001701355,
-0.5298973321914673,
-0.2996439039707184,
0.2999149262905121,
-0.1774885207414627,
0.03779594600200653... | |
field of the Pending Changes Window (View->Pending Changes).
The url of a file/folder is also displayed in the Visual Studio project window when you select a file in the Pending Changes Window or Working Copy Explorer (and in many cases even when you select a file in the Solution explorer; but this depends on the proj... | [
0.2675631046295166,
-0.21595345437526703,
0.6737093329429626,
-0.11699134111404419,
0.04048539698123932,
0.1074199303984642,
-0.17410819232463837,
0.04723738506436348,
-0.42604634165763855,
-0.6080619692802429,
-0.2813357412815094,
0.49075594544410706,
-0.16600823402404785,
-0.008153195492... | |
What is the difference between the JavaScript functions `decodeURIComponent` and `decodeURI`?
To explain the difference between these two let me explain the difference between `encodeURI` and `encodeURIComponent`.
The main difference is that:
* The `encodeURI` function is intended for use on the full URI.
* The `enco... | [
0.10134445875883102,
0.03707585111260414,
0.16124124825000763,
-0.15704818069934845,
0.1906806081533432,
0.01309648435562849,
-0.14940357208251953,
0.01793764904141426,
0.28809410333633423,
-0.4730208218097687,
-0.3796025514602661,
0.5185011029243469,
-0.4308241307735443,
0.199671015143394... | |
function decodes strings generated by its corresponding encode counterpart taking care of the semantics of the special characters and their handling. | [
-0.4168233871459961,
-0.3003276288509369,
-0.0885072872042656,
-0.004890624433755875,
-0.13893818855285645,
0.13165989518165588,
-0.052379779517650604,
-0.24072423577308655,
0.4689295291900635,
-0.20494228601455688,
-0.6412954330444336,
0.2992425262928009,
-0.3195726275444031,
-0.300800383... | |
Given two URLs, how can I resolve one of them against the other? I'm trying to emulate Java's [URI.resolve()](http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html#resolve(java.lang.String)), which does not exist in GWT's emulation library. I've had to implement this manually, which, as you might expect has been ve... | [
-0.29483920335769653,
-0.1497981697320938,
0.44000524282455444,
-0.11660653352737427,
0.05494694411754608,
0.00322760664857924,
0.013388048857450485,
-0.1679004728794098,
-0.08306554704904556,
-0.8053051829338074,
0.026629071682691574,
0.46075934171676636,
-0.31775617599487305,
0.123032875... | |
I'm looking for a way to populate more than 1 table in MVC, because the method only allows me to return One ModelView or I don't know how to return more. Do I have to build the table in the controller and store into a ViewData and display the viewData in the page?
Edit: Sorry, I think I didn't express the idea. The po... | [
0.13171692192554474,
-0.1683337688446045,
0.6971805095672607,
0.2338418960571289,
0.004335050005465746,
0.01148285809904337,
-0.055266156792640686,
-0.15989750623703003,
-0.5305107831954956,
-0.6029582023620605,
0.16830484569072723,
0.23119281232357025,
-0.3315267860889435,
0.2551562786102... | |
Tables with Contacts and Addresses.
```
for each p in modelview
{
"<td>" + p.Name + "</td>"
}
for each p2 in modelview2
{
"<td>" + p2.Product + "</td>"
}
```
You can return more than one model, but it will require a compound model for the view and the use of prefixes when binding the controller parameter.
Say you h... | [
-0.16974495351314545,
-0.23776251077651978,
0.8957959413528442,
0.05473886802792549,
-0.09170471131801605,
0.23057562112808228,
-0.14141057431697845,
-0.41716739535331726,
-0.48433995246887207,
-0.7411702871322632,
-0.08893946558237076,
0.4254690706729889,
-0.3616836965084076,
0.1983798742... | |
[Bind(Prefix="Bar")]BarClass bar )
{
...
}
```
And in your view you would use:
```
<%= Html.TextBox( "Foo.Value" ) %>
<%= Html.TextBox( "Bar.Name" ) %>
``` | [
0.021688316017389297,
0.21747802197933197,
0.7882493138313293,
-0.6893775463104248,
-0.14098021388053894,
-0.09259127080440521,
0.3490016758441925,
-0.6536247730255127,
0.020379966124892235,
-0.6425570845603943,
-0.2062019556760788,
0.304676353931427,
-0.5197328329086304,
0.071142002940177... | |
Can anyone define WCF? What is the purpose of WCF?
What are some good reading materials to learn about WCF?
**WCF (Windows Communication Foundation)** is the name that Microsoft uses for a **Framework** that **can Communicate between multiple servers independently of their Operating System or Technology**.
You can u... | [
0.7000934481620789,
0.10167425870895386,
0.45209142565727234,
0.03775675967335701,
-0.3655300438404083,
-0.3650261461734772,
0.1926937997341156,
-0.11012803763151169,
-0.3120426833629608,
-0.754023015499115,
0.09573209285736084,
0.08515802025794983,
-0.2929210662841797,
0.2402050793170929,... | |
is called a **Service Framework** and not a Web Service because it **no longer depends on the IIS** (Internet Information Server) to be hosted. Now you can host a WCF application using TCP/IP, host it as a Windows Service or even host it as an application - and you can still host it in IIS as well.
It uses the SOAP pr... | [
0.44876474142074585,
-0.09927654266357422,
0.7269206047058105,
-0.08716470003128052,
-0.3159411549568176,
-0.3078756332397461,
0.2612205147743225,
-0.11665638536214828,
-0.18399181962013245,
-1.044463872909546,
-0.09804826229810715,
0.14871495962142944,
-0.17390942573547363,
0.477686256170... | |
messages from anywhere to anything.
It is heavily used in the **AJAX world**, because it can send messages in the JSON format. Because of this, jQuery and other JavaScript frameworks work lovely with it.
**For Reading material**, I recommend buying a good book, because it's a good way to do self-learning and have it ... | [
0.28667083382606506,
0.11701098829507828,
0.47665783762931824,
-0.039909057319164276,
-0.048346225172281265,
-0.38335728645324707,
0.33030298352241516,
0.6562346816062927,
-0.16760918498039246,
-0.5208824276924133,
-0.2799196243286133,
0.3545554578304291,
-0.08637694269418716,
-0.296064704... | |
How can I enumerate display objects under a pixel relative to the stage?
**Clarification:** I want to write a function which get **(x,y)** as input and returns an **array of objects** as output.
**update**: I want to avoid looping over all the display objects, to tell which one is under the specified pixel.
Any Displ... | [
0.08439168334007263,
0.060746412724256516,
0.5843220949172974,
-0.20809771120548248,
-0.14648373425006866,
-0.07948608696460724,
0.11079520732164383,
-0.3108353614807129,
0.013295577839016914,
-0.7537137269973755,
-0.0828891322016716,
0.39203399419784546,
-0.3352607786655426,
0.08733484148... | |
I am trying to implement a query where I am using aggregates to sum certain values and then group by mysql date functions (month | year | week). Those group by clauses don't return non-existant months OR year OR week respectively for obvious reasons. I was wondering if there is a way to get them?
Figured out why it was... | [
0.3853122591972351,
0.29993176460266113,
0.3496641516685486,
-0.008792717009782791,
-0.1265273243188858,
0.16287384927272797,
0.1597323715686798,
-0.1816544234752655,
-0.3284781277179718,
-0.27555105090141296,
0.2602744996547699,
-0.2492060512304306,
-0.2679654359817505,
0.6180132031440735... | |
How can I call a specific event manually from my own code?
I think you want [wx.PostEvent](https://docs.wxpython.org/wx.functions.html#wx.PostEvent).
There's also some info about posting events from other thread for [long running tasks on the wxPython wiki](http://wiki.wxpython.org/LongRunningTasks). | [
0.3693138659000397,
-0.16057714819908142,
-0.015575341880321503,
0.00831636879593134,
-0.01076252106577158,
-0.0899249017238617,
0.3095169961452484,
0.03024519421160221,
-0.42114710807800293,
-0.3636375665664673,
0.12895099818706512,
0.44771280884742737,
0.05334574356675148,
0.083108015358... | |
I'm developing an application just for fun that consists of capturing images from a webcam.
What I would like to know is how can I apply some filters to the image that I capture? Ideally I would like to develop something like Apple iPhoto; something that defaces the image.
The programming language I am using is C#.
i... | [
0.6738322377204895,
0.09538329392671585,
0.22758635878562927,
-0.030975056812167168,
-0.08384503424167633,
-0.28092265129089355,
-0.007310687098652124,
0.1734602004289627,
-0.0080717196688056,
-0.9079239964485168,
0.20647118985652924,
0.4057307541370392,
-0.6276330351829529,
-0.08428421616... | |
this using Image or Bitmap classes, using the Set/GetPixel method. | [
-0.01039487961679697,
-0.5563347935676575,
0.1396559774875641,
0.3012428879737854,
-0.1056530550122261,
0.002497961511835456,
-0.2917218804359436,
-0.14799638092517853,
-0.02055206336081028,
-0.6170880794525146,
-0.2154882252216339,
0.44379547238349915,
-0.4940640926361084,
-0.318627029657... | |
Is it possible to install Joomla in a sub directory and move the index.php to the root. I know this can be done with WordPress but I can't seem to find the Joomla Equivalent.
I am already using a redirect, not a very good one.
I really don't want all the joomla folders clogging up my root directory.
Thanks in advanc... | [
0.3944244682788849,
0.13775493204593658,
-0.042852483689785004,
0.03851502761244774,
-0.13069459795951843,
-0.24582286179065704,
0.34855735301971436,
0.45154696702957153,
-0.28236159682273865,
-0.58632892370224,
0.14770478010177612,
0.552425742149353,
-0.2869775891304016,
0.110947266221046... | |
Which is more correct, "PriceList" or "Pricelist"?
FxCop says:
CA1702 : Microsoft.Naming : The compound word 'PriceList' in type name 'PriceList' exists as a discrete term. If your usage is intended to be single word, case it as 'Pricelist'.
Edit: This is an object with Title, Start/End date etc.
Like FxCop it depend... | [
0.520592212677002,
-0.05900060757994652,
0.45364537835121155,
-0.05985095351934433,
-0.0686686635017395,
-0.0012355758808553219,
-0.6549720764160156,
-0.10785825550556183,
-0.2256164252758026,
-0.35244429111480713,
-0.28020843863487244,
0.8377410769462585,
0.025898592546582222,
0.160761088... | |
be better.
Its important not too get hung up on *obeying* the rules and miss the principle involved. In this case its an entirely human issue (as far as the compiler is concerned it could be called Pinkelephants, pinkElephants or PinkElephants, it doesn't care). In which case you should pick whatever feels the most na... | [
0.3417973816394806,
-0.3846675157546997,
-0.23091179132461548,
0.23422026634216309,
-0.20852740108966827,
0.019360074773430824,
0.31511396169662476,
0.29621732234954834,
0.16905447840690613,
-0.37461861968040466,
-0.2853947877883911,
0.32723426818847656,
-0.3655604422092438,
-0.40740990638... | |
I just came across an interesting scenario. I have a class in C#:
```
public class Test
{
public int A;
public int a;
}
```
As C# is case sensitive, this will treat the two variables `A` and `a` as distinct. I want to inherit the above class in my VB code, which is not case sensitive. How will the VB code access... | [
0.27699539065361023,
0.1760593056678772,
-0.09600132703781128,
-0.0873461440205574,
-0.11861754208803177,
-0.22344490885734558,
0.14659014344215393,
-0.048283372074365616,
-0.11861907690763474,
-0.2924256920814514,
0.1424921154975891,
0.5100107192993164,
-0.40351590514183044,
0.45063120126... | |
you can't change the code of the library, you can use reflection API to manually select the field you want:
```
obj.GetType().GetField("a").GetValue(obj)
obj.GetType().GetField("A").GetValue(obj)
``` | [
0.1102420836687088,
0.06851372867822647,
0.24382983148097992,
-0.25969398021698,
-0.07725002616643906,
0.10897352546453476,
0.17590098083019257,
-0.18462827801704407,
0.0305020809173584,
-0.6398908495903015,
-0.3725404441356659,
0.6937662959098816,
-0.6000466346740723,
-0.20492662489414215... | |
I have a sql server 2005 table which has xml store in a text field. I am wondering if there is an easy way (using TSQL) of retrieving the a value from the xml data without doing a line by line parsing of the text?
Doing a line-by-line parsing is a possibility because the amount of xml is pretty small. However, if pos... | [
-0.10170489549636841,
0.09842720627784729,
0.15539629757404327,
0.07031434029340744,
-0.25691601634025574,
-0.005305313505232334,
0.11975204199552536,
-0.06240830942988396,
-0.04063849896192551,
-0.40595248341560364,
0.17473182082176208,
0.5953230261802673,
-0.2806491255760193,
-0.09620168... | |
server table. The xml schema is built-in as part of the stored xml.
Any suggestions would be appreciated!
You can fetch the XML data from the column and convert it to the XML datatype, and query the XML easily using XQuery or use XPath to extract values from it.
[XML Support In SQL Server 2005](http://msdn.microsoft.... | [
0.061298273503780365,
-0.012922591529786587,
0.5250025987625122,
-0.05995825678110123,
-0.2691696882247925,
0.06278800964355469,
0.16918787360191345,
-0.13069868087768555,
-0.0671495795249939,
-0.3973771035671234,
0.012574058957397938,
-0.03834054246544838,
-0.28553614020347595,
0.18915528... | |
I got a `TreeView` containing different objects from different classes. Now I want to build a propertypanel, which shows up different content, depenting on what object/class is selected in the `TreeView`. What is the best way to build such panel? Differnt panels and collapsing panels depending on the selection(Whould m... | [
0.06437297910451889,
-0.17502877116203308,
0.2975946068763733,
0.15844163298606873,
-0.3257281184196472,
0.2315075844526291,
-0.23900409042835236,
-0.36683419346809387,
-0.11703843623399734,
-0.8090957999229431,
0.06487537920475006,
0.4868358075618744,
-0.06518738716840744,
-0.014193058013... | |
<Label>This is displayed for SomeClass</Label>
</DataTemplate>
<DataTemplate DataType="{x:Type local:SomeOtherClass}">
<Label>This is displayed for SomeOtherClass</Label>
</DataTemplate>
```
Obviously your `DataTemplate`s can be as complex as needed to display the various classes present in the `TreeView`. | [
0.05030312389135361,
-0.17581358551979065,
0.10815250128507614,
0.10732302069664001,
-0.058418869972229004,
-0.14390794932842255,
0.06364873051643372,
-0.10473807156085968,
-0.15257854759693146,
-0.6181504130363464,
-0.23032622039318085,
0.37564486265182495,
-0.1585574746131897,
0.14171163... | |
I've got a source of data that has HTML tags in it (B, I, A) and need to display this in a Silverlight ListBox.
Searching around it seems to be an issue but most of the posts are old and have to do with Silverlight 1 it seems.
What is currently the best way to display simple HTML with Silverlight, if nothing else, j... | [
0.49422043561935425,
0.26100775599479675,
0.3770987391471863,
-0.006244749296456575,
-0.38880443572998047,
-0.2402808964252472,
0.266545832157135,
0.07635362446308136,
-0.2205733060836792,
-0.628305971622467,
0.24379384517669678,
0.13029026985168457,
-0.36233651638031006,
0.080573789775371... | |
[block post](http://blogs.msdn.com/delay/archive/2008/03/17/continuing-support-for-simple-html-display-in-silverlight-htmltextblock-sample-updated-for-silverlight-2-beta-1.aspx) on the subject. There's also a demo page [here](http://dlaa.me/Samples/SilverlightHtmlTextBlock/). | [
0.27608543634414673,
-0.08254287391901016,
0.0681685209274292,
0.07637978345155716,
-0.28520894050598145,
-0.3738895058631897,
-0.2171749621629715,
-0.20841269195079803,
-0.3393815755844116,
-0.19599731266498566,
-0.3501272201538086,
0.025701288133859634,
-0.10922837257385254,
-0.073713600... | |
I have a function that returns a array of 6 doubles.
```
double* Validation();
```
I would like to cast this return value in managed code.
```
array<double>^ validationPosition = gcnew array<double>(6);
validationPosition = Validation();
```
I get this error:
```
error C2440: '=' : cannot convert from 'double *... | [
0.5131376385688782,
0.37150850892066956,
0.27695345878601074,
-0.19439475238323212,
-0.0220237635076046,
0.17649580538272858,
0.5483281016349792,
-0.4497663080692291,
-0.2782505452632904,
-0.4315461218357086,
0.14503103494644165,
0.5403382182121277,
-0.5112698674201965,
0.2697124183177948,... | |
since it sounds like it's allocating an array internal to your validation() routine. | [
0.4651363790035248,
0.08784554153680801,
0.05818377807736397,
0.03819641098380089,
0.1478252410888672,
-0.048674363642930984,
-0.14108014106750488,
-0.029500355944037437,
-0.32417288422584534,
-0.056619707494974136,
0.08897597342729568,
0.3097129166126251,
0.026105547323822975,
0.015623461... | |
I have a form in a PHP sending variables to a PHP file which duly inserts them into a MySQL table.
I currently have a div displaying the response from the PHP (which is anything that is printed by the PHP).
All works fine. The problem is I want to use variables that are created/updated during the PHP MySQL insert pro... | [
0.5964922308921814,
0.15346166491508484,
0.322910875082016,
0.06630666553974152,
-0.33287447690963745,
-0.0016974848695099354,
0.12647917866706848,
-0.004328073468059301,
-0.12949354946613312,
-0.6529592275619507,
0.08661197125911713,
0.6849174499511719,
-0.12379017472267151,
-0.0962783247... | |
has any good links or examples on the subject.
I assume that you want to be able to have multiple pieces of data sent back via AJAX to your page and manipulate those.
JSON is indeed the simplest way to do this. If you use PHP5, you can use json\_encode() from the PHP side to send a complicated data type (such as an ob... | [
0.08748633414506912,
-0.019849976524710655,
0.2506140172481537,
0.0920010432600975,
-0.42683398723602295,
-0.02925708517432213,
0.32887792587280273,
-0.2079997956752777,
-0.4100791811943054,
-0.7411470413208008,
-0.06981832534074783,
0.5041412115097046,
-0.33395513892173767,
-0.24035504460... | |
are tons of tutorials out there that will show you how to do this and explain it in further detail than a response here ever could. | [
0.6218084096908569,
0.1740095019340515,
0.09521373361349106,
0.5213442444801331,
0.13924753665924072,
-0.18098591268062592,
0.22147370874881744,
0.40117907524108887,
-0.10452070087194443,
-0.32519060373306274,
0.16004346311092377,
0.2781248390674591,
0.37859082221984863,
-0.126489311456680... | |
This piece of code fades the div fine in IE. In Firefox 3.0.8, the fade time goes by and the div disappears instantly. I can't find anyone mentioning this problem.
```
$(function() {
$("#show").click(function() {
$("#show").fadeOut('slow');
});
});
<div id="show">thi... | [
0.34374135732650757,
-0.011491473764181137,
0.8639852404594421,
-0.4728553295135498,
0.07789743691682816,
-0.3464430868625641,
0.5396438241004944,
-0.021464891731739044,
0.03727266937494278,
-0.7742259502410889,
-0.05053681880235672,
0.5013579726219177,
-0.49308058619499207,
0.275045335292... | |
had also included `jquery-vsdoc.js` for jQuery VS intellisense. Taking this out made it work.
I used this trick for future readers
```
<%if (false) { %>
<script src="common/jquery-vsdoc.js" type="text/javascript"></script>
<% } %>
```
Wierd. | [
-0.023010089993476868,
-0.21160252392292023,
0.31147530674934387,
-0.04048557206988335,
-0.27933815121650696,
-0.36494460701942444,
0.20886002480983734,
-0.012423930689692497,
0.0552423931658268,
-0.5895603895187378,
0.032959405332803726,
0.6306499242782593,
-0.150962695479393,
-0.17274226... | |
I have a small button I want to add to the top left corner of a Delphi TDBGrid component (in the header/title cells). I am able to place the button easily, but now the click event is not handled. I'm guessing the event is being caught by the grid. Any way I can force this specific event to go to the button instead? Not... | [
0.23009149730205536,
-0.15996244549751282,
0.35099923610687256,
-0.17274725437164307,
0.3655034601688385,
-0.4035379886627197,
0.33747461438179016,
-0.025748686864972115,
0.08192744851112366,
-0.7205069661140442,
-0.21087616682052612,
0.5865300893783569,
-0.3142237067222595,
0.398035496473... | |
button1.Width := 12;
button1.Height := 18;
button1.OnClick := Button1Click;
end;
```
\*\*Update:\*\*I've found I was able to use the button's MouseDown event which seems to work well, but I couldn't use the click event.
```
procedure TForm38.Button1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShi... | [
-0.08553802222013474,
-0.13745589554309845,
0.3865838944911957,
-0.3095930516719818,
0.21405450999736786,
0.2973707318305969,
0.6385236978530884,
-0.05640749633312225,
-0.2967849373817444,
-0.6107749342918396,
-0.2497013807296753,
0.8301721215248108,
-0.4854329526424408,
-0.145025610923767... | |
TButton;
if (x > 0) and (x < ctrl.Width) and (y > 0) and (y < ctrl.Height) then
ctrl.Click;
end;
```
If you test a normal button you will see that the click event doesn't happen until you release the mouse. Simulating a click on button down creates odd behavior. | [
0.2016502469778061,
-0.4398455321788788,
0.3502006232738495,
-0.14021486043930054,
0.39120832085609436,
0.1078452542424202,
0.45970022678375244,
-0.06401799619197845,
-0.17319971323013306,
-0.36618271470069885,
-0.12030612677335739,
0.8981314897537231,
-0.6665835976600647,
0.23488692939281... | |
I have a question and hopefully you can steer me in the right direction.
I'm working on an application that needs some form of decision tree/work flow for lack of a better term. I'll describe it below for some clarity.
I have a request form that users will fill out on a web page. At the beginning of the form is a 'Re... | [
0.570767879486084,
-0.0630621388554573,
0.40559911727905273,
0.2896363437175751,
0.015213056467473507,
0.23780858516693115,
0.09214100241661072,
-0.39773303270339966,
-0.14531446993350983,
-0.5924918055534363,
-0.005760015454143286,
0.1557292491197586,
0.048663318157196045,
0.3059194684028... | |
the first group of questions fail..then the form stops processing, etc.
What would be the best approach to handle this? Would WPF work well in this situation?
WPF is the [Windows Presentation Foundation](http://msdn.microsoft.com/en-us/netframework/aa663328.aspx) and is more about the User Interface than a work flow m... | [
0.1935916244983673,
0.014403766952455044,
0.24517428874969482,
0.02806396782398224,
-0.18998229503631592,
0.047664325684309006,
-0.22070938348770142,
-0.30664172768592834,
-0.25890520215034485,
-0.7488837242126465,
0.19278965890407562,
0.41785016655921936,
-0.008160618133842945,
0.08496744... | |
Does anybody know why and/or how to work around this without scraping SWFObject?
Many thanks,
T
EDIT : Sorry, my fault the alowFullScreen param was set to "**true**" instead of "**always**"
WPF is the [Windows Presentation Foundation](http://msdn.microsoft.com/en-us/netframework/aa663328.aspx) and is more about the U... | [
0.3830168545246124,
0.21090678870677948,
0.2835133373737335,
-0.042914364486932755,
-0.24996189773082733,
-0.11644081026315689,
0.14964282512664795,
-0.04615771397948265,
-0.23713290691375732,
-0.5617384314537048,
0.1203361228108406,
0.655350923538208,
0.07345119118690491,
0.01243471633642... | |
For example, I want class fields, method names, and properties to be boldfaced, but I don't want them to be boldfaced inside method bodies. e.g.,
```
public static void **WriteStuff**(string notEvenUsed) {
var x = 0;
Console.WriteLine("Stuff");
}
```
I want WriteStuff to be in bold, but not WriteLine, x, or ... | [
0.29791125655174255,
-0.05904759466648102,
0.29388874769210815,
-0.230375275015831,
-0.058859262615442276,
-0.2585102617740631,
0.3303588330745697,
-0.34117940068244934,
-0.06219983845949173,
-0.5794287323951721,
-0.06335090845823288,
0.6767918467521667,
-0.22593846917152405,
0.03548129647... | |
it would color-code notEvenUsed to show that it's not even used), but they don't currently have an option to bold the declaration only. I've actually already written up a [ReSharper enhancement request](http://www.jetbrains.net/jira/browse/RSRP-98618) for this very feature. Feel free to vote for that enhancement; maybe... | [
0.4096929430961609,
-0.046153321862220764,
0.6988645792007446,
0.19337430596351624,
0.5040422677993774,
-0.2572888433933258,
0.09593216329813004,
-0.08540014922618866,
-0.09038754552602768,
-0.3311261236667633,
-0.037374097853899,
0.7134371995925903,
-0.1453814059495926,
-0.150021150708198... | |
Hoping someone can help me out with this.
Lets say I have a table called incoming\_data with 4 columns:
```
primary_key_id
serial_number
counter
selected_color
```
I get data from a source that fills this table. The primary key has its identity
turned on so it is not repeating. I will get duplicate serial numbers ... | [
0.42202121019363403,
0.21208791434764862,
0.6502004265785217,
0.10628919303417206,
0.1326589286327362,
0.42451390624046326,
0.029464827850461006,
-0.1205226257443428,
-0.6522630453109741,
-0.8485779166221619,
0.28191736340522766,
0.4243871867656708,
-0.5634574890136719,
0.3454747200012207,... | |
incoming_data
GROUP BY serial number
```
This works perfectly, except that I want to do something with the color information
that I received.
If I add color to the select, then I get ALL the records since all
the colors I received that day are different. That wont work.
If I could get the primary\_key\_id of ... | [
0.05362600088119507,
0.09695379436016083,
0.39488014578819275,
-0.061445944011211395,
0.030818413943052292,
0.29591596126556396,
0.023602435365319252,
-0.05883445218205452,
-0.4857252836227417,
-0.8321061730384827,
-0.14998836815357208,
0.6538490056991577,
-0.44398146867752075,
0.188576370... | |
key".
This works in MS SQL Server and later Sybase.
```
SELECT
i.serial_number, i.counter, i.selected_color
FROM
(
SELECT serial_number, MAX(counter) AS maxc
FROM incoming_data
GROUP BY serial number
) max
JOIN
incoming_data i ON max.serial_number = i.serial_number AND max... | [
-0.13091379404067993,
-0.06524741649627686,
0.6796674132347107,
-0.035918667912483215,
0.12177804857492447,
0.038506340235471725,
0.011173468083143234,
-0.3257022798061371,
-0.3025434613227844,
-0.5920999646186829,
-0.3057723045349121,
0.4818606674671173,
-0.2635378837585449,
0.33826231956... | |
If you have a `DataTable` that has a column of some Enum type.
And you bind a `DataGridView` to this `DataTable` (`myDgv.DataSource = myDataTable`)..
How can you make the `DataGridView` show a combobox (or is it drop-down-list? The one where the only thing you can do is select) in each cell of for this column? The co... | [
-0.017428135499358177,
-0.10543841868638992,
0.4124186336994171,
0.18960067629814148,
0.1922406256198883,
-0.09875177592039108,
-0.02813592180609703,
-0.20657342672348022,
-0.15994158387184143,
-0.7843411564826965,
-0.2292366921901703,
0.3810349106788635,
-0.21837426722049713,
0.0613710321... | |
bidding - a tale of ComboBox hackery](http://weblogs.asp.net/cfrazier/archive/2005/12/07/432607.aspx):
> At first I was optimistic about the DataGridView samples (overview)(Download The DataGridView samples), but I didn't see anything that did what I wanted to do: take an enum value and represent it in the grid with a... | [
-0.004550749436020851,
-0.3858054280281067,
0.4766578674316406,
0.18183431029319763,
-0.24745790660381317,
-0.14719818532466888,
0.37263137102127075,
-0.7860602736473083,
-0.002025666879490018,
-0.6470298767089844,
0.2524094879627228,
0.4247192442417145,
-0.2619692385196686,
0.181124836206... | |
enumeration type in a DataGridViewComboBoxColumn so that the combo box drop-down list contains the enumeration values. | [
-0.3258883059024811,
-0.13670498132705688,
0.38133490085601807,
0.17504096031188965,
0.1350744515657425,
-0.15434785187244415,
0.018697090446949005,
-0.30394861102104187,
-0.13010281324386597,
-0.6970745921134949,
-0.4711223840713501,
0.2009439915418625,
-0.28664425015449524,
-0.0589202344... | |
*Trying to search for a more elegant/overall solution to our common/basic data export tasks*
I am convinced that there must be software out there that allows me to:
* Define and persist a "setup" (definition of file format, delimiters, encoding, column names etc) from a GUI
* Run on a schedule/from command line
* Wor... | [
0.39299026131629944,
0.08426015824079514,
0.14309106767177582,
0.10213370621204376,
-0.14855916798114777,
-0.23469920456409454,
0.3899468183517456,
0.142670139670372,
-0.22001595795154572,
-0.6867663860321045,
0.04636271670460701,
0.6823772192001343,
-0.08746713399887085,
-0.20102657377719... | |
did what I wanted to do: take an enum value and represent it in the grid with a combobox. So, here's how I did it.
Also you should check out [How to: Bind Objects to Windows Forms DataGridView Controls](http://msdn.microsoft.com/en-us/library/y0wfd4yz.aspx):
> The following code example demonstrates how to bind a col... | [
0.47134876251220703,
-0.013536454178392887,
0.3213966488838196,
-0.0990014597773552,
-0.03783417493104935,
-0.014223438687622547,
0.3971260190010071,
-0.5309242606163025,
-0.18103444576263428,
-0.5601187944412231,
0.1189918965101242,
0.4389910101890564,
-0.008654310368001461,
-0.0318319760... | |
OK there are absolutely no good articles on the internet that I can find that explain or have code examples on how to create a pivot chart using VBA. I need this because I need the pivot chart to show different results depending on user selection in a form. There are some for Excel but the syntax is different for Acces... | [
0.6331949830055237,
0.3202486038208008,
0.1396462619304657,
-0.0027754490729421377,
-0.3025617003440857,
-0.09134981781244278,
0.3052549362182617,
0.1762993186712265,
-0.37166279554367065,
-0.424418568611145,
0.5606232285499573,
0.24577216804027557,
-0.19723379611968994,
0.1399323791265487... | |
Not that anyone really cares, this only has like 6 views, says a lot for VBA's utter horribleness. Anyway, MSDN had this hidden under "Office XP" instead of under Access, but whatever.
<http://msdn.microsoft.com/en-us/library/aa662945.aspx#> | [
0.48802798986434937,
-0.029341712594032288,
0.26057639718055725,
0.3173663318157196,
-0.13915321230888367,
-0.25381022691726685,
0.2982485592365265,
0.5110282897949219,
-0.3719581067562103,
-0.37262842059135437,
0.11292703449726105,
0.4009248614311218,
0.07694737613201141,
0.28276735544204... | |
I've recently been working on some database search functionality and wanted to get some information like the average words per document (e.g. text field in the database). The only thing I have found so far (without processing in language of choice outside the DB) is:
```
SELECT AVG(LENGTH(content) - LENGTH(REPLACE(con... | [
0.3929412066936493,
0.2006731778383255,
0.5338399410247803,
-0.10284043848514557,
-0.18805621564388275,
-0.10271064937114716,
0.5483501553535461,
-0.07541487365961075,
-0.17730461061000824,
-0.6979308724403381,
-0.07192999869585037,
0.8441150188446045,
-0.19728581607341766,
-0.068674989044... | |
does not account for HTML in the content and the like as well. That's OK for this particular project but again are there better ways?
**Update:** To define what I mean by "better": either more accurate, performs more efficiently, or is more "correct" (easy to maintain, good practice, etc). For the content I have avail... | [
0.19877485930919647,
0.1680060476064682,
0.19574439525604248,
0.1794346421957016,
-0.3165138363838196,
-0.2993713319301605,
0.5300562977790833,
0.12843726575374603,
-0.03628554940223694,
-0.8415104150772095,
0.060437269508838654,
0.701500654220581,
-0.04420289397239685,
-0.427615761756897,... | |
slow. Your best bet to process the data within MySQL is to add a [user defined function](https://dev.mysql.com/doc/extending-mysql/5.7/en/adding-loadable-function.html). If you're going to build a newer version of MySQL anyway, you could also add a [native function](https://dev.mysql.com/doc/extending-mysql/5.7/en/addi... | [
0.0749766007065773,
-0.03264058008790016,
0.3443208336830139,
0.05073520168662071,
-0.16281571984291077,
0.033325958997011185,
0.2740435302257538,
-0.10676693171262741,
-0.16404184699058533,
-0.639583945274353,
-0.17823661863803864,
0.5102347731590271,
-0.24088534712791443,
0.0075806276872... | |
a document is changed?
Example stored function:
```
DELIMITER $$
CREATE FUNCTION wordcount(str LONGTEXT)
RETURNS INT
DETERMINISTIC
SQL SECURITY INVOKER
NO SQL
BEGIN
DECLARE wordCnt, idx, maxIdx INT DEFAULT 0;
DECLARE currChar, prevChar BOOL DEFAULT 0;
SET maxIdx=char_length(s... | [
0.10592027008533478,
-0.038485340774059296,
0.7284629344940186,
-0.2020571082830429,
0.12704123556613922,
0.062069252133369446,
0.28173699975013733,
-0.3011181652545929,
0.07625848799943924,
-0.4511849284172058,
-0.31777751445770264,
0.6360458731651306,
-0.39878448843955994,
0.418894648551... | |
IF NOT prevChar AND currChar THEN
SET wordCnt=wordCnt+1;
END IF;
SET prevChar=currChar;
SET idx=idx+1;
END WHILE;
RETURN wordCnt;
END
$$
DELIMITER ;
``` | [
-0.16881129145622253,
0.17195148766040802,
0.7281074523925781,
-0.4197470545768738,
-0.1046033650636673,
0.12742869555950165,
0.38517704606056213,
-0.020826878026127815,
0.39779919385910034,
-0.3596555292606354,
-0.6254867315292358,
0.7891578078269958,
-0.3249930441379547,
0.51057535409927... | |
I am attempting to implement a custom view. This view should display an image surrounded by a gray, rounded rect border. I can get the image to display fine, as well as the border, however, since the border has rounded corners, I need a way to clear those corners such that they correctly display whatever is behind the ... | [
0.4993014931678772,
0.18607087433338165,
0.5938045978546143,
0.21992212533950806,
0.04714840278029442,
-0.12010195106267929,
0.16115303337574005,
0.05172749236226082,
-0.32783257961273193,
-0.6641641855239868,
0.30661410093307495,
0.5407203435897827,
0.14051733911037445,
0.2360402643680572... | |
create this view?
Here is my current code:
```
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
// Draw the image. This will completely fill the current rect.
[image drawInRect:self.bounds];
// Ensure we draw completely within our bounds instead of straddling it.... | [
0.16682563722133636,
-0.2026333063840866,
0.8261170387268066,
-0.07503955066204071,
-0.18265089392662048,
0.2572106719017029,
0.14300155639648438,
-0.003798646153882146,
-0.009385550394654274,
-0.5511640906333923,
0.13241852819919586,
0.6590157151222229,
-0.16676360368728638,
0.28426188230... | |
CGFloat minx = CGRectGetMinX(rrect);
CGFloat midx = CGRectGetMidX(rrect);
CGFloat maxx = CGRectGetMaxX(rrect);
CGFloat miny = CGRectGetMinY(rrect);
CGFloat midy = CGRectGetMidY(rrect);
CGFloat maxy = CGRectGetMaxY(rrect);
// Draw the rounded rect border.
CGContextSetRGBStrokeColor(context, ... | [
-0.1466539204120636,
-0.30690401792526245,
1.3007209300994873,
-0.17042800784111023,
-0.31416165828704834,
0.6028165817260742,
0.041691068559885025,
-0.41236311197280884,
-0.1942591518163681,
-0.4984104335308075,
0.028813425451517105,
0.6776424646377563,
0.030017780140042305,
0.17319984734... | |
maxy, midx, maxy, radius);
CGContextAddArcToPoint(context, minx, maxy, minx, midy, radius);
CGContextClosePath(context);
CGContextDrawPath(context, kCGPathFillStroke);
}
```
Add the rounded-rect path to the clipping path before drawing the image. | [
-0.05282330885529518,
-0.24416708946228027,
0.7973886728286743,
-0.08563048392534256,
-0.12617269158363342,
0.3881266117095947,
-0.0847647413611412,
-0.09338200092315674,
-0.023328959941864014,
-0.43901219964027405,
-0.17207221686840057,
0.7117767930030823,
-0.1978546530008316,
-0.07489029... | |
Is there a way to dynamically change the LoginUrl of FormsAuthentication? What I have is the whole site protected by FormsAuth, but for some pages in a sub folder, I'd like to take the user to different login page, and have FormsAuth handle the ReturnUrl stuff. Is that possible or do I have to write my own redirect cod... | [
0.022603170946240425,
-0.066282257437706,
0.7320145964622498,
-0.034147653728723526,
0.06450016051530838,
-0.19030320644378662,
0.11767805367708206,
-0.22404178977012634,
-0.48247069120407104,
-0.7624419331550598,
-0.034034062176942825,
0.4123971462249756,
-0.3565900921821594,
-0.093373499... | |
have
```
<deny users="?">
```
What I'd like though, is for ~/Subfolder/Protected3.aspx to be redirected to ~/Subfolder/LogOn2.aspx if the user is anonymous.
I did try putting a stripped down version of web.config at ~/Subfolder/web.config:
```
<?xml version="1.0"?>
<configuration>
<system.web>
<authenti... | [
0.25755012035369873,
0.30602866411209106,
0.6313809156417847,
-0.14129209518432617,
0.13103316724300385,
-0.4724961519241333,
0.44258466362953186,
-0.4846777617931366,
-0.1821030229330063,
-0.7209843993186951,
-0.11717793345451355,
0.3815824091434479,
-0.2841358184814453,
0.136026069521904... | |
It is an error to use a section
> registered as
> allowDefinition='MachineToApplication'
> beyond application level. This error
> can be caused by a virtual directory
> not being configured as an application
> in IIS.
I think making the Subfolder dir an application would cause even more problems at this point, b... | [
0.09546360373497009,
-0.08206993341445923,
0.39204567670822144,
0.01213976088911295,
0.13200630247592926,
-0.3938677906990051,
0.4120304584503174,
-0.2720198929309845,
-0.1708107590675354,
-0.7812314629554749,
-0.331216037273407,
0.19453074038028717,
-0.43124064803123474,
0.276136636734008... | |
also can't define it using a [Location element](http://msdn.microsoft.com/en-us/library/b6x6shw7.aspx), and the [FormsAuthentication.LoginUrl](http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.loginurl.aspx) property is read only.
Hunting around a bit, it looks like your best bet would be... | [
0.03168029710650444,
-0.025413671508431435,
0.5405328273773193,
-0.06918715685606003,
0.15966546535491943,
-0.23383156955242157,
0.4078226685523987,
0.09086933732032776,
-0.286257266998291,
-0.7050526738166809,
-0.3875074088573456,
0.1295648217201233,
-0.13386140763759613,
0.21435306966304... | |
but as you point out, you'd then have more problems, as you'd need to move all the relevant binaries, app\_code, what have you into that sub-folder as well, so it's not really a solution. | [
0.03958236426115036,
0.2346285581588745,
-0.12307044863700867,
0.2320902943611145,
0.2120925486087799,
-0.02662338688969612,
0.15692603588104248,
0.046448878943920135,
-0.2670901119709015,
-0.6122973561286926,
-0.2697928845882416,
0.20629242062568665,
-0.373267263174057,
0.1446968764066696... | |
When a `Control` is docked in a container (like a `Panel`) and is too wide to be shown (so a scroll bar appears), `Control.Width` seems to return the visible width of the Control (the top arrow in the picture).
How do you get the width that the Control "wants" to be? i.e. its full width that you'd see if you didn't ha... | [
-0.09414097666740417,
-0.4198838174343109,
0.6822512149810791,
0.3265332281589508,
0.04594050347805023,
0.016260521486401558,
-0.38653993606567383,
-0.22849787771701813,
-0.5244492888450623,
-0.4071199893951416,
-0.05986073240637779,
0.47608682513237,
-0.018094083294272423,
0.0289814379066... | |
created, and then there is the PreferredSize which is the size the control can fit into so to speak. All controls have these properties and PreferredSize should be the one you're looking for. | [
-0.08036210387945175,
-0.4425617456436157,
0.5781904458999634,
0.4183354377746582,
0.1489873230457306,
-0.10207759588956833,
-0.5632433891296387,
-0.19644363224506378,
-0.1785169541835785,
-0.7700633406639099,
-0.03739798441529274,
0.42653435468673706,
-0.22382155060768127,
0.0464641265571... | |
Does it do anything at all or it is only for documentation. If it is only for documentation, why documentation doesn't document it?
For example, these two static methods of `System.Array`:
```
[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail)]
public static void Copy(Array sourceArray, Array destinati... | [
0.061337802559137344,
-0.0843408927321434,
0.3041330873966217,
0.23352594673633575,
0.2966727614402771,
-0.2357254922389984,
0.041538387537002563,
0.034756582230329514,
-0.19578608870506287,
-0.25861015915870667,
-0.3275482952594757,
0.47992029786109924,
-0.2427179366350174,
-0.03061028383... | |
certain out-of-band exceptions aren't thrown.
[MSDN](https://msdn.microsoft.com/en-us/library/ms228973(v=vs.110).aspx) has some more details. | [
0.10863776504993439,
-0.02972690388560295,
0.0229481253772974,
0.14499978721141815,
0.5016828775405884,
-0.4411778151988983,
0.1344105452299118,
-0.04775519296526909,
-0.32998523116111755,
-0.33129000663757324,
-0.3217010200023651,
0.40308213233947754,
-0.08114275336265564,
-0.308540970087... | |
I am trying to implement my Edit action methods with strongly typed view which receives a custom-shaped ViewModel class. In other words, I want a strongly typed ViewModel which contains the Linq entity that should be edited plus a few other objects that should be displayed in the View.
I can see the view when calling... | [
0.2531556487083435,
0.026044342666864395,
0.41310253739356995,
-0.17308863997459412,
-0.06777527928352356,
0.2126680463552475,
0.005946888588368893,
-0.037730250507593155,
-0.18088547885417938,
-0.49143359065055847,
-0.001088515855371952,
0.668800950050354,
-0.3563471734523773,
0.223563894... | |
public SelectList AccountTypesDropDownBox;
public SelectList CountriesDropDownBox;
public Customer Customer;
}
```
The action method looks as follows:
```
//
// GET: /CustomersController/Edit
public ActionResult Edit(int ID)
{
var model = new CustomersFormViewModel
{
... | [
-0.054070569574832916,
-0.33101993799209595,
0.6107166409492493,
-0.09042960405349731,
0.12000143527984619,
0.06010959669947624,
0.14553594589233398,
-0.014225896447896957,
-0.5805396437644958,
-0.2984777092933655,
-0.5170712471008301,
0.43692469596862793,
-0.2369270771741867,
0.0169553831... | |
CountriesDropDownBox = GetCountries(),
AccountTypesDropDownBox = GetAccountTypes()
};
return View(model);
}
//
// POST: /CustomersController/Edit
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(CustomersFormViewModel model)
{
//THE NEXT LINE THROWS!!!
D... | [
0.27611440420150757,
-0.40198954939842224,
1.1138545274734497,
0.15536367893218994,
0.164334237575531,
-0.26747146248817444,
0.36642196774482727,
0.17277415096759796,
-0.802364706993103,
-0.05220504105091095,
-0.5237367749214172,
0.03370111063122749,
-0.29976195096969604,
0.287709385156631... | |
NewEdit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>
NewEdit</h2>
<%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>
<% using (Html.BeginForm())
{%>
<fieldset>
<legend>Fields</legend... | [
-0.1777229607105255,
-0.34741127490997314,
0.7972239255905151,
-0.060541313141584396,
-0.11965330690145493,
0.05360455438494682,
0.09768687188625336,
-0.44756507873535156,
-0.30180469155311584,
-0.7495136260986328,
-0.19593366980552673,
0.09194151312112808,
-0.08785257488489151,
0.27720826... | |
<%= Html.ValidationMessage("FirstName", "*") %>
</p>
<p>
<input type="submit" value="Save" />
</p>
</fieldset>
<% } %>
<div>
<%=Html.ActionLink("Back to List", "Index") %>
</div>
</asp:Content>
```
I've also tried a POST action method with formValues paramet... | [
-0.10843132436275482,
-0.4518178105354309,
0.753543496131897,
-0.22056901454925537,
-0.5258811712265015,
0.20797774195671082,
0.2961614429950714,
-0.47615957260131836,
-0.34109872579574585,
-0.42245107889175415,
-0.2771691679954529,
0.3031346797943115,
-0.36875632405281067,
-0.329554200172... | |
formValues)
{
CustomersFormViewModel model = new CustomersFormViewModel();
UpdateModel(model);
//THE NEXT LINE STILL THROWS
Debug.Assert(model.Customer!=null);
return View("NewEdit",model);
}
```
The only way I have found so far is to write my own code that grab the posted pa... | [
0.11261791735887527,
-0.161567822098732,
0.9213941097259521,
-0.21525515615940094,
-0.02504017762839794,
0.02089761011302471,
0.40852656960487366,
-0.2773919105529785,
-0.18866363167762756,
-0.6382272839546204,
0.09660335630178452,
0.8425896763801575,
-0.1742619425058365,
0.242444738745689... | |
syntax in the view as tvanfosson suggested, but the problem remains unchanged:
```
<label for="Customer.FirstName">FirstName:</label>
<%= Html.TextBox("Customer.FirstName") %>
<%= Html.ValidationMessage("Customer.FirstName", "*") %>
```
You need to name your fields in accordance with the prefixes in the model... | [
-0.16221046447753906,
-0.020971016958355904,
0.5758785605430603,
-0.11207465082406998,
-0.25820404291152954,
0.22206148505210876,
-0.005110941361635923,
-0.247336283326149,
-0.1158096119761467,
-0.4599084258079529,
-0.19751225411891937,
0.602168083190918,
-0.3126269578933716,
0.07653872668... | |
with the appropriate component and associated property of your model. | [
0.08454243838787079,
0.02851107530295849,
0.4659976661205292,
0.23253200948238373,
0.1787022352218628,
-0.04383202642202377,
-0.2467833161354065,
-0.10516397655010223,
-0.14624668657779694,
-0.4207615554332733,
-0.2042561024427414,
0.682147741317749,
0.11917997151613235,
0.0337588265538215... | |
This question arise while trying to write test cases. Foo is a class within the framework library which I dont have source access to.
```
public class Foo{
public final Object getX(){
...
}
}
```
my applications will
```
public class Bar extends Foo{
public int process(){
Object value = getX();
...... | [
0.32903262972831726,
0.35124778747558594,
0.07270325720310211,
-0.07614673674106598,
0.13579191267490387,
0.28285664319992065,
0.30749019980430603,
-0.38113757967948914,
0.2691662013530731,
-0.8494994044303894,
-0.16119983792304993,
0.49329105019569397,
-0.27802714705467224,
0.378988325595... | |
= new Bar();
int result = bar.process();
...
}
}
```
Is there a way i can use reflection api to set the getX() to non-final? or how should I go about testing?
you could create another method which you could override in your test:
```
public class Bar extends Foo {
protected Object doGetX() {
... | [
0.5980290174484253,
0.08296925574541092,
0.2739141881465912,
-0.3665426969528198,
-0.0029012078884989023,
0.4623672366142273,
0.35349708795547485,
-0.646572470664978,
0.10627061873674393,
-0.7062698006629944,
0.011014547199010849,
0.5067150592803955,
-0.3851662874221802,
0.2724844813346863... | |
Unfortunately an item can only be removed from the stack by "pop". The stack has no "remove" method or something similar, but I have a stack (yes I need a stack!) from which I need to remove some elements between.
Is there a trick to do this?
If you need to remove items that aren't on the top, then you need something ... | [
0.13947221636772156,
0.015423530712723732,
0.33376196026802063,
0.12973053753376007,
0.13279719650745392,
-0.22917293012142181,
0.15695734322071075,
-0.14846736192703247,
-0.4818517565727234,
-0.41435325145721436,
-0.2897467017173767,
0.4450731873512268,
-0.31786099076271057,
0.31740558147... | |
private List<T> items = new List<T>();
public void Push(T item)
{
items.Add(item);
}
public T Pop()
{
if (items.Count > 0)
{
T temp = items[items.Count - 1];
items.RemoveAt(items.Count - 1); | [
0.30566656589508057,
-0.7425966262817383,
0.41711506247520447,
-0.18574796617031097,
-0.07992366701364517,
0.41669130325317383,
0.35297033190727234,
-0.2517111897468567,
-0.3493282198905945,
-0.33998996019363403,
-0.6178044676780701,
0.5107467770576477,
-0.6351367235183716,
0.1749939918518... | |
return temp;
}
else
return default(T);
}
public void Remove(int itemAtPosition)
{
items.RemoveAt(itemAtPosition);
}
}
``` | [
0.1306000053882599,
-0.29276028275489807,
-0.05617206543684006,
-0.2906079888343811,
-0.007893841713666916,
0.16832290589809418,
0.4045616090297699,
-0.1387282758951187,
-0.18866924941539764,
-0.3254563510417938,
-0.5336708426475525,
0.5508237481117249,
-0.5902860164642334,
0.2560996413230... | |
Is there a method to do that? Could it be done with an extension method?
I want to achieve this:
```
string s = "foo".CapitalizeFirstLetter();
// s is now "Foo"
```
A simple extension method, that will capitalize the first letter of a string. As Karl pointed out, this assumes that the first letter is the right one t... | [
0.14307954907417297,
0.06114090606570244,
0.46893978118896484,
-0.3915816843509674,
0.2253410369157791,
0.035779595375061035,
0.2585512399673462,
-0.02201070822775364,
-0.09513077139854431,
-0.32482999563217163,
-0.1038612648844719,
0.38405901193618774,
-0.4149095416069031,
0.1313661932945... | |
also use [System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase](http://msdn.microsoft.com/en-us/library/system.globalization.textinfo.totitlecase.aspx).
The function will convert the first character of **each word** to upper case. So if your input string is `have fun` the result will be `Have Fun`.
```... | [
0.1989675909280777,
-0.10547398030757904,
0.6524649858474731,
0.08643405884504318,
-0.06986210495233536,
0.08326970785856247,
-0.10566870123147964,
0.3249841630458832,
-0.41109374165534973,
-0.31593987345695496,
-0.21105706691741943,
0.6123939156532288,
0.024765998125076294,
0.078650370240... | |
I would like to take the contents of an XML tag and have it displayed flipped both horizontally (mirror image) and vertically (as a column) when viewed through a stylesheet. Is this possible without using random third party libraries?
```
<mytag>Random Data</mytag>
```
XSLT is for transformation. To change presentati... | [
0.4153646230697632,
-0.032238200306892395,
0.32058873772621155,
-0.0068397922441363335,
-0.25402557849884033,
-0.036756955087184906,
-0.14454641938209534,
-0.12724100053310394,
-0.20140743255615234,
-0.7920860648155212,
-0.08029637485742569,
0.49187764525413513,
-0.3365219831466675,
-0.049... | |
We have a setup project that currently adds Project Output's from different visual studio projects. We want to change the packaging system and use a folder with a bunch of deploy files that are prepared for deployment in the setup.
But this means that we need to add the files one by one, and keep adding them on each... | [
0.7494316697120667,
-0.08227645605802536,
0.10994695872068405,
0.03711222484707832,
0.10081537067890167,
-0.3361055552959442,
-0.22294388711452484,
-0.22253796458244324,
-0.32959216833114624,
-0.5172339081764221,
0.06923408061265945,
0.5985627174377441,
-0.12006553262472153,
-0.01986730843... | |
Can you help me with the format of this file? It seems there are some GUIDs associated with each file included.
Does anyone have a better solution on how to do this?
We're not thinking about using a different setup tool right just yet, we just look for a simple solution for the file packaging.
It seems there was... | [
0.6818572878837585,
-0.07949472963809967,
0.0014062179252505302,
0.3586202561855316,
0.19039496779441833,
-0.2911244332790375,
0.02601434662938118,
-0.0191314909607172,
-0.13668255507946014,
-0.6671425104141235,
0.31825631856918335,
0.681441605091095,
-0.03143744543194771,
0.07661281526088... | |
I'm trying to implement a price fallback system in SQL server. I'd like to have a set of increasingly specific prices (eg: by region, store, warehouse, etc.) for a product, that may or may not be defined, and be able to select the most specific prices (ie: the one with most parameters defined) in a report.
For example... | [
0.13446491956710815,
-0.016730111092329025,
0.43246370553970337,
0.04595243185758591,
0.07970640063285828,
0.021177034825086594,
-0.45698854327201843,
0.08801441639661789,
-0.12712086737155914,
-0.49628207087516785,
-0.04605432227253914,
0.3961184620857239,
-0.09622209519147873,
0.58773332... | |
1.0
Foo | 1 | NULL | 2.0
Foo | 1 | 1 | 2.5
Foo | 1 | 2 | 2.3
```
So if I wanted to know the price for product Foo...
* in Region 1, Store 1 = 2.5
* in Region 1, Store 3 = 2.0 *(Store 3 is not defined explicitly in the data, so the result comes from the NULL store | [
0.13449130952358246,
0.14371615648269653,
0.573242723941803,
-0.3611655831336975,
0.03128421679139137,
0.01987675204873085,
0.11382586508989334,
-0.3838806450366974,
0.11826126277446747,
-0.18593043088912964,
-0.11815676838159561,
0.45513489842414856,
-0.2851470708847046,
0.389114141464233... | |
for Region 1)*
* in Region 2, Store 4 = 1.0 *(Region 2 is not defined explicitly in the data, so the result comes from the NULL region)*
For the sake of simplicity, I can assume that the Store is always more specific than the region, and a store can only exist in one region.
A schema for this data would be something ... | [
-0.04215943440794945,
-0.17501136660575867,
0.5423586964607239,
0.10360286384820938,
0.26108506321907043,
0.0062841372564435005,
-0.27678370475769043,
-0.19649021327495575,
-0.1039372906088829,
-0.7081947326660156,
-0.15806402266025543,
0.18002885580062866,
-0.20488175749778748,
0.52258330... | |
Store int NULL,
Price money NOT NULL,
CONSTRAINT PK_Prices PRIMARY KEY CLUSTERED (ID ASC),
CONSTRAINT IX_Prices UNIQUE NONCLUSTERED (Product ASC, Region ASC, Store ASC)
)
```
Aside from crunching this data in code, how can I query this table for a list of effective prices for every product, based on... | [
-0.0344962403178215,
0.06313039362430573,
0.04730306565761566,
-0.04642196372151375,
-0.10055826604366302,
0.6470417380332947,
-0.24063126742839813,
-0.072930246591568,
-0.10066168010234833,
-0.511525571346283,
-0.3471999168395996,
0.6297938823699951,
-0.2880675792694092,
0.523643314838409... | |
JOIN dbo.Prices rg /*Regional price*/
ON rg.Product = @Product AND rg.Region = @Region AND rg.Store IS NULL
LEFT OUTER JOIN dbo.Prices st /*Store price*/
ON rg.Product = @Product AND rg.Region = @Region AND rg.Store = @Store
WHERE gn.Product = @Product
AND gn.Region IS NULL AND gn.Store IS NULL
```
T... | [
-0.22303706407546997,
0.030318565666675568,
0.7824673652648926,
-0.27815499901771545,
-0.32497361302375793,
0.2686919867992401,
0.19458982348442078,
-0.46638256311416626,
0.060821518301963806,
-0.7735840082168579,
-0.5365738272666931,
0.36719363927841187,
0.13403740525245667,
0.79620343446... | |
Let us say for a moment that C# allowed multiple return values in the most pure sense, where we would expect to see something like:
```
string sender = message.GetSender();
string receiver = message.GetReceiver();
```
compacted to:
```
string sender, receiver = message.GetParticipants();
```
In that case, I do no... | [
-0.2551283836364746,
-0.24298061430454254,
0.2334906905889511,
0.0163645688444376,
-0.0622454471886158,
-0.1654920130968094,
0.09892883896827698,
-0.10646732896566391,
-0.2593211829662323,
-0.3756508529186249,
-0.12744909524917603,
0.6727921366691589,
-0.45638030767440796,
0.05076070502400... | |
= message.GetParticipants(out receiver);
```
where the argument to GetParticipants is an **out** string parameter. However, this is a bit different than the above because it means I have to preempt with, or at least go back and write, code that creates a variable to hold the result of the out parameter. This is a lit... | [
-0.10128150880336761,
0.05747649818658829,
0.21636496484279633,
-0.22860901057720184,
-0.18631935119628906,
0.04914826899766922,
0.31228184700012207,
-0.08654843270778656,
-0.1606801599264145,
-0.011624837294220924,
-0.01782115362584591,
0.4154830873012543,
-0.4640447497367859,
-0.01895668... | |
were doing something like:
```
string sender = message.GetParicipants(out string receiver);
```
to show that receiver was being declared and assigned on the spot.
No, there isn't currently any syntactic sugar around this. I haven't heard of any intention to introduce any either.
I can't say I use `out` parameters o... | [
0.3365648686885834,
0.08015657961368561,
0.03448101505637169,
-0.032284729182720184,
-0.42458221316337585,
-0.09336637705564499,
0.2916215658187866,
0.3237547278404236,
-0.18498176336288452,
-0.3830147683620453,
-0.1617099642753601,
0.024668965488672256,
-0.4487941861152649,
0.134846329689... | |
How do I create a datetime in Python from milliseconds? I can create a similar `Date` object in Java by [`java.util.Date(milliseconds)`](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html).
> Allocates a Date object and initializes it to represent the specified number of milliseconds since the standard base... | [
0.199333056807518,
0.08603920787572861,
0.5630326867103577,
-0.056194741278886795,
-0.0036138303112238646,
0.22675997018814087,
-0.23760618269443512,
0.07237040251493454,
-0.19071179628372192,
-0.4844844341278076,
0.21893079578876495,
0.10581759363412857,
-0.00862245261669159,
0.3559710681... | |
I have a table with columns id, a, and b.
a+b should be unique, but this is a legacy database that is not constrained correctly. How can I get a set of ids for records in which a+b is not unique?
If I have
```
ID A B
1 2 3
2 2 3
3 1 3
4 1 4
```
Then I want to get records 1 and 2 back from the query.
```
sele... | [
0.1500077247619629,
0.3170974552631378,
0.24459487199783325,
-0.05642743781208992,
-0.019625822082161903,
0.1860092431306839,
-0.039793796837329865,
-0.6073544025421143,
-0.4333682656288147,
-0.5984724760055542,
0.21443796157836914,
0.19084595143795013,
-0.3618465065956116,
0.4416587352752... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.