text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
<mx:DataGridColumn>
<mx:itemRenderer>
<mx:Component>
<local:YourRenderer />
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
``` | [
-0.49049773812294006,
-0.15081746876239777,
0.7728630304336548,
0.03155682608485222,
-0.49777674674987793,
0.3451040983200073,
-0.1778378039598465,
-0.14541120827198029,
-0.45213958621025085,
-0.47596266865730286,
-0.3027556538581848,
0.342774361371994,
-0.3247249126434326,
0.0198352858424... | |
I'm using the ICSharpcode text editor, and I am looking for a way to do Word Wrap in it. Is there any documentation for this other than the source code? My only documentation so far has been the [Code Project article](http://www.codeproject.com/KB/edit/TextEditorControl.aspx), and the source code for [Kaxaml](http://ww... | [
0.12033918499946594,
0.13951808214187622,
0.2692970931529999,
-0.12861992418766022,
-0.5057549476623535,
-0.1155029907822609,
0.42362064123153687,
-0.06000713258981705,
-0.027390161529183388,
-0.35044774413108826,
-0.02987424097955227,
0.4626842737197876,
-0.10732558369636536,
0.1526995748... | |
order to implement support for word wrapping yourself, you're gonna have to jump through a lot of hoops. And these hoops will all be on fire. If you ***really*** need this, in SharpDevelop 3, a good place to look for the code to word-wrap is [DeveloperFusion](http://www.developerfusion.co.uk/show/4646/) as Jon T sugges... | [
0.2932044267654419,
-0.06168058514595032,
-0.06053599342703819,
-0.0036042812280356884,
0.06012200936675072,
-0.19965623319149017,
0.4917248487472534,
0.3027218282222748,
0.07033079862594604,
-0.5425535440444946,
-0.09825579822063446,
0.3884935975074768,
0.002988790860399604,
-0.2015325278... | |
Hy,
I'm writing a class which should help me in unit tests. The class offers methods to perform Assertions on Exceptions.
Until now I was able to write methods which take a function with no parameters and no return value as input. To do this I use the System.Action - delegates.
My class looks like this:
```
interna... | [
0.16886362433433533,
0.22501814365386963,
-0.03725934401154518,
0.06062886491417885,
-0.11016227304935455,
0.06310587376356125,
0.2040218561887741,
-0.37271106243133545,
-0.28712570667266846,
-0.3309875726699829,
-0.1483042985200882,
0.4959965944290161,
-0.17751677334308624,
0.051641765981... | |
return type void!
/// </para>
/// </summary>
/// <typeparam name="TException">The type of exception expected.</typeparam>
/// <param name="methodToExecute">The method to execute.</param>
public static void Throws<TException>(Action methodToExecute) where TException : System.Exception
{
t... | [
0.2015186995267868,
-0.23202072083950043,
0.22884228825569153,
-0.06633026897907257,
-0.11534406989812851,
0.4602735936641693,
0.3869362771511078,
-0.866102933883667,
-0.20873281359672546,
-0.16590102016925812,
-0.301683247089386,
0.4493773877620697,
-0.5079566240310669,
-0.166392788290977... | |
{
Assert.IsTrue(e.GetType() == typeof(TException), "Expected exception of type " + typeof(TException) + " but type of " + e.GetType() + " was thrown instead.");
return;
}
Assert.Fail("Expected exception of type " + typeof(TException) + " but no exception was thrown.");
}
```... | [
-0.0695415735244751,
-0.13400420546531677,
0.3803308308124542,
-0.19697372615337372,
-0.04319513961672783,
0.132047638297081,
0.5496515035629272,
-0.7423950433731079,
0.1379317343235016,
-0.4744616448879242,
-0.17540928721427917,
0.8306308388710022,
-0.14034231007099152,
-0.167265027761459... | |
with arguments and return values. As I understand the generic Func should serve this. And the method signature should be like this:
```
public static void Throws<TException>(Func<T, TResult> methodToExecute, T methodArgument) where TException : System.Exception
```
But this will not compile. I always have to write a... | [
0.28811943531036377,
0.05654483288526535,
0.13127407431602478,
-0.06858514994382858,
-0.3145068883895874,
-0.2532802224159241,
0.16765329241752625,
-0.23300574719905853,
-0.02000642754137516,
-0.2271493375301361,
-0.07980475574731827,
0.5952632427215576,
-0.5162412524223328,
0.110470212996... | |
name="T">The type of the input arguments.</typeparam>
/// <typeparam name="TResult">The type of the result.</typeparam>
/// <remarks>
/// The standard test framework has an Attribute called <see cref="ExpectedExceptionAttribute">ExpectedExceptionAttribute</see>. This attribute has two
/// main disadvantages:
/// <para>... | [
0.12086201459169388,
-0.1637832075357437,
0.11591203510761261,
-0.03738529980182648,
-0.4233143627643585,
0.1840638667345047,
0.4541882574558258,
-0.6338076591491699,
-0.14251385629177094,
-0.5307921171188354,
-0.10063716769218445,
0.38463789224624634,
0.06132415309548378,
0.05946123972535... | |
class can be used like the common assertions. You can test a method at a specific line in the test for a specific exception.
/// </remarks>
internal static class ExceptionAssert<T,TResult>
{
/// <summary>
/// Checks to make sure that the input delegate throws a exception of type TException.
/// <para>
/... | [
0.23399028182029724,
-0.22270657122135162,
-0.12727293372154236,
0.3064073622226715,
-0.3191831409931183,
0.1237901896238327,
0.30397242307662964,
-0.3226718306541443,
-0.00985451228916645,
-0.4308842420578003,
-0.04697348549962044,
0.4033051133155823,
-0.29191434383392334,
0.0933865681290... | |
method to execute.</param>
public static void Throws<TException>(Action methodToExecute) where TException : System.Exception
{
try
{
methodToExecute();
}
catch (Exception e)
{
Assert.IsTrue(e.GetType() == typeof(TException), "Expected exception of ... | [
0.13303697109222412,
-0.43997102975845337,
0.28244274854660034,
-0.13737405836582184,
0.18661272525787354,
0.20141911506652832,
0.5269759893417358,
-0.7094799876213074,
0.09222159534692764,
-0.18998731672763824,
-0.26248598098754883,
0.5596191883087158,
-0.5029487013816833,
-0.124663673341... | |
+ e.GetType() + " was thrown instead.");
return;
}
Assert.Fail("Expected exception of type " + typeof(TException) + " but no exception was thrown.");
}
/// <summary>
/// Checks to make sure that the input delegate throws a exception of type TException with a specific exception m... | [
0.18734210729599,
-0.15047158300876617,
-0.04719819128513336,
-0.18295016884803772,
-0.09545682370662689,
-0.06430163234472275,
0.677444338798523,
-0.7469854950904846,
-0.11714150011539459,
-0.35770025849342346,
-0.4032405614852905,
0.5114263892173767,
-0.4940560758113861,
-0.0686165243387... | |
return type void!
/// </para>
/// </summary>
/// <typeparam name="TException">The type of exception expected.</typeparam>
/// <param name="expectedMessage">The expected exception message.</param>
/// <param name="methodToExecute">The method to execute.</param>
/// <remarks>
/// This method a... | [
0.01821080781519413,
-0.022232282906770706,
0.2967405319213867,
-0.21920204162597656,
-0.32916542887687683,
0.48780715465545654,
0.28502610325813293,
-0.8459610939025879,
-0.09588246047496796,
-0.41857197880744934,
-0.19825544953346252,
0.3566334843635559,
-0.3973838686943054,
-0.191983699... | |
{
methodToExecute();
}
catch (Exception e)
{
Assert.IsTrue(e.GetType() == typeof(TException), "Expected exception of type " + typeof(TException) + " but type of " + e.GetType() + " was thrown instead.");
Assert.AreEqual(expectedMessage, e.Message, "Expected ex... | [
-0.10419387370347977,
-0.5041630864143372,
0.2773892879486084,
-0.20612399280071259,
0.032563962042331696,
0.049699071794748306,
0.6904907822608948,
-0.7602234482765198,
0.1365477293729782,
-0.16547535359859467,
-0.07329931110143661,
0.5690229535102844,
-0.33499675989151,
-0.15618968009948... | |
+ "' but exception with message of '" + e.Message + "' was thrown instead.");
return;
}
Assert.Fail("Expected exception of type " + typeof(TException) + " but no exception was thrown.");
}
/// <summary>
/// Checks to make sure that the input delegate throws a exception of type T... | [
0.1071801632642746,
-0.14528939127922058,
-0.14768089354038239,
-0.1538071632385254,
-0.18239247798919678,
-0.03191131725907326,
0.6036465167999268,
-0.7466452717781067,
-0.31549760699272156,
-0.36575108766555786,
-0.3678257167339325,
0.4708358347415924,
-0.3220629394054413,
-0.01612554490... | |
must be a method with ONE parameter and return type!
/// </para>
/// </summary>
/// <typeparam name="TException">The type of the exception.</typeparam>
/// <param name="methodToExecute">The method to execute.</param>
/// <param name="argument">The argument to input.</param>
public static void Th... | [
0.19715838134288788,
-0.006308459211140871,
0.2723064124584198,
0.12262333929538727,
-0.12126702815294266,
0.2884639799594879,
0.29953885078430176,
-0.877262532711029,
-0.1337750405073166,
-0.17798760533332825,
-0.3375573754310608,
0.2764546275138855,
-0.39634451270103455,
-0.0240103676915... | |
methodToExecute(argument);
}
catch (Exception e)
{
Assert.IsTrue(e.GetType() == typeof(TException), "Expected exception of type " + typeof(TException) + " but type of " + e.GetType() + " was thrown instead.");
return;
}
Assert.Fail("Expected exception of t... | [
0.030188968405127525,
-0.4034169614315033,
0.347313791513443,
-0.10823691636323929,
0.14494864642620087,
0.1512579619884491,
0.5972214937210083,
-0.8108569383621216,
0.21848870813846588,
-0.06043940782546997,
-0.027570905163884163,
0.5461565852165222,
-0.37115949392318726,
-0.0397033430635... | |
exception was thrown.");
}
}
```
You should "declare" T and TResult as well, e.g.
```
public static void Throws<T, TResult, TException>(Func<T, TResult> methodToExecute, T methodArgument) where TException : System.Exception
```
otherwise the compiler does not know what T and TResult are. | [
0.15482182800769806,
-0.10905638337135315,
0.029051857069134712,
-0.1371593475341797,
-0.024413304403424263,
-0.21951568126678467,
0.47902390360832214,
-0.25312358140945435,
-0.15092143416404724,
-0.26113975048065186,
-0.23818013072013855,
0.4261237382888794,
-0.2179137021303177,
0.0983733... | |
I'm using sqlite as a datasource in an iPhone app. I have two questions regarding application upgrades.
1.) The data is all config/nontransactional. Meaning, it is readonly. When I update/add config data, I'll issue an upgrade for the app. When a user gets an updated iPhone app, does the original get uninstalled? If t... | [
0.20490506291389465,
0.2755090594291687,
0.35552579164505005,
0.0537882037460804,
0.046519968658685684,
-0.1299837976694107,
0.1657664179801941,
-0.19383975863456726,
-0.06327849626541138,
-0.6444758176803589,
-0.049583178013563156,
0.6363474130630493,
-0.30097949504852295,
0.0116352280601... | |
of the app, I want to maintain their existing data but replace all config data. I'm guessing I'd need to have INSERT and UPDATE scripts stored within the app to accomplish this. What is an efficient way to go about it?
cdespinosa has described scenario #1 well, so I'll tackle #2.
I haven't done this on the iPhone yet,... | [
0.11667178571224213,
0.03631103038787842,
0.3922640085220337,
0.23731495440006256,
0.4262581765651703,
0.05769319087266922,
-0.11108225584030151,
0.17971734702587128,
-0.2925020754337311,
-0.7801051139831543,
-0.011265755631029606,
0.7835229635238647,
-0.26408031582832336,
-0.2793122231960... | |
change. Then `sqlite3_exec` an `ATTACH` statement, which looks like this:
```
ATTACH 'filepath' AS config;
```
From then on, you can do something like this:
```
SELECT * FROM UserTableName;
SELECT * FROM config.ConfigurationTableName;
```
It's my understanding that if you write to the configuration database the a... | [
0.1525728404521942,
0.07334911078214645,
0.8177827000617981,
-0.13838256895542145,
0.26356565952301025,
-0.2653595805168152,
0.050236184149980545,
-0.19841141998767853,
-0.08038914948701859,
-0.6496872305870056,
-0.13315603137016296,
0.7733327746391296,
-0.48125410079956055,
0.004162922501... | |
one database to another. But if you're already copying the entire configuration database to your sandbox... and you should be... then that's just an extra step. Just attach.)
I hope someone else can provide you with more details. :) | [
0.5948546528816223,
-0.037192489951848984,
0.18588125705718994,
0.502937912940979,
0.6742188930511475,
-0.17995066940784454,
-0.18010005354881287,
0.12017460912466049,
-0.20447500050067902,
-0.9060966968536377,
-0.0005000832607038319,
0.5189689993858337,
-0.2991994321346283,
0.009924412705... | |
I am writing an administrative script, and I need to calculate the size of files on disk.
These files are on a compressed NTFS volume.
I can't use `FileInfo.Length`, because that is file size and not size on disk. For example, if I have a 100MB file, but it is only using 25MB due to NTFS compression, I need my scrip... | [
0.25222548842430115,
0.00292104110121727,
0.32023754715919495,
0.040713030844926834,
0.12706884741783142,
-0.15346211194992065,
0.07044818252325058,
-0.26478004455566406,
-0.3875667154788971,
-0.8991925716400146,
0.07986097782850266,
0.5491998791694641,
-0.18682487308979034,
0.241716399788... | |
"script property") to the Fileobject, so now, I can use the syntax: $theFileObject.CompressedSize to read the size.
(end of edit)
Read Goyuix's response, and I thought "Cool, but isn't there some kind of type-extension capability in Powershell?". So then I found this Scott Hanselman post: <http://www.hanselman.com/bl... | [
0.08950459212064743,
-0.18319039046764374,
0.397420734167099,
0.03645988926291466,
-0.24128861725330353,
-0.2178879976272583,
-0.18444490432739258,
-0.14435091614723206,
-0.15152697265148163,
-0.7684553861618042,
0.047563955187797546,
0.4707232117652893,
-0.09755279868841171,
0.03035089559... | |
directory (Documents\WindowsPowershell)
Next, I created a file in my profile directory named My.Types.ps1xml.
I put the following XML into the file:
```
<Types>
<Type>
<Name>System.IO.FileInfo</Name>
<Members>
<ScriptProperty>
<Name>CompressedSize</Name>
<GetScriptBlock>
... | [
-0.08543161302804947,
0.0024236489553004503,
0.7327417135238647,
-0.16570612788200378,
0.03808370977640152,
0.1865929365158081,
-0.19125059247016907,
-0.2552318871021271,
-0.21001173555850983,
-0.8904784321784973,
0.1036246120929718,
0.29484856128692627,
-0.3693736493587494,
0.030057674273... | |
property named CompressedSize to the FileInfo objects that are returned by get-childitem/dir. But Powershell doesn't know about the code yet, and it doesn't know about my DLL yet. We handle that in the next step:
Edit Profile.ps1. in the same directory. Now, my Profile file happens to already have some stuff in it bec... | [
0.3075008690357208,
-0.20405460894107819,
0.5022066235542297,
0.07667651027441025,
0.09383317828178406,
-0.2960474193096161,
0.12372531741857529,
-0.09037464112043381,
-0.22480300068855286,
-1.0155314207077026,
-0.041692160069942474,
0.48405921459198,
-0.1374354511499405,
0.102528154850006... | |
enable the GetCompressedFileSize method. this method is used by the
#PSCompressedSize Script Property attached to the FileInfo object.
$null = [System.Reflection.Assembly]::LoadFile("$ProfileDir\ntfs.extendedfileinfo.dll")
#merge in my extended types
$profileTypes = $ProfileDir | join-path -childpath "My.Types.ps1xm... | [
0.28393855690956116,
-0.07644704729318619,
0.8923114538192749,
-0.15410670638084412,
0.41488519310951233,
0.14484725892543793,
0.1341315656900406,
-0.38102006912231445,
-0.09567335993051529,
-1.0291273593902588,
-0.010844815522432327,
0.7023319005966187,
-0.4008729159832001,
-0.04805830121... | |
hear whether it fits in with best practices. One thing I know I'm doing wrong: in the Profile.ps1 file, I return the results of LoadFile into a variable that I'm not going to use ($null = blah blah). I did that to suppress the display of result of load file to the console. There is probably a better way to do it. | [
0.4216095209121704,
0.10139752924442291,
0.4024572968482971,
-0.19933784008026123,
0.046555131673812866,
-0.07045086473226547,
0.3710262179374695,
0.1121460348367691,
-0.17399191856384277,
-0.7798605561256409,
0.10399065911769867,
0.6729379892349243,
-0.053725775331258774,
0.11169362813234... | |
Was doing some benchmarking with IsNumeric today and compared it to the following function:
```
Private Function IsNumeric(ByVal str As String) As Boolean
If String.IsNullOrEmpty(Str) Then Return False
Dim c As Char
For i As Integer = 0 To Str.Length - 1
c = Str(i)
If Not Char.IsNumber(c) ... | [
-0.023603064939379692,
-0.24123916029930115,
0.7212883234024048,
-0.23557287454605103,
-0.014389248564839363,
-0.04979632794857025,
-0.030782055109739304,
-0.19495442509651184,
-0.1692506968975067,
0.08423709124326706,
0.049177538603544235,
0.728904664516449,
-0.1225738450884819,
0.1639865... | |
IsNumeric(), and with an empty or non-numeric value it was 1000-1500 times faster.
What is taking IsNumeric so long? Is there something else going on under the hood that I should consider before replacing it with the function above?
I use IsNumeric in about 50 different places all over my site, mostly for validation o... | [
-0.08283928781747818,
-0.18974369764328003,
0.5429856777191162,
0.1419021189212799,
-0.2089148610830307,
0.0940694510936737,
0.059506360441446304,
0.12927012145519257,
-0.08619731664657593,
-0.4038321375846863,
0.3236248195171356,
0.36737415194511414,
-0.08433791995048523,
-0.1113615557551... | |
I have an SSIS package to load data; as you may recall there are flags that are in data files as Y/N char(1) when I am trying to load them as bit flags into SQL Server. I am specifying the columns in the data file as `String [DT_STR]` and I have a data conversion task to convert them to booleans based on the following ... | [
0.11541260033845901,
0.15979501605033875,
0.3821873068809509,
-0.4035870134830475,
-0.24307133257389069,
-0.014510591514408588,
0.3904885947704315,
-0.37462031841278076,
0.04094454646110535,
-0.7414194345474243,
-0.028172357007861137,
0.5986352562904358,
-0.4318329691886902,
0.039176877588... | |
gives an error and tells me `Invalid character value for cast specification` and `The value could not be converted because of a potential loss of data` on the actual import to SQL Server (via an OLE DB Destination).
What am I missing here to get it to properly convert?
I was able to solve it by using a derived column ... | [
0.27737149596214294,
0.18919821083545685,
0.0042339046485722065,
-0.021851588040590286,
-0.17438918352127075,
0.2576562464237213,
0.32818901538848877,
-0.33432281017303467,
0.22980192303657532,
-0.413237988948822,
0.3431800901889801,
0.5212867259979248,
-0.2544116973876953,
0.1521680355072... | |
Is there a way to get a site's (site collection) site directory, the one which is defined within the web site collection setting of a collaboration or publishing portal?
Of course I could iterate through all the SPWebs of the site collection but I hope there's a easier way to get the directory as the information seems... | [
0.628450870513916,
-0.10773485153913498,
0.6314600110054016,
0.40339395403862,
0.04511161893606186,
-0.3379570543766022,
0.08988722413778305,
0.2672601044178009,
-0.03929128125309944,
-0.6172357201576233,
0.15798909962177277,
0.6391214728355408,
0.11140836775302887,
0.13632722198963165,
... | |
string GetLocalSiteDirectoryLocation(SPWeb rootWeb)
{
if (rootWeb != null)
{
if (rootWeb.AllProperties.ContainsKey("DefaultSiteDirectorySiteId"))
{
string str = rootWeb.AllProperties["DefaultSiteDirectorySiteId"] as string;
if (string.IsNullOrEmpty(str))
{
... | [
-0.2955341637134552,
-0.33411648869514465,
0.82286536693573,
-0.12936826050281525,
0.22342319786548615,
-0.005243365652859211,
0.6002213954925537,
-0.20192863047122955,
-0.15094155073165894,
-0.37162041664123535,
-0.5632784366607666,
0.4191455543041229,
-0.4210713505744934,
0.0599476546049... | |
}
if (!rootWeb.AllProperties.ContainsKey("DefaultSiteDirectoryWebId"))
{
return string.Empty;
}
string str2 = rootWeb.AllProperties["DefaultSiteDirectoryWebId"] as string;
if (string.IsNullOrEmpty(str2))
{ | [
-0.37005743384361267,
-0.07984186708927155,
0.3920566439628601,
-0.42860087752342224,
0.41622394323349,
-0.07352231442928314,
0.5938235521316528,
-0.28670480847358704,
-0.06287888437509537,
-0.3511736989021301,
-0.3306584656238556,
0.5607483983039856,
-0.27601316571235657,
0.22450408339500... | |
return string.Empty;
}
try
{
using (SPSite site = new SPSite(new Guid(str), rootWeb.Site.Zone))
{ | [
-0.07598891109228134,
-0.42078277468681335,
0.3615787625312805,
-0.20277774333953857,
0.2656749486923218,
0.026588883250951767,
0.7510431408882141,
-0.09490995854139328,
-0.09838665276765823,
-0.6689191460609436,
-0.19788865745067596,
0.12644848227500916,
-0.3266317546367645,
0.11617048829... | |
using (SPWeb web = site.OpenWeb(new Guid(str2)))
{
return web.ServerRelativeUrl;
}
} | [
0.02169424667954445,
-0.14899581670761108,
0.818078339099884,
-0.34047332406044006,
-0.2231210321187973,
-0.14556990563869476,
0.4665164649486542,
-0.3447595536708832,
-0.42605507373809814,
-0.6929325461387634,
-0.24807383120059967,
0.26996055245399475,
-0.4586985111236572,
0.1492418050765... | |
}
catch (FileNotFoundException)
{
return string.Empty;
}
}
else
{
return string.Empty; | [
0.09606394171714783,
-0.5427964329719543,
0.16481979191303253,
-0.3686141073703766,
0.20364107191562653,
-0.19503475725650787,
0.12558479607105255,
-0.06724430620670319,
-0.09925560653209686,
-0.17403581738471985,
-0.26372891664505005,
0.6469128131866455,
-0.44672396779060364,
0.1573822349... | |
}
}
return string.Empty;
}
``` | [
-0.20931991934776306,
0.20835494995117188,
-0.018357694149017334,
-0.31807464361190796,
0.2987893521785736,
-0.22295767068862915,
0.36632239818573,
0.243007093667984,
0.16575422883033752,
-0.285262793302536,
-0.4288022220134735,
0.7329611778259277,
-0.47199922800064087,
0.3266749083995819,... | |
I have a program that segfaults from pointer arithmetic sometimes. I know this happens, but I can't easily check ahead of time to see whether it segfaults or not - either I can "pre-scan" input data to see if it will cause a segfault (which can be impossible to determine), or I can refit it to not use pointer arithmeti... | [
0.19560295343399048,
-0.03639385849237442,
-0.06874363124370575,
-0.07767744362354279,
-0.12131016701459885,
-0.2934770882129669,
0.4240579605102539,
-0.06139511987566948,
-0.2789335250854492,
-0.4032476842403412,
-0.18123793601989746,
0.38519659638404846,
-0.27753856778144836,
-0.32613795... | |
a C program do in the event that it segfaults to die a bit more gracefully than just `Segmentation fault`?
2) How portable is this?
I imagine this is a highly unportable behavior, so if you post any code to catch a segfault, please tell me what it works on. I'm on Mac OS X but I'd like my program to work on as many p... | [
0.31737950444221497,
0.19990883767604828,
-0.06919877231121063,
0.0626588985323906,
0.060798339545726776,
-0.33275410532951355,
0.09789369255304337,
0.1824338585138321,
-0.12861400842666626,
-0.5454164743423462,
-0.04593464359641075,
0.5184864401817322,
-0.1535128802061081,
0.0069761984050... | |
I'm not planning on just ignoring all segfaults I get and plowing ahead.
You have to define a signal handler. This is done on Unix systems using the function [`sigaction`](http://opengroup.org/onlinepubs/007908775/xsh/sigaction.html). I've done this with the same code on Fedora 64- and 32-bit, and on Sun Solaris. | [
0.41120684146881104,
-0.42261001467704773,
0.2703590989112854,
-0.23000632226467133,
-0.24885283410549164,
-0.2712775766849518,
0.0696057453751564,
-0.07113569229841232,
-0.12350478023290634,
-0.5534732937812805,
0.027454830706119537,
0.5795662999153137,
-0.3822956383228302,
-0.32145151495... | |
We have an application that behaves really badly in IE6, the application relies heavily on javascript and most of the activity happens in one page.
In IE6, it seems that memory keeps piling up and never gets cleared even when you navigate to a different site!
Since there's not so little code running within the browse... | [
0.16742148995399475,
0.17364133894443512,
0.12006714940071106,
0.279605895280838,
0.026914561167359352,
-0.3185710906982422,
0.2151772826910019,
0.1893266886472702,
-0.1949291229248047,
-0.8277417421340942,
0.20320069789886475,
0.5129548907279968,
-0.2046472728252411,
0.114974744617939,
... | |
of drip - <http://home.wanadoo.nl/jsrosman/> | [
0.21099616587162018,
0.041917987167835236,
0.5725975036621094,
-0.10119844973087311,
0.1854526847600937,
-0.0002510693157091737,
0.13265293836593628,
-0.42888596653938293,
-0.33084994554519653,
0.03691830858588219,
0.17204686999320984,
0.20027069747447968,
-0.23864717781543732,
0.337703734... | |
I've used Spring before (and like it), but thought I'd take a look at [Guice](http://code.google.com/p/google-guice/).
Is there a way to initialize something like maps or lists into beans using Guice?
For instance, I've done the following before in Spring to inject a list of items I want to process into some bean.
`... | [
-0.07383636385202408,
-0.17676955461502075,
0.07483591139316559,
-0.1949145644903183,
-0.35132575035095215,
-0.03365352004766464,
-0.24096132814884186,
-0.17759190499782562,
-0.7539622783660889,
-0.8007252812385559,
0.10268086194992065,
0.3443904519081116,
-0.26331454515457153,
-0.46982043... | |
values into Guice, perhaps as arbitrary objects.
Guice is very focused around doing everything as typesafe code, so it doesn't lend itself
naturally to this. What I've done to provide input to Guice is to create an XML schema and use jaxb to suck this in and inject the resulting objects.
There is a Names.bindProperti... | [
0.16474637389183044,
-0.020795471966266632,
0.14645476639270782,
0.1827690154314041,
-0.040119800716638565,
-0.10739455372095108,
-0.10536476224660873,
-0.16093288362026215,
-0.11178804934024811,
-0.40999361872673035,
0.18261662125587463,
0.7057719826698303,
-0.32498544454574585,
-0.048572... | |
In a `WebBrowser` control, how do I remove `HtmlElement` objects? There are no methods in the `HtmlElement` class to accomplish this. As a workaround, I can create a "dummy" `HtmlElement` (without inserting it into the `HtmlDocument`), into which I then insert (via `AppendChild`) the `HtmlElement` objects to be removed... | [
0.4771106243133545,
-0.05445191636681557,
0.4219048321247101,
0.25489526987075806,
-0.01333337090909481,
-0.21077510714530945,
0.360641211271286,
-0.16493107378482819,
0.14586322009563446,
-0.4899875521659851,
0.021829305216670036,
0.5416275858879089,
-0.38862866163253784,
0.15798541903495... | |
could add a remove method to del element by id.
Hope this helps | [
0.19790373742580414,
-0.30570659041404724,
0.04769626259803772,
0.26764678955078125,
0.08126173913478851,
-0.39903688430786133,
0.19708558917045593,
0.03732014074921608,
-0.11177248507738113,
-0.5083178877830505,
0.05519459769129753,
0.40358999371528625,
0.05624043941497803,
-0.03430997952... | |
How can you get the contents of a text file while preserving whether or not it has a newline at the end of the file? Using this technique, it is impossible to tell if the file ends in a newline:
```
BufferedReader reader = new BufferedReader(new FileReader(fromFile));
StringBuilder contents = new StringBuilder();
Str... | [
-0.0513075552880764,
-0.2252824455499649,
0.5976753234863281,
-0.232351616024971,
0.10715021193027496,
-0.10060541331768036,
0.2872166037559509,
-0.43645593523979187,
-0.35876139998435974,
-0.7103109359741211,
-0.32860806584358215,
0.4144233167171478,
-0.2601787745952606,
0.25086709856987,... | |
long count = 0;
int n = 0;
while ((n = input.read(buffer))>=0) {
output.write(buffer, 0, n);
count += n;
}
return count;
```
} | [
0.09045206010341644,
-0.21075201034545898,
0.3613213896751404,
-0.4748830199241638,
0.3590049147605896,
0.07667075842618942,
0.2619393467903137,
-0.44115757942199707,
-0.06826536357402802,
-0.1287364810705185,
-0.33562135696411133,
0.3882254958152771,
-0.4129173457622528,
0.250445723533630... | |
I'm very new to ASP.NET MVC, but even more than that, I'm very new to web development in general. What I want to do is simple. I have a folder in my MVC project called /Content/Images where I have some images. I'd like for my controller to grab all the images in this folder, and send them to the view. The view will the... | [
0.5604088306427002,
-0.17033903300762177,
0.2970309555530548,
0.09947652369737625,
-0.07216376066207886,
-0.16831231117248535,
0.1283748298883438,
0.2028665542602539,
-0.29084548354148865,
-0.9600265026092529,
0.017280660569667816,
0.49861061573028564,
-0.09477254003286362,
0.1809218972921... | |
about this the wrong way all together, please let me know as well. The main goal here is to have a little scrollable area on part of the page with all the pictures in a certain folder, and all the images should have an onclick that calls a javascript function passing in the name of the image. Hope that makes sense!
You... | [
0.6260755062103271,
0.01061528641730547,
0.631740391254425,
0.23807652294635773,
0.012224510312080383,
-0.3689776659011841,
0.20012237131595612,
-0.03185911849141121,
-0.3320985734462738,
-0.7018683552742004,
0.21357771754264832,
0.5271363854408264,
-0.269828200340271,
0.13716217875480652,... | |
Is there a library or a class/function that I can use to convert an integer to it's verbal representation?
Example input:
> 4,567,788`
Example output:
> Four million, Five hundred sixty-seven thousand, seven hundred eighty-eight
if you use the code found in:
[converting numbers in to words C#](https://stackoverflow... | [
-0.15796323120594025,
0.20777860283851624,
0.33411705493927,
0.0006970469257794321,
-0.19938263297080994,
0.4997522234916687,
0.2534988522529602,
-0.09395892918109894,
-0.09435573220252991,
-0.21574632823467255,
0.14828744530677795,
0.5944406390190125,
0.2621020972728729,
0.026358908042311... | |
int intPortion = (int)number;
decimal fraction = (number - intPortion)*100;
int decPortion = (int)fraction;
words = NumericToWords(intPortion);
if (decPortion > 0)
{
words += " and ";
words += NumericToWords(decPortion);
}
return words;
}
``` | [
-0.24871252477169037,
0.010334962978959084,
0.3431662619113922,
-0.28444814682006836,
0.217849463224411,
0.33069083094596863,
0.28169891238212585,
-0.5926055312156677,
0.09606505930423737,
-0.5474928617477417,
-0.5852951407432556,
0.6154347658157349,
0.07156965136528015,
0.1206416338682174... | |
When attempting to run IE on Windows Server 2008 under different user accounts using the runas command I get the message "The RUNAS command is not supported." This command works fine for other applications, but not for IE. Anyone else run into this & find a workaround?
Yeah, this is not possible under Vista / Server 20... | [
0.32743844389915466,
0.220426544547081,
0.2772442698478699,
-0.14345543086528778,
0.12078239768743515,
-0.2892346680164337,
0.7112892866134644,
0.1845456212759018,
-0.08595887571573257,
-0.4731687605381012,
-0.2357390969991684,
0.6198991537094116,
-0.46456822752952576,
0.10942576080560684,... | |
The testit() method is a closure. aString has fallen out of scope but testit() can still execute on it. testit2() is using a variable that hasn't fallen out of scope (mystring) but which was also not been passed into testit2(). Is testit2() considered a closure?
```
string mystring = "hello world";
Action testit = new... | [
-0.13056287169456482,
-0.2339601367712021,
0.37208375334739685,
-0.32622092962265015,
0.056090764701366425,
0.009746070951223373,
0.6127808690071106,
-0.29625916481018066,
-0.17809680104255676,
-0.3663763701915741,
-0.40080055594444275,
0.2577653229236603,
-0.6241917610168457,
0.0595023520... | |
doesn't behave like a normal method, which would only be able to capture mystring as a parameter.
Both examples are anonymous functions. The second of which use a closure in order to capture the local variables. The scope lifetime of the variable with respect to the anonymous function does not affect whether or not a c... | [
-0.08121713995933533,
-0.3534923791885376,
0.33473294973373413,
0.21575945615768433,
-0.15034306049346924,
-0.22797845304012299,
0.27394482493400574,
0.21153593063354492,
-0.2918969392776489,
-0.3977578580379486,
-0.056267619132995605,
0.251227468252182,
-0.5562833547592163,
0.471922844648... | |
method.
This is necessary because the anonymous function can live past the lifetime of the current function. Therefore all locals used in a anonymous function must be captured in order to execute the delegate at a later time. | [
0.05828263983130455,
-0.137241929769516,
0.09432846307754517,
0.4100659489631653,
0.2652914524078369,
-0.41778331995010376,
0.5478395223617554,
-0.010968181304633617,
0.018739935010671616,
-0.4470953345298767,
0.0765930563211441,
0.10007686913013458,
-0.5550044775009155,
0.5339831113815308... | |
i have two tables, products and categories. how do i convert the following sql query to linq format?
```
select c.Name, c.DisplayName, count(p.id) from categories as c
LEFT join products as p on p.categoryId = c.id
group by c.Name, c.DisplayName
```
some categories will have 0 products in them so the LEFT JOIN is im... | [
0.01167879905551672,
0.3270493149757385,
0.5678077936172485,
-0.05602526664733887,
-0.226271852850914,
0.2047100067138672,
-0.405035138130188,
-0.445883184671402,
-0.15606172382831573,
-0.27035969495773315,
0.052810318768024445,
0.395906001329422,
-0.22716379165649414,
0.3824405372142792,
... | |
from c in categories
select new { c.Name, c.DisplayName, Count = c.Products.Count() }
```
T. | [
0.11445222049951553,
-0.04741629585623741,
0.3152537941932678,
-0.16261997818946838,
-0.051832906901836395,
0.014029737561941147,
-0.15227077901363373,
-0.3480914235115051,
-0.2893977165222168,
-0.4688420295715332,
-0.4022813141345978,
0.3566819429397583,
-0.37266695499420166,
0.3370690047... | |
How do I suppress a MessageBox from showing that comes from a reference to an assembly that I do not own (nor have the code for)?
For example, my application (MyApplication.exe) is referencing an assembly coded by someone else (SomeoneElsesAssembly.dll). Inside of this assembly I'm calling a static method, which does ... | [
0.29707667231559753,
0.18044276535511017,
-0.2710001766681671,
-0.1742931753396988,
0.020888248458504677,
0.0013077096082270145,
0.5889365673065186,
-0.28107428550720215,
-0.46248388290405273,
-0.500442624092102,
-0.10756079852581024,
0.2827906310558319,
-0.18729783594608307,
0.01410472206... | |
Is there a way to stipulate that the clients of a class should specify a value for a set of properties in a class. For example (see below code), Can i stipulate that "EmploymentType" property in Employment class should be specified at compile time? I know i can use parametrized constructor and such. I am specifically l... | [
0.26601487398147583,
0.0796629786491394,
0.19414931535720825,
-0.0862148106098175,
0.5776482224464417,
0.23196198046207428,
-0.01893717050552368,
-0.15087273716926575,
-0.4273305833339691,
-0.6585478782653809,
-0.16419483721256256,
0.7332451343536377,
-0.179979607462883,
0.1119521185755729... | |
new Employment();
// if i build the above code, i should get a error or warning saying you should specify value for EmploymentType
}
```
As cmsjr stated what you need to do is this:
```
public class Employment
{
public Employment(EmploymentType employmentType)
{
this.EmploymentType = employmentType;
... | [
0.41308680176734924,
0.34998005628585815,
0.44579359889030457,
-0.23519177734851837,
0.47194504737854004,
0.20875680446624756,
0.043014660477638245,
-0.26835986971855164,
-0.35646215081214905,
-0.7377262115478516,
-0.23048920929431915,
0.766154408454895,
-0.17012296617031097,
0.25949975848... | |
enforce the rule then you would need some sort of state validation. For instance anytime you attempt to perform an operation on the Employment class you can have it check for a valid state like this:
```
public EmploymentType? EmploymentType { get; set; } // Nullable Type
public void PerformAction()
{
if(this.Val... | [
0.6432824730873108,
-0.018667027354240417,
0.17332002520561218,
-0.18669377267360687,
0.14819033443927765,
-0.36893582344055176,
0.5117580890655518,
-0.37797966599464417,
-0.4465269148349762,
-0.25682541728019714,
-0.3218519985675812,
0.6139308214187622,
-0.5093585252761841,
0.153331696987... | |
We are using VSTS 2008 to perform some relatively simple web testing of a web application that we have under development. We have data sources defined to provide input data to the tests, and would like to perform our validations based on this data source also. The problem that I have is the VS GUI does not allow me to ... | [
0.5233156085014343,
0.152967169880867,
0.3408081531524658,
0.21317791938781738,
-0.15555602312088013,
-0.19603699445724487,
0.3564300239086151,
-0.3688528835773468,
0.14891642332077026,
-0.47406452894210815,
0.2842378318309784,
0.49094855785369873,
0.03751120716333389,
-0.12138143926858902... | |
the right syntax for entering this into the Properties/Value field of any of the built in Validators, without converting it to code.
Has anyone managed to do this, or must I always convert the web tests to code to achieve this?
Some more analysis shows that there isn't a way to do this through the VS GUI. It can be ac... | [
0.4414807856082916,
0.07208949327468872,
0.29546669125556946,
0.27134937047958374,
0.13995563983917236,
-0.3457697331905365,
0.5318804383277893,
-0.12355001270771027,
0.02427757903933525,
-0.6717392206192017,
-0.020267125219106674,
0.7108496427536011,
0.11923684179782867,
-0.21877750754356... | |
> Most popular web-sites that require you to log in, have the authentication form on the right side of the page. More or less. As a right-handed person, I find it rather intuitive to look at and convenient to work with—that I don't have to sprain my neck or move my mouse too much to select the username field (though of... | [
0.2991198003292084,
0.1173635721206665,
0.6053333282470703,
-0.04198393225669861,
-0.18746939301490784,
-0.29545411467552185,
0.6235954761505127,
0.09850098937749863,
-0.08968595415353775,
-0.6475412845611572,
-0.2634022533893585,
0.5002359747886658,
0.31712862849235535,
-0.311374723911285... | |
design goal to flip the forms for a left-handed person? Also, I guess it matters what language you are interacting in. For a language like English that reads left to right, having the form on your right probably makes more sense.
Some examples to look at with different layout of auth forms:
> Facebook, Gmail, Y! **Ri... | [
0.5042921304702759,
-0.029770011082291603,
0.3968707323074341,
0.26632800698280334,
-0.16207994520664215,
-0.01663745753467083,
0.18368569016456604,
0.24486669898033142,
-0.08409374952316284,
-1.0756003856658936,
0.06454445421695709,
0.35369303822517395,
0.3477485179901123,
-0.215219661593... | |
static in terms of manoeuvrability.
* Users have little/no choice on how content is served.
* English being a the lingua franca of the Internet,
web sites have, over time ended up using the left-to-right
reading order of English as *the* order. This is in
keeping with UI design guidelines.
* Being left-handed puts you... | [
0.31132084131240845,
-0.346162885427475,
0.35457220673561096,
0.20613297820091248,
-0.48440948128700256,
-0.16361656785011292,
0.0845208466053009,
0.8837398290634155,
-0.3797561824321747,
-0.20725837349891663,
-0.22847110033035278,
0.29037413001060486,
-0.21636080741882324,
-0.020507527515... | |
to get adjusted to if things weren't the way they are. Cheers!*
i'm left-handed. even more, i'm the only one i know that uses mouse on the left and swaps buttons (so the 'main' button is my index). but i don't see why you think that anything on screen should move 'for our benefit'.
one thing i've found by obsessively ... | [
0.11209699511528015,
0.1496935784816742,
0.5042691826820374,
-0.26930665969848633,
-0.40388891100883484,
0.1806863248348236,
-0.08535099774599075,
0.3047654926776886,
-0.67389976978302,
-0.6528719663619995,
0.27675655484199524,
0.21895527839660645,
0.35979121923446655,
-0.28507450222969055... | |
shouldn't assume anything, just allow for maximum flexibility. | [
0.393645316362381,
-0.33678919076919556,
-0.18147972226142883,
0.3186333179473877,
0.18764661252498627,
-0.43202611804008484,
0.2744327187538147,
-0.022840697318315506,
-0.05569091811776161,
-0.420241117477417,
0.11352822929620743,
0.46247977018356323,
-0.03142537176609039,
-0.468172043561... | |
I am currently trying to log into a site using Python however the site seems to be sending a cookie and a redirect statement on the same page. Python seems to be following that redirect thus preventing me from reading the cookie send by the login page. How do I prevent Python's urllib (or urllib2) urlopen from followin... | [
0.4702441692352295,
0.061728887259960175,
0.14798319339752197,
0.08879159390926361,
-0.4210660755634308,
-0.23878197371959686,
0.37828588485717773,
-0.0858587995171547,
-0.23627546429634094,
-0.7750927805900574,
0.21452918648719788,
0.5940301418304443,
-0.29577791690826416,
0.2110625803470... | |
= urllib2.HTTPRedirectHandler()
class MyHTTPRedirectHandler(urllib2.HTTPRedirectHandler):
def http_error_302(self, req, fp, code, msg, headers):
print "Cookie Manip Right Here"
return urllib2.HTTPRedirectHandler.http_error_302(self, req, fp, code, msg, headers)
http_error_301 = http_error_303 ... | [
-0.13492922484874725,
0.2111208140850067,
0.420059472322464,
-0.2069716602563858,
-0.29417017102241516,
0.342099130153656,
0.36319464445114136,
-0.33812078833580017,
-0.14397042989730835,
-0.9598371386528015,
-0.39688900113105774,
0.7670803070068359,
-0.3266938626766205,
0.1183567345142364... | |
How can I use two separate CABasicAnimations to simultaneously animate the same property?
For example Two CABasicAnimations, both animate position.y.
The first animation will be a bounce (from 100, to 300, duration = 1, autoreverse = yes, repeatcount = 10)
The second animation will be a slow scroll (by 100, duration... | [
0.1095416471362114,
-0.15710563957691193,
0.784538984298706,
-0.05129484459757805,
-0.18370771408081055,
0.17282778024673462,
0.2741975784301758,
-0.4097376763820648,
-0.1851538121700287,
-0.8426664471626282,
0.1310095638036728,
0.5594452023506165,
0.21553614735603333,
0.05845644697546959,... | |
you want the view to bounce up and down while the whole bouncing motion shifts slowly downwards. You can do this by making the animations additive using their additive property. For example:
```
CABasicAnimation *bounceAnimation = [CABasicAnimation animationWithKeyPath:@"position.y"];
bounceAnimation.duration = 1;
bo... | [
0.15525594353675842,
-0.15008656680583954,
0.7796866297721863,
-0.3105151355266571,
-0.44420185685157776,
0.2803910970687866,
-0.09118849784135818,
-0.31995463371276855,
-0.06906858831644058,
-0.2520200312137604,
-0.24127843976020813,
0.5000170469284058,
-0.020269334316253662,
-0.021135868... | |
during the bounce animation. | [
0.20754463970661163,
-0.16896596550941467,
0.15244242548942566,
0.20473816990852356,
-0.2542338967323303,
-0.14088711142539978,
0.18389908969402313,
0.28147661685943604,
-0.3094380795955658,
-0.19514432549476624,
-0.4546598494052887,
-0.08421827852725983,
-0.052667926996946335,
-0.33022409... | |
I would like to know if attributes can be used to "mix-in" functionality to a class / method / property.
Something like:
```
[TrackChanges]
public Foo
{
get;
set;
}
```
Does anyone how this would be implemented, if at all possible?
Have a look at [PostSharp](http://www.postsharp.org/about/getting-started), an... | [
0.7488640546798706,
-0.1059335321187973,
-0.15736614167690277,
0.22795692086219788,
0.025725876912474632,
-0.19988910853862762,
0.1234096884727478,
-0.21719831228256226,
-0.09254658967256546,
-0.5008687973022461,
0.21250244975090027,
0.5128059983253479,
-0.1936226189136505,
0.0278128683567... | |
I would like to call a method from an dll, but i don't have the source neither the header file. I tried to use the dumpbin /exports to see the name of the method, but i can found the methods signature?
Is there any way to call this method?
Thanks,
It is possible to figure out a C function signature by analysing begin... | [
0.31605544686317444,
-0.013884508982300758,
0.22612538933753967,
0.24382007122039795,
-0.008715881034731865,
-0.23118476569652557,
0.1164550632238388,
-0.16626273095607758,
-0.33103010058403015,
-0.21582607924938202,
0.01936354674398899,
0.23205812275409698,
-0.20630134642124176,
0.2638740... | |
number and the types. Things may get more difficult with return value - it may be via 'eax' register or via a special pointer passed to the function as the last pseudo-argument (on the top of the stack). | [
-0.0057659149169921875,
-0.038726381957530975,
0.17838896811008453,
-0.07032767683267593,
-0.0698002353310585,
0.2573395073413849,
-0.0608854815363884,
-0.19069673120975494,
-0.12267573922872543,
-0.15982495248317719,
-0.29404333233833313,
0.6729314923286438,
-0.3681112229824066,
-0.036038... | |
I don't really get it: what's the purpose of a new line character?
If I do this:
```
<?php
echo "This is a test. \n";
echo "This is another test.";
?>
```
Code results in both sentences being in the same line. Why doesn't the \n causes the second sentence being in second line?
The sentences are each in it's own l... | [
0.2839798033237457,
-0.14321161806583405,
0.2994668781757355,
0.09950386732816696,
-0.379003643989563,
0.06389956176280975,
0.6751450300216675,
-0.035776156932115555,
-0.23684105277061462,
-0.4061463177204132,
-0.3187558650970459,
0.07073350250720978,
-0.25837206840515137,
0.09311777353286... | |
standard](http://www.w3.org/TR/html401/struct/text.html#h-9.1) treats a line break as just another white space character, which is why the `<br>` tag exists. Note however a line break will work within a `<pre>` tag, or an element with the [white-space:pre](https://developer.mozilla.org/en/CSS/white-space) CSS style.
T... | [
0.48539650440216064,
-0.020301638171076775,
0.23174254596233368,
-0.14589998126029968,
-0.11840759217739105,
-0.26670771837234497,
0.2462904155254364,
-0.020301498472690582,
-0.37388497591018677,
-0.33985140919685364,
-0.37943655252456665,
0.24001945555210114,
-0.3794499635696411,
-0.00593... | |
I’m porting a WPF app to silverlight 2, and have come across several WPF features which are presently missing from SL. Could anyone help me with equivalents or suggest workarounds.
1. I want to handle clicks and double clicks on a textbox embedded in a list box. The WPF implementation uses PreviewMouseLeftButtonDown/U... | [
0.2596855163574219,
-0.38966578245162964,
0.4612654745578766,
-0.12144216895103455,
-0.34507760405540466,
-0.053958646953105927,
0.34943899512290955,
-0.3215910792350769,
-0.19738559424877167,
-0.7577056288719177,
0.15711091458797455,
0.4665914475917816,
-0.5774949789047241,
-0.25697880983... | |
a listbox. It seems that PreviewKeyDown is missing in silverlight. The KeyDown event handler does not seem to get invoked.
3. I want to change some appearance properties of a textbox depending on the value of some custom attached properties. The WPF implementation uses a DataTrigger to do this. How can this be done in ... | [
0.20824606716632843,
-0.4158252775669098,
0.2966373860836029,
-0.16714951395988464,
-0.2238568812608719,
-0.0792437195777893,
0.05775909870862961,
-0.5156012177467346,
-0.3012799620628357,
-0.7844198942184448,
0.13689559698104858,
0.5150349140167236,
-0.6281943917274475,
-0.140754222869873... | |
workaround for this.
The [HTML standard](http://www.w3.org/TR/html401/struct/text.html#h-9.1) treats a line break as just another white space character, which is why the `<br>` tag exists. Note however a line break will work within a `<pre>` tag, or an element with the [white-space:pre](https://developer.mozilla.org/en... | [
0.13203226029872894,
-0.1184254139661789,
0.1906352937221527,
-0.133702352643013,
-0.05727088823914528,
-0.2257637083530426,
0.5097205638885498,
0.07626022398471832,
-0.40213969349861145,
-0.4603596329689026,
-0.35504668951034546,
0.33184942603111267,
-0.3021644353866577,
-0.10796339064836... | |
From where do I download the latest version of Lucene.net dll?
I am right now using 2.0.0.4 version but its MultiFieldQueryParser's constructor does not accept boost values.
[Here!](http://incubator.apache.org/lucene.net/download/) Looks like v2.0-004 is the latest version though. | [
0.17279358208179474,
-0.0794704258441925,
0.4286312460899353,
0.036871105432510376,
-0.31841662526130676,
-0.39817383885383606,
-0.016795221716165543,
0.28595709800720215,
-0.027535485103726387,
-0.619245171546936,
-0.15237484872341156,
0.5562607049942017,
0.1306411176919937,
0.07241158932... | |
I know how to use MVC's AntiForgeryToken attribute and it's associated HTML helper to help XSRF-secure my application's form POSTs.
Can something similar can be done for JsonResults that implement GET?
For instance, my View contains an onSubmit jQuery call like such:
```
$.getJSON("/allowActivity/YesOrNo/" + someFor... | [
0.3092735707759857,
0.06049962341785431,
0.637221097946167,
0.0948491245508194,
-0.061966344714164734,
-0.4590091109275818,
0.6026325821876526,
-0.17983241379261017,
-0.030009683221578598,
-0.5428615212440491,
-0.2513527274131775,
0.6418290138244629,
-0.12211833149194717,
0.000856633414514... | |
page?
You may use the AntiForgeryToken combined with some custom logic. The creation of the AntiForgery token on the server is the same, but by default the value is not included in your XmlHttpRequest.
The value of this token is in the HTTP only cookie "\_\_RequestVerificationToken" and should also be in the form data... | [
-0.01388195063918829,
-0.10202209651470184,
0.7707362174987793,
0.14153867959976196,
-0.2962295114994049,
0.07061978429555893,
0.4383157789707184,
-0.4007483422756195,
-0.10449643433094025,
-0.7063763737678528,
-0.08485206216573715,
0.355055570602417,
-0.5301020741462708,
0.063535004854202... | |
{
return $(document.getElementsByName("__RequestVerificationToken")).fieldSerialize();
};
```
On the server side you don't have to change your code - just use the ValidateAntiForgeryToken- attribute for your action.
Hope this helps | [
0.1715378761291504,
-0.03745812922716141,
0.46207812428474426,
-0.15602810680866241,
0.47874248027801514,
-0.20791661739349365,
0.6693008542060852,
-0.41215983033180237,
-0.09594278782606125,
-0.48934245109558105,
-0.3580063581466675,
0.6845710873603821,
-0.07977651059627533,
0.04522795975... | |
At some point in our past branches of development in git were merged. However, the wrong merge decision was made and therefore some code didn't make it into master branch that we expected would be there. (There were multiple merges of different branches before a final merge to a master branch. So the branching and merg... | [
0.2767331004142761,
-0.042374733835458755,
-0.2711638808250427,
0.4230863153934479,
-0.02662315033376217,
-0.23296302556991577,
0.1566089242696762,
0.06498343497514725,
-0.2641008198261261,
-0.5481259226799011,
0.08956971019506454,
0.1697598695755005,
-0.3123311400413513,
0.434904754161834... | |
git blame proved inadequate is that the line was touched in a commit sometime after the merge error.
If you know a line in a file that was modified by the git branch merge, you can do 'git blame file.txt' and determine the commit hash number and commit author of the line in the file. Then you can go through the git log... | [
0.2650531232357025,
-0.030675217509269714,
0.1698378175497055,
0.1695592999458313,
-0.14155489206314087,
0.19164282083511353,
0.12313991039991379,
-0.1931389719247818,
-0.10611359030008316,
-0.3004838824272156,
0.1510365754365921,
0.07761994004249573,
-0.43357202410697937,
0.17810569703578... | |
what you want. let's say you have commit numbers 0,1,2,3,4,5,6. You know that the line existed in revision 0, but disappeared in revision 6. Use 'git diff' plus grep to search for the disappearance.
```
git diff 0 6 | grep '- line I care about'
```
The first iteration, you'll see the line you care about disappearing... | [
0.07348082959651947,
0.006759688723832369,
0.814764142036438,
0.08583171665668488,
0.08725972473621368,
0.4688980281352997,
0.02377273142337799,
-0.22268404066562653,
-0.4937266409397125,
-0.528186559677124,
-0.31839871406555176,
0.5180832147598267,
-0.216061070561409,
0.303223580121994,
... | |
the grep *doesn't* show the line disappearing, then the line disappeared in revisions 4-6.
Keep cutting the revisions in half until you find the culprit. | [
0.2804092764854431,
-0.22984188795089722,
0.7397515773773193,
0.18738940358161926,
-0.05458429828286171,
0.26988938450813293,
0.22503845393657684,
0.2384912520647049,
-0.18135491013526917,
-0.4035326838493347,
0.184775248169899,
-0.09648077934980392,
-0.22882243990898132,
0.544976294040679... | |
Evening all,
I've written a transfer application that needs to perform an update, then update a date corresponding to that update. I.e.
```
string content = string.Empty;
IIvdManager manager;
DateTime configDate;
if (table == Tables.Asset)
{
content = WebService.GetTblAsset(companyId);
manager = ivdData.Inst... | [
0.22046352922916412,
-0.23965775966644287,
0.9449897408485413,
-0.24031172692775726,
0.15197640657424927,
-0.19706450402736664,
0.37010762095451355,
-0.2036617249250412,
-0.1408771574497223,
-0.28395941853523254,
-0.4951932728290558,
0.6134782433509827,
-0.11913652718067169,
0.006818500347... | |
}
}
```
What I want is for the configDate property to update the corresponding Date Get/Set in my ivdConfig Static Class.
How can I do this?
Have you considered the state pattern?
Subclass your table (the table variable) and add a virtual method (Update() perhaps?) that you then override in each specific table typ... | [
0.2385890781879425,
0.120945043861866,
0.5273734927177429,
-0.24241773784160614,
0.20265807211399078,
-0.21373528242111206,
0.24419960379600525,
-0.08144259452819824,
-0.09017287194728851,
-0.6226219534873962,
-0.028995070606470108,
0.5461934804916382,
-0.4631654620170593,
0.49716156721115... | |
of the stick but i'm not 100% sure what you are asking to be honest. | [
0.7555913329124451,
0.019995292648673058,
0.01060737669467926,
0.24842751026153564,
-0.607374370098114,
0.1686423122882843,
0.14189545810222626,
-0.029503129422664642,
0.11260006576776505,
0.008977713994681835,
0.4355331063270569,
0.5004849433898926,
-0.09595746546983719,
0.063807874917984... | |
I have a html file need to refresh every 10 seconds, so I have this line in html :
```
meta http-equiv="Refresh" content="10; url=Default.aspx"
```
In my C# code I have this :
```
public partial class _Default : System.Web.UI.Page<Br>
{
public static List<String> Active_User_List=
new List<String>(), User_L... | [
-0.01934138871729374,
0.13579420745372772,
0.9780073761940002,
-0.4111366271972656,
-0.02149812877178192,
0.2845425009727478,
0.20601332187652588,
-0.24593614041805267,
-0.27219852805137634,
-0.8281235694885254,
-0.09040593355894089,
0.4236755967140198,
-0.00601067254319787,
-0.04275828599... | |
I know PHP is usually used for web development, where there *is* no standard input, but PHP claims to be usable as a general-purpose scripting language, if you do follow it's funky web-based conventions. I know that PHP prints to `stdout` (or whatever you want to call it) with `print` and `echo`, which is simple enough... | [
0.5131438970565796,
0.2569701373577118,
0.06303683668375015,
-0.014756634831428528,
-0.34963223338127136,
-0.35528823733329773,
0.0694131925702095,
0.1654316484928131,
-0.1808953881263733,
-0.3679957389831543,
0.17503686249256134,
0.48398688435554504,
-0.3011758327484131,
-0.07889144122600... | |
with `fgets()` for a line for example (or, as you already stated, `fgetc()` for a single character):
```
<?php
$f = fopen( 'php://stdin', 'r' );
while( $line = fgets( $f ) ) {
echo $line;
}
fclose( $f );
?>
``` | [
-0.0878465473651886,
-0.3757080137729645,
0.6413049101829529,
-0.29768937826156616,
-0.020235730335116386,
0.44135159254074097,
0.2444249987602234,
-0.2907571494579315,
-0.15802931785583496,
-0.13144253194332123,
-0.3960493206977844,
0.41265058517456055,
-0.4751719832420349,
-0.02904156595... | |
Let's say that I'm developing an application to track boxing results. Is the best way to track these to have two tables, like so:
```
Boxers
======
id
name
Matches
=======
id
match_number
boxer_id
opponent_id
result
```
... and then have two records for each match, one for the winner, and one for the loser, somethi... | [
-0.15963470935821533,
0.4949744641780853,
0.02196260169148445,
-0.15008674561977386,
-0.673244059085846,
-0.3254842162132263,
0.05787518993020058,
-0.6397849321365356,
-0.05686285346746445,
-0.21064554154872894,
0.5504218339920044,
0.27836552262306213,
0.11326930671930313,
-0.2475576549768... | |
LOSS
```
... or am I missing a better way to do this?
What if there wasn't a result stored, just a recording that the two opponents were matched up?
Thanks!
Well, for a fully normalized, I'd go with:
Boxers - as cited.
Matches:
```
id / match_number (Don't think these need to be distinct anymore)
winner (FK-B... | [
-0.44240477681159973,
0.3006380498409271,
0.24451926350593567,
-0.13729999959468842,
-0.035898711532354355,
0.1334129273891449,
-0.04668485000729561,
-0.248997762799263,
-0.23936231434345245,
-0.08735194802284241,
0.10115715116262436,
0.2629534602165222,
-0.16942521929740906,
0.17575673758... | |
other answers) | [
0.022429222241044044,
0.12673652172088623,
0.12368249893188477,
0.4178678095340729,
-0.0218157097697258,
0.5816977024078369,
0.4298643469810486,
-0.40586259961128235,
-0.5029845833778381,
-0.06303390115499496,
-0.4476185441017151,
0.16016432642936707,
-0.3904290199279785,
0.001519768615253... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.