text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
allow `ALTER TABLE` commands that would break foreign key constraints. | [
-0.1500200480222702,
-0.10976468026638031,
0.10343556106090546,
0.0001418108877260238,
0.04450036212801933,
-0.26827165484428406,
0.09184108674526215,
0.1416861116886139,
-0.21971368789672852,
-0.28552567958831787,
-0.5553455352783203,
0.44424766302108765,
-0.5168394446372986,
-0.120313793... | |
I often write something in gVim, then need to copy-paste it into another application.
Is there an easy way to yank the entire file? I usually do something like this
`g``g``V``G``"``+``y`
(Go to top, visual-line mode, go to bottom, yank)
But is there a better way that I'm missing out on?
I use the following instruc... | [
0.12844376266002655,
-0.2156418263912201,
0.2834765315055847,
0.11190979927778244,
0.02039584144949913,
-0.04809467867016792,
0.3107088804244995,
0.15231046080589294,
-0.11087756603956223,
-0.2360791265964508,
-0.21594689786434174,
0.844292938709259,
-0.21121758222579956,
-0.07927446812391... | |
I have a report that was taking a long time to execute. I ran the database engine tuning advisor and one of the recommendations was to create 2 indexes. However, I noticed that the indexes were the same columns, but in different orders.
Here is the table:
```
---Locations---
| *LocationID |
| Code |
| ...more.... | [
-0.43069538474082947,
0.06951646506786346,
0.5952516198158264,
0.11609149724245071,
-0.017560577020049095,
0.19576482474803925,
-0.13729466497898102,
-0.172028586268425,
-0.3471020758152008,
-1.0411365032196045,
-0.28395238518714905,
-0.033908553421497345,
-0.27997538447380066,
0.608886659... | |
(SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_Locations_Loc_Reg_Div] ON [dbo].[Locations]
(
[LocationID] ASC,
[RegionID] ASC,
[DivisionID] ASC
)
INCLUDE ( [Code]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING... | [
-0.3459832966327667,
0.0555979385972023,
0.6607282161712646,
0.012002537027001381,
0.09033378213644028,
0.2632787227630615,
-0.026291245594620705,
-0.3492298126220703,
-0.46428194642066956,
-0.8606524467468262,
-0.44404318928718567,
0.2387700378894806,
-0.4411587715148926,
0.06287000328302... | |
considering to make that reccomendation. | [
0.09300673007965088,
0.15011365711688995,
0.10313209146261215,
-0.04733317345380783,
-0.04417809471487999,
0.1444234549999237,
-0.019557958468794823,
0.023434024304151535,
-0.08968751132488251,
-0.16427204012870789,
0.1421804130077362,
0.21707260608673096,
0.026154622435569763,
0.190547719... | |
I run iPlanet's Java application server, something in it is loading `commons-logging-1.0.4.jar`.
That's fine until one of my applications calls `AuthSSLProtocolSocketFactory` which is another apache library that also uses `commons-logging`.
I put the jar on the jvm classpath and get this error:
> `Invalid class load... | [
0.1569625288248062,
0.3792458474636078,
0.03554890677332878,
-0.02710084058344364,
-0.21965879201889038,
-0.0702531635761261,
0.4227197468280792,
-0.04341892525553703,
-0.3059106767177582,
-0.6831777691841125,
0.37455275654792786,
0.3973267674446106,
-0.5978513360023499,
0.4053933322429657... | |
configuration that mentions it) so when my application goes to load it a second time it throws that exception.
I can't change the web server, and I can't change the apache library. Suggestions?
Are you putting commons logging in your classpath explicitly? You said jvm classpath, so I assume you are specifying it on th... | [
0.30523908138275146,
0.10647227615118027,
0.09946971386671066,
0.024949083104729652,
-0.20079855620861053,
-0.13520662486553192,
0.11119378358125687,
-0.07834617793560028,
-0.37225446105003357,
-0.82329922914505,
0.18148399889469147,
0.5412687063217163,
-0.4992871582508087,
0.2173134535551... | |
and the iPlanet one should be picked up automatically. | [
0.17018115520477295,
-0.17321237921714783,
0.35783517360687256,
0.2486840933561325,
0.04456275701522827,
0.02047864906489849,
-0.36567801237106323,
0.3703335225582123,
-0.22400639951229095,
-0.37246519327163696,
-0.15129181742668152,
0.4239639937877655,
-0.29387959837913513,
-0.06281714141... | |
When I select multiple lines of code and want to indent them as usual with `TAB` key, it just deletes them all. I come from Eclipse where I always did it that way. How's that done in Xcode? I hope not line by line ;)
The keyboard shortcuts are `⌘`+`]` for indent and `⌘`+`[` for un-indent.
* In Xcode's preferences win... | [
0.11984463781118393,
-0.08019853383302689,
0.38396918773651123,
-0.04264110326766968,
-0.12238603085279465,
0.25042781233787537,
0.24207735061645508,
0.08641435205936432,
-0.009416221641004086,
-0.7375763058662415,
0.007451994810253382,
0.6187203526496887,
-0.21409913897514343,
-0.17572054... | |
Trying to rename a series of files on a linux server. Finding the files I want is easy:
```
find . -type f -wholename \*.mbox
```
Of course, being mbox files, some of them have spaces in the names, so it becomes:
```
find . -type f -wholename \*.mbox -print0
```
I'm piping to xargs so that I can rename the files:... | [
0.21319670975208282,
0.2516484260559082,
0.24935473501682281,
-0.2745346426963806,
-0.02530864253640175,
0.035832300782203674,
0.5235840082168579,
0.03741824999451637,
-0.23064717650413513,
-0.5876792073249817,
-0.3034823536872864,
0.49851030111312866,
-0.5444862246513367,
0.22560316324234... | |
not adding a lot of looping constructs around it.
Try
```
find . -type f -wholename \*.mbox | sed 's/\(.*\)\.mbox/mv "\1.mbox" "\1"/' | sh
```
This is not 100% fool proof should some of the files contain double quote characters, but I assume you can ignore that :) | [
0.28555116057395935,
0.30829760432243347,
0.28647148609161377,
0.03148746117949486,
0.08059857040643692,
-0.27018874883651733,
0.5910331010818481,
-0.11772632598876953,
-0.03361678868532181,
-0.3562641441822052,
-0.2132585197687149,
0.4388761520385742,
-0.2567634880542755,
-0.1522704958915... | |
I've got a function which fills an array of type sbyte[], and I need to pass this array to another function which accepts a parameter of type byte[].
Can I convert it nicely and quickly, without copying all the data or using `unsafe` magic?
Yes, you can.
Since both `byte` and `sbyte` have the same binary representati... | [
0.44431939721107483,
0.2360009402036667,
0.26720014214515686,
-0.16880090534687042,
-0.08664382994174957,
0.22166332602500916,
0.462470144033432,
-0.7245194911956787,
-0.20904210209846497,
-0.6245643496513367,
0.009728064760565758,
0.5358349680900574,
-0.38427984714508057,
-0.1654128432273... | |
A while ago I had asked how to make a collapsible comment box like Stackoverflow
The original question is [found here](https://stackoverflow.com/questions/456163/how-to-make-collapsible-comment-box-like-stackoverflow)
However since then I came across another problem which I am not entirely sure how to go about solvin... | [
-0.08552931994199753,
0.10248902440071106,
0.28124159574508667,
0.09723974764347076,
-0.2525809109210968,
0.07028164714574814,
-0.017025543376803398,
0.08564683049917221,
-0.29481589794158936,
-0.5497565865516663,
0.16767694056034088,
0.33365777134895325,
-0.41322648525238037,
0.1363382637... | |
script is only being executed for the first one in the list, and I need to to be dynamic.
In otherwords just like the links that open the comment box in my original question, each one has a unique id.
How do I do the same for the script that monitors the character input.
```
$(function(){
$('#comment').keyup(fun... | [
-0.23930661380290985,
-0.5160541534423828,
0.5671706795692444,
-0.2362142652273178,
-0.00830307137221098,
0.2470824122428894,
0.23005561530590057,
-0.03586570546030998,
-0.21925032138824463,
-0.493715763092041,
-0.21359512209892273,
0.8068860173225403,
-0.5770556926727295,
-0.1569254994392... | |
})
});
```
However when you open one and then open another the second one takes control...
To my idea your comment boxes are added dynamically. The problem is that since you have multiples ones that won't work because **an id is unique** so it only applies to one, so instead of selecting them by id as you have, you c... | [
0.056347768753767014,
-0.22323337197303772,
0.40561407804489136,
-0.09265177696943283,
0.017814312130212784,
0.05038236081600189,
-0.005988150369375944,
-0.31615936756134033,
-0.20752409100532532,
-0.6475536823272705,
-0.37761160731315613,
0.699278712272644,
-0.6531828045845032,
0.10487382... | |
work is keep your jquery set the way it is for the condition, but each tag have to have a unique name to it, either add something to the class to make it unique, but so the jquery will still know it falls under the selector branch or append a different number to each id tag | [
0.6265153884887695,
-0.513735830783844,
-0.05846470221877098,
0.26999369263648987,
-0.024711469188332558,
-0.30858802795410156,
0.02071480266749859,
-0.34474730491638184,
-0.12564344704151154,
-0.4132128655910492,
0.04583444818854332,
0.5117791891098022,
-0.042246460914611816,
-0.164434909... | |
I have a small network in which there are 2 electronic devices and one desktop connected using a switch. Through the desktop with Ethereal/wireshark installed on it, can I sniff the packets that are being communicated between the 2 electronic devices?
I cannot install ethereal or wireshark on either of the electronic ... | [
0.7289991974830627,
0.43308740854263306,
0.16413065791130066,
0.18289148807525635,
-0.0673636868596077,
-0.11061988770961761,
0.0965222716331482,
-0.18206186592578888,
-0.14967404305934906,
-0.7668125629425049,
0.3345765471458435,
0.19141042232513428,
-0.46612924337387085,
-0.0220091771334... | |
Would anyone know if when you catch an UnauthorizedAccessException in C# its possible to access the path that threw it? I dont want the error message just the path that caused the problem. The try catch block I have could catch on a number of different ones but I need to report it it and continue on to the next directo... | [
0.6012855768203735,
0.36461663246154785,
-0.14382223784923553,
0.28820377588272095,
0.033461228013038635,
-0.3148617148399353,
0.2514703869819641,
-0.1230475977063179,
-0.20686914026737213,
-0.3847622573375702,
0.2698001563549042,
0.509380042552948,
-0.1484895646572113,
0.02922072261571884... | |
utility method - i.e.
```
TryCopyFile(path1);
TryCopyFile(path2);
TryCopyFile(path3);
```
Where `TryCopyFile` catches the exception and logs the (single) path that was passed as an argument. | [
-0.37145331501960754,
-0.15188656747341156,
-0.05024641379714012,
0.1464666873216629,
0.033171240240335464,
-0.02047072723507881,
0.23023666441440582,
-0.24881282448768616,
-0.17348165810108185,
-0.3736245930194855,
-0.3744201362133026,
0.18581919372081757,
-0.44852927327156067,
-0.0690174... | |
A colleague and I had a heated debate yesterday whether it is safe to send login credentials via URL parameters as a means of authentication. He correctly pointed out that HTTPS encrypts all non-hostname/port characters in a URL before sending a request to the server side.
However, I still think there are edge cases h... | [
0.39710432291030884,
0.11362301558256149,
0.18830429017543793,
0.09667108207941055,
-0.08644942939281464,
-0.16845856606960297,
0.26544588804244995,
-0.14197175204753876,
-0.2219604104757309,
-0.3588373363018036,
0.11743702739477158,
0.28074145317077637,
-0.030327441170811653,
0.4312894046... | |
I have 14 LINQ queries to resolve in one method. None of them have a base query that I could hang them from as subqueries and then store the results as properties of an anonymous type instance.
Rather than making 14 separate calls to the database, how can I ensure that they are all called in the same operation?
**UPD... | [
0.06119001656770706,
0.27514904737472534,
0.6288074254989624,
0.0591529905796051,
0.0233948715031147,
0.28245505690574646,
0.39549127221107483,
-0.21916954219341278,
-0.3751543164253235,
-0.5146401524543762,
0.08553510159254074,
0.34207087755203247,
-0.23505178093910217,
0.288296639919281,... | |
select new {
Property1 = (from...),
Property2 = (from...),
PropertyN = (from...),
}).First();
```
**UPDATE 2**
It has been implied in one of the answers that doing this may create MARS (Multiple Active Result Set) errors. What are these errors (I have | [
0.4615795612335205,
0.001989973708987236,
0.4172070026397705,
-0.0328228622674942,
0.39455312490463257,
0.18815545737743378,
-0.08500142395496368,
-0.6366603970527649,
-0.14326386153697968,
-0.6932905912399292,
-0.14937442541122437,
0.8216412663459778,
-0.028055306524038315,
0.401698321104... | |
never seen one), why do they occur and is there anything wrong the whole premise of this line of questioning? i.e. Am I flawed in my assertion that asking the database to return everything in one go is going to be quicker/more efficient than doing fourteen wholly separate LINQ queries?
**UPDATE 3**
I think my approac... | [
0.17892339825630188,
-0.1189490407705307,
0.24673594534397125,
0.17799293994903564,
-0.07972194999456406,
-0.0026069229934364557,
0.19530855119228363,
-0.11110176891088486,
-0.40371933579444885,
-0.14023537933826447,
-0.09961399435997009,
0.48079490661621094,
-0.31575635075569153,
0.227803... | |
data object is called.
Edit:
The MARS error occurs when you have multiple open data readers for a connection. By default with SQl 2005 this is turned off. in your query, while all the SQL is being passed in one hit your still returning 14 datareaders. The datareader takes that connection exclusivly unless you tell th... | [
-0.1817694455385208,
0.21672102808952332,
0.6358354091644287,
0.22360388934612274,
-0.14301250874996185,
-0.02454422414302826,
0.2991669774055481,
-0.11490364372730255,
-0.42560869455337524,
-0.4337484538555145,
-0.12108471244573593,
0.7110692858695984,
-0.304104208946228,
0.46785846352577... | |
connectionString="Data Source=<server>;Initial Catalog=<database>;Integrated Security=True;MultipleActiveResultSets=true" providerName="System.Data.SqlClient"/>
``` | [
-0.07953744381666183,
0.015403246507048607,
0.367633193731308,
0.13173727691173553,
0.19761624932289124,
-0.18412502110004425,
0.186279296875,
-0.06230434402823448,
-0.4242229461669922,
-0.6238176822662354,
-0.16861672699451447,
0.3344920575618744,
-0.3151140809059143,
0.24823728203773499,... | |
Long speech short: **How can I make hundreds of simultaneously running processes communicate with a database through one or few permanent sessions?**
The whole story:
I once built a number crunching engine that handles vast amounts of large data files by forking off one child after another giving each a small numbe... | [
0.40716060996055603,
0.27177348732948303,
-0.07913357019424438,
0.025431668385863304,
-0.17653322219848633,
0.04145488515496254,
0.274129182100296,
0.25062817335128784,
0.06785738468170166,
-0.13602620363235474,
-0.05790400877594948,
0.3314841687679291,
-0.08947091549634933,
0.114770509302... | |
(one per child, and they can be very short-lived) constantly being opened and closed is becoming an issue. I now want to centralise database access so that there are only one or few fixed database sessions which handle all database access for all the (sub-)processes. The presence of the database abstraction module shou... | [
0.12039904296398163,
0.02232799120247364,
0.18969884514808655,
0.04047604277729988,
0.19243308901786804,
0.26035836338996887,
0.10777460038661957,
0.16634732484817505,
-0.5995689034461975,
-0.4872123599052429,
-0.16693176329135895,
0.25981006026268005,
-0.24659398198127747,
0.4010082781314... | |
queueing, but couldn't come up with a way of connecting a large herd of requestors with one or few database connectors in a way so that bidirectional communication is possible (for collecting the query result).
An asynchronous approach could help here in that all requests are written to the same queue and the databa... | [
0.3467737138271332,
-0.4408092200756073,
0.5051010251045227,
0.2469601333141327,
-0.2810684144496918,
0.3592028319835663,
-0.2536763846874237,
-0.07751309126615524,
-0.5697610378265381,
-0.5869349241256714,
0.22178111970424652,
0.3260398507118225,
-0.607017457485199,
0.09230320155620575,
... | |
require massive changes to the code base that I'm not prepared to do to a live system.
The more I think of it, the more the base idea looks like a pre-forked web server to me only that it doesn't serve web pages but database queries. Any ideas on what to dig into, and where? Sample (pseudo) code to inspire me, links ... | [
0.4579615592956543,
-0.000161111427587457,
0.11301027238368988,
0.3439267575740814,
0.05005451664328575,
-0.15482501685619354,
0.17731644213199615,
0.06504201143980026,
-0.16655074059963226,
-0.3140917718410492,
0.03925248980522156,
0.41119614243507385,
0.02726846933364868,
0.3001381456851... | |
I was messing around with LinqToSQL and LINQPad and I noticed that SingleOrDefault() doesn't do any filtering or limiting in the generated SQL (I had almost expected the equivalent of Take(1)).
So Assuming you wanted to protect yourself from large quantities accidentally being returned, would the following snippet be... | [
0.3929128348827362,
-0.08260589838027954,
0.4247293174266815,
-0.006087897811084986,
-0.17313113808631897,
-0.21122632920742035,
0.2239222675561905,
-0.5829516649246216,
-0.18408341705799103,
-0.5018581748008728,
-0.05777384713292122,
0.23551781475543976,
-0.5614821314811707,
0.16699591279... | |
result = query.Take(2).SingleOrDefault();
return result;
}
```
As opposed to the normal way I would have done it (notice no .Take(2) )
```
public SingleType getSingle(int id)
{
var query = from s in Singles where s.ID == id select s;
var result = query.SingleOrDefault();
return result;
}
```
I... | [
0.15206696093082428,
-0.29434430599212646,
0.5320287942886353,
-0.26888495683670044,
-0.33792927861213684,
-0.19328534603118896,
0.34250837564468384,
-0.694634199142456,
-0.18163973093032837,
-0.38910824060440063,
-0.03301134705543518,
0.5358286499977112,
-0.48719167709350586,
0.0382130034... | |
rows with my query.
So, is this worthwhile? Is it harmful? Are there any pro's / con's that I'm not seeing?
Edit:
SQL Generated without the Take(2)
---------------------------------
```
SELECT [t0].[blah], (...)
FROM [dbo].[Single] AS [t0]
WHERE [t0].[ID] = @p0
```
SQL Generated with the Take(2)
---------------... | [
0.03442588075995445,
0.04109864681959152,
0.560792863368988,
-0.218179389834404,
-0.30794793367385864,
0.027709204703569412,
0.15572062134742737,
-0.4036571979522705,
-0.21652036905288696,
-0.526464581489563,
-0.14237503707408905,
0.6983532309532166,
-0.6122801899909973,
0.0470734536647796... | |
to make it throw).
`Single` is more of a convenience method to get the single element of a query than a way to limit the number of results. By using `Single` you are, in effect, saying "I know this query can only have one item, so just give it to me," just like when doing `someArray[0]` when you know there will only be... | [
0.31921622157096863,
-0.12785236537456512,
-0.13681349158287048,
0.28986403346061707,
-0.554351806640625,
-0.30103132128715515,
0.3648729920387268,
-0.38765037059783936,
-0.33860453963279724,
-0.1947391778230667,
-0.15271328389644623,
0.18522119522094727,
-0.4334145486354828,
0.13810093700... | |
`InvalidOperationException` will be thrown.
If `ID` in your query is the primary key of the table, or a `UNIQUE` column, the database will ensure that the result set contains 1 row or none with no need for a `TOP` clause.
However, if you are selecting on a non-unique / non-key column and want the first result or las... | [
0.10110402852296829,
0.21089714765548706,
0.4260452091693878,
0.11255072057247162,
-0.13245294988155365,
-0.04408511891961098,
0.06923699378967285,
-0.45289933681488037,
-0.312734991312027,
-0.3567575514316559,
-0.4232097566127777,
0.3258505165576935,
-0.3599741756916046,
0.425868839025497... | |
where s.Id == id
orderby s.someOtherColumn
select s;
var item = query.FirstOrDefault();
```
On a side note, you can save yourself some typing if you are, indeed, doing a query for a single element:
```
var query = from s in context.Singles where s.Id == id select s;
var item = query.SingleOr... | [
-0.019630491733551025,
-0.12300355732440948,
0.41052576899528503,
-0.13748779892921448,
-0.23811452090740204,
0.02059200219810009,
0.2898699939250946,
-0.636363685131073,
-0.4187535345554352,
-0.3659202456474304,
-0.380342572927475,
0.2945605218410492,
-0.43810054659843445,
0.1763031035661... | |
I have a database table with several columns; most of them are `VARCHAR(x)` type columns, and some of these columns have an index on them so that I can search quickly for data inside it.
However, one of the columns is a `TEXT` column, because it contains a very large amount of data (23 kb of plain ascii text etc). I ... | [
0.07302496582269669,
0.42940905690193176,
0.3330517113208771,
0.029428480193018913,
0.005062513053417206,
0.22808270156383514,
0.1050373986363411,
-0.11689425259828568,
0.006161178462207317,
-0.5938174724578857,
0.12871390581130981,
0.1814495027065277,
0.13219724595546722,
0.30232080817222... | |
I remove that criteria from the `WHERE` clause the query completes (what I would consider), instantaneously.
I can't add an index on this column because that option is grayed out for that column in the index builder / wizard in SQL Server Management Studio.
What are my options here, to speed up the query search in t... | [
0.406989187002182,
0.22336357831954956,
0.3043825030326843,
0.08588060736656189,
-0.0010395377175882459,
-0.38881242275238037,
0.3573754131793976,
-0.1398146003484726,
-0.13121871650218964,
-0.6768343448638916,
0.10316506773233414,
0.4355626106262207,
-0.16914378106594086,
0.36746671795845... | |
WHERE CONTAINS (col1, 'search phrase') ...` throws an error.
Sorry, I'm new to SQL Server
**Update 2**
sorry, just figured it out; use multiple "contains" clauses instead of one clause with multiple words. Actually, this still doesn't get what I want (the exact phrase) it only makes sure that all words in the phrase ... | [
0.1814574897289276,
0.2744264304637909,
0.23114410042762756,
0.08417917042970657,
-0.16298770904541016,
-0.5495496988296509,
0.4995591640472412,
0.04796256497502327,
-0.004618231672793627,
-0.47704601287841797,
-0.07957497239112854,
0.4427621066570282,
-0.3756554424762726,
0.00825046561658... | |
How to write a function that can cut a string with HTML tags to an N-length string without breaking HTML tags while doing it.
The returned string doesn't need to be exactly N characters long. It can cut it before or after tag that is on the edge of N-long string.
```
Visit <a href="www.htz.hr">Croatia</a> this summe... | [
0.20254084467887878,
-0.14053216576576233,
0.32389914989471436,
-0.0376298613846302,
-0.075800821185112,
-0.10055550187826157,
0.3762584626674652,
-0.2465519905090332,
-0.11608440428972244,
-0.4880416989326477,
-0.45012006163597107,
0.4444325566291809,
-0.22517143189907074,
-0.232903569936... | |
int numOpenTags = 0;
for (int i = 0; i < limit; i++)
{
if (s[i]=='<')
{
if (s[i+1]=='/')
{
inClosingTag = true;
} | [
-0.16277331113815308,
-0.490901917219162,
0.24961423873901367,
-0.14888645708560944,
0.02570953033864498,
0.17911960184574127,
0.4566403329372406,
-0.4326595366001129,
0.06290555745363235,
-0.28799933195114136,
-0.1153147891163826,
0.18991385400295258,
-0.34307342767715454,
0.0005028852028... | |
else
{
numOpenTags++;
}
}
if (s[i]=='>')
{
if (s[i-1]=='/') | [
-0.20238295197486877,
-0.4575647711753845,
-0.12967419624328613,
-0.204018697142601,
0.10281543433666229,
-0.0494062602519989,
0.4301106333732605,
-0.38858863711357117,
0.1078953891992569,
-0.3069714307785034,
-0.30424582958221436,
0.37650543451309204,
-0.2718620300292969,
-0.2184449732303... | |
{
numOpenTags--;
}
if (inClosingTag)
{
numOpenTags--;
}
}
if (numOpenTags == | [
-0.3017355799674988,
-0.2616172730922699,
-0.08041209727525711,
0.0009960472816601396,
-0.0390976220369339,
0.06679917871952057,
0.22925905883312225,
-0.05371912568807602,
-0.1379459649324417,
-0.465212881565094,
-0.2974145710468292,
0.20212221145629883,
-0.45773831009864807,
0.22578056156... | |
0) okIndex = i;
}
return s.Substring(0, okIndex + 1);
}
``` | [
-0.0801372081041336,
-0.07996152341365814,
0.5091678500175476,
-0.4404478967189789,
0.1035747304558754,
-0.03895311430096626,
0.4309947192668915,
-0.537341833114624,
0.09934885799884796,
-0.3048752248287201,
-0.41001635789871216,
0.4706834852695465,
-0.4355642795562744,
0.36180680990219116... | |
HI! I am looking for a document that will define what the word "rows[0]" means. this is for BIRT in the Eclipse framework. Perhaps this is a Javascript word? I dunno... been searching like mad and have found nothing yet. Any ideas?
*rows is a shortcut to dataSet.rows. Returns the current data rows (of type DataRow[]) f... | [
0.3870384693145752,
0.16437985002994537,
0.4366278052330017,
-0.005655738525092602,
-0.43787482380867004,
-0.14803557097911835,
0.2919619083404541,
-0.08861424028873444,
-0.07819769531488419,
-0.22707967460155487,
0.15408070385456085,
0.2852723300457001,
-0.3680002987384796,
0.098464459180... | |
Typically the hotkey letters on a MenuStrip are underlined. (&File, &Open, etc) On a project I'm working on the underline shows up in the designer, but not at run time. I can't find the property that controls this. Anyone out there know?
In Windows, there is a setting whether or not to show the underline. To change the... | [
0.17723147571086884,
-0.17159835994243622,
0.5981485843658447,
0.15691949427127838,
0.3153640925884247,
-0.1584012806415558,
0.09812281280755997,
0.011078567244112492,
-0.31006863713264465,
-0.7475164532661438,
-0.23851607739925385,
0.6225359439849854,
-0.1226019337773323,
0.08546885102987... | |
I've been experiencing a high degree of flicker and UI lag in a small application I've developed to test a component that I've written for one of our applications. Because the flicker and lag was taking place during idle time (when there should--seriously--be nothing going on), I decided to do some investigating. I not... | [
0.5209065079689026,
-0.28766942024230957,
0.19263018667697906,
-0.0348881334066391,
0.048476241528987885,
-0.2400178760290146,
0.28954634070396423,
0.3291989862918854,
-0.39840996265411377,
-0.5233731865882874,
0.17816835641860962,
-0.07154964655637741,
-0.14892548322677612,
0.359397232532... | |
I've discovered that this thread appears to be present in every .NET application I write, even console applications.
Being the daring soul that I am, I decided to freeze the thread and see what happened. The flickering did indeed stop, but I experienced some oddness when it came to doing database interaction (I'm usin... | [
0.5629335045814514,
0.29403945803642273,
0.11905038356781006,
0.03862179443240166,
-0.05924241989850998,
-0.2877802550792694,
0.34945282340049744,
0.3456926643848419,
-0.2590045928955078,
-0.35745418071746826,
0.4009348750114441,
0.23521466553211212,
-0.05017203092575073,
0.356551796197891... | |
this isn't the case.
Because this thread (like a few others) shows up with no data in the Location column and no Call Stack listed if I switch to it in the debugger while paused, I tried matching the StartAddress property through GetCurrentProcess().Threads for the corresponding thread, but it falls outside all of the... | [
0.2242836058139801,
-0.030542243272066116,
0.2103424221277237,
0.00546615244820714,
0.1599801778793335,
-0.2748614549636841,
0.3354775607585907,
0.3772858679294586,
-0.43647700548171997,
-0.8750560283660889,
-0.07344461232423782,
0.40833067893981934,
-0.09025631099939346,
0.352587699890136... | |
function used to start the thread, according to [this page](http://msdn.microsoft.com/en-us/library/system.diagnostics.processthread.startaddress.aspx), which basically puts me back at square one as far as determining where this thread actually comes from. This is further confirmed by the fact that ALL of the threads i... | [
-0.06440611928701401,
-0.15660858154296875,
0.43742087483406067,
-0.12642331421375275,
0.0014739143662154675,
0.0315953828394413,
0.14576084911823273,
0.05618789419531822,
-0.38864967226982117,
-0.5620855093002319,
-0.006407029926776886,
0.1767536848783493,
-0.2392711490392685,
0.546217739... | |
hiccups in my application
You could try using [Sysinternals](http://technet.microsoft.com/en-us/sysinternals/default.aspx). [Process Explorer](http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) let's you dig in pretty deep. Right click on the Process to access Properties. Then "Threads" tab. In there, you c... | [
-0.05208462104201317,
0.16816121339797974,
0.47378864884376526,
0.20170791447162628,
-0.035257063806056976,
-0.09290283918380737,
0.26286783814430237,
-0.025172220543026924,
-0.5148045420646667,
-0.5102952122688293,
0.16863742470741272,
0.4842207431793213,
-0.07175743579864502,
0.582734823... | |
I have a site that uses aspnet\_setreg.exe to encrypt the username and password of the identity user into the registry. It has always worked fine but when I run it on a Windows 2008 i get this:
C:\aspnet\_setreg>aspnet\_setreg.exe -k:SOFTWARE\MYCODE\identity -u:"domain\user" -p:"password"
Please edit your configurati... | [
0.05693487077951431,
0.3052075207233429,
0.5906625986099243,
-0.08475512266159058,
0.03765523061156273,
-0.36121225357055664,
0.14819137752056122,
-0.04821188002824783,
-0.19705608487129211,
-0.8368573784828186,
-0.39376309514045715,
0.4913472533226013,
-0.12014403194189072,
0.391298890113... | |
share, the account used to access the share will need Read access to the registry key.
Regedt32.exe may be used to view/modify registry key permissions.
You may rename the registry subkey and registry value in order to prevent discovery.
Does anyone else use this and have you seen it work on 2008.
Thanks
I moved th... | [
0.06343979388475418,
0.06382022053003311,
0.17522969841957092,
0.22025419771671295,
0.04238538444042206,
-0.19834792613983154,
0.1612849086523056,
0.06948475539684296,
-0.21354873478412628,
-0.5365564227104187,
0.3139364719390869,
0.4958535432815552,
-0.18270239233970642,
0.396649509668350... | |
I want to verify that my custom-made error pages return the correct [HTTP status codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes).
* 200 OK
* 301 Moved Permanently
* 401 Unauthorized
* 404 Not Found
* 500 Internal Server Error
etc.
How do I make my web browser show me the code?
I'd recommend you use th... | [
0.01676146872341633,
0.39965111017227173,
0.32854971289634705,
-0.1628112643957138,
0.004513470456004143,
0.19955959916114807,
0.5608881711959839,
-0.19309784471988678,
-0.1415620893239975,
-0.4702366888523102,
0.17991384863853455,
0.5486469268798828,
0.25434863567352295,
0.022068932652473... | |
If I launch an ASP.NET project, using Visual Studio 2008 and Internet Explorer, Visual Studio starts script debugging. I get a Script Documents node with a child node of Windows Internet Explorer and Default.aspx with a bazillion anonymous code nodes underneath.
I'm having difficulty shutting this off, other than tel... | [
0.3939633071422577,
0.23527191579341888,
0.4311023950576782,
0.12854477763175964,
-0.1830933541059494,
-0.1663350760936737,
0.11402978748083115,
-0.018011219799518585,
-0.20151634514331818,
-0.846912145614624,
-0.16536080837249756,
0.4487013518810272,
-0.21378980576992035,
0.11498986929655... | |
best solution is to ditch Internet Explorer 8 and just launch my sites in FireFox. | [
0.1858760565519333,
0.2638644874095917,
0.37546417117118835,
0.11976499855518341,
0.1479286253452301,
-0.36977463960647583,
0.23584190011024475,
0.43426018953323364,
0.2412174940109253,
-0.7529573440551758,
-0.04194325953722,
0.3926358222961426,
-0.2615196108818054,
0.02543756365776062,
... | |
The tutorials for creating blackberry applications seem to be severely limited. Even on the blackberry site the samples aren't very good. I want to learn about building a user interface with form objects like text boxes, drop downs, and buttons.
I defiantly recommend RIM's Blackberry developer resource. Some really sol... | [
-0.020270511507987976,
0.3360639810562134,
0.06384920328855515,
0.008125286549329758,
-0.018833963200449944,
0.16436819732189178,
0.4048333466053009,
0.220909982919693,
-0.10962296277284622,
-0.7963682413101196,
0.1364453136920929,
0.28399893641471863,
0.1835138201713562,
-0.06520310789346... | |
I am trying to POST data back to the server and get a dataset back. What I am getting back instead is the HTML for the whole page *AND* it is not kicking off the Action in my Controller. And yes - JQuery is still confusing to me.
The code I currently have is:
```
function updateNavIndex(pageIndex) {
var filters =... | [
0.06598366796970367,
-0.24429014325141907,
0.8245116472244263,
-0.1716407686471939,
-0.02145797200500965,
-0.04969850182533264,
0.46380168199539185,
-0.35427969694137573,
-0.1895115077495575,
-0.8717756867408752,
-0.15460067987442017,
0.4533925950527191,
-0.43362897634506226,
0.25007799267... | |
"POST"
, data: "{ productGroup: " + productGroup + ", productType: " + productType + ", itemsPerPage: " + itemsPerPage + ", pageIndex: " + pageIndex + ", filters: " + filters + "}"
, success: function(data) { handleMenuData(data); }
});
$.ajax({ path: "/CatalogAjaxController/UpdateProducts"
... | [
-0.01610499434173107,
-0.308588445186615,
0.4024125337600708,
-0.07445958256721497,
0.12129929661750793,
0.2022223323583603,
-0.010013742372393608,
-0.06265329569578171,
0.033076751977205276,
-0.6865217089653015,
-0.5062074065208435,
0.36306607723236084,
-0.2895740568637848,
-0.00707973679... | |
+ productType + ", itemsPerPage: " + itemsPerPage + ", pageIndex: " + pageIndex + ", filters: " + filters + "}"
, success: function(data) { handleProductData(data); }
});
}
```
The callback function is tripping and the function definition looks like:
```
function handleMenuData(data) {
$("#navigati... | [
-0.03256736323237419,
-0.2314477562904358,
0.7433962225914001,
-0.06969377398490906,
-0.1423107236623764,
-0.06011921167373657,
0.21394874155521393,
-0.2652912437915802,
-0.018977610394358635,
-0.5111962556838989,
-0.2775445282459259,
0.7423425316810608,
-0.3692343533039093,
0.100487567484... | |
function definition. Something like:
```
var retrieveMenuData = function(path, productGroup, productType, itemsPerPage, pageIndex, filter, fnHandleCallback) {
$.ajax( path
, type
, { productGroup: productGroup, productType: productType, itemsPerPage: itemsPerPage, pageIndex: pageIndex, filter: ... | [
-0.10937390476465225,
-0.34991058707237244,
0.24229201674461365,
-0.01510746218264103,
-0.15423601865768433,
-0.026039762422442436,
0.14924748241901398,
-0.18149210512638092,
0.10783743113279343,
-0.6020655035972595,
-0.14844316244125366,
0.7464646697044373,
-0.3560812473297119,
-0.1434787... | |
type: "POST",
url: "bin/login.php",
data:{data1: var1,data2: var2},
success: function(data) {
}
});
``` | [
-0.10792137682437897,
-0.10742291063070297,
0.4496385455131531,
0.15685410797595978,
-0.09110134840011597,
0.1126609742641449,
0.36668986082077026,
-0.08449730277061462,
0.05017076060175896,
-0.23388436436653137,
-0.3993246555328369,
0.4377596378326416,
-0.17958201467990875,
0.425992012023... | |
I wrote a VB.NET Windows Service, which works fine. I have only one issue with it. I want the service to execute on the half hour and top of the hour marks (e.g. 9:00, 9:30, 10:00, 10:30, 11:00, etc etc etc). I am using the following code:
```
Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here... | [
0.48402807116508484,
-0.16693906486034393,
0.7571775913238525,
-0.1315227895975113,
0.033160094171762466,
-0.03152083232998848,
0.6199660301208496,
-0.15429799258708954,
-0.1805967092514038,
-0.6118919253349304,
-0.19612480700016022,
0.6320781707763672,
-0.2580539584159851,
0.4077632725238... | |
300000)
EventLog.WriteEntry("CCFinalizeService has begun successfully." , _
System.Diagnostics.EventLogEntryType.Information)
End Sub
```
This code works, however, if the service starts at, say, 10:15, then it executes at 10:15, 10:45, 11:15, 11:45. How do I make it so it always executes ... | [
0.4484162926673889,
-0.21463052928447723,
0.7185066342353821,
0.07354801893234253,
0.22163383662700653,
0.02322036772966385,
0.5294525027275085,
-0.20841103792190552,
0.016866032034158707,
-0.6379538178443909,
0.03093145601451397,
0.6964906454086304,
0.09866613894701004,
-0.007527430076152... | |
- (now.Minute Mod 30) * 60000 - now.Second * 1000 - now.Millisecond
oTimer = New System.Threading.Timer(oCallBack, Nothing, dueTime, 1800000)
``` | [
0.1080474853515625,
-0.20196588337421417,
0.4079277813434601,
-0.040919024497270584,
0.19067545235157013,
0.5112573504447937,
0.23828524351119995,
-0.18694591522216797,
-0.3302355110645294,
-0.6702674031257629,
0.08449530601501465,
0.3691878318786621,
0.1663237363100052,
0.3417915105819702... | |
I'm trying to use the ":visible" and ":first-child" pseudo-selectors together in jQuery and it doesn't seem to be working out. I have the following HTML:
```
<div>
<a class="action" style="display:none;">Item One</a>
<a class="action">Item One</a>
<a class="action">Item One</a>
</div>
```
And the followi... | [
-0.1275726556777954,
-0.22365660965442657,
0.354329913854599,
-0.11310212314128876,
-0.18745388090610504,
0.31676533818244934,
0.0224591176956892,
-0.24112151563167572,
-0.212919220328331,
-0.7622435092926025,
-0.24985849857330322,
0.2887512147426605,
-0.183029443025589,
-0.182890772819519... | |
and when it is visible.
If you want to get the first visible *A* element, you should use the [.eq function](http://docs.jquery.com/Traversing/eq#index)
```
$("div a.action:visible").eq(0).addClass("first");
```
or the [:first pseudo-class](http://docs.jquery.com/Selectors/first)
```
$("div a.action:visible:first")... | [
-0.03139771893620491,
-0.36244437098503113,
0.15201212465763092,
-0.29792365431785583,
-0.2502395510673523,
0.07494145631790161,
-0.13314983248710632,
-0.009312012232840061,
-0.2268274873495102,
-0.7244507074356079,
-0.5224277973175049,
0.5238118171691895,
-0.457407683134079,
-0.1970696002... | |
This must be a stupid question, but nevertheless I find it curious:
Say I have a steady download of 128Kbps.
How much disk space is going to be consumed after a hour in Megabytes?
128 x 60 x 60 / 8 / 1024 = 56.25 MB
But
128 x 60 x 60 / 1000 /8 = 57.6 MB
So what is the correct way to calculate this?
Thanks!
Ok, I... | [
0.15343724191188812,
0.27873581647872925,
0.317893385887146,
0.19469517469406128,
-0.1330980360507965,
0.11515415459871292,
-0.02711433358490467,
0.13526250422000885,
-0.6009640097618103,
-0.5623782873153687,
-0.05232036113739014,
0.5574224591255188,
0.3867015838623047,
0.05621558427810669... | |
a standard procedure, and not Symantec imposed one :). | [
0.450668603181839,
-0.05015818402171135,
0.4404922425746918,
0.03629840165376663,
0.2906244695186615,
-0.3786943852901459,
0.08130142837762833,
-0.3233790099620819,
-0.021166935563087463,
-0.053928375244140625,
-0.27550041675567627,
0.6201090812683105,
-0.12498679757118225,
0.0099010830745... | |
I am currently playing around with the FCKEditor, and I am trying to replicate how stack overflow shows exactly how your post will look in HTML as you type it up. My FCKEditor creates just fine, I just don't know how to go about accessing the editor data once it is created. What I want to do is get the html from the ed... | [
0.21160662174224854,
0.07432552427053452,
0.7096065282821655,
-0.005837529897689819,
-0.2270130068063736,
-0.41637057065963745,
-0.0025630181189626455,
-0.08994605392217636,
-0.15471391379833221,
-0.773767352104187,
0.09768693894147873,
0.30077365040779114,
-0.3584408164024353,
0.136586919... | |
method in the FCKeditor JavaScript API, I just haven't seen any solid examples of how to get the current instance of the editor and use the method. Can anyone help? My code is below:
```
<html>
<head>
<title>FCKeditor Test</title>
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<script type="text... | [
0.011805705726146698,
0.02619032934308052,
0.5460136532783508,
0.03790981322526932,
0.10673023760318756,
-0.3860924243927002,
0.24162106215953827,
-0.7041852474212646,
0.12411953508853912,
-0.5416748523712158,
0.4150593876838684,
0.2817595601081848,
-0.3095395267009735,
-0.0641268640756607... | |
an official explanation from Symantec on the matter:
<http://seer.entsupport.symantec.com/docs/274171.htm>
It seems the idea is to convert from bits to bytes as early as possible in calculation, and then the usual 1024 division comes in place.
I just hope it's a standard procedure, and not Symantec imposed one :). | [
0.26405075192451477,
0.1064501479268074,
0.28161829710006714,
0.30660000443458557,
0.0248500257730484,
0.025229327380657196,
-0.020934924483299255,
0.1739492416381836,
-0.4439883530139923,
-0.15536819398403168,
-0.21750161051750183,
0.3576803505420685,
0.2124355584383011,
0.021411471068859... | |
From an efficiency and best practices point of view, I appreciate everyones thoughts.
I have a stored procedure that makes (n) copies of a row and inserts the row into the necessary table.
For example. Make a copy of an inventory item and add the copies to inventory.
I see two options for this type of stored procedu... | [
0.3377511203289032,
0.0958762988448143,
0.23255519568920135,
-0.03162083029747009,
0.43204107880592346,
0.14949099719524384,
0.06655314564704895,
-0.19157248735427856,
-0.2509876489639282,
-0.9052931070327759,
-0.15487122535705566,
0.9268128871917725,
-0.22465959191322327,
-0.0664147138595... | |
@InventoryID int,
@CopyCount int
AS
BEGIN
DECLARE @counter int
SET @counter = 0
WHILE @counter < @CopyCount
INSERT INTO Inventory (fieldOne, fieldTwo, FieldThree)
(SELECT FieldOne, FieldTwo, FieldThree FROM Inventory WHERE InventoryID = @InventoryID)
END
END
```
Using option ... | [
0.1854967325925827,
-0.21209463477134705,
0.3684823513031006,
-0.3305206298828125,
0.20891302824020386,
0.14844314754009247,
0.025032559409737587,
-0.43375155329704285,
-0.1471177488565445,
-0.5500369071960449,
-0.08170894533395767,
0.8871070742607117,
-0.11014965921640396,
0.0873805284500... | |
only one database call.
I appreciate your thoughts on why you would prefer one over another or neither along with any best practice recommendations.
Of course do it on the server side.
This will save you lots of round-trips between client and server.
Will be even better if you make your loop set-based:
```
WITH hie... | [
0.2567584216594696,
-0.0013658590614795685,
0.24189193546772003,
0.38093996047973633,
0.10778356343507767,
-0.11360307782888412,
-0.020452231168746948,
0.03984807804226875,
-0.06770173460245132,
-0.4337875247001648,
-0.0477154403924942,
0.5638561248779297,
-0.4158950746059418,
-0.030955784... | |
hier
WHERE cnt < @count
)
INSERT
INTO Inventory (fieldOne, fieldTwo, FieldThree)
SELECT FieldOne, FieldTwo, FieldThree
FROM hier, Inventory
WHERE InventoryID = @InventoryID
``` | [
-0.22571620345115662,
-0.08152904361486435,
0.08021065592765808,
-0.1262316107749939,
0.3942859470844269,
0.38438138365745544,
-0.11726774275302887,
-0.18746957182884216,
0.32685986161231995,
-0.42629337310791016,
-0.38560211658477783,
0.46290266513824463,
0.14409124851226807,
-0.117431513... | |
Here's my situation. I have a DotNetNuke application. I want to link to an existing ASP.net website from within the DNN website, and have decided to use DNN's IFrame for that.
The existing ASP.net application uses Forms Authentication for security - only authorized users can access the pages. This asp.net application... | [
0.5012285113334656,
-0.19666354358196259,
0.5596020817756653,
-0.04124145582318306,
0.11724717170000076,
-0.12956853210926056,
0.29086264967918396,
-0.10461984574794769,
-0.3343256711959839,
-0.7053209543228149,
0.21526286005973816,
0.24457304179668427,
-0.11863601207733154,
0.117347739636... | |
MSDN website:
"ASP.NET supports forms authentication in a distributed environment, either across applications on a single server or in a Web farm. When forms authentication is enabled across multiple ASP.NET applications, users are not required to re-authenticate when switching between the applications."
Does this ap... | [
0.13047079741954803,
-0.3770756721496582,
0.40897971391677856,
0.181337371468544,
-0.24031956493854523,
-0.32729917764663696,
0.22356463968753815,
0.048741381615400314,
-0.21830549836158752,
-0.7674180269241333,
-0.08396768569946289,
0.28363633155822754,
0.003664403920993209,
-0.2885823249... | |
for any help!
The CSSSelector.cssselect() method returns an iterable, so you can just do:
```
for element in selector:
print element.text_content()
``` | [
-0.3379036784172058,
-0.00653616851195693,
0.21335545182228088,
-0.04282308369874954,
0.024585258215665817,
-0.3016159236431122,
0.42540404200553894,
-0.02652771770954132,
-0.20679010450839996,
-0.5427649617195129,
-0.3319474458694458,
0.5758199095726013,
-0.24256841838359833,
-0.091739617... | |
As a part of an assignment, I need to write two functions:
1. a function that sums up two natural numbers represented as a linked list
2. a functions that prints a number represented in the same way.
for some reason, both function work perfectly fine separately, but when I try to use the print function on the result... | [
0.11515471339225769,
-0.01102710235863924,
0.030026542022824287,
0.08868495374917984,
-0.4327215254306793,
0.1014508605003357,
-0.0728052631020546,
-0.3796255886554718,
-0.13443443179130554,
-0.5222791433334351,
0.003541714744642377,
0.3263557553291321,
-0.4379773437976837,
-0.031428858637... | |
is detailed below. any ideas?
```
void main()
{
int a[1] = { 1 },
b[1] = { 2 };
int * *pa, **pb;
List lst1, lst2;
List sum;
pa = (int * *) malloc(sizeof(int * )); * pa = &a[0];
pb = (int * *) malloc(sizeof(int * )); * pb = &b[0];
lst1 = arrToList(pa, 1);
lst2 = arrToList(pb, 1);
addNumbers(lst... | [
0.0879279375076294,
-0.11332026869058609,
0.4704001545906067,
-0.21670761704444885,
0.16077253222465515,
0.5341004729270935,
-0.0031410304363816977,
-0.3975106477737427,
-0.3106040954589844,
-0.4195955991744995,
-0.5406659245491028,
0.3460913598537445,
-0.3545806407928467,
0.18077476322650... | |
currData,
i,
number;
if (isEmptyList(num) == TRUE)
printf("the input was an empty list, nothing to print");
else
{
i = 0;
number = 0;
curr = num.head;
while (curr != NULL)
{
currData = *(curr - >dataPtr);
number = number + currData * ((int) pow(10, i));
curr = cur... | [
-0.2932405471801758,
-0.16885235905647278,
0.468637079000473,
-0.30993524193763733,
-0.08193255960941315,
0.5918720960617065,
0.5130559802055359,
-0.35814169049263,
0.08105956763029099,
-0.3148435056209564,
-0.5964312553405762,
0.6570613384246826,
-0.2071649432182312,
0.08102141320705414,
... | |
}
printf("%d \n", number);
}
}
// a function that sums in list
// representation two numbers,
// each represented as a list
void addNumbers(List n1, List n2, List * sum)
{
ListNode * currN1;
ListNode * currN2;
ListNode * currSum;
int currN1N2Sum; //stores the sum of the current digits in n1 and n2
... | [
-0.22065693140029907,
-0.3246845304965973,
0.6473051309585571,
-0.3669902980327606,
0.06530376523733139,
0.48846182227134705,
-0.2062670737504959,
-0.6347440481185913,
-0.6145765781402588,
-0.4469297230243683,
-0.18493451178073883,
0.5253086090087891,
-0.5057659149169922,
-0.00271559529937... | |
printf("bad input =(");
else
{
currN1 = n1.head;
currN2 = n2.head; * sum = createEmptyList();
carrier = 0;
prevCarrier = 0;
while ((currN1 != NULL) && (currN2 != NULL))
{
currN1N2Sum = *(currN1->dataPtr) + *(currN2->dataPtr) + prevCarrier;
if (currN1N2Sum > 9)
{
... | [
-0.3985728919506073,
-0.3262609541416168,
0.66390460729599,
-0.40146592259407043,
-0.04068843647837639,
0.5319592952728271,
0.3329334855079651,
-0.5936486721038818,
-0.23409418761730194,
-0.2737662196159363,
-0.4101008474826813,
0.5488507747650146,
-0.34291955828666687,
0.19177038967609406... | |
currN1N2Sum = currN1N2Sum - 10;
}
currSum = creatNewListNode( & currN1N2Sum, NULL);
insertNodeToEnd(sum, currSum);
prevCarrier = carrier;
carrier = 0;
currN1 = currN1 - >next;
currN2 = currN2 - >next;
} //while ((currL1!=NULL)&&(currL2!=NULL))
while (currN1 != NULL)
... | [
-0.7718297839164734,
-0.3308517634868622,
0.607035219669342,
-0.29254481196403503,
-0.10141362249851227,
0.5443429350852966,
0.27463796734809875,
-0.47278839349746704,
-0.19771532714366913,
-0.27063560485839844,
-0.4854848086833954,
0.5416829586029053,
-0.14442487061023712,
0.2982173860073... | |
currN1 = currN1 - >next;
if (prevCarrier != 0) prevCarrier = 0;
}
while (currN2 != NULL)
{
currN1N2Sum = *(currN2 - >dataPtr) + prevCarrier;
currN2 = currN2 - >next;
if (prevCarrier != 0) prevCarrier = 0;
}
} // ! ((isEmptyList(n1)==TRUE)||(isEmptyList(n2)==TRUE))
}
```
her... | [
-0.46840596199035645,
-0.19778986275196075,
0.8892214894294739,
-0.3539920151233673,
-0.054458558559417725,
0.09994799643754959,
0.33189573884010315,
-0.4067772626876831,
-0.3381202518939972,
-0.3602733016014099,
-0.3803723156452179,
0.551636278629303,
-0.4324505031108856,
0.26306828856468... | |
list
{
List res;
res.head = res.tail = NULL;
return res;
}
Bool isEmptyList ( List lst )//checks if a given list is empty or not
{
if (lst.head == NULL && lst.tail == NULL)
return TRUE;
else
return FALSE;
}
void insertDataToEnd ( List * lst, int *dataPtr ) //inserts new data to ... | [
0.05263237655162811,
-0.3319292366504669,
0.6486846804618835,
-0.23710840940475464,
0.18650487065315247,
0.09899117052555084,
0.15098275244235992,
-0.4757330119609833,
-0.5511660575866699,
-0.24036480486392975,
-0.4279313087463379,
0.45834439992904663,
-0.546560525894165,
0.197212263941764... | |
);
insertNodeToEnd(lst,newTail);
}
void insertNodeToEnd ( List * lst, ListNode * newTail )//insert an existing node to an existing linked list
{
if (isEmptyList(*lst) == TRUE )
insertNodeToStart ( lst,newTail );
else
{
(*lst).tail -> next = newTail;
newTail->next = NULL;
... | [
-0.36331263184547424,
-0.2849622964859009,
0.5591794848442078,
-0.33692246675491333,
0.48974278569221497,
0.016222605481743813,
0.08455173671245575,
-0.2251824140548706,
-0.3271619379520416,
-0.5277395248413086,
-0.5643656253814697,
0.5011053085327148,
-0.39792901277542114,
0.0509199686348... | |
linked list
{
ListNode * res;
res = (ListNode *) malloc (sizeof(ListNode));
res -> dataPtr = dataPtr;
res -> next = next;
return res;
}
void insertNodeToStart ( List * lst, ListNode * newHead )//inserts node to the begining of a given linked list
{
if ( isEmptyList( *lst ) == TRUE )
... | [
-0.16130731999874115,
-0.3872971534729004,
0.8290389776229858,
-0.2763395607471466,
0.22425734996795654,
-0.07042456418275833,
0.028141791000962257,
-0.26530393958091736,
-0.36811888217926025,
-0.5340462327003479,
-0.44592925906181335,
0.29190364480018616,
-0.5019041895866394,
0.2406837940... | |
newHead -> next = NULL;
}
else
{
newHead -> next = (*lst).head;
(*lst).head = newHead;
}
}
```
The bug is in the function addNumbers.
When you add a node to store the sum you pass a pointer to the variable currN1N2Sum which is a local variable (stored on the stack). When the addNumbers... | [
-0.25110936164855957,
0.07839767634868622,
0.5271503925323486,
-0.2518171966075897,
0.33331742882728577,
-0.08784814924001694,
0.14586378633975983,
0.17330791056156158,
-0.43552473187446594,
-0.6768098473548889,
0.0806458368897438,
0.38315311074256897,
-0.598790168762207,
0.324351251125335... | |
remain unchanged and thus apparently valid as long as the storage is not reused.
This is why you had the impression the addNumbers function was correct. When calling the printNumber function the storage is overwritten and you find a different value in there.
This explain your bug.
There is another problem with addN... | [
0.02268747240304947,
0.057940103113651276,
0.3352145254611969,
0.06374267488718033,
0.24061883985996246,
-0.054886333644390106,
0.2279948741197586,
-0.10704120993614197,
-0.434143602848053,
-0.43338385224342346,
0.09866481274366379,
0.6624305844306946,
-0.3932170569896698,
0.16362027823925... | |
BTW: you may change (\*lst).head in lst->head. It will make your code more readable. | [
0.5503972172737122,
-0.044924668967723846,
0.39690276980400085,
-0.2020273059606552,
0.2435632348060608,
0.15346573293209076,
0.428392231464386,
0.11829148232936859,
-0.0600360706448555,
-0.7397071123123169,
-0.49722015857696533,
0.21394747495651245,
-0.1321658343076706,
0.0650416687130928... | |
```
Attacklab.wmd_env.buttons=Attacklab.wmd_env.buttons||_4;
```
what does the || do in this case?
Adds \_4 to the array which is Attacklab.wmd\_env.buttons?
The `||` operator in JavaScript returns the value on the left if that value does not evaluate to `false`, otherwise it returns the value on the right.
From ... | [
-0.133224219083786,
0.11671993881464005,
0.30227622389793396,
-0.38173067569732666,
0.11977995187044144,
-0.07342511415481567,
0.23105113208293915,
-0.6400333642959595,
0.0112476060166955,
-0.39724987745285034,
-0.42014336585998535,
0.6705957055091858,
-0.5574162006378174,
-0.1227057203650... | |
to `_4`. | [
0.2973701059818268,
0.33824622631073,
0.35866451263427734,
0.05074433237314224,
0.09515272825956345,
0.04934779182076454,
0.2522863447666168,
0.46289780735969543,
-0.41909709572792053,
-0.5271973013877869,
-0.44404417276382446,
0.4137013852596283,
-0.23200608789920807,
0.3174625635147095,
... | |
I'd like to be able to highlight the wrap margin/text width in vim by changing the background color (or maybe just a line?). A lot of IDEs have this. I mocked up what I'm talking about:

Anyone know if this can be done in macvim or gvim?
Try this:
... | [
0.28030306100845337,
-0.21946464478969574,
0.5433413982391357,
-0.1658654361963272,
-0.15597020089626312,
-0.09933874756097794,
0.26930391788482666,
-0.07810576260089874,
-0.3184192478656769,
-0.7754316926002502,
0.24284030497074127,
0.7650956511497498,
0.0029442941304296255,
-0.1725727617... | |
When I run this program
```
OVERLAPPED o;
int main()
{
..
CreateIoCompletionPort(....);
for (int i = 0; i<10; i++)
{
WriteFile(..,&o);
OVERLAPPED* po;
GetQueuedCompletionStatus(..,&po);
}
}
```
it seems that the WriteFile didn't return until the writing job is done. At... | [
-0.09319014102220535,
0.10565110296010971,
0.6683563590049744,
-0.345244437456131,
0.0941140204668045,
0.13114342093467712,
0.33576738834381104,
-0.20972029864788055,
-0.2197292000055313,
-0.46539661288261414,
-0.1484808325767517,
0.6162230968475342,
-0.3881152868270874,
0.1150513961911201... | |
write caching enabled, the file operation may complete with just a memory copy to cache, to be flushed lazily later. Since there is no actual IO taking place, there's no reason to do async IO in that case.
Internally, each IO operation is represented by an [IRP](http://msdn.microsoft.com/en-us/library/ms795960.aspx) (... | [
0.14219672977924347,
0.08899077773094177,
0.5716124176979065,
-0.21466349065303802,
-0.10528289526700974,
0.02802860364317894,
-0.031466901302337646,
-0.097296804189682,
0.009317312389612198,
-0.5361530780792236,
-0.2949485182762146,
0.5092894434928894,
-0.2371141016483307,
0.1734953820705... | |
was opened for overlapped IO, the kernel gives control back to your program immediately. Otherwise, the kernel will wait for the IRP to complete before returning.
Not all IO operations make it all the way to the disk, however. The filesystem may determine that the write should be cached, and not written until later. T... | [
-0.11320030689239502,
-0.2182021290063858,
0.6192553639411926,
0.1512148529291153,
0.019325515255331993,
-0.0606529675424099,
0.008250546641647816,
0.13549083471298218,
-0.32901400327682495,
-0.5858137607574463,
-0.22805173695087433,
0.5022960305213928,
-0.17606498301029205,
-0.03746303170... | |
the different modes and will show blank in the status field while an IRP is pending.
There is a limit to how much data is allowed to be outstanding in the write cache. Once it fills up, the write operations will not complete immediately. Try writing a lot of data at once, with may operations. | [
0.06768769770860672,
-0.23369136452674866,
0.6014460325241089,
-0.08180513978004456,
0.21830976009368896,
-0.20198115706443787,
0.38954809308052063,
-0.22692462801933289,
-0.2476993054151535,
-0.6937821507453918,
-0.05096524953842163,
0.7597317695617676,
-0.04471758008003235,
-0.1497437357... | |
We have a developer who is in the habit of committing non-java files (xsd, dtd etc) in the java packages under the src/java folder in our repository. Admittedly, these are relevant files to that package, but I just hate to see non-java files in the src folder.
Is this is a common practice that I should get used to or... | [
0.577427327632904,
0.37592625617980957,
-0.2959587872028351,
0.15284612774848938,
0.08037928491830826,
-0.5259061455726624,
0.17592231929302216,
0.31573525071144104,
-0.3951753079891205,
-0.4570159614086151,
0.09006515145301819,
0.22255980968475342,
-0.21632952988147736,
0.3891895413398742... | |
It is possible to standardize the locations then theoretically everyone will know where to go and what to do. But I find in practice that does not happen.
Imagine your app still being maintained 5 or 10 years down the road by a team of junior - intermediate developers that do not work at the company now and will never... | [
0.622768759727478,
0.22603367269039154,
0.23251597583293915,
0.09295349568128586,
0.4135506749153137,
-0.24197129905223846,
0.5085628032684326,
0.24379584193229675,
-0.2644491195678711,
-0.48669400811195374,
-0.05550157278776169,
0.2772142291069031,
-0.014240375719964504,
0.082040689885616... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.