text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I don't mean "Basic SQL", but strongly the specs and the difference between the specs and the implementations between great databases (like SQL Server, Oracle, etc).
[](https://i.stack.imgur.com/yYGdf.jpg)
(source: [amazon.com](http://images-eu.amazon.com/images/P/0596004818.0... | [
0.4593730568885803,
0.2215695083141327,
0.2359723448753357,
-0.01245591975748539,
-0.15637855231761932,
-0.027391765266656876,
0.22945737838745117,
-0.09922415763139725,
0.17462322115898132,
-0.4926712214946747,
-0.09798142313957214,
0.13287955522537231,
-0.24212664365768433,
0.26439818739... | |
I'm curious as to how often experienced Haskell programmers really use type inference in practice. I often see it praised as an advantage over the always-explicit declarations needed in certain other languages, but for some reason (perhaps just because I'm new) it "feels" right to write a type signature just about all ... | [
0.15373390913009644,
0.1115177571773529,
-0.08812997490167618,
0.18401211500167847,
-0.3470303416252136,
-0.3329027593135834,
0.37339019775390625,
-0.03596273064613342,
-0.0567505843937397,
-0.4407232701778412,
0.03726670518517494,
0.6749717593193054,
-0.07759793847799301,
-0.4191860556602... | |
in places like `where` or `let` clauses where you actually define new symbols but don't feel the need to specify a type signature.
Stupid example with a strange way to calculate squares of numbers:
```
squares :: [Int]
squares = sums 0 odds
where
odds = filter odd [1..]
sums s (a:as) = s : sums (s+a) as
sq... | [
-0.049524445086717606,
0.07030453532934189,
0.13922016322612762,
0.3077731430530548,
-0.37909916043281555,
-0.2344268262386322,
0.12671427428722382,
-0.5319192409515381,
-0.1522950381040573,
-0.5033222436904907,
0.10072580724954605,
0.22118546068668365,
-0.24211910367012024,
-0.11206404864... | |
ensures that you really combine all those generic functions together in a valid way. If you, in the above example, say
```
squares :: [a]
squares = ...
```
The compiler can deduce that this isn't valid this way, because one of the used functions (the `odd` function from the standard library), needs `a` to be in the ... | [
0.3106212913990021,
-0.07955260574817657,
0.1742587685585022,
0.14463232457637787,
0.4887731969356537,
-0.5867024660110474,
0.165702223777771,
-0.45472684502601624,
-0.17846445739269257,
-0.5207736492156982,
-0.11248867958784103,
0.850515604019165,
-0.6347131133079529,
-0.36895951628685,
... | |
quite confusing, because it's not immediately clear where you've gone wrong and you might have to look through a long chain of error messages to find the real source of the problem. And in something like python you get the error at runtime at some unexpected point, because something didn't have the expected member func... | [
-0.10914263129234314,
0.06453342735767365,
-0.16503451764583588,
0.10840237885713577,
-0.267620712518692,
-0.2524941861629486,
0.481914222240448,
0.17999038100242615,
-0.22814114391803741,
-0.4169437289237976,
-0.3009037375450134,
0.46368613839149475,
-0.5896711349487305,
-0.03365228325128... | |
for all types that fulfill some constrains (aka type classes). This makes it easy to program in a generic way and use generic libraries, something much harder to get right in other languages. Even if you specify a generic type signature, there is still a lot of type inference going on in the compiler to find out what s... | [
0.2600271701812744,
-0.000643989653326571,
0.1335820108652115,
0.14887197315692902,
-0.28052201867103577,
-0.21052765846252441,
0.23864437639713287,
-0.23017767071723938,
-0.05438067764043808,
-0.4085945188999176,
-0.12468266487121582,
0.5274503827095032,
-0.6362009644508362,
0.02541043795... | |
I'm interested in finding out how to interface a .NET app (or even just about any app running on any platform, maybe even Java or PHP) with MYOB. There's a system already in place that uses MYOB but the business owner wants their different branch offices to be able to interact with each other. I would be really interes... | [
0.1608530580997467,
0.0916958749294281,
0.41308119893074036,
0.28323081135749817,
-0.04106173664331436,
0.10852820426225662,
-0.030349820852279663,
0.3093542158603668,
-0.2480797916650772,
-0.9027465581893921,
0.01803838089108467,
0.15027140080928802,
-0.26344627141952515,
-0.0316059552133... | |
extract all the data -- they attempt to lock you in. | [
0.40195590257644653,
0.24403917789459229,
-0.1944454163312912,
0.41236263513565063,
0.30419018864631653,
-0.23384979367256165,
0.23267385363578796,
-0.010148405097424984,
0.018294602632522583,
-0.18700583279132843,
-0.5051453709602356,
0.354635626077652,
-0.5072254538536072,
0.049954887479... | |
I have a rather large (80k loc) java desktop app that talks to a database. We're now looking at exposing some parts of the database via a web application, using the existing codebase and preferably not having to modify it.
I have good separation between the data access, business logic and presentation layers, but we h... | [
0.2834869921207428,
0.39223891496658325,
-0.061260972172021866,
0.16116708517074585,
0.13982081413269043,
0.027930952608585358,
0.13241063058376312,
0.014412046410143375,
-0.22465848922729492,
-0.7236649394035339,
0.061106812208890915,
0.5100607872009277,
0.0105248698964715,
0.051652949303... | |
it depends what you already have, and how well is the design of your current desktop application. You might not be able to use any or may be minimal of your existing code without modifying it, if its designed badly, and everything is tightly coupled.
Assuming that you are having a system with a good design, everything... | [
0.6451512575149536,
-0.002943872008472681,
0.26374170184135437,
0.39034560322761536,
0.1853863149881363,
-0.04024020954966545,
0.05814877524971962,
0.303924024105072,
-0.4625840485095978,
-0.783880352973938,
0.11514469981193542,
0.6051625609397888,
0.08902966976165771,
-0.2781275510787964,... | |
anything like **Seam** and **Spring** they are more of a container and sophisticated large frameworks, which give you almost everything, solution for almost all of your problems. As you mentioned that you already have a complete system, and you just need to make a web interface to publish it for the web, these are not ... | [
0.295080304145813,
0.03347715362906456,
-0.061079442501068115,
0.2337494045495987,
0.00028969222330488265,
-0.3710874915122986,
0.4386419355869293,
0.34923574328422546,
-0.35449936985969543,
-0.8053489923477173,
-0.07228682935237885,
0.20608660578727722,
-0.1379835456609726,
-0.13312494754... | |
I like to keep javascript debugging enabled in my browser so when I'm developing my own code I can instantly see when I've made an error.
Of course this means I see errors on apple.com, microsoft.com, stackoverflow.com, cnn.com, facebook.com. Its quite fun sometimes to see just how much awful code there is out there b... | [
0.7128778100013733,
0.6071420311927795,
-0.34073513746261597,
-0.06726307421922684,
-0.08467063307762146,
-0.04888236150145531,
0.6565330028533936,
0.7056465148925781,
-0.2726103663444519,
-0.8325469493865967,
0.35693538188934326,
0.5286175012588501,
-0.3205814063549042,
0.2028898298740387... | |
browser for everyday browsing.
I'm hopin theres some quick and easy plugin someone can direct me to where I can toggle it on and off based upon the domain i'm on.
**Edit:** I generally use IE7 for everyday browsing
Firebug lets you enable/disable debugging for different domains. | [
0.12783308327198029,
0.002208408433943987,
0.33177611231803894,
-0.0024796801153570414,
-0.3952569365501404,
-0.28952938318252563,
0.5196821093559265,
0.6445298790931702,
-0.35439467430114746,
-1.2848974466323853,
-0.1699962168931961,
0.5634432435035706,
-0.2135019153356552,
-0.12883031368... | |
I have a method which takes String argument. In some cases I want to pass int value to that method. For invoking that method I want to convert int into String. For that I am doing the following:
```
aMethod(""+100);
```
One more option is:
```
aMethod(String.valueOf(100));
```
Both are correct. I don't kn... | [
0.30685457587242126,
0.1634712517261505,
0.3700713515281677,
-0.2554447650909424,
-0.3046308755874634,
0.12220890820026398,
0.0136023610830307,
-0.5215199589729309,
-0.1614084541797638,
-0.9271208643913269,
0.013830864802002907,
0.8591001629829407,
-0.2554541826248169,
-0.09105551242828369... | |
to end up converted to javascript anyway, where there is no such thing as a StringBuilder.
Please don't hurt me Skeet Fanboys ;) | [
0.5133103728294373,
-0.18173496425151825,
0.2139742523431778,
0.37288862466812134,
-0.10103340446949005,
-0.1512812376022339,
0.33198368549346924,
0.24386119842529297,
0.21897265315055847,
-0.29518669843673706,
-0.06821498274803162,
0.5331627726554871,
-0.44524064660072327,
-0.117362327873... | |
I've been reading the book "Enterprise Rails" by Dan Chak and it got me thinking: Do you feel that you should have data constraints at both the database level and the application level? Or do you feel similarly to opinionated frameworks like Ruby on Rails - the database is just a "dumb repository" for data, and all che... | [
0.42008695006370544,
0.24058260023593903,
-0.5912147164344788,
0.20566417276859283,
-0.092123843729496,
-0.23538681864738464,
0.00822130125015974,
0.0667458176612854,
-0.23163823783397675,
-0.25862619280815125,
0.2523340880870819,
0.6463649272918701,
-0.20032446086406708,
-0.14919701218605... | |
make sure your database and application are well-secured. What I mean is that you should make use of not-null constraints, give your fields a length if known ( as opposed to leaving them all at *nvarchar(255)* ), have things such as **Foreign Keys**, **Check Constraints** and **Triggers** on your database, and then als... | [
0.20821863412857056,
0.21288730204105377,
0.11556455492973328,
0.11178881675004959,
0.14736364781856537,
-0.4643591046333313,
0.3728364109992981,
-0.34210091829299927,
-0.5309568047523499,
-0.44688841700553894,
-0.26345914602279663,
0.7316836714744568,
-0.30463090538978577,
-0.008120129816... | |
at the database level, and once at the application level -- Let's say you have a check constraint to verify that a product's SKU is entered (i.e. it's length is greater than zero).
You would now need to also include validation methods in your business logic to make sure the value the user entered has a length greater ... | [
0.11619259417057037,
0.12474128603935242,
-0.07567626982927322,
0.1129656657576561,
-0.12352540343999863,
-0.14685237407684326,
0.3556113541126251,
-0.09527012705802917,
-0.25419577956199646,
-0.18909956514835358,
0.12976184487342834,
0.6595760583877563,
-0.2495954930782318,
0.193169370293... | |
mindset, since if you think about it your data is the single most important part of your application; after all, what good is your shiny new Web 2.0 application if the data can easily be corrupted and compromised?
What are your thoughts on this? Should the database be an impenetrable fortress like Fort Knox, or an ope... | [
0.32948756217956543,
0.14557790756225586,
0.022882960736751556,
0.4524536430835724,
0.016074929386377335,
-0.19373230636119843,
0.3511233627796173,
-0.13450074195861816,
-0.3487330973148346,
-0.5029563903808594,
-0.08322558552026749,
0.7000365853309631,
-0.2980237603187561,
-0.014829571358... | |
ex. to have a constraint set on a particular data column there is only one place to set it : the column itself. The data might come from various sources but the check is put where the data is finally put to rest.
2. **Integrity.** Database should be responsible for the data it hosts. An inconsistent database is as good... | [
0.2823898196220398,
0.06664080917835236,
0.2569117248058319,
0.23629970848560333,
-0.2401309311389923,
-0.28684529662132263,
0.009176643565297127,
-0.26759475469589233,
-0.18897013366222382,
-0.8367994427680969,
-0.32494258880615234,
0.5561987161636353,
-0.36431923508644104,
-0.11740581691... | |
I'm trying to learn Scheme from the book "The Little Schemer" using DrScheme on a Macintosh. It starts with things like "What is the car of l where l is the argument (a b c)?"
I understand that the answer to this question is a, but I'm not able to actually figure out what to type into Dr Scheme to "follow along". A si... | [
0.18890635669231415,
0.13254214823246002,
0.21347323060035706,
-0.13205169141292572,
-0.18355517089366913,
0.2795301377773285,
-0.2066068947315216,
-0.07449763268232346,
0.2577238380908966,
-0.24647986888885498,
0.2024206817150116,
0.6890430450439453,
-0.13178987801074982,
0.05110182985663... | |
something:
```
(define <name> <value>)
```
So to define l:
```
(define l '(a b c))
```
This defines `l` as the list `(a b c)`. The single quote mark quotes whatever is after it, whether it's a symbol or a list, which means it's not evaluated but read as-is. You *don't*, however, quote the name that you're setting... | [
0.4237710237503052,
0.08539523929357529,
0.3496611416339874,
-0.35571837425231934,
-0.20114652812480927,
-0.13052208721637726,
-0.12053419649600983,
-0.03328946977853775,
-0.03290248662233353,
-0.42315244674682617,
-0.38189029693603516,
0.10859759896993637,
-0.24440200626850128,
0.24932228... | |
The default the profile file is from the executable is run and the file is called `gmon.out`. Is there any way to specify a new location?
I'm using gcc 3.4.6 on i386/linux2.6
Too badly, the environment variable `GMON_OUT_PREFIX` is not documented in the glibc. I got the following information from the web and tested on... | [
-0.03781241551041603,
0.14417539536952972,
0.4315221309661865,
-0.3354765772819519,
0.21632692217826843,
0.12437137961387634,
-0.2746594548225403,
0.2299453169107437,
-0.34407368302345276,
-0.7311614751815796,
-0.12791228294372559,
0.248366579413414,
-0.43350285291671753,
0.233747795224189... | |
I am using PostgreSQL in a project I am working on, and one of the queries is timing out. I need to increase the timeout on the database connection, but since I am using my DAO through a complex wrapper to Active Record and NHibernate, I am not able to adjust the timeout of the command object - so I am hoping you can c... | [
0.03301803022623062,
0.06920751184225082,
0.3897377550601959,
0.06027399003505707,
-0.12512803077697754,
-0.057018302381038666,
0.22086402773857117,
0.22057655453681946,
-0.13721345365047455,
-1.0099939107894897,
0.0607924610376358,
0.2080819457769394,
-0.1790844351053238,
0.55117237567901... | |
templates for pretty much any database on earth for pretty much any way you need to use it:
<http://www.connectionstrings.com> | [
0.697165846824646,
-0.04568175598978996,
-0.1300206482410431,
0.43767890334129333,
0.2572646141052246,
-0.008945057168602943,
0.06781350821256638,
0.08677329123020172,
-0.5513797998428345,
-0.885649561882019,
0.04785406216979027,
0.10086904466152191,
-0.4285207986831665,
0.1994538456201553... | |
I have a horizontal css menu with 5 items.
e.g
1) Home
2) Users
3) Category
4) Products
5) Contact
When "home" is selected the background color (via css) of the entire menu div (id="topmenu") is blue.
I want the background color of the div to change to say green when "users" is selected and say purple when "category... | [
0.2889206111431122,
-0.05042489618062973,
0.42398205399513245,
-0.052059605717659,
0.044220224022865295,
0.28541436791419983,
0.1597333550453186,
0.06307465583086014,
-0.24221846461296082,
-0.9446679949760437,
-0.17430728673934937,
0.3369222581386566,
0.01735849864780903,
0.102195933461189... | |
I'll polish it up. | [
0.5237298607826233,
0.6336233019828796,
-0.0373210683465004,
-0.08224035054445267,
0.11258741468191147,
0.017089610919356346,
0.011723937466740608,
0.3596014678478241,
0.13526248931884766,
-0.23876972496509552,
0.22531771659851074,
0.4046882092952728,
0.45534566044807434,
-0.09713696688413... | |
I am using PHP, jQuery, and JSON. Now I need to know how to parse the jQuery data in JavaScript.
### load.php
```
<?php
...
$json =json_encode($array);
?>
```
It returns jQuery by the following data.
```
[{"name":"STA","distance":"250","code":25},
{"name":"GIS","distance":"500","code":45}]
```
### jQ... | [
0.049211468547582626,
0.34172797203063965,
0.6772289872169495,
-0.14585112035274506,
-0.19108951091766357,
0.2173933982849121,
0.28850430250167847,
-0.2024134248495102,
-0.17321838438510895,
-0.7276414036750793,
-0.08173399418592453,
0.27631333470344543,
-0.1192094087600708,
0.175179928541... | |
"alert(myjson.name)". It returns undefined.
}
```
What changes should I make to my logic?
You have an array of JSON objects, so you need to loop through the array to get each individual object:
```
for(var x = 0; x < myjson.length; x++) {
alert(myjson[x].name);
// myjson[x].distance, myjson[x].code also avai... | [
0.17022018134593964,
-0.1900816410779953,
0.39851564168930054,
-0.236996591091156,
-0.1296270340681076,
-0.07420320808887482,
0.3697323799133301,
-0.2852633595466614,
-0.3638521730899811,
-0.42293739318847656,
-0.3204723000526428,
0.6443470120429993,
-0.4413635730743408,
-0.087547056376934... | |
named `a`. | [
-0.07128561288118362,
0.18509717285633087,
0.10332459956407547,
-0.09231474250555038,
-0.38359999656677246,
0.11120463162660599,
0.3125004172325134,
0.0748274028301239,
-0.15306174755096436,
-0.05163388326764107,
-0.1488548368215561,
-0.09969797730445862,
-0.29824984073638916,
0.4521170556... | |
The SQL Server (2000/2005) function gets the table name and the field name as parameters and returns results from a dynamic query within the function. The results should be assigned to a `Table` variable which will be used further in a stored procedure. How to achieve this?
I am getting error: "Only functions and exte... | [
-0.3264065682888031,
0.004887542221695185,
0.667167603969574,
-0.1518573760986328,
-0.15237082540988922,
0.12163940072059631,
0.058824572712183,
-0.38528770208358765,
-0.057142533361911774,
-0.3337031304836273,
0.1111140325665474,
0.44946643710136414,
-0.2548626959323883,
0.053319387137889... | |
) as
begin
Declare @SQL varchar(250)
Set @SQL = 'Select '+@FieldName+ ' from '+ @TableName
Exec sp_executesql @SQL
return
end
```
I'm not sure how this works with functions, but if you have a Stored Procedure that returns a resultset, you can insert that into a table variable using... | [
0.2009517252445221,
0.12142676115036011,
0.46530652046203613,
-0.006457200739532709,
-0.04461267590522766,
-0.1101064383983612,
0.09074457734823227,
-0.5991994142532349,
-0.0005468375165946782,
-0.3203795254230499,
-0.1853768527507782,
0.6746566295623779,
-0.3749905228614807,
-0.2124285846... | |
you can pass data between stored procedures. See this page on [INSERT EXEC Statements](http://www.sommarskog.se/share_data.html#INSERTEXEC) for some extra information. | [
0.6397806406021118,
-0.08527298271656036,
0.05181412771344185,
0.3602692186832428,
0.17286799848079681,
-0.2857760190963745,
0.05833091959357262,
-0.02336077019572258,
-0.3038230538368225,
-0.2173323780298233,
-0.21346120536327362,
0.22115741670131683,
0.07436984032392502,
-0.2248793691396... | |
I have an application written in VB.NET that interacts with Excel via interop.
I eventually ran into the known issue of Cell-edit mode (see [MSDN](http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=4087801&SiteID=1) and [stackoverflow](https://stackoverflow.com/questions/221984/how-to-tell-if-excel-application-is-i... | [
0.0908951610326767,
0.32839691638946533,
0.4042348563671112,
-0.33286401629447937,
0.10232409089803696,
-0.048196468502283096,
0.1762019693851471,
-0.21236445009708405,
0.03636407107114792,
-0.719722330570221,
-0.1828821897506714,
0.3812275528907776,
-0.4774113893508911,
0.1221577525138855... | |
// Get the "New" menu item.
CommandBarControl oNewMenu = Application.CommandBars["Worksheet Menu Bar"].FindControl(MENU_ITEM_TYPE, NEW_MENU, m, m, true );
if ( oNewMenu != null )
{
// Check if "New" menu item is enabled or not.
if ( !oNewMenu.Enabled )
{
return true;
}
}
return f... | [
-0.01946823112666607,
-0.17639298737049103,
0.5651556253433228,
-0.42218032479286194,
0.09072089195251465,
0.10930364578962326,
0.5090625882148743,
-0.5646833181381226,
-0.29046308994293213,
-0.6797698140144348,
-0.3164004683494568,
0.770383894443512,
-0.4132939875125885,
0.283499598503112... | |
Type.Missing
Const MENU_ITEM_TYPE As Integer = 1
Const NEW_MENU As Integer = 18
Dim oNewMenu As Office.CommandBarControl
' oExcel is the Excel Application object
' the error is related to the below line
oNewMenu = oExcel.CommandBars("Worksheet Menu Bar").FindControl(MENU_ITEM_TYPE, NEW_MENU,... | [
-0.18259719014167786,
-0.022350389510393143,
0.5139606595039368,
-0.33234289288520813,
0.194268137216568,
0.09099229425191879,
0.4526061713695526,
-0.17988242208957672,
-0.18432994186878204,
-0.4893430173397064,
-0.4055090844631195,
0.6826611161231995,
-0.3779091238975525,
0.14592792093753... | |
End If
End If
End Function
```
I have added a (COM) reference to the Microsoft Office Object Library
```
Imports Office = Microsoft.Office.Core
Imports Microsoft.Office.Interop
```
I am kind of stuck. I already have tried indirectly referencing the CommandBar object, and re-adding refrences but can not figure ... | [
-0.18975767493247986,
-0.06242804974317551,
0.3707415759563446,
-0.0662531852722168,
0.11452705413103104,
-0.12210522592067719,
0.2467774897813797,
-0.15935908257961273,
0.07112996280193329,
-0.4217042624950409,
-0.3542352318763733,
0.36983129382133484,
-0.4686287045478821,
0.3587948977947... | |
Either returns "Reference is not valid."
' or "Exception from HRESULT: 0x800A03EC"
If ex.Message.StartsWith("Exception") then isEditMode = True
End Try
End Function
```
The .GoTo function (and corresponding menu item) is not available when Excel is in Cell-edit mode.
Giving the .GoTo function... | [
-0.1487763524055481,
0.1289796680212021,
0.2900460660457611,
0.00643920199945569,
0.17710795998573303,
-0.3428690433502197,
0.32510364055633545,
-0.1765907108783722,
-0.004550078418105841,
-0.4276520609855652,
-0.323518306016922,
0.22846293449401855,
-0.4064660370349884,
0.1333738863468170... | |
Given an object like:
```
class M(models.Model):
test = models.BooleanField()
created_date = models.DateTimeField(auto_now_add=True)
```
Given sample data (assume monotonically increasing automatic created\_date):
```
M(test=False).save()
M(test=True).save()
M(test=False).save()
X = M(test=True).save()
M(te... | [
-0.01228202972561121,
-0.24123111367225647,
0.1912541389465332,
-0.1126730889081955,
0.01081448420882225,
0.16065199673175812,
0.20016644895076752,
-0.32257843017578125,
-0.15032872557640076,
-0.44637542963027954,
-0.31019940972328186,
0.23605374991893768,
-0.4649714529514313,
0.2257155925... | |
should work. | [
0.4423811733722687,
0.28250959515571594,
0.08464035391807556,
0.07854199409484863,
0.15948964655399323,
0.0029975443612784147,
0.36708736419677734,
0.06742855906486511,
0.19691230356693268,
-0.1636662781238556,
0.07848887890577316,
0.31474974751472473,
0.07245074212551117,
-0.0091812023892... | |
I am currently creating an e-commerce site using C# ASP.NET MVC and have just come across a problem. On pages such as product pages and search results pages, I have to pass Lists of data from my controller to the ViewPage and that works just fine. However, a null reference exception occurs if the Viewdata equals null. ... | [
0.13734690845012665,
-0.030636658892035484,
0.6051636934280396,
-0.2218058854341507,
-0.01624930463731289,
0.09604892879724503,
0.14949341118335724,
-0.20449770987033844,
-0.4147675037384033,
-0.7397246360778809,
-0.23250581324100494,
0.3095647394657135,
-0.4797419607639313,
0.381136029958... | |
product.Title%>" src="<%= product.Thumbnail %>" />
<a href="/<%=product.Category %>/<%= product.SubCategory %>/<%= product.ASIN %>/1">
<%=product.Title%></a>
</li>
}%>
</ul>
```
The Null Reference Exception occurs when the following piece of code is reached:
```
<ul> foreach (E_Store.Models.Product produ... | [
0.13625042140483856,
0.213053897023201,
0.4605310559272766,
-0.13899491727352142,
0.16925765573978424,
-0.13286566734313965,
0.22261327505111694,
-0.1398346871137619,
-0.06477854400873184,
-0.5065779685974121,
-0.47004270553588867,
0.4085242450237274,
-0.22781555354595184,
0.58391660451889... | |
empty list rather than null, this way your foreach statement just won't have any data to loop through but you won't get a null exception.
In the case that you're not dealing with a list and the item is null, we use
```
Html.Encode(ViewData.Eval("Field"))
```
To get the item's HTML value, it will return "" if the i... | [
0.12514230608940125,
-0.2600240707397461,
0.3124620020389557,
0.0032340940088033676,
-0.32512152194976807,
-0.11343035101890564,
0.30647221207618713,
-0.02620094269514084,
-0.370592325925827,
-0.6397367715835571,
-0.39603400230407715,
0.3481462299823761,
-0.47555962204933167,
-0.0658528953... | |
Related to [this question](https://stackoverflow.com/questions/459554/how-do-i-tell-if-one-instance-of-my-program-is-running), what is the best practice for naming a mutex? I realize this may vary with OS and even with version (esp for Windows), so please specify platform in answering. My interest is in Win XP and Vist... | [
0.16783802211284637,
0.1651524007320404,
0.154422789812088,
-0.03808107227087021,
-0.1873486340045929,
-0.06297938525676727,
0.2559729218482971,
-0.013669194653630257,
-0.2940727174282074,
-0.5820547342300415,
0.07732003927230835,
0.5948704481124878,
-0.2697201371192932,
0.4205306768417358... | |
not used. A pattern that does emerge though is that the word "mutex" is used quite a lot and Microsoft seem to like using capitols. | [
0.4600868225097656,
0.16742858290672302,
0.0935610681772232,
0.2956811189651489,
-0.20945072174072266,
0.32367491722106934,
0.05733745917677879,
0.2504712641239166,
-0.779410719871521,
-0.36674803495407104,
0.5166356563568115,
0.20077571272850037,
-0.25266873836517334,
0.4209294021129608,
... | |
I have two lists of objects. Each list is already sorted by a property of the object that is of the datetime type. I would like to combine the two lists into one sorted list. Is the best way just to do a sort or is there a smarter way to do this in Python?
People seem to be over complicating this.. Just combine the two... | [
0.1679200679063797,
-0.08406012505292892,
0.26820823550224304,
-0.35103023052215576,
0.036460354924201965,
0.2912030816078186,
-0.012499518692493439,
-0.22957350313663483,
-0.4280562996864319,
-0.8735190033912659,
0.002986402017995715,
0.21098999679088593,
-0.3912849426269531,
-0.170299470... | |
+ l2)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
```
..easy! Plus, it's using only two built-in functions, so assuming the lists are of a reasonable size, it should be quicker than implementing the sorting/merging in a loop. More importantly, the above is much less code, and very readable.
If your lists are large (over a few hu... | [
0.20298461616039276,
-0.21351033449172974,
0.4580191671848297,
-0.3631610870361328,
0.0025670460890978575,
0.19205941259860992,
0.06569863855838776,
-0.3303369879722595,
-0.273521363735199,
-0.5777991414070129,
-0.026904044672846794,
0.24364490807056427,
-0.27363860607147217,
-0.0777596160... | |
against [ghoseb's](https://stackoverflow.com/questions/464342/combining-two-sorted-lists-in-python#464454) solution, and `sorted(l1+l2)` is substantially quicker:
`merge_sorted_lists` took..
```
[9.7439379692077637, 9.8844599723815918, 9.552299976348877]
```
`sorted(l1+l2)` took..
```
[2.860386848449707, 2.7589840... | [
-0.3933975398540497,
0.0018648123368620872,
0.14478620886802673,
-0.17057479918003082,
-0.3214396834373474,
0.12270678579807281,
0.3417509198188782,
-0.5673004388809204,
-0.4388377070426941,
-0.5645260810852051,
-0.1530735343694687,
0.4285213351249695,
-0.4905969500541687,
-0.1361588537693... | |
This isn't strictly a programming question, but hopefully someone here has the knowledge to help me.
Running Vista x64, the "Open File With" dialog takes forever to appear when trying to open a file with unknown type.
To be specific, the prompt giving the choice between "Use the web service to find the correct progra... | [
0.185544952750206,
0.1762235462665558,
0.5980799794197083,
-0.3789856731891632,
0.0850759968161583,
-0.3995066285133362,
0.4923252761363983,
-0.04844957962632179,
-0.2825671136379242,
-0.7944898009300232,
-0.595150351524353,
0.8037312626838684,
-0.3046707212924957,
0.31988945603370667,
0... | |
line.
I'm guessing that this is not common behaviour, because I find it incredibly annoying, and I couldn't find any mention of it anywhere.
So..does anyone have any ideas what it might be? Or what I could do to try and find out?
VonC could be correct.
Read this article:
<http://blogs.technet.com/markrussinovich/a... | [
0.38010549545288086,
-0.3804238736629486,
0.5684740543365479,
-0.08986297249794006,
-0.1395205855369568,
-0.056127142161130905,
0.30992376804351807,
0.10626634210348129,
-0.5605667233467102,
-0.1904156357049942,
-0.24385030567646027,
0.4918164908885956,
-0.28176677227020264,
0.187821581959... | |
I'm summing two negative floats:
```
char * lhs = "-2234.6016114467412141";
char * rhs = "-4939600281397002.2812";
```
According to Perl, using bignum and Math::BigFloat, the answer is
```
-4939600281399236.8828114467412141
```
However, according to GMP, using the code below, the answer is
```
-4939600281399236.... | [
-0.10244914889335632,
0.19643834233283997,
0.5852987766265869,
-0.12649592757225037,
-0.03652204945683479,
0.11900914460420609,
0.39862769842147827,
-0.2743385136127472,
-0.23100844025611877,
-0.365477979183197,
-0.16636720299720764,
0.39076223969459534,
-0.2540694773197174,
0.395844697952... | |
char * rhs = "-4939600281397002.2812";
int validOp = mpf_set_str( f_lhs, lhs, 10 );
validOp = mpf_set_str( f_rhs, rhs, 10 );
mpf_add( f_res, f_lhs, f_rhs );
resbuff = mpf_get_str( NULL, &exp, 10, 0, f_res );
printf( "Using mpf_add, %s + %s = %s (exp=%d)\n", lhs, rhs, resbuff, exp );
free(res... | [
-0.1481827199459076,
0.16349197924137115,
0.3309841454029083,
-0.26663142442703247,
0.1323847472667694,
0.4765760600566864,
0.6955404877662659,
-0.6503329277038574,
-0.3497014045715332,
-0.4039749801158905,
-0.41470867395401,
0.45177391171455383,
-0.3439575433731079,
-0.05079901963472366,
... | |
overflowing the mantissa at 64 bits. Try doing `mpf_get_prec(f_res)` to check it is the precision you want. If not call the `mpf_set_default_prec()` before you initialize any mpf vars (line 1 of main). | [
-0.04165938124060631,
-0.26812243461608887,
0.7852919697761536,
-0.318492591381073,
0.08921332657337189,
0.2391117513179779,
0.4582676589488983,
-0.4063276946544647,
-0.25555872917175293,
-0.4799397587776184,
-0.25806573033332825,
0.7522964477539062,
-0.21201194822788239,
-0.20891049504280... | |
We have multiple vb projects.We want to put error handlers in all functions, and error handler should write to a file.Are there any tools available - we have looked at codesmart and vbwatch.
Here's a freeware program:
<http://wareseeker.com/Software-Development/automatic-error-handling-pro-1.1.0.zip/238557>
and her... | [
0.7858886122703552,
-0.2582066059112549,
0.05114593729376793,
-0.16114507615566254,
-0.10882628709077835,
0.04624316468834877,
0.2864282429218292,
-0.2852284014225006,
-0.2168344259262085,
-0.14375770092010498,
0.10284928232431412,
0.415969580411911,
-0.16069357097148895,
-0.12907873094081... | |
I inherited MYSQL database that has lots of tables with data like
```
CREATE TABLE IF NOT EXISTS `ejl_registration` (
`id` int(11) NOT NULL auto_increment,
`team_id` int(11) default NULL,
`start_date` date default NULL,
`end_date` date default NULL,
PRIMARY KEY (`id`),
) ENGINE=InnoDB DEFAULT CHARSET=lati... | [
-0.22265253961086273,
0.06192291900515556,
0.6075043678283691,
0.03936711698770523,
0.009279264137148857,
-0.018581673502922058,
0.15161089599132538,
-0.053790830075740814,
-0.058709677308797836,
-0.4272378087043762,
-0.0679037943482399,
0.3670162856578827,
0.1308879554271698,
0.3212629258... | |
of start\_date
Try this (please double check, I have not tested the command):
```
UPDATE `ejl_registration` SET `end_date`= CONCAT(YEAR(`start_date`),'-12-31')
WHERE `end_date` IS NULL OR `end_date` = '0000-00-00';
``` | [
-0.07685133069753647,
0.05846148356795311,
0.6401021480560303,
-0.29717305302619934,
0.4840101897716522,
-0.22569720447063446,
0.14642435312271118,
0.1937793642282486,
-0.17515471577644348,
-0.5720704197883606,
-0.3266955018043518,
0.1807413399219513,
-0.07721690088510513,
0.50368958711624... | |
I need to develop an IFilter for Microsoft Search Server 2008 that performs prolonged computations to extract text. Extracting text from one file can take from 5 seconds to 12 hours. How can I desing such an IFilter so that the daemon doesn't reset it on timeout and also other IFilters can be reset on timeout if they h... | [
-0.061193425208330154,
-0.13610181212425232,
0.28644615411758423,
0.21420918405056,
-0.06310329586267471,
-0.19397269189357758,
0.6142794489860535,
-0.18983568251132965,
-0.11866752058267593,
-0.46913015842437744,
0.17786729335784912,
0.6839292645454407,
0.04233679920434952,
-0.13325156271... | |
create html summaries of the documents and instruct the crawler to index those. If the summary page could easily link to the document itself if necessary. | [
0.2609081566333771,
0.03825846686959267,
0.30261459946632385,
0.14771410822868347,
-0.3399849534034729,
-0.3014688789844513,
0.1981687992811203,
0.0400347001850605,
-0.059537678956985474,
-0.7346115112304688,
-0.524696946144104,
0.1292288452386856,
-0.2813575863838196,
-0.13742603361606598... | |
I am creating a .NET application (C#) that needs to use a lot of RAM. I recently knew that on 32-bit versions of Windows XP I can only use 2 GB, unless I use the `/3Gb` switch, and set the `IMAGE_FILE_LARGE_ADDRESS_AWARE` flag in the executable header. But since I'm developing a .NET application, I guess I cannot modif... | [
0.5406083464622498,
0.3052758276462555,
0.2622062563896179,
-0.2470829039812088,
-0.008684423752129078,
-0.04148469120264053,
0.07445075362920761,
-0.10447046160697937,
-0.19471585750579834,
-0.8171788454055786,
-0.008929785341024399,
0.6237349510192871,
-0.28263500332832336,
0.09846667200... | |
won't work if you are using something like ClickOnce (since that maintains a cryptographic hash of the files).
However, note that you'll still have the same .NET limits in terms of the maximum size of a single object/array. For huge amounts of memory, x64 is a better idea. | [
0.15404464304447174,
-0.17621520161628723,
0.1915433704853058,
0.2112921178340912,
0.019534336403012276,
-0.3460152745246887,
0.24614164233207703,
0.04967151954770088,
-0.5343121290206909,
-0.5788903832435608,
-0.02728743851184845,
0.4451844394207001,
-0.18472544848918915,
0.14247946441173... | |
Some background:
in order to provide authentication I'm using certificates on client and server side (WCF) and use one certificate for all clients (manually loading it from application directory - not the safest way, but it doesn't require to manage certificate storage and making installation more difficult):
```
... | [
0.11473727971315384,
0.32017776370048523,
0.5410416722297668,
-0.10490910708904266,
0.11855359375476837,
0.02288518100976944,
0.42383646965026855,
-0.22218772768974304,
-0.27512678503990173,
-0.6853256821632385,
-0.09667028486728668,
0.3450598418712616,
-0.12898437678813934,
0.360025167465... | |
X509ServiceCertificateAuthentication auth = _factory.Credentials.ServiceCertificate.Authentication;
auth.CertificateValidationMode =X509CertificateValidationMode.Custom;
auth.CustomCertificateValidator = new CustomCertificateValidator(new[] {GetServiceCertificate(name)});
```
This is client side, and... | [
-0.07610910385847092,
0.010687748901546001,
0.6929128170013428,
-0.14821301400661469,
0.03385942056775093,
0.21890372037887573,
0.5870250463485718,
-0.17892980575561523,
-0.3033533990383148,
-0.6994144916534424,
-0.23048774898052216,
0.4724677801132202,
0.050293706357479095,
0.466602683067... | |
host.Credentials.ClientCertificate.Authentication;
authentication.CertificateValidationMode =
X509CertificateValidationMode.Custom;
authentication.CustomCertificateValidator =
new CustomCertificateValidator(new [] {ClientCertificate});
}
```
That works fine and allows to ... | [
-0.19310860335826874,
0.04668473079800606,
0.7473182082176208,
-0.06486991047859192,
-0.055269476026296616,
-0.11966614425182343,
0.5030786991119385,
-0.027758406475186348,
-0.4896492660045624,
-0.915601372718811,
0.037886492908000946,
0.5755119323730469,
-0.06639265269041061,
0.5863162875... | |
<message clientCredentialType="Certificate" />
</security>
```
But i need
```
string name = OperationContext.Current.ServiceSecurityContext.WindowsIdentity.Name;
```
somehow to obtain WindowsIdentity in ServiceSecurityContext.
Mixed (Transport and Message) security mode is not helpful, because I don't know w... | [
0.0058377087116241455,
0.12639695405960083,
0.6331249475479126,
-0.05954136326909065,
0.007487517315894365,
-0.11642580479383469,
0.31446367502212524,
-0.14347046613693237,
-0.3206068277359009,
-0.7744007110595703,
-0.3988426923751831,
0.28312891721725464,
-0.23350368440151215,
0.211270868... | |
user requested service operation.
Try this link re: Impersonation:
<http://msdn.microsoft.com/en-us/library/ms730088.aspx>
section on - "Mapping a Client Certificate to a Windows Account", seems like what you're after.
with config on client:
```
authentication mapClientCertificateToWindowsAccount="true"
```
Clie... | [
-0.03266280144453049,
0.0976400226354599,
0.8998406529426575,
-0.2334519624710083,
0.08868733793497086,
-0.04003894329071045,
0.46129342913627625,
-0.36871573328971863,
-0.0012451770016923547,
-0.8066082000732422,
-0.3607266843318939,
0.5315049886703491,
-0.16392812132835388,
0.20275105535... | |
I am trying to write a Firefox 3 add-on which will enable me to easily re-tag bookmarks. For example I have some bookmarks tagged "development" and some tagged "Development" and I would like a way to easily update all the "delelopment" tags to "Development". Unfortunately I can not find an add-on to do this so I though... | [
0.5997185707092285,
0.5169869065284729,
0.17579135298728943,
0.0867827832698822,
0.4370289444923401,
-0.2079526036977768,
-0.042855121195316315,
-0.14479310810565948,
-0.07879995554685593,
-0.7348537445068359,
0.1786840707063675,
0.5289259552955627,
-0.46327924728393555,
-0.002468507038429... | |
bookmarks, tags and folders within the bookmarks directory. The structure of the bookmark folders and their child bookmarks is represented using a foreign key id which points to the parent folder's id in the same table which again recursses upwards to that parent folder's Id until it hits the bookmarks root.
However,... | [
0.46562474966049194,
0.24307416379451752,
0.5796216130256653,
0.12246052920818329,
0.2573294937610626,
-0.15378135442733765,
0.1172289028763771,
-0.19920186698436737,
-0.324017196893692,
-0.6616349220275879,
-0.041825637221336365,
0.2295420914888382,
-0.2641528248786926,
0.2441957890987396... | |
a bookmark in firefox to no particular folder but give it 2 or 3 tags then it's parent folder ID is 5 which corresponds to "unfiled" but I can see no further correlation to the tags associated with it.
I have found this [Wiki page on the structure](http://www.forensicswiki.org/index.php?title=Mozilla_Firefox_3_Histor... | [
0.18689779937267303,
0.5462559461593628,
0.3309602439403534,
0.023907668888568878,
-0.07423336058855057,
-0.4819903075695038,
0.13320860266685486,
-0.34037551283836365,
-0.24605119228363037,
-0.3070375621318817,
-0.14862759411334991,
-0.058395013213157654,
-0.34536340832710266,
0.381465375... | |
multiple entries in `moz_bookmarks`, all having the same reference `fk`: The first is the bookmark itself (having the title in the `title` column) For each tag, there's an additional entriy in `moz_bookmarks` having the same foreign key `fk` and refering to the tag in the `parent` coumn (which points to the `moz_bookma... | [
-0.12977197766304016,
0.3762321174144745,
0.5209246873855591,
0.06522027403116226,
-0.027135370299220085,
0.16358579695224762,
-0.13128036260604858,
-0.22525684535503387,
-0.5189496278762817,
-0.27636662125587463,
-0.14940813183784485,
0.005267990753054619,
-0.0720827728509903,
0.386411339... | |
(other columns omitted...)
332 1 3636 5 Stackoverflow (parent=5 -> unfiled folder)
333 2 (NULL) 4 programming (programming tag, parent=4 -> tags folder)
334 1 3636 333 (NULL) (link to 'programming' tag)
335 | [
-0.33987540006637573,
-0.033807508647441864,
0.5024850964546204,
0.020469166338443756,
-0.11640721559524536,
0.3517012596130371,
0.4292239844799042,
-0.7020794749259949,
-0.3294637203216553,
-0.01694939099252224,
-0.22158806025981903,
0.2902969717979431,
-0.5386078357696533,
0.107812091708... | |
2 (NULL) 4 info (info tag, parent=4 see above)
336 1 3636 335 (NULL) (link to 'info' tag)
```
Hope this helps... | [
0.06326239556074142,
-0.028100404888391495,
0.14991365373134613,
0.10441131889820099,
0.172392338514328,
0.016627535223960876,
0.6208520531654358,
-0.4063819646835327,
0.039832353591918945,
-0.30385181307792664,
-0.15781937539577484,
0.33551037311553955,
-0.44182875752449036,
0.27957141399... | |
I am using a .NET web service as an interface to a database. What is the best way to return rows from this web service?
I vaguely remember that .NET 2.0 had issues with returning DataTable objects. Do those issues still exist?
**Update:** Some of [the](http://support.microsoft.com/kb/306134) [issues](http://bytes.com... | [
0.30942708253860474,
0.1625208854675293,
0.26448923349380493,
-0.10257414728403091,
-0.19966913759708405,
-0.10307010263204575,
0.1378171294927597,
-0.016930796205997467,
-0.11047052592039108,
-0.6917309165000916,
0.1340959519147873,
0.4514636695384979,
-0.3634720742702484,
0.3101038038730... | |
out at the other side. Perhaps you could give us some more information in your question as to what your trying to do.
DataRows and DataTables haven't changed in .net 3.0. If you want to use the entity framework to pass things around though you will run into different trouble. If they are rows, have a look at using Lin... | [
0.3162444829940796,
-0.4455469250679016,
0.15196414291858673,
0.13326811790466309,
-0.21234777569770813,
-0.03864680230617523,
-0.22123953700065613,
0.2129260152578354,
-0.5374599099159241,
-0.6402634978294373,
0.2956145107746124,
0.39345675706863403,
-0.23765718936920166,
0.11042615771293... | |
I cannot get trailing spaces from varchar column in Informix database.
I created test table, filled it with field with some trailing spaces,
but they are not returned by SELECT while it seems they are stored in db.
```
CREATE TABLE tmptable (txt varchar(240));
INSERT INTO tmptable (txt) VALUES ('123 ');
SELECT txt,... | [
0.1347009241580963,
0.13758735358715057,
0.050133660435676575,
-0.11063438653945923,
-0.14464294910430908,
0.10323508828878403,
0.4704550504684448,
-0.3670540750026703,
0.1251760721206665,
-0.4119015038013458,
0.04964170604944229,
0.6871866583824158,
-0.7116377353668213,
0.1078431084752082... | |
Is there any way to get
trailing spaces?
Server: IBM Informix Dynamic Server Version 11.50.TC2DE
Client: tested with both ISA (no spaces in HTML page source) and ODBC driver 3.50.TC3DE
**EDIT**
Simple Python test program (tested with ActivePytnon 2.6 on Windows, you must change connection string in the last lines)
... | [
-0.18863265216350555,
-0.19634415209293365,
0.47342321276664734,
0.11384475231170654,
-0.018217775970697403,
0.07979829609394073,
0.3412785530090332,
-0.2231321483850479,
-0.20417919754981995,
-0.3263617157936096,
0.020702311769127846,
0.38016241788864136,
-0.5779350996017456,
-0.148343175... | |
cursor.execute("DELETE FROM tmptable;")
cursor.execute("INSERT INTO tmptable (txt) VALUES (' %s ')" % (dbname))
#cursor.commit()
cursor.execute("SELECT txt, txt || '***', LENGTH(txt) FROM tmptable;")
for row in cursor.fetchall():
print '[%s]\t[%s]\t[%s]' % (row[0], row[1... | [
-0.47043174505233765,
-0.005533179268240929,
0.5406952500343323,
-0.21299616992473602,
-0.000920631515327841,
0.24487583339214325,
0.2688402235507965,
-0.1481560468673706,
-0.1074034720659256,
-0.738081693649292,
-0.3283647894859314,
0.7284005880355835,
-0.6442530155181885,
0.3836274743080... | |
'Oracle ')
test_varchar('informixdb/usr/passwd', 'Informix ')
test_varchar('postgresqldb/usr/passwd', 'PostgreSQL')
```
And results:
```
c:\tools\pyscripts\scripts\db_examples>test_odbc.py
oracledb Oracle
--------------
[ Oracle ] [ Oracle ***] [16]
informixdb Informix
-----------... | [
0.02827630378305912,
0.31262731552124023,
0.10190920531749725,
0.1257472038269043,
-0.17665942013263702,
0.06782014667987823,
0.18552574515342712,
-0.4955058991909027,
0.23638084530830383,
-0.288770854473114,
-0.18072295188903809,
0.5628148913383484,
-0.15992780029773712,
-0.27527508139610... | |
trim trailing spaces)
with native JDBC driver
* doesn't work
(trim trailing spacec) with JDBC-ODBC
bridge
Source:
```
# for Jython 2.5 invoke with --verify
# beacuse of bug: http://bugs.jython.org/issue1127
import sys
from com.ziclix.python.sql import zxJDBC
def test_varchar(driver, db_url, usr, passwd):
arr = ... | [
-0.2609513998031616,
0.13356657326221466,
0.28160712122917175,
-0.20130588114261627,
-0.03385872766375542,
0.1711086630821228,
0.3112174868583679,
-0.4343372583389282,
0.1823788285255432,
-0.5696496367454529,
-0.21920540928840637,
0.6970551013946533,
-0.3858979046344757,
-0.115483708679676... | |
s = 'Exception: %s: %s\n%s' % (ex[0], ex[1], db_url)
print s
return
cursor = connection.cursor()
cursor.execute("SELECT txt, txt || '***', LENGTH(txt) FROM tmptable")
for row in cursor.fetchall():
print '[%s]\t[%s]\t[%s]' % (row[0], row[1], row[2])
#test_varchar(driver, db_url, usr,... | [
-0.26243653893470764,
0.3402055501937866,
0.4082622230052948,
-0.06773500144481659,
-0.1283264011144638,
0.3981425166130066,
0.27132660150527954,
-0.2489631325006485,
-0.18610665202140808,
-0.6090301871299744,
-0.31247416138648987,
0.3408271372318268,
-0.10876041650772095,
0.29623323678970... | |
Informix ] [ Informix ***] [11]
jdbc:odbc:inf_test_db_odbc
--------------
[ Informix] [ Informix ***] [11]
```
* Check Large-Scale C++ Software Design from John Lakos if you have the money.
* Google C++ coding guidelines also have some OK stuff.
* Check Sutter Herb materials online (blog)... | [
0.6150467991828918,
0.31202906370162964,
-0.15190571546554565,
0.25608986616134644,
-0.12720094621181488,
-0.23598027229309082,
0.15923286974430084,
-0.29973307251930237,
0.03080359846353531,
-0.6140289306640625,
-0.2775048017501831,
0.6111029982566833,
-0.32822635769844055,
-0.39696693420... | |
in h files when it's a must (eg. templates). | [
0.37444648146629333,
0.009681862778961658,
-0.08372950553894043,
0.06796159595251083,
0.33775094151496887,
-0.7283249497413635,
0.10622838139533997,
-0.27135324478149414,
-0.2203691005706787,
-0.773251473903656,
-0.8514139652252197,
0.2657119035720825,
-0.1743594855070114,
-0.0931619405746... | |
I am using SQL server 2000.
I have a stored procedure sitting on machine A. I want to call this stored procedure from within a stored procedure on machine B. How do I go about this?
You could use the [Linked Server feature](http://msdn.microsoft.com/en-us/library/aa213778.aspx) of SQL Server.
> A linked server configu... | [
0.30490005016326904,
0.2421797215938568,
0.34781011939048767,
-0.1479950249195099,
-0.11837083846330643,
-0.2620445787906647,
0.05252582207322121,
-0.08227501809597015,
-0.19690032303333282,
-0.7974750995635986,
0.052683744579553604,
0.5709589123725891,
-0.3359396159648895,
0.2477287054061... | |
The ability to address diverse data sources similarly.
A call could look like this:
```
exec MyRemoteServer.MyDB.dbo.sp_MyStoredProc
``` | [
0.017637604847550392,
0.019147852435708046,
0.29169514775276184,
0.2734818458557129,
0.0069250925444066525,
-0.22561462223529816,
0.05796229839324951,
0.03525653854012489,
-0.16419118642807007,
-0.4014624059200287,
-0.21262694895267487,
0.5934440493583679,
-0.23293536901474,
0.034460622817... | |
I have just started using an exception logger (EurekaLog) in my (Delphi) application. Now my application sends me lots of error messages via e-mail every day. Here's what I found out so far
* lots of duplicate errors
* multiple mails from the same PC
While this is highly valuable input to improve my application, I am... | [
0.594739556312561,
0.4799153208732605,
-0.054880291223526,
0.08187752962112427,
-0.11118848621845245,
0.01567181386053562,
0.42879822850227356,
0.038814060389995575,
-0.7386147379875183,
-0.593512237071991,
0.28391551971435547,
0.2042146623134613,
-0.4092937707901001,
0.33904147148132324,
... | |
unique problems - leave only 4 reports, throw out other 96 reports, but use their count to sort reports by severity. For example, 6 reports for fourth problem, 10 reports for third, 20 for second and 60 for first. So, you should fix first problem with 60 reports and only then switch to second.
I believe that EurekaLog... | [
0.0636315569281578,
-0.0343296155333519,
0.09166938066482544,
0.3551527261734009,
-0.2102798968553543,
0.19623595476150513,
0.44621214270591736,
0.029263900592923164,
-0.6737132668495178,
-0.43971285223960876,
0.25646546483039856,
0.026072252541780472,
-0.5350502133369446,
0.09565772861242... | |
I am creating a MFC application for Windows Mobile and don't know how to enable multiple selection for List Control (CListCtrl). In properties panel Single Selection is set to False but still can't select multiple items.
Any idea?
I have never targeted Windows Mobile but you might try the following:
> list.ModifyStyl... | [
0.3220512270927429,
-0.12571577727794647,
0.5820440053939819,
-0.2846028506755829,
-0.21941736340522766,
0.05219089239835739,
0.1534852683544159,
-0.19458775222301483,
-0.2671510875225067,
-0.5562869310379028,
0.020614998415112495,
0.31372278928756714,
-0.6287184357643127,
0.13046525418758... | |
We are currently investigating different remote-desktop support solutions to help our clients if they have any problems with our software and I would like some input on the best solutions out there.
We have the following needs / wishes:
* Cross platform
* Preferrably no installation on the user-end
* Should penetrate... | [
0.525150716304779,
-0.05306681618094444,
0.227188378572464,
0.11769970506429672,
-0.09013374894857407,
-0.10341126471757889,
0.25148746371269226,
0.28812676668167114,
-0.0982220247387886,
-0.6575724482536316,
-0.017952119931578636,
0.4955848753452301,
-0.1293993890285492,
-0.00410474557429... | |
your logo to redistribute to your clients. It does require (non administrative) install but works also behind firewalls. | [
0.7607550621032715,
0.0643487200140953,
0.4757382571697235,
-0.08366739749908447,
0.29436567425727844,
-0.2450658529996872,
0.36245274543762207,
0.07819034904241562,
-0.3785615563392639,
-0.8386070132255554,
-0.12156997621059418,
0.2424025535583496,
-0.27757376432418823,
-0.175164282321929... | |
I realise that this is a very basic question, but it is one which has always bothered me. As I understand things, if you declare a field private in Java then it is not visible outside of that class. If it is protected then it is available to inherited classes and anything in the same package (correct me if either of th... | [
0.4455823004245758,
0.040943823754787445,
-0.4024318754673004,
-0.2929086983203888,
-0.11696378141641617,
-0.5344722867012024,
0.3954486548900604,
0.2754630446434021,
-0.272091805934906,
-0.22037962079048157,
-0.1455586701631546,
0.573502242565155,
-0.24209387600421906,
0.31321772933006287... | |
but are there instances when you would want to have this sort of behaviour?
Obviously the above question applies to methods as well as fields.
Many thanks.
See: <http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html>
Package > Subclasses, you can never have a field only visible by subclasses but... | [
0.26806405186653137,
-0.0902223140001297,
-0.06884930282831192,
-0.07782838493585587,
-0.33040523529052734,
-0.3121801018714905,
0.5655309557914734,
0.1483810991048813,
-0.5359304547309875,
-0.484699010848999,
-0.2139877825975418,
0.3318914473056793,
-0.2391926795244217,
0.0894114002585411... | |
This is what I need to do:
```
object foo = GetFoo();
Type t = typeof(BarType);
(foo as t).FunctionThatExistsInBarType();
```
Can something like this be done?
No, you cannot. C# does not implement [duck typing](http://en.wikipedia.org/wiki/Duck_typing).
You must implement an interface and cast to it.
(However ther... | [
0.6229583024978638,
0.18190352618694305,
0.2957471013069153,
-0.21685922145843506,
0.015227356925606728,
-0.2525693476200104,
0.47054675221443176,
-0.32323458790779114,
-0.021261896938085556,
-0.44245418906211853,
-0.0871051475405693,
0.6783199310302734,
-0.5142679214477539,
-0.13890467584... | |
I'm building my personal CMS and need your advice organizing core functions and classes.
I have folders:
```
/shared
/classes
DB.php
Session.php
Config.php
...
/libraries
Arrays.php
DateTime.php
Email.php
...
```
The files in 'classes' folder contains cor... | [
0.36573997139930725,
0.29997801780700684,
-0.0143209770321846,
0.23892129957675934,
-0.045891374349594116,
0.19100013375282288,
-0.008429637178778648,
0.09082555770874023,
-0.2815389931201935,
-0.8361929059028625,
0.07531015574932098,
0.11829271912574768,
-0.06931576132774353,
0.1755554825... | |
be used in any class, and sometimes they use some other function from another library, and sometimes they need to access some core class.
Should i just write them as functions, or make them static and wrap in some class?
Basically i need them everywhere, but keep them organized.
My suggestion is to first think through ... | [
0.44038838148117065,
0.13576312363147736,
0.1208084374666214,
0.36287522315979004,
0.09859569370746613,
0.08174173533916473,
0.10748586058616638,
0.14092089235782623,
-0.17579568922519684,
-0.7017572522163391,
0.06961416453123093,
0.29603859782218933,
-0.10615662485361099,
-0.3651607632637... | |
have libraries calling libraries. From my point of view, none of your classes should be dependent on anything else except for the first few core classes in your application flow since you'd like to distributed the work in some other single purposed self-contained classes. You should aim for singularity and atomicity wi... | [
0.3732970356941223,
0.2767176032066345,
0.053010955452919006,
0.2954970598220825,
0.03178981691598892,
-0.15978987514972687,
0.09479672461748123,
0.004722734913229942,
-0.36629578471183777,
-0.6613369584083557,
-0.19802094995975494,
0.39715462923049927,
-0.3389979898929596,
0.0631669983267... | |
that are required for parsing the incoming requests request and doing some default tasks before initializing the requested controller [/controllers].
Libraries should have a single purpose. The session handling library should solely handle sessions, the routing library routing, etc. Initially you can create your base... | [
0.24109818041324615,
-0.12907567620277405,
0.41105976700782776,
0.7245287895202637,
0.14024461805820465,
-0.22695013880729675,
-0.29490548372268677,
-0.3933248817920685,
-0.29768896102905273,
-0.7483640909194946,
-0.05649884417653084,
0.20503094792366028,
-0.3750703036785126,
0.26920720934... | |
future that you can simply change the core classes and have a huge impact on the whole application without having to make any further changes in other places. | [
0.44555190205574036,
-0.3255468010902405,
-0.11294197291135788,
0.5326792001724243,
0.46670493483543396,
-0.047009944915771484,
-0.06369945406913757,
0.18903475999832153,
0.01998414844274521,
-1.0092833042144775,
-0.05382697284221649,
0.48866885900497437,
0.28854188323020935,
0.00846758764... | |
I am using in my code at the moment a [ReentrantReadWriteLock](http://java.sun.com/javase/6/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html) to synchronize access over a tree-like structure. This structure is large, and read by many threads at once with occasional modifications to small parts of it - so... | [
-0.03888159617781639,
0.1529143750667572,
0.45075100660324097,
0.0583653450012207,
0.15351316332817078,
-0.2847841680049896,
0.38756096363067627,
-0.30362212657928467,
-0.33567163348197937,
-0.39863231778144836,
-0.17067158222198486,
0.2838346064090729,
-0.04972759634256363,
0.413599103689... | |
lock without blocking forever. Since the read lock is reentrant and I am actually using it as such, the simple code
```
lock.getReadLock().unlock();
lock.getWriteLock().lock()
```
can block if I have acquired the readlock reentrantly. Each call to unlock just reduces the hold count, and the lock is only actually rele... | [
0.13276247680187225,
-0.031194884330034256,
0.5751934051513672,
-0.1512809842824936,
0.35386866331100464,
-0.30112504959106445,
0.5954644083976746,
-0.28265273571014404,
-0.2836928069591522,
-0.319166362285614,
-0.4632262587547302,
0.5367892384529114,
-0.2748631536960602,
0.305482476949691... | |
what other threads are doing, calling `getReadLock().unlock()` may not actually release *this* thread's hold on the lock if it acquired it reentrantly, in which case the call to `getWriteLock().lock()` will block forever as this thread still has a hold on the read lock and thus blocks itself.
For example, this code sn... | [
0.3409862220287323,
-0.04254328832030296,
0.5361701250076294,
-0.16894285380840302,
0.31814849376678467,
-0.27642714977264404,
0.7076363563537598,
-0.14090117812156677,
-0.492100328207016,
-0.4184950590133667,
-0.47362804412841797,
0.43535152077674866,
-0.32753846049308777,
0.5621230006217... | |
to write so try to escalate the
// lock as per the Javadocs and the above description
lock.getReadLock().unlock(); // Does not actually release the lock
lock.getWriteLock().lock(); // Blocks as some thread (this one!) holds read lock
System.out.println("Will never get here");
```
So I ask, is there a nice idiom to ... | [
0.2747038006782532,
0.08109404891729355,
0.47518154978752136,
-0.24649611115455627,
0.16002456843852997,
-0.35648882389068604,
0.7824665307998657,
0.006596393883228302,
-0.3248681128025055,
-0.45054978132247925,
-0.337301641702652,
0.3750610947608948,
-0.48658373951911926,
0.16140879690647... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.