text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
There's a [number of posts](https://stackoverflow.com/search?q=password+hash) here on hashing of passwords and numerous recommendations on how to go about doing it, but before I go off and write something based on the suggestions here, is there a standard library I can use to save me some time (and potentially blushes,...
[ 0.29252976179122925, 0.11251067370176315, 0.16630594432353973, -0.011482881382107735, -0.2785166800022125, -0.29928383231163025, 0.41619014739990234, -0.1696787029504776, -0.32432034611701965, -0.7232866287231445, 0.15909159183502197, 0.38285842537879944, -0.03287341445684433, 0.1180622205...
20 times, but a nice library (or framework class if I've missed it) that's preferably open sourced, and written by someone smarter/more experienced than me that's going to save me from falling into some classic cryptography doh that I won't know about until I'm hacked. I'm not sure how well regarded it is, but the fram...
[ 0.22824274003505707, 0.08221128582954407, 0.40183091163635254, -0.08194167912006378, -0.030316751450300217, -0.20118695497512817, 0.5127609968185425, -0.24294236302375793, -0.6008323431015015, -0.38688981533050537, 0.16236267983913422, 0.38341423869132996, 0.09577767550945282, -0.057523980...
less easy to use than it should be is that you should probably prepend the password with a salt value - Microsoft really should have had a specific parameter for allowing you to pass in a salt.
[ -0.07731082290410995, 0.19754146039485931, -0.08242233097553253, 0.3170589804649353, 0.06157401204109192, -0.442641019821167, 0.29019948840141296, 0.1674419641494751, 0.1362263262271881, -0.6011478900909424, 0.18714644014835358, 0.277479887008667, 0.22102271020412445, -0.002153350273147225...
I have found an extension method that handles sorting and paging for [LINQ](http://en.wikipedia.org/wiki/Language_Integrated_Query). While this works well, I am trying to see if there are some other ways I can use this. At present, the code for the [extension method](http://en.wikipedia.org/wiki/Extension_method) is a...
[ -0.27911508083343506, -0.05653960257768631, 0.8445538878440857, -0.14847040176391602, -0.11140652745962143, 0.24477437138557434, -0.09446526318788528, -0.2717554271221161, -0.3722302317619324, -0.5966851711273193, -0.3218978941440582, 0.31742602586746216, -0.35160502791404724, 0.1310727447...
return obj.OrderBy(keySelector).Skip(innerRows).Take(pageSize).AsQueryable(); else return obj.OrderByDescending(keySelector).Skip(innerRows).Take(pageSize).AsQueryable(); } ``` The method takes in an expression, which is based off the type. In my Dealer class, I have a method GetDealers, which essentiall...
[ -0.0715000256896019, 0.14181450009346008, 0.4723709225654602, -0.2767953872680664, -0.03388739004731178, 0.08769458532333374, 0.22289276123046875, -0.427785187959671, -0.19242441654205322, -0.5696225166320801, -0.22127559781074524, 0.502659022808075, -0.5296397805213928, -0.060977905988693...
is this method OK? I'm not exactly sure what you're asking, but I believe it's something that I have looked into myself. If you would like to know how to dynamically sort your results based on a string, rather than a proper LINQ expression, then you're in luck. Scott Guthrie published a great [article](http://weblogs....
[ -0.1423196643590927, -0.11234395205974579, 0.4191760718822479, 0.20337802171707153, 0.1002737507224083, -0.18123887479305267, 0.058661557734012604, 0.09442073851823807, -0.48787346482276917, -0.5022765398025513, -0.04053861275315285, 0.09209021925926208, -0.2587684988975525, -0.12677732110...
the following syntax: ``` myUsers = myUsers.OrderBy("LastName"); ``` I hope this helps!
[ -0.13895075023174286, 0.29549652338027954, 0.27071240544319153, -0.3154345154762268, 0.19274482131004333, -0.09304922819137573, 0.5155680775642395, 0.411808580160141, -0.15322928130626678, -0.5198606252670288, -0.524666428565979, 0.33393344283103943, -0.2643481492996216, 0.0974207818508148...
[According to the documentation](http://dev.mysql.com/doc/refman/5.1/en/group-by-functions.html#function_max), in MySQL the Max() and Min() aggregate functions accept a DISTINCT keyword: > The DISTINCT keyword can be used to > find the maximum of the distinct > values of expr, however, this produces > the same resu...
[ -0.535775363445282, -0.061475638300180435, 0.046295084059238434, 0.033548470586538315, -0.5089100003242493, 0.13692983984947205, 0.06580822169780731, -0.16222630441188812, -0.10785409063100815, -0.15344107151031494, 0.1721564382314682, 0.1282339096069336, -0.07327529788017273, 0.4060710966...
has Five aggregate functions defined. Those five are avg, count, max, min, and sum. Coincidentally\*, those all accept the DISTINCT keyword. \*and by that I mean "not coincidentally"
[ 0.10542038828134537, 0.13996148109436035, 0.30386704206466675, 0.1255021095275879, -0.0651170015335083, 0.6542444229125977, 0.00485938461497426, 0.03951987624168396, 0.03392791375517845, -0.23751533031463623, 0.10403431951999664, 0.3922218084335327, -0.12378043681383133, 0.1775663048028946...
Is there a problem with this type of implementation to wait for a batch of threads to complete before moving on, given the following circumstances?: * CCR or PFX cannot be used. * Customer.Prices collection and newCustomer are NOT being mutated. * CloneCustomerPrices performs a deep copy on each of the prices in Custo...
[ 0.215183287858963, -0.12401501089334488, 0.6169994473457336, -0.08036503940820694, 0.2925923466682434, 0.24990372359752655, 0.10267548263072968, -0.22132550179958344, -0.47147107124328613, -0.4014474153518677, -0.30462029576301575, 0.5547668933868408, -0.2421882003545761, 0.586305081844329...
ThreadList.ForEach(t => t.Start()); ThreadList.All (t => t.Join([TimeOutNumber])); }; runThreadBatch(CopyPriceModelsCallback, null); [More Processing] return newCustomers; } ``` As far as I know, the SQL92 standard has Five aggregate functions defined. Those five are avg, count, max, ...
[ 0.2571963369846344, -0.002512632869184017, 0.42642274498939514, -0.03888960927724838, 0.08121741563081741, 0.4922429025173187, 0.11227601766586304, -0.058952271938323975, -0.2821345329284668, -0.3121534287929535, 0.24534651637077332, 0.36598894000053406, -0.24220207333564758, 0.42854440212...
What's the difference between `<div class="">` and `<div id="">` when it comes to CSS? Is it alright to use `<div id="">`? I see different developers doing this in both ways, and since I'm self taught, I've never really figured it out. `ids` must be unique where as `class` can be applied to many things. In CSS, `id`s ...
[ 0.25064951181411743, -0.008068928495049477, -0.3802657723426819, 0.1552649736404419, -0.26973652839660645, -0.21087734401226044, -0.16745170950889587, 0.07939735800027847, -0.05650835484266281, -0.60887211561203, 0.025833403691649437, 0.34143972396850586, -0.17278975248336792, 0.0543086603...
Common `class` elements are things like `highlight` or `external-link`. It's a good idea to read up on the cascade and understand the precedence assigned to various selectors: <http://www.w3.org/TR/CSS2/cascade.html> The most basic precedence you should understand, however, is that `id` selectors take precedence over...
[ -0.07002841681241989, 0.09156236052513123, 0.046118397265672684, 0.11920379102230072, -0.15410387516021729, -0.16761216521263123, -0.10040898621082306, -0.2324332743883133, -0.15869677066802979, -0.5105196833610535, -0.2819156050682068, 0.09276646375656128, -0.2524634599685669, 0.305695772...
I've created the following RESTful WCF service, which works just fine when running it in VS. ``` [OperationContract] [WebGet(ResponseFormat = WebMessageFormat.Json, UriTemplate = "/sales/start={start}&end={end}")] List<Sales> GetSalesByDate(string start, string end); ``` However, when deploying this to my test...
[ 0.19611777365207672, -0.02405581995844841, 0.5447418093681335, -0.037136707454919815, -0.2102939486503601, -0.2984083890914917, 0.19830262660980225, -0.2545545697212219, 0.08770786225795746, -0.6127521395683289, 0.042674530297517776, 0.5747585892677307, -0.14582312107086182, 0.096095412969...
is my configuration file: ``` <?xml version="1.0"?> <configuration> <system.serviceModel> <services> <service name="Services.SalesService"> <endpoint behaviorConfiguration="webBehavior" binding="webHttpBinding"
[ 0.01343702245503664, -0.2006276547908783, 0.8341036438941956, -0.07674392312765121, 0.0013779086293652654, -0.29538047313690186, 0.14748157560825348, -0.0657975822687149, 0.04351041838526726, -0.6381179094314575, -0.036474790424108505, 0.4014277756214142, -0.04278675094246864, 0.1716981828...
contract="Services.ISalesService"/> </service> </services> <behaviors> <endpointBehaviors> <behavior name="webBehavior"> <webHttp/> </behavior>
[ 0.025651071220636368, -0.4290054440498352, 0.34317994117736816, 0.1062372624874115, 0.02485576458275318, 0.23884469270706177, 0.31764698028564453, -0.3733534514904022, -0.23898641765117645, -0.42916950583457947, 0.23450373113155365, 0.5731112360954285, -0.15758594870567322, -0.126342177391...
</endpointBehaviors> </behaviors> </system.serviceModel> </configuration> ``` It turns out `/sales/start={start}&end={end}` is not a valid Uri (duh!). After a little trial and error I finally figured this out. Tweaking the UriTemplate with a '?' solved the problem. ``` [OperationContract] [WebGet(Response...
[ 0.18428660929203033, 0.15657567977905273, 0.8530451655387878, -0.04694472253322601, -0.2014998197555542, -0.3189220130443573, 0.2676626741886139, -0.16622991859912872, -0.022234149277210236, -0.4290056526660919, -0.28294116258621216, 0.41804882884025574, 0.036742523312568665, 0.49416601657...
I recently came across a use of the @import rule on Coda.com. They're actually using to import the main style sheet for the site, specifically the format: ``` <style type="text/css" media="screen"> @import url(./coda.css); </style> ``` Which will hide the rules from Netscape 3 and IE 3 and 4. Since a web developme...
[ 0.48922690749168396, 0.12544694542884827, 0.3135617971420288, -0.2217387855052948, -0.2737790644168854, -0.4862494468688965, -0.04057597368955612, 0.07987497746944427, -0.34449878334999084, -0.5432191491127014, -0.03830638900399208, 0.3778688907623291, -0.2542635202407837, -0.0398578383028...
HTML) serve many purposes, such as making it easy to swap in and out other CSS files. The Blueprint CSS framework does this to let you easily remove certain portions of the framework such as the typography stuff or the grid stuff. Of course, in a production environment, using a bunch of `@import` statements is frowned...
[ 0.5172916650772095, -0.0016595807392150164, 0.10097121447324753, 0.30917030572891235, -0.31252703070640564, -0.30213844776153564, 0.07823463529348373, 0.15256105363368988, -0.24587775766849518, -0.4958999752998352, -0.22807157039642334, 0.20557968318462372, -0.4751787483692169, -0.14896729...
I have a form served in non-UTF-8 (it’s actually in Windows-1251). People, of course, post there any characters they like to. The browser helpfully converts the unpresentable-in-Windows-1251 characters to html entities so I can still recognise them. For example, if user types an →, I receive an `&#8594;`. That’s partia...
[ 0.3306599259376526, 0.24287356436252594, 0.5006676912307739, -0.32427066564559937, -0.30161744356155396, -0.05531782656908035, 0.42193785309791565, -0.04183896258473396, -0.15740835666656494, -0.4624786078929901, -0.17605572938919067, 0.2631087899208069, 0.04445424675941467, -0.05140448361...
type things like `&mdash;` or `&copy;`, and I want to display them as actual `&mdash;` or `&copy;`, not — and ©. There’s no way for me to distinguish an → from `&#8594;`, because I get them both as `&#8594;`. And, since I htmlspecialchars () the text, *and* I also get a `&#8594;` for a → from browser, I echo back an `...
[ 0.1120687946677208, 0.1623002141714096, 0.5282987952232361, -0.08249745517969131, -0.07150320708751678, -0.12043851613998413, 0.4063236713409424, 0.029473811388015747, 0.0672638937830925, -0.676152765750885, -0.12385882437229156, 0.4009402394294739, -0.6054090857505798, -0.1481843590736389...
me deal with it myself”? Oh, I know that the good idea is to switch the whole software to UTF-8, but that is just too much work, and I would be happy to get a quick fix for this. If this matters, the form’s enctype is "multipart/form-data" (includes file uploader, so cannot use any other enctype). I use Apache and PHP...
[ 0.4657934308052063, 0.05395449697971344, 0.706927478313446, -0.016406726092100143, -0.2568780183792114, -0.10502910614013672, 0.34026411175727844, -0.07725434005260468, -0.0983896404504776, -0.717706024646759, -0.1882527768611908, 0.6614472270011902, -0.17482934892177582, -0.01779666543006...
of text with a ‘&’ in it, and a ‘Б’ character. > I actually do a htmlspecialchars () on the text before displaying it Yes. You must do that, or else you've got a security problem. > Okay, I serve this form in Windows-1251, but will you please just send me the input in UTF-8 and let me deal with it myself Yeah, supp...
[ 0.2010885775089264, 0.4802600145339966, 0.6559879779815674, -0.06184763088822365, -0.19553236663341522, -0.008489351719617844, 0.6463746428489685, -0.09003360569477081, -0.11419577896595001, -0.6283055543899536, -0.19732540845870972, 0.658009946346283, -0.5006070733070374, -0.0771761313080...
whole software to UTF-8, Yup. Well, at least the encoding of the page containing the form should be UTF-8.
[ 0.005237616132944822, -0.04987659677863121, 0.5179985165596008, 0.0471438504755497, -0.08278089761734009, -0.5404568910598755, 0.2105635404586792, 0.22072258591651917, 0.04553589969873428, -0.5690620541572571, -0.5280921459197998, 0.6465064883232117, -0.26433348655700684, -0.25463968515396...
I have a line of code along the lines of: ``` print $somehash{$var}{fh} "foo"; ``` The hash contains the filehandle a few levels down. The error is: ``` String found where operator expected at test.pl line 10, near "} "foo"" ``` I can fix it by doing this: ``` my $fh = $somehash{$var}{fh}; print $fh "foo"; ``` ...
[ 0.07591279596090317, 0.275538831949234, 0.23526984453201294, -0.30955809354782104, 0.0002891618642024696, 0.06100083515048027, 0.36354050040245056, -0.2388710379600525, -0.09794028848409653, -0.4078808128833771, 0.06622197479009628, 0.4292890131473541, -0.2347782999277115, 0.08724902570247...
a block like this: ``` print { $somehash{$var}{fh} } "foo"; ```
[ -0.08668293803930283, 0.21344132721424103, 0.028717130422592163, -0.37303534150123596, -0.0812106803059578, -0.3120550215244293, 0.29948508739471436, 0.01676473580300808, 0.046378254890441895, -0.11978590488433838, -0.315471887588501, 0.1972447633743286, -0.5814637541770935, 0.003472109325...
In FireFox3 when I go to URL's such as: <http://download.microsoft.com/download/4/A/A/4AA524C6-239D-47FF-860B-5B397199CBF8/windows-kb890830-v2.7.exe> I get a 404 error for the URL locally on my XAMPP installation I use for local development. It has to do with the .exe I think but I can't figure out why. Whats the p...
[ -0.08595427125692368, 0.5354316830635071, 0.30832046270370483, -0.1311551332473755, -0.04200757294893265, -0.24630539119243622, 0.7752149105072021, 0.03413941711187363, -0.14490263164043427, -0.5122475028038025, -0.22457747161388397, 0.6710466146469116, -0.6754295229911804, -0.056590408086...
I want to write a function like so, ``` public System.Windows.Input.Key ResolveKey(char charToResolve) { // Code goes here, that resolves the charToResolve // in to the Key enumerated value // (For example with '.' as the character for Key.OemPeriod) } ``` ...
[ -0.14327241480350494, 0.06636697798967361, 0.5904723405838013, 0.025693552568554878, 0.5358637571334839, 0.11991939693689346, 0.03687663748860359, -0.08506830036640167, -0.1936979442834854, -0.6779221892356873, -0.08505631238222122, 0.42686784267425537, -0.23903149366378784, -0.00336966011...
to match the character, but is there any other way? The thing with this is the Key enum's string may not match with the character so Enum.IsDefined will not work Any ideas? Update: This is in Windows environment ``` [DllImport("user32.dll")] static extern short VkKeyScan(char ch); static public Key ResolveKey(char ...
[ -0.14492136240005493, -0.252994179725647, 0.674187958240509, -0.08093159645795822, 0.42067429423332214, -0.0822000801563263, 0.3206155300140381, -0.17576231062412262, 0.018640214577317238, -0.577175498008728, -0.1877700835466385, 0.4893641769886017, -0.19475995004177094, 0.0719919577240943...
We are developing a document management solution with Sharepoint 2007 and I'm having some issues figuring out a couple items with the structure. The documents are templates that are used to merge data into letters sent to clients. While the templates will be managed in Sharepoint, the actual letters that will be genera...
[ 0.3616262376308441, 0.03434489667415619, 0.35571885108947754, 0.033502403646707535, 0.15038785338401794, 0.10975506156682968, -0.03017449751496315, -0.5932039022445679, -0.1325002759695053, -0.7918839454650879, -0.020556937903165817, 0.5600888729095459, -0.22785530984401703, 0.004077083431...
template). A web service would be created on the SP side so the front end application would simply call it to pull up the template (once it was determined which one to use). Okay that said the real question is how to deal with the rules? I originally thought meta-data and write the data out (via web service call) to ...
[ 0.69663405418396, -0.12482912093400955, 0.4907541573047638, 0.25756579637527466, -0.3045765459537506, -0.42294934391975403, 0.13647060096263885, -0.6812728047370911, -0.10260199755430222, -0.5700806975364685, 0.1870739907026291, 0.6219514012336731, -0.4941972494125366, 0.0933433398604393, ...
I drive this from a database or do I have to use a static xml list. Aaak. You can create a field based on a lookup of information on the BDC. You can also create a lookup based on a list in SharePoint.
[ 0.8151414394378662, 0.14206773042678833, 0.08154783397912979, 0.15774409472942352, -0.26027554273605347, -0.3673105537891388, -0.08462045341730118, 0.0551065169274807, 0.029171975329518318, -0.35361865162849426, 0.245456263422966, 0.5130324959754944, -0.26098135113716125, 0.430596560239791...
My project requires users to create some basic math functions, I need to store these in a ms sql databse to use on datasets in my business logic. The functions will be similar to: when (value1 between 20 and 40) then value2 = value 2 \* 37.8 What is the best schema to store something like this ? And what is the m...
[ -0.034732963889837265, 0.20836324989795685, 0.36719220876693726, 0.20558305084705353, -0.04992539808154106, 0.030310964211821556, 0.400718092918396, -0.1092972531914711, -0.04904620721936226, -0.40432581305503845, 0.557628870010376, 0.6081086993217468, -0.25126907229423523, 0.0799358263611...
to have two tables : first table would have a functionID ,orderID , operatorID The second table would have 1 to many relationship between operatorID and operands. FunctionID would be unique identifier for the function. orderID would determine in which order we need to parse the various rows for the same functionID. ...
[ -0.5681142807006836, -0.20132246613502502, 0.21923765540122986, 0.036561012268066406, -0.21094956994056702, 0.258716344833374, -0.29890114068984985, -0.3356444239616394, 0.028786588460206985, -0.4513036608695984, -0.03329286351799965, 0.3593408763408661, -0.6127384901046753, -0.00332995620...
1 1 (for *) 1 2 2 (for +) Table 2 OperatorID Operands 1 a 1 b 2
[ -0.09216879308223724, -0.01634194515645504, 0.0004895657184533775, -0.328397274017334, -0.15687468647956848, -0.030143026262521744, 0.009980158880352974, -0.5787549018859863, 0.09591982513666153, -0.17553842067718506, -0.30080217123031616, 0.19853101670742035, -0.5971827507019043, -0.11843...
c ``` After parsing this would become f(x) = a\*b + c this is a very basic idea. There are a lot of gotchas. Hope that helps.
[ 0.17621749639511108, 0.4524363577365875, 0.019883977249264717, -0.24603769183158875, 0.0275163184851408, -0.17617926001548767, 0.20175310969352722, 0.18270929157733917, 0.21407461166381836, -0.5082588195800781, -0.19403740763664246, 0.4660723805427551, -0.41264793276786804, -0.068563312292...
I have a NSString value of @"78000". How do I get this in currency format, i.e. $78,000 with it remaining an NSString. You need to use a number formatter. Note this is also how you would display dates/times etc in the correct format for the users locale ``` // alloc formatter NSNumberFormatter *currencyStyle = [[NSNu...
[ 0.2995644509792328, 0.04201824218034744, 0.6854888200759888, 0.02223670668900013, 0.09171245247125626, 0.037823814898729324, 0.17087414860725403, -0.13770750164985657, -0.2650987505912781, -0.66297447681427, 0.15008695423603058, 0.30345508456230164, 0.26096755266189575, 0.289254367351532, ...
I'm currently using Zend\_Filter\_StripTags in a commenting system, but stuff kinda breaks when '<3' is entered. StripTags doesn't seem to be smart enough to realize that it's not an HTML tag, and creating the filter as "new Zend\_Filter\_StripTags(array('3'))" doesn't seem to work either. Should I pass the input thro...
[ 0.3753851056098938, -0.09381324797868729, 0.5491892695426941, -0.051468804478645325, -0.3572934567928314, -0.1812201887369156, 0.2645667791366577, -0.22757764160633087, 0.06255097687244415, -0.8738720417022705, 0.25127851963043213, 0.6645956039428711, -0.4363126754760742, -0.10628937184810...
I develop on Windows, and I'd like to use beanstalkd. It's only available as a tarball, and I was just wondering if there is some way to easily build it like you can in Linux? I found some ports of gnu make for Windows, but they don't seem to be working. Are the source distributions somehow specific to Linux? When I t...
[ 0.7545006275177002, 0.11928305774927139, -0.06055350974202156, -0.21301063895225525, 0.21334178745746613, -0.06412046402692795, -0.023240385577082634, 0.223831906914711, 0.02083716168999672, -0.8490750789642334, 0.36597028374671936, 0.626570999622345, -0.2825101912021637, 0.146225571632385...
some ports of gnu make for > Windows, but they don't seem to be > working. Here are a few ports of *GNU* tools to *Windows*: * **GnuWin32** - <http://gnuwin32.sourceforge.net/summary.html> * **Gnu Tools for NT** - <http://www.devhood.com/Tools/tool_details.aspx?tool_id=3> * **GNU Utilities for Win32** - <http://unx...
[ 0.46137943863868713, -0.005542390514165163, 0.2559852600097656, 0.11481694877147675, -0.5154954791069031, -0.17646048963069916, 0.2811221778392792, 0.024879215285182, -0.3023582100868225, -0.8990134000778198, -0.055691227316856384, 0.824336051940918, -0.13356995582580566, 0.165077522397041...
Are there systems or is there software out there that is developed with a proof of correctness to back it up? Or are all critical systems developed merely with an aggressive code review and test cycle? Coding for high integrity applications, in the real world, generally involves jumping through a bunch of QA hoops. Som...
[ 1.1365413665771484, 0.46223247051239014, -0.04705311357975006, 0.33934465050697327, 0.5152900815010071, -0.4271872639656067, 0.17080509662628174, 0.11942631751298904, -0.12226951867341995, -0.22025969624519348, -0.059260278940200806, 0.7112302780151367, -0.19866517186164856, 0.137544333934...
have to have a bunch of documents which are written, marked up by reviewers, updated with the review comments and signed off by a senior manager. Because the regulations are backed by law the FDA want to see evidence that these records have not been tampered with, for instance by writing the "expected result" of a test...
[ 0.7547799348831177, 0.41995248198509216, 0.5250574350357056, 0.38980093598365784, 0.38169676065444946, -0.6030750274658203, -0.26788046956062317, -0.1672251969575882, -0.3318096995353699, -0.27933549880981445, 0.018794968724250793, 0.21269267797470093, 0.02180292084813118, 0.00859372410923...
powers; if they see fit they can inspect your source code with an armed federal marshal. However they are not software specialists: their job is not to judge the quality of your code, just to make sure you have complied with all the regulations. The aviation industry has to follow DO-178B, which is also ISO-9000 on st...
[ 0.7780457139015198, 0.22813016176223755, 0.35447224974632263, 0.52646404504776, 0.30020320415496826, -0.7510684728622437, 0.16121090948581696, -0.15233993530273438, -0.4127826988697052, -0.11607910692691803, -0.03364521637558937, 0.6896383166313171, 0.15714924037456512, 0.10840138047933578...
to. So instead we have a kind of cargo cult approach where we produce lots of documentation in the hope that this will imbue our software with quality. Its true that quality software generally has clear requirements and a simple logical architecture, but that doesn't mean that writing a "Requirements Document" or an "A...
[ 0.5380240082740784, 0.2596454620361328, -0.17167024314403534, 0.34911248087882996, 0.10634966194629669, -0.23872050642967224, 0.2921948730945587, -0.12226075679063797, -0.1299280971288681, -0.4499255418777466, -0.20468918979167938, 0.855199933052063, -0.20866388082504272, -0.05012521520256...
process instead, in the vague hope that this will have a similar effect.
[ 0.3375728130340576, -0.024530446156859398, -0.003141408786177635, 0.3375546336174011, 0.17962272465229034, 0.16735370457172394, 0.10071342438459396, -0.30892297625541687, -0.2625601291656494, -0.646637499332428, -0.15235213935375214, 0.23379366099834442, 0.10301963984966278, 0.249602720141...
What's the easiest/best way to find and remove empty (zero-byte) files using only tools native to Mac OS X? Easy enough: ``` find . -type f -size 0 -exec rm -f '{}' + ``` --- To ignore any file having xattr content (assuming the MacOS `find` implementation): ``` find . -type f -size 0 '!' -xattr -exec rm -f '{}' +...
[ -0.18591083586215973, 0.18692603707313538, 0.2512991726398468, 0.11922721564769745, 0.15892575681209564, -0.21176527440547943, 0.12941794097423553, 0.10486066341400146, -0.18355557322502136, -0.3615509867668152, -0.4771233797073364, 0.6919447183609009, -0.2891913652420044, 0.07380661368370...
I've got a string, a signature, and a public key, and I want to verify the signature on the string. The key looks like this: ``` -----BEGIN PUBLIC KEY----- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfG4IuFO2h/LdDNmonwGNw5srW nUEWzoBrPRF1NM8LqpOMD45FAPtZ1NmPtHGo0BAS1UsyJEGXx0NPJ8Gw1z+huLrl XnAVX5B4ec6cJfKKmpL/l94WhP2v8F3OG...
[ 0.2597714960575104, 0.541302502155304, 0.5151091814041138, 0.16204607486724854, 0.12564927339553833, -0.07246726006269455, 0.2601254880428314, -0.1084473729133606, -0.1540817767381668, -0.48414331674575806, 0.07003305107355118, 0.2562067210674286, 0.16536326706409454, 0.190913587808609, ...
and you will be best served with using a crypto-library to decode it (such as M2Crypto as [suggested by joeforker](https://stackoverflow.com/questions/544433/how-do-you-verify-an-rsa-sha1-signature-in-python/546043#546043)). Treat the following as some fun info about the format: If you want to, you can decode it like ...
[ -0.06718708574771881, 0.43807661533355713, 0.29089638590812683, 0.26339125633239746, 0.11038338392972946, -0.3171970844268799, 0.3255079686641693, -0.20506015419960022, -0.24218565225601196, -0.36533355712890625, -0.259755402803421, 0.5528990626335144, -0.11787543445825577, 0.0634018555283...
: } 18 03 141: BIT STRING 0 unused bits, encapsulates { 22 30 137: SEQUENCE { 25 02 129: INTEGER : 00 DF 1B 82 2E 14 ED A1 FC B7 43 36 6A 27 C0 63
[ -0.1534987986087799, 0.40509819984436035, 0.09020183235406876, -0.03191239386796951, 0.054581418633461, 0.4713137447834015, 0.38737356662750244, -0.5777500867843628, -0.0839708000421524, -0.0691923275589943, -0.34290626645088196, -0.04518745839595795, -0.07316810637712479, 0.07768177986145...
: 70 E6 CA D6 9D 41 16 CE 80 6B 3D 11 75 34 CF 0B : AA 93 8C 0F 8E 45 00 FB 59 D4 D9 8F B4 71 A8 D0 : 10 12 D5 4B 32 24 41 97
[ 0.2245909720659256, 0.8032212257385254, 0.2682953178882599, -0.15936356782913208, -0.35655614733695984, 0.29907462000846863, 0.6737775206565857, -0.44015106558799744, -0.014709281735122204, -0.39174437522888184, -0.2769353687763214, 0.31012478470802307, 0.17491185665130615, 0.1315366625785...
C7 43 4F 27 C1 B0 D7 3F : A1 B8 BA E5 5E 70 15 5F 90 78 79 CE 9C 25 F2 8A : 9A 92 FF 97 DE 16 84 FD AF F0 5D CE 19 6A E7 68 :
[ -0.09840189665555954, 0.5442261099815369, 0.20645390450954437, -0.3386397957801819, -0.37052103877067566, 0.443107545375824, 0.511518120765686, -0.39459922909736633, -0.33096203207969666, -0.24248608946800232, -0.20319700241088867, 0.3621360957622528, 0.03834434971213341, 0.316752851009368...
45 F5 98 B3 28 C5 ED 76 E0 F7 1F 6A 6B 74 48 F0 : 86 91 E6 A5 56 F5 F0 D7 73 CB 20 D1 3F 62 9B 63 : 91 157 02 3: INTEGER 65537
[ 0.05863790214061737, 0.5481478571891785, -0.107366643846035, -0.2944973409175873, -0.43890511989593506, 0.5222903490066528, 0.5834372639656067, -0.7216719388961792, -0.17865735292434692, -0.07909637689590454, -0.11848243325948715, 0.3389986455440521, -0.007480040658265352, 0.19586262106895...
: } : } : } ``` For a 1024 bit RSA key, you can treat `"30819f300d06092a864886f70d010101050003818d00308189028181"` as a constant header, followed by a 00-byte, followed by the 128 bytes of the RSA modulus. After that 95% of the time you will get `0203010001`, which signifies a ...
[ 0.15453775227069855, 0.06806720793247223, 0.1553794890642166, -0.06558709591627121, 0.2275523841381073, 0.11176811158657074, 0.06803004443645477, -0.1845552772283554, -0.31242477893829346, -0.23276387155056, -0.049258794635534286, 0.3337605595588684, -0.3957357704639435, 0.2599913775920868...
can use those two values as `n` and `e` in a tuple to construct a RSAobj.
[ -0.02280339226126671, 0.4035826623439789, 0.2396889179944992, -0.26344311237335205, -0.2659294605255127, -0.018091313540935516, 0.286327987909317, -0.24504588544368744, -0.2511684000492096, -0.08144348859786987, -0.4940359592437744, 0.022142820060253143, -0.4783782362937927, -0.08255419880...
In the following c# code, how do I get rid of the objects when it's no longer useful? Does it get taken care of automatically, or do I need to do something? ``` public void Test() { object MyObject = new object(); ... code ... } ``` The short answer is: unless it has unmanaged resources (file handles etc) you ...
[ 0.37401288747787476, 0.18087497353553772, 0.12991902232170105, -0.06526144593954086, 0.2609192728996277, -0.2746671140193939, 0.25171253085136414, -0.16373659670352936, -0.190215066075325, -0.5528889298439026, -0.2786949574947357, 0.6263948678970337, -0.21474456787109375, 0.127360150218009...
local variable (in any stack frame of any thread) which may still be read counts as a *root* as do static variables. (In fact I believe that static variables are referenced via live Type objects, which are referenced via live AppDomain objects, but for the most part you can regard static variables as roots.) The garba...
[ -0.06642814725637436, -0.1790814846754074, 0.1297093629837036, 0.132984921336174, -0.07995551824569702, -0.021511610597372055, 0.5103806853294373, 0.24257124960422516, -0.43787479400634766, -0.5383129119873047, -0.0798567533493042, 0.1618025302886963, -0.2284444272518158, 0.567890822887420...
at all the *rest* of the objects and free them. That's a very broad conceptual picture - but it gets a lot more detailed when you think of the *generational* model of garbage collection, finalizers, concurrent collection etc. I strongly recommend that you read Jeff Richter's [CLR via C#](https://rads.stackoverflow.com...
[ -0.11631187051534653, 0.02310151979327202, -0.14092743396759033, 0.34330645203590393, -0.05699266493320465, -0.2432490885257721, 0.1710776686668396, -0.15861643850803375, -0.7370817065238953, -0.4196494519710541, -0.20125611126422882, 0.4929850697517395, -0.1181541383266449, 0.030539216473...
objects pointlessly *will* cost performance. In particular, the garbage collector is fast but not free. Look for *simple* ways to reduce your memory usage as you code, but micro-optimising before you know you have a problem is also bad. * It's possible to "leak" memory by making objects reachable for longer than you in...
[ 0.2411443442106247, 0.015032285824418068, 0.005199744366109371, 0.45078539848327637, 0.006309129297733307, -0.27154362201690674, 0.5774657726287842, 0.1559140384197235, -0.6806612610816956, -0.5003563165664673, -0.13296198844909668, 0.49297192692756653, -0.23536361753940582, 0.195749446749...
crash. There's not a lot .NET can do to prevent that! * Objects which use non-memory resources typically implement [`IDisposable`](http://msdn.microsoft.com/en-us/library/system.idisposable.aspx). You should call `Dispose` on them to release those resources when you're finished with the object. Note that this *doesn't*...
[ 0.5539172887802124, 0.19287149608135223, -0.222930908203125, 0.23121784627437592, 0.08898776769638062, -0.5340415239334106, -0.008508682250976562, 0.047418683767318726, -0.41723671555519104, -0.4851219654083252, -0.3786829113960266, 0.6253126263618469, -0.2602369785308838, 0.18861803412437...
Lets say I have the following table in MS SQL 2000 ``` Id | description | quantity | ------------------------------- 1 my desc 3 2 desc 2 2 ``` I need to display multiple rows based on the quantity, so I need the following output: ``` Id | description | quantity | --------------------------...
[ -0.27345824241638184, 0.14060185849666595, 0.3453696072101593, 0.022095980122685432, -0.3559989631175995, -0.08670581877231598, 0.03619173541665077, -0.5302526354789734, -0.2008567750453949, -0.7564007043838501, 0.1527559459209442, 0.6351550221443176, -0.20081740617752075, -0.0682378187775...
my desc 1 2 desc 2 1 2 desc 2 1 ``` Any ideas how to accomplish this? This works just fine, no need for any cursors on this one. It may be possible to fangle something out without a number table as well. *Note* if going for this kind of solution I would keep a number table around ...
[ 0.2650087773799896, 0.11847987025976181, 0.19470521807670593, 0.15400798618793488, -0.20145945250988007, -0.11639223247766495, 0.1130775585770607, -0.0685812458395958, -0.20519964396953583, -0.9152019619941711, 0.005274032708257437, 0.7306221723556519, -0.4744926393032074, -0.1473387330770...
table #splitme (Id int, description varchar(255), quantity int) insert #splitme values (1 ,'my desc', 3) insert #splitme values (2 ,'desc 2', 2) create table #numbers (num int identity primary key) declare @i int select @i = max(quantity) from #splitme while @i > 0 begin insert #numb...
[ 0.48829591274261475, -0.371481716632843, 0.3046402633190155, 0.10175657272338867, -0.0016705406596884131, 0.2955710291862488, -0.1993207186460495, -0.5705857276916504, -0.07913435995578766, -0.3151322901248932, -0.2767362892627716, 0.620643138885498, -0.1582651138305664, 0.1172165945172309...
I'd like to communicate with a USB device under Windows and Java but I can't find a good library to do so. I don't want the user to have to install any extra hardware or device drivers to make this work. That is, I want to be able to interact with USB just like other Windows applications do. I am familiar with jUSB an...
[ 0.28727811574935913, 0.2512965202331543, 0.22529993951320648, -0.041040822863578796, -0.11443563550710678, -0.307308554649353, 0.21125860512256622, 0.3886411786079407, -0.1966707557439804, -0.8293464183807373, 0.4005703628063202, 0.5601943731307983, -0.2625012993812561, 0.10424172878265381...
dead. There is commercial and expensive (price $39.99 is not per developer, but per copy of your software sold!) [JCommUSB](http://www.icaste.com/) library which probably works, although I have no experience of it; we had to build our own custom C wrappers to the USB drivers and communicate with them through JNI.
[ 0.8457520008087158, 0.14555241167545319, 0.14706656336784363, 0.3276005983352661, 0.13267269730567932, -0.20267386734485626, -0.18029382824897766, 0.5733948945999146, -0.25580012798309326, -0.2953139841556549, 0.11078165471553802, 0.5550957918167114, -0.0607510581612587, 0.2466224879026413...
I have been working to automate some deployment processes using just Nant for the time being. Once the Nant script scripts are fairly stable and proven, I'll be looking to incorporate CruiseControl.net or similar product. With that being said, I ran into a snag today. I have a Nant script that will copy files from a...
[ 0.1029045358300209, -0.015892667695879936, 0.5756760239601135, 0.013937979936599731, 0.1723971664905548, -0.3083767890930176, -0.1697814017534256, 0.22659827768802643, -0.6088787913322449, -0.8215155005455017, 0.40374207496643066, 0.3694588243961334, 0.02963053248822689, 0.1721861660480499...
any trust between them. The user running the Nant script had accessed both locations via Windows Explorer first to ensure that he had an authenticated session with both domains. When he ran the script, he of course got an access denied error since Nant.exe was running under the credentials of the other domain. This wa...
[ 0.517681896686554, 0.23496660590171814, 0.3750985562801361, -0.04191858321428299, -0.041626691818237305, -0.11980747431516647, 0.35481879115104675, 0.05740945413708687, 0.07001112401485443, -0.46428799629211426, 0.3587697148323059, 0.5689141154289246, -0.40914487838745117, 0.30655109882354...
easy :-) You would normally use `deny` or `revoke` to remove such permissions but be aware that guest is not considered a regular user. For some reason, `GUEST` is not subject to `REVOKE CONNECT` on the master or tempdb databases. See [here](http://msdn.microsoft.com/en-us/library/ms189438.aspx) for that little state...
[ -0.012658480554819107, 0.14519593119621277, 0.3365729749202728, 0.033963508903980255, 0.1275607943534851, -0.7322759032249451, 0.4059658348560333, -0.15483249723911285, -0.2638726234436035, -0.480910986661911, -0.7056186199188232, 0.5755066275596619, -0.28114163875579834, 0.213130429387092...
is used for all users without validated credentials (and that's everyone up until the point where their login succeeds), that makes sense to me.
[ 0.3287937641143799, 0.23607389628887177, 0.25120335817337036, 0.15423661470413208, 0.3477519452571869, -0.5115090012550354, 0.40102726221084595, 0.020479151979088783, -0.11084537208080292, -0.06376546621322632, 0.12795287370681763, 0.2733161449432373, 0.030434666201472282, -0.0888121947646...
I know that TCP is very reliable, and what ever is sent is guaranteed to get to its destination. But what happens if *after* a packet is sent, but *before* it arrives at the server, the server goes down? Is the acknowledgment that the packet is successfully sent triggered on the server's existence when the packet is in...
[ 0.15566584467887878, 0.03675047308206558, 0.3046732246875763, 0.2954574227333069, 0.20905059576034546, -0.36463746428489685, 0.338001012802124, 0.09809567779302597, -0.49135181307792664, -0.25154367089271545, -0.004272490739822388, 0.5560580492019653, -0.11126293241977692, 0.29902592301368...
need to distinguish between the Server-Machine going down and the Server-Process going down. If the Server-Machine has crashed, then, clearly, there is nothing to receive the packet. The sending client will get no retry-requests, and no acknowledgment of success or failure. After having not received any feedback at a...
[ -0.15065066516399384, -0.1539442092180252, 0.4183283746242523, 0.3165838420391083, 0.13910917937755585, -0.3175058662891388, 0.13598524034023285, 0.0689108744263649, -0.5687068104743958, -0.5531957745552063, -0.5800466537475586, 0.5036323666572571, -0.2823386490345001, 0.28121417760849, ...
of the process, will likely ACK the packet, and any others that arrive. This will continue until the OS notifies the TCP stack that the process is no longer active. The TCP stack will likely send a RST (reset) notice to the client, or may drop the connection (as described above)
[ -0.158537819981575, 0.0061105177737772465, 0.84572833776474, 0.06299874931573868, 0.2271413952112198, -0.10666275024414062, 0.4334261119365692, 0.21805031597614288, -0.510260820388794, -0.5334998965263367, -0.6895171999931335, 0.31765398383140564, -0.38897091150283813, 0.4404374957084656, ...
Many of the upcoming generation of browsers (FF 3.1, IE8) are going to support cross-domain XMLHttpRequests in one fashion or other (with security concerns, as long as the server opts in, etc). Is the same bit of functionality going to be in WebKit? FF: <https://developer.mozilla.org/en/Cross-Site_XMLHttpRequest> I...
[ 0.44341087341308594, -0.17836080491542816, 0.6257277131080627, -0.01915440335869789, -0.20688657462596893, -0.2798619568347931, 0.2876362204551697, -0.39481934905052185, -0.17065000534057617, -0.5328619480133057, -0.1326294243335724, 0.44160717725753784, -0.3316915035247803, -0.05576968565...
with them 3 days ago) I think it is safe to assume no currently shipping browsers support it, but that most of them will in the future, and the current WebKit nightlies are tracking the standard fairly closely.
[ 0.23323506116867065, -0.04807962477207184, 0.8649025559425354, -0.036705631762742996, -0.01541314460337162, -0.35147997736930847, 0.44511550664901733, -0.1728024035692215, -0.18218734860420227, -0.19951093196868896, -0.027109045535326004, 0.4829007685184479, -0.17087486386299133, 0.1060978...
FileMaker Pro has a feature that allows client applications to auto-locate their server's IP address and connect to it. What is the best way to do this using a general purpose language like Java or .NET? FileMaker probably is using Bonjour. Check at <http://developer.apple.com/bonjour/> and also Avahi It does so by im...
[ 0.14410558342933655, -0.06020602211356163, 0.3977457880973816, -0.11719188839197159, -0.23690803349018097, -0.08902082592248917, 0.0974680706858635, -0.053479861468076706, -0.42181670665740967, -0.8233534097671509, 0.048393506556749344, 0.5941874980926514, -0.36901456117630005, -0.01800304...
your routers and their multicast tolerance (which can be overwhelming). So, it scales up.
[ 0.11817964166402817, 0.006305190268903971, 0.43694770336151123, 0.18752336502075195, 0.11532324552536011, -0.07079871743917465, 0.13282275199890137, 0.1115202084183693, -0.011495259590446949, -0.8918697237968445, 0.2020610123872757, 0.5427230000495911, 0.004659371916204691, -0.174043893814...
I am trying to send a php script some content to be stored in a database via ajax. I am using the jQuery framework. I would like to use a link on a page to send the information. I am having trouble writing the function that will send and receive the information, everything that I have tried is asymptotic. **EDIT** Th...
[ 0.4373261332511902, 0.13543827831745148, 0.2806740701198578, -0.004361331462860107, -0.18229514360427856, -0.16296841204166412, 0.28699105978012085, 0.36685049533843994, 0.10983389616012573, -0.7420358061790466, 0.14905217289924622, 0.29893675446510315, -0.243586465716362, 0.12898012995719...
be updated (if it sent a 1 before, it will be set as 0). **EDIT** There will be 20-30 of these links on a page. I have set each containing div with a unique id ('onlineStatus'). I would rather not have a separate js function for every instance. Any assistance is much appreciated. The essential code is below. ``` ...
[ 0.2049778401851654, -0.13278812170028687, 0.687677264213562, -0.2127336859703064, -0.11039397120475769, -0.08293291926383972, 0.35718339681625366, -0.388365775346756, 0.1218622550368309, -0.998691201210022, -0.04513465240597725, 0.7327662706375122, -0.33850932121276855, -0.508301854133606,...
} } </script> <!-- the link that submits the info -->: <div id='onlineStatus<?php echo $b_id ?>'> <a href='#' onclick="doAjaxPostOnline( 0, <?php echo $b_id ?> ); return false;" >Post Online</a> </div> ``` **ajaxPostOnline.php** ``` <!-- ajaxPostOnline.php ... the page that the form posts to --> <?php ...
[ -0.08351743221282959, 0.10749348998069763, 0.7012144327163696, -0.2674116790294647, -0.0162558201700449, -0.06122339516878128, 0.19570466876029968, -0.44552886486053467, 0.1584799438714981, -0.3891596794128418, -0.24237075448036194, 0.4101332426071167, -0.4812139570713043, -0.1418212503194...
LIMIT 1" ); } if($result) { if($show == '0'){ $return = "<a class='onlineStatus' href='#' onchange='doAjaxPostOnline( 1, <?php echo $b_id ?> ); return false;' >Post Online</a>"; } if($show == '1'){ $return = "<a class='onlineStatus' href='#' onchange='doAjaxPostO...
[ 0.3618924617767334, -0.3156649172306061, 0.7732623815536499, -0.17816881835460663, 0.27446770668029785, 0.09482591599225998, 0.3286949396133423, -0.27121222019195557, -0.07261072099208832, -0.339982807636261, -0.2253297120332718, 0.44739794731140137, -0.6400278210639954, 0.0990093648433685...
print json_encode(array("id" => $id, "return" => $return)); } ?> ``` The load() function in jQuery is really cool for this sort of thing. Here's an example. Basically, you have an outer div as a container. You call a script/service which returns html. You have a div in that html with an id that you will refer to ...
[ 0.19315464794635773, -0.20292970538139343, 0.33911383152008057, -0.1261111944913864, -0.1571183055639267, -0.18767082691192627, -0.0869469866156578, 0.004876812919974327, -0.2513456642627716, -0.68352872133255, -0.2627057135105133, 0.5069997310638428, -0.35335415601730347, -0.1480766087770...
reference to a callback function as the third parameter. The callback function will receive every possible piece of information from the response (the full response text for further parsing/processing, the http status code, and the XMLHttpRequest object associated with this ajax call). ``` $("#id_of_some_outer_div").l...
[ 0.04942292720079422, -0.13854800164699554, 0.5323668122291565, -0.22079183161258698, -0.2768409848213196, -0.030185740441083908, 0.05851677060127258, -0.26433607935905457, -0.08702216297388077, -0.46045738458633423, -0.3792770802974701, 0.8202784061431885, -0.552304208278656, -0.3034842312...
multiple replacements in one pass: You can have the callback function do all the work for you. 1. Add a unique css class to all divs that need replacing. This will allow you to select all of them in one shot. Remember that html elements can have more than one css class (that's what the "c" in [CSS](http://en.wikipedi...
[ 0.3938977122306824, -0.3157617449760437, 0.5112667679786682, 0.1128697618842125, -0.24797354638576508, 0.24517931044101715, 0.02968471683561802, -0.41482430696487427, -0.2827875316143036, -0.8145330548286438, 0.05275435745716095, 0.4392410218715668, -0.6162052750587463, -0.1610609292984008...
another div container or just a single "a" element) should have a unique id similar to the container they're to be inserted into. For example, div\_replace1 would be the id of a container and div\_replace1\_insert would be the id of the element to be inserted 3. Inside the callback function, iterate over the replacemen...
[ 0.1342490166425705, -0.3950493633747101, 0.47807246446609497, -0.28290241956710815, 0.09515361487865448, -0.04120628163218498, -0.08966102451086044, -0.49144259095191956, 0.07015703618526459, -0.4964604079723358, -0.22732605040073395, 0.6212460398674011, -0.5522274971008301, 0.193724855780...
like to insert. `$("#" + replacement_id)` will now give you a reference to the element you want to insert. You can do the insertion something like this: `this.html( $("#" + replacement_id) );` You may have to edit the code above (it's not tested), but this would be the general idea. You can use naming conventions to r...
[ 0.5257790684700012, -0.057773180305957794, 0.11120650917291641, 0.13176988065242767, 0.16389583051204681, -0.10976620763540268, 0.1535915732383728, -0.028746221214532852, -0.12744463980197906, -0.6419455409049988, -0.09830976277589798, 0.7531920075416565, -0.6995810866355896, -0.1427381634...
In my LaTeX document I've got a table of contents that is automatically generated by collecting everything that is of the form `\chapter`. However, I've got an acknowledgements chapter before the table of contents and I don't want it to be automatically labelled "Chapter 1" or captured in the table of contents. Should...
[ -0.041267529129981995, 0.24666227400302887, 0.7165683507919312, 0.012573263607919216, 0.07245030999183655, -0.1871543824672699, -0.11258962005376816, 0.18840189278125763, -0.20318251848220825, -0.5337693095207214, -0.45385807752609253, 0.4405391812324524, -0.23452657461166382, 0.1046157032...
to correspond to chapter 1. This may only work in the `book` class. If you're using `\chapter` in a `report`, then `\chapter*` should also create a chapter that has no number and won't show up in the table of contents.
[ 0.09541384875774384, 0.1769234538078308, 0.20187106728553772, 0.06223420426249504, -0.019022418186068535, -0.3992634117603302, 0.23970910906791687, 0.10660932213068008, -0.08673395961523056, -0.559070348739624, -0.49994656443595886, 0.26983198523521423, -0.447467178106308, 0.02753674425184...
I am trying to get the current Windows theme name in C# but it has turned out to be a little tougher than expected. I have a code sample from MSDN: ``` public void Test() { StringBuilder themeFileName = new StringBuilder(0x200); GetCurrentThemeName(themeFileName, themeFileName.Capacity, null, 0, null, 0); ...
[ 0.1986914724111557, -0.10582199692726135, 1.0558185577392578, -0.09177985042333603, 0.03237569332122803, 0.08430536091327667, 0.34358492493629456, -0.6150813102722168, 0.03180934861302376, -0.7803580164909363, -0.045086219906806946, 0.514768660068512, 0.00925093237310648, 0.491837531328201...
dwMaxNameChars, StringBuilder pszColorBuff, int dwMaxColorChars, StringBuilder pszSizeBuff, int cchMaxSizeChars); ``` GetCurrentTheme() does not modify the StringBuilder. I also tried looking at the System.Windows.Forms.VisualStyles.VisualStyleInformation class, but it is full of empty values. Anyone know how ...
[ 0.45285025238990784, -0.16794855892658234, 0.518037736415863, 0.19626593589782715, 0.054222170263528824, -0.17171581089496613, 0.3393667936325073, -0.2226049304008484, -0.036158833652734756, -0.7711740136146545, 0.06919029355049133, 0.5131743550300598, -0.18991070985794067, -0.128224894404...
How do I remove the red boxes from my hyperlinked table of contents created by using the hyperref package in LaTeX. To remove the borders: ``` \hypersetup{% pdfborder = {0 0 0} } ``` The `colorlinks` option will turn on the link colors and also remove the borders. (This is why alamodey set all the link colors to...
[ -0.08808724582195282, 0.030550148338079453, 0.7403512597084045, 0.04800480976700783, 0.30430522561073303, -0.17802229523658752, 0.28709885478019714, -0.11810687184333801, -0.2918151319026947, -0.7685492038726807, -0.1091860756278038, 0.41965848207473755, -0.4271870255470276, 0.396503329277...
I am trying to determine the best way to handle getting rid of newlines when reading in newline delimited files in Python. What I've come up with is the following code, include throwaway code to test. ``` import os def getfile(filename,results): f = open(filename) filecontents = f.readlines() for line in fi...
[ 0.4034612476825714, -0.1680525839328766, 0.6652730703353882, -0.2426384836435318, 0.024812350049614906, 0.074034184217453, 0.18445175886154175, -0.22853656113147736, -0.24226146936416626, -0.6733371615409851, -0.38273701071739197, 0.5829445719718933, -0.5594649314880371, -0.165178075432777...
I know this question has been asked before, but there was no clear answer. How do I change the printer tray programmatically? I am trying to use python to batch print some PDFs. I need to print different pages from different trays. The printer is a Ricoh 2232C. Is there a way to do it through and Acrobat Reader comm...
[ 0.34222307801246643, 0.11601925641298294, 0.27245134115219116, 0.1430301070213318, -0.11879191547632217, -0.057657692581415176, -0.12677794694900513, 0.013451507315039635, -0.2425762414932251, -0.7330437302589417, 0.1440727859735489, 0.5538482666015625, -0.23212502896785736, 0.160220384597...
printer (if you need to print to a network printer, download the drivers and add it as a local printer) 2. use win32print to get and set default printer 3. also using win32print, use the following code: ``` import win32print PRINTER_DEFAULTS = {"DesiredAccess":win32print.PRINTER_ALL_ACCESS} pHandle = win32pr...
[ -0.1796606183052063, 0.0013150767190381885, 1.1629120111465454, -0.17017525434494019, -0.09867506474256516, -0.02105850912630558, 0.0016460404731333256, -0.370768666267395, -0.46800440549850464, -0.9301571249961853, -0.014304769225418568, 0.5279250741004944, -0.2350921630859375, -0.0132227...
(from Graham King's blog) ``` from win32com import client import time ie = client.Dispatch("InternetExplorer.Application") def printPDFDocument(filename): ie.Navigate(filename) if ie.Busy: time.sleep(1) ie.Document.printAll() ie.Quit() ``` Done
[ 0.12282225489616394, 0.07917898148298264, 0.4550115466117859, -0.2212524712085724, 0.3169189691543579, -0.15015408396720886, 0.35848861932754517, -0.2179824560880661, -0.3881881833076477, -0.7787265181541443, -0.3864830434322357, 0.6095499396324158, -0.46393030881881714, -0.051984503865242...
I have been a web developer for my entire development career. Nearly 100% microsoft focused the entire time. I have been using .Net, both C# and VB.Net, since beta. I now find myself in a position to where I have the opportunity to start doing some WinForms development in C# using the 3.5 framework. As with anything ne...
[ 0.6223454475402832, 0.41854313015937805, -0.14603303372859955, -0.20813889801502228, -0.11483805626630783, -0.2444692850112915, 0.13736282289028168, 0.37768152356147766, 0.04985560104250908, -0.8418827652931213, 0.1094733327627182, 0.7906647324562073, 0.36234018206596375, 0.326124161481857...
that the paradigms are very different. I really enjoy C# because of how easy it is to write great windows software. Start by getting into the IDE and creating a real but small project. One of my first C# projects was a light weight budget program. That took me into many areas of C#, from XML handling to custom windows...
[ 0.5021435618400574, 0.055832259356975555, -0.26879259943962097, 0.3665490448474884, -0.21644197404384613, -0.13696584105491638, 0.10311062633991241, 0.3481258153915405, -0.16252699494361877, -0.44896915555000305, 0.2796756625175476, 0.7175414562225342, 0.17856742441654205, -0.2130799293518...
but getting your hands dirty (in conjunction with a good book) is far more effective. Set a goal and go for it, you will have no problem learning all about it. Don't be afraid to try things and take risks -- it helps you learn the system.
[ 0.5803492665290833, -0.029097195714712143, -0.3404754400253296, 0.3689287304878235, -0.12251529097557068, -0.42128074169158936, 0.5495868921279907, 0.1515774130821228, -0.2429032027721405, -0.537655770778656, 0.5207191705703735, 0.44391047954559326, 0.013166883029043674, -0.319069713354110...
I wish to load and use a font to a desktop application in C#. It's that possible without installing the font on the system? It's a kind of question like [this](https://stackoverflow.com/questions/107611/how-can-i-temporarily-load-a-font) but not from a DLL. I want to load from font file. There's a class System.Drawing...
[ 0.5673934817314148, 0.267139196395874, 0.6433699131011963, -0.05963298678398132, 0.032312389463186264, 0.17093901336193085, 0.08783618360757828, -0.22067998349666595, -0.2019912153482437, -0.747057318687439, 0.05249747261404991, 0.5140137076377869, -0.14622043073177338, 0.11891594529151917...
The font will be uninstalled once the process terminates.
[ 0.08931216597557068, 0.28266096115112305, 0.7201911211013794, -0.002042610663920641, 0.2546185255050659, 0.2609733045101166, 0.44720733165740967, 0.11981327831745148, 0.12043915688991547, -0.5041697025299072, -0.7386539578437805, 0.2885841429233551, -0.010913427919149399, 0.153817534446716...
I need to get the bit rate of a mp3 file which is being streamed as a netstream object in flash action scripting. I am using Flash Media Server 3.2. I need the bitrate to calculate the duration of the mp3 file using the formula: Duration = file size in bytes / bitrate Without the use of an index, a database has to pe...
[ 0.1720779836177826, 0.026490647345781326, 0.24748200178146362, 0.1145487055182457, -0.23032625019550323, -0.3441248834133148, 0.05230052396655083, -0.07797025144100189, -0.36325299739837646, -0.7069709897041321, 0.15545415878295898, 0.8067019581794739, -0.05843307077884674, 0.0224220007658...
much load your system has. Using MySQL we successfully implemented a search system on a table of lead information. The nature of the problem was one that could not be solved by normal indexes (including full text). So we **designed it** to be powered using a full table scan. That involved creating tables as narrow as ...
[ -0.007329646032303572, -0.2433348000049591, 0.4100799858570099, 0.42865726351737976, -0.033301085233688354, -0.058667656034231186, 0.17221741378307343, -0.08217541128396988, -0.6262256503105164, -0.3941632807254791, 0.38845834136009216, 0.4752129018306732, -0.059548184275627136, 0.20535983...