text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
in Python 3.0, this doesn't work any more. For instance, this: ``` import urllib.request; url = "http://username:password@server/file"; urllib.request.urlretrieve(url, "temp.dat"); ``` fails with this exception: ``` Traceback (most recent call last): File "C:\Temp\test.py", line 5, in <module> urllib.request...
[ -0.08861301839351654, 0.10500823706388474, 0.2673797607421875, -0.20367206633090973, -0.1286480724811554, 0.11720594018697739, 0.45637232065200806, -0.2293476015329361, -0.2654329240322113, -0.2147948294878006, -0.20616954565048218, 0.4955424964427948, -0.4524945616722107, -0.0588073767721...
= base64.b64encode(user_passwd).strip() File "C:\Python30\lib\base64.py", line 56, in b64encode raise TypeError("expected bytes, not %s" % s.__class__.__name__) TypeError: expected bytes, not str ``` Apparently, base64-encoding now needs bytes in and outputs a string, and thus urlretrieve (or some code therein)...
[ -0.14354026317596436, 0.15753863751888275, 0.5494226217269897, -0.23123790323734283, 0.11016499996185303, 0.27946990728378296, 0.18637754023075104, -0.41259315609931946, -0.26577281951904297, -0.4408707320690155, -0.3595656752586365, 0.5925916433334351, -0.257473349571228, 0.04067662358283...
return _opener.open(url, data, timeout) File "C:\Python30\lib\urllib\request.py", line 359, in open response = self._open(req, data) File "C:\Python30\lib\urllib\request.py", line 377, in _open '_open', req) File "C:\Python30\lib\urllib\request.py", line 337, in _call_chain result = func(*args) File...
[ -0.5446006059646606, 0.3491746485233307, 0.7404240369796753, -0.40667662024497986, -0.15939950942993164, 0.3445236384868622, 0.2583286166191101, -0.40339136123657227, -0.04033716022968292, -0.2792346179485321, -0.506489098072052, 0.5666462182998657, -0.34860408306121826, 0.0772537663578987...
port: '%s'" % host[i+1:]) http.client.InvalidURL: nonnumeric port: 'password@server' ``` Apparently the url parsing in this "next gen url retrieval library" doesn't know what to do with username and passwords in the url. What other choices do I have? Direct from the Py3k docs: <http://docs.python.org/dev/py3k/librar...
[ -0.33231791853904724, 0.19260790944099426, 0.8115118741989136, -0.20121386647224426, -0.6967797875404358, 0.3673780858516693, 0.2989291548728943, -0.2862737476825714, -0.04011930525302887, -0.9116814136505127, -0.20063279569149017, 0.2960817515850067, -0.2405223697423935, 0.495289891958236...
user='klem', passwd='kadidd!ehopper') opener = urllib.request.build_opener(auth_handler) # ...and install it globally so it can be used with urlopen. urllib.request.install_opener(opener) urllib.request.urlopen('http://www.example.com/login.html') ```
[ 0.2772635221481323, 0.25818559527397156, 0.710121214389801, -0.4113602638244629, -0.05875755101442337, -0.0013478563632816076, 0.31802424788475037, -0.20774182677268982, -0.17398257553577423, -0.8856320381164551, -0.3539353907108307, 0.3943648636341095, -0.32778650522232056, 0.379164367914...
I am using Eclipse IDE with few plug-ins for PHP dev. I am using PHPEclipse plug-in and I know there are lotsa other plugins like EasyEclipse.But is there an IDE like Visual Studio with cool drag and drop stuff for PHP? I use APTANA. You can get it here <http://www.aptana.com/> It's my web IDE of choice.
[ 0.6175196766853333, -0.08269476145505905, -0.09467780590057373, -0.03983990475535393, -0.5729674100875854, -0.023378154262900352, -0.010042843408882618, 0.22642016410827637, -0.22882167994976044, -0.8609511256217957, 0.3616090714931488, 0.5356382131576538, -0.12490919977426529, 0.011096977...
Like many of you, I have to deal with a large amount of files: source code, binary downloads, spreadsheets, pdf's, word docs, images, note files, quick scripts, and more. These files can fall into many categories: * Temporary files that should eventually be deleted * Important or useful references files that should b...
[ 0.8616729378700256, 0.4982510209083557, 0.18424060940742493, 0.28339821100234985, 0.31998011469841003, -0.2082282304763794, -0.06339723616838455, 0.18004457652568817, -0.4667898714542389, -0.641818642616272, -0.10400644689798355, 0.18903253972530365, 0.1826774924993515, 0.21753598749637604...
I access via commandline on a frequent basis For archived files, an indexed, tag-based categorization system would seem to be a better fit than the folder approach. Are there any recommended tools or systems for managing files effectively? I'm considering turning my Downloads folder into a sort of "Inbox" and taking ...
[ 0.059891704469919205, 0.3377576768398285, 0.2645273506641388, 0.2369074523448944, 0.20382478833198547, 0.07890404760837555, 0.19920779764652252, 0.4874734878540039, -0.42634597420692444, -0.9074634909629822, -0.0691351667046547, 0.4945638179779053, 0.12239287793636322, 0.3355090320110321, ...
messages needed more than one classification, but could only be stored in one place. We got migrated to Notes, which means that long-term memory is lost - I hate that. I try to keep stuff organized by projects - in the loosest sense of the term. I have top-level directories like: * bin - executable commands * inc - h...
[ 0.3162863552570343, 0.17871488630771637, 0.2712804079055786, 0.35224783420562744, -0.1610105186700821, -0.022866353392601013, 0.15641510486602783, 0.32292640209198, -0.3972483277320862, -0.46385082602500916, -0.16835427284240723, 0.09448365867137909, -0.2382880449295044, -0.051761005073785...
scripts * tmp - nominally temporary files (the oldest resident has passed the decade mark, but that was imported from elsewhere; the oldest residents I created or downloaded date from late 2000) I then have a miscellany of semi-purposeful sub-directories, such as: * work - laden with sub-directories related to work *...
[ 0.6053467392921448, -0.011897801421582699, 0.2805928587913513, 0.35014328360557556, 0.08865420520305634, 0.11783012002706528, 0.19434404373168945, 0.24712342023849487, -0.2713536024093628, -0.8588422536849976, -0.2429821491241455, 0.22533756494522095, -0.033157240599393845, -0.167307659983...
the Windows laptop I use, I have a `C:\Filing Cabinet\` directory which has a hierarchy of sub-directories under it. I don't like the way Windows scatters my files around; I much prefer to be in charge of scattering my own files around the way I want to. My Mac at home parallels my main work machine - minus the work-s...
[ 0.11031549423933029, 0.34396758675575256, 0.13739776611328125, -0.04446123167872429, -0.04720097407698631, 0.04560850188136101, -0.1340135633945465, 0.256595641374588, -0.36948373913764954, -0.62553870677948, -0.18095964193344116, 0.5539135336875916, -0.03131113946437836, 0.344421952962875...
I'm wanting to decrement a variable in a MySQL table by one everytime an UPDATE query is ran. What I have is this, which isn't working: `UPDATE forum SET replys = reply-- WHERE fid = '$id'` Is this possible in any way, or am I going to have to run a SELECT and get the value first, decrement it, and then insert the n...
[ 0.04169519245624542, 0.2961815297603607, 0.513972818851471, -0.01145632192492485, -0.11927882581949234, -0.1633218377828598, 0.1453007310628891, -0.17267858982086182, -0.21112409234046936, -0.5658822655677795, 0.13413715362548828, 0.6324506402015686, -0.563241183757782, 0.409024178981781, ...
I have a funciton that I am currently using to show a hidden div.a\_type How can I modify this code so that instead of fading in the hidden div, I can add the new div to the DOM ``` jQuery(function(){ // Add Answer jQuery(".add_answer").click(function(){ if(count >= "4"){ alert('Only 4 Answers A...
[ 0.052217744290828705, -0.4218594431877136, 0.7028090953826904, -0.18015806376934052, 0.07596688717603683, 0.012298819608986378, 0.3494444787502289, -0.2834748923778534, -0.05466737598180771, -0.5055240988731384, -0.32455307245254517, 0.6744906902313232, -0.4393042027950287, 0.3269728720188...
} }); }); ``` --- Ok, now that i have this sorted out, i have one more question, I have another function that removes the inserted div's if a button is clicked. It's not working now that the additional divs are not loaded into the dom on pageload. How can i trigger the function to remove these now? jQuery(f...
[ 0.09983038902282715, -0.21627108752727509, 0.5982230305671692, -0.02241852879524231, 0.21507912874221802, -0.02686057612299919, 0.20959702134132385, -0.18010881543159485, 0.030352892354130745, -0.6486199498176575, -0.38653963804244995, 0.6572031378746033, -0.2745106816291809, 0.21640658378...
somefile should then return the content you want in the div: ``` $.get('path/to/somefile.php', function(data){ $('.a_type:last').insertAfter('<div class="a_type">' + data + '</div>'); }); ``` Somefile.php should be something like this: ``` <?php session_start(); $sessiondata = $_SESSION['data']; echo "Whatever ...
[ 0.5553262233734131, -0.2870924472808838, 0.5893316864967346, 0.0665980726480484, -0.1363356113433838, -0.29790425300598145, 0.17957553267478943, 0.06651794910430908, -0.030873281881213188, -0.6571852564811707, -0.24940931797027588, 0.8464943170547485, -0.2087540477514267, -0.19519196450710...
Which would be the correct format for this XML data, are they equivalent or are there trade offs between the two? 1. ``` <sitemap> <category name="Animals"> <section title="Dogs"> <page url="/pics/greatdane.jpg" title="Great Dane"/> </section> </category> </sitemap> ``` 2. ``` <sitemap> <page> ...
[ 0.34094518423080444, -0.15111717581748962, 0.09715641289949417, -0.008753690868616104, -0.2903575897216797, 0.013673506677150726, 0.14491616189479828, -0.5831080079078674, -0.024822179228067398, -0.47313445806503296, 0.014084690250456333, 0.49397706985473633, -0.045181408524513245, 0.08797...
for the better part of a decade and there is no right answer. Instead consider the differences and from that you should be able to decide which to use: * There can be only one instance of an attribute although you can enforce this with elements using DTD or XML Schema; * Attributes are unordered. Elements are not; * A...
[ 0.15484870970249176, -0.02339825965464115, 0.28999003767967224, 0.15616852045059204, -0.16685689985752106, -0.121885284781456, 0.1384652704000473, -0.0072939726524055, -0.10844056308269501, -0.9000242948532104, -0.05918101593852043, 0.3674694001674652, 0.01790708117187023, -0.1389277428388...
values (implied) for attributes but no such mechanism for elements; and * Elements, being elementss, can have children and attributes of their own. Attributes obviously cannot. So, from your example, your innermost `<page>` element has a URL attribute (although it's an image for some reason--perhaps a preview icon? If...
[ 0.1703488975763321, 0.12526094913482666, 0.22673973441123962, 0.33758285641670227, -0.18747979402542114, -0.14555002748966217, 0.0675879642367363, 0.1105438768863678, -0.11437945812940598, -0.6433585286140442, -0.04689658060669899, 0.21258075535297394, -0.08877839148044586, 0.1282657831907...
the end, most of the time there's no right or wrong answer and it's largely a question of style.
[ 0.37885913252830505, 0.14089065790176392, 0.02728370390832424, 0.33460089564323425, -0.0910545065999031, 0.06820066273212433, 0.19953905045986176, -0.06797878444194794, 0.43685999512672424, -0.3102627098560333, -0.18079866468906403, 0.6539268493652344, 0.3319224715232849, 0.047030996531248...
Given this: ``` Interface IBase {string X {get;set;}} Interface ISuper {string Y {get;set;}} class Base : IBase {etc...} class Super : Base, ISuper {etc...} void Questionable (Base b) { Console.WriteLine ("The class supports the following interfaces... ") // The Magic Happens Here } ``` What can I replace "The...
[ 0.17072167992591858, 0.1710290014743805, 0.584711492061615, 0.028657954186201096, -0.1064690500497818, -0.06055087968707085, 0.4118032157421112, -0.5119028687477112, 0.12932510673999786, -0.7834994792938232, -0.010822680778801441, 0.7141872644424438, -0.162065789103508, 0.04399310052394867...
I know someone who has a one-man company developing applications in Delphi and Pascal. He is running into problems in handling the workload. Thus, he needs to find an employee. Having trouble finding people, he said his company is not attractive for graduated students. One of the reasons was that he uses a platform th...
[ 0.2930126190185547, 0.29364508390426636, -0.04095742106437683, 0.2270199954509735, -0.1496695578098297, 0.005662259180098772, 0.016168342903256416, -0.0838765799999237, -0.17328417301177979, -0.5721348524093628, 0.045514799654483795, 0.590112030506134, -0.5593101382255554, 0.34528398513793...
his applications. Java was also not an option because of bad UI's. As Delphi targets Win32, it seems very attractive if you want speed/portability. Also there is no need for a virtual machine. Are frameworks a "threat" to applications developers? However, I do not know much of delphi, but because of its high-level n...
[ -0.10559910535812378, 0.21111246943473816, 0.0630795806646347, 0.24517662823200226, -0.06683416664600372, -0.22980165481567383, 0.12895773351192474, -0.1368676722049713, -0.1744205504655838, -0.598463773727417, -0.01594795472919941, 0.585685133934021, -0.4286882281303406, 0.009798508137464...
earlier suggested, as FreePascal is slowly getting to the point where it could replace Delphi, and is 64-bit and multi-platform, but still difficult. With significant time invested in Delphi and VCL, he probably is capable of turning out applications very fast now. Getting to that same point with java or .net, unders...
[ 0.20860682427883148, 0.17665918171405792, 0.17430052161216736, 0.2605385184288025, -0.15984366834163666, -0.31888988614082336, 0.2817850410938263, 0.1119985356926918, -0.1536492258310318, -0.599189043045044, -0.20566309988498688, 0.49228376150131226, -0.2693637013435364, 0.0350679121911525...
leaves an easy-to-follow trace of tried-and-abandoned technologies. [response to comment] I don't have a problem recommending a Delphi application to larger companies. Current development style in java or .net is unlikely to have a longer lifespan than Delphi. Starting new application development in it I probably woul...
[ 0.1592976301908493, 0.2150251865386963, 0.09033676236867905, 0.0712297111749649, 0.12971222400665283, -0.3897823393344879, 0.3093852400779724, 0.14454856514930725, -0.14783160388469696, -0.6104296445846558, -0.08012105524539948, 0.46922409534454346, -0.012857520952820778, -0.08543714135885...
How can I determine how much memory each device driver is consuming? I'm assuming this can be done with some Win32 or .NET API, but I just haven't been able to determine which. I know this is non-trivial. Here are some starting points for closely related questions: You can get a (likely unsatisfactory) start by using ...
[ 0.014886314049363136, -0.01094948872923851, 0.05647691711783409, 0.3114258944988251, 0.05611598491668701, 0.023778080940246582, -0.07579302787780762, 0.08532067388296127, -0.37707197666168213, -0.8614258170127869, 0.06455141305923462, 0.58078533411026, 0.04373257979750633, 0.30698919296264...
the code that is allocating it. The best shot there is to use something like [detours](http://research.microsoft.com/en-us/projects/detours/) to track the dynamic memory allocations as they are made and walk the stack to determine the orginator. Finally the fact that you wish to do this for device drivers takes it one ...
[ 0.06610512733459473, -0.3951301872730255, 0.3378373682498932, 0.4575490355491638, 0.2170465886592865, 0.014962375164031982, -0.22702069580554962, -0.07481160759925842, -0.48602426052093506, -0.6010629534721375, -0.11495086550712585, 0.5888949632644653, -0.12218404561281204, -0.188966453075...
to View/show lower pane, enable Dll's. Then right click on the column headers and add the ones for working set e.g. 'WS Total'. I'm not sure what this does to properly label them memory. On my box it gives them mapped image size of device drivers, but simply has 0K in the Working set columns. I take the lack of an answ...
[ 0.24719540774822235, 0.05850629135966301, 0.43749362230300903, 0.077481709420681, -0.09387029707431793, 0.0664883553981781, 0.3644615113735199, 0.30280736088752747, -0.4977937340736389, -0.7314072251319885, 0.0019047664245590568, 0.6626728177070618, 0.2912331819534302, 0.2624370753765106, ...
I would like to know the recommended library or procedure for dealing with multi-coloured text within Java. My current usage of java.awt.Graphics, while function, appears to be a bit more complex than necessary. The main issue involves the frequent change of colour, creating a new java.awt.Colour() object whenever a n...
[ 0.32309281826019287, 0.0977211520075798, 0.3055816888809204, -0.5980107188224792, -0.1885596215724945, 0.34130871295928955, 0.2737543284893036, -0.27200254797935486, -0.19608940184116364, -0.8996633887290955, 0.14298179745674133, 0.6824337840080261, -0.4411042630672455, 0.01938986778259277...
identified a secondary bottleneck in an extreme case. I suspect that it may be the method used for drawing a single character, but there may be overhead in determining said character: ``` char[] c = new char[1]; // Created once for many uses /* ... */ g.drawChars(charRender, 0, 1, x, y); ``` I have looked at the Buf...
[ 0.10912607610225677, -0.08182154595851898, 0.23140083253383636, -0.13519462943077087, -0.0655534639954567, 0.1061718538403511, 0.1434517502784729, -0.02874395065009594, 0.055976759642362595, -0.5819295644760132, -0.08084801584482193, 0.536415696144104, -0.3063386082649231, 0.02514576166868...
into using an [AttributedString](http://java.sun.com/javase/6/docs/api/java/text/AttributedString.html) along with [TextAttribute](http://java.sun.com/javase/6/docs/api/java/awt/font/TextAttribute.html). These allow you to assign different styles (color, font, etc.) to various ranges of characters within a string and t...
[ 0.3123382329940796, -0.11404342204332352, 0.29107946157455444, -0.19978177547454834, -0.3492482900619507, 0.0957542434334755, -0.04895354434847832, -0.3090449571609497, -0.1149015948176384, -0.7187900543212891, -0.17121262848377228, 0.5193433165550232, -0.21685515344142914, -0.003815477713...
I'm looking for a sequence of steps to add java code formatting to my blogspot blog. I'm really looking for a dummies guide - something so simple a cleaner could follow it if they found it on a piece of paper on the floor. I use [Google prettify](http://code.google.com/p/google-code-prettify/) script (StackOverflow u...
[ 0.3880435824394226, 0.27355366945266724, 0.5599239468574524, 0.027679629623889923, -0.40122413635253906, -0.25447264313697815, 0.1979740560054779, -0.07755546271800995, -0.23507976531982422, -0.5383999943733215, 0.1254250854253769, 0.7563421726226807, -0.1620103120803833, -0.05905677750706...
I come from a Java background and with any servlets-based technology, it's trivial to map a range of URLs (eg /reports/*, /secure/*.do) to a specified servlet. Now I'm less familiar with PHP but I haven't yet seen anything that does quite the same thing with PHP (or mod\_php). It's entirely possible that I'm missing so...
[ 0.6118625402450562, 0.18311883509159088, 0.08692891895771027, 0.04059223830699921, -0.44915771484375, -0.34687888622283936, 0.22514572739601135, 0.14893607795238495, -0.18037022650241852, -0.7504088878631592, 0.37559258937835693, 0.181613489985466, -0.07773485779762268, 0.2756386995315552,...
problems. Another big reason to use something like this is to have RESTful URLs. With Apache, you are able to setup URL Rewriting for your php pages with mod\_rewrite, check this resources: * [mod\_rewrite: A Beginner's Guide to URL Rewriting](http://www.sitepoint.com/article/guide-url-rewriting/) * [Module mod\_rewr...
[ 0.06895017623901367, 0.15246888995170593, 0.45894181728363037, 0.11638879776000977, -0.12568508088588715, -0.38407838344573975, 0.6696895360946655, -0.1605054885149002, -0.26061880588531494, -0.5846264362335205, -0.05263356864452362, 0.7875878214836121, -0.40803369879722595, 0.139457926154...
I'm having a hell of a time understanding pointers in Objective C. They don't behave like I would assume based on various C tutorials. Example: ``` // Define Name and ID NSString *processName = [[NSProcessInfo processInfo] processName]; NSNumber *processID = [NSNumber numberWithInt:[[NSProcessInfo processInfo] proces...
[ -0.11346521228551865, 0.27585935592651367, 0.29917973279953003, -0.13750424981117249, 0.02364424802362919, 0.09091196954250336, -0.06952837109565735, -0.18097703158855438, -0.4469739496707916, -0.6598502993583679, 0.037029463797807693, 0.4894905686378479, -0.13594524562358856, 0.2255968451...
'address of' character in Obj C? Why does this code work? Thank you for your time. Objects in objective c are represented as pointers to c structures that contain all of the object data. If the object were an actual struct (rather than a pointer to one) it would make things like passing objects as method parameters mu...
[ -0.1253754198551178, 0.05706920847296715, 0.14241066575050354, 0.05157677084207535, -0.21254444122314453, 0.021288631483912468, 0.11059817671775818, 0.010339577682316303, 0.033413466066122055, -0.5063900351524353, -0.12785662710666656, 0.5680724382400513, -0.4132974147796631, -0.0371438525...
on that object to determine what value to output. When the description method is called on an NSString object, it returns the receiver, so the %@ token is replaced by the contents of the string in the output.
[ 0.0889240950345993, -0.30887332558631897, 0.34723442792892456, -0.05134027078747749, 0.03630227595567703, 0.2146623432636261, 0.27781906723976135, 0.25824156403541565, 0.2886185944080353, -0.16670924425125122, -0.2834031581878662, 0.4818118214607239, -0.2914590835571289, 0.3276238739490509...
I'd use a singleton like this: ``` Singleton* single = Singleton::instance(); single->do_it(); ``` I'd use an unnamed class like this: ``` single.do_it(); ``` I feel as if the Singleton pattern has no advantage over the unnamed class other than having readable error messages. Using singletons is clumsier than usi...
[ 0.3598090708255768, 0.10725445300340652, -0.1393163800239563, 0.04124147444963455, -0.3516506254673004, -0.13114407658576965, 0.19589616358280182, -0.09562405943870544, -0.39528122544288635, -0.53168785572052, -0.01212285365909338, 0.5182587504386902, -0.3429657220840454, 0.421344399452209...
so: ``` #ifndef NDEBUG class Singleton__ { // readable error messages, #else class { // unnamed, clients can't instantiate #endif // ... }single; ``` with the latter approach having the advantage of readable compiler error messages but not being a singleton in debug mode. I think the most importa...
[ 0.23544859886169434, -0.037378549575805664, -0.09813965111970901, -0.08778934180736542, -0.2795308232307434, -0.35792699456214905, 0.23719941079616547, -0.18485352396965027, -0.3796215355396271, -0.32301896810531616, -0.3153059780597687, 0.44418689608573914, -0.6735565066337585, 0.41724592...
is no way to declare its name in another scope referring to it (precisely because it has no name). But using it to declare `single`, which *has* linkage (external here) is not valid (3.5/8). `single` has to be defined locally in main where it will have no linkage. You also cannot pass single to function templates and i...
[ 0.44723373651504517, -0.21319842338562012, 0.025272971019148827, -0.08777054399251938, -0.1799001395702362, -0.4869183897972107, 0.4193519949913025, 0.014799843542277813, -0.5220322608947754, -0.17845295369625092, -0.490013062953949, 0.04056501016020775, -0.6589754819869995, 0.548851847648...
Can I make a difference at an open source project? I haven't gotten a degree or anything but I am really interested in computer science and I have most of the fundamentals down. Is there a project I can make a difference at? If not, any sites where I can further my knowledge and review the fundamentals (advanced conc...
[ 0.8606886863708496, 0.3790258467197418, -0.27739468216896057, 0.22807586193084717, -0.0032566951122134924, 0.021590888500213623, 0.16878347098827362, 0.4676985740661621, -0.1768774837255478, -0.5220483541488647, 0.25742053985595703, 0.4555913805961609, 0.5983563661575317, -0.10275692492723...
> **Possible Duplicate:** > > [What should a good BugTracking tool be capable of?](https://stackoverflow.com/questions/318996/what-should-a-good-bugtracking-tool-be-capable-of) Although there is a large set of features that a bug tracker can have I feel like it is a little overkill and was considering rolling out m...
[ 0.6273868083953857, 0.2175399512052536, -0.009286162443459034, 0.057932425290346146, -0.09924212843179703, -0.15702590346336365, 0.46380528807640076, -0.08629160374403, -0.12669718265533447, -0.5191551446914673, 0.17904998362064362, 0.6257804036140442, -0.12727591395378113, -0.188302338123...
as severity (how much that bug relates to them). * Ability for the developer to override that priority and, if possible, give a reason. * Ability to assign tasks to a developer. * Ability to sort between bug, enhancement, and feature request. The difference between an enhancement and feature request is very subtle but ...
[ 0.40368330478668213, -0.20629984140396118, 0.34326067566871643, 0.2685892879962921, -0.023191118612885475, 0.08806867897510529, 0.20872463285923004, -0.20137503743171692, -0.6477581858634949, -0.6043971180915833, -0.3418132960796356, 0.5368312001228333, 0.07763085514307022, -0.275578200817...
able to have the users phone number (if they are on your LAN) so you can ask questions, if needed. * Privacy. Some items, such as security exploits or information that deals with financial information, will need to be kept secret. Even OSS does this from time to time until they can get a patch ready. Everyone has their...
[ 0.31583431363105774, -0.16189946234226227, 0.4400028884410858, 0.20886090397834778, 0.34478631615638733, -0.3331642746925354, 0.40431705117225647, -0.047842517495155334, -0.7361229062080383, -0.6804893612861633, -0.16134324669837952, 0.1914377063512802, -0.03493982180953026, -0.05182644724...
all. That's all I can think of...
[ 0.16260872781276703, 0.6581184267997742, 0.3506314158439636, 0.02053043618798256, 0.026713702827692032, -0.06609607487916946, 0.07375258952379227, 0.1392441689968109, 0.10207588225603104, -0.2970130741596222, -0.1136118471622467, 0.4540933668613434, -0.3450016379356384, 0.30125290155410767...
I have a Rails site, where the content is written in markdown. I wish to display a snippet of each, with a "Read more.." link. How do I go about this? Simple truncating the raw text will not work, for example.. ``` >> "This is an [example](http://example.com)"[0..25] => "This is an [example](http:" ``` Ideally I wa...
[ 0.554563045501709, 0.05209725350141525, 0.33080950379371643, 0.21889518201351166, -0.17318253219127655, -0.11825025081634521, 0.12054626643657684, 0.20778299868106842, -0.11196591705083847, -0.8313596844673157, 0.21005548536777496, 0.3453129231929779, -0.08891420066356659, 0.02087486162781...
will be visible once clicking the "Read more.." link ``` The marker could be thought of like an EOF marker (which can be ignored when displaying the full document) I am using [maruku](http://maruku.rubyforge.org/) for the Markdown processing (RedCloth is very biased towards Textile, BlueCloth is extremely buggy, and...
[ 0.32099875807762146, -0.07805610448122025, 0.6620296239852905, -0.10749015212059021, -0.18505117297172546, 0.07386406511068344, 0.39446571469306946, -0.3971717953681946, -0.18157681822776794, -0.8168017864227295, -0.22100712358951569, 0.38772743940353394, 0.029200470075011253, 0.0158106386...
of preference).. * Add a "truncate" option to the maruku parser, which will only parse the first x words, or till the "excerpt" marker. * Write/find a parser-agnostic Markdown truncate'r * Write/find an intelligent HTML truncating function > * Write/find an intelligent HTML truncating function The following from <htt...
[ -0.45725569128990173, 0.07441779971122742, 0.7511423826217651, -0.12771505117416382, -0.2246791571378708, 0.26202112436294556, 0.3861777186393738, -0.39205530285835266, 0.20128518342971802, -0.38145801424980164, -0.15694177150726318, 0.8494472503662109, -0.20443780720233917, -0.37535378336...
results = '' while p.has_next? && new_len > 0 p_e = p.pull case p_e.event_type when :start_element tags.push p_e[0] results << "<#{tags.last}#{attrs_to_s(p_e[1])}>" when :end_element results << "</#{tags.pop}>" when :text results << p_e[0][0..new_len] ...
[ -0.12094591557979584, -0.4533786475658417, 0.6497571468353271, -0.04947977513074875, -0.0481870099902153, 0.09326280653476715, 0.01577037386596203, -0.6927247047424316, -0.3124085068702698, -0.35307005047798157, -0.2988373339176178, 0.46463334560394287, -0.07074939459562302, -0.13701614737...
else results << "<!-- #{p_e.inspect} -->" end end if at_end results << "..." end tags.reverse.each do |tag| results << "</#{tag}>" end results end private def attrs_to_s(attrs) if attrs.empty? '' else ' ' + attrs.to_a.map { |attr| %{#{attr[0]...
[ -0.5015790462493896, -0.31761518120765686, 0.5232217907905579, 0.049824438989162445, 0.13196931779384613, -0.0023605923634022474, 0.19272495806217194, -0.4331417679786682, -0.20454087853431702, -0.6316795945167542, -0.3710399270057678, 0.32613083720207214, -0.27508607506752014, -0.25687482...
}.join(' ') end end end ```
[ -0.2633766531944275, 0.0075544556602835655, 0.48816582560539246, -0.2266080230474472, 0.24078957736492157, -0.3441525995731354, 0.2469371110200882, -0.020775070413947105, 0.2812800109386444, -0.40014180541038513, -0.4279935359954834, 0.39793625473976135, -0.5190238356590271, 0.340737342834...
I'm writing a program that allows developers to write AddIn's for it and I'd like developers to be able to hook into events happening in the program. My code isn't compiling because I can't declare a delegate in the IMyProgram interface. So I suppose this is more of a design question. How would you go about getting a...
[ 0.24482852220535278, -0.10052639991044998, 0.05868367478251457, 0.012137142941355705, 0.07567736506462097, 0.08061309158802032, -0.058146633207798004, -0.33041465282440186, -0.28560009598731995, -0.7076478004455566, -0.018539542332291603, 0.31831303238868713, -0.5423230528831482, -0.049565...
/// </summary> void Init(IMyProgram instance); System.Drawing.Image AddInIcon { get; } String DisplayName { get; } String Description { get; } } [AddInContract] public interface IMyProgram : IContract { public delegate EventHandler EmailEventHandler(object sender...
[ -0.29984578490257263, -0.23916614055633545, 0.40880635380744934, 0.0440949909389019, -0.17073018848896027, 0.2513987720012665, 0.2688126564025879, -0.1363787055015564, -0.2749921977519989, -0.8464956283569336, -0.3927159905433655, 0.49934419989585876, -0.5401715636253357, 0.102267578244209...
public event EmailEventHandler AfterCheck; public event EmailEventHandler EmailDownloaded; public event EmailEventHandler OnProcessMessage; } [AddInBase] public class EmailEventArgs : EventArgs { public override string ToString() { return "todo"; } } ``` P...
[ -0.27270835638046265, -0.10792285203933716, 0.32982394099235535, -0.1277095079421997, 0.11971623450517654, -0.37309661507606506, 0.18108266592025757, -0.24789391458034515, -0.09997985512018204, -0.31252944469451904, -0.3472469747066498, 0.6313796639442444, -0.21421480178833008, 0.102328956...
What are the similarities and differences between GridView, DetailView, FormView? What are use case scenarios for when you would use each of these controls and why? GridView shows them all like an HTML table. If you click on a key in a row, DetailView shows the details for the row in a separate space. If you need to ...
[ 0.3868602514266968, -0.2942464053630829, 0.569733202457428, 0.34165340662002563, -0.11078858375549316, 0.12519735097885132, -0.2613106966018677, -0.07613010704517365, -0.13179698586463928, -0.9136195182800293, 0.19843240082263947, 0.4852362871170044, -0.13387176394462585, -0.01879497617483...
Hey, I stumbled upon this site looking for solutions for event overlaps in mySQL tables. I was SO impressed with the solution (which is helping already) I thought I'd see if I could get some more help... Okay, so Joe want's to swap shifts with someone at work. He has a court date. He goes to the shift swap form and it...
[ 0.5907618403434753, -0.1803857386112213, 0.6411048769950867, -0.2423674464225769, 0.27406826615333557, 0.06192531809210777, -0.24329619109630585, 0.02292031981050968, -0.3341066539287567, -0.4355735778808594, 0.20477572083473206, 0.5320801734924316, -0.37925559282302856, -0.171127304434776...
to the script. It runs a query for anyone who has a shift that overlaps this shift. They can't work two shifts at once, so all user IDs from this query are put on a black list. This query looks like: ``` SELECT DISTINCT user_id FROM shifts WHERE FROM_UNIXTIME('$swap_shift_start') < shiftend AND FROM_UNIXTIME('$swap_sh...
[ 0.026868397369980812, 0.03752148896455765, 0.2491208165884018, -0.3022831678390503, 0.24289581179618835, -0.03528834879398346, -0.09382649511098862, 0.0026841945946216583, -0.1648048609495163, -0.675886332988739, -0.01800394244492054, 0.6219145655632019, -0.18915817141532898, 0.33837684988...
shiftstart, lastname ``` Now, you are probably wondering "what is $conflict\_dates???" Well, when Joe submits the swap shift, it reloads his shifts for the week in case he decides to check out another shift's potential. So when it does that first query, while the script is looping through and outputting his choices,...
[ -0.08612985908985138, -0.3083834946155548, 0.41185107827186584, -0.31539592146873474, 0.1952211707830429, 0.134281724691391, -0.0510893315076828, -0.08862657845020294, -0.35204777121543884, -0.5257114171981812, -0.17631864547729492, 0.5639589428901672, -0.3208153247833252, 0.24005901813507...
= '$swap_shift_length') AND NOT( 'joe_shift1_start' < shiftend AND 'joe_shift1_end' > shiftstart) AND NOT( 'joe_shift2_start' < shiftend AND 'joe_shift2_end' > shiftstart) AND NOT( 'joe_shift3_start' < shiftend AND 'joe_shift3_end' > shiftstart) AND NOT( 'joe_shift4_start' < shiftend AND 'joe_shift4_end' > shiftstart) ...
[ 0.18123410642147064, 0.10687250643968582, 0.2846059203147888, 0.016174810007214546, -0.07336369156837463, -0.15313313901424408, 0.27825045585632324, -0.21376904845237732, -0.34505537152290344, -0.47565510869026184, -0.059193313121795654, 0.7141901850700378, 0.06986518949270248, -0.36844399...
able to exclude Joe's other shifts using an inner select instead of the generated string, something like: ``` SELECT * FROM shifts s1 AND shiftstart BETWEEN FROM_UNIXTIME('$startday') AND FROM_UNIXTIME('$endday') AND user_id NOT IN ($busy_users) AND (TIME_TO_SEC(TIMEDIFF(shiftend,shiftstart)) = '$swap_shift_length')...
[ 0.05704837664961815, -0.25824928283691406, 0.25158998370170593, -0.24121622741222382, 0.3048803508281708, 0.22409869730472565, -0.04372219368815422, -0.18559452891349792, -0.31961295008659363, -0.49412330985069275, -0.0988796129822731, 0.514634370803833, -0.34011951088905334, 0.08456364274...
of Joe's existing shifts will be returned.
[ 0.24849319458007812, 0.022814657539129257, 0.49156612157821655, -0.19402442872524261, 0.4630841016769409, 0.057633284479379654, 0.303674578666687, 0.008338971063494682, -0.3718128502368927, -0.5961830019950867, -0.35330039262771606, 0.366108775138855, -0.13264434039592743, 0.07117827236652...
For those of you who have implemented Scrum in your organizations, what were your biggest obstacles and if you did overcome them, how? **Background**: In 2006 I contracted with a large company which had adopted Scrum cold turkey just months before I arrived. The company hoped Agile/Scrum would save their huge enterpris...
[ 0.44375118613243103, -0.051693812012672424, -0.2812708020210266, -0.06689248979091644, -0.17704595625400543, 0.3342522978782654, 0.056626372039318085, 0.02829800359904766, -0.2230188101530075, -0.24727897346019745, 0.381782203912735, 0.26177242398262024, 0.22511911392211914, -0.38233977556...
produce features, whereas previously their productivity was rather erratic. **Implementation**: Since this was a large organization and a large product, the project ran as a "scrum of scrums." There was one scrum master for about every 15-20 developers and these teams were often divided into smaller, closely working s...
[ 0.4524604082107544, -0.07361209392547607, -0.25169819593429565, 0.07150176167488098, -0.2176736742258072, 0.35330143570899963, 0.5578114986419678, -0.2801956236362457, -0.2782893180847168, -0.3031473457813263, -0.2837803065776825, 0.14566780626773834, 0.1674334853887558, -0.273388326168060...
masters, teams, and management. **Obstacles**: Plenty. Some of them related to Agile, some not. In no particular order, here are some lessons learned: The product backlog was revised way too often in the beginning. Eventually, the team and management took several days to go over all the features, estimate them, and p...
[ 0.6230013370513916, 0.0021561048924922943, -0.12721771001815796, 0.1976223587989807, 0.2878395617008209, 0.07849287241697311, 0.36726251244544983, -0.03697514533996582, -0.31730595231056213, -0.5145999789237976, -0.20882706344127655, 0.7970587611198425, 0.3061666190624237, -0.2606381773948...
of knowing if you're doing things correctly. There's temptation to constantly fiddle with the agile process taking the focus away from the product. Lesson learned: having an experienced Agile coach does help reduce this learning curve. There should always be someone pushing back on any experimentation. Limit the number...
[ 0.3095460832118988, -0.10505794733762741, -0.42764562368392944, 0.04821695759892464, -0.1539403647184372, -0.1492682546377182, 0.7042149305343628, -0.12397900968790054, -0.10790710151195526, -0.5923193097114563, 0.41775259375572205, 0.622158944606781, 0.22676831483840942, -0.28934124112129...
flexibility. For example, enforce the use of a product backlog and iteration schedule, but don't require everyone use note cards. Be particularly sensitive to introducing tools and programming methodologies such as pair programming or test first development. Finally, keep communication open and manage expectations. G...
[ 0.13112899661064148, -0.06281860172748566, 0.04990747943520546, 0.2712290585041046, 0.011333589442074299, -0.47674036026000977, 0.2557331919670105, 0.16729655861854553, -0.21064849197864532, -0.9472619295120239, 0.05412622541189194, 0.8775674104690552, 0.22253571450710297, -0.3369411826133...
I have been unable to trigger an **onselect** event handler attached to a **<div>** element. Is it possible to force a **<div>** to emit **select** events? According to [w3schools](http://www.w3schools.com/jsref/jsref_onselect.asp), onSelect is only defined on input and textarea objects. You may however try to catch t...
[ -0.061815179884433746, -0.3965038061141968, 0.5117604732513428, -0.04442701116204262, 0.11072800308465958, -0.10912859439849854, 0.2551484704017639, -0.15104450285434723, -0.1295885592699051, -0.727348804473877, -0.14186304807662964, 0.46114763617515564, -0.3750532567501068, -0.10579516738...
I'm implementing a sparse matrix with linked lists and it's not fun to manually check for leaks, any thoughts? The [`valgrind`](http://valgrind.org/) profiler for Unix offers a decent leak detection. However, this is only one part of a successful approach. The other part is to prevent (i.e. minimize) explicit memory h...
[ 0.3227209150791168, 0.06300095468759537, 0.041903503239154816, 0.06848488003015518, -0.004245202522724867, -0.47135329246520996, 0.23823772370815277, 0.10365646332502365, -0.32822123169898987, -0.6771207451820374, -0.04033166542649269, 0.6433985829353333, -0.3424798846244812, -0.0348482206...
I wonder, whether it is possible to create class-methods in VBA. By class-method I mean methods that can be called without having an object of the class. The 'static'-keyword does that trick in C++ and Java. In the example below, I try to create a static factory method. Example: ``` 'Classmodule Person' Option Expli...
[ 0.03820785507559776, -0.06962591409683228, 0.23196561634540558, -0.24111266434192657, -0.05892782658338547, 0.012060037814080715, 0.07636275887489319, -0.2712239921092987, -0.21882764995098114, -0.07245451956987381, -0.2408120483160019, 0.6289995908737183, -0.3646068572998047, 0.5099859833...
Person p.m_name = name Set Create = p End Function 'Using Person' Dim p As New Person p.name = "Bob" p.sayHello 'Works as expected' Set p2 = Person.Create("Bob") 'Yields an error' ``` That ("Public Shared") would only work in VB.Net. There is no way to define Class Methods in VBA (or VB). I'd suggest to crea...
[ -0.11429589986801147, -0.15293291211128235, 0.07519091665744781, -0.07017473131418228, 0.016287274658679962, 0.11822178214788437, 0.3413585126399994, -0.41597017645835876, -0.2159140557050705, -0.13664326071739197, -0.22749978303909302, 0.5286233425140381, -0.3857197165489197, 0.2221210896...
I'm in a ASP.NET project where I need to give several parameters to the administrator that is going to install the website, like: ``` AllowUserToChangePanelLayout AllowUserToDeleteCompany ``` etc... My question is, will be a good thing to add this into the web.config file, using my own configSession or add as a pro...
[ 0.5657473206520081, 0.2016918659210205, 0.4249318838119507, 0.04581195116043091, 0.07661529630422592, -0.38868311047554016, 0.23938606679439545, -0.005192869808524847, -0.22530566155910492, -0.6891365647315979, 0.29657575488090515, 0.43906140327453613, -0.18299300968647003, 0.1264197677373...
post](http://www.aspcode.net/Your-own-configuration-setting-section-in-webconfig.aspx) and now I'm on this place... should I do this or that? I usually use Settings - available via the project properties - Settings. These can be edited and saved in code, and I write a form / web page to edit them. If you want to use t...
[ 0.34570759534835815, 0.12481410801410675, 0.687934935092926, -0.057862695306539536, 0.10106702893972397, -0.1789913773536682, 0.000008166934094333556, 0.0489455983042717, -0.11673668771982193, -0.7847356200218201, 0.019216736778616905, 0.19214005768299103, -0.1951393038034439, 0.3186530470...
<appSettings file="ExternalWeb.config"> <add key="MyKey" value="MyValue" /> </appSettings> </configuration> ``` See [DevX](http://www.devx.com/vb2themax/Tip/18880) for the example I stole.
[ 0.5725967884063721, -0.13410627841949463, 0.2587521970272064, 0.056331414729356766, 0.09130945056676865, -0.046095799654722214, 0.08855116367340088, -0.28561931848526, -0.255566269159317, -0.2484912872314453, 0.2085573822259903, 0.31062477827072144, -0.26274412870407104, 0.1319997161626815...
I want to center a `div` vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support. ``` <body> <div>Div to be aligned vertically</div> </body> ``` How can I center a `div` vertically in all major browsers, including ...
[ 0.2604513168334961, 0.02542615868151188, 0.6960657238960266, -0.10186026245355606, -0.2443067729473114, 0.06319320946931839, -0.01925400085747242, -0.14924462139606476, -0.1223498061299324, -0.8301001191139221, -0.06188568100333214, 0.3965621590614319, -0.3196495473384857, -0.0910513475537...
0; height: 100%; width: 100%; } .middle { display: table-cell; vertical-align: middle; } .inner { margin-left: auto; margin-right: auto; width: 400px; /* Whatever width you want */ } ``` ```html <div class="outer"> <div class="middle"> <div class="inner"> <h1>The Content</h1> <p>Onc...
[ 0.08473441004753113, -0.35114139318466187, 0.7572787404060364, 0.17843091487884521, 0.018970197066664696, 0.10520267486572266, -0.009843595325946808, -0.16285637021064758, -0.029910694807767868, -0.7145594358444214, 0.09416460245847702, 0.29389598965644836, -0.09528037160634995, 0.41786545...
pop-up, etc.
[ 0.37866634130477905, 0.26667049527168274, 0.10626747459173203, 0.19562090933322906, 0.31469759345054626, 0.14231890439987183, -0.13497939705848694, 0.6934979557991028, -0.4454071521759033, -0.2845805585384369, -0.31387069821357727, 0.2002112865447998, -0.2634067237377167, 0.149421527981758...
I have a `JPanel` subclass on which I add buttons, labels, tables, etc. To show on screen it I use `JFrame`: ``` MainPanel mainPanel = new MainPanel(); //JPanel subclass JFrame mainFrame = new JFrame(); mainFrame.setTitle("main window title"); mainFrame.getContentPane().add(mainPanel); mainFrame.setLocation(100, 100)...
[ 0.10554526746273041, -0.010668331757187843, 0.8912467360496521, -0.145650252699852, -0.014112786389887333, 0.259115606546402, -0.03144673630595207, -0.16185641288757324, -0.3996597230434418, -1.0678446292877197, -0.24653378129005432, 0.2551766335964203, -0.2603069245815277, 0.1453903019428...
frame and lets it grow automatically when resizing the frame.
[ 0.522846519947052, -0.07803880423307419, 0.40345656871795654, -0.013550941832363605, 0.29366421699523926, 0.4536786377429962, -0.1805747151374817, -0.6080650091171265, -0.41727060079574585, -0.6830108165740967, 0.08647823333740234, 0.10696179419755936, 0.10499707609415054, 0.20626707375049...
I'm trying to use SDL in C++ with Visual Studio 2008 Express. The following program compiles but does not link: ``` #include <SDL.h> int main(int argc, char *argv[]) { return 0; } ``` The link error is: ``` LINK : fatal error LNK1561: entry point must be defined ``` I get this regardless of how or if I link ...
[ -0.3087012767791748, 0.0781669095158577, 0.22278915345668793, -0.22314301133155823, -0.266870379447937, -0.021537737920880318, 0.4883723556995392, 0.0705440416932106, 0.07248711585998535, -0.6655757427215576, -0.018593834713101387, 0.4286040663719177, -0.35367274284362793, 0.13812111318111...
function. I don't have VC++ available at the moment, but I have seen this issue several times. You need to create a Win32 project as opposed to a console project. A Win32 project expects a [WinMain](http://msdn.microsoft.com/en-us/library/ms633559(VS.85).aspx) function as a program entry point. SDLmain.lib contains th...
[ -0.10894148051738739, -0.12721949815750122, 0.39180856943130493, -0.08703437447547913, 0.05744379386305809, -0.2239684909582138, 0.26609545946121216, 0.07704981416463852, 0.03206394985318184, -0.4784397482872009, -0.3707675337791443, 0.5010316967964172, -0.27087777853012085, 0.262778043746...
link to both SDL.lib and SDLmain.lib. It looks like you are doing this. **So, my guess is that you have a console project setup.** Therefore, **the linker is looking for a main function to call, but it is getting remapped to SDL\_main by the macro SDL\_main.h**. So, the linker can't find an entry point and gives up!
[ 0.11803246289491653, -0.2483281046152115, 0.2707894444465637, 0.11444655060768127, 0.049962203949689865, -0.2403094470500946, 0.2983531951904297, 0.5273941159248352, -0.2267436385154724, -0.7765856981277466, -0.10797610878944397, 0.3838265836238861, -0.40328800678253174, 0.2949669063091278...
Here's the scenario: I have a set of buttons that I want to bind to corresponding functions when clicked. The ids of these buttons are the same as the names of their corresponding functions. I could do this: ``` $("#kick").click(kick); $("#push").click(push); $("#shove").click(shove); ``` But I'm lazy and would like...
[ 0.3919234871864319, -0.01873348280787468, 0.4628922939300537, -0.423730731010437, 0.06461422145366669, 0.004574708174914122, 0.28445035219192505, -0.2729865312576294, -0.23835977911949158, -0.5764062404632568, 0.07802389562129974, 0.5418633222579956, -0.5136387944221497, 0.2012957632541656...
(as in the programmer's virtue), but only you know your implementation details. If you really want to do something like this, you can use an object to store your particular functions and then use the string to look them up: ``` var myFunction = { kick: kick, push: push, shove: shove }; $("#button_ho...
[ 0.36197176575660706, -0.2544025182723999, 0.4669124186038971, -0.04233171045780182, 0.05163305625319481, 0.018769944086670876, 0.35907551646232605, -0.2964669466018677, -0.03676237165927887, -0.678043782711029, -0.13702616095542908, 0.6867552399635315, -0.4324200749397278, -0.1085846200585...
push: function() { /*do push */ }, shove: function() { /*do shove */ } }; $("#button_holder > span").each(function () { var doThis = this.id; $(this).click(myFunction[doThis]); }); ```
[ -0.06474626064300537, -0.2892831861972809, 1.110830545425415, -0.48945555090904236, 0.1666514128446579, 0.3049378991127014, 0.054745014756917953, -0.4750390648841858, -0.19461123645305634, -0.5555135607719421, -0.17200641334056854, 0.5362032651901245, -0.26183900237083435, 0.24011540412902...
Starting to build web applications for mobile devices (any phone). What would be the best approach using ASP.NET 3.5/ASP.NET 4.0 and C#? UPDATE (feb2010) Any news using windows mobile 7? It depends if you really want to **support every cell phone** or only high end or new phone like the iPhone which don't have...
[ 0.41908833384513855, -0.0793643444776535, 0.47659048438072205, 0.0790850892663002, 0.02994067780673504, -0.24007931351661682, 0.17041641473770142, 0.2741425037384033, -0.5096871256828308, -0.9007006883621216, 0.0356999970972538, 0.5694130659103394, 0.0514286570250988, -0.08134286105632782,...
care to the the size of the pages. If that is the case, *you could stop reading here.* If you **really want to support every cell phone**, especially old ones, you should be aware that there are different types of phones. Many of them have **limitations and constraints** showing web pages. Some of them can use JavaSc...
[ 0.6838917136192322, 0.19207066297531128, 0.3600408732891083, 0.3089950978755951, 0.12308795750141144, -0.2678627073764801, 0.2818644046783447, 0.05949176847934723, -0.35958531498908997, -0.6634682416915894, -0.06995180249214172, 0.5707975029945374, -0.2596261501312256, -0.25418150424957275...
devices. Here are some links to general content (not ASP.NET specific), which could help getting the whole picture: * [Mobile Web Best Practices 1.0 (W3C)](http://www.w3.org/TR/mobile-bp/) * [Mobile Web Developer#s Guide (dotMobi)](http://mobiforge.com/starting/story/dotmobi-mobile-web-developers-guide) Their main l...
[ 0.20583073794841766, 0.08736103028059006, 0.7270368337631226, -0.01785106025636196, 0.331796258687973, -0.2982705533504486, 0.2719832956790924, -0.181848406791687, -0.3445245027542114, -0.8615819215774536, -0.007528285495936871, 0.6258938908576965, -0.5567349791526794, -0.03392317891120910...
below shows a sample WML page: ``` <?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="card1" title="Stackoverflow"> <do type="accept" label="Menu"> <go href="#card2"/> </do> <p> <select name="na...
[ -0.1467902511358261, -0.37663567066192627, 0.5362931489944458, 0.051898811012506485, -0.028127098456025124, 0.04995183274149895, -0.34415316581726074, -0.6304723024368286, -0.20453466475009918, -0.49048271775245667, -0.09569688886404037, 0.2429189234972, -0.06866102665662766, -0.0885077491...
value="FAQ">FAQ</option> </select> </p> </card> <card id="card2" title="Menu"> <p> You selected: $(name) </p> </card> </wml> ``` The good news is, that ASP.NET renders WML (and other mobile markup standards) content automatically. You don't have to write WML files yourse...
[ 0.18712563812732697, -0.25302425026893616, 0.8452957272529602, 0.11448270827531815, -0.08702396601438522, -0.30762773752212524, 0.06352990865707397, -0.12723472714424133, -0.4165104627609253, -0.8278293013572693, -0.18352016806602478, 0.3655112385749817, 0.07851102203130722, -0.04775222390...
(newer) devices. Take a look at [WURFL](http://wurfl.sourceforge.net/), an XML configuration file which contains information about capabilities and features of many mobile devices. You can test the pages you develop in ASP.NET in a standard web browser, but it would not give th right picture of what you have developed...
[ 0.2584560513496399, -0.0024654262233525515, 0.7292039394378662, 0.4060073494911194, 0.23529252409934998, -0.1286502182483673, -0.022245608270168304, -0.26434293389320374, -0.20374026894569397, -0.7779982089996338, -0.11440024524927139, 0.32549312710762024, -0.19566471874713898, -0.12993597...
mobile Web applications by enabling ASP.NET to deliver markup to a wide variety of mobile devices. The ASP.NET mobile controls render the appropriate markup (HTML 3.2, WML 1.1, cHTML, XHTML) while dealing with different screen sizes, orientations and device capabilities. Learn more [here on the official web site](ht...
[ 0.2255595177412033, 0.1916811764240265, 0.7256054878234863, -0.06397899985313416, 0.09798453748226166, 0.24995189905166626, 0.08218981325626373, 0.022247804328799248, -0.19697609543800354, -0.9906399250030518, -0.5319050550460815, 0.36070165038108826, -0.13249535858631134, -0.2289937585592...
I'm fairly new to C# programming. I am making a program for fun that adds two numbers together, than displays the sum in a message box. I have two numericUpDowns and a button on my form. When the button is pushed I want it to display a message box with the answer. The problem is, I am unsure how to add the twp value...
[ 0.10764851421117783, -0.15515027940273285, 0.47531139850616455, -0.3817833960056305, -0.20536911487579346, -0.030154932290315628, 0.06707131862640381, -0.4045308232307434, -0.30265942215919495, -0.5394071340560913, 0.14711220562458038, 0.48332273960113525, -0.21483221650123596, 0.111336618...
it does not work. It gives me 2 compiler errors: 1. The best overloaded method match for 'System.Windows.Forms.MessageBox.Show(string) has some invalid arguments 2. Argument '1': cannot convert decimal to 'string' Thanks! `this.numericUpDown1.Value + this.numericUpDown2.Value` is actually evaluating properly to a numb...
[ -0.13409125804901123, 0.2435625195503235, 0.36210325360298157, -0.1559099406003952, -0.04765557497739792, -0.08368784934282303, 0.5966804027557373, -0.31157469749450684, 0.004060826729983091, -0.21403132379055023, 0.04339756444096565, 0.5375184416770935, -0.29650062322616577, 0.00214330083...
to do more advanced formatting, you'd want to use `String.Format()` instead of `ToString()`. See [this page](http://msdn.microsoft.com/en-us/library/fht0f5be.aspx) for more info on how to use `String.Format()`.
[ 0.17658758163452148, -0.2036668360233307, 0.4655589163303375, 0.010257963091135025, 0.044284842908382416, -0.40303510427474976, -0.16528259217739105, -0.09573302417993546, -0.3719560205936432, -0.47404709458351135, -0.3172261118888855, 0.5210350751876831, -0.16089846193790436, -0.052763249...
I am tying to make comments in a blog engine XSS-safe. Tried a lot of different approaches but find it very difficult. When I am displaying the comments I am first using [Microsoft AntiXss 3.0](http://www.codeplex.com/AntiXSS) to html encode the whole thing. Then I am trying to html decode the safe tags using a whitel...
[ 0.5745939612388611, 0.21391062438488007, 0.11752009391784668, -0.2151986062526703, -0.37607771158218384, -0.024143552407622337, 0.2419838309288025, -0.41103827953338623, -0.17563249170780182, -0.4974382817745209, 0.26033201813697815, 0.10607855021953583, -0.7110873460769653, 0.115857392549...
replaced entities to decimal form but it does not work properly. ``` &lt; with &#60; &gt; with &#62; ``` My rewrite: ``` class HtmlSanitizer { /// <summary> /// A regex that matches things that look like a HTML tag after HtmlEncoding. Splits the input so we can get discrete /// chunks that start with ...
[ -0.21570749580860138, -0.06064310669898987, 0.7090689539909363, -0.05500739812850952, -0.1225506141781807, 0.07419881224632263, 0.3668157160282135, -0.22902235388755798, -0.12642022967338562, -0.5680166482925415, -0.4098159074783325, 0.2950487434864044, -0.47421300411224365, -0.06477587670...
match tags on the whitelist, so we can run them through /// HttpUtility.HtmlDecode /// FIXME - Could be improved, since this might decode &gt; etc in the middle of /// an a/link tag (i.e. in the text in between the opening and closing tag) /// </summary> private static Regex _whitelist = new Regex(...
[ -0.04855840280652046, 0.06725293397903442, 0.6191692352294922, 0.01618330553174019, 0.2309410572052002, -0.11068528145551682, 0.39475923776626587, -0.5486295819282532, 0.03004118613898754, -0.6328216791152954, -0.3331446647644043, 0.5283381342887878, -0.7129611372947693, -0.248147428035736...
tags from the provided HtmlEncoded HTML input using /// a whitelist based approach, leaving the dangerous tags Encoded HTML tags /// </summary> public static string Sanitize(string html) { string tagname = ""; Match tag; MatchCollection tags = _tags.Matches(html); strin...
[ 0.18980902433395386, -0.3820706903934479, 0.29216042160987854, -0.0031207494903355837, -0.03924906998872757, -0.30720847845077515, 0.27115458250045776, -0.7749318480491638, 0.12561927735805511, -0.5934508442878723, -0.2949180006980896, 0.3633340001106262, -0.8393992185592651, -0.1015595868...
for (int i = tags.Count - 1; i > -1; i--) { tag = tags[i]; tagname = tag.Value.ToLowerInvariant(); if (_whitelist.IsMatch(tagname)) { // If we find a tag on
[ 0.04964146018028259, -0.3162377178668976, 0.2932509183883667, -0.2851119935512543, 0.43112847208976746, -0.16804584860801697, 0.29605913162231445, -0.7679886817932129, -0.10099953413009644, -0.5559738278388977, -0.4382460117340088, 0.511221170425415, -0.3724389374256134, -0.121834404766559...
the whitelist, run it through // HtmlDecode, and re-insert it into the text safeHtml = HttpUtility.HtmlDecode(tag.Value); html = html.Remove(tag.Index, tag.Length); html = html.Insert(tag.Index, safeHtml); }
[ 0.1676582247018814, -0.1860070526599884, 0.7319983839988708, -0.19414186477661133, -0.0052643390372395515, -0.02936718799173832, 0.13495847582817078, -0.2885141372680664, -0.09187183529138565, -0.5865002870559692, -0.4356001019477844, 0.21759338676929474, -0.6733493208885193, -0.0655352622...
} return html; } } ``` My input testing html is: ``` <p><script language="javascript">alert('XSS')</script><b>bold should work</b></p> ``` After AntiXss it turns into: ``` &#60;p&#62;&#60;script language&#61;&#34;javascript&#34;&#62;alert&#40;&#39;XSS&#39;&#41;&#60;&#47;script&#62;&#60;b&#62;bold sh...
[ -0.12389686703681946, 0.2519840896129608, 0.6423786282539368, -0.4257657527923584, -0.14075876772403717, 0.19676819443702698, 0.6459698677062988, -0.8649775981903076, -0.027128517627716064, -0.6591202616691589, -0.061808958649635315, 0.4495026469230652, -0.5492703914642334, -0.051492217928...