text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
four other rows will be deleted. Then is populates the table with the deleted rows again, but now the duplicates are removed. This is not the best way to delete duplicates. The best way is: ``` WITH q AS ( SELECT data, ROW_NUMBER() OVER (PARTITION BY data ORDER BY data) AS rn FROM @table ...
[ -0.39994534850120544, 0.12130046635866165, 0.4927719235420227, -0.08769141137599945, 0.15560758113861084, 0.3416866958141327, 0.08178830146789551, -0.3017731010913849, -0.4501998722553253, -0.5455546379089355, -0.02652345784008503, 0.29198920726776123, -0.46414849162101746, 0.5546193718910...
Caan somone advise the best approach to what i'm trying to acheive (linq to sql, returning list of data to show in a grid/list etc etc)... Its complaining about anonymous type conversion, and from what i'm reading, thats not elegant way of doing it. ``` Public Function GetHistory(ByVal historyId As Integer) As List(...
[ -0.05747484788298607, 0.004633344244211912, 0.3916509449481964, 0.02489716000854969, -0.054960478097200394, 0.31071972846984863, -0.12601955235004425, -0.2910146713256836, -0.27228501439094543, -0.33312711119651794, -0.2501102685928345, 0.5008971691131592, -0.3461611568927765, 0.1881677359...
not have a compile-time type that you can use as your return value for you function, so the ???? in your List(Of ????) is not something that can ever be known by the compiler. Since you are binding this to a UI element, your best bet is probably to make the return value an IEnumerable, or IList. You should be able to ...
[ 0.2303324043750763, -0.1410921812057495, 0.2933778464794159, 0.13859732449054718, 0.15007413923740387, -0.24559080600738525, 0.12423723936080933, 0.020341617986559868, 0.14189648628234863, -0.5335102677345276, -0.19067609310150146, 0.40646299719810486, -0.3462781608104706, -0.0241856109350...
Branching off from [this link](https://stackoverflow.com/questions/630548/sitemap-behaviour) it seems that `Request.ServerVariables("SCRIPT_NAME")` doesn't return anything. I've just set up a simple loop to see if anything comes out at all but with no luck. Any ideas? ``` For Each s As String In Request.ServerVariable...
[ -0.09791788458824158, -0.08773467689752579, 0.38588857650756836, -0.03760497644543648, -0.23575440049171448, -0.207203209400177, 0.16769014298915863, -0.04834398627281189, -0.3117790222167969, -0.6482359170913696, -0.16149622201919556, 0.2634812593460083, -0.2834664285182953, 0.49413850903...
System.EventArgs) Handles Me.Load Response.Write(Context.Request.ServerVariables("SCRIPT_NAME")) End Sub End Class ``` This doesn't work, quite simply. If I enter the code within the `Page_Load` event within the .aspx page, however, by doing the following: ``` <% Response.Write(Context.Request.ServerVariables(...
[ -0.16837725043296814, -0.2418907731771469, 0.6847100257873535, -0.09091485291719437, -0.1404704451560974, -0.18143780529499054, 0.32447677850723267, -0.04770806431770325, -0.3174389898777008, -0.6726893782615662, -0.18113724887371063, 0.4296858012676239, -0.1524261087179184, 0.098350293934...
page, **before** the content placeholder: ``` On Master: <asp:Literal id="LiteralMaster" runat="server"></asp:Literal> ``` And then setting it's Text property in the master page's Page\_Load event to: ``` LiteralMaster.Text = Context.Request.ServerVariables("SCRIPT_NAME") ``` I also added a literal control in the...
[ -0.2248021364212036, 0.09806607663631439, 0.7355841398239136, -0.04752127081155777, -0.3094349205493927, 0.14292168617248535, 0.07972399145364761, -0.5512736439704895, -0.15548448264598846, -0.6428332924842834, -0.31093671917915344, 0.4371066987514496, -0.2057611495256424, 0.17031243443489...
On page: /LittleTest/UsingMaster.aspx However, the html looked more like: ``` From response.write:/LittleTest/UsingMaster.aspx <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <...
[ -0.12723691761493683, -0.13679833710193634, 0.44970354437828064, -0.20934638381004333, -0.7203500270843506, 0.2626301944255829, 0.04385947808623314, -0.9383629560470581, -0.21071572601795197, -0.7919720411300659, -0.15035147964954376, 0.11430573463439941, 0.024846864864230156, 0.0238303989...
comment** You are assigning the string representation of a NameValueCollection element to the contents of your label, this is just the NAME, not the combination of the NAME and the VALUE Try the following: ``` For Each s As String In Request.ServerVariables Label1.Text += s & ": " & Request.ServerVariables(s) Next...
[ 0.275824636220932, -0.13448555767536163, 0.28395071625709534, 0.09924846142530441, -0.20866744220256805, -0.13041773438453674, 0.1028047502040863, 0.14004838466644287, -0.3498004972934723, -0.5576803088188171, -0.14014245569705963, 0.34766533970832825, -0.4186860918998718, 0.27084356546401...
Dear all, I am writing a python program that is retrieving edifact log messages from a .gz file... An example of 2 logs are the following: ``` 2009/03/02 12:13:59.642396 siamp102 mux1-30706 Trace name: MSG Message sent [con=251575 (APEOBEinMux1), len=2106, CorrID=000182C42DE0ED] UNB+IATB:1+1ASRPFA+1A0APE+090302:1213+0...
[ -0.19650934636592865, 0.3140381872653961, 0.31092438101768494, 0.2041555941104889, -0.06683124601840973, 0.0845109224319458, 0.5705267786979675, 0.06400927901268005, -0.14037048816680908, -0.3763371706008911, -0.015792785212397575, 0.37184372544288635, -0.45170941948890686, -0.221861690282...
I think this is not possible. I would suggest `awk` or `perl` in order to be able to save some context from previous lines. In `perl` this gives something like: ``` #!/usr/bin/env perl $isInLogSection = 'NO'; while (<>) { if ( /siamp102/ ) { # Start of log section: retrieve its ID $isInLogSection...
[ 0.07676879316568375, -0.14616195857524872, 0.48960819840431213, 0.0346551351249218, 0.11909117549657822, -0.11925799399614334, 0.17995131015777588, -0.04756557196378708, -0.16112586855888367, -0.19343560934066772, -0.274465948343277, 0.3312872052192688, -0.1629277765750885, 0.1549525111913...
# Retrieve value of len ... } if ( /^$/ ) { # End of log section $isInLogSection = 'NO'; } } ``` In `awk` this gives something like: ``` BEGIN { isInLogSection = "NO"; } /siamp102/ { isInLogSection = "YES"; logSectionID = $1; } /len=/ { if (isInLogSection == "YES") { #retrieve le...
[ -0.15774564445018768, -0.21934525668621063, 0.29223522543907166, 0.09034433215856552, -0.018977701663970947, 0.025055889040231705, 0.23035486042499542, 0.14085841178894043, -0.3106284439563751, -0.005290416069328785, -0.18369276821613312, 0.5152797102928162, 0.00763418385758996, -0.0384150...
is mainly a canvas for illustrating the principles.
[ 0.5154409408569336, 0.06124233826994896, -0.11951888352632523, -0.10913367569446564, 0.34994810819625854, 0.11469007283449173, 0.12173482775688171, -0.03973181173205376, -0.037613581866025925, -0.5253645181655884, -0.1466529369354248, 0.07776356488466263, 0.1228480339050293, 0.075591772794...
I have a struct containing song data: ``` public struct uLib { public string Path; public string Artist; public string Title; public string Album; public string Length; } ``` My library consists of an array of this `uLib`. How would I sort this array by say Artist? I...
[ 0.07452923059463501, 0.08397267013788223, 0.49350273609161377, 0.03218981251120567, -0.07782678306102753, 0.20744635164737701, 0.0021991173271089792, -0.30641329288482666, -0.09311401098966599, -0.46393832564353943, -0.0894705131649971, 0.5252959132194519, -0.23166567087173462, 0.196246728...
or will I have to "roll my own"? First of all, that should not be a struct. It's larger than 16 bytes, so you don't get the performance benefits of having a struct. Also, it doesn't represent a single value, so it doesn't make sense semantically to make it a struct. Just make it a class instead. The `Array` class has ...
[ 0.31129974126815796, 0.013341149315237999, 0.5035997629165649, 0.000565696507692337, -0.18313993513584137, 0.17100590467453003, -0.11405810713768005, -0.3635498285293579, -0.1809571236371994, -0.6330636143684387, -0.05508127436041832, 0.41088753938674927, -0.33255577087402344, 0.0813741087...
could look like as a class: ``` public class ULib { private string _path, _artist, _title, _album, _length; public string Path { get { return _path; } set { _path = value; } } public string Artist { get { return _artist; } set { _artist = value; } } public string Title { get { return _title; } set { ...
[ 0.266478955745697, -0.43566417694091797, 0.42705342173576355, 0.12728257477283478, -0.03406326845288277, 0.283378005027771, 0.06622180342674255, -0.3023424744606018, -0.36333319544792175, -0.8517560362815857, -0.15006202459335327, 0.6336777806282043, -0.3681047856807709, 0.2438368648290634...
Length { get { return _length; } set { _length = value; } } public ULib() {} public ULib(string path, string artist, string title, string album, string length) { Path = path; Artist = artist; Title = title; Album = album; Length = length; } } ``` In C# there there is ...
[ 0.39937299489974976, -0.07263852655887604, 0.34945449233055115, -0.18390342593193054, -0.02448364906013012, -0.07148196548223495, 0.10563870519399643, -0.4619741439819336, -0.15918613970279694, -0.37170886993408203, -0.35176247358322144, 0.5483335256576538, -0.17858220636844635, 0.29052865...
private variable and a setter and getter to access it, this creates that automatically: ``` public string Path { get; set; } ```
[ -0.18627570569515228, -0.15350668132305145, 0.2065410166978836, 0.08447267860174179, 0.070343978703022, -0.24480877816677094, 0.024836331605911255, -0.06563716381788254, 0.02381054125726223, -0.5490198135375977, -0.1363791525363922, 0.699609637260437, -0.5412431359291077, 0.104752413928508...
One of our customers has asked if we can interface with a serial magnetic card reader/encoder from a old EPOS system. The device has no make only the [MW-3170](http://www.officezone.com/mw3000.htm) model number. Does anybody know how I can communicate with the device? I am currently looking for a programming manual on...
[ 0.4092889726161957, 0.08281102776527405, 0.6072484254837036, 0.3703446388244629, 0.23852165043354034, -0.4513680338859558, 0.0665365681052208, -0.08941119909286499, -0.36594247817993164, -0.489494651556015, -0.14996005594730377, 0.349516898393631, -0.029931029304862022, 0.18657156825065613...
Type : Asynchronous Interface : RS232C Baud Rate : 1200, 2400, 4800, 9600 BPS Data Length : 7 bits or 8 bits Parity : Space, Odd, Even, Mark Start Bit : 1 bit Stop Bit : 1 bit ``` I'd further guess that it is probably an ASCII interface that would
[ -0.1548570692539215, -0.004484263714402914, 0.4906504452228546, 0.1904781311750412, -0.25546035170555115, 0.4752703607082367, 0.06423349678516388, -0.0886760726571083, -0.10516537725925446, -0.4645775556564331, -0.2056283801794052, 0.13381539285182953, -0.09432370215654373, 0.1247461065649...
be easy to reverse-engineer even if you can't obtain documentation. Even if it is binary you can likely figure it out as long as you have magnetic cards containing known data.
[ 0.3970039188861847, 0.23651087284088135, -0.23555541038513184, 0.5459660291671753, 0.2922055423259735, -0.1868351399898529, 0.168806791305542, 0.022498177364468575, -0.16192938387393951, -0.24851597845554352, -0.27389460802078247, 0.5702546238899231, -0.04032476246356964, -0.09876719117164...
Why (for example web2py) do you return data from a controller in a dictionary instead of variables (see Rails)? For example: ``` return dict(sape=4139, guido=4127, jack=4098) ``` instead of (that's the way Rails does it) ``` @var1 = "jello" @var2 = "hihi" ``` Is there any advantage using dictionaries over plai...
[ -0.06636828929185867, -0.2694397270679474, 0.0646340474486351, 0.18064777553081512, -0.44397395849227905, -0.11475475132465363, 0.13398562371730804, -0.11047295480966568, -0.2108975350856781, -0.4375322163105011, 0.07415058463811874, 0.5497580766677856, -0.3352947235107422, -0.185434117913...
keyword arguments:" ``` dict(sape=4139, guido=4127, jack=4098) ``` The main advantage is that this is the only way in python to return a) more than a single value **and** b) give that value a name. Other options would be to use a class (extra code), return a tuple (no names, so you'd have to use indexes to access the...
[ -0.17004331946372986, 0.0560494028031826, 0.17290371656417847, -0.1614077240228653, -0.255185067653656, -0.014753234572708607, 0.396324098110199, -0.19576114416122437, 0.004940283019095659, -0.2204100787639618, -0.40618982911109924, 0.5372360348701477, -0.4055132269859314, -0.0393099710345...
each call easily, for example, omit optional values or return additional hints.
[ 0.1589318811893463, -0.11090408265590668, -0.07271970808506012, 0.24927806854248047, 0.09040436148643494, -0.018820123746991158, 0.22181300818920135, -0.26486119627952576, 0.2003597468137741, -0.2565787434577942, -0.5584046840667725, 0.2837199568748474, -0.1197415143251419, -0.317427933216...
In my application, I have the following recurring pattern where I get the feeling that this is an incomplete or warped version of some common pattern that I'm not aware of. In my implementation, I can't seem to find a good way to implement a particular operation, as described below. A collection of objects, let's call...
[ 0.42828914523124695, -0.0711313933134079, 0.28250259160995483, 0.10421138256788254, -0.029194502159953117, -0.15937045216560364, 0.13930127024650574, -0.11505835503339767, -0.30425798892974854, -0.5629868507385254, 0.21267984807491302, 0.4525386095046997, -0.2660678029060364, -0.0204346850...
+-----+ --o <-- | o | ---> ||||||||||| --> | o o | --o data +-----+ sources thread pool outbound queue ``` The sources, the thread pool and the queue are
[ -0.1969744712114334, -0.002923116786405444, 0.5670433044433594, 0.08362621814012527, 0.320421427488327, 0.14977368712425232, -0.4127873480319977, 0.12346041947603226, -0.18308649957180023, -0.4069235920906067, -0.005459103267639875, 0.15502677857875824, -0.06067696213722229, 0.278704047203...
members of a class that provides methods to add sources and to retrieve the head of the queue. Below is the code to add a new source. I'm wondering what happens if I remove a source from the collection. ``` public void vAddSource(ISource src) { this._rgSources.add(src); final ISource srcT = src; // q is t...
[ -0.035429999232292175, -0.05786261707544327, 0.48757168650627136, -0.0732462927699089, 0.1980532854795456, 0.1254919171333313, -0.014068122953176498, -0.13772176206111908, -0.38185274600982666, -0.5611602663993835, -0.24381937086582184, 0.19388538599014282, -0.4691791534423828, 0.429611265...
// tpx is the thread pool this._tpx.scheduleAtFixedRate(cmd, 0L, 1000L, TimeUnit.MILLISECONDS); } ``` Now, the way Java works - if I got that correctly -, src etc. are object identifiers that get passed around by value, so in the above code there is only one ISource object and an identifier for it gets added to t...
[ 0.18958164751529694, -0.022295543923974037, 0.32451876997947693, -0.18183842301368713, 0.1342296302318573, -0.1228727251291275, 0.03697100281715393, 0.17839810252189636, -0.37322235107421875, -0.6602941155433655, 0.04173124209046364, 0.2821887731552124, -0.3117082417011261, 0.1371388435363...
a typical approach if you wanted the thread pool to take note of the removal and also discard the source? `ThreadPoolExecutor` (and hence `ScheduledThreadPoolExecutor`) has a `remove(Runnable)` method. You might also be interested in `FutureTask` which can be cancelled (although that wont take it out of the work queue)...
[ 0.13753046095371246, -0.2077913135290146, -0.29633936285972595, -0.08323586732149124, 0.4169776737689972, -0.00678590452298522, 0.20309016108512878, -0.14350582659244537, -0.22292549908161163, -0.4358413815498352, -0.3083931505680084, 0.3769623339176178, -0.656014084815979, -0.225515082478...
Im working on a parser here that opens a file, reads it and prints data in another file. The input file is determined from sys.argv[1] to both handle commandline opening and drag and drop (in windows). However, when drag and dropping a file, it gives me ``` ioerror 13: Permission denied ``` Looking at what sys.argv...
[ 0.20036448538303375, 0.23506131768226624, 0.26922231912612915, -0.1389317512512207, -0.019353754818439484, -0.03944230079650879, 0.25121545791625977, -0.5626254677772522, -0.15105032920837402, -0.6212810277938843, -0.1281939297914505, 0.5531210899353027, -0.4362471401691437, -0.06948640197...
(If thats the problem.) * How do I enable drag and drop? Oh, and if its unclear, I drag the input/txt file to the python file, not the other way around. As a coder, I always prefer a CLI, but the future users of this software do not, hence I need to get this working. Although extremely simple, heres some code to repr...
[ -0.08111681789159775, 0.15598806738853455, 0.5461031794548035, -0.21805693209171295, 0.03644402697682381, 0.01355499867349863, -0.05347561091184616, -0.2607016861438751, -0.30853521823883057, -0.6153805255889893, -0.2865928113460541, 0.6726592183113098, -0.549719512462616, -0.1930132955312...
IOError as (errno, strerror): print "I/O error({0}): {1}".format(errno, strerror) raw_input("") exit() raw_input("done") ``` You use `outfile = open("out.txt", "w")` - In the first example, this would go to c:\out.txt, which I'd imagine is the source of your error.
[ -0.13344548642635345, 0.03407572954893112, 0.20933091640472412, -0.4357617199420929, 0.13203738629817963, 0.29264676570892334, 0.0339428074657917, -0.2620050311088562, -0.07038804143667221, -0.4615207612514496, -0.11570359021425247, 0.9744807481765747, -0.3998269736766815, -0.0813757479190...
Good morning; my google-fu seems to be lacking today. I've just been upgraded to a Vista64 machine, and we only now have a 32 bit subversion server. I assume there is no problem using 64bit tortoisesvn with the 32 bit server ? Thanks. Max. (Edit) Thank you all. There won't be a problem, they are basically independe...
[ 0.36068040132522583, 0.19532112777233124, 0.5595487952232361, 0.13432183861732483, 0.0659412145614624, -0.07637061923742294, 0.469961553812027, 0.4390988349914551, -0.3378373384475708, -0.9145016074180603, -0.09355141967535019, 0.7619487047195435, 0.15041734278202057, 0.09638231247663498, ...
Does anyone know of a tool similiar to RedGate's SQL Data Compare that works with Microsoft SQL Server Compact 3.5? In the end I solved this problem by Exporting my 2 SQL Server Compact Databases to SQL Server Express 2005 (although 2008 would work) using [Data Port Console](http://www.primeworks-mobile.com/Products/Da...
[ -0.3195822238922119, 0.04157859459519386, 0.40466034412384033, 0.06685042381286621, -0.275851309299469, 0.1841973215341568, 0.057104941457509995, 0.01663948968052864, -0.2716014087200165, -0.5175023078918457, 0.3150016963481903, 0.5451779365539551, -0.2659258246421814, 0.2865695357322693, ...
I am using .htaccess to accelerate a site with the following redirects: ``` request for http://example.com/images/name.jpg routed to http://i.example.com/name.jpg request for http://example.com/css/name.css routed to http://c.example.com/name.css ``` From listening to the Stack Overflow podcast, I learned tha...
[ 0.2036166489124298, 0.17044660449028015, 0.5540539026260376, -0.019116977229714394, -0.215028777718544, 0.01296055968850851, 0.20099440217018127, 0.0037005930207669735, -0.5156979560852051, -1.0848757028579712, -0.031443994492292404, 0.4358404278755188, -0.28299710154533386, 0.339607954025...
!^i\.example\.com [NC] rewriterule ^images/([^/]+)$ http://i.example.com/$1 [L] rewritecond %{HTTP_HOST} !^c\.example\.com [NC] rewriterule ^css/([^/]+)$ http://c.example.com/$1 [L] ``` The problem I have is that this technique works perfectly for image tags included in html, but doesn't work for i...
[ 0.35543274879455566, 0.20384640991687775, 0.6841948628425598, -0.28528884053230286, 0.2080278992652893, -0.06185516342520714, 0.38922473788261414, -0.648900032043457, -0.17519618570804596, -0.6640857458114624, 0.04560195654630661, 0.8074607253074646, -0.2822459042072296, -0.236254423856735...
the style sheets, I'd like to know: **why doesn't url rewriting apply to stylesheets the way it does to html img tags**. **[update1]** This problem exists in Safari 4 Beta, Firefox 3.0.3, and Chrome, but the **page works perfectly in IE6**. **[update2]** Adding [L,R=301] and [L,R=302] did not help. **[update3]** I t...
[ 0.2958565056324005, 0.21276946365833282, 0.7205273509025574, -0.23454102873802185, -0.28149405121803284, -0.11602514982223511, 0.2788974642753601, -0.4860404133796692, -0.09908369183540344, -0.7910574078559875, 0.04326000064611435, 0.8032668828964233, -0.5322406888008118, -0.12886764109134...
^i\.domain\.com$ rewriterule ^images/([^/]+)$ $1 [L] rewritecond %{HTTP_HOST} ^c\.domain\.com$ rewriterule ^css/([^/]+)$ $1 [L] ``` It still didn't work. Bizarrely, the server error is: > File does not exist: /var/www/html/css/var, referer: <http://domain.com/page.html> I've founded one new elegant way to sol...
[ 0.035642869770526886, 0.02563507854938507, 0.8323897123336792, 0.012866565957665443, -0.12667062878608704, 0.17025335133075714, 0.11857851594686508, -0.5240116119384766, -0.04220801219344139, -0.7429195046424866, 0.35060596466064453, 0.6128855347633362, -0.42156827449798584, 0.027024280279...
future for solve different other problems. But for this case I've understaded that I can formulate my bproblem as "transform map's data to strings and write them to output stream" instead "copy map's data to ouput stream". My solution looks like: ``` namespace { std::string toString( const std::pair< size_t, size_t...
[ -0.1850470006465912, -0.5883195400238037, 0.6625931262969971, -0.2243361622095108, 0.4498422145843506, 0.09418470412492752, -0.042631007730960846, -0.19842828810214996, 0.11880706250667572, -1.1197171211242676, -0.09628015756607056, 0.5513266324996948, -0.40599194169044495, -0.030481429770...
method is most short and expressive than others.
[ 0.10769443213939667, 0.035399630665779114, 0.02052551507949829, 0.033454928547143936, -0.3057413399219513, 0.029945068061351776, 0.746857762336731, -0.2216542363166809, -0.02782422862946987, -0.6175883412361145, -0.14683200418949127, 0.29777905344963074, 0.0784689262509346, -0.246869638562...
First some background on the application. I have an application processing many independent tasks in parallel via a thread pool. The thread pool is now hanging. The following is an snippet from my thread dumps, all my Threads in pool-2 are BLOCKED by "pool-2-thread-78". It seems to be locked trying to write to the con...
[ 0.18423660099506378, 0.18610996007919312, 0.25229963660240173, -0.07617399096488953, -0.11395016312599182, -0.16285340487957, 0.06593911349773407, -0.05873885005712509, -0.4942130446434021, -0.5590277314186096, -0.05803420767188072, 0.444246381521225, -0.4307177662849426, 0.222525939345359...
I have considered just removing the console appender however I would rather know why it is blocking and remove it based on this knowledge. In the past the remove and see if it works has come back to bite me :) relevant section from my log4j > log4j.rootLogger=DEBUG, STDOUT > log4j.logger.com.blah=INFO, LOG > log4...
[ -0.04494943469762802, -0.052330706268548965, 0.5927088260650635, -0.14028654992580414, 0.19973526895046234, 0.20386339724063873, 0.3981948494911194, -0.33188122510910034, -0.09885506331920624, -0.5445353984832764, -0.2369631677865982, 0.6465509533882141, -0.3064471185207367, 0.202390238642...
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) > at > java.lang.Thread.run(Thread.java:619) > > > "pool-2-thread-78" Id=148 RUNNABLE at > java.io.FileOutputStream.writeBytes(Native > Metho...
[ -0.21537908911705017, 0.037622056901454926, 0.3675246834754944, -0.1727961003780365, 0.14379307627677917, 0.4681068956851959, 0.2246842384338379, -0.35737600922584534, -0.4863997995853424, -0.7899026870727539, -0.1701909601688385, 0.33153602480888367, -0.32846298813819885, 0.09747135639190...
locked <0x6c3ba437> (a org.apache.log4j.spi.RootLogger) at > org.apache.log4j.Category.forcedLog(Category.java:388) > at > org.apache.log4j.Category.error(Category.java:302) > at > com.blah.MessageProcessTask.run(MessageProcessTask.java:103) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.ja...
[ -0.06306199729442596, -0.28218328952789307, 0.6404426097869873, -0.05422777310013771, 0.15192119777202606, 0.10514814406633377, 0.45563623309135437, -0.35567376017570496, -0.7479569315910339, -0.3635905086994171, -0.41904374957084656, 0.4802173376083374, -0.2931138277053833, 0.442952483892...
it is good idea - the only problem beeing - the AsynAppender buffer is not flushed completely on exit.
[ 0.0047199539840221405, 0.018176890909671783, 0.6691195368766785, 0.20491580665111542, 0.12705333530902863, -0.19502361118793488, 0.47564762830734253, -0.03873720020055771, 0.00614243233576417, -0.48368626832962036, -0.0489935576915741, 0.20962046086788177, 0.12162723392248154, -0.023908413...
I was recently reading [this document](http://www.kegel.com/c10k.html) which lists a number of strategies that could be employed to implement a socket server. Namely, they are: 1. Serve many clients with each thread, and use nonblocking I/O and level-triggered readiness notification 2. Serve many clients with each thr...
[ 0.5732016563415527, -0.07002370804548264, 0.08423744887113571, 0.09554178267717361, -0.4197956621646881, 0.14521920680999756, 0.1363365799188614, 0.02637680619955063, -0.1660013645887375, -0.748910665512085, -0.1443120539188385, 0.50234055519104, -0.16628718376159668, 0.11683183163404465, ...
and some bad points. I am mostly interested in performance under high concurrency, and yes a number of the current implementations are too slow. So if I may start with the easy one, "5" is out, as I am not going to be hacking anything into the kernel. "4" Also looks like it must be out because of the GIL. Of course, ...
[ 0.15136446058750153, 0.04138339310884476, 0.13173426687717438, 0.10600270330905914, -0.3210405707359314, 0.026196623221039772, 0.2928325831890106, 0.1279136687517166, -0.41672319173812866, -0.5780742168426514, 0.19055679440498352, 0.5615881085395813, -0.1213260069489479, 0.1095861271023750...
be trivially combined with multiprocessing. "2" is the readiness-change notification, used by the newer epoll and kqueue "3" I am not sure there are any kernel implementations for this that have Python wrappers. So, in Python we have a bag of great tools like Twisted. Perhaps they are a better approach, though I hav...
[ 0.326416015625, -0.4608522951602936, 0.2166261523962021, -0.07899409532546997, -0.2752966284751892, -0.07271888852119446, 0.31765347719192505, -0.15428481996059418, -0.3984318971633911, -0.6144703030586243, -0.2440672665834427, 0.5900691747665405, -0.6643470525741577, -0.29509633779525757,...
to the docs it can also use `poll`. (EDIT: Removed Twisted reference, I thought it used asyncore, but I was wrong). "2" might be implemented with [python-epoll](http://sourceforge.net/projects/pyepoll) (Just googled it - never seen it before). EDIT: (from the comments) In python 2.6 the [select module](http://docs.pyt...
[ 0.18541701138019562, -0.11443395167589188, 0.5351304411888123, 0.017422690987586975, -0.14905402064323425, -0.1532593071460724, 0.09253725409507751, -0.04341527447104454, -0.2758568227291107, -0.65777188539505, -0.191017746925354, 0.48587214946746826, -0.39359208941459656, -0.0307349711656...
If you've got lots of processing to do, then python may not make sense with any of these schemes. For flexibility maybe look at [Twisted](http://twistedmatrix.com/trac/)? In practice your problem boils down to how much processing you are going to do for requests. If you've got a lot of processing, and need to take ad...
[ 0.49851590394973755, -0.35343948006629944, 0.05306369811296463, 0.3448905646800995, -0.11742446571588516, 0.11897515505552292, 0.09749098867177963, 0.08681332319974899, -0.645095944404602, -0.6250516772270203, 0.06431417912244797, 0.6308594942092896, -0.3970926105976105, 0.0298450309783220...
What is .baml file and what's the use of this file? Who creates this file? A compiled XAML file. [Wikipedia says](http://en.wikipedia.org/wiki/Extensible_Application_Markup_Language#Technology): > A XAML file can be compiled into a > .baml (Binary XAML) file, which may be > inserted as a resource into a .NET > Fra...
[ 0.428730845451355, 0.22830891609191895, 0.31490394473075867, -0.10581453889608383, -0.014463286846876144, 0.03368194401264191, 0.1654442399740219, -0.5055334568023682, -0.2753826677799225, -0.49709513783454895, -0.47077471017837524, 0.0094601484015584, -0.5033389329910278, 0.01398790720850...
I have just deployed my first application in .NET MVC and i'm having issues. I have resolved the iis 5.1 problems with the routing (If anyone is looking for this go here: <http://itscommonsensestupid.blogspot.com/2008/11/deploy-aspnet-mvc-app-on-windows-xp-iis.html> ) \*\*Now my issue is that wherever I call db.Subm...
[ 0.38837945461273193, 0.23012898862361908, 0.3618399202823639, -0.4158032238483429, -0.32280537486076355, -0.2752535045146942, 0.5477398037910461, -0.26793545484542847, -0.37895727157592773, -0.8057888746261597, 0.05788493901491165, 0.7094489932060242, -0.37835487723350525, 0.22135533392429...
checked under IIS and the user account it was trying to use only had read permissions. Once i changed this i restrarted IIS (not stop/start which i did the first time by accident) and the problem was resolved
[ -0.16010695695877075, 0.2187012881040573, 0.27466943860054016, -0.13002073764801025, 0.07605327665805817, -0.3020522892475128, 0.8223986625671387, -0.08810838311910629, -0.01969539187848568, -0.4131758213043213, -0.1034671813249588, 0.4196096956729889, -0.2572024166584015, 0.22539795935153...
CruiseControl.NET service needs to be restarted to pick up changes in the **projects** configuration files. I find this very annoying, not sure if it's a bug or it's the way it works. Is there any way to overcome this issue in people's experience? If your projects are separated in a different file from ccnet.config,...
[ 0.2562052011489868, -0.4553435444831848, 0.728946328163147, 0.3338799774646759, 0.30519965291023254, -0.4524206519126892, 0.09252955764532089, 0.27523088455200195, -0.544745683670044, -0.38603970408439636, 0.2186107188463211, 0.7526915669441223, 0.10140550881624222, 0.16158618032932281, ...
stop CCService net start CCService IISRESET ``` If you wanted to completely automate this, and had your projects under source control, then you could trigger an update and restart whenever your project files are touched.
[ 0.506689727306366, -0.24305732548236847, 0.20657862722873688, 0.14745889604091644, -0.1336136758327484, -0.8726401329040527, 0.3586543798446655, 0.09823271632194519, -0.27429383993148804, -0.5252509713172913, -0.25586432218551636, 0.6403480768203735, -0.5277045369148254, 0.1168190687894821...
I am using GUIDs as my primary key for all my other tables, but I have a requirement that needs to have an incrementing number. I tried to create a field in the table with the auto increment but MySql complained that it needed to be the primary key. My application uses MySql 5, nhibernate as the ORM. Possible soluti...
[ 0.029249660670757294, 0.2820911109447479, 0.6832543611526489, -0.06383607536554337, -0.035493675619363785, 0.301900714635849, -0.013308265246450901, -0.07612354308366776, -0.21820823848247528, -0.6891351938247681, 0.1262422651052475, 0.6223263740539551, -0.30716830492019653, 0.053500249981...
thoughts at the moment are leaning towards the composite key idea. EDIT: The Row ID (Primary Key) is the GUID currently. I would like to add an an INT Field that is Auto Incremented so that it is human readable. I just didn't want to move away from current standard in the app of having GUID's as primary-keys. A GUID v...
[ 0.018434612080454826, 0.19333800673484802, 0.5994201302528381, -0.024594038724899292, -0.12822265923023224, 0.2587168514728546, -0.22509832680225372, 0.08625966310501099, 0.0057585411705076694, -0.6247541904449463, -0.012600557878613472, 0.656775176525116, -0.22744818031787872, 0.056971371...
I've googled and so searched this, but to no avail (probably poor search skills). My problem is probably pretty simple, I simply want the mouseover event to only show the containing div (.action) when the list item is moused over (ui-state-default). Here's the Markup ``` <ul id="column-2" class="connectedSortable"> ...
[ -0.048041727393865585, -0.1855054795742035, 0.4992150068283081, -0.03185272216796875, -0.15092144906520844, 0.01296585239470005, 0.16307221353054047, -0.108515165746212, -0.3563036620616913, -0.5870036482810974, -0.36541056632995605, 0.47293516993522644, -0.22962772846221924, 0.12343908101...
src="duplicate.png" class="delete" alt="Duplicate this Story"> </div> </li> <li class="ui-state-default">forward <div class="action"> <img src="delete.png" class="delete" alt="Delete this Story"> <br /> <img src="duplicate.png" class="delete" alt="Duplicate th...
[ -0.002469148486852646, -0.11968819797039032, 0.23589839041233063, 0.05117397382855415, -0.009844651445746422, 0.2930724024772644, 0.022307930514216423, -0.3077442944049835, -0.6602707505226135, -0.29852068424224854, -0.16363923251628876, 0.4016278386116028, -0.3871364891529083, 0.224336624...
$(".action").show(); }).mouseleave(function(){ $(".action").hide(); }); }); ``` Now I realise that this is going to show every occurrence of .action - but how can I make sure it only shows it within it's parent li? I've tried using the jquery parent/child arguements but have failed miserably. Any...
[ 0.1701350063085556, -0.007859735749661922, 0.46362394094467163, -0.3030322790145874, 0.07540060579776764, 0.04529491811990738, 0.2661760449409485, -0.2557048499584198, -0.019571177661418915, -0.5086613297462463, -0.11300063133239746, 0.6542944312095642, -0.3276626169681549, 0.2094846069812...
I'm building a movies website... I need to display info about each movie, including genres, actors, and a lot of info (IMDB.com like)... I created a 'movies' table including an ID and some basic information. For the genres I created a 'genres' table including 2 columns: ID and genre. Then I use a 'genres2movies' table...
[ 0.704937219619751, 0.19704687595367432, 0.4918356239795685, 0.36912834644317627, 0.05655548721551895, -0.18689990043640137, -0.32823196053504944, -0.10225293785333633, -0.16447490453720093, -0.6457110047340393, 0.18890638649463654, 0.6932922601699829, 0.1533011943101883, 0.3395093679428100...
is a better way for doing this??? I need to do this also for actors, languages and countries so performance and database size is really important. Thanks!!! You are in the right track. That's the way to do many-to-many relationships. Database size won't grow much because you use integers and for speed you must set up...
[ 0.12653516232967377, -0.2329755574464798, 0.18840588629245758, 0.5169950127601624, 0.06329886615276337, -0.0945681557059288, 0.026550307869911194, 0.10117676109075546, -0.04786274954676628, -0.6855536699295044, 0.3905290961265564, 0.8128213882446289, 0.03248797357082367, -0.237393319606781...
I recently run into trouble when trying to AddRange(IEnumerable) to a List. Probably a classic issue, but I do not really get it yet. I understand that methods expecting a List parameter are not satisfied with a List, because they might try to add a Base to the List, which is obviously impossible. But if i get this c...
[ 0.30531734228134155, 0.13655172288417816, 0.29330119490623474, -0.4218737483024597, 0.19946521520614624, -0.0446406751871109, 0.06018003076314926, -0.18927860260009766, -0.2740696966648102, -0.526293933391571, 0.028248310089111328, 0.6330174803733826, -0.4935714304447174, 0.258829802274704...
{ m_Foos.AddRange (foos); // does work } public void AddRange2<T>(IEnumerable<T> foos) where T : Foo { m_Foos.AddRange (foos); // does not work } } class Program { static void Main(string[] args) { FooCol fooCol = new FooCol (); List<Foo> foos = new List<Foo> (...
[ 0.001976440194994211, -0.16165325045585632, 0.5996816158294678, -0.49270883202552795, 0.4314318001270294, 0.15222322940826416, 0.0008703288622200489, -0.150901198387146, -0.23735298216342926, -0.33030691742897034, -0.37518519163131714, 0.7566734552383423, -0.7195523977279663, -0.1528089046...
List<Bar> (); fooCol.AddRange1 (foos); // does work fooCol.AddRange1 (bars); // does not work fooCol.AddRange2 (foos); // does work fooCol.AddRange2 (bars); // does work } } ``` I tried to pass a hint to the compiler in the AddRange2 method, but this just moved to problem around....
[ 0.34192323684692383, 0.3350876569747925, 0.3257236182689667, -0.4279935657978058, 0.14653243124485016, -0.011586195789277554, 0.4507783055305481, -0.4231239855289459, -0.17127950489521027, -0.31707632541656494, -0.15014523267745972, 0.7085036635398865, -0.6852278709411621, -0.2159964889287...
Java 1.5, so maybe it will be added to C# at some point in the future, too...? This is covariance, and will be fixed in C# 4.0 / .NET 4.0. For now, the generic option is the best answer (for `IEnumerable<T>` - [not `IList<T>` etc](http://marcgravell.blogspot.com/2009/02/what-c-40-covariance-doesn-do.html)). But within...
[ -0.061423420906066895, -0.20652756094932556, 0.247869610786438, -0.20046702027320862, -0.1891864389181137, -0.27410510182380676, 0.29911357164382935, -0.1857004463672638, -0.23013578355312347, -0.3886680006980896, 0.003200570587068796, 0.5629410743713379, -0.5419289469718933, -0.2104031890...
**database.php**: ``` $db['default']['hostname'] = "192.168.2.104"; $db['default']['username'] = "webuser"; $db['default']['password'] = "----"; $db['default']['database'] = "vad"; $db['default']['dbdriver'] = "mysql"; $db['default']['dbprefix'] = ""; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRU...
[ -0.0965980663895607, 0.2867588400840759, 0.40864086151123047, -0.09664629399776459, -0.12463932484388351, 0.05057976022362709, 0.3797052204608917, -0.30227693915367126, 0.2413349598646164, -0.5376744866371155, -0.31867101788520813, 0.6247890591621399, -0.46091127395629883, 0.20451222360134...
I load the two database without having to do the following in all models constructors? ``` $database1 = $this->load->database('database1', TRUE); $database2 = $this->load->database('database2', TRUE); ``` Regards, Pedro Instead of applying the hack as mentioned by Camacho you can also set the 'pconnect'-flag in th...
[ 0.19228780269622803, 0.20401537418365479, 0.4931638240814209, 0.18980282545089722, 0.09806011617183685, -0.15291960537433624, 0.0831807479262352, -0.23821401596069336, -0.06829983741044998, -0.6713705062866211, 0.2930165231227875, 0.8003732562065125, -0.33284416794776917, 0.125911816954612...
I basically want to implement changing the color of the links when I hover over them. The HyperlinkEvent that is triggered when I mouse over the link hands me the HTML element, but it won't let me set any style attributes on it, and I can't figure out how to get the elements that do have settable attributes. I figured ...
[ 0.2905908226966858, -0.12132090330123901, 0.695647120475769, -0.31132835149765015, 0.0329103022813797, 0.05070575326681137, 0.20908880233764648, -0.028124181553721428, -0.09919880330562592, -0.8212485909461975, -0.20090851187705994, 0.3138492703437805, -0.4846465289592743, 0.18953335285186...
{ textPane = new JEditorPane(); textPane.setContentType(new HTMLEditorKit().getContentType()); JScrollPane scrollPane = new JScrollPane(textPane); textPane.setText( "Sample text with <a href=\"x\">a link</a> and another <a href=\"x\">link</a>."); initListeners();...
[ 0.0862882062792778, -0.21053989231586456, 0.8452234864234924, -0.23274798691272736, -0.0872858464717865, 0.23814676702022552, 0.35629400610923767, -0.6414767503738403, -0.15115970373153687, -0.8020548224449158, -0.3792695999145508, 0.3828863799571991, -0.4405609965324402, -0.08098616451025...
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); } private static void initListeners() { textPane.addMouseListener(new MouseAdapter() { @Override public void mouseExited(MouseEvent e) { removeHyperlinkHig...
[ 0.17031966149806976, -0.46189063787460327, 0.6281353235244751, -0.3272966146469116, 0.30452078580856323, -0.029515238478779793, 0.5788186192512512, -0.5371788144111633, -0.01914888434112072, -0.6263396143913269, -0.2504815459251404, 0.6576452255249023, -0.4941314160823822, 0.16574385762214...
}); textPane.addMouseMotionListener(new MouseMotionListener() { public void mouseDragged(MouseEvent e) { } public void mouseMoved(MouseEvent e) { Point pt = new Point(e.getX(), e.getY()); int pos = textPane.viewToModel(pt);
[ -0.27195796370506287, -0.4282270073890686, 0.7565409541130066, -0.4390527606010437, 0.5341408252716064, 0.25694358348846436, 0.20735768973827362, -0.29513248801231384, -0.18975403904914856, -0.47882184386253357, -0.3689895570278168, 0.5673477649688721, -0.4051109850406647, -0.0432446412742...
if (pos >= 0) { HTMLDocument hdoc = (HTMLDocument) textPane.getDocument(); Element elem = hdoc.getCharacterElement(pos); if (elem != null) {
[ -0.21863865852355957, -0.1840970665216446, 0.6682085990905762, -0.05168895795941353, 0.14808239042758942, 0.05232261121273041, 0.42568978667259216, -0.43345704674720764, 0.14257507026195526, -0.7193076014518738, -0.7048426270484924, 0.6083828210830688, -0.27845218777656555, -0.358425885438...
AttributeSet a = elem.getAttributes(); AttributeSet anchor = (AttributeSet) a.getAttribute(HTML.Tag.A); if (anchor != null) { //only
[ 0.08368320018053055, -0.1310368925333023, 0.5083351731300354, -0.0742817148566246, -0.008350534364581108, 0.10754294693470001, 0.18881410360336304, -0.5302695631980896, -0.1474102884531021, -0.39521288871765137, -0.24991120398044586, 0.6900420784950256, -0.37215155363082886, -0.17634333670...
highlight anchor tags highlightHyperlink(elem); } else { removeHyperlinkHighlight();
[ -0.11818262189626694, -0.2169370949268341, 0.36639219522476196, -0.3943881690502167, 0.26707133650779724, -0.28595349192619324, 0.2225913554430008, -0.4634360671043396, -0.021626686677336693, -0.35183626413345337, -0.5133195519447327, 0.4239467680454254, -0.5386658310890198, 0.070714928209...
} } } } }); } private static void removeHyperlinkHighlight() { changeColor(lastHyperlinkElementEntered, Color.BLUE); lastHyperlinkElementEntered = null; }
[ -0.09355711936950684, -0.525529146194458, 0.4713286757469177, -0.38676440715789795, 0.5149140357971191, -0.03988349810242653, 0.3507671058177948, -0.08063557744026184, 0.014039716683328152, -0.5230953693389893, -0.35250577330589294, 0.17908644676208496, -0.6057629585266113, 0.4923464357852...
private static void highlightHyperlink(Element hyperlinkElement) { if (hyperlinkElement != lastHyperlinkElementEntered) { lastHyperlinkElementEntered = hyperlinkElement; changeColor(hyperlinkElement, Color.RED); } } private static void changeColor(Element el, Color color...
[ -0.18624363839626312, -0.4268346428871155, 0.6929146647453308, -0.2698722183704376, 0.24379296600818634, 0.23774267733097076, 0.26381224393844604, -0.12166927009820938, -0.023715713992714882, -0.5639444589614868, -0.6142575144767761, 0.6326706409454346, -0.5880754590034485, 0.0961202159523...
int start = el.getStartOffset(); int end = el.getEndOffset(); StyleContext ss = doc.getStyleSheet(); Style style = ss.addStyle("HighlightedHyperlink", null); style.addAttribute(StyleConstants.Foreground, color); doc.setCharacterAttributes(start, end - start, s...
[ 0.11090681701898575, -0.2176072746515274, 0.6009206175804138, -0.20252999663352966, 0.17795111238956451, 0.1124211996793747, 0.5131832361221313, -0.5441824197769165, 0.046726521104574203, -0.6627769470214844, -0.7259018421173096, 0.5697383284568787, -0.33626654744148254, -0.105040110647678...
} } ```
[ 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, ...
I'm looking to do a refresh on some UI code and thought I would take a look at ideas on one of the Web's premier resources: [A List Apart](http://www.alistapart.com). I found [this article](http://www.alistapart.com/articles/conflictingabsolutepositions) on creating a layout with a fixed header, a left panel and a main...
[ 0.46268853545188904, -0.0948573648929596, 0.6953404545783997, 0.013138399459421635, -0.1682463139295578, -0.0289186779409647, 0.36701807379722595, -0.3727862536907196, 0.025374965742230415, -0.8288472294807434, -0.0791509672999382, 0.5681315660476685, -0.40552520751953125, 0.02103039063513...
CSS (I've put each entry on a line to save vertical space): ``` html { overflow: hidden; } body { overflow: hidden; padding: 0; margin: 0; width: 100%; height: 100%; font: 0.8em Verdana, sans-serif; line-height: 1.25; color: #333; background-color: White; } #coachheader { padding: 0; margin: 0; position: absolute; top...
[ -0.5437518358230591, 0.04570765793323517, 0.5928751826286316, -0.044703029096126556, -0.20660366117954254, 0.7583070993423462, 0.381262868642807, -0.09837116301059723, -0.348358690738678, -0.7049421072006226, -0.5874699354171753, -0.0131662143394351, -0.2642884850502014, -0.122053794562816...
} img.SM { height: 20px; vertical-align:middle; } ``` Here is the HTML: ``` <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Coach.master.cs" Inherits="FitnessCompanion.Coach" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html x...
[ -0.2475307732820511, -0.20308305323123932, 0.603426456451416, -0.14948402345180511, -0.20188333094120026, 0.17044758796691895, 0.13964344561100006, -0.5701057314872742, -0.38944941759109497, -0.6502388715744019, -0.23806065320968628, 0.19453006982803345, 0.15317270159721375, 0.000403006823...
<div id="coachheader"> <!-- This div does NOT show up initially --> <div style="text-align:left; float:left; margin-left:6px;"> <img src="/images/BSDILogoWeb.png" alt="BSDI" /> </div> <!-- The Menu --> <div style="float:right; margin-right:6px;"> <a menu table...>...
[ -0.4333452582359314, -0.17178763449192047, 0.3486793041229248, -0.1124565377831459, -0.48837998509407043, 0.13068170845508575, 0.09155915677547455, -0.14450138807296753, -0.06295929849147797, -0.6701763868331909, 0.2194032073020935, 0.2660386264324188, -0.17405858635902405, 0.0215730667114...
<menu output for the side - this div shows up!> </div> <div id="main"> <!-- Main Page - this Div does not show up. Contents: just a table --> <div> <asp:contentplaceholder id="ContentBody" runat="server"> </asp:contentplaceholder> </div> </div> </form> </body> </h...
[ 0.25551584362983704, 0.07668284326791763, 0.5197821855545044, 0.12889835238456726, -0.23691408336162567, 0.040394917130470276, 0.020334701985120773, -0.0031436432618647814, -0.10468845069408417, -0.7556238770484924, -0.18842893838882446, 0.24535171687602997, -0.16544701159000397, 0.0133276...
have played with this for hours. I've changed the overflow settings from auto to hidden, etc. so I don't think it is that. Oddly enough, a variant of this approach with just a header and the main area works fine in another part of the site but *that variant didn't work on this page either even after I eliminated essent...
[ 0.5392439961433411, 0.039061594754457474, 0.4037374258041382, 0.09230270236730576, -0.023533066734671593, -0.43906885385513306, 0.28015419840812683, 0.15973789989948273, -0.42125627398490906, -0.41743960976600647, 0.22266586124897003, 0.5535718202590942, -0.32606202363967896, 0.06817550957...
I resize the window in any direction no matter how slightly. Thanks to John and Guffa for trying to help. I've kept playing with the code and found that it is apparently a flaw in IE's ability to compute sizing. If I changed the IE conditional code to include IE 7 so that the sizing is calculated in Javascript, the pag...
[ 0.6219673156738281, 0.14968876540660858, 0.5080275535583496, -0.29268261790275574, -0.2189047485589981, -0.011950734071433544, 0.6280182003974915, 0.001775897340849042, -0.133220836520195, -0.7433943152427673, -0.0962006002664566, 0.6542645692825317, -0.12290304899215698, -0.25160348415374...
page: ``` <!--[if lt IE 8]> <style type="text/css"> #side { height:expression(document.body.clientHeight-120); } #main { height:expression(document.body.clientHeight-120); width:expression(document.body.clientWidth-260); } </style> <![endif]--> ``` Notice the "8" instead of the 7 in the if test.
[ -0.11806418001651764, 0.01948947086930275, 0.652337372303009, -0.17664805054664612, -0.06422007828950882, 0.21696768701076508, 0.4332585334777832, -0.4526618719100952, -0.04300791770219803, -0.6743728518486023, -0.46141138672828674, 0.28620442748069763, -0.04915784299373627, -0.26924681663...
I have a method that accepts a bunch of strings in seperate parameters ``` public string GetQueryString(string string1, string string2, string string3...) ``` It should return a string in the form of ``` "string1:value1 string2:value2 string3:value3..." ``` Because I don't want to put reflection logic in the call...
[ -0.07306340336799622, 0.2877855598926544, 0.34075579047203064, -0.04538680985569954, -0.09270743280649185, 0.007781598251312971, 0.330859512090683, -0.5303746461868286, -0.023331860080361366, -0.293440043926239, 0.16689471900463104, 0.6160553693771362, -0.2451474964618683, 0.27709838747978...
OP wants to do is something like this: ``` string str1 = "Hello"; string s2 = "World"; string MyStr = "Greetings"; string YourStr = "Earthlings"; string query = GetQueryString(str1, s2, MyStr, YourStr); ``` and have it return `"str1:Hello s2:World MyStr:Greetings YourStr:Earthlings"` --EDIT-- clarification is co...
[ -0.08968876302242279, 0.22448672354221344, 0.8170707821846008, -0.11821605265140533, 0.36455070972442627, -0.0471138171851635, 0.22466053068637848, -0.10850763320922852, -0.2837062180042267, -0.22675606608390808, -0.10633640736341476, 0.5689361691474915, -0.4737192392349243, 0.139405623078...
can think of that may work, is to use a expression tree (.NET v3.5+) ``` string GetQueryString(Expression<Func<String, string>> exprTree ) { // walk expreTree. // exprTree.Body.Left.Name would be the name of the variable // exprTree.Body.Left.Value would be it value. } string q = GetQueryString(...
[ -0.17696498334407806, -0.2450917661190033, 0.578166127204895, -0.194300577044487, 0.019353112205863, 0.04711262509226799, 0.373619019985199, -0.38555505871772766, -0.06263800710439682, -0.3550548255443573, -0.5044940710067749, 0.5130058526992798, -0.4958789646625519, -0.10872730612754822, ...
I have a list of documents and I want to display them grouped by the first letter of their name on a web-page, over three columns. In short, something like this: ``` A | C | E A | D | F B | D | F B | D | F | D | ``` An important difference from say, the Windows Explorer view style is that I want letters to stay ...
[ 0.22950759530067444, 0.4693338871002197, 0.4624845087528229, -0.1326405107975006, -0.11156276613473892, 0.08095452934503555, -0.12704335153102875, -0.22401262819766998, -0.313708633184433, -0.758894681930542, -0.0973600298166275, 0.2486651986837387, -0.03459522873163223, 0.3209525346755981...
them into a nested array. So I know (or can easily find out): * How many unique letters there are * How many letters there are in each group * How many entries there are in total * The mean average of how many values there should be in each column (ideally but not neccessarily) I don't care what your answers come in....
[ 0.5071495175361633, 0.4072001576423645, 0.13126274943351746, 0.08524100482463837, -0.3390187621116638, 0.17457619309425354, 0.4459785521030426, -0.19769667088985443, -0.2685789465904236, -0.5656433701515198, -0.043866220861673355, 0.17064215242862701, -0.4470140039920807, -0.22766920924186...
anything relevant and no, this isn't homework, so please don't mark it as such. Perhaps it helps if you look at the problem like this: For your example, you have a string like this: ``` AA BB C DDDD E FFF ``` The space positions are the places where you could start a new column. Everywhere else you mustn't to keep ...
[ 0.22851423919200897, 0.4455919563770294, 0.29728761315345764, -0.04126796871423721, -0.19686423242092133, 0.12837736308574677, 0.13191251456737518, -0.24887102842330933, -0.43121442198753357, -0.5116673707962036, -0.1074058786034584, 0.31883853673934937, -0.22221004962921143, 0.17868220806...
every possible combination: ``` 12345 00000 -> no break at all, column count = 1, max. lines = 13 ... 01010 -> your example, column count = 3, max. lines = 5 ... 11111 -> breaks everywhere, column count = 6, max. lines = 4 ``` This is a brute force attempt, but you can easily see that the 1's count affects the colu...
[ -0.1105155497789383, 0.0549059696495533, 0.09025263786315918, 0.07003473490476608, -0.15634319186210632, 0.1215367317199707, 0.660306453704834, -0.6949074864387512, -0.49245211482048035, -0.5904701352119446, -0.12006037682294846, 0.24841022491455078, -0.5981111526489258, -0.269198626279830...
only 3 1's, but it's still brute force. EDIT: Another approach I'd favorize: Write the letter counts like this: ``` A B C D E F 2 2 1 4 1 3 ``` You can now join letters that are next to each other. Always chose the two letters with the lowest count sum: ``` 2 2 1 4 1 3 - lowest = "2 1" 2 3 4 1 3 - lowest = "1 3...
[ -0.05348145216703415, 0.35062310099601746, 0.7252984642982483, -0.38453352451324463, -0.4515811800956726, 0.22354210913181305, 0.3958972990512848, -0.4891698658466339, -0.36795705556869507, -0.5564112067222595, 0.13888029754161835, 0.4570295214653015, -0.2757776975631714, -0.09632343798875...
perhaps won't lead to the optimal solution, but it's a nice and easy way to solve your problem, I think.
[ 0.14031361043453217, 0.23872067034244537, 0.10193469375371933, 0.2851584255695343, 0.15602003037929535, 0.2906554639339447, 0.19025376439094543, -0.01991455629467964, -0.023701339960098267, -0.3936196565628052, 0.22824427485466003, 0.3408944606781006, 0.1495906114578247, -0.061053138226270...
I just stumbled upon the SetItemChecked and SetItemCheckState when working on a checked listbox. The SetItemChecked takes an listindex and True/false to either set the listitem to checked or unchecked. The SetItemCheckState takes an listindex and a CheckState-enum to set the state to either checked, unchecked or Inde...
[ 0.40196558833122253, 0.0033922605216503143, 0.21843351423740387, 0.16003119945526123, 0.08897414803504944, -0.2981147766113281, 0.45647913217544556, -0.008154835551977158, -0.26542431116104126, -0.42631468176841736, 0.12390581518411636, 0.2515476644039154, -0.23731371760368347, 0.206921979...
no real difference. SetItemCheck calls SetItemCheckedState like so: ``` public void SetItemChecked(int index, bool value) { this.SetItemCheckState(index, value ? CheckState.Checked : CheckState.Unchecked); } ``` Like you've already assumed, I guess it's just a helper-method to make things simpler for the develop...
[ 0.2823494076728821, -0.06426083296537399, 0.2905307412147522, -0.13660407066345215, 0.0677700862288475, -0.4005170166492462, 0.2712869644165039, 0.09061045944690704, 0.014181527309119701, -0.49400898814201355, -0.17489014565944672, 0.3695981800556183, -0.49358895421028137, 0.02524097822606...
I need to set the default property of a dotNet Control used by an VB6 Application. ``` <ComClass(myControl.ClassId, myControl.InterfaceId, myControl.EventsId)> _ <DefaultProperty("NewProperty")> _ Public Class myControl Public Const ClassId As String = "86252de2-ca87-4468-adbe-ad7c47747759" Public Const Inter...
[ -0.36645421385765076, 0.03750244900584221, 0.6761713624000549, 0.11057569831609726, 0.5192223787307739, 0.021623747423291206, 0.3019438683986664, -0.42214423418045044, 0.16570131480693817, -0.7700276970863342, -0.26532548666000366, 0.463609904050827, -0.18035544455051422, 0.303213268518447...
Set(ByVal value As String) newPropertyValue = value End Set End Property End Class ``` The DefualtProperty Attribute does not do the trick. I have read [here](https://stackoverflow.com/questions/299251/exposing-the-indexer-default-property-via-com-interop) that manually setting the DispId to ...
[ -0.09621196985244751, 0.03238331526517868, 0.6306382417678833, -0.18483319878578186, 0.19281935691833496, -0.25725603103637695, 0.15168479084968567, -0.2193920910358429, -0.08332530409097672, -0.33665186166763306, -0.4380190372467041, 0.8822222948074341, -0.3807509243488312, 0.215783253312...
as the property now shows up as the default property in VB6. But this will not solve my problem, because there is code which I can't change, which will do something like this: ``` aStringVariable = myUserControlInstance ``` [This MSDN article](http://msdn.microsoft.com/en-us/library/h7bfkxc1(VS.71).aspx) has some in...
[ -0.02662701904773712, -0.06014639884233475, 0.5002592206001282, -0.06036707013845444, 0.02526909112930298, -0.31994932889938354, 0.3453364372253418, -0.22041817009449005, -0.23601216077804565, -0.6378306150436401, -0.31465452909469604, 0.7258522510528564, -0.3045700490474701, 0.49637076258...