text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
to tell me to which series it belongs.) Maybe it would make sense to break the interface inheritance all together. Just have specific interfaces for specific types of behaviors. Whatever classes you have that implement these interfaces can just pick the ones that make sense, and won't have to worry about implementing m...
[ 0.5007516145706177, -0.4734804630279541, 0.003487255657091737, 0.6638099551200867, -0.18137206137180328, -0.02779443748295307, 0.44529134035110474, -0.03899724781513214, -0.17936310172080994, -0.726517379283905, 0.47392284870147705, 0.5593351721763611, -0.4305848777294159, 0.11720973998308...
According to my book all that is needed to start using automatic paging is to set GridView.AllowPaging to true. But when I try to navigate to another page, I get *GridView fired event PageIndexChanging which wasn't handled exception*. I then have to create event handler for PageIndexChanging event, but then when I navi...
[ 0.26656246185302734, -0.013709098100662231, 0.3168376684188843, 0.08579038083553314, -0.31675636768341064, -0.1677180379629135, 0.5772502422332764, -0.10695382952690125, -0.11606446653604507, -0.5041024684906006, 0.1506083756685257, 0.5922313928604126, -0.21071600914001465, -0.033989567309...
work is because I forgot to remove the line ``` if(IsPostBack) GridView.DataSourceID=""; ``` Sorry for taking your time and thanx for helping me When you post back, you'll have to rebind the data to the gridview. You may also need to set the page number like: ``` GridView1.CurrentPageIndex = e.NewPageIndex; ```
[ 0.3276454508304596, -0.07087814807891846, 0.5596676468849182, -0.1345442533493042, 0.19766557216644287, -0.1606532782316208, 0.35331785678863525, -0.03425778076052666, -0.35899096727371216, -0.8483620285987854, -0.18715165555477142, 0.3719731569290161, -0.2445797175168991, 0.16584978997707...
Should C# methods that *can* be static be static? We were discussing this today and I'm kind of on the fence. Imagine you have a long method that you refactor a few lines out of. The new method probably takes a few local variables from the parent method and returns a value. This means it *could* be static. The questi...
[ 0.383713036775589, -0.31429973244667053, -0.0058836862444877625, 0.10557577759027481, -0.33795496821403503, -0.24397552013397217, 0.21299239993095398, 0.06575024127960205, -0.36543160676956177, -0.006741615943610668, -0.09029892832040787, 0.28554797172546387, -0.7509525418281555, 0.1633366...
are static because they HAVE to be In a small to medium size code base you can really treat the two methods interchangeably. If you have a method that is in the first category (can-be-static), and you need to change it to access class state, it's relatively straight forward to figure out if it's possible to turn the...
[ 0.13257823884487152, -0.06247891113162041, -0.05997424200177193, 0.19401422142982483, -0.08363619446754456, -0.2856321334838867, 0.3863608241081238, 0.21019667387008667, -0.40274670720100403, -0.48986247181892395, -0.40918809175491333, 0.27594685554504395, -0.514578104019165, 0.31012877821...
number of calls, and say "ok... I better not change this method, but instead create a new one that does what I need". That can result in either: 1. A lot of code duplication 2. An explosion in the number of method arguments Both of those things are bad. So, my advice would be that if you have a code base over 200K ...
[ 0.2647973597049713, 0.025454217568039894, 0.1773339956998825, 0.022290198132395744, -0.14083246886730194, -0.25188928842544556, 0.42718636989593506, -0.2469845861196518, -0.44429442286491394, -0.12795206904411316, -0.0545518659055233, 0.4972168803215027, -0.34566086530685425, 0.16394177079...
functionality outside of an instance) then you can. However, the inverse refactoring, turning a can-be-static into a instance method is MUCH more expensive. With large code bases it's better to error on the side of ease of extension, rather than on the side of idealogical purity. So, for big projects don't make thing...
[ 0.22233647108078003, 0.13070538640022278, -0.13149835169315338, 0.2667507827281952, -0.06973806023597717, -0.06168823689222336, 0.6803015470504761, -0.23457758128643036, -0.3848418593406677, -0.4144960343837738, -0.19275891780853271, 0.6408421993255615, -0.35182252526283264, 0.042432557791...
I can never decide if it's better to format data before inserting it into the DB, or when pulling it out. I'm not talking about data sanitization; we all know to protect against SQL injection. I'm talking about if the user gives you a URL, and it doesn't have http:// in front of it, should you add that before insertin...
[ 0.719404935836792, 0.2841421067714691, 0.0308364424854517, 0.04133541136980057, -0.20681338012218475, -0.30080297589302063, 0.1895889937877655, 0.10802293568849564, -0.06410887837409973, -0.48114025592803955, 0.09264161437749863, 0.29644307494163513, -0.17809025943279266, 0.245207563042640...
my mind later and want to format it differently? I can't do this if I've already formatted it, but I can if I store it unformatted... but then I'm doing extra work every time I pull a piece of data out of the DB, which I could have done once and been done with it. What are your thoughts? --- From the answers, there ...
[ 0.44687873125076294, 0.04602731019258499, 0.15144804120063782, 0.24595624208450317, -0.16394013166427612, -0.15961040556430817, 0.10268143564462662, 0.11468082666397095, -0.16864308714866638, -0.5448273420333862, 0.10726582258939743, 0.4540700912475586, 0.0045844390988349915, 0.01444075722...
format for maximum flexibility. If speed is an issue, both formats may be stored. Normalising URLs to a canonical form prior to insertion is probably okay; performing any kind of extensive formatting, e.g. HTML conversion/parsing etc. strikes me as a bad idea - always have the "rawest" data possible in your database, e...
[ 0.1286044716835022, -0.17150191962718964, 0.37749311327934265, 0.46143144369125366, -0.29917705059051514, -0.3546452522277832, 0.040031548589468, 0.046235572546720505, -0.3207070827484131, -0.8870733380317688, -0.13536812365055084, 0.5902062058448792, -0.04406404495239258, -0.1332262754440...
What is the best way to convert a non-generic collection to a generic collection? Is there a way to LINQ it? I have the following code. ``` public class NonGenericCollection:CollectionBase { public void Add(TestClass a) { List.Add(a); } } public class ConvertTest { public static List<TestClas...
[ 0.1851119101047516, -0.01846792921423912, 0.2019128054380417, 0.057602547109127045, -0.007901759818196297, -0.22260944545269012, 0.05725359916687012, -0.3190271854400635, -0.16286861896514893, -0.5060885548591614, -0.05553128942847252, 0.4402799904346466, -0.3096156716346741, 0.23773817718...
return collection.Cast<TestClass>().ToList(); } ``` Edit: And if you just wanted the TestClass instances of a (possibly) heterogeneous collection, filter it with OfType<T>: ``` public static List<TestClass> ConvertToGenericClass(NonGenericCollection collection) { return collection.OfType<TestClass>().ToList(); } ...
[ 0.13406971096992493, -0.3048464357852936, -0.05810515210032463, -0.05628323554992676, 0.03298923000693321, -0.1771680861711502, 0.17776603996753693, -0.4159155786037445, -0.1005520299077034, -0.5560806393623352, -0.24259427189826965, 0.3308000862598419, -0.5980857014656067, 0.0929899811744...
Is it possible to assign a value to an instance variable during an initialize class method? I'm declaring a number of arrays, then creating an array of arrays, then assigning it to self.months, which is an instance variable. Why does this not work, and how can I accomplish this? ``` +(void)initialize { //...
[ -0.09094995260238647, -0.032797105610370636, 0.1938401162624359, 0.006438486743718386, 0.2466714084148407, 0.1915665864944458, 0.4762896001338959, -0.18616831302642822, -0.19185736775398254, -0.36422204971313477, 0.033758390694856644, 0.2438533753156662, -0.1418728083372116, 0.185909777879...
this is a very old question and already has an accepted answer.** But I'd like to register here a totally idempotent script, without external links. --- A simple script demonstrating PostgreSQL 9.5+ idempotent built-in capabilities. You can run this script as many times as you wish. Here we go: ``` --Table CREATE...
[ -0.1592593789100647, 0.1606874167919159, 0.3742964565753937, 0.11612783372402191, 0.10359785705804825, 0.10643164813518524, 0.1249043419957161, -0.18356037139892578, -0.13048338890075684, -0.5087361931800842, -0.08309055119752884, 0.4627622663974762, -0.32492703199386597, 0.308899432420730...
SELECT a_integer+b_integer $$ LANGUAGE SQL; --View CREATE OR REPLACE VIEW vw_select_1 AS SELECT 1; --Role DO $$ BEGIN CREATE ROLE rick_deckard; EXCEPTION WHEN duplicate_object THEN RAISE NOTICE 'Role already exists. Ignoring...'; END$$; --Simple insert INSERT INTO person (id, person_na...
[ -0.39371412992477417, -0.12081268429756165, 0.18443390727043152, -0.05322754755616188, -0.09090680629014969, 0.369949072599411, 0.38004663586616516, -0.5455566644668579, 0.06617481261491776, -0.26860934495925903, -0.34191858768463135, 0.6536386013031006, -0.46924030780792236, 0.01389284525...
error) INSERT INTO person (id, person_name) VALUES (1, 'HAL-9000') ON CONFLICT DO NOTHING; --Field DO $$ BEGIN ALTER TABLE person ADD COLUMN id_another_person INTEGER; EXCEPTION WHEN duplicate_column THEN RAISE NOTICE 'Field already exists. Ignoring...'; END$$; --Constraint DO $$ BEGIN ALTER TA...
[ -0.2979193925857544, 0.1674364060163498, 0.2998805046081543, -0.17414481937885284, -0.07110591232776642, 0.3563796877861023, 0.3449026346206665, -0.6468815207481384, -0.13408802449703217, -0.36475324630737305, -0.16891320049762726, 0.4793587028980255, -0.3692856729030609, 0.138665512204170...
NEW; END; $BODY$ LANGUAGE plpgsql; DO $$ BEGIN CREATE TRIGGER person_trigger BEFORE INSERT OR UPDATE ON person FOR EACH ROW EXECUTE PROCEDURE person_trigger_function(); EXCEPTION WHEN duplicate_object THEN RAISE NOTICE 'Trigger already exists. Ignoring...'; END$$; --Drop DROP TRIGGER IF EXISTS per...
[ -0.09423418343067169, -0.23907895386219025, 0.6051579117774963, -0.09769678860902786, -0.09030362218618393, 0.4681636095046997, 0.15711335837841034, -0.37551823258399963, -0.3155291974544525, -0.314571350812912, -0.4156560003757477, 0.469574511051178, -0.30047518014907837, 0.18660312891006...
After fiddling around with an issue I am having I have come to this conclusion: my list Elements are displaying smaller in Safari on my Macbook than they are on Safari on my PC. IE, and Firefox are displaying properly also. What might be causing this difference? It is hindering my ability to complete this design. w...
[ 0.2455955147743225, 0.17049843072891235, 0.3106187582015991, 0.17983224987983704, -0.17054331302642822, -0.055876728147268295, 0.3536733090877533, -0.02789049595594406, -0.4885012209415436, -0.5821928977966309, 0.05689384415745735, 0.4831862151622772, -0.15425118803977966, -0.0574468560516...
one here: [YUI CSS Reset](http://developer.yahoo.com/yui/reset/) This basically "removes and neutralizes the inconsistent default styling of HTML elements, creating a level playing field across A-grade browsers". Hopefully that will solve your problem!
[ 0.28240451216697693, -0.295565664768219, -0.0010566039709374309, 0.11894780397415161, -0.31487923860549927, -0.20790955424308777, 0.36410149931907654, 0.17117756605148315, -0.062390487641096115, -0.6287688612937927, -0.14633871614933014, 0.5713807344436646, -0.18420754373073578, -0.3618622...
I just want the equivalent of closing and reopening my main program. I want to invoke it when a "new"-like option from a drop-down menu is clicked on. Something like calling root.destroy() and then re-initiating the mainloop. How can I get this done? You could take all your GUI building logic and initial state code ou...
[ 0.3658960163593292, -0.05302262306213379, 0.2509751319885254, -0.09353791177272797, 0.16495153307914734, -0.01582184247672558, 0.39408010244369507, 0.0149921216070652, -0.09207601100206375, -0.7350172400474548, -0.05059855058789253, 0.9075136780738831, -0.059381864964962006, 0.154360994696...
I have a website that is dynamic in the sense that a lot of data is generated from a database, but the contents of the database changes rarely (about 1-3 times a week). These changes are manual and controlled. Instead of having the overhead of a dynamic website, I prefer to use a static pages. I'm debating what is the...
[ 0.18436041474342346, -0.09717710316181183, 0.5042247772216797, -0.06193968653678894, -0.11471845954656601, -0.20937399566173553, 0.30397990345954895, 0.1925196349620819, -0.558607280254364, -0.7431154847145081, 0.07481683045625687, 0.30650511384010315, -0.17579874396324158, 0.2367636263370...
hard to manage the cache of each page * need to clear the cache after each manual change? **Use program to generate static pages** My current choice: I use perl programs to generate static pages from dynamic content. This doesn't scale very well as I have to hard code a lot of HTML, especially the page structure Any...
[ 0.15406301617622375, 0.059798143804073334, 0.35582074522972107, 0.0012021217262372375, -0.11430379003286362, 0.026007065549492836, 0.4489831328392029, 0.1433950513601303, -0.45872506499290466, -0.5882349610328674, -0.12985855340957642, 0.5966365933418274, -0.25014087557792664, 0.1535733342...
is there a way to auto adjust container DIV height to accommodate absolutely positioned child DIVs? i'd like to get something like ``` +-----------------------+ | container | | +------+ +------+ | | | chld | | chld | | | | 1 | | 2 | | | | | | | | | +------+ +------+ | |
[ 0.12021505832672119, -0.06959362328052521, 0.5118083953857422, 0.1907636970281601, 0.041018661111593246, 0.24261753261089325, -0.19692209362983704, -0.08830735087394714, -0.003126931143924594, -0.5549190640449524, 0.009641909971833229, 0.42023560404777527, -0.01949872262775898, 0.166246473...
+------+ | | | chld | | | | 3 | | | | | | | +------+ | +-----------------------+ ``` i try something like: ``` <div class="container" style="position: relative; border: solid thin"> <div class="chld" style="width: 20px;
[ 0.10882432013750076, -0.005794133525341749, 0.8714987635612488, 0.006968354806303978, 0.14879325032234192, -0.17051345109939575, 0.08617572486400604, -0.1491674929857254, -0.12301529198884964, -0.7989482283592224, -0.21389518678188324, 0.5256739854812622, 0.14099635183811188, 0.33403873443...
height: 20px; position: absolute; left: 5px; top: 5px; border: dashed thin;"><div>
[ -0.29310357570648193, -0.25518345832824707, 0.6819374561309814, 0.12477858364582062, 0.1245981752872467, 0.4199866056442261, 0.41476941108703613, 0.14108949899673462, -0.07665827125310898, -0.30419644713401794, -0.25609347224235535, 0.5566143989562988, 0.41647738218307495, -0.3117363750934...
<div class="chld" style="width: 20px; height: 20px; position: absolute; left: 30px; top: 5px; border: dashed
[ 0.07930640876293182, -0.0585964061319828, 0.7217393517494202, -0.018035830929875374, 0.04507823288440704, 0.18463529646396637, 0.326331228017807, -0.08384167402982712, 0.14670418202877045, -0.4314332902431488, -0.4204290509223938, 0.46336448192596436, 0.2668096125125885, -0.036157064139842...
thin;"><div> <div class="chld" style="width: 20px; height: 20px; position: absolute; left: 15px; top: 30px;
[ 0.22391875088214874, -0.2406417578458786, 0.8533385992050171, -0.09451578557491302, 0.004927800036966801, 0.08426717668771744, 0.09932668507099152, 0.054687220603227615, 0.054539646953344345, -0.3142077326774597, -0.4561445415019989, 0.7236191034317017, 0.18485277891159058, 0.0651575624942...
border: dashed thin;"></div> </div> ``` but the "container" div stays zero height. I understand, that this might be the expected behaviour, as elements are 'taken out' of the flow when positioned absolutely, but is there a workaround for this? (except for precalculating the resulting height and setting it manually) I...
[ 0.06665020436048508, -0.13158951699733734, 0.8542854189872742, 0.0652402862906456, 0.1491921842098236, -0.12663333117961884, -0.22918881475925446, -0.34332993626594543, -0.16722920536994934, -0.6624002456665039, -0.07869169861078262, 0.21028278768062592, -0.04793095216155052, 0.13808394968...
chld 3 down and use position relative to split them apart and move to any height. Then use clear both on chld3. Something like ```css #exp_outer { width: 400px; border: 1px solid black; } #chld1 { float: left; margin: 30px 0 20px; left: 50px } #chld2 { float: right; margin: 30px 0 20px; ri...
[ -0.3630559742450714, 0.2743678390979767, 0.795337438583374, -0.13555005192756653, -0.2639974057674408, 0.26779618859291077, 0.11392071843147278, -0.5995705723762512, -0.14155195653438568, -0.6111909747123718, -0.26880577206611633, 0.43791306018829346, -0.051337674260139465, 0.0535944215953...
Consider this code (using CString because it's familiar and easy to see when not constructed, but nothing special about the class), tested under Visual Studio 2008: ``` CString DoSomething( const CString& sString ) { return sString; } CString sTest1 = DoSomething( sTest1 ); // Compiles (no warnings), fails at run...
[ 0.0483490489423275, 0.06930471956729889, 0.2973276376724243, -0.2532294690608978, -0.07477496564388275, -0.1070171520113945, 0.5212367177009583, -0.6491358876228333, -0.0187335554510355, -0.605873703956604, 0.02146090194582939, 0.5359535813331604, -0.6108274459838867, -0.1920301914215088, ...
test). Notably, however, the behavior is not the same as Test3, which will work correctly. Now I understand why Test1 does not work, and why Test2 does not compile. What I am curious about is why Test1 compiles in the first place? Is this permitted in the standard, open for interpretation, a flaw in VS2008's compiler,...
[ 0.5577455759048462, 0.04447279870510101, -0.13704273104667664, 0.07444782555103302, -0.29666391015052795, -0.39348337054252625, 0.6399047374725342, -0.3013806939125061, 0.04958850517868996, -0.2978096902370453, -0.08243464678525925, 0.5647676587104797, -0.5351660251617432, -0.1329178661108...
permitting this construct? Edit: Alternatively, is there any way to force the compiler to compile Test1 as Test2 (and thus trigger the error)? Edit to add verbatim error message for Test2: error C2065: 'sTest2' : undeclared identifier The behavior you are seeing in sTest1 is undefined in the C++ standard. It's weird ...
[ 0.26728421449661255, 0.01241699792444706, 0.11581265181303024, 0.030378365889191628, -0.15040981769561768, -0.26892703771591187, 0.647132396697998, -0.2471243143081665, -0.1637568473815918, -0.23300591111183167, 0.03180579096078873, 0.4220364987850189, -0.5792378187179565, 0.00989706069231...
I have a text file input which contains data as below. How can I display data from the text file into specific format? ``` Monday Jessy Walking 20 minutes Matthew Run 20 minutes Karen Jogging 40 minutes Jessica Run 12 minutes Tuesday Messia Walking 10 minutes Matthew Run 20 minutes Pete Run 10 minutes Carol Walking 30...
[ 0.5014247298240662, 0.0002939604455605149, 0.28074193000793457, -0.25222891569137573, -0.05735429376363754, 0.1323697865009308, 0.6545913219451904, -0.12449277937412262, -0.5404994487762451, -0.4382316470146179, 0.19505202770233154, 0.550987184047699, -0.08986373990774155, -0.4781562983989...
Walking 20 minutes Matthew Run 20 minutes Karen
[ 0.5769463777542114, 0.4939217269420624, -0.2323014885187149, -0.22737902402877808, -0.2739112675189972, 0.16583336889743805, 0.9807133674621582, -0.12881793081760406, -0.4057750701904297, -0.6111164093017578, 0.40471306443214417, 0.14145192503929138, 0.11027693003416061, -0.190521895885467...
Jogging 40 minutes Jessica Run 12 minutes Tuesday Messia
[ 0.6141164898872375, 0.04577285423874855, -0.36223122477531433, -0.1270100623369217, -0.5359060764312744, -0.23107179999351501, 0.8155136108398438, 0.07521810382604599, -0.252022922039032, -0.42887938022613525, 0.5151245594024658, 0.5133914947509766, -0.26732513308525085, -0.237230613827705...
Walking 10 minutes Matthew Run 20 minutes Pete
[ 0.4907190799713135, 0.5328554511070251, -0.29888927936553955, -0.1274368315935135, -0.25215044617652893, 0.07396445423364639, 1.0035456418991089, 0.059257373213768005, -0.24810713529586792, -0.7058923244476318, 0.26010310649871826, 0.2879367172718048, -0.02255556546151638, -0.2670238614082...
Run 10 minutes Carol Walking 30 minutes ``` I just threw this together quickly, but what about something like: ``` static final String[] DAYS = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday",
[ 0.4638182520866394, -0.12567052245140076, 0.7393271923065186, 0.008774477988481522, 0.046248532831668854, 0.14321193099021912, 0.2567807137966156, 0.08787517249584198, -0.48781266808509827, -0.16452062129974365, 0.29389524459838867, 0.3054921627044678, -0.281253844499588, -0.00107851973734...
"Sunday" }; public class ActivityEvent { public int day; public String name; public String typeOfExercise; public String time; } public List loadActivities(String filename) throws IOException { List activities = new ArrayList(); FileInputStream fis = new FileInputStream(filename); InputStreamReader isr ...
[ 0.11161458492279053, -0.6783605217933655, 0.7210857272148132, -0.3149162828922272, 0.15350806713104248, 0.2476961314678192, 0.33355534076690674, -0.21037572622299194, -0.31571391224861145, -0.46247994899749756, -0.635425865650177, 0.7032697796821594, -0.3637372851371765, -0.009326692670583...
{ if (line.equals(DAYS[day])) { break; } } String name; if (day < 0) { day = lastDay; if (lastDay < 0)
[ 0.06853721290826797, -0.5356995463371277, 0.43461892008781433, -0.3158944249153137, 0.3158992528915405, 0.09395060688257217, 0.20816360414028168, 0.030617833137512207, -0.11061130464076996, -0.3934880197048187, -0.3433937132358551, 0.21780185401439667, -0.2397255152463913, 0.45745450258255...
{ throw new IOException(filename + " must start with day of week"); } name = line; } else { name = br.readLine(); if (name == null)
[ 0.0667131096124649, -0.11713805794715881, 0.23093391954898834, -0.41388872265815735, -0.07211218774318695, 0.30387336015701294, 0.3320353329181671, 0.0026354705914855003, -0.1952323317527771, -0.42016854882240295, -0.07496118545532227, 0.3113432824611664, -0.1902950257062912, 0.34553796052...
{ throw new IOException(filename + " expected name, reached end of file"); } } String type = br.readLine(); if (type == null) { throw new IOException(filename + " expected type of exercise, reached end of file");
[ 0.009954028762876987, -0.14878560602664948, 0.25596511363983154, -0.6034980416297913, 0.16174066066741943, -0.16719293594360352, 0.23437684774398804, -0.3641945719718933, 0.1801949441432953, -0.5145800709724426, -0.2529304027557373, 0.8901597857475281, -0.17435362935066223, -0.116454221308...
} String time = br.readLine(); if (time != null) { throw new IOException(filename + " expected time of exercise, reached end of file"); } ActivityEvent activity = new ActivityEvent(); activity.day = day; activity.name = name; activity.typeOfExercise = type; ...
[ 0.3164646029472351, -0.34650102257728577, 0.24856607615947723, -0.3905859589576721, 0.33981120586395264, -0.0489143468439579, 0.4093935191631317, -0.22540351748466492, -0.17631204426288605, -0.5253328680992126, -0.13354291021823883, 0.7038624882698059, -0.3086843490600586, 0.03581343218684...
activities.add(activity); } return activities; } public void printActivities(List activities) { StringBuilder str = new StringBuilder("Day\tName\tType of Exercise\tTime\n"); int numActivities = activities.size(); int lastDay = -1; for (int index = 0; index < numActivities; index++) { Ac...
[ 0.42669588327407837, -0.39455240964889526, 0.5358166098594666, -0.16570088267326355, -0.01393232960253954, 0.10520016402006149, 0.4359360933303833, -0.27587348222732544, -0.6323163509368896, -0.3132554590702057, -0.310541570186615, 0.9219581484794617, -0.4618588387966156, -0.13570633530616...
str.append('\t'); str.append(activity.name); str.append('\t'); str.append(activity.typeOfExercise); str.append('\t'); str.append(activity.time); str.append('\n'); } System.out.print(str.toString()); } ``` And then invoke everything for example: ``` List activit...
[ 0.27313125133514404, -0.05406230315566063, 0.5276103615760803, -0.4016714096069336, 0.21193161606788635, -0.05854157358407974, 0.28965407609939575, -0.22002013027668, -0.4935515820980072, -0.5129620432853699, -0.6077882647514343, 0.5987844467163086, -0.5716056227684021, -0.0724296271800994...
The initial height of a text area is much larger than the content, I cannot find a way of making it always the same height as the text content: ``` <mx:TextArea id="textarea" borderStyle="solid" width="100%" wordWrap="true" selectable="false" backgroundAlpha="0" focusAlpha="0" text="this is a little test" /> ``` Giv...
[ 0.1962590366601944, -0.17074285447597504, 0.8589547276496887, -0.1557425707578659, 0.10623978078365326, -0.19111953675746918, 0.4690227210521698, -0.5205629467964172, -0.012205979786813259, -0.7422181367874146, -0.3667118549346924, 0.5102686882019043, -0.1826234757900238, -0.08726108819246...
var aHover:Object = new Object(); aHover.color = "#00FF00"; aHover.textDecoration = "underline"; style.setStyle( "a:hover", aHover ); style.setStyle( "a:link", aLink ); textarea.styleSheet = style; } ]]> </mx:Script> <mx:TextArea id="textarea" width="100%" wordWrap="true" borderStyle="solid" sele...
[ 0.1773233413696289, -0.04298979789018631, 0.7681835293769836, -0.1745840460062027, 0.016134832054376602, 0.009488262236118317, 0.5546902418136597, -0.3997873365879059, 0.024525288492441177, -0.6169853806495667, -0.41568392515182495, 0.6647775769233704, -0.13156287372112274, -0.303432583808...
add a stylesheet to stylise anchor tags. I found this overridable in the TextArea.as source and if I override it and remove the "2 x" multiplier it almost works but unfortunately it means that the content doesnt get bigger when it needs to and vertically scrolls instead, so its almost there: ``` override protected fu...
[ 0.17134350538253784, -0.2051413357257843, 0.7480968832969666, -0.0609329454600811, -0.15817075967788696, 0.023592807352542877, 0.31109899282455444, -0.36172357201576233, 0.004679226782172918, -0.7274475693702698, -0.11148938536643982, 0.501944899559021, -0.015058481134474277, -0.2719503641...
allows you to set the styleSheet of the underlying UITextField object. ``` package { import flash.events.Event; import flash.text.StyleSheet; import mx.controls.Text; import mx.core.mx_internal; use namespace mx_internal; public class StyledText extends Text { public function St...
[ 0.4460083246231079, -0.27859121561050415, 0.6355976462364197, -0.17918439209461212, 0.136102557182312, -0.06419257074594498, 0.3474711775779724, -0.5012842416763306, -0.017367608845233917, -0.48152416944503784, -0.5196249485015869, 0.7028056383132935, -0.46696045994758606, 0.11659873276948...
[Bindable("stylesheetChanged")] public function get styleSheet():StyleSheet { return _styleSheet; } public function set styleSheet(value:StyleSheet):void { _styleSheet = value; if ( textField ) { textField.styleSheet = _styleSheet;
[ 0.3263378441333771, -0.2628326714038849, 0.7472374439239502, -0.29545724391937256, 0.17271339893341064, 0.02663504146039486, 0.14632627367973328, -0.36006030440330505, 0.0049200220964848995, -0.5030969381332397, -0.4226008951663971, 0.6145579814910889, -0.4587160050868988, -0.0007752075325...
} dispatchEvent(new Event("stylesheetChanged")); } override protected function createChildren():void { super.createChildren(); //textField is created in the createChildren //method of the Label class
[ 0.33349835872650146, -0.2628341615200043, 0.19866667687892914, -0.07848024368286133, 0.36007821559906006, 0.0066526904702186584, 0.44767487049102783, -0.16391468048095703, 0.12705856561660767, -0.5083191394805908, -0.45099201798439026, 0.7003806233406067, -0.14700782299041748, 0.1202307865...
if ( textField && styleSheet ) { textField.styleSheet = _styleSheet; } } } } ``` Then you can use the component like so: ``` <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="*" preinitialize="onInit(...
[ 0.0540974959731102, -0.2787230908870697, 0.9622758030891418, -0.11816432327032089, 0.11761897802352905, 0.17264041304588318, -0.10121773928403854, -0.49267348647117615, -0.008738591335713863, -0.45859217643737793, -0.4120570421218872, 0.8486225605010986, -0.3144204318523407, 0.046743061393...
var aLink:Object = new Object(); aLink.color = "#0000FF"; var aHover:Object = new Object(); aHover.color = "#00FF00"; aHover.textDecoration = "underline"; style.setStyle( "a:hover", aHover ); style.setStyle( "a:link", aLink ); text.styleSheet = style; } ...
[ 0.12474098056554794, -0.31648603081703186, 0.9167806506156921, -0.0944184735417366, 0.22010371088981628, 0.2530501186847687, 0.39396923780441284, -0.38350629806518555, -0.051611557602882385, -0.3942514955997467, -0.6558170914649963, 0.8112061619758606, -0.3691784739494324, 0.18423575162887...
<ns1:htmlText> <![CDATA[<a href='event:http://www.adobe.com'>Navigate to Adobe.com.</a> this is testing nothing at all really]]> </ns1:htmlText> </ns1:StyledText> </mx:Application> ```
[ 0.5790855288505554, 0.194586381316185, 0.5403563380241394, 0.1248241737484932, -0.09999892860651016, -0.5101035237312317, 0.4830329418182373, -0.5015022158622742, -0.06875065714120865, -0.549362301826477, -0.4208175241947174, 0.4134398400783539, -0.16996516287326813, -0.31749576330184937, ...
I am getting the following error while compiling my Latex File : **! LaTeX Error: Cannot determine size of graphic in tree.jpg (no BoundingBox).** Why do I get this error ? What has this to do with an .eps file ? In fact, I could compile it fine with MacTex on my machine. But when I submit it online to a scientific ...
[ 0.20759724080562592, -0.012588001787662506, 0.6614503264427185, -0.000704514270182699, -0.045041684061288834, -0.1002509817481041, 0.10799378901720047, 0.06215270236134529, -0.4726332724094391, -0.9790064692497253, 0.04790621995925903, 0.43059787154197693, -0.26727813482284546, -0.00279950...
\scalebox{0.45}{ \includegraphics{tree.jpg}} \end{center} \caption{\small A sample} \label{tree} \end{figure} ``` What should I do ? Could it be that their server is using an old compiler ? **UPDATE :** It finally worked. I converted the first image to PDF and the compilation ...
[ 0.2608378231525421, 0.0209027212113142, 0.5539718866348267, 0.1634615808725357, -0.22039927542209625, -0.13538552820682526, 0.21010756492614746, -0.08069781213998795, -0.24653732776641846, -0.7900104522705078, 0.06692948192358017, 0.5407136678695679, -0.19830410182476044, -0.01437238603830...
problems including jpegs in LaTeX. The engine isn't really built to gather all the necessary size and scale information from JPGs. It is often better to take the JPEG and convert it into a PDF (on a mac) or EPS (on a PC). GraphicsConvertor on a mac will do that for you easily. Whereas a PDF includes DPI and size, a JPE...
[ -0.12783066928386688, -0.014515647664666176, 0.6324699521064758, 0.33688509464263916, -0.20918215811252594, -0.22607751190662384, -0.26021817326545715, -0.10386650264263153, -0.49070215225219727, -0.8049426078796387, -0.14328324794769287, 0.5137503147125244, -0.3751823604106903, -0.2181293...
try to scale your JPG).
[ 0.027222780510783195, -0.2133709043264389, 0.3019004166126251, 0.31955769658088684, -0.08691734075546265, 0.10397133976221085, 0.5544543266296387, -0.21095260977745056, -0.5472689270973206, -0.4351016879081726, -0.01702498458325863, 0.5612756609916687, -0.17502851784229279, -0.111380264163...
I catch the windows mouse movement events and calculate an relative mouse movement to send it to another pc. So far so good, works well. But if I block the mouse movement on the screen that is sending the mouse coordinates (the client) or reach one side of the screen, there is a second mouse event fired by the windows...
[ -0.19599947333335876, -0.10299896448850632, 0.6288828253746033, -0.35856497287750244, 0.3029192388057709, -0.07124239951372147, 0.27180835604667664, -0.21313901245594025, -0.337579607963562, -0.6324389576911926, 0.011442290619015694, 0.9151904582977295, -0.3784151077270508, 0.1292860656976...
{ Logger.Log(String.Format("Pos: {0} {1} Delta: {2} {3}", e.X, e.Y, e.DeltaX, e.DeltaY), LogLevel.Info); if (hasControl) server.MouseMove(e.DeltaX, e.DeltaY, true); // send the coordinates to the client e.Handled = true; // Don't move the mouse } ``` Now I start the app and m...
[ -0.06557974964380264, -0.13243453204631805, 1.060849905014038, -0.07149728387594223, 0.4241220951080322, 0.2094227820634842, 0.33882635831832886, -0.14112834632396698, -0.28083381056785583, -0.971661388874054, -0.19593073427677155, 0.5673374533653259, -0.530217170715332, -0.098176084458827...
0 -1 09.04.2009 00:29:31 <10> Pos: -1 0 Delta: -1 0 09.04.2009 00:29:31 <10> Pos: -1 -1 Delta: 0 -1 09.04.2009 00:29:31 <10> Pos: 0 0 Delta: 0 0 09.04.2009 00:29:31 <10> Pos: -1 0 Delta: -1 0 09.04.2009 00:29:31 <10> Pos: 0 -1 Delta: 0 -1 09.04.2009 00:29:31 <10> Pos: -1 0 Delta: -1 0 09.04.2009 00:29:31 <10> Pos: 0 -1...
[ -0.5489459037780762, 0.0010356655111536384, 0.7786352038383484, -0.19566838443279266, -0.08108595013618469, 0.7359105944633484, -0.1597718596458435, -0.32913461327552795, -0.4175507724285126, -0.9229105114936829, -0.024315012618899345, 0.18578149378299713, -0.6056683659553528, -0.142080873...
Pos: -1 0 Delta: 0 0 09.04.2009 00:29:31 <10> Pos: -1 -1 Delta: 0 -1 09.04.2009 00:29:31 <10> Pos: -1 -1 Delta: 0 0 09.04.2009 00:29:31 <10> Pos: -2 -1 Delta: 0 0 09.04.2009 00:29:31 <10> Pos: -1 -1 Delta: 1 0 // Here it starts to snap back first time 09.04.2009 00:29:31 <10> Pos: -1 0 Delta: 0 0 09.04.2009 00:29:31 <1...
[ -0.5372432470321655, -0.30921444296836853, 0.6795413494110107, -0.22532737255096436, -0.17675113677978516, 0.6278263926506042, -0.2824963331222534, -0.13809406757354736, -0.708606481552124, -0.8154692649841309, -0.04028134047985077, 0.3945326805114746, -0.5664055943489075, -0.1249085366725...
Delta: 1 0 09.04.2009 00:29:31 <10> Pos: -3 -1 Delta: 0 1 09.04.2009 00:29:31 <10> Pos: -2 -2 Delta: 1 0 09.04.2009 00:29:31 <10> Pos: -1 -1 Delta: 1 1 09.04.2009 00:29:31 <10> Pos: -3 -1 Delta: 0 0 09.04.2009 00:29:31 <10> Pos: -1 0 Delta: 2 0 09.04.2009 00:29:31 <10> Pos: 0 -1 Delta: 0 -1 09.04.2009 00:29:31 <10> Pos...
[ -0.5257715582847595, -0.0359947606921196, 0.6300591826438904, -0.21668632328510284, 0.0868372693657875, 0.7862591743469238, -0.19879554212093353, -0.3530207872390747, -0.5582417249679565, -1.014180302619934, 0.009080602787435055, 0.2891959846019745, -0.7894035577774048, -0.1536827385425567...
<10> Pos: 0 -1 Delta: 0 -1 09.04.2009 00:29:32 <10> Pos: -1 0 Delta: -1 0 09.04.2009 00:29:32 <10> Pos: 0 -1 Delta: 0 -1 09.04.2009 00:29:32 <10> Pos: -1 0 Delta: -1 0 09.04.2009 00:29:32 <10> Pos: 0 -1 Delta: 0 -1 09.04.2009 00:29:32 <10> Pos: -1 -1 Delta: -1 0 09.04.2009 00:29:32 <10> Pos: -1 0 Delta: 0 0 09.04.2009 ...
[ -0.5813776850700378, 0.04862874746322632, 0.6996708512306213, -0.2770797610282898, 0.011061028577387333, 0.7992359399795532, -0.24081312119960785, -0.32456597685813904, -0.6121253967285156, -0.9550482034683228, -0.019530700519680977, 0.20780998468399048, -0.6763391494750977, -0.31563997268...
Delta: 0 -1 09.04.2009 00:29:32 <10> Pos: -1 0 Delta: -1 0 09.04.2009 00:29:32 <10> Pos: -1 -1 Delta: 0 -1 09.04.2009 00:29:33 <10> Pos: -1 -1 Delta: 0 0 09.04.2009 00:29:36 <10> Pos: -1 -1 Delta: 0 0 09.04.2009 00:29:36 <10> Pos: -2 -2 Delta: 0 0 09.04.2009 00:29:36 <10> Pos: -5 -5 Delta: -3 -3 09.04.2009 00:29:36 <10...
[ -0.3436177968978882, 0.1359899342060089, 0.5929503440856934, -0.11790011823177338, 0.20513202250003815, 0.8970770835876465, -0.14202892780303955, -0.3111417889595032, -0.5914866328239441, -1.0218992233276367, 0.03732558339834213, 0.3948113024234772, -0.546398937702179, -0.06123247370123863...
<10> Pos: -26 -25 Delta: -6 -8 09.04.2009 00:29:36 <10> Pos: -33 -25 Delta: -7 0 09.04.2009 00:29:36 <10> Pos: -36 -31 Delta: -3 -6 09.04.2009 00:29:36 <10> Pos: -39 -31 Delta: -3 0 09.04.2009 00:29:36 <10> Pos: -38 -29 Delta: 1 2 09.04.2009 00:29:36 <10> Pos: -38 -24 Delta: 0 5 09.04.2009 00:29:36 <10> Pos: -33 -24 De...
[ -0.21597042679786682, 0.23793736100196838, 0.6688976287841797, -0.08991923183202744, 0.1385335475206375, 1.0130248069763184, -0.0677422508597374, -0.14477390050888062, -0.6103695034980774, -1.057594895362854, 0.059125252068042755, 0.5272683501243591, -0.41302695870399475, -0.30709978938102...
Delta: 2 3 09.04.2009 00:29:36 <10> Pos: -11 -8 Delta: 3 0 09.04.2009 00:29:36 <10> Pos: -8 -5 Delta: 3 3 09.04.2009 00:29:36 <10> Pos: -8 -5 Delta: 0 0 09.04.2009 00:29:36 <10> Pos: -4 -2 Delta: 4 3 09.04.2009 00:29:36 <10> Pos: -3 -3 Delta: 1 -1 09.04.2009 00:29:36 <10> Pos: -1 0 Delta: 2 3 ``` Got my solution, base...
[ -0.2774084508419037, -0.13103865087032318, 0.7792912125587463, -0.43720054626464844, 0.20177526772022247, 0.3355433940887451, 0.25008121132850647, -0.4948239028453827, -0.1987028867006302, -0.5823972821235657, 0.03370128199458122, 0.773398220539093, -0.6512418985366821, -0.2878005206584930...
void HookManager_MouseMoveExt(object sender, MouseEventExtArgs e) { // Should we block all mouse interactions? if (Block) { e.Handled = true; return; }
[ 0.31769034266471863, -0.4061720669269562, 0.14650942385196686, -0.28538480401039124, 0.46437856554985046, -0.05759816616773605, 0.4539198577404022, -0.5105378031730652, -0.059297237545251846, -0.17644619941711426, 0.012902078218758106, 0.7018072605133057, -0.5110068321228027, -0.0037172245...
// Return if we should ignore the nex, because we made a big jump if (ignoreNext) { ignoreNext = false; return; } if (hasControl)
[ 0.358423113822937, -0.30150124430656433, 0.18666085600852966, -0.15930677950382233, 0.20301809906959534, -0.23726430535316467, 0.3429989814758301, -0.35587894916534424, -0.17439842224121094, -0.13627320528030396, -0.264948308467865, 0.4363349676132202, -0.3469904959201813, -0.0063621606677...
{ // Lock the mouse to 100,100 : 200,200 and flip back to 150,150 if out of bounds if (e.X < 100 || e.X > 200 || e.Y < 100 || e.Y > 200) // Box leaved {
[ 0.04801414906978607, -0.13986103236675262, 0.5282283425331116, -0.3336705267429352, 0.493385374546051, 0.18066489696502686, -0.1776607185602188, -0.2487892508506775, -0.0018841440323740244, -0.20050595700740814, -0.023532720282673836, 0.2212398499250412, -0.13961336016654968, -0.1395126432...
// If we leave the box, we set the position to the center // and set the event to handled otherwise the mouse is free MouseSimulator.Position = new System.Drawing.Point(150, 150); e.Handled = true;
[ 0.06891154497861862, -0.4322405457496643, 0.5949999094009399, -0.048827748745679855, 0.33697742223739624, 0.06297149509191513, -0.24171528220176697, -0.4548933804035187, -0.18442894518375397, -0.4308639168739319, 0.025010431185364723, 0.4637557566165924, 0.03123369999229908, 0.042148169130...
ignoreNext = true; } // We moved fine, send the delta to the server // The MouseSimulator.Position change will not be visible yet.
[ 0.3184055685997009, -0.27838343381881714, 0.5888624787330627, -0.0358877070248127, 0.47869518399238586, 0.07145118713378906, 0.3156072795391083, -0.1315508931875229, -0.2123679220676422, -0.4622327387332916, 0.24414296448230743, 0.5137435793876648, -0.28992152214050293, -0.1229589805006980...
server.MouseMove(e.DeltaX, e.DeltaY, true); } Logger.Log(String.Format("Pos: {0} {1} Delta: {2} {3}", e.X, e.Y, e.DeltaX, e.DeltaY), LogLevel.Info); } ```
[ -0.1992809772491455, -0.40314188599586487, 0.46634364128112793, 0.029103508219122887, 0.29717347025871277, 0.08645960688591003, 0.14721016585826874, 0.3209392726421356, -0.1772375851869583, -0.862984299659729, -0.060507625341415405, 0.38439086079597473, -0.7111579775810242, -0.000977023853...
This is related to [this question](https://stackoverflow.com/questions/728593/what-would-be-the-best-way-to-design-database-and-relationships-for-a-website-lik). It got me thinking that, for example, [this book](http://cgi.ebay.com/2009-Farm-Equipment-Guide_W0QQitemZ400041074215QQcmdZViewItemQQptZLH_DefaultDomain_0?has...
[ 0.236721932888031, 0.04671322926878929, 0.17591887712478638, 0.18378056585788727, 0.3176537752151489, 0.05226386338472366, -0.09187284111976624, -0.2677293121814728, -0.501642107963562, -0.3567488193511963, 0.12268888205289841, 0.22997760772705078, 0.13426479697227478, 0.2754038870334625, ...
is a stupid question (and no, I don't think I'm programming the next eBay), but I can't shake this curiosity and, worse; the *temptation*; so I'd rather sound stupid now and get a good grasp of my misunderstandings than do something stupid or pointless later on. When the relational model first emerged, the dominant dat...
[ -0.11903457343578339, 0.20454208552837372, -0.055347491055727005, 0.5212645530700684, -0.21750794351100922, 0.05783343315124512, 0.14638347923755646, 0.15642571449279785, -0.09324873238801956, -0.3804604113101959, 0.21839019656181335, 0.8608812689781189, -0.14354665577411652, 0.13988968729...
come from another root dimension. (It was a strongly debated question whether relational databases could ever be efficient enough for practical usage; soon resolved by diligent application of Moore's Law.) Think about Customers who have Orders which comprise Products; a hierarchy. Inevitably you'll want to also be abl...
[ 0.23471559584140778, -0.013967194594442844, 0.09435724467039108, 0.50547194480896, -0.0599040687084198, 0.24059346318244934, 0.1300479769706726, 0.16937637329101562, -0.3762614130973816, -0.7070950269699097, -0.15910720825195312, 0.41196465492248535, -0.27822259068489075, 0.405424803495407...
database formats at the cost of embedding multiple orthogonal hierarchies; in which case the cost of altering, adding, or deleting data becomes astronomical.
[ 0.10506444424390793, 0.23203758895397186, 0.34697800874710083, 0.6776271462440491, 0.17177173495292664, -0.3464611768722534, -0.1100095883011818, -0.0003082853218074888, -0.16935978829860687, -0.5557829737663269, -0.23132289946079254, 0.256551057100296, -0.36231744289398193, 0.428965121507...
EDIT: Can anyone help me out with a regular expression for a string such as this?: `[Header 1], [Head,er 2], Header 3` so that I can split this into chunks like: `[Header 1]` `[Head,er 2]` `Header 3` I have gotten as far as this: ``` (?<=,|^).*?(?=,|$) ``` Which will give me: `[Header 1]` `[Head` `,...
[ 0.24264533817768097, 0.10087791085243225, 0.16189154982566833, 0.07707881927490234, -0.2874484360218048, 0.019910866394639015, 0.09158040583133698, -0.057856831699609756, -0.26279377937316895, -0.646693229675293, 0.0061296080239117146, 0.29265695810317993, -0.25282764434814453, -0.04366315...
closing square bracket first, the comma is inside a pair of brackets, so it's not a delimiter. If you find an opening bracket or the end of the line/string, it's a delimiter.
[ -0.2625267505645752, -0.1272498518228531, 0.5410581231117249, -0.21998292207717896, -0.2460479885339737, 0.15564772486686707, 0.06133292242884636, -0.18069593608379364, 0.034878455102443695, -0.469555526971817, -0.31884709000587463, 0.37270134687423706, -0.018031420186161995, 0.28485903143...
I have a requirement to generate a bitmap containing some characters rendered without anti-aliasing or ClearType. In Win32-land, I would have created a font with lfQuality set to NONANTIALIASED\_QUALITY and drawn with that. I have tried to do this with WinForms in the following manner: ``` using(Font smoothFont = ...
[ -0.19450189173221588, -0.02432856149971485, 0.6752220392227173, -0.24386011064052582, 0.20208284258842468, 0.316276878118515, 0.06153979152441025, -0.13982264697551727, 0.21250109374523163, -0.7353148460388184, -0.09504600614309311, 0.7560577988624573, -0.12199947983026505, -0.298681348562...
C, or is there something I'm missing here? (My LOGFONT class and associated lfQuality defs come straight from the framework source, so I'm happy they're correct) Turns out I was looking the wrong place, and you can't change GDI+ font rendering this way, instead you need to set the TextRenderingHint property on your gra...
[ 0.21906530857086182, 0.3133813738822937, 0.433296263217926, -0.3604331612586975, -0.0979544073343277, 0.10233969241380692, -0.0031443890184164047, -0.0351751446723938, -0.1682605892419815, -0.5246419906616211, -0.11022588610649109, 0.6239026784896851, -0.3153051733970642, 0.088806733489036...
I have a nested sortable list that can have items dynamically added or removed and can be nested n-levels deep. On nesting, a new ul element is injected into whatever li element is selected to be the parent. The initial state of the list is something like the following: ``` <ul id="parent"> <li id="One"><a href=""...
[ -0.14239296317100525, -0.09541303664445877, 0.416812002658844, -0.4023754298686981, -0.18280257284641266, 0.2765403389930725, -0.1540563851594925, -0.5493239760398865, 0.08303866535425186, -0.852791965007782, -0.09465919435024261, 0.07065887749195099, -0.21673062443733215, 0.11150823533535...
<li id="B"><a href="" class="listLink"><span class="position">2</span>B</a></li> <li id="C"><a href="" class="listLink"><span class="position">3</span>C</a></li> <li id="D"><a href="" class="listLink"><span class="position">4</span>D</a></li> <li id="E"><a href="" class="listLink"><s...
[ -0.1963004618883133, 0.1923356056213379, 0.47613292932510376, -0.2858820855617523, -0.18499545753002167, 0.34989607334136963, 0.03721614554524422, -0.7379980087280273, -0.22146841883659363, -0.5417253971099854, -0.48066645860671997, 0.46800822019577026, -0.1718946099281311, -0.229904010891...
</ul> </li> <li id="Four"><a href="" class="listLink"><span class="position">4</span>Four</a></li> <li id="Five"><a href="" class="listLink"><span class="position">5</span>Five</a></li> <li id="Six"><a href="" class="listLink"><span class="position">6</span>Six</a></li> </ul> ```...
[ 0.08243369311094284, -0.026950962841510773, 0.3558681905269623, -0.17800654470920563, -0.09885722398757935, 0.4919401705265045, 0.011183165945112705, -0.7486526370048523, -0.34409135580062866, -0.7826926112174988, -0.31959009170532227, 0.39470651745796204, 0.007473464589565992, -0.20629093...
in the list and not any belonging to sublists. Assume that except for id, position, and text, each li element in all lists is identical to all others. Is there a selector for getting only the immediate children? Is there another way to do this? I tried some child selectors like the ones mentioned: * `ul > li` Will s...
[ -0.14749446511268616, -0.22099654376506805, 0.1075475737452507, 0.03142266348004341, -0.0076730577275156975, 0.37818098068237305, -0.09917879104614258, -0.3186609148979187, -0.2820114195346832, -0.6981965899467468, -0.09458362311124802, 0.12229697406291962, -0.4001339077949524, 0.094005927...
which works fine, just updating the position. Note that it is also MooTools syntax: ``` var drop = function(el){ el.getParents('ul').reverse().each(function(item){ var posCount = 1; item.getElements('li a span[class=position]').each(function(pos){ pos.set('text', posCount); ...
[ -0.13095922768115997, -0.1736452728509903, 0.9383430480957031, -0.320092111825943, 0.2809346616268158, 0.20808012783527374, 0.17991040647029877, -0.35177844762802124, -0.472554475069046, -0.5181794166564941, -0.7289241552352905, 0.539527177810669, -0.3768504858016968, -0.06398847699165344,...
will give the correct numbers for that list, but cause the parent lists to incorrectly count all child li elements in numbering. I feel like this is an ugly hack, but it works: ``` var drop = function(){ var ulCount = 1; $$('ul').each(function(item){ if(item.get('id') != 'parent') { item....
[ 0.22284406423568726, -0.33085498213768005, 0.5534600615501404, 0.1582493633031845, 0.3724301755428314, 0.3651295006275177, 0.01006667036563158, -0.42220568656921387, -0.13412809371948242, -0.5085742473602295, -0.33639466762542725, 0.5127272009849548, -0.2726414203643799, 0.0177178401499986...
1; $(document).getElements('#'+elId+'>li>a>span[class=position]').each(function(pos){ pos.set('text', posCount); posCount++; }); ulCount++; }); } ``` ``` ul > li ``` only does the immediate children. So, for example, to do only the top level list elements you could...
[ 0.09103143215179443, -0.13389639556407928, 0.48476576805114746, 0.001115299528464675, 0.14764629304409027, -0.0672568678855896, 0.18646585941314697, -0.3815654516220093, 0.07070747762918472, -0.8073551654815674, -0.7129215002059937, 0.547920286655426, -0.32310912013053894, -0.0865267440676...
li { /* back to normal */ } ``` It's more tedious because you have to apply styles and then turn them off (and you may not necessarily know what the old values are) but it's the only IE6-friendly pure CSS workaround there is. **Edit:** Ok you have a MooTools specific issue. getElements() returns all descendants, not...
[ -0.017001479864120483, -0.1657591313123703, 0.6868771910667419, -0.26209402084350586, 0.3668895959854126, 0.23468749225139618, 0.35313713550567627, -0.37179264426231384, -0.16257937252521515, -0.5382719039916992, -0.6654468774795532, 0.47560372948646545, -0.31726574897766113, 0.11611019819...
pos.set('text', posCount); posCount++; }); }); } ``` or something like that.
[ -0.24476367235183716, -0.16991308331489563, 0.45297202467918396, -0.15739616751670837, 0.2569151222705841, -0.10983700305223465, 0.07272379100322723, -0.033715154975652695, -0.0017955214716494083, -0.6715695261955261, -0.8123067617416382, 0.6883266568183899, -0.5109099745750427, -0.4035210...
``` char[] a = { 'o', 'r', 'a', 'n', 'g', 'e' }; for (int i = 0; i < a.Length/2; i++) { a[i] = (char)(((uint)a[i])|((uint)a[a.Length-(i+1)])); a[a.Length-(i+1)] = (char)(((uint)a[i])^((uint)a[a.Length-(i+1)])); a[i] = (char)(((uint)a[i])^((uint)a[a.Length-(i+1)])); } ``` I know how to implement this us...
[ 0.024032112210989, 0.1305755227804184, 0.3537015914916992, -0.46911290287971497, -0.024674206972122192, -0.14619670808315277, 0.680345892906189, -0.43183091282844543, 0.009474493563175201, -0.4286203980445862, -0.27814099192619324, 0.70560222864151, -0.5389351844787598, 0.09409526735544205...
series of those? Hehe, there's no such thing as an OR/XOR/XOR swap - it should be a "triple xor" swap. ``` int a = 8, b = 10; a ^= b; b ^= a; a ^= b; ``` I don't see why you want to use it (aside from the novelty value)
[ 0.6496067643165588, -0.13636945188045502, 0.27430447936058044, 0.1678341031074524, -0.018972739577293396, -0.06616313755512238, -0.04422568902373314, -0.19034966826438904, -0.30637410283088684, -0.157290518283844, -0.3522033095359802, 0.4598255753517151, -0.6419035792350769, 0.231532678008...
What should you call after printing HTML from a Perl CGI script? I have seen empty `return` statements, `exit` statements, and in some cases nothing at all. Does it matter? ``` #!perl print "Content-type: text/html\n\n"; print <<'END_HTML'; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3...
[ 0.32377275824546814, 0.17141544818878174, 0.5023546814918518, -0.3267972767353058, -0.25759169459342957, -0.20894402265548706, 0.00830643717199564, -0.08586330711841583, -0.402339905500412, -0.40102341771125793, -0.26859772205352783, 0.3662399649620056, -0.17388559877872467, 0.141586288809...
way to write this--please just take this at face value for the sake of the question.* ``` #!perl use CGI; my $q = CGI->new(); my $action = $q->param('action'); my $html_start = "Content-type: text/html\n\n"; $html_start .= <<'END_HTML'; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "h...
[ 0.03258593752980232, 0.0016336444532498717, 0.8290523886680603, -0.1205940842628479, -0.33012890815734863, -0.005301391240209341, 0.019268613308668137, -0.6094819903373718, -0.42986032366752625, -0.3163513243198395, -0.49326586723327637, 0.19429388642311096, -0.28121837973594666, -0.098385...
# do anything else here? } ``` You should always print out "\n\n" at the end of your output to tell the webserver the output is finished. Apache may do this for you on successful script termination. If your script is finished, you should technically call "exit" with the appropriate exit status-- zero for success, non...
[ 0.09388991445302963, 0.23728042840957642, 0.3359043300151825, -0.12588155269622803, 0.011896885931491852, -0.322022408246994, 0.5251953601837158, 0.016311464831233025, -0.22993259131908417, -0.4688749611377716, -0.5430734157562256, 0.46198001503944397, -0.1099214181303978, 0.09253002703189...
the webserver will treat your CGI script the same as if you called "exit(0)". This is all described in the CGI specification (RFC 3875 is current, IIRC).
[ 0.27425822615623474, 0.05949560925364494, 0.5659213066101074, -0.22210374474525452, -0.032138749957084656, -0.3966553211212158, -0.01781674288213253, -0.09816134721040726, -0.06392152607440948, -0.6126082539558411, -0.24062596261501312, 0.3805776536464691, -0.4039106070995331, -0.032037965...
I have a django application using mod\_python, fairly typical configuration except that media files are being served by a (I know, not recommended) 'media' directory in the document root. I would like to test and maybe deploy with mod\_wsgi but I cannot figure out how to create something simple to serve static files. m...
[ 0.14187896251678467, 0.3090532124042511, -0.036454491317272186, -0.26506897807121277, -0.16877491772174835, -0.47997793555259705, 0.25136643648147583, -0.12704813480377197, -0.1757526695728302, -0.3683401942253113, -0.058388665318489075, 0.5734301209449768, -0.562653124332428, -0.013888187...
root is still being sent to the wsgi app. Is there a good way set a static media directory with mod\_wsgi, or is what I am trying to do intentionally unsupported for compelling technical reasons? Answers that point to entirely different approaches are welcome. The mod\_wsgi documentation explains how to setup static fi...
[ -0.190719872713089, -0.23833328485488892, 0.4872128665447235, 0.16271008551120758, -0.019357826560735703, -0.08844716101884842, 0.4266825020313263, 0.003136119805276394, -0.4769376218318939, -0.6524066925048828, -0.18766210973262787, 0.5894666314125061, -0.2763274610042572, 0.0780879333615...
I want to add some code that runs when a new user is registered on a DotNetNuke site. There is a custom registration module, and I could add code to that. My concern is this registration module is still a work in progress thats not really in my control. Someone could break the code I add or do something unexpected. Is...
[ 0.7869381904602051, -0.1567002534866333, 0.2888740301132202, 0.018403150141239166, 0.003941953647881746, -0.2315955013036728, 0.17741599678993225, -0.06829605996608734, -0.3033173382282257, -0.7628961801528931, 0.26368069648742676, 0.2826841175556183, -0.2199804186820984, 0.092927582561969...
original implementation then my custom code. The upside is that their is no coupling with the registration component. The downside though- unlike adding an HttpModule where the configuration is indpendent of other aspects of the site- is I will be hiding the existing membership provider. Suppose someone wants to updat...
[ 0.3406364917755127, -0.3284275531768799, 0.20485512912273407, 0.001272916910238564, 0.025276856496930122, -0.24880379438400269, 0.23611518740653992, -0.06999674439430237, -0.2330198884010315, -0.4842549264431, 0.15336745977401733, 0.4871082901954651, -0.4215615391731262, 0.4661333858966827...
provider type be included in the web.config definition. Unforuntately C# generics don't allow you to derive from a generic type parameter. :( If you derive from the existing membership provider, why would your class have to be recompiled when another provider changes (assuming you're not using strongly-named references...
[ 0.2610241174697876, -0.09115685522556305, 0.3077346086502075, -0.16893790662288666, 0.11432023346424103, -0.2288794368505478, 0.18333283066749573, -0.17035487294197083, -0.24988482892513275, -0.5466068387031555, -0.12989938259124756, 0.43906354904174805, -0.5904304385185242, 0.639649033546...