text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
from the issues with mapping a folder. I've checked with SQL Compact sdf file stored in the RAMDisk and it works like a charm. I've used it as a 64MB drive but supposedly it can handle up to 256 MB. | [
0.3197411000728607,
0.1372828483581543,
0.18895892798900604,
0.27578991651535034,
0.021613268181681633,
-0.2611236572265625,
0.10138354450464249,
0.13883516192436218,
-0.29836440086364746,
-0.5927264094352722,
0.12334945052862167,
0.4862973093986511,
0.12325963377952576,
0.1053604111075401... | |
We're looking for someone to help us enhance & maintain our high-quality, php-based prototype of a transactional web app. Ideally, who can communicate well, and do both front- and back-end web development (as well as smart/gets things done, etc.). Among other more general things, I've been using this question:
> Given... | [
0.5700879096984863,
0.2909044325351715,
0.16565169394016266,
0.07942507416009903,
-0.07020658999681473,
-0.03334758058190346,
0.1890663504600525,
0.060102429240942,
-0.1566796898841858,
-0.3128581643104553,
0.26869988441467285,
0.46086591482162476,
-0.13422523438930511,
-0.2835859656333923... | |
a villain.
I've read a number of posts here and there (including both Joel's and Jeff's) saying that how candidates think, design skills, passion, etc. are more important than any specific technical skill, and I agree with that. Also, I can see that programming at a whiteboard is a little unrealistic. OTOH, this seem... | [
0.26253968477249146,
-0.12571634352207184,
-0.07345474511384964,
0.4498215615749359,
-0.3291938602924347,
0.06459398567676544,
0.5181032419204712,
0.1940324604511261,
0.1811370849609375,
-0.3304968774318695,
-0.1870715171098709,
0.4386118948459625,
0.1102457195520401,
-0.1236615926027298,
... | |
to all sorts of answers: array\_sum, a for loop, a foreach loop. Heck, if they want to write an ArraySum class, that would be overkill, but just fine. Using javascript, or another language would be fine, if they're more comfortable with that. Even attempts with minor errors would be ok, but I've had a couple of complet... | [
0.4950104057788849,
-0.010376985184848309,
0.12143499404191971,
0.14372587203979492,
-0.03371039777994156,
0.28872668743133545,
0.48448997735977173,
-0.2660696506500244,
-0.13073937594890594,
-0.1636139303445816,
0.047695670276880264,
0.21370629966259003,
0.13748951256275177,
-0.1722265034... | |
it's not a trick question beforehand, that it's really, really as simple as it appears, so she doesn't spend to much time thinking about the pitfalls and to minimize the deer-situation. throw in you do that just as a measure to filter out the people who apply for a programming without actually knowing anything about it... | [
0.7602366805076599,
-0.2713830769062042,
-0.4834904670715332,
0.36995449662208557,
-0.04630289599299431,
-0.14338324964046478,
0.5312429070472717,
-0.21369293332099915,
-0.29505106806755066,
-0.25470682978630066,
0.3992604613304138,
0.5204243659973145,
0.19329334795475006,
-0.4585833847522... | |
are present or not.
if she provides `array_sum` or `sum_array` as an answer almost doesn't matter, especially if the language in question is php (but if two candidates are equal otherwise ... *i can't even remember the last time i had to use this function*). and the use of an auto-completion and syntax-coloring (with ... | [
-0.10586733371019363,
0.07818187773227692,
0.16114413738250732,
0.10885385423898697,
-0.1061224490404129,
0.24751730263233185,
0.32803380489349365,
-0.15526479482650757,
-0.12731477618217468,
-0.2673690915107727,
-0.1940222978591919,
0.36125946044921875,
-0.011456221342086792,
-0.298801392... | |
mind how this problem could be solved, what pitfalls could arise in special cases. try to find out what she knows about *programming*, not what she knows about php. try to find out about intelligence, problem solving and creativity. altought experience matters a lot even when it comes to bang out code fast, it's not a ... | [
0.05008210241794586,
0.12416134774684906,
0.04016543924808502,
0.15446189045906067,
-0.32161739468574524,
0.056998927146196365,
0.3047723174095154,
-0.10749394446611404,
-0.3126065731048584,
-0.4819074273109436,
0.2673782706260681,
0.6829931735992432,
0.17115288972854614,
-0.47877690196037... | |
if there are different objects than numbers. pros: everybody will understand it): *i can solve simple problems if there are no predefined copy&pasteable solutions*
* **`array_reduce`** (with an offering to implementat `array_reduce`, if the interviewer wants to see it): *unusual for a php programmer, so it seems i have... | [
0.188916876912117,
0.20696890354156494,
0.26092424988746643,
-0.20920710265636444,
-0.2409612238407135,
-0.0847720205783844,
0.5002269148826599,
-0.18269148468971252,
-0.3323150873184204,
-0.4717649221420288,
0.0009218508494086564,
0.608995795249939,
-0.0547485388815403,
-0.395585805177688... | |
crude) programmer-specific humour - a sign i'm personally interested in programming outside of work* ... some interviewers who are programmers (but not hackers) might interpret this as a willingness to use dirty hacks as placeholders *(aehm)* if time constraints are too tight
* **a recursive solution** would be nice. *... | [
0.352744996547699,
0.1526160091161728,
0.1600121110677719,
0.2677184045314789,
-0.41657203435897827,
0.1332913339138031,
0.12777827680110931,
0.1736544519662857,
-0.17962267994880676,
-0.6259459853172302,
-0.03143779933452606,
0.8591647744178772,
0.0787651389837265,
-0.18451832234859467,
... | |
a little bit about programming capability and a lot about experience (altought not necessarily PHP specific).
i'd choose this question over letting the candidate write out quicksort - a very specific question about knowledge almost never needed in the web dev world - any time.
### disclaimer
the question is useless ... | [
0.3807453215122223,
-0.07181131839752197,
0.2613978385925293,
0.50706946849823,
-0.1605459749698639,
-0.1449333131313324,
0.26557087898254395,
0.1001882404088974,
0.005073141306638718,
-0.49715179204940796,
-0.1726815104484558,
0.6830306649208069,
0.2180863618850708,
-0.37887221574783325,
... | |
you need quality and experience, don't waste too much time on it (but do it anyway). | [
0.6492014527320862,
0.09573947638273239,
-0.24238084256649017,
0.20460404455661774,
0.0468219555914402,
-0.281767338514328,
0.528389573097229,
0.18454651534557343,
-0.10648827254772186,
-0.6693003177642822,
0.014042472466826439,
0.9368332028388977,
0.6347711086273193,
-0.24567721784114838,... | |
I'm working on a script to get started in [PowerShell](http://en.wikipedia.org/wiki/Windows_PowerShell). I'm trying to convert a [working VBScript script](http://www.visualbasicscript.com/m_28529/tm.htm) that enumerates mapped network drives on a remote Windows computer.
One of the tasks is to use remote [WMI](https:/... | [
0.10746084898710251,
0.09654151648283005,
0.3270418643951416,
0.009399624541401863,
0.2536300718784332,
-0.058863651007413864,
0.0483994260430336,
-0.1413612812757492,
-0.23389457166194916,
-0.7494765520095825,
0.09119168668985367,
0.6062077283859253,
-0.1367245316505432,
0.279231041669845... | |
I get the error: `Cannot find an overload for "GetOwner" and the argument count: "2".`. The MSDN page says there are two parameters, so I'm not sure what I'm doing wrong.
Using the `[ref]` modifier:
```
SomeMethod( [ref] $a );
```
Notable blog entries
* [http://geekswithblogs.net/Lance/archive/2009/01/14/pass-by-re... | [
-0.12880125641822815,
0.10684794932603836,
0.46648162603378296,
0.14760378003120422,
0.029716379940509796,
-0.1930481493473053,
0.532138466835022,
-0.11417806893587112,
-0.2067243456840515,
-0.5145864486694336,
-0.3060356080532074,
0.8435126543045044,
-0.28999125957489014,
0.19593648612499... | |
I have a login form which appears at the top of all of my pages when the user is logged out. My current jQuery/javascript code works in Firefox 3 but not IE 7. The code queries a page which simply returns the string "true" or "false" depending on whether the login was successful or not. Inside my $.ready() function cal... | [
0.3428649306297302,
0.24873149394989014,
0.7080737352371216,
-0.2969255745410919,
0.18051141500473022,
-0.11576372385025024,
0.39384016394615173,
-0.2911558449268341,
0.07807394862174988,
-0.8832974433898926,
-0.20546334981918335,
0.5685780048370361,
-0.1407223343849182,
-0.027297621592879... | |
}, function(data) {
alert('get succeeded');
if(data == 'true') {
$('#login_error').hide();
window.location = '/user/home.php';
alert('true');
} | [
0.01363256387412548,
-0.28367820382118225,
0.6327304840087891,
-0.13448455929756165,
0.5396013855934143,
0.13562509417533875,
0.8119749426841736,
-0.29342183470726013,
-0.04581556096673012,
-0.38097548484802246,
-0.5716763734817505,
0.6811205148696899,
-0.31311193108558655,
0.1414370834827... | |
else {
$('#login_error').show();
alert('false');
}
});
alert('called');
return false;
});
```
In FF, I am successfully transferred to the intended page. In IE, however, the below alerts "called" and nothing else. When I | [
0.29025664925575256,
-0.10833600908517838,
0.6159520745277405,
-0.3221810460090637,
0.2820530831813812,
-0.23421946167945862,
0.6128765344619751,
-0.2983083128929138,
0.1073102205991745,
-0.7227119207382202,
-0.6045658588409424,
0.7175433039665222,
-0.22115376591682434,
0.14954429864883423... | |
refresh the page, I can see that I am logged in so the $.get call is clearly going through, but the callback function doesn't seem like its being called (ie. "get succeeded" is not popping up). I also don't appear to be getting any javascript error messages either.
Why isn't this working in IE?
Thanks
**EDIT:** Sinc... | [
0.3450644612312317,
-0.026151996105909348,
0.5931106209754944,
0.08027341216802597,
-0.05928321182727814,
-0.4790407419204712,
0.8632373809814453,
0.015159755013883114,
-0.38805198669433594,
-0.8686143159866333,
-0.33943966031074524,
0.8597954511642456,
0.07458513230085373,
0.0503180660307... | |
the callback function nothing happens in IE (I do not get an alert popup). In FF, it alerts `true` for valid email/pw combos and `false` for invalid ones. I am using jQuery 1.3.2.
**EDIT 3:** Ok, guys, I tried R. Bemrose's thing down there and I'm getting a "parseerror" on the returned data. I'm simply echoing 'true' ... | [
0.009964196011424065,
-0.04310186579823494,
0.5303836464881897,
-0.2702721655368805,
-0.4233488440513611,
-0.21627825498580933,
0.555168867111206,
-0.26564475893974304,
0.16717299818992615,
-0.395880788564682,
-0.31933537125587463,
1.1265100240707397,
-0.5690216422080994,
-0.32139697670936... | |
Let say I'm on the page "Home/Index" and I want to go to the page MyOtherController/Index/1
How can I do this ?
I try :
`<%= Html.ActionLink("Test", "Index", "MyOtherController", new { id=item.Id }) %>`
Did I also have to add a route in Global.aspx file ?
One option is to specify the name of the controller in the l... | [
-0.2781377136707306,
-0.3257544934749603,
0.5600000619888306,
0.23580439388751984,
-0.035236407071352005,
-0.17217479646205902,
0.3815124034881592,
-0.08554642647504807,
-0.27271974086761475,
-0.9152112603187561,
-0.1645963490009308,
0.4530211091041565,
-0.3295501470565796,
0.1663714051246... | |
route in the ASP.NET MVC template takes care of the routing in this case. | [
-0.11243636906147003,
-0.2630545198917389,
0.47465482354164124,
-0.12589728832244873,
0.05743180587887764,
-0.18617191910743713,
0.21699877083301544,
-0.16700132191181183,
-0.3087841868400574,
-0.9567855596542358,
-0.40309447050094604,
0.10710693150758743,
-0.24700696766376495,
-0.20666240... | |
I'd like to be able to run a shell command on the current file that I'm editing and have the output be shown in the *Shell Command Output* window. I've been able to define the
function which is shown below.
```
(defun cpp-check ()
"Run cpp-check on current file the buffer is visiting."
(shell-command
(concat "... | [
0.3264125883579254,
0.12832008302211761,
0.25028538703918457,
-0.2631834149360657,
0.32839328050613403,
-0.06750975549221039,
-0.047028858214616776,
0.01983337476849556,
-0.23680412769317627,
-0.7624869346618652,
-0.10777011513710022,
0.6693276762962341,
-0.38193559646606445,
0.14841048419... | |
am I on the right track here defining the function to be put in my .emacs file or is there a better way?
Any help would be appreciated. Thanks.
This is what I came up with. Thanks for the responses. I defined a function that will go ahead and run cpp-check. I wanted it bound to a key in c-mode so I add it as a hook. I... | [
0.3155246675014496,
-0.08041062206029892,
0.35028237104415894,
0.14103272557258606,
0.13454043865203857,
0.007020111661404371,
-0.11380904167890549,
-0.10116460919380188,
-0.5040258765220642,
-0.4478232264518738,
0.03749627619981766,
0.5070204138755798,
-0.10219403356313705,
-0.02730488032... | |
pressed the results come up in another window, but the cursor remains in the original buffer, which is what I want. The only problem is that the output is shown in the minibuffer as well which isn't quite what I want. Any thoughts on fixing that little detail?
```
(defun cpp-check ()
(interactive)
"Run cpp-check ... | [
0.08088625222444534,
0.17772549390792847,
0.6015222072601318,
-0.4126434326171875,
0.3700489401817322,
0.21613533794879913,
0.21208573877811432,
-0.14218619465827942,
-0.28718864917755127,
-0.42562195658683777,
-0.09001474827528,
0.7679693698883057,
-0.31132131814956665,
0.0036310611758381... | |
(define-key c-mode-base-map
"\C-x\p" 'cpp-check)))
``` | [
-0.23040777444839478,
0.27122145891189575,
0.2287970781326294,
-0.1514216512441635,
0.3626905381679535,
-0.22264888882637024,
0.052413687109947205,
-0.16607794165611267,
0.04863594472408295,
-0.4296019971370697,
-0.5599642395973206,
0.5686218738555908,
-0.4673849940299988,
0.02077832072973... | |
I read Storm ORM's tutorial at <https://storm.canonical.com/Tutorial>, and I stumbled upon the following piece of code :
```
store.find(Person, Person.name == u"Mary Margaret").set(name=u"Mary Maggie")
```
I'm not sure that the second argument of the **find** method will be evaluated to True/False. I think it will ... | [
-0.12354664504528046,
0.3015453517436981,
0.20394279062747955,
-0.2577114999294281,
-0.009842269122600555,
0.40485692024230957,
0.5546689629554749,
-0.35661521553993225,
-0.24298301339149475,
-0.2050885260105133,
0.20937396585941315,
0.5219250321388245,
-0.2884971499443054,
0.0690368860960... | |
Suppose I have 2 enumerations that I know have the same number of elements and each element "corresponds" with the identically placed element in the other enumeration. Is there a way to process these 2 enumerations simultaneously so that I have access to the corresponding elements of each enumeration at the same time?
... | [
-0.03061457723379135,
0.2866418659687042,
-0.06266311556100845,
-0.1864488571882248,
0.07797655463218689,
0.13692902028560638,
0.06015787273645401,
-0.6328353881835938,
-0.045743461698293686,
-0.635341465473175,
-0.14274422824382782,
0.13530677556991577,
-0.49983537197113037,
-0.2764702439... | |
(this IEnumerable<TFirst> source, IEnumerable<TSecond> secondSequence)
{
using (IEnumerator<TSecond> secondIter = secondSequence.GetEnumerator())
{
foreach (TFirst first in source)
{
if (!secondIter.MoveNext())
{
throw new ArgumentException | [
-0.3405744731426239,
-0.55105060338974,
0.2750268280506134,
-0.25187310576438904,
0.07834487408399582,
0.3188185691833496,
0.21743172407150269,
-0.24906706809997559,
0.22807368636131287,
-0.8119865655899048,
-0.31686973571777344,
0.5186520218849182,
-0.12339644879102707,
0.0828019157052040... | |
("First sequence longer than second");
}
yield return new KeyValuePair<TFirst, TSecond>(first, secondIter.Current);
}
if (secondIter.MoveNext())
{
throw new ArgumentException
("Second sequence longer than first"); | [
-0.5185638070106506,
-0.5341622233390808,
0.23216143250465393,
-0.5092198848724365,
0.1458384096622467,
0.22835713624954224,
0.18851666152477264,
-0.35657235980033875,
0.13641245663166046,
-0.5025525093078613,
-0.5916208624839783,
0.525378406047821,
-0.06701059639453888,
0.1089853122830390... | |
}
}
}
```
Note that the `KeyValuePair<>` is my addition, and that I'm normally not a fan of using it this way. Instead, I would define a generic `Pair` or `Tuple` type. However, they are not included in the current version of the framework and I didn't want to clutter this sample with extra class definiti... | [
0.05067726597189903,
0.048079680651426315,
-0.00721679488196969,
-0.3307202160358429,
0.09543042629957199,
-0.13237588107585907,
0.08289125561714172,
-0.03774566203355789,
0.055066633969545364,
-0.5002665519714355,
-0.22233271598815918,
0.3718020021915436,
-0.416961133480072,
0.14589944481... | |
I want to only allow one authenticated session at a time for an individual login in my Django application. So if a user is logged into the webpage on a given IP address, and those same user credentials are used to login from a different IP address I want to do something (either logout the first user or deny access to t... | [
0.4549572467803955,
0.1572648286819458,
0.3874048590660095,
0.19486327469348907,
-0.029772303998470306,
-0.5130243301391602,
0.3579568862915039,
0.034692320972681046,
-0.27833637595176697,
-0.49162784218788147,
0.20152553915977478,
0.5392992496490479,
-0.4122186601161957,
-0.24223464727401... | |
datetime import datetime
class UserRestrictMiddleware(object):
"""
Prevents more than one user logging in at once from two different IPs
"""
def process_request(self, request):
ip_address = request.META.get('REMOTE_ADDR','')
try:
last_login = request.user.last_login
... | [
-0.24461694061756134,
-0.3015671670436859,
0.5928974151611328,
-0.24728557467460632,
0.22765517234802246,
-0.1501716524362564,
0.245938241481781,
-0.2091238796710968,
-0.14879602193832397,
-0.7371973991394043,
-0.42243918776512146,
0.38950666785240173,
-0.5056891441345215,
0.07822242379188... | |
previous_visitors = Visitor.objects.filter(user=request.user).exclude(ip_address=ip_address)
for visitor in previous_visitors:
Session.objects.filter(session_key=visitor.session_key).delete()
visitor.user = None
visitor.save()
```
3) Make sure it goes after ... | [
-0.506716787815094,
-0.04690960422158241,
0.35828348994255066,
-0.24715380370616913,
0.10548539459705353,
-0.11903462558984756,
0.3794604539871216,
-0.08823853731155396,
-0.7650579214096069,
-0.7351546287536621,
-0.32604989409446716,
0.2450016885995865,
-0.36990171670913696,
0.600780606269... | |
I seem to be having difficulties getting the trace function to output anything to the console in either Eclipse with the Flex Plug-in, Flex Builder, or even FlexBeans (the Netbeans plug-in for Flex). I have removed and then reinstalled the Flash player 10 debugger version for both Firefox and IE, rebooting after uninst... | [
0.47103679180145264,
0.16756625473499298,
0.4130554795265198,
-0.47726884484291077,
0.09773433953523636,
-0.32988283038139343,
0.3290126621723175,
-0.11298847943544388,
0.12024897336959839,
-0.8587948679924011,
-0.0018823181744664907,
1.0807123184204102,
-0.6108920574188232,
-0.48978385329... | |
I cannot create new Flex projects. I would rather not uninstall Flex Builder for fear that it will also behave strangely.
ANY ideas would be useful. Ideally, I need the plug-in to work, but any way I could get tracing to output to the console (in ANY IDE) would be better than what I have now.
Flickr has published thei... | [
0.603043794631958,
-0.17002266645431519,
0.2383439838886261,
0.10806280374526978,
-0.2837277054786682,
-0.037431418895721436,
0.13336768746376038,
-0.06413931399583817,
-0.4528578817844391,
-0.7489814758300781,
-0.17849187552928925,
0.32767850160598755,
-0.120302215218544,
-0.1789175570011... | |
you have to do is edit /etc/aliases. /etc/aliases can be used to set a mailbox to pass all email to a script.
I strongly recommend [reading through this chapter](http://books.google.com/books?id=gXmatd2suh4C&pg=PA117&lpg=PP1&dq=building+scalable+websites&output=html), as it goes on to outline a lot of the common issue... | [
0.3722522556781769,
0.09471704810857773,
0.21728838980197906,
0.1729377806186676,
0.03414148837327957,
-0.42876961827278137,
0.52093905210495,
-0.008620522916316986,
-0.24382232129573822,
-0.6449878811836243,
-0.17870265245437622,
0.25792691111564636,
-0.1709798276424408,
-0.11436911672353... | |
I have an Asp.Net MVC application that works in the vs.net development web server. When I publish to IIS7 I get the following error. I have spent many hours and still no solution!
```
[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.PipelineStepManager.ResumeSteps(Exceptio... | [
-0.14026127755641937,
0.039857037365436554,
0.661314070224762,
-0.35433080792427063,
-0.04100498557090759,
-0.006552914157509804,
0.5788081288337708,
-0.23871880769729614,
-0.11887804418802261,
-0.934856116771698,
-0.24727748334407806,
0.5347539186477661,
-0.3756221830844879,
0.31423592567... | |
ComponentRegistrar.RegisterComponents();
NHibernateSession.InitSqlServer2005(new WebSessionStorage(this), Settings.Default.DefaultConnString);
CacheManager.InitCaches();
}
}
```
I came late to this application and do not know the best practices of MVC and NHibern... | [
0.026847921311855316,
-0.024410182610154152,
0.6576632857322693,
-0.056710343807935715,
-0.015576672740280628,
-0.10939235240221024,
0.5525166392326355,
-0.3869033753871918,
-0.0377332977950573,
-0.3669871985912323,
-0.0029927515424788,
0.8952546119689941,
-0.4518684446811676,
0.3144164085... | |
Also you can see it is done here
<http://code.google.com/p/sharp-architecture/source/checkout> | [
0.4359438419342041,
0.14619657397270203,
0.1256953775882721,
0.13589923083782196,
0.13112664222717285,
-0.021229669451713562,
0.2918078899383545,
0.14661411941051483,
-0.05916624516248703,
-0.4445180296897888,
-0.05763918533921242,
0.6411646008491516,
0.47591638565063477,
-0.04583742097020... | |
Is there a way to print, via the SDK (I'm using qbXML and the QuickBooks web connector to connect to a Java application server, SDK version 7.0, QuickBooks enterprise 9.0) invoices with their cover letter? It may take a third party tool, because it seems that QuickBooks has a nice little checkbox of "to be printed" whi... | [
0.5377728343009949,
-0.03315580263733864,
0.33228033781051636,
0.3579767346382141,
-0.029611384496092796,
-0.06136129051446915,
-0.007084866985678673,
0.18227128684520721,
-0.41095101833343506,
-0.6991106271743774,
0.1023370623588562,
0.33461517095565796,
-0.09528742730617523,
-0.273303240... | |
the SDK on creation so that it can be printed with the appropriate cover letter later?
this is probably what you're looking for, look at the standard zoom example:
<http://www.mind-projects.it/projects/jqzoom/> | [
0.6385374069213867,
-0.09537754952907562,
0.18838079273700714,
0.3175162971019745,
-0.06258925795555115,
-0.3216467797756195,
-0.13267795741558075,
0.13734151422977448,
-0.3135344982147217,
-0.4415087401866913,
-0.10055150091648102,
0.3038659393787384,
0.10416097939014435,
-0.2560238838195... | |
is there any open source code for syncing an iPhone
with a server (preferably REST)?
Found nothing on github and google code.
Regards...
I suggest using the excellent ASIHTTPRequest source from All-Seeing Interactive: <http://allseeing-i.com/ASIHTTPRequest>. I'm doing this, and so are several released iPhone apps, so... | [
-0.004296117927879095,
0.024520181119441986,
0.49221354722976685,
0.05951368436217308,
0.02079765871167183,
0.01409219391644001,
0.5293064117431641,
0.065055713057518,
0.2346300631761551,
-0.8935410380363464,
0.07822372019290924,
0.5594553351402283,
-0.40683454275131226,
-0.240455076098442... | |
POST / PUT / DELETE). The ASIFormDataRequest subclass makes it easy to submit POST data and files using multipart/form-data. | [
0.19132530689239502,
-0.0815277248620987,
0.15996053814888,
-0.011940796859562397,
-0.33637627959251404,
0.3075065016746521,
0.4672088027000427,
-0.05589473247528076,
-0.005216732155531645,
-0.8366907835006714,
-0.5892974138259888,
0.08952982723712921,
-0.3316974937915802,
0.26848131418228... | |
So I'm trying to update an object in my MS SQL 2005 database using NHibernate. Please keep in mind that this is a legacy database used in many live systems and I can't remove the triggers.
When my data provider tries to .SaveOrUpdate() a row I get two returns (one for the actual update, and one when the trigger execut... | [
-0.025360506027936935,
-0.09969942271709442,
0.12273860722780228,
-0.11189958453178406,
-0.32208091020584106,
0.10976094752550125,
0.30427294969558716,
-0.1859390288591385,
-0.293131560087204,
-0.382961243391037,
0.17761221528053284,
0.6196130514144897,
-0.49175867438316345,
0.070802442729... | |
the SET NOCOUNT before/after the trigger's code ?
SET NOCOUNT ON
-- your trigger
SET NOCOUNT OFF | [
0.12287026643753052,
0.07686366885900497,
0.5879322290420532,
0.19021159410476685,
0.03240889683365822,
0.18034377694129944,
-0.039997320622205734,
-0.4615100920200348,
-0.13965874910354614,
0.13040901720523834,
-0.07046853005886078,
0.8379275798797607,
-0.5000484585762024,
-0.234424531459... | |
```
MyDataSource.SelectParameters["startDate"].DefaultValue =
fromDate.SelectedDate.Date.ToString();
```
As you can see I am setting the default value of a parameter in my .Net SqlDataSource. I don't think the string is outputting the correct format though. What is the correct for... | [
-0.040091242641210556,
-0.17724047601222992,
0.6933157444000244,
-0.04188450053334236,
-0.024373266845941544,
-0.29734206199645996,
0.2602652609348297,
-0.05502328276634216,
-0.08606009185314178,
-0.5243659019470215,
0.14000794291496277,
0.6204797029495239,
-0.1434282660484314,
0.080849342... | |
have been written SqlDataSource
And here is some code
```
<asp:SqlDataSource ID="MyDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:sampledb %>" SelectCommand="Recording_Select" SelectCommandType="StoredProcedure" OnSelecting="MyDataSource_Selecting">
<SelectParameters>
<asp:ControlParam... | [
0.2592785954475403,
-0.19007211923599243,
0.5751213431358337,
-0.10272776335477829,
0.20793043076992035,
0.05616933852434158,
-0.008300081826746464,
-0.5779333710670471,
-0.1409488171339035,
-0.47554272413253784,
0.012169945985078812,
0.4032268822193146,
-0.00024548565852455795,
0.06604225... | |
</SelectParameters>
</asp:SqlDataSource>
```
**Edit:**
Well, I figured out the problem and it will seem a bit silly. The code was never calling the DefaultValue because there was always a value present. So my only solution was to make a new hidden label control and load the corrected datetime into that. That pretty m... | [
0.08552653342485428,
-0.19360820949077606,
0.534961462020874,
0.06909607350826263,
0.08923571556806564,
-0.051003847271203995,
0.07706541568040848,
0.08387884497642517,
-0.20199164748191833,
-0.5624643564224243,
0.27416089177131653,
0.5631992220878601,
-0.20546017587184906,
0.2442417591810... | |
code you posted, your best option is probably just to pre-populate your control. Additionally, that looks fine for the default value in that context, so I suspect the problem is somewhere else. Try setting the `CancelSelectOnNullParameter` property of the control to False. | [
0.32767096161842346,
-0.3607829213142395,
0.24452093243598938,
0.3273965120315552,
0.2231559306383133,
-0.26442447304725647,
0.4414282739162445,
0.3530740439891815,
-0.09700148552656174,
-0.42141973972320557,
0.020196039229631424,
0.6390138864517212,
-0.31668633222579956,
0.091322794556617... | |
Let's say I want to read a line from a socket, using the standard `socket` module:
```
def read_line(s):
ret = ''
while True:
c = s.recv(1)
if c == '\n' or c == '':
break
else:
ret += c
return ret
```
What exactly happens in `s.recv(1)`? Will it issue a | [
0.31438156962394714,
-0.2233029007911682,
0.7511804103851318,
-0.20293258130550385,
0.07174654304981232,
-0.10444465279579163,
0.25137895345687866,
-0.0928901955485344,
0.034809913486242294,
-0.26861247420310974,
-0.45644843578338623,
0.7521339058876038,
-0.30489039421081543,
0.14148844778... | |
system call each time? I guess I should add some buffering, anyway:
> For best match with hardware and network realities, the value of *bufsize* should be a relatively small power of 2, for example, 4096.
<http://docs.python.org/library/socket.html#socket.socket.recv>
But it doesn't seem easy to write efficient and ... | [
0.09740369766950607,
-0.2761220633983612,
0.6935031414031982,
-0.11765983700752258,
0.03198004886507988,
-0.12050987035036087,
0.043471138924360275,
-0.18353471159934998,
-0.30799877643585205,
-0.6246464848518372,
-0.10195834934711456,
0.7226337790489197,
-0.4482843577861786,
0.13930429518... | |
presumes it's the only one reading the file. (For example by buffering upcoming input.)
If you are using the file object, every time `read()` is called with a positive argument, the underlying code will `recv()` only the amount of data requested, unless it's already buffered.
It would be buffered if:
* you had calle... | [
0.056037962436676025,
-0.14349651336669922,
0.4559440612792969,
-0.03458242863416672,
0.11946845799684525,
-0.2570537328720093,
0.12155211716890335,
-0.1391805112361908,
-0.016647521406412125,
-0.49753114581108093,
-0.44764044880867004,
0.5891485214233398,
-0.1542200893163681,
0.0697057694... | |
can `select()` or set the socket to nonblocking mode with `s.setblocking(False)`. Then, reads will return empty, rather than blocking, if there is no waiting data.
Are you reading one file or socket with multiple threads? I would put a single worker on reading the socket and feeding received items into a queue for han... | [
0.17761941254138947,
-0.1647658497095108,
0.30088192224502563,
-0.10799479484558105,
-0.017378728836774826,
-0.06401646882295609,
0.13099801540374756,
-0.21420498192310333,
-0.14962032437324524,
-0.7752665281295776,
-0.2743229568004608,
0.6354740858078003,
-0.38959527015686035,
0.032555568... | |
I'm looking for a way to have an interactive JIT debugger, preferably integrated with Firebug.
I got the idea from PHPEd, which has an "Immediate" debug tab where you can just type in PHP code and modify objects on the fly. This makes debugging a breeze as you can re-assign variables multiple times, re-execute functio... | [
0.30540481209754944,
-0.02237822487950325,
-0.0622217170894146,
0.15177147090435028,
-0.060498833656311035,
-0.1688939481973648,
0.1387852430343628,
0.061025138944387436,
-0.21419323980808258,
-0.46992647647857666,
0.2620864808559418,
0.3733871877193451,
-0.22922343015670776,
0.17033840715... | |
do this in Firebug. Just get to a break point, then go to the "console" tab, and type your commands into the command line at the bottom (where there's the ">>>"). | [
0.09098576009273529,
0.17972972989082336,
0.30188795924186707,
-0.11567340046167374,
0.3439033031463623,
-0.46035948395729065,
0.24380050599575043,
-0.010141797363758087,
0.01398027129471302,
-0.4288334846496582,
-0.45902013778686523,
0.726416289806366,
-0.004477309063076973,
-0.2347283661... | |
I'm trying to turn off marginpar when starting a new multicols environment with this:
```latex
\renewenvironment{multicols}[1]{%
\let\oldmarginparwidth\marginparwidth
\setlength{\marginparwidth}{0}%
\begin{multicols}{#1}
}{%
\end{multicols}%
\setlength{\marginparwidth}{\oldmarginparwidth}%
}
```
However, ... | [
0.05791092664003372,
0.08450209349393845,
0.8281863927841187,
-0.37415868043899536,
-0.07503155618906021,
0.022987933829426765,
0.2688436806201935,
-0.1743748039007187,
-0.32816848158836365,
-0.48730218410491943,
0.13847176730632782,
0.6332865953445435,
-0.45167043805122375,
0.164230421185... | |
space:
```
\begin{adjustwidth}{}{-\overhang}
% This will be displayed full-width
\end{adjustwidth}{}{-\overhang}
```
As Damien pointed out, you can still use marginpars like this, they'll just exceed the pagewidth. \multicols will prevent you from using floats, however.
Hope that's what you need! | [
0.08209800720214844,
0.15332238376140594,
0.715336263179779,
0.11783017963171005,
-0.0020005798432976007,
0.007522094529122114,
0.16915321350097656,
-0.14628109335899353,
0.024380290880799294,
-0.6848828792572021,
-0.09831512719392776,
0.3699471950531006,
0.0001618815294932574,
-0.09855680... | |
I have a text file that I want to edit using Java. It has many thousands of lines. I basically want to iterate through the lines and change/edit/delete some text. This will need to happen quite often.
From the solutions I saw on other sites, the general approach seems to be:
* Open the existing file using a BufferedR... | [
0.3482636511325836,
0.14272856712341309,
0.18190312385559082,
-0.21647582948207855,
-0.09212266653776169,
0.2528056800365448,
0.3471647799015045,
-0.0036815355997532606,
-0.08829262852668762,
-0.7899312376976013,
0.06475848704576492,
0.3080531358718872,
-0.2899014949798584,
0.1296859681606... | |
slightly "hacky" to me, especially if I have thousands of lines in my text file.
Anybody know of a better solution?
I haven't done this in Java recently, but writing an entire file into memory seems like a bad idea.
The best idea that I can come up with is open a temporary file in writing mode at the same time, and f... | [
0.15832127630710602,
0.06192184239625931,
0.028663234785199165,
0.08851034939289093,
-0.03286188095808029,
0.2907108664512634,
0.43148788809776306,
0.3611491322517395,
-0.3026471436023712,
-0.6560437083244324,
0.18483643233776093,
0.09923664480447769,
-0.030704304575920105,
0.0929207056760... | |
I have a string read from another source such as "\b\bfoo\bx". In this case, it would translate to the word "fox" as the first 2 \b's are ignored, and the last 'o' is erased, and then replaced with 'x'. Also another case would be "patt\b\b\b\b\b\b\b\b\b\bfoo" should be translated to "foo"
I have come up with something... | [
0.41738492250442505,
0.3118172287940979,
0.010717462748289108,
-0.30693942308425903,
0.11100191622972488,
0.0454636886715889,
0.31379833817481995,
0.12947645783424377,
0.003946464043110609,
-0.5954713225364685,
0.0457388274371624,
0.5061802864074707,
-0.5269266963005066,
-0.003142462112009... | |
the following code does the trick in 1-pass
```
public string ReplaceBackspace(string hasBackspace)
{
if( string.IsNullOrEmpty(hasBackspace) )
return hasBackspace;
StringBuilder result = new StringBuilder(hasBackspace.Length);
foreach (char c in hasBackspace)
{
if (c == '\b')
{... | [
0.1234346404671669,
-0.08487734198570251,
0.6059858798980713,
-0.45294249057769775,
0.19289396703243256,
-0.024014154449105263,
0.34443721175193787,
-0.4673340320587158,
-0.10945316404104233,
-0.29335296154022217,
-0.2963801920413971,
0.6656603813171387,
-0.27054306864738464,
0.06162783503... | |
}
else
{
result.Append(c);
}
}
return result.ToString();
}
``` | [
-0.05293910950422287,
0.02927999570965767,
0.338064581155777,
-0.38779112696647644,
0.3162875771522522,
-0.17580123245716095,
0.018496807664632797,
-0.3753013014793396,
-0.08490947633981705,
-0.1892060786485672,
-0.44724178314208984,
0.9020602107048035,
-0.3270329535007477,
0.1533307880163... | |
I have two application that need to talk to each other. App1 needs to be able to serialize an object that App2 can then deserialize. Easily done, right? Here's the problem; App1 is C# based, App2 is Java based. So App1 needs to write out the file in the Java binary file format. How can this be done?
The way I see it, ... | [
0.010507295839488506,
0.1951528638601303,
0.0317479632794857,
0.0507851243019104,
-0.15401262044906616,
0.142949640750885,
0.07572810351848602,
-0.057125817984342575,
-0.4081608057022095,
-0.7904573678970337,
0.04956166446208954,
0.5170091986656189,
-0.8150750994682312,
-0.0196594130247831... | |
reads in a file and populates the object accordingly and serializes the newly populated object. That way the C# app would only have to write out some sort of formatted text file that the converter then interprets.
I can't make any changes to the Java application.
How should this be done?
Update:
The Java applicatio... | [
0.3240090012550354,
0.20615659654140472,
0.48841920495033264,
0.0018296207999810576,
0.02160598523914814,
-0.019033942371606827,
0.33262088894844055,
-0.18681439757347107,
-0.22117620706558228,
-0.6173551082611084,
-0.2822844982147217,
0.5615609884262085,
-0.546885073184967,
0.175724074244... | |
its own data.
The best answer is option 3:
use a language-neutral serialization scheme.
I use JavaScript. Thrift is another option, protocol buffers I believe are more focused on RPC, but should be usable for serialization as well. XML or a custom binary format would be other options.
Edit:
Sorry, didn't notice that ... | [
0.23199105262756348,
0.04529360681772232,
0.270973265171051,
0.29671114683151245,
-0.11408628523349762,
-0.10821431130170822,
0.03792938217520714,
-0.08115515857934952,
-0.2207079976797104,
-0.3932560086250305,
0.043432656675577164,
0.33886879682540894,
-0.16320303082466125,
0.083387404680... | |
In my project I need to write small WYSIWYG editor (just let users make text bold/italic/underline and maybe some more). So I wouldn't like to use monsters like tinymce or fckeditor. My question is what HTML elements and javascript functions do I need to know for it? An HTML element in which I can edit and format text ... | [
0.48793742060661316,
0.10934117436408997,
0.28721126914024353,
-0.05699540302157402,
-0.3330586552619934,
-0.0028833483811467886,
-0.03454040363430977,
-0.09685848653316498,
-0.01632441021502018,
-0.6600764393806458,
0.26836779713630676,
0.5797402262687683,
-0.15359510481357574,
-0.2823095... | |
I'm using a large (thousands of source files) public project with minor (a dozen source files) local modifications and additions. The local modifications aren't relevant to other users of the big project. The project uses svn, as do we for our own projects. I want to be able to get the updates from the project when it ... | [
0.6168402433395386,
0.29917824268341064,
0.27017372846603394,
-0.008408614434301853,
0.2014605849981308,
-0.11165384948253632,
0.0020198554266244173,
-0.028359124436974525,
-0.26119765639305115,
-0.7593404650688171,
-0.08948018401861191,
0.4193538725376129,
-0.07382495701313019,
0.18308165... | |
corresponding directories in the big project, with some manual reconciliation of the modifications. It's workable; it's rarely changed, not a big deal, and this way works. But if things on our end or theirs were changing more frequently, it wouldn't be practical. Is there a better way?
You really want to use a single r... | [
0.29357853531837463,
-0.359912246465683,
0.3196597993373871,
0.4233667552471161,
0.16443106532096863,
-0.11556079238653183,
0.025905165821313858,
0.2552960515022278,
-0.5405682921409607,
-0.5935051441192627,
-0.16438071429729462,
0.3715536594390869,
-0.22892074286937714,
0.1657857149839401... | |
trees)
If you cannot add your project to the main repo, and have to maintain your own, then [svk](http://svk.bestpractical.com/view/HomePage) is something to look into. | [
0.11289965361356735,
-0.21470747888088226,
0.3845456838607788,
0.2976136803627014,
-0.04369008541107178,
0.05814899876713753,
0.36454761028289795,
0.013383976183831692,
-0.6279045939445496,
-0.15814001858234406,
-0.40811508893966675,
0.030196886509656906,
0.1046980693936348,
-0.34137573838... | |
Based on a previous stack overflow question and contribution by cgoldberg, I came up with this regex using the python re module:
```
import re
urls = re.finditer('http://(.*?).mp3', htmlcode)
```
The variable urls is an iterable object and I can use a loop to access each mp3 file url individually if there is more th... | [
-0.010370951145887375,
0.19193480908870697,
0.2927301824092865,
-0.15793833136558533,
-0.26790279150009155,
0.04928544536232948,
0.47112149000167847,
-0.7361058592796326,
-0.19089573621749878,
-0.4014391303062439,
-0.19375158846378326,
0.7839093804359436,
-0.5232067704200745,
-0.1505723297... | |
I am relatively new to regular expressions. So, I am just wondering if there is a more reliable way to go about it.
Thanks in advance.
New to stackoverflow and looking forward to contributing some answers as well.
As always I suggest using a html parser like [lxml.html](http://codespeak.net/lxml/lxmlhtml.html) instead... | [
0.21017728745937347,
0.11786337941884995,
0.5546441674232483,
-0.04130192846059799,
0.00182145566213876,
-0.06034209206700325,
0.139373779296875,
-0.07789594680070877,
-0.20422020554542542,
-0.6816971302032471,
-0.11990003287792206,
0.5491109490394592,
-0.307047039270401,
-0.29687747359275... | |
In VB.NET how do you open a word/PDF doc? I used to have the code and I remember it was very short.
Assuming there is an app registered to handle .PDF or .DOC files, you could use the following:
```
System.Diagnostics.Process.Start("C:\path\filename.pdf")
System.Diagnostics.Process.Start("C:\path\filename.doc")
``` | [
0.6504274606704712,
-0.006627282127737999,
0.5727899670600891,
0.012796001508831978,
-0.18208740651607513,
-0.33286407589912415,
0.14007994532585144,
0.06229616701602936,
-0.20564477145671844,
-0.8099198341369629,
-0.25136715173721313,
0.7411681413650513,
-0.16271884739398956,
0.0840648412... | |
I have a WCF service that has a [DataContract] class defined in it. Each of the properties has the [DataMember] attribute and I have added a couple of Data Annotation attributes [Required] and [StringLength] to a couple of the properties.
I then consume this service in an asp.net MVC application as a service reference... | [
0.4320378303527832,
-0.0007526781992055476,
0.5577909350395203,
0.01899929717183113,
-0.1326574981212616,
-0.04993930086493492,
0.11724043637514114,
-0.5071364641189575,
-0.03409761190414429,
-0.6368624567985535,
0.007776747457683086,
0.8971326947212219,
-0.02812805213034153,
0.24509187042... | |
select attribute;
```
I see none of the data annotations have come through. Is this a limitation of WCF or am I doing something fundamentally wrong here?
The attributes will not be serialized when your data contract in sent over the wire. The new attribute that you have created in esentially meta data that is associa... | [
0.2858127951622009,
-0.07001128792762756,
0.42780351638793945,
0.27308928966522217,
-0.06393229961395264,
-0.10921137034893036,
0.15079526603221893,
-0.2423856407403946,
0.02477295510470867,
-0.8204382658004761,
-0.014638030901551247,
0.8767416477203369,
-0.2455664873123169,
0.307736217975... | |
reference in your asp.net mvc application, this will, unless specified, create new proxy classes that represent your data contract.
When you add the service reference, if you click on the advanced button make sure that the 'Use existing types' is checked. This ensure that your service will use your existing conract. ... | [
0.38537362217903137,
0.001431361655704677,
0.8199185132980347,
0.12474746257066727,
0.054500747472047806,
-0.08208806812763214,
0.11164481937885284,
-0.12230020016431808,
-0.244229257106781,
-0.6727198958396912,
-0.029979383572936058,
0.4674798250198364,
-0.35426241159439087,
0.37370833754... | |
in your asp.net mvc application. | [
0.22248561680316925,
-0.34585487842559814,
0.3926681578159332,
0.027837401255965233,
0.12170016020536423,
-0.2797718942165375,
0.043833427131175995,
0.10632171481847763,
-0.5111557245254517,
-0.609045147895813,
-0.5002135634422302,
0.48634031414985657,
-0.2323961853981018,
-0.1063698232173... | |
I've always been curious: how can I perform arithmetic operations on very long decimals--for example, calculating pi to the 3000th decimal place (especially in an imperative language)?
Use a language or library that supports arbitrary precision numbers...?
In Python, ints will auto-promote to longs which are arbitrary... | [
0.045100532472133636,
0.10927636176347733,
-0.06409846246242523,
0.1311463564634323,
-0.20715577900409698,
0.05959714204072952,
-0.05224508419632912,
0.08946055173873901,
-0.423371285200119,
-0.2736327350139618,
0.1126137226819992,
0.3853576183319092,
-0.012550296261906624,
-0.039742965251... | |
I have situation where a Message table has a primary key (Id) and a foreign key (Site). Any site can create a message record, but only the site that created the record can update it. The problem is that by default it will be updated based upon Id and not Id and Site. I could change the primary key to be a composite/com... | [
0.25580111145973206,
0.1874886453151703,
0.169827401638031,
-0.2540018558502197,
0.14338241517543793,
-0.10906065255403519,
0.20969314873218536,
-0.10004425048828125,
-0.312259703874588,
-0.5202180743217468,
-0.04883252829313278,
0.37045183777809143,
-0.5475885272026062,
0.4590161442756653... | |
using(ISession session = SessionFactory.OpenSession())
using(ITransaction trans = session.BeginTransaction())
{
session.Update(oneMessage);
trans.Commit();
}
}
```
So how do I do this in NHibernate without creating a compound id or using Native SQL:
```
Update MessageTable set MessageSta... | [
-0.0022487619426101446,
0.02235998772084713,
0.33459943532943726,
-0.1743772029876709,
-0.08267328143119812,
0.06452059745788574,
0.23372244834899902,
-0.4153668284416199,
-0.18562917411327362,
-0.322710782289505,
0.067344531416893,
0.5904107689857483,
-0.3111185133457184,
-0.0252736769616... | |
shift over by to get a sort of arbitrary precision floating point.
In Java you could use the [BigDecimal](http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html) class, which represents "Immutable, arbitrary-precision signed decimal numbers".
I'm sure other examples exist in other languages. | [
0.25589632987976074,
-0.09887421876192093,
0.2580336630344391,
0.1394735872745514,
-0.18428495526313782,
0.03779507800936699,
-0.4666782319545746,
0.09361482411623001,
-0.48714447021484375,
-0.21290212869644165,
0.12976646423339844,
0.17567597329616547,
-0.26565995812416077,
0.288976401090... | |
The JDK documentation for [`java.lang.String.hashCode()`](http://java.sun.com/javase/6/docs/api/java/lang/String.html#hashCode()) [famously](https://stackoverflow.com/questions/299304) says:
> The hash code for a String object is computed as
>
>
>
> ```
> s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]
>
> ```
>
> u... | [
-0.21952207386493683,
0.28088614344596863,
0.23282131552696228,
-0.4212638735771179,
-0.15019716322422028,
-0.18773333728313446,
0.2703506350517273,
-0.4911186397075653,
-0.2700701057910919,
-0.46810299158096313,
-0.42044734954833984,
0.5282413363456726,
-0.3150783181190491,
-0.04781869426... | |
the code above?
I'm not sure if you missed where it says "^ indicates exponentiation" (not xor) in that documentation.
Each time through the loop, the previous value of hash is multipled by 31 *again* before being added to the next element of `value`.
One could prove these things are equal by induction, but I think a... | [
0.16673144698143005,
0.15465402603149414,
0.2478806972503662,
-0.2917965054512024,
-0.0701700821518898,
0.01301193330436945,
0.39007893204689026,
-0.427270770072937,
-0.3565138578414917,
-0.1623995006084442,
-0.08493411540985107,
0.5244500637054443,
-0.45031511783599854,
0.1693929731845855... | |
substituting each value of hash into the following statement:
```
hash = 31 * (31 * (31 * (31 * 0 + value[0]) + value[1]) + value[2])
+ value[3];
```
31 \* 0 is 0, so simplify:
```
hash = 31 * (31 * (31 * value[0] + value[1]) + value[2])
+ value[3];
```
Now multiply the two inner terms by that second 31... | [
-0.46419233083724976,
0.4041478633880615,
0.29267895221710205,
-0.5411787629127502,
-0.21050278842449188,
0.26938915252685547,
0.6300877928733826,
-0.7545987367630005,
0.07602201402187347,
-0.29936447739601135,
-0.1912415623664856,
0.7648237943649292,
-0.48219478130340576,
-0.2306136637926... | |
value[0] + 31 * 31 * value[1] + 31 * value[2]
+ value[3];
```
and convert to exponents (not really Java anymore):
```
hash = 31^3 * value[0] + 31^2 * value[1] + 31^1 * value[2] + value[3];
``` | [
-0.31410685181617737,
0.12191465497016907,
0.19224871695041656,
-0.4838714003562927,
-0.2826513946056366,
0.0969286859035492,
0.40586650371551514,
-0.24726098775863647,
-0.03112899139523506,
-0.1604517102241516,
-0.2536795437335968,
0.5700029730796814,
-0.43437865376472473,
-0.153327092528... | |
I'm trying to attach my database on a server that is running SQL2005 and I encountered an error that says that my DB is version 655 which is not suppoerted on a 612 system. Is there a way to alter my DB to get to a attach or to find out what is causing the structural change that is preventing me from attaching my DB?
... | [
0.5175440311431885,
0.31463342905044556,
0.24011018872261047,
0.013477819971740246,
-0.056685447692871094,
-0.020531555637717247,
0.41173219680786133,
-0.02907872386276722,
-0.07616906613111496,
-0.7890023589134216,
0.20177678763866425,
0.5005260109901428,
-0.34681594371795654,
0.393077462... | |
list which tables have problems and what those problems are. After you have altered your DB you can then use the script on the target machine. Don’t forget to select to add your indexes and data to the script.
I don’t know why no one has written this anywhere but for those out there suffering I’d recommend this as you... | [
0.6330141425132751,
0.05450217053294182,
0.17557154595851898,
0.21066778898239136,
-0.19024813175201416,
0.057245876640081406,
0.17806880176067352,
-0.02389100193977356,
-0.14458827674388885,
-0.8891361355781555,
0.30117323994636536,
0.6775479316711426,
-0.15740306675434113,
0.006254370789... | |
error list which tables have problems and what those problems are. After you have altered your DB you can then use the script on the target machine. Don’t forget to select to add your indexes and data to the script.
I don’t know why no one has written this anywhere but for those out there suffering I’d recommend this ... | [
0.5185365676879883,
0.07997069507837296,
0.01837201975286007,
0.15962590277194977,
-0.22187988460063934,
0.11721549928188324,
0.1753108650445938,
0.07672252506017685,
-0.140316441655159,
-0.8155671954154968,
0.330605149269104,
0.5938457250595093,
-0.24101686477661133,
-0.0997113436460495,
... | |
I've been investigating this issue that only seems to get worse the more I dig deeper.
I started innocently enough trying to use this expression to split a string on HTML 'br' tags:
```
T = captions.innerHTML.split(/<br.*?>/g);
```
This works in every browser (FF, Safari, Chrome), except IE7 and IE8 with example in... | [
0.4863150715827942,
0.17536315321922302,
0.11376791447401047,
-0.19951796531677246,
-0.4601023197174072,
-0.10074213892221451,
0.45089077949523926,
-0.08126498758792877,
-0.25199800729751587,
-0.6473219394683838,
-0.1592748612165451,
0.6196900606155396,
-0.4180067181587219,
-0.094600051641... | |
this *does not* work in FF and Chrome:
```
T = captions.innerHTML.split(/<br.+?>/g);
```
Edit:
This (suggested several times in the responses below,) does not work on IE 7 or 8:
```
T = captions.innerHTML.split(/<br[^>]*>/g);
```
(It did work on Chrome and FF.)
My question is: does anyone know an expression tha... | [
0.2511774003505707,
0.25580719113349915,
0.3677375614643097,
-0.27521276473999023,
-0.303693562746048,
0.05794548988342285,
0.28476837277412415,
-0.0860191360116005,
-0.11547207087278366,
-0.7329803109169006,
-0.051015518605709076,
0.669369101524353,
-0.17648296058177948,
-0.25723072886466... | |
on IE, and not regex in general. You have to use split() to see this issue. I have also found a test matrix that shows a failure rate of about 30% for split() test cases when I ran it on IE. The same tests passed 100% on FF and Chrome:
<http://stevenlevithan.com/demo/split.cfm>
So far, I have still not found a soluti... | [
0.5695735216140747,
-0.03049444779753685,
0.1737859547138214,
-0.022993069142103195,
-0.14067137241363525,
-0.19818513095378876,
0.6972697973251343,
-0.1223435178399086,
-0.0486004576086998,
-0.8052901029586792,
-0.1043226346373558,
0.7312111258506775,
-0.2907045781612396,
-0.1683716028928... | |
example, if you have HTML like this:
```
<div id='box'>
Hello<br>
World
</div>
```
And then you use this Javascript (in IE):
```
alert(document.getElementById('box').innerHTML);
```
You will get an alert box with this:
```
Hello<BR>World
```
Notice the `<BR>` is now uppercase. To fix this, just add the `i` fla... | [
0.13364876806735992,
-0.008996818214654922,
0.3427415192127228,
-0.2624467611312866,
-0.15380358695983887,
-0.22928977012634277,
0.14465363323688507,
0.0753486156463623,
-0.10297218710184097,
-0.809764564037323,
-0.499706506729126,
0.7115651965141296,
-0.39565160870552063,
-0.1443794071674... | |
Is there some open-sourced, well-documented and used DRM framework/library?
I want to write some framework for buying and selling digital stuff, where I want to implement, somehow, for the seller to have the possibility to lock the files with some sort of DRM, where only authorised computers would be able to open it (... | [
0.6105595827102661,
0.2273865044116974,
0.3634945750236511,
0.34283435344696045,
0.2055658996105194,
-0.4653637707233429,
0.09693009406328201,
0.21230638027191162,
-0.3449402153491974,
-0.11263088881969452,
-0.09409534931182861,
0.5068964958190918,
-0.057286586612463,
0.0477769710123539,
... | |
exactly "security"...
All I was able to find is [this discussion on slashdot with the exact same problem](http://it.slashdot.org/article.pl?sid=08/01/22/0230217), but it ended with "DRM IS BAD", and Sun's DReaM project, but I have no clue how to get to the [actual code/usage of the framework on their site](http://www.... | [
0.5788186192512512,
0.4836708903312683,
0.3396582305431366,
-0.009698007255792618,
0.09322164207696915,
-0.38804420828819275,
0.21650971472263336,
0.02962311916053295,
-0.11306674033403397,
-0.2592731714248657,
-0.15003417432308197,
0.48264142870903015,
-0.3750896751880646,
0.3038913011550... | |
experience of this implementation, but a little of OMA DRM, and it seemed at the time to be a workable DRM scheme, as much as any DRM scheme is workable. The OMA DRM standard is well-documented, and is (or at least has been) widely-used by the mobile phone industry.
The fundamental problem with open-source DRM is that... | [
0.43195924162864685,
0.4609268605709076,
0.37571898102760315,
0.004085687454789877,
0.16296128928661346,
-0.6414968371391296,
0.18313023447990417,
-0.19093623757362366,
-0.11622761189937592,
-0.21920210123062134,
-0.39312273263931274,
0.8765231966972351,
-0.3897763192653656,
-0.06625993549... | |
of a device should have full control over what it does.
*Security through obscurity does not work, but DRM is not exactly "security"*
Security through obscurity *of algorithms* is usually weak. Security through secrecy *of information* is the only way to do crypto, signing, etc. DRM does not require obscurity of algo... | [
-0.10598186403512955,
0.3317073881626129,
0.4460207223892212,
0.29021120071411133,
0.5435658693313599,
-0.7388883233070374,
0.2972221374511719,
-0.21129795908927917,
-0.25101467967033386,
-0.12811978161334991,
-0.42308035492897034,
0.5491943955421448,
-0.12144073098897934,
0.08565236628055... | |
not part of the algorithm/source.
Normally, security protects the owner/user of a device from a threat model of external attackers. In the DRM threat model, the owner/user of the device *is* the attacker, and the rights owner is being defended. If the device's user has full control over it, then clearly in principle t... | [
0.17966307699680328,
0.10481222718954086,
0.19168899953365326,
0.18922553956508636,
0.24792128801345825,
-0.5053242444992065,
0.2381742149591446,
-0.04033556953072548,
-0.0830371081829071,
-0.3724750280380249,
-0.40803876519203186,
0.7851722836494446,
-0.056331925094127655,
0.0551786944270... | |
be law-abiding, in which case DRM takes on the role of reminding them that if they're jumping through hoops to work around the restrictions, then they may be breaking the law. | [
1.0187610387802124,
0.17804528772830963,
0.3412109911441803,
-0.1271473914384842,
0.13171184062957764,
-0.5083709955215454,
0.8726638555526733,
-0.11420581489801407,
-0.14701157808303833,
-0.1982559859752655,
-0.48385193943977356,
0.6749570369720459,
-0.45485544204711914,
-0.39235812425613... | |
```
interface I { int J(); }
class A : I
{
public int J(){return 0; } // note NOT virtual (and I can't change this)
}
class B : A, I
{
new public int J(){return 1; }
}
B b = new B();
A a = b;
I ib = b, ia = a;
b.J(); // should give 1
a.J(); // should give 0 (IMHO)
ia.J(); // ???
ib.J(); // ???
```
I know... | [
-0.11536186933517456,
0.13997222483158112,
0.3342081904411316,
-0.06762479990720749,
-0.07378250360488892,
0.06857264786958694,
0.507497251033783,
-0.23463216423988342,
-0.05506603419780731,
-0.7903088927268982,
-0.1565880924463272,
0.5920807719230652,
-0.5680685043334961,
0.12999363243579... | |
to Google for).
It does not matter that you are talking to the contract provided by a base class or interface they will all return 1 because you are talking to an instance of class B. | [
0.4335671067237854,
0.07083433866500854,
0.39487016201019287,
0.31843841075897217,
-0.04122432693839073,
0.08909004926681519,
0.32505953311920166,
0.32603931427001953,
0.11966418474912643,
-0.6395007371902466,
-0.2687341868877411,
0.45629292726516724,
-0.5697987079620361,
0.048049226403236... | |
There is a table:
```
create table table1 (
id integer primary key,
user_id varchar(36),
field1 varchar(100))
```
How do I select the rows linked to the user, to which the row with a specific id belongs. I'd like to be able to look at the rows, choose a message by id and select all the ro... | [
-0.3812735974788666,
0.43353021144866943,
0.47777432203292847,
-0.06347382068634033,
-0.01394568756222725,
0.35062727332115173,
-0.3656773269176483,
-0.0895867869257927,
-0.27013564109802246,
-0.6421772241592407,
-0.048433296382427216,
0.07209260761737823,
-0.3897145390510559,
-0.035722218... | |
-- the same as of the row with id = 3 for example
```
This is very easy with [subqueries](http://dev.mysql.com/doc/refman/5.1/en/subqueries.html), in particular [Comparisons Using Subqueries](http://dev.mysql.com/doc/refman/5.1/en/comparisons-using-subqueries.html) in the documentation:
```
SELECT * FROM table1 WHERE... | [
-0.21983548998832703,
0.357880562543869,
0.44315218925476074,
0.12058159708976746,
-0.2369913011789322,
0.14708951115608215,
-0.196761816740036,
-0.3719047009944916,
-0.2258368581533432,
-0.8194352984428406,
-0.26579737663269043,
0.45900750160217285,
-0.1341136246919632,
-0.055950928479433... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.