text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
conn->ConnectionString = connStr.AllocSysString();
conn->Open("", "", "", NULL);
conn->CursorLocation = adUseClient;
}
cmd->ActiveConnection = conn;
cmd->CommandText = sql.AllocSysString();
cmd->CommandType = adCmdText;
prm = cmd->CreateParameter("@Pa... | [
-0.24027729034423828,
-0.06803806126117706,
0.7957879304885864,
-0.042928826063871384,
-0.32481661438941956,
0.3495607376098633,
0.2814400792121887,
-0.46806591749191284,
-0.07456906884908676,
-0.48321962356567383,
-0.34677696228027344,
0.4176785945892334,
-0.4174633324146271,
0.2114838659... | |
cmd->Parameters->Append(prm);
prm = cmd->CreateParameter("@Param2", adLongVarChar, adParamInput, -1, vDisp);
cmd->Parameters->Append(prm);
_variant_t recAff;
cmd->Execute(&recAff, NULL, adExecuteNoRecords);
}
catch(_com_error &ex)
{
//ClearParameters();
DSt... | [
-0.2505185902118683,
-0.11052848398685455,
0.9329810738563538,
-0.13493022322654724,
-0.27125173807144165,
0.5199786424636841,
0.27192023396492004,
-0.8445020914077759,
-0.142865389585495,
-0.42748120427131653,
-0.2306918352842331,
0.35102614760398865,
-0.3519759476184845,
0.15394626557826... | |
SysFreeString(vDisp.bstrVal);
SysFreeString(cmd->CommandText);
SysFreeString(conn->ConnectionString);
}
```
ADO refuses to work with named parameters in dynamic queries. You have to either convert named parameters into parameter placeholders:
```
DStr sql = "INSERT INTO [User] (UserName, DisplayName) VALUES ... | [
-0.41455355286598206,
0.10376447439193726,
0.8492026925086975,
-0.19084517657756805,
-0.01058125402778387,
0.2951876223087311,
0.18012921512126923,
-0.6585148572921753,
-0.5077470541000366,
-0.3713730275630951,
-0.4532257318496704,
0.4633457362651825,
-0.45559826493263245,
0.17228971421718... | |
Are lambda expressions multi-threaded?
Say when you write a mathematical formula as a lambda method, when you pass it to another method, would it be multi-threaded?
Not 100% clear on what you're asking.
**Are you asking if lambdas are naturally run on a different thread?**
If so no, they are just another instance o... | [
0.34934377670288086,
-0.0705954059958458,
-0.08983778953552246,
0.2991196811199188,
-0.2249247133731842,
-0.043308548629283905,
0.12297690659761429,
-0.027411634102463722,
-0.6268578767776489,
-0.21169893443584442,
0.08245307952165604,
0.5863476991653442,
-0.7122518420219421,
-0.1063375249... | |
the are much less likely to be thread safe than you would expect. | [
0.6041366457939148,
-0.19810710847377777,
0.2782166004180908,
0.3610110282897949,
0.08076971024274826,
-0.02916431613266468,
0.21224604547023773,
0.1943853795528412,
-0.39809855818748474,
-0.18251240253448486,
-0.04332411661744118,
0.05169723182916641,
-0.09857892990112305,
0.1782127469778... | |
I'm trying to put an image at the top left of a `LinearLayout`, but with the image border and padding taking up the whole of the width of the window.
If I try the XML below, I get my image with its border and a white background across the whole width of the page, *except* that the image ends up **centered**, and doesn... | [
0.23801589012145996,
-0.11917322129011154,
0.7920237183570862,
-0.20525993406772614,
-0.05359358340501785,
0.07351762801408768,
-0.2114611715078354,
-0.11137716472148895,
-0.16794440150260925,
-0.8704245686531067,
-0.124659962952137,
0.307498037815094,
-0.13220837712287903,
0.1087292507290... | |
the image to be left aligned within the `ImageView` when the `layout_width` is set to `fill_parent`?
In the meantime, I've worked around this by dropping the `ImageView` inside another `LinearLayout` and dropping an empty `TextView` to its right that takes up the rest of the horizontal space.
I was having a similar pr... | [
0.2807803153991699,
-0.13221457600593567,
0.6389352679252625,
0.12524640560150146,
-0.19518262147903442,
0.03561601787805557,
-0.3223295211791992,
-0.12958385050296783,
-0.06760971248149872,
-0.7517650723457336,
0.06798310577869415,
0.6995957493782043,
-0.18893231451511383,
-0.136515706777... | |
try adding:
```
android:scaleType="fitStart"
```
From the documentation I've read, that seems to be the closest to what you need. | [
0.2576138377189636,
-0.01644464209675789,
0.004088972695171833,
-0.03402945399284363,
0.02042156271636486,
0.2531856894493103,
0.034784674644470215,
0.05790209770202637,
-0.13889312744140625,
-0.8159227967262268,
0.15344306826591492,
0.6367115378379822,
-0.306598961353302,
0.03098993562161... | |
I have 2 tables (srcTable1 & destTable) that have identical schemas. I am trying to copy all rows from srcTable to destTable and ignore the duplicates. I thought I could just add a WHERE clause with a subquery that would give me only the rows that aren't duplicates. However, it doesn't seem to work. I don't get any row... | [
-0.1329706609249115,
-0.0846848413348198,
0.3702623248100281,
0.02078077755868435,
0.029039982706308365,
0.20995819568634033,
0.0395299531519413,
-0.1107947900891304,
-0.31408387422561646,
-1.1566879749298096,
0.34285473823547363,
0.4914526343345642,
-0.4574825167655945,
0.3490990102291107... | |
how you could do this with multiple keys.
Any idea what I'm doing wrong or do you have any better ideas?
Your problem is that you need another where clause in the subquery that identifies what makes a duplicate:
```
INSERT INTO destTable
SELECT Field1,Field2,Field3,...
FROM srcTable
WHERE NOT EXISTS(SELECT *
... | [
0.07298436760902405,
-0.1484348177909851,
0.1644372045993805,
0.18244357407093048,
0.5514829754829407,
-0.013830543495714664,
0.13169075548648834,
-0.19237536191940308,
-0.13164280354976654,
-0.6268964409828186,
0.09622395038604736,
0.6218218207359314,
-0.45484572649002075,
0.1714715212583... | |
SrcTable.Field2=DestTable.Field2...etc.)
)
```
As noted by another answerer, an outer join is probably a more concise approach. My above example was just an attempt to explain using your current query to be more understandible. Either approach could technically work.
```
INSERT INTO destTable
SELECT... | [
-0.4044501781463623,
-0.144992396235466,
0.41738390922546387,
-0.23305007815361023,
-0.01169357355684042,
0.045394446700811386,
0.06836801767349243,
-0.43484556674957275,
0.1420862227678299,
-0.7197424173355103,
-0.3442886471748352,
0.6802077293395996,
-0.1927960366010666,
0.05320577695965... | |
source that might already be in destination. If you are instead concerned about the possibility that source has duplicate rows you should try something like.
```
INSERT INTO destTable
SELECT Distinct field1,field2,field3,...
FROM srcTable
```
One more thing. I'd also suggest listing the specific fields on your in... | [
0.19996115565299988,
-0.16381505131721497,
0.2559424042701721,
0.054883331060409546,
0.13763673603534698,
-0.16575168073177338,
-0.27240365743637085,
0.19034937024116516,
-0.056280653923749924,
-0.8995586037635803,
0.0574195496737957,
0.7679917812347412,
-0.2910326421260834,
0.109118990600... | |
When I develop an ASP.Net webapp, it almost always requires some kind of authentication - ie. the user must log in for stuff to work.
But when I am developing it, I don't want to have to log in every time I make a change to some code.
So right now for instance, I have a codeblock in my login.aspx, that automatically ... | [
0.40561744570732117,
0.13510668277740479,
0.44396597146987915,
-0.07704328000545502,
-0.015973879024386406,
-0.13953383266925812,
0.2172788381576538,
0.083415187895298,
-0.30679506063461304,
-0.8982285261154175,
-0.09525401145219803,
0.15004503726959229,
-0.083806611597538,
0.1337599605321... | |
same situation.
You could actually tackle the problem completely differently: Use [unit tests](http://en.wikipedia.org/wiki/Unit_testing) tests to exercise small bits of your code. As unit tests run automatically (once started), you will save the time for logging in & navigating to the right page.
You will of course s... | [
0.6462956070899963,
-0.07225611805915833,
-0.3115168809890747,
0.36175450682640076,
0.14988428354263306,
-0.19607987999916077,
0.5381357073783875,
-0.27303892374038696,
-0.11739823967218399,
-0.6622849106788635,
-0.16336332261562347,
0.6834467053413391,
0.1915026158094406,
-0.2311282753944... | |
found it a great timesaver.
The suggestions in the other posts will of course still be helpful for the cases where you still need to run the app the normal way. | [
0.2865186333656311,
-0.030187515541911125,
0.18880733847618103,
0.3173511028289795,
0.14849963784217834,
-0.19713377952575684,
0.0307711623609066,
0.4644363224506378,
-0.06024165824055672,
-0.43591293692588806,
0.26461225748062134,
0.4149630665779114,
0.4921422302722931,
0.0719954073429107... | |
I know x86 Assembly (and have worked with FPGA etc') , Never wrote for a RISC, I have the opportunity to take a course in MIPS,
but I'm busy as it is, so my question is,
I know that every thing I learn is beneficial in some way,
but really, how much beneficial?
(I am a low level enthusiastic, but is this a must?)
(I'm... | [
0.32056188583374023,
0.3806849420070648,
0.16196222603321075,
-0.1644812375307083,
-0.04611651226878166,
-0.2752768099308014,
0.3037031888961792,
0.12749755382537842,
-0.16452443599700928,
-0.4958588778972626,
-0.3144085109233856,
0.6421769261360168,
-0.03411737456917763,
-0.17661815881729... | |
do that with x86 (or most other ISAs that I've programmed). In that way it is RISCier than the other RISC CPUs. A lot of networking and storage gear has embedded MIPS cpus. A start-up I worked at in the early part of this decade did a 16 core MIPS CPU with encryption accelerators (as two of the coprocessors). That desi... | [
0.07111115753650665,
-0.13877294957637787,
0.34322264790534973,
0.2655847668647766,
0.265223890542984,
-0.30676478147506714,
-0.03719688579440117,
0.22781187295913696,
-0.2793392837047577,
-0.7155941128730774,
0.03995893523097038,
0.45501771569252014,
-0.1458592712879181,
-0.08543204516172... | |
I think it is useful to learn.
I found the first edition of the following book to be a good way to learn it:
[http://www.amazon.com/Second-Morgan-Kaufmann-Computer-Architecture/dp/0120884216/ref=sr\_1\_1?ie=UTF8&s=books&qid=1237328559&sr=1-1](https://rads.stackoverflow.com/amzn/click/com/0120884216) | [
0.03996558114886284,
0.13638059794902802,
0.3624476492404938,
-0.01589411497116089,
0.38604530692100525,
-0.21862496435642242,
-0.0229877308011055,
-0.2244514375925064,
-0.40832552313804626,
-0.3718321919441223,
0.07049239426851273,
0.45382022857666016,
0.09349324554204941,
0.0609020777046... | |
I have an older server (retired database box in fact) that doesn't fit the requirements for VMware ESX/ESXi or Microsoft's Hyper-V but runs VMware Server 2 just fine. The host OS is currently Windows 2003 Standard. While it does the job just fine, I could hope for something a bit more "svelte" out of the box. Thus Wind... | [
-0.007956194691359997,
0.3927248418331146,
0.43531662225723267,
0.025100024417042732,
-0.14184162020683289,
-0.2726769745349884,
0.045562610030174255,
0.41041699051856995,
-0.15559165179729462,
-0.40198034048080444,
0.2514531910419464,
0.4990391135215759,
-0.0048638274893164635,
0.35064610... | |
pervert a workstation for testing I figured I'd ask here:
Anyone tried VMware Server on 2008 server core? Anything to be aware of or gotchas?
*(yes, I could also go with Linux for a thinner host, but this seems like a great excuse to bring up a 2008 server core box!)*
Edit: I guess I should mention this server host... | [
0.4069255590438843,
0.23390913009643555,
0.3077327311038971,
-0.03657377138733864,
-0.3391534090042114,
-0.14784249663352966,
0.4684945046901703,
-0.010479080490767956,
-0.09138039499521255,
-0.5467051267623901,
0.06590969860553741,
0.5578206777572632,
-0.3690985143184662,
0.23992218077182... | |
on a
> Full installation of Windows Server
> 2008 host operating system. However,
> both Core and Full installations of
> Windows Server 2008 are supported as
> guest operating systems. | [
-0.3424718379974365,
0.28254058957099915,
0.3033323884010315,
0.13005569577217102,
-0.17446500062942505,
-0.2500649094581604,
0.4248397648334503,
0.4053972363471985,
-0.22810719907283783,
-0.5061848759651184,
-0.2490629255771637,
0.4981773793697357,
-0.21899676322937012,
0.3188839256763458... | |
I have a database that has two tables "locations" and "classes". I am familiar setting up some sort of parent/child situation with my database tables, but this one has thrown me for a loop.
This relationship works exactly like you'd expect. The "locations" have multiple "classes". But some of the "classes" are at mult... | [
0.1694878786802292,
0.12610946595668793,
0.15836243331432343,
0.08063151687383652,
-0.020897645503282547,
0.26484477519989014,
0.10576534271240234,
-0.17105650901794434,
-0.12182935327291489,
-0.9133822321891785,
0.2981698215007782,
0.160551980137825,
-0.16188502311706543,
0.48428457975387... | |
the other two (both locationId and classID are foreign keys from the location and class tables) | [
-0.5762849450111389,
-0.31081101298332214,
0.01598493941128254,
0.030794600024819374,
0.1252191811800003,
0.06267806142568588,
-0.25403594970703125,
0.06424740701913834,
-0.0848342627286911,
-0.1926836520433426,
-0.12927542626857758,
0.3896098732948303,
-0.028131602331995964,
0.32217952609... | |
I am not a big web programmer, and have a friend who wants me to help him with something.
He wants to be able to have a form that once it is submitted changes to say something like "Thanks for submitting" and have the form info disappear. He wants it to be easy for anyone to use, so he can give it to various people to... | [
0.6198910474777222,
0.0628572627902031,
0.030336616560816765,
0.2563692331314087,
-0.09713055193424225,
-0.20376817882061005,
0.19390620291233063,
0.288867324590683,
-0.23038463294506073,
-0.6207046508789062,
0.21840886771678925,
0.127613827586174,
-0.21479682624340057,
-0.0645833089947700... | |
usable by as many people as possible.
Thanks.
What is supposed to happen to the information in the form? Doesn't matter?
If you want it to be **pure** HTML there's only one good solution: Write one HTML page with the form, and another almost identical one with the success message in place and the form data hidden. S... | [
0.27357226610183716,
0.0005535759264603257,
0.5336425304412842,
0.015978481620550156,
-0.22296209633350372,
-0.1004732996225357,
0.2505497634410858,
-0.4276816248893738,
-0.05941490828990936,
-0.713637113571167,
-0.14809495210647583,
0.5823390483856201,
-0.04616944119334221,
-0.36122056841... | |
what to display. It is dumb... it just displays.
It's very easy to use JavaScript to detect when the form was submitted, and then ***hide*** the elements you need to hide, and ***show*** the success message:
```
<!-- Goes in the <head> or in a seperate script -->
<script type="text/javascript">
var theSubmitButto... | [
0.20915614068508148,
-0.08690899610519409,
0.6668084263801575,
-0.23299705982208252,
-0.20025934278964996,
-0.23737718164920807,
0.2442052960395813,
-0.5709468126296997,
0.11997728794813156,
-0.6729820370674133,
-0.3750276565551758,
0.2974085211753845,
-0.31279680132865906,
0.0378551185131... | |
var theSuccessMessage =
document.getElementById('successMessage');
theSuccessMessage.style.display = 'block';
}
</script>
<!-- Goes in the body -->
<h1>Email Subscription:</h1>
<p id="successMessage">You submitted the form, good job!</p>
<form id="theForm" action="successForm.html"... | [
0.41665035486221313,
0.21804817020893097,
0.771259605884552,
-0.21076372265815735,
-0.10752791166305542,
-0.1610608547925949,
0.35488972067832947,
-0.5726576447486877,
-0.02715129777789116,
-0.36307308077812195,
-0.21815252304077148,
0.5398364067077637,
0.16731037199497223,
-0.330176919698... | |
trying to give a basic idea of how to use JavaScript for this purpose. If you're not a programmer, then coming up with a small, distributable piece of software might be a good job for someone else.
However, you still need some mechanism to store, email or otherwise DO something with the form. Add an edit to your quest... | [
0.3935225307941437,
0.20036408305168152,
-0.1539658159017563,
0.5745128393173218,
-0.013777363114058971,
-0.039170119911432266,
0.3701688349246979,
0.2575671076774597,
-0.17771895229816437,
-0.6400907635688782,
0.12089917808771133,
0.41222497820854187,
-0.1845305860042572,
-0.2589845061302... | |
I have two tables joined together with entities like this (entities anonymized, and trimmed of irrelevant properties):
Email
- Email\_ID
- Title
- Body (hibernate uses a Body\_ID field here)
Body
- Body\_ID
- Body\_Text
I'd like to retrieve all Email entries that do not have an associated Body row (ie, Body\_ID... | [
0.41969209909439087,
0.17682065069675446,
0.49871721863746643,
0.07213471084833145,
-0.023538537323474884,
-0.23825512826442719,
0.1920756995677948,
-0.02826966904103756,
-0.09264687448740005,
-0.5938959717750549,
0.13902731239795685,
0.27782657742500305,
-0.13414697349071503,
0.2253030240... | |
uncovered a bunch of blog posts about how VisualStudio adds that line to the web.config when upgrading web apps from .net 1.1 to .net 3.5.
The blog posts were mainly complaining about how that field interferes with .net's AJAX stuff, but I'm guessing it messes with the JavaScript emitted for the RequiredFieldValidato... | [
0.7391087412834167,
0.0874704122543335,
0.23414984345436096,
0.1938471794128418,
-0.436551958322525,
-0.042434871196746826,
0.12061239778995514,
0.148241326212883,
-0.1020183339715004,
-0.618164598941803,
0.44173455238342285,
0.5736791491508484,
0.034184735268354416,
0.26136544346809387,
... | |
I have an ASP.NET page that I want to be able to generate and save. The page takes a *really* long time to load, so I'd like to do it in a separate thread, while using the session of the user who requested the page (so that the page looks like it would if they viewed it themselves).
Opening a new thread from code-behi... | [
0.6255402565002441,
-0.016161790117621422,
0.305758535861969,
0.2438565343618393,
-0.2284603714942932,
-0.12133028358221054,
0.38302406668663025,
-0.04034194350242615,
-0.6024547815322876,
-0.7385199069976807,
0.19771958887577057,
0.18293628096580505,
0.01883011683821678,
-0.03997993096709... | |
particular case, the problem was that every page we requested held a session lock. This made it impossible to visit more than one page at a time:
<http://blogs.msdn.com/amitsh/archive/2007/08/01/why-i-cannot-execute-two-requests-from-the-same-session-simultaneously-for-an-asp-net-application.aspx>
> This is expected ... | [
-0.10089463740587234,
-0.04663144052028656,
0.49233201146125793,
-0.02315218187868595,
-0.13657161593437195,
-0.2617111802101135,
0.5695335268974304,
-0.3216533064842224,
-0.23308950662612915,
-0.9095909595489502,
-0.38952264189720154,
0.47790154814720154,
-0.2648427188396454,
0.2621707618... | |
hold only a reader lock on the session
> until the request finishes.
> * As we can understand based on concepts of locks – a Reader lock will
> block a writer lock; a Reader lock
> will NOT block a reader lock; a Writer
> lock will block all reader and writer
> locks.
>
>
> This lock is acquired within the event... | [
0.05749504640698433,
-0.031205685809254646,
0.9679467082023621,
0.18391536176204681,
0.21327348053455353,
-0.6072664260864258,
0.39291656017303467,
-0.5773379802703857,
-0.14329905807971954,
-0.660794734954834,
-0.6346546411514282,
0.464002400636673,
-0.13078226149082184,
0.285637497901916... | |
one
> frame/page has to wait for the other
> to finish.
By setting EnableSessionState to ReadOnly, we could push a redirect (and thus request another page) while waiting for the first page to finish executing in the background. | [
0.1912601739168167,
-0.19509239494800568,
0.6615390777587891,
0.05070624500513077,
0.08176685124635696,
-0.04694833979010582,
0.35274946689605713,
-0.43214812874794006,
0.1388174146413803,
-1.0065499544143677,
-0.1824355572462082,
0.392780065536499,
-0.3985787630081177,
-0.0410819314420223... | |
I have Java JDBC application running against an Oracle 10g Database. I set up a PreparedStatement to execute a query, and then call ps.executeQuery() to run it. Occasionally the query takes a long time, and I need to kill it. I have another thread access that PreparedStatement object, and call cancel() on it.
My quest... | [
0.5564709901809692,
0.1205795407295227,
-0.12270890176296234,
-0.09391598403453827,
0.054143451154232025,
-0.11132123321294785,
0.3307729959487915,
-0.10353364050388336,
-0.16393081843852997,
-0.5513407588005066,
0.1749640703201294,
0.48442667722702026,
-0.3832877278327942,
0.2084929198026... | |
Statement.cancel(), it says it'll happen "if both the DBMS and driver support aborting an SQL statement".
In my experience with various versions of Oracle JDBC drivers, Statement.cancel() seems to do what you'd want. The query seems to stop executing promptly when cancelled. | [
0.11133459955453873,
-0.27434390783309937,
0.2574564218521118,
-0.07342235743999481,
-0.08582405000925064,
-0.2490452080965042,
-0.005425760988146067,
0.0220886692404747,
-0.05197984725236893,
0.057652078568935394,
-0.0614103227853775,
0.6740477085113525,
-0.5424477458000183,
0.24717646837... | |
Try recording a macro in Word 2007, notice you can't do a thing to pictures. *(Or is this a local issue with my machine?)*
And I can't even find the Picture / Image object within the Word Object Ref.
What gives?
In Word, images are internally handles as shapes. There are basically two types: `InlineShapes`, which are... | [
0.17692820727825165,
-0.22477467358112335,
0.5375275611877441,
-0.017745472490787506,
-0.2591591775417328,
0.21163497865200043,
0.16332030296325684,
-0.11196476966142654,
-0.24182453751564026,
-0.7505138516426086,
0.19882404804229736,
0.622149646282196,
-0.32992732524871826,
-0.15430669486... | |
300
.Height = 200
End With
``` | [
0.2823622226715088,
0.0673835352063179,
0.48880285024642944,
-0.0040474385023117065,
-0.3381310701370239,
-0.1668282449245453,
0.4257924258708954,
-0.7015587687492371,
0.13884860277175903,
-0.3040052354335785,
-0.16947731375694275,
0.6379131078720093,
0.17727969586849213,
-0.05564372986555... | |
I'm trying to compile a guide for students used to publishing in print who are learning web design.
Some obvious things which web developers know but they don't:
* You can't rotate graphics in HTML
* All objects have to be rectangular, you can't have a circular DIV
* Many typographical effects in their repertoire can... | [
0.3734804689884186,
0.13163091242313385,
0.15952670574188232,
0.32395485043525696,
-0.4549729526042938,
-0.0694754421710968,
-0.052153054624795914,
-0.00019079040794167668,
-0.5441551804542542,
-0.6842359304428101,
0.33554455637931824,
0.2621661424636841,
-0.055812302976846695,
0.086380310... | |
every page of their site; that's not *technically* a problem, but it will mean a visitor has to wait for a new graphic to load every time they navigate
* Accessibility: "why not just make everything a graphic, to overcome the limitations of HTML?"
Please help me fill out my list and add any hints or tips for people ma... | [
0.5089283585548401,
-0.06934216618537903,
0.4682489037513733,
0.23038744926452637,
-0.3598945736885071,
-0.180892214179039,
0.5803179740905762,
0.33881431818008423,
-0.3477799892425537,
-0.9814318418502808,
-0.1727515012025833,
0.43214109539985657,
-0.022119035944342613,
-0.196117401123046... | |
read in detail
**Images**
* Sites are viewed at different
resolutions and screen sizes - Design accordingly
* To achieve transparent backgrounds in
IE6, use PNG8 with alpha (IE6 doesn't
support varying levels of
transparency, it's either 100%
transparent or it's opaque)
* Use CSS sprites
* Images should not be used i... | [
0.2089034467935562,
0.17167852818965912,
0.27459263801574707,
0.3047914206981659,
-0.49143606424331665,
-0.0898718610405922,
0.4510450065135956,
-0.20322030782699585,
-0.015872204676270485,
-0.9149842858314514,
-0.08606620877981186,
0.5402735471725464,
-0.18115946650505066,
-0.265237212181... | |
semantic markup
* Pages should be able to work without
JavaScript enabled
* Read Yahoo's [guide for
performance](http://developer.yahoo.com/performance/) and use [YSlow](http://developer.yahoo.com/yslow/)
* Dreamweaver's design mode doesn't
reflect how a page will appear in
real browsers
**General Design**
* Simpler ... | [
0.14548549056053162,
-0.21052007377147675,
0.3601645231246948,
0.3310548663139343,
-0.2871403396129608,
-0.187765434384346,
0.17719832062721252,
0.057955265045166016,
-0.2033902108669281,
-1.0054556131362915,
-0.3217015862464905,
0.39481860399246216,
-0.029184192419052124,
-0.3067041635513... | |
This
drastically affects how you consume
and display information. You can hide and subsequently display information using tabs, accordion, and similar methods.
* Think in terms of primary and
secondary calls of action. What do
you want the user to do? Where do you
want them to go next? | [
0.28179439902305603,
0.013632435351610184,
0.01722964085638523,
0.20929346978664398,
0.08047037571668625,
0.1190258264541626,
0.5044535398483276,
0.01733686961233616,
-0.3202587962150574,
-0.6902527809143066,
-0.11953441798686981,
0.4619412124156952,
-0.2478541135787964,
0.0763164535164833... | |
Everyone here has always been such great help, either directly or indirectly. And it is with grand hope that this, yet again, rings true.
For clarification sakes, the Stored Procedure is running under FireBird and the VB is of the .NET variety
I have a stored procedure (excerpt below, important bit is the WHERE)
```... | [
0.24230341613292694,
0.21934497356414795,
0.381488174200058,
0.1982821375131607,
0.34836748242378235,
0.22184406220912933,
-0.18619129061698914,
0.011247850954532623,
-0.4497844874858856,
-0.645027220249176,
-0.33212003111839294,
0.7884458899497986,
0.26533564925193787,
0.35277867317199707... | |
:labor_price, :misc_price, :woo, :wwt
```
I am trying to pass a parameter from a vb app, that uses the parameter I\_PN, the code of which follows below (The variables for MyServer and MyPassword are determined form an earlier part of the code.)
```
Try
Dim FBConn As New FirebirdSql.Data.FirebirdClient.Fb... | [
0.10487926751375198,
-0.06952214241027832,
0.7967132329940796,
-0.003930783364921808,
0.21509717404842377,
0.12467890977859497,
0.08707783371210098,
-0.31693318486213684,
-0.21961170434951782,
-0.40499457716941833,
-0.2608882188796997,
0.6007479429244995,
-0.47328701615333557,
0.3676578998... | |
MyServer & ";database=" & TextBox4.Text & "; & _
user id=SYSDBA;password=" & MyPassword & ";initial catalog=;"
FBConn = New FirebirdSql.Data.FirebirdClient. & _
FbConnection(MyConnectionString)
FBConn.Open()
FBConn.CreateCommand.CommandType = CommandType.StoredProcedure
... | [
-0.31136396527290344,
0.3482818305492401,
0.647455632686615,
0.09617304801940918,
0.4523201584815979,
0.06809555739164352,
0.22060638666152954,
-0.18036523461341858,
-0.17036406695842743,
-0.6747919917106628,
-0.3702414035797119,
0.44768157601356506,
-0.3043871223926544,
0.1896530985832214... | |
FBConn.CreateCommand.Parameters. & _
Add("@I_PN", FirebirdSql.Data.FirebirdClient.FbDbType.Text). & _
Value = TextBox1.Text
Dim I_PN As Object = New Object()
Me.WIP_COSTSTableAdapter.Fill(Me.WOCostDataSet.WIP_COSTS, @I_PN)
FBConn.Close()
Catch ex As System.Exception
... | [
-0.014975180849432945,
0.20265090465545654,
0.9805982708930969,
-0.2972010374069214,
0.051334746181964874,
0.1995851993560791,
0.44729310274124146,
-0.22160464525222778,
-0.3830168843269348,
-0.6490559577941895,
-0.46381717920303345,
0.6879744529724121,
-0.4847504198551178,
0.1384734511375... | |
Code = -206
>
> Column Unknown
>
> I\_PN
>
> At Line 1, column 29
And I can't quite put my finger on what the actual problem is. Meaning, I don't know if my logic is incorrect on the VB side, or, on the Stored Procedure.
Any coding that is included is kludged together from examples I have found with vari... | [
-0.0953645333647728,
0.2907520830631256,
0.5800567269325256,
-0.25092363357543945,
0.20319491624832153,
0.03795207291841507,
0.3870939314365387,
0.036350905895233154,
-0.21653839945793152,
-0.5192831158638,
-0.09325192868709564,
0.24041353166103363,
-0.2400258332490921,
0.19206096231937408... | |
is probably pretty crappy and not well formed - certainly not elegant and most assuredly in operational. I am certainly entertaining all flavors of advice with open arms.
As usual, if you have further questions, I will answer them to the best of my ability.
Thanks again.
Jasoomian
After a little rethinking and a bit... | [
0.1427786499261856,
0.36534398794174194,
0.47361433506011963,
0.0262678861618042,
0.2180141806602478,
-0.29790279269218445,
0.6855849623680115,
0.4004856050014496,
-0.11464560031890869,
-0.5526484847068787,
-0.2696358561515808,
0.3125739097595215,
0.08365671336650848,
0.08721001446247101,
... | |
' Dim FBAdapter As FbDataAdapter
Dim MyConnectionString As String
MyConnectionString = "datasource=" _
& MyServer & ";database=" _
& TextBox4.Text & ";user id=SYSDBA;password=" _ | [
-0.19100363552570343,
-0.3103475868701935,
0.7227074503898621,
-0.20632660388946533,
-0.14467810094356537,
0.12808848917484283,
0.5250860452651978,
-0.23923715949058533,
-0.020230481401085854,
-0.3031878173351288,
-0.4291636049747467,
0.3497786223888397,
-0.5899377465248108,
0.357434958219... | |
& MyPassword & ";initial catalog=;Charset=NONE"
FBConn = New FbConnection(MyConnectionString)
Dim FBCmd As New FbCommand("WIP_COSTS", FBConn)
FBCmd.CommandType = CommandType.StoredProcedure
FBCmd.Parameters.Add("@I_PN", FbDbType.VarChar, 40)
FBCmd.Parameters("@I_PN").Value = Te... | [
-0.17210283875465393,
-0.36570271849632263,
0.9074674248695374,
-0.05935751646757126,
-0.08686083555221558,
0.1351034790277481,
0.47857561707496643,
-0.5765025615692139,
-0.3006735146045685,
-0.6755545735359192,
-0.2423274964094162,
0.46670296788215637,
-0.37971821427345276,
0.449163019657... | |
Me.WIP_COSTSDataGridView.DataSource = dsResult.Tables(0)
Dim RecordCount As Integer
RecordCount = Me.WIP_COSTSDataGridView.RowCount
Label4.Text = RecordCount
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show _
("There was an error in generating the DataStrea... | [
-0.09150088578462601,
-0.0044474126771092415,
0.8117983937263489,
-0.02305702492594719,
0.3002278506755829,
0.024680661037564278,
0.26001405715942383,
-0.48006168007850647,
-0.28523269295692444,
-0.4602380692958832,
-0.1477116048336029,
0.49261173605918884,
-0.19804808497428894,
0.30463135... | |
the problem persists please contact your friendly " &_
"local IT department.")
End Try
' // end of line
```
I had also thought that I would need to make changes to the actual stored procedure, but, this turned out to be incorrect.
The code may not be pretty, and I need to do more work in my TRY bl... | [
0.19245922565460205,
0.28036177158355713,
0.6637209057807922,
0.24713146686553955,
0.1664276272058487,
-0.07758237421512604,
1.1932681798934937,
0.5855491757392883,
-0.18244127929210663,
-0.6940847039222717,
-0.17231015861034393,
0.8819928169250488,
-0.07082722336053848,
0.2181930541992187... | |
I'm trying to do something like this:
```
time() + timedelta(hours=1)
```
however, [Python doesn't allow it](http://bugs.python.org/issue1487389), apparently for good reason.
Does anyone have a simple work around?
### Related:
* [What is the standard way to add N seconds to datetime.time in Python?](https://stack... | [
0.34982573986053467,
-0.006562687922269106,
0.30213475227355957,
-0.121684230864048,
0.13511008024215698,
-0.010501551441848278,
0.24922385811805725,
-0.15849684178829193,
-0.428213506937027,
-0.43182191252708435,
0.07896895706653595,
0.4841354787349701,
-0.42520788311958313,
-0.1710764467... | |
I have a datagrid that I need to get a value out of after it has been populated. I'd prefer it not be dynamic (no clicking). The datagrids final product is a set of headers and one row
> `Header1| Header2| Header3`
>
> `Value1 | Value1 | Value1`
I'd like to be able to get any value regardless of its position but r... | [
-0.1040380597114563,
-0.03287073224782944,
0.9066058993339539,
0.0019021463813260198,
-0.23942840099334717,
0.03121461533010006,
-0.10689010471105576,
-0.23736433684825897,
-0.14583241939544678,
-0.8342720866203308,
-0.08519258350133896,
0.35970625281333923,
-0.09480283409357071,
-0.080723... | |
<asp:GridView DataKeyNames="uniqueName" id="ViewData" DataSourceID="srcView" Runat="server" AllowSorting="false" CellPadding="1" CellSpacing="1" Visible="true" GridLines="Vertical" Font-Size="X-Small">
<AlternatingRowStyle CssClass="alternating" />
</asp:GridView>
</asp:Panel>
... | [
-0.2713489532470703,
-0.4463362395763397,
0.7662816643714905,
0.1944504827260971,
-0.1319151222705841,
0.14906419813632965,
0.10639015585184097,
-0.5608503222465515,
-0.3582264184951782,
-0.4581308364868164,
-0.1162167564034462,
0.13005958497524261,
0.07582397013902664,
-0.0893262326717376... | |
Name="dateRange" ControlID="dateSelection" />
<asp:ControlParameter Name="dateProcessed" ControlID="MostRecent" />
</SelectParameters>
</asp:ObjectDataSource>
```
Instead of letting the GridView auto-generate your columns, you may want to create your own column templates. This way you would be able to give... | [
-0.07319416105747223,
-0.44602876901626587,
0.45609864592552185,
0.023160068318247795,
0.062299445271492004,
0.03638319671154022,
0.01645594649016857,
-0.19273070991039276,
-0.32950684428215027,
-0.5013694167137146,
0.12524445354938507,
0.020434413105249405,
-0.20473341643810272,
0.1381785... | |
will get you the cell containing the data you want):
```
TableCell myTableCell = myGridView.Rows[myGridView.Rows.Count - 1].Cells[2];
```
You can then get `myTableCell.Text` or if, for example, there was a TextBox control in it: `(myTableCell.Controls[0] as TextBox).Text`
Hope this helps. | [
-0.17839019000530243,
0.10524894297122955,
0.7236142754554749,
0.23256482183933258,
0.3878912925720215,
-0.06710666418075562,
0.05383732542395592,
0.12962158024311066,
-0.08027680218219757,
-0.899433970451355,
0.041696880012750626,
0.3462057113647461,
-0.21802769601345062,
0.03844121843576... | |
Using ildasm and a C# program e.g.
```
static void Main(string[] args)
{
}
```
gives:
```
.method private hidebysig static void Main(string[] args) cil managed
{
.entrypoint
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Program::Main
```
What does the hidebysig... | [
0.06549401581287384,
-0.11957256495952606,
0.2488255798816681,
-0.03847069665789604,
0.10150399059057236,
-0.33132120966911316,
0.028730496764183044,
-0.36549749970436096,
-0.16083639860153198,
-0.49729567766189575,
-0.20494036376476288,
0.24227826297283173,
-0.61046302318573,
0.1626152694... | |
a member in the
> derived class as either hide by name
> or hide by name-and-signature. Hiding
> is always performed based on the kind
> of member, that is, derived field
> names can hide base field names, but
> not method names, property names, or
> event names. If a derived member is
> marked hide by name, th... | [
0.15318071842193604,
-0.21428197622299194,
-0.1929035186767578,
0.2411731779575348,
-0.17604033648967743,
-0.18468575179576874,
0.3886405825614929,
-0.2622945308685303,
0.060764383524656296,
-0.5260106325149536,
-0.3763282299041748,
0.15274523198604584,
-0.30521586537361145,
0.358061611652... | |
the same kind with exactly
> the same name and type (for fields) or
> method signature (for methods) is
> hidden from the derived class.
> Implementation of the distinction
> between these two forms of hiding is
> provided entirely by source language
> compilers and the reflection library;
> it has no direct im... | [
0.2731045186519623,
-0.04069340229034424,
-0.10652834177017212,
0.09985730797052383,
0.06586972624063492,
-0.4929211437702179,
0.2812215983867645,
-0.08070424944162369,
-0.005659942515194416,
-0.5702007412910461,
-0.4349544048309326,
0.37540850043296814,
-0.5128102898597717,
0.090612500905... | |
method
> hides all methods of the base class
> types that have a matching method
> signature; when omitted, the method
> should hide all methods of the same
> name, regardless of the signature.
As an example, suppose you have:
```
public class Base
{
public void Bar()
{
}
}
public class Derived : Ba... | [
0.2545366585254669,
-0.1578027904033661,
0.1381353735923767,
-0.053387753665447235,
-0.10424548387527466,
-0.22292637825012207,
0.20181137323379517,
-0.5771070122718811,
0.24715295433998108,
-0.37608304619789124,
-0.0777667686343193,
0.27246764302253723,
-0.4926164150238037,
0.244366303086... | |
wouldn't be able to call `Bar()` at all on a reference of type `Derived`, although you could still cast it to Base and call it that way.
EDIT: I've just tried this by compiling the above code to a DLL, ildasming it, removing `hidebysig` for `Bar()` and `Bar(string)`, ilasming it again, then trying to call `Bar()` from... | [
0.11034135520458221,
0.013811971060931683,
0.23433728516101837,
-0.2990151345729828,
-0.17774303257465363,
0.02315373159945011,
0.4191175103187561,
-0.4950523376464844,
0.013146862387657166,
-0.4358459413051605,
-0.018009206280112267,
0.4728695750236511,
-0.35120558738708496,
0.08592015504... | |
I am running Visual Studio 2008 with SP1. When I debug an application, it will skip over my break points.
For example, I have two lines of code, each call a method. I will put a break point on both lines. I will run it one time, and it ill stop at the first break point, but not the next one. I will run it again, and i... | [
0.09858263283967972,
0.15539802610874176,
0.43576472997665405,
-0.16930469870567322,
-0.43886542320251465,
-0.10649432986974716,
0.5185845494270325,
-0.12904690206050873,
-0.18722520768642426,
-0.6650720238685608,
0.18493132293224335,
0.5202106237411499,
-0.4016043245792389,
0.033006411045... | |
(.pdb) is out of sync with your source code. A common symptom of this is:
* Stopping at a breakpoint on a line of code
* Stepping through the code
* Seeing the debugging pointer stop at a **blank line** of code
When debugging, you should never see the debugging pointer stop on a blank line, and this would indicate th... | [
0.2912161350250244,
0.015759959816932678,
0.07325927913188934,
0.006621807813644409,
0.28566715121269226,
-0.17165586352348328,
0.6792570352554321,
0.08460050821304321,
-0.38087698817253113,
-0.7845554351806641,
-0.38280555605888367,
0.40838879346847534,
-0.3903670012950897,
0.047372587025... | |
others) is that you aren't building a **Debug** configuration. While it is possible to debug a Release build, the code is significantly optimised which can make the debugger act strangely, e.g.
* Stepping through a conditional (i.e. if block) can make it appear that both the if and else cases are running
* Some bits o... | [
0.3078555464744568,
0.02436031587421894,
-0.16797645390033722,
0.04973315820097923,
-0.06927939504384995,
-0.24931558966636658,
0.5504830479621887,
-0.15168115496635437,
-0.4775555431842804,
-0.39298194646835327,
-0.44997137784957886,
0.4009692966938019,
-0.3077223300933838,
0.300618737936... | |
will generally not be set properly (although it will usually move to the next line of "real" code). However, if your line of code initialises the variable:
```
long numObjects = 5;
```
the breakpoint **can** be set. | [
0.3055975139141083,
-0.035063572227954865,
0.0750105157494545,
-0.25660577416419983,
0.21969778835773468,
-0.28730764985084534,
0.215934157371521,
-0.26371896266937256,
0.04883699491620064,
-0.3624127507209778,
-0.5936404466629028,
0.37073564529418945,
-0.20934046804904938,
0.1752034723758... | |
How do I disable the context menu in the IE `WebBrowser` control and instead perform custom handling of the right-click event in C#?
```
WebBrowser browser;
browser.Document.ContextMenuShowing += new HtmlElementEventHandler(MyCustomContextMenuMethod);
``` | [
0.10984306037425995,
0.16388677060604095,
0.5983465909957886,
0.04691670835018158,
0.16792799532413483,
-0.3687366247177124,
0.44202378392219543,
-0.20417910814285278,
0.05007530376315117,
-0.746883749961853,
-0.12641966342926025,
0.6110358238220215,
-0.2742181122303009,
0.1126212701201438... | |
I am building a standard asp.net LOB application. i am planning to have some livelink urls showing up in some parts of the application, where the user clicks a download link and the document needs to be downloaded from the corresponding livelink URL and a save-as dialog needs to come up.
for any direct http document ... | [
0.564396858215332,
-0.005427760072052479,
0.5643852353096008,
-0.023885143920779228,
0.009016316384077072,
-0.17042972147464752,
0.024500364437699318,
0.16560569405555725,
-0.18525339663028717,
-0.8155048489570618,
-0.16940301656723022,
0.3335117697715759,
-0.061513230204582214,
0.19345457... | |
access the document content.
i was wondering if there are any standard APIs/webservices that allow integration with livelink, such that a handshake can be done and a given document can be retrieved.
any ideas?
I believe you have at least 2 options:
1. Construct the LiveLink URL correctly - this can be done by spec... | [
0.395977258682251,
-0.3029099404811859,
0.7134919166564941,
0.3981087803840637,
0.1724761575460434,
-0.30591776967048645,
0.1100212037563324,
0.09620127826929092,
-0.14367829263210297,
-0.793124794960022,
-0.18953059613704681,
0.6687473654747009,
-0.010384290479123592,
-0.06136664748191833... | |
I have worked with JFreeChart in a few Java projects. I wonder if there is something similar I can use in Delphi for Win32 or if you know about a nice free chart library for Delphi. I'm working with Delphi 2006. I know there is already TChart but it looks a bit "old".
My researchs bring me to TMS Advanced Charts but it... | [
0.20017462968826294,
-0.12661047279834747,
0.49656590819358826,
0.2248307764530182,
-0.12375777214765549,
-0.08776271343231201,
0.07130759209394455,
0.2765018045902252,
-0.47399893403053284,
-0.8929865956306458,
0.2516923248767853,
0.6469093561172485,
0.2837478518486023,
0.0481676384806633... | |
I am planning to design an application which will provide a video of a car on a track (just like a demo of a game like RACE Pro), and depict its characteristics.
For example, if the user selects a poor handling car, then a graphical demo will be shown of that car completing a lap around a modelled track with the car's... | [
0.5207541584968567,
0.12522342801094055,
-0.07463902980089188,
0.21722263097763062,
-0.08185096830129623,
0.01744520105421543,
0.25069209933280945,
-0.08015607297420502,
0.031219441443681717,
-0.1946878433227539,
0.2927904725074768,
0.6318301558494568,
0.11115659773349762,
-0.0395991615951... | |
books on physics in programming and game engine/3d modelling and rendering engines. Are these relevant to this?
What about simply changing the encoding for the Stylesheet as well as its output to UTF-8? The characters you mention are `“`, `–` and `’`. Certainly not invalid or so, given the correct encoding (the charact... | [
0.33421704173088074,
0.32622578740119934,
0.11666147410869598,
0.4149010181427002,
0.028270525857806206,
-0.21540462970733643,
-0.2553156316280365,
-0.04120046645402908,
-0.14872495830059052,
-0.39486560225486755,
-0.1924634575843811,
0.2511288821697235,
-0.09453998506069183,
-0.0394655205... | |
Every text I've read about Ruby symbols talks about the efficiency of symbols over strings. But, this isn't the 1970s. My computer can handle a little bit of extra garbage collection. Am I wrong? I have the latest and greatest Pentium dual core processor and 4 gigs of RAM. I think that should be enough to handle some S... | [
0.4537600576877594,
0.3793681561946869,
-0.03964439779520035,
0.1545419991016388,
-0.08720924705266953,
0.09863793849945068,
0.3874978721141815,
0.09580007940530777,
-0.5396748781204224,
-0.684268057346344,
0.41188308596611023,
0.08811573684215546,
0.1223396584391594,
0.12274529039859772,
... | |
with limited memory?
There are a lot of places you can get away with using strings willy-nilly, but in some you can't. It all depends on the context. | [
0.48773908615112305,
-0.30582112073898315,
-0.14017747342586517,
0.5222838521003723,
0.0014293352141976357,
0.06139211729168892,
0.10217426717281342,
-0.05231533199548721,
-0.400847852230072,
-0.1014205664396286,
0.027785899117588997,
0.3004457950592041,
-0.01812574453651905,
-0.2236578911... | |
In most modern shells, you can hit the up and down arrows and it will put, at the prompt, previous commands that you have executed. My question is, how does this work?!
It seems to me that the shell is somehow manipulating stdout to overwrite what it has already written?
I notice that programs like wget do this as we... | [
-0.05084583908319473,
0.16882790625095367,
0.36625999212265015,
-0.2762361764907837,
-0.11606510728597641,
-0.05264423042535782,
0.12983328104019165,
-0.1424715518951416,
-0.2987670600414276,
-0.5110095739364624,
-0.15983814001083374,
0.7474750876426697,
-0.3977626860141754,
-0.15792322158... | |
"======================================>";
int main() {
int i;
for (i = 77; i >= 0; i--) {
printf("[%s]\r", &bar[i]);
fflush(stdout);
sleep(1);
}
printf("\n");
return 0;
}
```
That's pretty close to `wget`'s output, right? `\r` is a carriage-return, which the terminal inter... | [
0.04077640920877457,
-0.06607777625322342,
0.6924916505813599,
-0.4538726508617401,
0.22588297724723816,
0.07650052756071091,
0.01552706491202116,
-0.22216472029685974,
-0.1900824010372162,
-0.5054998397827148,
-0.380630224943161,
0.8308983445167542,
-0.36988988518714905,
0.223083704710006... | |
Readline library](http://directory.fsf.org/project/readline/), which provides much more general functionality, including detecting terminal types, history management, programmable key bindings, etc.
One more thing -- when in doubt, the source for your wget, your shell, etc. are all available. | [
0.2630743384361267,
-0.3218446671962738,
0.1665802299976349,
0.1946648359298706,
0.32253676652908325,
-0.29867857694625854,
-0.12596875429153442,
0.02676892839372158,
-0.1342938393354416,
-0.6616663932800293,
-0.12202133983373642,
0.43438708782196045,
-0.21348802745342255,
-0.0914619117975... | |
So, I've been working on some playing cards in Java. (Not for any practical purpose really, I just enjoy playing cards and they're good practice) Now, right now, I'm making some Card Structures, decks, hands, piles, etc. They're all essentially the same, so I figure that I'd like to use some inheritance.
The problem t... | [
0.3718680739402771,
0.08403840661048889,
0.013493466190993786,
-0.003977262414991856,
-0.03796195611357689,
-0.11959389597177505,
-0.3057778477668762,
-0.49372005462646484,
-0.6283628940582275,
-0.6162450909614563,
0.2806323170661926,
0.010376857593655586,
-0.09735932946205139,
0.078138232... | |
is something more efficient than an ArrayList to use, that would be good to know as well).
So, when trying to write an abstract class, I'd like to avoid using abstract methods (as it defeats the original purpose of making an abstract class, to conserve code). But, all of these methods rely on the core collection, for o... | [
0.17250604927539825,
-0.1397574096918106,
0.37075114250183105,
0.18551447987556458,
0.19169658422470093,
-0.2321212887763977,
-0.20777231454849243,
-0.3640035390853882,
-0.42014071345329285,
-0.40362945199012756,
0.007742814254015684,
0.508461058139801,
-0.3538205921649933,
0.1419759541749... | |
super();
}
public CardSet(Card[] cards)
{
super();
for(Card c: cards)
elCollection.add(c);
}
public void add(Card c)
{
elCollection.add(c);
}
}
public class Pair extends CardSet //Pair is just a dummy class to get inheritance right
{
ArrayList<Ca... | [
0.2736600935459137,
-0.5545568466186523,
0.6123365759849548,
-0.05923737585544586,
-0.10635049641132355,
0.013196652755141258,
-0.1723594069480896,
-0.7209318280220032,
-0.32138916850090027,
-0.25741857290267944,
-0.1896110326051712,
0.4469984471797943,
-0.5436061024665833,
0.1091326624155... | |
public Pair()
{
elPair = new ArrayList<Card>(); //elPair is defined, because casting
elCollection = elPair; // elCollection to arraylist would be a pain.
}
public Pair(Card[] cards)
{ this();
super(cards);
}
}
```
First off, forgive my variable names. I used to na... | [
0.11878299713134766,
-0.3106096386909485,
0.32831844687461853,
-0.18631388247013092,
-0.15572524070739746,
-0.06870315968990326,
0.033284153789281845,
-0.6223102807998657,
-0.0851486548781395,
-0.4969835877418518,
-0.01395456027239561,
0.7297053933143616,
-0.561469316482544,
0.061794161796... | |
yourself somehow, right?) Also, using protected was just for the sake of simplicity.
Now, the general idea seems to work, defining a variable in the abstract class, and then defining an alias of it in the child class, but I'm not so sure that it's a great practice.
The real problem I'm having is with the constructor. ... | [
0.5325904488563538,
-0.11930520832538605,
0.08373044431209564,
0.2689482867717743,
0.023124251514673233,
0.08226542919874191,
0.1700853705406189,
-0.3128393292427063,
-0.2054355889558792,
-0.301340788602829,
0.28036585450172424,
0.5808291435241699,
-0.2894842028617859,
-0.06419118493795395... | |
around this? Is this even a viable way of handling inheritance?
Just have each implementation pass down the collection type in the constructor:
```
public abstract class CardSet<C extends Collection<Card>>
{
protected final C elCollection;
public CardSet<Collection<Card>> cardSet()
{
return new Car... | [
-0.050968628376722336,
-0.23215730488300323,
0.8478090763092041,
0.16393522918224335,
0.17232877016067505,
-0.27090999484062195,
-0.39595717191696167,
-0.6377785801887512,
-0.5196390748023987,
-0.20482899248600006,
-0.3260399401187897,
0.38934147357940674,
-0.3639419674873352,
0.1645016372... | |
for(Card c: cards)
elCollection.add(c);
}
public void add(Card c)
{
elCollection.add(c);
}
}
public class Pair extends CardSet<List<Card>>
{
public Pair()
{
super(new ArrayList<Card>());
}
public Pair(Card[] cards)
{
super(new ArrayList<Card>(),... | [
0.11790760606527328,
-0.499863862991333,
0.6377301812171936,
-0.15155774354934692,
-0.038187697529792786,
0.16008451581001282,
-0.25234806537628174,
-0.7624666690826416,
-0.2813110947608948,
-0.46309590339660645,
-0.2953741252422333,
0.579216718673706,
-0.5573055744171143,
-0.0251318924129... | |
}
```
You may have to play a little bit with the declarations, but that should see you right | [
0.36763542890548706,
0.2648087441921234,
0.07513236254453659,
0.12299076467752457,
0.1649799942970276,
-0.548231303691864,
-0.010395833291113377,
0.3448497951030731,
0.041355833411216736,
-0.536226749420166,
0.2004442662000656,
0.7268804907798767,
-0.037966761738061905,
0.13564100861549377... | |
I've got a xaml TabControl and on one page, there are 3 RadioButtons each bound to a different property on the selected value of an adjacent ListView. After switching between selected items in the ListView, my radio buttons seem to forget they're bound and don't refresh.
So watching it in the debugger, when I switch t... | [
0.3041660785675049,
0.29522716999053955,
0.587037980556488,
0.008044562302529812,
-0.06516456604003906,
-0.12521301209926605,
0.41298240423202515,
-0.38735055923461914,
-0.13234642148017883,
-0.49709442257881165,
-0.12062820792198181,
0.5467101335525513,
-0.28272268176078796,
0.11091439425... | |
binding itself is fairly straightforward. a TwoWay binding of a bool property to IsChecked. It's 4 levels deep (Path=DataModel.Selected.A.B), but I have other things at the same depth that work fine.
Is this something people have heard about and know what might be going on? Or if the binding is somehow getting forgott... | [
0.35686418414115906,
-0.013252305798232555,
0.5022628903388977,
-0.1113867312669754,
-0.17369116842746735,
-0.42996081709861755,
0.435871422290802,
-0.4783814251422882,
-0.12049973756074905,
-0.678786039352417,
0.02531086653470993,
0.28792572021484375,
-0.49551448225975037,
0.1974539756774... | |
radiobutton a different GroupName and then they don't try to mess with eachother | [
0.5326226353645325,
0.29718858003616333,
0.340546190738678,
0.0749695897102356,
-0.27108216285705566,
-0.6292009353637695,
0.3037782609462738,
-0.01277198363095522,
0.1620367020368576,
-0.16168184578418732,
-0.03862067684531212,
0.6870850324630737,
-0.38423463702201843,
-0.0435544885694980... | |
I'm currently using the following code to scan files that have been uploaded as part of an application form:
```
$safe_path = escapeshellarg($dir . $file);
$command = '/usr/bin/clamscan --stdout ' . $safe_path;
$out = '';
$int = -1;
exec($command, $out, $int);
if ($int == 0) {
// all good;
} else {
// VIRUS!;... | [
0.11422162503004074,
0.12087137997150421,
0.5967147350311279,
-0.07608073204755783,
0.18341149389743805,
-0.23483841121196747,
0.6248605847358704,
-0.33925408124923706,
-0.26202571392059326,
-0.875593364238739,
-0.10174614191055298,
0.6209166646003723,
-0.37322404980659485,
0.1623518615961... | |
interim "Please be patient your files are being scanned" message, but am not sure how to go about that either.
EDIT: Sorry, should have said the scan needs to be done at the time as the application in question won't be accepted without valid (i.e virus-free) files.
If you don't need to display the results to the user ... | [
0.24116136133670807,
-0.1306527704000473,
0.630609929561615,
-0.07029607146978378,
0.10750763863325119,
-0.26438194513320923,
-0.018197206780314445,
-0.11012637615203857,
-0.4390149712562561,
-0.47932299971580505,
0.1553243100643158,
0.5063073635101318,
-0.03833789750933647,
-0.06088440492... | |
same request, then you could do it exactly as I said before but outputting a temp page requesting the results via AJAX; once the scan is over, redirect the user to the results page.
If you don't want to use JavaScript, then a simple meta refresh tag would do the trick. | [
0.27301353216171265,
-0.38216906785964966,
0.3921782672405243,
0.1526811569929123,
-0.2794329524040222,
-0.13955961167812347,
0.32386767864227295,
-0.3234269917011261,
-0.040479373186826706,
-0.8153022527694702,
-0.03749857470393181,
0.6709107756614685,
-0.4382864236831665,
0.0012694840552... | |
I'm doing:
```
alert($("#div").text());
```
on something like this:
```
<div id="div">
<div>
Some text
<div>
</div>
```
Why the escaped content? Because it is sometimes malformed and I don't want it interfering with or breaking the rest of the document.
In FF it shows up preserving newlines. In IE7 i... | [
0.29925107955932617,
0.054614268243312836,
0.4718259274959564,
-0.10389624536037445,
-0.03736824914813042,
-0.2744068503379822,
0.554078996181488,
-0.10757666081190109,
-0.16635771095752716,
-0.8418121337890625,
-0.10259789228439331,
0.5522211194038391,
-0.48829349875450134,
0.066873051226... | |
>
> The HTML standard requires a
> transformation on display of content.
> **All kinds and amounts of adjacent
> whitespace are collapsed into a single
> space.** This is a good thing - just as
> an example, it allows me to add a lot
> of line breaks into this source file
> without having to worry about weird
>... | [
0.04055022448301315,
-0.14962397515773773,
0.42311814427375793,
0.016529174521565437,
-0.3948628604412079,
-0.25483641028404236,
0.46039387583732605,
-0.07006803154945374,
-0.48505640029907227,
-1.087619423866272,
-0.2599937617778778,
0.1979779452085495,
-0.38280266523361206,
0.07004339993... | |
if the
> in-memory representation is already
> normalized, then the browser doesn't
> have to normalize whenever it needs to
> display the text.
>
>
> There are exceptions to the
> normalization rule, though. Notably,
> these are the <textarea> element, the
> <pre> element and, in CSS-aware
> browsers, elemen... | [
-0.3809927999973297,
-0.11236246675252914,
0.2247125506401062,
-0.04256746172904968,
-0.05034078657627106,
0.014776671305298805,
0.21668680012226105,
0.23917120695114136,
-0.23954787850379944,
-0.7796132564544678,
-0.41473090648651123,
0.27283573150634766,
-0.3611961901187897,
0.0845955163... | |
Internet Explorer will normalize
> all assignments to the innerHTML
> property, thus causing the effect
> demonstrated below.
>
>
> This text fills the textarea at page
> load. This, too, contains line breaks
> and multiple spaces. Formatting is
> preserved here as well, except that
> the UA may break lines.
... | [
-0.20776981115341187,
-0.017472561448812485,
0.7355555295944214,
-0.167344331741333,
-0.027571165934205055,
-0.318555623292923,
0.3391481339931488,
0.0561833381652832,
0.19717292487621307,
-1.2874342203140259,
-0.32596278190612793,
0.3089391887187958,
-0.4113350808620453,
-0.20893813669681... | |
I've been evaluating a framework that on paper looks great. The problem is that the sample code is incomplete and of poor quality. The supplied reference implementations are for the most part not meant to be used (so they can be considered as sample code as well) and have only succeeded at confusing me.
I know that it... | [
0.6117261052131653,
0.33656808733940125,
-0.17513389885425568,
0.09755244851112366,
0.19374163448810577,
-0.06710845232009888,
0.5244840979576111,
-0.16108068823814392,
-0.010468960739672184,
-0.5873335003852844,
0.10520347952842712,
0.5818373560905457,
0.006521303206682205,
-0.20377351343... | |
if someone doesn't put the effort into spell checking their resume, they probably won't get the job...
Poor code samples combined with poor documentation will make me turn away from a library unless there is a compelling reason to use it. However, a library that has *either* good code samples *or* good documentation is... | [
0.8874548673629761,
0.46355652809143066,
-0.06515254080295563,
0.2446480393409729,
0.2977321147918701,
-0.26756522059440613,
0.5611234903335571,
-0.11077414453029633,
-0.17346921563148499,
-0.556245744228363,
-0.0158451646566391,
0.33990323543548584,
0.35322993993759155,
-0.267702430486679... | |
I am wrapping up an application where I am using a lot of Dictionary classes to store Function and Action delegates. I am now refactoring my project a bit and cleaning code. My question is where do or would you put your Dictionary classes in your project structure? Right now, they are located within the calling class s... | [
0.43490317463874817,
0.054998837411403656,
-0.08918721228837967,
0.4888995885848999,
-0.11178819090127945,
-0.12210781127214432,
0.36038148403167725,
-0.020118338987231255,
-0.10705184936523438,
-0.7708892822265625,
0.29748135805130005,
0.5771566033363342,
0.035844434052705765,
0.408499240... | |
from inheriting multiple copies of different superior classes. This can occur in any case where there may be multiple inheritance -- as you correctly note, the "diamond problem", which is to say where the inheritance graph is a DAG instead of a strict tree.
The [C++ FAQ goes into it in some detail](http://www.parashif... | [
0.36926332116127014,
-0.03477747365832329,
-0.42144352197647095,
0.029675409197807312,
-0.19052501022815704,
-0.2803814113140106,
0.1749470829963684,
-0.38249385356903076,
-0.49611982703208923,
-0.2609049081802368,
-0.08764497190713882,
0.46596798300743103,
-0.2014152705669403,
0.402995496... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.