text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I have IQueryable list of objects of type T which I want to transform into objects of type K ``` List<K> tranformedList = originalList.Select(x => transform(x)).ToList(); ``` the transform function returns null if it cannot tranform the objects.If I want to filter out null elements can I call ``` List<K> tranformed...
[ -0.10081873834133148, -0.4990215301513672, 0.26455453038215637, -0.1325729489326477, -0.12875473499298096, 0.25993338227272034, 0.2670660614967346, -0.5916061401367188, 0.18804343044757843, -0.5115246176719666, -0.113300621509552, 0.7303472757339478, -0.6135212182998657, 0.1989139020442962...
.ToList(); ``` or is there any other way of filtering out null elements when calling Select in LINQ ? Can't you just do something like this: ``` List<K> tranformedList = originalList.Select(x => tranform(x)) .Where(y => y != null) //Check for nulls
[ 0.21904641389846802, -0.3713967502117157, 0.41994231939315796, -0.18163800239562988, 0.21310611069202423, -0.23517701029777527, 0.21627239882946014, -0.4597929120063782, -0.39880838990211487, -0.33864840865135193, -0.09798452258110046, 0.4407566785812378, -0.5644957423210144, 0.03082224167...
.ToList(); ```
[ 0.159645676612854, 0.15641666948795319, 0.20326730608940125, -0.14415501058101654, 0.14433129131793976, -0.1336326003074646, 0.0019654431380331516, -0.002858762163668871, -0.20673009753227234, -0.5683095455169678, -0.49856171011924744, 0.6354594826698303, -0.5463599562644958, 0.30712732672...
I am a .NET dev learning Java. As a result, I understand all the fundamentals of programming like loops, variables, functions, etc. My biggest bottleneck is that I don't know my way around Java's packages like I do with .NET's. This is the reason for this thread - where do I find the following functionality in Java?: ...
[ 0.3004472851753235, 0.028397822752594948, -0.1703360229730606, 0.24906867742538452, -0.499604731798172, -0.41674572229385376, 0.6690843105316162, -0.024184968322515488, -0.3859878182411194, -0.705414354801178, 0.0131966732442379, 0.3634451925754547, -0.09991850703954697, -0.046400107443332...
possible open-source Java Monitoring library that might fit your requirements. In addition, any performance/management counters are exposed through [Java Management Extensions (JMX)](http://en.wikipedia.org/wiki/Java_Management_Extensions) Then you have a number of monitoring consoles: * `jconsole` comes with bundle...
[ 0.6294599175453186, -0.10809619724750519, 0.3507423400878906, 0.5273777842521667, 0.12881167232990265, -0.11040261387825012, 0.06674226373434067, -0.1736709326505661, -0.33627644181251526, -0.5513439774513245, 0.10557636618614197, 0.4070882797241211, -0.19598834216594696, -0.35429492592811...
I'm using a mac and looking to batch convert a large amount of eps files and create jpg previews of each. I'm looking for preferably a command-line utility, or some type of workflow to easily batch a large number of files. Thanks for any ideas or input Like codelogic mentioned, `sips` is a good tool for this. However...
[ 0.1319548338651657, -0.08678533136844635, 0.2943649888038635, 0.02090720273554325, -0.3212573230266571, -0.03503691032528877, -0.026898909360170364, -0.1428845226764679, -0.40137380361557007, -0.842067539691925, -0.14054037630558014, 0.5075391530990601, -0.40794700384140015, -0.26085180044...
in the current directory, this will first convert them all to pdf, storing them in the pdf/ directory, then convert each PDF to a JPEG file in the jpg/ directory.
[ -0.02879347838461399, 0.004506180062890053, 0.7178840637207031, 0.3745853304862976, -0.1357881873846054, -0.10741831362247467, -0.39658838510513306, -0.24220849573612213, -0.08451272547245026, -0.6968093514442444, -0.74372398853302, 0.28147023916244507, -0.08202750235795975, 0.093015938997...
Out of the box, SubText is unable to run under IIS7's Integrated Pipeline Mode. Unfortunately, it goes beyond "migrating" the web.config to match the required format. For example, moving httpModules and httpHandlers to their new location within . As it turns out, Request is not available at Application\_Start when runn...
[ 0.12634526193141937, -0.238930806517601, 0.4242898225784302, 0.14941196143627167, -0.039403531700372696, -0.1843782216310501, 0.6427693963050842, -0.037978645414114, 0.003420683555305004, -0.8028950691223145, -0.3084789216518402, 0.4448176622390747, -0.4880117177963257, 0.25974422693252563...
classic mode. Unfortunately, our current GoDaddy account is limiting as only a single app pool is available to us. Since the main site is configured for Integrated Pipeline Mode, we don't have the freedom to change the IIS mode without impacting (read: breaking) the main site. Short of switching to a more flexible ...
[ 0.10374157130718231, -0.13710376620292664, 0.2896898090839386, 0.02096148394048214, 0.14517025649547577, -0.38813361525535583, 0.7949259281158447, 0.1270509511232376, -0.15909476578235626, -0.5537633299827576, -0.5201263427734375, 0.8269451856613159, -0.6083268523216248, 0.2415219247341156...
use the request context at Application\_Start. I haven't heard on anyone running SubText in Integrated Mode and it might be a nice problem to solve -- assuming there's an end to the necessary updates. Assuming there are about 8 more hours allocated to this effort, what's the best approach? Am I missing any other optio...
[ 0.26730313897132874, -0.2792402505874634, 0.451846718788147, 0.1543581336736679, -0.27352961897850037, -0.013774920254945755, 0.49486708641052246, -0.10620413720607758, 0.08333982527256012, -0.8067967295646667, 0.07046221941709518, 0.7946522831916809, -0.14375798404216766, 0.05176347121596...
our trunk. It's pretty solid and we're almost done. If you're upgrading an existing blog, it may be challenging. If you're installing a new one, this might be a good build to try. <http://build.subtextproject.com/builds/archive/SubText-2.5.0.228.zip>
[ 0.43958061933517456, -0.24569281935691833, 0.44204702973365784, 0.4610103368759155, 0.4122923016548157, -0.18666796386241913, 0.26671379804611206, 0.18303215503692627, -0.17944976687431335, -0.3850522041320801, -0.04112095385789871, 0.09573347121477127, 0.0752328485250473, -0.2005960643291...
My webservice provider give me a large WSDL file, but we are going to use only a few function inside. I believe that the large WSDL have negative impact to the application performance. We use the webservice in client appliction, **startup time** and **memory usage** are issues. Large WSDL means that jax-ws will takes...
[ 0.324830561876297, 0.2541559636592865, 0.34262776374816895, 0.0026963171549141407, -0.30319058895111084, -0.2712521553039551, 0.018557468429207802, -0.1657288670539856, -0.2635861933231354, -0.860285758972168, 0.11263491958379745, 0.4950067102909088, -0.12474673241376877, 0.030454291030764...
auto in the build script**. In short, your answers are "No tool, but you can DIY". I wish there are simple tool can do it because my WSDL contains too many unused function and schema of data structure. If I can automate it, WSDL -> trimmed WSDL -> generate client stubs classes. Nothing unused will be generated, no mi...
[ 0.48870790004730225, 0.04425473138689995, 0.20002105832099915, -0.20846879482269287, -0.31258976459503174, -0.08672492951154709, 0.5896409749984741, -0.16678692400455475, -0.1880420744419098, -0.709253191947937, -0.11593656241893768, 1.068923830986023, -0.3035045564174652, -0.1968891322612...
unit test. I tried to keep off from human invoked. It takes time, easily to get mistake, and have to redo every time every little change on the original WSDL. I am not conversant on the WSDL schema. I am thinking can it be done by XSLT?
[ 0.4791451692581177, -0.03637693077325821, 0.28093305230140686, 0.05832090228796005, -0.08923614770174026, -0.12334540486335754, 0.20551195740699768, -0.3254411220550537, 0.2775436043739319, -0.7322618365287781, 0.026595305651426315, 0.41806384921073914, -0.0781683549284935, 0.0595058687031...
I'm relatively new to ASP.NET and was wondering if anyone could shed some light on when I should use relative references (e.g. ../images/banner\_tinga.jpg) versus the tilde (e.g. ~/images/banner\_tinga.jpg). Depending on the situation you can accomplish the same goal using either. What are the pros and cons of each mec...
[ 0.16845858097076416, -0.0469856895506382, 0.7000004649162292, -0.004433207213878632, -0.3275468349456787, -0.31029993295669556, 0.01838412880897522, 0.03923756629228592, -0.18383456766605377, -0.8915101289749146, 0.2230224609375, 0.48135536909103394, -0.22733570635318756, -0.02518361061811...
HTML controls. So there's really no universal choice. If you wish to use use tilde with HTML controls you'll have to mark them runat="server", like this ``` <img src="~/images/myimage.png" runat="server"> ``` But it doesn't seem like a good practice cause it will be added to the viewstate. But then, you can also do ...
[ -0.09147723764181137, -0.03694379702210426, 0.7914964556694031, 0.021680453792214394, -0.37292709946632385, -0.28785690665245056, 0.13366809487342834, -0.016410045325756073, -0.26921817660331726, -0.683755099773407, -0.10203088074922562, 0.10044257342815399, -0.5242911577224731, -0.0240156...
and take it to a different level (higher or lower in the hierarchy) Hope this helped. To get to your CSS file, do this ``` <link href="<%= VirtualPathUtility.ToAbsolute("~/css/style.css/") %>" type="text/css"> ```
[ 0.3413757383823395, -0.054931167513132095, 0.4270842969417572, 0.0797404944896698, 0.10964184999465942, -0.20163214206695557, 0.31245309114456177, 0.41229695081710815, -0.24099858105182648, -0.949590265750885, -0.10786138474941254, 0.4835833013057709, 0.030650107190012932, 0.09272353351116...
I recently upgraded a Web Application Project (as well as some dependent projects) from .net 2.0 to .net 3.5 using the built in conversion tool. Everything works well such as using MS AJAX 3.5 vs. the external MS AJAX libraries in 2.0. My problem occurs when I tried using the new Lambda Expression syntax. The compiler...
[ 0.18086758255958557, 0.06782423704862595, 0.4857741892337799, -0.12481334805488586, -0.195669025182724, -0.10035296529531479, 0.47434020042419434, -0.26682308316230774, 0.0022898910101503134, -1.1976661682128906, 0.15262269973754883, 0.7819168567657471, -0.42464739084243774, -0.10102876275...
me the error. Nothing too special. ``` ObjectFactory.Initialize(x => { x.ForRequestedType<IUnitIdSequencingService>().TheDefaultIsConcreteType<UnitIdSequencingService>(); x.ForRequestedType<IGadgetDAO>().TheDefault.Is.OfConcreteType<GadgetDAO>().WithCtorArg("instance").EqualToAppSettin...
[ 0.0156863983720541, 0.3228801190853119, 0.3811606764793396, 0.14238116145133972, -0.10189381241798401, 0.06733428686857224, 0.7075695991516113, -0.1249057948589325, -0.10536951571702957, -0.8283272385597229, 0.022107789292931557, 0.5777350664138794, -0.2007521390914917, 0.29903629422187805...
that ASP.NET knows about the C# 3.0 (.NET 3.5) compiler. Ensure the following is in the `web.config`: ``` <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Cult...
[ 0.38395237922668457, -0.09182148426771164, 0.28111696243286133, -0.18067878484725952, -0.0470748171210289, 0.031009143218398094, 0.5514897704124451, -0.21849961578845978, -0.19004224240779877, -0.5517773032188416, -0.00969382282346487, 0.32532763481140137, -0.3042934536933899, 0.0381250716...
are hosting in IIS, ensure that the correct folder is set as an application, and that it is using ASP.NET v2.blah (not v1.1.blah).
[ 0.4657551348209381, -0.045247577130794525, 0.6249502897262573, 0.26061198115348816, 0.20560763776302338, -0.5865071415901184, 0.05167931318283081, -0.20092442631721497, -0.36911293864250183, -0.8462790846824646, -0.7072949409484863, 0.29279592633247375, -0.13745228946208954, -0.03137486800...
In a way following on from [reading a windows \*.dmp file](https://stackoverflow.com/questions/158534/reading-a-windows-dmp-file) Having received a dump file from random customer, running the debug session to see the crash, you often find it is in a MS or other third party library. The next issue is that you may not h...
[ 0.2586461901664734, 0.03101409040391445, 0.12248342484235764, 0.22395049035549164, -0.06911887973546982, -0.2979212999343872, 0.4982449412345886, -0.11507872492074966, -0.5536337494850159, -0.7567600607872009, 0.06629130989313126, 0.41290003061294556, -0.3376554846763611, 0.141079992055892...
name, and refuses to load symbols I have downloaded for XP/SP1/SP1a/SP2/SP3. I have the symbol server setup to download from the internet and store in a local cache which seems to have been working fine for modules that I do have on my PC. Using GUI equivelant to the method ``` Set _NT_SYMBOL_PATH=srv*d:\SymbolCach...
[ 0.04409739375114441, 0.19529284536838531, 0.7290406823158264, 0.03911595419049263, 0.10180580615997314, -0.014738951809704304, 0.39121749997138977, -0.30839768052101135, -0.1632995754480362, -0.7575592994689941, 0.04117297753691673, 0.2341202050447464, -0.1381666511297226, 0.07966580241918...
the dmp file to get the symbols I need? What are you using to debug the minidump? I.e., WinDBG or Visual Studio? And how was the minidump generated? There should be enough information in the minidump to resolve system dll symbols correctly. Are you using a local download of symbols or <http://msdl.microsoft.com/>? Up...
[ 0.23581331968307495, -0.3474861979484558, 0.37268149852752686, 0.12869669497013092, -0.3075374662876129, -0.12225063890218735, 0.34856539964675903, -0.39736419916152954, -0.3485792875289917, -0.6357904672622681, -0.02881460450589657, 0.4904903173446655, -0.3855256140232086, -0.103045299649...
to resolve minidump symbols.
[ -0.08761996775865555, -0.22849296033382416, 0.0835128128528595, 0.19938822090625763, 0.054960865527391434, 0.34963926672935486, 0.195414200425148, -0.5304887890815735, -0.0778217539191246, -0.3493303954601288, -0.36642488837242126, 0.34358352422714233, -0.4349731504917145, -0.4927578568458...
I'm coming from a web-development background and I am wondering how I would make a learning algorithm in Java/C++. Not so much the algorithm part, but making the program "remember" what it learned from the previous day. I would think something like saving a file, but I suspect their might be an easier way. Apologies if...
[ 0.6480752229690552, 0.18914590775966644, -0.17377224564552307, 0.23674678802490234, -0.04700138792395592, -0.15138399600982666, 0.1511034220457077, 0.23675309121608734, -0.1174951046705246, -0.5906319618225098, 0.22197774052619934, 0.3342914581298828, 0.14223191142082214, 0.012945239432156...
network, then you'd probably just dump the network state to a file. In general, I think once you have a mechanism that does the learning, the appropriate storage representation will be relatively apparent. Maybe if you can flesh out your plan on what kind of learning you'd like to implement, people can provide more gu...
[ 0.32145774364471436, -0.18593142926692963, 0.04457736387848854, 0.5819962620735168, 0.2591054141521454, -0.1977631002664566, -0.043674711138010025, 0.2384548932313919, -0.35141217708587646, -1.000870943069458, 0.18644432723522186, 0.5738973617553711, -0.003897949820384383, 0.07547878473997...
I need to set/get the cookies stored at `first.example` while browsing `second.example`, I have full access of `first.example` but I only have JavaScript access (can manipulate the DOM as I want) on `second.example`. My first approach was to create an iframe on `second.example` (with JS) that loaded a page like `first...
[ 0.055031586438417435, 0.10388090461492538, 0.06362301856279373, -0.17987726628780365, -0.20945315062999725, -0.03536047786474228, 0.17086577415466309, -0.01991673931479454, -0.17351225018501282, -0.7283244132995605, -0.0165471863001585, 0.5932954549789429, -0.3018253445625305, 0.1199748665...
`first.example/doAjax?getCookie` and that would do an AJAX call to say `first.example/getCookie` which would read the cookie info on `first.example` and return it as a JSON object. The problem is that I'm unable to bring that JSON cookie object back to `second.example` so I can read it, well maybe I could just bring i...
[ -0.10953763127326965, 0.034270066767930984, 0.20096351206302643, 0.029707379639148712, -0.19506871700286865, -0.39933380484580994, 0.3135971426963806, 0.2524315118789673, -0.02368365414440632, -0.7314368486404419, -0.23387818038463593, 0.7439232468605042, -0.2546086013317108, 0.20055972039...
work for getting cookies in SAFARI. You could inject a script element into HEAD of the document with a callback that passes the cookie you need to whatever function needs it. Something like: ``` <script type="text/javascript"> var newfile=document.createElement('script'); newfile.setAttribute("type","text/jav...
[ 0.23870733380317688, 0.039954230189323425, 0.47843217849731445, -0.3116105794906616, 0.016411276534199715, -0.17241652309894562, 0.4360053539276123, -0.4034700095653534, -0.12020636349916458, -0.7698584794998169, -0.3645877540111542, 0.4648965895175934, -0.4015647768974304, -0.261522799730...
I need to be able to write a function that shows repeated words from a string and return a list of strings in order of its occurrence and ignore non-letters e.g at hugs prompt ``` repetitions :: String -> [String] repetitions > "My bag is is action packed packed." output> ["is","packed"] repetitions > "My name name...
[ 0.2812458872795105, 0.01683161035180092, 0.21933835744857788, -0.05382126197218895, -0.19023272395133972, 0.2499230057001114, 0.5020514130592346, -0.42344576120376587, 0.04898726940155029, -0.5082131624221802, -0.17423824965953827, 0.36121267080307007, -0.2699045240879059, -0.1322975009679...
new list that contains all `x` where `x` == `y`. Someting like: ``` repetitions s = map fst . filter (uncurry (==)) . zip l $ tail l where l = map (filter isAlphaNum) (words s) ``` I'm not sure that works, but it should give you a rough idea.
[ 0.14969280362129211, -0.6805064082145691, 0.6761894226074219, -0.05938364937901497, -0.02518158219754696, -0.027598930522799492, 0.1635284274816513, -0.2120191603899002, -0.38710248470306396, -0.6909306049346924, -0.06653214991092682, 0.5370619893074036, -0.659003734588623, -0.117645613849...
I've been a java developer for a couple years and have heard that you can do some pretty useful and powerful things with JNI. I don't know if I just haven't needed to use it or if it isn't terribly relevant to me; but I have not had to touch it at all. I am wondering what the usefulness of this aspect of Java is. Exa...
[ 0.6681118607521057, 0.05323095992207527, -0.5315585732460022, -0.042521215975284576, -0.40306153893470764, -0.3003593683242798, 0.23422427475452423, 0.1496451497077942, -0.36576130986213684, -0.6442998647689819, 0.2694467008113861, 0.5702440738677979, -0.018131423741579056, 0.0039571728557...
reason can't cut it performance wise. You can implement that function in native code and call it from Java. This allows you to hand tune the implementation if you *really* need to. This is likely the least common reason though, Java usually performs just fine. 2. Access to OS Specific APIs. This one is a biggie. I've h...
[ 0.36649850010871887, -0.10280586034059525, -0.10466976463794708, 0.1666182577610016, -0.08646031469106674, -0.35974758863449097, 0.26488083600997925, -0.17055171728134155, -0.19430992007255554, -0.5417652726173401, 0.08925073593854904, 0.8676451444625854, -0.30942222476005554, -0.175444990...
is no standard Java way to use them. So I made a class that acted like a wrapper around them in C and accessed it with JNI. viola, problem solved.
[ -0.20513437688350677, -0.19986042380332947, 0.16894030570983887, 0.2687608301639557, -0.1950620412826538, 0.16180787980556488, 0.3468317687511444, -0.06922975182533264, -0.6546687483787537, -0.34332895278930664, 0.1030457615852356, 0.4646916687488556, 0.007958012633025646, 0.02395649440586...
I have a Div Tag which contains 4 child Div Tags ``` <Div id="Parent"> <div id="childOne">ChildOne </div> <div id="childOne">ChildTwo </div> <div id="childOne">ChildThree </div> <div id="childOne">ChildFour </div> </Div> ``` Now I would like to access these Child Div's using up and Down Arr...
[ 0.13562540709972382, 0.24271394312381744, 0.46510079503059387, -0.031371548771858215, 0.12420523166656494, 0.5914127230644226, 0.03784963861107826, -0.5139520764350891, 0.377381831407547, -0.788567304611206, -0.1163158193230629, 0.339953750371933, -0.014968208968639374, 0.39789044857025146...
each childDiv. Are you looking for what is known as [auto-completion](http://www.javascript-examples.com/autocomplete-demo/) or suggestions?
[ 0.2714814245700836, -0.110026516020298, -0.1202850416302681, 0.36546239256858826, 0.22131532430648804, 0.301435649394989, 0.09981521219015121, -0.04147816821932793, -0.20916646718978882, -0.6117983460426331, -0.2741410434246063, 0.29996004700660706, 0.03995315358042717, -0.2751113176345825...
At what point does accessibility become non-pragmatic? and what is that shady gray area dictated by? It depends on your software. Making a word processor accessible is a lot more necessary then making the latest first person shooter accessible. As a blind computer user I get angry if Microsoft Office doesn't work, but ...
[ 0.5120981931686401, 0.43978771567344666, 0.0855443999171257, 0.4373377859592438, -0.17546389997005463, -0.10917266458272934, 0.3890772759914398, 0.17211110889911652, -0.2957027852535248, -0.7116915583610535, 0.4189174771308899, 0.6002126932144165, -0.09024181962013245, 0.04220392927527428,...
with as much or as little accessibility as your conscience, time restraints, and budget force you to implement.
[ 0.16643907129764557, 0.13684213161468506, -0.008381002582609653, 0.5781009197235107, 0.2674279808998108, 0.06085833162069321, 0.4070867598056793, 0.11095954477787018, -0.05607495456933975, -0.9674039483070374, -0.3541867136955261, 0.32876715064048767, 0.08514317125082016, -0.03493813052773...
I currently have a unittest.TestCase that looks like.. ``` class test_appletrailer(unittest.TestCase): def setup(self): self.all_trailers = Trailers(res = "720", verbose = True) def test_has_trailers(self): self.failUnless(len(self.all_trailers) > 1) # ..more tests.. ``` This works fine...
[ 0.5641810894012451, 0.22144336998462677, 0.4330037832260132, -0.00009901029261527583, -0.018850835040211678, -0.00006853500963188708, 0.5496187210083008, -0.4558618366718292, 0.1705981194972992, -0.7802103161811829, -0.016728511080145836, 0.5965406894683838, 0.23560041189193726, 0.27292877...
and doing.. ``` class test_appletrailer(unittest.TestCase): all_trailers = Trailers(res = "720", verbose = True) ``` ..works, but then it claims "Ran 3 tests in 0.000s" which is incorrect.. The only other way I could think of is to have a cache\_trailers global variable (which works correctly, but is rather horr...
[ 0.2044941782951355, 0.38222455978393555, 0.029161464422941208, -0.00495937978848815, 0.2475840151309967, 0.1294012814760208, 0.6178749799728394, -0.2776925563812256, -0.2873436510562897, -0.521270215511322, -0.05049900338053703, 0.4654259979724884, -0.2517492175102234, 0.10661377757787704,...
else: self.all_trailers = cache_trailers ``` How about using a class member that only gets initialized once? ``` class test_appletrailer(unittest.TestCase): all_trailers = None def setup(self): # Only initialize all_trailers once. if self.all_trailers is None: self.__...
[ 0.48382750153541565, 0.2786652743816376, 0.2926422655582428, -0.1892184317111969, 0.12248777598142624, 0.025758417323231697, 0.2104097157716751, -0.3487236499786377, -0.34366706013679504, -0.4941291809082031, -0.2320311814546585, 0.4749045670032501, -0.1400342881679535, 0.02056296169757843...
which will be initialized.
[ 0.23727869987487793, 0.09867265075445175, 0.2803085744380951, 0.07190945744514465, 0.2809612452983856, 0.1997797042131424, -0.10314042866230011, -0.4883665144443512, 0.04368108510971069, -0.35283201932907104, -0.2885746657848358, 0.38667261600494385, 0.10241147130727768, -0.172402858734130...
I was reading some Java recently and came across something (an idiom?) new to me: in the program, classes with multiple constructors would also always include a blank constructor. For example: ``` public class Genotype { private boolean bits[]; private int rating; private int length; private Random random; ...
[ 0.4108755588531494, -0.4788016974925995, -0.0014806085964664817, 0.19043707847595215, -0.06645806133747101, -0.004082114435732365, 0.06425818055868149, -0.09390989691019058, -0.2665688991546631, -0.5841796398162842, 0.31561195850372314, 0.4329308867454529, -0.5383630394935608, 0.3749398291...
r) { random = r; this.length = length; bits = new boolean[length]; for(int i=0;i<length;i++) { bits[i] =random.nextBoolean(); } } /* copy constructor */ public Genotype(Genotype g,Random r) { random = r; bits = new boolean[g.length]; rating = g.rating; length = g.leng...
[ 0.06669401377439499, -0.06041545420885086, 0.338087797164917, -0.21311041712760925, 0.15514284372329712, 0.10781317949295044, 0.24051839113235474, -0.5472849607467651, -0.12052226066589355, -0.5819758176803589, -0.3823068141937256, 0.581464946269989, -0.3462457060813904, 0.510653555393219,...
first constructor doesn't seem to be a "real" constructor, it seems as though in every case one of the other constructors will be used. So why is that constructor defined at all? I am not sure that the code you were reading was high quality (I've reviewed some bioinformatics code in the past and it is unfortunately oft...
[ 0.07644001394510269, -0.24860040843486786, -0.3002156615257263, 0.17529359459877014, -0.3310486674308777, -0.19031605124473572, -0.20067767798900604, -0.0804252028465271, -0.08665423840284348, -0.802102267742157, -0.006787060294300318, 0.7086687088012695, -0.5976472496986389, -0.0539979152...
and lets users set the rest with getters and setters. Other constructors are often "convenience constructors" that help create objects with less calls. However, this can often lead to inconsistencies between constructors. In fact, there is recent research that shows that a default constructor with subsequent calls to s...
[ 0.06326983124017715, -0.25582000613212585, -0.08405596762895584, 0.20830810070037842, -0.10551811754703522, -0.41091489791870117, 0.09853846579790115, -0.0550726093351841, -0.1802482008934021, -0.6360937356948853, -0.47258299589157104, 0.4929600954055786, -0.36913368105888367, -0.219971716...
the parent object is "good enough". In this specific case, if that constructor was not defined, one would have to know all the details in advance. That is not always preferable. And finally, some IDEs automatically generate a default constructor, it is possible that whoever wrote the class was afraid to eliminate it.
[ 0.02732333540916443, 0.06663407385349274, -0.0319058895111084, 0.18688739836215973, 0.14332136511802673, -0.5307046175003052, 0.41040900349617004, 0.17445001006126404, 0.08055438846349716, -0.3864296078681946, -0.45994606614112854, 0.6307721138000488, -0.13112355768680573, -0.0109656648710...
I see a lot of code like this: ``` function Base() {} function Sub() {} Sub.prototype = new Base(); ``` However, if you do: ``` s = new Sub(); print(s.constructor == Sub); ``` This is false. This seems confusing to me, since s's constructor is, indeed, Sub. Is it conventional/better to do this? ``` function Base...
[ 0.225543811917305, 0.197343647480011, -0.01396191492676735, -0.024306131526827812, -0.09296475350856781, -0.22606788575649261, 0.5687869191169739, -0.17046473920345306, -0.21290305256843567, -0.6561908721923828, -0.1636727750301361, 0.31378331780433655, -0.36365455389022827, 0.396734982728...
prototype object showing through. When you create the 'Sub' function in Mozilla, you get a newly-minted default Sub.prototype object which has a 'constructor' pointing back to the Sub function as a courtesy. However you then replace that prototype with a new Base(). The original default prototype with the link back to...
[ -0.008779345080256462, -0.17246107757091522, 0.012130802497267723, 0.008036153391003609, -0.2254587560892105, -0.03191322460770607, 0.3815533220767975, -0.019493343308568, -0.21922706067562103, -0.8438499569892883, -0.022367971017956734, 0.1625511348247528, -0.6790261268615723, 0.399918168...
behaves slightly differently. I haven't seen one that writes 'constructor' to each derived class manually, but it seems as good a solution as any if you really want to have the real constructor available; it will also make the code compatible with browsers/engines that don't give you 'constructor'. I'd consider giving...
[ 0.18535704910755157, -0.10263674706220627, 0.05729367211461067, 0.11418158560991287, -0.1877383589744568, 0.06494162976741791, 0.29373475909233093, 0.041546531021595, -0.10270846635103226, -0.5281171798706055, -0.0698239654302597, 0.5650380849838257, -0.10451214015483856, 0.180799886584281...
How can I have that functionality in my game through which the players can change their hairstyle, look, style of clothes, etc., and so whenever they wear a different item of clothing their avatar is updated with it. Should I: * Have my designer create all possible combinations of armor, hairstyles, and faces as spri...
[ 0.5745733976364136, -0.20423875749111176, 0.3512294888496399, 0.24153241515159607, -0.18884170055389404, 0.38357803225517273, 0.21700610220432281, -0.3448912501335144, -0.37819042801856995, -0.7412525415420532, -0.009319815784692764, 0.3560408353805542, 0.1906222105026245, 0.00536651862785...
sprite for that armor/look combination is loaded. * Is it possible to have a character's sprite divided into components, like face, shirt, jeans, shoes, and have the pixel dimensions of each of these. Then whenever the player changes his helmet, for example, we use the pixel dimensions to put the helmet image in place ...
[ 0.16990599036216736, -0.17939771711826324, 0.44459494948387146, 0.36177191138267517, -0.40665996074676514, 0.20930705964565277, 0.39836564660072327, -0.4904681146144867, -0.10344149172306061, -0.6677396893501282, 0.062469929456710815, 0.7034322619438171, -0.13596588373184204, -0.2527798712...
3D world might IMHO save you some work: The painter algorithm works by drawing the most distant objects first, then overdrawing with objects closer to the camera. In your case, it would boild down to generating the buffer for your sprite, drawing it onto the buffer, finding the next dependant sprite-part (i.e. armour ...
[ -0.009036587551236153, -0.2537640333175659, 0.6973283886909485, -0.0009057485149241984, -0.36658748984336853, 0.2632308602333069, 0.015462511219084263, -0.21403123438358307, -0.14024196565151215, -0.6220186352729797, 0.014260949566960335, 0.38420990109443665, -0.2432335764169693, -0.147319...
instead of RGB) so that you will only combine parts that have an alpha value set to a value of your choice. If you cannot do that for whatever reason, just stick with one RGB combination that you will treat as transparent. Using 3D might make combining the parts easier for you, and you'd not even have to use an offscr...
[ 0.37449273467063904, -0.0631958469748497, 0.1561048924922943, 0.07242751866579056, -0.2514931857585907, 0.09057025611400604, -0.01580406352877617, -0.43738460540771484, -0.22747020423412323, -0.6472187042236328, 0.03267422318458557, 0.46770960092544556, -0.6632450819015503, -0.209212914109...
be pretty similar - please note that I did not run the code below through a compiler): ``` // // @param dependant_textures is a vector of textures where // texture n+1 depends on texture n. // @param combimed_tex is the output of all textures combined void Sprite::combineTextures (vector<Texture> const& dependant_t...
[ 0.09335028380155563, -0.29198580980300903, 0.5299192070960999, -0.32668328285217285, -0.3534776270389557, 0.4792006313800812, -0.1081780418753624, -0.7038210034370422, -0.35855793952941895, -0.5743449926376343, -0.05176341533660889, 0.3477954864501953, -0.4753280580043793, -0.1557484865188...
for (iter++; iter != dependant_textures.end(); iter++) { Texture& current_tex = *iter; // Go through each pixel, painting: for (unsigned char pixel_index = 0; pixel_index < current_tex.numPixels(); pixel_index++) { // Assuming that Texture had a method to export the raw...
[ -0.20184634625911713, -0.3009166121482849, 0.7818547487258911, -0.3144148886203766, 0.1538766324520111, 0.3525397479534149, 0.13226303458213806, -0.4306991696357727, -0.26887235045433044, -0.6027899384498596, -0.07303985208272934, 0.41744402050971985, -0.12719713151454926, 0.20299872756004...
an array of chars - to illustrate, check Alpha value: int const BYTESPERPIXEL = 4; // RGBA if (!current_tex.getRawData()[pixel_index * BYTESPERPIXEL + 3]) for (int copied_bytes = 0; copied_bytes < 3; copied_bytes++) { int index = pixel_index *
[ -0.003910475876182318, 0.051713984459638596, 0.28858238458633423, -0.3771721124649048, -0.13059590756893158, 0.35250788927078247, 0.1837427020072937, -0.4994063973426819, 0.035859230905771255, -0.1550355702638626, -0.1418456882238388, 0.40178805589675903, -0.5863298177719116, 0.26305276155...
BYTESPERPIXEL + copied_bytes; combined_tex.getRawData()[index] = current_tex.getRawData()[index]; } } } } ``` To answer your question for a 3D solution, you would simply draw rectangles with their respective textures (that would
[ 0.09687608480453491, -0.2270515263080597, 0.7002926468849182, 0.11229903995990753, -0.1608910709619522, 0.24551057815551758, -0.22999006509780884, -0.17200203239917755, -0.2425241619348526, -0.654686450958252, -0.09891080111265182, 0.19363121688365936, -0.23762717843055725, 0.3872706592082...
have an alpha channel) over each other. You would set the system up to display in an orthogonal mode (for OpenGL: `gluOrtho2D()`).
[ 0.11692537367343903, -0.2508794069290161, 0.5756642818450928, -0.05586341768503189, -0.15082712471485138, 0.06684005260467529, -0.2853165864944458, -0.10403786599636078, -0.0738450288772583, -0.7144964337348938, 0.1343357414007187, 0.5628108382225037, -0.48672765493392944, 0.10702493786811...
Why did MS originally make the decision to maintain these two separate core libs? Maybe they had some scalability issue in mind, but nowadays I never see an application, of any type, that doesn't need both. Does anyone have any inside information on this? It's not really important, but been on my mind for years. PS. I...
[ 0.0734144002199173, -0.2643657326698303, 0.47008216381073, -0.1031651720404625, -0.019261404871940613, -0.18927381932735443, -0.0023425105027854443, 0.04497935250401497, -0.3139497637748718, -0.513444721698761, -0.06719448417425156, 0.5853028893470764, -0.2134297490119934, 0.26038751006126...
must always be present in order for everything to work. It has the distinction of being the only assembly that the CLR requires to be loaded inside every managed process. Originally, a lot of "optional" stuff (things that technically aren't required to run an app) was put into mscorlib because they were things that ...
[ -0.05479397624731064, -0.44316428899765015, 0.5173599123954773, 0.1313706934452057, 0.2071213722229004, -0.6035510897636414, -0.015839755535125732, 0.09240362793207169, -0.44835004210472107, -0.0000020308200419094646, -0.30174705386161804, 0.420571506023407, -0.368763267993927, -0.06559017...
to waste time going and binding a whole bunch of different assemblies. The stuff in system.dll was basically everything that wasn't "worthy" of being included in mscorlib. This trend, however, is starting to be reversed. The CLR is making efforts to reduce the size of mscorlib. A lot of stuff was removed for Silverli...
[ 0.12128982692956924, -0.13535946607589722, 0.6417481899261475, -0.11272301524877548, -0.10664726048707962, -0.47979167103767395, 0.26728326082229614, 0.47769179940223694, -0.5764309763908386, -0.18742616474628448, 0.2313220500946045, 0.25741836428642273, -0.5433604717254639, 0.399199843406...
In an ASP.NET MVC view I'd like to include a link of the form: ``` <a href="blah">Link text <span>with further descriptive text</span></a> ``` Trying to include the `<span>` element in the `linkText` field of a call to `Html.ActionLink()` ends up with it being encoded (as would be expected). Are there any recommend...
[ 0.108467698097229, -0.366402268409729, 0.6775623559951782, -0.015632320195436478, -0.4178546667098999, 0.05347700044512749, 0.03985150158405304, -0.48094266653060913, -0.5198689699172974, -0.6415124535560608, -0.382738322019577, 0.30652254819869995, -0.4135446846485138, -0.1933419704437255...
This is a idea for a security. Our employees shall have access to some commands on a linux server but not all. They shall e.g. have the possibility to access a log file (`less logfile`) or start different commands (`shutdown.sh` / `run.sh`). Background information: All employees access the server with the same user n...
[ 0.5037409663200378, 0.22919823229312897, 0.29409512877464294, -0.06534741818904877, 0.36683785915374756, -0.28896817564964294, 0.12213011085987091, 0.058809828013181686, -0.17896217107772827, -0.33149147033691406, -0.48878541588783264, 0.5509625673294067, -0.11604655534029007, 0.2537460029...
line to access and check log files or to restart the application by hand. Only some people shall have full command line access. We are using ppk authentication on the server. It would be great if employee1 can only access the logfile and employee2 can also do X etc... **Solution:** As a solution I'll use the `comman...
[ 0.10340367257595062, -0.22046230733394623, 0.6036999821662903, 0.15076300501823425, 0.27161628007888794, 0.12557756900787354, 0.20091365277767181, -0.08702442795038223, 0.041245073080062866, -0.3909849226474762, -0.23390501737594604, 0.5138953924179077, -0.24543267488479614, -0.07778108865...
from as stated [here](http://www.linuxjournal.com/article/8257): ``` command="/bin/myscript.sh",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-dss AAAAB3....o9M9qz4xqGCqGXoJw= user@host ``` This is enough security for us. Thanks, community! You can also restrict keys to permissible commands (in ...
[ 0.3616020381450653, 0.10503928363323212, 0.46218398213386536, -0.03883330151438713, 0.02438924089074135, -0.4208994209766388, 0.461131751537323, 0.06043710187077522, -0.4180789291858673, -0.5193256735801697, -0.36871010065078735, 0.5526620149612427, -0.3380633592605591, 0.34636548161506653...
I am trying to put a requirement together for a new environment to consist of TeamCity running of Sql Server, a couple of build agents (for now) and an SVN repository. There are 6 developers and there will be 5 active solutions partaking in the CI process for now which will obviously grow over time. None of the solut...
[ 0.5373361110687256, 0.13117586076259613, 0.47012656927108765, 0.2615991532802582, 0.3021608591079712, -0.1585596352815628, 0.08935964852571487, -0.04032508656382561, -0.13481038808822632, -0.7766270041465759, -0.0019188399892300367, 0.1176605299115181, -0.004035171587020159, 0.033777903765...
from the TeamCity sql instance. Can anyone suggest a hardware config suitable to run these. Is disk i/o going to be more important than actual CPU power. Can I run all these on a single multi cpu, raid and virtualisation? Should we be running with windows 2008 and hyper-v? I have always let others deal with server...
[ 0.13994888961315155, 0.06561718136072159, 0.13479861617088318, 0.31237921118736267, -0.054822515696287155, 0.0007932333392091095, 0.01121405977755785, -0.02515532821416855, -0.2473200559616089, -0.6943092346191406, 0.0989610031247139, 0.318441778421402, 0.0226927287876606, -0.1188605502247...
a different server (for historical reasons). I think that everything is on a SAN now, for reliability (if one of the hosts goes down, we can easily move the VMs to another host). We have 10 build agents, all running in VMs. 4 of them are used for straight builds; 6 of them are used for builds and to run system tests (...
[ 0.6514199376106262, 0.04851354658603668, 0.35842108726501465, 0.10346377640962601, -0.0033893149811774492, 0.17051757872104645, 0.3818638026714325, -0.20632490515708923, -0.19290928542613983, -0.5719950199127197, -0.07907304912805557, 0.39263907074928284, -0.032071374356746674, 0.291410952...
project ideally doesn't get released to the test department until it passes automated unit and system testing. We have about a dozen developers actively working on 3 or 4 projects at a time. We also use TeamCity for building hotfix and maintenance releases. In your scenario, I'd opt for Windows 2008 and HyperV, on th...
[ 0.5215667486190796, -0.08439166098833084, 0.07880934327840805, 0.1198098361492157, -0.03217349201440811, -0.08884227275848389, 0.036847762763500214, -0.24776722490787506, -0.22357429563999176, -0.5080341696739197, -0.19859106838703156, 0.36056187748908997, 0.17097660899162292, 0.0176134109...
point, you might consider having two or more boxes, for fail-over, and because it's sometimes cheaper to buy two boxes with 32Gb of RAM than to buy the 64Gb option for a single box. One advantage of using VMs is that you can snapshot them and revert them periodically. Each project should probably have its own instance...
[ 0.4160929024219513, -0.03479049727320671, 0.20472575724124908, 0.32065901160240173, -0.009665846824645996, -0.25319865345954895, -0.11831796169281006, -0.061752643436193466, -0.5329762101173401, -0.4466802179813385, 0.09617656469345093, 0.3844325542449951, -0.1304415762424469, -0.111153453...
I'm trying to generate random permutations of an 80-character fixed string in C. Much to my dismay, the system I'm working on lacks strfry(). What's the best way for me to generate a random permutation of this string? Since this will be looped over approx. 100,000 times, performance is an issue. Just use the Open Sourc...
[ 0.18235734105110168, 0.04333582893013954, 0.1720348596572876, -0.08460827171802521, -0.07256827503442764, 0.23508448898792267, 0.21478913724422455, -0.06516829133033752, -0.15144051611423492, -0.5203325748443604, -0.012282748706638813, 0.3822423815727234, -0.571061372756958, 0.357117354869...
6, 7, 8 }; rdata.state = NULL; __initstate_r (time ((time_t *) NULL), state, 8, &rdata); init = 1; } len = strlen (string); for (i = 0; i < len; ++i) { int32_t j; char c; __random_r (&rdata, &j); j %= len; c = string[i]; string[i] =
[ -0.09012958407402039, -0.4913601577281952, -0.06098363175988197, -0.3034808039665222, 0.12577460706233978, 0.4452937841415405, 0.4606733024120331, -0.34100425243377686, -0.20519207417964935, -0.11386898905038834, -0.19874334335327148, 0.4551389813423157, -0.46350207924842834, 0.44269829988...
string[j]; string[j] = c; } return string; } ``` You might want to change the GLIBC specific data types to something more generic. This code uses the [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher-Yates_shuffle) which is actually quite easy to implement by yourself, and very efficient.
[ 0.33131152391433716, 0.03598688170313835, 0.09667913615703583, -0.0855025053024292, -0.09846639633178711, -0.43744686245918274, -0.04726199060678482, -0.2734679877758026, -0.04259815812110901, -0.6105618476867676, 0.06811615079641342, 0.5687087178230286, -0.6518166661262512, 0.079733014106...
I'm looking for interesting online resources on FPGA development - sites, blogs, that sort of thing. What I'm after is examples of fun (and hopefully not too expensive) projects that one can try out and learn from. have you tried [fpga4fun.com](http://www.fpga4fun.com/) or [fpga-forum.com](http://www.fpga-forum.com/wbb...
[ 0.46981367468833923, 0.35372599959373474, -0.044559501111507416, 0.13670757412910461, -0.20981194078922272, -0.09476225078105927, 0.10040125250816345, 0.051664866507053375, -0.11906121671199799, -0.4645389914512634, -0.15466399490833282, 0.39002296328544617, 0.07223688811063766, -0.1570890...
Are there any utilities that reformat Delphi code ? EDIT I am using Delphi 2006 **Some feedback** Thanks to all that answered this question I have been using the JCF code formatter - it works well and my code is been formated to [Object Pascal Style Guide](http://edn.embarcadero.com/article/10280) You can try th...
[ -0.027273958548903465, -0.09451986849308014, 0.10824195295572281, -0.07308400422334671, -0.5449214577674866, -0.11013811826705933, 0.014466474764049053, -0.2784103453159332, -0.32345330715179443, -0.5839883089065552, 0.03464161232113838, 0.8172018527984619, -0.06020977720618248, -0.0428278...
At my workplace we have one large Subversion repository which holds about 100 projects. Some projects use each other through svn:externals. Usually all people have read+write access to everything, but sometimes external people and interns have only restricted read/write access to some custom folders so they don't get o...
[ 0.7358637452125549, 0.13306458294391632, 0.06960536539554596, 0.2830915153026581, -0.14037029445171356, 0.038585685193538666, 0.14027225971221924, -0.00044904815149493515, -0.43355774879455566, -0.4918063282966614, -0.05197322741150856, 0.18715250492095947, 0.22395619750022888, 0.450461804...
svn:externals, only better) **Access rights:** Yes, access control is often built around ssh and public keys. If you want to host it yourself, try [gitosis](http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way), but I actually highly recommend a hosted solution, like [GitHub](http://github.co...
[ -0.02492852881550789, 0.12495763599872589, 0.21671655774116516, 0.02768263965845108, -0.2504976987838745, -0.44483816623687744, 0.27609312534332275, 0.2516866624355316, -0.6296303272247314, -0.8074731230735779, -0.42042574286460876, 0.3971279263496399, -0.19309625029563904, 0.2494033277034...
is there an easy away to combine fields in awk? Specifically, I have lines like this: ``` 1,2,some text 3,4,some text, but it has commas in it, annoyingly ``` I want to extract the two numbers as the first two fields, but then I want all of the text (commas and all) to be the third field. Is there a way to do that? ...
[ 0.01825120858848095, -0.14466805756092072, 0.1438077986240387, -0.21161414682865143, -0.20337000489234924, 0.12435947358608246, 0.10308153182268143, 0.09244067966938019, 0.29365643858909607, -0.3669564127922058, -0.13485944271087646, 0.533784031867981, -0.5945702195167542, -0.2007816731929...
Even something very rudimentary is fine. Like entering and evaluating something like x+1, where x is a variable I get to specify. I was thinking of writing my own using Strings for each formula, regex for parsing them, etc., but let's assume my goal is to be as lazy as I can possibly get away with, and that if there's...
[ 0.3788900077342987, 0.15834181010723114, -0.1334063857793808, 0.11183401197195053, -0.13288745284080505, -0.31986862421035767, 0.2820708751678467, -0.02058536745607853, -0.03409064561128616, -0.6359267234802246, 0.11154593527317047, 0.7008134126663208, -0.42539358139038086, -0.258463829755...
can plug in other languages too.
[ 0.47541600465774536, 0.13460324704647064, -0.04491650313138962, 0.48859676718711853, 0.17203277349472046, -0.06023795157670975, 0.2881805896759033, 0.4768812358379364, 0.03268323466181755, -0.669573187828064, -0.33932286500930786, 0.5558404922485352, -0.002234106883406639, -0.2948471605777...
I have set up a [Django](http://en.wikipedia.org/wiki/Django_%28web_framework%29) application that uses images. I think I have set up the media settings MEDIA\_ROOT and MEDIA\_URL correctly. However the images don't show up. Do you know what can be the problem? Let consider this example: The image files are under **/...
[ 0.5657685399055481, 0.47272011637687683, 0.48450395464897156, -0.14446868002414703, -0.11808054894208908, -0.23284827172756195, 0.316852331161499, -0.1494436413049698, -0.36843326687812805, -0.7527058720588684, -0.10238146036863327, 0.6587837338447571, -0.326114296913147, 0.062157213687896...
need to do that, anyway, read the documentation on [how to serve static files](http://docs.djangoproject.com/en/dev/howto/static-files/).
[ 0.5753116607666016, 0.18354739248752594, 0.1128949224948883, -0.13682477176189423, 0.0913991928100586, -0.6525106430053711, 0.030923403799533844, 0.18127870559692383, -0.3904895782470703, -0.3136022984981537, 0.09824392944574356, 0.4998888075351715, -0.11513805389404297, -0.259893983602523...
In a particular page i have a ascx control which contains a table. Now I want to set this control visible/invisible but the visible method is not detected by the intellisense. The only methods are 1)Equals and 2) ReferenceEquals Main Page ``` <VPM:VotingPolls Runat="server"></VPM:VotingPolls> ``` Thanks Thanks it...
[ -0.47077035903930664, 0.10133321583271027, 0.7998548746109009, 0.25419098138809204, -0.22721636295318604, -0.03128931298851967, 0.10836444050073624, -0.15315687656402588, -0.4307861626148224, -0.6122647523880005, -0.1050926074385643, 0.2063051164150238, -0.4676976799964905, -0.077354297041...
What, if any, is the difference between a software bug and a software vulnerability? A bug is when a system isn't behaving as it's designed to behave. A vulnerability is a way of abusing the system (most commonly in a security-related way) - whether that's due to a design fault or an implementation fault. In other wor...
[ 0.44830968976020813, 0.06057359278202057, -0.27961215376853943, 0.03324982896447182, 0.09495802223682404, -0.012862002477049828, 0.8388122916221619, 0.16994395852088928, -0.2669776976108551, -0.40893012285232544, -0.13058538734912872, 0.649109959602356, -0.5896625518798828, 0.2301121801137...
I have a large Compact Frameworks V2.0 application that in most cases works very well. On certain devices about once a day, a user receives a Native Error 0xC0000005 that is not caught with the standard managed Try/Catch block. My application synchronizes with the server via ASMX calls at fixed intervals. The problem...
[ 0.0820760652422905, 0.3378044664859772, 0.14823009073734283, -0.07094385474920273, 0.006611589342355728, -0.1000434160232544, 0.7452515959739685, -0.14406315982341766, -0.04704355075955391, -0.6806591749191284, -0.0075206453911960125, 0.5245152115821838, -0.3417980372905731, -0.00170120701...
about 95% certain that isn't where the problem is. Since this only happens on certain devices and very infrequently (less than once a day) it's very difficult to isolate. I've instruemented my code and it appears as if it happens in random places within the application, so I suspect something is corrupting memory. An...
[ 0.04526197537779808, 0.2574135959148407, 0.262566477060318, 0.15417057275772095, 0.14156292378902435, -0.25106438994407654, 0.5896764397621155, -0.03068036586046219, -0.11573132872581482, -0.4836460053920746, 0.005410667043179274, 0.5764248371124268, -0.06251136213541031, -0.03915507718920...
will allow for catching these types of exceptions: <http://msdn.microsoft.com/en-us/library/1deeycx5.aspx>
[ 0.18863874673843384, -0.17559589445590973, 0.1529233306646347, 0.3545610308647156, 0.394747793674469, -0.3304092288017273, 0.26006487011909485, 0.00040635874029248953, -0.5933148264884949, -0.45933762192726135, -0.20872698724269867, 0.13975444436073303, -0.36187705397605896, -0.13487553596...
I was wondering about what makes the primary Java compiler (javac by sun) so fast at compilation? ..as well as the C# .NET compiler from Microsoft. I am comparing them with C++ compilers (such as G++), so maybe my question should have been, what makes C++ compilers so slow :) That question was nicely answered in this...
[ 0.25585538148880005, -0.03394225984811783, -0.2648022174835205, -0.001254672766663134, -0.19534824788570404, -0.18034528195858002, 0.05995875969529152, -0.07820093631744385, -0.43907105922698975, -0.22493350505828857, 0.015797430649399757, 0.5478828549385071, 0.01451714988797903, -0.079823...
i want to do this simple piece of code work. ``` #include <iostream> #include <windows.h> void printSome (int i) { std::cout << i << std::endl; } void spawnThread (void (*threadName)(int i)) { CreateThread ( 0, // default security attributes
[ 0.5337129831314087, 0.260367751121521, 0.6396155953407288, -0.2874886989593506, 0.4409695267677307, -0.005910641513764858, 0.24926483631134033, -0.20878440141677856, -0.11295195668935776, -0.7373732328414917, 0.07821772247552872, 0.5308470726013184, -0.4106415808200836, 0.03520030528306961...
0, // use default stack size (LPTHREAD_START_ROUTINE)threadName, // thread function name (LPVOID)i, // argument to thread function 0,
[ -0.01747823692858219, -0.07245917618274689, 0.7415536642074585, -0.33394262194633484, 0.3965783417224884, 0.272916704416275, -0.4472137689590454, -0.13255178928375244, -0.3739655911922455, -0.4411066770553589, -0.030100097879767418, 0.5271767973899841, -0.3926505148410797, 0.05032270029187...
// use default creation flags 0 // returns the thread identifier ); } int main () { spawnThread(printSome(155)); } ``` i am on windows, using vs. Any help will be greatly appriciated. Personally, I wouldn't consider passing in a function pointer like you
[ 0.39732488989830017, -0.056980811059474945, 0.38418471813201904, -0.09344180673360825, 0.19647756218910217, -0.18370375037193298, 0.3868482708930969, 0.08501732349395752, -0.314200758934021, -0.6979992985725403, 0.008762971498072147, 0.5527997612953186, -0.37551185488700867, 0.578840553760...
are trying to do as very C++ like. That's coding C in C++ Instead, I'd wrap that thing in a class. The big advantage there is you can just override the class to have however many members you want, rather than having to perform greazy casting tricks to get at your parameters every time. The code's a little long-winde...
[ 0.6545092463493347, -0.03767338767647743, 0.06690416485071182, 0.02629927732050419, 0.12988993525505066, -0.2829100787639618, 0.38922908902168274, -0.16957619786262512, -0.26850229501724243, -0.36343708634376526, 0.06542747467756271, 0.6319965720176697, -0.4601234793663025, 0.0160027723759...
print_some (int i) : i(i) {}; action_callback () { std::cout << i << std::endl; } } int main () { print_some printer (155); } ``` Here's some exerpted example code from one of our classes that does this: ``` class basic_thread : { public: basic_thread(); protected: u...
[ 0.14248932898044586, -0.30240267515182495, 0.5917174816131592, -0.4173732101917267, 0.007628272753208876, 0.1796630173921585, 0.060660481452941895, -0.12174008041620255, -0.32280901074409485, -0.3388127386569977, -0.2601129710674286, 0.5537863969802856, -0.5206987857818604, 0.2541595697402...
// Internal routine used to bridge between OS callback format and // action_callback. *Must* be static for the OS. static unsigned long __stdcall self_calling_callback (void *parameter); } ``` ...and in the .cpp: ``` unsigned long __stdcall basic_thread::self_calling_callback (void *parameter) { if (parame...
[ -0.19523023068904877, -0.10586629807949066, 0.5572489500045776, -0.29501745104789734, 0.1868625432252884, 0.35132500529289246, 0.4211229383945465, -0.3274705708026886, -0.1483325958251953, -0.5536071062088013, -0.1588727980852127, 0.9637801051139832, -0.34929215908050537, 0.117771163582801...
// Start thread. m_Handle = CreateThread(NULL, 0, self_calling_callback, (PVOID)this,
[ 0.16038855910301208, -0.059402767568826675, 0.2982378304004669, -0.19492457807064056, 0.376007616519928, -0.013825572095811367, 0.3815493583679199, -0.15119606256484985, -0.27190425992012024, -0.40343785285949707, -0.05934545397758484, 0.513640284538269, -0.27936574816703796, 0.51793295145...
0, &m_ThreadId ); if( !IsHandleValid() ) throw StartException("CreateThread() failed", GetLastError()); } ```
[ -0.06873121112585068, -0.042339783161878586, 0.43977224826812744, -0.35644471645355225, 0.4220935106277466, -0.13619013130664825, 0.44566282629966736, -0.19764503836631775, -0.06700389087200165, -0.4084858000278473, -0.23671500384807587, 0.5909557342529297, -0.27958303689956665, 0.50082218...
See here: <http://code.google.com/p/ie7-js/> Does anyone have any experience or remarks about this javascript? Is it worth including? Do you recommend it? I know many people, myself included that are using various IE hacks to get transparent PNG support. THis looks like a little bit more help, and as long as it works,...
[ 0.7585482001304626, -0.024879194796085358, -0.3294585049152374, -0.03447062894701958, -0.12929722666740417, -0.2522325813770294, 0.05951708182692528, 0.5427774786949158, -0.2611925005912781, -0.5415034294128418, 0.2757488191127777, 0.6379923224449158, -0.036328766494989395, -0.343683153390...
I have the following example class: Test.h: ``` @interface Test : UIButton { NSString *value; } - (id)initWithValue:(NSString *)newValue; @property(copy) NSString *value; ``` Test.m: ``` @implementation Test @synthesize value; - (id)initWithValue:(NSString *)newValue { [super init]; NSLog(@"before n...
[ -0.04182962700724602, -0.01649361290037632, 0.5111746788024902, -0.2052120715379715, 0.04883299022912979, 0.10708865523338318, 0.4061897397041321, -0.582351803779602, 0.24640776216983795, -0.7507805228233337, -0.001414487836882472, 0.6529449224472046, -0.003534638322889805, 0.3512545526027...