text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
generic/dynamic game logic. It's a trade off between maintainable/configurable code and outright speed.
Written well, I'd favour events/delegates until I could prove it is an issue.
The only way you'll truly know if it is an issue for you is by profiling your code -- which you should do anyway for any game developmen... | [
0.2950126528739929,
0.09411784261465073,
0.06711166352033615,
0.19129997491836548,
-0.23340238630771637,
-0.3163914084434509,
0.4825179874897003,
0.2657953202724457,
-0.21435996890068054,
-0.0001962685928447172,
0.04534708708524704,
0.7955001592636108,
-0.24395930767059326,
0.1955427825450... | |
I would like to give a class a unique ID every time a new one is instantiated. For example with a class named Foo i would like to be able to do the following
```
dim a as New Foo()
dim b as New Foo()
```
and a would get a unique id and b would get a unique ID. The ids only have to be unique over run time so i would ... | [
0.48940277099609375,
0.027560824528336525,
0.04553242027759552,
-0.08094746619462967,
-0.30839160084724426,
-0.0788431316614151,
-0.022412264719605446,
-0.09008711576461792,
-0.23228326439857483,
-0.5390158295631409,
0.17960473895072937,
0.5098060965538025,
-0.3552739918231964,
0.352003574... | |
My current idea for a way to implement this is the following:
```
Public Class test
Private Shared ReadOnly _nextId As Integer
Private ReadOnly _id As Integer
Public Sub New()
_nextId = _nextId + 1
_id = _nextId
End Sub
End Class
```
However this will not compile because it throws an ... | [
0.018799472600221634,
0.11061148345470428,
-0.017225481569767,
-0.05331478267908096,
0.04762761667370796,
-0.23755696415901184,
0.30264565348625183,
-0.13833272457122803,
-0.0019509629346430302,
-0.7408105134963989,
0.10944569110870361,
0.37522655725479126,
-0.1624225676059723,
0.412387758... | |
read only variable in the constructor.) I think this has something to do with it being shared also. Any solution (hopefully not kludgy hehe) or an explanation of why this won't work will be accepted. The important part is i want both of the variables (or if there is a way to only have one that would even be better but ... | [
0.22981947660446167,
0.12738315761089325,
0.1352977156639099,
-0.01851085014641285,
0.0023981339763849974,
-0.3377932012081146,
0.45229774713516235,
-0.03954664617776871,
-0.10782178491353989,
-0.45849984884262085,
-0.07684978097677231,
0.6973710656166077,
-0.36387625336647034,
0.324808686... | |
_fooId = New FooId()
End Sub
Public ReadOnly Property Id() As Integer
Get
Return _fooId.Id
End Get
End Property
End Class
Public NotInheritable Class FooId
Private Shared _nextId As Integer
Private ReadOnly _id As Integer
Shared Sub New() | [
-0.18234673142433167,
-0.10477252304553986,
0.19874270260334015,
-0.1387721598148346,
0.0710245817899704,
-0.18868069350719452,
0.17405268549919128,
-0.2891204059123993,
0.031113510951399803,
-0.3045467436313629,
-0.15034061670303345,
0.4889847934246063,
-0.259555846452713,
0.3564912378787... | |
_nextId = 0
End Sub
Public Sub New()
SyncLock GetType(FooId)
_id = System.Math.Max(System.Threading.Interlocked.Increment(_nextId),_nextId - 1)
End SyncLock
End Sub
Public ReadOnly Property Id() As Integer
Get
Return _id | [
-0.20959411561489105,
-0.1500866711139679,
0.6714336276054382,
0.02734934538602829,
0.2227240949869156,
-0.012828873470425606,
0.33669811487197876,
-0.5102322697639465,
0.07590289413928986,
-0.3869962692260742,
-0.22411561012268066,
0.42415913939476013,
-0.2468537539243698,
0.2698047757148... | |
End Get
End Property
End Class
```
Instead of storing an int inside Foo, you store an object of type FooId. This way you have full control over what can and cannot be done to the id.
To protect our FooId against manipulation, it cannot be inherited, and has no methods except the constructor and a getter for t... | [
-0.09703896939754486,
-0.18513476848602295,
0.4452843964099884,
-0.03112098015844822,
0.18757681548595428,
-0.43883001804351807,
0.23586323857307434,
-0.13811838626861572,
0.29359596967697144,
-0.37595438957214355,
-0.04329276457428932,
0.4814099073410034,
-0.37351393699645996,
0.416061162... | |
IDs inside a process are unique (until you hit MaxInt :)). | [
0.47479498386383057,
-0.11136743426322937,
0.3761693239212036,
0.2052282840013504,
0.20428304374217987,
-0.05495593324303627,
-0.01635652408003807,
-0.08993654698133469,
0.010397793725132942,
-0.5300323367118835,
-0.060118429362773895,
0.34107324481010437,
0.3277524709701538,
-0.0442809201... | |
Is there a way to auto discover a specific WCF service in the network? I don't want to config my client with the address if this is possible.
What you want to look at is the WS-Discovery protocol. I found a sample on [netfx3's](http://wcf.netfx3.com/files/folders/protocol_channels/entry7909.aspx) website of using the [... | [
0.5236570239067078,
-0.039403606206178665,
0.21049419045448303,
-0.06361105293035507,
-0.02600882016122341,
-0.34084179997444153,
0.10689306259155273,
-0.23078571259975433,
-0.22193577885627747,
-0.7522444128990173,
0.053021784871816635,
0.4840523302555084,
-0.12953734397888184,
0.15960006... | |
It's a bit difficult to implement a deep object copy function. What steps you take to ensure the original object and the cloned one share no reference?
A safe way is to serialize the object, then deserialize. This ensures everything is a brand new reference.
[Here's an article](http://javatechniques.com/blog/low-memor... | [
0.294724702835083,
-0.0570250041782856,
-0.27879098057746887,
0.3056172728538513,
-0.02545902132987976,
-0.3908703625202179,
0.28708162903785706,
0.08953976631164551,
-0.21551838517189026,
-0.710556149482727,
0.013258960098028183,
0.6103649735450745,
-0.3288404643535614,
0.5266221761703491... | |
When I use the default java locale on my linux machine it comes out with the US locale settings, where do I change this so that it comes out with the correct locale?
I believe java gleans this from the environment variables in which it was launched, so you'll need to make sure your LANG and LC\_\* environment variables... | [
0.2580646574497223,
0.02277679182589054,
-0.05716912820935249,
-0.33745622634887695,
0.0741611048579216,
-0.12768620252609253,
0.27481451630592346,
0.189260333776474,
-0.3259272277355194,
-0.7913424968719482,
-0.45213910937309265,
0.399577796459198,
-0.20820097625255585,
-0.042199961841106... | |
I have a small diagnostic VB.Net application ( 2 forms, 20 subs & functions) written using VB.Net 2008 that targets Framework 2.0 and higher, but now I realize I need to support Framework 1.1. I'm looking for the most efficient way to accomplish this given these constraints:
* I don't know which parts of the applicati... | [
0.1679670363664627,
0.15545035898685455,
0.34798741340637207,
-0.08609655499458313,
-0.3291604220867157,
0.08152032643556595,
0.5141901969909668,
-0.33397793769836426,
0.21451672911643982,
-0.7053502798080444,
0.208876833319664,
0.815731942653656,
-0.12698811292648315,
-0.07203541696071625... | |
create a fresh project/solution in a separate folder for the 1.1 framework, copy over the necessary files, use the "Add Existing Item" option, and then build. All the problems will bubble up to the surface that way.
A rather "ugly" approach, but it'll show you everything you need to fix up front. | [
0.34039512276649475,
-0.056458670645952225,
0.03997492790222168,
0.2565937638282776,
0.09065883606672287,
-0.11210059374570847,
0.23136277496814728,
-0.24446453154087067,
-0.19573500752449036,
-0.6113893389701843,
-0.23822635412216187,
0.43959563970565796,
-0.30712810158729553,
0.084597639... | |
What Java library would you say is the best for consuming and parsing feeds? Requirements:
* Embeddable
* Supports Atom & RSS
* Has caching architecture
* Should be able to deal with any feed format the same way
(Please: *one* suggestion per answer.)
Will [ROME](https://rome.dev.java.net/) do? | [
0.6520898938179016,
-0.166391059756279,
-0.11858121305704117,
0.04638209939002991,
-0.11557286977767944,
-0.26265913248062134,
-0.03443800285458565,
-0.27307015657424927,
0.13560180366039276,
-0.5742915868759155,
0.09788383543491364,
0.6061232089996338,
-0.7721314430236816,
-0.228420987725... | |
I had to delete all the rows from a log table that contained about 5 million rows. My initial try was to issue the following command in query analyzer:
delete from client\_log
which took a very long time.
Check out [truncate table](https://msdn.microsoft.com/en-us/library/ms177570.aspx) which is a lot faster. | [
-0.4292759597301483,
-0.07429378479719162,
0.2878173291683197,
-0.16349712014198303,
0.00580322602763772,
0.2559264898300171,
0.3566076159477234,
0.10669105499982834,
-0.45572882890701294,
-0.592343807220459,
-0.1063966378569603,
0.533577024936676,
-0.37625256180763245,
0.23057152330875397... | |
When a script is saved as a bundle, it can use the `localized string` command to find the appropriate string, e.g. in `Contents/Resources/English.lproj/Localizable.strings`. If this is a format string, what is the best way to fill in the placeholders? In other words, what is the AppleScript equivalent of `+[NSString st... | [
0.0361877977848053,
-0.10325988382101059,
-0.08750557154417038,
-0.1182987242937088,
-0.138532817363739,
-0.10994060337543488,
0.15733927488327026,
0.029627183452248573,
-0.07432815432548523,
-0.5839172005653381,
-0.2888088822364807,
0.5897760987281799,
-0.3153591454029083,
-0.273544073104... | |
like me would gravitate toward this syntax, which interpolates the method's parameters with their values:
```
use framework "Foundation"
tell the current application's NSWorkspace's sharedWorkspace to openFile:"/Users/me/Desktop/filter.png" withApplication:"Preview"
```
Result:
```
true
```
`+[NSString stringWit... | [
0.11337223649024963,
0.01542283408343792,
0.48878103494644165,
-0.08168019354343414,
-0.1662047803401947,
-0.039205022156238556,
0.44562026858329773,
-0.10936295241117477,
-0.005763221066445112,
-0.559107780456543,
-0.06968308985233307,
0.49140578508377075,
-0.5463858842849731,
0.468478560... | |
-10000
```
Instead, you have to use an alternative syntax that looks more like an AppleScript handler call than an Objective-C message. You also need to coerce the return value (an NSString object) into a `text`:
```
use framework "Foundation"
the current application's NSString's stringWithFormat_("%lu documents", ... | [
0.039467792958021164,
0.00577217061072588,
0.38045862317085266,
-0.12589772045612335,
-0.03894609212875366,
-0.19657468795776367,
0.2617175579071045,
-0.24350152909755707,
-0.22938203811645508,
-0.6455976366996765,
-0.3623075485229492,
0.5284591317176819,
-0.43883177638053894,
0.0028430398... | |
of using NSInvocation directly.) | [
0.12931694090366364,
0.23517504334449768,
-0.11555138975381851,
-0.1320549100637436,
-0.03327410668134689,
-0.2602737247943878,
0.3245513439178467,
-0.2505718171596527,
-0.18864192068576813,
-0.35060060024261475,
0.034571848809719086,
0.6174160242080688,
-0.4478166699409485,
-0.15881642699... | |
I am using SQL Server 2000 and I have two databases that both replicate (transactional push subscription) to a single database. I need to know which database the records came from.
So I want to add a fixed column specified in the publication to my table so I can tell which database the row originated from.
How do I g... | [
0.5960879921913147,
0.3751506805419922,
0.20751696825027466,
0.08733067661523819,
-0.0028636748902499676,
-0.09562232345342636,
-0.2753266394138336,
-0.09815950691699982,
-0.424983948469162,
-0.6061698794364929,
0.5333235263824463,
0.33496716618537903,
-0.20500312745571136,
0.6419033408164... | |
me some where. Other than that I would go with the view idea.
So the solution for me was to set up the replication publications to allow transformations and create a DTS package for each site that appends the siteid into the tables to keep the ids unique as I can't use guids. | [
0.5635113716125488,
-0.05383465439081192,
0.321717232465744,
-0.0801420658826828,
-0.2163010686635971,
0.03312138840556145,
0.025025539100170135,
0.07089810073375702,
-0.01260246243327856,
-0.5710458159446716,
0.1941913515329361,
0.43976524472236633,
0.06553895026445389,
0.1627719849348068... | |
Does anyone know of a way to force a nolock hint on all transactions issued by a certain user? I'd like to provide a login for a support team to query the production system, but I want to protect it by forcing a nolock on everything they do. I'm using SQL Server 2005.
This is a painful and hacky way to do it, but it's ... | [
0.2948996424674988,
0.22844462096691132,
0.1433953493833542,
0.07504147291183472,
0.23634810745716095,
-0.30661076307296753,
0.056613270193338394,
0.003779403865337372,
-0.21083711087703705,
-0.19410982728004456,
0.10561619699001312,
0.5329809188842773,
-0.12662701308727264,
-0.06320612132... | |
"SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED" to the beginning of the call.
I believe functionally this is the same as the no lock hint. Sorry I don't have a pure SQL answer, I'd be interested to hear if you find a good way to do this. | [
0.38910186290740967,
-0.03287595137953758,
0.2769216001033783,
0.013376038521528244,
0.033020325005054474,
-0.5191115736961365,
0.04828689247369766,
0.13070955872535706,
0.10034532099962234,
-0.32911059260368347,
0.04989118129014969,
0.3572574257850647,
-0.3638392388820648,
0.1623257249593... | |
While working between a Windows MySQL server and a Debian MySQL server, I noticed that warnings were fatal on Windows, but silently ignored on Debian. I'd like to make the warnings fatal on both servers while I'm doing development, but I wasn't able to find a setting that effected this behavior. Anyone have any ideas?
... | [
0.16100212931632996,
0.43492642045021057,
-0.28055545687675476,
-0.07568491995334625,
-0.0947953388094902,
-0.24396033585071564,
0.6247868537902832,
0.16522197425365448,
-0.35885515809059143,
-0.5408067107200623,
0.1738501340150833,
0.7019742727279663,
-0.374977171421051,
0.222115054726600... | |
Does emacs have something like vi's “set number”, so that each line starts with its line number?
Take a look at this article. It explains various ways to add line numbers to emacs:
<http://www.emacswiki.org/cgi-bin/wiki/LineNumbers> | [
0.5663719773292542,
-0.5012103915214539,
0.36104902625083923,
0.2919386625289917,
-0.17421098053455353,
0.32934996485710144,
0.22920116782188416,
0.043192170560359955,
-0.45826274156570435,
-0.39619138836860657,
0.10157657414674759,
0.03276260942220688,
-0.17736782133579254,
0.191994667053... | |
What is the best solution for converting WAV files to WMA (and vice versa) in C#? I have actually implemented this once already using the Windows Media Encoder SDK, but having to distribute Windows Media Encoder with my application is cumbersome to say the least. The Windows Media Format SDK has large sections of the A... | [
0.4366447925567627,
0.16041041910648346,
0.22749215364456177,
0.1113293394446373,
-0.05072023347020149,
-0.31304749846458435,
0.13471642136573792,
-0.258365660905838,
-0.11715039610862732,
-0.6487247347831726,
0.12321765720844269,
0.5322237610816956,
-0.33132991194725037,
0.349212944507598... | |
unmanaged library that can perform the conversions. It would need a license that allows it to be distributed as part of a closed source commercial application.
I haven't tried it personally (so not sure if it's the 'best' solution), but <http://www.codeproject.com/KB/audio-video/WmaCompressor.aspx> looks like it should... | [
0.5905725955963135,
-0.14517053961753845,
-0.007464173249900341,
0.1924065500497818,
0.21772310137748718,
-0.33381643891334534,
0.03958127275109291,
-0.15618380904197693,
-0.07758447527885437,
-0.21804745495319366,
-0.04663687199354172,
0.5046080946922302,
-0.13851699233055115,
0.356432080... | |
I'm trying to load a page that is basically an edit form inside a
dialog (ui.dialog). I can load this page fine from an external (I'm
using asp.net) page.
The problem is that inside of my "popup" form, I need to `$(function()
{my function here});` syntax to do some stuff when the page loads,
along with registering som... | [
0.3529604971408844,
0.11375413835048676,
0.36005035042762756,
-0.16947253048419952,
-0.10754034668207169,
-0.25535640120506287,
0.2783653140068054,
-0.10368877649307251,
-0.23388172686100006,
-0.7868635654449463,
-0.014510905370116234,
0.6636378765106201,
-0.3294214904308319,
-0.0057231253... | |
really need to load that form via AJAX you could to do all the Javascript stuff in $.ajax callback itself.
So, you load the popup form like this:
```
$.ajax({
//...
success: function(text) {
// insert text into container
// the code from $(function() {});
}
});
``` | [
-0.034004632383584976,
-0.008706854656338692,
0.3520928919315338,
0.08561792224645615,
-0.32632291316986084,
-0.47613000869750977,
0.009837795980274677,
-0.02509569562971592,
-0.08327826857566833,
-0.7482852339744568,
-0.17850470542907715,
0.7864840626716614,
-0.2822803854942322,
-0.270133... | |
When I cut (kill) text in Emacs 22.1.1 (in its own window on X, in KDE, on Kubuntu), I can't paste (yank) it in any other application.
Insert the following into your `.emacs` file:
```
(setq x-select-enable-clipboard t)
``` | [
0.6815569996833801,
-0.05631096661090851,
0.09643908590078354,
-0.013687617145478725,
-0.13893795013427734,
0.39805060625076294,
0.344432532787323,
0.10653083771467209,
-0.08259164541959763,
-0.6142716407775879,
-0.05766613036394119,
0.7021569013595581,
-0.6607380509376526,
0.0452356152236... | |
I'm using Excel VBA to a write a UDF. I would like to overload my own UDF with a couple of different versions so that different arguments will call different functions.
As VBA doesn't seem to support this, could anyone suggest a good, non-messy way of achieving the same goal? Should I be using Optional arguments or i... | [
0.1776694357395172,
0.033060017973184586,
0.2666507363319397,
-0.3187195062637329,
-0.2890799045562744,
0.022350668907165527,
-0.03020511008799076,
-0.15955767035484314,
-0.3175615072250366,
-0.4877198040485382,
-0.026699265465140343,
0.46001216769218445,
-0.5970550775527954,
0.02716601081... | |
If IsMissing(v) Then
Foo = "Missing argument"
ElseIf TypeName(v) = "String" Then
Foo = v & " plus one"
Else
Foo = v + 1
End If
End Function
```
This can be called from a worksheet as **=FOO()**, **=FOO(*number*)**, or **=FOO("*string*")**. | [
-0.016127945855259895,
-0.08498513698577881,
0.6881366968154907,
-0.5368386507034302,
0.09585028886795044,
-0.23405180871486664,
0.13358476758003235,
-0.34612083435058594,
-0.030074860900640488,
-0.3254142105579376,
-0.3517594635486603,
0.6599507331848145,
-0.42501235008239746,
0.284496068... | |
I have a user interface in .net which needs to receive data from a server, on a request/reply/update model. The only constraint is to use Java only on the server box.
What is the best approach to achieve this ? Is it by creating a Webservice in Java and then accessing it in .net, or should I create Java proxies and co... | [
0.2729681134223938,
0.056532055139541626,
0.24831342697143555,
0.08386027067899704,
-0.2821129262447357,
-0.12224611639976501,
0.10882099717855453,
0.06640192121267319,
-0.016560669988393784,
-0.8802888989448547,
0.21055328845977783,
0.2375887930393219,
-0.2579950988292694,
0.1346766501665... | |
can be consumed by other client platforms in the future.
.NET clients interact with Java web services pretty well, though there are some gotchas. The best two technologies available for you for the .NET client are Microsoft Web Service Enhancements (WSE) and Windows Communication Foundation (WCF). WSE is an older tech... | [
0.6057935357093811,
-0.06660454720258713,
0.4335463345050812,
0.07021889835596085,
-0.2994566857814789,
-0.46835801005363464,
0.037726227194070816,
0.10340023785829544,
-0.34126797318458557,
-1.0736851692199707,
0.09614935517311096,
0.5019729733467102,
-0.09910453110933304,
-0.178039923310... | |
etc.). If your needs are basic and you're still using Visual Studio 2005 (.NET framework 2 or older), then go with WSE. If you like the cutting edge, or you anticipate more advanced security needs (doesn't sound like you will), then go with WCF. Please note that WSE will not work easily in Visual Studio 2008 and newer,... | [
0.2441590577363968,
-0.19567640125751495,
0.3897588551044464,
0.03152848035097122,
-0.34145674109458923,
-0.28687429428100586,
0.10713184624910355,
-0.3711845278739929,
-0.1107998713850975,
-0.7643668055534363,
-0.24281823635101318,
0.6929810643196106,
-0.37779906392097473,
-0.301486253738... | |
of the other routes. The downside is primarily performance: xml serialization will be slower than binary over the wire, and web services do not handle large amounts of data well. | [
-0.11544065922498703,
-0.17428362369537354,
0.3535774350166321,
0.47603338956832886,
0.0692504346370697,
-0.32496967911720276,
0.051393963396549225,
0.03339233249425888,
-0.21223655343055725,
-0.6210682988166809,
-0.39921340346336365,
0.4267284870147705,
-0.22329379618167877,
-0.0570424348... | |
Can you specialize a template method within a template class without specializing the class template parameter?
Please note that the specialization is on the *value* of the template parameter, not its type.
This seems to compile under Visual Studio 2008 SP1 complier, but not GCC 4.2.4.
```
#include <iostream>
using ... | [
0.3055412769317627,
-0.1128430888056755,
-0.18932576477527618,
-0.217561736702919,
0.08422741293907166,
-0.014413156546652317,
0.2616115212440491,
-0.5943630933761597,
0.04801346734166145,
-0.48065873980522156,
-0.10453672707080841,
0.5415972471237183,
-0.4812052845954895,
-0.2223960310220... | |
T> struct select {};
template<> struct select<int> { static const bool value = true; };
template<> struct select<double> { static const bool value = false; };
template <class T>
void A<T>::test() { testme<select<T>::value>(); }
int main(int argc, const char* argv[])
{
A<int> aInt;
A<double> aDouble;... | [
0.5509799122810364,
-0.23911656439304352,
0.026104310527443886,
-0.2745509743690491,
0.05760673061013222,
0.07840443402528763,
0.5892424583435059,
-0.4762668311595917,
0.08374754339456558,
-0.4733794927597046,
-0.17652545869350433,
0.6287623047828674,
-0.3704765737056732,
0.129512742161750... | |
a function (which is not allowed). Create a template functor class (ie. class whose sole purpose is to execute a single member function, usually named operator() ), specialize it and then call from within your template function.
I think I learned this trick from Herb Sutter, but do not remember which book (or article)... | [
0.43365123867988586,
-0.23536618053913116,
-0.2239820957183838,
-0.10098318755626678,
-0.0018343101255595684,
-0.03828493133187294,
0.3416394293308258,
-0.49959203600883484,
0.24373237788677216,
-0.5147384405136108,
-0.44375094771385193,
0.4019414782524109,
-0.8369843363761902,
-0.00434548... | |
}
};
template<> void testme_helper<true>::operator()()
{
std::cout << "true" << std::endl;
}
template<> void testme_helper<false>::operator()()
{
std::cout << "false" << std::endl;
}
``` | [
0.18962539732456207,
0.1277509480714798,
-0.043934814631938934,
-0.22430483996868134,
0.41498205065727234,
-0.036082372069358826,
0.28747326135635376,
-0.44185692071914673,
0.2572198510169983,
-0.4665931165218353,
-0.5270811319351196,
0.6147603988647461,
-0.4320066571235657,
-0.07515332102... | |
What does the following Guile scheme code do?
```
(eq? y '.)
(cons x '.)
```
The code is not valid in MzScheme, is there a portable equivalent across scheme implementations?
I am trying to port this code written by someone else. Guile seems to respond to '. with #{.}#, but I'm not sure what it means or how to do th... | [
0.10902467370033264,
-0.1096826046705246,
0.6383870840072632,
-0.08587883412837982,
-0.2709774971008301,
-0.20368622243404388,
0.33511826395988464,
-0.18159498274326324,
-0.22491154074668884,
-0.5031105279922485,
-0.24628932774066925,
0.49193713068962097,
-0.13519838452339172,
0.0693533197... | |
I am considering converting a project that I've inherited from .net 1.1 to .net 2.0. The main warning I'm concerned about is that it wants me to switch from `System.Web.Mail` to using `System.Net.Mail`.
I'm not ready to re-write all the components using the obsolete `System.Web.Mail`, so I'm curious to hear if any com... | [
0.3702779710292816,
-0.10770858824253082,
0.08944470435380936,
-0.3589511513710022,
-0.3265654742717743,
-0.17609558999538422,
0.33223000168800354,
0.2580950856208801,
-0.12125593423843384,
-0.9048011302947998,
-0.09530692547559738,
0.41059955954551697,
-0.5687775015830994,
0.4950537383556... | |
it avoids COM hell. | [
0.3901347517967224,
0.36152663826942444,
-0.07224512100219727,
0.1676700860261917,
0.053501859307289124,
-0.2361242026090622,
0.37288039922714233,
-0.07102260738611221,
0.10382410138845444,
-0.5424486994743347,
0.026939721778035164,
0.24341391026973724,
0.11746157705783844,
-0.046249028295... | |
I know next to nothing when it comes to the how and why of https connections. Obviously, when I'm transmitting secure data like passwords or especially credit card information, https is a critical tool. What do I need to know about it, though? What are the most common mistakes you see developers making when they implem... | [
0.8183593153953552,
0.3074776828289032,
0.09628564119338989,
0.13015525043010712,
0.06527426093816757,
-0.45314598083496094,
0.28153952956199646,
0.3314167559146881,
-0.10933927446603775,
-0.3335035741329193,
-0.35592296719551086,
0.12681712210178375,
0.0495782308280468,
0.028934296220541,... | |
verifies some basic details about your site, and certifies it for use in browsers. If your browser trusts the CA, then it trusts any certificates signed by that CA (this is known as the trust chain).
Each HTTP (or HTTPS) request consists of two parts: a request, and a response. When you request something through HTTP... | [
0.5984662175178528,
-0.05395929515361786,
0.7048143148422241,
0.1189776360988617,
-0.020220747217535973,
-0.3480038344860077,
0.300052672624588,
-0.2527356743812561,
0.024754730984568596,
-0.3882569968700409,
-0.2932085692882538,
0.10915951430797577,
0.2256181836128235,
0.05333537608385086... | |
is it signed by a CA it trusts?). It can even contact the CA and make sure the certificate is valid.
* The client creates a new pre-master secret, which is encrypted using the servers's public key (so only the server can decrypt it) and sent to the server
* The server and client both use this pre-master secret to gener... | [
0.3737580180168152,
0.1647017002105713,
0.6960806846618652,
-0.03299322351813316,
0.13572102785110474,
-0.3467976450920105,
0.17588621377944946,
-0.3245539665222168,
0.00604297174140811,
-0.07900375872850418,
-0.12202707678079605,
0.3088442087173462,
0.007738802582025528,
0.080881260335445... | |
the session key
If the connection is kept open, the same symmetric key will be used for each.
If a new connection is established, and both sides still have the master secret, new session keys can be generated in an 'abbreviated handshake'. Typically a browser will store a master secret until it's closed, while a serv... | [
0.16436485946178436,
0.14351968467235565,
0.6606748700141907,
0.21521219611167908,
0.15047992765903473,
-0.3835081458091736,
0.08650019019842148,
0.18504837155342102,
-0.5549688935279846,
-0.1625891923904419,
-0.34162139892578125,
0.11771706491708755,
0.04044906422495842,
0.621134579181671... | |
to match exactly, eg, a certificate with a CN of "example.com" will NOT match the domain "www.example.com", and users will get a warning in their browser.
Before [SNI](https://en.wikipedia.org/wiki/Server_Name_Indication), it was not possible to host multiple domain names on one IP. Because the certificate is fetched ... | [
0.3214167654514313,
0.0032495101913809776,
0.626392662525177,
0.051356617361307144,
-0.3169783353805542,
-0.20721065998077393,
-0.03424537181854248,
0.11515198647975922,
-0.3629128932952881,
-0.6550671458244324,
0.08297409117221832,
-0.10468368977308273,
-0.17023053765296936,
0.42152056097... | |
long as it's supported on both client and server (and in 2015, it is widely supported) then the server can choose the correct certificate.
Even without SNI, one way to serve multiple hostnames is with certificates that include Subject Alternative Names (SANs), which are essentially additional domains the certificate ... | [
0.3748677372932434,
0.032675061374902725,
0.5530228614807129,
-0.01351853646337986,
-0.17529085278511047,
-0.19673970341682434,
0.392977774143219,
0.026330161839723587,
-0.4540776014328003,
-0.5988743901252747,
-0.29764193296432495,
0.13790275156497955,
-0.2443065196275711,
0.2762331366539... | |
not match "*.example.com", and neither does "foo.bar.example.com". If you use "www.example.com" for your certificate, you should redirect anyone at "example.com" to the "www." site. If they request <https://example.com>, unless you host it on a separate IP and have two certificates, the will get a certificate error.
... | [
0.74979168176651,
0.3268561065196991,
0.21833477914333344,
0.008842549286782742,
-0.03142444044351578,
-0.13510273396968842,
0.2792876660823822,
-0.2928871214389801,
-0.44443371891975403,
-0.39320752024650574,
0.16747401654720306,
0.2880074679851532,
-0.46677714586257935,
-0.04672076553106... | |
as the submit URL goes to an https:// URL. In reality, users have been trained (at least in theory) not to submit pages unless they see the little "lock icon", so even the form itself should be served via HTTPS to get this.
**Traffic and Server Load**
HTTPS traffic is much bigger than its equivalent HTTP traffic (du... | [
0.33411604166030884,
0.1676059365272522,
0.4371309280395508,
0.21344690024852753,
-0.2648424804210663,
-0.34511396288871765,
0.4441981315612793,
-0.11838280409574509,
-0.45852130651474,
-0.6735353469848633,
-0.5092547535896301,
0.3609561026096344,
-0.04268714413046837,
0.11254890263080597,... | |
not just using HTTPS for the entire site, it should automatically redirect to HTTPS as required. Whenever a user is logged in, they should be using HTTPS, and if you're using session cookies, the cookie should have the [secure flag set](http://php.net/manual/en/function.session-set-cookie-params.php). This prevents int... | [
0.487827330827713,
-0.19734127819538116,
0.4141637682914734,
0.15887442231178284,
-0.033627066761255264,
-0.3291644752025604,
0.5995150208473206,
-0.12008160352706909,
-0.6724882125854492,
-0.6525253057479858,
-0.5242048501968384,
0.47254127264022827,
-0.2554171085357666,
0.001883513294160... | |
use fully-qualified URLs, or another easy way is to use absolute URLs that do not include the hostname (eg, src="/images/foo.png") because they work for both.
+ This includes external resources (eg, Google Analytics)
* Don't do POSTs (form submits) when changing from HTTPS to HTTP. Most browsers will flag this as a ... | [
0.5212823748588562,
-0.12758421897888184,
0.4634763300418854,
0.16491933166980743,
-0.22520042955875397,
-0.5920552015304565,
0.5624222159385681,
0.02691238932311535,
-0.06566101312637329,
-0.4757770895957947,
-0.6899080276489258,
0.42548054456710815,
-0.17507174611091614,
-0.2285537272691... | |
What's the proper way to convert from a scientific notation string such as "1.234567E-06" to a floating point variable using C#?
```
Double.Parse("1.234567E-06", System.Globalization.NumberStyles.Float);
``` | [
0.12484657764434814,
0.35479098558425903,
0.4207310676574707,
-0.014261171221733093,
0.16562733054161072,
-0.03023056499660015,
-0.2997221350669861,
-0.07658835500478745,
-0.1451157182455063,
-0.22518345713615417,
-0.006653252989053726,
0.3689546585083008,
-0.14266587793827057,
0.088665977... | |
I am trying to delete several rows from a MySQL 5.0.45 database:
```
delete from bundle_inclusions;
```
The client works for a while and then returns the error:
```
Lock wait timeout exceeded; try restarting transaction
```
It's possible there is some uncommitted transaction out there that has a lock on this tabl... | [
0.07679970562458038,
0.034941717982292175,
0.3618174195289612,
-0.02668588235974312,
-0.0731242373585701,
-0.013650783337652683,
0.35110658407211304,
-0.05189576745033264,
-0.39496496319770813,
-0.7125265598297119,
-0.05188633129000664,
0.5291554927825928,
-0.45163387060165405,
0.153512269... | |
following options:
* Delete the rows in smaller batches (e.g. DELETE FROM bundle\_inclusions WHERE id BETWEEN ? and ?)
* If it's a MyISAM table (actually, this may work with InnoDB too), try issuing a LOCK TABLE before the DELETE. This should guarantee that you have exclusive access.
* If it's an InnoDB table, then *a... | [
0.15955014526844025,
-0.4171244204044342,
0.5678771138191223,
0.22963571548461914,
0.11517669260501862,
-0.004678334109485149,
0.12298719584941864,
-0.2591284513473511,
-0.49772152304649353,
-0.7706375122070312,
-0.3596688508987427,
0.5461502075195312,
-0.22109945118427277,
0.1183753460645... | |
get rid of the one(s) you're competing with.
I'm sure there are many other possibilities; I hope one of these help. | [
0.15950223803520203,
-0.13031482696533203,
0.02544424682855606,
0.5396254062652588,
-0.06580041348934174,
0.16966474056243896,
0.0870380774140358,
0.22455452382564545,
-0.24956731498241425,
-0.48147618770599365,
0.1330024003982544,
0.34778353571891785,
-0.1132645234465599,
-0.0070065301842... | |
Is this function declaration in C#:
```
void foo(string mystring)
```
the same as this one in C:
```
void foo(char *)
```
i.e. In C#, does the called function receive a pointer behind the scenes?
In this specific instance, it is more like:
```
void foo(const char *);
```
.Net strings are immutable and passed b... | [
0.144001305103302,
-0.2430453896522522,
0.30531665682792664,
-0.1333281397819519,
-0.30215683579444885,
-0.4172333776950836,
0.012868848629295826,
0.019846579059958458,
-0.26425570249557495,
-0.15352562069892883,
-0.48217299580574036,
0.7262726426124573,
-0.5728492140769958,
0.035548225045... | |
I believe I need a DTD to define the schema and an XSLT if I want to display it in a browser and have it look "pretty". But I'm not sure what else I would need to have a well-defined XML document that can be queried using XQuery and displayed in a web browser.
For a XML document to be queryable using XQquery you do not... | [
0.5433975458145142,
0.11917968094348907,
0.32566967606544495,
0.13365094363689423,
-0.2675860822200775,
-0.24307633936405182,
-0.15184804797172546,
0.056512653827667236,
0.1378859430551529,
-0.7628921866416931,
-0.12576250731945038,
0.7468875050544739,
-0.0735832154750824,
0.01405020616948... | |
and show a DOM tree. If enhanced formatting of XML for browser display is necessary you have to create a XSLT transformation file and then add a directive to the original XML document pointing to the XSLT file. The browser picks that directive and uses the built-in XSLT processor to obtain the output that is then inter... | [
-0.07567542791366577,
-0.1309361308813095,
0.9515783786773682,
-0.19550703465938568,
-0.2487299144268036,
0.10168799012899399,
0.18867601454257965,
-0.6738404035568237,
-0.1458243578672409,
-0.7465699315071106,
-0.390367716550827,
0.737719714641571,
-0.30311647057533264,
-0.109267659485340... | |
<head>
<title>Application</title>
<style type="text/css">
body { font-family: Lucida Console; }
#outer { text-align: left; } | [
-0.2012023776769638,
0.026364736258983612,
0.6476346254348755,
0.0801406130194664,
0.044937100261449814,
0.1281803697347641,
-0.06494492292404175,
-0.23440858721733093,
0.12260113656520844,
-0.6639653444290161,
-0.5016888380050659,
0.37390291690826416,
-0.007763738743960857,
0.350899428129... | |
#name {
font-weight: bold;
font-size: 1.2em;
}
#logo | [
0.3646653890609741,
0.39828798174858093,
0.440631240606308,
-0.124060720205307,
0.20522792637348175,
0.14531074464321136,
-0.07905574887990952,
0.15869027376174927,
-0.09253330528736115,
-0.48330065608024597,
-0.28914403915405273,
0.3936936855316162,
-0.06191922724246979,
0.279807090759277... | |
{
float: left;
padding-right: 20px;
padding-bottom: 200px;
} | [
-0.24058635532855988,
0.07513070106506348,
0.2768455743789673,
0.003640043316408992,
0.3291957974433899,
0.1946147233247757,
0.09939511865377426,
-0.261073499917984,
0.03798989951610565,
-0.10827995836734772,
-0.3827453851699829,
0.276516854763031,
-0.09640864282846451,
-0.2611945569515228... | |
</style>
</head>
<body>
<xsl:apply-templates select="info" />
</body>
</html>
</xsl:template>
<xsl:template match="info">
<img id="logo" src="image.png" /> | [
0.4581141471862793,
-0.01563018187880516,
0.6151466369628906,
-0.004110161680728197,
-0.15969982743263245,
-0.13623107969760895,
-0.16195212304592133,
-0.5705834031105042,
-0.2480723112821579,
-0.705857515335083,
-0.15524616837501526,
0.4540223777294159,
-0.37313228845596313,
-0.2031068056... | |
<div id="outer">
<div id="name">
<xsl:value-of select="appName"/>
</div>
<div id="version">
<xsl:value-of select="version"/>
</div>
<div id="date"> | [
-0.05438915267586708,
-0.332645058631897,
0.4605468511581421,
-0.4340294301509857,
0.08217853307723999,
0.16903796792030334,
-0.060956086963415146,
0.01825474575161934,
-0.24324925243854523,
-0.32614994049072266,
-0.2914539873600006,
0.23477274179458618,
-0.2770029902458191,
0.318270713090... | |
<xsl:value-of select="buildTime"/>
</div>
</div>
</xsl:template>
</xsl:stylesheet>
``` | [
0.16858415305614471,
0.01151580736041069,
0.3029855191707611,
-0.11179981380701065,
-0.04568891599774361,
-0.09946651011705399,
0.12447820603847504,
-0.43852049112319946,
0.17004261910915375,
-0.7619640231132507,
-0.3486783802509308,
0.4935286045074463,
-0.18642136454582214,
-0.08865137398... | |
I want to create templates for base new reports on to have common designs. How do you do it?
The need to produce reports with a common starting design and format is key to any project involving clients and their reports. I have been working on reports for over 10 years now. This has not been the largest portion of my j... | [
1.0524213314056396,
0.48800748586654663,
-0.016216624528169632,
0.005464756861329079,
-0.16040979325771332,
-0.21038752794265747,
0.021405406296253204,
0.09304540604352951,
-0.37068504095077515,
-0.555550754070282,
0.38545989990234375,
0.4986017942428589,
0.09079742431640625,
0.18203593790... | |
a common task or knowledge for Microsoft's SQL Server Reporting Services. Knowing how to save reports templates so that you and your team can create these shortcuts at the creation of a new report in Visual Studio 2005 will help save time and have all reports use the same layout and design.
Create of a set of reports ... | [
0.3402930200099945,
0.21300742030143738,
0.3562878370285034,
0.27509820461273193,
-0.22175593674182892,
-0.05957542732357979,
-0.12606944143772125,
-0.2883923351764679,
-0.3311970829963684,
-0.6384522914886475,
0.20094697177410126,
0.13303318619728088,
-0.019628752022981644,
-0.19100910425... | |
page number/total pages, date and time report printed
Take all the rdl files for the reports created from the suggestions and copy the files to the following directory:
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
When creating a new report in your Visual Studio... | [
0.2688724100589752,
0.13694603741168976,
0.7259300351142883,
0.14890499413013458,
-0.2471459060907364,
-0.06029891222715378,
0.06598177552223206,
-0.44869253039360046,
-0.19565610587596893,
-0.6285235285758972,
-0.2720228433609009,
0.2064119428396225,
-0.14623259007930756,
-0.1973381191492... | |
What would be a good place to go to understand arrows? Ideally, I am just looking for some place with a concise definition with motivation from some good examples, something similar to Wadler's exposition on monads.
I found Hughes' original paper ("Generalizing Monads to Arrows") to be fairly accessible. You can read a... | [
0.39116978645324707,
-0.047015316784381866,
-0.09426825493574142,
0.06650914251804352,
-0.37260517477989197,
-0.08435092866420746,
0.24682965874671936,
-0.19032332301139832,
-0.05734511464834213,
-0.41925671696662903,
-0.0356648787856102,
-0.1623762547969818,
-0.054339271038770676,
-0.1271... | |
As stated in the title, i'm looking for an XML schema (XSD-file) for the Glade markup language?
Wikipedia states that **Glade** is a schema based markup language ([list of schemas at wikipedia](http://en.wikipedia.org/wiki/List_of_XML_Schemas#Graphical_User_Interfaces)). I tried to search the web, wikipedia and the gl... | [
0.39686310291290283,
0.02201669290661812,
0.24210064113140106,
0.19478753209114075,
-0.36593732237815857,
0.16096991300582886,
0.02538781613111496,
0.2277478128671646,
-0.13154828548431396,
-0.6903552412986755,
-0.22513814270496368,
0.3401515781879425,
-0.027398616075515747,
-0.07791904360... | |
that directory. | [
0.22396542131900787,
0.16923287510871887,
0.0176806952804327,
0.2881246507167816,
0.2040722519159317,
-0.23261089622974396,
-0.2591990828514099,
0.32336658239364624,
-0.19783124327659607,
-0.18147405982017517,
0.16388334333896637,
0.3135904371738434,
-0.08779013156890869,
0.320806652307510... | |
Yacc does not permit objects to be passed around. Because the %union can only contain POD types, complex objects must be new'd and passed around by pointer. If a syntax error occurs, the yacc parser just stops running, and references to all of those created objects are lost.
The only solution I've come up with is that... | [
0.22382491827011108,
0.3031964600086212,
0.13290804624557495,
-0.1593366116285324,
-0.08976186066865921,
-0.2529921233654022,
0.5718910098075867,
0.36709997057914734,
0.10855069011449814,
-0.3779158592224121,
0.009308167733252048,
0.16800998151302338,
-0.5852415561676025,
0.605401515960693... | |
a different parser.
I love Yacc, but the discriminating union stack does present a challenge.
I don't know whether you are using C or C++. I've modified Yacc to generate C++ for my own purposes, but this solution can be adapted to C.
My preferred solution is to pass an interface to the owner down the parse tree, rath... | [
0.19267502427101135,
-0.03278138488531113,
0.20698480308055878,
-0.2015087902545929,
-0.005024016834795475,
-0.13264188170433044,
0.2939251661300659,
-0.012101751752197742,
0.1333709955215454,
-0.8281369209289551,
-0.07168004661798477,
0.8237623572349548,
-0.5444490313529968,
0.21348901093... | |
virtual ExpressionSubstract *newExpressionSubtract() = 0;
virtual ExpressionMultiply *newExpressionMultiply() = 0;
virtual ExpressionDivide *newExpressionDivide() = 0;
};
class ExpressionAdd : public Expression, public IExpressionOwner
{
private:
std::auto_ptr<Expression> left;
std::auto_ptr<Expression... | [
-0.35455530881881714,
-0.37219730019569397,
0.727267324924469,
-0.21716873347759247,
0.32680121064186096,
0.29506734013557434,
0.6180613040924072,
-0.023527907207608223,
0.013398007489740849,
-0.4067954421043396,
-0.8024027943611145,
0.9306768178939819,
-0.31021544337272644,
-0.16732345521... | |
else
right = autoPtr;
return newExpression;
}
...
};
class Parser
{
private:
std::stack<IExpressionOwner *> expressionOwner;
...
};
```
Everything that wants an expression has to implement the IExpressionOwner interface and push itself to the stack before invoking the expression... | [
-0.16742928326129913,
-0.11496350914239883,
0.5489034652709961,
-0.2831011712551117,
0.16021668910980225,
-0.25043901801109314,
0.48839855194091797,
-0.2965989112854004,
0.008111057803034782,
-0.5937685370445251,
-0.2712441682815552,
0.8433076739311218,
-0.19405604898929596,
-0.11699687689... | |
in many cases, and requires just a little tweaking for expressions. | [
0.44229957461357117,
0.31337621808052063,
-0.25105130672454834,
0.1394805610179901,
0.2838636040687561,
0.2184535413980484,
0.5602824091911316,
0.016789093613624573,
-0.16950155794620514,
-0.4754599630832672,
-0.3844859004020691,
0.29835045337677,
0.2011607438325882,
-0.13238491117954254,
... | |
How do I create a unique constraint on an existing table in SQL Server 2005?
I am looking for both the TSQL and how to do it in the Database Diagram.
The SQL command is:
```
ALTER TABLE <tablename> ADD CONSTRAINT
<constraintname> UNIQUE NONCLUSTERED
(
<columnname>
)
```
See the f... | [
-0.2655152380466461,
0.18043893575668335,
0.6285777688026428,
-0.2283763885498047,
-0.14584344625473022,
-0.1419563740491867,
-0.12454251199960709,
-0.1816972941160202,
-0.34754833579063416,
-0.5547791719436646,
0.343792200088501,
0.5183529257774353,
-0.47138333320617676,
0.053810365498065... | |
add a new index
* enter the necessary info in the Properties on the right hand side:
+ the columns you want (click the ellipsis button to select)
+ set Is Unique to Yes
+ give it an appropriate name | [
0.1352933943271637,
0.08895482867956161,
0.9831589460372925,
0.06058467552065849,
-0.101885125041008,
-0.1231049969792366,
-0.09137691557407379,
-0.16103340685367584,
-0.13808056712150574,
-0.418734610080719,
-0.2904384434223175,
0.16047927737236023,
-0.34380000829696655,
0.000562737870495... | |
I am experimenting with using the FaultException and FaultException<T> to determine the best usage pattern in our applications. We need to support WCF as well as non-WCF service consumers/clients, including SOAP 1.1 and SOAP 1.2 clients.
FYI: using FaultExceptions with wsHttpBinding results in SOAP 1.2 semantics where... | [
0.3408835530281067,
0.21592846512794495,
0.2423495650291443,
-0.13385409116744995,
-0.20942822098731995,
-0.08893781155347824,
0.5566384196281433,
-0.437454491853714,
0.31298142671585083,
-0.7278693318367004,
0.060681942850351334,
0.6697925925254822,
-0.34899771213531494,
-0.04071018472313... | |
class is just a simple test class that contains a string "Message" property as you can see below.
When using wsHttpBinding the response is:
```
<?xml version="1.0" encoding="utf-16"?>
<Fault xmlns="http://www.w3.org/2003/05/soap-envelope">
<Code>
<Value>Sender</Value>
<Subcode>
<Value>MySubFaultCode</Value>
... | [
-0.10098635405302048,
-0.14420202374458313,
0.1635834127664566,
-0.22365529835224152,
-0.4940834939479828,
0.16545456647872925,
0.6065382957458496,
-0.30838295817375183,
0.1466793268918991,
-0.46545135974884033,
-0.1670215129852295,
0.5676116943359375,
-0.27449047565460205,
0.4727872312068... | |
the response is:
```
<?xml version="1.0" encoding="utf-16"?>
<s:Fault xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>s:MySubFaultCode</faultcode>
<faultstring xml:lang="en-US">Testing fault exceptions.</faultstring>
<detail>
<FaultDetails xmlns="http://schemas.datacontract.org/2004/07/ClassL... | [
-0.010587234050035477,
0.04242336377501488,
0.4505414664745331,
-0.24587368965148926,
-0.380297988653183,
0.18339106440544128,
0.7619845271110535,
-0.5355975031852722,
0.14395472407341003,
-0.44320833683013916,
-0.21639248728752136,
0.4833528399467468,
-0.22250968217849731,
0.1835253387689... | |
expected for SOAP 1.2
* generates “s:MySubFaultCode” instead of “s:Server.MySubFaultCode” and the faultException.Code.IsReceiverFault is false for SOAP 1.1
This item was also posted by someone else on <http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=669420&SiteID=1> in 2006 and no one has answered it. I find it ... | [
-0.16754050552845,
0.10837852954864502,
0.16964563727378845,
-0.201631098985672,
-0.41788673400878906,
0.015764379873871803,
0.7413581013679504,
-0.2986273765563965,
0.024411920458078384,
-0.3270801603794098,
0.1935882866382599,
0.537412166595459,
-0.4304976463317871,
0.2096114456653595,
... | |
generate Sender and Receiver fault codes due
/// to what seems like bugs in the implementation for basicHttpBinding (SOAP 1.1). wsHttpBinding
/// (SOAP 1.2) seems to work just fine.
///
/// The subCode parameter for FaultCode.CreateReceiverFaultCode and FaultCode.CreateSenderFaultCode
/// seem to ... | [
0.33753490447998047,
-0.26528239250183105,
0.10586689412593842,
-0.14432188868522644,
-0.4204482138156891,
-0.04391075298190117,
0.5689102411270142,
-0.7223968505859375,
0.29013514518737793,
-0.37610092759132385,
-0.08055116981267929,
0.45296767354011536,
-0.4145772457122803,
-0.1187783107... | |
workaround is to create the FaultCode with Sender/Receiver (SOAP 1.2 terms, but gets
/// translated by WCF depending on the binding) and an agnostic namespace found by using reflector
/// on the FaultCode class. When that NS is passed in WCF seems to be able to generate the proper
/// response with SOAP 1.1... | [
0.1985851526260376,
-0.09157803654670715,
0.37420526146888733,
0.036127571016550064,
-0.43138939142227173,
-0.07226032763719559,
0.48322659730911255,
-0.46742069721221924,
0.08862508833408356,
-0.5821066498756409,
-0.07173246145248413,
0.5340042114257812,
-0.36282360553741455,
0.0234170593... | |
/// subcodes.
/// </summary>
/// <remarks>
/// See http://stackoverflow.com/questions/65008/net-wcf-faults-generating-incorrect-soap-11-faultcode-values
/// for more details.
/// </remarks>
public static class FaultCodeFactory
{
private const string _ns = "http://schemas.microsoft.co... | [
-0.15763038396835327,
0.007557825651019812,
0.10064227879047394,
-0.3362254500389099,
-0.37516799569129944,
0.2927098870277405,
0.48907965421676636,
-0.38438668847084045,
0.016949938610196114,
-0.47090914845466614,
-0.0673849880695343,
0.09674842655658722,
-0.6994316577911377,
0.1732749193... | |
/// <remarks>Does not support subcodes due to a WCF bug.</remarks>
public static FaultCode CreateSenderFaultCode()
{
return new FaultCode("Sender", _ns);
}
/// <summary>
/// Creates a receiver fault code.
/// </summary>
/// <returns>A FaultCode object... | [
0.06281165033578873,
0.058096710592508316,
0.23513859510421753,
-0.3049236834049225,
-0.16054165363311768,
0.45355892181396484,
0.4786458909511566,
-0.3727246820926666,
0.11539968103170395,
-0.717846691608429,
-0.13396750390529633,
0.18862579762935638,
-0.3916794955730438,
0.21068368852138... | |
/// <remarks>Does not support subcodes due to a WCF bug.</remarks>
public static FaultCode CreateReceiverFaultCode()
{
return new FaultCode("Receiver", _ns);
}
}
```
Sadly I don't see a way to use subcodes without breaking either SOAP 1.1 or 1.2 clients.
If you use the Code.S... | [
0.34039175510406494,
0.07804624736309052,
0.24820372462272644,
-0.21533656120300293,
-0.10280974954366684,
0.06844512373209,
0.6376454830169678,
-0.3355688154697418,
0.09878163039684296,
-0.795582115650177,
0.02732393890619278,
0.3899275064468384,
-0.3827759623527527,
0.18124884366989136,
... | |
support in .NET (either via the static FaultCode methods or one of the overloads) it breaks SOAP 1.1 but works in SOAP 1.2. | [
0.14887385070323944,
-0.14166881144046783,
0.14589662849903107,
-0.011169301345944405,
-0.0578710101544857,
-0.40270763635635376,
0.6445069313049316,
-0.008533330634236336,
-0.014506342820823193,
-0.41989079117774963,
-0.30519992113113403,
0.31546783447265625,
-0.38573023676872253,
-0.1034... | |
Is it really viable to use GCJ to publish server-side applications? Webapps?
My boss is convinced that compiling our (***my***) webapp into a binary executable is a brilliant idea. (Then again, he likes nice, small simple things with blinky lights that he can understand.) He instinctively sees no issues with this, wh... | [
0.3953869342803955,
0.5185282826423645,
0.20614087581634521,
0.36627328395843506,
0.2592393755912781,
-0.259748250246048,
0.021815229207277298,
0.3982492983341217,
-0.2532815635204315,
-0.5280405879020691,
-0.14209027588367462,
0.41035541892051697,
-0.10222159326076508,
0.25964590907096863... | |
it clear he thinks I'm being childishly resistive.
Why does he want a single magic executable? He sees a couple of "benefits":
* If it is a binary executable, then it is hard to reverse engineer and circumvent any licensing. Management lives in constant fear that this is happening, even though we sell into larger cor... | [
0.5229458808898926,
0.177540123462677,
0.36351779103279114,
0.2678969204425812,
0.08887790888547897,
-0.15357598662376404,
0.2864778935909271,
0.08482128381729126,
-0.22835855185985565,
-0.323037713766098,
-0.14970900118350983,
0.716231107711792,
0.1828392744064331,
-0.1307995766401291,
... | |
now I am here.
A bit of background on my application:
**What it is made from:**
* Java 6 (Sun's JVM)
* AspectJ 1.6
* Tomcat 6
* Hibernate 3
* Spring 2
* another two dozen supporting jar files
**What it does**
* A streaming media CMS
* Performance sensitive
* Deployed on Linux, Solaris, Windows (and developed on ... | [
0.574333131313324,
0.09014829248189926,
0.44483986496925354,
-0.21451275050640106,
-0.3979891836643219,
-0.2875216007232666,
0.253016859292984,
-0.034227240830659866,
-0.4383190870285034,
-0.7962377667427063,
-0.1808175891637802,
0.36995649337768555,
0.21366500854492188,
0.0986867994070053... | |
this out?
There is one other similar thread ([Java Compiler Options to produce .exe files](https://stackoverflow.com/questions/53845/java-compiler-options-to-produce-exe-files)) but it is a bit too simple, the links dated, and not really geared towards a server-side question.
Your informed opinions will be highly che... | [
0.44162917137145996,
0.26997366547584534,
0.009483315981924534,
-0.0682467594742775,
-0.1661549061536789,
-0.301439493894577,
0.304001122713089,
-0.0437791645526886,
-0.18187890946865082,
-0.18817274272441864,
0.09229788929224014,
0.47843337059020996,
-0.2915157973766327,
0.310686796903610... | |
have never wanted to go near GCJ again. To give that more substance this was while I was in school and was working on a mostly trivial program so on an *"enterprise level"* I have had a healthy fear of GCJ. | [
0.6434460878372192,
0.40519821643829346,
-0.034145914018154144,
-0.5554982423782349,
-0.15119092166423798,
-0.3943357467651367,
0.5981894731521606,
0.6759711503982544,
-0.38287389278411865,
-0.20903591811656952,
0.09415555000305176,
0.2249804586172104,
-0.4684852957725525,
0.39459219574928... | |
VB 6.0 does not have any global handler.To catch runtime errors,we need to add a handler in each method where we feel an error can occur.But, still some places might be left out.So,we end up getting runtime errors.Adding error handler in all the methods of an application,the only way?
No there is no way to add a global... | [
-0.020188141614198685,
-0.17714956402778625,
0.5197634696960449,
0.2180687040090561,
-0.06328680366277695,
-0.21977785229682922,
0.5665286183357239,
0.08986221998929977,
-0.46630701422691345,
-0.5422461032867432,
0.09460046142339706,
0.3807075023651123,
-0.8969452381134033,
0.1955005973577... | |
How would I remove the border from an iframe embedded in my web app? An example of the iframe is:
```
<iframe src="myURL" width="300" height="300">Browser not compatible.</iframe>
```
I would like the transition from the content on my page to the contents of the iframe to be seamless, assuming the background colors ... | [
0.261403888463974,
0.01693302020430565,
0.7238070368766785,
-0.04614308103919029,
-0.019474592059850693,
-0.009909422136843204,
0.24794504046440125,
-0.07813679426908493,
-0.04600267484784126,
-0.9810894727706909,
-0.15933988988399506,
0.31617507338523865,
-0.39468225836753845,
-0.00696489... | |
If i have a simple named query defined, the preforms a count function, on one column:
```
<query name="Activity.GetAllMiles">
<![CDATA[
select sum(Distance) from Activity
]]>
</query>
```
How do I get the result of a sum or any query that dont return of one the mapped entities, with NHibernate usi... | [
-0.2704163193702698,
-0.045227810740470886,
0.33174630999565125,
0.012236201204359531,
-0.07176409661769867,
-0.06371984630823135,
-0.041237723082304,
-0.37472763657569885,
-0.06388191133737564,
-0.4085456430912018,
-0.00322092417627573,
0.43299075961112976,
-0.24517662823200226,
0.0505802... | |
{
IQuery query = session.GetNamedQuery(namedQuery);
return query.UniqueResult<decimal>();
}
}
```
Sorry! I actually wanted a sum, not a count, which explains alot. Iv edited the post accordingly
This works fine:
```
var criteria = session.CreateCriteria(typeof(Activity))
... | [
0.1141570433974266,
-0.061462923884391785,
0.41094857454299927,
0.11824647337198257,
-0.09182807803153992,
-0.051023755222558975,
0.18609073758125305,
-0.49109596014022827,
-0.3580086827278137,
-0.3089859187602997,
0.13407574594020844,
0.34285756945610046,
-0.24068079888820648,
0.340449512... | |
query approach still dies, "Errors in named queries: {Activity.GetAllMiles}":
```
using (ISession session = NHibernateHelper.OpenSession())
{
IQuery query = session.GetNamedQuery("Activity.GetAllMiles");
return query.UniqueResult<double>();
}
``` | [
-0.4361949563026428,
-0.11129636317491531,
0.4045570492744446,
0.0774761512875557,
-0.12804052233695984,
-0.16322676837444305,
0.3405875563621521,
-0.3594132661819458,
-0.24633029103279114,
-0.5271823406219482,
-0.09166087955236435,
0.5221558809280396,
-0.3565342426300049,
0.37136167287826... | |
I've just started writing unit tests for a legacy code module with large physical dependencies using the #include directive. I've been dealing with them a few ways that felt overly tedious (providing empty headers to break long #include dependency lists, and using #define to prevent classes from being compiled) and was... | [
0.6635295152664185,
0.20083673298358917,
-0.17764265835285187,
-0.17909535765647888,
0.0314299650490284,
-0.11444245278835297,
0.4054988920688629,
-0.08829456567764282,
-0.05953441187739372,
-0.4370548725128174,
-0.009822766296565533,
0.4081383943557739,
-0.05487082153558731,
0.20108200609... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.