text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
spaces MUST NOT have their width adjusted: they are really fixed).
When you are rendering a document whose page layout is already precomputed (with known fonts and with exact metrics), the thin space (U+2009) is already what you want (because you won't have to worry about the breaking behavior.
Unfortunately, Unicode... | [
-0.36965346336364746,
0.07875428348779678,
0.6971612572669983,
0.1096830666065216,
-0.22280943393707275,
0.09401843696832657,
0.004016345366835594,
-0.0030517952982336283,
-0.3064933717250824,
-0.6824691891670227,
-0.4790314733982086,
0.2501599192619324,
-0.11202161759138107,
0.02496793307... | |
the SGML symbolic name "nnbsp" for character references (but the mapping of this named character entity to U+202F is not part of any HTML or XML standard, so this named entity should not be used as well, unless your document defines it explicitly in its embedded DTD !)
But unfortunately, most browsers have forgotten t... | [
0.02118978649377823,
-0.11343339830636978,
0.8062431812286377,
-0.030696114525198936,
-0.2251814901828766,
-0.5220447778701782,
-0.1291297823190689,
-0.06118551641702652,
-0.5993330478668213,
-0.3475511372089386,
-0.22977259755134583,
0.21013858914375305,
-0.3798106908798218,
0.12218210101... | |
of the UCD).
However, browsers SHOULD NOT depend on the fact that U+202F is defined in a font, instead, they SHOULD provide a fallback to U+2009 (THIN SPACE) when rendering it, each time U+202F is not mapped in the current font, but U+2009 is mapped in the same font (this is generally the case with many fonts).
So th... | [
-0.12405835092067719,
0.15829257667064667,
0.9471649527549744,
-0.1429058462381363,
0.11596979945898056,
-0.17705871164798737,
-0.052277181297540665,
0.10534416139125824,
-0.22418196499347687,
-0.9606605768203735,
-0.41593530774116516,
0.4052889347076416,
-0.16168878972530365,
-0.115726515... | |
whitespaces. Of course, all new fonts should map U+202F to the same glyph as U+2009.
Given that the thin space (U+2009, or ` `) is very well supported in many fonts, and has the correct width for rendering French texts with fonts made with French typographic metrics, or for rendering English texts made with Eng... | [
0.06797811388969421,
0.06095201522111893,
0.8255916237831116,
-0.018262900412082672,
-0.15478567779064178,
0.121589295566082,
0.09034652262926102,
-0.015185542404651642,
-0.36909469962120056,
-1.0122668743133545,
-0.3494122624397278,
0.23010222613811493,
-0.13695774972438812,
-0.1553652882... | |
than changing the font-size to display a pseudo half-space (because this is not correct with many fonts for which this will still be too large, and also because this does not work as expected in spans of text that have colored backgrounds: changing the font-size modifies the line-height).
So please use this code inste... | [
0.2577288746833801,
-0.29019665718078613,
0.6030150651931763,
-0.07965417206287384,
-0.12842896580696106,
-0.2595008611679077,
0.17456403374671936,
-0.07445217669010162,
-0.3326171636581421,
-0.9545919299125671,
-0.322177916765213,
0.48900145292282104,
-0.3129194974899292,
-0.0180737730115... | |
space symbolically as ` ` rather than forcing an exact Unicode code point like ` ` : the named entity can be remapped by the renderer, or according to user preferences to another working whitespace.
Note that MS-word really uses U+2009 and not U+202F for representing its own *fine*. It is correct, given ... | [
0.1728237271308899,
0.11312191933393478,
0.7537165284156799,
0.03629649057984352,
0.038588996976614,
0.15088586509227753,
0.29802751541137695,
-0.24077582359313965,
-0.39692625403404236,
-0.8183712363243103,
-0.2340412735939026,
0.22664199769496918,
-0.1380337029695511,
0.19562405347824097... | |
colors except in `<code>` sections like here, which use monospace fonts) :
`*Exemple de « fine » insécable française correctement codée !*`
* The same **without** the `<code>` container does not display the background color, but it does use the normal proportional fonts, so that the thin space is effectively rendered... | [
-0.08129177987575531,
-0.25971519947052,
0.34981435537338257,
-0.08936905115842819,
0.2146870493888855,
0.3411581218242645,
0.24864386022090912,
-0.08705554902553558,
-0.36669862270355225,
-0.8543689250946045,
-0.3684033751487732,
0.6228947043418884,
-0.3383769392967224,
-0.018074691295623... | |
but may be too narrow for your fonts, and may not exhibit the non-breaking property):
*Exemple de « fine » insécable française ; correctement codée !* (hmmm... not really)
* Example using ` ` (which is almost always too large):
*Exemple de « fine » insécable française ; correctement codée !* (hmm... not really) | [
0.039059899747371674,
0.018315201625227928,
0.22894605994224548,
0.027896465733647346,
0.1358027309179306,
0.2515110671520233,
0.4304831027984619,
0.12523885071277618,
-0.44485458731651306,
-0.6179725527763367,
-0.7731714248657227,
0.5264413356781006,
-0.23797568678855896,
-0.3246324956417... | |
I am refactoring a page that uses `<body onload="myJS();">` to a user control. I understand I can do it using server side script registration on load.
If I want to do it on the client side (ascx), how would I do this?
Taken from <http://snipplr.com/view/3116/cross-browser-add-event-listener/>
```
// Cross-browser imp... | [
0.14201243221759796,
0.03123583272099495,
0.8213114142417908,
-0.4437618553638458,
-0.058449216187000275,
-0.030486803501844406,
0.4517148435115814,
-0.8449499607086182,
0.06870526075363159,
-0.49138468503952026,
-0.29788726568222046,
0.7528781294822693,
-0.31359389424324036,
-0.0458103418... | |
you could just use jquery for this and a lot of other things. | [
0.46634697914123535,
-0.02466585859656334,
0.06330229341983795,
0.49837741255760193,
0.018892547115683556,
-0.1364077776670456,
-0.2412000447511673,
0.7032066583633423,
-0.20853464305400848,
-0.3553672432899475,
0.25314366817474365,
0.3719877600669861,
0.33709776401519775,
0.03058154881000... | |
I occasionally get an exception in a JTextArea that I'm updating with JTextArea.append() ...
```
java.lang.IllegalArgumentException: Invalid remove
at javax.swing.JTextArea.replaceRange(Unknown Source)
at sun.plugin.ConsoleWindow$24.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Sou... | [
0.09310674667358398,
0.10895650833845139,
0.3753090798854828,
-0.08840236067771912,
0.11167112737894058,
-0.09826410561800003,
0.6444450616836548,
-0.38522928953170776,
-0.07974689453840256,
-0.6301192045211792,
-0.014673697762191296,
0.6160411238670349,
-0.44888824224472046,
0.09699051082... | |
usefully used in a thread-safe manner. `JTextArea` will have some thread-safety claims removed in JDK7. Stick to updating Swing components and Swing text objects in the AWT Event Dispatch Thread (EDT). | [
0.35659968852996826,
-0.16621547937393188,
0.10595132410526276,
-0.03344421088695526,
-0.24260684847831726,
-0.42643457651138306,
0.26434820890426636,
-0.05957532301545143,
-0.2609448730945587,
-0.5906328558921814,
-0.21876002848148346,
0.4078778326511383,
-0.27512744069099426,
-0.36260467... | |
What best practice or strategy would you use to enable bulk insert/update in an asp.net gridview control with paging enabled?
Say for e.g. you have about 10000 records and this data gets populated when the page loads and this happens in chunks of say 100 records per webservice request.
To enable editing on these rows... | [
0.2924725115299225,
-0.24980990588665009,
0.5314555764198303,
0.24841400980949402,
0.10368118435144424,
-0.01805046759545803,
0.06551506370306015,
-0.2872973680496216,
-0.3971502482891083,
-0.7265210747718811,
0.08164163678884506,
0.44986775517463684,
-0.013008920475840569,
0.0356007106602... | |
bound to the gridView as below.
gridCustomers.DataSource = customers;
gridCustomers.DataBind();
Some points I would think of is outlined below and requires experts inputs...
* Disable viewstate for gridview (as this will slow down the performance of the page).
* Use session object to persist the change (OR what woul... | [
0.39985594153404236,
-0.2117740958929062,
0.7356685996055603,
0.17322298884391785,
-0.14766821265220642,
-0.3185245990753174,
0.048687662929296494,
-0.33900314569473267,
-0.1924317181110382,
-0.8411341309547424,
0.040727801620960236,
0.7304152250289917,
-0.21303293108940125,
0.183584243059... | |
article on Code Project](http://www.codeproject.com/KB/webforms/BulkEditGridView.aspx).
UPDATE:
I found a better implementation of the same kind of control [here](http://blogs.msdn.com/mattdotson/articles/490868.aspx). | [
0.28687676787376404,
-0.3641471266746521,
0.021356923505663872,
0.39947736263275146,
-0.1399940699338913,
-0.11783937364816666,
0.16867244243621826,
-0.3423026502132416,
-0.276180624961853,
-0.352791428565979,
-0.17148403823375702,
0.3694360852241516,
-0.032320503145456314,
-0.072046369314... | |
MVVM is most commonly used with WPF because it is perfectly suited for it. But what about Windows Forms? Is there an established and commonly used approach / design pattern like this for Windows Forms too? One that works explicitly well with Windows Forms? Is there a book or an article that describes this well? Maybe M... | [
0.29042744636535645,
-0.17147494852542877,
0.44784343242645264,
0.15276019275188446,
-0.2958148717880249,
-0.2798275351524353,
0.034669410437345505,
-0.4531492590904236,
-0.5797785520553589,
-0.6265210509300232,
0.1043432354927063,
0.6072201728820801,
-0.41716766357421875,
-0.1515721678733... | |
to go about creating it.
[Agile Principles, Patterns, and Practices in C#](https://rads.stackoverflow.com/amzn/click/com/0131857258)...
You can get the source code at
[Source Code](http://www.objectmentor.com/PPP/)
EDIT:
-----
There are two variations of the MVP pattern
(a) Passive view and (b) supervising contro... | [
0.13921375572681427,
-0.32769906520843506,
0.39118751883506775,
0.06089382246136665,
-0.3012329339981079,
-0.13092932105064392,
0.162588968873024,
-0.13012267649173737,
-0.40671148896217346,
-0.6688942909240723,
-0.041478533297777176,
0.35893529653549194,
-0.16606783866882324,
0.0703517794... | |
example of dealing with dropdown list
[MVP - DropDownList](http://blog.jpboodhoo.com/CommentView,guid,5211de5c-1a52-410f-8ce6-ac8d5d8f57d4.aspx)
Simple treeview binding example (poor man's binding). You can add any treeview specific logic in BindTree().
-----------------------------------------------------------------... | [
-0.27136269211769104,
-0.06733232736587524,
0.7063766717910767,
0.12705130875110626,
-0.14643259346485138,
-0.017450086772441864,
0.5032980442047119,
-0.16953179240226746,
-0.4580455720424652,
-0.6460135579109192,
-0.2752878963947296,
0.43864673376083374,
-0.3657815456390381,
0.13456711173... | |
// Binding logic goes here....
}
}
public class YourPresenter
{
private IYourView view;
public YourPresenter(IYourView view)
{
this.view = view;
}
public void OnLoad()
{
// Get data from service.... or whatever soruce
Model model = service.GetData(...);
view.BindTree... | [
0.15098606050014496,
-0.25319960713386536,
0.6372242569923401,
-0.16619889438152313,
-0.06095697358250618,
-0.07157866656780243,
0.3211701512336731,
-0.32824021577835083,
-0.30734655261039734,
-0.7046297788619995,
-0.3169749081134796,
0.6528056859970093,
-0.5292393565177917,
0.269710093736... | |
I'm curious just how expensive in as far as resources go is UITableView's reloadData? I have an app which will make roughly 10 subsequent HTTP requests, and as it gets data / preps, it reloads the tableView. As the data set grows larger and larger, it's becoming very sluggish. I'm trying to figure out if it's because o... | [
0.4938480257987976,
0.07413303852081299,
0.6419446468353271,
0.021487198770046234,
-0.019915146753191948,
-0.043485961854457855,
0.3064619302749634,
0.03373592346906662,
-0.21342483162879944,
-0.8626546859741211,
0.12788482010364532,
0.35184207558631897,
-0.004951718728989363,
0.2952878773... | |
be doing any work except populating the `UITableViewCell` instance with the data it needs to display.
You should be using cached `UITableViewCell`s so you don't have to allocate a new cell each time. If you can do your parsing and such in a separate thread and make the parsed data, ready to present, accessible to `ce... | [
0.18192332983016968,
-0.11013268679380417,
0.11582718789577484,
0.13310137391090393,
0.02971780113875866,
-0.15021705627441406,
0.10612712055444717,
0.04102403298020363,
-0.27874141931533813,
-0.7891868352890015,
-0.07331909984350204,
0.4775121212005615,
-0.31687846779823303,
0.12687246501... | |
better.
Hope that gets you moving in the right direction. | [
0.5273494720458984,
-0.04256850481033325,
-0.07815028727054596,
0.033128805458545685,
-0.109122134745121,
-0.1639169454574585,
0.43376806378364563,
0.5207673907279968,
-0.08888620138168335,
-0.6504413485527039,
0.2462468296289444,
0.2347012758255005,
0.41689014434814453,
-0.300467222929000... | |
I am hoping that someone can help me with a problem I've got at the moment using Compact Framework.Net 2 SP 2.
At the moment I have a UI with a series of text boxes and each textbox displays the contents of a database field. These are shown one beneath another with a scroll bar on the right hand side of the form. Each... | [
0.39497873187065125,
0.10466369241476059,
0.6272165775299072,
0.1801043003797531,
-0.0676053985953331,
0.03082861378788948,
0.014464912936091423,
-0.17486689984798431,
0.07948627322912216,
-0.8035376071929932,
0.1827392429113388,
0.38044020533561707,
0.01586638018488884,
0.0696915984153747... | |
bars on each textbox.
At the moment I am been able to do this in a test application.
---
### Screenshot:
[see screenshot for output http://morrislgn.brinkster.net/SO/screenshot.jpg](http://morrislgn.brinkster.net/SO/screenshot.jpg)
---
### My code:
```
'Text used in this example:
'TextBox1qwertyuiop lkjhgfdsazxc... | [
-0.06977390497922897,
0.18885479867458344,
0.7115020751953125,
-0.25607964396476746,
-0.306460440158844,
0.5020174980163574,
0.4513368010520935,
-0.5647528171539307,
-0.22700569033622742,
-0.5499413013458252,
-0.18075275421142578,
0.1898135393857956,
-0.3329600691795349,
-0.171098336577415... | |
piFontSize = 6
ElseIf Me.CheckBox2.Checked.Equals(True) Then
piFontSize = 8
ElseIf Me.CheckBox3.Checked.Equals(True) Then
piFontSize = 12
Else
piFontSize = 10
End If
Dim pobjFont As New Font("Tahoma", piFontSize, FontStyle.Regular)
'Calculate the height of one line.
pobjSize = pobjGraphic.MeasureString("H... | [
0.0886140838265419,
-0.23395892977714539,
1.010284423828125,
-0.2661456763744354,
-0.2952258884906769,
0.4981810450553894,
0.4788191020488739,
-0.5861591696739197,
0.023144328966736794,
-0.45277342200279236,
-0.23224292695522308,
0.3500099182128906,
-0.38722121715545654,
-0.075846754014492... | |
by the width of the textbox
piLines = Graphics.FromImage(b).MeasureString(Me.Textbox2.Text, pobjFont).Width / Me.Textbox2.Width
'Value of piLines returned: 2
If piLines = 0 Then
piLines = 1
End If
'Calculate the size of the text to be displayed using the margins, height of one line and number of lines.
Me.Textbox... | [
0.024766121059656143,
-0.06021248921751976,
0.8957681059837341,
-0.29761213064193726,
-0.20783419907093048,
0.39196354150772095,
0.2632206976413727,
-0.5600885152816772,
-0.21791526675224304,
-0.6992268562316895,
0.04454189911484718,
0.232864111661911,
-0.1527806520462036,
-0.1143481209874... | |
<Runtime.InteropServices.DllImport("coredll.dll")> _
Private Function SendMessage( _
ByVal hwnd As IntPtr, ByVal msg As Integer, _
ByVal wParam As Integer, ByVal lParam As Integer) As Integer
End Function
<Runtime.InteropServices.DllImport("coredll.dll")> _
Private Function GetCapture() As IntPtr
End Function
... | [
-0.12645164132118225,
-0.28811293840408325,
0.9533597230911255,
-0.29366353154182434,
-0.010275048203766346,
0.28151121735572815,
0.244327574968338,
-0.42511430382728577,
-0.24026687443256378,
-0.518545389175415,
-0.6674350500106812,
0.40249407291412354,
-0.5248520374298096,
0.284243077039... | |
GetCapture()
ptxtCountBox.Capture = False
' Get the count of the lines in the box.
Dim plCount As Integer = SendMessage(ptxtCountBox.Handle, EM_GETLINECOUNT, 0, 0)
' Count the number of return lines as we minus this from the total lines to take.
plCount = plCount - (CharCount(p... | [
-0.016425270587205887,
-0.5909728407859802,
0.9142164587974548,
-0.32875025272369385,
0.18084575235843658,
0.25983476638793945,
0.4012942612171173,
-0.5473372936248779,
-0.2288748025894165,
-0.2573137879371643,
-0.2543259561061859,
0.38911184668540955,
-0.7001070976257324,
0.02626793272793... | |
hnd = Nothing
' Return the line count.
Return plCount
Catch ex As Exception
GenerateError(msCLASS_NAME, "GetNumberOfLines", ex.Message.ToString)
End Try
End Function
```
Thanks,
Morris
The best practice is to have your implementation of `cellForRowAtIndexPath:` do as little work as p... | [
0.10257703065872192,
-0.032878659665584564,
0.6365225911140442,
-0.04680906608700752,
-0.06047212705016136,
-0.5259055495262146,
0.48471373319625854,
-0.20944218337535858,
-0.30686280131340027,
-0.567597508430481,
-0.167428120970726,
0.44111716747283936,
-0.2318132221698761,
0.373313456773... | |
to allocate a new cell each time. If you can do your parsing and such in a separate thread and make the parsed data, ready to present, accessible to `cellForRowAtIndexPath:`, you shouldn't have any performance problems.
You didn't say if you were using a custom `UITableViewCell` subclass, but if you are, deep view hie... | [
0.19570547342300415,
-0.2548084855079651,
0.2269946187734604,
0.19964919984340668,
-0.05246591940522194,
0.012729010544717312,
0.11800429970026016,
0.054138630628585815,
-0.40530863404273987,
-0.6277766823768616,
-0.04823996126651764,
0.3805916905403137,
-0.31097835302352905,
0.17174442112... | |
I'd like to write a simple application which keeps track of its current memory usage, number of created objects etc. In C++ I'd normally override the new operator, but for obvious reasons I can't do this in C#. Is there any way to do this without using a profiler?
You might want to start with the Garbage Collector. MSD... | [
0.43908950686454773,
-0.046729184687137604,
0.07848101854324341,
0.15811963379383087,
-0.20699898898601532,
-0.2883910536766052,
-0.049504902213811874,
0.019682250916957855,
-0.544050931930542,
-0.5947349667549133,
0.14649565517902374,
0.3672622740268707,
-0.2524983286857605,
0.07961154729... | |
of objects of your loaded assembly and you'll have to probably use a profiler or write something yourself. | [
0.6063092947006226,
0.23478567600250244,
0.13088011741638184,
0.22525697946548462,
-0.20993073284626007,
0.0016775501426309347,
-0.056309837847948074,
0.04639129713177681,
-0.435290664434433,
-0.46111559867858887,
0.07049397379159927,
0.4235726594924927,
-0.2803010046482086,
0.145350322127... | |
I'm working in VS2008 and C#, and I'm looking for a (free) code generator tool to generate a property with getter and setter, as well as the backing private field to go with. The template thingy in VS does not make the field to go with it. Just looking for something a little bit better.
I once saw a web site where you... | [
0.6687709093093872,
-0.02568521536886692,
0.18094977736473083,
0.1604737788438797,
-0.17788489162921906,
-0.2271377444267273,
-0.25699397921562195,
-0.07594773918390274,
-0.16619548201560974,
-0.7005113959312439,
0.1457938700914383,
0.6680627465248108,
-0.2390526831150055,
0.17556230723857... | |
version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>prop</Title>
<!-- the shortcut below will show in your intellisense
window - set it to w... | [
0.08590596914291382,
-0.7893840670585632,
0.6996747255325317,
0.1235421895980835,
-0.0790274515748024,
-0.0011668511433526874,
-0.007465718779712915,
0.13378210365772247,
-0.06024996191263199,
-0.7272757887840271,
-0.5368736386299133,
0.21840623021125793,
-0.13072390854358673,
0.0886357203... | |
<Shortcut>_prop</Shortcut>
<Description>Code snippet for a property</Description>
<Author>Andrew</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations> | [
0.5693705081939697,
-0.48702725768089294,
0.21134038269519806,
0.12028498202562332,
-0.05132812634110451,
0.5164966583251953,
-0.05727478116750717,
-0.4061697721481323,
-0.6252073049545288,
-0.6014083623886108,
-0.35390210151672363,
-0.13440774381160736,
-0.1817806512117386,
0.341401040554... | |
<Literal>
<ID>type</ID>
<Default>String</Default>
<ToolTip>property type</ToolTip>
</Literal> | [
0.18622784316539764,
-0.0314001627266407,
-0.1556435525417328,
-0.035496994853019714,
-0.08324334025382996,
-0.13882891833782196,
-0.16478732228279114,
-0.2840860188007355,
0.006256345193833113,
-0.3916260004043579,
-0.5478668212890625,
0.6350626945495605,
-0.12880726158618927,
-0.07821778... | |
<Literal>
<ID>pname</ID>
<Default>_name</Default>
<ToolTip>private field name</ToolTip>
</Literal> | [
0.029531441628932953,
-0.08376138657331467,
-0.01882956363260746,
-0.08830374479293823,
-0.034167204052209854,
0.0644097700715065,
-0.3251965045928955,
-0.03910054638981819,
0.08103615790605545,
-0.2958303987979889,
-0.5214331746101379,
0.6086616516113281,
-0.18886424601078033,
-0.19247350... | |
<Literal>
<ID>name</ID>
<Default>Name</Default>
<ToolTip>property name</ToolTip>
</Literal>
</Declarations> | [
0.24040155112743378,
0.10135143250226974,
-0.13651344180107117,
-0.03887083753943443,
-0.06781098246574402,
-0.12819208204746246,
-0.2470160722732544,
-0.26853588223457336,
-0.0761515200138092,
-0.33476027846336365,
-0.48323705792427063,
0.5691179037094116,
-0.08601555973291397,
0.07441850... | |
<Code Language="csharp">
<![CDATA[$type$ $pname$;
public $type$ $name$
{
get { return this.$pname$; }
set { this.$pname$ = value; } | [
0.14734555780887604,
0.02224493771791458,
0.31595712900161743,
-0.149020254611969,
0.1565369963645935,
-0.07213442027568817,
0.2445915937423706,
-0.32194286584854126,
-0.15118816494941711,
-0.5336757898330688,
-0.5728045701980591,
0.32707634568214417,
-0.39890211820602417,
-0.0906262248754... | |
}$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
```
Save this in a file called `whatever.snippet` in this location:
> `"C:\Documents and Settings\<YOU>\My Documents\Visual Studio 2005\Code Snippets\Visual C#\My Code Snippets"` | [
0.3337891697883606,
-0.25737330317497253,
0.37605446577072144,
0.1654217690229416,
0.37931835651397705,
0.2544855773448944,
-0.04937346279621124,
0.18700172007083893,
-0.4197821617126465,
-0.7527608275413513,
-0.10386922955513,
0.06334197521209717,
0.023181093856692314,
0.09372735023498535... | |
Is there a simple solution to do the equivalent of Java's comments:
```
<%-- this is a comment inside a template, it does not appear in the output HTML --%>
```
Even if you use short php tags, you still have to wrap the comments with comment syntax, on top of the php tags:
```
<? /* this is a comment of the html te... | [
0.4150717556476593,
0.061379242688417435,
0.05410495027899742,
-0.013273208402097225,
-0.308178186416626,
-0.10926553606987,
-0.0466022826731205,
-0.09924487769603729,
-0.21469448506832123,
-0.6978051066398621,
0.014739900827407837,
0.4030035138130188,
-0.6009699702262878,
-0.2332423627376... | |
run a regexp right?
The reason for my question is simply that in a MVC framrwork, using components, and re-usable html templates (think YUI), I need to document clearly those templates, in a readable way..
Not that I know of, but the short-tag plus the block comments are very easy - about as easy to type as the JSP co... | [
0.5727139711380005,
-0.10576742887496948,
0.29477643966674805,
0.012863999232649803,
-0.21411405503749847,
-0.18006649613380432,
0.2984411120414734,
0.2131308913230896,
-0.12295147031545639,
-0.3620210289955139,
-0.051754429936409,
0.8344684839248657,
-0.6034780740737915,
-0.31342014670372... | |
I'm just curious what peoples' thoughts are on this topic. Let's say I have an Array of Objects, and I want to loop through them to see if the Objects contain certain values, and if so, I want to stop the loop. Which is better practice - a for loop with a break, or a conditional loop?
The pseudo-code in the example I ... | [
0.016447197645902634,
0.23377621173858643,
-0.11785867810249329,
-0.18558214604854584,
-0.4348756670951843,
0.07258277386426926,
0.5095174312591553,
-0.09279568493366241,
-0.12928780913352966,
-0.28555911779403687,
-0.3714621365070343,
0.30829960107803345,
-0.4433819353580475,
-0.043490421... | |
for (i = 0; i < arrayLen; i++)
{
if (myArray[i]["name"] == "baxter"
&& myArray[i]["location"] == "milwaukee")
{
isBaxterInMilwaukee = true;
barkTwice();
break;
}
}
```
conditional loop:
```
var i:int;
var isBaxterInMilwaukee:Boolean;
while (!isBaxterInMilwaukee &&... | [
-0.1324787139892578,
0.11682315170764923,
0.11158394813537598,
-0.3879402279853821,
0.2538302540779114,
0.17941631376743317,
0.8590638637542725,
-0.4312058091163635,
0.03718263655900955,
-0.3437487781047821,
-0.4864467680454254,
0.3377297818660736,
-0.3423572778701782,
0.30443906784057617,... | |
isBaxterInMilwaukee = true;
barkTwice();
}
i++;
}
```
**In short, you should go with whichever version is the easiest to read and maintain.**
In slightly older times, I know breaking out of a loop was considered to be a no-no (on par with a goto statement). Loops were supposed to break on the loop ... | [
0.12533344328403473,
-0.20483073592185974,
-0.258364200592041,
-0.03023194894194603,
-0.3336336314678192,
-0.34376752376556396,
0.8482268452644348,
-0.08991284668445587,
-0.20592039823532104,
-0.14081251621246338,
-0.338049054145813,
0.2454371601343155,
-0.3416828215122223,
0.2805834710597... | |
jump statement at the end. Multiple conditional-jump statements in the block make it exceedingly hard to debug; thus they were to be avoided and combined into one at the end.)
I feel this idea seems to be changing a bit today, especially with foreach loops and the managed world; it's really a matter of style now. Brea... | [
0.3223152160644531,
-0.043151386082172394,
-0.14370907843112946,
-0.034630898386240005,
-0.03391867130994797,
-0.27570641040802,
0.557305097579956,
-0.0328717976808548,
-0.26991626620292664,
-0.18486586213111877,
-0.23892712593078613,
0.2852407395839691,
-0.2223614752292633,
0.041120141744... | |
loop, I consider the code below to be a *lot* easier to read than its while-loop brother:
```
bool isBaxterInMilwaukee;
foreach (var item in myArray)
{
if (item.name == "baxter" && item.location == "milwaukee")
{
isBaxterInMilwaukee = true;
barkTwice();
break;
}
}
```
How... | [
0.28297320008277893,
0.13979730010032654,
-0.05266188830137253,
-0.12613891065120697,
0.09362410008907318,
-0.00602230429649353,
0.7879036664962769,
-0.10275473445653915,
-0.3136340081691742,
-0.385002076625824,
-0.2260129451751709,
0.05229689180850983,
-0.509376585483551,
0.43013754487037... | |
find.
---
**Arguably, this whole thing should be refactored into its own function** which doesn't `break` on found, but actually `return`s the result (feel free to use the for-loop version instead):
```
bool isBaxterInMilwaukee(Array myArray)
{
foreach (var item in myArray)
{
if (item.name == ... | [
-0.040512148290872574,
0.1113007590174675,
0.17400023341178894,
-0.13845722377300262,
0.5393954515457153,
-0.026900945231318474,
0.6703929901123047,
-0.167850062251091,
-0.15061938762664795,
-0.5828893780708313,
-0.06818826496601105,
0.3424183130264282,
-0.35977908968925476,
0.460957646369... | |
}
}
return false;
}
```
As Esko Luontola pointed out, it would probably be best to move the call to `barkTwice()` outside of this function as the side-effect is not evident from the function's name, nor related to finding Baxter in every case. (Or add a boolean parameter `BarkTwiceIfFound` and change the line... | [
0.09342625737190247,
-0.0611870251595974,
-0.08665305376052856,
-0.11659909784793854,
0.2542010247707367,
-0.08295641094446182,
0.7029542326927185,
-0.028356481343507767,
-0.22065380215644836,
-0.19100309908390045,
-0.2978060245513916,
0.6219210028648376,
-0.6319786310195923,
0.21629475057... | |
in a for-loop definition:
```
var i:int;
var isBaxterInMilwaukee:Boolean;
for (i = 0; !isBaxterInMilwaukee && i < arrayLen; i++)
{
if (myArray[i]["name"] == "baxter"
&& myArray[i]["location"] == "milwaukee")
{
isBaxterInMilwaukee = true;
barkTwice();
}
}
```
You can als... | [
0.06083709001541138,
-0.042956553399562836,
-0.12649653851985931,
-0.09766291826963425,
0.15372173488140106,
0.1969853937625885,
0.5486562252044678,
-0.3381269574165344,
-0.06104819104075432,
-0.32191774249076843,
-0.021091977134346962,
0.29847368597984314,
-0.4139576256275177,
0.489476472... | |
depending on how your compiler short-circuits the loop-condition logic, your value of `i` on exiting the loop may vary. Nevertheless, it is possible and for some people, this can improve readability:
```
var i:int = -1;
var isBaxterInMilwaukee:Boolean;
while (!isBaxterInMilwaukee && ++i < arrayLen)
{
if (myA... | [
0.09163498878479004,
0.2549503445625305,
0.053762029856443405,
-0.21558070182800293,
0.4036552608013153,
0.0036019112449139357,
0.9027365446090698,
-0.33018752932548523,
-0.22178122401237488,
-0.6015282273292542,
-0.29931411147117615,
0.25348731875419617,
-0.3519357442855835,
0.38938263058... | |
I am getting the following XHTML validation warning in my ASP.NET MVC master page:
*Validation (XHTML 1.0 Transitional): Element 'title' occurs too few times.*
The title tag for the master page is included in the ContentPlaceHolder in the head tag as shown in the code below. The title tag in the ContentPlaceHolder i... | [
0.3498702049255371,
0.20751196146011353,
0.7256839275360107,
-0.23642736673355103,
-0.18615463376045227,
-0.42858320474624634,
0.48584553599357605,
-0.42501944303512573,
-0.18811385333538055,
-0.39116281270980835,
-0.3208104372024536,
0.32089763879776,
-0.09479160606861115,
0.1498084664344... | |
<asp:ContentPlaceHolder ID="head" runat="server">
<title></title>
</asp:ContentPlaceHolder>
</head>
```
One work around that I have found is to use the following technique in the head tag:
```
<% if (false) { %>
<title></title>
<% } %>
```
Is this the best practice to resolve this warning? I am not... | [
0.09927089512348175,
0.32727620005607605,
0.7231732606887817,
-0.004344766493886709,
0.10569930076599121,
-0.384158194065094,
0.29499056935310364,
-0.34231331944465637,
-0.15586267411708832,
-0.6030861139297485,
-0.34819474816322327,
0.4623470902442932,
-0.08140571415424347,
0.064446821808... | |
<meta http-equiv="Content-Style-Type" content="text/css" />
<asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
</head>
```
Or as an alternate, set the title programattically from each page.
What's happening in your case is that when a new view is created, it creates empty content items wh... | [
0.2324938029050827,
0.07696046680212021,
0.5351514220237732,
0.12280657142400742,
0.0018731190357357264,
0.039526667445898056,
0.27859148383140564,
-0.4219284951686859,
-0.1107792854309082,
-0.6120840907096863,
-0.2699023187160492,
0.48795461654663086,
-0.2818312346935272,
0.34987109899520... | |
I've created a custom control (a class that inherits from Control). When I put it on a Form I can work with it on Visual Studio IDE. It shows me an error and I don't see the form.
The error message is this: La variable 'ctrlImagen' no está declarada o no se asignó nunca.
It's a winform for a Compact Framework app.
H... | [
0.05443504452705383,
-0.20110125839710236,
0.33924463391304016,
0.10972393304109573,
-0.0021376984659582376,
-0.017459310591220856,
0.017575833946466446,
-0.05369556322693825,
-0.06223246455192566,
-0.21296508610248566,
0.11715296655893326,
0.6793358325958252,
-0.36443668603897095,
0.06717... | |
{
public ControlMapa()
{
this.ClientSize = new Size(21, 21);
...
````
Thank you! | [
-0.0018319522496312857,
-0.13839946687221527,
0.28277650475502014,
-0.07293569296598434,
0.21435783803462982,
0.009449845179915428,
0.3487938642501831,
-0.3583489954471588,
-0.4237179458141327,
-0.3182361423969269,
-0.34886589646339417,
0.616511344909668,
-0.2662484645843506,
0.15335632860... | |
I am trying to handle a file upload, and I'm using the
com.oreilly.servlet.multipart.MultipartParser class to parse the posted
data (in cos.jar). However, when I call the constructor for MultipartParser, I get this
exception:
```
java.io.IOException: Corrupt form data: premature ending
at com.oreilly.servlet.multi... | [
0.28556007146835327,
0.22836682200431824,
0.39169180393218994,
-0.2253197282552719,
-0.13381114602088928,
-0.14395298063755035,
0.7523648738861084,
0.12633810937404633,
-0.2463768720626831,
-0.7539907693862915,
0.08431964367628098,
0.23670952022075653,
-0.37346959114074707,
0.2753184735774... | |
proc (create a tabel of course)
* "`INSERT dbo.SPCall (What, When) VALUES (OBJECT_NAME(@@PROCID), GETDATE()`"
3. Extend 2 with duration too
There are "fun" things you can do:
1. Remove it, see who calls
2. Remove rights, see who calls
3. Add `RAISERROR ('Warning: pwn3d: call admin', 16, 1)`, see who calls
4. Add `WA... | [
0.18786956369876862,
-0.16255876421928406,
0.705592691898346,
0.04889374598860741,
-0.03998168557882309,
-0.05947839096188545,
0.16995519399642944,
-0.2967294156551361,
-0.30547183752059937,
-0.20910590887069702,
-0.23527643084526062,
0.7026883363723755,
-0.5339525938034058,
-0.01988859847... | |
restart.
Query cache/locks are transient and don't persist for any length of time. | [
0.010193901136517525,
-0.21806715428829193,
0.4287201762199402,
0.2568952441215515,
0.4239737391471863,
-0.14687657356262207,
0.4093554615974426,
0.2655830979347229,
-0.40736159682273865,
-0.3915289342403412,
-0.36790409684181213,
0.3327615559101105,
-0.17842039465904236,
0.160295695066452... | |
I used the "View-based Application" template in Xcode for an iPhone project and went into the view controller's XIB.
I changed the view from a basic `UIView` to a `UIScrollView`, and now the method
`(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;`
never gets called. I have an `NSLog` statement in th... | [
0.02811253070831299,
-0.112852543592453,
0.70229572057724,
-0.2170228809118271,
-0.3316633403301239,
-0.10760334879159927,
0.5132020115852356,
-0.2560790777206421,
-0.009357411414384842,
-0.7612614631652832,
0.0970790907740593,
0.5793379545211792,
-0.31537219882011414,
0.029580432921648026... | |
this thread: <http://discussions.apple.com/thread.jspa?messageID=7519817> to learn about UIScrollView and events. The bottom line is that you can handle events in your view's `-(void)touchesEnded:(NSSet *)aTouches withEvent:(UIEvent *)anEvent` but it's not straight forward.
I have personally seen some funkyness in UI... | [
-0.026470329612493515,
-0.15066011250019073,
0.4920032024383545,
0.05124137923121452,
-0.2460462898015976,
-0.21073681116104126,
0.32315361499786377,
0.009717417880892754,
-0.24894042313098907,
-0.4202480912208557,
0.255482017993927,
0.5892149806022644,
-0.08900267630815506,
-0.04378901422... | |
### Background
In our last [adventure](https://stackoverflow.com/questions/583689/dictionaryt-of-listt-and-listviews-in-asp-net), I was attempting to properly show a `Dictionary<Foo, Bar<T>>`. Thanks to the helpful answers in that post, I realize I had been going about it in the wrong way.
### Problem
In today's adv... | [
-0.04620622098445892,
0.012407753616571426,
0.474437952041626,
0.19930420815944672,
0.07353097200393677,
-0.0032742603216320276,
0.3796534240245819,
0.041250187903642654,
-0.3489796221256256,
-0.7617836594581604,
-0.09845362603664398,
0.8102683424949646,
0.03705669939517975,
-0.25355347990... | |
string |
| Type string |
---------------------
```
For display, I'd like to display the `Bar.Name + Bar.Type`, concatenated together. Obviously I have to retain the complete object, since the Id will be passed back to be sent to the database.
At first, I tried `<%#Eval("Value.Type" + "Value.Name")%>`, clearly... | [
-0.053345728665590286,
0.3221098780632019,
0.47721371054649353,
-0.42380964756011963,
0.013020570389926434,
0.07145922631025314,
0.25741201639175415,
-0.20507007837295532,
-0.010188198648393154,
-0.351542592048645,
-0.12343315035104752,
0.4126248061656952,
-0.5270283222198486,
0.2546381652... | |
profile, and sending it back to the database wholesale.
Here currently is how the page looks:
```
<tr><td align="center"> <%#Eval("Key.Name") %></td>
<td align="center"><asp:DropDownList ID="ddlListOfBars" runat="server"
DataSource='<%#Eval("Value")%>' DataValueField="Id" DataTextField="Type" />
</td>
```
I've... | [
0.38964924216270447,
-0.29526716470718384,
0.8087261915206909,
0.16110414266586304,
-0.264082133769989,
-0.16572362184524536,
0.18792688846588135,
-0.19110845029354095,
-0.08934635668992996,
-0.6873060464859009,
-0.056134287267923355,
0.36273497343063354,
-0.1315697580575943,
-0.0233033448... | |
mud?
As it turns out, the problem is easily solvable if the two columns from the table are concatenated and into one column, like so:
`SELECT Column1Name + ' - ' + Column2Name AS Column3Name FROM Table1 WHERE`...
This turns this:
```
Column1Name Column2Name
----------- -----------
Stuff1 ... | [
-0.16549009084701538,
0.2740812599658966,
0.23308832943439484,
-0.07795011252164841,
0.10256674885749817,
0.063602514564991,
0.5906543731689453,
-0.20981323719024658,
-0.2535362243652344,
-0.37599238753318787,
0.1267375499010086,
0.41041794419288635,
-0.23831290006637573,
0.063087992370128... | |
Stuff7
Stuff4 Stuff8
```
Into this:
```
Column3Name
---------------
Stuff1 - Stuff5
Stuff2 - Stuff6
Stuff3 - Stuff7
Stuff4 - Stuff8
```
When all else fails, think a little lower level. | [
-0.2364150434732437,
0.5832089185714722,
0.5301240682601929,
-0.17214836180210114,
0.35180529952049255,
-0.06864423304796219,
0.3379843533039093,
0.011830487288534641,
-0.20490378141403198,
-0.5280212163925171,
-0.385905921459198,
0.5962322950363159,
-0.17566059529781342,
-0.30748084187507... | |
I am providing search functionality in my website, when user searches a record then I want to display the time the query taken to get the results same as google does. When we search anything then google displays how much time it takes to get results?
For this I have declared a @start variable in my SP and finding the ... | [
0.26126861572265625,
-0.025018149986863136,
0.8072741031646729,
-0.03280305117368698,
0.30162033438682556,
-0.058971256017684937,
0.11042093485593796,
-0.3783426284790039,
-0.27941665053367615,
-0.5005460381507874,
0.0646761879324913,
0.4058046340942383,
0.032530516386032104,
0.22070251405... | |
out the time a query taken to execute?
I'm using SQL Server 2005.
We monitor this from the application code, just to include the time required to establish/close the connection and transmit data across the network. It's pretty straight-forward...
```
Dim Duration as TimeSpan
Dim StartTime as DateTime = DateTime.Now
... | [
0.11462632566690445,
-0.07563973218202591,
0.6432420611381531,
-0.29753342270851135,
0.02451428398489952,
-0.01449023000895977,
0.09946627169847488,
-0.2393476963043213,
-0.38375866413116455,
-0.2633551061153412,
0.17435666918754578,
0.3698812425136566,
-0.24562110006809235,
0.202035322785... | |
I have a situation where I am mapping classes that have an inheritance hierarchy. I have a list of items that each class knows that it needs. For example:
```
public class PersonMapper
{
private string[] attributes = new[] {"firstName", "lastName"};
}
public class UserMapper : PersonMapper
{
private string[] ... | [
-0.319711834192276,
-0.13158755004405975,
0.22203058004379272,
-0.06172310560941696,
0.09810129553079605,
0.3226255476474762,
0.3199459910392761,
-0.43955495953559875,
-0.12460870295763016,
-0.9660634994506836,
-0.16083097457885742,
0.4978489279747009,
-0.25186794996261597,
0.0631040111184... | |
they seem overly complicated. I feel like there is an elegant solution to this that I am missing. Can anyone help?
Thanks in advance!
You can have a virtual method/property on the superclass called GetAttributes that returns the private array. Then, in each subclass, override it like so. First call the base GetAttribu... | [
0.0072125536389648914,
-0.28604990243911743,
0.23611614108085632,
0.19980695843696594,
0.2905290424823761,
0.2381267547607422,
0.3753068149089813,
-0.14242543280124664,
0.03806517273187637,
-0.8789930939674377,
-0.26004546880722046,
0.7168851494789124,
-0.013238237239420414,
0.097490124404... | |
public virtual string[] GetAttributes()
{
return attributes;
}
}
public class EmployeeMapper : PersonMapper
{
private string[] attributes = new[] { "employeeId" };
public override string[] GetAttributes()
{
return base.GetAttributes().Union(this.... | [
-0.1244691014289856,
-0.3993382453918457,
0.12288520485162735,
0.05570456385612488,
0.27578234672546387,
0.1451980471611023,
0.2870503067970276,
-0.06753639131784439,
-0.031079329550266266,
-0.6399793028831482,
-0.4764944016933441,
0.6256836652755737,
-0.1994663029909134,
0.151600778102874... | |
}
}
``` | [
0.17493881285190582,
0.41805654764175415,
0.05209751054644585,
-0.04864929988980293,
0.437467485666275,
-0.15825650095939636,
0.13202530145645142,
0.5446501970291138,
0.35430577397346497,
-0.4846813380718231,
-0.2295716553926468,
0.546978771686554,
-0.3188462555408478,
0.2798506021499634,
... | |
Is it possible to make an executable look like a read-only file on Linux, such that opening the "file" for reading actually executes the file and makes its stdout available for reading as if it were data in the "file"? It should be openable by any program that knows how to open a file for reading, for example 'cat'.
Us... | [
0.3650667071342468,
0.03547651320695877,
0.011496158316731453,
0.22931474447250366,
0.2248278558254242,
-0.42946115136146545,
0.1771065890789032,
0.17812320590019226,
-0.30878517031669617,
-0.5260405540466309,
-0.4204378128051758,
0.6064822673797607,
-0.42972373962402344,
-0.18452043831348... | |
In the following example code, I attach an `onclick` event handler to the span containing the text "foo". The handler is an anonymous function that pops up an `alert()`.
However, if I assign to the parent node's `innerHTML`, this `onclick` event handler gets destroyed - clicking "foo" fails to pop up the alert box.
I... | [
-0.08722543716430664,
0.10569185018539429,
0.735722005367279,
-0.39149796962738037,
0.18074847757816315,
-0.06962703168392181,
0.149224653840065,
-0.346664696931839,
-0.03693997487425804,
-0.343839555978775,
-0.3525875508785248,
0.5710173845291138,
-0.6354056000709534,
-0.07202372699975967... | |
id="mydiv" style="border: solid red 2px">
<span id="myspan">foo</span>
</div>
</body>
</html>
```
Unfortunately, assignment to `innerHTML` causes the destruction of all child elements, even if you're trying to append. If you want to preserve child nodes (and their event handlers), you'll need to use [DOM fun... | [
-0.04400293901562691,
0.10314389318227768,
0.6966785788536072,
-0.2391350120306015,
0.3818708062171936,
-0.0746966302394867,
0.4847896695137024,
-0.4298241138458252,
-0.19423793256282806,
-0.41497698426246643,
-0.5099170207977295,
0.6715233325958252,
-0.48349761962890625,
0.123543031513690... | |
document.getElementById("myspan");
myspan.onclick = function() { alert ("hi"); };
var mydiv = document.getElementById("mydiv");
var newcontent = document.createElement('div');
newcontent.innerHTML = "bar";
while (newcontent.firstChild) {
mydiv.appendChild(newcontent.firstChild);
}
}
`... | [
-0.08047470450401306,
0.10957805067300797,
0.7238693833351135,
-0.5209026336669922,
0.34445035457611084,
0.04428916051983833,
0.48746031522750854,
-0.490951806306839,
0.018174469470977783,
-0.6338154077529907,
-0.6437280178070068,
0.4621371030807495,
-0.46745115518569946,
0.227881625294685... | |
I've read that in PHP non-persistent open links are automatically closed at the end of the script's execution. So what's up with asp.net?
Yes you need to close open connections to database. ADO.NET has a connection pool, and open connections are reserved to you while it stays opened. When you close it, it will be avail... | [
0.003896053647622466,
0.11015550792217255,
0.4740115702152252,
0.02321007288992405,
-0.31763148307800293,
-0.15357670187950134,
0.24336795508861542,
0.028866680338978767,
-0.39087045192718506,
-0.6444199681282043,
0.09073138236999512,
0.07492587715387344,
-0.19939474761486053,
0.4788179099... | |
nwindConn);
selectCMD.CommandTimeout = 30;
SqlDataAdapter custDA = new SqlDataAdapter();
custDA.SelectCommand = selectCMD;
DataSet custDS = new DataSet();
custDA.Fill(custDS, "Customers");
``` | [
-0.16295289993286133,
-0.5434865951538086,
0.6187183856964111,
-0.05064474791288376,
0.0007318565039895475,
0.17790983617305756,
0.13421930372714996,
-0.08421282470226288,
-0.13593195378780365,
-0.5793789029121399,
-0.1424153596162796,
0.4575306475162506,
-0.13373325765132904,
0.5442702770... | |
I am building a page that may receive **LARGE** amounts of html from an ajax call, which it than insert into the page.
Sometimes, instead of the html i am expecting, i will get an http 401 error.
Ideally i want to have the error handler fire first, so i can set an error flag, display a message, and **NOT** insert the... | [
0.30719390511512756,
0.39738038182258606,
0.13634447753429413,
-0.09514660388231277,
-0.17465540766716003,
-0.17904344201087952,
0.2135774791240692,
0.02357706055045128,
-0.003311086678877473,
-0.7234684824943542,
-0.0679887980222702,
0.3928840458393097,
-0.20693716406822205,
0.23550808429... | |
ajaxError fires after the 'complete' handler, which blows.
You should be using the `success` handler instead of `complete` to update the html because it will be triggered only if the server sends 200. | [
0.09670303016901016,
-0.35469284653663635,
0.38720476627349854,
0.151353657245636,
-0.20231470465660095,
-0.6448962688446045,
0.5475907921791077,
-0.013238808140158653,
-0.11720162630081177,
-0.4906073808670044,
-0.4509165585041046,
0.4144020080566406,
-0.2972310483455658,
-0.2291094660758... | |
I'm new to MDX and trying to solve the following problem. Investigated calculated members, subselects, scope statements, etc but can't quite get it to do what I want.
Let's say I'm trying to come up with the MDX equivalent to the following SQL query:
```
SELECT SUM(netMarketValue) net,
SUM(CASE WHEN netMarketValu... | [
0.2611738443374634,
0.015086728148162365,
0.636391818523407,
-0.4775536358356476,
-0.12826856970787048,
0.08146870136260986,
-0.2134382426738739,
-0.2832537591457367,
-0.13090333342552185,
-0.4115598797798157,
-0.012545302510261536,
0.9084286689758301,
0.26709869503974915,
0.23935987055301... | |
hide internal offsetting transactions (within someEntity2), then calculate assets & liabilities after aggregating them by someEntity2. Then I want to see the grand total of those assets & liabilities aggregated by the bigger entity, someEntity1.
In my MDX schema I'd presumably have a cube with dimensions for someEntit... | [
0.18139183521270752,
-0.2944508194923401,
0.2639971673488617,
0.06211332231760025,
-0.058065593242645264,
0.10095122456550598,
-0.13155993819236755,
-0.07646302133798599,
-0.14910484850406647,
-0.29771915078163147,
0.1093909814953804,
0.6182569265365601,
0.14412446320056915,
0.030877515673... | |
net calculations and another to go to a lower level of granularity for other use cases), since it will be a lot of duplicate info in my database. These will be very large cubes.
You should be using the `success` handler instead of `complete` to update the html because it will be triggered only if the server sends 200. | [
0.4846600294113159,
-0.23807361721992493,
0.5408470034599304,
0.18395139276981354,
-0.17367009818553925,
-0.3359818160533905,
0.6242391467094421,
-0.2797481119632721,
-0.35554686188697815,
-0.7976846098899841,
0.0035679612774401903,
0.4982422888278961,
-0.15553522109985352,
-0.091698281466... | |
I have on my database a column that holds text in RTF format.
How can I get only the plain text of it, using C#?
Thanks :D
Microsoft provides [an example](http://msdn.microsoft.com/en-us/library/cc488002.aspx) where they basically stick the rtf text in a `RichTextBox` and then read the `.Text` property... it feels so... | [
0.21128800511360168,
0.36217913031578064,
0.5218331813812256,
-0.22245316207408905,
0.024652520194649696,
-0.08973982185125351,
0.2968461513519287,
-0.2824992537498474,
0.10227590054273605,
-0.7483170628547668,
-0.17692458629608154,
0.7220790982246399,
-0.39228808879852295,
0.1729587167501... | |
When / what are the conditions when a `JSESSIONID` is created?
Is it per a domain? For instance, if I have a Tomcat app server, and I deploy multiple web applications, will a different `JSESSIONID` be created per context (web application), or is it shared across web applications as long as they are the same domain?
JS... | [
0.18558421730995178,
-0.20614416897296906,
0.4080829322338104,
0.2805217206478119,
-0.07638301700353622,
-0.09357896447181702,
0.37617751955986023,
0.07202889770269394,
-0.3313969671726227,
-0.8188664317131042,
-0.2511350214481354,
0.5837398171424866,
-0.3272760212421417,
0.111671186983585... | |
session or `null`. In this case, new session is not created, and JSESSIONID cookie is not sent. (This also means that **session isn't necessarily created on first request**... you and your code are in control *when* the session is created)
Sessions are per-context:
> SRV.7.3 Session Scope
>
>
> HttpSession objects ... | [
0.07121746242046356,
-0.22690437734127045,
0.2595914900302887,
0.07352461665868759,
-0.25686728954315186,
-0.29771649837493896,
0.6117348670959473,
-0.03559107705950737,
-0.31000959873199463,
-0.6607840657234192,
-0.46385714411735535,
0.4525894224643707,
-0.3672735393047333,
0.163193032145... | |
contexts by the container.
([Servlet 2.4 specification](http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html))
Update: Every call to JSP page implicitly creates a new session if there is no session yet. This can be turned off with the `session='false'` page directive, in which case session variable is no... | [
0.038139402866363525,
0.12468582391738892,
0.265806645154953,
-0.11764032393693924,
-0.21979296207427979,
-0.18082323670387268,
0.37667277455329895,
-0.01905471459031105,
-0.23823387920856476,
-0.28554490208625793,
-0.2358093112707138,
0.5465531349182129,
-0.24375413358211517,
0.0687221586... | |
Somehow I've got the feeling that many projects become heavily overengineered so every possible change-request can be tackled with the effect that the change-requests that occured are very hard to implement.
Somehow I get that feeling in nearly every project I'm currently working on. It is like everyone is thinking "... | [
0.5473712682723999,
0.44679176807403564,
0.06735017150640488,
-0.06979191303253174,
0.11961665749549866,
-0.2908090054988861,
0.27694299817085266,
0.09553536027669907,
-0.4423977732658386,
-0.5067838430404663,
-0.28985849022865295,
0.5731640458106995,
0.47257697582244873,
0.090698651969432... | |
be extremely rigid with how their business code is created, newer companies completely lack a backbone of what software they use to get the job done.
The problem you describe sounds like people are viewing problems at too high a level and want to find a way to solve it in one go. Creating a working toolbox (think stan... | [
0.6663100719451904,
0.18822655081748962,
-0.3686268925666809,
0.31510400772094727,
0.04117726907134056,
-0.24271921813488007,
0.33161163330078125,
0.15800990164279938,
-0.1993882805109024,
-0.3793443441390991,
-0.05958699434995651,
0.906819760799408,
-0.09338986128568649,
-0.14128088951110... | |
I want to create my own time stamp data structure in C.
DAY ( 0 - 30 ), HOUR ( 0 - 23 ), MINUTE ( 0 - 59 )
What is the smallest data structure possible?
Well, you *could* pack it all in an `unsigned short` (That's **2 bytes**, 5 bits for Day, 5 bits for hour, 6 bits for minute)... and use some shifts and masking to g... | [
0.5777140259742737,
0.06532018631696701,
0.4347008764743805,
0.12582264840602875,
0.33938315510749817,
0.3866051435470581,
-0.04688587784767151,
-0.28599798679351807,
-0.1049385741353035,
-0.6539546847343445,
0.116754911839962,
0.05801743268966675,
-0.09827054291963577,
0.31867715716362,
... | |
<< 11) | (hour << 6) | min);
```
or using macros
```
#define DAY(x) (((x) >> 11) & 0x1F)
#define HOUR(x) (((x) >> 6) & 0x1F)
#define MINUTE(x) ((x) & 0x3F)
#define TIMESTAMP(d, h, m) ((((d) & 0x1F) << 11) | (((h) & 0x1F) << 6) | ((m) & 0x3F)
```
(You didn't mention month/year in your current version... | [
0.334672749042511,
-0.03593749925494194,
0.3678736984729767,
-0.14430883526802063,
0.16462735831737518,
0.1676529198884964,
0.26601263880729675,
-0.22578640282154083,
-0.10370846092700958,
-0.5772470235824585,
-0.1629566252231598,
-0.042208943516016006,
0.11138203740119934,
0.2193479388952... | |
I searched a lot, found that some people claimed they did that, but I can't make it to work.
How to you use WinMerge, my favorite diff tool on Windows, with Bazaar?
I know difftools plugin (shipped with Bazaar) handles this but the controller.py file doesn't list it, and I fail to see where to specify a path. Looks l... | [
0.11893357336521149,
-0.15995538234710693,
0.19919241964817047,
0.15657806396484375,
-0.15651220083236694,
-0.1590045690536499,
0.21612603962421417,
-0.1102810651063919,
-0.2998825013637543,
-0.6588003039360046,
0.18803094327449799,
0.6888341307640076,
-0.2775935232639313,
0.29798224568367... | |
nothing is launched...
So, does somebody has any success using WinMerge (or perhaps some other Windows tool) with Bazaar?
I would be interested to use it with extmerge plugin too...
---
**EDIT** After the first two answers, I tried some variants which I list here for reference. None worked:
```
# As suggested:
# B... | [
0.05119575187563896,
-0.16729308664798737,
0.572052538394928,
0.17743776738643646,
-0.14757177233695984,
-0.21797852218151093,
0.3369150161743164,
0.010941486805677414,
-0.37027207016944885,
-0.21589908003807068,
-0.4473438560962677,
0.5265172719955444,
-0.4633336365222931,
0.1083660870790... | |
Bad: bzr: ERROR: [Errno 22] Invalid argument: 'c:\\docume~1\\philho\\locals~1\\temp\\bzr_C:\\Progra~1\\_Text\\WinMerge\\WinMergeU.exe4gi5or.log'
wdiff = diff --using C:\\Progra~1\\_Text\\WinMerge\\WinMergeU.exe
```
Using:
```
Bazaar (bzr) 1.11
Python interpreter: C:\Program Files\_Dev\Bazaar\python25.dll 2.5.2
``... | [
0.047869421541690826,
0.5996097922325134,
-0.06270790845155716,
-0.22660385072231293,
-0.13360784947872162,
0.2649547755718231,
0.987533688545227,
0.07249372452497482,
-0.12334948778152466,
-0.4538402259349823,
0.006863337941467762,
0.6190897822380066,
-0.6008419394493103,
0.12100363522768... | |
already in the path.
At least it works, and I can easily add parameters if needed.
```
[ALIASES]
wdiff = diff --using winmerge.cmd
# winmerge.cmd contains:
"C:\Program Files\_Text\WinMerge\WinMergeU.exe" %1 %2
```
Maybe I should put that as solution in the thread, although it lacks elegance.
For the record, while ... | [
0.12807390093803406,
-0.07049481570720673,
0.48990002274513245,
0.08792898058891296,
0.07296603918075562,
-0.12668542563915253,
0.34209179878234863,
0.05592116713523865,
-0.28740981221199036,
-0.996914803981781,
0.04758800193667412,
0.6582815647125244,
-0.14998114109039307,
0.1115472838282... | |
as confused as me: extmerge isn't a GUI replacement for merge. If you run it, it will report no conflict, even if merge reports them. Actually, you have to run merge first, then extmerge to use the generated/altered files and do the job...
If you want to use WinMerge anyway, perhaps to compare OTHER to THIS, you can... | [
0.22598467767238617,
0.13189563155174255,
0.07547546178102493,
0.06183760240674019,
-0.3978794515132904,
-0.0863327756524086,
0.3534592390060425,
0.018720272928476334,
-0.1453983187675476,
-0.7669515013694763,
0.02038377895951271,
0.5539835691452026,
-0.32768186926841736,
0.215382054448127... | |
provides diff --using, right? You prefer the version in difftools?*" -- Aaron Bentley, 2009-04-03 in *Re: difftools, ‘bzr diff --using footool’, and ‘diffuse’*
Aargh! No, I didn't know that.
I removed difftools plugin, edited my line to:
```
wdiff = diff --using "C:/Program Files/_Text/WinMerge/WinMergeU.exe"
```... | [
0.4515160024166107,
0.11806891858577728,
0.4965559244155884,
-0.14191009104251862,
-0.00979964155703783,
-0.11563288420438766,
0.45062726736068726,
0.10726828128099442,
0.08344598114490509,
-0.7928467392921448,
-0.2037361115217209,
0.670434296131134,
-0.4980390965938568,
-0.119058936834335... | |
C:\Program Files\WinMerge in your PATH environment variable you can use it as:
```
bzr diff --using WinMergeU.exe
``` | [
0.09915941953659058,
-0.003332549938932061,
0.025855565443634987,
-0.24523383378982544,
0.18620924651622772,
-0.1360064297914505,
0.1764688342809677,
0.022929633036255836,
0.15219540894031525,
-0.42869821190834045,
-0.154188871383667,
0.6938146352767944,
-0.35344359278678894,
-0.0083521008... | |
Do you try to keep it simple and have a root folder and then 1 folder for images, javascript, flash, etc? What do you normally call your folders? Do you give your files naming conventions?
not a standard way.. but from my experience, I come up with this structure:
```
root/
-> images/
-> <subfolder>
-> up... | [
0.2874613106250763,
-0.07594716548919678,
0.244895800948143,
0.30732622742652893,
-0.0793539509177208,
-0.1123272255063057,
-0.13147565722465515,
-0.005996379069983959,
-0.4535224437713623,
-0.8300856351852417,
-0.11765020340681076,
0.29535555839538574,
-0.2434578835964203,
0.0550407394766... | |
same name. upload is for uploaded images.
js: javascript
css: css
data: some raw data if needed
docs: word doc or pdf for download
download: something that for ppl to downlaod...
mme: other multimedia files. e.g. flash, movie.. soudn clips.etc.
subpages: 2 or subsequent level pages. organized in different folders
temp... | [
0.46879372000694275,
-0.15191172063350677,
0.36007198691368103,
0.2971704602241516,
-0.3294503092765808,
-0.08817020058631897,
-0.0017183644231408834,
0.08317124843597412,
-0.303402841091156,
-0.6569146513938904,
-0.4225679337978363,
0.2566429376602173,
-0.07761094719171524,
-0.02243211865... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.