text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
(average case):** copy 8192 byte data and update 3200 block offsets
16 kiB block size is just a random example - you can balance the costs of the operations by choosing the block size, maybe based on the file size and the probability of operations. Doing some simple math will yield the optimal block size.
Loading wil... | [
0.08833581209182739,
-0.15899932384490967,
-0.033998433500528336,
0.23470738530158997,
-0.10541459172964096,
0.39518532156944275,
0.10378457605838776,
-0.36577409505844116,
-0.45445170998573303,
-0.7771705389022827,
0.12010017037391663,
0.3785751163959503,
-0.11594762653112411,
-0.24966190... | |
saving by only saving all blocks that changed (content or offset).
Finally the implementation will not be to hard, too. You could just use the `StringBuilder` class to represent a block. But this solution will not work well for very long lines with lengths comparable to the block size or larger because you will have t... | [
0.08650504797697067,
-0.08599238097667694,
0.07381761819124222,
0.26134660840034485,
-0.15506166219711304,
0.3465151786804199,
0.1601722240447998,
0.03449898213148117,
-0.2747904062271118,
-0.9625216126441956,
0.2031264305114746,
0.3150947391986847,
-0.283337265253067,
-0.02684632129967212... | |
At the Boost library conference today, [Andrei Alexandrescu](http://en.wikipedia.org/wiki/Andrei_Alexandrescu), author of the book Modern C++ Design and the Loki C++ library, gave a talk titled "Iterators Must Go" ([video](https://archive.org/details/AndreiAlexandrescuKeynoteBoostcon2009), [slides](http://accu.org/cont... | [
0.20023980736732483,
0.13271912932395935,
-0.10543947666883469,
-0.01356316264718771,
-0.20095427334308624,
-0.30997729301452637,
0.18566590547561646,
-0.42782819271087646,
0.04475153237581253,
0.08224858343601227,
-0.48121485114097595,
0.5947824716567993,
-0.3359072804450989,
0.1505877077... | |
Yes, definitely but that shouldn't come as a surprise.
3. Hmm. Looking at [Boost.Range](http://www.boost.org/doc/libs/1_38_0/libs/range/index.html) and C++0x – haven't they already?
Andrei's big contribution here is just to say: drop the concept of iterators altogether, see ranges not just as a convenience wrapper but... | [
0.45693302154541016,
0.11784642934799194,
0.32265761494636536,
0.08742709457874298,
-0.3323077857494354,
-0.04834037274122238,
0.09811312705278397,
-0.44228118658065796,
0.011783734895288944,
-0.12301632761955261,
-0.1480325311422348,
0.6978775262832642,
-0.4223535656929016,
-0.16589334607... | |
that his examples are off, especially his file copying: yes, the iterator variant is a **huge** improvement over the 1975 code. It reduces a loop with complicated break condition down to *one* statement. What he's really taking issue with here is just the syntax. Well, excuse me: we're talking about C++ here – *of cour... | [
0.30191901326179504,
0.2371569126844406,
0.03982871398329735,
0.02240568958222866,
-0.32493239641189575,
-0.15126639604568481,
0.23850460350513458,
-0.07402592152357101,
-0.23632320761680603,
-0.2504175007343292,
-0.20056025683879852,
0.5288083553314209,
-0.6746434569358826,
0.325641483068... | |
one or zero elements (or an iterator!). Shunning iterators here isn't helpful in my opinion since we might want to modify the value directly instead of copying it. Returning a one-element range here only adds overhead without a benefit. Doing it Andrei's way is bad because then the name of the method is just wrong and ... | [
0.14229176938533783,
0.07835402339696884,
-0.2231578230857849,
0.4094236195087433,
-0.2135050743818283,
0.18216349184513092,
0.28417447209358215,
-0.3112707734107971,
0.11857432126998901,
-0.22052916884422302,
-0.24709422886371613,
0.31225329637527466,
-0.2741295397281647,
0.06300384551286... | |
I have this question from a client, to run some database scripts on a daily or biweekly basis, depending on the type of period. They have defined a 'busy' period and a 'quiet' period. They are using shared hosting for their applications and they can't add SQL Server jobs to their database.
What I want to do is create ... | [
0.4974074065685272,
0.06952131539583206,
0.2816646099090576,
0.042385369539260864,
0.2552381157875061,
0.012406264431774616,
0.1267959177494049,
0.23872597515583038,
-0.37885335087776184,
-0.2752360701560974,
0.06893187016248703,
0.21482190489768982,
-0.19227710366249084,
0.254708349704742... | |
the interval matches
My question: Is there a better way to do this kind of scheduling without sql server or do you know if an existing, more generic (free) solution already exists?
[Edit]
I can't use windows task scheduler since their quiet period is during winter and their busy period is during summer. With task sch... | [
-0.1541186422109604,
-0.25228017568588257,
0.28676390647888184,
0.17195293307304382,
-0.07992793619632721,
0.16216214001178741,
0.2184707224369049,
-0.05968770012259483,
-0.27507203817367554,
-1.03066885471344,
0.2461472898721695,
0.567828357219696,
-0.10838531702756882,
-0.211039751768112... | |
on the existing points.
Probably the most famous algorithm of this group is [powercrust](http://www.cs.ucdavis.edu/~amenta/pubs/sm.pdf), because it is theoretically well-established - it guarantees watertight mesh.
Ball Pivoting is patented by IBM. Also, it is not suitable for pointclouds with varying point density. ... | [
-0.40837153792381287,
-0.30114176869392395,
0.30690261721611023,
0.11821887642145157,
-0.2576996982097626,
0.35226911306381226,
0.10964745283126831,
-0.27792537212371826,
-0.6045100092887878,
-0.6828405857086182,
-0.1957099586725235,
-0.020872032269835472,
-0.40874210000038147,
0.109902083... | |
explanatory.
The algorithms of this category usually can be implemented so that they are able to process huge inputs very efficiently, and one can scale their quality<->speed trade-off. They are not disturbed by noise, varying point-density, holes. A disadvantage of them is that they require consistently oriented sur... | [
0.17939403653144836,
0.14450253546237946,
0.3754425346851349,
0.2470645308494568,
0.007524718530476093,
-0.07646577060222626,
0.2602161765098572,
-0.011546526104211807,
-0.2580990791320801,
-0.829893171787262,
-0.40838623046875,
0.5377984046936035,
-0.3972928822040558,
0.08623700588941574,... | |
very rare.
One is in [VTK](http://www.vtk.org/). I suspect it to be difficult to integrate (no documentation is available for free), it has a strange, over-complicated architecture, and is not designed for high-performance applications. Also has some limitations for the allowed input pointclouds.
Take a look at [this... | [
-0.37109479308128357,
0.027012720704078674,
0.23675285279750824,
0.04817084223031998,
-0.16377505660057068,
0.03438437730073929,
0.05176800861954689,
0.06110667437314987,
-0.5849880576133728,
-0.7822834253311157,
-0.07402805984020233,
0.20824943482875824,
-0.0000818339321995154,
0.29249846... | |
and is in active development (and is part of Google's Summer of Code). The surface module contains a number of different algorithms for reconstruction. PCL also [has the ability](http://pointclouds.org/documentation/tutorials/normal_estimation.php) to estimate surface normals, incase you do not have them provided with ... | [
0.08380366861820221,
0.029285384342074394,
0.6147236824035645,
0.034297965466976166,
0.04336561635136604,
-0.05990898981690407,
-0.1181357353925705,
0.37958160042762756,
-0.15830348432064056,
-0.7745851278305054,
-0.40800637006759644,
0.2929633557796478,
0.08268211781978607,
-0.15862292051... | |
I have started having problems with my VPS in the way that it would faill to serve the pages on all the websites. It just showed a blank page, or offered to download the php file ( luckily the code was not in the download file :) ).
The server was still running, but this seemed to be a problem with PHP, since i could l... | [
0.6087901592254639,
0.3846362233161926,
0.618231475353241,
0.06921050697565079,
-0.5369238257408142,
-0.37503862380981445,
0.7165285348892212,
-0.019151097163558006,
-0.38546013832092285,
-0.31294509768486023,
0.3255167305469513,
0.20975719392299652,
-0.12614135444164276,
0.513887524604797... | |
be old and not recommended for production servers. So they removed it for now, to see if the same kind of fails would continue to appear.
I haven't read anywhere that APC could have some problems or that its not always recommended to use, quite the contrary ... everywhere people are saying to always use it.
The APC e... | [
0.3105037808418274,
0.26989948749542236,
0.818030595779419,
0.1026616320014,
0.01788702979683876,
-0.3210206627845764,
0.2537232041358948,
0.10135135799646378,
-0.23035892844200134,
-0.5546136498451233,
-0.07340642064809799,
0.46426495909690857,
-0.1937355399131775,
0.1408189833164215,
-... | |
in PHP 6 (rather than being an optional module like it is now).
I don't know what your issue is/was but it's not APC being outdated or old tech. | [
0.3441532254219055,
0.09630638360977173,
0.397192120552063,
0.15354430675506592,
-0.24303923547267914,
-0.6059932112693787,
0.20170724391937256,
0.23263177275657654,
-0.13733242452144623,
-0.3471342921257019,
0.3233254849910736,
0.6938320994377136,
-0.13217565417289734,
-0.1565224677324295... | |
I am having a scenario, in which i have multiple delegates attached to the event (multicast delegate).
What could be the sequence of calling these methods/delegates (if any) ???
In case one of the method attached with the delegate throws the exception.
1. Will the event stop processing further...???
2. Will the res... | [
0.13480563461780548,
-0.15776269137859344,
0.05180053785443306,
0.13191905617713928,
-0.02241857908666134,
-0.11415432393550873,
0.23512758314609528,
-0.23069065809249878,
-0.2981906831264496,
-0.6815944314002991,
-0.004452352412045002,
0.34002217650413513,
-0.3823812007904053,
0.315150856... | |
If you want to guarantee that each event handler gets called in the class that raises the event, then you'll need to iterate over each delegate within the `MulticastDelegate` and invoke it individually within a try-catch block. The easy solution, of course, is just catching any possible errors within your handlers, and... | [
0.34140944480895996,
-0.18975256383419037,
-0.5000377297401428,
0.2151782363653183,
0.07383657246828079,
-0.131799578666687,
0.2139500379562378,
-0.23213447630405426,
-0.33664262294769287,
-0.47251665592193604,
-0.10304130613803864,
0.47558078169822693,
-0.06190333142876625,
-0.15463362634... | |
I am writing a batch script intended for handling some tasks in my (and a few colleagues) windows startup. The main thing that needs to happen is the killing of a few processes that do to this being a large corporate environment are started as default. They interfere with our work so we have to kill them... I know it's... | [
0.7002662420272827,
0.32532668113708496,
-0.06390650570392609,
-0.003891455242410302,
0.08460237830877304,
-0.10034394264221191,
0.16340208053588867,
0.29488012194633484,
-0.019813288003206253,
-0.6015007495880127,
0.2781960070133209,
0.525956392288208,
-0.13420864939689636,
0.177152678370... | |
well but the problem i have is that the OUClient won't start minimized. It doesn't open a window (so it is minimized to some extent) but it still appears in the alt-tab list, witch it doesn't when i minimize or close it manually. This is the script:
```
@echo off
C:
cd "C:\Program Files\SysInternals\"
pskill flxps12.... | [
0.1903965026140213,
0.34480321407318115,
0.632178008556366,
-0.012298427522182465,
0.08091790974140167,
-0.16795195639133453,
0.29924437403678894,
0.0518997497856617,
-0.08620251715183258,
-0.6269022226333618,
0.14224058389663696,
0.6458339095115662,
-0.24769525229930878,
0.282314747571945... | |
this on Windows XP SP2.
**EDIT:** Everything works fine except the /minimize on OUClient.
There is no way to do this from batch files directly, but you can write a little helper program which [finds a window](http://msdn.microsoft.com/en-us/library/ms633499.aspx) and then uses [ShowWindow](http://msdn.microsoft.com/en... | [
0.02168896049261093,
0.0600314699113369,
0.5792686343193054,
-0.18704701960086823,
-0.19626159965991974,
-0.18579141795635223,
0.4117632508277893,
0.02136058732867241,
-0.3560359477996826,
-0.6817033886909485,
0.09654590487480164,
0.5595743060112,
-0.36908480525016785,
-0.05952182412147522... | |
Hi I'm trying to modify a web page so that it loads faster.
Since I have some videos embeded (blip.tv but can change it to youtube if it helps) I was wondering if you could load an image where the video should be and on click replace the image with the video and start playing (without reloading the whole page).
I thin... | [
0.3180672228336334,
-0.04592328518629074,
0.8136980533599854,
0.07312926650047302,
-0.47773393988609314,
-0.3196859359741211,
0.1352992057800293,
-0.29086682200431824,
-0.17221663892269135,
-0.35649335384368896,
0.11167682707309723,
0.621964693069458,
-0.3368310332298279,
0.139827594161033... | |
somewhere:
```
<script type="text/javascript">
var embedCode = '<object data="http://blip.tv/play/gYMo_vAmAA" type="application/x-shockwave-flash" height="500" width="600"><param name="src" value="http://blip.tv/play/gYMo_vAmAA"><param name="allowfullscreen" value="true"></object>'
</script>
```
Then put the ima... | [
0.31145167350769043,
-0.056116215884685516,
0.7709123492240906,
0.27486416697502136,
0.2134813368320465,
-0.03474927321076393,
-0.050343770533800125,
-0.39534497261047363,
-0.3217029273509979,
-0.5698875188827515,
-0.2901950478553772,
0.30589327216148376,
0.1316913217306137,
0.121546886861... | |
In C#, I am developing several Windows Services which have some standard functionality so I have put all this common functionality into a separate referenced utility project.
I have a situation where I need to create instances of business classes which reside in my Windows Service project from the utility project usin... | [
0.41753867268562317,
0.11319778859615326,
-0.21817846596240997,
-0.29652100801467896,
-0.38423246145248413,
-0.1110968366265297,
0.1908053606748581,
-0.18405792117118835,
-0.0921473503112793,
-0.4625754654407501,
-0.13695400953292847,
0.3960888087749481,
-0.45868638157844543,
0.08367741107... | |
references Utility Project.
Utility Project wants to create class from Project A, its aware of the namespace and class name.
Is there a Design Pattern or an approach that I should be following to achieve this functionality? Or does this look like a no, no and I should be refactoring?
Thanks for looking
You need to... | [
0.29058635234832764,
0.09748545289039612,
0.5133262872695923,
-0.07391907274723053,
0.1396951526403427,
-0.13898539543151855,
0.12356255948543549,
-0.4272470772266388,
-0.20423075556755066,
-0.6664878726005554,
0.1316262185573578,
0.34129244089126587,
-0.49709242582321167,
0.26494619250297... | |
+ "Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"));
```
Alternatively, can you make this a generic method in the utility project, and get the caller to specify the type as a type argument? | [
0.27492550015449524,
-0.07298684120178223,
0.2877378463745117,
-0.40945354104042053,
-0.0738028958439827,
-0.10923552513122559,
0.44549956917762756,
-0.24252301454544067,
0.1338469535112381,
-0.14337307214736938,
-0.14172875881195068,
0.5057678818702698,
-0.5479570031166077,
0.156865283846... | |
I have a question regarding the MVVM design for C#/WPF. I've had a look at several demo applications, but they didn't really handle my problem.
My application consists of objects that contain other objects. Much like in a parent - children relationship.
My question now is:
* does the children attribute have to be a... | [
0.17015615105628967,
0.02743612974882126,
0.19195087254047394,
0.1377091258764267,
0.22549104690551758,
0.34146878123283386,
-0.2016480565071106,
-0.07160665839910507,
-0.15826208889484406,
-0.7180343866348267,
0.16859070956707,
0.523496150970459,
-0.1408357173204422,
0.47924309968948364,
... | |
{
string Name;
List<Child> children;
}
class ParentVM{
Parent _parent;
string Name{return _parent.Name;}
List<ChildVM> children {get;set;}
ParentVM(Parent p){_parent = p;}
}
void CreateANewParent(){
List<ChildVM> children = new List<ChildVM>(){new ChildVM(new Child()),...};
ParentVM ... | [
-0.0423080213367939,
-0.010256434790790081,
0.4608790874481201,
-0.14453448355197906,
0.38959285616874695,
0.2728724777698517,
0.16244007647037506,
-0.27727535367012024,
-0.38771623373031616,
-0.5912920236587524,
-0.5990698933601379,
0.3929101228713989,
-0.08709118515253067,
0.635416567325... | |
objects. I also don't think it's a good idea to duplicate the Child objects, as it leads to redundance and in my application context there is also no need/possibility to create new Child objects.
I also thought about the following class design:
```
class ParentVM {
Parent _parent;
string Name{return _parent.... | [
0.05947298929095268,
0.09161324054002762,
0.17175349593162537,
0.2587640881538391,
0.09395550191402435,
0.3673895597457886,
0.19959208369255066,
0.008262522518634796,
-0.22713623940944672,
-0.7277799248695374,
0.0534379743039608,
0.39416760206222534,
-0.4148119390010834,
0.7028292417526245... | |
in the database. But is this a good way of handling the problem?
Actually, the proper way to do this is when you first create a ParentVM, you iterate through the children of the passed-in Parent, creating a ChildVM for each, then add those ChildVM objects to the ParentVM's ChildVMs property. (Some would just call that ... | [
0.4451843798160553,
0.011194913648068905,
0.3641597032546997,
0.44687196612358093,
0.3478642404079437,
-0.10300783067941666,
-0.09522984176874161,
-0.1790367066860199,
-0.32821980118751526,
-0.5437629818916321,
0.0646502822637558,
0.32818570733070374,
0.0019054280128329992,
0.5156835317611... | |
collection accordingly.
That way you have a model with Parent->Children->Child and a ViewModel of ParentVM->ChildVMs->ChildVM which is I believe exactly what you want.
Now I'm also of the belief that you should be able to expose the Parent directly from the ParentVM as well as the Child directly from the ChildVM sinc... | [
0.5605342388153076,
0.1452060043811798,
0.17671748995780945,
0.38571518659591675,
-0.1758638471364975,
-0.04701662436127663,
0.24971622228622437,
-0.41439908742904663,
-0.21216924488544464,
-0.23773464560508728,
-0.036101505160331726,
0.6977534294128418,
0.16050498187541962,
0.412094056606... | |
if the model changes, you have to change the ViewModel anyway for the exact same reason. The only savings would be if there are several views all sharing the same ViewModel since you'd just have to change it in one place, but realistically, something like 'Name' isn't going to change it's "name" from the model to the V... | [
0.4395660161972046,
0.029565880075097084,
0.3817538022994995,
0.34604841470718384,
0.0833631083369255,
0.19351695477962494,
0.13432417809963226,
-0.2045426219701767,
-0.1876751333475113,
-0.7005699872970581,
0.10546111315488815,
0.7878029346466064,
0.1598910540342331,
0.3433311879634857,
... | |
any model-generated changes to the Name property unless you also add all the extra change notification inside the VM, meaning you now have one change notification in the model who's sole purpose is to fire a *second* change notification in the VM that then notifies the UI. Pure? Yes. Performance-invasive? You bet, espe... | [
0.07622938603162766,
-0.2875117063522339,
0.6270264387130737,
0.1005207821726799,
0.12960182130336761,
-0.2533831000328064,
0.2722897529602051,
-0.1978817582130432,
-0.4886922538280487,
-0.5912785530090332,
-0.11694716662168503,
0.5084373354911804,
-0.36876657605171204,
0.37325742840766907... | |
change notification from the model to notify the UI and you also keep your VM clean for things that are only VM- or View-specific.
What I never do however is place anything in the Model that is view-only info. THAT to me is what the ViewModel is for. So for instance, if the children have a specific color based on an e... | [
0.37374553084373474,
-0.41809722781181335,
0.40752410888671875,
-0.057588525116443634,
0.1870172619819641,
-0.032502997666597366,
-0.12473512440919876,
0.492659330368042,
-0.2957032024860382,
-0.6878392696380615,
-0.035274650901556015,
0.32458141446113586,
-0.15119650959968567,
0.228465616... | |
yes, I would wire up change-notifications from the model inside the ChildVM. (Truthfully, I may even just do it via a color converter in the UI directly, still binding to the model's enum. It's really a case-by-case thing.)
HTH,
Mark | [
0.4188903868198395,
0.10866229981184006,
0.3521213233470917,
0.13079138100147247,
0.2948293685913086,
0.17562136054039001,
0.05905523523688316,
0.12202426046133041,
-0.26757386326789856,
-0.6843116879463196,
0.024013567715883255,
0.297363817691803,
0.09450311213731766,
-0.01416453160345554... | |
I am developing an Eclipse plugin and have tests for it. Some are regular JUnit tests, some are PDE tests (i.e. require starting an eclipse instance to be able to access eclipse internals).
I wonder if it would be a good idea to try to turn some of the PDE test into regular tests, by creating mock objects for the plat... | [
0.6063752770423889,
0.11834998428821564,
-0.15723025798797607,
0.17427168786525726,
-0.12589822709560394,
-0.11178028583526611,
0.028969181701540947,
0.025890307500958443,
0.08916469663381577,
-0.5152479410171509,
0.18768194317817688,
0.4213106632232666,
-0.041945040225982666,
-0.101636901... | |
make up my mind about how to proceed.
Thanks in advance!
best regards,
Vlad
It will be a lot of work since you can't reuse much of the original code (which is riddled with lots of `private final static` for runtime data which you can't get rid of nor can you access it).
I suggest to give it a try. If it seems feasib... | [
0.785264253616333,
-0.1405600905418396,
0.11191954463720322,
0.1806577891111374,
-0.05902160331606865,
-0.16677117347717285,
0.4002293050289154,
-0.0952397957444191,
0.2621035575866699,
-0.8013045787811279,
-0.006683620624244213,
0.4604259729385376,
-0.04103461280465126,
0.1165418326854705... | |
Is it possible to check if a (MySQL) database exists after having made a connection.
I know how to check if a table exists in a DB, but I need to check if the DB exists. If not I have to call another piece of code to create it and populate it.
I know this all sounds somewhat inelegant - this is a quick and dirty app.... | [
0.3384101688861847,
0.2510698735713959,
0.1182849183678627,
0.18659259378910065,
0.04967838153243065,
-0.19439047574996948,
0.25285759568214417,
-0.06441207975149155,
-0.14070148766040802,
-0.7118632793426514,
0.09558916836977005,
0.2903134226799011,
-0.39096277952194214,
0.078268274664878... | |
NOT EXISTS DBName;
``` | [
0.25643661618232727,
0.4025515019893646,
0.16178308427333832,
0.0008410976151935756,
-0.04683227092027664,
-0.18133290112018585,
0.41555285453796387,
0.2593177855014801,
0.09216328710317612,
-0.5488340258598328,
-0.47306445240974426,
0.4611155092716217,
-0.3690745234489441,
0.5580894947052... | |
I want match spaces at the beginning of lines in Vim
**PseudoCode of what I want to do**
```
^( )*
```
I know the following from manual
```
notation meaning equivalent decimal value(s)
-----------------------------------------------------------------------
<Space> space ... | [
0.3223739564418793,
0.26547229290008545,
0.5780973434448242,
-0.17190973460674286,
0.1004648357629776,
0.014912591315805912,
0.010948159731924534,
-0.22913289070129395,
0.16058959066867828,
-0.7187829613685608,
-0.06864549964666367,
0.5996041893959045,
-0.19092190265655518,
-0.057944007217... | |
sure how to use the decimal value 32.
**How can you match one or more whitespaces in Vim?**
Typing
```
/^ \+
```
In command mode will match one or more space characters at the beginning of a line.
Typing
```
/^\s\+
```
In command mode will match one or more whitespace characters (tabs etc. as well as spaces) a... | [
0.06064910069108009,
0.10373568534851074,
0.417825311422348,
0.19507651031017303,
0.09982447326183319,
0.07162496447563171,
0.21728216111660004,
-0.15201659500598907,
-0.0542055182158947,
-0.6204826235771179,
0.07880064100027084,
0.7738577127456665,
-0.15803445875644684,
-0.518717169761657... | |
How can i get result "My Dream Table Result"
```
CREATE TABLE #temp(
[count] int
, [Time] nvarchar(50))
DECLARE @DateNow DATETIME,@i int
SET @DateNow='00:00'
SET @i=1;
WHILE(@i<1440)
BEGIN
SET @DateNow=DATEADD(minute, 1, @DateNow)
INSERT INTO #temp ([count], [Time]) VALUES (0, @DateNow)
... | [
0.15122413635253906,
-0.24973750114440918,
0.8113685846328735,
0.008554649539291859,
0.39324745535850525,
-0.014738231897354126,
0.1667773723602295,
-0.42286863923072815,
-0.010231188498437405,
-0.6409584283828735,
-0.11874909698963165,
0.24933460354804993,
0.06122589856386185,
0.226154103... | |
0 | Jan 1 1900 12:01AM
0 | Jan 1 1900 12:02AM
0 | Jan 1 1900 12:03AM
0 | Jan 1 1900 12:04AM
```
But i don't like this table Time format is not ok. I need this table
My Dream Table Result:
```
Count | Time
0 | 12:01
0 | 12:02
0 | 12:03
0 | [
-0.21434645354747772,
0.2148950845003128,
0.541121780872345,
-0.024050002917647362,
-0.07767847180366516,
0.02626771852374077,
0.5082621574401855,
-0.2737906277179718,
-0.3812906742095947,
-1.1979764699935913,
0.30503344535827637,
0.025076624006032944,
-0.037878360599279404,
0.270281910896... | |
| 12:04
...
...
0 | 22:01
0 | 22:02
0 | 22:03
0 | 22:04
```
`equalsIgnoreCase` *can* be a lot faster. For example, consider two strings which start with the same 10,000 characters - but one of them has an extra character at the end. `equalsIgnoreCase` can return immediately; `compa... | [
-0.09865041077136993,
0.05050862580537796,
0.41977182030677795,
-0.07217930257320404,
-0.1400155872106552,
0.2820598781108856,
0.37154287099838257,
-0.2484188824892044,
0.07874106615781784,
-0.7169342637062073,
0.06501038372516632,
0.40264561772346497,
-0.2155860960483551,
-0.0556509383022... | |
whichever expresses your intention better. This works well for performance too: assuming I'm right in saying that `equalsIgnoreCase` is at least as fast as `compareToIgnoreCase`, it means you should use that where you can - if you need an actual ordering, you've got to use `compareToIgnoreCase` anyway. | [
-0.22164881229400635,
-0.15695908665657043,
0.34802964329719543,
-0.04324974864721298,
-0.3012615144252777,
0.2013663500547409,
-0.06584855169057846,
0.13648240268230438,
0.03632255643606186,
-0.8609771728515625,
0.0458528958261013,
1.048569917678833,
0.09490775316953659,
-0.40294179320335... | |
I'm using pycurl to upload a file via put and python cgi script to receive the file on the server side. Essentially, the code on the server side is:
```
while True:
next = sys.stdin.read(4096)
if not next:
break
#.... write the buffer
```
This seems to work with text, but not binary files (I'm on win... | [
0.3322729766368866,
-0.031315360218286514,
0.4324646294116974,
-0.18575604259967804,
-0.1008809506893158,
-0.027363639324903488,
0.1417420655488968,
-0.07740791141986847,
-0.2089003026485443,
-0.7166237235069275,
-0.14051444828510284,
0.4442616105079651,
-0.3614550530910492,
0.085935041308... | |
do it programmatically like this:
```
msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
```
before starting to read from `stdin`. | [
0.1290818154811859,
-0.0077980803325772285,
0.21802175045013428,
-0.21896566450595856,
0.29572832584381104,
-0.4020407497882843,
0.11273502558469772,
0.0028040073812007904,
-0.047897499054670334,
-0.5518870949745178,
-0.3607124090194702,
0.48204824328422546,
-0.31248241662979126,
-0.090472... | |
I have created compression and decompression technique using GZipinputstream in both c#.NET and Java. If I compress up to 13239 bytes in c#.NET then i can decompress it in Java but if I compress more than 13239 bytes in c#.NET then i am not able to decompress it in Java. But I can decompress it using C#.NET. Any ideas ... | [
0.05869966000318527,
0.13810285925865173,
-0.00936057511717081,
0.1607169657945633,
-0.30818477272987366,
0.022041913121938705,
0.21904030442237854,
0.03424534946680069,
-0.5438931584358215,
-0.8525789976119995,
-0.08753855526447296,
0.3967297673225403,
-0.49688708782196045,
0.297601699829... | |
is in b-tree leaf nodes or in the existing heap format.
Currently, postgresql indices only store [key,ctid] pairs (essentially). (A ctid is essentially a "rowid" - heap page number and tuple line pointer index) So you can't count the rows in the table just by going through the index, because you need to check [xmin,xm... | [
-0.30499061942100525,
-0.04134618118405342,
0.29445216059684753,
0.1358923465013504,
-0.1345246583223343,
-0.03611094132065773,
0.16409391164779663,
0.15767802298069,
-0.08262978494167328,
-0.6374481320381165,
-0.3183153569698334,
0.097330741584301,
-0.40879857540130615,
0.1524680256843567... | |
they were kept up-to-date: and that causes problems, not least because the work involved in doing an update has now expanded by some amount multiplied by the number of indices on the table. In the case of heavy indices such as on tsvector, or ones based on costly user expressions, this could take a while, and in some n... | [
0.4172298312187195,
0.14179499447345734,
0.5714831352233887,
0.2502484917640686,
0.07348532229661942,
-0.1853463053703308,
0.4795556664466858,
-0.12730446457862854,
-0.32444581389427185,
-0.47563353180885315,
-0.06864197552204132,
0.38720348477363586,
-0.2543824315071106,
-0.04600309953093... | |
in the index exclusively if possible. This cost would be incurred even if you were updating a non-indexed column-- something the team went to some effort to speed up in 8.3 (heap-only tuples).
I suppose one possibility would be to mark indices as optionally having [xmin,xmax] - e.g. only mark the pkey index that way. ... | [
0.09894078969955444,
-0.1168803870677948,
0.2918601632118225,
0.23437237739562988,
-0.2491294890642166,
-0.18760670721530914,
-0.17675815522670746,
0.043646302074193954,
-0.5597456097602844,
-0.436409592628479,
-0.25812071561813354,
0.49897560477256775,
-0.343539297580719,
-0.0509557276964... | |
basically index-organised) work by storing [key,tuple] in the primary key index instead (and presumably [key,pkey] in all the others) - no ctid, no heap. So "tuple" will contain [xmin,xmax,cminmax,natts,....] etc and you could satisfy the "select count(\*) from table" just by scanning the index. But this essentially ju... | [
-0.1832108497619629,
-0.33285534381866455,
0.49024349451065063,
0.2901962697505951,
-0.2447802722454071,
-0.17319737374782562,
0.14523416757583618,
-0.2021992802619934,
-0.4647582173347473,
-0.6041380167007446,
-0.4071342945098877,
0.1660175770521164,
-0.4007354974746704,
0.152630984783172... | |
key may be a bit faster. I do seem to remember the Oracle-related advice I was given for IOTs was that they were intended for static dimension tables, and not general purpose use, partly due to the cost imposed on maintaining secondary indices (I don't think Oracle stores [key,pkey] in IOT secondary indices, but rather... | [
-0.095207579433918,
-0.2456122636795044,
0.1457931250333786,
0.2759179472923279,
-0.23529228568077087,
0.04354453831911087,
-0.07559048384428024,
-0.12696388363838196,
-0.15134838223457336,
-0.34620481729507446,
0.1381799727678299,
0.6087170243263245,
0.04952239245176315,
-0.08650545775890... | |
My sql table is something like (message,created)
I want to select those rows which are within X seconds from each other. Say the last message is within X seconds from NOW(), then it should select it. If the second last message is within X seconds from the last message then it should select it too. In other words each ... | [
0.13963957130908966,
0.0878487303853035,
0.3198830485343933,
0.026144610717892647,
-0.06117139011621475,
-0.04106035456061363,
-0.08667875826358795,
-0.002458244329318404,
-0.05650376155972481,
-0.5042126178741455,
0.49719512462615967,
0.088544562458992,
-0.20891426503658295,
0.40822878479... | |
consequtive messages within X seconds are linked to each other)
I have no idea how to go about writing an SQL query for this. Is it even possible?
Thank you very much for your time.
This script works in SQLServer. You should be able to take out the select statement and run it in MySQL.
```
DECLARE @Messages TABLE (M... | [
0.01859753578901291,
-0.48879125714302063,
0.41321656107902527,
-0.015163121744990349,
-0.15895453095436096,
-0.04874465987086296,
0.4131677448749542,
-0.06201416254043579,
-0.0463845394551754,
-0.5448660850524902,
0.11338584125041962,
0.48975229263305664,
-0.44580790400505066,
-0.18392232... | |
('Message4', GetDate()-5)
SELECT m1.Message, m1.Created
FROM @Messages m1
INNER JOIN @Messages m2 ON m2.Created <= m1.Created + @Interval
AND m2.Created >= m1.Created | [
-0.13671287894248962,
-0.2998410761356354,
0.15006868541240692,
-0.24614405632019043,
0.049698565155267715,
0.5199863910675049,
0.4048377573490143,
-0.06360893696546555,
-0.33628329634666443,
-0.7635162472724915,
-0.36331987380981445,
0.18062491714954376,
-0.4529481530189514,
0.02875432185... | |
AND m2.Message <> m1.Message
UNION ALL SELECT m2.Message, m2.Created
FROM @Messages m1
INNER JOIN @Messages m2 ON m2.Created <= m1.Created + @Interval | [
-0.1288585364818573,
-0.15949150919914246,
0.22214020788669586,
-0.26187512278556824,
0.21235549449920654,
0.46159207820892334,
0.2252539098262787,
-0.1524929255247116,
-0.23434853553771973,
-0.7922183275222778,
-0.32887062430381775,
0.26693782210350037,
-0.3785379230976105,
0.093279443681... | |
AND m2.Created >= m1.Created
AND m2.Message <> m1.Message
ORDER BY Created
``` | [
-0.32069140672683716,
0.18948259949684143,
0.044857434928417206,
-0.1753731071949005,
-0.027685942128300667,
0.4949122965335846,
0.33364352583885193,
-0.15384803712368011,
-0.36718955636024475,
-0.6478220820426941,
-0.518770158290863,
0.1179150640964508,
-0.5723159313201904,
0.353480994701... | |
I have the following in my .screenrc
```
source ~/bin/Screen/multiUserSettings | [
0.18666619062423706,
0.3375023305416107,
0.3810301423072815,
-0.17329692840576172,
0.3613364100456238,
-0.1603412926197052,
0.1105814054608345,
0.125362366437912,
-0.29538819193840027,
-0.8200997710227966,
-0.16572295129299164,
0.3851764500141144,
-0.17297051846981049,
0.1777350902557373,
... | |
```
It gives me
```
No such file or directory
```
although I have it.
The following code says me that unknown command ".".
```
. ~/bin/Screen/multiUserSettings | [
0.041996147483587265,
0.15796203911304474,
0.30951473116874695,
-0.1342557668685913,
0.43748268485069275,
-0.17503513395786285,
0.18218989670276642,
0.29212188720703125,
-0.3746267259120941,
-0.9277865290641785,
-0.17531292140483856,
0.577072024345398,
-0.3394539952278137,
0.29914012551307... | |
```
It is strange, since I can source by . in .vimrc and .zshrc, for instance.
The file **multiUserSettings**
```
# allow the following people full control
addacl root,aledesma,mymanager,mycoworker1,mycoworker2
aclchg aledesma +rwx ?#??
# allow everyone readonly access
aclchg *,!aledesma -rwx | [
-0.116932213306427,
0.22808973491191864,
0.5530279278755188,
0.06899455934762955,
-0.04791579023003578,
-0.11347033083438873,
0.10882730036973953,
-0.021719299256801605,
-0.2828994691371918,
-0.5301245450973511,
-0.04520096257328987,
0.5344967246055603,
-0.10464668273925781,
0.265482157468... | |
?#??
# setup 10,000 lines of available scrollback ? copy/paste
defscrollback 10000
# fix scrollback in putty
termcapinfo xterm* ti@:te@
```
**How can you source in .screenrc?**
Try to use
```
source /home/yourname/bin/Screen/multiUserSettings
```
instead. My guess is that screen does not support expanding ~... | [
0.28955405950546265,
-0.013615244068205357,
0.5668143630027771,
0.08918911963701248,
-0.07277620583772659,
-0.07500176876783371,
0.16245384514331818,
0.03788897022604942,
-0.17599907517433167,
-0.962165892124176,
-0.060404375195503235,
0.5988556742668152,
-0.25462913513183594,
0.1073549985... | |
I want to enforce on my code base immutable rule with following test
```
[TestFixture]
public class TestEntityIf
{
[Test]
public void IsImmutable()
{
var setterCount =
(from s in typeof (Entity).GetProperties(BindingFlags.Public | BindingFlags.Instance)
where s.CanWrite
... | [
0.3687886595726013,
-0.10138068348169327,
0.3293411433696747,
-0.03500652313232422,
0.2244964987039566,
-0.144845113158226,
0.4674443304538727,
-0.5044216513633728,
0.09229396283626556,
-0.5264937281608582,
-0.04737021401524544,
0.4147406816482544,
-0.3684338927268982,
0.2608434557914734,
... | |
.Count();
Assert.That(setterCount == 0, Is.True, "Immutable rule is broken");
}
}
```
It passes for:
```
public class Entity
{
private int ID1;
public int ID
{
get { return ID1; }
}
}
```
but doesn't for this:
```
public class Entity
{
public int ID { get; private set; }
}... | [
0.524164617061615,
-0.20410870015621185,
0.2355981469154358,
-0.06494691967964172,
0.06247555837035179,
-0.3666803240776062,
0.27937671542167664,
-0.5155462026596069,
-0.28747206926345825,
-0.34312254190444946,
-0.05743709206581116,
0.5630513429641724,
-0.43745043873786926,
0.2001239061355... | |
setter. Note the check for GetSetMethod returning null (no setter) and the test for IsPrivate (i.e. not public or protected) rather than IsPublic (public only).
```
var setterCount =
(from s in typeof(Entity).GetProperties(
BindingFlags.Public
| BindingFlags.NonPublic
... | [
-0.11156567931175232,
-0.15260063111782074,
0.44060632586479187,
0.05870581045746803,
0.013119341805577278,
-0.32608193159103394,
0.4588572680950165,
-0.3887026011943817,
-0.26842111349105835,
-0.4276840090751648,
-0.4590478539466858,
0.26982033252716064,
-0.6356997489929199,
0.11422644555... | |
where
s.GetSetMethod(true) != null // setter available
&& (!s.GetSetMethod(true).IsPrivate)
select s).Count();
```
Nevertheless, as [pointed out in Daniel Brückner's answer](https://stackoverflow.com/questions/839066/net-immutable-objects/839113#839113), the fact that a class h... | [
0.02870558761060238,
-0.06693761795759201,
-0.03598468005657196,
0.05453886091709137,
0.040293868631124496,
-0.2458341270685196,
0.37287676334381104,
-0.31878039240837097,
-0.33392447233200073,
-0.3456968665122986,
-0.5472251176834106,
0.3133517801761627,
-0.5237689018249512,
0.41215327382... | |
I'm considering using the Google Contacts API for a webapp, but I'm worried that a user might have a bad experience that could be blamed on me.
I intend to use the data in a responsible manner, I could get blamed for somebody else's misuse of it. Has anyone else had this? What did you do about it?
Answer this question... | [
0.549675703048706,
0.1449509710073471,
0.15717445313930511,
0.43539321422576904,
0.24426786601543427,
-0.28229013085365295,
0.3630216717720032,
0.20590750873088837,
-0.5200151801109314,
-0.29671603441238403,
0.42027783393859863,
0.5544543266296387,
-0.0913456454873085,
0.10393387079238892,... | |
web. If I should ever have to apply for a new job, I could ask StackOverflow to create a CV for me -- they have all the necessary data but that's because I want it. So this is probably OK. But some sick mind may find patterns in my posts, things which I'd never have thought of -- word frequencies, length of posts, comp... | [
0.986643373966217,
0.27150824666023254,
0.44810256361961365,
0.369449257850647,
0.13270023465156555,
-0.3172825872898102,
0.3142278790473938,
0.2909981608390808,
-0.7230419516563416,
-0.5178337097167969,
0.1854897439479828,
0.340197890996933,
0.04878178983926773,
0.2556624412536621,
-0.0... | |
anything for the data except blame, why collect it? | [
0.3586432635784149,
0.25661537051200867,
-0.26931238174438477,
0.5904092788696289,
-0.22986887395381927,
-0.19761715829372406,
-0.022357963025569916,
0.036496859043836594,
-0.286018967628479,
0.17655101418495178,
0.45608755946159363,
0.1666838377714157,
-0.30909761786460876,
-0.13435442745... | |
I'm defining a user element with XSD. For this example, a user has a name, email and one or more nationalities. I've tried:
```
<xs:all>
<xs:element name="name" blabla />
<xs:element name="email" blabla />
<xs:element name="nationality" minOccurs="1" maxOccurs="unbounded" />
</xs:all>
```
However, that is ille... | [
0.3199719488620758,
0.08881133794784546,
0.10123272240161896,
0.04831872135400772,
0.151371568441391,
-0.17580631375312805,
0.06376655399799347,
-0.020941372960805893,
-0.25807633996009827,
-0.5349379777908325,
-0.3148343563079834,
-0.13516777753829956,
-0.6348965764045715,
0.1217065155506... | |
(or my inexperienced eyes don't see it).
By intuition, I also tried:
```
<xs:all>
<xs:element name="name" blabla />
<xs:element name="email" blabla />
<xs:sequence>
<xs:element name="nationality" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
</xs:all>
```
But that's unfortunately invalid.
---
... | [
-0.16355060040950775,
0.06184856593608856,
0.5806702971458435,
0.12479457259178162,
-0.043313317000865936,
-0.011528613045811653,
-0.12057454138994217,
-0.175531804561615,
-0.23715482652187347,
-0.8183159828186035,
-0.27128341794013977,
0.26770585775375366,
-0.3007182776927948,
0.453988701... | |
<xs:element name="zipcode" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="city" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="username" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="email" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs... | [
0.30611976981163025,
0.10561040788888931,
0.6457501649856567,
0.13899846374988556,
0.2100394070148468,
-0.347208708524704,
0.38070401549339294,
-0.24605481326580048,
-0.25692856311798096,
-0.5191298127174377,
-0.5840592384338379,
0.2810335159301758,
-0.4018584191799164,
0.0357830673456192,... | |
I would like to send a html string with a GET request like this with Apaches HttpClient:
```
http://sample.com/?html=<html><head>...
```
This doesnt work at the moment, i think its an encoding problem. Do you have any ideas how to do that?
```
method.setQueryString(new NameValuePair[] {new NameValuePair("report", "... | [
0.13997361063957214,
-0.10555373132228851,
0.5438947677612305,
0.08155284076929092,
-0.19429314136505127,
-0.22838322818279266,
0.47989025712013245,
-0.3571036756038666,
0.09450287371873856,
-0.8213670253753662,
-0.05794621258974075,
0.413879930973053,
-0.4762697219848633,
0.09048493951559... | |
"Cleanup failed to process the following paths
The system cannot find the file specified"
Am having this issue with Tortoise SVN going to a SAMBA share.. any thoughts on setup? Its probably permissions getting mucked up, but this setup doesn't feel very robust.. am having to delete the affected directory, then recreat... | [
0.12036892771720886,
0.2231251746416092,
0.1849871724843979,
-0.1377580314874649,
-0.2669115960597992,
-0.24736164510250092,
0.5076053142547607,
-0.026802923530340195,
-0.3181775212287903,
-0.8344268202781677,
-0.08606348931789398,
0.8188128471374512,
-0.33162587881088257,
0.23809391260147... | |
mirror the production environment.
we have the same issue at work
often Tsvn (TortoiseSVN) has a problem to move folders created by itself, so we get an error like '**Can't move xxx to yyy...**' '**Working copy locked, please cleanup**' or something like, then the cleanup fails.
we tried with '`readonly = yes`' in sa... | [
0.2582707107067108,
0.025975096970796585,
0.2639423608779907,
0.009928773157298565,
0.004674701951444149,
0.1848878711462021,
0.2128123939037323,
-0.2701769769191742,
-0.6976705193519592,
-0.574630856513977,
-0.009558337740600109,
0.47595974802970886,
-0.35471197962760925,
0.25850802659988... | |
in the share definitions.
And more, i tell you that you don't need to delete the entire project and checkout from SVN a new working copy when you're blocked with that error: it's enough to launch from shell this command when you are in the target shared root folder of the project
```
rm -rf `find . -type d -name .svn... | [
0.36687809228897095,
0.14602237939834595,
0.036487605422735214,
-0.0719304159283638,
0.12565790116786957,
-0.49447908997535706,
0.5384429097175598,
-0.07279667258262634,
-0.14424622058868408,
-0.56949782371521,
-0.25944122672080994,
0.9512835741043091,
-0.0825791209936142,
0.23004002869129... | |
Why does the `Iterator` interface not extend `Iterable`?
The `iterator()` method could simply return `this`.
Is it on purpose or just an oversight of Java's designers?
It would be convenient to be able to use a for-each loop with iterators like this:
```
for(Object o : someContainer.listSomeObjects()) {
....
}
... | [
-0.2954275608062744,
-0.06454157829284668,
-0.09682795405387878,
0.06492877751588821,
-0.10351523756980896,
-0.09932537376880646,
0.144937664270401,
-0.34738078713417053,
-0.4769112467765808,
-0.3978634476661682,
-0.2259395569562912,
0.28480809926986694,
-0.4678342044353485,
-0.00976047199... | |
does sy know why the Ajax Enable WebAppication in VS 2008, even if you put the target framework 3.5, target afterwards .NET 2.0 framework?
(so I create the Web application with ASP.NET 2.0 Ajax Extensions 1.0 features enable (.NET framework 3.5) , then I check the Target Framework in the Application Tab of the project... | [
0.0037916037254035473,
-0.029064074158668518,
0.5739954710006714,
-0.011028531938791275,
-0.3704967498779297,
-0.15621443092823029,
0.2150552123785019,
0.0837579220533371,
-0.4232223927974701,
-0.7188366651535034,
0.024930564686655998,
0.4784170687198639,
-0.2945185601711273,
-0.1740410327... | |
default. | [
-0.055772680789232254,
-0.2364879548549652,
0.10820862650871277,
0.090704046189785,
0.20103926956653595,
-0.21277908980846405,
0.17981566488742828,
0.28620168566703796,
0.056439753621816635,
-0.6446344256401062,
-0.28780683875083923,
0.6835289597511292,
-0.2690688669681549,
0.1049844771623... | |
I have a UITableView with a UISearchBar at the top of it.
I also use the Section Index delegate to display ABC...XYZ on the right hand side.
Problem occurs when I click on the Search Box and the keyboard comes up from the bottom, the Section Index squashes so only A*D*...\*Z are displayed - when I close the Search an... | [
-0.021967215463519096,
0.2336536943912506,
0.5154487490653992,
-0.18555688858032227,
-0.12049378454685211,
0.1643245369195938,
0.46596720814704895,
-0.3461737632751465,
-0.013032850809395313,
-0.7698240280151367,
-0.12162864208221436,
0.5653976202011108,
-0.32488539814949036,
0.24477799236... | |
the search index back into view
for (UIView *view in [[self tableView] subviews]) {
if ([view respondsToSelector:@selector(moveIndexIn)]) {
MovableTableViewIndex *index = (MovableTableViewIndex*)view;
[index moveIndexIn];
}
}
// try a whole load of stuff to try and get the section indexe... | [
-0.4951658248901367,
-0.22494688630104065,
1.142199158668518,
-0.12642596662044525,
-0.10631765425205231,
0.06148306652903557,
0.3477090895175934,
-0.4429910480976105,
-0.24068763852119446,
-0.5875913500785828,
-0.37893661856651306,
0.7153259515762329,
-0.20649656653404236,
0.0225399397313... | |
tableView] sizeToFit];
[[self tableView] zoomScale];
[[self tableView] reloadSectionIndexTitles];
```
My questions are, has anyone seen this behaviour? Is there a way to redraw the Section Index on the RHS (`[[self tableView] reloadData]` doesn't do the trick)
Thanks a million!
You should disable the drawing ... | [
0.0646347925066948,
0.007965629920363426,
0.6013798713684082,
0.10573461651802063,
-0.2552573084831238,
-0.30179470777511597,
0.6512966156005859,
-0.0589703693985939,
-0.3881111443042755,
-0.4493056833744049,
-0.19477732479572296,
0.5896016359329224,
-0.283021479845047,
0.12941588461399078... | |
I'm wondering is there a JavaScript library available that would allow me to generate an Image from the contents of a DIV.
Basically this is required for some Server-Side Printing code, which needs to print a background from the Browser.
What I'd ultimately like to do would be encode the DIV contents into PNG format ... | [
0.584367036819458,
0.06224378943443298,
0.2504158914089203,
0.13542601466178894,
-0.02984447591006756,
-0.092258520424366,
-0.2784375548362732,
0.26527053117752075,
-0.024691663682460785,
-0.7964404821395874,
-0.041901733726263046,
0.259424090385437,
-0.2736453711986542,
-0.128420710563659... | |
data. When Print is pressed the server generates a PDF from the data it knows about, but knows nothing about the browser's background data. What I'd really like is to be able to provide the server with the browsers background image in some way!
Cheers,
Ro
I think I've worked out a way to do it.
1) When the user press... | [
0.35530638694763184,
-0.1783546805381775,
1.0242815017700195,
0.0357198603451252,
-0.04730357602238655,
-0.18669895827770233,
-0.2193429321050644,
0.0059882281348109245,
-0.11252611130475998,
-0.5166659951210022,
-0.17460881173610687,
0.7120822072029114,
-0.26930585503578186,
-0.1619116365... | |
a Real-World location (I have API for this)
6) As part of the print send up all the image URL's along with their real-world extents
7) Allow the server to re-request the Images and draw them into their appropriate locations. | [
0.3928219676017761,
0.17010197043418884,
0.8306214213371277,
0.15062148869037628,
0.2364901602268219,
0.05529427155852318,
0.1610230952501297,
-0.04613514617085457,
0.05094320699572563,
-0.6811870336532593,
-0.27958565950393677,
0.18837901949882507,
-0.09237660467624664,
0.0063366438262164... | |
First of all, what's the difference between:
> www.domain.com
and
> domain.com
Should I pay attention to this when I do the coding?
I would highly recommend to use relative paths.
This has many advantages, for instance:
* Paths are shorter
* If you want to move to a different domainname you don't have to check th... | [
0.5295780897140503,
-0.30792832374572754,
0.35126328468322754,
0.2287173569202423,
-0.21439309418201447,
-0.3282017409801483,
0.22674497961997986,
0.06364856660366058,
-0.23091289401054382,
-0.9164257049560547,
0.191599503159523,
0.2068043202161789,
-0.14827638864517212,
0.4596181213855743... | |
I have been throwing `ServletException`s in the past, when something/anything goes wrong in a Servlet, mostly just wrapping the exception in `ServletException`.
Now I am thinking it is actually better to not throw a `ServletException` but to respond with `response.sendError(sc)` and use the correct HTTP status codes.
... | [
0.18146444857120514,
0.13287045061588287,
0.11138249933719635,
-0.07665873318910599,
-0.4016866087913513,
-0.16149728000164032,
0.4022858738899231,
-0.08429045975208282,
-0.17647165060043335,
-0.4903663098812103,
-0.023000193759799004,
0.1946292221546173,
-0.12419314682483673,
0.2133450359... | |
database, not by humans.
I want to return the HTTP code *400 Bad Request* to the caller when the request information is invalid or missing. Throwing a `ServletException` causes the container to return *500 Internal Server Error*, which states there is something wrong with the server, not with the request.
Here is the... | [
0.33444496989250183,
-0.005946466699242592,
0.26846322417259216,
0.07590559124946594,
-0.15449345111846924,
-0.25712504982948303,
0.3540348410606384,
-0.46627750992774963,
-0.14560475945472717,
-0.46334391832351685,
0.14081664383411407,
0.4342547357082367,
-0.5627429485321045,
0.1976891309... | |
valid request.
} catch (RequestException e) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST, e.getMessage());
}
```
The message is returned to the caller as it would be with a `ServletException`. | [
-0.03409137204289436,
-0.2064475417137146,
0.6969507336616516,
-0.17581743001937866,
-0.18336071074008942,
-0.014848919585347176,
0.4231560528278351,
-0.32738757133483887,
-0.16278038918972015,
-0.28107985854148865,
-0.566543698310852,
0.4169066548347473,
-0.45797547698020935,
0.3196837007... | |
On Windows machines there are lots of third-party editors available to edit a binary file.
How can I edit a binary file on a Unix system?
You can also try [GHex](https://wiki.gnome.org/Apps/Ghex) 2 GNOME utilities. This give you the automated hex-to-ASCII on the side, as well as the various character/integer decodes a... | [
-0.1146257221698761,
0.18133987486362457,
0.20975752174854279,
0.15544576942920685,
-0.01857294701039791,
0.07073892652988434,
0.3115592300891876,
0.23817598819732666,
-0.5131333470344543,
-0.914480984210968,
-0.4111080467700958,
0.7069148421287537,
-0.4269178807735443,
-0.0599466748535633... | |
Does [`FileChannel#map`](http://java.sun.com/javase/6/docs/api/java/nio/channels/FileChannel.html#map(java.nio.channels.FileChannel.MapMode,%20long,%20long)) allocate all the memory needed for the resulting `ByteBuffer` immediately, or is it only allocated on-demand during reads from the buffer?
I just tried mapping a... | [
-0.12015476822853088,
-0.28604763746261597,
0.3043428063392639,
-0.11230731755495071,
-0.10754954069852829,
0.02193787693977356,
0.08349861204624176,
-0.17697204649448395,
-0.25672101974487305,
-0.4782301187515259,
0.08299627155065536,
0.3747766315937042,
-0.011275109834969044,
-0.08424501... | |
is never straightforward. The actual buffer used by `FileChannel.map` is not part of the Java heap. Indeed the memory might be shared with other processes. The file may not even be read from the disc until the pages are touched. | [
-0.006376994773745537,
-0.1874741166830063,
0.25004321336746216,
0.07308037579059601,
0.2660723626613617,
-0.37518495321273804,
0.12856754660606384,
0.0238176379352808,
-0.19402755796909332,
-0.5290985703468323,
-0.0657317042350769,
0.2804265022277832,
-0.03898022323846817,
0.0045969956554... | |
My servlet-based web-app sometimes fails to close Log4j log files when redeployed, leaking to file descriptor leakage and occassionally leading to servlet-contained dying from 'too many open files'.
I have a ContextListener, what should I put into its contextDestroyed() to tell log4j to shut down and release all resou... | [
0.12166815996170044,
0.24972215294837952,
0.37602195143699646,
0.009518865495920181,
0.013397036120295525,
-0.35260891914367676,
0.6223214268684387,
-0.039721522480249405,
-0.2941220998764038,
-0.7732558846473694,
-0.297807514667511,
0.5058301687240601,
-0.3705759346485138,
0.3124579191207... | |
using? | [
0.45752424001693726,
0.3711487352848053,
-0.25776538252830505,
0.07946512848138809,
-0.2342638373374939,
0.050532639026641846,
0.0036541970912367105,
-0.1186116635799408,
-0.2866685390472412,
-0.1385507583618164,
0.30274009704589844,
0.5237776041030884,
-0.311662495136261,
-0.0031736509408... | |
I have a `CMFCToolBar`-derived class and an insance thereof is the member of a `CDockablePane`-derived class.
I looked at the VisualStudioDemo sample to see how it's done and have this so far:
```
int CMyPane::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
// Removed all "return -1 on error" code for better readabilit... | [
0.3125612437725067,
0.09094367921352386,
0.9696849584579468,
-0.13162490725517273,
0.2413378655910492,
0.1978810876607895,
-0.010994860902428627,
-0.10532095283269882,
-0.1677522361278534,
-0.7320370078086853,
-0.18168272078037262,
0.6645621061325073,
-0.13781008124351501,
-0.0839518830180... | |
m_toolBar.CleanUpLockedImages();
m_toolBar.LoadBitmap(IDB_MY_TOOLBAR_24, 0, 0, TRUE /*Locked*/);
}
m_toolBar.SetPaneStyle(m_toolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
m_toolBar.SetPaneStyle(m_toolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | ... | [
-0.04281105473637581,
-0.2569582164287567,
0.8286895155906677,
-0.08428589254617691,
0.2676611840724945,
0.10494694858789444,
0.18753789365291595,
-0.5248392224311829,
-0.4589388370513916,
-0.6089590191841125,
-0.6086705327033997,
0.5416945219039917,
-0.4659135937690735,
0.2403845191001892... | |
m_toolBar.SetRouteCommandsViaFrame(FALSE);
}
return 0;
}
```
The high-color image (24bit) is loaded but the magenta mask (R255 G0 B255) is visible. I don't see how I can tell the toolbar to recognize the mask.
Is this even possible?
I don't know if this works every time but I use `RGB(192, 192, 192)` as t... | [
-0.015212220139801502,
0.030137453228235245,
0.8189325332641602,
-0.2579708993434906,
0.5080520510673523,
0.0012593414867296815,
0.5188849568367004,
-0.36858099699020386,
-0.46900004148483276,
-0.6642670035362244,
-0.3732775151729584,
0.8063327074050903,
-0.38429027795791626,
0.11540807038... | |
```
int somefunction(bool a)
{
try
{
if(a)
throw Error("msg");
return 2;
}
catch (Error const & error)
{
//do i need to return anything here??
//return -1;
}
}
```
You need to | [
0.2210734486579895,
0.21318021416664124,
-0.16892798244953156,
-0.3226187527179718,
0.19629527628421783,
-0.1975257694721222,
0.7428474426269531,
-0.1450396031141281,
0.00033073738450184464,
-0.4701869487762451,
-0.37557369470596313,
0.5065180659294128,
-0.4546073377132416,
0.0137139726430... | |
either return something or re-throw the exception (or throw a new one). You can rethrow the same exception by just using the keyword
```
throw
```
in the catch block with no exception or arguments afterwards. | [
0.2312973439693451,
-0.02957860380411148,
-0.18891534209251404,
0.04047452285885811,
-0.2677394151687622,
-0.13185472786426544,
0.3877275586128235,
-0.1828533411026001,
0.00575693603605032,
-0.27412545680999756,
-0.37749701738357544,
0.3056405782699585,
-0.05519767478108406,
0.099530756473... | |
I can't find anything definite using [my favourite tool](http://www.google.com), however I thought I would put it out here...
Is there a way, using the iPhone SDK, for an app to detect if the device is in a state of receiving power (charging, dock, etc.)?
I would like to be able to disable the idleTimer automatically... | [
0.3360496759414673,
-0.12655216455459595,
0.6132312417030334,
0.021382533013820648,
0.10092093050479889,
-0.30222636461257935,
0.11150290817022324,
-0.29958486557006836,
-0.20749634504318237,
-0.38790926337242126,
-0.1723112165927887,
0.8850154280662537,
-0.09315027296543121,
0.01160742808... | |
batteryState. | [
0.34263184666633606,
0.06264705210924149,
0.2236437052488327,
0.00526318047195673,
-0.14901749789714813,
-0.21245649456977844,
-0.11526340991258621,
-0.01720612309873104,
0.3050174415111542,
0.09001326560974121,
-0.029698774218559265,
0.627564549446106,
0.0482303686439991,
0.08028644323348... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.