text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
OutputLine(columnData);
}
}
``` | [
-0.22483839094638824,
-0.12413378059864044,
0.46053415536880493,
-0.3837320804595947,
0.12236540764570236,
-0.020239144563674927,
0.078511081635952,
0.14643004536628723,
0.01904747448861599,
-0.41317421197891235,
-0.2776350975036621,
0.5011801719665527,
-0.49584677815437317,
0.151174873113... | |
I've got a web application that uses Microsoft Sql Management Objects (SMO) dll's. I'm wondering how I go about redistributing the libraries for a remote machine.
As I understand it, these come with SQL server or Sql express - which isn't on the remote (shared) webserver. Asking the host to install them, is probably ... | [
0.35221007466316223,
0.22165605425834656,
0.1052335873246193,
0.04111804813146591,
0.05113564804196358,
-0.19389647245407104,
0.4001392126083374,
0.12628324329853058,
-0.45475131273269653,
-0.45354294776916504,
-0.03093855269253254,
0.28398239612579346,
-0.3861095905303955,
0.4177383184432... | |
snippet that would also be useful. The script variable is a SQL install script which has been read to the end. The nice thing about this is the outputting of each of the execute strings from SQL. I could of course just execute it all in one chunk, but that provides no visual feedback to the user line by line, that the ... | [
0.7464210987091064,
0.11154026538133621,
0.17931869626045227,
0.06419901549816132,
-0.22947481274604797,
-0.1835329234600067,
0.04195220023393631,
0.2843978703022003,
-0.17818935215473175,
-0.38016071915626526,
0.036801453679800034,
0.5896778106689453,
-0.23672257363796234,
0.1544494032859... | |
connection As New SqlConnection(Me.ConnectionString)
connection.Open()
connection.Close()
Dim server As New Server(New ServerConnection(connection))
server.ConnectionContext.SqlExecutionModes = SqlExecutionModes.ExecuteAndCaptureSql
Dim commands As StringCol... | [
-0.24378301203250885,
-0.5399089455604553,
1.0618531703948975,
-0.01848732866346836,
-0.10692796111106873,
0.1487630158662796,
0.27677497267723083,
-0.2999469041824341,
-0.4653545022010803,
-0.5914990305900574,
-0.36438488960266113,
0.3662998676300049,
-0.35292181372642517,
0.5125808715820... | |
Dim s As String
For Each s In server.ConnectionContext.CapturedSql.Text
AppendMessages(s)
Next
```
<http://www.mattberther.com/2005/04/11/executing-a-sql-script-using-adonet/>
from
<http://coolthingoftheday.blogspot.com/2006/11/execute-t-sql-scripts-with-gos.html>
Was what I... | [
-0.007760058622807264,
-0.4369630217552185,
0.6732391715049744,
-0.06963938474655151,
-0.477716863155365,
-0.12877769768238068,
0.31235945224761963,
-0.21512559056282043,
-0.029350802302360535,
-0.2707805335521698,
-0.17235995829105377,
0.6456215977668762,
-0.3251427114009857,
-0.028072485... | |
Is there a difference between the standard "Model View Controller" pattern and Microsoft's Model/View/ViewModel pattern?
MVC/MVVM is not an *either/or* choice.
--------------------------------------
The two patterns crop up, in different ways, in both ASP.Net and Silverlight/WPF development.
For ASP.Net, MVVM is used... | [
0.12141831964254379,
-0.47869303822517395,
0.4703860282897949,
-0.17620930075645447,
-0.14081022143363953,
-0.13822413980960846,
-0.09538964927196503,
-0.4308658838272095,
-0.5345459580421448,
-0.6176620721817017,
-0.26026004552841187,
0.4719081223011017,
-0.5598843693733215,
0.16008742153... | |
of this pattern, was that the `ViewModel` simply replaced the controller in `MVC` (as if you could just substitute `VM` for `C` in the acronym and all would be forgiven)...
The ViewModel does *not* necessarily replace the need for separate Controllers.
------------------------------------------------------------------... | [
-0.1047130897641182,
-0.09422694891691208,
0.5901466608047485,
0.49534502625465393,
0.003380267880856991,
-0.22402960062026978,
-0.11774938553571701,
-0.025663653388619423,
-0.25453421473503113,
-0.3574616611003876,
-0.3400100767612457,
0.16185277700424194,
-0.15276159346103668,
0.46900224... | |
testing. This is a good thing as the VM is just a bridge, between the designer and the coder, so should be kept simple.
Even in MVVM, controllers will typically contain all processing logic and decide what data to display in which views using which view models.
From what we have seen so far the main benefit of the Vi... | [
0.30841320753097534,
-0.14616474509239197,
0.4748630225658417,
0.42556533217430115,
-0.05406665802001953,
-0.34999680519104004,
-0.19351771473884583,
-0.4065488874912262,
-0.20514923334121704,
-0.5258309841156006,
-0.06759990006685257,
0.6842664480209351,
-0.00998461153358221,
0.0654988959... | |
a certain shape of data*. They have no idea where the data comes from.
* ViewModels *hold a certain shape of data and commands*, they do not know where the data, or code, comes from or how it is displayed.
* Models *hold the actual data* (various context, store or other methods)
* Controllers listen for, and publish, e... | [
0.6037352681159973,
-0.4369451403617859,
0.685857355594635,
0.4520796537399292,
-0.1180567741394043,
-0.12662208080291748,
-0.05474557355046272,
-0.3420497477054596,
-0.18254174292087555,
-0.5729515552520752,
-0.3115767538547516,
0.5923999547958374,
-0.24384264647960663,
-0.037284519523382... | |
also makes extensive use of controllers to separate all use-case logic.
Don't assume controllers are made obsolete by View-models.
----------------------------------------------------------
[I have started a blog on this topic which I will add to as and when I can (archive only as hosting was lost)](https://web.archi... | [
-0.07412905246019363,
0.14376239478588104,
0.5851597785949707,
0.5176419019699097,
0.2464524507522583,
-0.39678722620010376,
-0.13158287107944489,
-0.199260413646698,
-0.3318650424480438,
-0.4396381974220276,
-0.15276376903057098,
0.4935725927352905,
-0.0489443875849247,
0.3329982459545135... | |
and little state data (i.e. tiny memory overhead). This makes for much less memory-intensive apps than solutions where view-models have to be retained and it is ideal for certain types of mobile development (e.g. Windows Mobile using Silverlight/Prism/MEF). This does of course depend on the type of application as you m... | [
0.2886011004447937,
0.053610119968652725,
0.28751346468925476,
0.16618409752845764,
-0.08324437588453293,
-0.07356332242488861,
0.34281349182128906,
0.049640536308288574,
-0.3431173861026764,
-0.5907763242721558,
-0.2380087524652481,
0.3887048065662384,
-0.08801301568746567,
-0.26421761512... | |
and not the broader picture. This post was intended to cover the broader use of MVVM in Silverlight, WPF and ASP.Net and try to discourage people from replacing controllers with ViewModels.* | [
0.5507857203483582,
-0.440418004989624,
0.2952535152435303,
0.5873761773109436,
-0.12217922508716583,
-0.5676477551460266,
-0.059211112558841705,
0.2484048455953598,
-0.30856022238731384,
-0.2811221778392792,
-0.10325054824352264,
-0.021899431943893433,
-0.36477261781692505,
0.155707821249... | |
Say we have a list {a, a, a, b, b, c, c }
We want to loop through the list and make some kind of change when the item value changes... for example:
```
prevEmployer = String.empty;
foreach(Person p in PersonList){
if(p.Employer != prevEmployer){
doSomething();
prevEmployer = p.Employer;
}
... more cod... | [
0.3700014650821686,
-0.08101152628660202,
0.3122696280479431,
0.05482446402311325,
0.19292481243610382,
0.24535784125328064,
0.13959075510501862,
-0.39457955956459045,
-0.36166414618492126,
-0.5724093317985535,
-0.05392681062221527,
0.5573045611381531,
-0.2998464107513428,
0.32365545630455... | |
if you only need to perform an action for each distinct element in the list, however, if doSomething() just sets up some state based on the fact that list element has changed and you are operating on each element in the list (or need the individual elements for another purpose), then your method seems perfectly reasona... | [
0.30801981687545776,
-0.159464493393898,
0.032861169427633286,
0.06310789287090302,
0.25346827507019043,
-0.10770516842603683,
0.2932535707950592,
-0.6153664588928223,
-0.12258084118366241,
-0.4630697965621948,
0.12645095586776733,
0.47016632556915283,
-0.24602332711219788,
-0.095486827194... | |
I have a nib file where I have a view that contains a background image, a button and another image that covers the full screen (a shadow) that needs to be moved to the front.
On the view, I'm creating child views, and after creating those and adding them using `[self addView]` I need to move to the front the shadow ima... | [
0.2984652817249298,
-0.13427498936653137,
0.4658041000366211,
-0.13359282910823822,
-0.10445503145456314,
0.3139197528362274,
-0.06669116020202637,
0.08603772521018982,
-0.12226860225200653,
-0.8119471669197083,
0.2357630878686905,
0.5228384137153625,
-0.10755220055580139,
0.26757550239562... | |
with its parent, but it didn't work (and made no sense, since the subview is already connected to its parent in some way).
The `IBOutlets` way should work, and is probably the best way to do it. Make sure you made the proper connection in Interface Builder after you declared them in the .h file. | [
0.28904080390930176,
-0.25626641511917114,
0.6022027730941772,
0.23798194527626038,
-0.1347755491733551,
-0.4069063365459442,
0.3549904525279999,
0.10410775244235992,
-0.07815869152545929,
-0.628830075263977,
-0.01778830587863922,
0.5949684977531433,
-0.19010069966316223,
0.005074555519968... | |
I am looking to obfuscate our Java web app code within our existing Ant build script, but am running into problems around unit testing. I am obfuscating the code right after it has been compiled, before it is jar-ed and before the unit tests are ran.
However, if I obfuscate my production code and not my test code, al... | [
0.5929550528526306,
0.6028547883033752,
-0.08194255828857422,
-0.25378715991973877,
0.11401326209306717,
0.20144122838974,
0.6413475871086121,
0.21357156336307526,
0.3423909544944763,
-0.7874642014503479,
0.11034223437309265,
0.20653267204761505,
-0.287386029958725,
0.2886149287223816,
-... | |
test suite, but since we are shooting for high unit test coverage we will need to mark **all** of our methods as un-obfuscatable.
If I obfuscate the test classes as well, I run into two problems:
1: The production classes and the test classes get merged into the same output directory and I am unable to exclude the te... | [
0.2935957908630371,
0.21238531172275543,
0.1678263545036316,
0.0012140268227085471,
0.15099407732486725,
-0.1682973951101303,
0.5116761922836304,
-0.43719714879989624,
0.2199399769306183,
-0.8797146081924438,
0.06385033577680588,
0.4958154261112213,
-0.38016048073768616,
0.1901305466890335... | |
obfuscator has changed the names of the tests.
I could just run the obfuscator on the resulting .war/.ear files, but I want to have our unit tests run against the modified code to drive out any bugs caused by the obfuscator.
I am currently working with Zelix KlassMaster, but I am still in the evaluation phase so I ... | [
0.6282141804695129,
0.43136656284332275,
0.32359573245048523,
-0.13060638308525085,
0.02028372511267662,
0.05931168794631958,
0.12376585602760315,
-0.013838793151080608,
0.07621531188488007,
-0.6807788014411926,
0.07054787129163742,
0.7147703170776367,
-0.24204152822494507,
0.2961146235466... | |
reference) but not to obfuscate the tests themselves (i.e. don't change the names of the test classes or their methods)? Given previous experience with obfuscators I'd expect that to work.
So for example, suppose we had unobfuscated source of:
```
public class ProductionCode
{
public void productionMethod() {}
}
... | [
0.44771328568458557,
0.11255249381065369,
-0.006614819169044495,
-0.14697615802288055,
0.11630063503980637,
0.22445234656333923,
0.2750808596611023,
-0.3050900995731354,
0.12756769359111786,
-0.6112233400344849,
-0.3512476086616516,
0.6601389050483704,
-0.611190915107727,
0.095843262970447... | |
testProductionMethod()
{
new Xyzzy(). ababa();
}
}
```
That way your "run the tests" Ant tasks should be able to stay the same, because the API of the tests hasn't changed - merely the implementation of the methods. | [
0.5896320343017578,
-0.17839466035366058,
-0.13884557783603668,
-0.00915038213133812,
-0.15110647678375244,
-0.050142332911491394,
0.45524659752845764,
-0.2488221973180771,
0.009367331862449646,
-0.6404006481170654,
-0.0703793466091156,
0.4356306195259094,
-0.5688497424125671,
-0.141824319... | |
I might have messed up on a design decision. Instead of using a strongly typed collection of custom objects, I have used a generic List. Essentially, what i have is:
```
public class AreaFields
{
[XmlArray("Items")]
[XmlArrayItem("Item")]
public List<Fields> Fields { set; get; }
[XmlAttribute]
int... | [
0.2914844751358032,
0.025119315832853317,
0.33876869082450867,
0.08093572407960892,
-0.16049112379550934,
-0.12291613221168518,
-0.07698681205511093,
-0.44432565569877625,
-0.276334285736084,
-0.6415542364120483,
-0.24924540519714355,
0.43369126319885254,
-0.4492664933204651,
0.15458220243... | |
to get is:
```
<SomeXMLTag>
<AreaFields id='1000'>
<Items>
<Item Name="Test1" />
<Item Name="Test2" />
</Items>
</AreaFields>
<AreaFields id='1001'>
<Items>
<Item Name="Test1" />
<Item Name="Test2" />
</Items>
</AreaFields>
</SomeXMLTag>
```
Sinc... | [
-0.0394931435585022,
-0.3190276026725769,
0.3835909366607666,
0.23181180655956268,
-0.011019009165465832,
-0.03338427096605301,
0.3558313846588135,
-0.3160473704338074,
-0.16824322938919067,
-0.8474718332290649,
-0.30831098556518555,
0.1585313081741333,
-0.3106575012207031,
0.1133484691381... | |
list.
```
Ex: List<AreaFields> list = new List<AreaFields>();
// more code to add to list
list[0].GetRawXML(); //A method i have to serialize
```
You'll need a wrapper class; then serialize the instance of `MyWrapper` to get the xml as per your example.
```
[XmlRoot("SomeXMLTag")]
public class MyWrapper
{
... | [
0.1357734203338623,
-0.08484330028295517,
0.6406842470169067,
-0.004605710506439209,
-0.018118731677532196,
-0.1875094473361969,
0.033769458532333374,
-0.41157129406929016,
-0.3231372535228729,
-0.6083589196205139,
-0.5362153053283691,
0.45521050691604614,
-0.4601295590400696,
0.0812302529... | |
public string Name { set; get; }
}
``` | [
0.03446866571903229,
0.013771378435194492,
-0.13603897392749786,
-0.09201253950595856,
-0.1404588520526886,
-0.4014130234718323,
0.15437063574790955,
0.1766572892665863,
0.059706006199121475,
-0.35920286178588867,
-0.431265264749527,
0.5066301822662354,
-0.5909155011177063,
0.3850777149200... | |
Am I violating the Single Responsibility Principle (SRP) if I put "data access" methods on the business object? My gut feeling is the API feels more user friendly if the Load method is present on the class itself rather than having to guess which class the method happens to be in?
Example:
```
public class Image
{ ... | [
0.6279426217079163,
0.03225091099739075,
0.13685709238052368,
-0.08556341379880905,
-0.020694907754659653,
-0.15624001622200012,
0.2737531363964081,
-0.5590164065361023,
-0.09989506006240845,
-0.3530990183353424,
-0.1675097942352295,
0.7713369131088257,
-0.6045656204223633,
-0.140892162919... | |
this *per se* other than there is no compelling reason for the static method to live in the Image class (since it doesn't depend on anything in the class, but on the class itself).
if you end up with a bunch of load-from methods, they might be better in a different class | [
0.3779757022857666,
-0.2774007022380829,
-0.02137763984501362,
0.39393341541290283,
-0.19829362630844116,
-0.26015475392341614,
0.09147157520055771,
0.055992621928453445,
-0.21983923017978668,
-0.40044328570365906,
0.008430004119873047,
0.43757879734039307,
-0.4497603178024292,
0.148701548... | |
I have a large number of strings to process in php. I want to "fix" them to be title case (using `ucwords(strtolower($str))`) but only if they are all upper or all lower case already. If they are already mixed case, I'd just rather just leave them as they are.
What is the fastest way to check for this? It seems like `... | [
-0.11464699357748032,
0.20613384246826172,
0.30710482597351074,
-0.013627914711833,
-0.06900844722986221,
0.07021939754486084,
0.046592794358730316,
-0.027420472353696823,
0.14506420493125916,
-0.4192847013473511,
-0.0030676969327032566,
0.5400155186653137,
-0.28436022996902466,
0.07316257... | |
for($i=0;$i<strlen($str);$i++)
{
if ($str[$i] >= 'a' && $str[$i] <= 'z')
$lc++;
else if ($str[$i] >= 'A' && $str[$i] <= 'Z')
$uc++;
}
if ($uc == 0 || $lc == 0)
{
return ucwords(strtolower($str));
}
}
```
just use a string compare (case sensitive)
``... | [
-0.48380595445632935,
-0.04092300683259964,
0.6062926650047302,
-0.3285866677761078,
0.2608594000339508,
0.1929415613412857,
0.14182555675506592,
-0.4783206582069397,
0.06628832966089249,
-0.4320153295993805,
-0.5828567743301392,
0.8505654335021973,
-0.33315733075141907,
0.3219996690750122... | |
if (
(strcmp($str, strtolower($str)) === 0) ||
(strcmp($str, strtoupper($str)) === 0) )
{
$str = ucwords(strtolower($str));
}
return $str;
}
``` | [
-0.45406726002693176,
0.03568278253078461,
0.5346381068229675,
-0.3865797221660614,
0.31622177362442017,
0.16712377965450287,
0.18446709215641022,
-0.28702396154403687,
0.02070869319140911,
-0.2711654305458069,
-0.6233064532279968,
0.7115539312362671,
-0.2804481089115143,
0.476253449916839... | |
I'm getting a confusing error from rsync and the initial things I'm finding from web searches (as well as all the usual chmod'ing) are not solving it:
```
rsync: failed to set times on "/foo/bar": Operation not permitted (1)
rsync error: some files could not be transferred (code 23)
at /SourceCache/rsync/rsync-35.2... | [
0.14980851113796234,
0.35785412788391113,
0.40494391322135925,
-0.182416632771492,
0.20864635705947876,
-0.289451003074646,
0.5130209922790527,
-0.02415981888771057,
-0.31913304328918457,
-0.5525208115577698,
-0.22388820350170135,
0.6481231451034546,
-0.5496453642845154,
0.3157401084899902... | |
directories. | [
0.4021778404712677,
0.13808612525463104,
0.20039226114749908,
0.12061234563589096,
0.2224520742893219,
0.12663301825523376,
-0.04187145456671715,
0.03895900025963783,
-0.30193454027175903,
-0.3848712742328644,
-0.5310803651809692,
0.07509930431842804,
-0.10914967954158783,
0.16984850168228... | |
Is it possible to get all of my emails from your GMail inbox rather than only unread email? My current PHP script only gets unread email but I want the whole inbox.
I am making use of PHP and CURL. Firstly, is it possible to do this?
If so, can someone give me some hints on how to achieve this?
Use an IMAP API.
See:... | [
0.2324349284172058,
-0.08811518549919128,
0.585796594619751,
0.2495710402727127,
-0.1445229947566986,
-0.047019463032484055,
0.17366844415664673,
-0.03602909296751022,
-0.2929038107395172,
-0.6537599563598633,
0.20401445031166077,
0.7173826098442078,
-0.16982939839363098,
-0.07314384728670... | |
How would I write the following query using Linq to SQL?
```
UPDATE [TB_EXAMPLE] SET [COLUMN1] = 1
```
(My actual goal is more complex than this)
The DataContext class has two query methods, ExecuteCommand, and ExecuteQuery.
The ExecuteQuery method returns LINQ to SQL Entities, so you need to pass a type to it:
``... | [
0.272826611995697,
0.06836162507534027,
0.7291384339332581,
0.03373726084828377,
0.07073281705379486,
0.13351769745349884,
-0.20741477608680725,
-0.694758951663971,
0.08960618823766708,
-0.2089296281337738,
0.06206205114722252,
0.4289249777793884,
-0.3546246886253357,
0.19055376946926117,
... | |
WHERE ProductID = 1")
``` | [
-0.36090704798698425,
0.2585689425468445,
0.35292837023735046,
-0.44120892882347107,
-0.07347289472818375,
-0.09561276435852051,
0.09478861093521118,
-0.43811818957328796,
0.20522484183311462,
-0.29442572593688965,
-0.32103610038757324,
0.37124478816986084,
-0.22884811460971832,
0.34010103... | |
I'm developing a php / mysql application that handles multiple simultaneous users. I'm thinking of the best approach to take when it comes to locking / warning against records that are currently being viewed / edited.
The scenario to avoid is two users viewing the record, one making a change, then the other doing lik... | [
0.11289074271917343,
0.014018855057656765,
0.10260175168514252,
0.041654087603092194,
0.023003337904810905,
-0.15903455018997192,
0.097924143075943,
0.3496777415275574,
-0.3707689344882965,
-0.715414822101593,
0.049444958567619324,
0.6014565229415894,
-0.25403067469596863,
0.03649025782942... | |
must be in place to 'ping' the application and let it know the record is still being viewed / edited (otherwise, a user might simply close their browser window, and then how would the application know that).
Another solution I could see is to check the last updated time when a record is submitted for update, to see i... | [
0.4367154836654663,
0.05830506235361099,
0.3406830132007599,
0.14111824333667755,
0.286114364862442,
-0.15252968668937683,
0.26378291845321655,
-0.11136914789676666,
-0.5173935294151306,
-0.37322837114334106,
0.05556188151240349,
0.3169984221458435,
-0.08434171974658966,
-0.049034055322408... | |
this (what must be a fairly common) requirement?
I would do this: Store the time of the last modification in the edit form. Compare this time on submission with the time stored in the database. If they are the same, lock the table, update the data (along with the modification time) and unlock the table. If the times ar... | [
0.5051920413970947,
0.1517643928527832,
0.6657150387763977,
0.08552999794483185,
0.5008742213249207,
-0.0651879534125328,
0.03822878748178482,
-0.507079541683197,
-0.20725426077842712,
-0.6813943386077881,
0.014654002152383327,
0.6891117691993713,
0.08540571480989456,
-0.012837820686399937... | |
I was wondering if it is possible to create a super-type sub-type relationship in Oracle Designer. I would like to create something like this:
[](https://i.stack.imgur.com/dTkIg.gif)
(source: [temple.edu](http://ww2.cis.temple.edu/cis109friedman/CIS%20109%20-%20Lectur... | [
0.1629510372877121,
0.12604756653308868,
0.39660900831222534,
0.17093491554260254,
-0.06610497087240219,
-0.019824771210551262,
0.36283132433891296,
-0.4080534279346466,
-0.09504970908164978,
-0.3048701286315918,
-0.132724791765213,
0.36846795678138733,
-0.2284855842590332,
0.0372674390673... | |
Is there a way to tell the compiler (g++ in my case) to **not** optimize certain code away, even if that code is not reachable? I just want those symbols in the object file.
Example: Here is a simple function, and I do want this function to be compiled, even if it's never called.
```
void foo(){
Foo<int> v;
}
```
... | [
0.31411558389663696,
0.09748014062643051,
0.04675658047199249,
-0.25911542773246765,
0.020214863121509552,
-0.19409693777561188,
0.3943394720554352,
-0.14333263039588928,
-0.024658137932419777,
-0.36909109354019165,
-0.28895729780197144,
0.5954594016075134,
-0.6610445976257324,
-0.18676556... | |
Foo<int> v;
}
}
```
but that didn't seem to do it.
(If you really want to know why I on earth would want that -- it has to do with [this](https://stackoverflow.com/questions/555330/templates-use-forward-declarations-to-reduce-compile-time) question, where, instead of explicit template instantiation with `template ... | [
0.07789372652769089,
0.2916690707206726,
0.3231561481952667,
-0.5065364241600037,
-0.15353073179721832,
-0.18213129043579102,
0.3077360987663269,
-0.28597116470336914,
-0.23992016911506653,
-0.14631390571594238,
-0.06358404457569122,
0.7148836255073547,
-0.46174657344818115,
-0.21722754836... | |
T val_;
Foo(T val) : val_(val) {
// heavy code, long compile times
}
};
```
**foo-instantiation.cpp**
```
#include "foo.h"
void neverCalled() {
Foo<int> f(1);
}
// The standard way to instantiate it is this:
// template class Foo<int>;
// but in reality it is often hard to find out
// exactly what type... | [
0.3090701699256897,
-0.23060184717178345,
0.5378491282463074,
-0.13230018317699432,
0.07889176160097122,
-0.03675492852926254,
0.40016353130340576,
-0.11972372233867645,
-0.2761496901512146,
-0.428549587726593,
-0.44354048371315,
0.5985546112060547,
-0.46045905351638794,
0.0862518250942230... | |
Foo<int> foo(1);
return 0;
}
```
**Compilation (no optimization)**
```
g++ -c main.cpp
g++ -c foo-instantiation.cpp
g++ main.o foo-instantiation.oo
```
**Compilation (optimization)**
```
g++ -O2 -c main.cpp
g++ -O2 -c foo-instantiation.cpp
g++ main.o foo-instantiation.oo
main.o(.text+0x13): In function `main':
... | [
-0.1402914673089981,
0.061127156019210815,
0.2922889292240143,
-0.15401682257652283,
0.02821134403347969,
0.10477889329195023,
0.17425507307052612,
-0.4362049102783203,
-0.32518652081489563,
-0.5029723644256592,
-0.26089105010032654,
0.4344675540924072,
-0.6457582712173462,
-0.065796107053... | |
heavy code, long compile times
}
};
```
and in another a different definition:
```
template<class T>
struct Foo {
T val_;
Foo(T val); // no heavy code, can include anywhere and compile fast
};
```
This is explicitly not allowed in C++ (only one identical definition allowed) and if you break the rule your cod... | [
0.6880069971084595,
-0.015367587096989155,
0.30009108781814575,
-0.04115953668951988,
-0.1985369175672531,
-0.36070770025253296,
0.5199809074401855,
-0.08795388042926788,
-0.4621204733848572,
-0.16310761868953705,
-0.31085628271102905,
0.5862862467765808,
-0.4113065302371979,
0.07471770793... | |
Consider the following
```
if(!count($_POST)) { echo 'something'; }
if(empty($_POST)) { echo 'something'; }
if(!$_POST) { echo 'something'; }
```
Each line above pretty much do the same thing. I haven't been particular about which one I use. Should I be more particular? Does it really matter?
I would use this:
```
... | [
0.2873842418193817,
-0.10775057226419449,
0.05095786973834038,
-0.4956643879413605,
-0.053375691175460815,
-0.02466774545609951,
0.2964555025100708,
-0.3373694121837616,
-0.2018856555223465,
-0.1696891337633133,
-0.03532630205154419,
0.09466394037008286,
-0.5033102631568909,
0.136341720819... | |
This behavior is so bizarre that I don't even know how best to ask the question.
Given the following C# code snippet:
```
public class Foo {
private bool _value = true;
// ...
protected void Method()
{
_value = true;
if(!_value) {
throw new Exception("What the...?!?!");
}
}
}
```
Atta... | [
0.33542025089263916,
0.061532795429229736,
0.23108060657978058,
-0.2598327100276947,
0.09296424686908722,
-0.24486151337623596,
0.4369196593761444,
-0.33461394906044006,
-0.22992882132530212,
-0.289164274930954,
-0.23234128952026367,
0.561517596244812,
-0.496423602104187,
0.185822188854217... | |
is thrown. Setting a watch on the `_value` variable, I can see that the value of `_value` is `false` at the beginning of the method and does not change as I step over/into the assignment statement. More interestingly, the exception is *not* thrown if I Continue execution (F5), though things still aren't working correct... | [
0.3224993050098419,
0.047906991094350815,
-0.20141533017158508,
-0.17601895332336426,
-0.4483895003795624,
-0.35173299908638,
0.6876457333564758,
-0.48591646552085876,
-0.15844129025936127,
-0.30346229672431946,
-0.12663434445858002,
0.44279059767723083,
-0.04352259263396263,
0.03070239536... | |
were unexpectedly failing, found places where variables weren't being set properly which should be set based on the above-mentioned `_value` variable which is somewhat of a flag indicating whether stuff is dirty or not), and thus noticed the strange behavior where `_value` wasn't changing (the exception throwing thing ... | [
0.6800573468208313,
0.267855167388916,
-0.09095975756645203,
0.18054671585559845,
-0.119737409055233,
-0.3636314868927002,
0.49461162090301514,
-0.049856822937726974,
-0.23611144721508026,
-0.4339403212070465,
0.31422120332717896,
0.4092240035533905,
-0.05296456813812256,
0.325145721435546... | |
Does everything in a single namespace compile into its own assembly?
No, you can have multiple namespaces within an assembly. In VS terms, you can think of an assembly as a project. Each project within a solution, gets compiled into it's own assembly. Within an assembly though, you can have multiple namespaces. | [
0.4784078896045685,
-0.15963497757911682,
-0.3155290484428406,
0.36180174350738525,
-0.14494086802005768,
0.2531704604625702,
0.1478293091058731,
-0.06839166581630707,
-0.5301414728164673,
-0.7830771803855896,
-0.14344842731952667,
0.012088248506188393,
-0.3749192953109741,
0.3538366854190... | |
I'm interested in writing a little app to backup files from a USB to help my wife and reduce her stress levels when she thinks she's lost stuff!
I'm trying to figure out the best way to do so, I want something very simple, but like the idea of backing up files that change (bit like SVN). So I've come up with the follo... | [
0.3467543423175812,
-0.10412537306547165,
0.5428762435913086,
0.2109798640012741,
0.19245870411396027,
0.17595770955085754,
0.08414937555789948,
0.20100520551204681,
-0.4024944007396698,
-0.45954930782318115,
0.17408882081508636,
0.6407552361488342,
-0.2566321790218353,
-0.1097818240523338... | |
or similar on the USB drive, with a set of file types to scan for.
* Using this information it would compare it to previous information, removing, adding and updating files in a backup folder.
I only want to backup different files for speed. I'm not sure if scanning the backup directory and obtaining FileInfo's to com... | [
0.5798442363739014,
0.0032889333087950945,
0.3321196734905243,
0.30866774916648865,
-0.01177883893251419,
-0.014294326305389404,
-0.08125874400138855,
0.24260228872299194,
-0.3445796072483063,
-0.7289909720420837,
0.47128453850746155,
0.7905844449996948,
0.03813968226313591,
0.107480645179... | |
for linux you can use something like rsync. <http://samba.anu.edu.au/rsync/> or rsnapshot <http://www.rsnapshot.org/>
For windows, I believe that microsoft has SyncToy:
<http://www.microsoft.com/downloads/details.aspx?amp;displaylang=en&familyid=E0FC1154-C975-4814-9649-CCE41AF06EB7&displaylang=en> | [
0.12403785437345505,
-0.33707836270332336,
0.3785068392753601,
0.14635051786899567,
0.11342817544937134,
-0.09591980278491974,
-0.20977428555488586,
0.4209730625152588,
-0.42848169803619385,
-0.8053485155105591,
0.03152427077293396,
0.6304817795753479,
-0.35275542736053467,
0.1948610693216... | |
Many people here are probably familiar with one of [Joel Spolsky](http://www.joelonsoftware.com/) most popular blog posts, [Please Sir, May I Have a Linker](http://www.joelonsoftware.com/articles/PleaseLinker.html), where he cries out for a way to remove dependencies on the .NET framework so a stand-alone application c... | [
0.07569956034421921,
-0.06639391928911209,
0.21531391143798828,
0.1373436450958252,
-0.4417060315608978,
-0.1093786358833313,
0.308593213558197,
0.07690413296222687,
-0.4548991024494171,
-0.29836809635162354,
-0.03043225035071373,
0.5787822008132935,
0.18809884786605835,
0.0854557752609252... | |
out there now claiming to have C# linkers. (Jason Zander even said himself that it wouldn't take much to implement one.) Instead of the cute, dozen-so meg download of .NET 1.0, we now have a massive 200-300 mb cross-platform complete .NET 3.5 installer that contains versions of .NET for x86, x64, and ia64. Microsoft's ... | [
0.4283643066883087,
0.004179119598120451,
0.15355588495731354,
0.05241052806377411,
0.12429537624120712,
-0.276917427778244,
-0.03299387916922569,
0.16331583261489868,
-0.4178072512149811,
-0.6584805250167847,
-0.09818136692047119,
0.1799222081899643,
-0.22999386489391327,
0.27737480401992... | |
limited libraries and only works for x86
To make matters worse, as I understand it (please correct me if I'm wrong) the client profile don't even register with windows as having .NET 3.5 installed. This means if multiple .NET 3.5 client applications are installed on the computer, none will see each other and the runti... | [
0.17881140112876892,
0.1199425607919693,
0.16862289607524872,
0.11609049141407013,
-0.042350251227617264,
-0.3112458884716034,
0.20188510417938232,
0.3968839943408966,
-0.3664266765117645,
-0.7299501299858093,
0.037695519626140594,
0.6123200058937073,
-0.2766294479370117,
0.231366246938705... | |
your app. Even one of the most well known .NET apps, Paint.NET, was fraught with [Difficulties installing the application because of the massive .NET dependencies.](http://blog.getpaint.net/2008/08/24/the-paintnet-install-experience-part-1-version-3xx/) If THEY have problems distributing a free app, what about the rest... | [
0.6876136064529419,
0.22146524488925934,
0.42288780212402344,
-0.0014069153694435954,
-0.1716025173664093,
-0.12999095022678375,
0.4930080473423004,
-0.07257329672574997,
-0.18112647533416748,
-0.6024022698402405,
-0.02513820491731167,
0.9622899293899536,
-0.5659989714622498,
-0.3705844283... | |
install the massive .NET runtime?
Update: so, it looks like there's a couple of options:
Mono:
* [Mono has its own linker](http://www.mono-project.com/Linker). From the answer below, it looks like it works pretty well.
.NET:
* [Xenocode](http://www.xenocode.com/) seems to be one that's available and works.
* [Thin... | [
0.696761965751648,
-0.18040485680103302,
0.002723036101087928,
0.07413322478532791,
-0.26367050409317017,
-0.44880151748657227,
0.37876203656196594,
0.1315978467464447,
-0.48900285363197327,
-0.503633975982666,
-0.12443031370639801,
0.2696003019809723,
-0.4297967553138733,
-0.0044280411675... | |
like the Mono tools are getting use; how about the .NET based tools? Any other experience with them, or are we just going to have to wait for Microsoft to push it 3.5 out to everyone? I shudder to think how long it'll take for .NET 4.0 to be put out...
The case of the [Mono Linker](http://mono-project.com/Linker).
I c... | [
0.7410425543785095,
0.15506935119628906,
-0.17119990289211273,
0.021057114005088806,
-0.17852666974067688,
-0.41656017303466797,
0.1591356098651886,
0.18048503994941711,
-0.21509382128715515,
-0.48961567878723145,
0.0368918813765049,
0.5412391424179077,
-0.32476329803466797,
0.277474015951... | |
assemblies, and removes what's not necessary for a program to run. It doesn't merge assemblies all together, and it doesn't make a native program out of them.
There's a Mono.Merge clone of ILMerge, but it's not complete, and its author is not maintaining it. To generate a native program containing both the Mono runtim... | [
0.5037768483161926,
0.152147114276886,
-0.21919448673725128,
-0.010897384025156498,
-0.18922367691993713,
-0.1670091301202774,
0.4619980454444885,
-0.30563655495643616,
-0.4809015095233917,
-0.17817310988903046,
-0.16204829514026642,
0.1716146618127823,
-0.5387299656867981,
0.3412652611732... | |
blog posts about the linker:
* [A presentation of the linker](http://evain.net/blog/articles/2006/08/21/link-to-link)
* [A combined used of the linker and mkbundle](http://evain.net/blog/articles/2006/08/22/linking-all-the-way-down)
About our experience with the Linker. The Linker is currently used in two parts of th... | [
0.34237176179885864,
0.10767404735088348,
0.07563167065382004,
0.04808174446225166,
-0.32558754086494446,
-0.2676540017127991,
-0.05804973840713501,
-0.15632513165473938,
-0.3768567740917206,
-0.22869321703910828,
0.008390248753130436,
0.5128633379936218,
-0.33502671122550964,
0.1699033975... | |
way [we create our Moonlight assemblies](http://www.mono-project.com/MoonlightNotes#Assemblies). Moonlight being our implementation of Silverlight, the assemblies are a subset of the desktop assemblies. So we link our desktop assemblies to reduce their sizes, and using custom steps, we're transforming the public API to... | [
1.1684986352920532,
0.01849246397614479,
-0.059466905891895294,
0.12151428312063217,
-0.1723717749118805,
-0.12462784349918365,
0.1278361678123474,
-0.25414979457855225,
-0.18395504355430603,
-0.5320574045181274,
0.2230818122625351,
0.226022407412529,
-0.23965059220790863,
-0.0013323660241... | |
I'm trying to detect the speed of touch movement and i'm not always getting the results I'd expect. ***(added: Speed spikes around too much)*** Can anyone spot if i'm doing something funky or suggest a better way of doing it ?
```
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
self.previousTime... | [
-0.06337597221136093,
-0.18475940823554993,
1.1146239042282104,
-0.14222478866577148,
0.2326396256685257,
-0.061046402901411057,
0.448294073343277,
-0.42185088992118835,
-0.27947503328323364,
-0.8243473172187805,
0.27195635437965393,
0.4784216284751892,
0.07497868686914444,
-0.027904970571... | |
= distanceFromPrevious/timeSincePrevious;
self.previousTimestamp = event.timestamp;
NSLog(@"dist %f | time %f | speed %f",distanceFromPrevious, timeSincePrevious, speed);
}
```
You could try (zero out distanceSinceStart and timeSinceStart in touchesBegan):
```
distanceSinceStart = distanceSinceStart + distan... | [
-0.28516271710395813,
-0.15325690805912018,
1.068725347518921,
-0.20535191893577576,
0.21686051785945892,
0.1848030537366867,
0.3642177879810333,
-0.46818238496780396,
-0.1483045369386673,
-1.008757472038269,
0.3221683204174042,
0.8770530223846436,
0.26746323704719543,
-0.2596941292285919,... | |
near 1 if you want to give more weight to recent values. | [
-0.09903930127620697,
-0.1378578394651413,
0.3001922369003296,
0.024564126506447792,
0.0009787797462195158,
-0.1347280591726303,
-0.10501792281866074,
-0.0407504104077816,
0.0027241280768066645,
-0.35319119691848755,
-0.06362603604793549,
0.22189010679721832,
-0.039334677159786224,
0.16871... | |
I want to change the color Bright Green to Dark Red over time (240 hours). The best way I can see is to change the hex combo from 00FF00 to FF0000.
I don't know how to dynamically count up to FF0000 from 00FF00 for the life of me. I'm looking over a 10 day period, so most likely over 240 hours to increment.
Can anyon... | [
0.44272899627685547,
-0.05325295031070709,
0.5707904696464539,
-0.08807250112295151,
0.04888521879911423,
0.08136580884456635,
0.32449284195899963,
0.3513343930244446,
-0.5472267270088196,
-0.7237849831581116,
0.21475060284137726,
0.6868452429771423,
-0.1400138884782791,
0.1825946867465973... | |
of code here. Thanks guys. It can be in any language but will inevitably be converted to C#.
Just think about it in terms of the components. Even though it looks like one big hex number, it's actually three side-by-side.
At the start, red is 0, green is 255 (FF), blue is 0.
At the end, red is 255, green is 0, blue ... | [
0.34772711992263794,
0.24803121387958527,
0.35884055495262146,
0.14868153631687164,
-0.2727679908275604,
0.12268035113811493,
0.11463326960802078,
-0.2612168788909912,
-0.189524307847023,
-0.41057533025741577,
-0.071611188352108,
0.3532865345478058,
-0.014331191778182983,
0.089870087802410... | |
In Visual Studio 2005, I've recently reorganized a solution with over 30 projects into 5 solution folders. However, since I've done that, all the custom controls and user controls from my assemblies have disappeared from the WinForms Toolbox.
Has anyone experienced this? Are there workarounds? Is this fixed in Visual ... | [
-0.025726614519953728,
-0.005008290056139231,
0.38421007990837097,
-0.009172439575195312,
-0.1636640578508377,
0.09720376133918762,
0.522223174571991,
-0.08305827528238297,
-0.3257732093334198,
-0.5206472277641296,
-0.12761087715625763,
0.5675233006477356,
-0.5257057547569275,
-0.179733067... | |
I can't seem to connect to mysql with a php script, even though I can connect fine with phpmyadmin. I created a user with a password, and gave it the proper priveleges for the db, but everytime it connects it dies saying access denied. I am using xampp on a windows xp box. Firewalls are all disabled, and I've checked t... | [
0.09287220239639282,
0.30369630455970764,
0.4770945906639099,
0.04101237654685974,
0.035887207835912704,
-0.19934915006160736,
0.45291292667388916,
0.14176258444786072,
-0.019089030101895332,
-0.8449296951293945,
0.002063184976577759,
0.6638896465301514,
-0.19747458398342133,
0.45343583822... | |
more than an educated guess. If you grant access myuser@'127.0.0.1' or the servers actual ip address, you won't be allowed to connect using localhost as host. This is due to the fact that when "localhost" is specified as host, php will assume that you want to use a unix socket instead of network sockets, and in that co... | [
0.03624529764056206,
-0.044228509068489075,
0.5840932726860046,
-0.04068512097001076,
-0.027784207835793495,
-0.1461835354566574,
0.15788812935352325,
0.09739041328430176,
-0.24596063792705536,
-1.030434489250183,
0.016376471146941185,
0.3619140386581421,
-0.27477389574050903,
0.4631311297... | |
on Windows). If you
> want to use TCP/IP, use "127.0.0.1"
> instead of "localhost". If the MySQL
> client library tries to connect to the
> wrong local socket, you should set the
> correct path as Runtime Configuration
> in your PHP configuration and leave
> the server field blank.
Hope this isn't totally redun... | [
-0.06300756335258484,
-0.13950414955615997,
0.3812738358974457,
0.18631847202777863,
-0.043103016912937164,
-0.20762212574481964,
0.2785981595516205,
0.16114909946918488,
-0.3515138030052185,
-0.8798865675926208,
-0.16891756653785706,
0.5972419381141663,
-0.28538739681243896,
0.22898748517... | |
I am aware of javascript techniques to detect whether a popup is blocked in other browsers (as described in [the answer to this question](https://stackoverflow.com/questions/2914/how-can-i-detect-if-a-browser-is-blocking-an-popup)). Here's the basic test:
```
var newWin = window.open(url);
if(!newWin || newWin.closed... | [
0.2523033618927002,
0.21143287420272827,
0.27359747886657715,
-0.22358842194080353,
-0.175343319773674,
-0.3829408288002014,
0.5249450206756592,
-0.0014699737075716257,
0.04194885119795799,
-0.921667754650116,
-0.21630707383155823,
0.3148212432861328,
-0.17287372052669525,
0.01194630376994... | |
tell if the popup was blocked by Chrome's popup blocker. I try to avoid browser sniffing in favor of feature detection. Is there a way to do this without browser sniffing?
**Edit**: I have now tried making use of `newWin.outerHeight`, `newWin.left`, and other similar properties to accomplish this. Google Chrome return... | [
0.28870633244514465,
0.009727459400892258,
0.6429170370101929,
0.0031789334025233984,
0.07441388070583344,
-0.11475357413291931,
0.6973811388015747,
0.09010530263185501,
-0.13027802109718323,
-0.6776875853538513,
-0.12526863813400269,
0.30574148893356323,
0.1413743942975998,
-0.08578824251... | |
the correct values. In other words, I'm still no closer to figuring this out. Any help would be appreciated.
Well the "magical time" you speak of is probably when the popup's DOM has been loaded. Or else it might be when everything (images, outboard CSS, etc.) has been loaded. You could test this easily by adding a ver... | [
0.3320462107658386,
-0.3181970715522766,
0.47201141715049744,
0.2484147548675537,
-0.07152333855628967,
-0.29341086745262146,
0.03185539320111275,
0.039270058274269104,
-0.3895335793495178,
-0.6087844967842102,
-0.10833560675382614,
0.6954190135002136,
0.2638797163963318,
0.004232737701386... | |
danger in this is that Safari detection works in a conflicting way: the popup's DOM will never be ready() in Safari because it'll give you a valid handle for the window you're trying to open -- whether it actually opens or not. (in fact, i believe your popup test code above won't work for safari.)
I think the best thi... | [
0.1590377390384674,
0.0972181111574173,
0.08372735977172852,
0.08776594698429108,
-0.030195441097021103,
-0.27948078513145447,
0.659611165523529,
-0.41280966997146606,
-0.09161826223134995,
-0.5485230684280396,
-0.012851826846599579,
0.6456495523452759,
-0.13095460832118988,
-0.32863697409... | |
cross-browser detection, without the Chrome part.
```
function _hasPopupBlocker(poppedWindow) {
var result = false;
try {
if (typeof poppedWindow == 'undefined') {
// Safari with popup blocker... leaves the popup window handle undefined
result = true;
}
else if ... | [
0.16326048970222473,
0.02796471118927002,
0.387993186712265,
-0.14993144571781158,
-0.051493898034095764,
-0.07519662380218506,
0.6046969294548035,
-0.06651904433965683,
-0.31322330236434937,
-0.6303994655609131,
-0.3702481985092163,
0.5527780055999756,
-0.5859418511390686,
0.0836072713136... | |
// This happens if the user opens and closes the client window...
// Confusing because the handle is still available, but it's in a "closed" state.
// We're not saying that the window is not being blocked, we're just saying
// that the window has been closed before the test could be ... | [
0.22919926047325134,
0.10238699615001678,
0.19580455124378204,
-0.019361406564712524,
0.040337081998586655,
-0.05886222422122955,
0.557418942451477,
-0.09693660587072372,
-0.1659061312675476,
-0.5333413481712341,
-0.09122052788734436,
0.18330933153629303,
-0.14464977383613586,
0.3335079550... | |
false;
}
else if (poppedWindow && poppedWindow.test) {
// This is the actual test. The client window should be fine.
result = false;
}
else {
// Else we'll assume the window is not OK | [
0.47453776001930237,
-0.14090338349342346,
0.42478135228157043,
0.032965272665023804,
0.08231461048126221,
-0.2938535809516907,
0.6869810223579407,
-0.1868865191936493,
-0.070412278175354,
-0.3410967290401459,
-0.23134548962116241,
0.7467495799064636,
-0.13686195015907288,
0.03936978802084... | |
result = true;
}
} catch (err) {
//if (console) {
// console.warn("Could not access popup window", err);
//}
}
return result;
}
```
What I do is run this test from the parent and wrap it in a setTimeout(), giving the child window 3-5 seconds to load. In the child windo... | [
0.4135652184486389,
-0.15849849581718445,
0.4288026690483093,
-0.06622140854597092,
0.279541939496994,
-0.04559682309627533,
0.5145841240882874,
-0.5162700414657593,
0.20995795726776123,
-0.5045374631881714,
-0.17903773486614227,
0.5712878108024597,
0.10465091466903687,
0.14523153007030487... | |
a test function:
function test() {}
The popup blocker detector tests to see whether the "test" function exists as a member of the child window.
ADDED JUNE 15 2015:
I think the modern way to handle this would be to use window.postMessage() to have the child notify the parent that the window has been loaded. The appr... | [
0.3642015755176544,
0.02914688177406788,
0.16103723645210266,
-0.1367788463830948,
-0.11357009410858154,
0.048670072108507156,
0.6202518343925476,
-0.3014622926712036,
0.23255731165409088,
-0.6407920718193054,
-0.17290157079696655,
0.4160376191139221,
-0.22601675987243652,
0.11766797304153... | |
this helps. | [
0.20551985502243042,
0.2802468240261078,
0.2856957018375397,
-0.07229616492986679,
0.2450120896100998,
-0.031058894470334053,
0.056856196373701096,
0.06940912455320358,
-0.09671525657176971,
-0.3433152139186859,
0.16878867149353027,
0.38554030656814575,
0.3691771626472473,
-0.0023632049560... | |
I'm running a very computationally intensive scientific job that spits out results every now and then. The job is basically to just simulate the same thing a whole bunch of times, so it's divided among several computers, which use different OSes. I'd like to direct the output from all these instances to the same file, ... | [
0.4566052258014679,
0.24237476289272308,
-0.050396740436553955,
0.13634376227855682,
-0.12556155025959015,
-0.006778949871659279,
0.3028610646724701,
-0.3579656481742859,
-0.3103858530521393,
-0.5857640504837036,
0.2659949064254761,
0.4000658392906189,
-0.27647271752357483,
0.3119634389877... | |
a few bytes per minute.
3. Simplicity does count. The whole point of this (besides pure curiosity) is so I can stop having every instance write to a different file and manually merging these files together.
4. Must not depend on the details of the filesystem. Must work with an unknown filesystem on an NFS or Samba moun... | [
0.3880475163459778,
0.22188612818717957,
0.21709658205509186,
-0.13401466608047485,
-0.2737431526184082,
-0.029466086998581886,
0.45529451966285706,
0.0013986026169732213,
0.13345706462860107,
-0.9832016825675964,
-0.19385391473770142,
0.4808650314807892,
-0.3347194194793701,
0.01362025178... | |
data. I have written an OS independent lock module to work over NFS before. The simple idea of creating a [datafile].lock file does not work well over NFS. The basic idea to work around it is to create a lock file [datafile].lock which if present means file is NOT locked and a process that wants to acquire a lock renam... | [
0.22987258434295654,
-0.17222821712493896,
0.2768222987651825,
0.2282668948173523,
0.003201790153980255,
-0.49330493807792664,
0.07430244237184525,
-0.1583070605993271,
-0.12412336468696594,
-0.6864417791366577,
0.01102356519550085,
0.4067481458187103,
-0.4889843165874481,
0.34531211853027... | |
lock retrieval in case the process dies before releasing the lock and renaming the lock file back to [datafile].lock | [
-0.04632708430290222,
-0.23258386552333832,
0.6240217089653015,
0.2560882866382599,
0.38340893387794495,
-0.11504355818033218,
0.06865586340427399,
-0.25646185874938965,
-0.2945338487625122,
-0.36008039116859436,
-0.6221945285797119,
0.38184309005737305,
-0.08340565860271454,
0.50864094495... | |
Is it possible to start playing a file inside a flash player by making use of javascript code? If so, how would I do it?
Try using [swfObject](http://blog.deconcept.com/swfobject/), you can make any actionscript function visible for javascript using `ExternalInterface` and declaring them into javascript. So you can tri... | [
0.4219197928905487,
-0.11903951317071915,
0.2742260992527008,
-0.3405103385448456,
-0.07279487699270248,
-0.24789844453334808,
-0.0359903946518898,
-0.0830869972705841,
-0.15073619782924652,
-0.4220682680606842,
-0.002118845237419009,
0.7028740048408508,
-0.5071287751197815,
-0.13567157089... | |
Does anyone know how to (natively) get the max allowed file size for a given drive/folder/directory? As in for Fat16 it is ~2gb, Fat32 it was 4gb as far as I remember and for the newer NTFS versions it is something way beyond that.. let alone Mono and the underlying OSes.
Is there anything I can read out / retrieve th... | [
0.39912843704223633,
0.13311690092086792,
0.5716153979301453,
-0.017316719517111778,
-0.07223768532276154,
-0.06824155151844025,
0.2397753894329071,
-0.032500673085451126,
-0.7219277620315552,
-0.7198975682258606,
-0.034772105515003204,
0.6970027089118958,
-0.06025511026382446,
-0.01842236... | |
make any actionscript function visible for javascript using `ExternalInterface` and declaring them into javascript. So you can trigger actionscript function with `play()` (or any other code you want) from your javascript code.
Here is an example:
Actionscript:
```
import flash.external.ExternalInterface;
ExternalIn... | [
0.27718836069107056,
-0.07391269505023956,
0.2774258852005005,
-0.5019901990890503,
-0.2064543068408966,
-0.08884447813034058,
0.19115085899829865,
-0.18524996936321259,
-0.11597880721092224,
-0.48697763681411743,
-0.28290194272994995,
0.5376582741737366,
-0.5694465041160583,
-0.2124017030... | |
i have a rule which:
```
RewriteRule ^cat_ap~([^~]+)~(.*)\.htm$ /urban/cat_ap.php?$1=$2 [L]
```
goes to cat\_ap.php?nid=xxxxxxx
now I have to add some other support.
```
cat_ap~pnid~290~nid~96666~posters~Sports.htm
```
needs to resolve to cat\_ap.php?pnid=290&nid=96666 (I'm not concerned with the end of the li... | [
0.1698542982339859,
0.21507304906845093,
0.6122320890426636,
0.03792944177985191,
0.03908242657780647,
-0.11101526767015457,
0.23870797455310822,
-0.21416226029396057,
-0.6281529664993286,
-0.7265059947967529,
0.08840279281139374,
0.3359698951244354,
-0.5799025893211365,
-0.195180878043174... | |
in order to catch all possible combination and decompose the string inside your php application.
In this way it will be easier to debug parameters, since apache can be pretty bastard sometimes. | [
0.5067538022994995,
-0.015716243535280228,
0.07392452657222748,
0.37702232599258423,
-0.5175565481185913,
-0.4192873239517212,
0.5989173650741577,
-0.1851893663406372,
-0.1751832813024521,
-0.038148172199726105,
0.05798758193850517,
0.21950675547122955,
-0.4358324706554413,
0.1806001812219... | |
I've serialized an object using Newtonsoft's JSON serializer, and the DateTime has come through as:
```
/Date(1237588418563+0000)/
```
When I $.evalJSON() on that, it is an object but I can't find any normal Date methods like toUTCString on it.
Any ideas what I can do with this?
Use one of the JsonConverters that c... | [
0.17732270061969757,
-0.1765926331281662,
0.5155365467071533,
-0.097662553191185,
0.03818434476852417,
0.018465140834450722,
0.14558973908424377,
-0.013619526289403439,
-0.18966707587242126,
-0.7356213331222534,
0.06102257966995239,
0.35760289430618286,
-0.2280009239912033,
0.2717905938625... | |
LogEntry entry = new LogEntry
{
LogDate = new DateTime(2009, 2, 15, 0, 0, 0, DateTimeKind.Utc),
Details = "Application started."
};
string defaultJson = JsonConvert.SerializeObject(entry);
// {"Details":"Application started.","LogDate":"\/Date(1234656000000)\/"}
string j... | [
-0.1820695400238037,
-0.29188448190689087,
0.885357141494751,
-0.19011454284191132,
0.20573073625564575,
0.07704123854637146,
0.10627324879169464,
-0.08723177760839462,
-0.29567477107048035,
-0.6999689936637878,
-0.4469265341758728,
0.2527923285961151,
-0.1165151298046112,
0.35665988922119... | |
{"Details":"Application started.","LogDate":"2009-02-15T00:00:00Z"}
}
```
Documentation: [**Serializing Dates in JSON with Json.NET**](http://james.newtonking.com/projects/json/help/index.html?topic=html/DatesInJSON.htm) | [
-0.06648865342140198,
0.0336737185716629,
0.604114830493927,
-0.03263096138834953,
0.16001445055007935,
-0.192819282412529,
-0.026555821299552917,
0.32465890049934387,
-0.6463372111320496,
-0.17264850437641144,
-0.3397930860519409,
-0.028101762756705284,
-0.07126693427562714,
0.19994443655... | |
I am thinking of going to the pragmatic studio iphone course, but am a little wary due to the price. I currently do contract work and therefore don't have a company that will pay the course costs for me, other than mine of course.
After travel, food, hotel and currency conversion the course runs up to over 3500.
Is i... | [
0.7394659519195557,
0.28075024485588074,
-0.05649658665060997,
0.08273039758205414,
0.25882047414779663,
0.42127594351768494,
0.24254682660102844,
0.10481273382902145,
-0.06079500913619995,
-0.41837358474731445,
0.3179786205291748,
0.7406243681907654,
0.6603267192840576,
-0.503572881221771... | |
I'm going to assume that at least some consideration must be taken before dropping $3.5k.
I find that I can honestly absorb much more material and at greater depth by simply reading a book and attempting exercises or small projects myself. Certainly there are some tips & tricks that can be imparted to you through actu... | [
0.9218422770500183,
0.14270178973674774,
-0.36587390303611755,
0.38263973593711853,
0.4468218982219696,
-0.059989627450704575,
0.47398751974105835,
0.26203757524490356,
-0.25124192237854004,
-0.5070120096206665,
0.30759376287460327,
0.7033469676971436,
0.5474442839622498,
-0.41646945476531... | |
for 4 days. You are going to learn how to setup the development environment, shown some canned examples that you follow along with illustrating the basics of the accelerometer, photos, and other iPhone basics.
Is that really worth it to you? To me, a serious professional developer would simply sit down with a few of ... | [
0.6807259321212769,
0.2897326946258545,
-0.25427407026290894,
0.04809064045548439,
0.33189889788627625,
-0.07884456217288971,
0.3769054114818573,
0.05608935281634331,
-0.2665298283100128,
-0.08265451341867447,
-0.024538254365324974,
0.7692573666572571,
0.15680921077728271,
-0.4658609032630... | |
Here I am again with another seemingly simple question I just cannot find the answer to. I would like to use an input type="button" but asp:Button always gives me a type="submit."
```
<asp:Button runat="server" bla bla bla />
```
Thanks in advance.
Use the following
```
<asp:Button ID="Button1" runat="server" Text=... | [
0.07076358795166016,
0.13924828171730042,
0.41820672154426575,
0.04914543405175209,
-0.14042191207408905,
-0.0713658332824707,
0.33549293875694275,
-0.19627894461154938,
-0.25267332792282104,
-0.8404473066329956,
-0.029038280248641968,
0.22357164323329926,
0.05071278661489487,
0.0635229945... | |
I have a fairly complex Xcode project and I want to add Qt to it. I know that I can create a *new* project using `qmake -spec macx-xcode project.pro` but I don't want to have to hand configure my old project over the auto generated Qt project. Is there another option?
[edited in a more general question below]
It seem... | [
0.5662742853164673,
0.3074757158756256,
-0.054394837468862534,
-0.2004081755876541,
-0.1376929134130478,
0.052996840327978134,
0.2484874725341797,
-0.06004863604903221,
0.0663466677069664,
-0.7242462635040283,
0.14769424498081207,
0.8396633267402649,
-0.33897095918655396,
0.238549590110778... | |
the .pro file so that I don't have to hand configure the *.xcodeproj* - is this doable? I really don't want to have to mess around with hand configuring the *.xcodeproj* each time I run qmake.
Essentially, is qmake (or a meta-build in general) a valid substitute for a normal build system, such that I don't need to tw... | [
0.3388103246688843,
0.11424878239631653,
0.0683460384607315,
-0.26114964485168457,
-0.2942740321159363,
0.0803125873208046,
0.5515528917312622,
-0.14250481128692627,
0.1965780407190323,
-0.6727290749549866,
-0.11067809164524078,
0.8482903242111206,
-0.47380301356315613,
-0.0326230116188526... | |
is the portability of the Gui. It only makes sense to extend this feature to your build process by using qmake and allowing users/developers generate whichever build system they want to use (make, visualstudio, xcode).
No, qmake is not well documented and more poignantly there are not manifold examples like there are... | [
0.4758850634098053,
-0.0754101574420929,
0.16226734220981598,
0.20872384309768677,
-0.21731911599636078,
0.011401593685150146,
-0.06421602517366409,
0.08793728053569794,
0.1984696388244629,
-0.5714561939239502,
0.38965433835983276,
0.7522662281990051,
-0.09332374483346939,
0.12934340536594... | |
Are there any open source applications that demonstrate good techniques of [online-offline synchronization](https://stackoverflow.com/questions/271610/strategy-for-offline-online-data-synchronization) **of databases**, something like [Remember The Milk](http://www.rememberthemilk.com) does with their iPhone app, Google... | [
0.8820186853408813,
-0.14866001904010773,
-0.053092531859874725,
0.16834136843681335,
0.016197187826037407,
0.13530632853507996,
0.03269154578447342,
0.6177184581756592,
-0.1321801394224167,
-0.36485356092453003,
0.27886614203453064,
0.3191893398761749,
0.293796181678772,
-0.13602505624294... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.