text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I am using the [`jquery-ui-dialog`](https://jqueryui.com/dialog/) plugin
I am looking for way to refresh the page when in some circumstances when the dialog is closed.
Is there a way to capture a close event from the dialog?
I know I can run code when the close button is clicked but that doesn't cover the user closi... | [
-0.0786898136138916,
0.062246400862932205,
0.8484693169593811,
-0.1290256828069687,
-0.08744414895772934,
-0.27802756428718567,
0.35966065526008606,
0.08079156279563904,
-0.2209661900997162,
-0.8148678541183472,
-0.4179540276527405,
0.6007400155067444,
-0.16194935142993927,
-0.026321150362... | |
the bind() has become on() | [
-0.19614721834659576,
-0.03608294576406479,
0.7693596482276917,
-0.47485440969467163,
-0.22725757956504822,
-0.3188855051994324,
0.16857193410396576,
-0.3919614255428314,
-0.1192263662815094,
-0.6026308536529541,
-0.33902856707572937,
0.4390346109867096,
-0.3737538754940033,
0.218788176774... | |
I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm currently only running on my local machine I can't authenticate using one of the OpenID providers on the web. So I figure I need to run a local OpenID server that simply lets me type in a username and then passes that back to my main ap... | [
0.4196053743362427,
0.128841832280159,
-0.0017992601497098804,
0.2521245777606964,
-0.26835203170776367,
-0.3677671551704407,
0.47434723377227783,
-0.08958388864994049,
-0.05507522076368332,
-0.8214468359947205,
0.04833878204226494,
0.35497909784317017,
-0.20356428623199463,
0.127740338444... | |
source distribution. Running that will give you an instance of [this test provider](http://openidenabled.com/python-openid/trunk/examples/server/). | [
0.44799575209617615,
-0.10975997149944305,
-0.1829712837934494,
0.16961461305618286,
0.04118013754487038,
-0.33444955945014954,
0.14897747337818146,
0.14851872622966766,
-0.08802176266908646,
-0.5650904774665833,
-0.08395978063344955,
0.1470295935869217,
-0.11839425563812256,
0.20735834538... | |
I've written a small test application using the .Net FileSystemWatcher to keep an eye on a directory. When I copy a large-ish (a few Mb) file into that directory I get the following events listed (see screenshot - and ignore the Delete event to begin with).
[alt text http://robinwilson.homelinux.com/FSW.png](http://ro... | [
0.28653663396835327,
-0.17506544291973114,
0.4159577190876007,
-0.13399355113506317,
0.19394440948963165,
-0.025249827653169632,
0.2978000342845917,
0.06320072710514069,
-0.5996055006980896,
-0.541452169418335,
-0.038157444447278976,
0.16809621453285217,
-0.1208755299448967,
0.283999204635... | |
there anything I can do to stop this happening? From what I've read on StackOverflow and elsewhere, you should just get one changed event once the file has been changed and then closed. Why am I getting two?
According to the [documentation](http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx) (see ... | [
0.20788201689720154,
-0.14797303080558777,
0.24408595263957977,
0.17167067527770996,
0.16598398983478546,
0.04962746426463127,
0.04798928648233414,
-0.16221754252910614,
-0.8640044927597046,
-0.5751702189445496,
0.0002229883975815028,
0.36851298809051514,
-0.3716576099395752,
0.27569636702... | |
events.** Likewise, some applications (for example, antivirus software) might cause additional file system events that are detected by FileSystemWatcher. | [
0.2892954349517822,
-0.03671102970838547,
0.10811706632375717,
0.18791064620018005,
0.11853466928005219,
-0.4606839120388031,
0.44194620847702026,
0.31854766607284546,
-0.6480020880699158,
-0.4163791239261627,
-0.47935694456100464,
0.2899567782878876,
-0.3861304819583893,
0.246658369898796... | |
I've managed to mostly ignore all this multi-byte character stuff, but now I need to do some UI work and I know my ignorance in this area is going to catch up with me! Can anyone explain in a few paragraphs or less just what I need to know so that I can localize my applications? What types should I be using (I use both... | [
0.07475093007087708,
0.31321433186531067,
0.016677014529705048,
0.2957085371017456,
-0.05791417136788368,
0.060162801295518875,
0.22180353105068207,
-0.06040799245238304,
-0.13587285578250885,
-0.5073265433311462,
-0.3528960943222046,
0.31734204292297363,
0.021221956238150597,
0.0062473355... | |
watch **[Characters, Symbols and the Unicode Miracle](https://www.youtube.com/watch?v=MijmeoH9LT4)** by Tom Scott on YouTube - it's just under ten minutes, and a wonderful explanation of the brilliant 'hack' that is UTF-8 | [
0.3390769362449646,
0.057602327316999435,
0.3239175081253052,
0.27189648151397705,
0.2444283366203308,
-0.06705142557621002,
0.4894259572029114,
0.2234535962343216,
-0.04918677732348442,
-0.473054438829422,
-0.4573309123516083,
0.07059872895479202,
0.28381356596946716,
-0.22295451164245605... | |
For development, I use a local LAMP stack, for production I'm using [MediaTemple's Django Container](http://mediatemple.net/webhosting/gs/django.html) (which I'm loving BTW). MT's container uses lighthttpd. Honestly I've never had any other experience with it. I've always used Apache. I've been doing some reading:
* [... | [
0.39556044340133667,
0.08478933572769165,
0.3602423071861267,
-0.08132079988718033,
-0.5961092710494995,
-0.27784428000450134,
0.2091810405254364,
-0.4069659113883972,
-0.1693943291902542,
-0.6545059084892273,
-0.0036596201825886965,
0.7056529521942139,
-0.17254237830638885,
-0.05556371435... | |
web server software. For instance, mod\_python is known to be heavy on RAM.
[This question](https://stackoverflow.com/questions/26025/cleanest-fastest-server-setup-for-django) and its answers discuss other web server options as well.
I wouldn't be concerned on compatibility issues with client software (see [MarkR's c... | [
0.17863056063652039,
0.24238139390945435,
0.10269082337617874,
-0.09950333833694458,
-0.45773449540138245,
-0.3480903208255768,
0.06601428985595703,
-0.05614253133535385,
-0.4732794165611267,
-0.6444534659385681,
-0.09296641498804092,
0.5939810872077942,
-0.24927997589111328,
-0.0272482372... | |
What is the best way to deal with storing and indexing URL's in SQL Server 2005?
I have a WebPage table that stores metadata and content about Web Pages. I also have many other tables related to the WebPage table. They all use URL as a key.
The problem is URL's can be very large, and using them as a key makes the i... | [
-0.13149644434452057,
0.2415163367986679,
0.42924660444259644,
0.2898498773574829,
-0.323457807302475,
-0.40094685554504395,
-0.20978835225105286,
-0.14945320785045624,
-0.31872910261154175,
-0.3176102340221405,
0.4408457279205322,
0.6147159934043884,
-0.18134163320064545,
0.38270497322082... | |
primary key.
What are the alternatives?
How much pain would there likely to be with using URL as a key instead of a smaller field.
I have looked into the WebPage table having a identity column, and then using this as the primary key for a WebPage. This keeps all the associated indexes smaller and more efficient but... | [
0.02553964965045452,
-0.12633533775806427,
0.5118688941001892,
0.2767268717288971,
-0.3691425919532776,
-0.11832229048013687,
0.04985075071454048,
-0.18508125841617584,
-0.08511695265769958,
-0.6328369379043579,
0.08817925304174423,
0.6512656211853027,
-0.21827203035354614,
0.2544407248497... | |
create a smaller index, but am still not sure if it is the best way of doing things. It wouldn't be a unique index, and would be subject to a small number of collisions. So I am unsure what foreign key would be used in this case...
There will be millions of records about webpages stored in the database, and there will... | [
0.42991676926612854,
0.141203373670578,
0.35985878109931946,
0.29839542508125305,
0.051436468958854675,
-0.18722322583198547,
0.039149850606918335,
0.1121935173869133,
-0.1191927120089531,
-0.6279373168945312,
0.22004617750644684,
0.5592244267463684,
-0.25216415524482727,
0.218222469091415... | |
smaller and more efficient
> but it makes importing data a bit of a pain. Each import for the
> associated tables has to first lookup what the id of a url is
> before inserting data in the tables.
Yes, but the pain is probably worth it, and the techniques you learn in the process will be invaluable on future proje... | [
-0.22494980692863464,
-0.2172551453113556,
0.45588386058807373,
0.013278307393193245,
-0.4389626681804657,
-0.11834052205085754,
0.04530057683587074,
-0.3449544906616211,
-0.09186644107103348,
-0.6522910594940186,
0.0924932062625885,
0.6481418013572693,
-0.33656835556030273,
0.129086703062... | |
@UrlId
END
```
This will return the ID for urls already in your URL table, and NULL for any URL not already recorded. You can then call this function inline your import statements - something like
```
INSERT INTO
UrlHistory(UrlId, Visited, RemoteIp)
VALUES
(dbo.GetUrlId('http://www.stackoverflow.com/'), @Visi... | [
0.0929424986243248,
-0.013469390571117401,
0.7026200890541077,
-0.0361202210187912,
-0.2006923109292984,
-0.3982096016407013,
0.27878156304359436,
-0.07696552574634552,
0.10300687700510025,
-0.5676381587982178,
-0.07657885551452637,
0.6603845357894897,
-0.34172293543815613,
0.2298883199691... | |
I am working on a web-application in which dynamically-created images are used to display information. This data is currently sent to the images using a GET query-string but with more complex images and data I am worried about running into problems with the url character limit.
I could simply pass the record ID to the... | [
0.5881443619728088,
0.0512283518910408,
0.4001506567001343,
0.2390066236257553,
-0.16753356158733368,
-0.034336548298597336,
0.11081185936927795,
0.08223418891429901,
-0.22702722251415253,
-0.6270157098770142,
0.16990752518177032,
0.24994231760501862,
-0.07185841351747513,
0.35625571012496... | |
small string (say up to 2000 characters) from the database is very quick and probably faster than having the user post it all the time, especially if there is more than 1 on a page.
The best option would be create the image once and cache it if it doesn't change. When the image is requested again, check to see if it's... | [
0.12526929378509521,
-0.09386584162712097,
0.37140774726867676,
0.13377219438552856,
-0.18137408792972565,
0.0407075472176075,
0.40562501549720764,
0.07715466618537903,
-0.1648411601781845,
-0.8793842792510986,
-0.030028000473976135,
0.42796143889427185,
-0.013347085565328598,
-0.042130332... | |
(both caching and privacy).
The SESSION might be an option, but this is the best option when you need to regenerate the image on multiple pages with slight changes, so you don't have query the db each time. | [
0.29920798540115356,
-0.2296086549758911,
0.30621999502182007,
0.2819288372993469,
-0.31289908289909363,
-0.42681580781936646,
0.4465351402759552,
-0.1979440599679947,
-0.4570392370223999,
-0.5625231862068176,
-0.2183423936367035,
0.40813806653022766,
-0.1907162368297577,
0.150663748383522... | |
Where can I find a list of all types of bsd style socket errors?
In the documentation? For instance, for connect(), see:
```
% man connect
...
ECONNREFUSED
No-one listening on the remote address.
EISCONN
The socket is already connected.
ENETUNREACH
Network is unreachable.
``` | [
0.2089746594429016,
0.395881325006485,
-0.11527179181575775,
0.017064867541193962,
-0.0651492178440094,
-0.3028760850429535,
0.5962057113647461,
0.32525965571403503,
-0.22469577193260193,
-0.7184039354324341,
-0.3360283076763153,
0.6368920803070068,
-0.33048009872436523,
0.4895802438259125... | |
What is the difference between `#include` and `#import` in C++?
`#import` is a Microsoft-specific thing, apparently for COM or .NET stuff only.
`#include` is a standard C/C++ preprocessor statement, used for including header (or occasionally other source code) files in your source code file. | [
0.7308457493782043,
-0.13248607516288757,
-0.2856760621070862,
-0.15057480335235596,
-0.2135004699230194,
-0.3342662751674652,
-0.2186902016401291,
-0.010963302105665207,
-0.4127689301967621,
-0.08904262632131577,
-0.4980475902557373,
0.2798498570919037,
-0.5133081078529358,
-0.19867178797... | |
I have a stored procedure with the following header:
```
FUNCTION SaveShipment (p_user_id IN INTEGER, p_transaction_id IN INTEGER, p_vehicle_code IN VARCHAR2 DEFAULT NULL, p_seals IN VARCHAR2 DEFAULT NULL) RETURN INTEGER;
```
And I am having trouble running it from TOAD's Editor. I cannot run it as part of a select ... | [
-0.0701761543750763,
0.18517127633094788,
0.53619384765625,
0.028396038338541985,
0.12399683147668839,
0.2996736466884613,
0.3053409457206726,
-0.006493488792330027,
-0.18885892629623413,
-0.4708312153816223,
-0.2112419158220291,
0.5323473811149597,
-0.3283533453941345,
-0.1720942854881286... | |
to run this sp manually?
Are you calling the stored procedure from another SP?
I think the syntax is (if I recall correctly):
```
declare
c integer;
begin
c:=storedProc(...parameters...);
```
Hope this helps. | [
0.24398048222064972,
0.0841502770781517,
0.06394964456558228,
-0.2879802882671356,
0.03678293898701668,
-0.08693678677082062,
0.36660486459732056,
-0.07291873544454575,
-0.36365172266960144,
-0.1446974128484726,
-0.1967502385377884,
0.8835463523864746,
-0.41023656725883484,
-0.226121306419... | |
This is for a small scheduling app. I need an algorithm to efficiently compare two "schedules", find differences, and update only the data rows which have been changed, as well as entries in another table having this table as a foreign key. This is a big question, so I'll say right away I'm looking for either **general... | [
0.42079001665115356,
0.04274209216237068,
0.17691819369792938,
0.1442832499742508,
0.20158298313617706,
0.2274082750082016,
-0.2632603049278259,
-0.10873863101005554,
-0.23220905661582947,
-1.0186864137649536,
0.25529199838638306,
0.3372228145599365,
-0.17912982404232025,
-0.09999657422304... | |
foreign key.
The entry from Table A corresponding to Table B will have a span of time which **subsumes** the span of time from Table B. Not all entries in Table A will have an entry in Table B.
I'm providing an interface for users to edit the resource schedule in Table A. They basically provide a new set of data for ... | [
0.09354958683252335,
0.236747607588768,
0.26818206906318665,
-0.1866239607334137,
0.12783795595169067,
-0.1009865254163742,
0.1379445642232895,
0.0716366097331047,
-0.04669209569692612,
-0.5583789348602295,
-0.25648242235183716,
0.40232154726982117,
-0.13579203188419342,
0.5248147249221802... | |
as well.
So, given the following 3 sets:
* The original objects from Table A (from the DB)
* The original objects from Table B (from the DB)
* The edited set of objects from Table A (from the user, so no unique IDs)
I need an algorithm that will:
* Leave rows in Table A and Table B untouched if no changes are neede... | [
-0.05113177374005318,
0.2870938181877136,
0.27785083651542664,
-0.11660926043987274,
-0.12819716334342957,
0.3389240801334381,
0.12560944259166718,
-0.4357930123806,
-0.24037645757198334,
-0.7990833520889282,
-0.30262887477874756,
0.27620357275009155,
-0.24346408247947693,
0.26375123858451... | |
appropriate database operations is more than adequate for a solution.
Again, please answer as **specifically** or **generally** as you like, I'm looking for advice but if someone has a complete algorithm that would just make my day. :)
**EDIT:** In response to lassvek, I am providing some additional detail:
Table B'... | [
0.015085599385201931,
0.22744594514369965,
0.2491268515586853,
0.2333718091249466,
0.11486050486564636,
-0.2357930988073349,
0.2513222098350525,
-0.14150668680667877,
-0.22674879431724548,
-0.5742648839950562,
-0.14561912417411804,
0.3367183208465576,
-0.24823535978794098,
0.09717806428670... | |
Start End
01 Resource A 10/6 7:00AM 10/6 11:00AM
02 Resource A 10/6 1:00PM 10/6 3:00PM
Table B
ID Table_A_ID Start End
01 02 10/6 1:00PM 10/6 2:00PM
```
So I want the following behaviours:
* If I remove ID 02 from table A, or shorten it to 2:00PM - 3:00PM, I should remove ID 01 fro... | [
0.08933502435684204,
0.3169932961463928,
0.5125623345375061,
-0.11646748334169388,
-0.23623861372470856,
-0.23533298075199127,
0.47117626667022705,
-0.39842092990875244,
-0.06725335121154785,
-0.7620440721511841,
-0.1151997298002243,
0.6346403360366821,
0.442793071269989,
-0.13591748476028... | |
**these two entries should be merged together into one row**, and Table B ID 01 should now point to table A ID 01.
* If I remove 8:00AM-10:00AM from Table A ID 01, that entry should be split into two entries: One for 7:00AM-8:00AM, and a new entry (ID 03) for 10:00AM-11:00AM.
I have worked extensively with periods, but... | [
0.2758101522922516,
0.21743518114089966,
0.3832266330718994,
0.016902348026633263,
0.06514722853899002,
0.3042060136795044,
0.050571855157613754,
-0.1423942893743515,
-0.42636367678642273,
-0.7429423928260803,
-0.11547421663999557,
0.1698528230190277,
0.12017262727022171,
0.290034651756286... | |
in table B, like this?
```
|---------------- A -------------------|
|--- B ----| |--- B ---|
```
or overlaps with?
```
|---------------- A -------------------|
|--- B ----| |--- B ---|
```
or the opposite way, timespans in B contains/overlaps with A?
Let's say it's the first o... | [
-0.44337913393974304,
0.2556067109107971,
0.35169151425361633,
-0.2918398976325989,
-0.04883088544011116,
0.1667836755514145,
-0.2555480897426605,
-0.314871221780777,
-0.5288816690444946,
-0.4610494375228882,
-0.34125062823295593,
0.0854341983795166,
-0.456569641828537,
0.13118718564510345... | |
A-timespan, what about this?
* A shortened A-timespan removes all the linked timespans from B that now falls outside A
* A lenghtened A-timespan, will this include all matching B-timespans now inside?
```
Here's an example:
```
|-------------- A1 --------------| |-------- A2 --------------|
|---- B1 ----| |---... | [
-0.11656234413385391,
0.04946274310350418,
0.4346257746219635,
-0.6333398222923279,
-0.17825914919376373,
0.4654233455657959,
0.2821859121322632,
-0.10009703785181046,
-0.5279950499534607,
-0.5587936043739319,
-0.3002285063266754,
0.1759444624185562,
-0.3508235812187195,
-0.067192092537879... | |
that you want to modify the data like this:
```
1. Lengthen (update) A1
2. Shorten and move (update) A2
3. Re-link (update) B3 from A2 to A1 instead
```
how about this modification, A1 is lengthened, but not enough to contain B3 entirely, and A2 is moved/shortened the same way:
```
|-------------- A1 --------------... | [
0.032261189073324203,
-0.03278125450015068,
0.2780614197254181,
-0.2507600784301758,
-0.006682907231152058,
0.1429063230752945,
0.18902769684791565,
-0.33390048146247864,
-0.6059443950653076,
-0.1941523253917694,
-0.10574991255998611,
0.36361128091812134,
-0.2625361382961273,
-0.1070260927... | |
about:
```
|------------------ A -----------------------|
|------- B1 -------| |------- B2 ------|
|---| <-- I want to remove this from A
```
What about this?
Either:
```
|------------------ A1 ----| |---- A2 -----|
|------- B1 -------| |B3| |--- B2 ---|
```
... | [
0.49002066254615784,
0.47741496562957764,
0.2893957197666168,
-0.05675511062145233,
0.3974766433238983,
-0.11048799753189087,
0.201405867934227,
-0.047853391617536545,
-0.24176287651062012,
-0.37969526648521423,
-0.06292983144521713,
0.5075145959854126,
-0.24926750361919403,
0.336905360221... | |
with questions, so far:
* You want to be able to do the following operations on A's
+ Shorten
+ Lengthen
+ Combine when they are adjacent, combining two or more into one
+ Punch holes in them by removing a period, and thus splitting it
* B's that are still contained within an A after the above update, relink if ne... | [
0.264836847782135,
0.08358317613601685,
0.037722229957580566,
0.1519297957420349,
0.10085704177618027,
0.07506512105464935,
0.3135215938091278,
-0.5383498668670654,
-0.2948790192604065,
-0.27618420124053955,
-0.3908478617668152,
0.2861100137233734,
0.0007145903655327857,
-0.077594883739948... | |
the operations (instead of just removing everything and inserting anew)
I'll work on an implementation in C# that might work when I get home from work, I'll come back with more later tonight.
---
**Edit** Here's a stab at an algorithm.
1. Optimize the new list first (ie. combine adjacent periods, etc.)
2. "merge" t... | [
0.2708745002746582,
-0.2835850417613983,
0.36877840757369995,
0.13138817250728607,
0.3660765588283539,
0.05216722935438156,
0.09605147689580917,
-0.1473793387413025,
-0.5500529408454895,
-0.562067985534668,
-0.2272760570049286,
0.4630478322505951,
-0.33491551876068115,
-0.0602010115981102,... | |
period is entirely after the current existing period, remove the existing period and all its child periods, then move to the next existing period
4. if the two overlap, adjust the current existing period to be equal to the new period, in the following way, then move on to the next new and existing period
1. if new p... | [
0.15590520203113556,
-0.139055535197258,
0.7845060229301453,
-0.04748382046818733,
0.21352453529834747,
0.28870201110839844,
0.0764676034450531,
-0.043750595301389694,
-0.5570175051689148,
-0.48816588521003723,
-0.4785391092300415,
0.03312356770038605,
0.05249224603176117,
0.53083711862564... | |
see if they needs to be relinked or deleted
You should create a massive set of unit tests and make sure you cover all combinations of modifications. | [
0.4069508910179138,
0.03627443686127663,
-0.0985388234257698,
0.3798150420188904,
0.3696397840976715,
-0.2367369681596756,
-0.055795665830373764,
-0.24221129715442657,
-0.19849368929862976,
-0.5837117433547974,
-0.09559287875890732,
0.4471922516822815,
-0.11755597591400146,
0.0291225928813... | |
In a Linux embedded application I'm developing, there is the need to record some events that happen from time to time. These records are saved on a MTD flash device and once written there is no need to change them or do efficient searches, but read access is required to show the data back to the user.
A big problem is ... | [
0.16737018525600433,
-0.057249803096055984,
0.34462806582450867,
0.24963806569576263,
0.29798150062561035,
-0.38407111167907715,
0.3024720549583435,
0.19145575165748596,
-0.22916044294834137,
-0.4157024323940277,
-0.29014959931373596,
0.4963703751564026,
-0.2922392785549164,
-0.02710634469... | |
date, time, a couple of short text strings and several integers.
Currently I inherited a solution based on jffs2 and SQLite that is far from optimal because the DB file sometimes get corrupted. When this happens the whole file gets unreadable and there is no way to understand if it was caused by a bug in jffs2, or in ... | [
0.3251955807209015,
0.13642184436321259,
0.2887646555900574,
0.31721025705337524,
0.05649914592504501,
-0.19727367162704468,
0.19638797640800476,
0.05757523328065872,
-0.2245170623064041,
-0.610931932926178,
0.18131408095359802,
0.40222224593162537,
-0.0846690759062767,
0.42672374844551086... | |
use a text file with a CSV-like format ?
We are using plain old syslogd to a YAFFS2 partition on NAND flash, it appears to work well: when messages are sent to the logger and power is removed immediately after (<100ms) the message is there and the log never appears to corrupt.
This is based on observation rather than ... | [
0.5356234312057495,
0.02715929225087166,
0.2132789045572281,
0.21146023273468018,
0.1474679410457611,
-0.42352810502052307,
0.47571027278900146,
-0.004934536758810282,
-0.17152243852615356,
-0.5296676158905029,
0.1805180311203003,
0.6577411890029907,
-0.27139562368392944,
-0.21454009413719... | |
I understand that they are both supposed to be small, but what are the key differences between the two?
**Exokernel** is an **operating system from MIT** (and a class of it's variants) which handles relatively little hardware abstraction. In exokernel, the low-level responsibilities of controlling hardware (particularl... | [
0.1751517653465271,
0.2315938025712967,
0.05287405848503113,
0.39560869336128235,
0.18966636061668396,
0.16614237427711487,
-0.23863938450813293,
0.1950661689043045,
-0.18278415501117706,
-0.507133424282074,
-0.5832512378692627,
0.31322234869003296,
-0.20659343898296356,
-0.158214852213859... | |
in to provide some of the abstraction that the exokernel isn't providing. The developer can then choose between abstraction models, or roll their own. Given the application, this may have great performance benefits. If you don't know what you're doing, you can also write programs that will explode when they crash.
Mo... | [
0.04520375654101372,
-0.45270004868507385,
-0.2273927628993988,
0.2602170407772064,
-0.10746904462575912,
0.028793521225452423,
-0.2470901757478714,
0.2035965770483017,
0.045525357127189636,
-0.6947537064552307,
-0.14602260291576385,
0.4331136643886566,
-0.28581127524375916,
0.152644753456... | |
is usually denoting the "size" of the kernel.. **Bigger kernels** are more built with more features, and **handle more hardware abstraction**. Nanokernels are relatively small kernels which **provide hardware abstraction**, but **lack system services**. Modern microkernels also lack system services, so the terms have b... | [
0.05939292162656784,
-0.2990272045135498,
-0.05759729817509651,
0.33145925402641296,
-0.2682180404663086,
-0.11030954122543335,
-0.1575229912996292,
0.3132827579975128,
-0.11582451313734055,
-0.6272949576377869,
-0.44143426418304443,
0.38781625032424927,
-0.14378990232944489,
0.30616366863... | |
abstraction means fewer catastrophic bugs. In some applications, you might want to use a different abstraction model, or you might want to handle everything yourself. If we wanted to scrap the OS abstraction for a particular project, we'd have to cut out the operating system and commit a piece of hardware to the job. I... | [
0.45166006684303284,
0.07319982349872589,
-0.19399088621139526,
0.5674519538879395,
-0.10412268340587616,
-0.059463419020175934,
0.0773129016160965,
0.09379272162914276,
-0.1889074146747589,
-0.6686710715293884,
-0.1169114038348198,
0.8910154700279236,
-0.07050547003746033,
-0.085385702550... | |
There are usually several layers of operating system built on top of a kernel, and your application will run on the highest level of the OS. When writing in javascript, you're higher up still, interfacing with a model implemented in an application which runs on an operating system, etc. etc. Addressing memory, while it... | [
0.023641414940357208,
0.022550208494067192,
0.09964238852262497,
0.5015631914138794,
0.05010062828660011,
0.03062358871102333,
0.10852448642253876,
0.10512623190879822,
-0.1679089367389679,
-0.907039225101471,
-0.11235970258712769,
0.7761245369911194,
-0.1400410234928131,
-0.24063679575920... | |
I have a method that takes an IQueryable. Is there a LINQ query that will give me back the size of each column in the IQueryable?
To be more clear: this is Linq-to-objects. I want to get the length of the ToString() of each "column".
It depends. If you mean is there a completely generic way to make this determination ... | [
-0.22475630044937134,
0.11873088032007217,
0.46030479669570923,
0.2783847153186798,
-0.20033423602581024,
0.13283655047416687,
-0.014671445824205875,
-0.10011051595211029,
-0.14214617013931274,
-0.5501492619514465,
0.19566982984542847,
0.420062392950058,
-0.4303610622882843,
0.201934903860... | |
to members and member type to a column size then yes there is a way to get the size.
```
public IEnumerable GetColumnSize(IQueryable source)
{
var types = MapTypeToMembers(source).Select(x => x.Type);
return types.Select(x => MapTypeToSize(x));
}
``` | [
-0.222337543964386,
-0.08739756047725677,
0.6258843541145325,
0.05776987597346306,
0.11393541097640991,
-0.19494836032390594,
0.0801657885313034,
-0.29127323627471924,
-0.14976255595684052,
-0.9136977791786194,
-0.3600844740867615,
0.4308328330516815,
-0.4169795513153076,
0.097368583083152... | |
I have a multi-line string that I want to do an operation on each line, like so:
```
inputString = """Line 1
Line 2
Line 3"""
```
I want to iterate on each line:
```
for line in inputString:
doStuff()
```
```py
inputString.splitlines()
```
Will give you a list with each item, the [`splitlines()`](https://doc... | [
0.2699301540851593,
-0.20859354734420776,
0.4034227728843689,
-0.145684152841568,
-0.14670367538928986,
0.18765303492546082,
0.03206770122051239,
-0.3053741157054901,
-0.24538558721542358,
-0.45761725306510925,
-0.29839304089546204,
0.2707044780254364,
-0.49253177642822266,
-0.022178763523... | |
I am looking for a (preferably pure) python library to do AES 256 encryption and decryption.
This library should support the CBC cipher mode and use PKCS7 padding [according to the answer to an earlier question of mine](https://stackoverflow.com/questions/172392/what-symmetric-cypher-to-use-for-encrypting-messages).
... | [
0.1357366144657135,
0.3507893979549408,
0.05290021747350693,
0.1345302313566208,
0.08290744572877884,
-0.24344976246356964,
0.3908510208129883,
-0.13280682265758514,
-0.23746941983699799,
-0.5694378614425659,
-0.13673244416713715,
0.29068830609321594,
-0.5192232131958008,
-0.20527201890945... | |
unfortunately I cannot delete this post, since it's the accepted answer. As people pointed out in the comments, this library is not mantained anymore and probably also vulnerable from a security point of view. So please, take a look to the below answers instead. | [
0.29110896587371826,
0.03703178092837334,
0.3181275725364685,
0.497027724981308,
-0.0364086851477623,
-0.4893934726715088,
0.5345664620399475,
0.37239351868629456,
-0.18441039323806763,
-0.6786112785339355,
-0.2186947911977768,
-0.03225492686033249,
-0.08041183650493622,
0.4234156906604767... | |
I'll go first.
I'm 100% in the set-operations camp. But what happens when the set logic
on the entire desired input domain leads to a such a large retrieval that the query slows down significantly, comes to a crawl, or basically takes infinite time?
That's one case where I'll use a itty-bitty cursor (or a while loop)... | [
0.15372686088085175,
-0.20829254388809204,
0.3879266083240509,
0.3184117078781128,
-0.12034746259450912,
0.26124516129493713,
-0.0833345428109169,
-0.08192482590675354,
-0.27392035722732544,
-0.5775550603866577,
-0.18627627193927765,
0.5289837121963501,
-0.25163477659225464,
0.016864242032... | |
an interaction will an external system, and when "good enough" speed can be achieved by looping in serial, just may not be worth it (epecially during development).
Sure, there are a number of places where cursors might be better than set-based operations.
One is if you're updating a lot of data in a table (for example... | [
-0.2427200824022293,
-0.3643593192100525,
0.28389519453048706,
0.35930055379867554,
-0.19536952674388885,
0.05512642115354538,
0.06582265347242355,
-0.07247593253850937,
-0.5561298131942749,
-0.7070221900939941,
0.14303940534591675,
0.4406850337982178,
-0.6361759305000305,
-0.1877000480890... | |
processes accessing the data.
Another is if you want to take application-level locks using the `sp_getapplock` stored procedure, which is useful when you want to ensure rows that are being polled for by multiple processes are retrieved exactly once ([example here](http://gregbeech.com/blogs/tech/archive/2008/06/11/ret... | [
-0.015306391753256321,
-0.12218746542930603,
0.44286513328552246,
0.18576090037822723,
0.007885878905653954,
0.05614478513598442,
-0.17899784445762634,
-0.4310263991355896,
-0.6220601797103882,
-0.5317491292953491,
-0.06390843540430069,
0.4031125009059906,
-0.330375999212265,
0.01798528246... | |
```
function returnsAnArray ()
{
return array ('test');
}
echo returnsAnArray ()[0];
```
generates a syntax error in PHP. What's the most efficient way to directly obtain an element from a returned array without assigning the result to a temp variable?
Here's one way, using the [list](http://www.php.net/list) lang... | [
0.1579824984073639,
-0.001775172888301313,
0.07985445111989975,
-0.45337870717048645,
-0.18881720304489136,
0.31049105525016785,
0.22399967908859253,
-0.7146131992340088,
0.08847139030694962,
-0.31253722310066223,
-0.061684951186180115,
0.4447549879550934,
-0.3558012545108795,
-0.003468755... | |
When I try this with a generic class where this.value is T:
```
if (this.value.GetType() == typeof(int))
{
((int)this.value)++;
}
else
{
throw new InvalidOperationException
("T must be an int to perform this operation");
}
```
I get a compile-time error: "Cannot convert type 'T' to 'int'"
What s... | [
0.1818726509809494,
-0.25886794924736023,
0.1848665475845337,
-0.26962020993232727,
-0.05591406300663948,
-0.3409883379936218,
0.6389240026473999,
-0.45637738704681396,
-0.037256136536598206,
-0.5473218560218811,
-0.12566792964935303,
0.8585898876190186,
-0.4257695972919464,
0.334386914968... | |
compiler about specific T implementations. One (nasty) approach is to cast to object in the middle (note this will box and unbox value-types):
```
int i = (int)(object)this.value;
i++;
this.value = (T)(object)i;
```
Ugly but it works. In .NET 3.5 I have some better wrappers for generic arithmetic, [here](http://www.... | [
0.21942195296287537,
-0.2625012993812561,
0.026822777464985847,
-0.1719982773065567,
-0.32050350308418274,
-0.10480712354183197,
0.3039109706878662,
-0.3891032636165619,
0.14564235508441925,
-0.4878816306591034,
-0.13272349536418915,
0.7644423246383667,
-0.5630075335502625,
-0.163455024361... | |
any type (even your own) that supports "T +(T,int)".
I think there is also a ChangeType hiding around somewhere in there...
[edit] Collin K and others make a valid remark about the architectural implications - but being pragmatic there are times when the T really does matter that much... but I'd agree with avoiding t... | [
0.24920465052127838,
-0.03715777397155762,
-0.11683237552642822,
0.31644561886787415,
-0.1927596479654312,
-0.1162489503622055,
0.37667980790138245,
-0.28288888931274414,
-0.19942301511764526,
-0.7614632844924927,
-0.3407142758369446,
0.4615587592124939,
0.0598205029964447,
-0.257387071847... | |
I'm attempting to use extension methods to add an operater overload to the C# `StringBuilder` class. Specifically, given `StringBuilder` `sb`, I'd like `sb += "text"` to become equivalent to `sb.Append("text")`.
Here's the syntax for creating an extension method for `StringBuilder`:
```
public static class sbExtensio... | [
0.17392265796661377,
0.09569179266691208,
0.5632566809654236,
-0.25210925936698914,
-0.007252671755850315,
-0.09342660754919052,
0.21744859218597412,
-0.3958730697631836,
-0.02129494957625866,
-0.391991525888443,
-0.24886733293533325,
0.6279138922691345,
-0.67588871717453,
0.13924099504947... | |
{
return sb.Append(s);
}
}
```
Among other issues, the keyword `this` is not allowed in this context.
Are adding operator overloads via extension methods possible? If so, what's the proper way to go about it?
This is not currently possible, because extension methods must be in static classes, and static... | [
0.1757269948720932,
0.09962090849876404,
0.12480466067790985,
-0.1269974708557129,
-0.04576226696372032,
-0.12209420651197433,
0.5231662392616272,
-0.10370820015668869,
-0.6568620204925537,
-0.1753467172384262,
-0.4013513922691345,
0.5094756484031677,
-0.6345317959785461,
-0.01043053716421... | |
says:
> ...for the Orcas release we decided to
> take the cautious approach and add
> only regular extension methods, as
> opposed to extention properties,
> events, operators, static methods, etc
> etc. Regular extension methods were
> what we needed for LINQ, and they had
> a syntactically minimal design that
> coul... | [
0.1152040883898735,
0.027954714372754097,
0.4132198393344879,
-0.05624714866280556,
0.020955689251422882,
-0.3681660592556,
0.13097737729549408,
-0.037332817912101746,
-0.20342953503131866,
-0.23815810680389404,
-0.21510611474514008,
0.28809162974357605,
-0.3662987947463989,
-0.21055524051... | |
not
> be doing this in the next release. We
> did take extension members very
> seriously in our plans, and spent a
> lot of effort trying to get them
> right, but in the end we couldn't get
> it smooth enough, and decided to give
> way to other interesting features.
>
>
> This is still on our radar for future
> rele... | [
0.38174664974212646,
-0.17298749089241028,
0.19597145915031433,
-0.15675199031829834,
0.12679645419120789,
-0.2418828308582306,
0.2056431770324707,
0.1989368349313736,
-0.061578426510095596,
-0.4830872714519501,
-0.07728861272335052,
0.4849269986152649,
-0.34893471002578735,
-0.16522046923... | |
I need to create a news ticker that is updated via an RSS feed. Any ideas on how to implement this?
I would prefer Javascript but any language is acceptable.
There are are several good examples of this on [this DynamicDrive page](http://www.dynamicdrive.com/dynamicindex17/rsstickerajax/index.htm), although one of the ... | [
0.8716519474983215,
-0.18991497159004211,
0.4660041630268097,
0.019669612869620323,
-0.33343327045440674,
-0.18786309659481049,
-0.17948147654533386,
0.20984114706516266,
-0.3828740119934082,
-0.3800186514854431,
0.29035037755966187,
0.43040114641189575,
-0.4469653367996216,
-0.03811188787... | |
the feed to your server.
* access this local file via repeated AJAX calls, making use of [setTimeout](http://www.w3schools.com/js/js_timing.asp)
* update the display (ticker) with latest data fetched
The file is fetched to your local server for the AJAX calls due to the [Same Origin Policy](http://en.wikipedia.org/wik... | [
0.6044487357139587,
-0.37606367468833923,
0.26233893632888794,
0.13022063672542572,
-0.26265811920166016,
-0.23909880220890045,
0.14246289432048798,
0.05228496715426445,
-0.02665158547461033,
-0.5732836723327637,
-0.1313924789428711,
0.46107107400894165,
-0.2577102482318878,
-0.05285681411... | |
In almost all projects, the choice of the database system is 'almost' automatic .. if you're coding "in the Microsoft stack" you'll go with SQLServer, in the Linux world the default is MySQL, and for corporate in-house project most shops have decided on some default like Oracle or IBM DB2.
What are your thoughts?
My c... | [
0.5624172687530518,
0.03889482468366623,
0.05908466875553131,
0.21916940808296204,
0.13560917973518372,
-0.24032378196716309,
0.009171277284622192,
0.15210583806037903,
-0.018275445327162743,
-0.6021775603294373,
-0.2226906567811966,
0.699674129486084,
-0.40472957491874695,
-0.237168803811... | |
This is the one thing I could never get to work.
My problem is to detect the end of one day and the start of the next and then splitting the diff into each day.
Imagine you want to calculate a pay rate but it has to span across midnight.
It also applies to calculating time to run on timed system, or time diff it s... | [
0.7258575558662415,
-0.12158335000276566,
0.35964149236679077,
0.13057802617549896,
0.10549162328243256,
-0.1521632969379425,
0.09837706387042999,
0.1645912230014801,
-0.2254406064748764,
-0.3896928131580353,
0.31056317687034607,
0.23100630939006805,
-0.1829821765422821,
0.5390584468841553... | |
common for timekeeping systems to have a single record that contains a date, a start time, and an end time. In this case, the problem is less trivial.
There are, I think, two questions you're asking:
1. How can I tell if a time span crosses midnight?
2. If a time span crosses midnight, how much of the time happened o... | [
0.6476391553878784,
-0.04726213589310646,
0.38590559363365173,
0.2991577088832855,
0.39768117666244507,
0.04928400367498398,
0.04188571125268936,
-0.1716480404138565,
-0.6786388754844666,
-0.49242541193962097,
0.2525155246257782,
0.06432066112756729,
0.10624925792217255,
0.3930841684341430... | |
of the time span that occurred on the date is the time between the start time and midnight. The amount of the time span that occurred on the next date is the time between midnight and the end time (i.e. just the end time). | [
0.27484020590782166,
-0.1346418857574463,
0.8000364303588867,
0.28456687927246094,
0.2733459770679474,
0.03774277865886688,
0.3626989424228668,
0.19944432377815247,
-0.21410439908504486,
-0.5744258761405945,
-0.04996196925640106,
0.15189172327518463,
0.18311677873134613,
0.4603072106838226... | |
Is there a way to make a popup window maximised as soon as it is opened? If not that, at least make it screen-sized? This:
```
window.open(src, 'newWin', 'fullscreen="yes"')
```
apparently only worked for old version of IE.
Use `screen.availWidth` and `screen.availHeight` to calculate a suitable size for the height ... | [
0.21255835890769958,
-0.028055129572749138,
0.8035665154457092,
-0.03751106932759285,
0.049042314291000366,
-0.15841561555862427,
0.17014209926128387,
-0.0813681110739708,
-0.2580394744873047,
-0.8230275511741638,
-0.13260942697525024,
0.6320216059684753,
0.12880396842956543,
-0.0302199106... | |
I have the option of storing data in memory either as an XML document or multi-table ADO dataset. The web page utilizing this object will be selectively retrieving data items based on keys.
Does either of these objects have a clear performance advantage over the other?
A DataSet is already an XML Document, sort of. On... | [
0.3950311541557312,
0.33970195055007935,
0.1777540147304535,
0.31331750750541687,
0.1340074986219406,
-0.22062739729881287,
-0.2073381543159485,
-0.025865590199828148,
-0.15239334106445312,
-0.6372984051704407,
0.08337190747261047,
0.5372419953346252,
0.22729042172431946,
0.107238411903381... | |
other tables then go with the XML, but be careful with large subsets of data. | [
-0.009038795717060566,
0.15399925410747528,
0.30067873001098633,
0.3839363753795624,
0.14777424931526184,
-0.3604951500892639,
-0.3723480999469757,
-0.09802987426519394,
-0.06581564247608185,
-0.6260879635810852,
-0.3910773992538452,
0.1570512354373932,
-0.027830922976136208,
-0.2727553546... | |
Well, after a long time writing .net programs in C# I started to feel angry and frustrated about all that syntactic trash that comes with statically typed languages. Now I want to change to dynamically typed languages, that takes advantage of CLI.
So I searched a bit around and I didn't like of what I saw. I first look... | [
0.264433354139328,
0.1765337586402893,
-0.08718977123498917,
-0.010876438580453396,
-0.15929484367370605,
0.11850989609956741,
0.44505807757377625,
0.6606413125991821,
-0.1981189101934433,
-0.39909228682518005,
-0.022042743861675262,
0.31039804220199585,
-0.4798668324947357,
0.330061048269... | |
project is still at beta, and so I decided to wait until it gets more mature.
So as I couldn't find a good CLR compatible dynamic language, I'm asking you guys what do you(would you) use?
Since people started asking what is the reason for not choosing IronPython. Well the reason is, like I stated earlier, it seems di... | [
0.5748113393783569,
0.04552637040615082,
-0.1882670670747757,
0.006509050726890564,
-0.127267986536026,
-0.2587997317314148,
0.2162064164876938,
0.11025836318731308,
0.10291324555873871,
-0.5031824111938477,
-0.054297495633363724,
0.44252029061317444,
-0.18978208303451538,
-0.0087230065837... | |
IronRuby's svn prior using it).
What kind of issues IPython was trying to addres when it was created. Is there a page with that kind of information?
Well the page is there, but its hidden on the 'More Information Page' among a bunch of meaningless links to articles.
On Boo's page its at clear sight named as Manifesto ... | [
0.41439104080200195,
0.21851089596748352,
-0.12923865020275116,
0.06705617159605026,
-0.4314611256122589,
-0.2977617084980011,
0.2224726378917694,
0.2942640781402588,
-0.2459384948015213,
-0.16245105862617493,
0.09307881444692612,
0.6502273082733154,
-0.270471453666687,
0.11816104501485825... | |
IPython).
About Duck-Typing and Boo's static typing they both seems to work fine for me.
I'd still use [**Boo**](http://boo.codehaus.org/). I'm not sure why you believe Boo has been halted. Development sometimes seems slow, but there are multiple people currently working on bug fixes as demonstrated by [**this list of... | [
-0.10250162333250046,
0.20331531763076782,
0.17052194476127625,
-0.004640994593501091,
-0.15649151802062988,
-0.16891226172447205,
0.5016131401062012,
0.034603144973516464,
-0.2957323491573334,
-0.606401264667511,
0.12340009957551956,
0.6027411222457886,
-0.42658692598342896,
0.16197735071... | |
couple years ago. To me it looked like a straight port of Python to the CLI, but as far as I could tell it did not include new features typical .NET development requires.
**EDIT**: IronPython does seem to have progressed since I first looked at it (thanks for Curt pointing this out). However I have not bothered to loo... | [
0.09584222733974457,
0.028906453400850296,
0.1415911614894867,
-0.3223626911640167,
-0.32589083909988403,
-0.11475255340337753,
0.4430980980396271,
0.7083141803741455,
-0.49952203035354614,
-0.3299267292022705,
0.27431246638298035,
0.5072205662727356,
-0.187312513589859,
-0.093049973249435... | |
If you have the following:
```
$var = 3; // we'll say it's set to 3 for this example
if ($var == 4) {
// do something
} else if ($var == 5) {
// do something
} else if ($var == 2) {
// do something
} else if ($var == 3) {
// do something
} else {
// do something
}
```
If say 80% of the time `$var... | [
0.1825464814901352,
0.08512955904006958,
0.1591794490814209,
-0.40199822187423706,
0.04774192348122597,
-0.10043062269687653,
0.6694413423538208,
-0.5580287575721741,
-0.2493140995502472,
-0.6560484170913696,
-0.11765841394662857,
0.8096861839294434,
-0.5166634321212769,
-0.203010320663452... | |
small site it's not a big deal, but what about when that if statement is going to run 1000s of times a second?
I'm working in PHP, but I'm thinking the language doesn't matter.
Here's how we did it when I used to write software for radar systems. (Speed matters in radar. It's one of the few places where "real time" ac... | [
0.41497156023979187,
-0.22927741706371307,
0.13388419151306152,
0.14915604889392853,
0.1329697221517563,
-0.3810868561267853,
0.44579824805259705,
0.3363173007965088,
-0.30465346574783325,
-0.7333809733390808,
0.17538221180438995,
0.6975407600402832,
-0.03593028709292412,
-0.22784245014190... | |
elif var == 3:
# do something
else:
raise Exception
else:
if var == 4:
# do something
elif var == 5:
# do something
else:
raise Exception
```
Your if-statements form a tree instead of a flat list. As you add conditions to this list, you jiggle around the center... | [
0.21777814626693726,
0.1182677298784256,
-0.00005455627979245037,
-0.23441651463508606,
-0.07353551685810089,
0.011713891290128231,
0.4007580578327179,
-0.4756421446800232,
-0.009925765916705132,
-0.348601758480072,
-0.07800043374300003,
0.36781254410743713,
-0.3613590896129608,
-0.0536580... | |
the tree. The flat sequence of *n* comparisons takes, on average, *n*/2 steps. The tree leads to a sequence of comparisons that takes log(*n*) comparisons. | [
0.041120074689388275,
0.12888330221176147,
0.0718674436211586,
0.00012412408250384033,
-0.0864274874329567,
0.5318644046783447,
0.11009211838245392,
-0.5668886303901672,
-0.0829264372587204,
-0.8792409300804138,
-0.17484743893146515,
0.2819037139415741,
-0.16879990696907043,
0.169699653983... | |
I have a Boost unit test case which causes the object under test to throw an exception (that's the test, to cause an exception). How do I specify in the test to expect that particular exception.
I can specify that the test should have a certain number of failures by using BOOST\_AUTO\_TEST\_CASE\_EXPECTED\_FAILURES bu... | [
0.1557406783103943,
0.3006588816642761,
-0.18272317945957184,
-0.03166498616337776,
0.015841644257307053,
-0.09871963411569595,
0.3386003375053406,
-0.2892095148563385,
-0.010411880910396576,
-0.3730899393558502,
-0.19270657002925873,
0.7674008011817932,
-0.28827422857284546,
-0.2499044984... | |
the given exception type or fail otherwise. If you need a different severity than 'CHECK', you could also use `BOOST_WARN_THROW()` or `BOOST_REQUIRE_THROW()` instead. See [the documentation](http://www.boost.org/doc/libs/1_35_0/libs/test/doc/components/test_tools/reference/BOOST_CHECK_THROW.html) | [
0.39204141497612,
-0.014722705818712711,
-0.14308539032936096,
-0.34300100803375244,
-0.13676884770393372,
-0.3317182958126068,
0.4865487813949585,
-0.4212706983089447,
0.014123239554464817,
-0.30949684977531433,
-0.28935638070106506,
0.6012789607048035,
-0.3502758741378784,
-0.18872943520... | |
I'm trying to call a web service from Excel 2003 module.
The way i've implemented it is creating a .NET COM library with all the classes/methods i need to be exposed.
When i try to call a method that queries a web service from Excel the execution just stops on that line without any error.
May be it has to do with refer... | [
0.29407161474227905,
0.4989941120147705,
0.14000409841537476,
-0.00047180018736980855,
-0.08249449729919434,
-0.24182549118995667,
0.32682299613952637,
0.08601513504981995,
-0.3312898278236389,
-0.6771239638328552,
0.3106655478477478,
0.43797940015792847,
-0.5238338112831116,
0.48315808176... | |
should be the location of caller application (in this case it was C:\Program Files\Microsoft Office\OFFICE11). Sencondly my web services proxies were loading the endpoint urls from .config file, which in that context was C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE.config | [
-0.018314212560653687,
0.09242793172597885,
0.6565535664558411,
0.01685551553964615,
0.1085013598203659,
-0.057907525449991226,
0.2830965220928192,
0.20600523054599762,
0.011109694838523865,
-0.4005754590034485,
-0.22292131185531616,
0.38364243507385254,
-0.17814305424690247,
0.13096456229... | |
After understanding (quote), I'm curious as to how one might cause the statement to execute. My first thought was
```
(defvar x '(+ 2 21))
`(,@x)
```
but that just evaluates to `(+ 2 21)`, or the contents of `x`. How would one run code that was placed in a list?
`(eval '(+ 2 21))` | [
0.5233889222145081,
0.14855454862117767,
-0.0725269541144371,
-0.24616536498069763,
-0.281829297542572,
-0.12048798054456711,
0.6425198912620544,
-0.37646400928497314,
-0.09165433794260025,
-0.04691747575998306,
-0.08391871303319931,
0.5126186609268188,
-0.5176392793655396,
0.0327407158911... | |
What are the `access.log.*` files?
Apache, I believe, does log rotation. So these would be the older log files with the access.log file being the current one. | [
0.16780859231948853,
0.13894888758659363,
0.08811096101999283,
0.2874480187892914,
0.020285572856664658,
-0.2703668773174286,
-0.05584099143743515,
0.013626332394778728,
-0.5559660196304321,
-0.13957518339157104,
-0.0021556615829467773,
0.40178999304771423,
0.25480911135673523,
0.261554360... | |
All too often I want a WPF slider that behaves like the System.Windows.Forms.TrackBar of old. That is, I want a slider that goes from X to Y but only allows the user to move it in discrete integer positions.
How does one do this in WPF since the Value property on the Slider is double?
If you set your tick marks in the... | [
0.42058974504470825,
-0.16845223307609558,
0.5856431722640991,
0.07332988828420639,
-0.3554096519947052,
-0.08354562520980835,
-0.11572857201099396,
-0.42952200770378113,
-0.38283705711364746,
-0.5394954085350037,
0.24854132533073425,
0.2649495005607605,
-0.28358784317970276,
0.09153146296... | |
Say you're coding some kind of web application. Something where people can contribute content, e.g. a simple photo-sharing site.
How many good reasons can you think of to *not* go with an object-oriented database (e.g. db4o)?
An OODBMS is better if you only need to access your data through your objects. If your soluti... | [
0.550912618637085,
0.17113927006721497,
-0.2656019330024719,
0.3800528645515442,
-0.07423379272222519,
-0.30180078744888306,
0.14689570665359497,
0.1540004462003708,
-0.42279258370399475,
-0.7489481568336487,
-0.17485792934894562,
0.4406605064868927,
-0.4698637127876282,
-0.151398897171020... | |
I need to create a custom volume slider for a WMP object. The current slider is complicated to modify, and use, is there a simple way to generate a slider on an HTML page that can have it's value passed to a javascript function?
[jQuery UI Slider](http://jqueryui.com/demos/slider/) ([API docs](http://docs.jquery.com/UI... | [
0.46801090240478516,
0.02994358167052269,
0.6355443000793457,
0.21545174717903137,
-0.053919605910778046,
-0.021318955346941948,
-0.23580820858478546,
-0.29591912031173706,
-0.26619020104408264,
-0.4241144061088562,
0.14719632267951965,
0.5247498750686646,
-0.24087382853031158,
0.224497318... | |
What are some of the new features that can be used in .NET 2.0 that are specific to C# 3.0/3.5 after upgrading to Visual Studio 2008? Also, what are some of the features that aren't available?
**Available**
* Lambdas
* Extension methods (by declaring an empty System.Runtime.CompilerServices.ExtensionAttribute)
* Auto... | [
0.14516708254814148,
-0.10014554858207703,
0.42924919724464417,
0.010437754914164543,
-0.07716290652751923,
0.13313011825084686,
-0.12055979669094086,
-0.40361467003822327,
-0.3239935338497162,
-0.38990727066993713,
-0.12971068918704987,
0.6752966046333313,
-0.44994038343429565,
-0.1706477... | |
(by declaring an empty `System.Runtime.CompilerServices.ExtensionAttribute`)
* Automatic properties
* Object Initializers
* Collection Initializers
* LINQ to Objects (by implementing `IEnumerable<T>` extension methods, see [LinqBridge](http://www.albahari.com/nutshell/linqbridge.aspx)) | [
-0.09194480627775192,
-0.0238915104418993,
0.27597662806510925,
-0.0570862852036953,
0.10670341551303864,
0.04800551012158394,
0.05593166500329971,
-0.39600110054016113,
-0.24951741099357605,
-0.3752927780151367,
-0.39416563510894775,
0.3333948850631714,
-0.3780997097492218,
-0.10561376065... | |
I want to make sure people can't type the name of a PHP script in the URL and run it. What's the best way of doing this?
I could set a variable in the file that will be including this file, and then check that variable in the file being included, but is there an easier way?
You could check the URI and see if that file... | [
0.5739449262619019,
0.2621658146381378,
0.022414110600948334,
0.031929194927215576,
-0.05370518937706947,
-0.25025200843811035,
0.11310594528913498,
0.05486394464969635,
-0.10005209594964981,
-0.3945503532886505,
0.27593594789505005,
0.5428658127784729,
-0.3760208487510681,
0.2811477184295... | |
Given:
```
interface I
{
}
class B: I
{
}
class C: I
{
}
class A
{
public void Method(B arg)
{
}
public void Method(C arg)
{
}
public void Method(I arg)
{
// THIS is the method I want to simplify.
if (I is B)
{
this.Method(arg as B);
} | [
0.02919096127152443,
0.2117805927991867,
0.28773459792137146,
-0.3970506191253662,
-0.11692026257514954,
0.15652452409267426,
0.24252809584140778,
-0.26109740138053894,
-0.05136921629309654,
-0.5662859678268433,
-0.10200966894626617,
0.5256409049034119,
-0.8074992895126343,
0.2725149393081... | |
else if (I is C)
{
this.Method(arg as C);
}
}
}
```
I know that there are better ways to design this type of interactions, but because of
details which would take too long to explain this is not possible.
Since this pattern will be duplicated MANY times, I would like to replace the
condit... | [
0.34339597821235657,
0.12512776255607605,
0.12810277938842773,
-0.04844304546713829,
-0.0060826935805380344,
-0.1922624409198761,
0.2598845660686493,
-0.10341548919677734,
-0.04263465106487274,
-0.5227000117301941,
0.22530019283294678,
0.526358962059021,
-0.6365485191345215,
0.095182999968... | |
generic method/class, but my instincts tell me it should be possible.
Any help would be appreciated.
What you want is [double dispatch](http://en.wikipedia.org/wiki/Double_dispatch), and [visitor pattern](http://en.wikipedia.org/wiki/Visitor_pattern) in particular. | [
0.037873297929763794,
-0.5086115598678589,
0.036641646176576614,
0.30996423959732056,
-0.23029252886772156,
-0.2058718353509903,
0.04071831330657005,
0.024453874677419662,
-0.42039161920547485,
-0.5798647999763489,
-0.32617008686065674,
0.3003879189491272,
-0.5778084993362427,
-0.117145918... | |
Specifically, in VS 2008, I want to connect to a data source that you can have by right-clicking on the automatically-generated App\_Data folder (an .mdf "database"). Seems easy, and it is once you know how.
So here's the answer from MSDN:
> Choos[e] "Add New Data Source" from the
> Data menu.[And follow the connecti... | [
0.08933654427528381,
-0.12244241684675217,
0.5578858852386475,
0.23063811659812927,
-0.17160488665103912,
-0.3041725754737854,
0.17771516740322113,
0.18749673664569855,
-0.13897095620632172,
-0.7269984483718872,
0.00243302877061069,
0.8381959199905396,
-0.31153470277786255,
0.2335247248411... | |
Database file, which will be in your VS Solution folder structure somewhere.
Test the connection. It'll be good. If you want to add the string to the web.config, click the Advanced button, and copy the Data Source line (at the bottom of the dialog box), and paste it into a connection string in the appropriate place in... | [
-0.15257686376571655,
-0.04171265289187431,
0.9053381681442261,
0.09074243903160095,
0.1668270379304886,
-0.25025609135627747,
0.2186591625213623,
-0.4072122871875763,
-0.022792883217334747,
-0.7047080993652344,
-0.28761953115463257,
0.7501346468925476,
-0.16851717233657837,
-0.03768306598... | |
I've got an iPhone app with icon file Icon.png.
This icon shows up properly when the app is on the phone itself, but it doesn't show up in the applications pane in iTunes.
What do I need to do to get it to show up properly?
The cleanest way to do this is described in the official Apple documentation, in a section cal... | [
0.7521108984947205,
0.3413374423980713,
0.3964254856109619,
-0.17250902950763702,
0.3198924958705902,
-0.029225265607237816,
0.5274327397346497,
-0.15585297346115112,
-0.31345728039741516,
-0.6271781921386719,
-0.017973681911826134,
0.4604755938053131,
-0.032343730330467224,
-0.08531007915... | |
that the file **must not have an extension**.
After generating the file of your application’s icon, follow these steps to add it to your application:
1. Open your project in Xcode.
2. In the Groups & Files list, select the Resources group.
3. Choose Project > Add to Project, navigate to your iTunesArtwork file, and c... | [
0.4793960154056549,
0.09313381463289261,
0.58428555727005,
0.10805179923772812,
0.1076039969921112,
-0.09572730213403702,
0.28637829422950745,
-0.2650558650493622,
-0.11222696304321289,
-0.768718421459198,
-0.4604897201061249,
0.48007458448410034,
-0.23239034414291382,
-0.02534754015505314... | |
you will get a verification error when trying to sync it to your device. Ensure that the artwork file is included in the "Copy Bundle Resources" folder, within your project's target in XCode (step 4, above). | [
0.7557132840156555,
-0.13501638174057007,
0.5007211565971375,
0.2890639305114746,
0.3738310933113098,
-0.4641592502593994,
0.06358806788921356,
-0.22564564645290375,
0.08793650567531586,
-0.7374218106269836,
-0.254120796918869,
0.6120169758796692,
-0.006663551088422537,
-0.2123035490512848... | |
I have a `QTreeView` class with a context menu installed as follows:
```
m_ui.tree->setContextMenuPolicy(Qt::CustomContextMenu);
connect(m_ui.tree, SIGNAL(customContextMenuRequested(const QPoint&)),
this, SLOT(ShowTreeContextMenu(const QPoint&)));
...
void ShowTreeContextMenu(const QPoint& point)
{
m_treeCo... | [
-0.2559674084186554,
-0.10181136429309845,
0.793906569480896,
-0.1472037434577942,
-0.009520933963358402,
0.04460783302783966,
0.24702247977256775,
-0.25588786602020264,
0.12980224192142487,
-0.968841016292572,
-0.23633632063865662,
0.6143162846565247,
-0.30556023120880127,
0.2862955331802... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.