text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
item
,value: item
,type: 'checkbox'
,checked:true
})
.click( function( event )
{ | [
-0.1987089216709137,
-0.29536157846450806,
0.40312421321868896,
-0.0900559052824974,
0.32087016105651855,
0.0754173994064331,
0.20287184417247772,
-0.2047722488641739,
-0.17542162537574768,
-0.2649058401584625,
-0.4182378947734833,
0.6284991502761841,
-0.5562258362770081,
0.260958999395370... | |
var cbox = $(this)[0];
alert( cbox.value );
} )
)
.append(
$(document.createElement('label')).attr({
'for': 'topicFilter' + '-' + item | [
0.2700539529323578,
-0.011902626603841782,
0.7328400015830994,
-0.3315778076648712,
0.14355964958667755,
0.12296028435230255,
0.40084490180015564,
-0.44043660163879395,
-0.32200634479522705,
-0.3130039870738983,
-0.4740137755870819,
0.5242624878883362,
-0.6042724251747131,
0.25223457813262... | |
})
.text( item )
)
)
} );
```
The problems I'm encountering are two-fold (there are in IE only)
* Checkboxes are added to the page, but their default checked state is unchecked, when I'm specifying 'true' for that value. (Testing with 'checked' for the value makes no difference)
* When `alert... | [
0.2249630093574524,
0.16671037673950195,
0.5786957144737244,
-0.25047793984413147,
0.21637265384197235,
-0.20832274854183197,
0.6092817187309265,
-0.11205039173364639,
-0.051311470568180084,
-0.7691219449043274,
-0.4520021975040436,
0.6747111678123474,
-0.45793280005455017,
0.0323185436427... | |
checkboxes, and to set their default "value" attribute. But I haven't yet found another way.
*Note: all of this code works fine in Firefox and Chrome.*
This is jQuery 1.3.1 testing with IE 7.0.5730.11
Internet Explorer doesn't like to let you change the checked value of an input that is not a part of the DOM. Try set... | [
0.2788505554199219,
-0.08412162214517593,
0.3314768075942993,
-0.1042693629860878,
-0.12828429043293,
-0.2079312950372696,
0.3782811164855957,
-0.02051502652466297,
-0.16554482281208038,
-0.7391559481620789,
0.12436071038246155,
0.6887952089309692,
-0.24920858442783356,
-0.2252520024776458... | |
I have a simple solution with the following projects as follows (base namespaces match the project name)...
MyCompany.MyProduct.BusinessLayer
MyCompany.MyProduct.Web.Service
MyCompany.MyProduct.Web.Site
I'm just trying to find a better name for BusinessLayer, I just don't really like it for some reason. So my... | [
0.6243830323219299,
0.24839727580547333,
0.5448054671287537,
-0.22232681512832642,
-0.06401731818914413,
-0.1831800490617752,
-0.010381976142525673,
0.2942093014717102,
-0.2338336855173111,
-0.735668957233429,
0.05081171169877052,
0.23063978552818298,
-0.15222080051898956,
0.41052097082138... | |
Using PHP, Perl, or Python (preferably PHP), I need a way to query an SVN database and find out the last revision number sent to SVN. I don't need anything other than that. It needs to be non-intensive (so I do it every 5 minutes as a cron job; SVN's performance should not be affected).
SVN is located on my Intranet, ... | [
0.32990679144859314,
0.2669689655303955,
0.6854053139686584,
-0.13283130526542664,
-0.28804707527160645,
-0.26421383023262024,
0.1837155818939209,
0.08844529092311859,
-0.2547576129436493,
-0.6972566843032837,
0.11818643659353256,
0.7293038368225098,
0.05640793219208717,
0.1729924380779266... | |
would also be helpful.
```php
<?php
$url = 'your repository here';
$output = `svn info $url`;
echo "<pre>$output</pre>";
?>
```
You can get the output in XML like so:
```php
$output = `svn info $url --xml`;
```
If there is an error then the output will be directed to stderr. To capture stderr in your o... | [
0.15444070100784302,
0.05834686756134033,
0.44928914308547974,
0.12352591007947922,
-0.30096399784088135,
-0.06027986481785774,
0.13926269114017487,
-0.23176829516887665,
-0.11531061679124832,
-0.5614562630653381,
-0.36937129497528076,
0.507068395614624,
-0.12240597605705261,
0.17130364477... | |
What are the best practices for optimizing a MySQL installation for best performance when handling somewhat larger tables (> 50k records with a total of around 100MB per table)? We are currently looking into rewriting DelphiFeeds.com (a news site for the Delphi programming community) and noticed that simple Update stat... | [
0.31909552216529846,
0.09824186563491821,
0.15542633831501007,
0.22676780819892883,
0.09238993376493454,
-0.09154439717531204,
0.4222886562347412,
-0.1638014018535614,
-0.3646365702152252,
-0.6968515515327454,
0.12945272028446198,
0.6092170476913452,
-0.06647244840860367,
-0.31658479571342... | |
of storage engines have? We are planning to go with InnoDB, but if MyISAM is recommended for performance reasons, we might use MyISAM.
The "best practice" is:
1. Measure performance, isolating the relevant subsystem as well as you can.
2. Identify the root cause of the bottleneck. Are you I/O bound? CPU bound? Memory ... | [
0.22219817340373993,
-0.015419409610331059,
0.40280237793922424,
0.2848322093486786,
0.09683358669281006,
-0.1158788725733757,
0.14819805324077606,
-0.1683412492275238,
-0.19855861365795135,
-0.6464641094207764,
-0.1098015233874321,
0.48114851117134094,
-0.20691978931427002,
-0.07825795561... | |
historical articles too. That's a hugely useful resource for performance-related wisdom. For example, you asked about InnoDB vs. MyISAM. Their conclusion: InnoDB has ~30% higher performance than MyISAM on average. Though there are also a few usage scenarios where MyISAM out-performs InnoDB.
* [InnoDB vs. MyISAM vs. Fa... | [
-0.07688087970018387,
-0.11341121047735214,
-0.014787848107516766,
0.30235564708709717,
-0.1365938037633896,
0.13664042949676514,
-0.16280286014080048,
0.05337516590952873,
-0.43973928689956665,
-0.6583430171012878,
0.07868452370166779,
0.5691221952438354,
0.19867700338363647,
-0.177158460... | |
you may have to get a third-party tool if your OS doesn't provide one.
Basically, whichever resource is pegged at 100% utilization/saturation is likely to be your bottleneck. If your CPU load is low but your I/O load is at its maximum for your hardware, then you are I/O bound.
That's just one data point, however. The... | [
0.11155840754508972,
0.0657065212726593,
0.32031285762786865,
0.39611342549324036,
0.24078881740570068,
-0.1605897694826126,
0.021365296095609665,
0.0037326535675674677,
-0.17817293107509613,
-0.6805803179740906,
-0.1938203126192093,
0.617608368396759,
-0.13624121248722076,
0.2009998857975... | |
to summarize in a StackOverflow post, and the fact that many books exist on the subject supports this. Keeping databases operating efficiently and making best use of the resources is a full-time job requiring specialized skills and constant study.
---
Jeff Atwood just wrote a nice blog article about finding bottlenec... | [
0.5267972946166992,
-0.06112493947148323,
-0.6386504769325256,
0.37403780221939087,
0.5225352644920349,
-0.294944167137146,
0.31430327892303467,
0.10137653350830078,
-0.2890843451023102,
-0.6890804171562195,
-0.04416307806968689,
0.5551905035972595,
0.031573306769132614,
-0.100138902664184... | |
I have three sections in my hypothetical UITableView. I'd like one section that is in editing mode. The rest of the sections to not be in editing mode. Is this possible at all?
This really shouldn't be a mystery, as it's spelled out clearly in the documentation. Simply use the datasource method
```
- (BOOL)tableView:(... | [
0.19404561817646027,
-0.03560888022184372,
0.7593771815299988,
0.13751426339149475,
-0.18696700036525726,
-0.16381089389324188,
0.18261462450027466,
-0.05317316949367523,
-0.10627417266368866,
-0.888290286064148,
0.06954319775104523,
0.43359506130218506,
-0.31830519437789917,
0.09360525757... | |
So here are the details (I am using C# BTW):
I receive a 32bpp image (JPEG compressed) from a server. At some point, I would like to use the Palette property of a bitmap to color over-saturated pixels (brightness > 240) red. To do so, I need to get the image into an indexed format.
I have tried converting the image ... | [
0.2594482898712158,
-0.09477847069501877,
0.5312976837158203,
-0.020407982170581818,
-0.35137462615966797,
-0.01179666817188263,
-0.005609596148133278,
-0.29028573632240295,
-0.1320086270570755,
-0.660916805267334,
-0.2131052017211914,
0.5510421395301819,
-0.2346651554107666,
0.05377882719... | |
is black due to information loss I assume
Bitmap indexed = new Bitmap(orig.Width, orig.Height, PixelFormat.Format8bppIndexed)
```
I am at a loss now. The data in this image is changed constantly by the user, so I don't want to manually set pixels that have a brightness > 240 if I can avoid it. If I can set the palett... | [
0.46487975120544434,
0.09175153821706772,
0.4937202036380768,
-0.02874603308737278,
0.044327255338430405,
-0.16847440600395203,
0.08104927837848663,
-0.2950761020183563,
-0.1503789871931076,
-0.8596031069755554,
0.16460998356342316,
0.7305083870887756,
-0.18070261180400848,
0.2527992129325... | |
slide at high resolution (pathology application). I write the interface to the actual scanner. We use a line-scan camera. To test the line rate of the camera, the user scans a very small portion and looks at the image.
The image is displayed next to a track bar. When the user moves the track bar (adjusting line rate)... | [
0.3899598717689514,
-0.008053731173276901,
0.9476580619812012,
0.13813960552215576,
-0.02133469469845295,
-0.003914372064173222,
-0.3849984407424927,
-0.33096057176589966,
0.07671861350536346,
-0.6921615600585938,
0.4038058817386627,
0.5936676263809204,
-0.23896321654319763,
0.242328479886... | |
matrix. This does not give me per pixel information, but the performance is very nice. I *could* use LockBits and some unsafe code here, but I would rather not rewrite it if possible. When the new image is created, I would like for all pixels with a brightness value of > 240 to be colored red. I was thinking that defin... | [
0.3842971920967102,
-0.048765793442726135,
0.6226416826248169,
-0.127967968583107,
-0.2885489761829376,
-0.08065624535083771,
0.14060090482234955,
-0.35905760526657104,
-0.295168399810791,
-1.102419376373291,
0.09677378088235855,
0.8703370094299316,
-0.3949567675590515,
-0.1172774657607078... | |
new ColorMap[someNum]
// add mappings
imageAttrs.SetRemapTable(maps);
```
Thanks for the help again, at least I learned something. | [
0.36684221029281616,
-0.1745111346244812,
0.32241684198379517,
0.0749514251947403,
-0.13246600329875946,
-0.4128853380680084,
0.06830485165119171,
0.2817734181880951,
-0.1411411315202713,
-0.9993352293968201,
0.029924863949418068,
0.740435004234314,
0.08035784959793091,
-0.0517030991613864... | |
I'm working on a project that uses MSTest for unit testing and I need to write some unit tests for a model class thats fairly tightly coupled to the data source. We maintain the source code for the database that the model classes are dependent on in a Database Project (.dbproj). What I was thinking of doing was writing... | [
0.43372151255607605,
0.29768767952919006,
-0.15600472688674927,
0.12255790084600449,
-0.05032990127801895,
0.024922089651226997,
0.17223487794399261,
-0.04955488443374634,
0.03791210427880287,
-0.6744470000267029,
0.2998206615447998,
0.4499863088130951,
-0.1845252960920334,
0.3482214808464... | |
it with known data.
I'm open to other suggestions if anyone has them.
What I'm trying to figure out how to do is run this Database Project from within code in my ClassInitialize method. I haven't been able to find any good examples of how to do something like that. Is this possible? If so, how? Anyone have a code sam... | [
0.5328502058982849,
0.19360333681106567,
-0.026619231328368187,
0.5263888239860535,
0.0458049401640892,
-0.06583961844444275,
0.2471715658903122,
0.005162132903933525,
-0.10100772976875305,
-0.5872800946235657,
0.2934328615665436,
0.6703606247901917,
-0.0794864296913147,
0.2828104496002197... | |
unit test your data layer you're going to be in for a world of pain. I suggest you skip it and try to flush out any data layer bugs during integration testing.
That said, if you're using LINQ to SQL, I ran across [this article](http://aabs.wordpress.com/2007/06/26/using-mock-objects-when-testing-linq-code/) the other... | [
0.6815144419670105,
0.1925506591796875,
0.027442272752523422,
0.1679629683494568,
-0.07191281020641327,
0.05695042386651039,
0.15202921628952026,
-0.2981458306312561,
0.04876803234219551,
-0.6560117602348328,
0.3877633810043335,
0.6290796399116516,
0.124278724193573,
0.07458136230707169,
... | |
I am using SQL Express 2008 as a backend for a web application, the problem is the web application is used during business hours so sometimes during lunch or break time when there is no users logged in for a 20 minute period SQL express will kick into idle mode and free its cache.
I am aware of this because it logs so... | [
-0.1826312392950058,
0.2678624093532562,
0.23872806131839752,
-0.0675787627696991,
-0.4618946313858032,
-0.2447059154510498,
0.5478843450546265,
-0.02419763244688511,
-0.12406264245510101,
-0.409964919090271,
0.39115917682647705,
0.14140550792217255,
-0.3131465017795563,
0.1313433200120926... | |
least widen the time window to longer than 20mins? Or is my only option to write a service that polls the db every 15mins to keep it spooled up ?
After reading articles like [this](http://blogs.msdn.com/sqlexpress/archive/2008/02/22/sql-express-behaviors-idle-time-resources-usage-auto-close-and-user-instances.aspx) it... | [
0.28387290239334106,
-0.08452315628528595,
0.511543333530426,
0.04426617920398712,
-0.13294899463653564,
-0.08395856618881226,
0.595931351184845,
-0.11049836128950119,
-0.08045507222414017,
-0.7243720889091492,
0.4348668158054352,
0.6089595556259155,
-0.031080007553100586,
-0.0990027636289... | |
This is a wheel that's been re-invented again and again over the years.
**The Problem: The user needs to input a Date/Time**
Basic considerations
* We want to make it as easy as possible for the user to enter the desired date/time
* Some applications call for historical dates, some applications call for future date... | [
0.07072019577026367,
-0.029938288033008575,
0.3115241229534149,
0.359436571598053,
0.2039434313774109,
-0.008815374225378036,
-0.011450582183897495,
0.2818487584590912,
-0.367387980222702,
-0.5970610976219177,
-0.10458315908908844,
0.38573598861694336,
-0.17381606996059418,
0.4485228955745... | |
validation
* Various ways of alerting the users about bad data
There are a panoply of ready-to-eat solutions about, but I'm looking for some more general information. Have there been any usability studies done on the various date-time-control approaches? Is there a "best" date-time control out there? Are there any wel... | [
0.08741892874240875,
0.13308483362197876,
0.657394528388977,
0.15946386754512787,
0.012851942330598831,
-0.18080759048461914,
0.12779253721237183,
0.006361531093716621,
-0.36729317903518677,
-0.13064031302928925,
0.25010091066360474,
0.21397505700588226,
0.4001789689064026,
0.0130677307024... | |
2012
* 21DEC2012
* December 21 2012
* 12/21/2012 (or 21/12/2012, pick one, perhaps depending on what country I'm using the software in)
* 12212012 (same parenthetical fragment as above)
* Etc.
Whatever you decide to do to solve the localization issue, make sure it's obvious what you expect. Give me an example, or a te... | [
0.0522218756377697,
0.32468312978744507,
0.3460456132888794,
-0.019252141937613487,
0.038465507328510284,
-0.1401422768831253,
0.4695098102092743,
0.20920997858047485,
-0.4264093041419983,
-0.6978532075881958,
-0.38177284598350525,
-0.04424821585416794,
0.210160031914711,
0.212713658809661... | |
a good pattern to use when I don't know what the options are, but if it's something I'm very familiar with, like my birth date, then pull-down menus are a hassle.
Now, WRT time inputs (Big pet peeve), don't assume that I meant 3 am. If I enter 3 for the time, assume I meant 3 pm. Make me do extra work to schedule some... | [
0.5240263938903809,
-0.028152156621217728,
0.3035081923007965,
-0.12078849226236343,
0.21481238305568695,
-0.10763587802648544,
0.7829810380935669,
0.24595028162002563,
-0.4612104594707489,
-0.6221824884414673,
-0.06388594955205917,
0.26864513754844666,
-0.2166697382926941,
0.0183845516294... | |
my event invitation list emails and says "You moron, you scheduled our D&D Meetup for 3 am!" | [
0.6329580545425415,
0.17942966520786285,
0.36030733585357666,
-0.07682987302541733,
0.267943412065506,
-0.6398773789405823,
0.348843514919281,
0.3105315864086151,
-0.15615756809711456,
-0.2833542823791504,
-0.22975113987922668,
0.2234649956226349,
-0.13829566538333893,
0.1108856350183487,
... | |
I have an ASP.NET application using Forms Authentication. When the user clicks the Sign Out button on the page it runs the following code.
```
FormsAuthentication.SignOut();
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
```
However the... | [
0.370679646730423,
0.28109100461006165,
0.6485990881919861,
-0.22189052402973175,
0.020128432661294937,
-0.2385742962360382,
0.4964989125728607,
-0.34054675698280334,
-0.2110854983329773,
-0.7231077551841736,
-0.11060617864131927,
0.10800283402204514,
-0.18260398507118225,
0.01359725464135... | |
prompted to log in again with going back?
```
Response.Cache.SetCacheability(HttpCacheability.NoCache);
``` | [
0.27683770656585693,
-0.04361493140459061,
0.2846219837665558,
0.12992899119853973,
-0.008265907876193523,
-0.07243480533361435,
0.3567725718021393,
0.15981878340244293,
-0.14813213050365448,
-0.5668306946754456,
-0.13129502534866333,
0.45054805278778076,
-0.18161427974700928,
0.1457085013... | |
A. What does this do?
```
require ("./file.php");
```
B. in comparison to this?
```
require ("file.php");
```
---
(Its **not** up-one-directory.. which would be)
```
require ("../file.php");
```
`./` is the *current* directory. It is largely the same as just `file.php`, but in many cases (this one included) it... | [
0.3788912296295166,
0.2686024010181427,
0.11187110096216202,
-0.3167516589164734,
0.05643662065267563,
-0.15768295526504517,
0.20712831616401672,
-0.49904727935791016,
-0.2604527771472931,
-0.4467715322971344,
-0.1668178141117096,
0.4876832962036133,
-0.3864242136478424,
-0.137648195028305... | |
and there is include "b.php" in that file, b.php is first looked in /www/libraries/ and then in /www/include/. If filename begins with ./ or ../, it is looked only in the current working directory. | [
0.43841636180877686,
0.2601936459541321,
0.4604550004005432,
-0.15130601823329926,
0.23453928530216217,
-0.20139668881893158,
-0.08801545947790146,
-0.1252104640007019,
-0.3425878882408142,
-0.34991124272346497,
-0.2589370012283325,
0.10969600826501846,
-0.17147651314735413,
0.183108285069... | |
I am trying to learn how to specify class constructors in Java. I am starting to understand that they specify the types of instance variables of objects made from that class. They also can be used to set the instance variable initial values. The follow example is from the Java tutorial on Sun's website:
```
public Bic... | [
0.3376200497150421,
-0.07169286906719208,
-0.003365950658917427,
0.11393769085407257,
0.073032446205616,
0.06982710212469101,
-0.07609318941831589,
-0.20641203224658966,
-0.4337395429611206,
-0.6690294146537781,
0.4817923605442047,
0.9077315330505371,
0.07061686366796494,
-0.47163996100425... | |
int startGear) or are gear, cadence and speed the names of the variables?
What is the difference between (int startCadence, int startSpeed, int startGear) and gear, cadence and speed?
In the unlikely event that my instructor or any administrator from Salt Lake Community College ever comes across this question, let me... | [
0.3118972182273865,
0.17903564870357513,
0.06064620241522789,
-0.08578170835971832,
-0.198772594332695,
0.003961388953030109,
0.32847654819488525,
-0.018851889297366142,
0.06756219267845154,
-0.38728928565979004,
0.10491450130939484,
0.5127018690109253,
0.10997751355171204,
-0.311373829841... | |
work. I use the answers provided here as a general aid in my understanding. I do all my own work and do not copy work provided by people answering my question.
The constructors can appear anywhere in the code for the class. However, by convention, most people put them before any other functions that aren't constructors... | [
0.4830951690673828,
-0.21753205358982086,
0.10598122328519821,
0.18065400421619415,
0.04984426498413086,
0.5017041563987732,
-0.02193274535238743,
-0.06287972629070282,
-0.2548220455646515,
-0.3387134373188019,
0.01621193066239357,
0.44759637117385864,
0.08694285899400711,
0.05098647624254... | |
methods. However the definition isn't shown in your code snippet. The full class would look mroe like:
```
class Bicycle
{
// class-level variables
private int gear;
private int cadence;
private int speed;
// constructor
public Bicycle(int startCadence, int startSpeed, int startGear) {
... | [
0.2570381164550781,
-0.3730144798755646,
0.2423563301563263,
0.2873503863811493,
0.1357087343931198,
0.13332977890968323,
0.044077400118112564,
-0.5842768549919128,
-0.4890938103199005,
-0.546262800693512,
0.19017910957336426,
0.9335489273071289,
-0.24075481295585632,
-0.14555421471595764,... | |
constructor)
public void ShiftUp() {
gear = gear + 1; // notice the 'gear' variable is available here too.
}
}
```
Hope that helps! | [
0.43575990200042725,
-0.19336232542991638,
0.08793856203556061,
-0.09886940568685532,
0.3346155881881714,
0.18583889305591583,
0.2065957933664322,
-0.2360132783651352,
0.07380667328834534,
-0.488436758518219,
-0.2720866799354553,
0.8317921161651611,
-0.28321123123168945,
-0.074387624859809... | |
When I create a test using MS Visual Studio's builtin unit test wizard it creates code with lines like the below:
```
double number = 0F;
```
In C# "F" stands for float, case-independent, and "D" for double. Using "F" suffix instead of "D" leads to precision lost.
If it's a bug, where can I report it to Microsoft?
... | [
0.6688622236251831,
0.285751074552536,
-0.0676501914858818,
-0.0062865098007023335,
-0.14241357147693634,
-0.0050557516515254974,
0.34274911880493164,
-0.05646125599741936,
0.01348643284291029,
-0.6264275908470154,
0.08983103930950165,
0.3750171959400177,
-0.2585908770561218,
0.05177921056... | |
To do some load testing, for my own curiosity, on my server I ran:
```
ab -kc 50 -t 200 http://localhost/index.php
```
This opens up 50 keep-alive connections for 200 seconds and just slams my server with requests for index.php
In my results, I get:
```
Concurrency Level: 50
Time taken for tests: 200.007 se... | [
0.08186323940753937,
-0.0073895505629479885,
0.2969244420528412,
0.1997922658920288,
0.1224251314997673,
0.24624313414096832,
0.6833868026733398,
-0.4808959662914276,
-0.36819419264793396,
-0.2983675003051758,
-0.024404751136898994,
0.40406423807144165,
-0.06769163906574249,
0.048523142933... | |
1948268960 bytes
HTML transferred: 1938001392 bytes
Requests per second: 165.52 [#/sec] (mean)
Time per request: 302.071 [ms] (mean)
Time per request: 6.041 [ms] (mean, across all concurrent requests)
Transfer rate: 9512.69 [Kbytes/sec] received
```
Note the 32951 "failed" requests. I ca... | [
-0.1667696237564087,
-0.02765013836324215,
0.3139725625514984,
0.31569570302963257,
-0.05306689813733101,
0.49134722352027893,
0.7335112690925598,
-0.624689519405365,
-0.4057437777519226,
-0.579849898815155,
-0.14488159120082855,
0.39320316910743713,
-0.04516590014100075,
0.260335206985473... | |
.5 instead of the usual .02. However I never once had a failed request.
So why is AB reporting that half of the connections fail? And what does "Length: " mean in that context?
Nevermind. The "length failure" merely indicates that about half the time the length of the response was different.
Since the contents are dy... | [
0.09670799225568771,
-0.08584785461425781,
0.10318688303232193,
0.19922314584255219,
-0.25246965885162354,
-0.23519186675548553,
0.6422423124313354,
0.14405657351016998,
-0.48215973377227783,
-0.14623621106147766,
-0.05947180464863777,
0.288331001996994,
-0.0006047867354936898,
0.486895382... | |
Has anyone had any experiences developing large Java applications using GNU gettext for internationalization? I find that I really like having the English text in my source code, but I want to make sure that what I'm doing is practical for the relatively large software project I am part of.
If you have experience with... | [
0.38322845101356506,
0.14919260144233704,
-0.040329936891794205,
0.01470778975635767,
-0.32429102063179016,
-0.3120776116847992,
0.20195046067237854,
0.1590617299079895,
-0.3948372006416321,
-0.6093292832374573,
0.06803812086582184,
0.40443453192710876,
-0.1115693598985672,
-0.253488212823... | |
Windows would be great.
The [JSOM](http://josm.openstreetmap.de/) open source OpenStreetMap Java editor project is using the Gettext library to handle all its translations and it is working out very well as people are able to use a variate of translation tools (like KBabel, poedit, launchpad...) to work with the po fil... | [
0.07712721079587936,
0.007041922304779291,
0.21608693897724152,
0.10240423679351807,
-0.30936938524246216,
-0.2013515830039978,
0.09340789914131165,
0.13195092976093292,
-0.2142760008573532,
-0.8925560712814331,
-0.2792435884475708,
0.5917970538139343,
-0.16172324120998383,
-0.273228943347... | |
I have a gridview that is databound in the code-behind using a stored procedure. I am handling the Paging event in the code as well, but whenever I click on a page number, I keep getting the empty data template instead of more rows. Any suggestions?
EDIT: I am re-binding the data source of the gv after I change the pa... | [
0.03070325218141079,
-0.19788509607315063,
0.6577240228652954,
-0.07292500883340836,
-0.31434860825538635,
0.022697649896144867,
-0.0029304451309144497,
-0.30468326807022095,
-0.14900383353233337,
-0.712202787399292,
-0.25216519832611084,
0.4649927616119385,
-0.1356576830148697,
0.30030980... | |
Dim conn As New SqlConnection(WebConfigurationManager.ConnectionStrings("Conn").ConnectionString)
Dim cmd As New SqlCommand()
Dim da As New SqlDataAdapter
Dim ds As New DataSet
If strProjectFormID <> "Select" Then
Try
Using conn
conn.Open()
With cmd | [
-0.17779183387756348,
-0.5578127503395081,
0.6253266930580139,
0.02983432076871395,
-0.43074333667755127,
-0.03736250475049019,
0.32495787739753723,
-0.4460255801677704,
-0.22361813485622406,
-0.46839413046836853,
-0.24292200803756714,
0.4797927737236023,
-0.3695838153362274,
0.08059552311... | |
.Connection = conn
.CommandType = CommandType.StoredProcedure
.CommandText = "sp_GetAllFormData"
.Parameters.AddWithValue("@projectFormID", strProjectFormID)
End With | [
0.04967425391077995,
-0.4842321574687958,
0.8280598521232605,
-0.006552563514560461,
-0.019272571429610252,
0.06295941025018692,
0.29376742243766785,
-0.3632763624191284,
-0.27932560443878174,
-0.5563637614250183,
-0.2861662209033966,
0.4074160158634186,
-0.20915862917900085,
0.21510152518... | |
da.SelectCommand = cmd
da.Fill(ds)
Me.gvAllSentData.DataSource = ds.Tables(0)
Me.gvAllSentData.DataBind()
Me.gvAllSentData.Visible = True
End Using | [
-0.34311792254447937,
-0.44899865984916687,
0.7170221209526062,
-0.08137856423854828,
-0.22731031477451324,
0.13466805219650269,
0.28684014081954956,
-0.18400946259498596,
-0.14301444590091705,
-0.48511770367622375,
-0.31227993965148926,
0.31017112731933594,
-0.24237141013145447,
0.1322410... | |
Catch sqlEx As SqlException
Dim newError As New ErrorLogger(Me.Page.Title, sqlEx.Message, Session("UserName"))
newError.LogError()
Trace.Write(sqlEx.Message)
Me.lblBadFeedback.Visible = True
Me.lblBadFeedback.Text = "We're sorry - an error has occurred. It h... | [
0.3174932599067688,
-0.10214048624038696,
0.6138025522232056,
-0.06661087274551392,
-0.12521716952323914,
-0.04212777689099312,
0.36236920952796936,
-0.029816659167408943,
-0.2904248535633087,
-0.3353310823440552,
0.0019717589020729065,
0.22058124840259552,
-0.2214067578315735,
0.328929066... | |
Catch ex As Exception
Dim newError As New ErrorLogger(Me.Page.Title, ex.Message, Session("UserName"))
newError.LogError()
Trace.Write(ex.Message)
Me.lblBadFeedback.Visible = True
Me.lblBadFeedback.Text = "We're sorry - an error has occurred. It has been logg... | [
0.2729140520095825,
-0.08266814053058624,
0.7006382346153259,
-0.19671012461185455,
0.08541891723871231,
0.00281928270123899,
0.529232382774353,
-0.05536782369017601,
-0.3898545205593109,
-0.3733457922935486,
-0.18775969743728638,
0.40637314319610596,
-0.19363544881343842,
0.12954986095428... | |
End Try
Else
Me.gvAllSentData.DataSource = Nothing
Me.gvAllSentData.Visible = False
End If
End Sub
Protected Sub gvAllSentData_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gvAllSentData.PageIndexChanging
Me.gvAllSentData.Page... | [
-0.18357758224010468,
0.13288429379463196,
0.7900688648223877,
-0.09556814283132553,
-0.01933431625366211,
-0.07058512419462204,
0.6897169947624207,
-0.3110074996948242,
0.008563854731619358,
-0.5642563700675964,
-0.4926871955394745,
0.4546896517276764,
-0.3429718315601349,
0.3123099207878... | |
I want to increase the request timeout for a specific controller action in my application. I know I can do it in the web.config for the entire application, but I'd rather change it on just this one action.
Web.config example:
```
<system.web>
<httpRuntime executionTimeout="1000" />
</system.web>
```
How do I do ... | [
0.17296628654003143,
-0.4839194715023041,
0.6285282969474792,
0.21502001583576202,
0.2992134094238281,
0.08524943143129349,
0.2734515070915222,
-0.36299753189086914,
-0.15141552686691284,
-0.8347999453544617,
0.2852032482624054,
0.5583488345146179,
0.07095962017774582,
-0.03366352617740631... | |
What is the best way to turn strings like "red", "green", "yellow", "aliceblue", etc... into the actual System.Drawing.Color value?
I was looking at reflection and something about that didn't seem right.
You can use Color.FromName() | [
0.00476539321243763,
-0.4820428788661957,
0.1971903145313263,
0.10081367939710617,
-0.03736558184027672,
0.1136990487575531,
0.10694196820259094,
-0.10345546156167984,
-0.11850027740001678,
-0.8951191902160645,
0.025964053347706795,
0.3541688024997711,
-0.2785983979701996,
0.02124519087374... | |
I'm trying to write a migration that adds a LONGBLOB column to a table in a MySQL database. I'd like to use LONGBLOB instead of BLOB so that I can store more data in the binary column. The problem is that it adds a BLOB column even though I specify a larger size.
Here's the line I'm using to add the column:
```
add_c... | [
0.055402468889951706,
0.20081667602062225,
0.49173465371131897,
-0.22894513607025146,
-0.1294177770614624,
0.22720341384410858,
0.016948672011494637,
-0.3275314271450043,
-0.29801684617996216,
-0.5915637612342834,
0.012019499205052853,
0.42689070105552673,
-0.49831220507621765,
0.208077043... | |
:data, :binary, :limit => 10.megabyte
end
end
``` | [
-0.2191638946533203,
0.23772859573364258,
0.4827080965042114,
0.12388943880796432,
0.20477734506130219,
-0.09216760843992233,
0.059625837951898575,
-0.03932113200426102,
-0.1527080237865448,
-0.16989874839782715,
-0.4278940260410309,
0.35750141739845276,
-0.05072931945323944,
0.48497477173... | |
I have a "searchable pdf" aka 'image files with invisible but selectable text'. (When this file is opened in Acrobat, I am alerted "You are viewing this document in PDF/A mode.")
I need to extract the bounding rectangle of each word in this document. Any suggested toolkits and the methods for accessing the "invisi-tex... | [
-0.15186463296413422,
0.17038527131080627,
0.5851378440856934,
-0.000608554226346314,
-0.07671311497688293,
-0.14564457535743713,
0.1125321090221405,
-0.2978929579257965,
-0.0716346874833107,
-0.7170466780662537,
-0.3092636168003082,
0.6401481032371521,
-0.27543914318084717,
0.005796439945... | |
I am trying to use cywin to get some linux code building on a win32 machine.
I get the following VS.net 2003 error in ym compiler:
"c:\cygwin\usr\include\sys\_types.h(15): error C2144: syntax error : '\_\_int64' should be preceded by ';'
"
and
c:\cygwin\usr\include\sys\_types.h(15): error C2501: '**extension**' : ... | [
0.01331227459013462,
0.5099249482154846,
0.13526102900505066,
-0.095971018075943,
0.09654355049133301,
-0.20963720977306366,
0.3952196538448334,
0.2463483363389969,
-0.040982358157634735,
-0.7662516236305237,
0.11139164865016937,
0.7052500247955322,
-0.29297882318496704,
0.2418166100978851... | |
it looks like)
thanks,
tim
EDIT:
the simple workaround I have chosen as the answer - though I do understand that is not as complete or as desirable as using gcc to compile...
This is a quick and dirty compilation so that I can use my familiar tools before trying to integrate with linux machines. (oh the joys of cros... | [
0.11771806329488754,
-0.09607727825641632,
0.24505920708179474,
0.20565997064113617,
-0.09389566630125046,
-0.20663151144981384,
0.2742340862751007,
0.021104559302330017,
-0.1401640623807907,
-0.5431185960769653,
-0.013646764680743217,
0.7834815382957458,
-0.18310916423797607,
-0.153252765... | |
sure that you header search path is defined correctly, etc. | [
0.5561712980270386,
-0.06427253037691116,
0.0600137934088707,
0.2126072645187378,
0.17769300937652588,
-0.6633397936820984,
0.25233373045921326,
0.17034903168678284,
-0.11876600980758667,
-0.5443558692932129,
0.05087306350469589,
0.7404796481132507,
-0.13709856569766998,
-0.342401981353759... | |
I have inherited Stream class, in which I don't know how to implement Read() function properly, so I won't end up with a lot of nested ifs and hard to debug code. The point is that reading from source of this stream returns constant sized buffer (e.g. not changeable), but Read() function accepts different buffer sizes.... | [
0.060061000287532806,
-0.2365761250257492,
0.16369430720806122,
0.1543290615081787,
-0.017342763021588326,
0.06310117989778519,
0.2732921242713928,
0.14798276126384735,
-0.047076065093278885,
-0.5841357111930847,
0.2312244176864624,
0.6549931764602661,
-0.32215264439582825,
0.2444367557764... | |
mechanism to cache - a MemoryStream that you fill and empty would be a reasonable choice. For example (completely untested):
```
MemoryStream localBuffer = new MemoryStream();
bool ReadNextChunk()
{
// clear
localBuffer.Position = 0;
localBuffer.SetLength(0);
// get data
byte[] chunk = null; // TOD... | [
-0.04431896656751633,
-0.1642453670501709,
0.393023282289505,
-0.03362242504954338,
0.27596309781074524,
-0.10184448212385178,
0.39106127619743347,
-0.3177708089351654,
-0.08175046741962433,
-0.501617968082428,
-0.194687619805336,
0.7376996874809265,
-0.2838200330734253,
0.3384330570697784... | |
int bytes;
if ((bytes = localBuffer.Read(buffer, offset, count)) > 0) return bytes;
if (!ReadNextChunk()) return 0;
return localBuffer.Read(buffer, offset, count);
}
``` | [
-0.17917518317699432,
-0.11886435002088547,
0.35181570053100586,
-0.19245226681232452,
0.2221941500902176,
0.07733619213104248,
0.239364355802536,
0.0694536417722702,
-0.1428251713514328,
-0.4806498885154724,
-0.4754835069179535,
0.6298186182975769,
-0.12452877312898636,
0.2344471663236618... | |
I have an ASP.NET web page with a databound RadioButtonList. I do not know how many radio buttons will be rendered at design time. I need to determine the SelectedValue on the client via JavaScript. I've tried the following without much luck:
```
var reasonCode = document.getElementById("RadioButtonList1");
var answer... | [
0.31787577271461487,
0.2507893741130829,
0.47224685549736023,
0.03764493018388748,
0.0720626711845398,
-0.2523505985736847,
0.5750402808189392,
-0.6472164988517761,
-0.05091455951333046,
-0.6881242990493774,
-0.055664870887994766,
1.0426383018493652,
-0.42843225598335266,
-0.07498496025800... | |
selected;
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].checked) {
selected = inputs[i];
break;
}
}
if (selected) {
alert(selected.value);
}
``` | [
0.2564450204372406,
-0.5301117897033691,
-0.15215182304382324,
-0.19265002012252808,
0.24777454137802124,
0.03352862596511841,
0.0642504021525383,
-0.47609958052635193,
-0.14578668773174286,
-0.4435470998287201,
-0.3942992091178894,
0.4345461130142212,
-0.488314151763916,
0.203081309795379... | |
Am I required to install Visual Studio 2008 in order to build a bootstrapper for my msi installer?
I don't have VS2008 installed on my build server, and I'd rather not install it just to generate this one bootstrapper, but it appears that the required bootstrapper files (setup.bin, the Microsoft SDKs folder, etc) are ... | [
0.4901566207408905,
0.08960875123739243,
0.3589135408401489,
-0.053823646157979965,
-0.20592100918293,
-0.11995726823806763,
0.20991143584251404,
-0.5359848141670227,
-0.07253580540418625,
-0.5301586389541626,
0.011808213777840137,
0.5867515802383423,
-0.1348210573196411,
-0.04756725579500... | |
I'd like to know what people's best practices are for removing unused code. Personally I'm a fan of deleting (not just commenting) anything that's not currently being used. But I'm unsure of how far to go.
Take this as an example (although I'm interested in general discussion). In my project I have a dozen or so UserC... | [
0.5094932913780212,
0.15992531180381775,
-0.17403599619865417,
0.04687531292438507,
0.1066930964589119,
0.12998376786708832,
0.29646986722946167,
0.07983622699975967,
-0.4596168100833893,
-0.6063954830169678,
0.11584025621414185,
0.41174671053886414,
-0.07691194117069244,
0.099865660071372... | |
the code because we're not using it at the moment, and the less code there is the easier it is to read? The problem with this is, how do future developers know that this work has already been done?
* Or should I keep it there, so another developer can find it easily if they need to use it later (they're not going to th... | [
0.5632437467575073,
0.1755964308977127,
0.28119826316833496,
0.2457410991191864,
0.1791977733373642,
-0.2535373270511627,
0.39632925391197205,
0.17984944581985474,
-0.393035888671875,
-0.588971734046936,
-0.242060586810112,
0.6108475923538208,
-0.17367538809776306,
0.05965333431959152,
-... | |
goes without saying (or I thought it would) that we're using source control.
The first thing to remember is **all your code should be in source control**.
With that in mind, of course you want to delete obsolete code rather than just comment it out. Commented code blocks of any length are *dangerous*, for at least two... | [
0.47048860788345337,
0.2969396412372589,
-0.03730025514960289,
0.14431655406951904,
-0.10303261131048203,
-0.31875601410865784,
0.6020158529281616,
0.16352395713329315,
-0.12789976596832275,
-0.43198341131210327,
-0.18073226511478424,
0.6393208503723145,
-0.2532126307487488,
0.111297801136... | |
block.
The deleted code is still available if you really need it, but it's no longer cluttering up your working copies. If you're *really* concerned about discoverability for the old code you can leave a comment indicating code was removed and the revision number you need to find it. At one line, that's a lot better t... | [
0.3935069441795349,
0.02546827681362629,
0.21988022327423096,
0.19683824479579926,
0.10886405408382416,
-0.28387823700904846,
0.32817962765693665,
0.4277496337890625,
-0.5581486225128174,
-0.46587666869163513,
-0.29248958826065063,
0.08995535969734192,
-0.14704574644565582,
0.4001528620719... | |
In Python, I've seen the recommendation to use holding or wrapping to extend the functionality of an object or class, rather than inheritance. In particular, I think that Alex Martelli spoke about this in his [Python Design Patterns](http://www.lecturefox.com/blog/python-design-patterns-by-alex-martelli) talk. I've see... | [
0.29519736766815186,
-0.03349775820970535,
-0.24880298972129822,
-0.08025864511728287,
-0.19497160613536835,
-0.2009216994047165,
0.06001603230834007,
-0.28665077686309814,
-0.31011855602264404,
-0.44763830304145813,
-0.04951835796236992,
0.43988779187202454,
-0.6375781297683716,
0.1449922... | |
In some sense, I need something for class instances analogous to signature-preserving function decorators (e.g., [simple\_decorator](http://wiki.python.org/moin/PythonDecoratorLibrary) or Michele Simionato's [decorator](http://pypi.python.org/pypi/decorator)).
A qualification: I'm not asserting that all `isinstance` u... | [
0.15156327188014984,
0.11643843352794647,
-0.08996331691741943,
-0.011364961043000221,
-0.12141712754964828,
0.04794143885374069,
0.0870991051197052,
-0.19029909372329712,
-0.2342991977930069,
-0.4132651686668396,
-0.005683827213943005,
0.6719353795051575,
-0.39284607768058777,
-0.00599384... | |
sake of the example, assume we want to be able to instantiate Foo objects that log every function call, or don't---think AOP. Further, we want to do this without modifying the Foo class/source in any way (e.g., we may actually be implementing a generic factory that can add logging ability to any class instance on the f... | [
0.38929298520088196,
0.05026013404130936,
0.1036396473646164,
-0.2168210744857788,
0.005824677646160126,
0.23462270200252533,
0.150645449757576,
-0.3176552653312683,
-0.23211857676506042,
-0.48534274101257324,
0.08817432820796967,
0.7592470049858093,
-0.5346724390983582,
-0.259823083877563... | |
def __getattr__(self, name):
attr = getattr(self.wrapped, name)
if not callable(attr):
return attr
else:
def fun(*args, **kwargs):
print 'Calling ', name
attr(*args, **kwargs) | [
-0.07314980030059814,
-0.08383473753929138,
0.3523179590702057,
-0.33856794238090515,
-0.1833862066268921,
0.08426661789417267,
0.548474907875061,
-0.3854247033596039,
-0.2657006084918976,
-0.02625562995672226,
-0.3454432189464569,
0.8862179517745972,
-0.4139918386936188,
-0.15535670518875... | |
print 'Called ', name
return fun
class FooFactory(object):
def get_foo(with_logging = False):
if not with_logging:
return Foo()
else:
return LogWrapped(Foo())
foo_fact = FooFactory()
my_foo = foo_fact.get_foo(True)
isinstance(my_foo, Foo) # False!
```
There ar... | [
0.5937437415122986,
-0.0639043003320694,
0.20323608815670013,
0.031182363629341125,
0.08788348734378815,
-0.26754599809646606,
0.7026410102844238,
-0.34138932824134827,
-0.17447546124458313,
-0.19822955131530762,
-0.3253220021724701,
0.7687823176383972,
-0.6104558110237122,
-0.013304080814... | |
this way (use decorators instead, etc.) but keep in mind:
* We don't want to touch the Foo class. Assume we're writing framework code that could be used by clients we don't know about yet.
* The point is to return an object that is essentially a Foo, but with added functionality. It should appear to be a Foo---as much... | [
0.2372390180826187,
0.17327965795993805,
0.04357002675533295,
-0.17151278257369995,
-0.18980641663074493,
-0.12989836931228638,
0.30636993050575256,
-0.052174415439367294,
-0.22027577459812164,
-0.6790490746498108,
-0.04840940609574318,
0.7268619537353516,
-0.38745835423469543,
0.003038016... | |
why not follow this route? If you cannot change the library then it is probably best to stay consistend with it.
I also think that there are legitimate uses for `isinstance`, and with the introduction of [abstract base classes](http://www.python.org/dev/peps/pep-3119/) in 2.6 this has been officially acknowledged. The... | [
0.10048741847276688,
-0.10224006325006485,
0.16388776898384094,
0.11066757142543793,
-0.06361987441778183,
-0.28782084584236145,
0.21854354441165924,
-0.15066303312778473,
-0.2797861695289612,
-0.7018733024597168,
0.09906231611967087,
0.7291364669799805,
-0.4005444645881653,
-0.04984621331... | |
then calls the original method defined in the original class. This seems to be the only option which neither modifies the original class nor defines new classes.
If you can modify the class at runtime there are many options:
* Use a runtime mixin, i.e. just add a class to the `__base__` attribute of your class. But t... | [
0.2956821024417877,
-0.29020652174949646,
0.02909974940121174,
0.019193699583411217,
0.05425620079040527,
-0.06332036107778549,
0.2709246873855591,
-0.1728210598230362,
-0.1658511757850647,
-0.6769837141036987,
-0.05549440160393715,
0.5092397332191467,
-0.48183003067970276,
0.1603333503007... | |
But I would still consider the alternative of creating a `LogFoo` or chosing an altogether different solution for something specific like logging. | [
0.3900340497493744,
0.09732348471879959,
-0.03255870193243027,
0.21693173050880432,
0.023193569853901863,
-0.12319227308034897,
-0.1325472891330719,
0.35157614946365356,
-0.4641633927822113,
-0.07200030237436295,
-0.0038937455974519253,
0.3349382281303406,
-0.14956146478652954,
-0.03874926... | |
In the example below, can anyone tell me how to make "slow response when clicked" respond more quickly without modifying appendContent()? I'm wondering if there's a way to place cheap operations before more expensive ones, and make sure the cheap ones actually get carried out quickly.
```
<div id="draw">slow response ... | [
-0.07581416517496109,
-0.2402259260416031,
0.7707889080047607,
-0.06883005052804947,
0.09862633794546127,
0.10430186986923218,
0.35460934042930603,
-0.4813607335090637,
-0.1916162371635437,
-0.6468456387519836,
-0.1562412679195404,
0.5741860270500183,
-0.3330070376396179,
-0.15538214147090... | |
= function(){
clickLink.style.color = "red";
for (var i = 0; i < 1500; i++){
appendContent();
}
};
</script>
```
The mechanism for feedback should be different for the duration the user has to wait. Less than 0.1 seconds and a user will not notice.
Between 1 and 10 se... | [
0.4667213559150696,
-0.4305012822151184,
0.5261685848236084,
-0.1922461837530136,
-0.0036462205462157726,
0.3090536892414093,
0.2983584403991699,
-0.2270602434873581,
-0.11283931881189346,
-0.3791404962539673,
-0.14045897126197815,
0.37883317470550537,
0.02310757525265217,
-0.0985680669546... | |
gif of some sort that indicates your app is processing. See <http://www.ajaxload.info/>
I use a div with an ID "processing" and style it with a spinner and use the following jquery code to show and hide it before and after the process.
```
function showProcessing(){
$("#processing").fadeIn("fast");
}
function hi... | [
0.2099486142396927,
-0.12884123623371124,
0.7777754068374634,
-0.28094416856765747,
-0.30541089177131653,
0.1756388247013092,
0.08924903720617294,
-0.39141473174095154,
-0.18146662414073944,
-0.7394766211509705,
-0.11046036332845688,
0.49390605092048645,
-0.28402286767959595,
-0.2638457417... | |
execute a separate thread before getting hung up in a loop. The timeout may need to be adjusted depending on the browser. Check out Neil Mix's [Threading in JavaScript 1.7](http://www.neilmix.com/2007/02/07/threading-in-javascript-17/) if you need to relinquish control in a more generic manner.
```
function startA... | [
0.16737745702266693,
-0.2823054790496826,
0.450035035610199,
-0.24595661461353302,
0.006249671336263418,
-0.010374922305345535,
0.5138700008392334,
-0.46187007427215576,
-0.2661561965942383,
-0.2903575003147125,
-0.27424395084381104,
0.31611090898513794,
-0.6877609491348267,
0.273094624280... | |
}
}
clickLink.onclick = function(){
clickLink.style.color = "red";
setTimeout('startAppend()', 10)
};
``` | [
0.04708683490753174,
-0.11144986748695374,
0.5584468841552734,
-0.359240859746933,
0.7163199186325073,
0.027241477742791176,
0.3494502902030945,
-0.12980468571186066,
-0.050583720207214355,
-0.624678373336792,
-0.4245327115058899,
0.9456155896186829,
-0.4959345757961273,
0.2699354588985443... | |
I'm using Amazon S3 to host images. The S3 bucket is private, so I generate a temporary URL (using [Right AWS](http://rightaws.rubyforge.org/)) with a 5-minute expiry to allow the image to be rendered. The URL looks like this (note: URL below will not work):
```
https://mybucket.s3.amazonaws.com:443/attachments%2F30%2... | [
0.07730322331190109,
0.2020663470029831,
0.782703161239624,
-0.19007828831672668,
-0.14916516840457916,
-0.11666378378868103,
0.7947577834129333,
-0.0638943761587143,
-0.2891865372657776,
-0.9468671083450317,
-0.22162432968616486,
0.5053870677947998,
-0.16906292736530304,
0.235024213790893... | |
rendered by Safari (fine in all other browsers), e.g:
[alt text http://lylo.co.uk/screenshot.png](http://lylo.co.uk/screenshot.png)
Has anyone seen this behaviour before and can you point out what, if anything, I might be doing wrong?
With a bit of digging around in the S3 library I'm using I have found the problem h... | [
-0.07774250209331512,
-0.03386276587843895,
0.3474912643432617,
-0.3890984058380127,
-0.3897860050201416,
0.3138760030269623,
0.6062083840370178,
0.1463441252708435,
-0.4018216133117676,
-0.7788666486740112,
-0.2937810719013214,
0.4709111452102661,
-0.3991422653198242,
-0.30343130230903625... | |
header, but it was setting the header to `application/pdf` for both the original PDF and the PNG thumbnail.
It seems that Firefox and IE will happily render a PNG image from S3 even though it has the wrong `Content-Type` header, whereas Safari doesn't like this at all and consequently won't render the image.
So, patc... | [
0.15946228802204132,
0.026486661285161972,
0.6696395874023438,
-0.014326819218695164,
-0.3211057782173157,
-0.49959415197372437,
0.1861085146665573,
-0.11102002114057541,
-0.17258289456367493,
-0.7638739943504333,
-0.41212525963783264,
0.5494318008422852,
-0.5007027983665466,
0.01829221285... | |
So I have a problem. Or rather my friend has a problem, since I would never write about my company on an internet forum.
At my friend's company specification writing is, shall we say, a little underused. There's a deeply ingrained culture of writing code first and asking questions later, whether it's for a library rou... | [
0.48586857318878174,
0.6987546682357788,
-0.0456797331571579,
0.05757589265704155,
0.1865304410457611,
-0.07316040247678757,
0.3606826066970825,
0.43986988067626953,
-0.21119600534439087,
-0.43699321150779724,
-0.10198364406824112,
0.43796488642692566,
-0.11912915855646133,
0.2147931754589... | |
for those poor designers, or beta periods where bug-fixing is largely spent implementing things correctly.
My friend's found his suggestions of writing (and testing against) specifications to be generally well received. Most of his colleagues have embraced the wonderful feeling of discovering false-assumptions on pape... | [
0.7304023504257202,
0.2929786443710327,
-0.06260602176189423,
0.3954373598098755,
0.1258062720298767,
-0.2354065328836441,
0.32833966612815857,
0.3047639727592468,
-0.140262633562088,
-0.21145382523536682,
-0.30367282032966614,
0.5636597871780396,
0.13330578804016113,
-0.018534965813159943... | |
problem is that this second group of heretics invariably produce things (or at least something) quicker than the first. Subsequently this becomes justification along the lines of "It's pointless to write specifications for something as simple as an image resizer! Oh and those bugs where width!=height or the image uses ... | [
0.8037537336349487,
0.25445446372032166,
0.19674570858478546,
0.20803961157798767,
-0.1518968939781189,
-0.23607279360294342,
0.47185975313186646,
-0.027020184323191643,
-0.3846542239189148,
-0.44255906343460083,
0.0064917514100670815,
0.7005663514137268,
0.20141355693340302,
0.13831107318... | |
office culture and work habits are very hard to change. If you are really serious about this though, try to get management to agree to a trial where specs are used for a small project/module, and maintenance costs (time, bugs, etc) are quantified over time.
You may not get the other developers on your side this way, ... | [
0.617510199546814,
0.21686013042926788,
0.18947315216064453,
0.34603092074394226,
0.23019389808177948,
-0.21875640749931335,
0.18975140154361725,
0.19051818549633026,
-0.16556723415851593,
-0.5501344203948975,
-0.2721668779850006,
0.5493062138557434,
-0.01824262924492359,
0.076549768447875... | |
I'm trying to make a basic Windows application that builds a string out of user input and then adds it to the clipboard. How do I copy a string to the clipboard using Python?
Actually, `pywin32` and `ctypes` seem to be an overkill for this simple task. `Tkinter` is a cross-platform GUI framework, which ships with Pytho... | [
0.43441444635391235,
0.1060246080160141,
0.43638816475868225,
-0.06464004516601562,
-0.07091286778450012,
-0.3057629466056824,
0.11736033856868744,
-0.0367586575448513,
-0.0347394123673439,
-0.7148076891899109,
0.02634245716035366,
0.670922040939331,
-0.3718098998069763,
0.1360966265201568... | |
window is closed
r.destroy()
```
And that's all, no need to mess around with platform-specific third-party libraries.
If you are using Python 3, replace `TKinter` with `tkinter`. | [
-0.12668202817440033,
0.01712634414434433,
0.12672220170497894,
-0.07105714082717896,
-0.23052960634231567,
-0.20877312123775482,
0.5639225840568542,
0.18780456483364105,
0.055806439369916916,
-0.567197322845459,
-0.39143991470336914,
0.48390570282936096,
-0.6225442290306091,
-0.0562242269... | |
I was trying to add the date to my log file name and I was able to make it work by following the few suggestions I've found in stackoverflow. Everything works fine but for some reason, the first file always has the date appended twice.
For example, instead of **log.2009-02-23.log**, I get **log.2009-02-23.log.2009-02... | [
0.31481143832206726,
0.16527287662029266,
0.7183178067207336,
-0.1779100000858307,
-0.14932860434055328,
-0.14632487297058105,
0.030918262898921967,
0.3205428421497345,
-0.5474990606307983,
-0.5502524971961975,
0.09666622430086136,
0.2607090473175049,
0.11040641367435455,
0.434812217950820... | |
value="Date"/>
<datePattern value=".yyyy-MM-dd.lo\g" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d{DATE} [%t] %-5p %c - %m%n"/>
</layout>
</appender>
<root>
<level value="INFO"/>
<appender-ref ... | [
-0.14032097160816193,
0.10830383002758026,
0.39588451385498047,
-0.18433114886283875,
0.19557449221611023,
-0.3699936866760254,
0.3292461335659027,
-0.14574241638183594,
-0.4268588423728943,
-0.6202322840690613,
-0.2259279191493988,
0.5542962551116943,
-0.2936544120311737,
-0.0021123853512... | |
I didn't know that it has internal logging but I found it so I tried turning [internal logging](http://logging.apache.org/log4net/release/faq.html#Troubleshooting) on.
I wasn't very sure what it's saying but here's what it looks like to me it's doing:
1. Append the date to the file name.
2. Try to access the file to w... | [
0.21815834939479828,
0.14470238983631134,
0.635365903377533,
-0.07714813202619553,
0.1049463301897049,
-0.17893826961517334,
0.39784908294677734,
0.1694239377975464,
-0.4905748963356018,
-0.17111767828464508,
0.10938704013824463,
0.1040148064494133,
0.2991069257259369,
0.46732887625694275,... | |
much information out there. I found maybe one guy who said it happens to some people but never really explained why nor the solution. With this new information (+the internal error message from Log4Net), I was looking at different threads from the search engines. With that I found hints that it might be a permission pr... | [
0.4190407395362854,
0.060150258243083954,
0.24894979596138,
0.16354165971279144,
0.24525661766529083,
-0.42313408851623535,
0.6033205389976501,
0.4566565752029419,
-0.37578436732292175,
-0.4127630293369293,
-0.0063575273379683495,
0.25486811995506287,
-0.24147136509418488,
0.31919652223587... | |
to the folder, it works just fine.
If anyone can explain this better than me, please feel free to edit. | [
0.5045381188392639,
0.33873242139816284,
0.0004968178691342473,
0.3536185026168823,
0.1680290699005127,
-0.5295028686523438,
0.10710596293210983,
0.5883362293243408,
-0.11572114378213882,
-0.6842365860939026,
0.05801718682050705,
0.4977418780326843,
-0.07658057659864426,
0.0736966207623481... | |
I'm currently using [cURL](http://curl.haxx.se/) to do HTTP requests, and it works fine. However I need to get the javascript code and execute it in the context of the HTML, making it manipulate the DOM exactly as if it were a web-browser.
The first thing that came to mind was to use *firefox*, there's a command-line ... | [
0.5310150980949402,
0.2605525553226471,
0.6666014790534973,
-0.26099154353141785,
-0.1830373853445053,
-0.1721060872077942,
0.019162887707352638,
-0.29321637749671936,
-0.3078504502773285,
-0.5489421486854553,
0.032165516167879105,
0.5862269997596741,
-0.0610431469976902,
0.127837166190147... | |
that there's going to be problems fetching the data asynchronously.
Maybe someone has done this already and could give me some tips on what would be the best solution.
This is what you want to use for something like this:
<http://code.google.com/p/envjs/> | [
0.511985182762146,
-0.0807969868183136,
0.13871103525161743,
0.23953770101070404,
0.22429640591144562,
0.08289090543985367,
0.05485129356384277,
0.07469967752695084,
-0.05427894368767738,
-0.46283894777297974,
0.028070401400327682,
0.3692437708377838,
0.0056902258656919,
-0.238953128457069... | |
I am using a C++ SDK where there is a function like (it has a python wrapper, but not docs):
```
getPos ( int uvId, float & u, float & v ) const
```
How do I specify in Python so that the passed variables are changed?
I tried this example to see if I could modify floats inside a function, but it didn't work, so pr... | [
0.5096169114112854,
0.21214164793491364,
0.4095991849899292,
-0.2389909327030182,
-0.009282865561544895,
0.13157443702220917,
0.004997044801712036,
-0.38587847352027893,
-0.19799764454364777,
-0.4692016541957855,
0.15772071480751038,
0.6980348825454712,
-0.543302059173584,
0.00945305451750... | |
function calls](https://stackoverflow.com/questions/575196/python-variable-scope-and-function-calls/)
As far I know, Python doesn't support call-by-reference, so the exact code you are suggesting doesn't work (obviously).
The tool (or person) that generated the Python wrapper for the C++ function must have done someth... | [
0.20614877343177795,
0.09109073877334595,
0.29420509934425354,
-0.07239869236946106,
-0.10682547837495804,
-0.1660729944705963,
0.041268277913331985,
-0.23647460341453552,
-0.17076750099658966,
0.0841142013669014,
-0.037628430873155594,
1.0140520334243774,
-0.6726938486099243,
0.0038026084... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.