text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
What's the easiest way to use a linked list in python? In scheme, a linked list is defined simply by `'(1 2 3 4 5)`. Python's lists, `[1, 2, 3, 4, 5]`, and tuples, `(1, 2, 3, 4, 5)`, are not, in fact, linked lists, and linked lists have some nice properties such as constant-time concatenation, and being able to referen... | [
0.08731226623058319,
-0.016295919194817543,
0.35542821884155273,
-0.05885377153754234,
-0.20284953713417053,
-0.033928342163562775,
-0.027438053861260414,
-0.2647611200809479,
-0.3877597749233246,
-0.3128850758075714,
-0.14169904589653015,
0.20736579596996307,
-0.7501447796821594,
-0.14250... | |
cons(el, lst), reversed(args), None)
car = lambda lst: lst[0] if lst else lst
cdr = lambda lst: lst[1] if lst else lst
nth = lambda n, lst: nth(n-1, cdr(lst)) if n > 0 else car(lst)
length = lambda lst, count=0: length(cdr(lst), count+1) if lst else count
begin = lambda *args: args[-1]
display = lambda lst: begin(w(... | [
0.12601976096630096,
0.23979726433753967,
0.03498382866382599,
-0.19505485892295837,
-0.1494966298341751,
0.3681130111217499,
-0.11115656048059464,
-0.29267922043800354,
-0.3068646788597107,
-0.3810519874095917,
-0.26391366124153137,
0.3606807291507721,
-0.5657894015312195,
0.0396263077855... | |
[suggested](https://stackoverflow.com/questions/280243/python-linked-list#280280) a good educational resource [How to Think Like a Computer Scientist, Chapter 17: Linked lists](http://greenteapress.com/thinkpython/html/chap17.html):
A linked list is either:
* the empty list, represented by None, or
* a node that con... | [
-0.008025305345654488,
-0.006249128375202417,
0.2978903353214264,
0.2027854174375534,
0.14047417044639587,
0.2975788712501526,
-0.3396409749984741,
0.06887930631637573,
-0.5067680478096008,
-0.6203516125679016,
-0.3173086941242218,
0.21875636279582977,
-0.262370228767395,
0.151490077376365... | |
Using LINQ to Entities sounds like a great way to query against a database and get actual CLR objects that I can modify, data bind against and so forth. But if I perform the same query a second time do I get back references to the same CLR objects or an entirely new set?
I do not want multiple queries to generate an ... | [
0.25699713826179504,
0.1661350429058075,
0.47582846879959106,
0.4011358320713043,
0.010263651609420776,
-0.28649234771728516,
-0.16762448847293854,
-0.07141095399856567,
-0.10760428011417389,
-0.2540670335292816,
0.39163532853126526,
0.5304433703422546,
-0.40497663617134094,
0.229107111692... | |
still in existence elsewhere and holding the old data.
Within the same DataContext, my understanding is that you'll always get the same objects - for queries which return full objects instead of projections.
Different DataContexts will fetch different objects, however - so there's a risk of seeing stale data there, ye... | [
0.3262616991996765,
-0.09002667665481567,
0.3271562457084656,
0.40589287877082825,
0.1507023721933365,
0.15973331034183502,
-0.06849061697721481,
0.28642386198043823,
-0.4819439649581909,
-0.6586538553237915,
-0.2728857398033142,
0.1714024841785431,
0.18746086955070496,
0.40295645594596863... | |
How to design a dropdown list that can have multiple selections using checkboxes. Can we do it using html/css or it requires javascript? For a visual clarity you can have a look at the image I have attached.
[image link](http://shivanand.in/tmp/dropdown.gif)
This is not possible with pure XHTML and/or only the tag. T... | [
0.5063443183898926,
-0.22461442649364471,
0.3976305425167084,
0.28388258814811707,
-0.31368106603622437,
-0.11218662559986115,
0.17690588533878326,
-0.3230237364768982,
-0.1529170572757721,
-0.23613972961902618,
0.1475531905889511,
0.36012792587280273,
-0.18848514556884766,
-0.099319480359... | |
some javascript to make it all work and interact. | [
0.32414308190345764,
-0.049939870834350586,
-0.34927019476890564,
0.42806845903396606,
-0.2349054515361786,
-0.11497435718774796,
-0.10910869389772415,
0.152984619140625,
0.11667681485414505,
-0.6162631511688232,
-0.058978233486413956,
0.4468749165534973,
-0.53975510597229,
-0.404483258724... | |
If the framework is persistence agnostic, can my unit tests construct a file system version of the persistance store underneath my entity model?
I'll be using the model first features of entity framework in the GUI for sure because it's too easy for my devs to make schema changes and keep DAL layer in sync.
Has anyon... | [
0.0380360409617424,
-0.02326253429055214,
0.1801891028881073,
0.2978268265724182,
0.16052965819835663,
-0.027982817962765694,
0.3527343273162842,
-0.15277482569217682,
-0.1526954174041748,
-0.4548630118370056,
0.303588330745697,
0.934026837348938,
-0.18469510972499847,
-0.02643265575170517... | |
set of business line IDataContext interfaces.
If I can see some scenarios of this working, I'd like to invest more time in the future to try this out.
Entity Framework does *not* have true persistence ignorance. That is one of the biggest criticisms (i.e. a forced base class, lots of EF ties, etc). LINQ-to-SQL *can* h... | [
0.24311548471450806,
0.08362210541963577,
0.1275874525308609,
0.36369791626930237,
-0.28613343834877014,
-0.1496749222278595,
0.3320388197898865,
0.17255426943302155,
0.018743393942713737,
-0.6073088049888611,
-0.0330672450363636,
0.605981171131134,
-0.3526184856891632,
0.03697416558861732... | |
to the file system, go ahead! It would be a *lot* of work though. It would be easier to use a SQL Express database (flat file) etc. | [
0.4859246015548706,
-0.08112417906522751,
-0.006005403120070696,
0.3817305564880371,
0.02536877989768982,
-0.11215908825397491,
0.08962474018335342,
0.10382966697216034,
-0.06535244733095169,
-0.47342127561569214,
0.19051744043827057,
0.657015860080719,
0.06037936732172966,
0.0059698200784... | |
I am trying to merge several XML files in a single XDocument object.
Merge does not exist in XDocument object. I miss this.
Has anyone already implemented a Merge extension method for XDocument, or something similar ?
I tried a bit myself :
```
var MyDoc = XDocument.Load("File1.xml");
MyDoc.Root.Add(XDocument.Load("... | [
0.2796337902545929,
0.1163235530257225,
0.3795543611049652,
-0.18059805035591125,
0.005863053258508444,
-0.17008554935455322,
0.29897743463516235,
-0.0942532941699028,
-0.006440891418606043,
-0.8168697357177734,
-0.030116334557533264,
0.5511894822120667,
-0.4008980095386505,
-0.04244745895... | |
I have a ASP.NET 3.5 App and trying to update a Update Panel which has a nested custom control. In that custom control is a ComponentArt Gird, which gets filled by almost 13MB of Data (Yes, I could chunck that...) at this Update.
I have a hidden button wihtin the update Panel, which I trigger by JS from client side, w... | [
0.06102416291832924,
-0.2241957187652588,
0.5447776317596436,
-0.12729793787002563,
-0.1898980736732483,
-0.03044089674949646,
0.5043157339096069,
0.21756471693515778,
-0.24343159794807434,
-0.8391764760017395,
-0.07133403420448303,
0.6360211968421936,
-0.3006286919116974,
-0.0643713846802... | |
specified value.
Indeed. Understood. But when I change this value in the web.config, then it does only work until round about 8MB, but not more. Is there a limit for the JSonSerializer in that case. I've set the value to the maximum value of Int32, which is kind of the 1000x of the default value, which is already enou... | [
0.0684305727481842,
-0.1940610706806183,
0.7476530075073242,
0.09139034897089005,
0.0530785396695137,
0.0527179092168808,
0.4672325551509857,
0.17019285261631012,
-0.32553547620773315,
-0.776793360710144,
0.14952363073825836,
0.66420978307724,
-0.19324295222759247,
-0.15495431423187256,
... | |
JsonSerializer class' limit of 2097152 characters.
See:
[JsonSerializer class maxJsonLength property](http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.maxjsonlength%28v=VS.90%29.aspx)
and
[JsonSerialization configuration section max length property](http://msdn.microsoft... | [
-0.04066251218318939,
-0.21316245198249817,
0.46499910950660706,
-0.15108701586723328,
-0.17250949144363403,
0.36184048652648926,
0.28342461585998535,
-0.04879496619105339,
-0.40175357460975647,
-0.5925220251083374,
0.06524065136909485,
0.278693288564682,
-0.3658580482006073,
0.26181003451... | |
How to convert Unicode string into a utf-8 or utf-16 string?
My VS2005 project is using Unicode char set, while sqlite in cpp provide
```
int sqlite3_open(
const char *filename, /* Database filename (UTF-8) */
sqlite3 **ppDb /* OUT: SQLite db handle */
);
int sqlite3_open16(
const void *filename, /... | [
-0.014789227396249771,
0.27552875876426697,
0.31023767590522766,
0.05777675285935402,
-0.1997157484292984,
0.19166162610054016,
0.1393420547246933,
-0.3055654466152191,
-0.26935580372810364,
-0.8469721078872681,
-0.18801450729370117,
0.3608933389186859,
-0.21330857276916504,
-0.11195264756... | |
much!
Short answer:
No conversion required if you use Unicode strings such as CString or wstring. Use sqlite3\_open16().
You will have to make sure you pass a WCHAR pointer (casted to `void *`. Seems lame! Even if this lib is cross platform, I guess they could have defined a wide char type that depends on the platfor... | [
0.37790167331695557,
-0.038087356835603714,
0.5318772196769714,
0.24442122876644135,
0.042297959327697754,
-0.005335968919098377,
0.28089940547943115,
0.01669168286025524,
-0.10280962288379669,
-0.5521866083145142,
-0.05073852837085724,
0.900651216506958,
0.1204054206609726,
0.341129004955... | |
encoding: Unicode is not a binary representation per se. Encodings say how the Unicode code points (numerical values) are represented in memory (binary layout of the number). UTF8 and UTF16 are the most widely used encodings. They are very different though.
When a VS project says "Unicode charset", it actually means "... | [
-0.05600271373987198,
0.15180189907550812,
0.25096169114112854,
0.015928521752357483,
-0.3261468708515167,
0.5099411606788635,
0.1243695616722107,
0.08544254302978516,
-0.038666240870952606,
-0.6091213226318359,
-0.11801852285861969,
0.20857535302639008,
-0.25833702087402344,
-0.0318177565... | |
Checkers).
There's one more detail that you might want to pay attention to: UTF16 exists in 2 flavors: Big Endian and Little Endian. That's the byte ordering of these 16 bits. The function prototype you give for UTF16 doesn't say which ordering is used. But you're pretty safe assuming that sqlite uses the same endian-... | [
-0.0731549859046936,
0.22509455680847168,
0.422308087348938,
-0.07237961888313293,
-0.1429053097963333,
-0.11216450482606888,
0.14769098162651062,
-0.14612825214862823,
-0.38923928141593933,
-0.46175137162208557,
-0.022089853882789612,
0.43662548065185547,
-0.38911867141723633,
0.260996907... | |
some Unicode characters require a sequence of 2 such 16-bits code units. They are called Surrogate Pairs.
The same way an UTF8 represents 1 character using a 1 to 4 bytes sequence. Yet UTF8 are used with the `char` type. | [
-0.06944666057825089,
0.052367519587278366,
0.3020748496055603,
-0.17132878303527832,
-0.22692105174064636,
0.2979574501514435,
0.19173499941825867,
-0.1528312712907791,
0.014305206015706062,
-0.44544273614883423,
-0.40595272183418274,
0.06906544417142868,
-0.30287858843803406,
-0.10337211... | |
I know there has been previous talk on here about screencasting tools/apps, however I thought I would be more specific in what I am after in the hope that it can help me and others :)
I am looking at trialling some screencasts on [my blog](http://cantgrokwontgrok.blogspot.com/). There are numerous reasons for this (ho... | [
1.0281373262405396,
0.32981905341148376,
-0.04896647855639458,
0.3184404671192169,
-0.10828467458486557,
-0.19290441274642944,
0.1060776486992836,
0.3513337969779968,
-0.11979168653488159,
-0.9854505062103271,
0.29531335830688477,
0.6061674952507019,
0.06659489870071411,
-0.029018703848123... | |
the medium!
Also, if you have posted screencasts yourself, please feel free to share links **with your answer**, it would be good to see the quality that is produced etc (and drive traffic to your blog/site) ;)
I see this asked often (on other sites) and I have some interest in the topic, so I compiled a little list (... | [
0.37087884545326233,
-0.05403265357017517,
0.807225227355957,
0.22214603424072266,
-0.12021928280591965,
-0.4111342430114746,
-0.1401635855436325,
0.1751365065574646,
-0.31291893124580383,
-0.7136526107788086,
-0.21945098042488098,
1.0788339376449585,
0.015215004794299603,
0.09759099781513... | |
output)
* Jing - <http://www.jingproject.com/> (Mac/Windows, Flash output)
* Taksi - <http://taksi.sourceforge.net/> (Windows, games/3D, OSS, AVI output (any codec))
* Fraps - <http://www.fraps.com/> (Windows, real-time video capture, payware (free limited version?), WMV output) | [
0.059343308210372925,
0.0005518979742191732,
0.35196077823638916,
0.2553441524505615,
-0.29664555191993713,
0.07449256628751755,
0.05677109211683273,
-0.3856019675731659,
-0.4087207019329071,
0.0034185645636171103,
-0.5213261246681213,
0.4072418212890625,
-0.019845683127641678,
-0.01935213... | |
Let's say we have a method signature like
```
public static function explodeDn($dn, array &$keys = null, array &$vals = null,
$caseFold = self::ATTR_CASEFOLD_NONE)
```
we can easily call the method by omitting all parameters after `$dn`:
```
$dn=Zend_Ldap_Dn::explodeDn('CN=Alice Baker,CN=Users,DC=example,DC=co... | [
-0.23737917840480804,
0.029576987028121948,
0.07927387207746506,
0.21512392163276672,
-0.08061633259057999,
0.311674028635025,
0.23095211386680603,
-0.4464380443096161,
-0.27388766407966614,
0.12706860899925232,
0.045571114867925644,
0.47373777627944946,
-0.7163751125335693,
0.322263062000... | |
Is this constraint written in the manual? Can it be circumvented?
It's because you can't have a reference to null.
You can have a reference to a variable that contains null - that is exactly what the default value does. Or you can pass in null as a literal value - but since you want an out parameter this is not possib... | [
0.10921534150838852,
-0.006304874084889889,
0.21546685695648193,
0.3616035282611847,
0.022091297432780266,
-0.22868430614471436,
0.31712213158607483,
0.08790828287601471,
-0.295642226934433,
-0.16428242623806,
-0.032404620200395584,
0.6931063532829285,
-0.4768904447555542,
0.22693254053592... | |
I need to make some changes to a ClickOnce application that I haven't touched for over a year and therefore the certificate has expired.
I've read that publishing with a new certificate will make the application fail, because it will be signed with a different key.
Therefore I think I need to use the same certificate... | [
0.3671911954879761,
0.16986492276191711,
0.46523216366767883,
0.20964249968528748,
0.6972306966781616,
-0.4034121334552765,
0.3673681914806366,
-0.1812969297170639,
-0.1289539784193039,
-0.6371287703514099,
-0.018944641575217247,
0.47193941473960876,
-0.3541034758090973,
0.2247275710105896... | |
here: <http://may.be/renewcert/> - Nice work Cliff ! | [
0.5761346817016602,
-0.24895095825195312,
0.6079123616218567,
-0.16263383626937866,
-0.007352124899625778,
-0.39264345169067383,
0.5164742469787598,
0.25112205743789673,
-0.369009792804718,
-0.30003005266189575,
0.049311354756355286,
0.6208372712135315,
0.5000930428504944,
-0.0272065158933... | |
When browsing ASP.NET MVC source code in [codeplex](http://www.codeplex.com/aspnet/SourceControl/FileView.aspx?itemId=266503&changeSetId=17272), I found it is common to have a class explicitly implementing interface. The explicitly implemented method/property then invoke another "protected virtual" method/property with... | [
-0.11954077333211899,
-0.06823204457759857,
0.6557500958442688,
-0.07141362130641937,
-0.14133909344673157,
0.06772840023040771,
0.4850824177265167,
-0.24122455716133118,
-0.3084561228752136,
-0.7673723697662354,
-0.13554131984710693,
0.546946108341217,
-0.3612264096736908,
0.2186795026063... | |
{
get
{
return IsReusable;
}
}
}
```
I'm now sure what's the benefit of this kind of programming. For me, I prefer to just implicitly implement the interface IHttpHandler.
I guess the author just don't want **MvcHandler** has a public property **IsResuable**. The property **Is... | [
-0.10533858835697174,
0.11053813993930817,
0.364935040473938,
0.037397656589746475,
-0.2174636274576187,
-0.43701183795928955,
0.264395147562027,
0.11364653706550598,
-0.06645171344280243,
-0.8321413397789001,
-0.13036295771598816,
0.6076631546020508,
-0.42902424931526184,
0.27926030755043... | |
author what this way.
Anybody know more benefits about this style of interface implementation?
Well, not specific to MVC, but this approach allows you to **keep the core public API clean**. It is also useful if there is ever a risk of different interfaces / etc having the same name & signature, but different meaning. ... | [
0.33579617738723755,
-0.019392043352127075,
0.1440896838903427,
0.35280710458755493,
-0.29618287086486816,
-0.41313856840133667,
0.3614761531352997,
0.22760000824928284,
-0.4538191556930542,
-0.5831676125526428,
0.08442210406064987,
0.4871308207511902,
-0.11555823683738708,
0.1028570383787... | |
like `DbCommand` etc, which do this - but that is harder to show in a short example)
```
class Foo : ICloneable
{
public Foo Clone() { return CloneCore(); }
object ICloneable.Clone() { return CloneCore(); }
protected virtual Foo CloneCore() { ... }
}
class Bar : Foo
{
protected override Foo CloneCore(... | [
0.198331817984581,
0.022958125919103622,
0.26804184913635254,
-0.08815282583236694,
0.44445767998695374,
-0.10591115057468414,
0.1468326896429062,
-0.3988367021083832,
-0.07486404478549957,
-0.5258606672286987,
-0.11783555895090103,
0.5975484251976013,
-0.4528498351573944,
0.64804100990295... | |
A
{
public virtual A SomeMethod() { ... }
}
class B : A
{
public override A SomeMethod() { ... }
//Error 1 Type 'B' already defines a member called 'SomeMethod' with the same parameter types
public new B SomeMethod() { ... }
}
```
Using the protected virtual approach, any usage:
* Foo.Clone()
* Bar... | [
0.23818984627723694,
-0.14094111323356628,
0.12533241510391235,
-0.10741273313760757,
0.23398210108280182,
-0.0815776139497757,
0.18365126848220825,
-0.10721859335899353,
-0.04180106148123741,
-0.3604898154735565,
-0.14836782217025757,
0.36362141370773315,
-0.5378147959709167,
0.4337001144... | |
As far as I understand, if I want to get my database under source control then I need to be checking in change scripts for each change and then running them from some revision to get the correct DB.
I am trying to make a batch file that will be checked in too, that allows other developers on the team to re-build the D... | [
0.42718806862831116,
0.2627829909324646,
0.08427922427654266,
-0.14794094860553741,
-0.24746045470237732,
-0.13272279500961304,
0.10499594360589981,
-0.15407611429691315,
-0.031622037291526794,
-0.51776123046875,
0.19431181252002716,
0.6278712749481201,
-0.15646208822727203,
0.386370152235... | |
done this before and do you have an advice on the best way to achieve this? Is the way I intend to do this the best way or is there a better way?
Hope that's not too vague.
Thanks in advance,
Martin.
If you are using a ORM tool like NHibernate you save yourself the trouble of having DB change scripts because the ORM... | [
0.4843035638332367,
0.05237801373004913,
0.007452926132827997,
0.15511153638362885,
-0.181161031126976,
-0.16595330834388733,
0.3249872922897339,
0.03241322562098503,
-0.13532283902168274,
-0.5726180076599121,
0.12988926470279694,
0.4446820020675659,
0.12196099758148193,
-0.082490697503089... | |
I have a consistent state.
I recently blogged about that:
<http://www.tigraine.at/2008/10/30/sourcecontrol-and-databases-when-orm-comes-in-handy/>
I also once had a project that had Sql update scripts, and we just had a little helper tool built (very very basic) that opened the folder, sorted all scripts (we were nam... | [
0.8328988552093506,
0.3814975321292877,
0.27159515023231506,
-0.2416219711303711,
-0.14233848452568054,
-0.10002099722623825,
0.48596739768981934,
0.117200568318367,
-0.16886337101459503,
-0.6898365616798401,
0.18192565441131592,
0.3442460596561432,
-0.16265082359313965,
0.0828838050365448... | |
I try get the [mp3 flash player](http://flash-mp3-player.net/players/js/) to work with my javascript on all browsers. All went well for first, but fast realized that my code doesn't work on MSIE.
After trying to find out I found this in the reference code:
```
<!--[if IE]>
<script type="text/javascript" event="FSComm... | [
0.06979107856750488,
-0.022690070793032646,
0.5051259994506836,
-0.14677824079990387,
0.02268991991877556,
-0.2655956447124481,
0.18616171181201935,
-0.2885678708553314,
-0.14546826481819153,
-0.528529703617096,
-0.1412741243839264,
0.9032129049301147,
-0.2836051285266876,
-0.1628168523311... | |
myFlash object. This is needed because code running inside the Flash object may want to run JavaScript in the browser. To do this, the Flash object will invoke the FSCommand event handler, passing the JavaScript to run as the arguments to the event.
With this player, the name of a JS listener object is passed in the F... | [
0.045593902468681335,
0.06695099174976349,
0.5613000988960266,
-0.2459629327058792,
-0.15120764076709747,
-0.11539924889802933,
-0.050670746713876724,
0.0057863458059728146,
0.17241442203521729,
-0.4646875858306885,
-0.34838294982910156,
0.8082907795906067,
-0.2770925760269165,
-0.03440827... | |
using this method until the FSCommand handler has been added to the Flash player object, which is why that code exists. Modify it to use the ID of your Flash object and you should be in good shape. | [
0.3550037741661072,
-0.12771934270858765,
0.31257709860801697,
0.041763920336961746,
0.23850086331367493,
-0.6261109113693237,
0.07064339518547058,
-0.04340649023652077,
-0.013291330076754093,
-0.6863369345664978,
-0.0019700806587934494,
0.6789661645889282,
-0.16015858948230743,
-0.1760134... | |
I have a user that keeps getting this error. Is there a tool that does window handle counting that i can use to figure out why he keeps getting this error.
System.ComponentModel.Win32Exception: Error creating window handle.
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Co... | [
0.22988614439964294,
0.11532395333051682,
0.5031045079231262,
0.020115384832024574,
-0.34749799966812134,
-0.0902528390288353,
0.5537141561508179,
-0.1849329024553299,
-0.28408050537109375,
-0.8994095921516418,
0.32962799072265625,
0.6190860867500305,
-0.22574234008789062,
0.22515738010406... | |
We have a problem affecting the production environment only.
We have a VB6/ASP website that allows for data in a database table to be hand edited.
It looks alot like an editable datagrid.
One of the editable columns is a date and when the record is saved dates day/month are being reversed.
03/11/2008 becomes 11/03/... | [
0.3753684461116791,
0.26542529463768005,
0.41023504734039307,
0.05363840237259865,
0.0009723869734443724,
0.08276906609535217,
0.286857932806015,
-0.029544129967689514,
-0.3258748948574066,
-0.29852545261383057,
0.10095345973968506,
0.38963109254837036,
0.07324891537427902,
0.4116101264953... | |
has the DB and Site hosted locally and in the live setup we have a separate web site server and database server. Where do you suggest I start looking for this problem. I've checked the regional settings on the servers and they are set to United Kingdom and the OS date format is correct.
This is SQL Server 2000. hit me... | [
0.49659863114356995,
-0.10227227210998535,
0.5665081143379211,
-0.13444803655147552,
-0.060532763600349426,
-0.06248798593878746,
0.30007389187812805,
0.20594097673892975,
-0.3724508285522461,
-0.529103696346283,
-0.25173962116241455,
-0.2666186988353729,
0.06533067673444748,
0.43320932984... | |
feed the date as a string to SQL Server and let the conversion happen there, it will be useful to look into the [`SET DATEFORMAT`](http://msdn.microsoft.com/en-us/library/ms189491.aspx) and the [`SET LANGUAGE`](http://msdn.microsoft.com/en-us/library/ms174398.aspx) statements.
So here is my idea: Either stop using (en... | [
0.6089962124824524,
-0.1847355216741562,
0.25316423177719116,
0.13532058894634247,
0.08904501050710678,
-0.25968101620674133,
-0.0726819857954979,
0.15956734120845795,
0.07203290611505508,
-0.4941748380661011,
-0.04266227409243584,
0.463085412979126,
-0.3705335557460785,
-0.028129125013947... | |
Ignoring the IE case, are there any other browsers that can't understand the application/xhtml+xml content type? And what about the search engine spiders?
I could not find any answers on the web that would not be a few years old and thus possibly inaccurate.
**Edit:**
Somehow related question: [What problem does XHTM... | [
0.2730133533477783,
0.14015357196331024,
0.4216974079608917,
0.1426568329334259,
-0.35419395565986633,
-0.44011160731315613,
0.2514766752719879,
0.12702281773090363,
-0.43772006034851074,
-0.24746525287628174,
-0.21597780287265778,
0.6717926859855652,
-0.45740315318107605,
-0.0560226812958... | |
a contenttype it does understand, will render it okay anyway, and everyone else support it properly.
Do you have more specific use cases in mind? | [
0.5908032655715942,
0.06380520015954971,
0.37093302607536316,
0.1072339192032814,
0.13991519808769226,
-0.5115165114402771,
-0.03446076810359955,
-0.054063256829977036,
0.27655044198036194,
-0.6149083375930786,
-0.31620967388153076,
0.5870422124862671,
0.06300076842308044,
-0.4515078663825... | |
Do web browsers send the file size in the http header when uploading a file to the server? And if that is the case, then, is it possible to refuse the file just by reading the header and not wait for the whole upload process to finish?
<http://www.faqs.org/rfcs/rfc1867.html>
*HTTP clients are
encouraged to supply con... | [
0.3040497303009033,
0.020908478647470474,
0.13478560745716095,
0.19655661284923553,
-0.27383488416671753,
-0.2052752673625946,
0.2771640121936798,
-0.2778376340866089,
-0.48852822184562683,
-0.5977463722229004,
-0.261144757270813,
0.339459627866745,
-0.01602405309677124,
0.0483411848545074... | |
is the only reliable way. Having said that, if the content-lenght is present and is too big, to close the connection would be a reasonable thing to do.
Also, the content is sent as multipart, so most of the modern frameworks decode it first. That means you won't get the file byte stream until the framework is done, wh... | [
0.11768894642591476,
-0.17389962077140808,
0.278970867395401,
0.3038732707500458,
0.005741504952311516,
-0.4579753875732422,
0.4465087056159973,
0.1368420571088791,
-0.15119552612304688,
-0.39533814787864685,
-0.5320863723754883,
0.4557417929172516,
-0.37053146958351135,
0.1683375984430313... | |
I am trying to change the rows output by PHP in a table to links. I have added the a href tags to the example below, however it results in an unexpected `T_VARIABLE`. I have tried it without the extra quotes, but this displays a blank table. I am not sure what the flaw in the logic is.
```
while($row = mysql_fetch_row... | [
0.17009440064430237,
0.31766337156295776,
0.39806386828422546,
-0.5125933289527893,
0.008737088181078434,
0.05696970969438553,
0.4543185234069824,
-0.39093276858329773,
-0.13891364634037018,
-0.4046003520488739,
0.160650834441185,
0.5695618987083435,
-0.49757125973701477,
0.139676079154014... | |
echo "<td><a href="$cell"</a></td>";
echo "</tr>\n";
}
```
<http://www.faqs.org/rfcs/rfc1867.html>
*HTTP clients are
encouraged to supply content-length for overall file input so that a
busy server could detect if the proposed file data is too large to be
processed reasonably*
But the content-length is not r... | [
0.23353305459022522,
0.050585322082042694,
0.12949877977371216,
-0.16524171829223633,
-0.343874990940094,
-0.18529269099235535,
0.5289574861526489,
-0.5873479843139648,
-0.24885456264019012,
-0.2763555943965912,
-0.43738889694213867,
0.27704861760139465,
-0.37988314032554626,
0.11157888919... | |
frameworks decode it first. That means you won't get the file byte stream until the framework is done, which could mean "until the whole file is uploaded". | [
0.3677035868167877,
-0.2062472552061081,
0.12646320462226868,
0.15373051166534424,
-0.1112104132771492,
-0.5075545310974121,
0.34225356578826904,
-0.17559872567653656,
-0.05182872712612152,
-0.5601748824119568,
-0.3711552619934082,
0.22681403160095215,
-0.47726455330848694,
0.0553535185754... | |
I am trying to use the following code to write data into an excel file
```
Dim objexcel As Excel.Application
Dim wbexcel As Excel.Workbook
Dim wbExists As Boolean
Set objexcel = CreateObject("excel.Application") | [
0.20195463299751282,
0.08834513276815414,
0.49135613441467285,
-0.23366503417491913,
-0.19639849662780762,
0.04952877759933472,
0.2245311439037323,
-0.24016642570495605,
0.21940146386623383,
-0.49223312735557556,
-0.20191924273967743,
0.49427706003189087,
-0.43794625997543335,
-0.104899212... | |
objexcel.Visible = True
On Error GoTo Openwb
wbExists = False
Set wbexcel = objexcel.Documents.Open("C:\Documents and Settings\TAYYAPP\Desktop\test folder\ERROR REPORT2.xls") | [
-0.25244587659835815,
0.15043841302394867,
0.1741839349269867,
-0.1073254644870758,
0.1303747445344925,
0.04364363104104996,
0.2857823371887207,
-0.0676989033818245,
0.0007872908608987927,
-0.7303059101104736,
-0.29589924216270447,
0.5445895195007324,
-0.3871423006057739,
-0.11012726277112... | |
wbExists = True
Openwb:
On Error GoTo 0
If Not wbExists Then
Set wbexcel = objexcel.Workbook.Add | [
0.05245835334062576,
-0.17122198641300201,
0.13303020596504211,
-0.00962202250957489,
0.120486781001091,
-0.035584550350904465,
0.3588733971118927,
-0.3256302773952484,
0.08280275762081146,
-0.762133002281189,
-0.1318221539258957,
0.5224395394325256,
-0.41516566276550293,
-0.15765942633152... | |
End If
```
but I'm getting an
> runtime error object doesn't support property or method
in the line
```
Set wbexcel = objexcel.Workbook.Add
```
I have referenced the Excel object library.
You will need to change this line:
```
Set wbexcel = objexcel.WorkBooks.Open( _
"C:\Documents and Settings\TAYYAPP\Des... | [
-0.004610017407685518,
0.029740052297711372,
0.5587174892425537,
-0.013512584380805492,
-0.035438138991594315,
-0.1283905804157257,
0.13831254839897156,
-0.411853551864624,
-0.04433232173323631,
-0.772390604019165,
-0.3739388883113861,
0.5050955414772034,
-0.4139918386936188,
-0.0573659613... | |
from Access to Excel. | [
0.1264270544052124,
0.28934556245803833,
-0.1698845773935318,
0.2580578029155731,
0.160305455327034,
-0.0906987115740776,
-0.26892367005348206,
0.5582152605056763,
0.02635015919804573,
-0.40501368045806885,
-0.3761393427848816,
0.32473254203796387,
0.1986788958311081,
0.1237020194530487,
... | |
I'm re-designing an app I inherited that sends digital photos from a laptop to a web server. The idea is to take photos "out on the field" and have them instantly published on a web page (with some more fancy features).
Typical scenario
1. Photos are transferred from the camera to the laptop using standard USB.
... | [
0.6483321189880371,
-0.16928184032440186,
0.44825342297554016,
0.2678510248661041,
0.14480622112751007,
-0.20872734487056732,
-0.18377317488193512,
-0.38193339109420776,
-0.22759298980236053,
-0.5287889838218689,
0.10869531333446503,
0.25959107279777527,
-0.26260247826576233,
-0.2488192319... | |
it often hangs when the network connection is unreliable. As we're using a mobile network (3G) and often end up out of coverage, I need a way to handle this properly.
My question is whether there's a better solution for doing this that won't make the app hang when the connection drops every now and then.
(Bonus quest... | [
0.3519309163093567,
-0.2173304557800293,
0.29491057991981506,
0.3707596957683563,
-0.004917905665934086,
-0.4599336087703705,
0.32838737964630127,
-0.3790382742881775,
-0.3459611237049103,
-0.18297630548477173,
-0.12556537985801697,
0.5282735824584961,
-0.1536025106906891,
-0.2216540724039... | |
1% of all packets - my app still works well with the new design.
EDIT 2008-12-11:
Just to update how I did this. I created one background worker (as suggested below) that is started whenever a camera is detected to copy the photos from the camera to PC. Then another background worker i started when files arrive on PC ... | [
0.3139778673648834,
-0.1585351526737213,
0.7316440343856812,
0.16414719820022583,
-0.1363873928785324,
-0.24138706922531128,
0.4653228521347046,
-0.08997251838445663,
-0.660098671913147,
-0.4114032983779907,
-0.021768389269709587,
0.4637284576892853,
-0.4922100901603699,
-0.233049154281616... | |
from any thread that has UI unless you actually want to block until the response is received. You can try using the same logic from a background thread which will run as long as it needs to. Just be sure to have logic which will detect when the connection is lost (probably from a timeout) and will retry at a regular (b... | [
0.540823221206665,
-0.3731641471385956,
0.2804133892059326,
0.2943463921546936,
-0.04177122935652733,
-0.2872794568538666,
0.39849942922592163,
0.22381660342216492,
-0.4710392653942108,
-0.686219334602356,
-0.0925036296248436,
0.26840919256210327,
-0.39330393075942993,
-0.13053429126739502... | |
creating a .NET based background process is not trivial. | [
0.5570633411407471,
-0.14266033470630646,
-0.05289149656891823,
0.34511542320251465,
0.12439483404159546,
-0.2845826745033264,
0.09889741241931915,
0.19610567390918732,
-0.03477320447564125,
-0.6537315249443054,
-0.08315473794937134,
0.31626394391059875,
-0.33307385444641113,
-0.2201244831... | |
> **Possible Duplicate:**
>
> [What's the difference between NOT EXISTS vs. NOT IN vs. LEFT JOIN WHERE IS NULL?](https://stackoverflow.com/questions/2246772/whats-the-difference-between-not-exists-vs-not-in-vs-left-join-where-is-null)
I need to wite a query that will retrieve the records from Table A , provided tha... | [
-0.033027924597263336,
0.2076921910047531,
0.12838071584701538,
0.3725220263004303,
0.3509291410446167,
-0.07948841899633408,
0.1977849155664444,
-0.02153414860367775,
-0.4317784905433655,
-0.7169493436813354,
0.08764734119176865,
0.20160290598869324,
-0.07345683872699738,
0.16611340641975... | |
I need to highlight, case insensitively, given keywords in a JavaScript string.
For example:
* `highlight("foobar Foo bar FOO", "foo")` should return `"<b>foo</b>bar <b>Foo</b> bar <b>FOO</b>"`
I need the code to work for any keyword, and therefore using a hardcoded regular expression like `/foo/i` is not a sufficie... | [
0.19310064613819122,
0.32052651047706604,
0.05682529881596565,
-0.29585424065589905,
-0.2301752269268036,
0.08246483653783798,
0.3479906916618347,
-0.008927122689783573,
-0.006141384597867727,
-0.3945956826210022,
-0.21038757264614105,
0.3483860492706299,
-0.3108974099159241,
-0.0324242785... | |
a string with their escaped versions.
Here is such a function for javascript ([source](https://locutus.io/php/pcre/preg_quote/)):
```
function preg_quote (str, delimiter) {
// discuss at: https://locutus.io/php/preg_quote/
// original by: booeyOH
// improved by: Ates Goral (https://magnetiq.com)
// improved ... | [
-0.056191492825746536,
-0.12931758165359497,
0.1256752759218216,
0.08025757223367691,
-0.13530604541301727,
0.2461429387331009,
0.5451114773750305,
-0.39611250162124634,
-0.28925570845603943,
-0.37042248249053955,
-0.4589671194553375,
0.4572223424911499,
-0.8849304914474487,
0.093160040676... | |
'\\\\\\.\\+\\*\\?\\[\\^\\]\\$\\(\\)\\{\\}\\=\\!\\<\\>\\|\\:'
return (str + '')
.replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\' + (delimiter || '') + '-]', 'g'), '\\$&')
}
```
So you could do the following:
```
function highlight(str, search) {
return str.replace(new RegExp("(" + preg_quote(search) +... | [
-0.19907912611961365,
0.045994870364665985,
0.6901691555976868,
-0.17061872780323029,
0.09693441540002823,
0.061028189957141876,
0.08973506838083267,
-0.2879469692707062,
-0.16963708400726318,
-0.4238508939743042,
-0.5482109785079956,
0.6915934681892395,
-0.5114447474479675,
0.091065026819... | |
I would like to know if it is possible, to select certain columns from one table, and another column from a second table, which would relate to a non imported column in the first table. I have to obtain this data from access, and do not know if this is possible with Access, or SQL in general.
Assuming the following tab... | [
0.040087971836328506,
0.34246915578842163,
0.24010133743286133,
-0.02687460370361805,
0.08199847489595413,
0.17293937504291534,
0.18842722475528717,
-0.2391691952943802,
-0.05532804876565933,
-0.45757967233657837,
-0.03658787161111832,
0.24208013713359833,
-0.5988854765892029,
0.1800164878... | |
field_4 varchar(25)
);
```
You could use the following:
```
SELECT t1.field_1, t2.field_3
FROM tbl_1 t1
INNER JOIN tbl_2 t2 ON t1.pk_1 = t2.fk_1
WHERE t2.field_3 = "Some String"
```
In regard to Bill's post, there are two ways to create JOIN's within SQL queries:
* Implicit - The join is created using
the WHERE c... | [
0.13944759964942932,
0.16163387894630432,
0.3872985243797302,
-0.37797093391418457,
-0.20814043283462524,
0.14962992072105408,
0.1853780299425125,
-0.5401285886764526,
-0.040845394134521484,
-0.2796676754951477,
0.022010017186403275,
0.380414217710495,
-0.5958248972892761,
0.09535492956638... | |
add an explicit join to a query that already uses an implicit join with multiple tables referenced in the FROM clause, the first table referenced in the FROM clause will not be visible to the explicitly joined table. | [
0.01574322208762169,
-0.03960010036826134,
0.517806351184845,
0.16549152135849,
-0.013211689889431,
-0.10628920793533325,
0.18465028703212738,
-0.13342520594596863,
0.15441422164440155,
-0.5021277666091919,
-0.2071424275636673,
0.012827468104660511,
-0.6415599584579468,
0.09994418919086456... | |
**Mark Up**
```
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="Zuhaib.test" %>
<!-- Put IE into quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
... | [
0.1569240689277649,
0.2070755660533905,
0.6594732999801636,
-0.04020918533205986,
-0.3608661890029907,
0.006435968913137913,
-0.06416716426610947,
-0.6871320605278015,
-0.01017321739345789,
-0.6630551218986511,
-0.12888410687446594,
0.10558237880468369,
0.06934068351984024,
0.0849405229091... | |
border:0;
overflow:hidden;
width:100%;
height:100%;
}
* html body
{
height:100%;
width:100%;
}
*{
margin:0;
padding:0;
}
.wrapper
{
position:fixed;
top:0px;
bottom:0px;
left:0px;
right:0px;
height:100%;
width:100%;
}
* html .wrapper
{
width:100%;
he... | [
-0.1395207792520523,
-0.04441874101758003,
0.8681592345237732,
0.10368812084197998,
0.17871803045272827,
0.28094688057899475,
0.22629161179065704,
-0.15990033745765686,
-0.24782975018024445,
-0.6400577425956726,
-0.5531755089759827,
0.19725768268108368,
-0.0995250791311264,
-0.207841455936... | |
height:100%;
width:100px;
}
#right{
margin-left:100px;
height:100%;
background-color:Red;
}
* html #right{
height:100%;
}
```
**Result in IE && FF**
[Resutls in IE & FF http://img139.imageshack.us/img139/9871/ie3pxgapnl4.jpg](http://img139.imageshack.us/img139/9871/ie3pxgapnl4.jpg)
The resul... | [
-0.2185177057981491,
-0.04838566109538078,
0.9510400891304016,
-0.29946237802505493,
-0.016231901943683624,
0.12927383184432983,
0.187361478805542,
-0.5986716747283936,
-0.04695505648851395,
-0.7412409782409668,
-0.18282778561115265,
0.6374518871307373,
0.1270143985748291,
-0.2301832437515... | |
have used quirk mode is to able to get 100% height for the divs
Can this gap be eliminated? Or is there a better way to do two column 100% height layout with pure css?
As already said, your code is full of hacks. Please remove especially the unnecessary definitions. If a browser does not support *cascading* style shee... | [
0.3539469540119171,
-0.14027529954910278,
0.7537634372711182,
0.09840873628854752,
-0.10555452108383179,
0.09531167894601822,
0.3053443133831024,
-0.03994227200746536,
-0.13174252212047577,
-0.4277583956718445,
0.09589402377605438,
0.7508106231689453,
-0.08571895956993103,
-0.0588724575936... | |
Does anyone know of an open source web service/wcf service that can stream media content to clients? In particular I am looking for something that could access my music collection and stream it to a client (could be a client browser, win mobile app or even iphone application).
I guess it would have to be WCF based as ... | [
0.5684472322463989,
0.1354340761899948,
0.2268020212650299,
0.43300771713256836,
-0.004860531538724899,
-0.3556545376777649,
0.15280380845069885,
0.3107147514820099,
-0.3036789000034332,
-0.5377923846244812,
0.12804844975471497,
0.7586719393730164,
0.07542993128299713,
0.29974785447120667,... | |
creating something like this - I'm not sure I know where to start with this one, although I can see many many uses for such a service!
As already said, your code is full of hacks. Please remove especially the unnecessary definitions. If a browser does not support *cascading* style sheets, it will not support CSS anyway... | [
0.33065134286880493,
-0.1366356611251831,
0.4512919783592224,
0.1928827464580536,
-0.07496124505996704,
-0.2474016398191452,
0.1437816321849823,
0.23535701632499695,
-0.23994116485118866,
-0.8185442090034485,
-0.0358465351164341,
0.2546204626560211,
-0.28510749340057373,
0.0924663320183754... | |
I've decided to reimplement the datetime picker, as a standard datetime picker isn't nullable. The user wants to start with a blank field and type (not select) the date.
I've created a user control to do just that, but if the user control is near the edge of the form, it will be cut off on the form boundry. The standa... | [
-0.07050543278455734,
-0.28179365396499634,
0.5656875967979431,
-0.004655659198760986,
-0.04045533388853073,
-0.11858925968408585,
-0.1694016307592392,
-0.06500542908906937,
-0.2254982441663742,
-0.3648453652858734,
0.1479673832654953,
0.24730785191059113,
-0.24920931458473206,
0.211035430... | |
AND application boundry. How do I get the month picker in my control to do the same thing?
Thanks!
The ToolStripDropDown control has this functionallity so by inheriting from it we can make a simple PopupWindow.
```
/// <summary>
/// A simple popup window that can host any System.Windows.Forms.Control
/// </summary>
... | [
0.19879983365535736,
-0.2320399135351181,
0.7037832140922546,
0.39821454882621765,
-0.058425772935152054,
-0.20464546978473663,
0.017409024760127068,
0.03593031316995621,
-0.22121411561965942,
-0.39995014667510986,
-0.35021328926086426,
0.5048484206199646,
-0.5413094758987427,
0.0954292193... | |
this.ResizeRedraw = true;
this._content = content;
this._host = new System.Windows.Forms.ToolStripControlHost(content);
//Positioning and Sizing
this.MinimumSize = content.MinimumSize;
this.MaximumSize = content.Size;
this.Size = content.Size;
content.Location =... | [
0.07134822756052017,
-0.09139137715101242,
0.7385628819465637,
-0.02672848477959633,
0.2254028022289276,
-0.15294557809829712,
0.2021818608045578,
-0.1742420494556427,
-0.32549169659614563,
-0.8397688269615173,
-0.39040300250053406,
0.3278958201408386,
-0.2597728967666626,
0.37179294228553... | |
this.Items.Add(this._host);
}
}
```
Usage:
```
PopupWindow popup = new PopupWindow(MyControlToHost);
popup.Show(new Point(100,100));
...
popup.Close();
``` | [
-0.14324726164340973,
0.10055609792470932,
1.0273945331573486,
-0.07550092041492462,
0.22555342316627502,
0.04960360378026962,
-0.0046053375117480755,
-0.050281886011362076,
-0.41005459427833557,
-0.739782452583313,
-0.5979225635528564,
0.15951907634735107,
-0.3821794092655182,
0.371066391... | |
I'm looking to write a small proxy server for kicks and giggles.
Apart from the options in libWWW, can anyone recommend any opensource options for the HTTP server and client code? Thinking of a library of some kind similar to libWWW.
Chosen language is C/C++ but open to Java, C#, Python... etc. :-)
The ToolStripDropD... | [
0.38065963983535767,
-0.04006456211209297,
0.4621787965297699,
0.4407612383365631,
-0.31686633825302124,
-0.3422655761241913,
0.0319349430501461,
0.08929283171892166,
-0.06642304360866547,
-0.6124231219291687,
-0.0215649101883173,
0.47011610865592957,
-0.590206503868103,
0.0904275178909301... | |
{
//Basic setup...
this.AutoSize = false;
this.DoubleBuffered = true;
this.ResizeRedraw = true;
this._content = content;
this._host = new System.Windows.Forms.ToolStripControlHost(content);
//Positioning and Sizing
this.MinimumSize = content.MinimumSize;... | [
0.29508519172668457,
-0.35757917165756226,
0.4325968623161316,
-0.017141466960310936,
0.23013149201869965,
-0.1927025318145752,
0.3226015865802765,
-0.6066615581512451,
-0.24820014834403992,
-0.7234244346618652,
-0.42513307929039,
0.7555291056632996,
-0.3769659399986267,
-0.152465730905532... | |
this.Size = content.Size;
content.Location = Point.Empty;
//Add the host to the list
this.Items.Add(this._host);
}
}
```
Usage:
```
PopupWindow popup = new PopupWindow(MyControlToHost);
popup.Show(new Point(100,100));
...
popup.Close();
``` | [
-0.030627163127064705,
0.2353307157754898,
1.051542043685913,
-0.0365736298263073,
0.1965620368719101,
-0.006308711599558592,
-0.027312880381941795,
0.09237244725227356,
-0.4132338762283325,
-0.7030127644538879,
-0.5403199195861816,
0.07884267717599869,
-0.42709848284721375,
0.579674005508... | |
My Sharepoint 2007 web part executes code to start a K2 workflow process. The workflow server resides on another server.
When my code executes, I get the following error:
"24408 K2:NT AUTHORITY\ANONYMOUS LOGON from 172.172.172.172:1721 does not have rights to Start Process MyProject\MyProcessName"
I'm sure this is a ... | [
-0.24943795800209045,
0.42685168981552124,
0.3505878746509552,
-0.2195051908493042,
-0.23383045196533203,
-0.16017742455005646,
0.486505389213562,
-0.18579797446727753,
-0.10425299406051636,
-0.3138182759284973,
-0.0834721103310585,
0.228093683719635,
-0.4169977903366089,
0.451161593198776... | |
are trying to do is called delegation and not impersonation. Impersonation is only on the local server. There are many thing that have to be right for delegation to work.
A place to start would be [Kerberos authentication and troubleshooting delegation issues](http://support.microsoft.com/kb/907272)
[David Wang blog]... | [
0.32072389125823975,
0.0680595189332962,
0.15044060349464417,
0.1018744707107544,
-0.08162152767181396,
-0.05547604337334633,
0.6700423955917358,
-0.17156800627708435,
0.12334469705820084,
-0.6250128149986267,
-0.24934248626232147,
-0.010147503577172756,
-0.5138431191444397,
-0.05349178984... | |
Are "out" parameters a bad thing in .NET? Any good articles/discussions on this topic?
Well, I have [an article on what ref/out do](http://pobox.com/~skeet/csharp/parameters.html) - but it doesn't discuss whether or not you should use them.
Basically `out` parameters are usually a sign that you want to effectively ret... | [
0.5183640122413635,
-0.11805082857608795,
-0.269511342048645,
0.1508406400680542,
-0.3416904807090759,
-0.3547060787677765,
0.32175031304359436,
-0.17946910858154297,
-0.2495797723531723,
-0.34938573837280273,
-0.07338742166757584,
0.26837193965911865,
-0.27143219113349915,
0.0334430225193... | |
easily, but don't go massively out of your way to avoid them. | [
0.1475500464439392,
0.0715218186378479,
-0.12695588171482086,
0.21390460431575775,
0.10033762454986572,
-0.12472613155841827,
0.5174548625946045,
-0.07487572729587555,
-0.30360886454582214,
-0.5911024212837219,
-0.07501839101314545,
0.4316055178642273,
0.2676870822906494,
-0.59004646539688... | |
I am not that hot at regular expressions and it has made my little mind melt some what.
I am trying to find all the tables names in a query. So say I have the query:
```
SELECT one, two, three FROM table1, table2 WHERE X=Y
```
I would like to pull out "table1, table2" or "table1" and "table2"
But what if there is ... | [
-0.017582809552550316,
0.3462666869163513,
0.32810989022254944,
-0.23303081095218658,
-0.24413305521011353,
0.1438009887933731,
-0.07544981688261032,
-0.037495654076337814,
-0.4804129898548126,
-0.5344634652137756,
-0.0347583144903183,
0.2928127646446228,
-0.3881951570510864,
0.02684356085... | |
coding for "most" situations and knowing I have left a hole that could cause things to go wrong later.
Is this a doable Regex expression? Am I being a Regex pleb?
(P.S. this will be done in C# but presume that doesn't matter much).
RegEx isn't very good at this, as it's a lot more complicated than it appears:
* What... | [
0.315710186958313,
-0.12229115515947342,
-0.017610201612114906,
0.125238835811615,
0.03770025447010994,
-0.05020342394709587,
0.4358659088611603,
0.2970696985721588,
-0.11719635128974915,
-0.6894362568855286,
0.08945511281490326,
0.48838382959365845,
-0.43327075242996216,
0.057655308395624... | |
on.
What you can do is look for an sql parser, and run your query through that. | [
0.4293462038040161,
0.2407449334859848,
0.05707836523652077,
0.3011787235736847,
0.13123667240142822,
-0.2626904547214508,
-0.0736749917268753,
0.3972729742527008,
0.09910859167575836,
-0.6028304100036621,
-0.045628782361745834,
0.6183525919914246,
-0.3820865750312805,
-0.12194988131523132... | |
I'm trying to read the data in a Win32 ListView owned by another process. Unfortunately, my WriteProcessMemory() call fails with the error "This function is not supported on this system." when I specify "NULL" for the base address in my VirtualAlloc() call. If, however, I offset that VirtualAlloc() address by some "mag... | [
0.27399617433547974,
0.13901716470718384,
0.1727839857339859,
0.12596264481544495,
0.1622079610824585,
-0.009179427288472652,
0.5016284584999084,
-0.029110701754689217,
-0.09216468781232834,
-0.6132940649986267,
0.05830563232302666,
0.7923727631568909,
-0.14037206768989563,
0.3392004370689... | |
that work on specific systems, but I can't find a general solution to this problem.
Thanks,
PaulH
```
#define MAGIC_OFFSET (DWORD)0x01020000
LVHITTESTINFO hti = { 0 };
hti.pt = clientPoint;
LPVOID lpBuffer = ::VirtualAlloc( NULL, 1, MEM_RESERVE, PAGE_READWRITE );
::VirtualFree( lpBuffer, 0, MEM_RELEA... | [
-0.1056697815656662,
-0.18913069367408752,
1.2581052780151367,
-0.010342064313590527,
0.19195391237735748,
-0.040863391011953354,
0.14501839876174927,
-0.482005774974823,
-0.26057446002960205,
-0.653969943523407,
-0.24335524439811707,
1.0450416803359985,
-0.3513953983783722,
-0.14877441525... | |
(LPVOID)dwBuffer, (LPVOID)&hti, sizeof( hti ), NULL ) )
return 0;
::VirtualFree( lpBuffer, 0, MEM_RELEASE );
```
Clarification (added by Cd-MaN): this is on a Windows Mobile platform, probably non-x86 architecture. So the situation may be different (are there separate address spaces in ARM processors?).
Instead ... | [
-0.03776276484131813,
-0.002475074725225568,
0.6436775326728821,
0.0520181804895401,
0.2875807285308838,
-0.039606381207704544,
-0.31801530718803406,
-0.20896591246128082,
-0.5867131948471069,
-0.6072741746902466,
-0.1047917902469635,
0.6796827912330627,
-0.2920668125152588,
-0.12392622232... | |
I have a compiled AppleScript application which I have moved to my windows server. I'd like to then insert a text file into the application (which looks like a zip file on windows):
```
myapplescript.app/Contents/Resources/MyNewDir/MyTxtFile.txt
```
So, I've precompiled the AppleScript to try to read from this text ... | [
-0.004889592994004488,
0.3463868796825409,
0.7450899481773376,
-0.2589074671268463,
-0.11100449413061142,
0.07682082802057266,
0.17132031917572021,
-0.07262321561574936,
-0.09558308124542236,
-0.8648665547370911,
0.09495891630649567,
0.6858382225036621,
-0.22851531207561493,
-0.04064393788... | |
the second line to this:
```
set theFile to (POSIX file (theFolder & "Contents/Resources/MyNewDir/MyTxtFile.txt"))
``` | [
0.19465558230876923,
0.05600164458155632,
0.6034823656082153,
-0.10015808790922165,
0.43679577112197876,
-0.09703408181667328,
-0.18708017468452454,
0.1868186891078949,
0.022820286452770233,
-0.6965546607971191,
-0.2702314257621765,
0.6802809834480286,
-0.06313849985599518,
0.0081575373187... | |
Is it possible to share a single 'god' instance among everyone that links to this code, to be placed in a shared object?
```
god* _god = NULL;
extern "C"
{
int set_log_level(int level)
{
if(_god == NULL) return -1;
_stb->log_level(level);
return 0;
}
int god_init(){
if(_god == NULL){
_god = ... | [
-0.04959148168563843,
0.4753996729850769,
0.4558822512626648,
0.02897549234330654,
0.09276223182678223,
0.023622021079063416,
0.667194128036499,
-0.42067933082580566,
-0.2009504735469818,
-0.7748027443885803,
-0.1957545280456543,
0.566518247127533,
-0.18701349198818207,
0.19180868566036224... | |
themselves to the caller (God mallocs only for internal use), what is the simplest way of doing this, if possible.
How can that be extended to an arbitrary number of programs linked to this shared library?
[Boost Interprocess](http://www.boost.org/doc/libs/1_37_0/doc/html/interprocess.html) library has high(er) level,... | [
0.18188543617725372,
0.28734004497528076,
0.43065309524536133,
0.19754697382450104,
-0.08735591173171997,
0.38338086009025574,
0.1728665977716446,
-0.28887519240379333,
-0.10249558091163635,
-0.5414496660232544,
-0.21110764145851135,
0.7949784398078918,
-0.12834519147872925,
-0.38220074772... | |
I am having some trouble grasping some concepts behind the MVC framework. I am doing a very simple application which categorizes products.
The Creation screen will simply use a dropdown list showing the list of categories, the name of the product and submit.
On a normal .Net app, I would databind a server dropdownlis... | [
0.5229998826980591,
0.3174455761909485,
0.1252312958240509,
-0.09319939464330673,
-0.10966089367866516,
-0.055190857499837875,
0.11351257562637329,
-0.050242144614458084,
-0.17448939383029938,
-0.4016950726509094,
-0.09937496483325958,
0.4619057774543762,
-0.24978362023830414,
0.2089415788... | |
not sure if I totally grasp, but if your page is displaying a single product and the only user input is just to select a category from a drop down list, I can sorta help (but I'm a noob too!).
Referencing this page:
<http://weblogs.asp.net/scottgu/archive/2008/05/27/asp-net-mvc-preview-3-release.aspx>
You are going ... | [
0.3307167887687683,
-0.18918652832508087,
0.3089219927787781,
0.14493131637573242,
-0.19755776226520538,
-0.1701367199420929,
0.020849037915468216,
-0.015752634033560753,
-0.41508084535598755,
-0.31107911467552185,
0.11891115456819534,
0.22550205886363983,
-0.20362888276576996,
0.227781474... | |
a parameter.
That link above should convey it much better, this is just a quick summary. That link is for preview 3, but I think it should all still apply. | [
0.1837913990020752,
-0.09873250126838684,
0.23670847713947296,
0.18716950714588165,
-0.28949564695358276,
-0.18809548020362854,
0.09767581522464752,
-0.013053055852651596,
0.03344979137182236,
-0.44751566648483276,
0.19137008488178253,
0.5544750690460205,
-0.20941662788391113,
0.0449377559... | |
Is it a good practice to comment code that is removed? For example:
```
// Code to do {task} was removed by Ajahn on 10/10/08 because {reason}.
```
Someone in my developer group during a peer review made a note that we should comment the lines of code to be removed. I thought this was a terrible suggestion, since it... | [
0.4613097012042999,
0.6140367388725281,
-0.19874224066734314,
-0.13538500666618347,
-0.30084630846977234,
-0.4338172674179077,
0.29358071088790894,
-0.047760624438524246,
-0.11155477911233902,
-0.33832526206970215,
-0.14779436588287354,
0.44220617413520813,
-0.3633281886577606,
0.271945714... | |
are where such comments belong. | [
0.4274633526802063,
0.3389952480792999,
-0.056061986833810806,
0.18626092374324799,
-0.10148169100284576,
-0.3719155788421631,
0.16800625622272491,
0.6240979433059692,
-0.09165430068969727,
-0.3819526731967926,
-0.3102113604545593,
0.1850288212299347,
0.18289227783679962,
-0.06842257082462... | |
We have scalar functions in our database for returning things like "number of tasks for a customer" or "total invoice amount for a customer".
We are experimenting and looking to try to do this w/o stored procedures ... normally we would just call this function in our stored procedure and return it as a single value. ... | [
0.3498595654964447,
-0.02273755520582199,
0.44536224007606506,
0.2085157185792923,
0.09408053755760193,
0.13585492968559265,
-0.3972910940647125,
-0.18606893718242645,
-0.49285170435905457,
-0.15045103430747986,
0.246879443526268,
0.534911036491394,
-0.11256006360054016,
0.1518806368112564... | |
is even doable.
LINQ-to-SQL supports use with UDFs, if that is what you mean. Just drag the UDF onto the designer surface and you're done. This creates a matching method on the data-context, marked [`[Function(..., IsComposable=true)]`](http://msdn.microsoft.com/en-us/library/system.data.linq.mapping.functionattribute.... | [
0.07635419070720673,
-0.025720028206706047,
0.7358383536338806,
0.03239606320858002,
0.10881179571151733,
-0.3342752456665039,
-0.06035677343606949,
-0.24863527715206146,
-0.003084697062149644,
-0.4052783250808716,
-0.3019772171974182,
0.5176538228988647,
-0.3827086091041565,
-0.1516897380... | |
means that you can use the value in queries - for example in a `Where()`/`WHERE` - and so reduce the data brought back from the server (although obviously the UDF will still need to be executed in some way).
[Here's a similar example](http://groups.google.co.uk/group/microsoft.public.dotnet.languages.csharp/browse_thr... | [
0.12026744335889816,
0.07817032933235168,
0.2964428663253784,
0.040676698088645935,
0.03272855654358864,
-0.019970208406448364,
0.28132033348083496,
-0.11663364619016647,
-0.45709988474845886,
-0.4460364878177643,
-0.20414619147777557,
0.24999073147773743,
-0.48673275113105774,
0.233640894... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.