text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
According to [the join-op syntax](http://sqlite.org/syntaxdiagrams.html#join-op), SQLite has 13 distinct join statements:
```
,
JOIN
LEFT JOIN
OUTER JOIN
LEFT OUTER JOIN
INNER JOIN
CROSS JOIN
NATURAL JOIN
NATURAL LEFT JOIN
NATURAL OUTER JOIN
NATURAL LEFT OUTER JOIN
NATURAL INNER JOIN
NATURAL CROSS JOIN
```
Are they ... | [
0.018750345334410667,
0.3115446865558624,
0.4499368965625763,
-0.24755457043647766,
-0.14220678806304932,
0.0600605234503746,
0.16270631551742554,
-0.24320237338542938,
-0.02386002242565155,
-0.17633222043514252,
-0.07214655727148056,
0.25240233540534973,
-0.4244118332862854,
0.12554390728... | |
it's a good idea to avoid them.
As was answered on [the mailing list](http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-users/2009-April/011007.html), SQLite3 only supports three joins: `CROSS JOIN`, `INNER JOIN`, and `LEFT OUTER JOIN`. The following are equivalent:
```
, == CROSS JOIN
JOIN == INNER JOIN
LEFT JOI... | [
-0.16876210272312164,
0.2863098084926605,
0.5858320593833923,
-0.3979206383228302,
-0.20670650899410248,
-0.17301592230796814,
0.3896016776561737,
-0.1540587693452835,
-0.21689122915267944,
-0.4608706533908844,
-0.05911457538604736,
0.3758651614189148,
-0.6265786290168762,
-0.0336337052285... | |
I want to configure bind/write driver that resolves DNS requests based on the ip address of the client.
We want to unify the domain names of all test environments for our web application.
Instead of having many domains like `test.mysite.com`, `qa.mysite.com`, etc for different staging environments we want only to have... | [
0.48885366320610046,
0.15948046743869781,
0.16426360607147217,
0.22070437669754028,
-0.03468850255012512,
-0.2153136134147644,
0.09039955586194992,
-0.2837279736995697,
-0.049367859959602356,
-0.7792133688926697,
0.29614222049713135,
0.30212754011154175,
-0.11783847212791443,
0.42411592602... | |
dns server? And how does it compare to writing client application that modifies the local hosts file?
You can use [PowerDNS](http://www.powerdns.com) with the [pipe backend](http://downloads.powerdns.com/documentation/html/backends-detail.html#PIPEBACKEND-PROTOCOL) to return different IP addresses dependent on the clie... | [
0.5064780116081238,
-0.4044889509677887,
0.506709635257721,
0.08379355818033218,
-0.23354215919971466,
-0.01076735369861126,
0.209080308675766,
-0.3496708869934082,
-0.23467473685741425,
-0.775676429271698,
-0.062380969524383545,
0.6677131056785583,
-0.19211317598819733,
0.1092142686247825... | |
I've read some articles on how to create anonymous types in C#.
What are some use cases for these things? To me, it seems like it might make things a little more difficult to understand declaring objects and their members inline.
When does it make sense to use Anonymous Types?
I like to use anonymous types when I ne... | [
0.7272413969039917,
0.013298380188643932,
0.3495155870914459,
0.09980437159538269,
-0.16805407404899597,
-0.16511854529380798,
-0.14009010791778564,
-0.1348773092031479,
-0.34235313534736633,
-0.4877011179924011,
0.2508822977542877,
0.6121780872344971,
-0.3506796658039093,
0.10915692895650... | |
select new
{
Description = terms.Description,
Term = terms.Term,
Total = | [
0.058006297796964645,
-0.28485366702079773,
0.3283003866672516,
-0.010085814632475376,
0.19992345571517944,
0.12284228950738907,
0.21042285859584808,
-0.30325689911842346,
-0.11031902581453323,
-0.8769281506538391,
-0.29832687973976135,
0.7396231293678284,
-0.2755367159843445,
0.5541909933... | |
terms.CalculatePaymentAmount(_total),
Type=terms.GetType().Name
};
```
Here I then bind a datagrid to payments.ToList(). the thing here is I can aggregate multiple objects without havign to define an intermidary. | [
-0.008971275761723518,
-0.0891270861029625,
0.6119898557662964,
-0.12655127048492432,
-0.1750955730676651,
-0.056241534650325775,
-0.16201846301555634,
-0.39726048707962036,
0.020791877061128616,
-0.6394994854927063,
0.23772257566452026,
0.5864790081977844,
-0.199722558259964,
0.3549387753... | |
Although it's pegged as a 3D graphics framework for the browser, could [Google O3D](http://code.google.com/apis/o3d/) be used as an RIA framework similar to GWT, Flex or Rails?
Not sure where you're looking, but certainly on live.com I get a request for each letter:
[, but there it's SQL Server 2005 and the "accepted" answer doesn't work in SQL Server 2000.
Specifically: I'm trying to run `ALTER TABLE foo DROP COLUMN bar`, and it's failing... | [
-0.37240710854530334,
0.40129053592681885,
0.6667766571044922,
-0.20568102598190308,
0.0031650718301534653,
-0.08471362292766571,
0.2964162528514862,
-0.2590212821960449,
-0.4590483605861664,
-0.19085875153541565,
0.17944400012493134,
0.5280379056930542,
-0.48981788754463196,
0.21873345971... | |
in that other question works for me in SQL Server 2005 but not in SQL Server 2000. I need the latter.
[UPDATE] I need a *query* that can answer the question "What is the name of the default constraint for column `bar` in table `foo`." Not a way for a human being to manually find the answer.
Just figured out what the r... | [
-0.4792011082172394,
0.134180948138237,
0.4230649173259735,
-0.019375178962945938,
-0.20229606330394745,
-0.059061381965875626,
-0.018085414543747902,
-0.16995330154895782,
-0.5016458630561829,
-0.4093623161315918,
0.0006795295048505068,
0.4905892312526703,
-0.7721318602561951,
-0.31390678... | |
is_defcnst,
dobj.name as def_name
from syscolumns col
left outer join sysobjects dobj
on dobj.id = col.cdefault and dobj.type = 'D'
where col.id = object_id(N'dbo.table_name')
and dobj.name is not null
``` | [
-0.48296692967414856,
0.06827020645141602,
0.3659718632698059,
-0.3873884081840515,
0.046555787324905396,
0.02967768721282482,
0.24694983661174774,
-0.3524845242500305,
-0.10551304370164871,
-0.5136467814445496,
-0.5306172370910645,
0.30926916003227234,
-0.46699172258377075,
-0.00626508053... | |
We have a website that runs on two load balanced servers. We use the ASP.Net caching to help improve performance by caching high usage data. BUT, occasionally that data changes. When it does, we need to clear the relevant cache items on BOTH the load balanced servers. Does anyone have some easy to implement suggestions... | [
0.4691762328147888,
0.10194909572601318,
0.005032649263739586,
0.4980902373790741,
0.03908757120370865,
-0.15582065284252167,
0.25322073698043823,
0.34143123030662537,
-0.34778815507888794,
-0.7393181920051575,
0.272391676902771,
0.17141388356685638,
-0.040908847004175186,
0.01296743657439... | |
overkill. Just a simple mechanism for clearing out specific cache items across servers is all we need for now.
Thanks for any suggestions.
We use a simple web service approach. Our cache clear mechanism checks a web config setting to see if any other servers exist and calls the web service on those server(s) asynchron... | [
0.33639344573020935,
0.2122434377670288,
0.18793107569217682,
0.30107182264328003,
0.1911507397890091,
-0.12311107665300369,
0.18055278062820435,
0.2078772485256195,
-0.08211018890142441,
-0.36747944355010986,
0.07233388721942902,
0.3166559338569641,
-0.30250874161720276,
0.333109945058822... | |
the item) or application specific (ex. the prefix of the item is the application name).
Here is a VB example of the ClearItem routine that would be called on either one of your nodes:
```
Public Shared Sub ClearItem(ByVal strPrefix As String, ByVal strPostfix As String)
If WebConfig.Caching_Enabled() Then
... | [
-0.2253635972738266,
-0.19799108803272247,
0.5143577456474304,
-0.14068107306957245,
0.1413848102092743,
-0.04272020235657692,
0.2803317606449127,
-0.08730972558259964,
-0.26886454224586487,
-0.35558801889419556,
-0.440901517868042,
0.09857788681983948,
-0.42932575941085815,
0.456603795289... | |
' At the very least we need a Postfix '
If Not IsNothing(strPostfix) AndAlso Not strPostfix.Length.Equals(0) Then
_ClearItem(strPrefix, strPostfix)
End If
If WebConfig.Caching_WebFarmEnabled() Then
' Now clear the cache across the rest of the server farm '
_C... | [
0.09024099260568619,
0.007567453198134899,
0.5508748888969421,
-0.1604917347431183,
0.16809508204460144,
-0.05679278448224068,
0.4104686379432678,
-0.011870015412569046,
-0.19109676778316498,
-0.5626946091651917,
-0.350830614566803,
-0.0721859410405159,
-0.4165753424167633,
0.3979554772377... | |
End If
End If
End Sub
Private Shared Sub _ClearItem_WebFarm(ByVal strPrefix As String, ByVal strPostfix As String)
If WebConfig.Caching_WebFarmEnabled() Then
' Use a web service on each server in the farm to clear the '
' requested item from the Cache '
' Determine which servers ne... | [
-0.10785052925348282,
-0.13447058200836182,
0.5386818647384644,
-0.17714811861515045,
0.05468180775642395,
-0.1884913146495819,
0.34183287620544434,
-0.15629008412361145,
-0.1045345887541771,
-0.4148291349411011,
-0.4485314190387726,
0.0064864931628108025,
-0.2880215048789978,
0.6675168871... | |
arrServers = Split(WebConfig.Caching_WebFarmServers(), "|")
Dim strServer As String ' Holds which server we are currently contacting '
' Loop through all the servers and call their web services '
For Each strServer In arrServers
Dim WS As New WebServiceAsyncCall
WS.St... | [
0.007735575549304485,
-0.2726675570011139,
0.9691156148910522,
-0.22250548005104065,
-0.39801493287086487,
0.24081312119960785,
0.18549558520317078,
-0.4581282138824463,
-0.28454235196113586,
-0.32624518871307373,
-0.3246569037437439,
0.4020827114582062,
-0.4316672086715698,
0.199274286627... | |
Shared Sub _ClearItem(ByVal strPrefix As String, ByVal strPostfix As String)
If WebConfig.Caching_Enabled() Then
' Determine how we are comparing keys '
Dim blnPrefix, blnPostfix As Boolean
If strPrefix.Length.Equals(0) Then
blnPrefix = False
Else
blnPrefix... | [
0.08790518343448639,
-0.2622019350528717,
0.43106499314308167,
-0.13259540498256683,
-0.15990254282951355,
-0.1700686365365982,
0.23741452395915985,
-0.3094122111797333,
-0.022339003160595894,
-0.39074885845184326,
-0.03944282606244087,
0.37162724137306213,
-0.3513702154159546,
0.353426337... | |
If strPostfix.Length.Equals(0) Then
blnPostfix = False
Else
blnPostfix = True
End If
' Reference the Cache collection '
Dim objCache As System.Web.Caching.Cache = HttpContext.Current.Cache
' Exit if the cache is empty ' | [
0.10084956139326096,
-0.1653815358877182,
0.7829896211624146,
-0.21859079599380493,
0.08472996950149536,
-0.02785850130021572,
0.4693838953971863,
-0.1651243269443512,
-0.2815627157688141,
-0.5510061383247375,
-0.3318876326084137,
0.17369136214256287,
-0.44182130694389343,
0.46255651116371... | |
If objCache.Count.Equals(0) Then
Exit Sub
End If
' Clear out the cache for all items matching the input(s) (on this local server) '
Dim objCacheEnum As IEnumerator = objCache.GetEnumerator()
Dim objCacheItem As Object
Dim objCurrentKey As System.Collections.Dictionar... | [
-0.48292526602745056,
-0.16544602811336517,
0.7386820912361145,
-0.31085819005966187,
-0.033177681267261505,
0.2555324137210846,
0.5974022150039673,
-0.09579123556613922,
-0.15316395461559296,
-0.5572607517242432,
-0.5203619003295898,
0.19264012575149536,
-0.43848326802253723,
0.5056303739... | |
' Enumerate through the cache '
While objCacheEnum.MoveNext()
objCurrentKey = CType(objCacheEnum.Current, DictionaryEntry)
strCurrentKey = objCurrentKey.Key.ToString()
' How are we comparing the key? '
If blnPrefix AndAlso Not (blnPostfix) Then ' Only by PREFIX ... | [
0.0635688528418541,
0.13596276938915253,
0.4230981767177582,
-0.26988357305526733,
-0.20615114271640778,
0.30713725090026855,
0.301712304353714,
-0.4207477271556854,
-0.05040492117404938,
-0.5125626921653748,
-0.40154778957366943,
0.3308197557926178,
-0.12057439237833023,
-0.09460393339395... | |
If strCurrentKey.StartsWith(strPrefix) Then
' Remove it from the cache '
objCacheItem = objCache.Remove(strCurrentKey) ' Returns a reference to the item '
objCacheItem = Nothing ' Need to explicitly nuke this because the objCache.Remove() above doesn t destroy... | [
-0.18881656229496002,
0.1594056785106659,
0.22593162953853607,
-0.20099672675132751,
0.19891908764839172,
-0.1350499391555786,
0.8276957869529724,
0.09614310413599014,
-0.41249480843544006,
-0.4016262888908386,
-0.5135286450386047,
0.06630266457796097,
-0.3459494709968567,
0.62071925401687... | |
End If
ElseIf Not (blnPrefix) AndAlso blnPostfix Then ' Only by POSTFIX '
If strCurrentKey.EndsWith(strPostfix) Then
' Remove it from the cache '
objCacheItem | [
-0.25886964797973633,
0.03132577985525131,
0.3325023055076599,
-0.290385365486145,
0.20668573677539825,
-0.06533272564411163,
0.6952289938926697,
-0.1027153953909874,
-0.12083037197589874,
-0.445393443107605,
-0.47491562366485596,
0.06285373121500015,
-0.4096033275127411,
0.228748261928558... | |
= objCache.Remove(strCurrentKey) ' Returns a reference to the item '
objCacheItem = Nothing ' Need to explicitly nuke this because the objCache.Remove() above doesn t destroy '
End If
ElseIf blnPrefix AndAlso blnPostfix Then ' By both PREFIX and POSTFIX' | [
-0.08539002388715744,
0.108242467045784,
0.21220941841602325,
-0.3496524691581726,
-0.2472187578678131,
-0.11225725710391998,
0.7157121896743774,
-0.09431876242160797,
-0.4220961332321167,
-0.2624906003475189,
-0.7370675802230835,
0.10881245136260986,
-0.4520104229450226,
0.276948273181915... | |
If strCurrentKey.StartsWith(strPrefix) AndAlso strCurrentKey.EndsWith(strPostfix) Then
' Remove it from the cache '
objCacheItem = objCache.Remove(strCurrentKey) ' Returns a reference to the item '
objCacheItem = Nothing ' Need to explicitly nuke this because ... | [
-0.25282543897628784,
0.12196606397628784,
0.35671913623809814,
-0.23282544314861298,
0.23415760695934296,
-0.049214549362659454,
0.8189554810523987,
-0.009152635931968689,
-0.4684133529663086,
-0.3687911033630371,
-0.5361791849136353,
0.013611465692520142,
-0.3472602665424347,
0.500237703... | |
End If
Else
' Not comparing prefix OR postfix? Why bother continuing then! '
Exit Sub
End If
End While
End If
End Sub
```
You can see that | [
-0.15189406275749207,
-0.10360639542341232,
0.22717182338237762,
-0.048029154539108276,
-0.2804486155509949,
-0.21362851560115814,
0.3857249319553375,
0.030771570280194283,
-0.15602917969226837,
-0.3554564118385315,
-0.4737894833087921,
0.0978940799832344,
-0.17733214795589447,
0.135769560... | |
the code above calls other server(s) by using this helper class:
```
Private Class WebServiceAsyncCall
Public Sub StartCallBack(ByVal strService As String, ByVal strPrefix As String, ByVal strPostfix As String)
ActiveWebServiceCounter += 1
Dim clearCacheProxy As New CacheClearService.CacheClear ... | [
-0.2769429683685303,
0.12510158121585846,
0.6443999409675598,
-0.24047459661960602,
0.1884174644947052,
-0.09731970727443695,
0.30974099040031433,
0.06812877953052521,
0.10359889268875122,
-0.3450969457626343,
-0.4601254463195801,
0.19128841161727905,
-0.5108429789543152,
0.277716219425201... | |
End Sub
Public Sub DoneCallBack(ByVal sender As Object, ByVal e As CacheClearService.ClearItemCompletedEventArgs)
ActiveWebServiceCounter -= 1
If e.Result.Length > 0 Then ' Something failed '
' Log the error '
End If
End Sub
End Class
```
The web service on the remote ... | [
-0.18974794447422028,
-0.10858497023582458,
0.38704589009284973,
-0.047068674117326736,
0.1715700775384903,
-0.30115994811058044,
0.7970182299613953,
0.04455076530575752,
0.09847164899110794,
-0.1427052766084671,
-0.46436312794685364,
0.3194175362586975,
-0.4068203568458557,
0.488517254590... | |
If I have this URL
<http://domain.com/test3/eu/flickr-map/>
What url do I use to generate the api key. I have put my code into production and what ever I do I can't seem to get an API key to work.
Please help.
I would use "<http://domain.com>" as my URL when generating the key. That way you can use it within other f... | [
0.802305281162262,
0.10205050557851791,
0.435613751411438,
-0.006858289707452059,
-0.01961793377995491,
-0.2686229646205902,
-0.027450622990727425,
0.05685018375515938,
-0.10401623696088791,
-0.6445319652557373,
0.07137569785118103,
0.1750703603029251,
-0.10938567668199539,
0.5921235084533... | |
Is there a tool that will take a series of C++ headers and generate a XSD and a class that will serialize the C++ to XML?
Or really what we are looking for is the simplest way to migrate data from C++ to C#? We have a library in C++ that we would like to write a GUI for in C#. Using Managed wrapper classes it seems li... | [
0.32104456424713135,
-0.17323864996433258,
0.41372349858283997,
0.37076982855796814,
-0.06564448773860931,
-0.20908863842487335,
-0.3537599742412567,
0.028876125812530518,
-0.313549280166626,
-0.6930622458457947,
-0.011178413406014442,
0.5044167637825012,
-0.3737994134426117,
0.32034203410... | |
your site. | [
0.5269314646720886,
0.07261759787797928,
-0.10186462849378586,
0.0028846643399447203,
0.021511446684598923,
-0.5680103302001953,
0.3475419878959656,
0.3770304322242737,
-0.2901246249675751,
-0.8050273060798645,
0.06474729627370834,
0.30129769444465637,
-0.04652409255504608,
0.3321675658226... | |
My inputrc is empty. I use Bash.
**Problem:**
I am at
```
cd $te
```
I press Tab, and I get
```
cd \$test
```
**How can you have the tab completion without the backslash in Bash?**
You don't. In Bash, a $ is used in the retrieval of variables. For example:
```
SWEETVAR='hi'
echo $SWEETVAR
```
Because of this,... | [
-0.1057291179895401,
0.301664263010025,
0.26751941442489624,
-0.4002770185470581,
-0.167731374502182,
0.049158960580825806,
0.5259988307952881,
-0.39130261540412903,
-0.05247657746076584,
-0.3821627199649811,
-0.2408224642276764,
0.8301995992660522,
-0.12126706540584564,
0.2425465732812881... | |
I know how to create custom configuration handlers for my .NET application. There are plenty of posts on StackOverflow that cover what needs to be done. I've spent a lot of time writing classes that derive from ConfigurationElement.
I'm getting worried that this approach involves a lot of work - more work than I was e... | [
0.5536165237426758,
-0.06024183705449104,
0.12064814567565918,
0.10181626677513123,
-0.06239400804042816,
-0.1551722139120102,
0.09831167012453079,
-0.1683611124753952,
-0.19332534074783325,
-1.0220636129379272,
0.055209241807460785,
0.5870926976203918,
-0.06541204452514648,
-0.08234405517... | |
settings and it creates some code that details with serializing types into and out of config files. Application Settings appears to take a lot of the pain out of dealing with custom config, but I don't particularly like the format of the config sections that this produces and I'm not looking to save my config back.
So... | [
0.32838770747184753,
0.027774320915341377,
0.6029297709465027,
0.31538307666778564,
0.18477337062358856,
-0.04429654777050018,
0.07192778587341309,
-0.2230602502822876,
-0.1772902011871338,
-0.6189289093017578,
0.04734930023550987,
0.7219423651695251,
-0.3200550675392151,
-0.38743707537651... | |
web.config?
See the [Configuration Section Designer](http://www.codeplex.com/csd/). | [
0.4388962388038635,
-0.25469309091567993,
0.08701722323894501,
0.25188779830932617,
0.1946006417274475,
-0.4319585859775543,
-0.15555056929588318,
0.27364054322242737,
-0.42911553382873535,
-0.8730084896087646,
-0.5563675761222839,
0.16131019592285156,
-0.3948923647403717,
0.06017966568470... | |
Say you have an object which, for the sake of example, we will call the ScoreHotChicksEngine. And say that the ScoreHotChicksEngine's constructor is expecting to be passed an IDataReader containing property values pertaining to, apparantly, Scoring Hot Chicks for Lonely Geeks.
```
ScoreChicksEngine(IDataReader reader... | [
0.09415142983198166,
0.0781439021229744,
0.01796618290245533,
0.23912955820560455,
-0.2281704694032669,
-0.03900318592786789,
-0.024146554991602898,
-0.18124213814735413,
0.0616045743227005,
-0.39220330119132996,
-0.13528181612491608,
0.5320049524307251,
-0.3564327359199524,
0.017356919124... | |
= command.ExecuteReader();
ScoreChicksEngine SCE = new ScoreChicksEngine(reader);
if (SCE.HasReaderData()) doSomething();
```
I'd choose the first method. The second method violates single responsibility principle. I'd also declare the input parameter of the constructor as `IDataRecord` and not `IDataReader`. Basicall... | [
-0.09854523092508316,
-0.14057016372680664,
-0.05881189927458763,
0.010437918826937675,
-0.029863733798265457,
0.020262684673070908,
0.28891512751579285,
-0.3896755874156952,
0.0048044645227491856,
-0.3989773690700531,
-0.15399684011936188,
0.4275423586368561,
-0.38193565607070923,
0.28859... | |
I want to select only the first level of 'td' elements in a table and not the cells of any nested tables.
eg:
```
<table id="Outer">
<tr>
<td> --this one
</td>
<td> --this one
<table>
<tr> | [
0.24698138236999512,
-0.1565171629190445,
-0.18375016748905182,
-0.017734073102474213,
0.07166161388158798,
0.11912257224321365,
-0.15205392241477966,
-0.5504516363143921,
-0.0029629620257765055,
-0.5296598076820374,
0.13146279752254486,
0.2869587242603302,
-0.5093840956687927,
-0.28113868... | |
<td></td> -- but not this one or any deeper nested cells
</tr>
</table>
</td>
</tr>
</table>
```
(and yes in prod code i would include tbody, thead...)
I'd use the [children](http://docs.jquery.com/Traversing/children#expr) selector, which only selects the immediate children ... | [
0.31604206562042236,
-0.19672581553459167,
0.02268529310822487,
0.04009415954351425,
0.025009911507368088,
0.2931205928325653,
0.03615841269493103,
-0.4383538067340851,
0.05960637703537941,
-0.47523415088653564,
-0.04608849808573723,
0.3894476890563965,
-0.30823343992233276,
-0.23418313264... | |
I've added in the selectors for thead, tbody, and tfoot as you indicate you will have in production. Adjust accordingly for your sample.
```
$('table#namedTable').children('tbody,thead,tfoot')
.children('tr')
.children('td')
``` | [
0.4025283753871918,
0.17255553603172302,
-0.10120947659015656,
0.13497790694236755,
0.3268015384674072,
0.8839536905288696,
-0.29327625036239624,
-0.24767978489398956,
-0.08849379420280457,
-0.46041280031204224,
-0.007554391864687204,
0.3662579655647278,
-0.07307839393615723,
0.11770658940... | |
Is it possible to overload ++ operators in Python?
There is no `++` operator in Python (nor '--'). Incrementing is usually done with the `+=` operator instead. | [
0.23729972541332245,
-0.07062946259975433,
0.13369455933570862,
-0.2491418868303299,
-0.2352268397808075,
-0.31006816029548645,
0.4031752943992615,
-0.07789278030395508,
-0.06211373955011368,
0.16395148634910583,
-0.2848985493183136,
0.6207315921783447,
-0.6110089421272278,
-0.143560290336... | |
Is there a flag for gcc such that conversions from a long to a short will generate a warning about a possible loss of data?
I'm working on a C++ application that is compiled for both Visual Studio (2005) and GCC 4.2 (for Mac OS X).
The warnings that Visual Studio prints out follow this pattern:
```
: warning C4244: ... | [
0.25712454319000244,
0.07930102944374084,
0.06759408116340637,
-0.035744015127420425,
-0.19129043817520142,
-0.17867697775363922,
-0.13966810703277588,
-0.011005142703652382,
-0.3843602240085602,
-0.13196466863155365,
-0.027364270761609077,
0.5540284514427185,
-0.4371420443058014,
0.095232... | |
not sure if we want to invest in quite yet).
**April 22, 2009 @ 11:00 EST Edit:**To clarify, I want to see that warning. We have code where we want to know when a data loss would occur. If I have the code:
```
unsigned long value1 = LONG_MAX;
std::cout << "value1: " << value1 << std::endl;
unsigned short value2 = va... | [
0.075712651014328,
0.1595136821269989,
0.5371495485305786,
0.16398192942142487,
0.34457001090049744,
-0.2520233690738678,
0.3357616066932678,
-0.08983123302459717,
-0.29391640424728394,
-0.3793131113052368,
-0.013952373526990414,
0.6855789422988892,
-0.012362622655928135,
0.102938219904899... | |
the places in our large code base using Visual Studio's warnings.
Is there any way we can generate these warnings in gcc 4.2?
This feature is not supported in GCC 4.2, but it has been added in GCC 4.3. [Wiki page explaining it](http://gcc.gnu.org/wiki/NewWconversion).
Thanks to schnaader and Evan Teran for providing ... | [
0.5505443215370178,
0.2448461651802063,
-0.30085325241088867,
0.1070948988199234,
0.02719070203602314,
-0.37201544642448425,
0.3691641390323639,
0.011628993786871433,
-0.3333483338356018,
-0.5487464666366577,
-0.32773780822753906,
0.21135972440242767,
-0.07465590536594391,
-0.1402810066938... | |
If I have a string like:
```
<p> </p>
<p></p>
<p class="a"><br /></p>
<p class="b"> </p>
<p>blah blah blah this is some real content</p>
<p> </p>
<p></p>
<p class="a"><br /></p>
```
How can I turn it into just:
```
<p>blah blah blah this is some real content</p>
```
The regex needs to pick up `&nbs... | [
0.15759681165218353,
-0.0039373342879116535,
0.48308390378952026,
-0.17125347256660461,
-0.0641527995467186,
-0.13624635338783264,
0.3794797360897064,
-0.1695345640182495,
-0.23527522385120392,
-0.770463228225708,
-0.38416537642478943,
0.3905447721481323,
-0.30361783504486084,
-0.068581260... | |
I'm working on a site where users submit photos which can be viewed one by one on a page.
There is another page where you see smaller versions of multiple photos.
When the user clicks any of these smaller photos they get the large version page, pressing "next" will take them to another photo in that category.
I woul... | [
0.5949439406394958,
0.2459782063961029,
0.3178727626800537,
0.008786731399595737,
0.13562317192554474,
0.02859162725508213,
-0.29549840092658997,
0.10273942351341248,
-0.32461920380592346,
-0.724492609500885,
0.3313155174255371,
0.2577151358127594,
-0.012313732877373695,
0.3801948130130768... | |
user leaves a single photo page, goes back to multiple thumbs page and then clicks another photo there, the user will start seeing the same new photos when clicking next.
I would like to ensure the user does not see the same photo. I thought about putting a unique cookie for each visitor and then when the user visits ... | [
0.4280499219894409,
0.12368123233318329,
0.557052493095398,
0.03750903904438019,
0.08283475041389465,
-0.13300296664237976,
0.2991669178009033,
-0.12135821580886841,
-0.42816564440727234,
-0.8756653070449829,
0.12644173204898834,
0.404360830783844,
-0.20205441117286682,
0.39204996824264526... | |
is the best way of doing this or an alternative method?
EDIT:
Might not have been clear enough, very short version: I want to ensure no duplicate content when cycling through pictures. Preferably over an extended time, not only a session.
EDIT 2:
So this is what I'm currently thinking about doing. Looks good? I thr... | [
0.35843589901924133,
-0.019015127792954445,
0.2980259656906128,
-0.06525115668773651,
-0.0004941793158650398,
-0.3046436309814453,
0.40282899141311646,
-0.21988990902900696,
-0.5913572311401367,
-0.502723753452301,
-0.0068797338753938675,
0.3191295564174652,
-0.33565405011177063,
-0.435715... | |
to use, though a non-callable object can be supplied as an entry point as well (as correctly pointed out in the comments!).
The most popular kind of entry point is the `console_scripts` entry point, which points to a function that you want made available as a command-line tool to whoever installs your package. This go... | [
0.19228911399841309,
0.10449590533971786,
0.22467441856861115,
0.09340204298496246,
0.25883936882019043,
-0.25770336389541626,
-0.2901687026023865,
0.15280890464782715,
-0.2188016027212143,
-0.6471590995788574,
-0.3043897747993469,
0.7136745452880859,
-0.0653737336397171,
0.245370224118232... | |
from the command line, like:
```
$ cursive --help
usage: cursive ...
```
The way to do this is define a function, like maybe a `cursive_command` function in the file `cursive/tools/cmd.py` that looks like:
```
def cursive_command():
args = sys.argv[1:]
if len(args) < 1:
print "usage: ..."
```
and ... | [
0.2396218180656433,
0.028494538739323616,
0.2514055669307709,
-0.05181126669049263,
-0.0625021904706955,
-0.10942760109901428,
-0.07274831831455231,
0.14194630086421967,
-0.17736728489398956,
-0.46035870909690857,
-0.4588225781917572,
0.8341999650001526,
-0.17985829710960388,
-0.1331880390... | |
a half-dozen useful commands for converting Python documentation to other formats. | [
0.15067918598651886,
0.0636841282248497,
-0.42898836731910706,
0.2356441766023636,
-0.25613167881965637,
0.11682012677192688,
-0.05303025245666504,
0.03658100217580795,
-0.14647416770458221,
-0.18729396164417267,
-0.027326636016368866,
0.5835933089256287,
-0.040069978684186935,
-0.26613065... | |
I am trying to implement some sort of MVC in Java. Actually it's more of a MVP but this doesn't really matter to my problem.
Following situation:
I've got a GUI, made with Netbeans (because of the better GUIeditor) which is updated and changed frequently.
As my main project is easier to maintain in Eclipse I chose to... | [
0.0826881006360054,
0.07595222443342209,
0.3218265175819397,
-0.14738954603672028,
-0.3609282970428467,
-0.09976512938737869,
-0.057163722813129425,
-0.03431124612689018,
-0.35260576009750366,
-0.7522080540657043,
0.1586056351661682,
0.7048825025558472,
-0.6411841511726379,
0.0361422821879... | |
dependecy between the view and the controller. Whenever the view changes, the controller gets notified decides which data to get from the model and then makes the changes to the view.
When I add `App` to the build path of `GUI` and the other way round, I will end up with this error message "A cycle was detected in the... | [
0.5534723997116089,
-0.10874280333518982,
0.8402928113937378,
-0.3059892952442169,
0.24052761495113373,
0.10742208361625671,
0.18358398973941803,
-0.24710910022258759,
0.06332492083311081,
-0.6203619241714478,
0.002209178637713194,
1.176445722579956,
-0.3401109576225281,
-0.179545149207115... | |
view;
import controller.*;
class viewA{
...
public viewA() {
controllerA.register(this);
}
...
}
package controller;
import view.*;
class controllerA implements SomeListener{
...
protected viewA[] registeredViews;
public static register(viewA interestedView){
arrayPush(registeredVi... | [
0.20959854125976562,
-0.2893255352973938,
0.7502901554107666,
-0.13766907155513763,
-0.12567639350891113,
0.022927114740014076,
0.23813533782958984,
-0.37494850158691406,
-0.15745316445827484,
-0.544248640537262,
-0.13435739278793335,
0.8596137762069702,
-0.4482531249523163,
0.180054396390... | |
in `App`'s buildpath the import can't be resolved, same happens for not having `App` in `GUI`'s build path.
I'd like to keep this project structure and also stick to my MVC architecture. How can I work around it? What are your suggestions?
You have your listeners backwards from the usual way - normally, the controller... | [
0.2505263686180115,
0.17660704255104065,
0.42724281549453735,
0.0688239187002182,
-0.3314507007598877,
0.22821375727653503,
0.17741629481315613,
-0.33199208974838257,
-0.09917143732309341,
-0.565305769443512,
-0.027025097981095314,
0.918425977230072,
-0.29063987731933594,
-0.19136343896389... | |
controller classes. Cycle resolved. You can do this in your "reverse" setup too, of course. | [
0.10554295778274536,
-0.7350448966026306,
-0.01932630129158497,
0.46701157093048096,
0.0006092377589084208,
-0.12463828921318054,
-0.12269208580255508,
0.09883900731801987,
-0.3531838357448578,
-0.4498424530029297,
0.12723447382450104,
0.4550608992576599,
0.02382243238389492,
-0.2229838371... | |
I'm looking to write a small Scala library to get a feel for its Actor programming model.
In the example code I've come across, some libraries use inverted domain (e.g. org.foo.bar) for packages and some do not (maybe just for brevity).
Is it advisable for Scala libraries to use the same package naming conventions ... | [
0.5118793249130249,
-0.2343316376209259,
-0.06599041074514389,
0.04792839661240578,
-0.5146932005882263,
0.39039069414138794,
-0.0914791151881218,
-0.26685580611228943,
-0.3601721227169037,
-0.3249313235282898,
0.31585022807121277,
0.4493224322795868,
-0.38023850321769714,
-0.2837197184562... | |
one of the larger projects in Scala, uses the inverted domain name convention, which actually makes a lot of sense, as Scala and Java can interoperate, it stands to reason you'd want to keep things as painless as possible, and I really can't think of any worthwhile advantages of doing it any other way. | [
0.30667194724082947,
-0.1956009715795517,
-0.3887847065925598,
-0.07230229675769806,
-0.02193051390349865,
-0.2442028969526291,
0.14394114911556244,
0.2535579800605774,
-0.43868574500083923,
-0.49455180764198303,
0.2688072919845581,
0.23216702044010162,
-0.3249090611934662,
0.2830366492271... | |
What happens when you call `WaitForSingleObject()` on a handle you've created with `CreateFile()` or `_get_osfhandle()`?
For reasons not worth explaining I would like to use `WaitForSingleObject()` to wait on a HANDLE that I've created with `_get_osfhandle(fd)`, where `fd` comes from a regular call to `_open()`. Is th... | [
0.1668902188539505,
-0.27309438586235046,
0.3784383237361908,
-0.21411985158920288,
0.19980736076831818,
-0.37541669607162476,
0.2975394129753113,
0.1062869131565094,
-0.44053199887275696,
-0.4895806312561035,
-0.48347651958465576,
0.5098879337310791,
-0.47005563974380493,
0.18243499100208... | |
handles are "change notifications, console input, events, memory resource notifications, mutex, processes, semaphores, threads, and waitable timers."
Additionally, would it be different if I used `CreateFile()` instead of `_get_osfhandle()` on a CRT file descriptor?
Don't do it. As you can see, it has undefined behav... | [
0.12249305099248886,
-0.004029133357107639,
0.4745802879333496,
0.09510734677314758,
-0.24325303733348846,
0.05733039975166321,
-0.002526570111513138,
0.061245840042829514,
-0.4010451138019562,
-0.47228193283081055,
0.014666750095784664,
0.23538810014724731,
0.03655848279595375,
0.39697295... | |
the intent matters when you are doing something that isn't even supported well enough to not block indefinitely. | [
0.8529234528541565,
0.07793788611888885,
-0.05013003200292587,
0.07776559144258499,
-0.02698739804327488,
-0.1524583101272583,
0.5053389668464661,
-0.1496213972568512,
0.03634382784366608,
-0.3370663821697235,
0.08712849766016006,
0.3565603792667389,
-0.14486278593540192,
-0.12823256850242... | |
I have a web application using cookieless forms authentication. Every day my event log has a ton of 4005 error codes (Forms authentication failed for the request). I believe this is happening because users are bookmarking pages while they are logged in so when they revisit the forms ticket in the url has expired, atlea... | [
0.30979669094085693,
0.1081852912902832,
0.30505305528640747,
0.1663561314344406,
0.0535925030708313,
-0.47237470746040344,
0.5583611130714417,
0.03311558812856674,
-0.3374902307987213,
-0.6251989006996155,
0.29027581214904785,
0.390765905380249,
-0.18988585472106934,
0.17332886159420013,
... | |
defined in such a way as to be relatively not useful unless you don't like writing additional code. It is signaled when any asynchronous I/O operation on that handle completes, which does not generalize to tracking which I/O operation finished.
Why are you trying to wait on a file handle? Clearly the intent matters wh... | [
0.6618676781654358,
-0.3717481791973114,
0.4100150465965271,
0.016635935753583908,
0.18942980468273163,
-0.33437207341194153,
0.0893860012292862,
-0.024106819182634354,
-0.20089009404182434,
-0.21115411818027496,
-0.1148969978094101,
0.06456252932548523,
0.02989070676267147,
0.075009614229... | |
I was working on a JavaScript dialog with a transparent background overlay when I ran into a problem on large pages.
If the page was large, the transparent overlay would be a solid colour (i.e. no longer transparent). I did some testing and found this only happened in the overlay was greater than 4096 pixels high (hmm... | [
0.10783980041742325,
0.0019488211255520582,
0.5320850014686584,
0.052974261343479156,
-0.1357158124446869,
0.19298771023750305,
0.2451511025428772,
0.018598930910229683,
-0.155112162232399,
-0.6460304856300354,
0.06921767443418503,
0.4659564197063446,
-0.19082200527191162,
-0.0295526664704... | |
zoom: 1;
background-color:#000;
filter:alpha(opacity=10);
-moz-opacity:0.1;
opacity:0.1;
}
.overlayB {
position:absolute;
z-index:10;
width:100%;
height:4097px;
top:0px;
left:0px;
zoom: 1;
background-color:#000;
filter:alpha(opacity=10);
-moz-opacity:0.1;
op... | [
-0.2498808056116104,
-0.35882946848869324,
0.7506992220878601,
0.0020310785621404648,
-0.11805552244186401,
0.14975854754447937,
0.35962018370628357,
-0.5561308860778809,
-0.08652915805578232,
-0.36110249161720276,
-0.21030569076538086,
0.6467816829681396,
-0.3541860282421112,
-0.041484855... | |
id="overlayB" onclick="Element.hide(this)" class="overlayB" style="display:none"></div>
```
Since you have an opacity filter on the CSS I believe you are indirectly using DirectShow under the covers for alpha blending and image composition. DirectShow uses DirectX textures, which have a 4096x4096 pixel limit for DX9, ... | [
0.2354739010334015,
-0.060495465993881226,
0.2114873230457306,
0.039969541132450104,
-0.17791883647441864,
-0.20565888285636902,
0.20652435719966888,
-0.15746617317199707,
-0.07693582028150558,
-0.6908326148986816,
0.24718493223190308,
0.27870413661003113,
-0.5276069045066833,
0.1570142954... | |
I have a function that returns information in seconds, but I need to store that information in hours:minutes:seconds.
Is there an easy way to convert the seconds to this format in Python?
You can use [`datetime.timedelta`](https://docs.python.org/library/datetime.html#datetime.timedelta) function:
```
>>> import date... | [
0.39490556716918945,
-0.13870273530483246,
0.28729578852653503,
0.098127581179142,
0.022098751738667488,
0.20799756050109863,
0.14475873112678528,
-0.1309681385755539,
-0.11024566739797592,
-0.3909546732902527,
0.14710859954357147,
0.1335192322731018,
-0.14052771031856537,
0.15146727859973... | |
I recently moved from the JSecurity plugin to Spring Security. How do I get the authenticated user from within my controllers?
I'm using 0.5.1 and the following works for me:
```
class EventController {
def authenticateService
def list = {
def user = authenticateService.principal()
def username = user... | [
-0.0506654717028141,
-0.3936930000782013,
0.43269556760787964,
-0.05326976254582405,
0.15120483934879303,
-0.4420931339263916,
0.41685277223587036,
-0.11375775933265686,
-0.05597047135233879,
-0.3678985834121704,
-0.15627574920654297,
0.5952953100204468,
-0.09396260231733322,
0.14905537664... | |
As an assignment for a security class, I am trying to use `__asm__("jmp 0xbffff994");` in my code, but when I disassemble things in gdb, the instruction is changed to `jmp 0xc8047e2a`.
Any idea why and how can I jump to a particular address?
Probably because it's a jumping to a relative address, and the linker or loade... | [
0.018585775047540665,
-0.15066537261009216,
0.15383532643318176,
-0.008827798999845982,
0.015649642795324326,
-0.08510670065879822,
0.36227846145629883,
-0.24608607590198517,
-0.5468388795852661,
-0.2824266850948334,
-0.37333348393440247,
0.39416518807411194,
-0.4890459179878235,
-0.079024... | |
1. What are threads?
2. Why do you think I should care about them?
3. Where would you suggest I go to learn more (I'm working in Delphi, if that matters).
1. [Wikipedia: Thread (computing)](http://en.wikipedia.org/wiki/Thread_(computer_science))
2. [Wikipedia: Thread (computing) - Multithreading](http://en.wikipedia.or... | [
0.2997748553752899,
-0.11098439991474152,
0.23753158748149872,
0.10809895396232605,
-0.13567276298999786,
-0.28797075152397156,
0.0683179423213005,
-0.18874572217464447,
-0.41184526681900024,
-0.5103235244750977,
0.18734697997570038,
0.18520526587963104,
-0.2962976098060608,
-0.04225838184... | |
I need to use segregated free lists for a homework assignment and I was wondering if the STL or some other library had these already written so I don't have to reinvent the wheel?
I don't think STL has anything, but it looks like the Boost library might have it, <http://www.boost.org/doc/libs/1_38_0/libs/pool/doc/inter... | [
0.6826321482658386,
-0.031832896173000336,
-0.17074212431907654,
0.2233888804912567,
0.15045376121997833,
-0.08016308397054672,
-0.11938097327947617,
0.1477963775396347,
-0.5215721726417542,
-0.41846588253974915,
0.4014245271682739,
0.39850232005119324,
-0.10232279449701309,
-0.02918230369... | |
I have a diagram designer program and I want to add texts to shapes (these are path objects) when user right clicks to a shape and writes shape name in the property window. I add a context menu property to shapes and when user clicks to "properties" in the context menu, a new window opens that has a textbox and a butto... | [
0.32422202825546265,
0.1968860924243927,
0.33800825476646423,
-0.2179700881242752,
-0.14227047562599182,
0.3330768942832947,
0.1055183857679367,
-0.45034995675086975,
0.10176718980073929,
-1.2044568061828613,
0.23655761778354645,
0.40989649295806885,
-0.23161716759204865,
0.239495396614074... | |
window and clicks OK button, the textblock on the shape changes to the text that user entered.
Thanks.
You can bind one control to another using an ElementName binding:
```
<TextBlock Text="{Binding Text, ElementName=TextBoxInPropertiesWindow}" />
```
but that's probably not what you want in this case, because it s... | [
-0.11214415729045868,
-0.06298433244228363,
0.7152619957923889,
0.38730868697166443,
0.03919719532132149,
-0.20354321599006653,
0.0656820610165596,
-0.18424145877361298,
-0.13505570590496063,
-0.6713879704475403,
0.016596194356679916,
0.6302002668380737,
-0.28171414136886597,
0.18515825271... | |
will still remain after the text box is destroyed), and the text block will then update in response to the change in the model. | [
0.0607699416577816,
-0.27666157484054565,
0.6558879017829895,
0.22513729333877563,
0.30956774950027466,
0.11380836367607117,
0.5552684664726257,
-0.15345221757888794,
-0.15577740967273712,
-0.4026186466217041,
-0.5462744235992432,
0.30448272824287415,
-0.10458066314458847,
0.06605760008096... | |
I have a situation where I want to catch 404 errors fired by HTML pages (not just aspx pages) but I only have access to the web.config of the root folder of my website, and all sub directories (note, i don't have access to the actual IIS server and I cannot create applications or change settings)
So I did try the web.... | [
0.1548345983028412,
-0.040537089109420776,
0.12249486893415451,
0.26617538928985596,
0.10339120775461197,
-0.22919023036956787,
0.4088389575481415,
0.020360227674245834,
-0.34901148080825806,
-0.8117668628692627,
-0.06380380690097809,
0.5845871567726135,
0.0017731481930240989,
0.0121744060... | |
Is there an open source project or framework in .NET which provides the basic "plumbing" for messaging between client(s) and server over TCP? It seems like one of those things where I end up writing essentially the same thing over and over, and I'd like to abstract myself away from that a little bit more and deal with ... | [
0.4022506773471832,
0.037665266543626785,
0.005775223486125469,
0.22120797634124756,
-0.25626125931739807,
-0.14465606212615967,
0.02541068010032177,
0.3397080600261688,
-0.2927261292934418,
-0.4373917579650879,
0.42320942878723145,
0.37613046169281006,
-0.35455653071403503,
0.040905334055... | |
buffers, framing, security and serialisation at the least, in integration or hand-rolled code. It is typical of any UDP/TCP or config/attribute work in any language or environment.. And it will still need tweaking according to server or client needs, simple the nature of vast possibilities in I/O work.
Completely agre... | [
0.10907486826181412,
-0.0864507406949997,
0.2584736943244934,
0.16253793239593506,
-0.3983343243598938,
-0.2725502848625183,
0.01627861149609089,
-0.2919619381427765,
-0.2910163998603821,
-0.8132129907608032,
-0.19466660916805267,
0.33092260360717773,
-0.245511993765831,
0.199273481965065,... | |
powerful templates which makes it harder in .NET, ie. you have to design types in odd ways + it is imperative to use interface) than you've done well over say a man-year with some sophisticated plumbing a la message-queuing (it is isn't impossible but imho and retrospect never worth doing 'generically'..).
Alternative... | [
0.10901132971048355,
-0.020174451172351837,
0.2093319296836853,
0.3133946657180786,
-0.22035132348537445,
-0.32488465309143066,
0.28857964277267456,
-0.12231605499982834,
-0.21663030982017517,
-0.5390664339065552,
-0.08077139407396317,
0.6307202577590942,
-0.295057475566864,
-0.09308229386... | |
top, like all out things out there it isn't appropriate for everything. And it is a pretty remarkable design so I'd watch out for a potential time-wasting exercise..
On .NET I'd first adopt whatever 50-thread service MS is pushing 'today', and if not do the 'yet again similar code' and look for similar concepts to equ... | [
0.17724837362766266,
-0.17511703073978424,
0.2026427835226059,
0.2840985655784607,
0.07140025496482849,
-0.20473825931549072,
0.044971197843551636,
0.2437540739774704,
-0.3240489065647125,
-0.3608532249927521,
0.023867620155215263,
0.5564524531364441,
-0.030894292518496513,
0.1716379076242... | |
I've been racking my head trying to get Nhibernate to work with a byte
array as version mapping to an sql timestamp. I'd implemented an
IUserVersionType but Nhibernate was creating varbinary in the database
rather than timestamp. Inspired by a blog post by Ayende recently on
concurrency, I changed my mapping to specify... | [
-0.11291858553886414,
0.04609476774930954,
0.1355789601802826,
-0.26643580198287964,
-0.47677531838417053,
-0.1080397367477417,
0.09544439613819122,
-0.2759101390838623,
-0.25976189970970154,
-0.5366532802581787,
0.27256062626838684,
0.24574652314186096,
-0.588347315788269,
0.6814077496528... | |
name="Contact" table="Contacts" xmlns="urn:nhibernate-
mapping-2.2" optimistic-lock="version" dynamic-insert="true" dynamic-
update="true">
<id name="Id" type="Int32" column="Id">
<generator class="identity" />
</id>
<version name="Version" type="BinaryBlob" generated="always"
unsaved-value="null">
<... | [
-0.22468113899230957,
0.04463327303528786,
0.606688380241394,
-0.15751978754997253,
0.1410505473613739,
0.1090226098895073,
-0.20527170598506927,
-0.5489422082901001,
-0.12789274752140045,
-0.3714979887008667,
-0.30690452456474304,
0.6795102953910828,
-0.019307570531964302,
0.2469988316297... | |
not-null="true" length="50" />
</property>
<property name="Suffix" type="String">
<column name="Suffix" length="5" />
</property>
<property name="Email" type="String">
<column name="Email" length="50" />
</property>
<bag name="PhoneNumbers" inverse="true" cascade="all-delete-
orphan">
<... | [
0.22754806280136108,
-0.28794044256210327,
0.5717710852622986,
0.10055682808160782,
0.43624696135520935,
0.12776747345924377,
0.014728735201060772,
-0.47394025325775146,
-0.3644476532936096,
-0.3555506467819214,
-0.27041783928871155,
0.24689197540283203,
-0.32402315735816956,
0.23936247825... | |
<column name="LastModifiedBy" />
</property>
</class>
</hibernate-mapping>
<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="Core.Domain, Version=0.1.3397.31993, Culture=neutral,
PublicKeyToken=94dc7dc697cfcfc0" namespace="Core.Domain.Entities"
default-lazy="fals... | [
-0.35518157482147217,
0.03607844188809395,
0.7058776617050171,
-0.314799964427948,
0.0438038595020771,
0.1779128760099411,
-0.2279597818851471,
-0.35235151648521423,
-0.2461749017238617,
-0.494154155254364,
-0.3146040439605713,
0.504662811756134,
0.044447850435972214,
0.20438416302204132,
... | |
<column name="DateModified" />
</property>
<property name="LastModifiedBy" type="String">
<column name="LastModifiedBy" />
</property>
<joined-subclass name="Core.Domain.Entities.Individual,
Core.Domain, Version=0.1.3397.31993, Culture=neutral,
PublicKeyToken=94dc7dc697cfcfc0" table="Individuals">
... | [
-0.3766156733036041,
-0.0837273895740509,
0.46899983286857605,
0.07760322839021683,
-0.12043165415525436,
0.3984009325504303,
0.16092783212661743,
-0.5116919875144958,
-0.5427420735359192,
-0.29896894097328186,
-0.07378094643354416,
0.17156550288200378,
-0.15936201810836792,
0.285068273544... | |
/>
<many-to-one unique="true" cascade="save-update" fetch="join"
not-null="true" not-found="exception" name="Address"
column="AddressId" />
<many-to-one lazy="proxy" not-null="true" cascade="all" not-
found="exception" name="Client" column="ClientId" />
<property name="StoreName" type="String">
<c... | [
-0.24068839848041534,
-0.04853984713554382,
0.2429022490978241,
-0.0068493797443807125,
0.01816732808947563,
0.21773380041122437,
0.29576942324638367,
-0.47675618529319763,
-0.2726666331291199,
-0.5734580159187317,
-0.06368225812911987,
0.3823438882827759,
-0.28528210520744324,
0.005294312... | |
PostalCode, Country,
DateCreated, DateModified, LastModifiedBy) VALUES (@p0, @p1, @p2, @p3,
@p4, @p5); select SCOPE_IDENTITY(); @p0 = 'Order Address Line 1', @p1
= 'CV31 6BW', @p2 = 'United Kingdom', @p3 = '20/04/2009 19:45:32', @p4
= '20/04/2009 19:45:32', @p5 = ''
NHibernate: SELECT address_.Version as Version22_ FRO... | [
-0.20439545810222626,
-0.1944771260023117,
0.6393584609031677,
-0.2507476508617401,
0.08587326854467392,
0.6768717765808105,
0.14065518975257874,
0.03443169593811035,
-0.008648792281746864,
-0.4826410114765167,
-0.25971534848213196,
-0.13913530111312866,
-0.4069596230983734,
-0.14149278402... | |
= '', @p1 = '20/04/2009 19:45:34', @p2 =
'20/04/2009 19:45:34', @p3 = ''
NHibernate: INSERT INTO Individuals (ContactID, CustomerId) VALUES
(@p0, @p1); @p0 = '1', @p1 = '1'
NHibernate: SELECT individual_1_.Version as Version2_ FROM Individuals
individual_ inner join Customers individual_1_ on
individual_.CustomerId=ind... | [
-0.3342733681201935,
0.09419367462396622,
0.448095440864563,
-0.1884956955909729,
-0.06882281601428986,
0.40582412481307983,
0.36063000559806824,
-0.44853317737579346,
-0.19988764822483063,
-0.6575518846511841,
-0.1873658001422882,
0.43128690123558044,
-0.4655645787715912,
0.29505223035812... | |
DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery
(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)
in c:\CSharp\NH\nhibernate\src\NHibernate\AdoNet\Abst... | [
-0.6602431535720825,
0.22033505141735077,
0.36918553709983826,
-0.15595217049121857,
0.0037592428270727396,
0.20870259404182434,
0.3781626224517822,
-0.3013133108615875,
-0.1652313470840454,
-0.530913233757019,
-0.14653617143630981,
0.4271174371242523,
-0.32769182324409485,
0.3107866048812... | |
<id name="ID" column="ID" type="int">
<generator class="identity" />
</id>
<version name="Version" generated="always" unsaved-value="null" type="BinaryBlob"/>
...
``` | [
0.06358515471220016,
0.09718503057956696,
0.22546158730983734,
-0.11519020795822144,
0.32360967993736267,
-0.19527962803840637,
-0.02058475650846958,
-0.00410675723105669,
-0.26278597116470337,
-0.4124947488307953,
-0.24912633001804352,
0.5808733105659485,
-0.18515123426914215,
0.233535975... | |
I am currently using the directory walker from [Here](http://effbot.org/librarybook/os-path-walk-example-3.py)
```
import os
class DirectoryWalker:
# a forward iterator that traverses a directory tree
def __init__(self, directory):
self.stack = [directory]
self.files = []
self.index = 0
def __getitem__(s... | [
-0.2873460054397583,
0.08225780725479126,
0.47438672184944153,
-0.24234600365161896,
0.10740340501070023,
0.07849599421024323,
0.4675893783569336,
-0.5643439292907715,
-0.381608784198761,
-0.8240668177604675,
0.006640973966568708,
0.43042704463005066,
-0.10170477628707886,
0.08224362879991... | |
# pop next directory from stack
self.directory = self.stack.pop()
self.files = os.listdir(self.directory)
self.index = 0
else:
# got a filename
fullname = os.path.join(self.directory, file) | [
-0.07548020780086517,
-0.10780099779367447,
0.8591299057006836,
-0.0233785230666399,
0.12692992389202118,
-0.14024832844734192,
0.1338728666305542,
-0.07245280593633652,
-0.49480026960372925,
-0.5441012978553772,
-0.3749356269836426,
0.7192273736000061,
-0.07460679858922958,
0.125265285372... | |
if os.path.isdir(fullname) and not os.path.islink(fullname):
self.stack.append(fullname)
return fullname
for file in DirectoryWalker(os.path.abspath('.')):
print file
```
This minor change allows you to have the full path within the file.
Can anyone help me how to find just the filen... | [
-0.08009455353021622,
-0.3898291289806366,
0.8003449440002441,
-0.12628403306007385,
0.165885329246521,
-0.2116011679172516,
0.3531235158443451,
-0.13043621182441711,
-0.4344156086444855,
-1.073574185371399,
-0.15750624239444733,
0.8257801532745361,
-0.10948145389556885,
0.0130641600117087... | |
a word other than 'file', because it means something in the python language. Not a keyword, though so it still runs.
As an aside, when dealing with filenames, I find the os.path module to be incredibly useful - I'd recommend having a look through that, especially
```
os.path.normpath
```
Normalises paths (gets rid ... | [
0.3146812617778778,
-0.09522376954555511,
0.1922326534986496,
-0.017469124868512154,
0.06748092174530029,
-0.3147602677345276,
0.25190913677215576,
0.28224658966064453,
-0.38213321566581726,
-0.5952417850494385,
-0.21232286095619202,
0.42300552129745483,
-0.3892318606376648,
0.108045861124... | |
I have a html table serving as layout for a page (bad practice I know). This table goes something like this:
```
Label1 Value1
Label2 Value2
Label3 Value3
Label4 Value4a Value4b Value4c Value4d
```
I just added a validation error message that can be quite big to line one, so now it is:
```
Label1... | [
0.09721662104129791,
0.34587645530700684,
0.4947943091392517,
-0.24725580215454102,
-0.23713424801826477,
0.02779204584658146,
0.48502883315086365,
-0.3993500769138336,
-0.2685098946094513,
-0.6226478219032288,
0.24046829342842102,
0.09238062798976898,
-0.3207607865333557,
-0.0769249498844... | |
added a colspan to the cell that has the validation message, so that it spans the entire table. It works with error messages of length small enough to not overflow the table. Other than that I get:
```
Label1 Value1 Veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery long ErrorMessage
Label2 Value2
Label3 Value3
Label4 ... | [
-0.3007277846336365,
0.234205424785614,
0.5782877206802368,
-0.00586538715288043,
0.08150801807641983,
0.01469720434397459,
0.32362183928489685,
-0.19911685585975647,
-0.2325839251279831,
-0.27387735247612,
-0.006393801420927048,
0.11739930510520935,
-0.43583691120147705,
-0.01240577176213... | |
there a way to specify that the error message cell contents should overflow the table, instead of enlarging the space for other cells in the same columns? Maybe some magic CSS?
You should use: [isLast()](http://java.sun.com/javase/6/docs/api/java/sql/ResultSet.html#isLast()) instead.
Be warned, not all the JDCB driver... | [
0.08032404631376266,
0.01685204543173313,
0.21236492693424225,
-0.11312662065029144,
-0.22647559642791748,
-0.39577221870422363,
0.18323145806789398,
-0.18156634271144867,
-0.43193891644477844,
-0.22955690324306488,
0.0638749971985817,
0.6625607013702393,
-0.512317955493927,
-0.10655783116... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.