text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
This is written in PHP, but it's really language agnostic.
```
try
{
try
{
$issue = new DM_Issue($core->db->escape_string($_GET['issue']));
}
catch(DM_Exception $e)
{
throw new Error_Page($tpl, ERR_NOT_FOUND, $e->getMessage());
}
}
catch(Error_Page $e)
{
die($e);
}
```
Is ... | [
0.037696823477745056,
0.14343759417533875,
0.3145306706428528,
-0.17898163199424744,
-0.10640852898359299,
-0.12376900017261505,
0.25942233204841614,
-0.45012933015823364,
-0.29556000232696533,
-0.5615761280059814,
-0.16000770032405853,
0.21502873301506042,
-0.610545814037323,
-0.169959768... | |
a good way of error detecting.
The Error\_Page exception is simply an error page compiler.
I might just be pedantic, but do you think this is a good way to report errors and if so can you suggest a better way to write this?
Thanks
You're using Exceptions for page logic, and I personally think that's not a good thing... | [
0.4253902733325958,
0.049528446048498154,
-0.0457356832921505,
0.30174803733825684,
-0.2154446691274643,
-0.44725921750068665,
0.42876335978507996,
0.0718441903591156,
-0.20919008553028107,
-0.6018510460853577,
0.19853022694587708,
0.5641239285469055,
-0.39424899220466614,
-0.2505917251110... | |
you specify. Keep in mind that this doesn't stop the "fatalness" of an Exception. After an exception is passed through your callback, execution will stop like normal after any uncaught exception. | [
0.3446522653102875,
-0.0966697409749031,
0.08295609802007675,
0.12681140005588531,
0.012163650244474411,
-0.17766760289669037,
0.3082846999168396,
-0.10187658667564392,
-0.15992657840251923,
-0.30604761838912964,
-0.01835155300796032,
0.21937592327594757,
-0.4948332607746124,
0.13998703658... | |
We have a java program that requires a large amount of heap space - we start it with (among other command line arguments) the argument -Xmx1500m, which specifies a maximum heap space of 1500 MB. When starting this program on a Windows XP box that has been freshly rebooted, it will start and run without issues. But if t... | [
0.1717303991317749,
0.40457066893577576,
0.31234967708587646,
-0.12532901763916016,
0.04768969863653183,
-0.21780680119991302,
0.16236333549022675,
-0.22672992944717407,
-0.2068592607975006,
-0.7330945730209351,
-0.10246751457452774,
0.42205142974853516,
-0.07216916978359222,
0.13455922901... | |
suspect that Windows itself is suffering from memory fragmentation, but I don't know how to confirm this suspicion. At the time that this happens, Task manager and sysinternals procexp report 2000MB free memory. I have looked at [this question related to internal fragmentation](https://stackoverflow.com/questions/60871... | [
0.23049920797348022,
0.4242709279060364,
0.22551506757736206,
0.14393462240695953,
0.13184647262096405,
-0.2371675819158554,
0.21832630038261414,
0.149678573012352,
-0.5711855292320251,
-0.4749170243740082,
-0.12066590040922165,
0.48711535334587097,
0.0301873330026865,
0.22102071344852448,... | |
a viable option.
Agree with Torlack, a lot of this is because other DLLs are getting loaded and go into certain spots, breaking up the amount of memory you can get for the VM in one big chunk.
You can do some work on WinXP if you have more than 3G of memory to get some of the windows stuff moved around, look up PAE he... | [
0.20249983668327332,
-0.02340683341026306,
0.003145639318972826,
0.20129060745239258,
0.10927195847034454,
0.031183404847979546,
0.19946067035198212,
0.0003347535675857216,
-0.33597731590270996,
-0.8209354281425476,
-0.14674757421016693,
0.5796136260032654,
-0.17870286107063293,
-0.2197220... | |
app you'll have to recompile them for 64 bit, but its going to be a lot easier than trying to rebase dlls and stuff to maximize the memory you can get on 32 bit windows.
Another option would be to split your program up into multiple VMs and have them communicate with eachother via RMI or messaging or something. That w... | [
0.4489894211292267,
0.11673654615879059,
0.2964474558830261,
0.3105321228504181,
-0.034210775047540665,
0.0462263748049736,
0.09054657071828842,
-0.05104151740670204,
-0.45743587613105774,
-0.6886166334152222,
0.10075046122074127,
0.6219822764396667,
-0.4958555996417999,
0.0330699495971202... | |
Is it possible to use an [ASP.NET](http://en.wikipedia.org/wiki/ASP.NET) web.sitemap with a jQuery [Superfish](http://users.tpg.com.au/j_birch/plugins/superfish/) menu?
If not, are there any standards based browser agnostic plugins available that work with the web.sitemap file?
I found this question while looking for... | [
0.23200103640556335,
-0.17447321116924286,
0.2840653955936432,
0.4379562735557556,
0.12771984934806824,
0.016782259568572044,
0.2207285761833191,
-0.03038921020925045,
-0.2802060842514038,
-0.5951212644577026,
-0.2781033515930176,
0.20451506972312927,
0.06179053336381912,
-0.19327428936958... | |
`Masterpage.master` has the following `head` tag:
```
<head runat="server">
<script type="text/javascript" src="/script/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/script/superfish.js"></script>
<link href="~/css/superfish.css" type="text/css" rel="stylesheet" media="screen" runat="... | [
-0.02628224343061447,
-0.10154295712709427,
0.8091217279434204,
-0.2567279636859894,
-0.26870590448379517,
-0.12488178163766861,
0.2974329888820648,
-0.3866281807422638,
-0.5174576044082642,
-0.6982135772705078,
-0.28684306144714355,
0.19389109313488007,
-0.3181944489479065,
0.101143695414... | |
DataSourceID="SiteMapDataSource"
Orientation="Horizontal" CssClass="sf-menu">
</asp:Menu>
```
Based on the documentation, this seems like it SHOULD work - but it doesn't. The reason is that the `CssClass="sf-menu"` gets overwritten when the Menu is rendered and the `<ul>` tag gets a `class="AspNet-Menu"`. I thoug... | [
0.03606410697102547,
-0.1354038566350937,
0.713573157787323,
-0.10018152743577957,
0.08566567301750183,
-0.10641058534383774,
0.18841145932674408,
-0.036488454788923264,
-0.34959152340888977,
-0.699646532535553,
0.034067124128341675,
0.6906381249427795,
-0.25131770968437195,
-0.05959290266... | |
control where I could set the `<ul>` class but didn't find any hints via google. | [
0.17535050213336945,
-0.3313044011592865,
0.2807890772819519,
0.31558236479759216,
-0.28686633706092834,
-0.04154478386044502,
0.01483625266700983,
0.1717393845319748,
-0.006552259437739849,
-0.45916610956192017,
-0.008177018724381924,
0.3105471134185791,
-0.17291304469108582,
0.1235011443... | |
I've read about and dabbled with some including active record, repository, data transfer objects. Which is best?
Repository is probably the best pattern for testability since it allows you to replace a repository with a mock when you need to test. ActiveRecord ties your models to the database (convenient sometimes, but... | [
0.13990303874015808,
-0.18433456122875214,
0.15343625843524933,
0.4880358874797821,
-0.1545809805393219,
-0.038265079259872437,
-0.13235178589820862,
0.12575165927410126,
-0.19664624333381653,
-0.7109938859939575,
0.17391052842140198,
0.5411074161529541,
-0.09752289950847626,
0.09319171309... | |
First off: I'm using a rather obscure implementation of javascript embedded as a scripting engine for Adobe InDesign CS3. This implementation sometimes diverges from "standard" javascript, hence my problem.
I'm using [John Resig's jsdiff library](http://ejohn.org/projects/javascript-diff-algorithm/) ([source here](htt... | [
0.3405763506889343,
0.22072923183441162,
0.30454301834106445,
-0.18844899535179138,
-0.4540363848209381,
-0.28981220722198486,
0.5453226566314697,
-0.2505132257938385,
-0.14831051230430603,
-0.6003559231758118,
0.2697172164916992,
0.4196426272392273,
-0.30545735359191895,
0.168855130672454... | |
the associative array to ns['reflect'], everything explodes.
My question: is there a way around this? Is there a way to do a hash table in javascript without using the obvious vanilla object?
**Ground rules:** switching scripting engines isn't an option. :)
You might be "asking the wrong question" (as Raymond Chen wo... | [
0.25048577785491943,
0.012076343409717083,
-0.44901755452156067,
0.0038154455833137035,
-0.5009982585906982,
-0.3356199562549591,
0.3304338753223419,
-0.24815790355205536,
-0.13954193890094757,
-0.39559406042099,
-0.15185897052288055,
0.7887504696846008,
-0.5453946590423584,
-0.16816401481... | |
variation on that. | [
0.12897621095180511,
-0.14694200456142426,
-0.010879083536565304,
0.2146957963705063,
-0.19122876226902008,
0.12399645894765854,
-0.012334301136434078,
-0.006655227858573198,
-0.3150510787963867,
-0.3518286943435669,
0.037582263350486755,
0.04257490113377571,
-0.25757119059562683,
0.097713... | |
For an image hosting web application:
For my stored images, is it feasible to create thumbnails on the fly using PHP (or whatever), or should I save 1 or more different sized thumbnails to disk and just load those?
Any help is appreciated.
Save thumbnails to disk. Image processing takes a lot of resources and, depend... | [
0.5793278217315674,
0.1267683357000351,
0.4552960693836212,
0.360983669757843,
-0.23643478751182556,
-0.31151971220970154,
0.10819762945175171,
0.007501569110900164,
-0.47977373003959656,
-0.6616864204406738,
0.2914343774318695,
0.7505447268486023,
-0.21844017505645752,
-0.0143535276874899... | |
you're considering creating thumbnails on the fly anyway, you don't have to change much - upon the first request, create the thumbnail from the source file, save it to disk and upon subsequent requests just read it off the disk. | [
0.8141916990280151,
-0.0771716982126236,
0.098312146961689,
0.3383183479309082,
0.23752179741859436,
-0.020649578422307968,
-0.12531760334968567,
0.40682992339134216,
-0.3360965847969055,
-0.5784563422203064,
0.2563302516937256,
0.6021744608879089,
-0.04521249234676361,
0.1099497452378273,... | |
Here's the situation: I have a label's text set, immediately followed by a response.redirect() call as follows (this is just an example, but I believe it describes my situation accurately):
aspx:
```
<asp:Label runat="server" Text="default text" />
```
Code-behind (code called on an onclick event):
```
Label.Text ... | [
0.04710233584046364,
-0.08919797092676163,
0.6479908227920532,
-0.21369941532611847,
-0.0041819470934569836,
0.05671718344092369,
0.4594844877719879,
-0.1189638078212738,
-0.37268996238708496,
-0.5854603052139282,
-0.3611431419849396,
0.7316755056381226,
-0.1564546823501587,
-0.08469688892... | |
more to it, but I only included that which is of interest to this issue.
After a redirect you will loose any state information associated to your controls. If you simply want the page to refresh, remove the redirect. After the code has finished executing, the page will refresh and any state will be kept.
Behind the sc... | [
0.35626184940338135,
-0.30171453952789307,
0.5596864819526672,
0.2110324651002884,
0.06414645910263062,
-0.15738020837306976,
0.34542423486709595,
0.0538938008248806,
-0.30349215865135193,
-0.749334990978241,
-0.16876304149627686,
0.5209186673164368,
-0.2169640213251114,
0.2446139454841613... | |
to the hidden field and the cycle continues, **until you change the page without a POST**. This can happen when clicking an hyperlink to another page, or via Response.Redirect(), which instructs the browser to follow the specified url. | [
0.2807086110115051,
-0.32569992542266846,
0.6451941728591919,
-0.09756246209144592,
-0.0857471227645874,
-0.11594846099615097,
0.3977734446525574,
0.279116153717041,
-0.3176962435245514,
-0.6496720314025879,
-0.5638120174407959,
0.05096282437443733,
-0.37647128105163574,
0.5404048562049866... | |
A coworker has been struggling with this problem.
The desired result is an installable plugin for Notes that will add a button emails with attachments that will let users save the attachment to a document management system.
Finding documentation on doing this for Notes has been an uphill battle to say the least.
Wri... | [
0.2829225957393646,
0.14378631114959717,
0.4545760452747345,
0.2762480080127716,
0.12753906846046448,
-0.15569238364696503,
0.2629387378692627,
-0.1387416124343872,
-0.2899220883846283,
-0.7554678320884705,
0.15268287062644958,
0.2880913019180298,
-0.21857549250125885,
-0.34890297055244446... | |
make it only visible (or just grey it out otherwise) when no email is open?
Both Lotus Notes 8+ and Lotus Symphony use the IBM Lotus Expeditor Toolkit.
If you get the Lotus Symphony SDK [here](http://symphony.lotus.com/software/lotus/symphony/developers.nsf/home).
Their are one or two examples dealing with adding bu... | [
-0.08599681407213211,
-0.03569130599498749,
0.2857281267642975,
0.04656599462032318,
-0.10175323486328125,
-0.06523674726486206,
0.027794336900115013,
0.25696030259132385,
-0.2917115092277527,
-0.7525896430015564,
-0.14824558794498444,
0.18409760296344757,
-0.2362421303987503,
-0.264120638... | |
List Comprehension for me seems to be like the opaque block of granite that regular expressions are for me. I need pointers.
Say, I have a 2D list:
```
li = [[0,1,2],[3,4,5],[6,7,8]]
```
I would like to merge this either into one long list
```
li2 = [0,1,2,3,4,5,6,7,8]
```
or into a string with separators:
```
... | [
-0.15901140868663788,
0.022849610075354576,
0.4464820921421051,
-0.11643511801958084,
-0.17212176322937012,
0.2550857961177826,
0.24576953053474426,
-0.3278560936450958,
-0.27336037158966064,
-0.7759377360343933,
-0.16950957477092743,
0.6908587217330933,
-0.5101760029792786,
-0.40116429328... | |
of the loop is at the start of the listcomp, the order of nested loops (and 'if' clauses) is still the same as when you would write the loop out:
```
for innerlist in outerlist:
for item in innerlist:
...
``` | [
0.020124925300478935,
-0.18576748669147491,
0.309705525636673,
-0.259846031665802,
-0.10038100183010101,
0.026892248541116714,
0.34844672679901123,
-0.2960168719291687,
-0.3095305263996124,
-0.3893807530403137,
-0.2522297203540802,
0.1109691932797432,
-0.5023491382598877,
0.094326555728912... | |
I am trying to install the ibm\_db gem so that I can access DB2 from Ruby. When I try:
```
sudo gem install ibm_db
```
I get the following request for clarification:
```
Select which gem to install for your platform (i486-linux)
1. ibm_db 0.10.0 (ruby)
2. ibm_db 0.10.0 (mswin32)
3. ibm_db 0.9.5 (mswin32)
4. ib... | [
0.5500499606132507,
0.217647984623909,
-0.15158072113990784,
-0.2601499557495117,
-0.17034205794334412,
-0.14738258719444275,
0.5570731163024902,
-0.19662301242351532,
-0.00879205297678709,
-0.7194164991378784,
-0.23656737804412842,
0.9184114933013916,
-0.36857208609580994,
0.2116334885358... | |
I need to automate this install via a bash script, so I would like to select that I want the "ruby" version ahead of time.
You can use a 'here document'. That is:
```
sudo gem install ibm_db <<heredoc
1
heredoc
```
What's between the \<\<\SOMETHING and SOMETHING gets inputted as entry to the previous command (some... | [
0.4773358702659607,
0.27870631217956543,
-0.15683045983314514,
-0.19943958520889282,
-0.04352087527513504,
-0.17037178575992584,
0.39389076828956604,
-0.15565702319145203,
-0.11505510658025742,
-0.6632161736488342,
-0.13983841240406036,
1.0782299041748047,
-0.13095486164093018,
-0.02975197... | |
I've been doing code review (mostly using tools like FindBugs) of one of our pet projects and FindBugs marked following code as erroneous (pseudocode):
```
Connection conn = dataSource.getConnection();
try{
PreparedStatement stmt = conn.prepareStatement();
//initialize the statement
stmt.execute();
Re... | [
0.07522424310445786,
0.108054518699646,
0.6300486922264099,
-0.21866440773010254,
0.14586032927036285,
-0.1523190289735794,
0.47107192873954773,
-0.42299628257751465,
-0.22258146107196808,
-0.5048449039459229,
-0.2978564500808716,
0.4847685396671295,
-0.35100769996643066,
0.225911870598793... | |
}catch(SqlException se){
//log it
}
try{
stmt.close();
}catch(SqlException se){
//log it
}
conn.close();
}
```
But I encountered the above pattern in many projects (from quite a few companies), and no one was closing ResultSets or Statements.
Did you have troubles with Res... | [
0.2654041349887848,
-0.016778038814663887,
0.289834588766098,
-0.22639890015125275,
-0.03849971294403076,
-0.3392446041107178,
0.06589613854885101,
-0.05078307166695595,
-0.187800332903862,
-0.11117899417877197,
-0.1854262501001358,
0.15639537572860718,
-0.3575555980205536,
0.1535711139440... | |
ResultSets when closing Connections (we use Oracle db, hence my corrections). java.sql.api says nothing in Connection.close() javadoc.
One problem with ONLY closing the connection and not the result set, is that if your connection management code is using connection pooling, the `connection.close()` would just put the ... | [
-0.1546938568353653,
0.010764048434793949,
0.5628482699394226,
0.03954112529754639,
-0.12962386012077332,
-0.46737873554229736,
0.07576709240674973,
-0.04370947182178497,
-0.3341294825077057,
-0.432513564825058,
-0.1338059902191162,
0.3791760206222534,
-0.30527472496032715,
0.1727462112903... | |
I'm wanting to get the full value of a char[] variable in the VC6 watch window, but it only shows a truncated version. I can copy the value from a debug memory window, but that contains mixed lines of hex and string values. Surely there is a better way??
For large strings, you're pretty much stuck with the memory windo... | [
0.35645008087158203,
0.1808468997478485,
0.16781507432460785,
0.0203919168561697,
0.0770568996667862,
0.19614844024181366,
0.3329029679298401,
0.2071283906698227,
-0.3056904375553131,
-0.4897203743457794,
0.12724484503269196,
0.598899781703949,
-0.15950843691825867,
0.4523678421974182,
0... | |
window, then use alt+drag to select columns and delete the hex values. Then start at the bottom of the string and continually page up/delete (the newline) to build your string (I use a macro for that bit).
I don't think there's any better way once you get long strings. | [
0.1144896000623703,
-0.09893226623535156,
0.7714657187461853,
-0.2791881561279297,
-0.06595489382743835,
0.16747751832008362,
0.13678498566150665,
0.15573249757289886,
-0.10960392653942108,
-0.8212525844573975,
0.02325223572552204,
0.6074003577232361,
-0.18440957367420197,
0.15988342463970... | |
Let's say we have the following method declaration:
```
Public Function MyMethod(ByVal param1 As Integer, _
Optional ByVal param2 As Integer = 0, _
Optional ByVal param3 As Integer = 1) As Integer
Return param1 + param2 + param3
End Function
```
How does VB.NET make the optional parameters work within t... | [
0.17555159330368042,
0.1626434177160263,
0.6165506839752197,
0.18685150146484375,
-0.10252939164638519,
0.23805345594882965,
0.1823226660490036,
-0.6187756657600403,
-0.2204415500164032,
-0.1386217623949051,
-0.24696390330791473,
0.5970733761787415,
-0.3646530508995056,
0.04087089002132416... | |
[Optional, DefaultParameterValue(1)] int param3)
{
return ((param1 + param2) + param3);
}
```
Notice the Optional and DefaultParameterValue attributes. Try putting them in C# methods. You will find that you are still required to pass values to the method. In VB code however, its turned into Default! That being sa... | [
0.022239845246076584,
-0.11520057916641235,
0.3068098723888397,
0.004282946698367596,
-0.19262845814228058,
0.10579860210418701,
0.4331219494342804,
-0.42252591252326965,
-0.2327481359243393,
-0.5301870107650757,
0.023041198030114174,
0.7516769170761108,
-0.3135359585285187,
-0.31531387567... | |
a pain in the ass to use straight out of the box in C#. | [
-0.15362471342086792,
0.31769147515296936,
-0.22305861115455627,
0.198991596698761,
-0.2384173572063446,
0.16226227581501007,
0.08085464686155319,
0.22128504514694214,
0.021390516310930252,
-0.19283610582351685,
0.04877115413546562,
0.32638758420944214,
0.06235472485423088,
0.1211941912770... | |
Some things are easier to implement just by hand (code), but some are easier through WF. It looks like WF can be used to create (almost) any kind of algorithm. So (theoretically) I can do all my logic in WF, but it's probably a bad idea to do it for all projects.
In what situations is it a good idea to use WF and when... | [
0.7140551209449768,
-0.06241193413734436,
-0.2125309705734253,
0.06213587522506714,
-0.12356656044721603,
-0.05537040904164314,
0.15592089295387268,
-0.40933239459991455,
-0.044178664684295654,
-0.8646588325500488,
0.11396566778421402,
0.6304005980491638,
-0.17687107622623444,
-0.152848750... | |
process.
2. You have a process that changes frequently.
3. You want a visual model of the process.
For more details, see Paul Andrew's post: [What to use Windows Workflow Foundation for?](https://blogs.msdn.microsoft.com/pandrew/2007/02/01/what-to-use-windows-workflow-foundation-for/)
Please do not confuse or relate ... | [
0.5198606848716736,
-0.013431320898234844,
0.0445382259786129,
-0.0671084001660347,
-0.31724172830581665,
0.012532650493085384,
0.07362516969442368,
-0.43362903594970703,
-0.39357882738113403,
-0.8537865877151489,
0.03371207416057587,
0.3194478452205658,
-0.3277881443500519,
0.191263273358... | |
For a while, I thought I'd host stuff at home because I can do whatever I want. However, hurricane Ike knocked out my power for a week, and I've finally realized this situation won't work.
I have extremely low traffice websites (20 visitors/day), so I don't need tons of CPU or bandwidth. What cheap options are there f... | [
-0.01890362799167633,
0.04942783713340759,
0.9849963784217834,
-0.07972446084022522,
0.21742551028728485,
0.1380300223827362,
0.3601002097129822,
0.46320751309394836,
-0.8386694192886353,
-0.7211142182350159,
0.08788716048002243,
0.305745005607605,
0.08318357914686203,
0.15073536336421967,... | |
Situation: A PHP application with multiple installable modules creates a new table in database for each, in the style of mod\_A, mod\_B, mod\_C etc. Each has the column section\_id.
Now, I am looking for all entries for a specific section\_id, and I'm hoping there's another way besides "Select \* from mod\_a, mod\_b, ... | [
0.06861275434494019,
-0.023775292560458183,
0.6038358807563782,
0.04483732581138611,
-0.0013673607027158141,
0.0793623998761177,
0.16404610872268677,
-0.20472155511379242,
-0.4677654802799225,
-0.612678050994873,
-0.037504930049180984,
0.36252090334892273,
-0.22932016849517822,
0.249294206... | |
t.[name] LIKE 'SOME_PATTERN_TO_IDENTIFY_THE_TABLES'
```
-- or this
```
DECLARE CURSOR FOR
SELECT t.[name] AS TABLE_NAME
FROM TABLE_OF_TABLES_TO_SEACRH t
START LOOP
IF @sql <> '' SET @sql = @sql + 'UNION ALL '
SET @sql = 'SELECT * FROM [' + @TABLE_NAME + '] WHERE section_id=value '
END LOOP
EXEC(@sql)
```
I've ... | [
0.15008282661437988,
-0.40270674228668213,
0.20857588946819305,
-0.1929963231086731,
-0.070895716547966,
-0.0961650013923645,
0.1546420156955719,
-0.28599685430526733,
-0.32203173637390137,
-0.4824148118495941,
-0.3037501871585846,
0.35382941365242004,
-0.28178519010543823,
0.2924568951129... | |
'SELECT * FROM [' + @TABLE_NAME + '] WHERE section_id=value '
``` | [
-0.013013932853937149,
0.33683985471725464,
0.2810323238372803,
-0.3086370825767517,
0.09661134332418442,
0.037146177142858505,
-0.008984694257378578,
-0.26358917355537415,
-0.1342289000749588,
-0.21368218958377838,
-0.43661555647850037,
0.053975749760866165,
-0.2580685317516327,
0.2763628... | |
I'm getting a 404 error when trying to run another web service on an IIS 6 server which is also running Sharepoint 2003. I'm pretty sure this is an issue with sharepoint taking over IIS configuration. Is there a way to make a certain web service or web site be ignored by whatever Sharepoint is doing?
I found the comman... | [
0.10979002714157104,
0.239999920129776,
0.16213850677013397,
-0.02322811633348465,
0.15373969078063965,
-0.18309547007083893,
0.4563666880130768,
0.07809440046548843,
-0.3455547094345093,
-0.639891505241394,
-0.08315762132406235,
0.6800370812416077,
-0.5276086926460266,
0.09660016000270844... | |
I have a table with a "Date" column, and I would like to do a query that does the following:
If the date is a **Monday**, **Tuesday**, **Wednesday**, or **Thursday**, the displayed date should be shifted up by 1 day, as in
```
DATEADD(day, 1, [Date])
```
On the other hand, if it is a **Friday**, the displayed date s... | [
0.0330166220664978,
-0.05714123323559761,
0.5753884315490723,
-0.17642834782600403,
0.028605680912733078,
-0.1330518275499344,
-0.07587330043315887,
-0.04274484142661095,
-0.2865006625652313,
-0.7224498987197876,
0.11402571946382523,
0.12220235168933868,
0.015698416158556938,
0.34437116980... | |
you will be using this in other places.
```
CASE
WHEN
DATEPART(dw, [Date]) IN (2,3,4,5)
THEN
DATEADD(d, 1, [Date])
WHEN
DATEPART(dw, [Date]) = 6
THEN
DATEADD(d, 3, [Date])
ELSE
[Date]
END AS [ConvertedDate]
``` | [
0.10476377606391907,
-0.1455548107624054,
0.4321132302284241,
-0.3653666079044342,
0.29554110765457153,
0.17579160630702972,
-0.01946031115949154,
-0.1953018754720688,
-0.17665694653987885,
-0.609734296798706,
-0.3994602560997009,
0.23934316635131836,
0.034944918006658554,
0.46321618556976... | |
I wrote an application in Java and when it runs on one customer's computer running OS X The Save and Export buttons are disabled. (Everything else works in the application.)
Both of these buttons open up a standard save file dialog.
Any ideas?
This was caused by misinformation recieved from the customer.
Turns out t... | [
0.25529739260673523,
0.37182945013046265,
-0.03586013987660408,
-0.08885273337364197,
0.2626540958881378,
0.00971943698823452,
0.3541209101676941,
0.3452818989753723,
-0.085002601146698,
-0.7043171525001526,
0.09922803193330765,
0.5728532075881958,
-0.4660753905773163,
-0.01013101823627948... | |
Right now I'm doing something like this:
```
RewriteRule ^/?logout(/)?$ logout.php
RewriteRule ^/?config(/)?$ config.php
```
I would much rather have one rules that would do the same thing for each url, so I don't have to keep adding them every time I add a new file.
Also, I like to match things like '/config/new' ... | [
0.25341036915779114,
-0.023943588137626648,
0.6605211496353149,
-0.11420316249132156,
0.024194227531552315,
-0.024500515311956406,
0.10647733509540558,
-0.2719229757785797,
-0.2690507769584656,
-0.5649011731147766,
0.09967342764139175,
0.5728064179420471,
-0.46049764752388,
-0.079826280474... | |
I'd like to increase developers' "comfort level" in our team a bit.
We are using Visual Studio 2008 and TortoiseCVS + WinCVS, but no integration as of yet.
In your CVS/Visual Studio experience, what is the best integration tool in terms of "supports basic CVS functionality add/diff/update/commit/annotate/etc", "works ... | [
0.3760552406311035,
-0.07916339486837387,
0.41544288396835327,
-0.08494612574577332,
-0.026003461331129074,
0.3089432716369629,
0.07679685950279236,
0.03752388805150986,
-0.0657041072845459,
-0.9113863706588745,
0.32875800132751465,
0.40650248527526855,
-0.17786845564842224,
-0.00841797888... | |
provide all the nice features of vsPackage SCC provider, but are probably better than nothing.
You might be stuck with one of those MSSCCI bridges you mentioned. As it is, not too many people still use CVS, especially those using Visual Studio (most of them seem to use Team System's revision control, or Subversion).
T... | [
0.26005318760871887,
-0.24818290770053864,
-0.05437663942575455,
0.27425920963287354,
0.16722384095191956,
-0.3695511519908905,
-0.004500737413764,
0.32294297218322754,
-0.4556772708892822,
-0.4943313002586365,
-0.030529526993632317,
0.7850131392478943,
-0.24896672368049622,
-0.12780463695... | |
I'm porting old VB6 code that uses the Winsock control to C#. I haven't done any socket programming and I wonder if anyone has a good reference/tutorial/howto that I can use to start getting up to speed.
I'm appealing to the hive mind while I proceed with my generally unproductive googling.
I'm using UDP, not TCP at ... | [
0.18244770169258118,
0.20131590962409973,
0.1571139246225357,
-0.09366864711046219,
-0.14780454337596893,
-0.21088488399982452,
0.14351783692836761,
0.2112627625465393,
-0.36390116810798645,
-0.4657703638076782,
0.0218199472874403,
0.7322127819061279,
-0.2961065471172333,
0.332613199949264... | |
Are there any good database schema comparison tools out there that support Sybase SQL Anywhere version 10? I've seen a litany of them for SQL Server, a few for MySQL and Oracle, but nothing that supports SQL Anywhere correctly.
I tried using DB Solo, but it turned all my non-unique indexes into unique ones, and I did... | [
0.41307106614112854,
0.34251871705055237,
0.11090351641178131,
0.15103058516979218,
-0.1794670671224594,
-0.0755477324128151,
0.20914234220981598,
0.05056257173418999,
-0.13248297572135925,
-0.7844415903091431,
0.310829222202301,
0.9272638559341431,
0.03064255230128765,
-0.1326432675123214... | |
By default when using a webapp server in Eclipse Web Tools, the server startup will fail after a timeout of 45 seconds. I can increase this timeout in the server instance properties, but I don't see a way to disable the timeout entirely (useful when debugging application startup). Is there a way to do this?
![enter ima... | [
0.4820628762245178,
-0.4411281645298004,
0.5359299182891846,
-0.034203194081783295,
0.2678545117378235,
-0.17381535470485687,
0.16767093539237976,
0.07796050608158112,
-0.3626057803630829,
-0.9956718683242798,
-0.136813223361969,
0.6690918207168579,
-0.0835549607872963,
-0.2698724865913391... | |
It's known that you should declare events that take as parameters `(object sender, EventArgs args)`. Why?
This allows the consuming developer the ability to write a single event handler for multiple events, regardless of sender or event.
**Edit:** Why would you need a different pattern? You can inherit EventArgs to pr... | [
0.3460775911808014,
-0.34926003217697144,
-0.14361131191253662,
0.10159461945295334,
-0.13139458000659943,
-0.10891835391521454,
0.2675049901008606,
0.08863243460655212,
-0.4702407717704773,
-0.39955776929855347,
0.0252219345420599,
0.48316624760627747,
-0.49513083696365356,
0.178858995437... | |
I have a members table in MySQL
```
CREATE TABLE `members` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(65) collate utf8_unicode_ci NOT NULL,
`order` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
```
And I would like to let users order the members how they... | [
-0.19462445378303528,
0.15188227593898773,
0.44516196846961975,
-0.21266020834445953,
-0.12191841751337051,
0.0679146870970726,
0.17812590301036835,
-0.3615843653678894,
-0.25433549284935,
-0.6807313561439514,
0.04349815845489502,
0.35823506116867065,
-0.21148160099983215,
0.25444748997688... | |
SET
`order` = ?
WHERE
id = ?',
array(
$maxOrder[0]['max_order'] + 1, | [
0.10056358575820923,
-0.10057492554187775,
0.37536531686782837,
-0.1758808195590973,
0.23063382506370544,
0.07531853020191193,
0.21313558518886566,
-0.4190196990966797,
-0.11430790275335312,
-0.19529399275779724,
-0.3126952052116394,
0.7506827116012573,
-0.53577721118927,
-0.10557679086923... | |
$lastId
));
```
But that's not really precise while when there are several users adding new members at the same time, it might happen the `MAX(order)` will return the same values.
How do you handle such cases?
You can do the SELECT as part of the INSERT, such as:
```
INSERT INTO members SELECT 0, "new membe... | [
0.08303666859865189,
-0.31659626960754395,
0.40797820687294006,
0.005623592063784599,
0.24004210531711578,
0.06815420091152191,
0.10352187603712082,
-0.3587494492530823,
-0.23843619227409363,
-0.5503625273704529,
-0.04083576425909996,
0.785346508026123,
-0.15367203950881958,
-0.07911356538... | |
only have 255 orders ever.
Also order is a reserved word and you will always need to write it as `order`, so you might consider renaming that column as well. | [
-0.02246851846575737,
0.11380253732204437,
0.4246734380722046,
0.016689201816916466,
-0.03147590905427933,
0.18581058084964752,
0.4420147240161896,
0.16687507927417755,
-0.48259714245796204,
-0.4997257888317108,
-0.22447071969509125,
0.13262419402599335,
-0.5084456205368042,
0.050000905990... | |
I've got a (mostly) working plugin developed, but since its function is directly related to the project it processes, how do you develop unit and integration tests for the plugin. The best idea I've had is to create an integration test project for the plugin that uses the plugin during its lifecycle and has tests that ... | [
0.5493981242179871,
0.018197495490312576,
-0.2992951273918152,
0.011286339722573757,
0.06016481667757034,
-0.12981264293193817,
-0.09136204421520233,
-0.35891246795654297,
-0.03122863546013832,
-0.6098082661628723,
0.14029088616371155,
0.5968984961509705,
0.10953701287508011,
-0.2806060314... | |
<version>1.1</version>
<scope>test</scope>
</dependency>
```
You derive your unit test classes from [AbstractMojoTestCase](http://maven.apache.org/shared/maven-plugin-testing-harness/apidocs/org/apache/maven/plugin/testing/AbstractMojoTestCase.html).
You need to create a bare bones POM, usually in the `... | [
0.5900623202323914,
0.1974257379770279,
-0.13381804525852203,
-0.0011138005647808313,
-0.22059185802936554,
0.17818298935890198,
0.09119235724210739,
-0.11452143639326096,
-0.03512725606560707,
-0.8476598858833313,
-0.07518310099840164,
0.45485517382621765,
0.2440417855978012,
-0.214238315... | |
<artifactId>mytool-maven-plugin</artifactId>
<configuration>
<!-- Insert configuration settings here -->
</configuration> | [
-0.5464317202568054,
-0.11479385942220688,
0.25976213812828064,
0.12846532464027405,
0.3815430700778961,
0.21178749203681946,
-0.04290720820426941,
0.07855037599802017,
-0.05362697318196297,
-1.0231760740280151,
-0.28248563408851624,
0.6898295283317566,
-0.10592803359031677,
0.070503979921... | |
<executions>
<execution>
<goals>
<goal>mygoal</goal> | [
-0.0626073107123375,
-0.31597983837127686,
-0.2897438704967499,
0.11917579919099808,
-0.09365864098072052,
0.14761506021022797,
0.27407529950141907,
0.1528451293706894,
-0.6279361248016357,
-0.5665154457092285,
0.05699477344751358,
-0.1448497623205185,
-0.3453231155872345,
0.12403056025505... | |
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build> | [
0.18711750209331512,
-0.16154491901397705,
-0.2329888641834259,
-0.006188841070979834,
-0.085078664124012,
0.12377892434597015,
0.15115922689437866,
-0.2533341944217682,
-0.10242832452058792,
-0.6397424340248108,
-0.47856593132019043,
0.26367294788360596,
-0.42821890115737915,
-0.147656604... | |
</project>
```
Use the AbstractMojoTest.lookupMojo(String,File) (or one of the other variations) to load the Mojo for a specific goal and execute it.
```
final File testPom = new File(PlexusTestCase.getBasedir(), "/target/test-classes/mytools-plugin-config.xml");
Mojo mojo = this.lookupMojo("mygoal", testPo... | [
0.3186308443546295,
0.2470121681690216,
0.11874468624591827,
-0.0634533017873764,
0.09341242164373398,
-0.0903463289141655,
0.37154725193977356,
-0.24665069580078125,
0.1881951093673706,
-0.3074495494365692,
-0.04755769297480583,
0.5371192693710327,
-0.2672763764858246,
-0.3819930851459503... | |
I have a winforms application that normally is at about 2-4% CPU. We are seeing some spikes up to 27% of CPU for limited number of times. What is the best profiling tool to determine what is actually causing this spike. We use dottrace but i dont see how to map that to exactly the CPU spikes?
Appreciate the help
I've ... | [
-0.08030114322900772,
0.020714007318019867,
0.2848670780658722,
0.012424217537045479,
-0.4660067558288574,
-0.007023361045867205,
0.12072063237428665,
-0.09396258741617203,
0.02403143420815468,
-0.9820676445960999,
0.6481776237487793,
0.6782919764518738,
-0.17940424382686615,
-0.1664837002... | |
being said, I felt that the RedGate product felt more intuitive to use. One thing that frustrated me back when I used the RedGate product was that I couldn't instruct the profiler to only profile my code starting at a certain point - I had a performance hit that couldn't be reached until a fair amount of code had alrea... | [
0.31947562098503113,
0.05957441031932831,
0.14809703826904297,
-0.07031354308128357,
-0.2603974938392639,
-0.15983307361602783,
0.39440569281578064,
0.19218213856220245,
-0.1114414855837822,
-0.47596925497055054,
0.3017996847629547,
0.835127592086792,
-0.23167182505130768,
-0.1403726637363... | |
don't think even the "Professional" version has the profiler. I am currently using Team System Developer Edition, which *does* have the code analysis tools.
One thing the VS version does do though, is enable you to pause the profiling, and even start your app with profiling paused, so you can really focus on the perfo... | [
0.2842501401901245,
-0.22525565326213837,
0.12201429158449173,
0.42240187525749207,
-0.16506297886371613,
-0.25153911113739014,
0.3633870482444763,
0.0013221754925325513,
-0.09476596862077713,
-0.7458550333976746,
0.2832692861557007,
0.8148825168609619,
0.07361281663179398,
-0.389234870672... | |
do not do, to the best of my knowledge, is show you CPU usage at any given point in time. However, there are likely strong correlations between CPU usage and the amount of time spent in a given block of code.
If you can duplicate the CPU spikes consistently by invoking certain actions in the APP, then what I would do ... | [
0.9386693835258484,
-0.060206204652786255,
0.024073900654911995,
0.4048272371292114,
-0.013129355385899544,
-0.10194321721792221,
0.5076532363891602,
-0.06264792382717133,
-0.0237563569098711,
-0.4407963752746582,
0.04992330074310303,
0.6438487768173218,
-0.2969135046005249,
-0.14506360888... | |
of deterministic behavior to recreate the spikes. If not ... you might considering threaded processes or garbage collection a candidate for your performance hit. | [
0.1507304459810257,
0.15477390587329865,
-0.07204338908195496,
0.3651021420955658,
-0.14185842871665955,
-0.011121458373963833,
0.2557123005390167,
-0.07425500452518463,
-0.28451424837112427,
-0.36490142345428467,
0.29239386320114136,
0.8113834857940674,
-0.47696754336357117,
0.15231779217... | |
I'd like to have some rails apps over different servers sharing the same session. I can do it within the same server but don't know if it is possible to share over different servers. Anyone already did or knows how to do it?
Thanks
Depending on how your app is set up, you *can* easily share cookies from sites in the s... | [
0.7457821369171143,
-0.04551943019032478,
-0.09804290533065796,
0.09509467333555222,
-0.026416122913360596,
-0.18534404039382935,
0.48067110776901245,
-0.1367707997560501,
-0.39881718158721924,
-0.5183727741241455,
0.7038967609405518,
0.37647852301597595,
-0.11061635613441467,
0.1489995867... | |
to the specific domain. Essentially what you're trying to do is use cross-site scripting to, instead of hijack your session, read it from the other ones.
In that case, a combination of using the same cookie secret etc and then some cross-site scripting you can manually extract the session info and re-create it on each... | [
0.6169934868812561,
-0.09690777212381363,
-0.06480342149734497,
0.18677978217601776,
0.03202139958739281,
-0.5031672120094299,
0.3614897131919861,
0.1716684252023697,
-0.23650121688842773,
-0.6632607579231262,
0.031355999410152435,
0.6182624697685242,
-0.2297488898038864,
0.282525479793548... | |
site that sets an app cookie on it and bounces you to the next one. It isn't pretty. | [
0.5164467692375183,
0.08025766909122467,
0.2578010559082031,
0.35031262040138245,
0.029891733080148697,
-0.3413942754268646,
0.2634851336479187,
0.8045282363891602,
-0.10303594917058945,
-0.446338951587677,
0.27414384484291077,
0.3350152373313904,
-0.2569582462310791,
0.09570372849702835,
... | |
There are some HTML based games (ie bootleggers.us) that have a simple login form and after that your entire game experience revolves around submitting various forms and reading information from the website itself.
My Question is, **what is the best way to go about writing a bot / automate the html-based game using C#... | [
0.5881654024124146,
-0.00642292108386755,
0.12534759938716888,
0.25260376930236816,
-0.11477769911289215,
-0.2077150195837021,
0.36383143067359924,
0.3067564070224762,
-0.22689694166183472,
-0.7109420895576477,
0.037786815315485,
0.8180153369903564,
-0.42057234048843384,
-0.136763721704483... | |
and make automating website interaction easier? Ie filling out forms, submitting forms, reading values from the website, etc? Some library?
You could use Watin: <http://watin.sourceforge.net/> | [
0.655201256275177,
-0.1248142197728157,
0.1400306522846222,
0.3987216651439667,
-0.5548840165138245,
-0.38663408160209656,
0.32376208901405334,
-0.11175097525119781,
-0.22479182481765747,
-0.46961620450019836,
0.0784393846988678,
0.6348799467086792,
-0.21462365984916687,
-0.138389766216278... | |
I am primarily a .NET developer, and in that sphere alone there are at any given time probably close to a dozen fascinating emerging technologies, some of them real game-changers, that I would love to delve into.
Sadly, this appears to be beyond the limits of human capacity.
I read an article by Rocky Lhotka (.NET ... | [
0.7080764770507812,
0.20625557005405426,
-0.13255900144577026,
0.06577464938163757,
0.11574265360832214,
-0.10034053027629852,
-0.012644949369132519,
0.6256966590881348,
-0.40797990560531616,
-0.48659470677375793,
0.20472073554992676,
0.10649552196264267,
0.21139413118362427,
0.31979489326... | |
going to try so hard because it was futile.
It was a surprise to me that true geniuses like Lhotka (who are probably expected to devote a great deal of their time to playing with the latest technology and should be able to pick things up quickly) also feel the burn!
So, how do you guys deal with this? Do you just ch... | [
0.5193204879760742,
0.1294488161802292,
-0.3884328007698059,
0.5093541741371155,
0.20018063485622406,
-0.4254031181335449,
0.1383514255285263,
0.19480547308921814,
-0.16623066365718842,
-0.42892390489578247,
0.06337513029575348,
0.05181337520480156,
0.19491849839687347,
0.20565135776996613... | |
stay close to the cutting edge?
I have been in IT for 30 years now, so perhaps I can offer some perspective. Yes, there is an increasing amount of material to keep abreast of. But the rate of *change* (as in "progress") is not increasing - if anything, it is decreasing. What we are seeing is a *widening* of the field.
... | [
0.5443253517150879,
-0.24170814454555511,
0.6716231107711792,
0.1861274540424347,
-0.19878171384334564,
0.012955744750797749,
-0.13723459839820862,
0.13537579774856567,
-0.428641140460968,
-0.4816737473011017,
0.15819497406482697,
0.36327236890792847,
-0.028359394520521164,
0.2468854486942... | |
a different direction and all are in active use.
Stay on top of this? Forget it - it's not possible. On the other hand, good IT folks can pick up a new language or a new technology in a few weeks at most - no big deal. Try to pick out the genuinely new ideas and learn about them. Ignore all the specific technologies (... | [
0.38420939445495605,
0.09596120566129684,
0.23675383627414703,
0.26117274165153503,
0.08481613546609879,
-0.4800066351890564,
0.40064871311187744,
0.5392948985099792,
-0.39766693115234375,
-0.5634307861328125,
-0.07474172115325928,
0.508456826210022,
0.11664047092199326,
-0.022065367549657... | |
time - did a couple of small, throw-away projects in Ruby on Rails. If a project in this area comes along, the ideas will be the same in whatever environment.
One does occasionally get frustrated. It's not always easy to pick out the truly new ideas amidst all the marketing hype.
All the best...
Brad | [
0.6840717792510986,
0.1609320342540741,
-0.027229446917772293,
0.4750390350818634,
0.4454417824745178,
0.19717174768447876,
0.052964191883802414,
0.15947961807250977,
-0.2297118902206421,
-0.41571542620658875,
0.40135571360588074,
0.5058546662330627,
0.3405176103115082,
0.49047890305519104... | |
For a long time i have tried to work out the best way to access certain site files which i don't wish to be apart of a project or to ease integration with multiple developers (and talents, e.g. designers) on a single project.
A lot of sites i have created have had folders with large amounts of images and other binary ... | [
0.5766801834106445,
0.13061785697937012,
-0.04442252591252327,
0.2431865781545639,
0.022441178560256958,
-0.2849900424480438,
0.15482623875141144,
0.3242669105529785,
-0.4745098352432251,
-0.6291057467460632,
-0.18900781869888306,
0.1695762723684311,
-0.1586487591266632,
0.2879101932048797... | |
virtual directories if you are using visual studio's built in web server.
As far as i see it, ideally, folders containing binaries could be located on a central server and mapped to a project. Alernatively i have considered creating separate sub-domains for each project with which all images / binaries can be referec... | [
0.41125592589378357,
-0.24068905413150787,
0.43758726119995117,
0.4176616072654724,
-0.276764839887619,
-0.09616236388683319,
0.3266299366950989,
0.3666591942310333,
-0.5097926259040833,
-0.5423572659492493,
-0.4581347703933716,
0.2816011905670166,
-0.24392659962177277,
0.2539480924606323,... | |
other source control solutions offer similar functionality. | [
0.2515467405319214,
-0.030770931392908096,
0.13741430640220642,
0.2204149067401886,
-0.09669164568185806,
-0.20778103172779083,
-0.45783108472824097,
-0.13262785971164703,
-0.1553637534379959,
-0.3204214572906494,
-0.5383519530296326,
0.6754028797149658,
-0.0866035670042038,
0.268282651901... | |
My question is related to the command pattern, where we have the following abstraction (C# code) :
```
public interface ICommand
{
void Execute();
}
```
Let's take a simple concrete command, which aims to delete an entity from our application. A `Person` instance, for example.
I'll have a `DeletePersonCommand`,... | [
-0.015908367931842804,
0.1808348149061203,
0.2704828679561615,
0.1648552566766739,
0.12807008624076843,
0.17369240522384644,
0.07118401676416397,
-0.1994013488292694,
-0.2183978259563446,
-0.5677906274795532,
-0.05908393859863281,
0.7186105847358704,
-0.28795623779296875,
0.298387110233306... | |
or setter injection (or equivalent). Perhaps something like this:
```
public class DeletePersonCommand: ICommand
{
private Person personToDelete;
public DeletePersonCommand(Person personToDelete)
{
this.personToDelete = personToDelete;
}
public void Execute()
{
doSomethi... | [
-0.050597548484802246,
-0.34089696407318115,
0.015533321537077427,
0.08068198710680008,
0.3195003271102905,
0.1964825689792633,
0.3538212478160858,
-0.47129058837890625,
-0.10002372413873672,
-0.5173838138580322,
-0.1466081291437149,
0.8245635032653809,
-0.08952082693576813,
0.198065176606... | |
I'm trying to create a horizontal 100% stacked bar graph using HTML and CSS. I'd like to create the bars using `DIVs` with background colors and percentage widths depending on the values I want to graph. I also want to have a grid lines to mark an arbitrary position along the graph.
In my experimentation, I've already... | [
0.5792716145515442,
0.3184078335762024,
0.49429285526275635,
-0.12632867693901062,
-0.27160385251045227,
0.17904981970787048,
-0.028343278914690018,
-0.13017047941684723,
-0.2961377501487732,
-0.6521233320236206,
0.020406296476721764,
-0.10075806826353073,
-0.3156682252883911,
0.1915458887... | |
are floated.
I think that CSS positioning should be able to handle this, but I don't yet know how to do it. I want to be able to specify the position of several elements relative to the top-left corner of their container. I run into this sort of issue regularly (even outside of this particular graph project), so I'd l... | [
0.4563259482383728,
-0.17889368534088135,
0.4508548974990845,
0.1038895770907402,
0.017004594206809998,
-0.16880224645137787,
-0.23234818875789642,
-0.17704254388809204,
-0.3596005141735077,
-0.7123224139213562,
0.11589238792657852,
-0.0923125222325325,
-0.16047605872154236,
-0.06247333809... | |
relative` will layout an element relative to *itself.* In other words, the elements is laid out in normal flow, then it is removed from normal flow and offset by whatever values you have specified (top, right, bottom, left). It's important to note that because it's removed from flow, other elements around it will not s... | [
-0.4053020775318146,
-0.20911778509616852,
0.4694550633430481,
0.0502738282084465,
0.034621745347976685,
0.1102527529001236,
-0.0833854153752327,
0.2969203293323517,
0.09782413393259048,
-0.9184131622314453,
-0.36004579067230225,
0.26495257019996643,
-0.4170815050601959,
0.2653037905693054... | |
`position: absolute` set on it, then it will act as the parent for positioning coordinates for its children.
To demonstrate:
```css
#container {
position: relative;
border: 1px solid red;
height: 100px;
}
#box {
position: absolute;
top: 50px;
left: 20px;
}
```
```html
<div id="container">
<d... | [
-0.22147555649280548,
-0.10035033524036407,
0.7904718518257141,
-0.04858366772532463,
0.29860037565231323,
0.22906547784805298,
-0.08074575662612915,
0.023870913311839104,
0.22081433236598969,
-0.869625449180603,
-0.3310789167881012,
0.10290040820837021,
0.0017162465956062078,
0.4038534462... | |
If I have a `std::vector` or `std::map` variable, and I want to see the contents, it's a big pain to see the nth element while debugging. Is there a plugin, or some trick to making it easier to watch STL container variables while debugging `(VS2003/2005/2008)`?
For vectors, this [thread](http://social.msdn.microsoft.co... | [
0.20545320212841034,
-0.26145312190055847,
0.16275882720947266,
0.015761885792016983,
-0.10763642191886902,
0.005535565782338381,
0.16892223060131073,
0.34779974818229675,
-0.42855456471443176,
-0.6521692872047424,
0.3976232707500458,
0.5199304819107056,
-0.3241777718067169,
0.197873219847... | |
What is the best way to interact with a database using Haskell? I'm accustomed to using some sort of ORM (Django's ORM, hibernate, etc.) and something similar would be nice when creating apps with [HAppS](http://www.happs.org/).
**Edit:** I'd like to be free to choose from Postgresql MySql and SQLite as far as the act... | [
0.2814835011959076,
0.02038448303937912,
0.22609642148017883,
0.22365862131118774,
-0.11252091825008392,
-0.1570144146680832,
-0.08541054278612137,
0.05882413685321808,
-0.060843657702207565,
-0.6553217172622681,
0.3190770149230957,
0.600752055644989,
-0.3453872799873352,
-0.18083497881889... | |
structures, and then gives you type safe ways to query. It's been around for quite a while and the community opinion is that it's good and stable.
To use it, you'll need some underlying Haskell DB library like HSQL.
Good luck! | [
0.14907489717006683,
0.0998852327466011,
0.3701356053352356,
0.042780183255672455,
-0.0008431696915067732,
-0.613682746887207,
0.36773210763931274,
0.05957922711968422,
-0.0806957483291626,
-0.7029096484184265,
-0.03042100928723812,
0.20599336922168732,
-0.08955053240060806,
0.137596428394... | |
As a pet-project, I'd like to attempt to implement a basic language of my own design that can be used as a web-scripting language. It's trivial to run a C++ program as an Apache CGI, so the real work lies in how to parse an input file containing non-code (HTML/CSS markup) and server-side code.
In my undergrad compiler... | [
0.7095035910606384,
0.11193192005157471,
-0.020063837990164757,
0.1678226888179779,
-0.1701279580593109,
0.0763138011097908,
0.06850077956914902,
-0.21900589764118195,
0.010183606296777725,
-0.5434985756874084,
0.0792943611741066,
0.7795071005821228,
-0.4681427776813507,
-0.100006908178329... | |
flex scanner tokenizes the input, and passes the tokens to the Bison parser.
The difference between that and what I'd like to do is that like PHP, this language could have plain HTML markup and the scripting language interspersed like the following:
```
<p>Hello,
<? echo "World ?>
</p>
```
Am I incorrect in assumin... | [
0.2896008789539337,
-0.3742713928222656,
0.2927856147289276,
-0.0020589842461049557,
-0.44385582208633423,
-0.006026912946254015,
-0.16455158591270447,
-0.49996623396873474,
-0.25945475697517395,
-0.8570324182510376,
0.14191186428070068,
0.39717063307762146,
-0.12596800923347473,
-0.418046... | |
the markup in the file.
- Control is returned to the first scanner that continues this general pattern.
Basically, the first scanner only differentiates between Markup (which is returned directly to the browser unmodified) and code, which is passed to the second scanner, which in turn tokenizes the code and passes the... | [
0.11490899324417114,
-0.043257132172584534,
0.3111799955368042,
0.14939752221107483,
-0.2618008553981781,
-0.07481607794761658,
0.1098056212067604,
-0.19827868044376373,
0.18088801205158234,
-0.5707751512527466,
-0.4274027347564697,
0.23643988370895386,
-0.2069423645734787,
-0.020251328125... | |
return PHP_TOKEN; }
<PHP>">?" { BEGIN (0); }
[a-zA-Z]* { return HTML_TOKEN; }
```
You start off in state 0, use the BEGIN macro to change states.
To match a RE only while in a particular state, prefix the RE with the state name surrounded by angle-brackets.
In the example above, "PHP" is state. "PHP\_TOK... | [
0.161942720413208,
0.01556717325001955,
0.5286945700645447,
-0.255639910697937,
-0.2583194375038147,
0.08062746375799179,
0.48495396971702576,
-0.475900799036026,
-0.07262171804904938,
-0.4624343812465668,
-0.15481412410736084,
0.17716316878795624,
-0.05732885003089905,
0.44987189769744873... | |
In Python specifically, how do variables get shared between threads?
Although I have used `threading.Thread` before I never really understood or saw examples of how variables got shared. Are they shared between the main thread and the children or only among the children? When would I need to use thread local storage t... | [
0.47773653268814087,
-0.16679491102695465,
-0.3285728096961975,
0.21184231340885162,
-0.2087508738040924,
-0.2994453012943268,
0.1029750406742096,
0.3371007740497589,
-0.5115317106246948,
-0.33255404233932495,
-0.05136692896485329,
0.5735548138618469,
-0.4872063398361206,
0.121011309325695... | |
own set of locals, and threads are always separate function calls.) And even then, only the variables themselves (the names that refer to objects) are local to the function; objects themselves are always global, and anything can refer to them.
The `Thread` object for a particular thread is not a special object in this ... | [
-0.034291937947273254,
-0.20902222394943237,
0.22166170179843903,
0.19796666502952576,
-0.030068067833781242,
-0.31162235140800476,
0.22360555827617645,
0.19732901453971863,
-0.4600139260292053,
-0.4977395236492157,
-0.09182154387235641,
0.24931582808494568,
-0.4398239552974701,
0.52752822... | |
all threads must of course share this very same lock, or it wouldn't be very effective.
If you want actual thread-local storage, that's where `threading.local` comes in. Attributes of `threading.local` are not shared between threads; each thread sees only the attributes it itself placed in there. If you're curious abo... | [
0.13322004675865173,
0.1611645370721817,
0.16452071070671082,
0.09523516893386841,
0.23594211041927338,
-0.1567675620317459,
-0.14413538575172424,
0.3646625280380249,
-0.5394928455352783,
-0.49002209305763245,
-0.292245477437973,
0.24338170886039734,
-0.2065848857164383,
0.4552077949047088... | |
What are the major reasons for using [WinDbg](http://en.wikipedia.org/wiki/WinDbg) vs the Visual Studio debugger?
And is it commonly used as a complete replacement for the Visual Studio debugger, or more for when the need arises.
If you are wondering why you should use windbg over Visual Studio, then you need to read ... | [
-0.008033315651118755,
0.23927521705627441,
0.19937177002429962,
-0.035060569643974304,
-0.3159339725971222,
-0.28578466176986694,
0.37937837839126587,
-0.09065239876508713,
-0.2568766176700592,
-0.6998994946479797,
-0.057601697742938995,
0.7237536907196045,
-0.19428281486034393,
0.1111389... | |
the heap for debugging memory overwrites.
You don't actually need to run the install, you can just copy the files over and be ready to go. Also it installs adsplus.vb, so you can take mini-dumps of running processes. It is also very easy to setup to perform remote debugging. There is nothing better than being able to... | [
0.35374391078948975,
0.12891806662082672,
-0.11032550036907196,
0.24073711037635803,
-0.31328248977661133,
-0.02313724346458912,
0.22443042695522308,
-0.2207038253545761,
-0.33859023451805115,
-0.7976316809654236,
0.3859879970550537,
0.6224709749221802,
-0.16705888509750366,
0.070229589939... | |
in a very ugly situation, windbg is the only way to go. Spending some time learning windbg is a great investment. Also if you look at crash dumps there are two great resources, <http://www.dumpanalysis.org/blog> and <http://blogs.msdn.com/ntdebugging/default.aspx> that do all their debugging using windbg. | [
0.29216277599334717,
0.18022966384887695,
-0.09511275589466095,
0.1445969045162201,
-0.21040695905685425,
-0.39427733421325684,
0.43844321370124817,
-0.060045138001441956,
-0.08152096718549728,
-0.5404496192932129,
-0.05538373813033104,
0.3752060830593109,
-0.011793422512710094,
-0.0835579... | |
How do you deal with source control management and automated deployment (configuration management) of database tables. I work in a SQL Server environment and it's pretty easy to script out drop and create files for stored procedures/triggers/functions even jobs. It's also easy to handle scripting out the creation of a ... | [
0.5586880445480347,
0.15828374028205872,
-0.17460404336452484,
0.2148781567811966,
-0.04680613428354263,
-0.24987439811229706,
-0.0831560418009758,
-0.14359788596630096,
-0.22661440074443817,
-0.4424225091934204,
0.29113662242889404,
0.5540702939033508,
-0.4368533194065094,
-0.066884011030... | |
and backfill after updating the new changed table? (could be rough if there is a lot of data)
Any suggestions would be greatly appreciated.
You can automatically create the initial creation script, but ALTER scripts really need to be hand-coded on a case-by-case basis, because in practice you need to do custom stuff i... | [
0.3193245828151703,
0.0588720366358757,
0.29867058992385864,
0.08129240572452545,
0.11208246648311615,
0.054054614156484604,
-0.14685572683811188,
-0.18556514382362366,
-0.27168944478034973,
-0.7722740769386292,
-0.06848238408565521,
0.7900238633155823,
-0.2762436866760254,
-0.148035287857... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.