text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
store the new files.
When the app grows beyond a single server I can link the servers together at the filesystem level using GlusterFS and run the app unchanged, or rig up a simple SQLite proxy system that will allow each server to manipulate sqlite files in adjacent servers.
Concurrency issues will be minimal becaus... | [
0.6491777896881104,
0.2902166545391083,
0.6615403294563293,
0.22758829593658447,
0.028575610369443893,
-0.007114662788808346,
0.12723040580749512,
-0.00417671911418438,
-0.35808733105659485,
-0.6741869449615479,
0.13162484765052795,
0.46105778217315674,
-0.5009871125221252,
0.1005346179008... | |
Am I missing anything?
**UPDATE** I decided to go with a less extreme solution, which is working fine so far. I'm using a fixed number of shards - 256 sqlite databases, to be precise. Each user is assigned and bound to a random shard by a simple hash function.
Most features of my app require access to just one or tw... | [
0.2587664723396301,
0.36886242032051086,
0.1599303036928177,
0.3874269425868988,
-0.2754698097705841,
0.3042345643043518,
0.34846174716949463,
-0.20620933175086975,
-0.17230509221553802,
-0.48316869139671326,
-0.0335608646273613,
0.19969609379768372,
0.19179266691207886,
0.1531561464071273... | |
if all the data is cached in RAM. I think I can live with that!
**UPDATE 2.0** I ported the app to MySQL/InnoDB and was able to get about the same performance for regular requests, but for that one request that requires shard walking, innodb is 4-5 times faster. For this reason, and other reason, I'm dropping this arc... | [
0.14438851177692413,
0.3889353275299072,
0.5062007904052734,
0.02498122677206993,
-0.196128711104393,
0.15312209725379944,
0.3925252854824066,
0.008208184503018856,
-0.4299822747707367,
-0.7606008648872375,
0.19453682005405426,
0.801704466342926,
0.07834478467702866,
-0.0751725360751152,
... | |
of "query" will have to be done programmatically, asking each of the SQLite databases in turn - and will very likely be the slowest aspect of your site. It's a common issue in any system where data has been "sharded" into separate databases.
If all the of the data is self-contained to the user, then this should scale ... | [
0.2844930589199066,
0.06048101559281349,
0.2641555666923523,
0.2578519284725189,
-0.02133997157216072,
-0.18938404321670532,
0.2466162145137787,
-0.10632558912038803,
-0.1461120843887329,
-0.5730282068252563,
-0.05710150673985481,
0.3360717296600342,
-0.21518094837665558,
0.035121571272611... | |
watch out for file system resources - SQLite is great, awesome, fast, etc - but you do get some caching and writing benefits when using a "standard database" (i.e. MySQL, PostgreSQL, etc) because of how they're designed. In your proposed design, you'll be missing out on some of that. | [
0.3080480098724365,
0.20025496184825897,
-0.12704408168792725,
0.5618352890014648,
0.132849782705307,
-0.3084219694137573,
0.06401488929986954,
0.4175358712673187,
-0.4035179913043976,
-0.5908117294311523,
0.1734127551317215,
0.5509127378463745,
0.05974128097295761,
0.007291951682418585,
... | |
I have a document library with a custom column named "compound" which is just text.
I want to put a filter (input text box) on that document library page so the view shows only the items where the compound column contains my typed-in text. Optimally, wildcards such as \* or ? or full regular expressions could be suppo... | [
0.22652220726013184,
0.06844372302293777,
0.38965654373168945,
0.05066762492060661,
-0.13205966353416443,
-0.18727856874465942,
0.27104973793029785,
-0.35372936725616455,
-0.03539422154426575,
-0.6953499913215637,
0.034181203693151474,
0.4860308766365051,
-0.44453394412994385,
-0.049507323... | |
solutions are acceptable.
The place where this will fail is if you have to do what's called "shard walking" - which is finding out all the data across a bunch of different users. That particular kind of "query" will have to be done programmatically, asking each of the SQLite databases in turn - and will very likely be ... | [
-0.08747787028551102,
0.23757196962833405,
0.2069784253835678,
0.3324059844017029,
0.19129832088947296,
0.08583565056324005,
0.3079551160335541,
-0.24987776577472687,
-0.1762317419052124,
-0.5342369079589844,
-0.05949651449918747,
0.31376126408576965,
-0.13370034098625183,
-0.0257584601640... | |
an effective design is to know how the data is likely going to be used and if data from one person will be interacting with data from another (in your context).
You may also need to watch out for file system resources - SQLite is great, awesome, fast, etc - but you do get some caching and writing benefits when using a... | [
0.26289722323417664,
-0.005326529964804649,
0.10995505005121231,
0.5847906470298767,
0.20431125164031982,
-0.22110389173030853,
0.04215117171406746,
0.019658511504530907,
-0.23845389485359192,
-0.842859148979187,
0.09224889427423477,
0.6084774732589722,
-0.15779724717140198,
-0.05396319553... | |
Templates are a pretty healthy business in established programming languages, but are there any good ones that can be processed in JavaScript?
By "template" I mean a document that accepts a data object as input, inserts the data into some kind of serialized markup language, and outputs the markup. Well-known examples ... | [
0.5206618309020996,
0.11776301264762878,
0.06829672306776047,
0.08341287821531296,
-0.25108617544174194,
-0.35242319107055664,
0.2135869860649109,
-0.12208959460258484,
-0.1909528225660324,
-0.7806986570358276,
-0.16560162603855133,
0.4064041078090668,
-0.47694408893585205,
-0.142221465706... | |
+ "</p><p>Email: " + data.email + "</p>";
```
clearly too unwieldy, HTML structure not apparent.
---
XSLT:
```
<p><xsl:text>Name: </xsl:text><xsl:value-of select="//data/name"></p>
<p><xsl:text>Email: </xsl:text><xsl:value-of select="//data/email"></p>
```
// Structurally this works well, but let's face it, XSLT... | [
-0.07388521730899811,
0.12875038385391235,
0.506702721118927,
0.0750473216176033,
-0.33829233050346375,
-0.2814922332763672,
0.13727790117263794,
-0.10812395066022873,
-0.003070699516683817,
-0.7948529720306396,
-0.053172845393419266,
0.4991382956504822,
-0.4262237846851349,
-0.09911318123... | |
of them aren't usable in any other language. Most of these templates couldn't be used outside a JavaScript engine.
The exception is Microsoft's -- you can process the same ASP either in the browser or in any other ASP engine. That has its own set of portability problems, since you're bound to Microsoft systems. I mark... | [
-0.03183029964566231,
0.046894244849681854,
1.3150063753128052,
0.04245828837156296,
-0.008651237934827805,
0.004427123349159956,
-0.02964315377175808,
0.021530432626605034,
-0.32500383257865906,
-0.561290979385376,
0.3251616656780243,
0.5385425686836243,
-0.06181955710053444,
0.0634348317... | |
want to check out [Mustache](https://mustache.github.io/) - it's really portable and simple template language with javascript support among other languages. | [
0.6431980133056641,
0.055648282170295715,
0.6640303134918213,
-0.0025223297998309135,
-0.13787123560905457,
-0.28632187843322754,
0.16878704726696014,
0.3666612505912781,
-0.07699907571077347,
-0.35645702481269836,
0.37408754229545593,
0.17380566895008087,
-0.15707078576087952,
-0.22794403... | |
I usually format my project directory like J-P Boodhoo. a main dir containing solution file, then a lib folder for all third-party lib, a src dir, a tools lib for third-party that wont be deployed.... [For more info look here](http://blog.jpboodhoo.com/DirectoryStructureForProjects.aspx)
I set in my project the refere... | [
0.1413707286119461,
0.08489199727773666,
0.18947692215442657,
0.1723175048828125,
-0.3398800194263458,
-0.053837016224861145,
0.2355455756187439,
0.09315402060747147,
-0.2011576145887375,
-0.851965606212616,
-0.08052228391170502,
0.347359836101532,
-0.1988411545753479,
-0.17093820869922638... | |
in the `.vcproj` project file which should also be under version control. (NOTE: the `.sln` solution file does NOT store path settings) If you are careful to use relative, rather than absolute paths, it should be easily sharable among multiple developers.
In Visual C++ 2008, [project files are XML](http://msdn.microso... | [
0.32487228512763977,
-0.16523303091526031,
0.39898374676704407,
0.10859831422567368,
-0.047354526817798615,
-0.35107263922691345,
0.2472984790802002,
-0.312280535697937,
-0.36047789454460144,
-0.7997031211853027,
-0.39798039197921753,
0.37371695041656494,
-0.23932497203350067,
-0.070215359... | |
I would like something that I can use as follows
```
var msg = new NonStaticMessageBox();
if(msg.Show("MyMessage", "MyCaption", MessageBoxButtons.OkCancel) == DialogResult.Ok)
{....}
```
But specifically non-static (I need to pass a reference to it around) does anyone know if/where such an object exists?
Such an ob... | [
0.33586451411247253,
0.05605864152312279,
0.43910089135169983,
0.004449116066098213,
0.2198917269706726,
-0.1543617993593216,
-0.1206013560295105,
0.2725549340248108,
-0.14298242330551147,
-0.5049300789833069,
0.04830798879265785,
0.4588262736797333,
-0.2099153995513916,
0.1614988148212433... | |
I have some integration points where I want to test various responses - where do you think should I store these artifacts in my spec/ directory of my rails application?
In the past I've created a test/resources or spec/resources directory for other test/spec related files. That seems to keep it clear that it's some sor... | [
0.5363042950630188,
0.0582541786134243,
-0.13284647464752197,
0.5001280307769775,
-0.05203523859381676,
0.03852111101150513,
0.08924655616283417,
-0.085373654961586,
-0.12725219130516052,
-0.5466119647026062,
0.6338338255882263,
0.6638253927230835,
0.1446121782064438,
0.014378843829035759,... | |
Essentially the only thing I can deploy to my deployment machine is a JAR file. I can't install JRuby, nor can I install Glassfish or Tomcat.
Is it possible to package up a Rails application (including Rails, vendored, of course) to a JAR file such that I can do
```
c:\my_server> java rails_app.jar
```
and have it ... | [
0.27422863245010376,
0.22989864647388458,
0.0989278107881546,
-0.2014170140028,
-0.19768878817558289,
-0.09094680845737457,
0.2721949815750122,
-0.20291787385940552,
-0.383326917886734,
-0.6164154410362244,
0.06094726547598839,
0.5578396916389465,
-0.24323518574237823,
-0.03906385973095894... | |
complications there.
Is it normally possible to embed all of your rails templates/models into a jar inside of a war file for deployment on Tomcat? If so, then you should be able to get embedded Jetty to pull it from your single jar as well. | [
0.20332032442092896,
-0.02481270208954811,
-0.23528069257736206,
0.5452819466590881,
0.07447832077741623,
0.132560595870018,
-0.060147903859615326,
-0.20211072266101837,
-0.3605988323688507,
-0.4268110692501068,
0.28024449944496155,
0.6663734912872314,
0.023012742400169373,
-0.110392019152... | |
I'd like to know what stored procedures are currently running to diagnose some performance problems. How can I find that out?
Very useful script for analyzing locks and deadlocks: <http://www.sommarskog.se/sqlutil/aba_lockinfo.html>
It shows procedure or trigger and current statement. | [
0.10945596545934677,
0.012998056598007679,
0.17825943231582642,
0.05470244958996773,
0.024587523192167282,
-0.03784763067960739,
0.37574297189712524,
-0.062140218913555145,
-0.2278728485107422,
-0.33744946122169495,
0.12921495735645294,
0.3383811414241791,
-0.10894666612148285,
-0.24163185... | |
I have recently been thinking about the difference between the two ways of defining an array:
1. `int[] array`
2. `int array[]`
Is there a difference?
They are semantically identical. The `int array[]` syntax was only added to help C programmers get used to java.
`int[] array` is much preferable, and less confusing. | [
0.24490946531295776,
0.16725412011146545,
-0.04906255751848221,
-0.3600035607814789,
-0.5751444101333618,
-0.1765548288822174,
0.16837213933467865,
-0.1635354608297348,
-0.10569460690021515,
-0.4721088409423828,
0.06159500405192375,
0.6344820857048035,
-0.4215429127216339,
-0.1990042030811... | |
Ruby on Rails does not do multithreaded request-responses very well, or at least, ActiveRecord doesn't.
The notion of only one request-response active at the same time can be a hassle when creating web applications which fork off a shell-command that takes long to finish.
What I'd like are some of your views on these... | [
-0.04611652344465256,
-0.10769274830818176,
0.08099070936441422,
0.24010120332241058,
-0.5754554271697998,
-0.1338348686695099,
0.36607033014297485,
0.03262745216488838,
-0.22005285322666168,
-0.46494951844215393,
0.32989636063575745,
0.544696569442749,
-0.4124397933483124,
0.0536202527582... | |
(Matz Ruby Interpreter) Ruby process. Each request is essentally wrapped with a giant mutex. A lot of work has gone into making the forthcoming Rails 2.2 thread-safe, but you're not going to get a lot of benefit from this when running under Ruby 1.8x. I can't comment on whether Ruby 1.9 will be different because I'm no... | [
0.2851107120513916,
-0.05627588927745819,
0.08914168179035187,
0.08884406834840775,
-0.23926103115081787,
0.09099481254816055,
0.32367265224456787,
-0.47314566373825073,
-0.3742089867591858,
-0.3532049357891083,
-0.2070387303829193,
0.44541695713996887,
-0.4885917901992798,
-0.062701947987... | |
performance figures](http://weblogs.java.net/blog/arungupta/archive/2008/09/rails_conf_euro_5.html) on this setup at RailsConf Europe recently. | [
-0.2264939695596695,
-0.8778975009918213,
0.36150166392326355,
0.12891817092895508,
0.09519246220588684,
-0.00004011159035144374,
0.16395026445388794,
-0.1855987012386322,
-0.6504387855529785,
-0.3348822593688965,
-0.17118491232395172,
0.17255572974681854,
0.35640954971313477,
0.0604338683... | |
I have a many to many index table, and I want to do an include/exclude type query on it.
fid is really a integer index, but here as letters for easier understanding. Here's a sample table :
table t
```
eid | fid
----+----
1 | A
1 | B
1 | C
2 | B
2 | C
3 | A
3 | C
4 | A
4 | B
5 | B
```
Here are ... | [
-0.03217997029423714,
-0.22995445132255554,
0.564775288105011,
0.04248254373669624,
-0.4400453269481659,
0.05545548349618912,
0.05248292163014412,
-0.5595890283584595,
0.2145204395055771,
-0.5362167358398438,
0.13780690729618073,
0.11238353699445724,
-0.3721550703048706,
0.086459681391716,... | |
have fid C, and NOT A? (Answer eid 2)
I can't seem to figure out a query that will do this.
I've tried a self join like this:
```
select *
from t as t1
join t as t2
where t1.eid=t2.eid
and t1.fid!=t2.fid
and t1.fid=B and t2.fid!=A
```
That won't work, because it will still return rows where eid=1 and fid... | [
-0.14037898182868958,
-0.11511670798063278,
0.4327709674835205,
-0.250186026096344,
-0.3209516704082489,
-0.07566779851913452,
0.058268263936042786,
-0.6303169131278992,
0.11708784103393555,
-0.4864634871482849,
-0.13608545064926147,
0.5436699986457825,
-0.5209963917732239,
0.0368685759603... | |
1
from t t2
where t2.eid = t1.eid
and t2.fid = 'A')
``` | [
-0.015088608488440514,
-0.3126097023487091,
0.37201929092407227,
-0.34790724515914917,
-0.35761380195617676,
-0.1265377551317215,
0.30291107296943665,
-0.5831115245819092,
0.17088010907173157,
-0.5195679068565369,
-0.6408711075782776,
0.4926746189594269,
-0.5788512825965881,
-0.13953915238... | |
I have a RDLC report which has a table, calling a subreport N times. This works perfectly in the control viewer and when I export to PDF. Yet when I export to Excel, I get the following error:
> Subreports within table/matrix cells
> are ignored.
Does anyone know why this occurs only within the Excel export? And is ... | [
0.09567859768867493,
0.2341114729642868,
0.3714635670185089,
-0.29159820079803467,
-0.4029046893119812,
-0.1696268767118454,
0.3398261070251465,
-0.12481024861335754,
-0.4281424283981323,
-0.7280887961387634,
0.07261045277118683,
0.42488834261894226,
-0.44105538725852966,
0.119304157793521... | |
The purpose of this component is to test knowledge of a student on a given subject - in the example below it would be geography. The student is given a piece of text with missing words in it. He/she has to fill in (type in this case) the missing words - hence this kind of test/exercise is called gap-fill.There could be... | [
0.00796500500291586,
-0.3577651083469391,
0.255614310503006,
-0.2970714569091797,
-0.11150457710027695,
0.0706031545996666,
0.3437463343143463,
0.4659166634082794,
-0.3445727527141571,
-0.5916938781738281,
-0.5883042812347412,
-0.36315932869911194,
-0.06617014855146408,
0.11205306649208069... | |
\_\_\_\_\_\_\_\_\_\_\_.***
The component must be able to display text with 'floating' gaps within the text. These gaps would have similar behaviour to TextInput control. Once the student submits the answer the component will return the words that were typed in and these are then compared against the expected answers. ... | [
0.12479370087385178,
0.029764048755168915,
0.39251279830932617,
0.5412906408309937,
-0.034996386617422104,
0.32663223147392273,
0.35265472531318665,
-0.21031804382801056,
0.21790698170661926,
-0.5587426424026489,
-0.5608046650886536,
0.3971485495567322,
0.1935158520936966,
-0.0943644344806... | |
the gap (number of characters).
Therefore the above text could look like this before being loaded into the component:
London is the #10# and largest urban area in the #15#. An important settlement for two millennia, London's history goes back to its founding by the #8#.
You need a container that supports flow layout.... | [
-0.07877228409051895,
-0.4065755605697632,
0.8512237071990967,
-0.317936509847641,
-0.07426600158214569,
0.3698345124721527,
0.004170411266386509,
0.4245133399963379,
-0.3478643000125885,
-0.5714721083641052,
-0.4307064116001129,
-0.4249042570590973,
-0.35760676860809326,
0.237851783633232... | |
I want a true deep copy. In Java, this was easy, but how do you do it in C#?
### Important Note
[BinaryFormatter](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.serialization.formatters.binary.binaryformatter?view=net-5.0) has been deprecated, and will no longer be available in .NET after November 2023. S... | [
-0.03119935840368271,
-0.23818621039390564,
0.527899444103241,
0.12425055354833603,
0.1710706651210785,
-0.2599989175796509,
0.3660796284675598,
-0.019104013219475746,
-0.09384330362081528,
-0.5553473234176636,
-0.3008907735347748,
0.7080928683280945,
-0.01050040777772665,
0.35575640201568... | |
Your source file must include the following code:
```
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
``` | [
0.3614966869354248,
0.5527081489562988,
0.2316851168870926,
0.2200426459312439,
0.47815099358558655,
-0.22391542792320251,
0.03622400760650635,
0.25029173493385315,
0.17134860157966614,
-0.8227887749671936,
-0.4932238757610321,
0.6784995198249817,
-0.22679314017295837,
0.11606397479772568,... | |
I'm trying to teach myself how to use **Modern Persistence Patterns** (OR/M, Repository, etc) and development practices (TDD, etc).
Because the best way (for me) to learn is by doing, I'd like to build some sort of demo application for myself. The problem is, I've got no idea what sort of application to build. I'd li... | [
0.6090391874313354,
0.40990397334098816,
0.1798306703567505,
0.16597753763198853,
0.323456734418869,
-0.25283947587013245,
0.3621257543563843,
-0.011172852478921413,
-0.3712381422519684,
-0.5141825079917908,
0.025808751583099365,
0.5212373733520508,
0.11208544671535492,
0.13954584300518036... | |
anybody have any suggestions for a good pet project I could work on and maybe blog about my experiences with?
There are innumerable community-service organizations with little or no web presence.
Pick a service organization -- any one -- Literacy Volunteers, Food Pantries, Home Furnishings Donations, Alcoholics Anonym... | [
1.0823612213134766,
0.026753079146146774,
-0.16184131801128387,
0.49625617265701294,
0.13989536464214325,
0.07572831213474274,
0.3603322207927704,
0.6598185896873474,
-0.19710563123226166,
-0.5114893317222595,
0.18896973133087158,
0.42512497305870056,
-0.09590113162994385,
0.02462309226393... | |
There are lots of questions on how to improve communication between teams. One way to start is to identify what one team actually does that the other team really values and do more of that.
For example. Our QA team provided a VM for us with:
* The latest release of our server-based commercial software installed and ... | [
0.7146973013877869,
-0.03665510565042496,
0.18906955420970917,
0.31855952739715576,
0.1647169440984726,
-0.2569514811038971,
0.13621412217617035,
-0.3628471791744232,
0.06723477691411972,
-0.42718416452407837,
0.0466393418610096,
0.35851284861564636,
0.19941973686218262,
-0.261544495820999... | |
big time saver)
While we still do most of our testing on our own desktops, this allows us to have a relatively clean environment we can run locally.
What has your QA team done for you lately? Conversely, what have you done for your QA team?
A good friend of mine who used to be in our QA department put together a bunc... | [
0.5884911417961121,
-0.11380903422832489,
-0.227492555975914,
0.3634125888347626,
0.2026350200176239,
-0.094995878636837,
0.21121998131275177,
0.24874334037303925,
-0.3302658796310425,
-0.6178609728813171,
0.27520912885665894,
0.47782713174819946,
0.020617898553609848,
-0.20386643707752228... | |
a memory leak that I had been (unsuccessfully) trying to track down for months.
Automated testing is a Good Thing. Oh - he has since been promoted to Software Engineer and works on my team now. | [
0.3444640636444092,
0.2926727831363678,
0.0067258067429065704,
0.2980429530143738,
0.3170163333415985,
-0.36194097995758057,
0.18687337636947632,
0.3199375867843628,
-0.19284863770008087,
-0.19790571928024292,
-0.38265204429626465,
0.3087824583053589,
0.41018813848495483,
0.152440935373306... | |
How would one go about profiling a few queries that are being run from an ASP.NET application? There is some software where I work that runs extremely slow because of the database (I think). The tables have indexes but it still drags because it's working with so much data. How can I profile to see where I can make a fe... | [
0.46743422746658325,
0.09904299676418304,
0.08379832655191422,
0.38146618008613586,
-0.1873375028371811,
-0.28008344769477844,
0.2528543770313263,
0.07244407385587692,
-0.24999061226844788,
-0.587079644203186,
0.5088204741477966,
0.46310555934906006,
0.031680040061473846,
0.097294300794601... | |
into Management Studio (which used to be called Enterprise Manager + Query Analyzer).
Use SQL Profiler to show you the actual queries coming from the web application.
Copy each of the problem queries out (the ones that eat up lots of CPU time or IO). Run the queries with "Display Actual Execution Plan". Hopefully yo... | [
0.2827862799167633,
-0.29960668087005615,
0.2514582872390747,
0.3401411175727844,
0.027998968958854675,
-0.6623066067695618,
0.3114200234413147,
-0.22138835489749908,
0.10396181046962738,
-0.6957336068153381,
0.13900047540664673,
0.9601393342018127,
0.16297373175621033,
0.13832947611808777... | |
need to re-write the queries in a different way.
Keeping all of your queries in stored procedures makes this job *much* easier. | [
0.2729285657405853,
0.16984476149082184,
0.07721449434757233,
0.36165502667427063,
-0.010898048058152199,
0.15977300703525543,
0.3828464448451996,
-0.03718488663434982,
-0.3534676432609558,
-0.9288296103477478,
-0.004992600064724684,
0.6293620467185974,
0.017594419419765472,
-0.08314885944... | |
I am seeing both of them used in this script I am trying to debug and the literature is just not clear. Can someone demystify this for me?
Dynamic Scoping. It is a neat concept. Many people don't use it, or understand it.
Basically think of `my` as creating and anchoring a variable to one block of {}, A.K.A. scope.
`... | [
0.5146111249923706,
-0.09755649417638779,
0.2154824584722519,
-0.23955368995666504,
0.012486927211284637,
-0.3016803562641144,
0.29322102665901184,
0.07483555376529694,
-0.20893867313861847,
-0.5745919942855835,
-0.10260456800460815,
0.5286771655082703,
-0.5579069256782532,
0.3198427557945... | |
global variable, and use a "local value" to work with it. So `local` creates a temporary scope for a temporary variable.
```
$var = 4;
print $var, "\n";
&hello;
print $var, "\n";
# subroutines
sub hello {
local $var = 10;
print $var, "\n";
&gogo; # calling subroutine gogo
print $var, "\n";
}
sub g... | [
-0.6271784901618958,
-0.08426328748464584,
0.6340197324752808,
-0.07123351097106934,
0.3107391893863678,
0.08878957480192184,
0.086414635181427,
0.43902382254600525,
-0.45854201912879944,
-0.42400801181793213,
-0.4304785430431366,
0.581428587436676,
-0.7499918937683105,
0.1886250525712967,... | |
Let's say I have many-to-many relationship (using the ActiveRecord attribute HasAndBelongsToMany) between Posts and Tags (domain object names changed to protect the innocent), and I wanted a method like
```
FindAllPostByTags(IList<Tag> tags)
```
that returns all Posts that have all (not just some of) the Tags in the ... | [
0.14735524356365204,
-0.18528853356838226,
0.30987778306007385,
0.05182928964495659,
-0.3596915602684021,
-0.05711904168128967,
0.25680598616600037,
-0.11414287984371185,
-0.1009424477815628,
-0.3310485780239105,
-0.07150138914585114,
0.31865161657333374,
-0.6906062364578247,
0.24332894384... | |
errors | [
0.040515441447496414,
1.0553053617477417,
-0.3626307249069214,
0.319336473941803,
0.28492459654808044,
0.526430606842041,
0.05942344665527344,
0.3860517740249634,
-0.3077273368835449,
-0.8152545094490051,
-0.18825459480285645,
0.4252048432826996,
0.1602925956249237,
0.016509423032402992,
... | |
In the following HTML, I'd like the frame around the image to be snug -- not to stretch out and take up all the available width in the parent container. I know there are a couple of ways to do this (including horrible things like manually setting its width to a particular number of pixels), but what is the *right* way?... | [
0.5451656579971313,
0.06127849966287613,
0.7439364790916443,
-0.001355256186798215,
-0.21709012985229492,
-0.10138437896966934,
0.37745746970176697,
-0.10730213671922684,
-0.12394069880247116,
-0.8502503037452698,
0.035223860293626785,
0.23392488062381744,
-0.2180688977241516,
0.0984181389... | |
left" to the pictureframe and "clear:both" to the P tag, it looks great. But I don't always want these frames floated to the left. Is there a more direct way to accomplish whatever "float" is doing?
```css
.pictureframe {
display: block;
margin: 5px;
padding: 5px;
border: solid brown 2px;
background-col... | [
-0.21785512566566467,
-0.026165667921304703,
0.9362897872924805,
-0.29053255915641785,
0.10571691393852234,
0.06360562890768051,
-0.4412464201450348,
-0.131709486246109,
-0.5087006688117981,
-0.7305031418800354,
-0.23478898406028748,
0.18657775223255157,
-0.33994007110595703,
0.08926951140... | |
so wide?
</p>
</div>
```
The *right* way is to use:
```
.pictureframe {
display: inline-block;
}
```
**Edit:** Floating the element also produces the same effect, this is because floating elements use the same [shrink-to-fit](http://www.w3.org/TR/CSS21/visudet.html#shrink-to-fit-float) algorithm for determin... | [
0.4461534917354584,
-0.43742430210113525,
0.5630596876144409,
-0.04878950119018555,
-0.04142831265926361,
-0.2069493532180786,
0.052410323172807693,
-0.3936670422554016,
-0.5733929872512817,
-0.5192961096763611,
-0.03720368444919586,
0.21112357079982758,
-0.047844596207141876,
0.2918038070... | |
I am working on a geometry problem that requires finding the intersection of two parabolic arcs in any rotation. I was able to intesect a line and a parabolic arc by rotating the plane to align the arc with an axis, but two parabolas cannot both align with an axis. I am working on deriving the formulas, but I would lik... | [
0.33698272705078125,
0.11363394558429718,
0.32106128334999084,
0.004908973351120949,
-0.19591890275478363,
0.30249160528182983,
0.02163851447403431,
-0.3132254183292389,
-0.09144006669521332,
-0.4601634442806244,
-0.10392686724662781,
0.5005094408988953,
-0.22557812929153442,
0.24940924346... | |
rotation by building a rotation matrix:
```
s = sin(angle)
c = cos(angle)
matrix = | c -s |
| s c |
```
Apply that matrix and you'll get the rotated parametric equation:
```
x' (t) = x(t) * c - s*t;
y' (t) = x(t) * s + c*t;
```
This will give you two equations (for x and y) of your parabolic ar... | [
0.23772723972797394,
-0.15443676710128784,
0.5082348585128784,
-0.02436368726193905,
-0.5501015782356262,
0.22921468317508698,
0.07057806104421616,
-0.38117629289627075,
-0.23146463930606842,
-0.40136784315109253,
-0.07542512565851212,
0.6588061451911926,
-0.21622700989246368,
0.3160731494... | |
= rotated equation of arc1 in y.
xb'(t) = rotated equation of arc2 in x
yb'(t) = rotated equation of arc2 in y.
t1 = parametric value of arc1
t2 = parametric value of arc2
0 = xa'(t1) - xb'(t2)
0 = ya'(t1) - yb'(t2)
```
Each of these equation is just a order 2 polynomial. These are easy to solve.
To fin... | [
0.049279164522886276,
0.08712112158536911,
0.49776071310043335,
-0.029124174267053604,
-0.5416692495346069,
0.3118574619293213,
0.2005642056465149,
-0.48324185609817505,
-0.12489397823810577,
-0.3223278522491455,
0.1042046993970871,
0.4124375879764557,
-0.23668107390403748,
0.3329113423824... | |
the curves.
Getting the position is easy now: Just plug the root into your parametric equation and you can directly get x and y. | [
-0.2619791626930237,
-0.2513355314731598,
0.39271238446235657,
0.27967408299446106,
-0.14761358499526978,
0.44653627276420593,
-0.08107202500104904,
-0.027623828500509262,
-0.026655951514840126,
-0.7134681940078735,
0.1800917536020279,
0.3606164753437042,
0.05888095870614052,
0.17793296277... | |
When I telnet into our works sun station my backspace key doesn't work. I use a temporary workaround of:
$ stty erase ^H
This works but each time I telnet in I have to retype this. How can I set this to work properly in my .cshrc file?
You can put stty erase ^H in your .cshrc file. This will fix the problem. | [
0.31013986468315125,
0.24582836031913757,
0.5527064800262451,
-0.05882825702428818,
0.060368508100509644,
0.1045357957482338,
0.618501603603363,
0.22280943393707275,
-0.16146144270896912,
-1.09989595413208,
0.08945606648921967,
0.5536202788352966,
-0.393974632024765,
0.11647187918424606,
... | |
My workplace filters our internet traffic by forcing us to go through a proxy, and unfortunately sites such as IT Conversations and Libsyn are blocked. However, mp3 files in general are not filtered, if they come from sites not on the proxy's blacklist.
So is there a website somewhere that will let me give it a URL an... | [
0.5697007775306702,
0.27137476205825806,
0.3038389980792999,
-0.0202059093862772,
-0.1085309237241745,
-0.31798747181892395,
0.2764931619167328,
0.39834800362586975,
-0.40756601095199585,
-0.6266282200813293,
0.02593190409243107,
0.4749566316604614,
-0.09144908934831619,
0.1127452924847602... | |
times, perhaps I should explain/justify my situation. I'm a contractor working at a government facility, and we use some commercial filtering software which is very aggressive and overzealous. My boss is fine with me listening to podcasts at work and is fine with me circumventing the proxy filtering, and doesn't want t... | [
0.6830504536628723,
0.5186325907707214,
0.128282830119133,
0.060976628214120865,
0.03548596799373627,
-0.39912542700767517,
0.3888338506221771,
0.5120220184326172,
-0.3027718961238861,
-0.6074011325836182,
0.04612594097852707,
0.44945311546325684,
-0.08947086334228516,
0.08358775824308395,... | |
bypassing web filters have also been blocked, so I may have to download the podcasts I like at home in advance and then bring them into work. If can tell me about a lesser-known service I can try which might not be blocked, I'd appreciate it.
I ended up writing an extremely dumb-and-simple cgi-script and hosting it on ... | [
0.4555814862251282,
0.17257067561149597,
0.5681551694869995,
-0.12645356357097626,
-0.05727432295680046,
-0.13906686007976532,
0.3187430500984192,
-0.12816257774829865,
-0.1671352982521057,
-0.5856907963752747,
-0.38982611894607544,
0.6457711458206177,
-0.6100804209709167,
0.11986130475997... | |
while encoded:
data += chr(int(encoded[:2], 16))
encoded = encoded[2:]
return data
if __name__=="__main__":
print("Content-type: text/plain")
print("")
url = fromhex( cgi.FieldStorage()["target"].value )
contents = urlopen(url).read()
for i in range(len(contents)/40+1):
... | [
-0.14465820789337158,
0.01659518852829933,
0.48960384726524353,
-0.033510275185108185,
0.01455472968518734,
0.4153706431388855,
0.07615917921066284,
-0.04292484372854233,
-0.10149440169334412,
-0.4343903958797455,
-0.4296809136867523,
0.6374173760414124,
-0.1634698212146759,
0.139424234628... | |
data)
def fromhex(encoded):
data = ""
while encoded:
data += chr(int(encoded[:2], 16))
encoded = encoded[2:]
return data
if __name__=="__main__":
if len(argv) < 2:
print("usage: %s URL [FILENAME]" % argv[0])
quit()
os.chdir("/home/courtwright/mp3s")
url = "http://example... | [
0.06510777771472931,
-0.014756929129362106,
0.36951035261154175,
-0.19313162565231323,
0.08511075377464294,
0.3026825189590454,
0.24537715315818787,
-0.7195155024528503,
-0.11819856613874435,
-0.5846941471099854,
-0.48604586720466614,
0.5908499360084534,
-0.13571937382221222,
0.23899774253... | |
dest.write( fromhex(line.strip()) )
dest.flush()
``` | [
-0.13091762363910675,
-0.1323782503604889,
0.5015337467193604,
-0.17094671726226807,
-0.11387564986944199,
0.22560527920722961,
0.07747054100036621,
-0.3076187074184418,
-0.19545519351959229,
-0.9198101758956909,
-0.6051772832870483,
0.49054673314094543,
-0.25806573033332825,
-0.2060611248... | |
It is a bit of a "chicken or egg" kind of query, but can someone dreamup a query that can return the name of the current database instance in which the query executes? Believe me when I say I understand the paradox: why do you need to know the name of the database instance if you're already connected to execute the que... | [
-0.15329892933368683,
0.24257592856884003,
0.05704158917069435,
0.295523464679718,
-0.06637006998062134,
-0.209381103515625,
0.2583334445953369,
0.30756768584251404,
-0.3215368986129761,
-0.4107288420200348,
0.2087675780057907,
0.3762735426425934,
-0.2047676295042038,
0.37344470620155334,
... | |
server's machine name
,@@servicename AS 'Instance Name' -- e.g.: MSSQLSERVER
,DB_NAME() AS 'Database Name'
,HOST_NAME() AS 'Host Name' -- The database client's machine name
``` | [
-0.35029253363609314,
0.23632727563381195,
0.4997868239879608,
0.19967609643936157,
-0.11770813912153244,
0.19852301478385925,
0.13828401267528534,
0.2167489230632782,
-0.15601563453674316,
-0.7841569185256958,
-0.2497226893901825,
0.08911975473165512,
-0.32153573632240295,
0.6594325304031... | |
I'm getting lost in pointer land, I believe. I've got this (code syntax might be a little off, I am not looking at the machine with this code on it...but all the pertinent details are correct):
```
NSMutableArray *tmp = [[NSMutableArray alloc] init];
```
I them pass that to a routine in another class
```
- (BOOL)my... | [
-0.1113089844584465,
0.1882532238960266,
0.1939840018749237,
-0.034506186842918396,
0.12695308029651642,
-0.05652423948049545,
0.28149715065956116,
0.16744056344032288,
-0.3400937616825104,
-0.5778787136077881,
0.15793907642364502,
0.5676236748695374,
-0.30911314487457275,
0.32698252797126... | |
yet very fundamental, but for the life of me I can't see it. Can anyone point out what I'm doing wrong?
EDIT: www.stray-bits.com asked if I have retained a reference to it, and I said "maybe...we tried this: NSMutableArray \*tmp = [[[NSMutableArray alloc] init] retain]; not sure if that is what you mean, or if I did i... | [
0.5750190019607544,
0.33194276690483093,
0.049144819378852844,
0.07741402089595795,
-0.06251777708530426,
-0.08121996372938156,
0.3613843321800232,
-0.35277268290519714,
-0.14166824519634247,
-0.21969737112522125,
0.06281604617834091,
0.5075201988220215,
-0.11650612205266953,
-0.0331965386... | |
lines of using a decoder(?) object.
The purpose of this function is to open a file from the iPhone, read that file into an array (it's an array of objects that we saved in a previous run of the program). That "decoder" thing has a method that puts data into the array.
Man, I've totally butchered this. I really hope... | [
0.36920812726020813,
-0.1199658215045929,
0.35156679153442383,
0.07587303966283798,
0.34958747029304504,
0.044957321137189865,
0.27247074246406555,
-0.02249530330300331,
-0.28773027658462524,
-0.27569884061813354,
0.007986649870872498,
0.5895259380340576,
-0.2769637405872345,
-0.0848776772... | |
until you specifically release it.
It would be good to see more of the code. I don't think the error is in the very small amount you've posted so far.. | [
0.7628346085548401,
-0.020832782611250877,
0.216934472322464,
0.41328859329223633,
0.20943157374858856,
-0.5318740010261536,
0.09786791354417801,
0.33555737137794495,
0.012909950688481331,
-0.8727726340293884,
-0.15476518869400024,
0.29925575852394104,
0.10179823637008667,
0.11456027626991... | |
I have a database that stores events in it and a page with a calendar object on it. When rendering the days it looks through the months events and if any match the current day being rendered it creates a linkbutton to represent the event in the day on the calendar and adds it to that cell. I add some javascript to the ... | [
0.20304712653160095,
0.10551771521568298,
0.6329634189605713,
-0.0057675763964653015,
-0.09871519356966019,
0.030901996418833733,
0.14600618183612823,
-0.011123068630695343,
-0.03842690959572792,
-0.7744522094726562,
0.18528902530670166,
0.17420941591262817,
-0.08216626197099686,
0.0989537... | |
need to set a Session variable ie. Session("EditMode") = "Edit" So the new page will know it is to get an existing event info rather than prepare to create a new event? Any SUGGESTIONS?
Your session vars are controlled by the server,
JS runs client side, and as such cannot modify the vars directly.
You need to make se... | [
0.38468804955482483,
-0.26926565170288086,
0.37223777174949646,
0.03634592145681381,
-0.22382323443889618,
-0.08137640357017517,
0.341084748506546,
-0.09195458143949509,
-0.1867537945508957,
-0.6889635324478149,
-0.11450605094432831,
0.646902322769165,
-0.3490714132785797,
0.05530019104480... | |
It's common knowledge that using System.Diagnostics.Process.Start is the way to launch a url from a C# applicaiton:
System.Diagnostics.Process.Start("<http://www.mywebsite.com>");
However, if this url is invalid the application seems to have no way of knowing that the call failed or why. Is there a better way to laun... | [
0.3411135971546173,
0.3434070646762848,
0.3209802210330963,
0.02778291516005993,
-0.0011053504422307014,
-0.22801876068115234,
0.2003667801618576,
-0.12218232452869415,
-0.2337847799062729,
-0.496355801820755,
-0.260823130607605,
0.6194279193878174,
-0.22583459317684174,
0.3483967483043670... | |
want to check if the scheme is matching http or https. | [
0.5487502217292786,
-0.18391422927379608,
-0.050971321761608124,
0.037569593638181686,
-0.10502056032419205,
-0.4513643980026245,
0.1710873246192932,
0.3964041769504547,
-0.25093984603881836,
-0.431870698928833,
0.11213520169258118,
0.12066905200481415,
-0.04779325798153877,
-0.15131515264... | |
Is it possible to convert a `com.vividsolutions.jts.geom.Geometry` (or a subclass of it) into a class that implements `java.awt.Shape`? Which library or method can I use to achieve that goal?
According to:
<http://lists.jump-project.org/pipermail/jts-devel/2007-May/001954.html>
There's a class:
```
com.vividsolution... | [
0.3334982693195343,
-0.4138205647468567,
0.18340907990932465,
0.3456624448299408,
-0.2177456170320511,
-0.08850498497486115,
0.036657076328992844,
-0.2605576515197754,
-0.14165888726711273,
-0.3525662124156952,
0.04898712784051895,
0.5186235904693604,
0.0232395026832819,
-0.166563540697097... | |
Is there a built-in editor for a multi-line string in a `PropertyGrid`.
I found that `System.Design.dll` has `System.ComponentModel.Design.MultilineStringEditor` which can be used as follows:
```
public class Stuff
{
[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
public string MultiLineProperty ... | [
0.017753738909959793,
-0.3102090656757355,
0.5729994773864746,
0.1848747432231903,
0.1309598833322525,
-0.05280439183115959,
0.009230001829564571,
-0.1684541553258896,
-0.43552732467651367,
-0.4031444787979126,
-0.13700786232948303,
0.4648400843143463,
-0.456318199634552,
0.131921738386154... | |
Rails uses the concept of migrations to deal with model changes using the ActiveRecord API.
CouchDB uses JSON (nested maps and arrays) to represent its model objects.
In working with CouchDB so far, I don't see good ways of recognizing when the document's structure has changed (other than being disciplined as a devel... | [
-0.2331574559211731,
0.026351522654294968,
0.028579149395227432,
0.0964168831706047,
-0.21489429473876953,
-0.038570109754800797,
0.04669424146413803,
-0.1335924118757248,
-0.35676294565200806,
-0.6644836068153381,
0.09433098137378693,
0.40144726634025574,
-0.5215067863464355,
-0.134272605... | |
representation of objects makes it easy to just duck type your objects.
For example, given that you have a blog type web app with posts and whatever fancy things people store in a blog. Your post documents have fields like author, title, created at, etc. Now you come along and think to yourself, "I should track what p... | [
0.301441490650177,
-0.06533685326576233,
0.40900561213493347,
0.47103577852249146,
-0.27833279967308044,
0.14582370221614838,
-0.050585076212882996,
0.12650422751903534,
-0.43334344029426575,
-0.6818813681602478,
0.2934860289096832,
-0.030833914875984192,
-0.15811093151569366,
0.1024575084... | |
can access moon\_phase as an attribute. And it'll be null or cause an exception or something. (Not a JS expert, I think null is the right answer)
Thing is, it doesn't really matter. If you feel like changing something just change it. Though make sure your views understand that change. Which in my experience doesn't re... | [
0.49579519033432007,
-0.12938636541366577,
0.46629855036735535,
0.15460704267024994,
0.10122384130954742,
-0.0749894231557846,
0.14409340918064117,
0.4643990695476532,
-0.1461285650730133,
-0.7492284178733826,
-0.057092856615781784,
0.5457188487052917,
-0.24579685926437378,
0.0961588546633... | |
How can I read the first line from a text file using a Windows batch file? Since the file is large I only want to deal with the first line.
Here's a general-purpose batch file to print the top `n` lines from a file like the GNU `head` utility, instead of just a single line.
```
@echo off
if [%1] == [] goto usage
if [... | [
0.21338675916194916,
0.0007226324523799121,
0.5867834687232971,
-0.36413857340812683,
-0.11025040596723557,
0.2090713381767273,
0.2641811668872833,
-0.49593278765678406,
-0.10095899552106857,
-0.5564629435539246,
-0.24268437922000885,
0.5446792840957642,
-0.3905419409275055,
-0.06764575093... | |
"!counter!"=="%1" goto :eof
echo %%a
set /a counter+=1
)
goto :eof
:usage
echo Usage: head.bat COUNT FILENAME
```
For example:
```
Z:\>head 1 "test file.c"
; this is line 1
Z:\>head 3 "test file.c"
; this is line 1
this is line 2
line 3 right here
```
It does not currently count blank lines.... | [
0.3384743332862854,
0.09905292838811874,
0.37757840752601624,
-0.23986953496932983,
-0.29045069217681885,
0.10439759492874146,
0.7440491914749146,
-0.36257514357566833,
-0.11039821058511734,
-0.23168183863162994,
-0.241842120885849,
0.01214564312249422,
-0.1628970354795456,
0.1497812122106... | |
Most people say *never* throw an exception out of a destructor - doing so results in undefined behavior. Stroustrup makes the point that *"the vector destructor explicitly invokes the destructor for every element. This implies that if an element destructor throws, the vector destruction fails... There is really no good... | [
0.3139534294605255,
0.18501688539981842,
-0.1351311206817627,
-0.06490489840507507,
-0.1381966918706894,
-0.3355281352996826,
0.5067735910415649,
-0.1482679396867752,
-0.42668426036834717,
-0.3183315694332123,
-0.48605629801750183,
0.45845454931259155,
-0.40090233087539673,
-0.005293634254... | |
how do you handle errors that occur during a destructor?*
If an error occurs during a cleanup operation, do you just ignore it? If it is an error that can potentially be handled up the stack but not right in the destructor, doesn't it make sense to throw an exception out of the destructor?
Obviously these kinds of er... | [
0.41171178221702576,
0.30953922867774963,
-0.2098248451948166,
-0.11693331599235535,
0.24457529187202454,
-0.023164890706539154,
0.8358046412467957,
-0.04743228480219841,
-0.33847150206565857,
-0.4262240529060364,
-0.13040433824062347,
0.7318617105484009,
-0.678046703338623,
0.043023925274... | |
keeps its original meaning.
// Post C++11 destructors are by default `noexcept(true)` and
// this will (by default) call terminate if an exception is
// escapes the destructor.
//
// But this example is designed to show that terminate is called
// if two exceptions are pr... | [
0.3731527030467987,
-0.1673755645751953,
0.23813048005104065,
-0.428789883852005,
0.17555122077465057,
-0.42805179953575134,
0.5280261635780334,
0.05393034219741821,
-0.23373599350452423,
0.1513563096523285,
-0.5938855409622192,
0.555495023727417,
-0.4613052010536194,
0.12257900834083557,
... | |
~Bad() noexcept(false)
{
throw 1;
}
};
class Bad2
{
public:
~Bad2()
{
throw 1;
}
};
int main(int argc, char* argv[])
{
try
{
Bad bad;
} | [
-0.25446566939353943,
-0.08069545775651932,
0.005925620906054974,
-0.4211846590042114,
-0.01880647800862789,
0.11386635899543762,
0.6526921987533569,
0.017343608662486076,
0.1378728449344635,
-0.42317888140678406,
-0.21190927922725677,
0.6741781234741211,
-0.42000922560691833,
0.3969585001... | |
catch(...)
{
std::cout << "Print This\n";
}
try
{
if (argc > 3)
{
Bad bad; // This destructor will throw an exception that escapes (see above)
throw 2; // But having two exceptions propagating at the | [
0.22740253806114197,
-0.18390533328056335,
0.09775342792272568,
-0.25656357407569885,
0.12933965027332306,
-0.13716073334217072,
0.3900855779647827,
-0.42804524302482605,
-0.272916316986084,
-0.3297578692436218,
-0.20424537360668182,
0.4107205271720886,
-0.5274422764778137,
0.0418960973620... | |
// same time causes terminate to be called.
}
else
{
Bad2 bad; // The exception in this destructor will
// cause terminate to | [
0.16042588651180267,
-0.2192443162202835,
0.032463427633047104,
-0.3288440406322479,
0.3552800416946411,
-0.20273301005363464,
0.5881496667861938,
-0.06734529882669449,
-0.0969475507736206,
-0.10346557945013046,
-0.22300763428211212,
0.66811603307724,
-0.4914095401763916,
0.199852496385574... | |
be called.
}
}
catch(...)
{
std::cout << "Never print this\n";
}
}
```
This basically boils down to:
Anything dangerous (i.e. that could throw an exception) should be done via public methods (not necessarily directly). The user of your class can then potentially handle these situatio... | [
0.36634111404418945,
-0.1345425695180893,
-0.015776682645082474,
0.006282211281359196,
0.14205685257911682,
-0.348844438791275,
0.6152082681655884,
-0.09571102261543274,
-0.25566211342811584,
-0.32452553510665894,
-0.492436945438385,
0.6615488529205322,
-0.6219034194946289,
0.1435846239328... | |
exceptions throw are caught and dropped (after attempting to fix the problem).
So in effect you pass the responsibility onto the user. If the user is in a position to correct exceptions they will manually call the appropriate functions and processes any errors. If the user of the object is not worried (as the object w... | [
0.22194699943065643,
0.09056699275970459,
0.33948269486427307,
-0.06429681926965714,
0.023133892565965652,
-0.31033241748809814,
0.2716466188430786,
-0.2437567114830017,
-0.2667172849178314,
-0.19173376262187958,
-0.4444880187511444,
0.4884380102157593,
-0.5603099465370178,
0.1434167474508... | |
of a file object wants to do special handling for problems associated to closing the file they will manually call close() and handle any exceptions. If on the other hand they do not care then the destructor will be left to handle the situation.
Scott Myers has an excellent article about the subject in his book "Effect... | [
-0.027450688183307648,
0.4003971517086029,
0.2860140800476074,
-0.1783105432987213,
0.1003456562757492,
-0.22763484716415405,
0.39934250712394714,
-0.15832775831222534,
-0.43998828530311584,
-0.35655727982521057,
-0.7886041402816772,
0.42566266655921936,
-0.27828317880630493,
0.11937107145... | |
Has anyone worked with the StarTeam COM API (Specifically, intergrating with C#).
I need to write a helper function that returns a directory structure out of Starteam, but all I've been able to retrieve using this API has been a list of views.
Has anyone else tried this?
the Starteam object model is heirachical, proj... | [
0.21472565829753876,
0.016912857070565224,
0.18139657378196716,
0.17133308947086334,
0.020177340134978294,
0.0666302889585495,
-0.32211795449256897,
0.14635410904884338,
-0.3843756318092346,
-0.6225956082344055,
0.17873689532279968,
0.4628497362136841,
0.12272369116544724,
0.02801497280597... | |
object and the folder objects have a readonly path property. There are 4 other properties of interest though, on the view object read up on the DefaultPath and AlternatePath properties and on the folder object the DefaultPathFragment and AlternatePathFragment. | [
-0.27781057357788086,
-0.2542033791542053,
0.5913257598876953,
0.16090452671051025,
0.05387552082538605,
0.28596094250679016,
0.08720291405916214,
0.21954508125782013,
-0.27323150634765625,
-0.7587589621543884,
0.11177903413772583,
0.4874836206436157,
-0.325266569852829,
-0.027940541505813... | |
I've gotten used to the idea that if I want/need to use alpha-trans PNGs in a cross-browser manner, that I use a background image on a div and then, in IE6-only CSS, mark the background as "none" and include the proper "filter" argument.
Is there another way? A better way? Is there a way to do this with the img tag an... | [
0.43078067898750305,
0.1677776724100113,
0.0677914097905159,
-0.1890472024679184,
-0.23323854804039001,
-0.17638514935970306,
0.03247290849685669,
0.05150914937257767,
-0.17936821281909943,
-0.6720137000083923,
-0.3553973138332367,
0.5414198040962219,
-0.483411967754364,
0.0793947577476501... | |
Browser specific hacks, Conditional Comments, Javascript/JQuery/JLibraryOfChoice element iteration, Server-Side CSS-serving via UserAgent-sniffing...
But all of 'em come down to having the filter applied and the background removed. | [
0.41172680258750916,
0.10960648953914642,
-0.031856030225753784,
0.0015084072947502136,
-0.2776854634284973,
-0.2467113435268402,
0.4641609787940979,
0.2849585711956024,
0.029970956966280937,
-0.6533920764923096,
-0.23577670753002167,
0.21486206352710724,
-0.5915321707725525,
0.05714825913... | |
Given an [MLS](http://en.wikipedia.org/wiki/Multiple_Listing_Service)#, I'd like to get an XML document with details about the listing, like address, price and such. Not a NAR or CREA member. Mostly interested in North American rental property listing data.
If you're an NAR member, you can utilize their Internet Data E... | [
0.7141056060791016,
0.03073226846754551,
0.3885236084461212,
0.04526425898075104,
0.17209714651107788,
-0.4604521095752716,
-0.474360853433609,
-0.021978074684739113,
-0.5814878940582275,
-0.060263969004154205,
0.14710377156734467,
0.04399649426341057,
0.09533564001321793,
0.26254341006278... | |
How do I get the caller's IP address in a WebMethod?
```
[WebMethod]
public void Foo()
{
// HttpRequest... ? - Not giving me any options through intellisense...
}
```
using C# and ASP.NET
[HttpContext.Current.Request.UserHostAddress](http://msdn.microsoft.com/en-us/library/system.web.httprequest.userhostaddress.... | [
0.002078863326460123,
0.18730108439922333,
0.563815176486969,
0.047322217375040054,
0.0703234001994133,
0.01617375575006008,
0.3770275115966797,
-0.1950811743736267,
0.09997987747192383,
-0.5116097331047058,
-0.04516388103365898,
0.4443246126174927,
-0.30284520983695984,
0.0865927487611770... | |
Okay. I know this looks like the typical *"Why didn't he just Google it or go to [www.unicode.org](http://www.unicode.org/) and look it up?"* question, but for such a simple question the answer still eludes me after checking both sources.
I am pretty sure that all three of these encoding systems support all of the Uni... | [
0.2918410003185272,
0.13502679765224457,
0.14810462296009064,
0.1131264939904213,
-0.07128589600324631,
0.11781832575798035,
0.24887141585350037,
0.19941996037960052,
-0.28371286392211914,
-0.549233078956604,
-0.24902313947677612,
0.3080362379550934,
-0.010670972988009453,
-0.0340171642601... | |
anywhere from one to four bytes per character depending on what character you're encoding. Characters within the ASCII range take only one byte while very unusual characters take four.
UTF-32 uses four bytes per character regardless of what character it is, so it will always use more space than UTF-8 to encode the sam... | [
-0.04418906569480896,
0.09665615856647491,
0.22676235437393188,
-0.10880238562822342,
-0.23396411538124084,
0.49916985630989075,
0.03912634029984474,
-0.36578261852264404,
-0.287971168756485,
-0.6127593517303467,
-0.19452233612537384,
0.21409311890602112,
-0.18899686634540558,
0.0249984581... | |
I am currently using TortoiseSVN to manage a couple of the projects that I have on the go at the moment. When I first moved everything into source control I wasn't really sure how everything should be laid out so I ended up putting each project into its own repository.
I was wondering would it be a good idea for me j... | [
0.4192422032356262,
0.1451425701379776,
0.014941660687327385,
0.15400570631027222,
0.19722110033035278,
-0.006801533978432417,
0.14931471645832062,
0.07900132238864899,
-0.34791651368141174,
-0.38593658804893494,
-0.0950334370136261,
0.6510834097862244,
0.1892092376947403,
0.43632316589355... | |
easier to manage if they where all together.
Thanks.
Depends to an extent what you mean by "project".
I have a general local repository containing random bits of stuff that I write (including my website, since it's small). A single-user local SVN repository is not going to suffer noticeable performance issues until ... | [
0.4069635570049286,
-0.001724650152027607,
-0.15463173389434814,
0.3339192569255829,
-0.09743157029151917,
-0.1596307009458542,
0.3110361397266388,
0.13519062101840973,
-0.48594942688941956,
-0.5617691874504089,
-0.03273051604628563,
0.41731294989585876,
0.16455954313278198,
-0.07924669235... | |
from class", or "the scripts I use to drive my TiVo", or "my progress in learning a new language", then creating a repos per project seems a bit unnecessary to me. Then again, it doesn't cost anything either. So I guess I'd say don't change what you're doing. Unless you really want the experience of re-organising repos... | [
0.6232094764709473,
-0.31146255135536194,
-0.1646905392408371,
0.3466590344905853,
0.023242978379130363,
0.03863987326622009,
-0.024379966780543327,
-0.07267241179943085,
-0.12239624559879303,
-0.32976505160331726,
-0.2315034419298172,
0.6407244205474854,
0.21955756843090057,
0.05133593454... | |
project scales independently, but also because it's what people will expect to see.
Sharing code between separate repositories is less of an issue than you might think, since svn has the rather lovely "svn:externals" feature. This lets you point a directory of your repository at a directory in another repository, and ... | [
0.6058685183525085,
-0.13141237199306488,
-0.11316831409931183,
0.14450189471244812,
-0.15353605151176453,
-0.2683313488960266,
0.17187899351119995,
-0.15328681468963623,
-0.2722592353820801,
-0.5060638189315796,
-0.06427913904190063,
0.3247450888156891,
0.23597721755504608,
0.044906347990... | |
I've been learning Lisp to expand my horizons because I have heard that it is used in AI programming. After doing some exploring, I have yet to find AI examples or anything in the language that would make it more inclined towards it.
Was Lisp used in the past because it was available, or is there something that I'm ju... | [
-0.030577627941966057,
0.16243283450603485,
-0.024464963003993034,
-0.06452770531177521,
-0.5231663584709167,
-0.24985308945178986,
0.30127793550491333,
0.6316629648208618,
-0.19483961164951324,
-0.3334379196166992,
0.009464510716497898,
0.7906751036643982,
-0.673371434211731,
-0.194829449... | |
prototypes usually are written in a younger dynamic language (Perl, Python, Ruby, etc) and implementations of successful research is usually in C or C++ (sometimes Java).
If you're curious about the 70's...well, I wasn't there. But I think Lisp was successful in AI research for three reasons (in order of importance):
... | [
-0.1832442581653595,
0.2585177421569824,
-0.2407829463481903,
0.041749000549316406,
-0.22354371845722198,
0.3832584619522095,
0.3138795495033264,
0.09578804671764374,
-0.2461886703968048,
-0.9519370198249817,
0.26957830786705017,
0.22817587852478027,
-0.3078381419181824,
-0.189248844981193... | |
this regard for a long time.
3. Lisp is very powerful. The code/data distinction is weaker so it *feels* more extensible than other languages because your functions and macros look like the built-in stuff.
I do not have [Peter Norvig's old AI book](http://norvig.com/paip.html), but it is supposed to be a good way to l... | [
-0.22569727897644043,
0.2726512551307678,
0.03755092993378639,
-0.2227608561515808,
-0.47889256477355957,
-0.3996821939945221,
0.6211314797401428,
-0.05682278424501419,
-0.015504232607781887,
-0.5523994565010071,
-0.03275999054312706,
0.581283450126648,
-0.17159388959407806,
-0.70462924242... | |
I assume there must be a system and language independent way to just stick the "current" EOL character into a text file, but my MSDN-fu seems to be weak today. Bonus points if there is a way to do this in a web application that will put the correct EOL character for the current client's machine's OS, not the web server... | [
-0.08324027061462402,
-0.12048256397247314,
0.7955463528633118,
-0.015076149255037308,
0.27126428484916687,
-0.06463588029146194,
0.08518807590007782,
0.1258930116891861,
-0.08520366251468658,
-0.8295309543609619,
-0.3062911331653595,
0.6379356980323792,
-0.021828416734933853,
-0.070696488... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.