text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
using ShowMessage() and Form.ShowDialog() - they also block until some "event" occurs (though they will run a message-loop if they are called on the gui-thread).
I modified Dead.Rabit's class EventWaiter to handle `EventHandler<T>`. So you can use for waiting all events type of `EventHandler<T>`, that means your delega... | [
0.3633958101272583,
-0.3368024528026581,
0.010328739881515503,
-0.19649703800678253,
0.1490362286567688,
-0.04177079722285271,
0.2690993845462799,
-0.28330740332603455,
-0.2803906202316284,
-0.26519346237182617,
-0.013761349022388458,
0.5191711187362671,
-0.4151248037815094,
0.293462425470... | |
_eventContainer = eventContainer;
_event = eventContainer.GetType().GetEvent(eventName);
}
public void WaitForEvent(TimeSpan timeout)
{
EventHandler<T> eventHandler = new EventHandler<T>((sender, args) => { _autoResetEvent.Set(); });
_event.AddEventHandler(_eventContainer, eventHand... | [
-0.017690779641270638,
-0.43280133605003357,
0.6786333918571472,
-0.35921400785446167,
0.06169230118393898,
0.17348438501358032,
0.36352086067199707,
-0.15484540164470673,
-0.23163333535194397,
-0.6960220336914062,
-0.44030436873435974,
0.7071205377578735,
-0.23918497562408447,
0.190236479... | |
HttpNotificationChannel pushChannel = new HttpNotificationChannel(channelName);
//ChannelUriUpdated is event
EventWaiter<NotificationChannelUriEventArgs> ew = new EventWaiter<NotificationChannelUriEventArgs>(pushChannel, "ChannelUriUpdated");
pushChannel.Open();
ew.WaitF... | [
-0.21527071297168732,
-0.6176612973213196,
0.8142387866973877,
-0.29235702753067017,
-0.21435138583183289,
-0.008925157599151134,
0.3645339906215668,
-0.11812079697847366,
-0.3636082410812378,
-0.767734944820404,
-0.34164005517959595,
0.40938282012939453,
0.017971070483326912,
0.1733314245... | |
I'm having a little issue...I setup a rails application that is to serve a german website. To make use of Rails' internal pluralization features, I kept all my models in english (e.g. the model "`JobDescription`").
Now, if I call "`http://mysite.com/job_descriptions/`", I get all my `job_descriptions`....so far, so goo... | [
-0.017711807042360306,
0.36615926027297974,
0.30438411235809326,
-0.046471722424030304,
-0.09598128497600555,
-0.07624926418066025,
0.372589647769928,
-0.12304668873548508,
-0.18660686910152435,
-0.5822005271911621,
-0.07169666886329651,
0.3451102674007416,
-0.10789796710014343,
-0.1443115... | |
like to exchange the id for a more userfriendly slug in the URL. Thus, I put the following in my `job_description.rb`:
```
def to_param
"#{id}-#{name.gsub(/[^a-z0-9]+/i, '-')}"
end
```
which, whenever I use "`job_description_path`" in any `link_to` method, renders my URLs out to something like "<http://mysite/job_de... | [
0.42809996008872986,
0.5453640222549438,
0.43449899554252625,
-0.1593882292509079,
-0.13166765868663788,
-0.06610454618930817,
0.22421272099018097,
-0.16407494246959686,
-0.1744772046804428,
-0.5194054841995239,
0.02424631454050541,
0.40744054317474365,
-0.10236768424510956,
0.374424278736... | |
is to replace "`job_description`" by "`german_term`" whenever it occurs in a URL.
Any thoughts?!?
Regards,
Sebastian
I think you're going to need to use the restful route helpers to get what you want.
In that case, it wouldn't take much re-factoring (assuming you've mapped JobDescriptions as a resource). Leave you... | [
0.21250465512275696,
0.1763346940279007,
0.2929430305957794,
0.05108132213354111,
0.1581888198852539,
-0.2116468995809555,
0.5473494529724121,
0.14220073819160461,
-0.23936323821544647,
-0.609980046749115,
-0.5198429226875305,
0.22857666015625,
-0.11049448698759079,
0.2045726329088211,
0... | |
Should dynamic business objects for a site be stored in the users session or use ASP.Net caching (objects such as orders, profile information etc)?
I have worked with sites that used sessions to store business objects, but I was wondering...What are the advantages or disadvantages of caching?
If the objects are share... | [
0.027942705899477005,
-0.18504174053668976,
0.08200995624065399,
0.0744963213801384,
-0.17791679501533508,
-0.04931515082716942,
-0.01802893914282322,
-0.030822422355413437,
-0.4890446066856384,
-0.3956456482410431,
-0.014842872507870197,
0.5598857402801514,
-0.4164195656776428,
0.15402469... | |
the data. | [
0.1502465307712555,
0.017401309683918953,
0.2663109004497528,
0.409861296415329,
-0.06237512826919556,
-0.04473874345421791,
-0.17852628231048584,
0.15146544575691223,
-0.11190177500247955,
-0.36838048696517944,
-0.038814082741737366,
0.09021923691034317,
-0.06399098038673401,
0.1883212924... | |
A lot of windows services write daily log files to their application installation directory under "program files".
Windows system apps (eg IIS) use %SystemRoot%\System32\LogFiles. Is something I should do for my service?
We make the log directory configurable. Depending on usage you may not want logs on the OS drive,... | [
0.11385472118854523,
0.0033547538332641125,
0.36551332473754883,
0.0008355311001650989,
0.19122904539108276,
-0.031177416443824768,
0.546566903591156,
0.3994397819042206,
-0.3267347514629364,
-0.6778698563575745,
-0.3250907063484192,
0.44933396577835083,
-0.28309252858161926,
-0.0625988095... | |
I need to extract tokens that are marked with curly brackets from a given string.
I have tried using Expresso to construct something that will parse...
```
-------------------------------------------------------------
"{Token1}asdasasd{Token2}asd asdacscadase dfb db {Token3}"
-----------------------------------------... | [
-0.22660908102989197,
-0.09327090531587601,
0.1440252661705017,
0.14429117739200592,
-0.08726155757904053,
0.09770601987838745,
0.29614490270614624,
-0.3310411274433136,
-0.15306390821933746,
-0.7317525744438171,
-0.11916898936033249,
0.5116407871246338,
-0.10276208817958832,
-0.0591264069... | |
character class. For example, in the likely case you
want only words, you can use (\w*) in place of the (.*?)
This has the advantage that closing } characters are not
part of the class being matched in the inner expression,
so you don't need the ? modifier).
``` | [
-0.2832146883010864,
0.05508715659379959,
-0.0014913940103724599,
-0.0880572497844696,
0.03516966849565506,
0.30058690905570984,
0.21325276792049408,
0.09004580229520798,
0.2072136402130127,
-0.6763150691986084,
-0.6274381875991821,
0.7305222153663635,
-0.2548864483833313,
-0.0251479111611... | |
`std::string` provides [const char\* c\_str ( ) const](http://www.cplusplus.com/reference/string/string/c_str.html) which:
> Get C string equivalent
>
>
> Generates a null-terminated sequence
> of characters (c-string) with the same
> content as the string object and
> returns it as a pointer to an array of
> ch... | [
-0.07394947856664658,
0.20472107827663422,
0.47754669189453125,
-0.24768579006195068,
0.0070442259311676025,
0.30738624930381775,
0.025833021849393845,
-0.19720859825611115,
-0.12471725046634674,
-0.3514522612094879,
-0.43937262892723083,
0.17296957969665527,
-0.4147765338420868,
0.1274494... | |
only granted to remain
> unchanged until the next call to a
> non-constant member function of the
> string object.
Why don't they just define `operator const char*() const {return c_str();}`?
From the C++ Programming Language 20.3.7 (emphasis mine):
> Conversion to a C-style string could have been provided by an o... | [
0.0573994517326355,
-0.15052972733974457,
0.43150606751441956,
-0.0557226687669754,
-0.014301828108727932,
-0.18900172412395477,
0.21830834448337555,
-0.29600492119789124,
-0.17359863221645355,
-0.23930996656417847,
-0.3342251479625702,
0.6769133806228638,
-0.332248330116272,
0.11887004971... | |
I'm writing a scanner as part of a compiler.
I'm having a major headache trying to write this one portion:
I need to be able to parse a stream of tokens and push them one by one into a vector, ignoring whitespace and tokenizing special symbols (simple case, lets just consider parentheses and braces)
Example:
`int m... | [
0.2646951377391815,
0.12452144920825958,
0.08283674716949463,
-0.04141317680478096,
-0.3019581437110901,
0.12096678465604782,
0.3300703763961792,
-0.17555959522724152,
-0.20680953562259674,
-0.7310044169425964,
0.28493571281433105,
0.3616807758808136,
-0.19890311360359192,
-0.1011234596371... | |
be
available to me. (don't ask...)
2. I don't want to use lex, or any other special tools. I've never done
this before and just want to try this once to say I've done it.
Stroustrup's book, *The C++ Programming Language*, has a great example in it about building a lexer/parser for a simple calculator program. It should... | [
0.09757629781961441,
-0.011414045467972755,
0.1665417104959488,
0.15449051558971405,
0.0043830666691064835,
-0.22015073895454407,
-0.15340837836265564,
0.045050833374261856,
-0.11957157403230667,
-0.634696900844574,
-0.04894571006298065,
0.729200541973114,
-0.19949238002300262,
-0.36962378... | |
I could use some advice/help on a piece of software I've developed.
The application is a wizard style app where users fill out fields on each form before choosing to go to the next form or back to the previous. Fairly simple.
Right now the menu calls frmWiz1(InitialData) and when frmWiz1 returns with DialogResult.OK... | [
0.21741478145122528,
-0.05289249122142792,
0.8089640736579895,
0.20634572207927704,
0.05802246183156967,
-0.015053339302539825,
0.13499927520751953,
-0.14020319283008575,
-0.17408117651939392,
-0.8260023593902588,
0.023405836895108223,
0.620736837387085,
-0.02153039164841175,
-0.1019140779... | |
(print preview/sign), it adds each Data object to a custom PrintDocument object that just iterates through the data objects, calling their print functions and manages pagination etc.
Initially I thought this was a good idea but now I'm thinking that:
- The menu form is handling too much flow logic.
- The Data objects... | [
0.09764387458562851,
0.14163945615291595,
0.5690546035766602,
-0.059027351438999176,
-0.11326070129871368,
0.07462063431739807,
-0.09346821904182434,
-0.03790118545293808,
-0.10149852931499481,
-0.5989733338356018,
0.15516206622123718,
0.5168696045875549,
-0.347149133682251,
0.106534309685... | |
language, but I'm still a rookie at design.
Screw "frm" prefixes!
With respect to the overall flow of the application, I would recommend using [Application Controller](http://martinfowler.com/eaaCatalog/applicationController.html) or something of the kind in order to centralize the logic.
As far as the UI goes, each ... | [
0.07855738699436188,
-0.0865807756781578,
0.7295250296592712,
0.09740309417247772,
0.022508298978209496,
-0.015230112709105015,
0.4733193516731262,
0.11385538429021835,
-0.21143175661563873,
-0.5574582815170288,
-0.2084522545337677,
0.6644023656845093,
-0.24592244625091553,
-0.101373009383... | |
Imagine the following table:
```
-------------------------------------------------------------
ID | XML
-------------------------------------------------------------
1 | <Form><object ID="1" /></Form>
2 | <Form><object ID="2" /></Form>
3 | <Form><object ID="2" /></Form>
----------------------... | [
-0.08969982713460922,
0.07207048684358597,
0.3497212827205658,
0.013862987980246544,
0.14198648929595947,
-0.06111106276512146,
0.07470390200614929,
-0.3812512457370758,
-0.024285489693284035,
-0.7781382203102112,
0.2008649855852127,
0.5091878175735474,
-0.15792594850063324,
0.016154391691... | |
there is a nice way to do this in SQL2000.
With SQL2005 you can use the xml data type to pull out the value.
My suggestion would be along the lines of
```
SELECT *
FROM TABLE t
WHERE CHARINDEX('ID="' + CAST(t.ID AS VARCHAR) + '"',t.XML) = 0
```
But it's nasty and slow. | [
0.12842485308647156,
-0.0034901488106697798,
0.2504778206348419,
0.0412866584956646,
-0.07553871721029282,
-0.25239744782447815,
0.08630818128585815,
-0.10889076441526413,
0.09968313574790955,
-0.7093184590339661,
0.3280358612537384,
0.4856746196746826,
-0.31716620922088623,
0.310854971408... | |
Is there a way to compare how close two colors are to each other? If to say both of them are blue.
At the moment the way that we compare them is to manually assign each possible color to a color family(red, green, blue...). And then just compare the strings :)
But surely that manual task can be assigned to a neat... | [
0.27243924140930176,
-0.036733392626047134,
0.08985480666160583,
-0.3686283230781555,
-0.3063478171825409,
0.21999047696590424,
0.1928091198205948,
-0.401348739862442,
-0.27615344524383545,
-0.6333871483802795,
-0.022067034617066383,
0.20758631825447083,
-0.4705139696598053,
0.174815118312... | |
(aka CIE 1976 or dE76) being the most popular.
* [CIE76](http://www.colorwiki.com/wiki/Delta_E%3a_The_Color_Difference#Delta-E_1976)
* [CMC l:c](http://www.colorwiki.com/wiki/Delta_E%3a_The_Color_Difference#CMC_l%3ac)
* [dE94](http://www.colorwiki.com/wiki/Delta_E%3a_The_Color_Difference#dE94)
* [dE2000](http://www.co... | [
0.026075579226017,
-0.051856059581041336,
0.3029420077800751,
-0.34838712215423584,
-0.30746451020240784,
0.23986153304576874,
-0.3161473274230957,
-0.2746227979660034,
-0.49797654151916504,
-0.4659061133861542,
-0.18470732867717743,
0.5635017156600952,
-0.5040019750595093,
0.1479608714580... | |
I'm trying to backup a database in SQL Server 2008 and have the database compressed using the new compression feature. However, when I run the following code, I get a weird error message:
```
Backup Database <Database> To Disk 'C:\Backup' With Compression
```
I get this error message:
> Backup Database With Compres... | [
-0.11540741473436356,
0.3321320414543152,
0.22050607204437256,
0.042772214859724045,
-0.11525262147188187,
-0.4000677764415741,
0.33714306354522705,
-0.03997637704014778,
-0.09839705377817154,
-0.7499919533729553,
-0.012346096336841583,
0.8007286787033081,
-0.3436061441898346,
0.0805044993... | |
your version to Enterprise.
Although you can't backup with compression on those versions, you can RESTORE from compressed backups.
See <http://technet.microsoft.com/en-us/library/bb964719.aspx> for more info. | [
0.3499208986759186,
-0.18906687200069427,
0.21731102466583252,
0.02207862213253975,
0.26770228147506714,
-0.3285151422023773,
0.19516904652118683,
0.5049852728843689,
-0.37540075182914734,
-0.7318772673606873,
-0.6006684303283691,
0.5638456344604492,
-0.18801742792129517,
0.007467184681445... | |
Is there an official name for the character codes, the codes that represent & as & in order to differentiate between the text character and the coding use of it, used in XML and HTML content?
Also, are these part of the XML or HTML standard, or a third party standard? And, is there an official site you can point me t... | [
0.38744696974754333,
0.08249424397945404,
0.3556233048439026,
0.35031041502952576,
-0.06622327864170074,
0.030865926295518875,
-0.10096579045057297,
0.05201559141278267,
-0.44447630643844604,
-0.3856574296951294,
-0.24629095196723938,
0.1818750947713852,
0.06049264594912529,
-0.10579273849... | |
[Java Web Start does not come with 64-bit builds of the JDK](http://java.com/en/download/help/webstart_64bits.xml). Why is this? What is lacking that keeps it from building and working?
Thought you'd might want to know the new update is out:
<http://java.sun.com/javase/6/webnotes/6u12.html>
> 64-Bit Browser Support fo... | [
-0.4092942476272583,
-0.17235499620437622,
0.06429082900285721,
-0.17064577341079712,
-0.2205626666545868,
-0.0011839057551696897,
0.043127868324518204,
-0.024489644914865494,
-0.48829373717308044,
-0.8222939968109131,
-0.20030492544174194,
0.2587044835090637,
-0.1813826709985733,
-0.13178... | |
to have Java Plug-In for
> both browsers. | [
-0.1705341339111328,
-0.061935629695653915,
-0.15443521738052368,
0.062090449035167694,
-0.07677260041236877,
-0.1547265201807022,
0.38896864652633667,
-0.0337236151099205,
0.26998865604400635,
-1.068645715713501,
-0.07342462241649628,
0.34488609433174133,
-0.2501215934753418,
-0.467325896... | |
The [MSDN site](http://msdn.microsoft.com/en-us/library/system.io.bufferedstream.aspx) states:
> A buffer is a block of bytes in memory
> used to cache data, thereby reducing
> the number of calls to the operating
> system. Buffers improve read and write
> performance. A buffer can be used for
> either reading or... | [
0.06185729056596756,
0.017134681344032288,
0.3049210011959076,
-0.11357326805591583,
-0.011560162529349327,
-0.0474679172039032,
-0.08277317136526108,
-0.030477385967969894,
-0.1541726440191269,
-0.688281238079071,
-0.05160469189286232,
0.17063887417316437,
-0.24571849405765533,
0.01598071... | |
is used to provide an additional
> memory buffer to another type of
> stream, both synchronously and
> asynchronously. The BufferedStream
> class must be configured to either
> read or write when an instance of the
> class is created, but the
> BufferedStream cannot be configured to
> perform both the tasks at ... | [
-0.12817031145095825,
-0.3011740744113922,
0.162636399269104,
0.08441953361034393,
-0.057340722531080246,
0.006566548720002174,
0.15989674627780914,
0.0025322623550891876,
0.1464303880929947,
-0.8674807548522949,
-0.13689757883548737,
0.34647679328918457,
-0.47555339336395264,
0.1118514314... | |
MemoryStream. Applying a
> BufferedStream to an existing .NET
> Framework stream results in a double
> buffer.
>
>
> The most common application of the
> BufferedStream class is in custom
> stream classes that do not include a
> built-in buffer. | [
0.09912151843309402,
-0.2266840785741806,
0.10980524122714996,
0.06472688168287277,
-0.07640651613473892,
-0.053071796894073486,
0.029907887801527977,
0.052234943956136703,
0.019769635051488876,
-0.7618183493614197,
0.03509480133652687,
0.21639053523540497,
-0.5434454083442688,
0.094085514... | |
I've been using the [RestFixture](http://code.google.com/p/rest-fixture/) in [Fitnesse](http://fitnesse.org/) to test a REST service which is running under Tomcat. When Fitnesse is run on Linux (Redhat to be precise) the fixture doesn't pass any querystrings to Tomcat (the log entries prove this). However, the exact sa... | [
0.5316804647445679,
-0.15451423823833466,
0.4751960337162018,
0.06454119831323624,
0.2905977666378021,
-0.14374563097953796,
0.3835445046424866,
-0.09693817794322968,
0.013383262790739536,
-0.43226543068885803,
0.0834747701883316,
0.7244109511375427,
-0.1630978286266327,
-0.133371368050575... | |
across what appears to be this issue myself. I haven't tried on Windows but RestFixture is fairly definitely not populating my query parameters.
In fact, there's an [issue](http://code.google.com/p/rest-fixture/issues/detail?id=13&can=1) on the RestFixture list about it. | [
0.2414306104183197,
0.0077087972313165665,
0.6609790921211243,
-0.20973768830299377,
0.29367226362228394,
-0.015875356271862984,
0.12417685985565186,
0.09855383634567261,
-0.4721401035785675,
-0.5487560629844666,
0.011918316595256329,
0.41017380356788635,
-0.16558493673801422,
0.3566334545... | |
I am in the process of converting an internal application to use more Ajax via jQuery. I am moving away from the standard code behind of the current ASP.NET application and incorporating JavaScript methods that are going to run client side. My concern is what is the best method for allowing this application to stay mai... | [
0.5173736214637756,
0.28211531043052673,
0.010191183537244797,
-0.07313694059848785,
-0.15349969267845154,
-0.2999087870121002,
0.26367297768592834,
0.27181771397590637,
-0.13951189815998077,
-0.9417524337768555,
-0.0599043071269989,
0.685174822807312,
0.11662130057811737,
-0.1475722491741... | |
build process you can break your JS into files based on the functionality. You can use the debug versions of libraries during development, and leave glorious code comments smattered around your code with impunity.
A build script should:
* [Lint](http://www.jslint.com) all your code
* Strip comments
* Concatenate the ... | [
0.6845378875732422,
0.12249722331762314,
0.2284480333328247,
-0.23526069521903992,
-0.19605518877506256,
-0.07131895422935486,
0.4717600643634796,
-0.24976523220539093,
-0.1748206615447998,
-0.8180896639823914,
-0.14437229931354523,
0.44413521885871887,
0.08655420690774918,
-0.069824352860... | |
There is a hard limit of the number of parameters any single SQL statement can have, and that is 2100 (for SQL Server 2005), or 1024 (for SQL Server 2000).
Does anyone know of a way to increase that number?
If you'd like to know "why" (as I would be dying of curiosity myself), the ansewr is in this:
```
MyL2SDataCon... | [
-0.1500535011291504,
0.17139358818531036,
0.5100852847099304,
-0.012885738164186478,
-0.06306490302085876,
-0.0947314128279686,
0.07590240985155106,
-0.04470149800181389,
-0.48058605194091797,
-0.2576098144054413,
0.19153955578804016,
0.6507916450500488,
-0.07562573254108429,
0.07215072959... | |
We are using the WebBrowser control in c# winforms and need to be able to get information about the Url the cursor is positioned on.
So we have a web page in design mode, which has multiple urls, when the cursor is over one I would like to call a method which would return the id of the link.
Thanks
You can use the `... | [
0.237851083278656,
-0.2711571753025055,
0.5258427858352661,
0.32879379391670227,
-0.13994954526424408,
-0.40561243891716003,
-0.0335116870701313,
-0.021311063319444656,
-0.05718614533543587,
-0.5902026891708374,
0.2160940170288086,
0.6126165986061096,
-0.2967781126499176,
0.263188540935516... | |
I'm really struggling to wrap my head around some of this stuff. Let me give an example of where I'm struggling.
I'm using Linq-2-Sql as the DAL for my app and the IRepository pattern used in the MVC Storefront sample app from Rob Conery.
In my domain I have a Customer Model which has a collection of Address Models. ... | [
0.35792824625968933,
0.14042691886425018,
0.4476553201675415,
-0.1034577414393425,
-0.010571370832622051,
0.30174365639686584,
-0.09726075083017349,
0.019272299483418465,
-0.3289763629436493,
-0.638291597366333,
0.16792315244674683,
0.28878745436668396,
-0.07319439202547073,
0.273601949214... | |
then added to the list in my customer object? Does it just get added to the list but not updated until the Customer object get's saved? What if the user wants to delete an address? Do I delete the address in the database and then remove it from the list? Or do they just make all the deletes/adds they want and I dump ev... | [
0.31408342719078064,
0.30279943346977234,
0.4193720817565918,
-0.10663942992687225,
-0.036402784287929535,
-0.087970070540905,
0.14203906059265137,
-0.10895738005638123,
-0.3364237844944,
-0.4485704302787781,
-0.17907960712909698,
0.5308477282524109,
-0.33377301692962646,
0.381270229816436... | |
c, Address a)
{
//validate and save address to db
//add the newly saved address to the Customer Object
}
```
Help...
DDD is an area where I have a lot of interest but but very little experience so please treat my suggestions cautiously. I only offer them because of the absence of other, more authoritative, an... | [
0.20261472463607788,
0.426742821931839,
0.08974461257457733,
-0.23567987978458405,
0.0563756562769413,
0.04357452318072319,
-0.01946539804339409,
-0.1839819848537445,
-0.031889643520116806,
-0.3411267101764679,
-0.29991039633750916,
0.42850613594055176,
-0.37932324409484863,
0.320983886718... | |
Repository (but not one for addresses). This might be used like this:
customerRepository.Update(customer);
The intentional affect of this is that all the difficult questions you ask about how this is then implemented at the DB layer are not the concern of the domain objects (i.e. the customer object). I'm afraid I ca... | [
0.1872550994157791,
0.07063122093677521,
0.026148386299610138,
0.1960509568452835,
-0.26641571521759033,
-0.3576173484325409,
0.11949625611305237,
0.0541318841278553,
-0.22842280566692352,
-0.4245721101760864,
-0.12235789000988007,
0.5868456363677979,
-0.07231742888689041,
0.38830921053886... | |
I have a table in SqlServer 9 with data of the form
```
Code Number
J 0
J 5
J 8
Y 2
Y 8
```
I'd like to add a column that has a number with the internal sequence of numbers for each code, so that my table looks like this;
```
Code Number Seq
J 0 1
J | [
-0.17248758673667908,
0.3131575584411621,
0.610716700553894,
-0.24681530892848969,
-0.022379545494914055,
0.17989343404769897,
-0.071151003241539,
0.1336134821176529,
-0.18310552835464478,
-0.4977918565273285,
0.05422166734933853,
0.16024453938007355,
-0.42273765802383423,
-0.0769119188189... | |
5 2
J 8 3
Y 2 1
Y 8 2
```
Does anyone have any suggestions as to the best way to accomplish this?
Look at the [ROW\_NUMBER()](http://msdn.microsoft.com/en-us/library/ms186734.aspx) function.
```
DECLARE @Number TABLE (
Code nvarchar(1)
, Number int
)
I... | [
0.16818305850028992,
0.23994284868240356,
0.3578498661518097,
-0.18881860375404358,
0.1257917284965515,
0.12567274272441864,
0.2594177722930908,
-0.29693666100502014,
-0.3069820702075958,
-0.4404420554637909,
-0.20628957450389862,
0.42467647790908813,
-0.12324044108390808,
0.18178734183311... | |
('J', 0)
INSERT @Number VALUES ('J', 5)
INSERT @Number VALUES ('J', 8)
INSERT @Number VALUES ('Y', 2)
INSERT @Number VALUES ('Y', 8)
SELECT * FROM @Number
SELECT Code
, Number
, ROW_NUMBER() OVER(PARTITION BY Code ORDER BY Code) AS Seq
FROM @Number
``` | [
0.11335889250040054,
0.1127317026257515,
0.15942756831645966,
-0.07777752727270126,
0.2856350839138031,
0.5206289291381836,
-0.036424506455659866,
-0.48254454135894775,
0.040843382477760315,
-0.5868729948997498,
-0.2613430321216583,
0.25392380356788635,
-0.18144859373569489,
0.333417505025... | |
First off, here is some code:
```
int main()
{
int days[] = {1,2,3,4,5};
int *ptr = days;
printf("%u\n", sizeof(days));
printf("%u\n", sizeof(ptr));
return 0;
}
```
Is there a way to find out the size of the array that `ptr` is pointing to (instead of just giving its size, which is four bytes o... | [
0.2529051601886749,
-0.07556319981813431,
0.4618116319179535,
-0.12459847331047058,
0.18732403218746185,
0.13583454489707947,
0.11870386451482773,
-0.16358955204486847,
-0.529555082321167,
-0.4330894649028778,
-0.14216622710227966,
0.4292770028114319,
-0.2952491044998169,
0.252186059951782... | |
but that's not using `sizeof()`.
Another trick is the one mentioned by [Zan](https://stackoverflow.com/users/13422/zan-lynx), which is to stash the size somewhere. For example, if you're dynamically allocating the array, allocate a block one int bigger than the one you need, stash the size in the first int, and retur... | [
0.21669645607471466,
-0.2857407331466675,
-0.03626302629709244,
0.09152284264564514,
-0.002080835634842515,
-0.06965453177690506,
0.11906612664461136,
-0.23006872832775116,
-0.6804351210594177,
-0.5096619129180908,
-0.07592958956956863,
0.2684629559516907,
-0.15551991760730743,
0.092174127... | |
How do you get the Domain Controller IP address programmatically using `C#`?
Thanks All,
I done it as in this code
```
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.DirectoryServices.AccountManagement;
using Syst... | [
0.06779258698225021,
-0.5637350678443909,
0.8755454421043396,
0.3774223029613495,
0.47024551033973694,
-0.3124519884586334,
0.16247084736824036,
-0.22130873799324036,
-0.17641501128673553,
-0.7347201704978943,
-0.023088643327355385,
0.4377836287021637,
-0.359637051820755,
0.666679620742797... | |
IPAddress DCIPAdress = IPAddress.Parse(dc.IPAddress);
}
```
Thanks again | [
-0.3311503827571869,
0.09686754643917084,
0.6254497170448303,
0.06625084578990936,
0.027023976668715477,
0.13050495088100433,
0.20846416056156158,
0.4246867001056671,
-0.47779327630996704,
-0.7366461753845215,
-0.16404129564762115,
0.3602130711078644,
-0.4012605547904968,
-0.19648340344429... | |
In C# code, I have three objects **A**, **B** and **C**. **A** and **B** each hold a reference to **C**. When **A** is destroyed I would like the reference from **B** to **C** to be deleted as well so that **C** can be destroyed by the Garbage Collector.
Is there a way to do this without deleting it manually from **B... | [
0.04116123169660568,
0.39079490303993225,
0.5320993065834045,
0.09514200687408447,
-0.08985289186239243,
0.18063174188137054,
0.25835496187210083,
-0.21011441946029663,
-0.13703308999538422,
-0.7599252462387085,
-0.08828775584697723,
0.3143289387226105,
-0.5304790139198303,
0.2394052445888... | |
and C will be "removed" when A is "removed".
**Solution 2**
You should send a signal to B when A is "removed". If B is known to A you can signal B from A. I would use an [IDisposable](http://msdn.microsoft.com/en-us/library/system.idisposable.aspx) pattern for this
**Solution 3**
Instead of directly referencing C f... | [
-0.36104440689086914,
-0.2941657304763794,
0.4770430028438568,
-0.09759271889925003,
-0.08618688583374023,
0.005989265628159046,
0.3792155385017395,
-0.13184212148189545,
-0.27730411291122437,
-0.5764084458351135,
-0.4362475574016571,
0.15126876533031464,
-0.4445706009864807,
0.07707733660... | |
Can anyone tell me the best way to send some xml data from one server to another in an asp.net application.
Basically in one application on a certain condition I want to trigger the sending of some xml values to another receiving asp.net application that will process the data and return the user to the sending site.
... | [
0.45663779973983765,
0.05467389523983002,
0.249001607298851,
0.466644823551178,
-0.07038639485836029,
-0.3282466232776642,
-0.0350765623152256,
-0.07135355472564697,
-0.24566417932510376,
-0.4527369439601898,
0.007504404056817293,
0.2591550350189209,
-0.00857661385089159,
-0.16000789403915... | |
will be from a shopping cart, such as price, merchantid and email address.
We will be providing the code to the cart owner to add to their site, so the simpler the better.
You could create a web service on the target server that is consumed by the client server. It might be simpler to just create a page on the target ... | [
0.5234425067901611,
-0.11398855596780777,
0.6637167930603027,
0.4682024419307709,
-0.07744968682527542,
0.09201423078775406,
-0.19050034880638123,
-0.11367112398147583,
-0.006772912107408047,
-0.7628979682922363,
-0.12428411841392517,
0.3258498013019562,
-0.08426374942064285,
0.08567012846... | |
I'm trying to write a Ruby script that will ssh over to a server, run a given command, and fetch the output from it. Here's what I've got so far, mostly adapted from the [Programming Ruby](http://www.pragprog.com/titles/ruby/programming-ruby) book:
```
require 'pty'
require 'expect'
$expect_verbose = true
PTY.spawn("... | [
0.23431725800037384,
0.12396123260259628,
0.4227929413318634,
-0.28524550795555115,
-0.17423826456069946,
0.12354505807161331,
0.5562444925308228,
-0.3082593083381653,
0.15354420244693756,
-0.8044295310974121,
-0.07517211139202118,
0.6018940210342407,
-0.13637001812458038,
-0.0892331898212... | |
a little like this:
```
require 'rubygems'
require 'net/ssh'
Net::SSH.start('your-server', 'username', :password => "password") do |ssh|
puts ssh.exec!("ls -la")
end
``` | [
0.11605957895517349,
0.05192309617996216,
0.29971587657928467,
-0.17606118321418762,
0.18137916922569275,
-0.21748709678649902,
0.3553653955459595,
-0.04130393639206886,
-0.15186616778373718,
-0.693938672542572,
-0.5305964350700378,
0.2385827749967575,
-0.19112636148929596,
0.1312343329191... | |
How do I calculate an MD5 of a string client side in Microsoft Access?
If you are implementing MD5 through a VBA module then there are several options.
I haven't tried this, but a quick search for "md5 vba" returned this [basMD5.bas](http://www.di-mgt.com.au/src/basMD5.bas.html) file. It is not one of the common open ... | [
0.23776602745056152,
0.1446506232023239,
0.2756141126155853,
-0.05071011558175087,
-0.08892378211021423,
-0.020528435707092285,
0.027280323207378387,
-0.46710413694381714,
-0.49290764331817627,
-0.46022117137908936,
0.23410145938396454,
0.020831290632486343,
-0.2980414927005768,
0.05590351... | |
by benjamin
pritchard.
* [MD5 for VB and VBScript](http://www.frez.co.uk/freecode.htm#md5). Reference by
Dominik Deobald. | [
0.16816897690296173,
0.33531954884529114,
-0.12576629221439362,
0.05780287832021713,
-0.20354068279266357,
0.2974828779697418,
0.4011097252368927,
-0.1843629628419876,
-0.4167102873325348,
-0.46936243772506714,
-0.7575225234031677,
-0.14153514802455902,
-0.19845978915691376,
0.007918889634... | |
I am using the CakePHP XmlHelper to parse XML files like:
```
App::import('Xml');
$file = "my_xml_file.xml";
$parsed_xml =& new XML($file);
```
How can I use it to load XML files from URLs like <http://www.site.com/file.xml>
Thanks!
It's simple
```
App::import('Xml');
$url = "http://www.example.com/xml_file.xml";... | [
0.22335204482078552,
0.2309931069612503,
0.45445987582206726,
-0.32530513405799866,
-0.37332454323768616,
0.18583281338214874,
0.1649019718170166,
-0.26444628834724426,
-0.21158632636070251,
-0.7528394460678101,
-0.2808707654476166,
0.19289864599704742,
-0.1389884203672409,
-0.088326431810... | |
I have a Git repo that I have deleted four files from using `rm` (**not** `git rm`), and my Git status looks like this:
```
# deleted: file1.txt
# deleted: file2.txt
# deleted: file3.txt
# deleted: file4.txt
```
How do I remove these files from Git without having to manually go through and ad... | [
0.1228351965546608,
0.18548806011676788,
0.4599379599094391,
-0.13429208099842072,
-0.2534506320953369,
0.1901334822177887,
0.3279670476913452,
-0.13832204043865204,
-0.5396287441253662,
-0.4925612211227417,
-0.03388049080967903,
0.6248801946640015,
-0.28435367345809937,
0.1818537116050720... | |
1.x
```
$ git add -u
```
This tells git to automatically stage tracked files -- including deleting the previously tracked files.
### For Git 2.0
To stage your whole working tree:
```
$ git add -u :/
```
To stage just the current path:
```
$ git add -u .
``` | [
-0.004773175343871117,
0.032900121062994,
0.4633471369743347,
-0.20617547631263733,
0.06075108051300049,
-0.2363428920507431,
0.2702491879463196,
-0.030564403161406517,
0.00003871889930451289,
-0.5672847032546997,
-0.3611826002597809,
0.5046252012252808,
-0.4851955771446228,
-0.28644281625... | |
Question
--------
I'm writing some code that needs to be able to get the **values** of the parameters from the method that called into the class. I know how to get all the way to the ParameterInfo[] array, but I don't know how to then get the values. Is this even possible?
If it is, I think it has something to do wit... | [
0.3911694586277008,
0.17594824731349945,
0.09922686964273453,
0.3685312867164612,
-0.02708112634718418,
0.01603732816874981,
0.16994191706180573,
-0.07572245597839355,
-0.04852538928389549,
-0.5380470752716064,
0.3450164198875427,
0.49531057476997375,
-0.13895867764949799,
0.22331605851650... | |
called into this one
public class SomeClass
{
public static void FindMethod()
{
for (int i = 1; i < frameCount; i++)
{
var frame = new StackFrame(i);
var methodInfo = frame.GetMethod();
if (methodInfo.DeclaringType != this.GetType())
{ | [
0.32284170389175415,
-0.3139175772666931,
0.44334661960601807,
-0.20633414387702942,
0.19050252437591553,
0.02028263919055462,
0.2328670769929886,
-0.675183892250061,
-0.12729084491729736,
-0.6125641465187073,
-0.0022439288441091776,
0.3213821351528168,
-0.5607860088348389,
0.2062598019838... | |
string methodName = frame.GetMethod().Name;
var paramInfos = methodInfo.GetParameters();
// Now what?? How do I get the values from the paramInfos
break;
} | [
0.017989173531532288,
-0.15576805174350739,
0.4151635468006134,
0.07889629900455475,
0.18160100281238556,
0.24593526124954224,
0.6132646799087524,
-0.6813295483589172,
-0.3340880870819092,
-0.10199493169784546,
0.12456119060516357,
0.4107702374458313,
-0.38039541244506836,
0.38919094204902... | |
else if (i == frameCount - 1)
{
throw new TransportException("Couldn't find method name");
}
}
}
}
```
You cannot do it without introspecting the stack yourself (and this is fragile since many optimizations may mean the stack frame is not what you expect, or even tha... | [
0.18428625166416168,
-0.15715965628623962,
0.1764708012342453,
-0.10401575267314911,
0.1317501664161682,
-0.4434896409511566,
0.46811527013778687,
-0.3609887957572937,
-0.29000794887542725,
-0.6054772138595581,
0.0019926924724131823,
0.5581191778182983,
-0.4104880094528198,
0.1008893623948... | |
in fact what the method signature would suggest (it is perfectly possible for an optimizing JIT compiler to spot that you are only using a sub field of an object/struct and pass that instead).
The ParameterInfo simply tells you the *signature* of the method as compiled, not the values that were passed.
The only reali... | [
0.3950876295566559,
-0.09982649236917496,
-0.00783267617225647,
0.26808086037635803,
-0.19785121083259583,
-0.2319873869419098,
0.24819688498973846,
-0.08265647292137146,
-0.10390634089708328,
-0.4188101291656494,
0.040375836193561554,
0.5051982998847961,
-0.2393798828125,
-0.0769341662526... | |
to log something be explicit about what you are logging.
To be clear simple reflective techniques **cannot** achieve what you desire with full generality | [
0.7322639226913452,
0.14280007779598236,
-0.01981150172650814,
0.3907807171344757,
-0.11659325659275055,
-0.5033886432647705,
0.4137929081916809,
0.2290840446949005,
-0.303276926279068,
-0.5269491076469421,
-0.05116509646177292,
0.739224910736084,
0.09332863241434097,
-0.2726190686225891,
... | |
I am making an attempt to evaluate EMF for use within a project. One of the things i am looking at is some kind of versioning support at the metamodel (M2 or the .ecore model) level.
In terms of metamodel evolution, i have read [certain discussions](http://www.eclipse.org/newsportal/article.php?id=32702&group=eclipse... | [
0.31850099563598633,
0.11647890508174896,
0.23436662554740906,
-0.17568936944007874,
-0.16504864394664764,
0.013118080794811249,
0.021391117945313454,
0.021576082333922386,
-0.5576814413070679,
-0.5217466950416565,
0.06859384477138519,
0.3332115411758423,
-0.12879499793052673,
-0.011786930... | |
versioning itself will be provided by the source control system that one would use to store these meta-models, however semantic versioning capabilities (such as the ones i have mentioned above) should be provided by EMF itself, right?
I am aware of certain initiatives such as [EMF Compare](http://www.eclipse.org/model... | [
0.41276106238365173,
-0.05696994438767433,
0.3723422884941101,
0.04876801371574402,
-0.20905564725399017,
0.0146605484187603,
-0.10191003233194351,
0.1796151101589203,
-0.4562569260597229,
-0.5804475545883179,
0.1267288327217102,
0.3077472746372223,
-0.0906231701374054,
-0.1160839498043060... | |
can access a number of publications about COPE as well as download the tool itself. In addition, I am currently proposing a [project](http://www.eclipse.org/proposals/edapt/) to contribute COPE to EMF. | [
0.8407871127128601,
0.010557061992585659,
-0.16328942775726318,
-0.03727469965815544,
-0.26238277554512024,
-0.23655636608600616,
0.035593487322330475,
0.023153135553002357,
-0.056733548641204834,
-0.7547293305397034,
0.004322475288063288,
0.5160014033317566,
0.040830451995134354,
-0.29380... | |
I have a SQL query, that returns a set of rows:
```
SELECT id, name FROM users where group = 2
```
I need to also include a column that has an incrementing integer value, so the first row needs to have a 1 in the counter column, the second a 2, the third a 3 etc
The query shown here is just a simplified example, in... | [
0.0019184676930308342,
0.3945126235485077,
0.3644566237926483,
-0.07816320657730103,
-0.08879270404577255,
0.03654692694544792,
0.013041808269917965,
-0.3777730166912079,
-0.034073952585458755,
-0.4785301387310028,
0.05276890844106674,
0.34632378816604614,
-0.4643551707267761,
0.3041987419... | |
?
For starters, something along the lines of:
```
SELECT my_first_column, my_second_column,
ROW_NUMBER() OVER (ORDER BY my_order_column) AS Row_Counter
FROM my_table
```
However, it's important to note that the `ROW_NUMBER() OVER (ORDER BY ...)` construct only determines the values of `Row_Counter`, it doesn't g... | [
0.1215403601527214,
0.1564137190580368,
0.38060319423675537,
-0.13025596737861633,
-0.021328600123524666,
0.022441260516643524,
0.1106795221567154,
-0.40095779299736023,
-0.46138766407966614,
-0.34786105155944824,
-0.2152336686849594,
0.5963178873062134,
-0.20303130149841309,
0.24019883573... | |
to both the `SELECT` and the `ROW_NUMBER()`:
```
SELECT my_first_column, my_second_column,
ROW_NUMBER() OVER (ORDER BY my_order_column) AS Row_Counter
FROM my_table
ORDER BY my_order_column -- exact copy of the ordering used for Row_Counter
```
The above pattern will always return results in the correct order a... | [
-0.13822625577449799,
0.2594068646430969,
0.4293874204158783,
-0.1044088751077652,
-0.21640045940876007,
0.3626177906990051,
0.22041749954223633,
-0.5747412443161011,
-0.1814459264278412,
-0.4945047199726105,
-0.27695244550704956,
0.6616939306259155,
-0.3781753480434418,
0.0272623524069786... | |
FROM my_table
) AS t
ORDER BY t.Row_Counter
```
Using a nested query means that there's no need to duplicate the complicated `ORDER BY` clause, which means less clutter and easier maintenance. The outer `ORDER BY t.Row_Counter` also makes the intent of the query much clearer to your fellow developers. | [
0.16992342472076416,
0.36880403757095337,
0.3951243758201599,
-0.17867900431156158,
-0.008691782131791115,
-0.12233714014291763,
0.1802290976047516,
-0.051935262978076935,
-0.29117080569267273,
-0.6530511379241943,
-0.5248698592185974,
0.41105780005455017,
-0.4698779284954071,
0.0213049575... | |
How can I capture (or access if there is a log file somewhere) when a user changes their password or another user's password?
[PAM](http://www.kernel.org/pub/linux/libs/pam/) logs it to syslog by default for me. | [
0.32002905011177063,
0.0016180656384676695,
0.2804395854473114,
-0.01092913094907999,
0.03786967694759369,
-0.28670793771743774,
0.15858328342437744,
-0.18120689690113068,
-0.3340314030647278,
-0.7126412391662598,
-0.15781496465206146,
0.4156588315963745,
-0.08313708752393723,
0.2362618595... | |
I have been building IMO a really cool RIA. But its now close to completion and I need to test it to see if there are any bugs or counter-intuitive parts or anything like that. But how? Anytime I ask someone to try to break it, they look at it for like 3 minutes and say "it's solid". How do you guys test things? I have... | [
0.8253082633018494,
0.15371966361999512,
0.0226534865796566,
0.19071060419082642,
-0.2654199004173279,
-0.22449786961078644,
0.42311641573905945,
-0.019501348957419395,
-0.08756579458713531,
-0.4863235354423523,
0.49381789565086365,
0.13146455585956573,
0.2785770893096924,
0.32100015878677... | |
application to run every function? That would take forever, plus some functions may only produce errors in certain situations, so I do not understand unit tests.
The question is pretty open-ended so this post won't answer all your question. If you can refine what you are looking for, that would help.
There are two maj... | [
0.5803481936454773,
-0.19897454977035522,
-0.28781288862228394,
0.3746567964553833,
-0.1068093404173851,
0.06404563784599304,
0.33161741495132446,
-0.2447459101676941,
0.01314814854413271,
-0.47744473814964294,
0.07086041569709778,
0.5289595723152161,
-0.271192342042923,
-0.215503722429275... | |
a framework to hold your tests. Take a method and look at what the different inputs it might expect and what its outcome is. Then write a test case for each of these input/output pairs. This will tell you that most of the parts work as intended.
Acceptance testing (or end-to-end testing as it is sometimes called) is r... | [
0.49978873133659363,
0.04542858526110649,
-0.38842055201530457,
0.39269348978996277,
0.10086189210414886,
0.1774369776248932,
0.3878782093524933,
-0.43679946660995483,
0.12054359167814255,
-0.45551788806915283,
0.08533221483230591,
0.4944463074207306,
-0.16013750433921814,
-0.1186671108007... | |
to at least a limited audience.
Also, check out [How to Break Software](https://rads.stackoverflow.com/amzn/click/com/0201796198) by James Whittaker. It's one of the better testing books and is a short read. | [
0.2945877015590668,
0.20685628056526184,
-0.15088355541229248,
0.2344457358121872,
0.2863745093345642,
-0.21896590292453766,
0.6442186236381531,
-0.3598261773586273,
0.08817256987094879,
-0.1343391239643097,
-0.12395556271076202,
0.31330978870391846,
-0.1371249258518219,
-0.111176006495952... | |
I'm creating an ASP.NET web application to schedule tasks on our server from a remote location using a .NET Wrapper for Scheduled Tasks. However, I'm stuck.
The user needs to be able to browse the file system on the server to retrieve a "file to run" for the new task that the user's creating in this application. I nee... | [
0.5850822329521179,
-0.06685633212327957,
0.14241357147693634,
0.17300944030284882,
-0.10653175413608551,
-0.23628617823123932,
0.2921081781387329,
0.24815957248210907,
-0.42846399545669556,
-0.8574575185775757,
0.06629838049411774,
0.2919690012931824,
-0.193033367395401,
0.123726114630699... | |
dropdown box that would be available to users since they don't really need total access to the file system, just for security's sake.
HTMLInputFile is used to browse the client's file system and upload a file to the server. It isn't used to browse the server's file system.
You will need something quite different. You ... | [
0.3264046013355255,
-0.49227502942085266,
0.46121281385421753,
0.09716255962848663,
-0.22487279772758484,
-0.4955607056617737,
0.27428126335144043,
0.22037065029144287,
-0.3722241222858429,
-0.7007412314414978,
-0.13532193005084991,
0.25425469875335693,
-0.26561957597732544,
0.036662850528... | |
absolute path. So for example "C:\Inetpub\wwwroot\uploads" won't work, but "uploads" will work.
I hope it goes without saying that there are serious security issues to think about when implementing something like this. | [
0.07181426137685776,
-0.3690102994441986,
0.5945587158203125,
0.2330901175737381,
0.20801419019699097,
-0.49728336930274963,
0.5686984062194824,
0.05580078065395355,
0.11458911001682281,
-0.8654389381408691,
-0.07149007171392441,
0.9336782693862915,
-0.33955761790275574,
-0.230819091200828... | |
I am wondering what type the 'value' keyword in a property takes.
so:
```
public class Test
{
string _numberAsString;
int _number = -1;
public Test() {}
public string NumberAsString
{
get { return _numberAsString; }
set { _numberAsString= value; }
}
public int Number
... | [
0.24820832908153534,
0.13667866587638855,
0.06568468362092972,
0.03321219980716705,
0.15908363461494446,
-0.052574824541807175,
0.26414740085601807,
-0.3421902358531952,
0.1818641573190689,
-0.4483594000339508,
-0.28448548913002014,
0.4161970019340515,
-0.04945405200123787,
0.2623192667961... | |
{ _number = value; }
}
}
//elsewhere
Test t = new Test();
t.Number = 5;
```
Now, this doesn't compile, as I'd expect. The type of 'value' is determined by the return type of the property, is that correct? I couldn't find anything to that effect, perhaps it's too obvious (I haven't read the language specs, presum... | [
0.38214918971061707,
0.16945481300354004,
0.06091233342885971,
-0.027936547994613647,
0.2248707413673401,
-0.10871068388223648,
0.31950992345809937,
-0.15147538483142853,
-0.07129861414432526,
-0.4022677540779114,
0.05179494991898537,
0.589819610118866,
-0.20956526696681976,
0.235651239752... | |
methods.
Yes, the type of 'value' is determined by the return type of the property. What exactly are you trying to accomplish? Do you want to be able to set either Number or NumberAsString to a valid value and get a result back out from either property?
If that's the case you need to do something like this:
```
publi... | [
0.2503920793533325,
-0.1932070255279541,
0.016721539199352264,
0.39690059423446655,
0.03918720409274101,
-0.03618422523140907,
0.18574808537960052,
-0.5249007940292358,
-0.08773477375507355,
-0.47757071256637573,
0.18839812278747559,
0.515389084815979,
-0.3189990222454071,
0.05771824344992... | |
_numberAsString= value; }
}
public int Number
{
get { return int.Parse(_numberAsString); }
set { _numberAsString = value.ToString(); }
}
}
```
This would allow you to do this:
```
Test t = new Test();
t.Number = 5;
Console.WriteLine(t.NumberAsString); // should print out "5"
t.NumberAsStrin... | [
0.1953904926776886,
-0.1766587197780609,
0.2950891852378845,
-0.01816980540752411,
0.30793309211730957,
0.06417404115200043,
0.26097142696380615,
-0.5644792914390564,
-0.0893520712852478,
-0.6711172461509705,
-0.16574348509311676,
0.5537789463996887,
-0.14991332590579987,
0.325381904840469... | |
(or both) perform the conversion from one type to another. | [
0.3840063214302063,
0.16351284086704254,
-0.3005264401435852,
0.15753377974033356,
-0.014882872812449932,
0.13357199728488922,
-0.03417760878801346,
-0.2445119023323059,
0.17168229818344116,
-0.7331950664520264,
-0.25035497546195984,
0.6065585613250732,
-0.16137279570102692,
-0.06452767550... | |
I'm puzzled with this test script:
```
#!perl
use strict;
use warnings;
use encoding 'utf8';
use Test::More 'no_plan';
ok('áá' =~ m/á/, 'ok direct match');
my $re = qr{á};
ok('áá' =~ m/$re/, 'ok qr-based match');
like('áá', $re, 'like qr-based match');
```
The three tests fail, but I was expecting that the `use ... | [
-0.013917290605604649,
0.2711322605609894,
0.6097905039787292,
-0.320311039686203,
-0.08123895525932312,
-0.08373112976551056,
0.7303259968757629,
-0.23602604866027832,
-0.09509561210870743,
-0.393390953540802,
-0.30191144347190857,
0.8404382467269897,
-0.40734389424324036,
0.0323145687580... | |
Waalboer gave a great talk where he mentioned this at YAPC::EU 2k8.)
It does at least two things at once that do not belong together:
1. It specifies an encoding for your source file.
2. It specifies an encoding for your file input/output.
And to add injury to insult it also does #1 in a broken fashion: it reinterpr... | [
-0.008952104486525059,
0.21027086675167084,
0.059573061764240265,
-0.23893937468528748,
-0.05942703038454056,
-0.09070805460214615,
0.24176926910877228,
-0.1370849311351776,
0.08685694634914398,
-0.7358190417289734,
0.20938396453857422,
0.15825602412223816,
-0.1722557246685028,
-0.07913117... | |
your source code in ASCII or UTF-8 only. In the latter case, **the [`utf8` pragma](http://perldoc.perl.org/utf8.html)** is the correct thing to use. If you don’t want to use UTF-8, but you do want to include non-ASCII charcters, escape or decode them explicitly.
And use I/O layers explicitly or set them using **the [`... | [
0.36185383796691895,
0.16376222670078278,
0.1988961547613144,
0.1946982443332672,
0.280983567237854,
-0.16899177432060242,
0.1753118336200714,
0.010642871260643005,
-0.16065780818462372,
-0.9215599894523621,
-0.49124661087989807,
0.28423210978507996,
-0.3066987097263336,
-0.096217669546604... | |
When I am testing my DAL I need to create some database entities before others because of dependencies, is there a way via method attributes or something I can make NUnit execute my tests in the order I specify ?
Use [Setup and Teardown](http://www.nunit.org/index.php?p=setup&r=2.2.10) methods in your tests. Create all... | [
0.6128173470497131,
-0.22422979772090912,
0.16505415737628937,
0.20497599244117737,
-0.20024006068706512,
-0.03227989375591278,
0.20531049370765686,
-0.38330909609794617,
0.0649036094546318,
-0.3492601811885834,
0.19196175038814545,
0.17097581923007965,
-0.15905559062957764,
-0.02188179641... | |
I'm deploying a webpart on sharepoint and getting some errors. The webpart consumes data from a Web Service and displays a chart using Microsoft Chart (Framework 3.5). When I try to acces it, I get the folowing error:
> Could not load file or assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyTo... | [
0.12351494282484055,
-0.03636408969759941,
0.5182023048400879,
-0.16346809267997742,
-0.012549437582492828,
0.08881048113107681,
0.4589713513851166,
-0.4324391484260559,
-0.030406268313527107,
-0.8232368230819702,
0.06073164939880371,
0.49726834893226624,
-0.43771862983703613,
0.3373750150... | |
does not change.
Any idea?
Thanks
The problem was within the Web Service, not the webpart.
The machine where the web service was deployed has framework 2.0 installed.
The exception was catched on the webpart and reported back.
Thank you all for your comments. | [
0.3761676549911499,
0.17445001006126404,
0.26896342635154724,
0.15739108622074127,
-0.07930747419595718,
-0.09044536203145981,
0.6589882969856262,
0.13638250529766083,
-0.29104435443878174,
-0.543263852596283,
-0.008092761039733887,
0.25532907247543335,
-0.3089226484298706,
-0.032025098800... | |
OK, so I'm just starting to think how to implement a new graphical plugin for Paint.NET and I will need to know how to find the most common integer in a 2d array of integers. Is there a built-in to C# way to do this? Or, does anyone have a slick way to do it?
The array will look something like this:
```
300 300 300 3... | [
0.7978509664535522,
0.24271191656589508,
0.4674345552921295,
-0.09867489337921143,
-0.09483961760997772,
0.25056764483451843,
0.1503143161535263,
0.07769986987113953,
-0.2529178559780121,
-0.5624417066574097,
0.7434378862380981,
0.8941439390182495,
-0.22770489752292633,
-0.1130035892128944... | |
0 0 0 0 150 300 300
0 0 0 0 0 150 300
0 0 0 0 0 0 300
```
I would need to know that 300 is the most common number in the array. If there is no "most common" then just return the center number (the array dimintions will always be odd x odd) 0.
I'll be implementing this using a "brute force... | [
0.4177438020706177,
0.09816247969865799,
0.7062349915504456,
-0.211233988404274,
-0.3387792408466339,
-0.014259216375648975,
0.15425319969654083,
-0.21679644286632538,
-0.03678363189101219,
-0.44521987438201904,
0.1588221788406372,
0.5118222832679749,
-0.17932376265525818,
0.18454112112522... | |
help would be very much appreciated.
Thanks!
EDIT: More info...
The values will almost always be VERY diverse (more diverse than my example array). The values will be in the range of 0-360. The size of the array will be 5x5 to about 17x17 depending on speed of the algorithm. The result will be calculate once for eac... | [
0.14139005541801453,
-0.10356908291578293,
0.6494796276092529,
-0.020795512944459915,
-0.035664211958646774,
0.4270446300506592,
0.33628982305526733,
-0.4592271149158478,
-0.06214476004242897,
-0.9335812926292419,
0.3335612714290619,
0.7558462023735046,
-0.09895113110542297,
-0.21408696472... | |
traversed, it adds the leading edge to the histogram and subtracts the trailing edge. It handles all the edge cases well, and is quite fast. It's the basis for the Median, Unfocus, Outline, and Remove Noise effects.
Adapting this to support Hue instead of RGB intensity would be rather trivial.
The performance is quit... | [
-0.12529532611370087,
-0.2222638577222824,
0.6767244338989258,
-0.007100947201251984,
-0.18108241260051727,
0.20481553673744202,
-0.08884730190038681,
-0.5931934118270874,
-0.34935230016708374,
-0.651303768157959,
0.12996646761894226,
0.33759772777557373,
-0.08943050354719162,
0.0153828524... | |
I have a server set up with IIS, and my site has some pages which should allow anonymous access and some pages which should require the "Integrated Windows authentication". On the Authentication Method screen in IIS it looks like you can enable both "Integrated Windows Authentication" and anonymous access, but the docu... | [
0.2754691243171692,
0.16482999920845032,
0.23666676878929138,
0.07860994338989258,
-0.03634146973490715,
-0.4272015392780304,
0.29242146015167236,
-0.09123876690864563,
-0.3489927649497986,
-0.7251904010772705,
-0.015379853546619415,
0.3640596866607666,
-0.1068144366145134,
0.1933302283287... | |
with only the authorization element in subfolders like so:
```
<configuration>
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
``` | [
0.21913297474384308,
0.17201820015907288,
-0.03757297620177269,
0.1446060836315155,
0.029284784570336342,
-0.35463976860046387,
0.04689663276076317,
-0.37750548124313354,
-0.1289001852273941,
-0.30343395471572876,
-0.22595132887363434,
0.2895343005657196,
-0.18192841112613678,
0.1353143155... | |
i'd like to read binary data from a blob, using the Stream interface around it.
But i don't want the blob to have to be loaded entirely client side and stored in memory, or in a file.
i want the code that uses the blob to be able to seek and read, and only as much data that is needed to support seek/read is brought ... | [
0.707176923751831,
0.032306697219610214,
0.5985081791877747,
0.1983487904071808,
0.2751019597053528,
0.039433788508176804,
-0.28174889087677,
0.053884267807006836,
-0.22190630435943604,
-0.5386643409729004,
0.11671528220176697,
0.7037176489830017,
-0.2679108679294586,
0.04402465373277664,
... | |
contain the 3k thumbnail, and read that.
So rather than trying to allocate 250MB of memory, or having to create a temporary file, and having to wait for 250MB to be brought over the wire: the hypothetical SQLServerBlobStreamServerCursor class knows how to data traffic to what which is actually asked for.
---
Researc... | [
0.1905371993780136,
0.12057694792747498,
0.3764325678348541,
0.08916790783405304,
0.002193782012909651,
-0.07845911383628845,
0.09643974155187607,
-0.22151587903499603,
-0.048642221838235855,
-0.4176715612411499,
0.13043269515037537,
0.3238294720649719,
-0.2958463430404663,
-0.115874834358... | |
[this guy](https://stackoverflow.com/questions/252517/streaming-directly-to-a-database/252526#252526) mentioned a new SQL Server 2005 [*column*.Write()]3 T-SQL syntax to write data - [could be used to write data in small chunks](http://weblogs.asp.net/alessandro/archive/2008/09/22/conserving-resources-when-writing-blob... | [
-0.11912736296653748,
0.13029369711875916,
0.6062031388282776,
0.16857479512691498,
-0.17688056826591492,
0.09873437881469727,
0.025938138365745544,
0.15176796913146973,
-0.6821228265762329,
-0.4797229468822479,
-0.08352931588888168,
0.43365439772605896,
-0.40738970041275024,
0.07717676460... | |
877 bytes, offset 115000 through 115876:
```
select substring(blobcolumn, 115001, 877) from myimages where imgid = 12345;
```
Remember that the substring function is based on a 1-offset, not 0.
If you care about the column potentially changing between reading parts of it, you can put all the different selects withi... | [
-0.17778587341308594,
0.12550415098667145,
0.6941919922828674,
-0.1795692890882492,
0.07031772285699844,
0.46339815855026245,
0.012333258055150509,
-0.13350875675678253,
-0.2529739439487457,
-0.22398310899734497,
-0.13226227462291718,
0.401384562253952,
-0.2874431610107422,
-0.123166821897... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.