text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
<TextBlock Grid.Column=""1"" MinHeight=""10"" MinWidth=""10"" HorizontalAlignment=""Stretch"" Padding=""3 1 3 1"" TextAlignment=""Center"" Foreground=""{Binding Path=FactViewModels[~Index~].RightForeColor,Mode=OneWay}"" Background=""{Binding Path=FactViewModels[~Index~].RightColor,Mode=OneWay}"" Text=""{Binding Path=Fa... | [
0.24754652380943298,
-0.3760809898376465,
0.8682841062545776,
-0.005147899966686964,
0.1883431375026703,
-0.18182529509067535,
0.21905361115932465,
-0.5294936895370483,
-0.20039497315883636,
-0.8424153923988342,
-0.28672537207603455,
0.49400949478149414,
-0.16472485661506653,
-0.0999197214... | |
look out for see [Optimizing WPF Application Performance](http://msdn.microsoft.com/en-us/library/aa970683.aspx). And yes - it greatly matters what xaml is used in each cell. Because usually performance problems do boil down to "too many elements". Did you know that a TextBox are I think 30 individual elements? I recom... | [
0.25243785977363586,
-0.018669473007321358,
0.08102208375930786,
0.12851957976818085,
-0.011331954039633274,
-0.009249351918697357,
0.18932904303073883,
-0.33604857325553894,
-0.3922744393348694,
-0.7093843221664429,
0.07633129507303238,
0.4928564727306366,
-0.37743431329727173,
-0.2365081... | |
PC you are using is forcing WPF into software based rendering. Or are you using any BitmapEffects?
Edit:
Looking at your code I would suggest you change
`column.Width = DataGridLength.Auto;`
to a reasonable fixed width, since the datagrid does not have to recalculate the width dynamically every time something ch... | [
0.2664247751235962,
-0.04011804983019829,
0.5524762272834778,
0.004340063314884901,
0.01746467873454094,
0.07034150511026382,
0.013533650897443295,
0.05141304060816765,
-0.4370279014110565,
-0.7385261654853821,
0.041727084666490555,
0.8559826612472534,
-0.47196829319000244,
-0.072254069149... | |
I need to process XML documents of varying formats into records in a MySQL database on a daily basis. The data I need from each XML document is interspersed with a good deal of data I don't need, and each document's node names are different. For example:
source #1:
```
<object id="1">
<title>URL 1</title>
<ur... | [
0.404490202665329,
0.1456185281276703,
0.21570628881454468,
0.0203104130923748,
0.10063903778791428,
-0.14024017751216888,
0.03667083755135536,
-0.2510274648666382,
0.035534873604774475,
-0.8663966059684753,
-0.23594462871551514,
0.35417771339416504,
-0.07305019348859787,
0.244597166776657... | |
<link>http://www.one.com</link>
<frequency interval="60" />
<moreuselessdata>blah</moreuselessdata>
</object>
<object">
<objectid>2</objectid>
<thetitle>URL 2</thetitle>
<link>http://www.two.com</link>
<frequency interval="60" />
<moreuselessdata>blah</moreuselessdata>
</object>
```
...wher... | [
0.246051624417305,
-0.14635156095027924,
0.5706801414489746,
0.05938923358917236,
0.027065573260188103,
-0.008462046273052692,
-0.15618310868740082,
-0.45812541246414185,
-0.04728061333298683,
-1.0354030132293701,
-0.1947314441204071,
0.4197292625904083,
-0.5773780345916748,
0.124574214220... | |
a common XML format and then writing a parser for that document.
The XML documents themselves aren't all that large, as most will be under 1MB. I don't anticipate their structure changing often (if ever), but there is a strong possibility I will need to add and remove further sources as time goes on. I'm open to all i... | [
0.17115409672260284,
0.260339617729187,
0.03699835389852524,
0.16153183579444885,
-0.14241275191307068,
-0.41080713272094727,
0.37939175963401794,
0.17955099046230316,
-0.12285993993282318,
-0.7067152857780457,
-0.10335718840360641,
0.48618635535240173,
-0.30601418018341064,
-0.02524147927... | |
I'd try to make a class for every document type. The class would inherit from dict and on its `__init__` parse the given document and populate itself with the 'id', 'interval' and 'url'.
Then the code in main would be really trivial, just instantiate instances of those classes (which are also dicts) with the appropria... | [
-0.21432077884674072,
0.06448731571435928,
0.04394743591547012,
0.3100893795490265,
-0.2716851532459259,
-0.03162895515561104,
0.09386628866195679,
0.32325711846351624,
0.23663295805454254,
-0.464724063873291,
-0.2408204972743988,
0.3641253709793091,
-0.4624355435371399,
0.0229437947273254... | |
I'm looking for a resource in python or bash that will make it easy to take, for example, mp3 file X and m4a file Y and say "copy X's tags to Y".
Python's "mutagen" module is great for manupulating tags in general, but there's no abstract concept of "artist field" that spans different types of tag; I want a library th... | [
0.6350129246711731,
0.010464965365827084,
-0.14294438064098358,
0.10383115708827972,
0.005713035352528095,
-0.02857239358127117,
-0.03106991946697235,
-0.21387609839439392,
-0.07848348468542099,
-0.6395027041435242,
0.10568852722644806,
0.6867660880088806,
-0.2266007661819458,
-0.036279652... | |
month or so, I want to be able to update the 'master' lossless files with whatever tag changes I've made to the mp3s. I'm tired of stubbing my toes on implementation differences among formats.)
I needed this exact thing, and I, too, realized quickly that mutagen is not a distant enough abstraction to do this kind of th... | [
0.46776771545410156,
-0.07996232807636261,
0.30572813749313354,
0.10786204785108566,
0.06938044726848602,
0.1657070517539978,
-0.1786765307188034,
0.15768827497959137,
-0.07238860428333282,
-0.48399248719215393,
0.21645841002464294,
0.4893224835395813,
-0.10747674852609634,
0.2041266858577... | |
command line equivalent to **ExFalso** (QuodLibet's tagging component). It uses this abstraction mechanism and provides some added abstraction and functionality.
If you want to check out the source, [here's a link to the latest tarball](http://jeremycantrell.com/files/python-qlcli.tar.gz). The package is actually a se... | [
0.5080263614654541,
-0.20878559350967407,
0.23133854568004608,
0.1548338234424591,
-0.21655990183353424,
-0.45896199345588684,
0.1247347742319107,
-0.13440032303333282,
0.13855108618736267,
-0.3271004557609558,
-0.05845564231276512,
1.00999915599823,
-0.3571493625640869,
-0.098282709717750... | |
that do). So, doing something like:
```
print qllib.AudioFile('foo.mp3')['artist']
```
Will not output a single string, but will output a list of strings like:
```
[u'The First Artist', u'The Second Artist']
```
The way you might use it to copy tags would be something like:
```
import os.path
import qllib # thi... | [
0.24350467324256897,
-0.1455478072166443,
0.689684271812439,
-0.05986090004444122,
-0.09040957689285278,
-0.10386288166046143,
-0.07900930196046829,
-0.4616965353488922,
-0.1504102349281311,
-0.6969238519668579,
-0.13558103144168854,
1.0042668581008911,
-0.5919232368469238,
-0.095654018223... | |
flac[tag_name] = mp3[tag_name]
flac.write()
mp3_filenames = ['foo.mp3', 'bar.mp3', 'baz.mp3']
for mp3_fn in mp3_filenames:
flac_fn = os.path.splitext(mp3_fn)[0] + '.flac'
if os.path.getmtime(mp3_fn) != os.path.getmtime(flac_fn):
update_tags(mp3_fn, flac_fn)
``` | [
-0.26306477189064026,
-0.17788702249526978,
0.7018430233001709,
-0.05781538039445877,
0.21447762846946716,
0.11389785259962082,
0.04658111557364464,
-0.11145862191915512,
-0.3187137842178345,
-0.5057463645935059,
-0.438388466835022,
1.1324565410614014,
-0.40952569246292114,
-0.161506339907... | |
I have a custom stream that I am using with WCF for large BLOBs from the database. It reads the data in chunks.
What is the best way to handle the connection for the stream? Should I just open it at the construction or open/close it with each chuck read?
Thanks.
I would load the entire blob into a memory stream then... | [
0.3388209640979767,
0.08138860017061234,
0.399746298789978,
-0.0329587459564209,
-0.04831042140722275,
-0.04227269068360329,
0.04998784884810448,
-0.006849965546280146,
-0.2716730237007141,
-0.8044123649597168,
-0.05321497842669487,
0.4785953760147095,
-0.2181020975112915,
0.35199719667434... | |
return new MemoryStream(myBlob);
}
}
```
If you using SQL Server 2008 try sending the stream directly through to the WCF Client
```
[ServiceContract]
public class ContentService
{
[OperationContract]
public Stream GetBlob(int id)
{
return GetStreamFromDatabase(id);
}
}
```
See this link on [Streaming... | [
-0.028206076472997665,
-0.07697226107120514,
0.4335368573665619,
-0.010934218764305115,
-0.2183246612548828,
-0.2240419089794159,
0.2911323308944702,
0.10581056028604507,
-0.19323024153709412,
-0.7144819498062134,
-0.06057070940732956,
0.49713510274887085,
-0.1979951709508896,
0.3654133975... | |
How can I use strikethrough in a Label or text in flex 3 ?
You can use a [`TextGraphic`](http://livedocs.adobe.com/flex/gumbo/langref/mx/graphics/TextGraphic.html) from the [Flex Gumbo SDK](http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4/) ([Using the beta Gumbo SDK in Flex Builder 3](http://blog.flexe... | [
0.1230381578207016,
0.22808091342449188,
0.1449783891439438,
-0.26363542675971985,
-0.5808064341545105,
-0.161758154630661,
0.028057968243956566,
-0.3701726794242859,
-0.30500322580337524,
-0.4790441691875458,
-0.12824396789073944,
0.7135706543922424,
-0.3195660412311554,
-0.34106832742691... | |
I want to know when building a typical site on the LAMP stack how do you optimize it for the best possible load times. I am picturing a typical DB-driven site.
This is a high-level look and could probably pull in question and let me break it down into each layer of the stack.
L - At the system level, (setup and files... | [
0.669609010219574,
0.0764627531170845,
0.2175820916891098,
0.14370037615299225,
-0.30073028802871704,
-0.16047009825706482,
-0.11309434473514557,
-0.0681842714548111,
-0.1842019259929657,
-0.8470481038093567,
0.21803583204746246,
0.5718293190002441,
-0.18706300854682922,
0.1353015452623367... | |
Not my Forte. Probably depends a lot on how many sites are running concurrently.
M - MySQL in a database driven site, DB performance is key. Is there a better normalization approach i.e, using link tables? Web developers often just make simple monolithic tables resembling 1NF and this can kill performance.
P - aside ... | [
0.49855315685272217,
0.06642505526542664,
0.03223763033747673,
0.29271140694618225,
-0.48191699385643005,
-0.35076969861984253,
0.38010790944099426,
0.11888306587934494,
-0.27913299202919006,
-0.5577534437179565,
0.3458104729652405,
0.6989179253578186,
-0.2952132821083069,
0.17896631360054... | |
to get down and dirty into the details and find what code is slowing you down. Also I realize that many sites have many different performance characteristics, but let's assume a typical site that has more reads then writes.
I am just wondering if we can compile a bunch of best practices and fully expect people to link... | [
0.7632747888565063,
0.16526155173778534,
-0.04292811453342438,
0.31211522221565247,
-0.05780991166830063,
-0.34816083312034607,
0.5279823541641235,
0.1441030353307724,
0.025317082181572914,
-0.700523853302002,
0.327427476644516,
0.6351982355117798,
0.19431109726428986,
-0.20156030356884003... | |
my question is, if you were starting from scratch, how would you make *sure* your LAMP site was fast?
Here's a few personal must-dos that I always set up in my LAMP applications.
* Install mod\_deflate for apache, and
do not use PHP's gzip handlers.
mod\_deflate will allow you to
compress static content, like
javascr... | [
0.42026230692863464,
-0.009767064824700356,
0.4391600787639618,
0.22546187043190002,
-0.17956608533859253,
-0.43337544798851013,
0.3615225553512573,
-0.08760686963796616,
-0.19286377727985382,
-0.8771193027496338,
-0.061380695551633835,
0.8802618384361267,
-0.40133896470069885,
-0.34847700... | |
or a vhost
configuration, where they are loaded
once. Any time you can get rid of a
directory-level access file by moving
it into a main configuration file,
you save disk access time.
* Prepare your application's database
layer to utilize a connection manager
of some sort (I use a Singleton for
most applications). It's... | [
0.25288161635398865,
-0.03575681522488594,
0.26047244668006897,
0.14058749377727509,
-0.04546421393752098,
-0.07413813471794128,
0.42333757877349854,
-0.0652855932712555,
-0.678198516368866,
-0.9380800724029541,
-0.2520562708377838,
0.8264763355255127,
-0.1445540487766266,
0.05529757216572... | |
your app is up and running, set
MySQL's slow query time to a small
number and monitor the slow query log
diligently. This will show you where
your problem queries are coming from,
and allow you to optimize your
queries and indexes before they
become a problem.
* For serious performance tweakers, you
will want to compil... | [
0.40575167536735535,
0.2543129324913025,
0.5590947270393372,
0.22647133469581604,
-0.2314942628145218,
-0.01666036807000637,
0.6181772351264954,
-0.08369749784469604,
-0.3423147201538086,
-0.8786698579788208,
0.06208241358399391,
0.8328817486763,
-0.24551425874233246,
-0.11281755566596985,... | |
PHP [here](http://www.phpvs.net/articles/blakes-centos-lamp-server-guide/php/#Install-PHP), and I find it
suits most of my applications. The
downside is that if you end up
needing a library, you have to
recompile PHP to get it. Analyze
your code and test it in a devel
environment to make sure you have
everything you ne... | [
0.36290478706359863,
0.1976114809513092,
0.5203788876533508,
0.11709102243185043,
-0.30926018953323364,
-0.15571212768554688,
0.26281270384788513,
0.01860593818128109,
-0.3947772979736328,
-0.6206069588661194,
0.16243334114551544,
0.48339763283729553,
-0.002448984421789646,
0.0748625844717... | |
off the top of my head. Googling around for PHP best practices will find a lot of tips on how to write faster/better code as well (Such as: `echo` is faster than `print`). | [
0.7407333850860596,
0.4630274474620819,
0.03229445591568947,
0.21968045830726624,
-0.2684369385242462,
-0.1872415840625763,
0.5399513840675354,
0.15439347922801971,
-0.1661841720342636,
-0.45228731632232666,
0.2259730100631714,
0.45400288701057434,
0.31689637899398804,
-0.06892518699169159... | |
Can gcc spit out, given a C file, a list of the all function calls that occur, with filename and line number both for the call itself and for the function's declaration?
I know gcc somehow retains this information with -g (debuggers rely on it) and that it can dump control flow graphs with -dr (but without filenames o... | [
0.2782861590385437,
0.2521137595176697,
0.2882545292377472,
0.0739394873380661,
-0.3567087948322296,
-0.41371506452560425,
-0.10427108407020569,
-0.0929584875702858,
-0.12878385186195374,
-0.07279020547866821,
-0.28607311844825745,
0.8242936730384827,
-0.4380160868167877,
0.038508985191583... | |
software comes with (e.g. ./configure && make) even in cases where tools that rely on their own preprocessor and/or parser are a major hassle to fit in. I'm already aware of several such tools, e.g. ctags. So this question is a followup to [question 525899](https://stackoverflow.com/questions/525899/how-to-know-line-nu... | [
0.062000785022974014,
-0.18632225692272186,
0.43149760365486145,
0.20517468452453613,
0.02384144999086857,
-0.32462894916534424,
0.4259963929653168,
-0.25749123096466064,
0.14354494214057922,
-0.46741700172424316,
-0.4877120852470398,
0.7253369092941284,
-0.303939551115036,
-0.253450959920... | |
function calls will appear on one line.
Take simple program:
```
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define PI (3.1415926536)
int main(int argc, char *argv[]) {
double angle = PI / 2.0;
printf("Sine = %lf, cosine = %lf\n", sin(angle), cos(angle));
return EXIT_SUCCESS;
}
```
Comp... | [
-0.2245461344718933,
-0.011454823426902294,
0.5830570459365845,
-0.3588081896305084,
0.09388607740402222,
0.41598016023635864,
0.2414979487657547,
-0.4885256290435791,
0.027803586795926094,
-0.3103112280368805,
-0.30152711272239685,
0.5335047841072083,
-0.5607985854148865,
0.00755928317084... | |
[test.c : 9] D.3380 = [test.c : 9] sin (angle);
[test.c : 9] printf (&"Sine = %lf, cosine = %lf\n"[0], D.3380, D.3379);
[test.c : 10] D.3381 = 0;
return D.3381;
# SUCC: EXIT
}
```
You won't get any complex expressions - just assignments and function call and no CPP macros, very easy to parse. Loops and condi... | [
-0.03786340355873108,
0.177808478474617,
0.2344149798154831,
-0.25578781962394714,
0.2528383433818817,
0.14327944815158844,
0.6250706911087036,
-0.2648245096206665,
-0.047354672104120255,
-0.0994613990187645,
-0.3752848505973816,
0.5297839641571045,
-0.39384135603904724,
-0.076483592391014... | |
I've got a simple `<ul>` which has a position of fixed, with the height set to 100% and overflow to auto. This allows me to scroll when the height of window becomes less than the height of the unordered list.
The only problem with this is that I want the unordered list to be 30px from the top of the page. When the scr... | [
0.00905364565551281,
-0.03713800013065338,
0.6934353113174438,
-0.18300014734268188,
-0.27367013692855835,
0.25155162811279297,
0.2841230034828186,
-0.18325373530387878,
0.02972232922911644,
-0.7857198119163513,
-0.0064031281508505344,
0.4907536506652832,
-0.10972543060779572,
-0.036833394... | |
<li>Test1</li>
<li>Test1</li>
<li>Test1</li>
<li>Test1</li>
<li>Test1</li>
<li>Test1</li>
<li>Test1</li>
<li>Test1</li>
<li>Test1</li>
</ul>
</div>
```
And the CSS
```
div#sidebar {
width:148px;
height:100%;
overflow:auto;
position:fixed;
margin-top:30px;
}
```
... | [
0.1336515247821808,
-0.11060476303100586,
0.2702569365501404,
0.05719726160168648,
-0.2108905017375946,
0.18603761494159698,
0.14453905820846558,
-0.6144741773605347,
0.06433795392513275,
-0.45831573009490967,
-0.02579144760966301,
0.3342761993408203,
-0.22848248481750488,
-0.1336709558963... | |
a reference to the method, these assignments work like callbacks expecting a delegate (method reference). Instead it is getting method call and will execute upon original eval (because it is a call) and then fail when attempting to be invoked properly because it is mot an actual method reference. | [
0.03717460110783577,
-0.013326991349458694,
0.08324641734361649,
0.25960028171539307,
0.09066660702228546,
-0.12232647836208344,
0.5070803761482239,
-0.5990967750549316,
-0.2156851887702942,
-0.280954509973526,
-0.3831426203250885,
0.5992892384529114,
-0.2906592786312103,
0.174775689840316... | |
I'm building a wrapper for a jquery plugin to C# and I dont like the usage of [Optional] because its not as "optional" as it says it is(meaning you still have to declare that System.Missing library) so I decided to use overloaded methods. I want to give the user alot of customization but I'm not sure how explicit I sho... | [
0.3308503031730652,
0.004655906464904547,
-0.05670715868473053,
0.1331033855676651,
-0.207482248544693,
-0.07097133994102478,
0.1535300612449646,
-0.19656825065612793,
-0.15171784162521362,
-0.3189554214477539,
0.09287477284669876,
0.5667140483856201,
-0.259930282831192,
-0.402273893356323... | |
of OOP?
P.S I'm calling a base class' constructor and having to use `base(param1, param2, ...)` method but I would also like to use `this(param1, param2, ...`) instead of having to initialize my member variables in each scenario, is there a way around this?
**A confusing API is the eternal bane of library consumers.**... | [
0.2098022997379303,
0.1982136070728302,
0.1903221607208252,
0.24102669954299927,
0.08222056180238724,
0.10633610934019089,
0.20531867444515228,
0.1903221607208252,
-0.2961040139198303,
-0.5115805268287659,
-0.12984199821949005,
0.38577398657798767,
-0.35753220319747925,
-0.0299196317791938... | |
optional and named parameters, so your `System.Missing` problem will go away by itself.
> Is it frowned upon in terms of OOP?
OOP favors the **[Single Responsibility Principle](http://en.wikipedia.org/wiki/Single_responsibility_principle)**, or SRP. If you have a single class with many of these functions, each having... | [
-0.03531935438513756,
-0.23507997393608093,
-0.11419862508773804,
0.2065393179655075,
-0.2803054749965668,
-0.0818939283490181,
0.18999718129634857,
-0.06703580170869827,
-0.536340057849884,
-0.4226810038089752,
-0.4481990337371826,
0.5199168920516968,
-0.2656961679458618,
-0.2299132198095... | |
calls -- that is, where the compiler can statically know exactly what type something is going to be. Either way, though, I don't think that should be your motivating factor here. | [
0.3259991705417633,
-0.05797896161675453,
0.00019241559493821114,
0.4259089529514313,
-0.19779035449028015,
-0.14420205354690552,
0.053786251693964005,
0.2650204002857208,
-0.24065132439136505,
-0.3172670304775238,
-0.1912778615951538,
0.48655495047569275,
-0.4690268635749817,
-0.011852656... | |
I have a problem (it's my fault, I just can't spot what I'm doing wrong) where "ToString" isn't calling the correct method...
```
public class ClassA
{
public override ToString()
{
return "Hello, I'm class A.";
}
}
public class ClassB : ClassA
{
public override ToString()
{
return "Hello, ... | [
-0.20620086789131165,
0.06336148083209991,
0.3347604274749756,
-0.42781856656074524,
0.2023627609014511,
-0.07096844166517258,
0.5977144241333008,
-0.3543286621570587,
-0.16465942561626434,
-0.4417678117752075,
-0.2387550175189972,
0.5678386092185974,
-0.439446359872818,
0.3015727698802948... | |
ClassB instead of hiding it from the original which will cause the overridden method to take precedence. What you could do is..
```
public class ClassA
{
public override string ToString()
{
return "Hello, I'm class A.";
}
}
public class ClassB : ClassA
{
public new string ToString()
{
... | [
-0.12938469648361206,
-0.2947165071964264,
0.2668876349925995,
-0.5337610840797424,
0.25380465388298035,
0.01823454722762108,
0.3966485559940338,
-0.44932010769844055,
-0.019915984943509102,
-0.4557497799396515,
-0.3983275592327118,
0.4423571825027466,
-0.517248272895813,
0.473310351371765... | |
Console.WriteLine(new ClassA().ToString()); // I'm Class A
Console.WriteLine(new ClassB().ToString()); // I'm Class B
Console.WriteLine(((ClassA)new ClassB()).ToString()); // I'm Class A
``` | [
-0.31674283742904663,
0.17583653330802917,
0.6865526437759399,
-0.46238240599632263,
0.3875570595264435,
0.25255829095840454,
0.2634464204311371,
-0.15632295608520508,
-0.015229932963848114,
-0.768923282623291,
-0.3102627098560333,
0.5889291167259216,
-0.194096177816391,
0.3868987858295440... | |
Is there any Java compiler flag that one can pass to tell the compiler to disallow the use of raw types? That is, for any generic class, let the compiler force that the parameterized version be used, and throw a compilation error otherwise?
JDK7 (b38) introduces [`-Xlint:rawtypes`](http://bugs.sun.com/view_bug.do?bug_i... | [
0.11567972600460052,
-0.08945222944021225,
-0.46402546763420105,
-0.12879890203475952,
-0.27235954999923706,
-0.017677733674645424,
0.10383961349725723,
-0.22864191234111786,
-0.09433581680059433,
-0.3627348244190216,
-0.17217311263084412,
0.34443312883377075,
-0.7298816442489624,
0.030427... | |
I need C code to return the number of 1's in an unsigned char in C. I need an explanation as to why it works if it's not obvious. I've found a lot of code for a 32-bit number but not much for an unsigned char.
The same code will work for an unsigned char. Loop over all bits testing them. See [this](http://graphics.stan... | [
0.3738492429256439,
0.016265958547592163,
0.12996576726436615,
0.03648575767874718,
-0.15620370209217072,
0.1734747290611267,
0.04589458554983139,
0.08003319054841995,
-0.20805369317531586,
-0.4444815516471863,
0.07205367833375931,
0.6326436996459961,
-0.13027100265026093,
-0.0607896447181... | |
If get a gring from the registry and it correctly displays when I place it in a message box.
::MessageBoxW(0, (LPCWSTR)achValue, \_T("Found"), MB\_YESNO);
The value is stored in archValue which is a DWORD. What I want to do is compare it to the following string "2.0.7045.0" but strcmp fails to work for me.
Any ideas ... | [
-0.015214692801237106,
0.24336837232112885,
0.48457759618759155,
0.006351959891617298,
-0.17880429327487946,
-0.025097176432609558,
0.2502865791320801,
0.026501398533582687,
-0.08789552748203278,
-0.6419508457183838,
-0.19654300808906555,
0.7529241442680359,
0.03787083551287651,
0.12577489... | |
This is driving me nuts and I can't figure out where I am dropping the ball. I've followed a few examples found via the googlemonsta to no avail. Any pointer to where I goofed would be greatly apperciated.
```
var writer = new StringWriter();
param = "location=" + Server.UrlEncode(param);
byte[... | [
0.31302711367607117,
0.2413739562034607,
0.6477965712547302,
-0.11489126086235046,
-0.20682893693447113,
0.16274264454841614,
0.5118682980537415,
-0.07983168214559555,
-0.37858694791793823,
-0.3697293698787689,
-0.17199352383613586,
0.35819318890571594,
-0.17133097350597382,
0.544454455375... | |
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2";
request.ContentLength = paramStream.Length;
using( var stream = request.GetRequestStream())
... | [
0.021230727434158325,
-0.236517071723938,
0.9220851063728333,
0.07680398970842361,
-0.199692040681839,
0.1865658015012741,
0.6338159441947937,
-0.6498387455940247,
-0.4545136094093323,
-0.4861423373222351,
-0.5369567275047302,
0.4407668113708496,
-0.45349159836769104,
0.33821842074394226,
... | |
string result;
using (var sr = new StreamReader(response.GetResponseStream()))
{
result = sr.ReadToEnd();
}
```
Thanks!
**EDIT:** As far as I can tell its hitting the site (i'm getting html back) but the params aren't pushed over. I'm basically getting where the values would appea... | [
0.03493177145719528,
-0.13198037445545197,
0.7467858195304871,
-0.19883333146572113,
-0.11313416808843613,
-0.016644099727272987,
0.5508252382278442,
-0.30998092889785767,
-0.4997503459453583,
-0.5596185326576233,
-0.28268593549728394,
0.5319804549217224,
-0.1352129727602005,
0.00205421750... | |
of the & from the start of the first parameter? Other than that it basically looks okay. (Check the parameter names in your real code - where you've got "paramater" in the sample it should almost certainly be "parameter" - but we don't know what your real code looks like or what the real site expects.)
Please give mor... | [
0.5030783414840698,
-0.1768246293067932,
0.3213265836238861,
0.3385831415653229,
0.043291110545396805,
-0.24012769758701324,
0.6489872932434082,
0.19669893383979797,
-0.3870745599269867,
-0.47263261675834656,
-0.11474690586328506,
0.6036466360092163,
-0.2845071256160736,
0.1672177165746688... | |
It would be worth using [WireShark](http://wireshark.org) to check whether or not it's present in the outbound request.
Just as a general point of practice, you should dispose of the `WebResponse`, and you don't need to call `Close` if you've already got a `using` statement for the response stream:
```
string result;... | [
0.3048187494277954,
-0.41427314281463623,
0.8673920035362244,
0.05951588228344917,
0.1558709293603897,
-0.3556426167488098,
0.20881356298923492,
-0.5474282503128052,
-0.31464236974716187,
-0.41408833861351013,
-0.3248230814933777,
0.32942718267440796,
-0.20327496528625488,
0.05212447419762... | |
I need to do a recursive grep in Windows, something like this in Unix/Linux:
```
grep -i 'string' `find . -print`
```
or the more-preferred method:
```
find . -print | xargs grep -i 'string'
```
I'm stuck with just cmd.exe, so I only have Windows built-in commands. I can't install [Cygwin](http://en.wikipedia.org... | [
-0.4542761445045471,
0.3536214828491211,
0.44166672229766846,
0.15479923784732819,
-0.22114355862140656,
-0.2793646454811096,
0.4921382665634155,
0.07649647444486618,
-0.3520132005214691,
-0.6246785521507263,
-0.19212307035923004,
0.6235928535461426,
-0.35130685567855835,
0.043524894863367... | |
[/M] [/O] [/P] [/F:file]
[/C:string] [/G:file] [/D:dir list] [/A:color attributes] [/OFF[LINE]]
strings [[drive:][path]filename[ ...]]
/B Matches pattern if at the beginning of a line.
/E Matches pattern if at the end of a line.
/L Uses search strings literally.
/R ... | [
-0.09275270253419876,
-0.1347448080778122,
0.32123467326164246,
-0.1327587366104126,
-0.09188099205493927,
0.41304734349250793,
0.19011300802230835,
-0.11917515844106674,
-0.05957811698317528,
-0.6318989396095276,
-0.6056818962097168,
0.292077898979187,
-0.2315070778131485,
-0.176432564854... | |
Searches for matching files in the current directory and all
subdirectories.
/I Specifies that the search is not to be case-sensitive.
/X Prints lines that match exactly.
/V Prints only lines that do not contain a match.
/N Prints the line number before each line tha... | [
-0.05100065842270851,
-0.1552739143371582,
0.6278086304664612,
0.23157189786434174,
0.17564503848552704,
0.2296639233827591,
0.051625076681375504,
-0.1301824450492859,
0.14275789260864258,
-0.753172755241394,
-0.25464069843292236,
0.2636612057685852,
-0.42161649465560913,
-0.07368198037147... | |
matches.
/M Prints only the filename if a file contains a match.
/O Prints character offset before each matching line.
/P Skip files with non-printable characters.
/OFF[LINE] Do not skip files with offline attribute set.
/A:attr Specifies color attribute with two hex digits. See "co... | [
-0.07653459161520004,
-0.046625766903162,
0.54024338722229,
0.09746698290109634,
0.0578964538872242,
0.2468472719192505,
-0.22561298310756683,
-0.3209567666053772,
-0.10042163729667664,
-0.42164650559425354,
-0.2673994302749634,
0.5329859256744385,
-0.37404370307922363,
-0.1824830919504165... | |
a literal search string.
/G:file Gets search strings from the specified file(/ stands for console).
/D:dir Search a semicolon delimited list of directories
strings Text to be searched for.
[drive:][path]filename
Specifies a file or files to search.
Use spaces to separate multiple search ... | [
-0.0815650075674057,
-0.15579962730407715,
0.31146538257598877,
-0.022089427337050438,
-0.26004165410995483,
0.018503300845623016,
0.07412390410900116,
0.08238334208726883,
0.20190933346748352,
-0.5207452178001404,
-0.657041072845459,
0.4983116388320923,
-0.3630106449127197,
0.141749888658... | |
expression quick reference:
. Wildcard: any character
* Repeat: zero or more occurrences of previous character or class
^ Line position: beginning of line
$ Line position: end of line
[class] Character class: any one character in set
[^class] Inverse class: any one character not... | [
-0.2963992655277252,
-0.400678813457489,
0.3639480173587799,
-0.012340364046394825,
0.0676235631108284,
0.2622341811656952,
0.2992556691169739,
-0.1450168639421463,
0.07191399484872818,
-0.43465080857276917,
-0.4660128653049469,
0.4022945463657379,
-0.19970768690109253,
-0.1534242779016494... | |
Escape: literal use of metacharacter x
\<xyz Word position: beginning of word
xyz\> Word position: end of word
For full information on FINDSTR regular expressions refer to the online Command
Reference.
``` | [
-0.3628622889518738,
0.14642807841300964,
0.23240350186824799,
-0.05323578417301178,
0.09452564269304276,
0.22737157344818115,
0.7812274098396301,
-0.17938512563705444,
0.005512658506631851,
-0.5173508524894714,
-0.6605995893478394,
0.43378207087516785,
-0.29408326745033264,
0.070907384157... | |
I've been reading about the various forms and aspects of agile development, but all focused on the corporate environment. I am on a student project team at my university, and I'd like to see if some agile concepts could work in an environment other than 'everyone works full/part time'.
We do have our own project serv... | [
0.6697158217430115,
0.1756044328212738,
-0.07784590125083923,
0.07205281406641006,
-0.056068044155836105,
-0.009737703017890453,
0.24803324043750763,
0.11074162274599075,
-0.20792649686336517,
-0.3753974139690399,
-0.12275504320859909,
0.5178380012512207,
0.259906530380249,
-0.199836835265... | |
closely with the organizers)
* Not just programmers, also mechanical/electrical team members
* Sharepoint's action items don't have the best interface. Are there any extensions available? Would it make sense to switch to something else (like Trac) at the expense of a unified interface for everything non-svn?
* Procrast... | [
0.6550781726837158,
-0.14977101981639862,
0.2959902286529541,
0.3170734941959381,
0.1719626933336258,
-0.20152096450328827,
0.22522416710853577,
0.09424688667058945,
-0.22053493559360504,
-0.5782685279846191,
-0.025093648582696915,
0.19020704925060272,
0.25308841466903687,
-0.2382176518440... | |
to the team is limited)
Perhaps our team could benefit from more than just agile techniques, so all suggestions are welcome.
**EDIT** Thanks for all the great answers. I'm going to start asking my teammates how they feel about some of these ideas, and see what they buy into. Should I link them to this question? You c... | [
0.577479362487793,
-0.11650417745113373,
-0.10581158846616745,
0.5210475325584412,
0.2061801552772522,
-0.17752569913864136,
0.3805927336215973,
0.12340310215950012,
-0.30182039737701416,
-0.7125945687294006,
0.027094349265098572,
0.5519210696220398,
0.3217006325721741,
-0.3888712823390960... | |
isn't the right word - but I needed one stronger than co-ordinate). In a group of students, there's absolutely no need to bother with anything like that. Adhering to a methodology will only slow you down.
You have identified your challenges. Make your peers aware of them and talk about how best to deal with them. Use ... | [
0.3856496214866638,
0.04430437833070755,
-0.21369627118110657,
0.16291707754135132,
-0.15095539391040802,
-0.31481432914733887,
0.6367261409759521,
-0.14157435297966003,
0.02906157448887825,
-0.7023882269859314,
-0.025657586753368378,
0.3643048405647278,
0.30429038405418396,
-0.36151480674... | |
I would like to know the easiest way to format a string as accounting style. I know how to format as currency using {0:c} but there are some differences in accounting style, for example, all the dollar signs will line up as well as all the decimal points, and negatives are expressed in parenthesis rather than with a "-... | [
0.29051634669303894,
0.4890328645706177,
0.24612261354923248,
0.15385659039020538,
-0.29862654209136963,
0.2154460996389389,
-0.17003020644187927,
-0.18994782865047455,
-0.139046773314476,
-0.39442312717437744,
0.20739184319972992,
0.19105790555477142,
-0.1873890906572342,
0.03624605759978... | |
have to format without the currency symbol, and pad the formatted numbers yourself with spaces, using a fixed width font would make this job easier for you.
EDIT:
It seems String.Format is your friend:
```
String.Format("{0,15:#,##0.00 ;(#,##0.00);- }", number)
```
where 15 is the total width of the output, and ... | [
-0.09228334575891495,
0.18566159904003143,
0.7987828254699707,
0.057792190462350845,
0.0014362678630277514,
0.05781629681587219,
-0.027990797534585,
-0.11047901958227158,
-0.3646317422389984,
-0.6491093635559082,
0.006709344685077667,
0.830890417098999,
-0.06575995683670044,
-0.05960589647... | |
Are .NET collections with large number of items apt to be stored in the LOH?
I'm curious about List and Dictionary specifically. In my code, I store a large number (40k+) of relatively small objects (lets say 1k) in temporary Lists and Dictionarys for processing. Does the number of items in these collections increase ... | [
0.22628477215766907,
-0.08037000894546509,
0.061623137444257736,
0.3202446401119232,
-0.18171089887619019,
-0.07091174274682999,
0.10311218351125717,
0.0677255243062973,
-0.5560436844825745,
-0.7198489904403687,
-0.10583755373954773,
-0.025152647867798805,
-0.05418175458908081,
0.031792499... | |
LOH if they are over 85,000 bytes. A large list (especially of structs) will often get allocated here.
However, Dictionary's are less likely, since they're storing an array of buckets, so unless the generate enough buckets so the array becomes >85000 bytes, it's unlikely. A list of 40k elements will be stored on the ... | [
0.01656513288617134,
-0.12463585287332535,
0.3828537166118622,
0.04888145253062248,
0.3913828134536743,
0.2012840211391449,
-0.09529440104961395,
-0.5189249515533447,
-0.3207176625728607,
-0.43700581789016724,
-0.4506273865699768,
0.04561575502157211,
-0.02865305170416832,
-0.1345328837633... | |
list instead of a standard List, it is very unlikely that it will get stored on the LOH. Each element of the list will be small (just a single node with references to the next/previous nodes), so no single object will be >85k bytes.
For details on the LOH, [this is a great blog entry.](http://blogs.msdn.com/maoni/arch... | [
-0.0526711530983448,
-0.20556491613388062,
0.24615274369716644,
0.07471631467342377,
0.24836388230323792,
-0.08326280117034912,
-0.01160926278680563,
-0.20737221837043762,
-0.7088197469711304,
-0.3080778419971466,
-0.3414032757282257,
0.039053454995155334,
-0.2160044014453888,
0.1385552734... | |
A small but important corner of a database that I'm designing will be used to store the result of arbitrary calculations. These results can be of any type. How can I represent a Value field that can be of any type in a relational database?
The only thing I can think of is to have separate tables based on data type tha... | [
0.3155145049095154,
0.3594953119754791,
0.023460689932107925,
0.3021320700645447,
0.20796950161457062,
-0.06012888252735138,
-0.13913816213607788,
-0.02654402144253254,
-0.21144399046897888,
-0.38862529397010803,
0.3911152184009552,
0.24114343523979187,
-0.260953426361084,
0.57752078771591... | |
way.
Your best option is probably going to be to serialize the data and use either string or xml as others are suggesting.
Another option if you are using MS SQL Server is the SQL\_VARIANT type, which can store anything except LOBs. I'm not recommending this option over serialization however as serialization work on a... | [
0.14370790123939514,
-0.3305315375328064,
0.1603202223777771,
0.4619981646537781,
0.10739012807607651,
-0.3278079032897949,
0.11896427720785141,
0.3534066081047058,
-0.5410659909248352,
-0.7716614007949829,
-0.09411024302244186,
0.09109046310186386,
-0.48266375064849854,
0.2409199774265289... | |
I am trying to convert my shop from using VSS to TFS.
Our current codebase consists of a large number of Visual Studio 2008 solutions and I've noticed some of them seem to cause MSBuild to fail, but I cannot figure out why. The actual solutions themselves and the projects they hold build correctly, but the overall bu... | [
0.3780369460582733,
0.48671966791152954,
0.3064447045326233,
-0.285038024187088,
-0.11490259319543839,
0.14304661750793457,
0.4187675714492798,
0.16854865849018097,
0.07442042976617813,
-0.6678813099861145,
-0.17263451218605042,
0.8606147170066833,
-0.17068572342395782,
0.00049270637100562... | |
can tell though, when it gets to one of these SLN files that give it problems, MSBuild just flat out crashes and dies.
```
Task "MSBuild"
Global Properties:
Configuration=Release
Platform=Any CPU
OutDir=C:\TFS\REPOSITORY\Full\Binaries\Release\
PublishDir=C:\TFS\REPOSITORY\Full\Binaries\Release\
... | [
-0.21243609488010406,
-0.16476933658123016,
0.48311641812324524,
0.301763117313385,
0.14138232171535492,
-0.0334855392575264,
0.44964033365249634,
-0.4095419645309448,
-0.3351551592350006,
-0.7510529160499573,
-0.1774524748325348,
0.40449514985084534,
-0.22885571420192719,
0.26800066232681... | |
MSB4018: at Microsoft.Build.BuildEngine.SolutionWrapperProject.AssignDependencyLevel(ProjectInSolution project, SolutionParser solution, Dictionary`2 projectsByDependencyLevel)
error MSB4018: at Microsoft.Build.BuildEngine.SolutionWrapperProject.AssignDependencyLevel(ProjectInSolution project, SolutionParser solu... | [
-0.4750555455684662,
0.45319947600364685,
0.346882164478302,
0.014235838316380978,
0.024925773963332176,
0.3674590289592743,
0.6590092182159424,
-0.31090793013572693,
-0.15412504971027374,
-0.7850530743598938,
-0.30228161811828613,
0.6182819604873657,
-0.15400734543800354,
0.24904130399227... | |
at Microsoft.Build.BuildEngine.Engine.EngineBuildLoop(BuildRequest terminatingBuildRequest)
error MSB4018: at Microsoft.Build.BuildEngine.TaskExecutionModule.BuildProjectFile(Int32 handleId, String[] projectFileNames, String[] targetNames, IDictionary[] globalPropertiesPerProject, IDictionary[] targetOutputsPerProje... | [
-0.2854960560798645,
0.05592875927686691,
0.32738131284713745,
-0.1149008646607399,
-0.07542165368795395,
0.3416275382041931,
0.5877156257629395,
-0.38587456941604614,
-0.3341201841831207,
-0.649266242980957,
-0.2777305245399475,
0.6763631701469421,
-0.2481657862663269,
0.05330460146069527... | |
Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
Done building target "CoreCompileSolution" in project "TFSBuild.proj" -- FAILED.
Done Building Project "C:\TFS\REPOSITORY\Full\BuildType\TFSBuil... | [
-0.3553628623485565,
0.022622225806117058,
0.07916904985904694,
-0.0676572248339653,
-0.0647159144282341,
-0.018370145931839943,
0.7639784812927246,
-0.42548683285713196,
0.13100296258926392,
-0.6889644861221313,
-0.3732569217681885,
0.46965697407722473,
-0.29506343603134155,
-0.0361685007... | |
is crashing** and I can't figure out why. It gives the usual "Object reference not set..." error, which is pretty much universally useless when it's not your code or program you're troubleshooting.
I see that it's referencing TeamFoundation.Build.targets. I look up that file that file but it doesn't really jump out at... | [
-0.15564604103565216,
-0.14532049000263214,
0.12041137367486954,
0.06900710612535477,
0.004212715197354555,
-0.13129529356956482,
0.4607633054256439,
-0.07796827703714371,
-0.5146162509918213,
-0.46145978569984436,
-0.2973252534866333,
0.4384535551071167,
-0.35477307438850403,
0.0094958655... | |
VCBuildOverride=$(VsPropsFile);VCBuildAdditionalLibPaths=$(VCBuildAdditionalLibPaths);VCBuildAdditionalOptions=$(VCBuildAdditionalOptions);VCBuildToolPath=$(VCBuildToolPath);VCBuildUseEnvironment=$(VCBuildUseEnvironment);
TeamBuildConstants=$(TeamBuildConstants);TargetsNotLogged=$(TargetsNotLog... | [
-0.04880482703447342,
-0.3684551417827606,
0.7165313959121704,
-0.19429342448711395,
0.2073083221912384,
0.08560458570718765,
0.4392974078655243,
-0.5020491480827332,
-0.1485327035188675,
-0.6836296916007996,
-0.20337553322315216,
0.6136192679405212,
-0.23857231438159943,
-0.02099948003888... | |
of the items in the call stack of the MSBuild deal with targets and the issue seems to stem from the TeamFoundation.Build.targets file but I'm stuck as to what to do next to troubleshoot it.
Has anyone run into this before?
When you said:
> The actual solutions themselves and the projects they hold build correctly
d... | [
0.5000436305999756,
0.24177992343902588,
0.10794102400541306,
-0.1842871457338333,
-0.028180258348584175,
-0.013575974851846695,
0.25809216499328613,
-0.18275073170661926,
-0.10634030401706696,
-0.436920166015625,
0.24355721473693848,
0.5960847735404968,
-0.3129272162914276,
-0.13889472186... | |
parallel, turn off multi-CPU support (e.g. '-maxcpucount:1'), do a binary search by trimming away solutions/projects. Once you get to the offending set, build with the '-v:diag' parameter to get even more details about the state of the MSBuild engine.
Alternately, you can write a small C# app that invokes the MSBuild ... | [
0.17603817582130432,
0.08936954289674759,
0.21010591089725494,
0.22003869712352753,
-0.062484413385391235,
0.1399720013141632,
0.14236806333065033,
-0.006720464210957289,
-0.24466027319431305,
-0.474424809217453,
-0.23964419960975647,
0.5725255608558655,
-0.5741955637931824,
0.333520859479... | |
I am using the following the following class `org.apache.poi.hssf.usermodel.HSSFCell`, with a list of the following methods:
```
void setCellValue(boolean value)
void setCellValue(java.util.Calendar value)
void setCellValue(java.util.Date value)
void setCellValue(double value)
void setCellValue(HSSFRichTextString ... | [
0.35307151079177856,
0.0336543507874012,
0.9519168734550476,
-0.3602966070175171,
0.09090735018253326,
-0.19725526869297028,
0.31231310963630676,
-0.4509134590625763,
0.13766928017139435,
-0.6589677333831787,
-0.12110907584428787,
0.3533710241317749,
-0.29751890897750854,
0.127512022852897... | |
i++) {
final HSSFRow row = sheet.createRow(i + 1);
for (int j = 0; j < columnCount; j++) {
final Object object = tableModel.getValueAt(i, j);
final Class myClass = tableModel.getColumnClass(j);
// How to perform casting during compiled time, and invoke
// the setCellValue with co... | [
-0.18793970346450806,
-0.13116249442100525,
0.9495159983634949,
-0.23667116463184357,
-0.12291906774044037,
0.2749090790748596,
0.31843724846839905,
-0.5363359451293945,
-0.09462320059537888,
-0.5337048768997192,
-0.2881048321723938,
0.10653744637966156,
-0.12246298044919968,
-0.0058275004... | |
row.createCell(j).setCellValue(??); // Does not accept Object!
}
}
}
```
Perhaps ugly if...else with `instanceof` would resolve my problem. However, if I do not want the ugly if...else with `instanceof`, is there any better way to do so?
One way of handling this is to load that list of methods at runtime ... | [
-0.18351639807224274,
0.13088710606098175,
0.4071875214576721,
-0.36997488141059875,
-0.025056449696421623,
0.07025052607059479,
0.28251203894615173,
-0.38167110085487366,
0.11696676164865494,
-0.8816581964492798,
0.05010158196091652,
0.556248128414154,
-0.46536198258399963,
0.159936234354... | |
(method.getName().equals("setCellValue")) {
map.put(method.getParameterTypes()[0], method);
}
}
```
then when you want to call this, look up the Method in the `map` by argument type and use that instance.
To show this off, again with simplified but this time full code. Note that to be fully general, the code g... | [
0.007142611779272556,
-0.19168777763843536,
0.18111585080623627,
0.06635384261608124,
-0.2016504406929016,
-0.2986971139907837,
0.093039371073246,
-0.485248327255249,
-0.199494868516922,
-0.8706612586975098,
0.1517457813024521,
0.6124401688575745,
-0.38706719875335693,
-0.08797957748174667... | |
or superclasses in the arguments that you have to worry about, you can move all of the complicated logic into initialization (which doesn't matter if it takes 1 ms longer). In this case, all of the logic in `findMethodToInvoke()` would be moved into the constructor, where you would loop over all interfaces and supercla... | [
-0.014034022577106953,
-0.09067462384700775,
0.07411543279886246,
-0.008232722990214825,
-0.1741701066493988,
0.08536616712808609,
0.3696061074733734,
-0.44899076223373413,
0.036964789032936096,
-0.7407195568084717,
-0.13690900802612305,
0.35155391693115234,
-0.3250713348388672,
0.11764013... | |
Map<Object, Method> parameterTypeMap = new HashMap<Object, Method>();
private final Object[] tests = {Double.valueOf(3.1415),
Boolean.TRUE,
new Date(), | [
0.08099189400672913,
-0.34814462065696716,
0.43561211228370667,
-0.06888502836227417,
0.29149875044822693,
0.310312956571579,
0.2621120512485504,
-0.3006645441055298,
-0.10880807042121887,
-0.7632236480712891,
-0.1426411122083664,
0.38089635968208313,
-0.03592031076550484,
0.20421040058135... | |
new GregorianCalendar(),
new HashMap<Object, Object>()};
public Test() {
Method[] methods = Setters.class.getMethods();
for (Method method : methods) {
if (method.getName().equals("setCellValue")) {
Class<?>[] clazzes = method.getParameterTypes(); | [
0.1274699866771698,
-0.3654363453388214,
0.6905938386917114,
0.0851205438375473,
0.05421282351016998,
0.31213250756263733,
0.35585641860961914,
-0.36826393008232117,
-0.028127919882535934,
-0.5318914651870728,
-0.2584572434425354,
0.5334035754203796,
-0.0766645297408104,
0.2729154229164123... | |
if (clazzes.length != 1) {
continue;
}
if (clazzes[0].isPrimitive()) {
handlePrimitive(method, clazzes[0]);
}
parameterTypeMap.put(clazzes[0], method);
}
}
}
// See http://java.sun.com/javase/6/docs/api/java/lang/Class.html#isPrimitive()
private void ... | [
-0.2187478095293045,
-0.18525731563568115,
0.488756388425827,
-0.40264350175857544,
0.2174229621887207,
-0.03533942624926567,
0.16805078089237213,
-0.47464054822921753,
-0.17787347733974457,
-0.21287885308265686,
-0.5657992959022522,
0.5402121543884277,
-0.3574766516685486,
0.1360260993242... | |
} else if (clazz == Double.TYPE) {
parameterTypeMap.put(Double.class, method);
} // ... and so on for the other six primitive types (void doesn't matter)
}
public void doTests(Setters setter) {
for (Object test : tests) {
Method method = findMethodToInvoke(test);
if (method == null) {
... | [
0.26758337020874023,
-0.2522188425064087,
0.22575785219669342,
-0.025978388264775276,
0.4435848593711853,
0.1364346146583557,
0.5059210658073425,
-0.40084144473075867,
-0.08944597095251083,
-0.4529009461402893,
-0.20257829129695892,
0.6223744750022888,
-0.3944936692714691,
0.12162062525749... | |
try {
method.invoke(setter, test);
} catch (Exception e) {
e.printStackTrace();
}
}
}
private Method findMethodToInvoke(Object test) {
Method method = parameterTypeMap.get(test.getClass());
if (method != null) {
return method;
}
// Look for superclasses
Cl... | [
-0.11154532432556152,
-0.3548707365989685,
0.06784406304359436,
-0.03336042910814285,
0.30004221200942993,
0.028232883661985397,
0.5583891272544861,
-0.34259626269340515,
0.04056079685688019,
-0.45110735297203064,
-0.29832547903060913,
0.5466254949569702,
-0.3823120594024658,
0.00940956454... | |
Object.class) {
method = parameterTypeMap.get(x);
if (method != null) {
return method;
}
x = x.getSuperclass();
}
// Look for interfaces
for (Class<?> i : test.getClass().getInterfaces()) {
method = parameterTypeMap.get(i);
if (method != null) {
return me... | [
-0.15768802165985107,
-0.12927600741386414,
0.3622724413871765,
0.10935134440660477,
-0.09085841476917267,
0.27096229791641235,
0.6045329570770264,
-0.5435147881507874,
-0.045752305537462234,
-0.7198479175567627,
-0.10737306624650955,
0.5146172642707825,
-0.4532431960105896,
0.138930499553... | |
return null;
}
public static void main(String[] args) {
Test test = new Test();
test.doTests(new Setters());
}
}
class Setters {
public void setCellValue(boolean value) {
System.out.println("boolean " + value);
}
public void setCellValue(double value) {
System.out.println("double " + valu... | [
0.49531692266464233,
-0.31166622042655945,
0.6017245650291443,
-0.3094014525413513,
0.06612734496593475,
0.2897915542125702,
0.16504475474357605,
0.008874204009771347,
-0.1634431928396225,
-0.4141319692134857,
-0.364061176776886,
0.5265116691589355,
-0.4749307632446289,
0.27743226289749146... | |
System.out.println("Map " + value);
}
}
``` | [
-0.4109257161617279,
-0.15881836414337158,
0.35557445883750916,
-0.271205335855484,
0.20519696176052094,
-0.1488034576177597,
0.17335619032382965,
0.10473966598510742,
-0.20255737006664276,
-0.7360715270042419,
-0.36440935730934143,
0.6197910904884338,
-0.49122676253318787,
0.2998408377170... | |
My code i want to display in a textbox
```
<a href="http://www.erate.co.za/CompanyProfile.aspx?ID=112">
<img src="http://www.erate.co.za/CompanyAdd.bmp" alt="Go rate us on www.eRate.co.za"
border="0" style="width: 136px; height: 88px" /></a>
```
But i get the ID from a Reader like this
```
reader.Item("ID").ToS... | [
0.30257952213287354,
0.49936574697494507,
0.630699872970581,
-0.17980387806892395,
-0.03256379812955856,
0.5248879194259644,
0.23986734449863434,
-0.38849174976348877,
0.061821989715099335,
-0.7231261730194092,
-0.040093157440423965,
0.38627344369888306,
-0.33392325043678284,
0.37687307596... | |
I know it's VB and not C#?
Because this line works for you:
```
reader.Item("ID").ToString
```
In C#, it would have to be:
```
reader.Item["ID"].ToString()
``` | [
0.11188406497240067,
0.20639240741729736,
0.6491888165473938,
-0.20550616085529327,
-0.1183447316288948,
0.030392779037356377,
0.030485378578305244,
0.03339487686753273,
-0.08373933285474777,
-0.1357419639825821,
-0.37741273641586304,
0.5316392183303833,
-0.41690975427627563,
0.19795487821... | |
<http://www.petri.co.il/virtual_creating_differencing_disks_with.htm>
I followed these steps to create a "Differencing Disks" of the WSSv3 demo VHD from microsoft. Well some time has passed, forgot that it was a "differencing" disk and upon defragging, the VUD (Virtual Undo Disk) expanded to consume the remainder of t... | [
0.3149414658546448,
-0.091909259557724,
0.4721568524837494,
0.049999359995126724,
-0.22111272811889648,
0.13629291951656342,
0.09616677463054657,
-0.09304216504096985,
-0.17191043496131897,
-0.6525933146476746,
-0.02469506673514843,
0.6859267354011536,
-0.11206869781017303,
0.5414329171180... | |
nice to collapse the history tree to something like **org -> current** and drop/ignore the change history in between as well as defragement the change log for optimization.
[Update#2]
First, Sorry for the extensions to my questions
Second, Is it possible to shrink a differential disk by merging it with its different... | [
-0.05445520952343941,
-0.2444959431886673,
0.2651965618133545,
0.15812379121780396,
-0.0291882511228323,
0.30204153060913086,
-0.05742013081908226,
-0.1887323260307312,
-0.26930418610572815,
-0.844111442565918,
0.19975215196609497,
0.4310097098350525,
0.09840589016675949,
0.552464127540588... | |
I.E. the presentation layer is on some web servers, then that talks to backend app servers over the network for business logic, then that talks to a database server, again over the network, and maybe the app server also calls out to some remote services (say Authorize.net for payment processing).
MVC is a programming ... | [
0.34953799843788147,
-0.05684195086359978,
0.5320594906806946,
0.44215714931488037,
-0.0174240879714489,
-0.02062845230102539,
-0.15129059553146362,
-0.18625539541244507,
-0.434711217880249,
-0.45198747515678406,
-0.3814445734024048,
0.40940237045288086,
-0.3982881009578705,
0.274555861949... | |
reside on the webserver, and remotely call appservers to retrieve data. MVC abstracts away the details of how the architecture of an app is implemented.
N-tier just refers to the physical structure of an implementation. These two are sometimes confused because an MVC design is often implemented using an N-tier archit... | [
0.16427652537822723,
0.0650474950671196,
0.5448389649391174,
0.19450275599956512,
0.1445106714963913,
-0.01706552319228649,
0.03125564381480217,
0.03596027195453644,
-0.3370259702205658,
-0.4939767122268677,
-0.539105236530304,
0.20480617880821228,
-0.4371262490749359,
0.17842623591423035,... | |
I am able to parse strings containing date/time with **time.strptime**
```
>>> import time
>>> time.strptime('30/03/09 16:31:32', '%d/%m/%y %H:%M:%S')
(2009, 3, 30, 16, 31, 32, 0, 89, -1)
```
How can I parse a time string that contains milliseconds?
```
>>> time.strptime('30/03/09 16:31:32.123', '%d/%m/%y %H:%M:%S'... | [
0.09031794220209122,
0.007154161110520363,
0.7710864543914795,
-0.05331477150321007,
0.035190608352422714,
0.2729695737361908,
0.5333548188209534,
-0.1563984900712967,
-0.15326112508773804,
-0.5895665884017944,
-0.22066514194011688,
0.1775822937488556,
0.07560852915048599,
0.15674425661563... | |
milliseconds or even centiseconds or deciseconds.
```
time.strptime('30/03/09 16:31:32.123', '%d/%m/%y %H:%M:%S.%f')
```
However, [time.struct\_time](https://docs.python.org/3/library/time.html?highlight=struct_time#time.struct_time) doesn't actually store milliseconds/microseconds. You're better off using `datetime... | [
0.13303303718566895,
-0.10341379791498184,
0.797264039516449,
0.07016867399215698,
-0.0876193419098854,
0.06855616718530655,
0.07489695399999619,
-0.08849242329597473,
-0.3200545608997345,
-0.5317142605781555,
-0.14388030767440796,
-0.10726361721754074,
0.17993217706680298,
0.2725067436695... | |
The background to this question is that I need to use some user session data in a (static) WebMethod. I have created a static property that references the data I need like so:
```
private static UserWebSession UserWebSession
{
get
{
return (UserWebSession)HttpContext.Current.Session["UserWebSession"];
... | [
0.15490779280662537,
0.10588645190000534,
0.5735615491867065,
-0.03801293298602104,
0.13773058354854584,
-0.23479968309402466,
0.1780756562948227,
0.0017459281953051686,
-0.1924503892660141,
-0.6632391810417175,
-0.06932098418474197,
0.36045607924461365,
-0.40100520849227905,
0.50938987731... | |
requested the page?
That's fine - `HttpContext.Current` is designed precisely for this sort of thing. You won't get a previous user's session.
It's dependent on the thread though (I believe) - so if you start any extra background threads, they won't be able to see the current context.
Also be aware that although this... | [
0.4571739733219147,
-0.1914072036743164,
0.7031810283660889,
0.16552749276161194,
-0.015484402887523174,
-0.3301297426223755,
0.3916310966014862,
-0.1673179268836975,
-0.19687077403068542,
-0.47040337324142456,
-0.06845329701900482,
0.5173958539962769,
-0.17461644113063812,
0.1745404750108... | |
My percentages get truncated by the default java.text.MessageFormat function, how do you format a percentage without losing precision?
Example:
```
String expectedResult = "12.5%";
double fraction = 0.125;
String actualResult = MessageFormat.format("{0,number,percent}", fraction);
assert expectedResult.equals(actual... | [
0.3009423017501831,
0.03338966518640518,
0.6525106430053711,
-0.2305944412946701,
-0.038700856268405914,
0.310767263174057,
0.0864265039563179,
-0.2345239520072937,
0.23632295429706573,
-0.4213979244232178,
0.42571917176246643,
0.5124911069869995,
0.20215252041816711,
-0.016697583720088005... | |
I'm developing a fax solution wherein the application sends out fax. I have been researching about how to handle cases where the other line is answered by a person (and not a fax handshake). How did you handle this case?
<http://www.dessci.com/en/> has the software to do exactly what you want. | [
0.30392342805862427,
-0.19745014607906342,
0.2311236411333084,
0.17176996171474457,
0.20039190351963043,
-0.00373198208399117,
0.20874309539794922,
-0.1586083620786667,
-0.15909741818904877,
-0.5406672358512878,
0.13768258690834045,
0.5993275046348572,
-0.22912350296974182,
-0.023904263973... | |
I am looking for a way to have a script run every day at 5am to delete the contents of a Temp folder. The following is the method I am considering. I would appreciate any thoughts on this or suggestions for other methods. I want to keep everything local, so that there are no external dependencies from outside my accoun... | [
0.5800636410713196,
-0.032627567648887634,
0.5671555399894714,
-0.01867583766579628,
0.07830742746591568,
-0.21735769510269165,
0.7649908065795898,
0.26546403765678406,
-0.13476066291332245,
-0.704622209072113,
-0.22408834099769592,
0.5178797245025635,
0.07809780538082123,
-0.0333377383649... | |
into cache
* If the Datetime has passed, run the script to be "scheduled" and add 24 hours to the DateTime in the file
Your comments are appreciated.
You are on the right way. [Here](http://www.codeproject.com/KB/aspnet/ASPNETService.aspx) is a good article how to achieve this.
Also, based on your comment, why not us... | [
0.527674674987793,
-0.1839308738708496,
0.18451537191867828,
0.1498744636774063,
0.19136197865009308,
-0.2605619728565216,
0.6202102899551392,
0.0643797367811203,
-0.2520018219947815,
-0.8836564421653748,
-0.057677023112773895,
0.5169495344161987,
0.013256479986011982,
-0.02510874532163143... | |
Has anyone ever used ASP or ASP.NET to connect to HPQC via the API? Where can I find some examples of this interaction? Any direction on the matter would be greatly appreciated.
I guess by looking into the QC Open Test Architecture API documentation will do. There are lots of examples based in VB. The only difference w... | [
0.5620861053466797,
0.19863489270210266,
0.09587396681308746,
0.1478106677532196,
-0.44448697566986084,
-0.18485994637012482,
0.21654589474201202,
0.18136724829673767,
-0.2810452878475189,
-0.5779291987419128,
0.34384432435035706,
0.5617616176605225,
-0.0813547670841217,
0.0366071984171867... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.