text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
requests for colour while still maintaining a degree of professionalism (and self-respect). You can be seen to accomodate user requests without looking like an idiot.
[ 0.3379862904548645, -0.2585928738117218, 0.16718831658363342, 0.004942615982145071, 0.032277897000312805, 0.11048591881990433, 0.41809678077697754, 0.2151733785867691, -0.6663432717323303, -0.36891964077949524, -0.5228447914123535, 0.3652762770652771, -0.24335655570030212, -0.3701412379741...
I can query the AD and find all the IIS sites and their virtual directories, now I need to be able to update those home directories and save the changes. After I fetch the directory entry I can display the site path using `$site.Path`, however setting it doesn't seem to have any effect. It never changes the actual sto...
[ 0.41992247104644775, 0.10469524562358856, 0.700046956539154, -0.20701076090335846, -0.1252640336751938, 0.14624527096748352, 0.4327008128166199, -0.08136381953954697, 0.06628039479255676, -1.3098047971725464, 0.016129743307828903, 0.3997775614261627, -0.4054509103298187, 0.4278945028781891...
-eq "iiswebserver"} | where {$_.psbase.properties.servercomment -eq $siteConfig.name }; $s = [ADSI]($site.psbase.path + "/ROOT"); $s.Path # $s.Path = $siteConfig.path # $s.Put("Path", $siteConfig.path ) $s.psbase.CommitChanges() ``` Ok, I tried this and it seems to work: ``` $s.psbas...
[ -0.12121127545833588, -0.20402580499649048, 0.4422603249549866, -0.337332159280777, -0.17681974172592163, -0.13319939374923706, 0.5695677995681763, -0.44219204783439636, -0.2258407473564148, -0.9866576194763184, -0.08474859595298767, 0.3145735263824463, -0.4424024522304535, 0.3230404257774...
I am using a JSP bean and when I do an assignment to a new object, it gets over-written on a submit to the previous object. ``` <jsp:useBean id="base" class="com.example.StandardBase" scope="session" /> ... //base object id = 396 base = new Base() //base object id = 1000 ``` and on a resubmit of the page I get ```...
[ 0.32324957847595215, 0.4355687201023102, 0.5569634437561035, -0.26157963275909424, -0.18051716685295105, -0.25630199909210205, 0.16038909554481506, -0.19900736212730408, -0.29016491770744324, -0.7460213899612427, -0.062301453202962875, 0.31459346413612366, -0.49659013748168945, 0.074029609...
around while the one you create manually, and then updated, isn't. Get rid of `base = new Base()` and you should be fine. If you insist upon updating it, you use [`HttpSession.setAttribute()`](http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html#setAttribute(java.lang.String,%20java.lang.Object))...
[ 0.5724378228187561, 0.03606387600302696, 0.5004381537437439, -0.3013272285461426, -0.04225904121994972, -0.37205228209495544, 0.2213093638420105, -0.24525108933448792, -0.30361172556877136, -0.5709439516067505, -0.2942062020301819, 0.6112105846405029, -0.47218021750450134, -0.3621568679809...
I don't understand why one method would work and the other would throw a NoMethodError if they come from the same lib file. ``` # app/views/bunnies/show.html.erb <% if logged_in? %> <%= current_user.login %> | <%= link_to 'Logout', logout_path %> | <% if authorized? %> <%= link_to 'Edit Details', edit_bunny_...
[ 0.20850089192390442, 0.17476576566696167, 0.7920580506324768, 0.20095916092395782, 0.22053687274456024, -0.23306678235530853, 0.2126937359571457, -0.3565061092376709, -0.4211198687553406, -0.5331206321716309, -0.19269825518131256, 0.31940311193466187, -0.4562927782535553, 0.175172179937362...
gives? Right, so I still don't understand why that wasn't working, but I have found an alternative solution. (1) Leave authenticated\_system.rb as is. (2) Add a helper method to controllers/application.rb: ``` helper_method :is_admin? def is_admin? if logged_in? && current_user.login == "admin" true else ...
[ 0.14269492030143738, 0.12381330132484436, 0.8040105104446411, 0.36265772581100464, 0.14992541074752808, -0.31220483779907227, 0.35630008578300476, -0.4020310044288635, 0.08497442305088043, -0.2392875999212265, -0.08169453591108322, 0.4696987271308899, -0.3610538840293884, 0.176523715257644...
I am compiling a legacy C code here and there is a lot of variables and struct members named "interface", but VC2008 express is complaining about these, do you know how to disable this? I already changed settings to compile the code only as a C code, but no effect on this. Do a ``` #define interface QQInterface ```...
[ 0.1863124519586563, 0.03132239729166031, 0.4136347770690918, 0.06687985360622406, -0.16107603907585144, -0.3512958884239197, 0.36455658078193665, 0.12835311889648438, -0.11424463987350464, -0.9861533641815186, 0.2485148310661316, 0.5871759057044983, -0.4484436511993408, 0.38233381509780884...
If I have the following setting in my app.config file. It is a setting I need to make sure my WCF client can negotiate the default proxy server. ``` <system.net> <defaultProxy enabled="true" useDefaultCredentials="true"></defaultProxy> </system.net> ``` Unfortunately, I can't add to the app.config file in my env...
[ 0.20615646243095398, 0.3127821981906891, 0.8508122563362122, -0.08261511474847794, 0.20758174359798431, -0.04715761914849281, 0.5245038866996765, -0.26202327013015747, -0.17998050153255463, -1.0399833917617798, -0.14995433390140533, 0.7033443450927734, -0.16286905109882355, 0.0272480845451...
We're trying to send an image of a large SWF file to a server to have it mailed out and we're having a bit of trouble with transmission time. The SWF is about 900px x 600px and restricted to AS2 so we've been using this Bitmap Exporter class. We've tried using several different ways to transmit the data; base10, base...
[ 0.5818752646446228, -0.13803178071975708, 0.4470335841178894, 0.14361390471458435, -0.2633737325668335, -0.05210923030972481, 0.49859893321990967, 0.031053360551595688, -0.3118809759616852, -0.6503480076789856, 0.03051375411450863, 0.19020706415176392, -0.2821592092514038, 0.07613650709390...
large bitmap data to a server with flash? Thank you for your time. The reason you get such long upload times is that the image is barely compressed (or not at all depending on how the class is implemented). 900 by 600 pixels at 16 bpp (or whatever it now is flash uses) amounts to something like 1.5mb of raw data. I'...
[ 0.24698004126548767, -0.3036971688270569, 0.393147349357605, 0.17920617759227753, -0.20788726210594177, -0.12887325882911682, 0.09431412816047668, -0.25611427426338196, -0.5401701927185059, -0.5635884404182434, 0.1355322301387787, 0.3645099699497223, -0.01808839850127697, -0.00465797260403...
once it reaches the server? If not that might be a possible way. (I guess you're aware that this would be way easier using AS3, then you could compress the whole image as a jpeg clientside without very much effort, but I guess the rest of your application is AS2 making that a somewhat moot point)
[ 0.1268831342458725, -0.25960516929626465, 0.5882394909858704, 0.23400095105171204, -0.4006493389606476, -0.19517764449119568, 0.2389853298664093, -0.08349087834358215, -0.49574267864227295, -0.5795510411262512, -0.21292239427566528, 0.24997834861278534, -0.08409731835126877, 0.140170902013...
What is the most direct and/or efficient way to convert a `char[]` into a `CharSequence`? Without the copy: ``` CharSequence seq = java.nio.CharBuffer.wrap(array); ``` However, the `new String(array)` approach is likely to be easier to write, easier to read and faster.
[ 0.13081997632980347, 0.21549801528453827, 0.018887020647525787, -0.2492161989212036, -0.04410388320684433, -0.06130459904670715, 0.28884464502334595, -0.2740330398082733, -0.048994459211826324, -0.42535972595214844, -0.15131159126758575, 0.46968331933021545, -0.3876662850379944, 0.10814113...
I want to send an array constructed in javascript with the selected values of a multiple select. Is there a way to send this array to a php script using ajax? You can post back to your server with XML or JSON. Your javascript will have to construct the post, which in the case of XML would require you to create it in ja...
[ 0.46999022364616394, 0.022978443652391434, 0.1414160430431366, -0.11733420193195343, -0.42148929834365845, 0.04049094393849373, 0.23694443702697754, 0.07727264612913132, -0.1826716810464859, -0.6530715227127075, 0.019601013511419296, 0.3089005649089813, -0.23923645913600922, -0.14537547528...
I'd like to write a plugin that does something with the currently edited file in Eclipse. But I'm not sure how to properly get the file's full path. This is what I do now: ``` IFile file = (IFile) window.getActivePage().getActiveEditor.getEditorInput(). getAdapter(IFile.class); ``` Now I have an IFile object, a...
[ -0.0010479539632797241, -0.16445620357990265, 0.8506107330322266, 0.019470704719424248, 0.025529414415359497, -0.106107696890831, 0.26017817854881287, -0.14888669550418854, -0.007141232956200838, -0.8064911365509033, 0.0013821161119267344, 0.8876095414161682, -0.10220262408256531, -0.15075...
What's the difference between [`java.lang.ref.WeakReference`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/ref/WeakReference.html) and [`java.lang.ref.SoftReference`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/ref/SoftReference.html) ? From [Understanding Weak Refer...
[ -0.4134184718132019, -0.003932651598006487, 0.07846341282129288, -0.03188848868012428, -0.126047745347023, 0.2991902828216553, 0.23244959115982056, -0.40488559007644653, -0.24222247302532196, -0.25098806619644165, -0.11962219327688217, 0.3094770908355713, -0.27416613698005676, 0.0626193955...
get the actual > `Widget` object. Of course the weak > reference isn't strong enough to > prevent garbage collection, so you may > find (if there are no strong > references to the widget) that > `weakWidget.get()` suddenly starts > returning `null`. > > > ... > > > **Soft references** > > > A *soft referen...
[ -0.4016057550907135, -0.5400609970092773, 0.6214309930801392, 0.17033791542053223, -0.19566012918949127, -0.3460395336151123, 0.37827742099761963, -0.006141088902950287, -0.2389526665210724, -0.6787087917327881, -0.8233944773674011, 0.3399670124053955, -0.2457592487335205, 0.01161387376487...
the next garbage > collection cycle, but an object which > is softly reachable will generally > stick around for a while. > > > `SoftReferences` aren't *required* to > behave any differently than > `WeakReferences`, but in practice softly > reachable objects are generally > retained as long as memory is in > ...
[ -0.05622376874089241, -0.19196675717830658, 0.6187449097633362, 0.2226230353116989, 0.1493825912475586, -0.31367141008377075, 0.2439974993467331, -0.02094872109591961, -0.41362470388412476, -0.841285765171051, -0.16235782206058502, 0.6710527539253235, 0.29869356751441956, 0.130231946706771...
from the cache) and how badly it needs > the memory they are consuming. And Peter Kessler added in a comment: > The Sun JRE does treat SoftReferences differently from WeakReferences. We attempt to hold on to object referenced by a SoftReference if there isn't pressure on the available memory. One detail: the policy ...
[ -0.10252352803945541, -0.010323764756321907, 0.1606711596250534, 0.022591497749090195, 0.004304487258195877, -0.0006704567931592464, -0.013070700690150261, -0.3546401858329773, -0.3266414403915405, -0.593215823173523, -0.27105656266212463, 0.5188710689544678, 0.13478738069534302, -0.100069...
clear SoftReferences. One size does not fit all.
[ -0.3539787232875824, -0.32228001952171326, 0.4522225260734558, 0.0612911693751812, 0.05841875821352005, 0.22292669117450714, -0.20504851639270782, 0.08593344688415527, -0.19865508377552032, -0.6833980083465576, -0.05883074924349785, 0.6186818480491638, 0.10913170129060745, 0.09653511643409...
This is a design question and good practice question. How do you structure your Java web development such that a lot of logic is not in the JSP file. Should you use any of the JSP tags for if structures or loops. I see a lot of code where the logic is hard to follow because of poorly designed JSP files. And then when y...
[ 0.6381849050521851, 0.08877507597208023, -0.4204002916812897, 0.24445925652980804, -0.0895249992609024, -0.45621758699417114, 0.007067540660500526, -0.062129002064466476, -0.26325300335884094, -0.4212323725223541, 0.1308760941028595, 0.460929811000824, -0.29432517290115356, 0.0638932883739...
Java Web development. I am currently using a combination of Spring, Hibernate, Struts...and work with some Servlet code. There are good practices associated with Java development. Many of us that have worked a while know them. What are some good practices for JSP development. The easiest way to avoid placing logic in...
[ 0.16952072083950043, 0.006490461993962526, -0.18895739316940308, -0.03923427313566208, -0.43924030661582947, -0.30421310663223267, 0.3111204504966736, -0.1848670095205307, -0.32842716574668884, -0.5392673015594482, 0.05776291713118553, 0.536594569683075, -0.3852919638156891, -0.36630874872...
(Java code) in the JSPs by using JSP tag libraries and EL. The most important tag library is [JSTL](http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html). The JSTL tag library provides most of the logic you should ever need to perform in a view, though you may occasionally also use niche 3rd party tag libr...
[ 0.023515745997428894, -0.24026577174663544, 0.4561457633972168, 0.045629069209098816, -0.23637655377388, -0.3294835686683655, -0.15649491548538208, 0.030349399894475937, -0.2934563159942627, -0.7791131734848022, -0.2635844945907593, 0.6576225757598877, -0.27623531222343445, -0.331190586090...
I'm getting quite a few errors in my code. Consequently, I would like to be able to minimize them at the outset or see as many errors as possible before code execution. Is this possible and if so, how can I do this? If you're having problems with syntax, you could try an editor with syntax highlighting. Until you get t...
[ 0.45745477080345154, 0.45788273215293884, -0.04348813369870186, 0.059806544333696365, -0.05233115702867508, -0.1221199557185173, 0.5770232081413269, -0.01193504873663187, -0.1839655339717865, -0.23872040212154388, -0.14473804831504822, 0.6253120303153992, -0.25436362624168396, -0.031613901...
the std lib. The interactive interpreter is a wonderful tool for working with python code, and [IPython](http://ipython.org) is a great improvement over the built-in REPL (Read Eval Print Loop). If you actually want to step through your code, the python debugger is called [pdb](http://docs.python.org/library/pdb.html...
[ 0.0909460037946701, -0.11374048888683319, 0.309935599565506, -0.1845325380563736, -0.2783932685852051, -0.1564236432313919, 0.06832455098628998, -0.10630575567483902, -0.15528932213783264, -0.4837522506713867, -0.32265225052833557, 0.7889410853385925, -0.5015085339546204, -0.31473273038864...
Is there a standard when it comes to implementing keyboard shortcuts / accelerator keys for web applications. Example: Navigating through a list of items presented in a grid Are their guidelines on how to implement this? Google has one for GMail in the "labs" section. Also would it make business sense in investing t...
[ 0.41678211092948914, -0.00855277106165886, -0.13296929001808167, 0.3618986904621124, 0.14509445428848267, -0.2133798450231552, -0.052657350897789, 0.05656580999493599, -0.2189915031194687, -0.38556694984436035, 0.42319202423095703, 0.6186210513114929, -0.10422413796186447, -0.3687261044979...
accessibility options, especially if you want to comply with [ADA Guidelines for the Web](http://webdesign.about.com/od/accessibility/Web_Accessibility_Web_Usability.htm). You should also test your web app with respect to keyboard shortcuts in popular web browsers. Some people use these, and get annoyed when your web ...
[ 0.17316457629203796, 0.18718260526657104, 0.3632477819919586, 0.3476926386356354, -0.030824171379208565, -0.03150570020079613, 0.2678786516189575, -0.23581311106681824, -0.5149434208869934, -0.7787587642669678, 0.04456343129277229, 0.5164528489112854, 0.06663332879543304, -0.37942013144493...
of to the visually adjacent element.
[ -0.38976678252220154, 0.03660094738006592, 0.08693990856409073, -0.20752839744091034, -0.07217709720134735, 0.09634958952665329, -0.18253326416015625, -0.26131871342658997, 0.30672577023506165, -0.5539317727088928, -0.6739357709884644, 0.5001202821731567, -0.2163732945919037, 0.09814647585...
I'd like to have my Eclipse plugin cause a URL to be opened by the users' default browser. This seems like pretty standard behavior, but I haven't been able to find any docs on how to do this. Can anyone help? You are looking for: ``` final IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().createBro...
[ 0.5284374952316284, 0.11103054881095886, 0.2346237152814865, -0.07012934982776642, -0.11034462600946426, -0.31028828024864197, 0.3836997449398041, 0.15422262251377106, -0.16338035464286804, -0.8771272897720337, -0.13511359691619873, 0.5581170320510864, -0.1464664340019226, 0.26073065400123...
This sounds really stupid, but I was told that you could drag-and-drop visual components (including JavaScript or AJAX components?) onto a web page view in ASP.NET MVC and then "customize" the components by editing code behind them once they were in place. Either I misunderstood what I was told or I'm blind and don't s...
[ 0.9041305184364319, -0.20555272698402405, -0.038049932569265366, 0.30418843030929565, -0.07092476636171341, -0.027063516899943352, 0.022600505501031876, 0.022703802213072777, -0.2841475307941437, -0.5821499824523926, 0.32162103056907654, 0.49307167530059814, -0.34021708369255066, -0.328741...
a button over to a view area, and then the HTML/CSS to put the button there would be stubbed out. Then, you could open a code editor and tweak everything exactly how you want it to be. Drag and drop is more suited to standard ASP.NET webforms, not MVC. I think you can still do it in MVC, but only if the controls do not...
[ 0.22010044753551483, -0.5467772483825684, 0.4390788972377777, 0.27906954288482666, -0.18323267996311188, -0.11430605500936508, -0.08389993011951447, -0.09419351071119308, -0.36830100417137146, -0.5871579051017761, 0.08020514994859695, 0.6534578800201416, -0.4616760313510895, -0.08954939246...
CodeIgniter allows access to POSTed data via: ``` $this->input->post('input_name'); ``` where 'input\_name' is the name of a form field. This works well for a static form where each input name in known ahead of time. In my case, I am loading a collection of key/value pairs from the database. The form contains a tex...
[ 0.3361022472381592, 0.026715748012065887, 0.3177029490470886, -0.04758419841527939, -0.29287368059158325, -0.1279972940683365, 0.32872405648231506, -0.022221148014068604, -0.0976087674498558, -0.7462825775146484, -0.2504633665084839, 0.5959806442260742, -0.1759854555130005, 0.0968690738081...
I'm trying to add a Web Reference to a VS2008 .Net 3.5 Console Application but the option's not there. The options to "Add Reference" and "Add Service Reference" are there. Kirk Evans blogged about that very issue [Here](http://blogs.msdn.com/kaevans/archive/2008/03/18/where-the-heck-is-add-web-reference-in-visual-stud...
[ 0.5322160720825195, 0.16938349604606628, 0.18696950376033783, -0.01649368181824684, 0.029559098184108734, -0.08109509944915771, 0.02918335795402527, 0.11726497113704681, -0.13659854233264923, -0.5421836376190186, 0.2318221926689148, 0.7186261415481567, -0.23275402188301086, 0.0957556664943...
I am using a ResourceDictionary, but I would like to be able to look up the value or the key with the other item. Each is always unique, so that is not a problem. Is there a type that has this double sided lookup feature? Not built in, but this is pretty easy to write. I would probably implement IDictionary for this th...
[ 0.6823015213012695, -0.2557991147041321, 0.4599107801914215, -0.1281929612159729, 0.1179441288113594, 0.041184201836586, 0.09958983212709427, -0.26416248083114624, -0.3132811188697815, -0.7095779180526733, -0.10149680078029633, 0.6928057074546814, -0.6076139211654663, 0.094691202044487, ...
value); this.values.Add(value, key); } public TKey GetKeyFromValue(TValue value) { return this.values[value]; } public TValue GetValueFromKey(TKey key) { return this.keys[key]; } } ```
[ 0.375240683555603, -0.42837685346603394, 1.0088917016983032, -0.27506205439567566, 0.09006484597921371, -0.15787921845912933, 0.49384844303131104, -0.2152341604232788, -0.17712967097759247, -0.6455416679382324, -0.5543373227119446, 1.070521593093872, -0.43860018253326416, 0.264493495225906...
When I call this function, everything works, as long as I don't try to recursively call the function again. In other words if I uncomment the line: ``` GetChilds rsData("AcctID"), intLevel + 1 ``` Then the function breaks. ``` <% Function GetChilds(ParentID, intLevel) Set rsData= Server.CreateObject("...
[ -0.12508831918239594, -0.1094338670372963, 0.57436203956604, -0.31661802530288696, 0.0395839624106884, 0.0013041732599958777, 0.528363049030304, -0.24411487579345703, -0.07535731047391891, -0.7652319073677063, -0.3200663924217224, 0.5823894739151001, -0.3996988534927368, 0.3013899028301239...
Response.Write("Empty") Else Do Until rsData.EOF Response.Write rsData("AcctID") & "<br />" 'GetChilds rsData("AcctID"), intLevel + 1 rsData.MoveNext Loop
[ -0.19595305621623993, -0.3403039574623108, 0.6208208203315735, -0.3101174831390381, -0.03901994973421097, 0.16947011649608612, 0.46003225445747375, -0.49169284105300903, -0.29042738676071167, -0.5979453325271606, -0.3512422740459442, 0.2845594882965088, -0.49252066016197205, 0.120974548161...
End If rsData.close: set rsData = nothing End Function Call GetChilds(1,0) %> ``` \*Edited after feedback Thanks everyone, Other than the usual error: ``` Error Type: (0x80020009) Exception occurred. ``` I wasn't sure what was causing the problems. I understand that is probably due to a couple o...
[ -0.24928927421569824, 0.030096514150500298, 0.6425323486328125, -0.15981291234493256, 0.0659220740199089, -0.10398976504802704, 0.523033618927002, -0.1669779121875763, -0.1052238792181015, -0.4095399081707001, -0.2259022742509842, 0.27077439427375793, -0.5632990598678589, 0.334599912166595...
1 4 2 5 2 6 3 7 4 ``` The idea is so that I can have a Master Account with Child Accounts, and those Child Accounts can have Child Accounts of their Own. Eventually there will be Another Master Account with a ParentID of Null that will have childs of its own. With that in mind, am I going ...
[ 0.46579164266586304, 0.4357878565788269, 0.1383979171514511, 0.23181377351284027, 0.12797579169273376, 0.1722537875175476, 0.22461111843585968, 0.20409677922725677, -0.05951714515686035, -0.4819646179676056, 0.16344811022281647, 0.47429144382476807, 0.16644012928009033, 0.34365949034690857...
error: > Error Type: (0x80020009) Exception > occurred. I wasn't sure what was causing the problems. I understand that is probably due to a couple of factors. 1. Not closing the connection and attempting to re-open the same connection. 2. To many concurrent connections to the database. The database content is as f...
[ -0.24529731273651123, -0.01756516844034195, 0.5519235134124756, -0.0243605375289917, 0.1778639554977417, 0.0005199348670430481, 0.4403005838394165, 0.3059116303920746, -0.28602707386016846, -0.46354374289512634, 0.1055169627070427, 0.3860872983932495, -0.5909320116043091, 0.529582679271698...
4 ``` The idea is so that I can have a Master Account with Child Accounts, and those Child Accounts can have Child Accounts of their Own. Eventually there will be Another Master Account with a ParentID of Null that will have childs of its own. With that in mind, am I going about this the correct way? Thanks for the ...
[ 0.42382675409317017, 0.46203625202178955, 0.2002158910036087, 0.2758141756057739, 0.2972600758075714, 0.2160414606332779, 0.19842937588691711, 0.05894193798303604, -0.21334119141101837, -0.5484673976898193, 0.13569843769073486, 0.5370872616767883, -0.1406366527080536, 0.4574952721595764, ...
out of connections if you recurse too many times. Another option is to read the contents of each RecordSet into a disconnected collection: (Dictionary, Array, etc) so you can close the connection right away. Then iterate over the disconnected collection. If you're using SQL Server 2005 or later there's an even better...
[ -0.1293872445821762, -0.07403001189231873, 0.0754719078540802, 0.17994973063468933, 0.09280877560377121, -0.23247869312763214, 0.12640972435474396, -0.0826842412352562, -0.4916481375694275, -0.43334561586380005, -0.06421124935150146, 0.25619053840637207, -0.4493117928504944, 0.489175230264...
string. Finally, this code is probably okay because I doubt the user is allowed to input an id number directly. However, the dynamic sql technique used is very dangerous and should generally be avoided. Use query parameters instead to prevent sql injection. I'm not too worried about not using `intLevel` for anything....
[ 0.0574699342250824, 0.005625982768833637, 0.2204018086194992, 0.08126450330018997, -0.2583281993865967, -0.27607598900794983, 0.25451144576072693, -0.008256122469902039, -0.013287177309393883, -0.48716992139816284, 0.23937159776687622, 0.6159855127334595, -0.3901137113571167, 0.10470710694...
I've been trying to build a simple prototype application in Django, and am reaching the point of giving up, sadly, as it's just too complicated (I know it would be worth it in the long-run, but I really just don't have enough time available -- I need something up and running in a few days). So, I'm now thinking of goin...
[ 0.5381083488464355, 0.2393014281988144, 0.17242486774921417, 0.046524230390787125, -0.07036212086677551, -0.06625010073184967, 0.21289686858654022, 0.3365584909915924, -0.33467575907707214, -0.5813582539558411, 0.2070930153131485, 0.5058798789978027, -0.03864236921072006, 0.001965954201295...
and it may be that libraries don't exist for what I need in PHP. So I'm wondering how easy / possible it is for a PHP script to "call" a Java program or Python script or a program or script in another language. It's not entirely clear to me what exactly I mean by "call" in this context, but I guess I probably mean that...
[ 0.2948620617389679, 0.11784207075834274, -0.09275443851947784, 0.09937230497598648, -0.10812322795391083, -0.12752096354961395, 0.16866503655910492, 0.07975342124700546, -0.16904203593730927, -0.36807042360305786, -0.07769130170345306, 0.6713074445724487, -0.40847569704055786, -0.147797077...
PHP) will be to pass control directly to the external program explicitly through a POST or GET to a CGI program or similar. Feel free to convince me I should stick with Django, although I'm really at the point where I just can't figure out what model I need to produce the HTML form I want, which seems such a basic thi...
[ 0.4057052731513977, 0.195857435464859, 0.3780220150947571, 0.31428247690200806, -0.4699377119541168, -0.3053913116455078, 0.08399466425180435, 0.05010661482810974, -0.009063216857612133, -0.22968079149723053, 0.1359594464302063, 0.5380263924598694, -0.2743047773838043, -0.27405020594596863...
HTML form I want, which seems such a basic thing that I fear for my chances of doing anything more complex" Common problem. Root cause: Too much programming. Solution. Do less programming. Seriously. Define the Django model. Use the default admin pages to see if it's right. Fix the model. Regenerate the database. ...
[ 0.36184045672416687, 0.00020754597790073603, 0.7902876734733582, 0.13592073321342468, -0.3141286373138428, -0.312227725982666, 0.32657554745674133, -0.2605912983417511, -0.12726101279258728, -0.8621154427528381, -0.01549913827329874, 0.5390536785125732, -0.4941639304161072, -0.383042335510...
work. Now you can start working on other presentations of the data. Django generally starts (and ends) with the model. The forms, view and templates are derived from the model.
[ 0.49427294731140137, 0.2463391125202179, 0.027449611574411392, 0.024462010711431503, -0.10637053847312927, -0.44946539402008057, -0.18686465919017792, -0.05696854367852211, -0.22342275083065033, -0.61077481508255, -0.2646130919456482, 0.578510046005249, -0.1883072704076767, -0.237635865807...
I have a string of test like this: ``` <customtag>hey</customtag> ``` I want to use a RegEx to modify the text between the "customtag" tags so that it might look like this: ``` <customtag>hey, this is changed!</customtag> ``` I know that I can use a MatchEvaluator to modify the text, but I'm unsure of the proper ...
[ 0.6466788053512573, 0.02491939067840576, 0.37886589765548706, 0.01108818594366312, -0.04767797887325287, 0.05740893632173538, 0.1744707226753235, -0.05850044637918472, -0.18783855438232422, -0.9197579622268677, 0.2926446199417114, 0.589427649974823, -0.5309313535690308, 0.07570849359035492...
I am trying to use a Generic Linked List to hold some WorkFlow steps in my application. Here is how I'm persisting it to my database. OrderID  WorkFlowStepID  ParentWorkFlowStepID 178373    1                         NULL 178373    2                         1 178373    3                         2 I get this...
[ -0.020009759813547134, -0.06148235499858856, 0.5216332674026489, -0.18731550872325897, -0.18531925976276398, 0.14622263610363007, 0.22528091073036194, -0.2886056900024414, -0.1869000345468521, -0.6223272681236267, 0.1564253866672516, 0.24774202704429626, -0.5571058988571167, 0.199888423085...
the new object's ParentWorkFlowStepID. I can't figure out of to find the object in the LinkedList. The find() method is asking for a value, but I don't understand what value it is, or how I can find it. So do you mean you're using the [linked list class in the framework](http://msdn.microsoft.com/en-us/library/he2s3bh7...
[ 0.044276490807533264, -0.03782733529806137, 0.2956387400627136, -0.0059679774567484856, -0.049490153789520264, -0.21256770193576813, 0.15293973684310913, -0.09536876529455185, -0.13992787897586823, -0.7284603714942932, -0.18400318920612335, 0.5969265103340149, -0.35307976603507996, 0.25482...
LinkedListNode<T> current = list.First; while (current != null) { yield return current; current = current.Next; } } ``` Then you can do (and I stress all of this is untested): ``` var node = list.GetNodes().FirstOrDefault(x.Value.WorkFlowerStepID = parentWorkFlowStepID); if (node != null)...
[ 0.067365363240242, -0.4961261749267578, 0.8063287138938904, -0.15371763706207275, 0.2806360423564911, -0.15984739363193512, 0.27395740151405334, -0.1487397402524948, -0.30582067370414734, -0.5596778392791748, 0.011418076232075691, 0.36069971323013306, -0.5498436689376831, 0.335022449493408...
Are there any issues with changing elements which will appear on a web page within a thread. I am from a windows programming background and obviously if a thread needs to change the GUI in some way you have to delegate it to the GUI thread. Basically my page uses 3 sql queries which can be run concurrently to obtain t...
[ 0.4229598045349121, 0.3593151271343231, 0.3362181782722473, -0.056648269295692444, -0.11597253382205963, -0.08163230121135712, 0.4187343418598175, -0.29528671503067017, -0.2814255952835083, -0.66791170835495, 0.37652072310447693, 0.5465133786201477, -0.6015380024909973, 0.07863188534975052...
queries are for very different data it is definitely fastest to run 3 separate queries and running them at the same time makes it even faster (In terms of how long it takes the page to display). Edit: The threads are joined in the page load event You're going to have to join all 3 threads before rendering the page. On...
[ 0.19375528395175934, -0.010543093085289001, 0.5883049368858337, 0.23657405376434326, -0.39557787775993347, 0.13166655600070953, 0.4600648283958435, -0.18550989031791687, -0.475410133600235, -0.827850341796875, -0.1004071980714798, 0.29295819997787476, -0.2716427147388458, 0.286632537841796...
In C# if I want to convert a double (1.71472) to an int then I get the answer 2. If I do this in Java using intValue() method, I get 1 as the answer. Does Java round down on conversions? Why do the Java API docs have such scant information about their classes i.e. > Returns the value of the specified > number as a...
[ -0.07622307538986206, -0.051953092217445374, 0.19904258847236633, -0.42369580268859863, -0.394955575466156, 0.10600359737873077, 0.2002626359462738, -0.44957634806632996, -0.2781761586666107, -0.49221864342689514, 0.0615166537463665, 0.38722896575927734, -0.3907409608364105, -0.33808439970...
the casting conversion. It's `Convert.ToInt32` that rounds: ``` double d = 1.71472; int x = (int) d; // x = 1 int y = Convert.ToInt32(d); // y = 2 ``` Details can be found in the [Java Language Specification](http://java.sun.com/docs/books/jls/third_edition/html/conversions.html). Note that while the documentation c...
[ 0.3333891034126282, 0.1063876673579216, -0.09262961894273758, -0.46670955419540405, -0.4317947328090668, 0.4663228392601013, 0.04995153471827507, -0.8568825125694275, -0.09576450288295746, -0.4163099527359009, 0.2696863114833832, 0.40422287583351135, -0.2476940006017685, -0.159770160913467...
I know this specific question has been [asked before](https://stackoverflow.com/questions/185235/jquery-tabs-getting-newly-selected-index), but I am not getting any results using the `bind()` event on the `jQuery UI Tabs` plugin. I just need the `index` of the newly selected tab to perform an action when the tab is c...
[ 0.01403982937335968, -0.24139858782291412, 0.32126256823539734, -0.06641757488250732, -0.014705957844853401, -0.13826614618301392, 0.18071074783802032, -0.28945639729499817, -0.1656569242477417, -0.4838811755180359, -0.32025042176246643, 0.379168838262558, -0.4034940302371979, 0.1080861613...
this code, the ui object comes back `undefined`**. From the documentation, this should be the object I'm using to hook into the newly selected index using ui.tab. I have tried this on the initial `tabs()` call and also on its own. Am I doing something wrong here? **For JQuery UI versions before 1.9**: `ui.index` from t...
[ 0.19973541796207428, -0.09224627166986465, 0.17953917384147644, 0.08666059374809265, 0.15512695908546448, 0.032993584871292114, -0.019724996760487556, -0.11597444117069244, -0.3428589105606079, -0.7023102045059204, -0.1672433465719223, 0.30617114901542664, -0.2994643449783325, -0.008370303...
I am writing a text editor for Mac OS X. I need to display hidden characters in an NSTextView (such as spaces, tabs, and special characters). I have spent a lot of time searching for how to do this but so far I have not found an answer. If anyone could point me in the right direction I would be grateful. Have a look at...
[ 0.0442960262298584, -0.009606046602129936, 0.3260115385055542, 0.08068717271089554, 0.02370297536253929, 0.10670775175094604, 0.16281403601169586, 0.3527791202068329, -0.11303897947072983, -1.2552582025527954, 0.048438843339681625, 0.45369747281074524, -0.16780643165111542, 0.0567117743194...
the screen). In your case, you would probably be most interested in the `[replaceGlyphAtIndex:withGlyph:](http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSLayoutManager_Class/Reference/Reference.html#//apple_ref/occ/instm/NSLayoutManager/replaceGlyphAtIndex:withGlyph:)` method, which w...
[ 0.1421123892068863, 0.2730618417263031, 0.4471745193004608, 0.08642815053462982, -0.1189313679933548, 0.23150043189525604, -0.10973398387432098, 0.2484937161207199, -0.4312387704849243, -0.7621893882751465, -0.25952377915382385, 0.5943629145622253, -0.2942003607749939, -0.06734541058540344...
Assuming a class called `Bar` in a namespace called `foo`, which syntax do you prefer for your source (.cpp/.cc) file? ``` namespace foo { ... void Bar::SomeMethod() { ... } } // foo ``` or ``` void foo::Bar::SomeMethod() { ... } ``` I use namespaces heavily and prefer the first syntax, but when adding c...
[ 0.47424209117889404, 0.24303430318832397, -0.04999282956123352, -0.11976539343595505, 0.06317342072725296, -0.040482938289642334, -0.012136462144553661, -0.050354622304439545, -0.013682078570127487, -0.6198434829711914, -0.16345012187957764, 0.780371904373169, -0.2351519912481308, -0.14886...
the function definition. Also, with your first method, slippy errors could show up: ``` namespace bar { struct foo { void f(); }; } namespace baz { struct foo { void f(); }; } using namespace bar; using namespace baz; void foo::f() { // which foo?? } ``` Because it looks in the current scope (there it...
[ -0.2068130522966385, -0.03440775349736214, 0.18428882956504822, -0.04957016184926033, 0.018918780609965324, 0.1646345853805542, 0.251920223236084, -0.14188173413276672, -0.151949942111969, -0.5527152419090271, -0.09732334315776825, 0.6189736723899841, -0.5774216651916504, 0.043206468224525...
SomeMethod to which namespace it belongs, but you have a namespace scope around it and you can easily look it up. Additionally, it is clear now that Bar refers to namespace foo. The second way you show would be too much typing for me actually. In addition, the second way can cause confusion among new readers of your ...
[ 0.30049875378608704, 0.050187353044748306, -0.004028001334518194, -0.13403992354869843, -0.2503184676170349, -0.04942099004983902, 0.027274034917354584, 0.12600412964820862, -0.16958999633789062, -0.4306308329105377, 0.08575072139501572, 0.33701658248901367, -0.4118407666683197, 0.12579467...
I was reading about the `debuggerstepperboundary` attribute and a site says it is is useful in a context switch. What exactly is a context switch? I'm assuming it is a switch from one thread to another, or in execution or security context? However, these are not particularly educated guesses so I'm asking here. Contex...
[ 0.2819433808326721, -0.26163923740386963, -0.04967622458934784, 0.23664191365242004, 0.2273091822862625, -0.06349256634712219, -0.0167485810816288, 0.2792326509952545, -0.3647890090942383, -0.6387944221496582, 0.11442897468805313, 0.25930851697921753, -0.218597874045372, 0.3181783556938171...
from thinking about A to thinking about B". [Wikipedia](http://en.wikipedia.org/wiki/Context_switch)
[ 0.49179309606552124, -0.32743072509765625, -0.07203631848096848, -0.2533896565437317, -0.2169889360666275, 0.011902018450200558, 0.23655973374843597, -0.053786132484674454, -0.5185889005661011, -0.455049067735672, 0.3191491365432739, 0.44691261649131775, -0.24151919782161713, -0.1287562400...
I've got a css menu like this: ``` <ul> <li><a>Item1</a></li> <li><a>Item Two</a></li> <li><a>Item C</a></li> <li><a>A Rather Long Menu Item Down Here</a></li> </ul> ``` I want to create this: ``` |-----------------------------------| | Item1 | |---------------------------------...
[ -0.07305261492729187, 0.10332614183425903, 0.17910993099212646, -0.1208326518535614, -0.10295061767101288, 0.3823404014110565, -0.07230308651924133, 0.2103404998779297, -0.23529478907585144, -0.9390580654144287, 0.012294852174818516, 0.14936210215091705, -0.2723155915737152, 0.136027023196...
| |-----------------------------------| | A Rather Long Menu Item Down Here | |-----------------------------------| ``` but I'm getting this: ``` -------- | Item1 | |----------- | Item Two | |----------- | Item C | |----------------------------------- | A Rather Long Menu Item Down Here | ---------------------...
[ -0.21543097496032715, -0.02786530926823616, 0.6698951721191406, -0.17357854545116425, 0.048242710530757904, 0.10166951268911362, 0.07598597556352615, -0.18081161379814148, -0.33969593048095703, -0.8481401205062866, -0.5322539210319519, 0.43903782963752747, -0.14172928035259247, -0.06677859...
Update: `width:1px, overflow:visible` didn't work. (Got the same squashed effect as without the display:blocked anchors.) This is for an intranet where IE6 is the target, so I'm stuck there. (In other projects, I've stopped worrying about it.) JS is a requirement, so maybe I'll use that. (I always hate doing that, th...
[ 0.5101543068885803, 0.020467616617679596, 0.4296654462814331, -0.09456757456064224, -0.15369270741939545, -0.3054521381855011, 0.6534484624862671, 0.455369770526886, -0.3113994300365448, -1.1487210988998413, -0.32517609000205994, 0.5936352014541626, -0.3177926242351532, -0.1524835526943206...
worry about IE6 quirks too much anymore.
[ 0.6876239776611328, 0.21251967549324036, 0.15188433229923248, 0.2949729561805725, -0.10962807387113571, -0.3319441080093384, 0.1625014692544937, 0.024896711111068726, -0.08937389403581619, -0.5044913291931152, 0.03008383885025978, 0.4196215569972992, 0.1452368199825287, -0.1011634841561317...
Recently there has been quite some hype around all the different mocking frameworks in the .NET world. I still haven't quite grasped what is so great about them. It doesn't seem to be to hard to write the mocking objects I need myself. Especially with the help of Visual Studio I quickly can write a class that implement...
[ 0.6314070820808411, 0.47802749276161194, -0.06140471249818802, 0.2946587800979614, -0.38475000858306885, 0.009075252339243889, 0.5991908311843872, 0.23673802614212036, -0.22004838287830353, -0.5817458629608154, 0.4459949731826782, 0.5753220319747925, 0.006590992212295532, 0.076087936758995...
a few lines of code. Or is a mocking framework not only about saving lines of code? Once I finally got the hang of mock objects, I realized that they're essential for unit testing for the same reason that double blind testing or control groups are essential for scientific trials: they isolate what you're actually testi...
[ 0.4873834550380707, 0.22489306330680847, -0.2573860287666321, 0.417491614818573, -0.4141337275505066, 0.2524556815624237, 0.8134685158729553, -0.11438727378845215, 0.01154868770390749, -0.5066052079200745, 0.05079004168510437, 0.11597117781639099, 0.04887029528617859, -0.05529562756419182,...
an unexpected method is called" or "exception if these methods are called out of order". You can get remarkably sophisticated with mock frameworks, and though I'll quickly admit there's a large learning curve, when you get up to speed they'll help make your unit tests more thorough without being bloated.
[ 0.37118104100227356, 0.22087636590003967, -0.37223872542381287, 0.1780666559934616, -0.09286549687385559, -0.14510613679885864, 0.4774453341960907, -0.4302530288696289, -0.33802059292793274, -0.4994954466819763, -0.2157302349805832, 0.3432075083255768, 0.2923533618450165, -0.11999889463186...
Are there some help resources, or can anyone give me a brief Idea how I would configure the .net 2 runtime security policies for the following scenario: I have a windows forms control hosted in IE. The control tries to read from a serial port and write to the event log. Both of these operations fail due to security re...
[ 0.04977697506546974, -0.003005807986482978, 0.45366913080215454, -0.08703699707984924, 0.08320420235395432, -0.24555227160453796, 0.6245964765548706, -0.2098764181137085, -0.04212641716003418, -0.6465362906455994, -0.08283840864896774, 0.4790818989276886, -0.26831138134002686, 0.1165567860...
I still have the problem. I am pretty sure the answer isin the runtime security policies in the .net 2.0 configuration but I just don't know what to change. Try the following: Control Panel -> Administrative Tools -> Microsoft .NET Framework 2.0 Configuration Expand out and select: .Net Framework 2.0 Configuration -...
[ 0.33407676219940186, 0.03372548893094063, 0.4000166952610016, 0.20310695469379425, 0.18642941117286682, -0.14357490837574005, 0.186172753572464, -0.15500089526176453, -0.04232358932495117, -0.8021612763404846, -0.21856476366519928, 0.5879523754119873, -0.13375666737556458, 0.03238581120967...
Tab Change the "Permission Set" combo to "Full Trust" The "Membership Permission" tab may also lend some clues to which one is correct. Info on [Code Access Security](http://www.emmet-gray.com/Articles/CodeAccessSecurity.htm)
[ 0.2890784442424774, -0.16166748106479645, 0.4022780656814575, 0.2665773332118988, 0.19672195613384247, -0.6926966309547424, 0.5671144723892212, -0.4430846869945526, -0.1182858794927597, -0.2995713949203491, -0.16683447360992432, 0.7054675221443176, -0.15416210889816284, 0.00423603784292936...
What is the differences between those 2 assuming I'm using SQL Server as my database? Are they the same? This [post](http://blogs.microsoft.co.il/blogs/sasha/archive/2008/07/01/linq-to-sql-more-useful-than-you-d-think.aspx) points to some info. in particular 3 main differences: * The ability to query relational stores...
[ -0.10997438430786133, 0.19127719104290009, 0.3188535273075104, 0.130697101354599, -0.09924254566431046, -0.023040806874632835, 0.04664302244782448, -0.022470921277999878, -0.28318971395492554, -0.5662241578102112, 0.12655436992645264, 0.3888814449310303, -0.06956309080123901, -0.0314006507...
i am programatically adding Webcontrols in to a User Control i am also adding a javascript event passing the controlID as a parameter but the clientID is the one i assigned a it does not contain the one that asp.net generates ``` var txt = new TextBox(); txt.ID = "MyID"+Number; chkBox.Attributes.Add("onClick...
[ -0.005355841480195522, -0.03056127391755581, 0.7139857411384583, 0.14149312674999237, -0.04026220366358757, -0.12344573438167572, 0.04772514849901199, -0.3704070448875427, -0.025932110846042633, -0.8081353902816772, -0.12605206668376923, 0.4054736793041229, -0.4455828070640564, -0.02849629...
var txt = new TextBox(); txt.ID = "MyID"+Number; Controls.Add ( txt ); chkBox.Attributes.Add("onClick", "EnableTxtBox('" +txt.ClientID + "');"); ``` ControlCollection is no ordinary collection; it notifies the owner control when controls are added, and the control can take appropriate actions.
[ -0.03698185458779335, -0.2828802466392517, 0.41445738077163696, -0.13129426538944244, 0.3048735558986664, -0.1348903775215149, 0.13069429993629456, -0.3691462576389313, -0.13106966018676758, -0.4841236472129822, -0.5586651563644409, 0.5317044258117676, -0.4931577146053314, 0.16122393310070...
I have HTML code edited by FCKEditor stored in a database and would like to display (well render) it onto a view. So, for instance, something stored as: ``` &lt;&gt;pre&lt;&gt;This is some sample text&lt;&gt;pre&lt;/&gt ``` Will be displayed to the user as: ``` This is some sample text ``` (With the appropriate s...
[ 0.30620595812797546, 0.036717068403959274, 0.49060291051864624, -0.2154238373041153, -0.175062894821167, 0.010202687233686447, 0.21207790076732635, -0.05710335448384285, -0.017194585874676704, -0.7095868587493896, -0.12194273620843887, 0.3930303752422333, -0.14753815531730652, 0.0835342183...
Observing one year of estimations during a project I found out some strange things that make me wonder if evidence based scheduling would work right here? * individual programmers seem to have favorite numbers (e.g. 2,4,8,16,30 hours) * the big tasks seem to be underestimated by a fix value (about 2) but the standard ...
[ 0.27286094427108765, -0.10333976149559021, 0.03585493937134743, 0.34606069326400757, 0.0645524114370346, 0.21573054790496826, 0.6140186786651611, -0.12817779183387756, -0.5054043531417847, -0.8024053573608398, -0.01931816153228283, 0.3154643177986145, 0.18578481674194336, -0.36829009652137...
hour too, but take a day So, is it really a good idea to let the programmers break down the 30 hours task down to 4 or 2 hours steps during estimations? Won't this raise the standard deviation? (Ok, let them break it down - but perhaps after the estimations?!) * Yes, your observations are exatly the sort of problems E...
[ 0.356180876493454, -0.22165881097316742, 0.2285163700580597, 0.23947472870349884, -0.18552209436893463, -0.028085414320230484, 0.15723535418510437, -0.23607255518436432, -0.2518426775932312, -0.5960459113121033, 0.1382284164428711, 0.6988090872764587, -0.013885840773582458, -0.192869350314...
that's ok!) + If you have tasks that are estimated at 3+ days, see if there might be a way to break them up into pieces. There should be. If the estimator says there is not, make them defend that assertion. If it turns out that the task really just takes 3 days, fine, but the more of these you have, the more you shoul...
[ 0.5217069983482361, 0.05039817839860916, 0.40887004137039185, 0.2647964358329773, 0.024113906547427177, -0.03571484610438347, 0.7184993624687195, 0.021517407149076462, -0.6096036434173584, -0.33780089020729065, -0.06438440084457397, 0.4074661135673523, -0.04653242975473404, 0.0598138496279...
to take longer than 5 days and it can't be broken down, tell them you want them to spend 4 hrs thinking about the problem, and how it can be broken down. Remember, that's a task, btw. * As you and your team practice this, you will get better at estimating. * ...You will also start to recognize patterns of failure, and ...
[ 0.5103038549423218, -0.04477866739034653, 0.04293609783053398, 0.18202762305736542, 0.26543793082237244, 0.07953604310750961, 0.35216179490089417, -0.3215829133987427, -0.38422560691833496, -0.5826764702796936, -0.13930362462997437, 0.33697521686553955, 0.331581711769104, -0.17251953482627...
Why is it bad to check in lines with trailing whitespace to your source control? What kinds of problems could that cause? False differences, basically. It's helpful if diffs only show "real" changes. Some diff programs will ignore whitespace, but it would be better just to avoid the dummy change in the first place. Of...
[ 0.31392523646354675, -0.013159992173314095, 0.19400271773338318, 0.24942106008529663, -0.23772971332073212, -0.021354220807552338, 0.4061001241207123, 0.19015809893608093, -0.24646155536174774, -0.30612778663635254, 0.17404569685459137, 0.0036825749557465315, -0.4629124104976654, 0.1143938...
When we talk about the .NET world the CLR is what everything we do depends on. What is the minimum knowledge of CLR a .NET programmer must have to be a good programmer? Can you give me one/many you think is/are the most important subjects: GC?, AppDomain?, Threads?, Processes?, Assemblies/Fusion? I will very much app...
[ 0.571965217590332, 0.1536405384540558, 0.38132989406585693, 0.24904665350914001, -0.19290581345558167, -0.22979943454265594, -0.23474763333797455, 0.08929465711116791, -0.30808690190315247, -0.3248279094696045, 0.10058951377868652, 0.5817399024963379, -0.1786068230867386, -0.07942373305559...
.NET libraries, it is rather to understand how does the execution environment (in which those libraries live on runtime) work. My question was directly inspired by John Robbins the author of "Debugging Applications for Microsoft® .NET" book (which I recommend) and colleague of here cited Jeffrey Richter at Wintellect...
[ 0.44876280426979065, 0.17168155312538147, -0.215637668967247, 0.08916305005550385, -0.2344924360513687, -0.44239962100982666, 0.1956297904253006, -0.11362848430871964, -0.2401633858680725, -0.3894943594932556, -0.14145620167255402, 0.3655359745025635, -0.42796996235847473, -0.0968199670314...
If you haven't allready, read this book! Most of those are way deeper than the kind of thing many developers fall down on in my experience. Most misunderstood (and important) aspects in my experience: * Value types vs reference types * Variables vs objects * Pass by ref vs pass by value * Delegates and events * Distin...
[ 0.22685375809669495, 0.38438642024993896, -0.02600332535803318, 0.148347407579422, -0.285905659198761, 0.1160673201084137, 0.5572102665901184, -0.0755457878112793, -0.027444295585155487, -0.4290218651294708, -0.1395389437675476, 0.5885878205299377, -0.34541115164756775, 0.17131832242012024...
`x` is a reference to a string with 5 letters Obviously the first two are okay in "casual" conversation, but only if everyone involved understands the real situation.
[ 0.30718064308166504, 0.024998335167765617, 0.32328447699546814, 0.051313359290361404, -0.2649669945240021, 0.025299150496721268, 0.4723632335662842, 0.2550366222858429, -0.16124822199344635, -0.20439103245735168, -0.42074140906333923, -0.027254896238446236, -0.21082265675067902, 0.14340022...
I try to write a simple client/server application (all application is a bluetooth service and client). The client code find the bluetooth devices and register in to the local db. But when the inquiry running, it's not discoverable. (The server code run on another thread). I the emulator it's work (the scan time is 0), ...
[ 0.3070107698440552, 0.2293677181005478, 0.6615850329399109, -0.08320271223783493, -0.09041154384613037, -0.1992173045873642, 0.7870147824287415, -0.39234164357185364, 0.193197563290596, -0.7255335450172424, 0.00781828723847866, 0.6926091909408569, -0.13589301705360413, -0.03700565174221992...
will not respond to other device's inquiry for discover.
[ 0.2979610562324524, 0.18635675311088562, 0.585465669631958, 0.2904447317123413, 0.28355345129966736, -0.3503747284412384, 0.10261687636375427, 0.04958188906311989, 0.35074296593666077, -0.5186179876327515, -0.4262271225452423, 0.4196622967720032, -0.1543261855840683, 0.007535948883742094, ...
``` (define a 42) (set! 'a 10) (define a 42) (define (symbol) 'a) (set! (symbol) 10) (define a (cons 1 2)) (set! (car a) 10) ``` I tried running them in DrScheme and they don't work. Why? Think of set! is a special form like define which does not evaluate its first operand. You are telling the scheme interpreter ...
[ 0.3939390778541565, 0.2759833335876465, -0.02047940343618393, -0.43082720041275024, -0.07845011353492737, 0.11394628882408142, 0.5153726935386658, -0.6979479789733887, 0.06374441087245941, -0.4086686372756958, -0.19653330743312836, 0.7563796043395996, -0.648699164390564, 0.0083960117772221...
a valid binding). For the last set of expressions, if you want to set the car of a pair, use the function (set-car! pair val) which works just like any scheme function in that it evaluates all of its operands. It takes in two values, a pair and some scheme value, and mutates the pair so that the car is now pointing to...
[ 0.2302778661251068, -0.11898235976696014, 0.5044811367988586, -0.1017037183046341, -0.16218562424182892, -0.027804937213659286, 0.020831404253840446, -0.6645734906196594, 0.262499064207077, -0.45950934290885925, -0.20159561932086945, 0.6848052740097046, -0.4757597744464874, 0.1129420846700...
How do get the startup path ( system.windows.forms.application.StartupPath ) of my exe without adding a reference to system.windows.forms? You could try ``` System.AppDomain.CurrentDomain.BaseDirectory ``` which would work for most cases.
[ 0.30242958664894104, -0.18497228622436523, 0.5941770076751709, 0.04977322742342949, 0.310687780380249, -0.02358872815966606, 0.07058759778738022, 0.21606315672397614, -0.05289822071790695, -0.7976115942001343, 0.09941182285547256, 0.5166245102882385, -0.21671836078166962, 0.199291080236434...
My application is a viewer for a custom format, a zip file with a well defined XML manifest and resources, such as images and movies. I use zlib to open up the zip file in memory and then proceed to display said resources. One problem I've ran into is that I'm unable to properly display videos, apparently because QTM...
[ 0.6701728701591492, 0.2500864267349243, 0.5777466297149658, 0.11039774864912033, 0.16407842934131622, -0.05981826037168503, 0.22700715065002441, -0.21763427555561066, 0.04326074570417404, -0.5465410351753235, 0.01644076593220234, 0.7363103032112122, -0.003092915052548051, 0.146483495831489...
resorted to using QTDataReference in the following mannner: ``` NSData *movieData = ...read from memory...; QTDataReference *movieDataReference = [[QTDataReference alloc] initWithReferenceToData:movieData name:fileName MIMEType:@"video/x-m4v"]; QTMovie *mov = [QTMovie movieWithDataReference:movieDataReference error:&e...
[ 0.11649215221405029, 0.09810417890548706, 0.5105424523353577, 0.004469917621463537, 0.26223886013031006, -0.03529239445924759, 0.5337885618209839, -0.19611084461212158, -0.18102045357227325, -0.49288350343704224, -0.22094076871871948, 1.0712064504623413, -0.13137486577033997, 0.24824513494...
it? Thanks! The problem your having is that m4v and m4p dont have a mime types registered with Launch Services (probably because the mime type for m4v and m4p is not standard). In any event, what you should probably do is handle edge cases like this and then check for nil when the function returns (in case the extensi...
[ 0.45488590002059937, -0.03531511127948761, 0.3238397240638733, 0.4102650582790375, 0.12202093750238419, -0.3654234707355499, 0.12849026918411255, 0.23306770622730255, -0.24752841889858246, -0.2717541754245758, -0.14547036588191986, 0.5864489674568176, -0.19211731851100922, 0.12264770269393...
your method: ``` -(NSString*)mimeTypeForExtension:(NSString*)ext { NSAssert( ext, @"Extension cannot be nil" ); NSString* mimeType = nil; CFStringRef UTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (CFStringRef)ext, NULL); if( !UTI ) return nil; CFStringRef regis...
[ -0.03390726074576378, -0.2228393405675888, 0.5844544172286987, 0.10666391253471375, 0.235033318400383, -0.005359895061701536, 0.6139086484909058, -0.47429579496383667, 0.017727941274642944, -0.8056430816650391, -0.16075584292411804, 0.6544628143310547, -0.06310456246137619, 0.3288317918777...
[ext isEqualToString:@"m4p"] ) mimeType = @"audio/x-m4p"; // handle anything else here that you know is not registered } else { mimeType = NSMakeCollectable(registeredType); } CFRelease(UTI); return mimeType; } ```
[ 0.32686737179756165, -0.103717140853405, 0.42397502064704895, 0.047199759632349014, 0.4863261878490448, -0.23526807129383087, 0.5452117323875427, -0.30657413601875305, -0.09347917139530182, -0.5799416899681091, -0.25383609533309937, 0.7265489101409912, -0.2894371747970581, 0.44988277554512...
I'm writing a direct3d application and after noticing strange bugs such as anti-aliasing occurring even when it was turned off and the mouse pointer not lining up to things with the same coordinates as itself I discovered that when creating a window the width and height parameters include the border. The program was re...
[ 0.3743703365325928, -0.030797868967056274, 0.5717037916183472, -0.08030956238508224, -0.06727245450019836, -0.023533355444669724, 0.02624894306063652, -0.05381041020154953, -0.1708419919013977, -0.628860354423523, 0.31086426973342896, 0.17786970734596252, -0.1536051332950592, 0.10100901871...
XP style. (Classic style, for example) Is there a way to tell what the border width and heights will be before I create the window? It sounds like you are looking for the GetSystemMetrics function. For example, the border width in pixels is returned by ``` GetSystemMetrics(SM_CXBORDER) ``` **ADDED:** For the total ...
[ 0.4306544065475464, 0.06291418522596359, 1.1033697128295898, 0.1220874935388565, -0.18937784433364868, -0.08531340211629868, 0.018533164635300636, -0.2910763919353485, -0.2769290506839752, -0.7452536821365356, -0.0014350850833579898, 0.5147992968559265, -0.03939278423786163, -0.07831680029...