text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
only has to work within one specific browser. | [
0.0787021592259407,
-0.029191257432103157,
0.19986289739608765,
0.14960236847400665,
0.11423040926456451,
-0.20028916001319885,
0.37469738721847534,
0.17766126990318298,
0.15094296634197235,
-0.9203693866729736,
-0.47817251086235046,
0.11713392287492752,
-0.06574239581823349,
-0.1464087218... | |
I'm writing a bit of code to display a bar (or line) graph in our software. Everything's going fine. The thing that's got me stumped is labeling the Y axis.
The caller can tell me how finely they want the Y scale labeled, but I seem to be stuck on exactly what to label them in an "attractive" kind of way. I can't desc... | [
0.7236098647117615,
0.27729928493499756,
0.5890486836433411,
-0.0022909927647560835,
-0.17125791311264038,
0.4394837021827698,
-0.06673844158649445,
0.09634795784950256,
-0.31340813636779785,
-0.5853551626205444,
0.29339727759361267,
0.21643048524856567,
-0.2224334180355072,
0.474731415510... | |
a little bit of finagling with paper and pencil comes up with:
```
0, 25, 50, 75, 100, 125, 150, 175, 200, 225, 250
```
So there's 10 there (not including 0), the last one extends just beyond the highest value (234 < 250), and it's a "nice" increment of 25 each. If they asked for 8 labels, an increment of 30 would... | [
0.12147858738899231,
0.4476950466632843,
0.49478039145469666,
-0.08792103081941605,
0.0009336986695416272,
0.7141641974449158,
-0.11429382860660553,
-0.2512761056423187,
-0.4136507213115692,
-0.3079562485218048,
0.1470816731452942,
0.406674861907959,
0.10066504031419754,
0.1339825093746185... | |
of the points are negative?
I can see Excel tackles this problem nicely.
Does anyone know a general-purpose algorithm (even some brute force is okay) for solving this? I don't have to do it quickly, but it should look nice.
A long time ago I have written a graph module that covered this nicely. Digging in the grey m... | [
0.1835063397884369,
0.01387676689773798,
0.18148386478424072,
0.11385699361562729,
-0.05341343209147453,
0.19901931285858154,
0.20326511561870575,
-0.029969405382871628,
-0.12270204722881317,
-0.5085468888282776,
0.38718512654304504,
0.5061353445053101,
-0.011446669697761536,
0.19355343282... | |
bound accordingly.
Lets take your example:
```
15, 234, 140, 65, 90 with 10 ticks
```
1. lower bound = 15
2. upper bound = 234
3. range = 234-15 = 219
4. tick range = 21.9. This should be 25.0
5. new lower bound = 25 \* round(15/25) = 0
6. new upper bound = 25 \* round(1+235/25) = 250
So the range = 0,25,50,...,22... | [
0.3310357630252838,
0.06216737627983093,
0.6629133224487305,
0.0611991323530674,
0.08860194683074951,
0.3765309154987335,
0.19850292801856995,
-0.5637125372886658,
0.019970007240772247,
-0.6183328032493591,
0.20559534430503845,
0.3521048128604889,
-0.11227761954069138,
0.197341188788414,
... | |
-> 0.4
* <= 0.5 -> 0.5
* <= 0.6 -> 0.6
* <= 0.7 -> 0.7
* <= 0.75 -> 0.75
* <= 0.8 -> 0.8
* <= 0.9 -> 0.9
* <= 1.0 -> 1.0
3. multiply by 10^x.
In this case, 21.9 is divided by 10^2 to get 0.219. This is <= 0.25 so we now have 0.25. Multiplied by 10^2 this gives 25.
Lets take a look at the same example with 8 ti... | [
0.2612442374229431,
0.032299190759658813,
0.2792007029056549,
-0.12778395414352417,
-0.10604551434516907,
0.8730796575546265,
0.383514404296875,
-0.6284074783325195,
-0.44432008266448975,
-0.6010896563529968,
0.5162497758865356,
-0.25675132870674133,
-0.12441408634185791,
0.514669239521026... | |
which gives (multiplied by 10^2) 30.
5. new lower bound = 30 \* round(15/30) = 0
6. new upper bound = 30 \* round(1+235/30) = 240
Which give the result you requested ;-).
------ Added by KD ------
Here's code that achieves this algorithm without using lookup tables, etc...:
```
double range = ...;
int tickCount = .... | [
0.17544017732143402,
-0.05142314359545708,
0.5485820174217224,
-0.07350759953260422,
-0.11567703634500504,
0.6931684017181396,
0.23804865777492523,
-0.5944899320602417,
-0.329282283782959,
-0.4320099353790283,
0.09657846391201019,
0.39228081703186035,
-0.03561018407344818,
0.06452036648988... | |
So I started with a web services project (just a dynamic web project) that builds and debugs correctly from eclipse. We've pulled a chunk of common code out that we want to put into a shared library so now those classes are going into a separate jar project that the web project references.
On the web project, I did Pr... | [
0.3177460730075836,
0.2721490263938904,
-0.28071829676628113,
0.1186828464269638,
-0.2657122313976288,
0.11687358468770981,
0.3813377320766449,
-0.11595272272825241,
-0.15635131299495697,
-0.08531837910413742,
0.3342667818069458,
0.4505614936351776,
-0.3183285892009735,
0.0702190026640892,... | |
file and I get a NoClassDefFoundError.
My .class and properties files and the contents of my META-INF directory are showing up in the ./build directory, but my WEB-INF/lib directory seems to be referenced in-place, and the jar dependency doesn't get copied in to it to show up as part of the Web App Library.
What is t... | [
0.45548608899116516,
0.4013712406158447,
0.3212803900241852,
0.07173298299312592,
-0.20610250532627106,
-0.06671265512704849,
0.5476711392402649,
-0.0859774723649025,
-0.035020746290683746,
-0.6702746152877808,
0.08171304315328598,
0.5135007500648499,
-0.0800722986459732,
0.166073963046073... | |
solve this problem.
You have already done the task of extracting your common classes into its own project, **possibly** because other projects depend on these classes. Either way, you'll have to ensure that this is a Utility project (appears under Java EE in the project wizards), and not just a plain Java project.
One ... | [
0.08913639932870865,
-0.005076272878795862,
-0.14566004276275635,
-0.03136593475937843,
0.0621708407998085,
-0.14411628246307373,
0.27273258566856384,
-0.2186516374349594,
-0.18824130296707153,
-0.5878240466117859,
-0.2280624657869339,
0.40188395977020264,
-0.41957926750183105,
-0.03410757... | |
be placed in WEB-INF\lib during deployment, and even during export of the WAR. To do so, visit the dynamic web project's properties, and browse to the Java EE module dependencies. Ensure that your utility project is selected here. Redeploy/publish your application and you should be good to go. | [
0.3205496072769165,
-0.15142983198165894,
0.1677086353302002,
0.026902420446276665,
0.06546446681022644,
-0.5454614758491516,
0.1787979155778885,
-0.01564563438296318,
-0.1498412936925888,
-0.6427338719367981,
-0.5521993637084961,
0.5806993842124939,
-0.05289497226476669,
-0.17111021280288... | |
I have a python module that defines a number of classes:
```
class A(object):
def __call__(self):
print "ran a"
class B(object):
def __call__(self):
print "ran b"
class C(object):
def __call__(self):
print "ran c"
```
From within the module, how might I add an attribute that giv... | [
0.2546275556087494,
0.07408652454614639,
-0.27681654691696167,
-0.18372298777103424,
-0.23334148526191711,
0.05760127305984497,
0.2510153651237488,
-0.13041871786117554,
-0.032559897750616074,
-0.2573219835758209,
0.232408344745636,
0.7553420066833496,
-0.462706983089447,
0.169277653098106... | |
class to the class itself from *within* the module.
From outside of the module, I can simply use `getattr(mod, 'A')`, but I don't have a `self` kind of module from within the module itself.
This seems pretty obvious. Can someone tell me what I'm missing?
```
import sys
getattr(sys.modules[__name__], 'A')
``` | [
0.06616020202636719,
-0.1612805426120758,
-0.14838263392448425,
-0.214133620262146,
-0.0488022156059742,
-0.2079002410173416,
0.3456926941871643,
0.08533509820699692,
-0.017419924959540367,
-0.44650888442993164,
-0.2331850379705429,
0.7484442591667175,
-0.3796825706958771,
0.10727181285619... | |
OK,
Here is my problem, I have a master page with a HEAD section that contains my JS includes. I have one JS include
```
<script src="Includes/js/browser.js" language="javascript" type="text/javascript"></script>
```
In my page i consume it like this:
```
<body>
<form id="form1" runat="server">
<div>
....
<script... | [
0.33801624178886414,
0.5071414113044739,
-0.01573321409523487,
-0.1871059089899063,
-0.23213762044906616,
-0.32231420278549194,
0.3518863618373871,
-0.10178179293870926,
-0.20630048215389252,
-0.7501425743103027,
0.20183080434799194,
0.6305344104766846,
-0.43015292286872864,
-0.03333908319... | |
only an Internet Explorer error message?](https://stackoverflow.com/questions/179054/is-there-any-good-or-reliable-way-to-figure-out-where-a-javascript-error-is-usi)
* [What is the Best Development “add on” for Browsers [closed]](https://stackoverflow.com/questions/313186/what-is-the-best-development-add-on-for-browser... | [
-0.28569042682647705,
0.24586951732635498,
0.28793013095855713,
0.002661675913259387,
0.0323638916015625,
-0.3878183960914612,
0.48587390780448914,
0.11852488666772842,
-0.04193849489092827,
-0.5586780905723572,
-0.2865200936794281,
0.5566781759262085,
-0.27199167013168335,
-0.435725361108... | |
For those who like a good WPF binding challenge:
I have a nearly functional example of two-way binding a `CheckBox` to an individual bit of a flags enumeration (thanks Ian Oakes, [original MSDN post](http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/c05b7e7e-25cd-4a41-8bf5-e35d2caff797/)). The problem though is... | [
0.20252233743667603,
-0.12360195070505142,
0.1796763837337494,
-0.08061141520738602,
-0.42489442229270935,
-0.4122384488582611,
0.16908489167690277,
-0.43142300844192505,
-0.0848587155342102,
-0.47734683752059937,
-0.0804629996418953,
0.4082069993019104,
-0.49260538816452026,
0.00125579058... | |
to change.
**What I've tried:** Changing the order of property definitions, Using a label and text box to confirm the `DataContext` is bubbling out updates, Any plausible `FrameworkMetadataPropertyOptions` (`AffectsRender`, `BindsTwoWayByDefault`), Explicitly setting `Binding Mode=TwoWay`, Beating head on wall, Changi... | [
0.12690789997577667,
0.16659682989120483,
0.6260079145431519,
0.021909572184085846,
0.07031889259815216,
-0.11219169944524765,
-0.00673205079510808,
-0.38752254843711853,
-0.2635364532470703,
-0.7006514072418213,
-0.35801252722740173,
0.30452960729599,
-0.14329500496387482,
0.3055638968944... | |
ctrl:CheckBoxFlagsBehaviour.Mask="{x:Static c:Department.A}"
ctrl:CheckBoxFlagsBehaviour.IsChecked="{Binding Path=IsChecked, RelativeSource={RelativeSource Self}}"
ctrl:CheckBoxFlagsBehaviour.Value="{Binding Department}"
```
The class:
```
/// <summary>
/// A helper class for providing bit-wise bin... | [
-0.3393042981624603,
-0.11708991974592209,
0.5624487996101379,
-0.2200591266155243,
0.07607710361480713,
0.1691003441810608,
0.41361570358276367,
-0.3511159121990204,
-0.0031804507598280907,
-0.3826504647731781,
-0.5636183619499207,
0.6653053760528564,
-0.6551017761230469,
0.03480039909482... | |
obj.SetValue(MaskProperty, value);
} // end SetMask
public static readonly DependencyProperty MaskProperty =
DependencyProperty.RegisterAttached("Mask", typeof(Enum),
typeof(CheckBoxFlagsBehaviour), new UIPropertyMetadata(null));
public static Enum GetValue(DependencyObject obj)
{
... | [
-0.18297648429870605,
-0.2563299238681793,
0.6255903244018555,
-0.19646696746349335,
0.2412119060754776,
0.22961516678333282,
0.5289344191551208,
-0.24093857407569885,
0.11268328130245209,
-0.5719342827796936,
-0.6048427820205688,
0.8450334668159485,
-0.6718575358390808,
0.1559726148843765... | |
readonly DependencyProperty ValueProperty =
DependencyProperty.RegisterAttached("Value", typeof(Enum),
typeof(CheckBoxFlagsBehaviour), new UIPropertyMetadata(null, ValueChanged));
private static void ValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
isValueChangin... | [
-0.014197749085724354,
-0.41414645314216614,
0.598135769367218,
-0.0679432675242424,
0.18725626170635223,
0.30218714475631714,
0.6662834286689758,
-0.2030613273382187,
-0.10486683994531631,
-0.6197257041931152,
-0.5098953247070312,
0.7605283260345459,
-0.5849049091339111,
0.276269376277923... | |
PropertyInfo pi = dataItem.GetType().GetProperty(exp.ParentBinding.Path.Path);
pi.SetValue(dataItem, (value & mask) != 0, null);
((CheckBox)d).IsChecked = (value & mask) != 0;
isValueChanging = false;
} // end ValueChanged
public static bool? GetIsChecked(DependencyObject obj)
{
... | [
0.11474788188934326,
-0.34465160965919495,
0.4798842966556549,
-0.010936145670711994,
0.09684908390045166,
0.022489961236715317,
0.43015575408935547,
-0.6668197512626648,
0.08118081837892532,
-0.3598931133747101,
-0.25664082169532776,
0.7024111747741699,
-0.45030587911605835,
0.29939168691... | |
} // end SetIsChecked
public static readonly DependencyProperty IsCheckedProperty =
DependencyProperty.RegisterAttached("IsChecked", typeof(bool?),
typeof(CheckBoxFlagsBehaviour), new UIPropertyMetadata(false, IsCheckedChanged));
private static void IsCheckedChanged(DependencyObject d, Depende... | [
0.03385501727461815,
-0.343043714761734,
0.4765438437461853,
-0.1330844908952713,
0.5128247737884521,
-0.03526850417256355,
0.6388060450553894,
-0.34279611706733704,
0.2557697892189026,
-0.4556986391544342,
-0.3929833769798279,
0.7912619113922119,
-0.4221339225769043,
0.1422196626663208,
... | |
BindingExpression exp = BindingOperations.GetBindingExpression(d, ValueProperty);
object dataItem = GetUnderlyingDataItem(exp.DataItem);
PropertyInfo pi = dataItem.GetType().GetProperty(exp.ParentBinding.Path.Path);
byte mask = Convert.ToByte(GetMask(d));
byte value = Co... | [
-0.17834553122520447,
-0.42952486872673035,
0.6293073892593384,
-0.11142241954803467,
-0.1337108165025711,
0.2534981966018677,
0.5703942775726318,
-0.5573004484176636,
-0.18494799733161926,
-0.7024363875389099,
-0.32805532217025757,
0.31740203499794006,
-0.663074254989624,
0.36470639705657... | |
if ((value & mask) == 0)
{
value = (byte)(value + mask);
}
}
else | [
-0.3126920461654663,
-0.2694186866283417,
0.255776047706604,
-0.28622400760650635,
0.23103611171245575,
0.076706662774086,
0.06842374056577682,
-0.20182737708091736,
-0.007399457041174173,
-0.22226060926914215,
-0.39991649985313416,
0.7146587371826172,
-0.1546943038702011,
-0.2086297720670... | |
{
if ((value & mask) != 0)
{
value = (byte)(value - mask);
}
} | [
-0.362575501203537,
-0.2598985433578491,
0.35610002279281616,
-0.2722935676574707,
0.26380011439323425,
0.18196706473827362,
0.1299229860305786,
-0.13132891058921814,
-0.046132758259773254,
-0.2326599657535553,
-0.4166945219039917,
0.7373742461204529,
-0.20089495182037354,
-0.2136286795139... | |
pi.SetValue(dataItem, value, null);
}
} // end IsCheckedChanged
/// <summary>
/// Gets the underlying data item from an object.
/// </summary>
/// <param name="o">The object to examine.</param>
/// <returns>The underlying data item if appropriate, or the object passed in.</returns>
... | [
-0.04122519865632057,
-0.2860087752342224,
0.4810447096824646,
0.15431298315525055,
0.02882862277328968,
0.4877803921699524,
0.15135368704795837,
-0.580729067325592,
-0.18130351603031158,
-0.5140060186386108,
-0.14355643093585968,
0.09593143314123154,
-0.34019771218299866,
0.08756341785192... | |
// end GetUnderlyingDataItem
} // end class CheckBoxFlagsBehaviour
```
You could use a value converter. Here's a very specific implementation for the target `Enum`, but would not be hard to see how to make the converter more generic:
```
[Flags]
public enum Department
{
None = 0,
A = 1,
B = 2,
C = 4,
... | [
-0.17525936663150787,
-0.25547781586647034,
0.34213998913764954,
-0.060590654611587524,
0.12354201078414917,
-0.03813575953245163,
0.3619571924209595,
0.10237351804971695,
-0.014113450422883034,
-0.8460758328437805,
-0.5348253846168518,
0.3224541246891022,
-0.255585640668869,
0.18392023444... | |
{
Department = Department.A | Department.C
};
}
}
public class DataObject
{
public DataObject()
{
}
public Department Department { get; set; }
}
public class DepartmentValueConverter : IValueConverter
{
private Department target;
public DepartmentValueConverter()
... | [
-0.13086651265621185,
-0.5119433403015137,
0.5528627634048462,
-0.0496266633272171,
-0.009899070486426353,
0.2136520892381668,
0.07197056710720062,
0.26258018612861633,
-0.07128462195396423,
-0.48533564805984497,
-0.6149922609329224,
0.6308360695838928,
-0.45994052290916443,
0.389007061719... | |
{
Department mask = (Department)parameter;
this.target = (Department)value;
return ((mask & this.target) != 0);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
this.target ^= (Department)parameter;
return this.targe... | [
-0.11239831149578094,
-0.24554193019866943,
0.6370410919189453,
-0.2516025900840759,
0.24089595675468445,
0.3963468670845032,
0.050148919224739075,
-0.014485427178442478,
-0.2842203676700592,
-0.688529908657074,
-0.669776201248169,
0.5194228291511536,
-0.30616524815559387,
0.19719496369361... | |
IsChecked="{Binding
Path=Department,
Converter={StaticResource DeptConverter},
ConverterParameter={x:Static l:Department.A}}"/> | [
-0.12902739644050598,
-0.47665587067604065,
0.43587929010391235,
0.10959333926439285,
0.043015677481889725,
0.004453406669199467,
0.1863071620464325,
-0.19503657519817352,
-0.1245751678943634,
-0.7664783000946045,
-0.21655486524105072,
0.1419718861579895,
-0.295234739780426,
0.169681042432... | |
<!-- more -->
</StackPanel>
```
**EDIT:** I don't have enough "rep" (yet!) to comment below so I have to update my own post :(
In the last comment [Steve Cadwallader](https://stackoverflow.com/users/41693/steve-cadwallader) says: *"but when it comes to two-way binding the ConvertBack falls apart"*, well I've update... | [
0.40160802006721497,
0.17080220580101013,
0.21652758121490479,
-0.1294141560792923,
-0.46714887022972107,
-0.06229859218001366,
0.27149638533592224,
-0.4919469654560089,
-0.399061918258667,
-0.7227534651756287,
0.04658607020974159,
0.7183163166046143,
-0.2900879383087158,
0.211110249161720... | |
I know that you cannot return anonymous types from methods but I am wondering how the Select extension method returns an anonymous type. Is it just a compiler trick?
Edit
Suppose L is a List. How does this work?
```
L.Select(s => new { Name = s })
```
The return type is IEnumerable<'a> where 'a = new {String Name}... | [
0.05107520893216133,
-0.10840818285942078,
0.3895203769207001,
-0.25354093313217163,
-0.036855053156614304,
-0.09562323987483978,
0.01238260231912136,
-0.1280808001756668,
-0.12437070906162262,
-0.503821611404419,
-0.20419082045555115,
0.4395391345024109,
-0.3487686216831207,
0.14618898928... | |
source collection. The `Func<Tsource, TResult>` transformation function is where the compiler can use type inference to declare an anonymous type.
In other words, in order to pass a `Func<Tsource, TResult>` to `Select`, you - the caller - must define `TResult`. Which means `Select` isn't returning an anonymous type de... | [
-0.013509873300790787,
-0.1125759407877922,
0.268779456615448,
0.0011502305278554559,
-0.029260944575071335,
-0.1743486076593399,
0.42695751786231995,
-0.24252758920192719,
0.06314555555582047,
-0.49520257115364075,
-0.17195282876491547,
0.5901292562484741,
-0.31102660298347473,
0.22741581... | |
I want to serialize the following Xml structure:
```
<XmlRootElement>
<Company name="Acme Widgets LLC">
<DbApplication name="ApplicationA" vendor="oracle">
<ConnSpec environment="DEV"
server="DBOraDev1201"
database="AppA" | [
0.45662981271743774,
0.25081774592399597,
0.32887107133865356,
-0.04193168878555298,
-0.019102025777101517,
-0.050369299948215485,
0.2136179655790329,
-0.19299958646297455,
0.10442855954170227,
-0.2753026485443115,
0.07182677090167999,
0.261959433555603,
-0.3142229914665222,
0.132471516728... | |
userId="MyUser"
password="5613456#6%^%$%$#" />
<ConnSpec environment="QA"
server="DBOraQA1205"
database="AppA" | [
-0.5463212728500366,
0.14351728558540344,
0.0968131422996521,
-0.327036589384079,
-0.011054543778300285,
0.21010299026966095,
0.4942445456981659,
-0.022677477449178696,
-0.12815473973751068,
-0.6545605063438416,
-0.24922047555446625,
0.17101939022541046,
-0.290420264005661,
0.3833952248096... | |
userId="MyUser"
password="5613456#6%^%$%$#" />
</DbApplication>
<DbApplication name="AnotherApp" "vendor="SQLServer">
<ConnSpec environment="DEV"
server="DBMsSqlDev1201" | [
-0.3424798548221588,
-0.0476858951151371,
0.38701069355010986,
-0.11831522732973099,
-0.07236400991678238,
0.16448569297790527,
0.4880884885787964,
-0.02655418962240219,
-0.21303591132164001,
-0.8226349949836731,
-0.012630523182451725,
0.20238430798053741,
-0.020639216527342796,
0.37716642... | |
catalog="AnoptherApp"
userId="MyUser"
password="5613456#6%^%$%$#" />
<ConnSpec environment="QA"
server="DBMsSqlQA1565" | [
-0.39617785811424255,
0.10852935910224915,
0.08017440140247345,
-0.170628622174263,
0.04849148169159889,
0.17395007610321045,
0.27524009346961975,
0.14651279151439667,
-0.5482930541038513,
-0.42681440711021423,
-0.09381737560033798,
0.060104623436927795,
-0.04385619983077049,
0.55266863107... | |
catalog="AnotherApp"
userId="MyUser"
password="5613456#6%^%$%$#" />
</DbApplication>
</Company>
<Company name = "ExpertSoftware Inc" ....
...
</Company>
</XmlRootElement>
```
but I have discovered in [link text](http://msdn.microsoft.com/en-u... | [
0.06529820710420609,
0.20983168482780457,
0.24295903742313385,
0.1846054494380951,
0.1342354416847229,
0.014946160838007927,
0.11254728585481644,
-0.1629035919904709,
-0.6977781057357788,
-0.23188704252243042,
-0.15075334906578064,
0.20891806483268738,
-0.0722854807972908,
0.43585196137428... | |
classes serialized?
* A: The XmlSerializer only serializes
the elements in the collection when
it detects either the IEnumerable or
the ICollection interface. This
behavior is by design. The only work
around is to re-factor the custom
collection into two classes, one of
which exposes the properties
including one of the... | [
0.10463204234838486,
-0.28465843200683594,
0.060333315283060074,
0.48310115933418274,
-0.3029805123806,
-0.23787879943847656,
-0.004982469603419304,
0.009644237346947193,
-0.17954376339912415,
-0.533350944519043,
-0.08378774672746658,
0.4141915738582611,
-0.47119781374931335,
0.13274015486... | |
<Companys>
<Company name="Acme Widgets LLC">
<DbApplications>
<DbApplication name="ApplicationA" vendor="oracle">
<ConnSpecs>
<ConnSpec environment="DEV" | [
0.33765003085136414,
0.27064478397369385,
0.09196825325489044,
0.03564590588212013,
-0.12270841002464294,
-0.0020439105574041605,
-0.0029224788304418325,
0.06610063463449478,
-0.17035429179668427,
-0.24949221312999725,
-0.3398078382015228,
0.21590785682201385,
-0.024549786001443863,
0.2052... | |
server="DBOraDev1201" ... />
<ConnSpec environment="QA"
server="DBOraQA1205"
database="AppA" ... /> | [
-0.3068212866783142,
-0.11682930588722229,
-0.013200775720179081,
-0.29638734459877014,
-0.4259442389011383,
0.20970973372459412,
0.48799192905426025,
-0.1855887472629547,
-0.05475156754255295,
-0.41296789050102234,
-0.2962070107460022,
0.11934631317853928,
-0.06847673654556274,
0.32992634... | |
</ConnSpecs>
</DbApplication>
<DbApplication name="AnotherApp" "vendor="SQLServer">
<ConnSpecs>
<ConnSpec environment="DEV" ... />
<ConnSpec | [
-0.11125709861516953,
-0.022923756390810013,
0.3448805809020996,
0.018402816727757454,
-0.05686526373028755,
-0.01806706003844738,
0.1700470894575119,
-0.14199940860271454,
-0.2138325572013855,
-0.763916552066803,
0.004447885788977146,
0.37329360842704773,
-0.11627519130706787,
0.118590943... | |
environment="QA" ... />
</ConnSpecs>
</DbApplication>
</DbApplications>
</Company>
<Company name = "ExpertSoftware Inc" ....
...
</Company>
</Companys> | [
0.15624000132083893,
0.3321734368801117,
0.09871190041303635,
-0.1660102754831314,
0.03926750645041466,
-0.12085715681314468,
0.06731995940208435,
-0.09512627124786377,
-0.15569369494915009,
-0.7088679671287537,
-0.19621440768241882,
0.6653872132301331,
-0.19514651596546173,
-0.06628609448... | |
</XmlRootElement>
```
Does anyone know why this is so? or if there is some other way to do this?
If you are using [XmlSerializer](http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx) you need to indicate it how to serialize your collections:
```
public class XmlRootElement
{
[XmlE... | [
0.30870321393013,
0.17158810794353485,
0.37908750772476196,
0.018248362466692924,
0.19191473722457886,
-0.24839366972446442,
-0.21229662001132965,
-0.2600327730178833,
-0.46320590376853943,
-0.1666610687971115,
-0.36920365691185,
0.19351239502429962,
-0.19360098242759705,
0.305717617273330... | |
"ConnSpec")]
public ConnSpec[] ConnSpec { get; set; }
// Other properties ....
}
public class ConnSpec
{
// Other properties ....
}
```
And then:
```
using (Stream stream = new FileStream("test.xml", FileMode.Open, FileAccess.Read, FileShare.Read))
{
XmlSerializer serializer = new XmlSerializer(typ... | [
0.05502155050635338,
-0.19156894087791443,
0.5136708617210388,
0.14388610422611237,
0.18129701912403107,
-0.09617333859205246,
-0.07818568497896194,
-0.22083993256092072,
-0.20572003722190857,
-0.7229040861129761,
-0.2539435029029846,
0.623593270778656,
-0.08242194354534149,
0.317946046590... | |
I have an asp.net mvc app running on a local iis website that is failing to send mail using SmtpClient from System.Net.Mail. I am trying to send a mail to my hotmail address and I get a socket exception. Any idea what the problem might be?
```
using(var message = new MailMessage())
{
messag... | [
0.18662762641906738,
0.08679703623056412,
0.42618265748023987,
-0.3803650736808777,
0.02205546945333481,
0.02273286134004593,
0.6718356013298035,
-0.17368920147418976,
-0.15920820832252502,
-0.8200309872627258,
-0.10390932112932205,
0.36664727330207825,
-0.5847227573394775,
0.4542552530765... | |
message.Subject = subject;
message.Body = body;
message.IsBodyHtml = false;
var mailClient = new SmtpClient();
mailClient.Send(message);
}
```
Here | [
0.0917857438325882,
-0.10716518759727478,
0.5945513248443604,
-0.39566630125045776,
-0.22970886528491974,
-0.045447491109371185,
0.7523413896560669,
-0.22039026021957397,
-0.5608842968940735,
-0.6035427451133728,
-0.3832160234451294,
0.24019621312618256,
-0.5696048736572266,
0.452996104955... | |
is the exception:
```
{System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:25
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at S... | [
-0.43704184889793396,
0.09744217246770859,
0.568892240524292,
0.05647239089012146,
0.19171972572803497,
0.20561154186725616,
0.4733465313911438,
0.11597263813018799,
-0.27633336186408997,
-0.7609559297561646,
-0.25194957852363586,
0.451873242855072,
-0.3529861271381378,
0.25100305676460266... | |
access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that \$ has Read access to the physical path. Then test these settings again.
Based on your answers to my comments a... | [
0.08030767738819122,
-0.04092138260602951,
0.42113327980041504,
0.3699844181537628,
0.18102729320526123,
-0.2887268662452698,
0.5666200518608093,
0.19063611328601837,
-0.46008408069610596,
-0.8900899291038513,
-0.2384255975484848,
0.48725995421409607,
-0.3229663074016571,
0.172469481825828... | |
may allow you to send outgoing via it. I don't use Hotmail so don't know if it will or not but it should be something like smtp.hotmail.com and your credentials. My primary account is a gmail account, so I can use it via smtp.gmail.com and of course, my credentials. | [
0.25344544649124146,
-0.022985011339187622,
0.6681919097900391,
0.16230353713035583,
0.0011964855948463082,
-0.183921679854393,
0.4806472063064575,
0.4374317228794098,
-0.31183356046676636,
-0.5307011604309082,
0.20253151655197144,
0.14499890804290771,
-0.10116548091173172,
0.2942655980587... | |
Problem:
```
edited files on windows, using git-bash, to fix IE7 problems
committed, pushed to github repo
booted back into linux
pulled from repo
merge conflict in dozens of files
used 'git reset --hard'
```
What can I do to get back on track?
UPDATE: please look at the following for a clearer picture (no iro... | [
-0.11176223307847977,
-0.027946291491389275,
0.22435380518436432,
0.11415044218301773,
-0.18117175996303558,
0.43132495880126953,
0.5843275785446167,
-0.4077819883823395,
-0.5144563317298889,
-0.3274732232093811,
-0.19467774033546448,
0.7187761664390564,
-0.4513178765773773,
0.133719041943... | |
reused 0 (delta 0)
Unpacking objects: 100% (15/15), done.
From git@github.com:shalunov/nutrograph
1925d73..1ed7f46 master -> origin/master
Updating 1925d73..1ed7f46
TODO: needs update
app/models/data_link.rb: needs update
app/models/footnote.rb: needs update
app/models/static_chart.rb: needs update
app/views/fo... | [
0.1253827065229416,
0.4119925796985626,
0.29448866844177246,
-0.15467701852321625,
-0.12604765594005585,
0.7040552496910095,
0.26375454664230347,
-0.8082814812660217,
-0.4108599126338959,
-0.37678593397140503,
-0.1610550433397293,
0.14522193372249603,
-0.3580062687397003,
-0.07026740163564... | |
public/ README.rdoc spec/ test/ TODO vendor/
config/ db/ lib/ Nutrograph.pdf Rakefile script/ stories/ tmp/ utf8_general_ci
jess@home:~/Rails/nutrograph$ mkdir backup
jess@home:~/Rails/nutrograph$ cd backup/
jess@home:~/Rails/nutrograph/backup$ git clone git@github.com:shalunov/n... | [
-0.29630839824676514,
-0.06762344390153885,
0.3950454890727997,
0.13898032903671265,
0.0010649358155205846,
0.33394691348075867,
0.6061933636665344,
-0.3155395984649658,
-0.3249450922012329,
-0.6804770231246948,
-0.44253021478652954,
0.35116174817085266,
-0.340815931558609,
0.2276079654693... | |
done.
jess@home:~/Rails/nutrograph/backup$ script/server
bash: script/server: No such file or directory
jess@home:~/Rails/nutrograph/backup$ cd nutrograph/
jess@home:~/Rails/nutrograph/backup/nutrograph$ script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.1.2 application starting ... | [
0.3676096200942993,
0.029806403443217278,
0.6054939031600952,
-0.20857694745063782,
0.10781002789735794,
0.026686212047934532,
0.5574410557746887,
-0.9363456964492798,
-0.08132410049438477,
-0.28948742151260376,
-0.37910133600234985,
0.5977084636688232,
-0.2850753366947174,
-0.105110064148... | |
`require'
from script/server:3
jess@home:~/Rails/nutrograph/backup/nutrograph$ git merge
usage: git-merge [options] <remote>...
or: git-merge [options] <msg> HEAD <remote>
--stat show a diffstat at the end of the merge
-n don't show a diffstat at the end of the merge
... | [
0.26051419973373413,
-0.14692728221416473,
0.45569100975990295,
0.007976449094712734,
0.13943587243556976,
-0.028551220893859863,
0.5198165774345398,
-0.21619759500026703,
-0.04838702827692032,
-0.8159928321838379,
-0.49293187260627747,
0.19969870150089264,
-0.23042283952236176,
0.10131996... | |
--log add list of one-line log to merge commit message
--squash create a single commit instead of doing a merge
--commit perform a commit if the merge succeeds (default)
--ff | [
0.06854607164859772,
-0.18024387955665588,
-0.1844330132007599,
0.05488470569252968,
-0.0900895819067955,
0.15270201861858368,
0.48611682653427124,
-0.14663374423980713,
-0.3793163299560547,
-0.616651713848114,
-0.33159705996513367,
0.538101315498352,
-0.539587676525116,
-0.109080076217651... | |
allow fast forward (default)
-s, --strategy ... merge strategy to use
-m, --message ... message to be used for the merge commit (if any)
jess@home:~/Rails/nutrograph/backup/nutrograph$ git merge origin/master
Already up-to-date.
jess@home:~/Rails/nutrograph/backup/nutrograph$ git pull
Already up-to-date... | [
-0.10607478767633438,
-0.2909645438194275,
0.6132180094718933,
0.06879240274429321,
0.16785739362239838,
-0.07990410178899765,
0.21771326661109924,
-0.34326407313346863,
-0.1023273915052414,
-0.6935486793518066,
-0.3241492509841919,
0.3517901599407196,
-0.2600371539592743,
0.16819214820861... | |
don't show a diffstat at the end of the merge
--summary (synonym to --stat)
--log add list of one-line log to merge commit message
--squash create a single commit instead of doing a merge | [
0.19464211165905,
-0.19072513282299042,
-0.15153071284294128,
0.02135649137198925,
-0.13403335213661194,
-0.07581952214241028,
0.740476131439209,
-0.023301217705011368,
-0.4049910306930542,
-0.6926664710044861,
-0.2358475923538208,
0.21127936244010925,
-0.5596694946289062,
-0.0346488058567... | |
--commit perform a commit if the merge succeeds (default)
--ff allow fast forward (default)
-s, --strategy ... merge strategy to use
-m, --message ... message to be used for the merge commit (if any)
jess@home:~/Rails/nutrograph$ git merge orgin
orgin - not something we... | [
0.39871013164520264,
-0.3964807987213135,
0.20355939865112305,
-0.004086843226104975,
-0.1803871989250183,
0.022069185972213745,
0.4565267264842987,
-0.3009839355945587,
0.05981383100152016,
-0.8087432384490967,
-0.008885292336344719,
0.518989622592926,
-0.6676608920097351,
-0.041611742228... | |
orgin/master
TODO: needs update
app/views/static_page/index.haml: needs update
config/development.sphinx.conf: needs update
config/environment.rb: needs update
db/sphinx/development/food_description_core.spa: needs update
db/sphinx/development/food_description_core.sph: needs update
vendor/plugins/haml/init.rb: needs u... | [
-0.062036991119384766,
0.4785498082637787,
0.1878674328327179,
-0.11779920756816864,
-0.3680875599384308,
0.2536100149154663,
0.3096289336681366,
-0.35811561346054077,
-0.3574768602848053,
-0.6396896243095398,
-0.2960299849510193,
0.4258107542991638,
-0.22771672904491425,
0.112653382122516... | |
+++++++++-------
public/stylesheets/site.css | 14 ++++++++------
6 files changed, 35 insertions(+), 31 deletions(-)
create mode 160000 nutrograph
jess@home:~/Rails/nutrograph$ script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.1.2 application starting on http://0.0.0.... | [
0.029848845675587654,
-0.27801457047462463,
0.3485063314437866,
0.07710094749927521,
-0.21288415789604187,
0.061578042805194855,
0.6126508116722107,
-0.25935283303260803,
-0.09814439713954926,
-0.5880353450775146,
-0.22010208666324615,
0.4857269525527954,
-0.37359797954559326,
-0.007024493... | |
at 0.0.0.0:3000
** Use CTRL-C to stop.
Processing SiteController#index (for 127.0.0.1 at 2008-11-28 16:45:38) [GET]
Session ID: aa0ab6213969dc2ce78472f9c5f57258
Parameters: {"action"=>"index", "controller"=>"site"}
SQL (0.000153) SET NAMES 'utf8'
SQL (0.000077) SET SQL_AUTO_IS_NULL=0
StaticPage Columns (... | [
0.015286262147128582,
-0.028696928173303604,
0.616184651851654,
-0.2647489905357361,
-0.08874507248401642,
0.38366562128067017,
0.4793247878551483,
-0.33018893003463745,
-0.18393060564994812,
-0.3740256726741791,
-0.45453083515167236,
0.25979918241500854,
-0.07273431867361069,
0.1994699835... | |
up unexpectedly
jess@home:~/Rails/nutrograph$ git rebase origin/master
vendor/plugins/haml/init.rb: needs update
jess@home:~/Rails/nutrograph$ rm vendor/plugins/haml/init.rb
jess@home:~/Rails/nutrograph$ rm vendor/plugins/haml/init.rb
rm: cannot remove `vendor/plugins/haml/init.rb': No such file or directory
jess@hom... | [
-0.23224899172782898,
0.25321096181869507,
0.32777392864227295,
-0.25821906328201294,
-0.23201695084571838,
0.08587085455656052,
0.45314082503318787,
-0.4095294773578644,
-0.20288676023483276,
-0.40117716789245605,
-0.1273675113916397,
0.3741699457168579,
-0.3228098452091217,
0.13784423470... | |
sounds like you need to set the line ending options in Windows:
```
git config core.autocrlf true
```
This will convert the line endings from LF to CRLF on Windows and back again on `git add`. Without this, git thinks that you changed the whole file's line endings from LF to CRLF, which is likely to cause merge conf... | [
0.20521873235702515,
-0.09725464135408401,
0.23411552608013153,
0.06489124149084091,
-0.030308905988931656,
-0.025808211416006088,
0.21342505514621735,
0.18578042089939117,
-0.13359780609607697,
-0.8187749981880188,
-0.24416400492191315,
0.5242091417312622,
-0.3325537443161011,
0.222553938... | |
What best practices should be observed when implementing HDL code?
What are the commonalities and differences when compared to more common software development fields?
The best book on this topic is [Reuse Methodology Manual](http://www.amazon.com/exec/obidos/tg/detail/-/1402071418/ref=ase_penguintelecomin/102-8353601... | [
0.414664089679718,
-0.2475576251745224,
0.33416396379470825,
0.20552179217338562,
-0.2127227783203125,
-0.2778593897819519,
0.11620014160871506,
-0.5131645202636719,
-0.11571108549833298,
-0.6846697330474854,
-0.20332087576389313,
0.660246729850769,
-0.09354588389396667,
-0.207653462886810... | |
Have code reviews
* Test (simulate) your code
* Reuse code when appropriate
* Have an up-to-date schedule
* Have a spec or use cases or an Agile customer | [
0.7893873453140259,
0.09495193511247635,
0.16973337531089783,
0.23169071972370148,
0.039053160697221756,
-0.2332185059785843,
0.30274176597595215,
-0.18141722679138184,
0.020731542259454727,
-0.8335365653038025,
-0.25081756711006165,
0.6673600077629089,
0.4236772656440735,
-0.2962274849414... | |
Here's my problem.I have 2 xmlfiles with identical structure, with the second xml containing only few node compared to first.
File1
```
<root>
<alpha>111</alpha>
<beta>22</beta>
<gamma></gamma>
<delta></delta>
</root>
```
**File2**
```
<root>
<beta>XX</beta>
<delta>XX</delta>
</root>
... | [
-0.06060485541820526,
0.11443475633859634,
0.02339550293982029,
-0.0741935595870018,
-0.21121931076049805,
0.06519344449043274,
0.10051635652780533,
-0.22929292917251587,
-0.13615675270557404,
-0.9140273332595825,
0.10477219521999359,
0.32502058148384094,
-0.33023807406425476,
-0.042554277... | |
my luck with Microsoft XmlDiff API but it didn't work out for me(the patch process didn't apply changes to the source doc). Also I'm a bit worried about the DOM approach that it uses, because of the size of the xml that I'll be dealing with.
Can you please suggest a good way of doing this.
I'm using C# 2
Here is a litt... | [
0.16984739899635315,
-0.19752435386180878,
0.4757145047187805,
-0.18937601149082184,
-0.2324070781469345,
-0.10434076935052872,
0.23052741587162018,
-0.5101009011268616,
-0.006236022338271141,
-0.6444518566131592,
-0.10421717911958694,
0.7865852117538452,
-0.35130009055137634,
0.1627308428... | |
select="document('File2.xml')"/>
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="*[not(text())]">
<xsl:copy>
<xsl:copy-of
select="$vFile2/*/*[name() = name(curre... | [
0.18203718960285187,
-0.2714459002017975,
0.47231122851371765,
-0.19486768543720245,
-0.04345354437828064,
0.026037074625492096,
-0.12272407859563828,
-0.871182382106781,
-0.12868808209896088,
-0.6153534054756165,
-0.3829514980316162,
0.4403570890426636,
-0.428109735250473,
-0.046911809593... | |
<beta>22</beta>
<gamma></gamma>
<delta></delta>
</root>
```
produces the wanted result:
```
<root>
<alpha>111</alpha>
<beta>22</beta>
<gamma></gamma>
<delta>XX</delta>
</root>
``` | [
-0.15677016973495483,
0.02243860810995102,
0.09671276062726974,
-0.20528742671012878,
-0.18224549293518066,
0.42544791102409363,
-0.08271913975477219,
-0.6119162440299988,
-0.17382189631462097,
-0.6253873705863953,
-0.3917200565338135,
-0.16546028852462769,
-0.3828657567501068,
0.135195851... | |
Given that I only have one monitor, what's the best way to debug a program which uses the entire screen (such as a DirectX application)? Tools such as the step-by-step debugger seem useless in this context. Also, printing to the console isn't as effective, since you can only look at the console once the application has... | [
0.27950629591941833,
0.03446584567427635,
0.44623178243637085,
0.15811720490455627,
-0.03628038242459297,
0.033606842160224915,
0.27479124069213867,
0.02913888357579708,
-0.2049529254436493,
-0.5827778577804565,
0.05382264032959938,
0.6529886722564697,
-0.2886088788509369,
0.27772954106330... | |
I've been wondering this for some time. As the title say, which is faster, the actual function or simply raising to the half power?
**UPDATE**
This is not a matter of premature optimization. This is simply a question of how the underlying code actually works. What is the theory of how Python code works?
I sent Guido... | [
0.15191544592380524,
0.18684063851833344,
0.031004581600427628,
0.01899329200387001,
-0.25574246048927307,
0.21653074026107788,
0.42427918314933777,
-0.3116140067577362,
-0.21922567486763,
-0.4153963327407837,
0.14150434732437134,
0.43672019243240356,
-0.10624135285615921,
-0.1430084556341... | |
the implementation of each of these. When it comes to efficiency which
> is better?
### His response:
> pow and \*\* are equivalent; math.sqrt doesn't work for complex numbers,
> and links to the C sqrt() function. As to which one is
> faster, I have no idea...
**`math.sqrt(x)` is significantly faster than `x**0.5... | [
-0.11331462860107422,
0.18642710149288177,
0.3323041796684265,
0.015590842813253403,
-0.18304847180843353,
0.3403991162776947,
0.5776422619819641,
-0.6298767924308777,
-0.2733953595161438,
-0.7274321913719177,
-0.03284651041030884,
0.6919853687286377,
-0.21522054076194763,
-0.1063342317938... | |
I can find tutorials about mapping textures to polygons specifying vertices etc. but nothing regarding how to apply a texture to a cube (or other stuff) drawn with glut (glutSolidCube).
I am doing something like:
```
glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, decal);
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WR... | [
-0.06885794550180435,
0.05246870964765549,
0.6796227693557739,
-0.27111783623695374,
-0.49748852849006653,
0.34347671270370483,
0.31365492939949036,
-0.10772742331027985,
-0.3188878893852234,
-1.0351451635360718,
-0.1439269632101059,
0.6547707915306091,
-0.19698533415794373,
0.067716918885... | |
does not generate texture coordinates. Fortunately, though, `glutSolidCube()` is easy to implement yourself and add texture coordinates. Here's the source code to `glutSolidCube()` and associated functions, from [<http://www.opengl.org/resources/libraries/glut/>](http://www.opengl.org/resources/libraries/glut/):
```
/... | [
-0.4432307183742523,
0.43829843401908875,
0.7156915664672852,
-0.1497291773557663,
-0.03938497602939606,
0.09378509223461151,
-0.3787643015384674,
0.38454166054725647,
-0.22914807498455048,
-0.6385144591331482,
-0.49203118681907654,
0.319187730550766,
-0.47461172938346863,
0.34398978948593... | |
(c) Copyright 1993, Silicon Graphics, Inc.
ALL RIGHTS RESERVED | [
-0.028929099440574646,
0.5519380569458008,
-0.17862430214881897,
0.19953490793704987,
0.4781794250011444,
-0.532961368560791,
-0.26137587428092957,
0.37566569447517395,
-0.24040533602237701,
0.22658038139343262,
-0.5076904892921448,
0.5185897350311279,
-0.05934998765587807,
0.6238757371902... | |
Permission to use, copy, modify, and distribute this software
for any purpose and without fee is hereby granted, provided
that the above copyright notice appear in all copies and that | [
0.29629993438720703,
0.6616509556770325,
0.14182162284851074,
-0.09560196101665497,
0.5796349048614502,
-1.0688185691833496,
-0.03740244358778,
0.7658695578575134,
-0.11964724957942963,
0.056298691779375076,
-1.1214758157730103,
-0.07803131639957428,
0.09350119531154633,
0.3590252697467804... | |
both the copyright notice and this permission notice appear in
supporting documentation, and that the name of Silicon
Graphics, Inc. not be used in advertising or publicity
pertaining to | [
0.4960508942604065,
0.4778599143028259,
0.07297970354557037,
0.1393275260925293,
0.2550436556339264,
-0.33582010865211487,
-0.4894190728664398,
0.3807058334350586,
-0.28672242164611816,
0.2033318728208542,
-0.35211145877838135,
0.3776783347129822,
0.05796021595597267,
0.48851555585861206,
... | |
distribution of the software without specific,
written prior permission.
THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPO... | [
0.6577199101448059,
0.2731645107269287,
0.24350948631763458,
0.07918453961610794,
0.36521053314208984,
-0.35238999128341675,
-0.44105079770088196,
0.5245348811149597,
-0.4203529953956604,
-0.07891925424337387,
-0.7526094913482666,
0.4231158494949341,
-0.056954268366098404,
0.30995401740074... | |
OF THIRD PARTIES, WHETHER OR
NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY
OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
PERFORMANCE OF THIS SOFTWARE.
US Government Users Restricted Rights
Use, duplication, or disclosure by t... | [
0.47058287262916565,
0.34914129972457886,
0.15824997425079346,
0.40816208720207214,
0.9121745228767395,
-0.0763688012957573,
-0.8131222128868103,
0.19514130055904388,
-0.12221647799015045,
0.14013181626796722,
-0.7288399934768677,
0.45156168937683105,
0.15599077939987183,
0.213532567024230... | |
2011 N. Shoreline Blvd., Mountain View, CA
94039-7311.
OpenGL(TM) is a trademark of Silicon Graphics, Inc.
*/
static void
drawBox(GLfloat size, GLenum type)
{
static GLfloat n[6][3] =
{
{-1.0, 0.0, 0.0},
{0.0, 1.0, 0.0},
{1.0, 0.0, 0.0},
{0.0, -1.0, 0.0},
{0.0, 0.0, 1.0},
{0.0, 0.0, -1.0}... | [
0.30795541405677795,
0.07218733429908752,
0.6776131391525269,
0.03712959587574005,
-0.16165857017040253,
0.04412342980504036,
-0.18701617419719696,
0.3527926802635193,
-0.05244743078947067,
-0.3889451026916504,
0.06286580860614777,
0.23240695893764496,
-0.03665357828140259,
0.2669715285301... | |
{5, 6, 2, 1},
{7, 4, 0, 3}
};
GLfloat v[8][3];
GLint i;
v[0][0] = v[1][0] = v[2][0] = v[3][0] = -size / 2;
v[4][0] = v[5][0] = v[6][0] = v[7][0] = size / 2;
v[0][1] = v[1][1] = v[4][1] = v[5][1] = -size / 2;
v[2][1] = v[3][1] = v[6][1] = v[7][1] = size / 2;
v[0][2] = v[3][2] = v[4][2] = v[7][2] = -... | [
0.2262471467256546,
-0.13918808102607727,
0.5111915469169617,
-0.207841157913208,
-0.29703181982040405,
0.4355219602584839,
0.16324332356452942,
-0.8087906241416931,
-0.2123623639345169,
-0.3527221083641052,
-0.5680838823318481,
0.7968938946723938,
-0.04133132845163345,
0.05572626367211342... | |
0; i--) {
glBegin(type);
glNormal3fv(&n[i][0]);
glVertex3fv(&v[faces[i][0]][0]);
glVertex3fv(&v[faces[i][1]][0]);
glVertex3fv(&v[faces[i][2]][0]);
glVertex3fv(&v[faces[i][3]][0]);
glEnd();
}
}
void APIENTRY
glutSolidCube(GLdouble size)
{
drawBox(size, GL_QUADS);
}
```
Just add in some... | [
-0.27579063177108765,
-0.33135366439819336,
0.9106355309486389,
-0.14989696443080902,
-0.18745312094688416,
0.0059782350435853004,
0.29877132177352905,
-0.4630231261253357,
-0.12224334478378296,
-0.6199910044670105,
-0.3420414626598358,
0.6817174553871155,
-0.12725871801376343,
0.238819405... | |
Say I have a controller with an Index Method and a Update Method. After the Update is done I want to redirect to Index(). Should I use return RedirectToAction("Index") or can I just call return Index()? Is there a difference?
```
public ActionResult Index()
{
return View("Index", viewdata);
}
public ActionResult Up... | [
-0.08982167392969131,
-0.4481103718280792,
0.8220255374908447,
-0.050160251557826996,
0.050730638206005096,
-0.035011693835258484,
0.03843739256262779,
-0.10859246551990509,
-0.35052987933158875,
-0.6004564166069031,
-0.09953440725803375,
0.8284627795219421,
-0.5004186034202576,
0.28960695... | |
Using Morph Labs' Appspace to deploy a site means no automated way to redirect 'myapp.com' to 'www.myapp.com' (and no access to .htacess).
Is there an in-rails way to do this? Would I need a plugin like [subdomain-fu](http://github.com/mbleigh/subdomain-fu/tree/master)?
More specifically, I'm trying to do something l... | [
0.3898085951805115,
-0.0613093376159668,
0.5868939161300659,
-0.054326415061950684,
-0.2318229228258133,
-0.13699056208133698,
0.4756753742694855,
-0.0785609632730484,
-0.2940826714038849,
-0.9320384860038757,
-0.23672078549861908,
0.282970130443573,
-0.4574788212776184,
0.1735186129808426... | |
end
end
``` | [
0.2759731113910675,
0.3880344033241272,
0.6116671562194824,
0.22113806009292603,
-0.026055289432406425,
-0.44838380813598633,
0.2547377049922943,
-0.09916635602712631,
0.4964084327220917,
-0.5618393421173096,
-0.2977893054485321,
0.37692439556121826,
0.12217557430267334,
0.3536905944347381... | |
I have an ASP.NET page that uses a repeater nested within another repeater to generate a listing of data. It's to the effect of the following:
```
<asp:Repeater>
<ItemTemplate>
<span><%#Eval("Data1") %></span>
<!-- and many more -->
<asp:Repeater DataSource='<%#Eval("Data2")%>'>
... | [
0.08127125352621078,
-0.17785249650478363,
0.541437566280365,
0.1278611719608307,
-0.09792163968086243,
0.04824090749025345,
0.009762636385858059,
-0.40366262197494507,
-0.2877539396286011,
-0.7733779549598694,
0.2943701148033142,
0.04806085675954819,
-0.11490663141012192,
0.20126645267009... | |
<ItemTemplate>
<li><%#Container.DataItem%></li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
```
In the (C#) code-behind I'm basically using LINQ to | [
-0.059709448367357254,
0.10434722900390625,
0.6389712691307068,
-0.03826751932501793,
-0.07656262814998627,
0.22064760327339172,
-0.5540064573287964,
-0.2583184242248535,
-0.19417701661586761,
-0.5753872394561768,
0.20862571895122528,
0.33331525325775146,
0.06753234565258026,
0.03112661838... | |
pull a listing of information from an XML document and bind that information to the first repeater.
Searching for the answer to this, it seems the method is to determine whether the data for the nested repeater is empty. If it is, then you set the visibility of the repeater to false.
Unfortunately, I haven't been abl... | [
0.18285730481147766,
-0.09345199912786484,
0.5116031169891357,
0.08872143179178238,
-0.21789558231830597,
0.13174456357955933,
0.05704433098435402,
-0.1540203094482422,
-0.18535687029361725,
-0.5904781818389893,
0.23517166078090668,
0.3355408012866974,
-0.32070472836494446,
0.3507034480571... | |
an unordered list, I seek your help.
Any ideas?
Thanks!
UPDATE:
If it helps, since it could very well be possible to do in the code-behind, the LINQ is something to this effect:
```
var x = from y in z
select new {
Data1 = d,
// etcetera
Data2 = (from j in k
where j.Value !=... | [
0.2950700521469116,
-0.1148991659283638,
0.28011181950569153,
0.10078326612710953,
0.18893679976463318,
-0.08162271976470947,
0.24189375340938568,
-0.06717436015605927,
-0.2829776704311371,
-0.6030892729759216,
-0.27366697788238525,
0.5676581859588623,
-0.2759098708629608,
0.02463063970208... | |
j.Value).ToList()
};
blah.DataSource = x;
blah.DataBind();
```
This won't **hide** the repeater completely, but you can subclass the Repeater control so that it includes a GridView-like empty data template:
```
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
public class EmptyCapableRepeater... | [
0.09366752207279205,
-0.2772708535194397,
0.5578727126121521,
-0.20489807426929474,
0.27902302145957947,
0.03967665135860443,
0.2579821050167084,
-0.39214396476745605,
-0.24836868047714233,
-0.5925642848014832,
-0.32187914848327637,
0.5612142086029053,
-0.37683725357055664,
0.3956568241119... | |
EmptyDataTemplate.InstantiateIn( this );
}
}
}
```
You can them use it in your .aspx like this:
```
<custom:EmptyCapableRepeater runat="server" ID="rptSearchResults">
<ItemTemplate>
<%# Eval( "Result" )%>
</ItemTemplate>
<SeparatorTemplate>
<br />
</SeparatorTemplate>
... | [
-0.36466917395591736,
0.01575358957052231,
0.6852520108222961,
-0.12001015990972519,
-0.06960754096508026,
0.041477374732494354,
0.000018574733985587955,
-0.3737415075302124,
-0.39100927114486694,
-0.5375239849090576,
-0.07724795490503311,
0.39680010080337524,
-0.3003360331058502,
0.064319... | |
The list `sort()` method is a modifier function that returns `None`.
So if I want to iterate through all of the keys in a dictionary I cannot do:
```
for k in somedictionary.keys().sort():
dosomething()
```
Instead, I must:
```
keys = somedictionary.keys()
keys.sort()
for k in keys:
dosomething()
```
Is ... | [
-0.1854153722524643,
0.16727136075496674,
0.45863261818885803,
-0.252351850271225,
-0.21109937131404877,
0.07179366052150726,
0.4108249545097351,
-0.5371907353401184,
-0.5012441873550415,
-0.5309724807739258,
-0.16120286285877228,
0.5376192927360535,
-0.4373524785041809,
0.0944044142961502... | |
Now I have a stack of free time on my hands, I wanna get into iphone dev fo real.
But Objective C scares me (a bit). It feels I'm going a bit back in time. I say this because I've spent the last 8 months coding in C++.
[JSCocoa](http://inexdo.com/JSCocoa) looks awesome, but does this actually work on the iphone?
Wha... | [
0.1343073695898056,
0.09042834490537643,
0.17404453456401825,
0.08953367173671722,
0.19941368699073792,
-0.06520796567201614,
0.35842111706733704,
0.4541705548763275,
-0.11018558591604233,
-0.6344125270843506,
0.2314644157886505,
0.7019484043121338,
-0.03344354033470154,
-0.501618683338165... | |
<http://code.google.com/p/iphone-dev/source/browse/trunk/llvm-gcc-4.0-iphone/> and some libffi posts regarding Python for iPhone, but have not tested any further.
Also I don't own an iPhone, so testing will mostly be up to someone who owns one :) | [
0.3029595613479614,
0.38415515422821045,
0.20729908347129822,
-0.20597977936267853,
0.16841009259223938,
0.21695104241371155,
0.3642747402191162,
0.20473037660121918,
-0.5295506715774536,
-0.1107998862862587,
0.07204415649175644,
0.6065335273742676,
-0.1148628294467926,
-0.389877587556839,... | |
Does anyone know of a library or set of classes for splines - specifically b-splines and NURBS (optional).
A fast, efficient b-spline library would be so useful for me at the moment.
1.) For B Splines - You should check Numerical Recipes in C (there is book for that and it is also available online for reference)
2.)... | [
0.5128165483474731,
0.0870310515165329,
0.24378903210163116,
-0.014999037608504295,
-0.31918179988861084,
-0.18657232820987701,
0.28348788619041443,
-0.42605286836624146,
-0.025422783568501472,
-0.49286672472953796,
0.05464092269539833,
0.1379178762435913,
-0.3060566484928131,
-0.253802537... | |
Is there any supported way of mapping datetimeoffset the new datatype in SQL 2008 to the System.DateTimeOffset using nhibernate?
NH 2.1 (or compiling from NHibernate trunk) supports this and more out-of-the-box. [Check it out](http://nhforge.org/blogs/nhibernate/archive/2009/03/11/nhibernate-and-ms-sql-server-2008-date... | [
-0.5073409676551819,
-0.1733693927526474,
0.4510992169380188,
-0.04450512304902077,
-0.10865861177444458,
-0.1323224902153015,
0.18038678169250488,
0.06305275857448578,
-0.29437798261642456,
-0.32763180136680603,
-0.017290670424699783,
0.2854291498661041,
-0.20899270474910736,
0.0792848095... | |
I'm thinking of asking my students to use git for pair programming. Because student work has to be secret, a public repo is out of the question. Instead, each student will have a private repo they maintain themselves, and they will need to exchange patches using git-format-patch. I've read the man page but I'm a little... | [
0.6801522970199585,
-0.20842216908931732,
0.3325975835323334,
0.018346622586250305,
-0.09831718355417252,
0.146939218044281,
0.13850459456443787,
-0.05684652179479599,
-0.3592663109302521,
-0.8573223352432251,
-0.2736889719963074,
0.42462432384490967,
-0.007413484621793032,
0.0896828174591... | |
they last for a couple of weeks and are small, and **performance is not a criterion**.) Our best friend is **simplicity** and we are fond of brute force as well.
Can anyone give me a short series of examples that show two people, each with a private git repo, exchanging patches using git-format-patch and git-am? Or al... | [
0.21130117774009705,
-0.37557128071784973,
0.1771245300769806,
0.20031748712062836,
-0.09494917094707489,
0.1257186383008957,
0.26709550619125366,
-0.10205171257257462,
-0.1919737160205841,
-0.698608934879303,
-0.22859026491641998,
0.5198974609375,
0.287759393453598,
-0.44259408116340637,
... | |
things are a bit more difficult...
One thing they may do is maintain a reference to the last time they did a format patch. Let's say they start by just sending their entire tree (including .git):
```
tar cvf - mytree | gzip -9vc > /tmp/mytree.tgz
# mail /tmp/mytree.tgz
git tag last-send
# hack, commit, hack, commit
g... | [
0.482601135969162,
0.10301434993743896,
0.4549066424369812,
-0.288234144449234,
-0.09666093438863754,
-0.04172753542661667,
0.2906799912452698,
-0.14468231797218323,
-0.4354519248008728,
-0.7353902459144592,
-0.15939676761627197,
0.8027252554893494,
-0.01930071972310543,
-0.149275094270706... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.