text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
column.For(x => x.DateOfBirth); column.For("View Person").Named("").Action(p => { %> <td style="font-weight:bold"> <%= Html.ActionLink("View Person", "Show", new { id = p.Id })%> </td>
[ 0.07030346989631653, -0.5253051519393921, 0.7344500422477722, -0.23792009055614471, -0.1578463315963745, 0.5269104242324829, 0.17855145037174225, -0.2977888882160187, -0.4052245318889618, -0.48598113656044006, -0.1376621425151825, 0.26203665137290955, -0.36384645104408264, -0.0901685580611...
<% }); }).RowStart((p,row) => { if (row.IsAlternate) { %> <tr style="background-color:#CCDDCC"> <% } else { %> <tr>
[ -0.15542206168174744, -0.48333868384361267, 0.6437950730323792, -0.004752069711685181, 0.5270926356315613, 0.17067016661167145, -0.08712083846330643, -0.29351624846458435, -0.17883050441741943, -0.43110305070877075, -0.23681038618087769, 0.7489246726036072, -0.3228054940700531, -0.02860460...
<% } }).Render(); %> ``` Here it looks like they are wanting to direct the user to a View Person page: `<%= Html.ActionLink("View Person", "Show", new { id = p.Id })%>`. Good luck, and happy coding.
[ -0.06450163573026657, -0.010339949280023575, 0.6193583011627197, -0.3246987462043762, 0.09631587564945221, 0.12877772748470306, 0.3823789060115814, 0.08332209289073944, -0.03908929601311684, -0.8184235692024231, -0.29303407669067383, 0.5880003571510315, 0.07805121690034866, -0.211495861411...
I'm currently working on a reasonably simple MVC app which allows the user to enter some search data, get a list of results, then view each item etc. It's all going rather nicely, however I'm now trying to implement paging but having some trouble. My search form uses HTTP GET, requesting the following action: ``` pub...
[ 0.22748884558677673, 0.06875139474868774, 0.8941699862480164, -0.23235419392585754, 0.03612154349684715, 0.09339394420385361, 0.2530941665172577, -0.4563031494617462, -0.2225453406572342, -0.7763825058937073, -0.27107977867126465, 0.6059662103652954, 0.0779874324798584, 0.25216588377952576...
passed into my view. In addition, I've used ViewData to hold the search parameters so that I can pass them on when the user requests a different page. For example, to get to the first page, I'd like to use something like this: ``` Html.ActionLink("First", "Results", new { data = ViewData["SearchData"], page = 1 }) `...
[ 0.18674851953983307, -0.22110332548618317, 0.9963886737823486, -0.011583655141294003, -0.09441381692886353, -0.008902485482394695, -0.006944872904568911, -0.27263593673706055, -0.06706707924604416, -0.831767737865448, -0.10403678566217422, 0.08441880345344543, -0.31271156668663025, 0.51286...
binding feature. I'm guessing this is because model binding can only work correctly when you've specified a single type? I can see several reasons as to why this doesn't work; what I am having trouble with is working out the 'nice' way to do what I'm trying to do. I know that I must be lacking a vital piece of underst...
[ 0.34798359870910645, 0.011772696860134602, 0.4511389136314392, 0.16675691306591034, -0.5203918218612671, -0.34272968769073486, 0.35095274448394775, -0.15120624005794525, -0.0902390256524086, -0.6657837629318237, 0.2026183009147644, 0.6515408754348755, -0.3390197455883026, 0.157495021820068...
is just trying it's best to generate something from what you've given it and that's an object with two properties: data and page. To get the page number in you could make use of a route value dictionary (which is probably what's done under the hood anyway) and make use of the override that accepts an IDictionary:- ``...
[ 0.20847584307193756, -0.2853212058544159, 0.7435668706893921, -0.0015440937131643295, 0.18912672996520996, 0.017363684251904488, 0.24633269011974335, -0.35201168060302734, -0.21177035570144653, -0.8047429919242859, -0.07395939528942108, 0.3909708559513092, -0.34518110752105713, -0.44265079...
I have a large string, similar to this one: > BREW pot HTCPCP/1.0 > > > Accept-Additions: #milk;3#whiskey;splash > > > Content-Length: 5 > > > Content-Type: message/coffeepot I also have an array with several additions (#whiskey, #espresso, etc). What I need to do is send an error if this large string contains ...
[ 0.6579740643501282, 0.9459429383277893, 0.5130173563957214, -0.4906049966812134, -0.2772330343723297, 0.016740059480071068, 0.10619036853313446, -0.24176760017871857, -0.20548103749752045, -0.6750553250312805, 0.32309257984161377, 0.3721389174461365, -0.11439511924982071, 0.320632666349411...
the program (which many of you may recognise). How would I code the following problem, with emphasis on the addition not being available? This code makes a few assumptions about the input. It does look like you could split each token up even further into #; components. Using a List for your acceptable liquids parameter...
[ 0.2800048589706421, 0.12654732167720795, 0.32891926169395447, -0.11565490812063217, -0.07575315982103348, 0.27340108156204224, 0.12188167124986649, -0.08360558748245239, -0.104730024933815, -0.5056054592132568, -0.1502135694026947, 0.40225598216056824, -0.2982924282550812, 0.33651271462440...
for (int line_index = 0; line_index < lines.length; line_index++) { if (lines[line_index].length() > 16) { // Assume you're delimiting by '#' String[] tokens = lines[line_index].split("#"); if (tokens.length > 1) { // Start at index = 1 to kill "Accept-Additions...
[ 0.13520313799381256, -0.5846903920173645, 0.17145150899887085, -0.3282957971096039, 0.031728655099868774, 0.21835587918758392, 0.10234759747982025, -0.6091525554656982, -0.36233755946159363, -0.35523924231529236, -0.33915331959724426, 0.23615387082099915, -0.4705434739589691, 0.14530079066...
for (int token_index = 1; token_index < tokens.length; token_index++) { boolean valid = false; for (int liquids_index = 0; liquids_index < liquids.length; liquids_index++) { if (liquids[liquids_index].equals("#" + tokens[token_index])) {
[ -0.3389095664024353, -0.14858686923980713, 0.5116791725158691, -0.2263144552707672, 0.0007513000746257603, 0.3156536817550659, 0.17562778294086456, -0.30238452553749084, 0.039990101009607315, -0.3621428906917572, -0.3838106393814087, 0.29652759432792664, -0.20346766710281372, 0.21024394035...
valid = true; // break to save some time if liquids is very long break; } } if (!valid)
[ 0.09878155589103699, 0.05727379024028778, 0.4686187505722046, -0.07044655084609985, 0.20344150066375732, -0.2938704490661621, 0.6047490835189819, -0.35367292165756226, -0.009134020656347275, 0.06049107760190964, -0.3382745385169983, 0.44021618366241455, -0.08216676115989685, 0.254778474569...
{ throwError("#" + tokens[token_index]); } } } } } } public static void throwError(String error) { System.out.println(error + " is not in the Array!"); } ```
[ -0.24511338770389557, 0.17143210768699646, -0.15416456758975983, -0.3807220458984375, -0.3171333372592926, 0.10198509693145752, 0.21943432092666626, -0.4658886194229126, -0.10340044647455215, -0.24886205792427063, -0.11610987782478333, 0.4646075367927551, -0.20201195776462555, 0.2340039163...
I was wondering about `??` signs in `C#` code. What is it for? And how can I use it? What about `int?`? Is it a nullable int? ### See also: > [?? Null Coalescing Operator —> What does coalescing mean?](https://stackoverflow.com/questions/770186/null-coalescing-operator-what-does-coalescing-mean) It's called the "nul...
[ 0.07898935675621033, 0.035704709589481354, -0.13093779981136322, -0.09825017303228378, 0.009028703905642033, 0.050695668905973434, 0.1204083040356636, -0.08502443134784698, -0.21161846816539764, -0.3507455587387085, 0.006336603779345751, 0.36640867590904236, -0.23549313843250275, 0.2017585...
I have some content sliding here. <http://www.smallsharptools.com/downloads/jQuery/Slider/slider.html> The HTML structure is simple. There is an outer box with a fixed height and width with the overflow set to hidden. Then there is an inner container with the width set to the full width of the content inside of it wh...
[ -0.08166884630918503, -0.12707318365573883, 0.5713918805122375, 0.0413077138364315, -0.22879916429519653, 0.1361090987920761, -0.009322389960289001, 0.15048575401306152, -0.25091221928596497, -0.5350822806358337, 0.06024647504091263, 0.23832853138446808, 0.04714050143957138, 0.132745727896...
animation, even in Chrome which I expect would perform better. My question is, would it be smoother if I used a different technique to move it back and forth? Would absolute positioning be smoother or is there something else I should consider? Are there any secrets do smooth animation that I just do not know yet? Marg...
[ -0.1346185952425003, -0.16496071219444275, 0.5869537591934204, 0.4245351254940033, -0.22995765507221222, 0.24793443083763123, -0.21146705746650696, -0.0023935737553983927, -0.11035921424627304, -0.6609896421432495, 0.32411038875579834, 0.5114019513130188, 0.2104637324810028, -0.19466055929...
gives some good insight into how the browser/dom internals work <http://www.youtube.com/watch?v=a2_6bGNZ7bA&feature=channel_page>
[ -0.00957835465669632, -0.18470467627048492, 0.43122974038124084, -0.1263408362865448, 0.02957954630255699, 0.03971151262521744, 0.6631531119346619, -0.22933229804039001, -0.5328329205513, -0.20584091544151306, -0.15776920318603516, 0.5160415768623352, 0.21136285364627838, 0.066893234848976...
I think yes, but the top 12 examples I found all do something not illustrative like ``` JNIEXPORT jstring JCALL Java_com_foo_dumbImpl(JNIEnv* env, jobject thisObj) { return (*env)->NewStringUTF(env, "constant string"); } ``` so for posterity I will ask: this is bad, yes? ``` JNIEXPORT jstring JCALL Java_com_foo_...
[ 0.3059537708759308, 0.14441153407096863, 0.39368394017219543, -0.25947797298431396, 0.06021561846137047, 0.06516958028078079, 0.46245455741882324, -0.10444331169128418, -0.2050880789756775, -0.46329087018966675, -0.21765835583209991, 0.6346906423568726, -0.556300699710846, 0.13844560086727...
so this doesn't look unanswered.)
[ 0.4304768145084381, -0.0809168592095375, 0.47705549001693726, 0.30094462633132935, 0.13345392048358917, 0.2840757369995117, -0.04526279866695404, -0.17218613624572754, -0.1273789405822754, -0.016138354316353798, 0.07064352929592133, 0.4915742874145508, -0.17035068571567535, 0.1928388923406...
I know we can explicitly call the constructor of a class in C++ using scope resolution operator, i.e. `className::className()`. I was wondering where exactly would I need to make such a call. Most often, in a child class constructor that require some parameters : ``` class BaseClass { public: BaseClass( const std:...
[ -0.008252961561083794, -0.08475503325462341, 0.10226437449455261, 0.02670135907828808, 0.21245448291301727, -0.14392590522766113, 0.2783120274543762, -0.1755310595035553, -0.09691373258829117, -0.5448916554450989, -0.0713815838098526, 0.6072728633880615, -0.035887446254491806, 0.2072410732...
TestClass( int testValue ); //... }; class UniqueTestClass : public BaseClass , public TestClass { public: UniqueTestClass() : BaseClass( "UniqueTest" ) , TestClass( 42 ) { } // ... }; ``` ... for example. Other than that, I don't see the utility. I only did call the constructor ...
[ 0.16315796971321106, -0.023264745250344276, -0.18600237369537354, -0.043850503861904144, -0.03153659775853157, 0.05181591585278511, 0.45859628915786743, -0.06759090721607208, 0.09274441003799438, -0.5481787919998169, 0.05689811334013939, 0.3838047683238983, -0.09090034663677216, 0.14561221...
I have a JOIN query that pulls the last 6 "topic" records (the records with the highest topic\_ids that are have a topic\_status of 0, i.e. it's not spam): ``` SELECT topic_title, topic_slug, meta_value, topic_poster FROM `folio_topics` as Topics INNER JOIN `folio_topicmeta` as Topicmeta ON Topics.topic_id = Topicmeta...
[ -0.08468890190124512, 0.08238793909549713, 0.752981424331665, 0.05703330039978027, -0.14828379452228546, -0.04101298004388809, -0.22160546481609344, -0.10671041160821915, -0.3832135498523712, -0.5431477427482605, 0.017156390473246574, 0.5778082609176636, -0.2520812153816223, 0.365450859069...
came up with a query that correctly pulls the *highest* topic\_id for each topic\_poster, but it takes 8.7 seconds, which is extremely slow compared to most queries (which take less than 0.1 seconds). Is there a way to optimize this query? ``` SELECT topic_title, topic_slug, meta_value, topic_poster FROM `folio_topics...
[ -0.06662993133068085, -0.27994510531425476, 0.766945481300354, 0.3125302493572235, -0.18420392274856567, 0.24172723293304443, -0.3973178267478943, -0.3369944393634796, -0.5525525808334351, -0.6746276021003723, 0.22960424423217773, 0.3101409375667572, -0.021669315174221992, 0.08547889441251...
make that huge query run quickly, so I split it into two queries in code. Here's the PHP code: ``` $folio_posters = $wpdb->get_results("SELECT MAX( `topic_id` ) as topiclist FROM `folio_topics` WHERE `topic_status` =0 GROUP BY `topic_poster` ORDER BY topiclist DESC LIMIT 6"); foreach ($folio_posters as $folio_poster)...
[ 0.03534771129488945, -0.09457984566688538, 0.825305163860321, 0.40089312195777893, -0.3725115656852722, 0.2581320106983185, -0.24223998188972473, -0.5717512965202332, -0.6455329656600952, -0.47517699003219604, 0.07521232217550278, 0.2802318334579468, -0.27629685401916504, -0.06284090131521...
that version. :-)
[ 0.06770958006381989, 0.03971466049551964, 0.3309853971004486, -0.0714481845498085, 0.17579229176044464, -0.01254440937191248, 0.32228633761405945, 0.16737423837184906, -0.04611625149846077, -0.3858787715435028, -0.29568856954574585, 0.5597508549690247, -0.3841484785079956, 0.12587004899978...
Is there a Visual Studio plugin that spellchecks strings and comments? **Duplicate** of [Visual Studio 08 Spell Check Addin?](https://stackoverflow.com/questions/30947/visual-studio-08-spell-check-addin) Give a look to [IntelliSpell](http://www.componentone.com/SuperProducts/IntelliSpell/), a free version is available...
[ 0.2489219754934311, -0.4617322087287903, 0.27533674240112305, 0.23694121837615967, -0.18921306729316711, -0.13253700733184814, 0.0808544009923935, 0.03872469440102577, -0.08930236101150513, -0.430656760931015, -0.07982958108186722, 0.5191754698753357, -0.22851741313934326, -0.5391224026679...
I am trying to pass a structure from C# into C++ library. I pass structure as an object, and C++ function expects it as a pointer (void \*). I am having problem passing the structure. ``` [DllImport("MockVadavLib.dll", CharSet = CharSet.Ansi)] public static extern IntPtr TheFunction([MarshalAs(UnmanagedType.LPStruct...
[ 0.047042641788721085, 0.3237173855304718, 0.3618079125881195, -0.2559252381324768, 0.1749057024717331, -0.19814777374267578, 0.32226479053497314, -0.7440991401672363, -0.21170708537101746, -0.5957356095314026, -0.016668671742081642, 0.3931136727333069, -0.4379712641239166, 0.17748609185218...
C++ function: ``` MOCKVADAVLIB_API tVDACQ_CallBackRec * TheFunction(void * userParams) {... ``` Try passing the structure as a ref parameter. ``` [DllImport("MockVadavLib.dll", CharSet = CharSet.Ansi)] public static extern IntPtr TheFunction(ref UserRec userRec); ``` When you use a ref combined with a structure, ...
[ -0.04346441477537155, 0.18787676095962524, 0.7974019050598145, -0.36877599358558655, -0.16402779519557953, 0.11745665967464447, 0.2757520377635956, -0.4490487277507782, -0.0505000576376915, -0.49017906188964844, -0.4223700165748596, 0.5904666781425476, -0.5176281332969666, 0.16459847986698...
I am looking for a way to create a `<ul>` of items that I can put within a `<div>` and have them show up side-by-side and wrap to the next line as the browser window is resized. For example, if we have 10 items in the list that currently show 5 items on the first row and 5 items on the second row, as the user makes t...
[ 0.32245558500289917, -0.20439393818378448, 0.6306940913200378, 0.0013198135420680046, -0.2289038598537445, 0.43985679745674133, 0.11449506878852844, 0.026897218078374863, -0.49052485823631287, -0.8743959069252014, 0.042106300592422485, 0.2015864998102188, 0.03260527923703194, 0.49466198682...
tiles/icons/thumbnails view. I am able to create the `<li>`'s I want as far as the size, color, content, etc. I am just having trouble with the wrapping/clearing/etc. part. Give the `<li>` float: left (or right) They will all be in the same line until there will be no more room in the container (your case, a `<ul>`). ...
[ 0.27953779697418213, -0.11211338639259338, 0.5485658645629883, 0.11268411576747894, 0.15549932420253754, 0.15448911488056183, -0.08317206054925919, -0.027742095291614532, -0.2645522654056549, -1.0686407089233398, -0.08981224149465561, -0.0026350105181336403, 0.04690394550561905, 0.01668865...
I want to have java script clicking a link on the page..I found something on the net that suggests adding a function like this: ``` function fireEvent(obj,evt){ var fireOnThis = obj; if( document.createEvent ) { var evObj = document.createEvent('MouseEvents'); evObj.initEvent( evt, true, false ); ...
[ 0.13788525760173798, 0.02269109897315502, 0.5637034177780151, -0.4123494327068329, 0.24883681535720825, 0.0567069947719574, 0.5171826481819153, -0.3216817378997803, 0.09442166984081268, -0.7861354351043701, -0.017675718292593956, 0.9162732362747192, -0.46462178230285645, -0.094174116849899...
you still need to call document.createEventObject -- you only checked that it's there. Untested code follows, but based on the [docs](http://msdn.microsoft.com/en-us/library/ms531020(VS.85).aspx) it should work. ``` function fireEvent(obj,evt){ var fireOnThis = obj; if( document.createEvent ) { var evOb...
[ 0.0011735655134543777, 0.1779932826757431, 0.6661717891693115, -0.35008421540260315, 0.6109215021133423, 0.004779315087944269, 0.6182605624198914, -0.45897969603538513, 0.04541102796792984, -0.578274667263031, -0.4020046293735504, 0.8944398164749146, -0.17994292080402374, -0.14579567313194...
I've been using CodeIgniter for some time, and I liked it a lot. It looks like I need to move to Kohana though, because my other team member needs our code to fully use PHP5 features to their fullest extent. The problem is we have already coded over half of our project in CodeIgniter. Has anyone transferred code from C...
[ 0.4400255084037781, 0.1267666518688202, 0.02914401888847351, -0.051000382751226425, -0.34950870275497437, -0.12454241514205933, 0.2759076952934265, -0.08055879175662994, -0.30586162209510803, -0.5282994508743286, 0.12589135766029358, 0.27995723485946655, 0.17753730714321136, 0.112274147570...
done this before ? Perhaps someone could point me some links? Yes, I think it is possible to do, but I don't know how long it'll take. I guess we're gonna keep this project as a CodeIgniter one, and move to Kohana as soon as our next project comes. Thanks for everything! ~~See Kohana's documentation - [Migrating from C...
[ 0.4050324559211731, 0.13450831174850464, 0.09786117821931839, -0.1652936190366745, -0.14531005918979645, 0.04074833542108536, 0.16780036687850952, 0.0733933225274086, -0.4395802915096283, -0.8493832349777222, 0.06709299236536026, 0.19905930757522583, 0.1542055904865265, 0.3316173255443573,...
I'd like to test my knowledge in EJB, making an small application. Could you give me some ideas for doing with EJB? Try to play with the code example of [EJB in Action](http://www.manning.com/panda/). You can find the source [here](http://www.manning.com/panda/). The source is available for JBoss, Glassfish, OracleAS. ...
[ 0.5825579762458801, 0.05300372838973999, 0.015412440523505211, -0.04978049173951149, -0.3972402513027191, -0.17599254846572876, 0.08176828920841217, 0.3912299871444702, -0.6263095736503601, -0.5894304513931274, 0.12866432964801788, 0.6409733295440674, -0.16462834179401398, -0.3853611052036...
I need to write a **bash script**, and would like it to parse **unordered parameters** of the format: ``` scriptname --param1 <string> --param2 <string> --param3 <date> ``` Is there a simple way to accomplish this, or am I pretty much stuck with $1, $2, $3? You want [getopts](http://bash-hackers.org/wiki/doku.php/ho...
[ 0.4724672734737396, 0.18556703627109528, 0.30321136116981506, 0.18676026165485382, 0.19271047413349152, -0.11050128936767578, 0.25394877791404724, -0.2914615571498871, -0.4691900908946991, -0.5093187689781189, -0.2734766900539398, 0.7609894275665283, -0.051885075867176056, -0.2536867260932...
I am working on a project that uses a queue that keeps information about the messages that need to be sent to remote hosts. In that case one thread is responsible for putting information into the queue and another thread is responsible for getting information from the queue and sending it. The 2nd thread needs to check...
[ 0.11735308915376663, 0.04194866120815277, 0.2322641760110855, 0.24673449993133545, -0.1367638260126114, -0.20202486217021942, 0.23082588613033295, 0.002013400662690401, -0.4096468985080719, -0.5209751129150391, 0.08404728770256042, 0.32950934767723083, -0.4831632971763611, 0.36365777254104...
of the code, Any special tricks etc ) The main advantage is that a `BlockingQueue` provides a correct, thread-safe implementation. Developers have implemented this feature themselves for years, but it is tricky to get right. Now the runtime has an implementation developed, reviewed, and maintained by concurrency expert...
[ 0.14783281087875366, -0.032075434923172, 0.1299019753932953, 0.2038569152355194, -0.04248378053307533, 0.042632680386304855, 0.2839544117450714, 0.07655801624059677, -0.49934110045433044, -0.30490976572036743, -0.13151584565639496, 0.22213736176490784, -0.5137472748756409, 0.34208798408508...
the queue, the main advantage is simplicity; waiting forever is trivial, and correctly waiting for a specified time-out is only a little more complicated.
[ 0.07712674885988235, -0.4495709538459778, 0.2051514983177185, 0.307205468416214, 0.13255652785301208, 0.13684706389904022, 0.09506550431251526, 0.06440626084804535, -0.40382102131843567, -0.45423752069473267, 0.020240770652890205, 0.36451226472854614, -0.18169759213924408, -0.0063462569378...
If I have a sprite, with which I have drawn some stuff, how do I erase part of what I have drawn? Preferably I could use `drawRect()` with some "alpha=0" paint. However, I don't believe the `beginFill()` method lets you set an RGBA color (like you can in `bitmapData`). Setting `alpha = 0` in the graphics method of `be...
[ 0.12116393446922302, 0.03711025416851044, 0.3379685580730438, 0.010233576409518719, -0.15440741181373596, -0.024344278499484062, 0.462965190410614, -0.1255718171596527, -0.03209159895777702, -0.5516912937164307, 0.12779131531715393, 0.5905337929725647, -0.20698605477809906, 0.2364066988229...
erasing could mean that you draw over something you've already drawn with the background color, I'm guessing you're hoping to "draw transparency" back onto the Graphics object. Drawing with an alpha of 0 is not drawing "nothing" - you just don't see what you draw because it is fully transparent. This is what you get f...
[ 0.3830696940422058, -0.014259235002100468, 0.04566018283367157, 0.22581791877746582, -0.20775462687015533, -0.027708668261766434, 0.07133137434720993, 0.2170637995004654, -0.2658764719963074, -0.6124011874198914, 0.10782664269208908, 0.13415805995464325, -0.5640404224395752, 0.472875833511...
functionality, though you could certainly write your own functions to do it. :P One workaround is to use bitmaps instead: <http://www.actionscript.org/forums/showthread.php3?t=187857> <http://www.actionscripts.org/forums/showthread.php3?t=149021> Another is to consider whether you could implement what you're tr...
[ 0.11924264580011368, -0.34384703636169434, 0.3000103533267975, -0.019780760630965233, 0.009890340268611908, 0.030430283397436142, 0.45622193813323975, -0.6314570307731628, -0.45215851068496704, -0.1230592355132103, -0.2588859498500824, 0.5031221508979797, -0.5691381692886353, -0.4386442005...
I was working with Python with a [Linux terminal screen](http://www.rackaid.com/resources/linux-tutorials/general-tutorials/using-screen/). When I typed: ``` help(somefunction) ``` It printed the appropriate output, but then my screen was stuck, and at the bottom of the terminal was "(end)". How do I get unstuck? ...
[ -0.04463901370763779, 0.20459599792957306, 0.12678931653499603, -0.1489805281162262, 0.2121349573135376, 0.028772369027137756, 0.4197986423969269, 0.30996307730674744, -0.181012362241745, -0.4686167538166046, -0.10675117373466492, 0.4184569716453552, -0.23428885638713837, 0.295621931552886...
I'm trying to set up a [KMZ](http://en.wikipedia.org/wiki/KML) file for use in Google Earth where the balloon contents are mostly defined in HTML files, which are embedded using iframes. The setup works with a plain KML file and the extra HTML files when using relative links on the local filesystem (assuming filesystem...
[ 0.6526808738708496, 0.16558802127838135, 0.5067243576049805, 0.19620727002620697, -0.13051177561283112, -0.200649231672287, -0.3404790461063385, 0.1423274725675583, -0.2863292396068573, -0.5899666547775269, -0.024382667616009712, 0.024228746071457863, -0.24795904755592346, -0.1104543432593...
other documentation on KMZ either. Is it possible to link to other HTML files within a KMZ? If yes: how? I think that the best solution is to extract main logic from Program class. The Program class is some kind of starter for primary work. And providing wrappers for SqlConnections is not a good idea indeed, because t...
[ -0.06234853342175484, -0.007883911952376366, 0.2533912658691406, 0.32389137148857117, 0.18722225725650787, -0.23045635223388672, 0.23880928754806519, -0.1423274725675583, -0.12914718687534332, -0.728722333908081, -0.13561129570007324, 0.4529285728931427, -0.3847234845161438, 0.056482911109...
internal void Execute() { // do whatever you want doDatabaseWork(); // do whatever you want } public void Dispose() { if (_sourceConnection != null) _sourceConnection.Dispose(); if (_destinationConnection != null) _destinationConnection.Di...
[ 0.5588551163673401, -0.1730748564004898, 0.1625509113073349, -0.28322920203208923, 0.5529698729515076, 0.021147772669792175, 0.30135253071784973, -0.2702111005783081, -0.06337198615074158, -0.4194709062576294, -0.34656450152397156, 0.613090991973877, -0.3691619336605072, 0.2107972055673599...
} private void setUpConnections(string sourceConnectionString, string destinationConnectionString) { _sourceConnection = new SQLiteConnection(sourceConnectionString); _destinationConnection = new SQLiteConnection(destinationConnectionString); } private void doDatabaseWork() { ...
[ 0.12883132696151733, -0.12177067250013351, 0.3509073853492737, -0.15016226470470428, 0.4368460476398468, 0.08163498342037201, 0.3645677864551544, 0.010765548795461655, -0.3572976589202881, -0.6073336601257324, -0.3406001031398773, 0.5263638496398926, -0.4798624813556671, 0.4163422882556915...
// get connection strings from command line arguments string sourceConnectionString = GetConnectionString(args); string destinationConnectionString = GetConnectionString(args); using (ProgramCore core = new ProgramCore(sourceConnectionString, destinationConnectionString)) { ...
[ -0.258055716753006, -0.35026392340660095, 0.40285077691078186, -0.05065736547112465, 0.30705419182777405, 0.19272834062576294, 0.2859022915363312, -0.29891321063041687, -0.14898492395877838, -0.5699192881584167, -0.28417423367500305, 0.440708190202713, -0.5115036964416504, 0.21975928544998...
} } ```
[ 0.17493881285190582, 0.41805654764175415, 0.05209751054644585, -0.04864929988980293, 0.437467485666275, -0.15825650095939636, 0.13202530145645142, 0.5446501970291138, 0.35430577397346497, -0.4846813380718231, -0.2295716553926468, 0.546978771686554, -0.3188462555408478, 0.2798506021499634, ...
Using Forms Authentication in ASP.NET MVC when trying to log back into a site, it puts a ReturnUrl parameter in the query string. My Logon action method accepts a "returnUrl" string. However it seems that returnUrl string is always null, even when it is clearly in the query string. Any thoughts on why this might be the...
[ 0.26716530323028564, -0.07604125142097473, 0.4847097098827362, -0.1375325620174408, -0.1355394721031189, -0.3757384121417999, 0.4037140905857086, -0.19457116723060608, -0.2402314394712448, -0.5621396899223328, -0.05163940042257309, 0.31826716661453247, -0.41887685656547546, -0.095964215695...
The description of CoLoadLibrary() says it does pretty much the same as LoadLibraryEx() - loads a DLL into the process. COM classes creation functions - CoCreateInstance() and CoGetClassObject() - both do load the necessary DLL into the process too. Then why is CoLoadLibrary() needed in the first place and how should ...
[ -0.27257758378982544, -0.20711687207221985, 0.7790210843086243, -0.20755915343761444, 0.1319722831249237, 0.08750192821025848, 0.04431753605604172, -0.3560790419578552, -0.07565834373235703, -0.5658066272735596, -0.16301564872264862, 0.5849167704582214, -0.5663022398948669, 0.0041469265706...
8 ``` So it just calls: ``` LoadLibraryEx( FileName, NULL, LOAD_WITH_ALTERED_SEARCH_PATH ). ``` Presumably, the routine merely exists for backwards compatibility -- it probably has its roots in Win16.
[ 0.024215230718255043, 0.35359957814216614, 0.25966066122055054, -0.39992421865463257, 0.10136734694242477, -0.4211621582508087, 0.031916435807943344, 0.1494792252779007, -0.22722108662128448, -0.13534051179885864, -0.2824895679950714, 0.5960184335708618, -0.7726879715919495, 0.005652840249...
**Can 2 or more equations defining a function in Haskell share the same where / let block?** Let me present a contrived example to illustrate the question. First, consider the following code as a starting point: ``` someFunction v1 v2 v3 = difference ^ v3 where difference = v1 - v2 ``` So far, so good. B...
[ 0.06889437884092331, -0.09058013558387756, 0.264438271522522, -0.2411881685256958, -0.29516923427581787, -0.035117436200380325, 0.15024645626544952, -0.14030645787715912, 0.05771295726299286, -0.30670657753944397, 0.05238675698637962, 0.48603323101997375, -0.30163007974624634, -0.148566499...
v1 v2 99 | difference < 4 = 0 someFunction v1 v2 v3 = difference ^ v3 where difference = v1 - v2 ``` However, that won't work because the first equation for someFunction and the second equation for someFunction are not both sharing the same where block. This is not a big deal in this contrived example becaus...
[ 0.031634338200092316, 0.07278354465961456, 0.7733951807022095, -0.1714177131652832, -0.3750542104244232, 0.1460886001586914, 0.3338402211666107, -0.6021272540092468, -0.0033625278156250715, -0.26719197630882263, 0.017613090574741364, 0.6214360594749451, -0.3835870921611786, 0.1635712236166...
this by using guards and having only one equation. The question is, is there a way for multiple *equations* to share the same where / let clause? Because it seems desirable to have multiple equations with different patterns instead of being forced to have just one equation with many guards. One option would be to lift ...
[ 0.10884252190589905, -0.2485027015209198, 0.32693368196487427, -0.024832718074321747, -0.3330751359462738, 0.14094895124435425, 0.4499052166938782, -0.8529202938079834, -0.01006622426211834, -0.393187016248703, -0.007528556510806084, 0.3495941460132599, -0.5775920152664185, 0.1473481059074...
difference = v1 - v2 ```
[ -0.21024136245250702, 0.12591277062892914, 0.5004626512527466, -0.19989654421806335, -0.23683711886405945, -0.0501796193420887, 0.2310686856508255, -0.4453730583190918, -0.12221750617027283, -0.4544592797756195, 0.24586604535579681, 0.5187572240829468, -0.159484401345253, 0.073191821575164...
I set the div's css ``` height:130px; overflow:hidden; ``` I want an animation from current height to origin height like [this](https://rads.stackoverflow.com/amzn/click/com/0814473830) , but I can't get the origin height.one posible way is after dom loaded , store the height in js,like this ``` $(function(){ $...
[ 0.12786553800106049, -0.07606203854084015, 0.7180782556533813, -0.03833809494972229, 0.1013220027089119, 0.05993368849158287, 0.12505047023296356, -0.49199149012565613, 0.012883895076811314, -0.5203752517700195, -0.19822628796100616, 0.5030066967010498, 0.05855022743344307, 0.0537845678627...
Can this be done? It seems like this should be possible. In general, I want the whole panel (div) to flow as you would usually expect within the body. However, I'd like to absolutely position the controls within the panel. My experience is that when I try to absolutely position a control within a flow panel, the con...
[ 0.44046664237976074, -0.10727818310260773, 0.5020980834960938, 0.20485469698905945, 0.1293979287147522, -0.01736621931195259, -0.20447933673858643, -0.22425757348537445, -0.10075452923774719, -0.6417739391326904, 0.1835402101278305, 0.45277854800224304, 0.054412610828876495, -0.02305543981...
I expect responses saying it would be a bad thing. Comments? Change the CSS 'position' property of the `<div>` to 'relative'. If your HTML looks like: ``` <body> <div id="container"> <a id="control">start</a> </div> </body> ``` then update the CSS to: ``` #container { position: relative; } #con...
[ -0.10940037667751312, -0.16443127393722534, 0.5800498127937317, -0.017368748784065247, -0.13327738642692566, 0.13883884251117706, -0.1247185692191124, 0.1833205670118332, -0.2013138085603714, -0.9495841264724731, -0.2147335708141327, 0.5140281319618225, -0.19713827967643738, 0.060899287462...
I'm compiling some code which uses libcurl on a Debian Linux system. My dev machine is running Debian 5 but I want the binary to be usable on older Debian 4 systems too. I find that if I specify **-lcurl** it will link to libcurl.so.4 but Debian 4 systems only have libcurl.so.3 Is there some way I can tell GCC to lin...
[ 0.29038217663764954, -0.050045195966959, 0.47779977321624756, -0.052563853561878204, -0.11483919620513916, -0.22389569878578186, -0.11494515836238861, 0.31630098819732666, -0.14594601094722748, -0.7667809128761292, -0.07040822505950928, 0.36868005990982056, -0.49202898144721985, 0.27336484...
to do what you want.
[ 0.6821361780166626, 0.10356403142213821, -0.2913992404937744, 0.07660382986068726, -0.3790125548839569, -0.07890626788139343, 0.35258474946022034, -0.08647769689559937, -0.3189789354801178, -0.3113449513912201, -0.14121279120445251, 0.5373165011405945, -0.49468177556991577, -0.377924174070...
I have a question about whether or not a specific way of applying of the DRY principle is considered a good practice in Haskell.I'm going to present an example, and then ask whether the approach I'm taking is considered good Haskell style. **In a nutshell, the question is this: when you have a long formula, and then yo...
[ 0.617637574672699, 0.026042522862553596, -0.2061673402786255, -0.1256047934293747, 0.02797180786728859, -0.1537308692932129, 0.15138204395771027, 0.10704763978719711, -0.02662847563624382, -0.27656614780426025, 0.08646216988563538, 0.4447704553604126, -0.21267367899417877, 0.08237891644239...
digits, and converting that string into its corresponding Int value. (BTW, this is an exercise from "Real World Haskell"). Here's a solution that works except that it ignores edge cases: ``` asInt_fold string = fst (foldr helper (0,0) string) where helper char (sum,place) = (newValue, newPlace) where ...
[ -0.7258884310722351, -0.17874376475811005, 0.5739653706550598, -0.3354407250881195, 0.04259080812335014, 0.2875293791294098, 0.05969644710421562, -0.37547218799591064, -0.10011139512062073, -0.4858940839767456, -0.29651615023612976, 0.3957228362560272, -0.1724950671195984, -0.1935826838016...
far. So far so good. Now, when I went to implement the edge case checks, I found that I needed little portions of the "newValue" formula in different places to check for errors. For example, on my machine, there would be an Int overflow if the input was larger than (2^31 - 1), so the max value I could handle is 2,147...
[ -0.1775028556585312, 0.06308335065841675, 0.515340268611908, -0.14419101178646088, 0.4122048616409302, 0.3493364155292511, 0.24153834581375122, -0.016972171142697334, -0.269511342048645, -0.818254292011261, 0.021815549582242966, 0.3605474531650543, 0.21503563225269318, 0.3434167206287384, ...
error. Those 2 checks caused me to repeat part of the formula, so I introduced the following new variables: * digitValue = digitToInt char * newPlaceComponent = (10^place) \* digitValue *The reason I introduced those variables is merely an automatic application of the DRY principle:* I found myself repeating those p...
[ 0.0062436433508992195, 0.01729302853345871, 0.14019858837127686, -0.18929626047611237, -0.17620332539081573, 0.03398417681455612, 0.4302670955657959, 0.15035460889339447, -0.35031718015670776, -0.5271650552749634, 0.1941564977169037, 0.5369710326194763, -0.24754060804843903, -0.08340131491...
style, and do you follow this practice, or not? Why / why not?** And for what it's worth, here's my final solution that deals with a number of edge cases and therefore has quite a large where block. You can see how large the block became due to my application of the DRY principle. Thanks. ``` asInt_fold "" = error "...
[ -0.10739562660455704, -0.07867561280727386, 0.38390329480171204, 0.0037128203548491, -0.27913808822631836, -0.14041352272033691, 0.4848162829875946, -0.3560889661312103, -0.3908286690711975, -0.7370868921279907, -0.02840798906981945, 0.6119614839553833, -0.05916154012084007, -0.28914985060...
helper (0,0) string) where helper char (sum,place) | place == 9 && digitValue > 2 = throwMaxIntError | maxInt - sum < newPlaceComponent = throwMaxIntError | otherwise = (newValue, newPlace)
[ -0.6558941006660461, -0.1645614057779312, 0.6020570993423462, -0.18363478779792786, 0.4241415560245514, 0.35415706038475037, 0.38028019666671753, -0.49433034658432007, 0.13444064557552338, -0.37794822454452515, -0.4760627746582031, 0.40117356181144714, -0.14921626448631287, -0.015803359448...
where digitValue = (digitToInt char) placeMultiplier = (10 ^ place) newPlaceComponent = placeMultiplier * digitValue newValue = newPlaceComponent + sum newPlace = place +
[ -0.7726156711578369, -0.07062791287899017, 0.5331026911735535, -0.036125052720308304, 0.2229505181312561, 0.5230899453163147, 0.01901363581418991, -0.1478290557861328, -0.24727094173431396, -0.6454401016235352, -0.38697880506515503, -0.22422976791858673, 0.1091868206858635, 0.1507485061883...
1 maxInt = 2147483647 throwMaxIntError = error "The value is larger than max, which is 2147483647" ``` As noted by `bdonlan`, your algorithm could be cleaner---it's especially useful that the language itself detects overflow. As for your code itself and the style, I...
[ 0.26215043663978577, 0.06579817086458206, -0.01342558953911066, 0.06553559005260468, 0.3511483073234558, -0.12420694530010223, 0.4830787479877472, -0.14063866436481476, 0.01059653889387846, -0.4180872142314911, -0.07545880228281021, 0.7768018245697021, -0.10382216423749924, 0.1821779906749...
imposes a small cognitive burden on the reader**. When to name an intermediate result becomes a judgment call. I personally would not have chosen to name `placeMultiplier`, as I think the intent of `place ^ 10` is much clearer. And I would look for `maxInt` in the Prelude, as you run the risk of being terribly wrong i...
[ -0.10857929289340973, 0.45377498865127563, 0.043514009565114975, 0.03259815648198128, 0.1140618696808815, 0.10926148295402527, 0.678567111492157, 0.4681955575942993, 0.1363918036222458, -0.7245346307754517, -0.4169297516345978, 0.040792565792798996, 0.08629646897315979, -0.1087624132633209...
code, and I have read perhaps two or three times that. I also have ten times that much experience with the ML family of languages, which require the programmer to make similar decisions.)
[ 0.3154045045375824, 0.3223037123680115, -0.14755301177501678, 0.17085762321949005, 0.022295791655778885, 0.27991336584091187, 0.5393835306167603, 0.046973347663879395, -0.013272108510136604, -0.6260565519332886, -0.21055182814598083, 0.6555653214454651, -0.2866620719432831, -0.453251928091...
Right now I have this SQL query which is valid but always times out: ``` SELECT ( SELECT (MAX(WP_ODOMETER) - MIN(WP_ODOMETER)) / DATEDIFF(DAY, MIN(WP_DATETIME), MAX(WP_DATETIME)) FROM WAYPOINTS WHERE WP_DATETIME BETWEEN DATEADD(DAY,-14,GETDATE()) AND GETDATE() AND WP_VTDID = 'L088' ) AS MAXD, ( SELECT MAX(WP_ODOMETE...
[ -0.008554057218134403, -0.0548524335026741, 0.6638224720954895, 0.22910825908184052, 0.011235112324357033, 0.4048088788986206, 0.10989771038293839, -0.2795739471912384, -0.23042404651641846, -0.6131435632705688, -0.04719635844230652, 0.35052764415740967, 0.12674231827259064, 0.440310478210...
them: ``` SELECT MAX(WP_ODOMETER), (MAX(WP_ODOMETER) - MIN(WP_ODOMETER)) / DATEDIFF(DAY, MIN(WP_DATETIME), MAX(WP_DATETIME)) FROM WAYPOINTS WHERE WP_DATETIME BETWEEN DATEADD(DAY,-14,GETDATE()) AND GETDATE() AND WP_VTDID = 'L088' ``` An index on WP\_VTDID, WP\_DATETIME can speed this up. You could also include WP\_...
[ 0.11783267557621002, -0.012057277373969555, 0.8967059850692749, -0.026045382022857666, 0.31876546144485474, 0.22399534285068512, 0.016050899401307106, -0.24565640091896057, -0.27045679092407227, -0.6984928250312805, -0.27546823024749756, 0.48042067885398865, -0.12601250410079956, 0.1505362...
I am trying to set up a subdomain on my website but i am having a hard time getting it to work. Especially since the only way i can test it is by sending all the files needed from my development machine to the hosting server (and sometimes breaking the website). i am using asp.net on an IIS7 servers Is there an easy w...
[ 0.5305792093276978, 0.19555360078811646, 0.4714793264865875, -0.01983887515962124, -0.0361410491168499, -0.2655005156993866, 0.19333674013614655, 0.2955595552921295, -0.2729715406894684, -0.7908567786216736, -0.0077257719822227955, 0.24865461885929108, -0.3132152557373047, 0.58842903375625...
subdomain.testdomain.com ``` The question was about ASP.NET and IIS, so I assumed Windows, but just in case anybody reads this that wants to know the Linux equivalent, you'll want to edit the file "/etc/hosts", and add a line of the same format. **Very important note:** If you redirect the real domain name to your l...
[ 0.7214608192443848, -0.33305656909942627, 0.3289983570575714, 0.16571159660816193, -0.023519089445471764, -0.6667440533638, 0.43570414185523987, 0.44064316153526306, -0.0868753120303154, -0.6184983849525452, 0.059179436415433884, 0.044642236083745956, -0.42814210057258606, 0.51876831054687...
Say I have a class definition: ``` class CustomClass { int member; }; ``` Why is the following variable definition compiling and working correctly: ``` CustomClass CustomClass; // the variable is properly constructed ``` Should't this confuse the compiler and cause it to indicate an error? Class names and var...
[ 0.19972354173660278, -0.017095671966671944, 0.17217230796813965, -0.11895546317100525, -0.08308102190494537, -0.023857522755861282, 0.14495833218097687, -0.22055679559707642, -0.12443618476390839, -0.5137510895729065, 0.07580022513866425, 0.7276846766471863, -0.19181039929389954, 0.1223999...
I saw something in the framework to create a regular shortcut, but not a My Network Place shortcut to a file in a Sharepoint site on our intranet. I found a kludge, but it doesn't always work for all folder names, not sure where it is failing. The kludge reverse engineers an existing shortcut rather than using a funct...
[ 0.340721994638443, -0.07796605676412582, 0.03897393122315407, 0.0671338215470314, 0.18227097392082214, 0.15030933916568756, 0.4211755692958832, 0.3341982364654541, -0.17826499044895172, -0.3741428256034851, 0.08029431849718094, 0.06106641888618469, -0.30051472783088684, 0.09167972207069397...
I've had some success comparing strings using the PHP [levenshtein](http://us2.php.net/levenshtein) function. However, for two strings which contain substrings that have swapped positions, the algorithm counts those as whole new substrings. For example: ``` levenshtein("The quick brown fox", "brown quick The fox"); ...
[ 0.2760846018791199, -0.16257165372371674, -0.2923661768436432, -0.2180665284395218, -0.24321022629737854, 0.6336333751678467, 0.18814510107040405, 0.2758880853652954, -0.2709611654281616, -0.7333932518959045, 0.09489429742097855, 0.3742224872112274, -0.19421899318695068, 0.0885209739208221...
all the words in the string into alphabetical order, before the comparison. That takes the original order of the words completely out of the comparison. A downside to this, however, is that changing just the first letter of a word can create a much bigger disruption than a changing a single letter should cause. What I...
[ 0.41875332593917847, -0.011819638311862946, -0.07407266646623611, 0.2527048885822296, 0.10434325039386749, 0.058833155781030655, 0.13898137211799622, 0.27882543206214905, -0.25036394596099854, -0.6994287371635437, 0.07831951230764389, 0.23242126405239105, -0.14647126197814941, 0.0649545043...
records may have the same school spelled differently, words in a different order, extra words, etc, so the matching has to be somewhat fuzzy if we are to make a good guess that they refer to the same school. So-far it is working very well for spelling errors (I am using a phoenetic algorithm similar to metaphone on top...
[ 0.5468827486038208, 0.3007192313671112, -0.009431879036128521, 0.3351079225540161, 0.05693987011909485, 0.24622000753879547, -0.03838162496685982, 0.13280363380908966, -0.5660992860794067, -0.6057348847389221, 0.30266135931015015, -0.011032015085220337, 0.08390506356954575, 0.4435999989509...
split the two strings in question into all the possible 2-3 character substrings (n-grams) and treat the number of shared n-grams between the two strings as their similarity metric. This can be then normalized by dividing the shared number by the total number of n-grams in the longer string. This is trivial to calculat...
[ 0.41741466522216797, -0.37174904346466064, -0.04730224609375, -0.19341395795345306, -0.16849462687969208, 0.47196704149246216, 0.3913804888725281, 0.13416805863380432, -0.6923983097076416, -0.5099900364875793, -0.12449786067008972, 0.041724707931280136, -0.38572216033935547, 0.067793890833...
tf-idf and cosine similarity A not so trivial alternative, but grounded in information theory would be to use term [term frequency–inverse document frequency (tf-idf)](https://en.wikipedia.org/wiki/Tf%E2%80%93idf) to weigh the tokens, construct sentence vectors and then use [cosine similarity](https://en.wikipedia.org...
[ -0.07210585474967957, -0.1206149086356163, 0.2887648046016693, 0.12648919224739075, -0.4792768061161041, 0.26609450578689575, -0.15175729990005493, -0.5911043286323547, -0.06365389376878738, -0.7501180171966553, -0.0845165103673935, 0.4315569996833801, -0.1726415753364563, 0.09646575897932...
(log(3/3)=0). ![idf formula](https://i.stack.imgur.com/Y6qe7.png) 3. Produce the tf-idf matrix by multiplying corresponding cells in the tf and idf tables. ![tfidf](https://i.stack.imgur.com/yfEzMm.png) 4. Finally, calculate cosine similarity matrix for all sentence pairs, where A and B are weights from the tf-idf tabl...
[ -0.10516534000635147, 0.051332052797079086, 0.4444209337234497, -0.07666746526956558, -0.26994648575782776, 0.387820303440094, 0.33189326524734497, -0.6982409954071045, 0.10691669583320618, -0.544282078742981, -0.16171880066394806, 0.5594820976257324, -0.19075073301792145, -0.0685893893241...
I'm trying to get the values from a pointer to a float array, but it returns as c\_void\_p in python The C code ``` double v; const void *data; pa_stream_peek(s, &data, &length); v = ((const float*) data)[length / sizeof(float) -1]; ``` Python so far ``` import ctypes null_ptr = ctypes.c_void_p() pa_stream_pee...
[ 0.1388946771621704, 0.10645699501037598, 0.274178147315979, -0.23305900394916534, -0.08119808882474899, 0.2228676825761795, 0.4158586263656616, -0.20706281065940857, -0.10887188464403152, -0.5505979061126709, -0.027240075170993805, 0.7004238367080688, -0.39347633719444275, -0.0916630178689...
I am looking for the simplest php framework that comes integrated with dojo. I do not need MVC or to learn a giant framework all over again. Does anyone have suggestions or examples? "the simplest PHP framework" does not tell us at all what you're looking for. To field a guess, however, I'd still say Zend is the best ...
[ 0.21822738647460938, 0.14857424795627594, 0.025017838925123215, 0.08911316096782684, -0.24116156995296478, -0.38155850768089294, 0.3049202561378479, 0.08651001006364822, -0.139371857047081, -0.5450127720832825, 0.1314430832862854, 0.622615396976471, -0.25443199276924133, -0.125046625733375...
Considering the code: ``` <noscript><div>FOO</div></noscript> ``` Running ``` $('noscript').html(); ``` returns `&lt;div&gt;FOO&lt;/div&gt;` but running ``` $('noscript').text(); ``` returns the raw html. This is the opposite of what I was expecting. Is there an explanation for this? This more of a DOM quirk...
[ -0.17725498974323273, -0.01956777460873127, 0.2991538941860199, -0.11594285815954208, -0.16125205159187317, 0.04890287294983864, 0.47533243894577026, -0.5350342988967896, 0.022016432136297226, -0.3702375590801239, -0.0829303190112114, 0.6139551401138306, -0.31586217880249023, -0.0693440809...
I have to display Datetime in my gridview, the problem is that while I am inserting values to the database, for default date I am passing "1/1/1900", so when retrieving the data I found the value "01/01/1900 12:00:00 AM" in gridview. If the datetime is "01/01/1900 12:00:00 AM" I want it as a null value or the corresp...
[ 0.11438079923391342, 0.1300227791070938, 0.4120997488498688, -0.0766366496682167, 0.16473568975925446, -0.03085855208337307, 0.19714604318141937, -0.03406457230448723, -0.20495793223381042, -0.8362095355987549, 0.225342258810997, 0.330416738986969, -0.07602396607398987, 0.5189273357391357,...
END AS DateField FROM Wherever ```
[ 0.5041661262512207, 0.29354819655418396, 0.5062540769577026, -0.1046476885676384, 0.1462409943342209, -0.17506945133209229, 0.10928786545991898, 0.629200279712677, 0.07148700207471848, -0.436724990606308, -0.5883904099464417, -0.24168504774570465, 0.2895386815071106, 0.49992436170578003, ...
Mine is this: > Hard coding is the way! All my problems go away. Just code it one by one. And problems come back kill your day. I absolutely hated it but the fact is "business people" tend to like it because it takes less time to get what they wanted. And as a software developer especially working in a corporate envi...
[ 0.6384804248809814, 0.5117908120155334, -0.24586734175682068, 0.1490139663219452, -0.3439200520515442, 0.02466496266424656, 0.3144942820072174, 0.4896771013736725, 0.1057509034872055, -0.6033003926277161, 0.012241298332810402, 0.815775454044342, -0.20867586135864258, 0.12511871755123138, ...
[portability](http://en.wikipedia.org/wiki/Software_portability) of your code in a great extent. Even with a platform independant languages you will not able to say "Compile once, Run anywhere". Since it is not a good software engineering practice, I think avoiding hardcodes is better. But I know in some cases we need...
[ 0.3430316746234894, 0.3772851228713989, -0.059551432728767395, 0.34717893600463867, 0.2107798010110855, -0.4109702706336975, 0.46726715564727783, 0.26638540625572205, -0.16107305884361267, -0.6193031072616577, -0.29867684841156006, 0.6396973133087158, -0.28254592418670654, 0.26207157969474...
they can increase the attack surface. But I think it is a rare case.
[ 0.4253096580505371, 0.3850191533565521, 0.1882268488407135, -0.02122299000620842, -0.12290465831756592, -0.31351009011268616, 0.5548509955406189, 0.020112372934818268, -0.18030807375907898, -0.6616963148117065, 0.21883821487426758, 0.5673978328704834, 0.2493041753768921, -0.126192107796669...
I have a simple code below: ``` import java.util.ArrayList; public class BoidList extends ArrayList { synchronized public Boid GetBoid( int idx_ ) throws ArrayIndexOutOfBoundsException { if( idx_ < super.size() && idx_ >= 0 ) { return (Boid) super.get(idx_); } else { throw...
[ 0.08349703997373581, -0.17133767902851105, 0.3846987783908844, -0.5258821845054626, -0.007821967825293541, 0.07367831468582153, 0.2549724578857422, -0.7471743226051331, -0.12529318034648895, -0.4993862807750702, -0.06323891133069992, 0.6013196706771851, -0.651716947555542, -0.0177794620394...
super.size() && idx_ >= 0 ) { super.remove(idx_); } else { throw new ArrayIndexOutOfBoundsException(); } } } ``` There's a lot of similarity between the 2 methods, yet they do two different things. Is it possible to refactor this? ``` public class BoidList extends ArrayLi...
[ 0.14558711647987366, -0.38073408603668213, 0.41264963150024414, -0.3697057366371155, -0.051663629710674286, -0.14628966152668, 0.22249269485473633, -0.6039854288101196, -0.24518628418445587, -0.5402253270149231, -0.03263683244585991, 0.6189141869544983, -0.5441369414329529, 0.1001773625612...
0) { throw new ArrayIndexOutOfBoundsException(String.valueOf(idx)); } } synchronized public Boid getBoid(int idx) { checkIndex(idx); return super.get(idx); } synchronized public void removeBoid(int idx) { checkIndex(idx); super.remove(idx); } } ...
[ 0.36591601371765137, -0.15675100684165955, 0.34379616379737854, -0.2547389268875122, 0.14027293026447296, 0.016141606494784355, 0.29244422912597656, -0.4550725817680359, -0.010806804522871971, -0.18246342241764069, -0.19456076622009277, 0.568135142326355, -0.7216278314590454, 0.15187254548...
never declare to throws a RuntimeException since it is a programming error * follow java naming conventions (GetBoid -> getBoid, RemoveBoid -> removeBoid) * remove useless cast simply extending ArrayList **EDIT** you may also want to check the [CopyOnWriteArrayList](http://java.sun.com/j2se/1.5.0/docs/api/java/util/c...
[ 0.6347206830978394, 0.22473877668380737, 0.05334195867180824, -0.32229694724082947, 0.021554606035351753, -0.3481055200099945, 0.7138020396232605, -0.1574534773826599, -0.16476649045944214, -0.5044158101081848, -0.0790509432554245, 0.6654859185218811, -0.5666613578796387, -0.10937637835741...
I'm doing some attribute parsing as a string, so I need to know how spaces are used in HTML/XHTML element attributes: ``` <div id='myid' width='150px' /> ``` Is this also correct? ``` <div id = 'myid' width = '150px' /> ``` If anyone knows other ways of iterating through attributes and their values using Java...
[ 0.1468658447265625, 0.22591127455234528, 0.20825572311878204, 0.12588784098625183, -0.23433810472488403, -0.026649365201592445, -0.06366602331399918, -0.2823508083820343, -0.2330315113067627, -0.6346895694732666, -0.01145981252193451, 0.720506489276886, 0.19800052046775818, -0.017486205324...
I've seen any number of examples and they all seem to solve this problem differently. Basically I just want the simplest way to make the request that won't lock the main thread and is cancelable. It also doesn't help that we have (at least) 2 HTTP libraries to choose from, java.net.\* (such as HttpURLConnection) and o...
[ 0.033096615225076675, -0.15530899167060852, 0.3119947016239166, -0.02631957456469536, -0.33952492475509644, 0.24735578894615173, 0.25852110981941223, -0.30356845259666443, -0.14387968182563782, -0.6670618653297424, -0.41298073530197144, 0.46052855253219604, -0.5288670063018799, -0.18041239...
Blog](http://android-developers.blogspot.com/2009/05/painless-threading.html) gives the basic idea on how to use it: ``` public void onClick(View v) { new DownloadImageTask().execute("http://example.com/image.png"); } private class DownloadImageTask extends AsyncTask { protected Bitmap doInBackground(String... ...
[ 0.14112061262130737, -0.25667691230773926, 0.7561966180801392, 0.24966290593147278, 0.07236141711473465, -0.3144387900829315, 0.10704588890075684, 0.028326964005827904, -0.1529509723186493, -0.48969191312789917, -0.23050527274608612, 0.6708329319953918, -0.5086873769760132, 0.2061302214860...
for using the `java.net` or `org.apache.http` libraries for network access, it's up to you. I've found the `java.net` libraries to be quiet pleasant to use when simply trying to issue a `GET` and read the result. The `org.apache.http` libraries will allow you to do almost anything you want with `HTTP`, but they can be ...
[ 0.427023321390152, -0.19257748126983643, 0.11315681040287018, 0.48979678750038147, 0.06464512646198273, -0.12457319349050522, 0.24325303733348846, -0.04387009143829346, -0.0926487147808075, -0.7571612000465393, -0.24434128403663635, 0.8809998631477356, 0.10700642317533493, -0.1913800537586...
What happens when you call notifyAll method on an object that is not waiting? Should there be exception or is it normal situation? It is completely normal. You can only notify all that waiting on one single monitor. Everybody else is not interested. The object on which you call notifyAll is just the monitor on which ot...
[ 0.22151975333690643, -0.20163412392139435, 0.49928244948387146, 0.18595561385154724, 0.04210721701383591, -0.37687554955482483, 0.24045388400554657, -0.0418592132627964, -0.6049777269363403, -0.2878686785697937, -0.19727402925491333, 0.2513820230960846, -0.7430678009986877, 0.2107890397310...