text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
on here. Running a similar UPDATE query against the DB seems to work fine.
Thanks in advance for any help.
I finally figured out what was happening with this. Apparently, the "no count" option was turned on for this server.
In Microsoft SQL Server Management Studio 2005:
1. Right click on the server and click **Prop... | [
0.15305832028388977,
0.002721489407122135,
0.6869261264801025,
-0.06330937892198563,
-0.15660527348518372,
-0.3922659158706665,
0.17691980302333832,
-0.042667318135499954,
-0.5038992762565613,
-0.5000104904174805,
0.09388389438390732,
0.509104311466217,
-0.3599483072757721,
0.0817994326353... | |
entire server, @@ROWCOUNT always returns zero, and LINQ to SQL throws a ConcurrencyException after issuing updates to the database.
This isn't the only update behavior LINQ to SQL uses. LINQ to SQL doesn't perform an automated optimistic concurrency check with @@ROWCOUNT if you have a TIMESTAMP column on your table. | [
-0.2318606823682785,
0.17964600026607513,
0.6343250274658203,
0.06106159836053848,
-0.10497940331697464,
-0.12650221586227417,
0.2086334377527237,
0.09841796010732651,
-0.4268188774585724,
-0.24151034653186798,
0.3865070044994354,
0.29979628324508667,
-0.3101998567581177,
0.354736626148223... | |
How can I remove the "Personalize this Page" option in WSS 3.0? I'd like to do it in code with a feature at the web application level if possible.
It's a **permission** and can be accessed in the web UI of WSS:
Site Settings > People and Groups (under Users and Perms) > Site Permissions (left quick launch bar) > Setti... | [
0.13404400646686554,
-0.06291475147008896,
0.659821629524231,
0.030841950327157974,
-0.08880718052387238,
-0.38783180713653564,
0.28633004426956177,
-0.08305194973945618,
-0.15766574442386627,
-0.6027118563652039,
-0.1747613400220871,
0.3705188035964966,
-0.2823118567466736,
0.234325930476... | |
custom user group administration so we just won't give them the option to Manage Personal Views. | [
0.5004295706748962,
0.06836148351430893,
0.310199499130249,
0.12868981063365936,
-0.14403420686721802,
-0.21161134541034698,
0.24902071058750153,
0.27758342027664185,
-0.5097101926803589,
-0.42039310932159424,
0.1697431206703186,
0.34073546528816223,
-0.017237728461623192,
0.09876091778278... | |
I can't seem to access instance members of the surrounding class from inside an enum, as I could from inside an inner class. Does that mean enums are static? Is there any access to the scope of the surrounding class's instance, or do I have to pass the instance into the enum's method where I need it?
```
public class ... | [
-0.11278817057609558,
0.30034253001213074,
0.17068932950496674,
0.07613012194633484,
0.06197309121489525,
0.09500335901975632,
0.3694259226322174,
0.09818632900714874,
-0.21573592722415924,
-0.8090925216674805,
-0.3111351728439331,
0.39134106040000916,
-0.18653616309165955,
0.5926449894905... | |
// ... constructor etc.
public int deepThought() {
// -> "No enclosing instance of type 'Universe' is accessible in this scope"
return Universe.this.theAnswer;
}
}
public Universe(int locallyUniversalAnswer) {
this.theAnswer = locallyUniversalAnswer;
}
}
``... | [
-0.26412513852119446,
0.0142352394759655,
0.28722360730171204,
-0.21477310359477997,
0.3272237777709961,
-0.00812511146068573,
0.29205963015556335,
0.1629272848367691,
-0.3421861231327057,
-0.5163657665252686,
-0.36158522963523865,
0.4727185368537903,
-0.404587060213089,
0.4398517608642578... | |
section 8.9](http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.9):
> Nested enum types are implicitly
> static. It is permissable to
> explicitly declare a nested enum type
> to be static. | [
0.1254674792289734,
0.13816945254802704,
-0.04573585465550423,
-0.14505179226398468,
0.16736075282096863,
0.20373083651065826,
0.11721628904342651,
-0.23071061074733734,
-0.0872875526547432,
-0.008394370786845684,
-0.25053632259368896,
0.08098447322845459,
-0.6614672541618347,
0.1541510671... | |
I have a question - how can I get a number of row selected in a table? I am assigning it manually to a variable. The problem is that if a row was deselected, my variable still keeps the old value.
What can I do about it? Is there a method in UITableView that returns a number of a currently selected row?
Thank you in ... | [
0.15926703810691833,
-0.007172229699790478,
0.09412815421819687,
0.3301144242286682,
-0.13193616271018982,
0.18576845526695251,
0.01775350049138069,
-0.26496079564094543,
-0.32147762179374695,
-0.5950795412063599,
0.010380461812019348,
0.24538664519786835,
-0.3771633207798004,
0.3464551866... | |
Now that IE 8 is available:
<http://www.microsoft.com/windows/internet-explorer/worldwide-sites.aspx>
That's three flavors of IE to manage - 6, 7, 8 and QA code against and if you add in Firefox, Safari, Chrome, etc - 6 browsers.
How are folks dealing with all of these browsers and enabling the most diversity amongs... | [
0.21372787654399872,
0.10700689256191254,
0.4369806945323944,
-0.12920524179935455,
-0.24785669147968292,
0.0050859698094427586,
0.18219904601573944,
0.14093559980392456,
-0.2779075503349304,
-0.6749870181083679,
-0.19252662360668182,
0.6875366568565369,
-0.27466845512390137,
-0.1276043802... | |
called Microsoft Expression SuperPreview and will allow you to test websites in IE 6/7/8, and when complete will allow you to test in Firefox, Chrome, Opera, and Safari.
Edit: Here's the MSDN blog post concerning it:
<http://blogs.msdn.com/xweb/archive/2009/03/18/Microsoft-Expression-Web-SuperPreview-for-Windows-Int... | [
0.22084903717041016,
-0.377803772687912,
0.6703465580940247,
0.042787935584783554,
0.025055211037397385,
-0.3142326772212982,
0.3720983862876892,
-0.09343433380126953,
0.07214125990867615,
-0.5649735927581787,
-0.1512640118598938,
0.678020179271698,
-0.2543574571609497,
-0.2168739140033722... | |
I have a table with a lot of rows and I have changed the function associated with the trigger in insert or update events. This function makes calculations to update columns with conditional logic according to the values in two or more cells, so an single update statement would not be useful.
So, which SQL statement ca... | [
0.33978772163391113,
0.41878676414489746,
0.20843559503555298,
0.0009471222874708474,
-0.05012422055006027,
0.08949115872383118,
0.04171527549624443,
-0.43280622363090515,
-0.19931863248348236,
-0.3786643147468567,
0.44358763098716736,
0.6329752206802368,
-0.46735164523124695,
-0.045830201... | |
this cases I usually have and associated function in which I can run something like (not sure if works for progresql):
```
BEGIN
for c in (select column_id from table)
loop
function_on_trigger(c.column_id);
end loop;
END;
/
``` | [
0.0636458620429039,
0.1675255447626114,
0.3363593518733978,
-0.2855399549007416,
0.03871344402432442,
-0.1466604620218277,
0.35400283336639404,
-0.16937685012817383,
-0.02021872065961361,
-0.3069491982460022,
-0.24028602242469788,
0.476875901222229,
-0.3958584666252136,
-0.0022970782592892... | |
My question is simple. I've been using `ReadStartElement` and `ReadEndElement` with the `XmlReader` in my code just fine. The question is (and this is after looking at MSDN), do you need to match the two?
In other words, do I end with `ReadEndElement` for each and every `ReadStartElement` or is are there cases where ... | [
0.32559022307395935,
0.3149791359901428,
0.17086397111415863,
0.05830555036664009,
-0.3353641927242279,
-0.0670754611492157,
-0.2482978254556656,
-0.28668147325515747,
0.009347416460514069,
-0.5184256434440613,
-0.007141063921153545,
0.6026671528816223,
-0.16341790556907654,
-0.03001907095... | |
because both the `ReadStartElement` and `ReadEndElement` move the XmlReader to the next node. However, they check for different things.
This unnecessarily added verbosity in the code is just one reason I always prefer to navigate XML using an `XPathNavigator`. It's convenience is simply unmatched (unless you compare i... | [
-0.1340281367301941,
0.16350573301315308,
0.2312474399805069,
0.2583003044128418,
-0.1806347370147705,
-0.3084799349308014,
0.18959109485149384,
0.29584163427352905,
0.06399650126695633,
-0.6703460812568665,
-0.0739961490035057,
0.3917124569416046,
-0.030319595709443092,
0.0309982988983392... | |
I can understand how one can write a program that uses multiple processes or threads: fork() a new process and use IPC, or create multiple threads and use those sorts of communication mechanisms.
I also understand context switching. That is, with only once CPU, the operating system schedules time for each process (and... | [
0.23307010531425476,
0.055401913821697235,
-0.07968912273645401,
0.19518642127513885,
0.11992381513118744,
0.14304006099700928,
-0.089638851583004,
0.20953166484832764,
-0.5226811766624451,
-0.7278112769126892,
0.2067810297012329,
0.636616051197052,
-0.20941144227981567,
0.1908564418554306... | |
core a process runs on? Which system calls (in Linux, or even Windows) schedule a process on a specific core?
The reason I'm asking: I'm working on a project for school where we are to explore a recent topic in computing - and I chose multi-core architectures. There seems to be a lot of material on how to program in t... | [
0.5802245140075684,
0.16344287991523743,
-0.2512994706630707,
0.2967694103717804,
0.050548259168863297,
0.017923736944794655,
-0.12830762565135956,
0.22413864731788635,
-0.2028660923242569,
-0.363669216632843,
0.06912201642990112,
0.15485051274299622,
-0.10487108677625656,
0.30352947115898... | |
to the effect of "See, I am running an infinite loop on the 2nd core, look at the spike in CPU utilization for *that specific core*".
Any code examples? Or tutorials?
edit: For clarification - many people have said that this is the purpose of the OS, and that one should let the OS take care of this. I completely agre... | [
0.3078494071960449,
0.04503067582845688,
-0.0683356523513794,
0.2887323796749115,
0.27342045307159424,
0.026276804506778717,
0.20174743235111237,
0.26478588581085205,
-0.41981929540634155,
-0.5810191035270691,
-0.15219828486442566,
0.4860270023345947,
-0.32001298666000366,
-0.0952768698334... | |
core start fetching instructions?"
As others have mentioned, processor affinity is **Operating System specific**. If you want to do this outside the confines of the operating system, you're in for a lot of fun, and by that I mean pain.
That said, others have mentioned [`SetProcessAffinityMask`](http://msdn.microsoft.... | [
-0.04996292293071747,
-0.2456376701593399,
0.3572250306606293,
-0.0006062682950869203,
0.07888872921466827,
0.14001134037971497,
-0.03119044564664364,
-0.3037058413028717,
-0.19806568324565887,
-0.7060650587081909,
-0.15072540938854218,
0.4889943301677704,
-0.358266681432724,
-0.1559613049... | |
to running on either of core 2 or 3 (still allowing it to migrate between cores, but only between those two). | [
-0.02966746874153614,
-0.43067026138305664,
0.38609975576400757,
-0.0920957624912262,
0.13694432377815247,
-0.10493366420269012,
0.17483311891555786,
0.10010643303394318,
-0.01094458531588316,
-0.49090513586997986,
-0.4508970081806183,
0.026267271488904953,
-0.06335928291082382,
0.07030507... | |
Is there a performance benefit of having variables dimensioned in the beginning of a function verses having them declared just before they are used?
I am using VBA in MS Access 2003.
Example,
```
Function f(y As Long) As Long
Dim x As Long
If y <> 0 Then
x = 1000000
End If
End Function... | [
-0.030646633356809616,
-0.02610647864639759,
0.6649821400642395,
-0.3113095760345459,
-0.32138821482658386,
-0.2861468195915222,
0.46891021728515625,
-0.27803799510002136,
-0.027419576421380043,
-0.25852689146995544,
-0.07836663722991943,
0.8792352080345154,
-0.31190019845962524,
-0.032188... | |
Dim x As Long
x = 1000000
End If
End Function
```
Absolutely no difference for VBA. Declaring the variables will only affect the design-time debugging (the IDE will know what auto-complete (intellisense) to show). It doesn't affect performance at all, in this case. I've done a lot of VBA macros as we... | [
0.5121551156044006,
-0.2038806676864624,
0.32582101225852966,
-0.17108574509620667,
-0.017856165766716003,
-0.24963966012001038,
0.20476989448070526,
-0.22164951264858246,
-0.07929513603448868,
-0.0759562999010086,
-0.08243828266859055,
0.8771558403968811,
-0.4604431688785553,
0.1400670111... | |
is never executed, and is only used to guide the just-in-time debugging engine.
Hope it helps | [
0.4819062054157257,
-0.08485947549343109,
0.21847373247146606,
0.3396061360836029,
0.3922424912452698,
-0.2052478790283203,
0.5513184666633606,
-0.01678948663175106,
0.38138067722320557,
-0.1445750743150711,
-0.09777635335922241,
0.20547521114349365,
0.024737250059843063,
0.001010515494272... | |
How can I avoid TextBox vertical streching in following example:
```
<StackPanel Orientation="Horizontal">
<Button Height="40">OK</Button>
<TextBox Width="200"></TextBox>
</StackPanel>
```
Use the VerticalAlignment Property
```
<StackPanel Orientation="Horizontal">
<Button Height="40">OK</Button>
<TextBox Wi... | [
-0.38176077604293823,
0.030479567125439644,
0.5710111856460571,
-0.4374406039714813,
0.19006098806858063,
0.13945026695728302,
0.008076275698840618,
-0.3949313461780548,
-0.37951672077178955,
-0.9200113415718079,
-0.016063669696450233,
0.4866815507411957,
0.26730430126190186,
-0.0626270696... | |
I'm parsing a huge word file with Test descriptions, and have a problem of scope of nodes.
Word basically creates a list of paragraphs and I want to group them into a parent node. So for each node 'A' I want to group all the following nodes up to the next node 'A' into 'A'.
How can this be done with XSL?
Example:
I'v... | [
0.09730652719736099,
0.04423035308718681,
0.09852549433708191,
-0.06864587217569351,
-0.22343556582927704,
0.006219119299203157,
0.3121887743473053,
-0.1532660871744156,
0.0829974114894867,
-0.6575356721878052,
-0.0007217139354906976,
0.3414421081542969,
-0.30471476912498474,
-0.0550438798... | |
<xsl:variable name="start" select="count(preceding-sibling::*) + 1" />
<!-- end of range -->
<xsl:variable name="stop">
<xsl:choose>
<!-- either just before the next A node -->
<xsl:when test="following-sibling::A">
<xsl:value-of select="count(following-sibling::A[1]/preceding-si... | [
-0.40780773758888245,
-0.18735775351524353,
0.5408087968826294,
-0.19362308084964752,
-0.010825922712683678,
-0.12770725786685944,
0.11085200309753418,
-0.38901016116142273,
0.02006857469677925,
-0.18500567972660065,
-0.4836176931858063,
0.47597846388816833,
-0.14605358242988586,
-0.066501... | |
<xsl:value-of select="count(../*) + 1" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- this for debugging only -->
<xsl:attribute name="range">
<xsl:value-of select="concat($start + 1, '-', $stop - 1)" />
</xsl:attribute>
<!-- copy all nodes in the calculated range -->
... | [
-0.4034392535686493,
-0.2730801999568939,
0.5252377390861511,
-0.14407943189144135,
0.17874491214752197,
0.01180482842028141,
-0.014775609597563744,
-0.34578585624694824,
-0.0702151358127594,
-0.49802884459495544,
-0.2803753912448883,
0.4931592345237732,
-0.4378906488418579,
-0.12294622510... | |
/>
<ab />
<ac />
<A />
<ab />
<ac />
</root>
```
I get (I left the "range" attribute in to make the calculations visible):
```
<A range="2-3">
<ab />
<ac />
</A>
<A range="5-6">
<ab />
<ac />
</A>
``` | [
0.035057082772254944,
0.3379334509372711,
0.19623272120952606,
-0.4115050137042999,
0.06451296806335449,
0.3124276101589203,
0.3431934118270874,
-0.6248211860656738,
-0.020631270483136177,
-0.5689905881881714,
-0.2340480536222458,
0.48568233847618103,
0.04524393007159233,
-0.25451213121414... | |
I'm trying to add custom validation to a dynamically created control. Can I use .attr() to set a rule for a control?
```
$.fn.addValidationExpression = function(field) {
if (field.ValidationExpression != null) {
$("#fld"+getFieldIdSuffix(field)).attr("validateExpression", field.ValidationExpression);
... | [
0.29102638363838196,
-0.1618855893611908,
0.31024080514907837,
-0.058552879840135574,
0.17066243290901184,
-0.25652843713760376,
0.44602739810943604,
-0.5045751333236694,
-0.06622762978076935,
-0.1289779394865036,
-0.04390639066696167,
0.724838137626648,
-0.6137884259223938,
0.043167982250... | |
someControl:
{
validateExpression: true
},
someOtherControl:
{ | [
-0.12240463495254517,
0.04333977773785591,
0.13699156045913696,
0.14016763865947723,
-0.036221668124198914,
0.007175990846008062,
0.3145259916782379,
0.012003803625702858,
0.2326386719942093,
-0.05817684903740883,
-0.09511132538318634,
0.6371764540672302,
-0.023310869932174683,
-0.07748667... | |
validateExpression: true
}
}
});
```
Its better to use the [data](http://docs.jquery.com/Data)() option of jquery | [
-0.08841180056333542,
0.10428973287343979,
0.6477224826812744,
0.07918739318847656,
0.1396094709634781,
-0.4357711374759674,
0.25217631459236145,
-0.2975029945373535,
0.08061644434928894,
-0.29193243384361267,
-0.38131609559059143,
0.7978389859199524,
-0.10204380005598068,
-0.1435225456953... | |
I'm trying to drop a database from PgAdmin 3 and I get this error message:
```
ERROR: can't delete current database
SQL state: 55006
```
how can I force the delete/fix this error, of this database?
Quick fix in PgAdmin: just create another empty database. Select it. Delete the first one. Voila.
You can also connect... | [
0.19478148221969604,
0.12671691179275513,
0.478051096200943,
-0.12616130709648132,
0.4027142822742462,
-0.13907673954963684,
0.23241017758846283,
-0.041756771504879,
-0.5342869162559509,
-0.4678434729576111,
-0.10712097585201263,
0.5776653289794922,
-0.5934257507324219,
0.2761078178882599,... | |
I have the following javascript:
```
<script type="text/javascript">
function showjQueryDialog() {
$("#dialog").dialog("open");
}
$(document).ready(function() {
$("#dialog").dialog({
autoOpen: false,
modal: true,
buttons: { "Renew Membership": function() { ... | [
0.1782890409231186,
0.2801542580127716,
0.808292806148529,
-0.21095694601535797,
0.23466846346855164,
0.017605867236852646,
0.21285434067249298,
-0.28362536430358887,
0.1548002064228058,
-0.9606840014457703,
-0.06682747602462769,
0.5212187767028809,
-0.3291720449924469,
0.04876929521560669... | |
the user it. This is the sample of what I want to occur when the button is clicked on the server-side:
```
protected void LoginButton_OnClick(object sender, EventArgs e)
{
UserProfile profile = UserProfile.GetUserProfile(txtUserName.Text);
TimeSpan ts = profile.Expiration.Subtract(DateTime.Now);
if(ts.Da... | [
0.198404923081398,
-0.16852210462093353,
0.8361771106719971,
-0.24152526259422302,
0.25332626700401306,
-0.02112547867000103,
0.17602355778217316,
0.007422932423651218,
-0.15522322058677673,
-0.6146721243858337,
-0.3557964861392975,
0.6966834664344788,
-0.37746119499206543,
0.2006829231977... | |
to the Renew Button on the Dialog
```
public void Renew()
{
Response.Redirect("Renew.aspx");
}
```
As calling client side function is not possible I would suggest to emit in javascript the information required for the decision and make everything happen on the client side.
Alternatively you can do need a page re... | [
0.39132627844810486,
-0.031859587877988815,
0.7556632161140442,
-0.20475612580776215,
0.31611526012420654,
-0.3924564719200134,
0.3895914852619171,
-0.33904582262039185,
-0.262644499540329,
-0.5554000735282898,
-0.38545364141464233,
0.9857361316680908,
-0.38430729508399963,
-0.137980505824... | |
Could any of you please show me how to complete the following tasks?
```
// Prepare object to be saved
// Note that MasterTable has MasterTableId as a Primary Key and it is an indentity column
MasterTable masterTable = new MasterTable();
masterTable.Column1 = "Column 1 Value";
masterTable.Column2 = 111;
// Instantia... | [
-0.06961735337972641,
0.28437092900276184,
0.5389570593833923,
0.1795206218957901,
0.2006380259990692,
0.030021244660019875,
0.11769618839025497,
-0.5917831063270569,
-0.3055584728717804,
-1.048214316368103,
-0.033912964165210724,
0.5234962105751038,
-0.053351256996393204,
0.11061529070138... | |
I have an optional field in a database that I'm pulling out using a DAO Record Set. I need to check whether or not the field is set before I concatenate it with other fields. So far I have the following code snippet which I've tried with both `Is` and `=` (that's the obviously wrong syntax `[[Is | =]]`) to no avail. It... | [
0.040614377707242966,
0.24570272862911224,
0.08088190853595734,
-0.12001547962427139,
-0.13790030777454376,
0.03968382999300957,
0.1656496673822403,
-0.2549930214881897,
0.126748725771904,
-0.5944605469703674,
-0.16206704080104828,
0.4993527829647064,
-0.2655104100704193,
0.041629951447248... | |
=]] Null Then thisMiddleInitial = "" Else thisMiddleInitial = rs.Fields("MiddleInitial")
If prettyName(myLastName, myFirstName, myMiddleInitial) = prettyName(rs.Fields("LastName"), rs.Fields("FirstName"), thisMiddleInitial) Then
MsgBox "Yay!"
End If
rs.MoveNext
Wend
```
If there's a simpler way to... | [
-0.1256376951932907,
-0.048910439014434814,
0.6792094707489014,
-0.3992460072040558,
-0.019577469676733017,
-0.12393796443939209,
0.39904525876045227,
-0.23569491505622864,
0.009401218965649605,
-0.6562281847000122,
-0.26873087882995605,
0.34398648142814636,
-0.35116642713546753,
0.0727676... | |
look at [this article](https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-5034252.html) which has some explanation about Null values in Access VBA apps and how to handle them. | [
0.20592989027500153,
-0.04277202859520912,
0.018737416714429855,
0.29543957114219666,
0.05622473731637001,
-0.06966309249401093,
-0.04980069398880005,
0.1964230239391327,
-0.5206776261329651,
-0.531561017036438,
-0.17473851144313812,
0.2963624894618988,
-0.36550936102867126,
0.310097813606... | |
Need to have a **type-safe** bag of items that all implement a generic interface.
The desire is to do something like:
```
var stringItem = new IItem<string>();
var numberItem = new IItem<int>();
var items = new List<IItem<T>>(); //T of course doesn't accomplish what I want
items.Add(stringItem);
items.Add(numberItem... | [
-0.04914955794811249,
-0.10396429151296616,
0.6584051251411438,
0.048798903822898865,
-0.15469811856746674,
-0.04273848980665207,
0.5091441869735718,
-0.6707093715667725,
-0.3045281171798706,
-0.7201914191246033,
-0.1398310661315918,
0.50363689661026,
-0.47629472613334656,
-0.0953340530395... | |
again
dict.Add(typeof(string), new List<IItem<string>>); //that sure looks nice
```
I don't think you can escape the fact that `IItem<int>` and `IItem<string>` are different; the usual approach is a base-interface:
```
interface IItem {
object Value {get;}
}
interface IItem<T> : IItem {
new T Value {get;}
}
`... | [
-0.06534840911626816,
-0.1308503895998001,
0.24065540730953217,
-0.16886413097381592,
-0.34750041365623474,
-0.16672535240650177,
0.27094757556915283,
-0.2803959250450134,
-0.004840167239308357,
-0.938386857509613,
-0.11755114793777466,
0.681847095489502,
-0.45587658882141113,
-0.122220128... | |
I have a video player that I made with Silverlight 2, and to pass parameters in I'd have the following in the html file hosting it inside the SilverLight object tag:
```
<param name="initParams" value="path=http://foo.bar/pathToVid.wmv,
autoplay=false" />
```
This work... | [
0.3694445490837097,
0.0170721635222435,
0.5861796140670776,
-0.02999451383948326,
-0.34381622076034546,
-0.2265486717224121,
0.15785188972949982,
-0.38091230392456055,
-0.23294273018836975,
-0.5982633829116821,
0.16140542924404144,
0.7072838544845581,
-0.30993103981018066,
-0.0941124558448... | |
inside:
> AppData\LocalLow\Microsoft\Silverlight\Offline{{hostname}}.n\index.html
Or the equivalent on OS X; so this doesn't really work.
I'd like to take a command line argument after the application is launched and just use that as the video source, turning my SilverLight app into a general purpose video player. ... | [
0.356835275888443,
0.041950538754463196,
0.5756220817565918,
0.1441478282213211,
-0.046006884425878525,
-0.18562573194503784,
0.2850736081600189,
0.019824545830488205,
-0.17351405322551727,
-0.6671358942985535,
-0.04229813814163208,
0.6776577234268188,
-0.3262777626514435,
0.36111778020858... | |
IE8 is out and apparently it automatically turns on script (JavaScript) debugging whenever you launch your project in debugging mode. Does anyone know how to turn this ofF? I scoured the IE8/VS2008 settings but didn't see anything.
**Edit:** You can't just go into Internet Options and disable debugging: <http://blogs.... | [
0.3379502594470978,
0.12477166205644608,
0.33917462825775146,
0.007556743919849396,
-0.3006937503814697,
-0.38751909136772156,
0.413240909576416,
0.2896770238876343,
-0.09784717857837677,
-0.3674877882003784,
0.00466239545494318,
0.5204741954803467,
-0.21950267255306244,
0.0450840480625629... | |
getting a blog post with some workarounds [here](http://blogs.msdn.com/greggm/archive/2009/04/06/disabling-script-debugging-in-vs-2008-ie8.aspx). Sweet!
It's annoying, but you can do this per session:
1. Start debugging your website, F5
2. In the top menu, go to Debug;Windows;Processes
3. In my Processes window, there... | [
0.04378870129585266,
0.037914350628852844,
0.4367503225803375,
0.13611306250095367,
-0.2463102787733078,
-0.3268832862377167,
0.5362680554389954,
-0.13243404030799866,
-0.1157713457942009,
-0.49506574869155884,
-0.03169278800487518,
0.34539949893951416,
-0.3671022653579712,
0.1848221421241... | |
at the same time, and the Silverlight option takes precedence. The link also provides several registry tweaks to partially or fully disable script debugging.
I started using the Silverlight workaround technique after I posted this answer, so I was coming back to update it when I saw that the OP found the same solution... | [
0.3856125771999359,
0.009316266514360905,
0.12488602101802826,
0.30572399497032166,
0.03695123642683029,
-0.34402692317962646,
0.3333413302898407,
-0.15898965299129486,
-0.31546297669410706,
-0.5341358184814453,
0.1436292678117752,
0.48643651604652405,
-0.11075437068939209,
-0.164492473006... | |
**EDIT**: To people building tagging systems. Don't read this. It is not what you are looking for. I asked this when I wasn't aware that RDBMS all have their own optimization methods, just use a simple many to many scheme.
I have a posting system that has millions of posts. Each post can have an infinite number of tag... | [
0.8512340784072876,
0.09950653463602066,
0.05122179165482521,
0.1631939560174942,
-0.3252854645252228,
-0.10592657327651978,
0.14366132020950317,
0.24445834755897522,
-0.39664894342422485,
-0.6113896369934082,
0.227024644613266,
0.015031540766358376,
-0.2776019871234894,
0.2391356080770492... | |
the tag and when.
My question is how can I implement this? It has to be fast searching posts by tag, or tags by post. Also, users can add tags to posts by typing the name into a field, kind of like the google search bar, it has to fill in the rest of the tag name for you.
I have 3 solutions at the moment, but not sur... | [
0.30942144989967346,
-0.2888222634792328,
0.5065318942070007,
0.22101064026355743,
-0.16510601341724396,
-0.40415406227111816,
0.07288213074207306,
-0.23961317539215088,
-0.05335565283894539,
-0.7481942176818848,
0.3220451772212982,
0.514717698097229,
-0.410818874835968,
-0.259716510772705... | |
Linked list
tagId in post points to a linked list in tag\_assoc, the application must traverse the list until flink=0
```
post: id, content, ownerId, date, tagId, notesId
tag_assoc: id, tagId, ownerId, flink
tag: id, name, notesId
```
Method 2. Denormalization
tags is simply a VARCHAR or ... | [
-0.18120069801807404,
0.08198438584804535,
0.8555552959442139,
0.09142369776964188,
-0.12731558084487915,
-0.06742965430021286,
0.17965108156204224,
-0.3076995015144348,
-0.23745867609977722,
-0.6174021363258362,
-0.47305357456207275,
0.22275127470493317,
-0.423873633146286,
0.419658720493... | |
id, name, notesId
```
Method 3. Toxi
(from: <http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html>,
also same thing here: [Recommended SQL database design for tags or tagging](https://stackoverflow.com/questions/20856/how-do-you-recommend-implementing-tags-or-tagging))
```
post: id, content,... | [
-0.07164202630519867,
0.24214467406272888,
0.7492510080337524,
-0.10665931552648544,
-0.06441567093133926,
-0.17582528293132782,
0.053500667214393616,
-0.5919949412345886,
-0.12442168593406677,
-0.56638503074646,
-0.17539075016975403,
0.3512740433216095,
-0.37123391032218933,
-0.0695814937... | |
have to worry about is optimizing searching tags by name, I have not worked that out yet.
I made an ASCII diagram here: <http://pastebin.com/f1c4e0e53>
Bill I think I kind of threw you off, the notes are just in another table and there is a separate table with notes posted by different people. Posts have notes and tag... | [
0.7170342803001404,
0.04139552265405655,
0.2410692721605301,
0.023059474304318428,
-0.2540034353733063,
-0.15361472964286804,
0.05751367285847664,
-0.2324562817811966,
-0.29434680938720703,
-0.6889340877532959,
0.5427873134613037,
0.2309240698814392,
-0.4543984830379486,
-0.167973130941391... | |
`tags` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`owner` int(10) unsigned NOT NULL,
`date` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
DROP TABLE IF EXISTS `posts`;
CREATE TABLE IF NO... | [
0.2552708387374878,
-0.14881740510463715,
0.6093201041221619,
0.08101487159729004,
0.09961426258087158,
0.016677848994731903,
0.14246338605880737,
-0.6056351065635681,
-0.3509049415588379,
-0.14535222947597504,
-0.4355219602584839,
0.6274887919425964,
-0.6464356780052185,
-0.01006640028208... | |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`owner` int(10) unsigned NOT NULL,
`date` int(10) unsigned NOT NULL,
`postId` int(10) unsigned NOT NULL,
`note` TEXT NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`postId`) REFERENCES posts(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREME... | [
0.029301773756742477,
-0.19649849832057953,
0.6440681219100952,
0.22682712972164154,
0.10330990701913834,
0.4040233790874481,
0.28724223375320435,
-0.4646405875682831,
-0.15006741881370544,
-0.2378377616405487,
-0.2207651138305664,
0.4135674834251404,
-0.5701364278793335,
0.202485561370849... | |
(`tagId`) REFERENCES tags(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
```
I'm not sure how fast this will be in the future, but it should be fine for a while as only a couple people use the database. | [
0.19414328038692474,
-0.05202505737543106,
0.6204327940940857,
0.01812531240284443,
0.22667059302330017,
-0.24401457607746124,
0.7063875198364258,
-0.4131622910499573,
-0.10626104474067688,
-0.4248860776424408,
0.10364484041929245,
0.6880999803543091,
-0.42008036375045776,
0.05625171959400... | |
I'm curious if there is a way to process/connect buyers and sellers on my site without the site having to charge the buyer and credit the seller. In other words, I don't want to *touch* the money, but I do want to integrate the process as much as possible on my site.
I guess what I'm asking is how do auction sites ma... | [
0.6296880841255188,
0.11232812702655792,
0.33338260650634766,
0.07524903118610382,
0.055589862167835236,
-0.14358296990394592,
-0.2482728511095047,
0.06420765817165375,
-0.398000568151474,
-0.5125517845153809,
0.3554978668689728,
0.5663782358169556,
0.33763769268989563,
0.03919488564133644... | |
a buyer to go to PayPal and pay the seller, but returns back to Ebay with payment confirmation. Even though the transaction is between Buyer and Seller, Ebay is able to retrieve some details about that transaction. Is this simply because Ebay owns PayPal, or can other sites do the same?
I'm guessing you don't want to t... | [
0.5717219710350037,
-0.2107316553592682,
0.5111355781555176,
0.25725415349006653,
0.2904999256134033,
-0.17253811657428741,
-0.3309888541698456,
0.1413862705230713,
-0.3085194528102875,
-0.5099323987960815,
-0.004211857914924622,
0.5550109148025513,
0.2095753699541092,
0.22476674616336823,... | |
I'm writing a scheme interpreter, and in the case of an if statement such as:
```
(if (< 1 0) 'true)
```
Any interpreter I've tried just returns a new prompt. But when I coded this, I had an if for whether there was an alternative expression. What can I return in the if such that nothing gets printed?
```
(if (has-... | [
0.12957774102687836,
-0.13314419984817505,
0.33203789591789246,
-0.22512705624103546,
0.25096267461776733,
-0.006589896976947784,
0.45845237374305725,
-0.40427425503730774,
0.013293858617544174,
-0.2269078642129898,
-0.30059266090393066,
0.5557903051376343,
-0.460640549659729,
-0.224647954... | |
or '() are what I, personally, would expect. | [
0.6008263230323792,
0.4302992522716522,
-0.04222358763217926,
-0.10543835908174515,
-0.26520901918411255,
0.4078866243362427,
0.17703835666179657,
0.46203041076660156,
-0.3736293315887451,
-0.2628929913043976,
-0.5128733515739441,
0.681321382522583,
0.04987560585141182,
0.18112118542194366... | |
The title to this question isn't written very well. Sorry 'bout that.
I'm curious what the pros or cons would be to increasing the scope of an object instance within a method to the class level.
As a specific example, I have a non-static service class that wraps access to a repository class which is used to manage C... | [
0.42588964104652405,
0.11712050437927246,
0.25781822204589844,
0.317767858505249,
0.046504851430654526,
-0.1386481672525406,
0.09840591251850128,
0.25650614500045776,
-0.5207020044326782,
-0.48786789178848267,
0.54111248254776,
0.33071061968803406,
-0.23078839480876923,
0.40544095635414124... | |
if there's any benefit to creating a class level instance of this repository in the service class' constructor as opposed to the method level scope I'm currently using. This app is not currently using DI, although that might be an option. I'm also considering making the class static, but I have some other hurdles to ju... | [
0.278124064207077,
-0.0649072602391243,
-0.09675032645463943,
0.33169037103652954,
0.06435124576091766,
-0.1358097940683365,
0.3387967646121979,
0.09323941916227341,
-0.24657846987247467,
-0.494000107049942,
0.003813833696767688,
0.4195385277271271,
-0.2897818684577942,
0.1280461698770523,... | |
scope I'm currently using
Is it expensive to create the repository class? By "expensive" I mean has a profiler shown you that it is making a noticeable contribution to the running time of your application.
If so, you might want to cache it in an instance variable. If not, keep it local. As soon as you promote it to a... | [
1.0461643934249878,
-0.0865350142121315,
0.10826883465051651,
0.03613796457648277,
0.014210190623998642,
-0.264016717672348,
0.18194274604320526,
-0.1616518646478653,
-0.155095636844635,
-0.8783623576164246,
0.3270561397075653,
0.7633605599403381,
-0.4477021396160126,
0.34555450081825256,
... | |
mean you need to write a finalizer for your class? (ugh)
* If it needs parameters to create it, who supplies them?
* What happens if it needs to change or get re-created between method calls?
The old "Global Variables are Evil" quote is IMHO just the most common case of "shared state is evil", which is the actual prob... | [
-0.04481085389852524,
-0.16509181261062622,
-0.06384176015853882,
0.16569891571998596,
-0.12566424906253815,
-0.3204830288887024,
0.47430458664894104,
0.3896315097808838,
-0.268217533826828,
-0.36081013083457947,
0.13912566006183624,
0.2968929708003998,
-0.4059017300605774,
0.5706887841224... | |
I'm new to WPF/XAML & I'm just doing a training exercise at the moment.
I've got a noddy application and I want to change the size of the text in a tag based on the position of a scroll bar.
The text is defined by this code:
```
<FlowDocumentScrollViewer Grid.Row="1">
<FlowDocument>
<Paragraph>
... | [
0.2591504752635956,
0.07273723185062408,
0.9820156097412109,
-0.15638986229896545,
-0.14016693830490112,
-0.25838279724121094,
0.008585698902606964,
-0.2929065525531769,
0.06887790560722351,
-0.7439683675765991,
0.0776352658867836,
0.48204612731933594,
-0.3357323110103607,
0.07402644306421... | |
<Setter Property="FontSize" Value="???" />
</Style>
```
But I can't find out what needs to go in place "???". I've tried Googling for the answer to this, but I think I must be using the wrong search terms because I haven't found the answer yet.
I'm guessing that it's going to be really obvious, but I've got to admit... | [
0.18488885462284088,
0.27648717164993286,
0.5135858058929443,
-0.04346805065870285,
-0.2896932065486908,
-0.33681052923202515,
-0.048801444470882416,
-0.43076276779174805,
0.007216828875243664,
-0.8953745365142822,
-0.035215768963098526,
0.6502309441566467,
-0.2396601438522339,
-0.04021523... | |
We have a struts web application that is deployed on sun applicaition server that despite doing load test / system integrating test in development environments. There is no scenario of conneciton leak.
But however in the production environment. There seen to be connection leak as the connection in used keep on increas... | [
0.09656408429145813,
-0.13373175263404846,
0.5077950954437256,
0.26448488235473633,
0.036408681422472,
0.08930834382772446,
0.3553256690502167,
-0.5144426822662354,
-0.31588903069496155,
-0.4785795211791992,
-0.05887877941131592,
0.8726760149002075,
-0.3219456076622009,
0.03285158053040504... | |
```
val it:Iterator[Option[T]] = ...
it.flatMap( x => x elements ) //returns an Iterator[T]
it.flatMap( _ elements) //equivalent
``` | [
-0.30741745233535767,
-0.27545714378356934,
0.17796944081783295,
-0.04716093838214874,
0.22806072235107422,
0.28277814388275146,
0.042286116629838943,
-0.11316973716020584,
-0.20687620341777802,
-0.47208112478256226,
-0.5913020968437195,
0.8711491227149963,
-0.14237116277217865,
-0.2684328... | |
I'm wonder how people are kicking people out or blocking access to a site when you want to do an upgrade and you have users that are logged in.
My one thought is to just put a bool setting in a global file (such as the settings file) for whether or not the site is unavailable. True is available, while false is unavail... | [
0.4469867944717407,
0.1125798299908638,
0.19308842718601227,
0.020101269707083702,
-0.13651371002197266,
-0.41899019479751587,
0.5074731707572937,
0.3055242896080017,
-0.348807156085968,
-0.5797244906425476,
0.014815556816756725,
0.3329180181026459,
-0.34621867537498474,
0.3677483797073364... | |
finishing filling in a long form or writing a large portion of text (like a new question or answer on SO), as soon as they submit the form, they'd lose that information. (Can't always save it, because there maybe DB changes for that table or code may have changed already.)
2. Possible: On a busy site, editing the globa... | [
0.06609194725751877,
-0.1526852250099182,
0.17598643898963928,
0.2877042889595032,
-0.15075822174549103,
-0.30200162529945374,
0.5822411179542542,
-0.0683777779340744,
-0.3163079619407654,
-0.6158397793769836,
-0.19782620668411255,
0.30184516310691833,
-0.06280359625816345,
-0.273639559745... | |
have a field in the database with the same setting. At the moment, I don't generally have a table for settings, so this would be the only thing in the table, but I could see it being faster as it avoids the second problem.
Is there something that you've used that worked well or any other ideas?
I'm working with LAMP.... | [
0.3311220705509186,
0.10586455464363098,
0.6329513788223267,
0.05697644501924515,
0.10157196968793869,
-0.1592286229133606,
0.27084511518478394,
-0.0275424774736166,
-0.2520332634449005,
-0.6967039704322815,
0.024170588701963425,
0.6244358420372009,
-0.3136391043663025,
0.13344213366508484... | |
the maintenance mode, you can attach a specific and hopefully-unique string to the useragent header:
```
RewriteRule ^updating.*$ $0 [NC,U,QSA,L]
RewriteCond %{HTTP:User-Agent} !MY-CUSTOM-UA-STRING [NC]
RewriteRule .* /updating/ [NC,U,QSA,R=307,L]
```
Here's how to manipulate your user-agent in firefox:
Create a ... | [
0.27404654026031494,
-0.05063197761774063,
0.7015045881271362,
-0.019021350890398026,
0.17254050076007843,
-0.20066967606544495,
0.30023735761642456,
-0.18042579293251038,
0.09535039216279984,
-0.7930073738098145,
-0.2545917332172394,
1.2617746591567993,
-0.4146783649921417,
-0.16228491067... | |
that you save all the user's ongoing operations on the site and let her resume them after the maintenance period. Also, let them know the exact time of maintenance beforehand. | [
0.5177515745162964,
0.06339126080274582,
0.15859811007976532,
0.14212912321090698,
0.45001840591430664,
-0.15415863692760468,
0.02820817567408085,
0.17964968085289001,
-0.047021474689245224,
-0.3383268713951111,
-0.28848734498023987,
0.6550325751304626,
0.2992718815803528,
-0.2751419544219... | |
I was asked to make a clone of this: <http://www.bragster.com/>
Ok, not a clone per se, but a site with similar functionality on a lower budget! How low might one ask? Under 10K, probably under 5K.
My question: how do I explain to a non-tech savvy friend, that this is not possible, in the nicest terms, and convince ... | [
0.7845560908317566,
0.06446576118469238,
0.2081746906042099,
0.2066470980644226,
0.49701690673828125,
0.214180588722229,
0.06412982940673828,
0.3268863260746002,
-0.1622800976037979,
-0.39604562520980835,
0.24408917129039764,
0.354140043258667,
0.15464535355567932,
0.23844271898269653,
-... | |
just makes them more dogged. so just show them what -is- possible for their 10k and let them come to their own conclusion.
So, while drawing on other sites for inspiration is fine, "recreate X" is not a scope, it generally means the client hasn't thought it through. For a start, you don't know which parts of that site... | [
0.9735659956932068,
0.1350374072790146,
0.06749999523162842,
0.404735267162323,
0.11379961669445038,
-0.1414574235677719,
0.1880369335412979,
0.16426171362400055,
0.10991132259368896,
-0.5047987699508667,
0.07185095548629761,
0.1648806780576706,
0.09929395467042923,
0.1954386830329895,
-... | |
you'll then have an idea of the true scope.
* i want slick design
+ i want video uploads
+ i want video streaming
+ i want comments
+ ratings
+ sharing
+ competitions
+ blog
+ store
+ leaderboards
+ etc. etc.
then you can throw some numbers next to each one, and watch them add up to over 10k. this will illu... | [
0.8705610632896423,
-0.1523951292037964,
0.5796633958816528,
0.4095701575279236,
-0.0670497864484787,
-0.3324139714241028,
0.45319855213165283,
-0.08162007480859756,
-0.2856373190879822,
-0.4633938670158386,
0.05077720060944557,
0.6287238001823425,
0.16386254131793976,
-0.11348520219326019... | |
I am trying to create a new strong-typed view for an MVC project.
I tried to create it both from the Controller class (right click -> add View) or directly from the Views (right click -> Add view) and selected it to be a strong-typed view. From the drop-down, I selected the Model and data class it should refer to.
Wh... | [
0.24033123254776,
-0.10981246083974838,
0.6105855703353882,
-0.1379730999469757,
0.09440216422080994,
0.05697881802916527,
-0.021202819421887398,
-0.09625021368265152,
-0.1049702987074852,
-0.4962581694126129,
0.010398264974355698,
0.35357072949409485,
-0.4227536916732788,
0.42849963903427... | |
out... :-(
Any comment or idea would be great!
people never want to hear "that's impossible" especially entrepeneurial types, it just makes them more dogged. so just show them what -is- possible for their 10k and let them come to their own conclusion.
So, while drawing on other sites for inspiration is fine, "recreat... | [
0.8495111465454102,
0.12448865920305252,
0.11269816756248474,
0.2890812158584595,
0.18992455303668976,
-0.13180294632911682,
0.12598486244678497,
-0.0862165167927742,
-0.13055436313152313,
-0.4443085491657257,
-0.18287836015224457,
0.25108739733695984,
-0.013890715315937996,
0.165407866239... | |
the ground up, without resorting to "however bragster/youtube/ebay do it".
Just bullet point it, really quick and dirty. you'll then have an idea of the true scope.
* i want slick design
+ i want video uploads
+ i want video streaming
+ i want comments
+ ratings
+ sharing
+ competitions
+ blog
+ store
+ lea... | [
0.9883365631103516,
-0.03451404348015785,
-0.017849549651145935,
0.3506128489971161,
-0.0158059224486351,
-0.24033765494823456,
0.3216932415962219,
-0.17990031838417053,
-0.00871139857918024,
-0.4349939823150635,
0.28513023257255554,
0.6374413967132568,
0.1639564484357834,
-0.0850249528884... | |
I have a tar.gz with a full mysql database update that I can access via ftp.
This tar.gz updates daily and I would like to create a php and/or mysql connection to that ftp account that would allow me to run that large sql query on my local mysql server.
Any thoughts?
(I'm going to go out on a limb and assume you want... | [
0.7854949831962585,
0.1764608770608902,
-0.12929026782512665,
0.004288916010409594,
-0.10518790036439896,
-0.3917495012283325,
0.29380372166633606,
0.330596387386322,
-0.4303920567035675,
-0.4803524315357208,
0.05900857597589493,
0.6497455835342407,
-0.2573859989643097,
0.03014294058084488... | |
- \
--ftp-user=username \
--ftp-password=password \
"ftp://wherever/whatever.tar.gz" | tar xzOf - | mysql --user=whoever --password=secret dbname
```
in a file (`update-db.sh` for example) then `chmod` it:
```
chmod 755 update-db.sh
```
then you can just:
```
./update-db.sh
```... | [
-0.18355663120746613,
0.35376301407814026,
0.16307750344276428,
-0.2936009466648102,
-0.07179507613182068,
0.1257554441690445,
0.33463147282600403,
0.07351598143577576,
0.021753832697868347,
-0.5222185850143433,
-0.5220099091529846,
0.6749395728111267,
-0.23712123930454254,
0.2246355861425... | |
Besides trying the operation and catching the exception, is there a method to determine if a file can be moved or copied?
There is no way to know if a file move or copy will guaranteed succeed or not.
But you can check quite a few things to see if it will fail:
* Check for disk space at the destination location (you ... | [
0.2121119499206543,
-0.044768426567316055,
0.05427449196577072,
0.3222843408584595,
0.36974993348121643,
-0.3481236696243286,
0.3376118838787079,
-0.19921784102916718,
-0.5526115298271179,
-0.5765633583068848,
-0.21098850667476654,
0.616080105304718,
-0.05913547798991203,
-0.02207141555845... | |
it is not in use.
* You can read the entire source file to make sure there are no locks inside the file.
* A trick used by windows explorer when copying files (or moving across volumes) is to first create a blank file, then to extend the file to the full size. Only after the file is fully allocated, then writes start t... | [
0.29504621028900146,
-0.029776642099022865,
0.38294047117233276,
-0.016457457095384598,
0.2315462827682495,
-0.19503901898860931,
0.20472049713134766,
0.17535866796970367,
-0.5569393038749695,
-0.7851949334144592,
-0.3823060095310211,
0.3841092884540558,
-0.10890243202447891,
0.32468163967... | |
is in use, and you want to go this far, you could use Volume Shadow Copy (VSS).
**More on file locking:**
Please see my answer here for much more information on [file locking & permissions in linux](https://stackoverflow.com/questions/575328/fcntl-lockf-which-is-better-to-use-for-file-locking/575349#575349).
Please ... | [
0.15479977428913116,
0.008891214616596699,
0.4554806053638458,
0.12273350358009338,
0.1440918892621994,
-0.6924269795417786,
-0.05525197833776474,
-0.0529584176838398,
-0.3748873770236969,
-0.6277077198028564,
-0.47640785574913025,
0.6685696840286255,
-0.023705048486590385,
0.1376287937164... | |
I have a long string and I need to find instances of `'#!#'+some text+'#!#'` right now I have:
```
string.replace(/(#!#*#!#)/g,
function (m) {....});
```
I need the whole thing passed into a function like that so that I can replace them correctly.
However, I want `m` to only be equal to what lies between the... | [
0.009150302968919277,
0.3062904179096222,
0.3851155936717987,
-0.2267216444015503,
-0.06581184267997742,
-0.04154641553759575,
0.22211042046546936,
-0.24681000411510468,
-0.11328794062137604,
-0.3766808807849884,
-0.08358794450759888,
0.5082106590270996,
-0.23052898049354553,
0.35385859012... | |
it mean “a number of instances of `#`, which is probably not what you meant. Try:
```
/#!#(.*?)#!#/
```
(The `*?` means match as little as possible up to the `#!#`. Otherwise, if there are two `#!#` sequences, the expression will match `greedily` up to the last one.) | [
0.28254222869873047,
-0.19714999198913574,
0.08297591656446457,
0.08287879824638367,
-0.1914278268814087,
0.012453482486307621,
0.12114401161670685,
0.13309530913829803,
-0.14063726365566254,
-0.2773549556732178,
-0.07208269089460373,
0.7079469561576843,
-0.3362133502960205,
0.040928497910... | |
ok...in php how do i do this? given the following scenario:
```
// array of letters
var $letters = array('a', 'b', 'c');
// loop through array and create empty arrays with names like $a, $b, $c
foreach($letters as $letter) {
var $$letter = array();
}
```
Your code was almost correct. You just need to remove 'var'... | [
0.051607612520456314,
0.3304997682571411,
0.4683878421783447,
-0.1664942353963852,
-0.13886600732803345,
-0.027241043746471405,
0.6285114884376526,
-0.39741039276123047,
-0.17244687676429749,
-0.506406843662262,
0.003382347756996751,
0.5782143473625183,
-0.17656341195106506,
0.065792225301... | |
an aside, I would recommend against using eval() in your PHP.* | [
0.23593126237392426,
0.08258873224258423,
0.19159595668315887,
0.23363818228244781,
-0.2606116235256195,
-0.3167179822921753,
0.3379616439342499,
0.456988662481308,
-0.36662760376930237,
-0.49798449873924255,
0.20219188928604126,
0.21996958553791046,
0.2336125373840332,
-0.1824045479297638... | |
If I set TreeViewItem Background it highlights the header only. How can I highlight the whole line?
I have found a post almost solving a problem <http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b04f73e2-0b10-4d97-a6da-64df2e30c21d/>
But there are some problems:
1. It does not highlight the whole line
2. The... | [
0.26649561524391174,
-0.17605997622013092,
0.36465170979499817,
0.07546837627887726,
-0.5400856137275696,
-0.0238692294806242,
0.5534381866455078,
-0.0003696995845530182,
-0.2699185907840729,
-0.6018399596214294,
0.05231873318552971,
0.4119555652141571,
-0.12424317747354507,
-0.16893143951... | |
a bit more work. I'm sure there are many ways of doing this, but this method uses a Length Converter and a TreeViewItem extension method to get the Depth. Both of these are tightly coupled to the TreeViewItem visual tree, so if you start messing with the Templates then you may have troubles. Again, here is the importan... | [
0.4231056571006775,
-0.17792963981628418,
0.4706309139728546,
-0.03953343257308006,
0.05359172821044922,
-0.2822648286819458,
0.18806804716587067,
-0.4132959544658661,
-0.16700026392936707,
-0.6211366057395935,
0.05217668041586876,
0.5532952547073364,
-0.13941562175750732,
0.01291906740516... | |
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<Grid Margin="{Binding Converter={StaticResource lengthConverter},
RelativeSource={... | [
-0.11984025686979294,
-0.49491405487060547,
0.63201904296875,
-0.09510960429906845,
0.16472089290618896,
0.37474000453948975,
-0.1040448322892189,
-0.543734610080719,
-0.2419406622648239,
-0.607431948184967,
0.29277488589286804,
0.311789333820343,
-0.15766476094722748,
-0.00205636676400899... | |
<ColumnDefinition Width="19" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ToggleButton x:Name="Expander"
Style="{StaticResource ExpandCollapseToggleStyle}" | [
0.03371848165988922,
-0.523322343826294,
0.5218544602394104,
-0.2449057251214981,
0.0802374854683876,
-0.15639831125736237,
-0.10814157873392105,
-0.17142896354198456,
-0.5088096261024475,
-0.5224994421005249,
-0.3697468042373657,
0.5138619542121887,
-0.39526820182800293,
-0.11482948809862... | |
IsChecked="{Binding Path=IsExpanded,
RelativeSource={RelativeSource TemplatedParent}}"
ClickMode="Press"/>
<ContentPresenter x:Name="PART_Header"
Grid.Column="1" | [
-0.3278105556964874,
-0.34657809138298035,
0.6330273747444153,
0.12042911350727081,
0.11293119937181473,
-0.10273779183626175,
0.12145943939685822,
-0.24104894697666168,
0.000008030535354919266,
-0.5473533868789673,
-0.15344519913196564,
0.019447578117251396,
-0.38473206758499146,
0.249912... | |
ContentSource="Header"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
</Grid>
</Border>
<ItemsPresenter x:Name="ItemsHost" />
</StackPanel>
<!-- Triggers -->
</ControlTemplate>
```
**TreeViewDepth Extension**
```
public static class TreeViewIt... | [
-0.20826196670532227,
-0.1731933057308197,
0.40790265798568726,
0.18671320378780365,
0.1417158842086792,
-0.04597428813576698,
0.1630118191242218,
0.03217882663011551,
-0.39470067620277405,
-0.6651849746704102,
-0.4869745969772339,
0.317790150642395,
-0.04759420454502106,
0.244364172220230... | |
{
return GetDepth(parent) + 1;
}
return 0;
}
private static TreeViewItem GetParent(TreeViewItem item)
{
var parent = VisualTreeHelper.GetParent(item);
while (!(parent is TreeViewItem || parent is TreeView))
{ | [
0.03644522279500961,
-0.24038930237293243,
0.3605313301086426,
-0.024253778159618378,
-0.1735331267118454,
0.3126455247402191,
0.6240541338920593,
-0.06842449307441711,
-0.25769299268722534,
-0.36369889974594116,
-0.38868260383605957,
0.361037015914917,
-0.35830071568489075,
0.229096546769... | |
parent = VisualTreeHelper.GetParent(parent);
}
return parent as TreeViewItem;
}
}
```
**LeftMarginMultiplierConverter**
```
public class LeftMarginMultiplierConverter : IValueConverter
{
public double Length { get; set; }
public object Convert(object value, Type targetType, object parame... | [
0.28106462955474854,
-0.26457205414772034,
0.6005669236183167,
-0.25993236899375916,
-0.05249209702014923,
0.35686758160591125,
0.5807710289955139,
-0.33235591650009155,
-0.2952399253845215,
-0.5948973894119263,
-0.21155686676502228,
0.40974700450897217,
-0.11415354162454605,
0.50781029462... | |
return new Thickness(Length * item.GetDepth(), 0, 0, 0);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new System.NotImplementedException();
}
}
```
**Control**
```
<TreeView Margin="50" HorizontalContentAlignment="Stretch">
<Tr... | [
0.17243537306785583,
-0.3514079749584198,
0.44246888160705566,
-0.040899790823459625,
0.0020584536250680685,
0.2826840579509735,
0.35938695073127747,
-0.494726300239563,
-0.27397871017456055,
-0.7332442998886108,
-0.10614980757236481,
0.5739675760269165,
0.34413349628448486,
0.139185100793... | |
</TreeViewItem>
<TreeViewItem Header="sub test2"/>
</TreeViewItem>
<TreeViewItem Header="test3"/>
</TreeView>
```
**Full TreeViewItem Style**
```
<SolidColorBrush x:Key="GlyphBrush" Color="#444" />
<!--=================================================================
TreeViewItem
============... | [
-0.06451719254255295,
-0.24871592223644257,
0.6096867918968201,
0.04974418133497238,
-0.4295981526374817,
-0.16216011345386505,
0.4779270589351654,
-0.6758912205696106,
0.02294185943901539,
-0.3686533570289612,
0.06499488651752472,
0.4764713644981384,
-0.17068879306316376,
-0.2259457856416... | |
<Path x:Name="ExpandPath"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="1,1,1,1"
Fill="{StaticResource GlyphBrush}"
Data="M 4 0 L 8 4 L 4 8 Z"/>
</Grid>
<ControlTemplate.Triggers> | [
-0.03170396387577057,
-0.5679237246513367,
0.46384721994400024,
0.1409192681312561,
0.21848666667938232,
0.2892650067806244,
0.0018310295417904854,
-0.37146493792533875,
-0.1488949954509735,
-0.7918580174446106,
0.011879724450409412,
0.22455835342407227,
-0.2079058736562729,
0.153089880943... | |
<Trigger Property="IsChecked"
Value="True">
<Setter Property="Data"
TargetName="ExpandPath"
Value="M 0 4 L 8 4 L 4 8 Z"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value> | [
0.13626252114772797,
-0.40653911232948303,
0.5468156933784485,
-0.058234136551618576,
0.274358332157135,
0.03748580440878868,
-0.10564080625772476,
-0.6153139472007751,
-0.22578079998493195,
-0.4406646490097046,
-0.1486794799566269,
0.4771740138530731,
-0.3962303698062897,
-0.0376922860741... | |
</Setter>
</Style>
<Style x:Key="TreeViewItemFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Border>
<Rectangle Margin="0,0,0,0"
StrokeThickness="5"
Stroke="Black"
StrokeDashArray="1 2" | [
-0.406016081571579,
-0.40185102820396423,
0.8785291314125061,
0.12429565191268921,
0.019734550267457962,
0.1340152472257614,
-0.4559364318847656,
-0.8833913803100586,
-0.28844738006591797,
-0.46568581461906433,
0.3027757704257965,
0.20438054203987122,
-0.053492579609155655,
0.0341497361660... | |
Opacity="0"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Type TreeViewItem}"
TargetType="{x:Type TreeViewItem}">
<Setter Property="Background"
Value="Transparent"/>
<Setter Property="HorizontalContentAlignment"
Value="{Binding Path=Horizont... | [
-0.5230335593223572,
-0.15299905836582184,
0.5746198892593384,
-0.02285020239651203,
0.16544628143310547,
0.3582940697669983,
-0.14064738154411316,
-0.5673494338989258,
-0.17778365314006805,
-0.4582759737968445,
-0.14442183077335358,
0.4127442240715027,
-0.36635923385620117,
0.005846545100... | |
Value="1,0,0,0"/>
<Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="FocusVisualStyle"
Value="{StaticResource TreeViewItemFocusVisual}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Tree... | [
-0.009020639583468437,
-0.5228430032730103,
0.7616374492645264,
-0.029719529673457146,
0.05912252515554428,
0.006189048755913973,
0.050299327820539474,
-0.4328804612159729,
-0.10880018770694733,
-0.6756603717803955,
-0.244500532746315,
0.4937049150466919,
-0.23726052045822144,
0.0355171151... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.