text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
"pick up" its hold on the read lock in the same state afterwards?
Since this ReadWriteLock implementation was specifically designed to be reentrant, surely there is some sensible way to elevate a read lock to a write lock when the locks may be acquired reentrantly? This is the critical part that means the naive approa... | [
0.016496064141392708,
-0.11246892064809799,
0.4446893036365509,
0.01552312821149826,
0.3143840432167053,
-0.21819815039634705,
0.4053472876548767,
-0.4586736559867859,
-0.1513555347919464,
-0.30503833293914795,
-0.1458016335964203,
0.6088191270828247,
-0.11291886866092682,
0.18058723211288... | |
number of holds for the current thread, and thus I can release the readlock this many times (and reacquire it the same number afterwards). So this works, as shown by a quick-and-dirty test:
```
final int holdCount = lock.getReadHoldCount();
for (int i = 0; i < holdCount; i++) {
lock.readLock().unlock();
}
lock.writ... | [
-0.014333021827042103,
-0.12275072932243347,
0.7314140200614929,
-0.23305679857730865,
0.4523078203201294,
0.10523096472024918,
0.5626165270805359,
-0.4645708203315735,
-0.27383267879486084,
-0.5003131628036499,
-0.2257138043642044,
0.5932866334915161,
-0.08877478539943695,
0.3584878742694... | |
I can do? It doesn't feel very elegant, and I'm still hoping that there's a way to handle this in a less "manual" fashion. | [
0.49411672353744507,
0.17031612992286682,
0.20395109057426453,
0.01675201766192913,
0.49064546823501587,
-0.0920785665512085,
0.22228355705738068,
-0.28293949365615845,
-0.20969127118587494,
-0.5221498012542725,
0.19415107369422913,
0.2890525162220001,
0.29597845673561096,
0.09526707231998... | |
I have my own game engine using C++ and OpenGL, but I have models with individual pieces that can be moved, and Im not sure how to animate them without hardcoding it. Are there any libraries that would provide a solution via scripts or IK or some other animation technique without resorting to a game engine such as Ogre... | [
0.39841559529304504,
0.07611240446567535,
0.16367466747760773,
0.028675099834799767,
-0.10238499194383621,
0.5327745676040649,
-0.28175443410873413,
0.10312150418758392,
-0.11229448765516281,
-0.78606778383255,
0.1938045620918274,
0.6633698344230652,
-0.12682896852493286,
-0.03010720200836... | |
hi im trying to using flashVars however for some reason there not getting sent to my flex app.
Im embedding my object in a velocity file and here is the object embed code;
```
<object width="$!WIDTH" height="$!HEIGHT">
<param name="flashVars" value="maximizeUrl=http://maximizeUrl"/>
<param name="movie"... | [
0.04768238216638565,
0.06721499562263489,
0.9359646439552307,
-0.12991677224636078,
-0.26604127883911133,
-0.17341205477714539,
0.12146268784999847,
-0.6012942790985107,
-0.0801941379904747,
-0.5647051334381104,
0.12918005883693695,
0.7416430711746216,
-0.21502161026000977,
-0.037785258144... | |
<param name="flashVars" value="maximizeUrl=http://maximizeUrl"/>
<param name="movie" value="$!SRC"/>
<embed src="$!SRC" width="$!WIDTH" height="$!HEIGHT" flashVars="maximizeUrl=http://maximizeUrl"/>
</object>
```
Alternatively, you could use [SWFObject](http://code.google.com/p/swfobject/) to dynamical... | [
0.4326089024543762,
0.19974425435066223,
0.4825866222381592,
-0.3504785895347595,
-0.17075707018375397,
0.09954336285591125,
-0.06854129582643509,
-0.6721022129058838,
-0.22174550592899323,
-0.263042688369751,
-0.029099538922309875,
0.586709201335907,
-0.2210557460784912,
-0.16072353720664... | |
I have a list with 15 numbers, and I need to write some code that produces all 32,768 combinations of those numbers.
I've found [some code](http://desk.stinkpot.org:8080/tricks/index.php/2008/04/get-all-possible-combinations-of-a-lists-elements-in-python/) (by Googling) that apparently does what I'm looking for, but I... | [
0.5282166004180908,
0.29311704635620117,
0.16671474277973175,
0.031184539198875427,
-0.08764705806970596,
0.31252598762512207,
0.2202318012714386,
-0.2678661346435547,
-0.7561455965042114,
-0.4054069519042969,
0.09592903405427933,
0.16047553718090057,
-0.4461435377597809,
0.082924798130989... | |
Using `map()`, maybe?
Have a look at [itertools.combinations](http://docs.python.org/library/itertools.html#itertools.combinations):
> ```
> itertools.combinations(iterable, r)
>
> ```
>
> Return r length subsequences of elements from
> the input iterable.
>
>
> Combinations are emitted in lexicographic sort orde... | [
0.30137601494789124,
0.011872646398842335,
0.2866159975528717,
-0.17422138154506683,
0.32632261514663696,
0.29667574167251587,
0.07055109739303589,
-0.7334153652191162,
-0.4772786498069763,
-0.42587560415267944,
-0.15588678419589996,
0.6789063215255737,
-0.2606295645236969,
-0.501241803169... | |
I was told that in c# attributes are not allowed on the auto-implemented properties. Is that true? if so why?
EDIT: I got this information from a popular book on LINQ and could not believe it!
EDIT: Refer page 34 of LINQ Unleashed by Paul Kimmel where he says "*Attributes are not allowed on auto-implemented properties... | [
0.492567777633667,
0.31747767329216003,
-0.2354520559310913,
0.0702829360961914,
-0.2518651485443115,
-0.16461260616779327,
0.1803601086139679,
-0.37159526348114014,
-0.19889017939567566,
-0.13132694363594055,
-0.14508000016212463,
0.852211594581604,
-0.3677835166454315,
-0.027582362294197... | |
void Main(string[] args)
{
var property = typeof(Test).GetProperty("Foo");
var attributes = property.GetCustomAttributes
(typeof(DescriptionAttribute), false);
foreach (DescriptionAttribute description in attributes)
{
Console.WriteLine(description.Descri... | [
0.36384737491607666,
0.1327611356973648,
0.22501713037490845,
-0.16174763441085815,
0.26732686161994934,
-0.17302928864955902,
0.6531708836555481,
-0.22774967551231384,
0.15157532691955566,
-0.5900627374649048,
-0.34292832016944885,
0.6177698373794556,
-0.36207863688468933,
0.3023613095283... | |
as an erratum. If he meant that you can't apply an attribute to the *field*, this will give him a chance to explain more carefully. | [
0.4300858676433563,
0.09437167644500732,
-0.021202024072408676,
-0.031057406216859818,
-0.23926113545894623,
0.034172412008047104,
0.32411497831344604,
-0.26484012603759766,
-0.11457118391990662,
-0.35532286763191223,
-0.11201754957437515,
0.293810099363327,
0.016046112403273582,
-0.051678... | |
I am trying to convert some [VBA](http://en.wikipedia.org/wiki/Visual_Basic_for_Applications) code to C#. I am new to C#. Currently I am trying to open an Excel file from a folder and if it does not exist then create it. I am trying something like the following. How can I make it work?
```
Excel.Application objexcel;
... | [
0.4312726557254791,
0.16310377418994904,
0.4164172112941742,
-0.2476251870393753,
0.022025370970368385,
0.2902924716472626,
0.4694856107234955,
-0.22832393646240234,
-0.10482906550168991,
-0.8676460385322571,
-0.27803340554237366,
0.6193703413009644,
-0.34459754824638367,
-0.02006788924336... | |
Cloud > Office/SharePoint Development.
After that create a generic .NET project and add a reference to `Microsoft.Office.Interop.Excel` via 'Add Reference... > Assemblies' dialog.
```
Application excel = new Application();
Workbook wb = excel.Workbooks.Open(path);
```
`Missing.Value` is a special reflection struct ... | [
0.4473152458667755,
0.20299413800239563,
0.7424732446670532,
0.025698693469166756,
0.2438592165708542,
-0.05362258478999138,
0.03510408103466034,
-0.16514809429645538,
-0.2482852339744568,
-0.7416991591453552,
-0.3632904887199402,
0.2217387706041336,
-0.29967227578163147,
-0.05952418595552... | |
I need lessons in memory management. I have an application that uses multiple views (around 10), some of these are attached to tab controller. Problem is that I'm using images (many images that I load from a web service). I'm facing the following issues.
1. The memory keeps increasing when I scroll in the table view (... | [
0.2615066468715668,
-0.1743832230567932,
0.4141954183578491,
0.31211337447166443,
-0.09586407244205475,
0.0991579219698906,
0.3126877248287201,
-0.06782469153404236,
-0.3799575865268707,
-0.5786262154579163,
0.4231870174407959,
0.7484972476959229,
-0.10301573574542999,
0.16078342497348785,... | |
I get rid of these objects?
3. How can I tell the NSAutoreleasePool to periodically release the objects that are not being used? I think this can help me get rid of wired memory. But can I do that?
Is there any example by Apple or someone else (book or online articles) explaining how to use Instruments (in a little de... | [
0.3890988230705261,
0.08680549263954163,
0.3595225512981415,
0.5266702771186829,
0.031111186370253563,
-0.21049831807613373,
0.3784881830215454,
-0.2161405235528946,
-0.06272884458303452,
-0.40849587321281433,
0.022967424243688583,
0.7119560241699219,
-0.07771401852369308,
0.11319977045059... | |
or worse not everyone's going to completely avoid autorelease-- if for no other reason than because Apple provides so many convenience methods that hand you autoreleased objects.
You can't just tell the autorelease pool to free up any objects that you're not using. There's no garbage collection, and how else is it goi... | [
0.4126930236816406,
0.14316731691360474,
0.18595494329929352,
0.37946441769599915,
-0.10166899114847183,
-0.10754247009754181,
0.31362488865852356,
0.15958338975906372,
-0.5552067756652832,
-0.541533350944519,
-0.18427638709545135,
0.5648567080497742,
-0.4546608626842499,
0.152461335062980... | |
start of the block (just alloc/init it, no magic required) and then releasing the pool at the end of the block. And voila, and objects in the pool are also released.
Autorelease pools nest, so keep that in mind if you do this. If you release an autorelease pool, make sure it's the most-recently-allocated pool and not ... | [
0.2920363247394562,
-0.5128878951072693,
0.42962804436683655,
0.10491465032100677,
0.02664267271757126,
0.07182931900024414,
0.06390204280614853,
-0.4018420875072479,
-0.2989177107810974,
-0.5020922422409058,
-0.3514198064804077,
0.21682485938072205,
-0.08255750685930252,
-0.16453745961189... | |
Actually i'm working with C# and already got DataBinding and Serialization to work. But now i'd like to combine both methods in one class and i have a little problem with it.
So let's start with a little sample class:
```
using System;
using System.Runtime.Serialization;
using System.Windows.Forms;
namespace MySampl... | [
-0.034427762031555176,
-0.11105691641569138,
0.33123070001602173,
-0.010497255250811577,
-0.05894753709435463,
-0.22084034979343414,
0.20874913036823273,
-0.3769865334033966,
-0.06699783354997635,
-0.7516911625862122,
-0.04352419823408127,
0.47010570764541626,
-0.3231410086154938,
0.402673... | |
private DateTime creationTime;
[System.ComponentModel.Browsable(false)]
public virtual ExtensionDataObject ExtensionData { get; set; }
public event EventHandler CreationTimeChanged;
public SerializeAndBind()
{
CreationTime = DateTime.Now;
}
public ... | [
0.10852470248937607,
-0.5640446543693542,
0.3168749511241913,
-0.026897884905338287,
0.4261893630027771,
-0.10171521455049515,
0.2348584532737732,
0.1575608104467392,
-0.27190539240837097,
-0.4495480954647064,
-0.4377472400665283,
0.6783338189125061,
-0.09426072984933853,
0.424981653690338... | |
: this()
{
InitializeDataBinding(ControlName, PropertyName);
}
[DataMember]
public DateTime CreationTime
{
get
{
return creationTime; | [
0.173856720328331,
-0.4068763554096222,
0.21588967740535736,
0.0008682941552251577,
0.3890189826488495,
-0.298270046710968,
0.11770866066217422,
0.10251908004283905,
0.040610171854496,
-0.47454679012298584,
-0.4103028476238251,
0.447270929813385,
0.030489536002278328,
0.32944536209106445,
... | |
}
set
{
creationTime = value;
if (CreationTimeChanged != null)
CreationTimeChanged(this, EventArgs.Empty); | [
0.03375547006726265,
-0.363057404756546,
0.07743735611438751,
-0.17484945058822632,
0.37007951736450195,
-0.025684721767902374,
0.3103240132331848,
-0.013417697511613369,
-0.006363109219819307,
-0.3810115456581116,
-0.24999789893627167,
0.5995087027549744,
-0.35791873931884766,
0.292859047... | |
}
}
public override string ToString()
{
return CreationTime.ToString();
}
[OnDeserialized]
private void InitializeDataBindingAfterDeserialization(StreamingContext ctx)
{
if (bindedControlName != null) | [
0.0223385076969862,
-0.4323548376560211,
0.25968360900878906,
-0.1476544588804245,
0.3667293190956116,
-0.07636351883411407,
0.3682368993759155,
0.0011249688686802983,
0.0362047404050827,
-0.5261062383651733,
-0.264950156211853,
0.3811340630054474,
-0.43034306168556213,
0.5378950834274292,... | |
{
Control control;
control = FindControlByName(bindedControlName);
if(control != null)
InitializeDataBinding(control, bindedPropertyName);
} | [
-0.7145521640777588,
-0.459625780582428,
0.07359367609024048,
-0.08956670761108398,
0.1338200867176056,
-0.04102586582303047,
0.34101539850234985,
-0.3731122314929962,
0.20084266364574432,
-0.3778325915336609,
-0.4080266058444977,
0.20691744983196259,
-0.46918612718582153,
0.45910057425498... | |
}
private void InitializeDataBinding(Control ControlName, string PropertyName)
{
BindingSource bindingSource = new BindingSource();
bindingSource.DataSource = this;
Binding binding = new Binding(PropertyName, bindingSource, "CreationTime", true, DataSourceUpdateMode.... | [
-0.05399329960346222,
-0.2597103714942932,
0.40565550327301025,
-0.09746172279119492,
0.18561063706874847,
0.049422524869441986,
0.28972911834716797,
-0.49274393916130066,
-0.04784901440143585,
-0.5484111905097961,
-0.39473217725753784,
0.46047353744506836,
-0.546779215335846,
0.4912700951... | |
bindedControlName = ControlName.Name;
bindedPropertyName = PropertyName;
}
private void OnFormat(object sender, ConvertEventArgs e)
{
if (e.DesiredType == typeof(String))
{
e.Value | [
-0.04263753816485405,
-0.30852600932121277,
0.5967777371406555,
-0.2865097224712372,
0.3016967475414276,
0.00816427730023861,
0.5249939560890198,
-0.5706457495689392,
0.199697807431221,
-0.4711572229862213,
-0.49517887830734253,
0.48002347350120544,
-0.4091261923313141,
0.5465601682662964,... | |
= this.ToString();
}
}
}
}
```
As you can see this class has a ctor which takes the Control and PropertyName to which you like to bind this object. For Serialization i save the Control and PropertyName as a string (saving the whole control would be a little to much ;-)).
And i added a functio... | [
-0.01921362802386284,
-0.08077218383550644,
0.32052284479141235,
-0.11836429685354233,
0.08175088465213776,
-0.1605241447687149,
0.20464317500591278,
-0.3312428295612335,
0.032400526106357574,
-0.5630449056625366,
0.017329882830381393,
0.7563521265983582,
-0.336219847202301,
0.318634837865... | |
find the appropiate control, but for reflection i need some kind of starting point (i would say the form), but how can the class access this without knowing anything outside of itself?
Or is this just the wrong way to do it and i need a different design?
Any help would be appreciate,
Oliver
Personally, I doubt that t... | [
-0.23319338262081146,
-0.13738292455673218,
0.31251537799835205,
0.3314567506313324,
-0.03131673485040665,
-0.08438123017549515,
0.17456987500190735,
0.09415435045957565,
-0.1718815714120865,
-0.5355738401412964,
-0.1772790402173996,
0.22825713455677032,
-0.2396465539932251,
0.339370161294... | |
As such, it has no way of getting to a form, etc. You could *perhaps* do some horrible hacks with a static field (perhaps [ThreadStatic]) to hold the current form, but it would be brittle and ugly.
(I'm hopeful that somebody will have a better answer, though!) | [
0.3720897138118744,
-0.016523703932762146,
0.39097315073013306,
0.21919558942317963,
-0.04335497319698334,
-0.048299115151166916,
0.3578060269355774,
0.21430683135986328,
-0.23685404658317566,
-0.6309576630592346,
-0.033700671046972275,
-0.139875590801239,
-0.013493817299604416,
0.35187014... | |
I have a semi-large solution file in Visual Studio 2008, with around 25-30 projects in it.
I notice that a lot of times when I want to either close the solution file, or check in pending changes to TFS, VS will ask me if I want to save a particular project.
If I cancel the operation, hit Save All, then retry, it will... | [
-0.07445275038480759,
0.0743124708533287,
0.22254981100559235,
-0.06671662628650665,
-0.12101633101701736,
0.19059300422668457,
0.3040692210197449,
-0.16646602749824524,
-0.41382837295532227,
-0.5869041681289673,
0.10856688767671585,
0.5279272794723511,
-0.2168501913547516,
-0.038637377321... | |
if I want to save the project file.
What am I doing wrong?
As far as I can tell, there's nothing different about this project compared to the others.
If I close the solution (saving the project file in the process), reopens it and closes it, then it doesn't ask me, but anything done to any of the files in the entire... | [
0.3779950737953186,
0.03920437768101692,
0.37860819697380066,
0.0515892393887043,
0.16182149946689606,
-0.0595368891954422,
0.3623858392238617,
0.07008472830057144,
-0.2825925946235657,
-0.5891682505607605,
-0.14954152703285217,
0.39447885751724243,
-0.09968762844800949,
0.2101349681615829... | |
place at all, which would explain why it repeatedly asks me to save it.
If anyone can shed some light on this problem it would be nice.
---
**Edit 1:** In response to the editing of the project files to make sure it contains the `SAK` entries, all the project files in the solution already contains that. To make sure... | [
0.22637060284614563,
0.08323629200458527,
-0.21579261124134064,
0.15582725405693054,
0.29538530111312866,
-0.04874744638800621,
0.5006892681121826,
-0.09583671391010284,
-0.1856439858675003,
-0.845587432384491,
-0.41774481534957886,
-0.09960097074508667,
-0.11489465832710266,
0.00399123039... | |
around two steps:
1. Delete old generated file
2. Create new generated file
Both of these seems to change the project file momentarily, and thus it will always look changed to Visual Studio. | [
0.31842803955078125,
-0.14982299506664276,
0.2206866294145584,
0.13727165758609772,
-0.038999613374471664,
-0.28548476099967957,
0.17779585719108582,
-0.27188804745674133,
-0.20283064246177673,
-0.6800132393836975,
-0.2629131078720093,
0.4933634102344513,
-0.08169955015182495,
0.3021847605... | |
Implement an algorithm to merge an arbitrary number of sorted lists into one sorted list. The aim is to create the smallest working programme, in whatever language you like.
For example:
```
input: ((1, 4, 7), (2, 5, 8), (3, 6, 9))
output: (1, 2, 3, 4, 5, 6, 7, 8, 9)
input: ((1, 10), (), (2, 5, 6, 7))
output: (1, ... | [
0.11741757392883301,
0.22160223126411438,
0.197377011179924,
-0.18399058282375336,
-0.07372105866670609,
-0.027929363772273064,
0.0916939303278923,
-0.46917375922203064,
-0.4436146020889282,
-0.5669242143630981,
-0.14537934958934784,
0.35675984621047974,
-0.5107482671737671,
-0.19682136178... | |
(but doesn't have to be) a lot faster!
Clearly state the language, any foibles and the character count. Only include meaningful characters in the count, but feel free to add whitespace to the code for artistic / readability purposes.
To keep things tidy, suggest improvement in comments or by editing answers where app... | [
0.34302547574043274,
0.09189072996377945,
0.27937647700309753,
0.26490435004234314,
-0.18369050323963165,
-0.06593550741672516,
0.2116987109184265,
-0.1500454992055893,
-0.1580827534198761,
-0.7187778353691101,
-0.3777051568031311,
0.24248358607292175,
-0.15482184290885925,
-0.386605679988... | |
I won't retro-actively introduce a rule they break, but feel free to work to the more restrictive spec in new submissions.
---
Inspired by [Combining two sorted lists in Python](https://stackoverflow.com/questions/464342/combining-two-sorted-lists-in-python)
Common Lisp already has a `merge` function for general sequ... | [
0.26203468441963196,
0.0313277505338192,
0.3810481131076813,
-0.18925218284130096,
-0.12536153197288513,
-0.1016804426908493,
0.1888517141342163,
-0.39365673065185547,
-0.06501273810863495,
-0.6285406351089478,
-0.2779163718223572,
0.49244803190231323,
-0.4070878028869629,
-0.2482195049524... | |
(cons (merge 'list (car s) (cadr s) #'<)
(cddr s)))))
```
*edit*: Revisiting after some time: this can be done in one line:
```
(defun multi-merge (&rest lists)
(reduce (lambda (a b) (merge 'list a b #'<)) lists))
```
This has 79 essential characters with meaningful names, reducing those to a ... | [
-0.2456829994916916,
0.29519686102867126,
0.539040744304657,
-0.24502626061439514,
0.05204618349671364,
0.4883529245853424,
0.29925736784935,
-0.4320358335971832,
0.2406526654958725,
-0.6725413799285889,
-0.5628265738487244,
0.48805755376815796,
-0.2170102596282959,
-0.4553254544734955,
... | |
I'm making a script parser in python and I'm a little stuck. I am not quite sure how to parse a line for all its functions (or even just one function at a time) and then search for a function with that name, and if it exists, execute that function short of writing a massive list if elif else block....
*EDIT*
This is ... | [
0.27461716532707214,
0.17056666314601898,
0.011857130564749241,
-0.10282637923955917,
-0.22950366139411926,
0.21309839189052582,
0.3730582892894745,
0.09865579754114151,
0.018890518695116043,
-0.6683586239814758,
0.31973257660865784,
0.3645770251750946,
-0.46281155943870544,
0.068870216608... | |
run the function named in the line?
Once you get the name of the function, use a dispatch dict to run the function:
```
def mysum(...): ...
def myotherstuff(...): ...
# create dispatch dict:
myfunctions = {'sum': mysum, 'stuff': myotherstuff}
# run your parser:
function_name, parameters = parse_result(line)
# run t... | [
-0.16625143587589264,
-0.20014037191867828,
0.45010697841644287,
-0.12727835774421692,
-0.054680440574884415,
0.31705695390701294,
0.1217251867055893,
-0.36264073848724365,
-0.04328985884785652,
-0.27279913425445557,
-0.3699324429035187,
0.6120169162750244,
-0.4860643744468689,
-0.01870957... | |
your class. It can provide you with a command-line interface for your language, with tab command completion, automatically. | [
0.1387251317501068,
-0.3177562654018402,
-0.009259238839149475,
0.29917988181114197,
-0.0900321751832962,
-0.1730274260044098,
0.3184688687324524,
0.4528341591358185,
0.11599155515432358,
-0.6880437731742859,
-0.373675674200058,
0.6082495450973511,
-0.0347701720893383,
0.07745150476694107,... | |
We want to create a common document library on a certain site level and then create views on that document library in the different sub sites?
Is that possible in SharePoint?
Can it be done declaratively?
Rine
I would recommend to use the **DataFormWebPart** (requires SharePoint Designer to insert and customize the **... | [
0.15289978682994843,
-0.19011257588863373,
0.2573316693305969,
0.16629257798194885,
-0.09944208711385727,
-0.2599324882030487,
0.27432355284690857,
-0.14438529312610626,
-0.17573989927768707,
-0.7867756485939026,
0.07638059556484222,
0.47525355219841003,
0.1874207854270935,
-0.116780646145... | |
Is there a way in .NET (3.5 or less) to tell if a console application is running on x86 or x64?
Do you mean the machine or the process? Why do you want to know?
Aku's answer will tell you if the process you are in is running in a 64bit mode. On current versions of Windows this could mean either Itanuim or x64.
Your p... | [
0.031132912263274193,
0.09261448681354523,
0.4328683018684387,
0.1442006379365921,
0.3581790626049042,
0.2004229724407196,
-0.007171680685132742,
0.03637371212244034,
-0.3664233982563019,
-0.5109835863113403,
-0.04399767145514488,
0.2608793079853058,
-0.2821606397628784,
0.2130938470363617... | |
I'm in the process of trying to migrate my ASPNET site to Django. All my current data is tied up in MS SQL Server on a shared host that (helpfully) doesn't support python... I could use my existing code to export all the data but I've also stopped using Windows. The site is mainly compiled VB.NET so I'd need to install... | [
0.29095780849456787,
0.46745696663856506,
0.1468276083469391,
-0.29308581352233887,
-0.3343537151813507,
-0.1450701802968979,
0.1996629238128662,
0.2844806909561157,
-0.3890951871871948,
-0.9126116633415222,
0.2907029688358307,
0.4831039011478424,
-0.3509138524532318,
0.3901452124118805,
... | |
to JSON. SimpleJSON in Python will make it ludicrously easy to import so it seems like a plan.
So far, so good. In PHP I've managed to connect to the SQL Server and perform simple queries, but I need a list of tables so I know what data I need to copy. I want all the tables because there are legacy tables from when I ... | [
0.23912961781024933,
0.3476628363132477,
0.511415958404541,
-0.06062489002943039,
-0.17317689955234528,
-0.22666001319885254,
0.19594645500183105,
0.08401630073785782,
-0.46302592754364014,
-0.6280534267425537,
0.0146052660420537,
0.4244377613067627,
-0.23421914875507355,
-0.09456682205200... | |
TABLE
```
Secondly: In your opinion, would I be better off writing each table dump to its own .json file or should I keep it all together?
Thirdly: Am I going about this the wrong way?
```
Select table_name from information_schema.tables
```
for any given table you can get the metadata with
```
sp_help tablename
... | [
-0.05909078195691109,
0.4541079103946686,
0.3390645384788513,
0.03435872867703438,
0.011748895049095154,
-0.12999477982521057,
-0.2616581916809082,
-0.19015559554100037,
-0.5981034636497498,
-0.6610613465309143,
-0.022536085918545723,
0.05997167155146599,
-0.2993299961090088,
-0.0241394452... | |
In my company, these rules apply:
* Only testers are allowed to create issues.
* Developers must send e - mail a tester to have them create an issue.
* Developers send e - mail to technical lead for having him assign an issue to themselves for issues they think they can resolve.
* A developer cannot assign an issue to... | [
0.6643092632293701,
0.6028828024864197,
0.0721345916390419,
-0.22315698862075806,
0.08215970546007156,
-0.26917657256126404,
0.3018192946910858,
0.12125831097364426,
-0.30190399289131165,
-0.3387737274169922,
-0.19806323945522308,
0.3505598306655884,
-0.10281568765640259,
0.131664037704467... | |
All assignments must go through technical lead so he can track issues.
* Bugs that are not directly related to user interface are not entered into the system (must be resolved externally).
What bug tracking flow are you using? Does it work well for you?
We use BugZilla for bug tracking and there are rules like:
* Any... | [
0.6919884085655212,
0.015650643035769463,
0.08866840600967407,
0.3191571533679962,
0.08737657219171524,
-0.18733149766921997,
0.012917885556817055,
-0.0500626415014267,
-0.43449509143829346,
-0.5352137684822083,
0.10056959092617035,
0.5794453024864197,
-0.1763177365064621,
-0.2088971287012... | |
there is ease in routing an issue to others if a bug resides in somebody else's code. There may be circumstances when a bug needs to be fixed at more than one place i.e., there is dependency on somebody else's code to get fixed first and after that other person will fix his/her code. Under those cases, a bug gets assig... | [
0.3018772304058075,
-0.10349103063344955,
-0.14395330846309662,
0.4082448482513428,
0.19894467294216156,
0.10875651240348816,
-0.004432300105690956,
-0.057511359453201294,
-0.5863367319107056,
-0.826449990272522,
-0.3730154037475586,
0.2323606014251709,
-0.35830506682395935,
-0.03049774467... | |
issue apparently is same, the bug is cloned so that a separate track can be kept of all the changes.
* Technical leads are responsible for prioritizing the bugs based on the demand of that particular fix.
* Testers/QAEs are responsible for assigning a Severity to the bug i.e., Critical/Major/Minor etc.
* All bugs go th... | [
0.49222299456596375,
0.23606950044631958,
0.4609093964099884,
0.06511307507753372,
0.3514683246612549,
0.2673334777355194,
0.15414196252822876,
0.043024495244026184,
-0.5380663871765137,
-0.4680746793746948,
-0.2886064350605011,
0.5463434457778931,
0.14524494111537933,
0.159602090716362,
... | |
the changes simultaneously in our Source Control System (which is TFS btw) and the Bugzilla so that any changes can be traced back to the original code-change/owner if needed in the future. | [
0.16139209270477295,
-0.025223586708307266,
0.196745827794075,
0.024256153032183647,
0.3284916281700134,
-0.14567209780216217,
0.3084809184074402,
0.34881603717803955,
-0.24235355854034424,
-0.7421725392341614,
-0.27515941858291626,
0.4605771005153656,
-0.5169726014137268,
0.15740258991718... | |
I created a service and what it does is writing information into a xml file.
Sometime, it seem to happen mostly with unscheduled reboot, the service cannot start because the file used is "locked". This error happen while the system is still starting up since my service is set to "auto start".
This is under windows 20... | [
0.19081705808639526,
0.13079246878623962,
0.41050538420677185,
-0.08279839903116226,
0.10949406772851944,
-0.19509129226207733,
0.4307788610458374,
0.1195022240281105,
-0.22113901376724243,
-0.7718678712844849,
-0.1255677044391632,
0.5460157990455627,
-0.04006614163517952,
0.37617078423500... | |
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding)
at System.Data.DataTable.WriteXml(String fileName, XmlWriteMode mode, Boolean writeHierarchy)
at System.Data.DataTable.WriteXml(String fileName)
at myService.c... | [
0.1443624198436737,
-0.2657730281352997,
0.48987144231796265,
0.05244401842355728,
-0.15632669627666473,
0.24612076580524445,
0.20158033072948456,
-0.29137110710144043,
-0.3710784316062927,
-0.7101817727088928,
0.09397386014461517,
0.5694061517715454,
-0.036597900092601776,
0.5107769370079... | |
a subversion point of view. The git submodule is pegged to the revision that you give it. If "upstream" changes, then you have to update your submodule's reference.
So when we resync with the upstream subversion:
```
cd /path/to/mysvnclone
git svn rebase
git push
```
... the git project will still use the original... | [
0.03398674353957176,
-0.3126014471054077,
0.6031185388565063,
-0.00928155705332756,
-0.12375004589557648,
-0.18961495161056519,
0.25963714718818665,
-0.19271573424339294,
-0.27382996678352356,
-0.5451397895812988,
-0.30608341097831726,
0.39029109477996826,
-0.537053644657135,
0.27567800879... | |
I need to maintain session information between REST calls to an Apache server. Not having ever developed on the Apache platform I hope to find a package / module that can help facilitate session information and application security. Please target you answers for a newbie.
With our restful web services calls we simply i... | [
0.3364381194114685,
0.24160683155059814,
0.22932277619838715,
0.29162511229515076,
-0.24848824739456177,
-0.3617977797985077,
0.6892634034156799,
-0.10698102414608002,
-0.060088302940130234,
-0.5318693518638611,
0.04954183101654053,
0.5904848575592041,
-0.024148937314748764,
0.071395501494... | |
the password will be in clear text. | [
0.01337319053709507,
0.19601185619831085,
0.5511469841003418,
0.04295838251709938,
0.544438898563385,
-0.43088963627815247,
0.25599950551986694,
0.2748713195323944,
0.10511596500873566,
-0.4774670898914337,
-0.537846565246582,
0.37536245584487915,
0.19310085475444794,
-0.27235734462738037,... | |
I've not used Unit Tests before other than a quick introduction in a Uni course. I'm currently writing an application though and would like to teach myself TDD in the process. The problem is, I've no idea what to test or really how.
I'm writing a Django application, and so far have only created the models (and customi... | [
0.5347467064857483,
0.11347001045942307,
-0.03038230538368225,
0.06473864614963531,
-0.0005193148972466588,
0.1347905993461609,
0.3618815243244171,
-0.32484158873558044,
-0.04191749170422554,
-0.6173083782196045,
0.28095072507858276,
0.7338753938674927,
0.09281450510025024,
-0.119288891553... | |
ssa = SSA.objects.create(name="sdfsdf", cost_center=1111, street_num=8,
street_name="dfsdfsf Street", suburb="sdfsdfsdf",
post_code=3333)
def testResident(self):
pass
def testSSA_Client(self):
pass
```
I planned to write a function to test each model within th... | [
0.03833703324198723,
0.0014634504914283752,
0.1969175487756729,
-0.12764579057693481,
-0.2194093018770218,
0.08618544787168503,
0.5658150315284729,
-0.6872799396514893,
-0.2385713756084442,
-0.779023289680481,
-0.07768718153238297,
0.12811768054962158,
-0.3119624853134155,
-0.0332855209708... | |
a model with all of the fields completed works? That a half complete model fails? That any special cases are tested (like a null and is\_required=False)? I've trust in the ORM, which as far as I'm aware is heavily tested, so I shouldn't need to test all of the methods should I?
What do I need to test for a web applica... | [
0.3108952045440674,
0.20165325701236725,
-0.02523648925125599,
0.08392717689275742,
-0.19947804510593414,
-0.08474775403738022,
0.39409396052360535,
-0.08183299750089645,
-0.17146410048007965,
-0.3460681438446045,
0.1424550861120224,
0.6818274259567261,
-0.13909555971622467,
-0.20146740972... | |
completed works?
* That a half complete model fails?
* That any special cases are tested (like a null and is\_required=False)?
* I've trust in the ORM, which as far as I'm aware is heavily tested, so I shouldn't need to test all of the methods should I?
Not much of that.
You might test validation rules, but that isn'... | [
0.6667993664741516,
0.14614936709403992,
-0.0103916609659791,
0.25737667083740234,
-0.054870959371328354,
0.28917962312698364,
0.618252694606781,
-0.38334980607032776,
-0.2591865360736847,
-0.46265551447868347,
-0.13093779981136322,
0.351541131734848,
0.07919573038816452,
-0.33402079343795... | |
or not allowed.
For each Model class, you'll need at least one TestCase class definition. TestCases are cheap, define lots of them.
Your model embodies your "business entity" definitions. Your models will have methods that implement business rules. Your methods will do things like summarize, filter, calculate, aggre... | [
0.42559027671813965,
0.04079494997859001,
0.17035268247127533,
0.4362640678882599,
0.10636331886053085,
-0.26868999004364014,
-0.026941824704408646,
-0.472068727016449,
-0.12152531743049622,
-0.4275633692741394,
-0.05707032233476639,
0.7281384468078613,
-0.3689429759979248,
0.0811393260955... | |
method for each url. Again, one TestCase per | [
0.0003405248571652919,
0.0011154735693708062,
0.09874873608350754,
0.3196030557155609,
-0.2074786275625229,
0.23133087158203125,
0.13675808906555176,
-0.39688703417778015,
0.20065809786319733,
-0.5110052227973938,
0.09998201578855515,
0.3706315755844116,
-0.02418370731174946,
-0.1489286571... | |
I have a .Net console App which using a scheduled event will start, call a mweb service method and the close. This runs every hour/every day. Whilst there is nothing 'wrong' with the implementation I was wondering if there was any benefit to implementing this as a windows service.
Has anyone any views of what would b... | [
0.559431791305542,
-0.030275162309408188,
0.2559366524219513,
-0.19537518918514252,
-0.12468338012695312,
-0.141694575548172,
0.5541154742240906,
0.022269323468208313,
-0.09411817044019699,
-0.8286838531494141,
0.055672962218523026,
0.6106038689613342,
-0.05774461850523949,
0.2157177180051... | |
things can usually be accomplished with a Console App some command line args and the Windows Scheduler. | [
-0.0006609547999687493,
-0.09886249154806137,
0.4694773554801941,
0.2935549020767212,
0.4002648591995239,
-0.09626809507608414,
0.07563035935163498,
0.2687740623950958,
-0.10812569409608841,
-0.6738086938858032,
-0.43980804085731506,
0.7030967473983765,
-0.08151517063379288,
0.097900077700... | |
I had some sessions with developers about getting list of data with Web-Services,
they said it's depend on the type of the site, commerce, blog etc.
What is your opinion on the subject ?
Is using a Web-Service for getting big list of data is a smart way performance wise?
I would use the OUTPUT clause present in SQL SE... | [
0.26070907711982727,
0.03394361585378647,
0.40327027440071106,
0.22287021577358246,
-0.02080407366156578,
-0.32306522130966187,
-0.08682194352149963,
-0.16139766573905945,
-0.3974328339099884,
-0.46165457367897034,
-0.1387656033039093,
0.6460365056991577,
-0.20935067534446716,
0.0800040364... | |
both together. So you open a transaction, delete/insert/update with an OUTPUT clause, and the changes are made while ALSO outputting what was done. Then you can choose to rollback or commit. | [
-0.037997037172317505,
-0.2803325653076172,
0.046461187303066254,
0.04793194308876991,
0.1828220784664154,
-0.04703518748283386,
-0.11890859156847,
-0.2086062729358673,
-0.29884183406829834,
-0.4371679127216339,
-0.31810274720191956,
0.7107887268066406,
-0.38555917143821716,
0.128752186894... | |
Hello we have an SQL server application running over a low bandwith connection.
We use ADO.NET.
I was wondering if anybody has any tips on minimizing traffic over the channel.
Im looking for answers on ADO.NET/SQL-Server specific tips that make it more efficient.
Not obvious answers like "dont fetch many records".
E... | [
0.16577109694480896,
0.10877031087875366,
0.36115631461143494,
0.22180040180683136,
-0.15432921051979065,
-0.18953494727611542,
0.309525728225708,
0.16326594352722168,
-0.3960035741329193,
-0.6895356774330139,
0.12949946522712708,
0.6867370009422302,
-0.2041323184967041,
0.2081431448459625... | |
2008 onwards...
[**OUTPUT Clause (Transact-SQL)**](http://msdn.microsoft.com/en-us/library/ms177564.aspx)
Something like...
```
BEGIN TRANSACTION
DELETE [table] OUTPUT deleted.* WHERE [woof]
ROLLBACK TRANSACTION
```
INSERTs and UPDATEs can use the 'inserted' table too. The MSDN article covers it all.
**EDIT:**... | [
-0.21390751004219055,
-0.20221315324306488,
0.45761197805404663,
-0.06038379296660423,
-0.2359008938074112,
-0.15531767904758453,
-0.12674137949943542,
-0.05097039043903351,
-0.41709697246551514,
-0.3284446597099304,
-0.21652530133724213,
0.5216977000236511,
-0.12188773602247238,
0.3167154... | |
How would you implement a Plugin-system for your Java application?
Is it possible to have an easy to use (for the developer) system which achieves the following:
* Users put their plugins into a subdirectory of the app
* The Plugin can provide a configuration screen
* If you use a framework, is the license compatible... | [
0.3858143985271454,
-0.03119693323969841,
0.302691787481308,
0.04623886197805405,
0.11824505031108856,
-0.06802242249250412,
0.16327299177646637,
-0.3048627972602844,
-0.10755504667758942,
-0.9137973785400391,
-0.34449824690818787,
0.510829746723175,
-0.6229904294013977,
-0.068160109221935... | |
into JAR files. Your applications opens the JAR file and could then use an attribute from JAR manifest or the list of all files in the JAR file to find the class that implements your Plugin interface. Instantiate that class, the plugin is ready to go.
Of course you may also want to implement some kind of sandboxing so... | [
0.3462452292442322,
0.1476498693227768,
-0.011874047107994556,
-0.17174825072288513,
-0.19092734158039093,
-0.018785350024700165,
0.4009435176849365,
-0.06846598535776138,
-0.005281774327158928,
-0.5229665040969849,
0.0690445825457573,
0.4915769398212433,
-0.31819483637809753,
0.4647009074... | |
Could someone help me translate the following pseudo-code into code understood by [Helicon Tech's ISAPI\_Rewrite module](http://www.isapirewrite.com/):
```
if (domain == something.com OR domain == www.something.com)
{
// The rules inside this scope will only apply to the domain:
// something.com / www.somethin... | [
0.668533980846405,
0.10445497930049896,
0.07334880530834198,
-0.04315384849905968,
0.22650036215782166,
-0.44673630595207214,
0.20620590448379517,
-0.11146567761898041,
0.0505429171025753,
-0.5481470227241516,
0.02623762935400009,
0.4497559666633606,
-0.06356189399957657,
0.219061642885208... | |
RewriteRule /test /test/test.aspx
}
```
The [documentation](http://www.isapirewrite.com/docs/) is very confusing to me.
Any and all help is much appreciated.
Thanks for the effort Gumbo and Tomalak. Really appreciate it.
I've figured out another approach though: you put a file (httpd.ini) holding specific rewrite's... | [
0.6199628114700317,
0.08704488724470139,
0.4616968333721161,
-0.039811477065086365,
0.24069498479366302,
-0.22696815431118011,
0.25971248745918274,
-0.3733431398868561,
0.03963588923215866,
-0.6880167126655579,
0.12706057727336884,
0.5905436277389526,
-0.21443293988704681,
-0.0372814126312... | |
I am attempting to download images saved in a url to a local folder, and have made the following attempt at doing so with curl. I would like to know if it is necessary to include curl or download it seperateley, or if my function will just work. I would like to know if there are any obvious problems with my implementat... | [
0.45590031147003174,
0.08507577329874039,
0.4268449544906616,
-0.07851861417293549,
-0.16175855696201324,
-0.266810804605484,
0.44209301471710205,
0.10429809242486954,
0.09971371293067932,
-0.6442441940307617,
-0.06607741862535477,
0.5471910238265991,
-0.46647676825523376,
0.03654268383979... | |
I comment out the call the the function, otherwise I only get a blank page. Why is this
```
<?php
header("Content-Type: text/html; charset=utf-8");
if (isset($_GET["cmd"]))
$cmd = $_GET["cmd"];
else
die("You should have a 'cmd' parameter in your URL");
$pk = $_GET["pk"];
$con = mysql_connect("localhost","som... | [
0.055233195424079895,
-0.09867508709430695,
0.9436661601066589,
-0.21146786212921143,
-0.21590542793273926,
0.10430879890918732,
0.007369330618530512,
-0.0708673745393753,
0.07806583493947983,
-0.6755885481834412,
-0.5087218284606934,
0.6516866683959961,
-0.632178783416748,
0.1426493525505... | |
curl_close($ch);
$newImg = imagecreatefromstring($fileContents);
return imagejpeg($newImg, "./{$pk}.jpg",100);
}
while ($row = mysql_fetch_array($result))
{
$lastImg = $row['PIC_URL'];
savePicture($lastImg);
<div id='rightlayer'>
<img src='./".$pk.".jpg' width='".$outputWidth."' height='".$outputHeight."'... | [
-0.006374186836183071,
-0.15547719597816467,
0.9621550440788269,
-0.424967497587204,
0.06568755209445953,
-0.12947160005569458,
0.3249762952327728,
-0.393174946308136,
-0.35898610949516296,
-0.2980687618255615,
-0.12026529014110565,
0.5008884072303772,
-0.3812136650085449,
0.22604294121265... | |
I want to use dynamic mocks when testing a Silverlight application. I have tried Moq and Rhino but these frameworks assemblies cannot be added to a silverlight project as they are incompatible with the silverlight runtime.
Is there an existing silverlight mock framework (or patch for moq) that will allow me to use moc... | [
0.5344254970550537,
0.347136527299881,
-0.04168818145990372,
0.01999213732779026,
-0.24608469009399414,
0.10474895685911179,
0.3928494453430176,
-0.21842965483665466,
-0.10175944119691849,
-0.5089163184165955,
0.20125676691532135,
0.6188236474990845,
-0.5070526599884033,
-0.102959729731082... | |
How can I find out which FORM an HTML element is contained within, using a simple/small bit of JavaScript? In the example below, if I have already got hold of the SPAN called 'message', how can I easily get to the FORM element?
```
<form name="whatever">
<div>
<span id="message"></span>
</div>
</form>
... | [
0.2470347136259079,
0.08476496487855911,
0.5181512832641602,
0.04220401123166084,
-0.23932009935379028,
-0.0031261451076716185,
0.08067896962165833,
-0.24423673748970032,
-0.27509766817092896,
-0.832840085029602,
0.002320332685485482,
0.24149470031261444,
-0.10746005922555923,
-0.130271956... | |
element, would that be easier? Do they have a property which points back to the containing FORM? Google says no...
**The form a form element belongs to can be accessed through `element.form`.**
When the element you are using as reference is not a form element, you'd still have to iterate through the `parentElement` o... | [
0.00571059575304389,
0.16006959974765778,
0.20412112772464752,
0.04722709581255913,
-0.1224689707159996,
-0.08596811443567276,
0.03226785734295845,
-0.553702712059021,
-0.12116403877735138,
-0.5165831446647644,
-0.0711732879281044,
0.03886168822646141,
-0.43670138716697693,
-0.060221675783... | |
We want to be able to create log files from our Java application which is suited for later processing by tools to help investigate bugs and gather performance statistics.
Currently we use the traditional "log stuff which may or may not be flattened into text form and appended to a log file", but this works the best f... | [
0.3967396020889282,
-0.07300010323524475,
0.03273157402873039,
0.39186951518058777,
0.3375919759273529,
-0.3476250171661377,
0.09944846481084824,
0.167005255818367,
-0.2203245460987091,
-0.5359429121017456,
-0.2863315939903259,
0.5192341804504395,
-0.10712645947933197,
-0.2243424654006958,... | |
with the appropriate tool for post processing.
I'd like to use as widely supported an XML format as possible, and right now I am in the "research-then-make-decision" phase. I'd appreciate any help both in terms of XML format and tools and I'd be happy to write glue code to get what I need.
What I've found so far:
lo... | [
0.22167782485485077,
0.0919218361377716,
-0.16103115677833557,
0.27665823698043823,
-0.38910168409347534,
-0.08162383735179901,
0.047132428735494614,
-0.1614845097064972,
-0.1167650818824768,
-0.6910537481307983,
-0.13797833025455475,
0.24334581196308136,
0.026235301047563553,
0.1426021158... | |
for dealing with the extra facilities available in logback and not only the log4j things.
It is - for now - the best bet so far :)
---
I adapted the log4j xmllayout class to logback, which works with chainsaw.
---
As I have not been able to find a suitable log viewer capable of visualizing event information (inste... | [
0.00879756174981594,
-0.05687420815229416,
0.08034855872392654,
0.05795585736632347,
-0.21691735088825226,
-0.47030916810035706,
0.018211310729384422,
0.039749860763549805,
-0.20614458620548248,
-0.665465235710144,
-0.11183943599462509,
0.6600409150123596,
-0.1122509017586708,
-0.235046163... | |
It's been ages since I've written a COM dll. I've made a couple of classes now, that inherit from some COM interfaces, but I want to test it out. I know I have to put a GUID somewhere and then register it with regsvr32, but what are the steps involved?
Edit: Sorry, forgot to mention I'm using C++.
To create a new ATL ... | [
0.6209458112716675,
-0.14077529311180115,
0.1760326474905014,
-0.11179792881011963,
-0.3287927508354187,
0.27160951495170593,
0.061228614300489426,
-0.0001473646698286757,
-0.3168296813964844,
-0.7662732005119324,
0.12520132958889008,
0.668269693851471,
-0.28406578302383423,
0.082161672413... | |
Class
2. Visual C++/ATL/ATL simple object, press add
3. Give the name you want (like MyObject), and press finish to add it
If you want that an object implement an interface
1. In the class view select the object class (CMyObject)
2. Right click/Add/Implement Interface...
3. You can select which Interface will impleme... | [
0.296842485666275,
-0.3690526783466339,
0.3957078754901886,
0.05095333978533745,
-0.3782094419002533,
-0.08692751824855804,
-0.00797090120613575,
-0.24588902294635773,
-0.05956770479679108,
-0.8564358353614807,
-0.1898539513349533,
0.4250934422016144,
-0.34959253668785095,
0.02643180452287... | |
wizard does several tasks and create several customized files.
For larger projects that are difficult to add file by file, I do the same but instead of adding my files to the new project I start copying the settings from the new projects to the old one, and adding any additional file that the wizard has created and f... | [
0.24800987541675568,
-0.25827324390411377,
0.44911178946495056,
0.07793304324150085,
-0.4521927535533905,
-0.1679314821958542,
-0.06103290244936943,
-0.3849114179611206,
-0.38168269395828247,
-0.7001903653144836,
-0.20698030292987823,
0.5637539029121399,
-0.4670795500278473,
0.106638275086... | |
ATL support to the project. | [
-0.2517528533935547,
-0.22817093133926392,
0.10193649679422379,
0.1607809066772461,
-0.2751396894454956,
0.09535633772611618,
0.10045134276151657,
0.2584715485572815,
0.011706782504916191,
-0.29665929079055786,
-0.5171924233436584,
0.38464388251304626,
0.16244028508663177,
-0.1568208038806... | |
I have this long and complex source code that uses a RNG with a **fix** seed.
This code is a simulator and the parameters of this simulator are the random values given by this RNG.
When I execute the code in the same machine, no matter how many attempts I do the output is the same. But when I execute this code on two ... | [
0.34721511602401733,
0.1457306295633316,
-0.193445086479187,
0.2056029736995697,
0.041673436760902405,
0.17126820981502533,
-0.09505494683980942,
-0.08268852531909943,
-0.030586056411266327,
-0.7206452488899231,
0.366998553276062,
0.4340144395828247,
-0.3645468056201935,
0.3166700899600982... | |
and the OS are the same.
It is certainly possible, as the RNG may be combining machine specific data with the seed, such as the network card address, to generate the random number. It is basically implementation specific. | [
-0.09122378379106522,
-0.2396039366722107,
0.20780432224273682,
0.018696051090955734,
0.146429181098938,
-0.0268722977489233,
-0.18649862706661224,
-0.039883580058813095,
-0.12101665139198303,
-0.31928759813308716,
0.18524682521820068,
0.43309125304222107,
-0.04695770889520645,
0.042879134... | |
I'm running PHP 5.2.4 with ibm\_db2 v1.8.0 on Ubuntu 8.04.1 Server. I am trying to hit an IBM iSeries running OS/400 v5R3 but I'm not sure at all how to actually connect without a DSN. I've looked at <http://www.connectionstrings.com/> but none of the DB2 or AS/400 connection strings seem to work. All I end up with is:... | [
-0.14008565247058868,
0.40932050347328186,
0.34850364923477173,
0.10487149655818939,
0.010749372653663158,
-0.0030504283495247364,
0.37186747789382935,
0.0932067483663559,
-0.2421167939901352,
-0.7552058696746826,
0.18645668029785156,
0.4931143522262573,
-0.19303375482559204,
0.50708478689... | |
can use a print-stylesheet:
```
<link rel="stylesheet" type="text/css" media="print" href="print.css" />
```
To set font sizes, paddings, etc. to physical units like 'pt' (that should never be used in a screen-stylesheet!) so that it ends up being more or less an A4 page, when rendered in a typical browser, with typ... | [
0.2667176425457001,
-0.001953636994585395,
0.7378402948379517,
0.2048449069261551,
0.06210646033287048,
-0.23180289566516876,
0.19327214360237122,
-0.22891555726528168,
-0.1815430074930191,
-0.810986340045929,
-0.34225404262542725,
0.49039730429649353,
-0.11101134121417999,
-0.451453596353... | |
leave a good amount of wiggle room and test on the major browsers. | [
0.4204862415790558,
0.13825125992298126,
0.027828166261315346,
0.35304415225982666,
0.061454564332962036,
-0.49265432357788086,
0.23855945467948914,
0.0850171446800232,
-0.08297570794820786,
-0.474350243806839,
-0.10610504448413849,
0.3392285704612732,
0.09415914863348007,
-0.1837499141693... | |
Is there a pdf library attached/that can be attached to .NET 3.5 that allows creation of pdf files at runtime i.e opening a new pdf file, writing to it line by line, embedding images, etc and closing the pdf file all in C# code?
What I want is a set of tools and specifications which allow me to implement a customised ... | [
0.4682035744190216,
-0.0838305875658989,
0.5914163589477539,
0.20508705079555511,
0.061037249863147736,
-0.23771549761295319,
-0.20388396084308624,
-0.07653549313545227,
-0.13500835001468658,
-0.6335204839706421,
-0.12159498035907745,
0.6424022912979126,
-0.06703421473503113,
-0.1882123053... | |
How can I determine if location information returned by CLLocationManager is valid?
You should put the create out of the try finally block.
But a better solution is:
```
type
TMyClass = class ()
public
constructor Create(...); virtual;
function Execute: Boolean; virtual;
end;
TMyClassClass = class of... | [
0.18015292286872864,
-0.27049222588539124,
0.2698368728160858,
0.1758071333169937,
0.4215613603591919,
-0.13074517250061035,
0.37985920906066895,
-0.16466456651687622,
-0.020257266238331795,
-0.5978689789772034,
-0.3137318193912506,
0.40065431594848633,
-0.2924115061759949,
0.3481287956237... | |
I am getting an undefined index on my config page and it reads:
> **Notice**: Undefined index: SERVER\_ADDR in **inc/config
> .inc.php** on line **3**
Any idea on how I can fix that? I know its warning, but would still like to get at it. I am using it to check for the address whether to use my local or remote config... | [
-0.01937209814786911,
0.3012751042842865,
0.5185611844062805,
-0.11774679273366928,
0.2110191434621811,
-0.18658402562141418,
0.34399768710136414,
0.20109544694423676,
-0.279933899641037,
-0.8255918025970459,
-0.02614794485270977,
0.524876058101654,
-0.2296656370162964,
0.366057813167572,
... | |
of SERVER\_ADDR, which is an element of this array.
```
$_SERVER['SERVER_ADDR'];
```
If that doesn't work, it may mean that your server doesn't provide that information.
From [PHP.net](http://ca.php.net/manual/en/reserved.variables.server.php "PHP.net"):
> There is no guarantee that every web server will provide a... | [
0.29012712836265564,
0.3288436532020569,
0.21178562939167023,
-0.05399402603507042,
0.13973702490329742,
-0.05387546867132187,
0.31870296597480774,
-0.08600976318120956,
-0.14066775143146515,
-0.6236143112182617,
-0.08576769381761551,
0.5435159802436829,
-0.5706812143325806,
0.096239238977... | |
I was looking at the System.Net Namespace and it has an IPAddress instance you can use. This has a Parse method which you can use to parse a string into an IPInstance then use the Address property to give you the long value.
However...
The number returned is NOT the true conversion.
e.g. For IP 58.0.0.0 , the System... | [
0.10646402090787888,
0.027303406968712807,
0.4379477798938751,
0.16081106662750244,
0.029602626338601112,
0.061889708042144775,
0.38077446818351746,
-0.1828591227531433,
-0.3260801434516907,
-0.7761579155921936,
0.2839174270629883,
0.42773309350013733,
-0.29300379753112793,
0.4448699057102... | |
this formula is correct is that the number it returns you can use in a >= and <= query to determine an IP address that falls within a range.
The Address Property (of the IPAddress instance) does not calculate/return this. A bonus point for anyone that knows why the address property does not return what I think is the ... | [
0.09481237083673477,
0.013986124657094479,
0.4221373200416565,
-0.010575882159173489,
0.1809878945350647,
-0.05903228372335434,
0.5094999670982361,
-0.2486555427312851,
-0.28976818919181824,
-0.502874493598938,
-0.08241228014230728,
0.6049221158027649,
-0.45448917150497437,
-0.034411702305... | |
[] arrDec;
double num = 0;
if (IPaddress == "")
{
return 0;
}
else
{
arrDec = IPaddress.Split('.');
for(i = arrDec.Length - 1; i | [
0.21602632105350494,
-0.1269209086894989,
0.5352054834365845,
-0.4179515242576599,
0.031623151153326035,
0.3589310348033905,
0.4236830770969391,
-0.5003410577774048,
-0.4284920394420624,
-0.31674349308013916,
-0.33208298683166504,
0.28374284505844116,
-0.24588635563850403,
-0.0378930270671... | |
>= 0 ; i = i -1)
{
num += ((int.Parse(arrDec[i])%256) * Math.Pow(256 ,(3 - i )));
}
return num;
}
}
``` | [
-0.12566004693508148,
0.16258744895458221,
0.2539474070072174,
-0.3560623824596405,
0.07130936533212662,
0.15066419541835785,
0.7072283029556274,
-0.6283271908760071,
0.09915155172348022,
-0.4331512749195099,
-0.37470778822898865,
0.5311435461044312,
-0.04295768216252327,
0.115581683814525... | |
I've already asked a related question, but sadly the answers, whilst correct, didn't actually solve my problem.
I'm using the ManagementClass/ManagementObject WMI API (because it's better at handling remote administration than the DirectoryEntry API). I'd like to completely remove the existing script maps from a
Usi... | [
0.10536729544401169,
-0.08467351645231247,
0.3601066470146179,
-0.2794124484062195,
0.11682028323411942,
-0.1589026153087616,
0.4173963665962219,
-0.028457796201109886,
-0.08891715109348297,
-0.88309645652771,
-0.13339786231517792,
0.6786577701568604,
-0.25193721055984497,
0.35671529173851... | |
SetWmiProperty(scriptMap, "ScriptMap.Extensions", "." + extension);
```
Unfortunately, it doesn't seem possible to implement the function SetWmiProperty. If I attempt the following
```
wmiObject.Properties.Add(propertyName, CimType.SInt32);
```
I get "Operation is not valid due to the current state of the object."... | [
0.36330029368400574,
-0.19893626868724823,
0.42650502920150757,
-0.03287767246365547,
0.1973528116941452,
-0.31675049662590027,
0.327066570520401,
-0.30153948068618774,
-0.03865114971995354,
-0.665421187877655,
-0.12311118096113205,
0.7060980796813965,
-0.3928868770599365,
0.28114947676658... | |
object you've queried from the system and then modify it. Here's a function I wrote recently to deal with ScriptMaps. It's in Powershell, not C#, but the idea is the same:
```
function Add-AspNetExtension
{
[CmdletBinding()]
param (
[Parameter(Position=0, Mandatory=$true)]
[psobject] $site # I... | [
0.10519246757030487,
-0.2802809178829193,
0.628684937953949,
-0.18096041679382324,
-0.16319717466831207,
0.21979813277721405,
0.38321396708488464,
-0.4525090157985687,
-0.2725675106048584,
-0.5329775810241699,
-0.09269803762435913,
0.4901140332221985,
-0.2672688961029053,
0.115605726838111... | |
# fetch current mappings
# without the explicit type, PS will convert it to an Object[] when you use the += operator
[system.management.managementbaseobject[]] $maps = $site.Settings.ScriptMaps
# whatever the mapping is for .aspx will be our template for mapping other things to ASP.NET
... | [
0.06955544650554657,
-0.5158725380897522,
1.0180705785751343,
0.08767937868833542,
0.08392228186130524,
0.05386443808674812,
0.02464349754154682,
-0.2852400243282318,
-0.42143309116363525,
-0.9548409581184387,
-0.10693007707595825,
0.11040790379047394,
-0.32757702469825745,
0.1121882870793... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.