text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
<input id="actualOccup" type="hidden" name="actualOccupval" value="" /> </div><!--ui-widget :: occup --> <input id="fbkurl" type="text" name="fan_fbk" value="e.g. SportsFan12" onFocus="clearText(this)" /><br />
[ 0.10146615654230118, -0.2905132472515106, 0.4233807623386383, 0.16286395490169525, -0.14124958217144012, -0.46198299527168274, -0.15321046113967896, 0.038705818355083466, -0.020575297996401787, -0.36890843510627747, -0.2991936206817627, 0.6370081901550293, -0.26475682854652405, -0.24342644...
<input id="twiturl" type="text" name="fan_twit" value="e.g. AboutSports2012" onFocus="clearText(this)" /><br /> <input id="phoNum" type="text" name="fan_pho" value="cell or home phone" onFocus="clearText(this)" /><br /> <input style="background-image:url('../../img/save.png');"...
[ 0.3493524491786957, -0.06044166162610054, 0.5980697274208069, -0.21482519805431366, -0.03622490540146828, -0.09215176105499268, 0.02021750621497631, -0.218550905585289, -0.12841089069843292, -0.7411534190177917, -0.4167337417602539, 0.34809958934783936, -0.25010207295417786, -0.41585418581...
form:* ``` $(document).ready(function() { $("form#FanDetail").submit(function() { // store the values from the form input box, then send via ajax below var bio = $('#bio').val(); var dob = $('#dob').val(); var zip = $('#actualZip').val(); var occup = $('#actualOccup').va...
[ 0.4019356071949005, -0.2607942521572113, 0.7652303576469421, -0.11251410096883774, 0.08809465169906616, 0.2532852590084076, 0.15817902982234955, -0.5846284627914429, 0.16239410638809204, -0.3596650958061218, -0.5611762404441833, 0.7679426670074463, -0.38558974862098694, -0.0820898115634918...
var phoNum = $('#phoNum').val(); $.post( "../../src/php/registration/about/submitvalues_about_tab.php", $("form#FanDetail").serialize(), function(){ $('form#FanDetail').hide(function(){
[ 0.5222375988960266, -0.24119842052459717, 0.8138395547866821, -0.12320684641599655, 0.3439311981201172, 0.2901468873023987, 0.1977081596851349, -0.32896688580513, -0.03340328112244606, -0.13279610872268677, -0.27821704745292664, 0.4994087219238281, -0.5678250789642334, 0.12013600021600723,...
$('div.success').fadeIn(); }); }); return false; }); }); ``` The PHP file I'm using is getting the `$fan_sess_id()` variable value right, but none of the other inputs are working. ``` try { $sth = null; #kill any possible previous connections /////////////...
[ 0.43235695362091064, -0.0868431106209755, 0.8215524554252625, -0.15656247735023499, 0.08621297031641006, -0.1408010870218277, 0.5717166066169739, -0.34772568941116333, -0.05449530482292175, -0.2613173723220825, -0.1508372277021408, 0.622769832611084, -0.31578123569488525, 0.322762787342071...
######## Get Input to Submit ############## // /////////////////////////////////////////////// $fanBio=$_POST['bio']; $fanDob=$_POST['dob']; $zipval=$_POST['zip']; $occupval=$_POST['occup']; $facebookurl=$_POST['fbkurl']; $twitterurl=$_POST['twiturl']; $phoneNum=$_POST['phoNum']; //...
[ 0.1679493635892868, -0.09513140469789505, 0.8283485174179077, 0.035661306232213974, -0.18819324672222137, 0.13519813120365143, -0.03907299414277077, -0.6197047233581543, 0.15465623140335083, -0.602810263633728, -0.4700869619846344, 0.19578664004802704, -0.3508857786655426, -0.2189260423183...
WHERE fansessID='$fan_sess_id'; "); $sth->execute(); } ``` Finally, this is the output I get when running `$sth->debugDumpParams();` in my php script above: ``` SQL: [152] UPDATE Fan SET fanBio='',fanDob='',fanDetLocID='',occupID='', fanFbk='',fanTwit='',fanPho='' WHERE fansessID='90707e4c3...
[ 0.3590356111526489, -0.04443465173244476, 0.6327908635139465, 0.007978446781635284, -0.08242887258529663, -0.02791311964392662, -0.1018863171339035, -0.33878445625305176, 0.3042096495628357, -0.5538806319236755, -0.07674282044172287, 0.46746596693992615, -0.28760287165641785, 0.10631965845...
the `id`.
[ 0.038109418004751205, 0.13481733202934265, 0.23135367035865784, 0.2663731276988983, -0.10632133483886719, -0.09575124084949493, -0.16946326196193695, -0.008759133517742157, -0.07844523340463638, -0.14103475213050842, -0.019974011927843094, 0.20369111001491547, -0.005356016103178263, 0.0660...
Basically I have a script in Python that takes several letters, gets every combination of them and then checks to see if it's an actual word (Think scrabble in a way) but for some reason it returns the same words multiple times which I don't want it to do, the script looks like: ``` with open("dictionary.txt") as word...
[ 0.30496132373809814, 0.2794119417667389, -0.0005519961123354733, -0.3004295527935028, -0.07693343609571457, -0.035025455057621, 0.0710550919175148, -0.13715513050556183, -0.056086618453264236, -0.7136951684951782, -0.2066441923379898, 0.7184934616088867, -0.09086418151855469, -0.1656445115...
= raw_input("Please enter fifth letter: ") check =[a,b,c,d,e] def get_combos(list): import itertools count = len(list) got = [] combos =[] while count > 0: for a in itertools.permutations(list,count): if a in got: got.append(a) else:
[ 0.267311155796051, -0.4219878613948822, 0.16000783443450928, -0.047434575855731964, -0.04673191159963608, 0.4175046980381012, 0.37175777554512024, -0.6294398903846741, -0.29480621218681335, -0.42490091919898987, -0.18969425559043884, 0.664903461933136, -0.271610289812088, -0.02421508915722...
got.append(a) combos.append(a) count = count - 1 for a in combos: strip_combos(a) def strip_combos(list): count = '' words = [] for entry in list: count = count + entry words.append(count) check_combo(words) def check_combo(list): words =
[ 0.21353337168693542, -0.24227064847946167, 0.412004292011261, 0.005141303408890963, -0.1555168777704239, 0.1643284410238266, 0.7064601182937622, -0.5206283330917358, -0.37735405564308167, -0.744560956954956, -0.2745105028152466, 0.5685574412345886, -0.2585909366607666, -0.05152385681867599...
[] got = [] for entry in list: if is_english_word(entry): if entry not in words: print entry words.append(entry) get_combos(check) ``` Now it works as I meant it too by only printing words that are in the dictionary but it will print the same word many time...
[ 0.1692502349615097, 0.08260224759578705, 0.6118137836456299, -0.01535274088382721, -0.20746420323848724, 0.04609442874789238, 0.4160405397415161, -0.35021471977233887, -0.2765048146247864, -0.7999668717384338, -0.08092144131660461, 0.4650842547416687, -0.040057457983493805, -0.010561532340...
the letters are: a, c, e, s It will return as on every occasion it shows in the list though as far as I can tell I'm omitting the same result occurring many times in the check\_combo procedure by having a got and a words list I have a feeling the issue may stem from the get\_combos procedure in the while loop somewh...
[ 0.34472933411598206, 0.2917395532131195, 0.37710970640182495, -0.11776529252529144, -0.13313911855220795, 0.17123998701572418, 0.3925802707672119, 0.015685876831412315, -0.20932219922542572, -0.7057703137397766, -0.09892753511667252, 0.5727205872535706, -0.12668468058109283, 0.161903157830...
got.append(a) else: got.append(a) combos.append(a) ``` This is almost certainly not what you meant :) It seems that what you want to do is get the unique results from the permutations. You are making this much too complicated, and slower at the same time (because you're using a `list`...
[ 0.4445668160915375, -0.024904238060116768, 0.1657826006412506, 0.16788479685783386, -0.3110559582710266, -0.14718623459339142, 0.3074306547641754, -0.4072096347808838, -0.45052286982536316, -0.4570349454879761, -0.16101370751857758, 0.3504815101623535, -0.3571142554283142, 0.04457123205065...
Fortunately for you, Python has this built-in. Really you're making the whole problem too complicated, though, and your interface is wrong; you shouldn't be `print`ing results at the innermost level, but at the outermost (after `return`ing the appropriate data). Although you have more levels than you need, because you...
[ 0.2021605521440506, 0.052411552518606186, 0.0127593744546175, 0.10383906215429306, 0.02070949599146843, 0.049626875668764114, 0.38775789737701416, -0.14927954971790314, -0.20404742658138275, -0.6754499673843384, -0.04410523921251297, 0.6017229557037354, -0.41154441237449646, -0.42530778050...
get from several `itertools.permutations` iterators, which you can string together with `itertools.chain`. ``` def get_combos(letters): return set( ''.join(x) for x in itertools.chain(*( itertools.permutations(letters, count) for count in range(len(letters)) )) )...
[ 0.23098762333393097, -0.25749990344047546, 0.5260791182518005, -0.013880904763936996, 0.03767933323979378, 0.15798451006412506, 0.38422340154647827, -0.46284055709838867, -0.29464709758758545, -0.6067081093788147, -0.4847939610481262, 0.6868616938591003, -0.43468597531318665, -0.1659416407...
for x in itertools.chain(*( itertools.permutations(letters, count) for count in range(len(letters)) )) if is_english_word(''.join(x)) ) ```
[ 0.04778061807155609, -0.0837380662560463, 0.3532428741455078, -0.27818262577056885, -0.0426042415201664, -0.018266091123223305, 0.3116457462310791, -0.11468446999788284, 0.0797034204006195, -0.4385429322719574, -0.3350071609020233, 0.47426578402519226, -0.39033401012420654, 0.2033024728298...
I have a small app which try to move files. Here is the min code: ``` #include <windows.h> int main() { MoveFile("C:\\test.txt", "C:\\folder\\test.txt"); // Here I use GetLastError() to get last error code witch is 2 and I can't find what mean; return 0; } ``` IMPORTANT: This error appear on windows 7...
[ -0.04791029915213585, 0.06682651489973068, 0.559006929397583, 0.17052213847637177, -0.021591590717434883, -0.05648824945092201, 0.5899114608764648, -0.12984293699264526, -0.16727586090564728, -0.6279046535491943, 0.06449101120233536, 0.6629000306129456, 0.05354100465774536, 0.2985087931156...
relative/absolute path in there.
[ -0.23984499275684357, -0.4461030066013336, 0.4538002908229828, -0.009486354887485504, 0.06441809982061386, 0.1214049905538559, 0.46004417538642883, 0.1078774631023407, -0.023416152223944664, -0.7366939783096313, 0.036137811839580536, 0.46409526467323303, 0.11814000457525253, -0.16372777521...
We are just converting our blog to match our site style. The date of the POST ( for a blog post is ) ``` <?php echo date($OptionsVis["date_format"],strtotime($Post["publish_date"])); ?> ``` Which gives : 08 JAN But I want to represent the date like this: ``` <div class="post-list-date"> <h1>08<...
[ 0.3087905943393707, 0.13863644003868103, 0.5828908085823059, -0.12841837108135223, -0.293013334274292, -0.2824094891548157, 0.2311682403087616, 0.024128785356879234, -0.1248454824090004, -0.4256657063961029, 0.12010592222213745, -0.029140988364815712, -0.018390189856290817, 0.1143896728754...
system. I would suggest two `$OptionsVis` values (`date_format_main`, `date_format_sub`). Then, do two separate `date()` calls, one for in `<h1>` and another for in `<h2>` like so: ``` $date_h1 = date($OptionsVis["date_format_main"], strtotime($Post["publish_date"])); $date_h2 = date($OptionsVis["date_format_sub"], st...
[ -0.17215262353420258, -0.4820139706134796, 0.48060300946235657, 0.03185282647609711, 0.36584532260894775, -0.08321864902973175, -0.168319970369339, -0.07059203088283539, -0.3039493262767792, -0.6260759234428406, -0.1955169290304184, 0.5701600313186646, -0.29933828115463257, 0.2069427222013...
I'm preparing for an interview and one of the questions that tends to come up is this: Presented with a sentence (e.g, the song is the best song) broken down into words and the indices of the first letter of the word, i.e. "the" - 0, 12; "song" - 4,21; "is" - 9; "best" - 16; choose a data structure to store this infor...
[ 0.022404571995139122, 0.20830729603767395, 0.24781711399555206, -0.017437094822525978, -0.17765109241008759, 0.399883508682251, 0.24877366423606873, -0.13609471917152405, 0.2906108498573303, -0.33457598090171814, -0.1555270254611969, 0.4021882116794586, 0.33475980162620544, -0.061855446547...
gets quite complicated with nested for loops and annoying problems at border indices, reading in spaces at appropriate locations etc. I have the code done for it, so if anyone would like to look I'll post (it's long and makes for a riveting read!!) Anyway, to my question: can anyone suggest a more efficient way of r...
[ 0.49142783880233765, 0.034269437193870544, 0.17650821805000305, 0.36324605345726013, -0.006178908050060272, 0.06988223642110825, 0.17945072054862976, 0.022960003465414047, -0.2401166558265686, -0.6624047756195068, 0.31047067046165466, 0.04803445190191269, 0.10066554695367813, 0.00421713339...
Will the data be used exclusively to reconstruct the sentence? If so, a list would be preferable. * Do you need to be able to look up word positions? If so, your structure is fine. * What other questions might you ask about the sentence using this data? One option is to create a `WordPosition` object for each individu...
[ 0.14336471259593964, -0.11456304043531418, 0.01704154908657074, 0.281653493642807, 0.02879253961145878, 0.40467244386672974, 0.2729749381542206, -0.1208425909280777, -0.2879963219165802, -0.7105385065078735, -0.08812569826841354, 0.5126140713691711, 0.024849630892276764, -0.182069420814514...
a list of `WordPosition`s for each word.
[ -0.04176418110728264, 0.38974159955978394, -0.012077323161065578, -0.0906214788556099, -0.2928496301174164, 0.34147119522094727, 0.2914595305919647, 0.00997750274837017, -0.13836972415447235, -0.5602262020111084, -0.47565731406211853, 0.0933120995759964, -0.07340408116579056, -0.0513811036...
My class is showing compilation errors: ``` namespace Zone.Models { using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Web; using System.Web.Mvc; using Zone.Models; public class MyViewModel { public MyInfo Info { get; set; }...
[ 0.2652723789215088, 0.23047928512096405, 0.5893489718437195, -0.03297995403409004, 0.2035587728023529, 0.04392283037304878, 0.46112433075904846, -0.0847797766327858, -0.14171113073825836, -0.8381239175796509, -0.12855863571166992, 0.5467624664306641, -0.07827625423669815, 0.266253352165222...
class, struct, or interface member declaration Error 3 Invalid token ';' in class, struct, or interface member declaration Error 4 Type or namespace definition, or end-of-file expected ``` My controller shows how the games are entered within the database through an interface: ``` using System; using System.Collecti...
[ -0.20510174334049225, -0.33382079005241394, 0.5360499024391174, 0.3776263892650604, 0.20838306844234467, 0.025703255087137222, -0.1841946393251419, -0.35941872000694275, -0.34004491567611694, -0.5102390646934509, -0.2726409435272217, 0.4767988622188568, -0.4029674232006073, 0.5584478974342...
var FullDatabaseItem = from b in db.tblGames select b; var Info = db.tblGames.Include(x => x.tblConsole).Where(UserInfo => UserInfo.UserName.Equals(User.Identity.Name)).ToList(); switch (Ordering) {
[ 0.09682367742061615, -0.16620706021785736, 0.5423047542572021, -0.48858582973480225, 0.20063214004039764, 0.22518302500247955, 0.27717718482017517, -0.49172237515449524, 0.07114686071872711, -0.3895752429962158, -0.17974752187728882, 0.502173900604248, -0.5555953979492188, 0.15140295028686...
case "HeadlineName": FullDatabaseItem = FullDatabaseItem.OrderBy(b => b.GameName); break; case "DatePosted": FullDatabaseItem = FullDatabaseItem.OrderBy(b => b.ReleaseYear);
[ 0.06768293678760529, -0.05696224421262741, 0.17241202294826508, -0.4287596642971039, 0.4196731150150299, -0.3129279613494873, 0.25287604331970215, 0.2310851514339447, -0.17296600341796875, -0.2479613870382309, -0.5716122984886169, 0.5513002872467041, -0.34763047099113464, 0.144241571426391...
break; case "DiscriptionDate": FullDatabaseItem = FullDatabaseItem.OrderBy(b => b.ReleaseYear); break; default:
[ 0.03263694420456886, -0.11451732367277145, 0.423462450504303, -0.47455301880836487, 0.6065527200698853, -0.291427344083786, 0.442379355430603, -0.05550903454422951, -0.32871392369270325, 0.06821226328611374, -0.716077446937561, 0.5045804977416992, -0.2789834141731262, 0.1627400517463684, ...
FullDatabaseItem = FullDatabaseItem.OrderByDescending(b => b.ReleaseYear); break; } int pageSize = 3; int pageNumber = (CounterForPage ?? 1); var PageNumberResults = FullDatabaseItem.ToPagedList(pageNumber, pageSize);
[ -0.12535548210144043, -0.10520949959754944, 0.7620981931686401, -0.3850656747817993, -0.07087577879428864, -0.012698042206466198, 0.6016350388526917, -0.5267938375473022, -0.24694305658340454, -0.3556833565235138, -0.551945149898529, 0.2307591587305069, -0.4550659954547882, 0.0999504104256...
if (PageNumberResults.Any()) { return View(new MyViewModel() { Info = info, PageNumberResults = FullDatabaseItem.Count()
[ 0.20156145095825195, -0.40691304206848145, 0.9571049213409424, -0.24361254274845123, 0.28778865933418274, -0.01664692722260952, 0.1323801875114441, 0.048230286687612534, -0.05057413503527641, -0.6899653673171997, -0.15189749002456665, 0.7387751936912537, -0.17252059280872345, 0.09806339442...
}); } return View("ErrorView"); } } } ``` Any help would be appreciated You're missing the type in the second property: ``` public ??? PageNumberResults { get; set; } ``` and you don't need the `using Zone.Models;` declaration, because your class is in that namespace.
[ -0.041211195290088654, -0.04628854990005493, 0.28870683908462524, -0.07213644683361053, 0.20154030621051788, -0.25033918023109436, 0.2884083092212677, -0.054711952805519104, -0.05234498903155327, -0.7969743609428406, -0.31255778670310974, 0.6398056149482727, -0.3345352113246918, 0.28505495...
> **Possible Duplicate:** > > [Using delegate() with hover()?](https://stackoverflow.com/questions/3367769/using-delegate-with-hover) I am trying this code, but apparently I am doing something wrong. With this code the `hover` effect doesn't work. However something like : `$('.group>span').hover (function() {` wor...
[ 0.13969102501869202, 0.07424211502075195, 0.47798585891723633, 0.002184260170906782, 0.041401736438274384, -0.06142272800207138, 0.28934192657470703, -0.3753041625022888, -0.34057140350341797, -0.8732345700263977, 0.036758728325366974, 0.4334459900856018, -0.23513786494731903, 0.2547172904...
I am trying to grab weekly (as in Mon-Sun, specified by the mode=1 parameter to YEARWEEK) values of a stock from a MySQL table I have with daily low, high, open and close values. For instance, the following query correctly gives me the highs and lows for the weeks between Jan 1st 2012 and March 1st 2012: ``` SELECT ...
[ -0.08801115304231644, -0.06404663622379303, 0.22091637551784515, -0.3156947195529938, 0.07513343542814255, 0.6581424474716187, 0.023846421390771866, -0.07450642436742783, 0.010093647986650467, -0.581839382648468, 0.012232559733092785, 0.39003586769104004, 0.2521650493144989, 0.323044002056...
| ......... | | 2012-01-09 | ......... | ......... | | 2012-01-16 | ......... | ......... | | 2012-01-23 | ......... | ......... | | 2012-01-30 | ......... | ......... | | 2012-02-06 | ......... | ......... | | 2012-02-13 | ......... | ......... | | 2012-02-20 | ......... | ......... | | 2012-02-27 | ......... | .........
[ -0.31370535492897034, 0.15762625634670258, 0.5576519966125488, 0.005926090758293867, 0.10669680684804916, 0.2114674150943756, 0.3449470102787018, -0.2380635142326355, -0.7271060347557068, -0.27777963876724243, -0.15475568175315857, 0.5779069066047668, 0.0002719398762565106, 0.2187268137931...
CHAR) ORDER BY date), ',', 1) AS open, SUBSTRING_INDEX(GROUP_CONCAT(CAST(close AS CHAR) ORDER BY date DESC), ',', 1) AS close FROM daily_stock_values WHERE stock_id = SOMESTOCK AND date BETWEEN '2012-01-01' AND '2012-03-01' GROUP BY YEARWEEK(date, 1) ``` This unfortunately messes up my GROUP BY and causes the dates...
[ -0.5340328812599182, 0.3802412450313568, 0.29125091433525085, -0.31758448481559753, 0.05478307232260704, 0.4964938163757324, 0.09756247699260712, -0.1884598433971405, -0.31093692779541016, -0.01792052946984768, -0.14792141318321228, 0.280568927526474, 0.0858842208981514, 0.5080228447914124...
| ......... | ......... | ......... | | 2012-01-22 | ......... | ......... | ......... | ......... | | 2012-01-29 | ......... | ......... | ......... | ......... | | 2012-02-05 | ......... | ......... | ......... | ......... | | 2012-02-12 | ......... | ......... | ......... | ......... | | 2012-02-19 | ......... | ......
[ -0.31051579117774963, 0.3663918673992157, 0.49103444814682007, -0.07643110305070877, 0.25942009687423706, 0.20942232012748718, 0.7294771075248718, -0.08810630440711975, -0.3425871431827545, -0.33738139271736145, -0.4524334669113159, 0.41600698232650757, 0.008335729129612446, 0.137217387557...
as date` This works quite well!
[ 0.2950800359249115, 0.552657425403595, 0.5388281345367432, -0.2002803236246109, 0.12956969439983368, -0.4473303556442261, 0.20040437579154968, 0.2492128312587738, 0.10566624253988266, -0.4100085496902466, -0.08156636357307434, 0.643147885799408, 0.1806323528289795, 0.036435555666685104, ...
In case of developing a static lib using fortran: The lib is consist of multiple modules, e.g. "module a", "module b" etc.. Each of the modules has public variables, types and procedures. Now, want to use the lib in program "test". One possible method is to use each of the modules, and providing the \*.a lib file d...
[ 0.0856991782784462, 0.08673432469367981, 0.09695861488580704, 0.042050495743751526, 0.04294409602880478, -0.17136380076408386, 0.0799151286482811, -0.3195003867149353, -0.10183987021446228, -0.4673976004123688, -0.32001519203186035, 0.48628249764442444, -0.6190716624259949, -0.091572247445...
"module all", and use "module all" instead of the individual modules. But if any of the individual module is modified, "module all" also needs to be modified to meet the change. Is there a more appropriate method to work around, or is there an automatic tool to generate the "module all"? Thank you very much for any ...
[ 0.5810655355453491, -0.19547399878501892, -0.0655633956193924, 0.22501493990421295, 0.08947337418794632, -0.08185923099517822, -0.19949355721473694, -0.24776865541934967, -0.47058945894241333, -0.4423030912876129, -0.416881799697876, 0.699481189250946, -0.3227343261241913, -0.0008311747806...
you want a particular module you use that one. What you have to guard against because it is forbidden is circular module references: A uses B uses C uses A is not allowed.
[ 0.5127294063568115, 0.267413467168808, 0.039166346192359924, 0.011320865713059902, -0.09336182475090027, -0.4448944628238678, -0.027608057484030724, -0.5366398692131042, -0.5001905560493469, -0.025928951799869537, -0.09754838794469833, 0.5131314396858215, -0.4417256712913513, 0.25533711910...
The following query returns a result set of all the `new_name` from the table `names` ``` SELECT CASE WHEN nickname = '' THEN fullname ELSE nickname END AS new_name, FROM names ``` I'm trying to search by `new_name` using the following query ``` SELECT CASE WHEN nickname = '' THEN...
[ -0.3798310160636902, 0.06699349731206894, 0.4982307255268097, -0.14874307811260223, -0.001551549299620092, 0.16250769793987274, 0.10213474929332733, -0.1373189389705658, -0.04331769421696663, -0.8118730187416077, -0.36646533012390137, 0.3212915062904358, 0.11232568323612213, 0.448533266782...
get the error **Unknown column 'new\_name' in 'where clause'** Is there a way I get this functionality to work without using a subquery? If you repeat the `case` in the `where` clause, the statement will work: ``` SELECT CASE WHEN nickname = '' THEN fullname ELSE nickname END AS new_name FROM names WHERE (...
[ -0.09368626028299332, 0.0903838649392128, 0.16284462809562683, -0.11887601017951965, 0.05249377340078354, -0.11388081312179565, 0.6780409216880798, -0.20450535416603088, -0.09289691597223282, -0.5015949010848999, -0.08932513743638992, 0.7421485781669617, -0.04399062693119049, 0.15674664080...
FROM names WHERE (nickname like '%Joh%') or (fullname LIKE '%Joh%') ``` This will return the same results, but it can use indexes on `nickname` and `fullname` if you define them, **EDIT** and change the second operand of `LIKE` to not use the leading `%`.
[ -0.022229202091693878, 0.010397483594715595, 0.19072014093399048, -0.1523415744304657, -0.025094900280237198, 0.015191551297903061, 0.21997560560703278, -0.06970380991697311, 0.21797503530979156, -0.6937181949615479, -0.2477497160434723, 0.5295538306236267, 0.01758411154150963, 0.321324884...
This question is likely based in my lack of previous experience with node.js, but I was hoping jasmine-node would just let me run my jasmine specs from the command line. TestHelper.js: ``` var helper_func = function() { console.log("IN HELPER FUNC"); }; ``` my\_test.spec.js: ``` describe ('Example Test', func...
[ 0.25474298000335693, 0.025272144004702568, 0.2710597515106201, 0.09607809036970139, 0.34156519174575806, -0.008796326816082, 0.11171697825193405, -0.1706947535276413, 0.20965349674224854, -0.34529078006744385, -0.09057353436946869, 0.6328193545341492, -0.3137468993663788, 0.003694439306855...
obvious on github. Any advice or help would be greatly appreciated! Thanks! In node, everything is namespaced to it's js file. To make the function callable by other files, change TestHelper.js to look like this: ``` var helper_func = function() { console.log("IN HELPER FUNC"); }; // exports is the "magic" variab...
[ -0.027109140530228615, -0.03260760009288788, 0.4431992173194885, -0.05757910758256912, 0.17307421565055847, -0.08571567386388779, 0.19589796662330627, -0.13847151398658752, -0.1424192190170288, -0.7045964598655701, -0.3268679976463318, 0.43042418360710144, -0.3379388153553009, 0.0015168344...
expect(true).toBe(true); }); }); ``` and, lastly, I believe `jasmine-node .` will run every file in the directory sequentially - but you don't need to run the helpers. Instead you could move them to a different directory (and change the `./` in the `require()` to the correct path), or you could just run `jasmine-n...
[ 0.3341958820819855, -0.441992849111557, 0.3920409679412842, -0.006501759868115187, 0.5673851370811462, 0.004378778859972954, 0.4460315704345703, -0.18533706665039062, 0.16885937750339508, -0.4162825644016266, -0.12603846192359924, 0.9820300340652466, -0.1995469182729721, -0.240257069468498...
I am writing a C# program which reads certain tags from files and based on tag values it creates a directory structure. Now there could be anything in those tags, If the tag name is not suitable for a directory name I have to prepare it to make it suitable by replacing those characters with anything suitable. So that...
[ 0.22381694614887238, 0.4940868616104126, 0.31334471702575684, 0.049766894429922104, 0.09507173299789429, 0.04512401670217514, 0.27578186988830566, -0.29894980788230896, -0.14400552213191986, -0.6555944681167603, -0.07691074162721634, 0.4748922288417816, -0.36993640661239624, 0.145724117755...
desired. These are available directly via the [Path.GetInvalidFileNameChars](http://msdn.microsoft.com/en-us/library/system.io.path.getinvalidfilenamechars.aspx) and [Path.GetInvalidPathChars](http://msdn.microsoft.com/en-us/library/system.io.path.getinvalidpathchars.aspx) methods.
[ -0.04933727905154228, -0.31565147638320923, 0.7399279475212097, 0.08424436300992966, 0.2243589162826538, 0.21825288236141205, 0.2527139186859131, -0.2148749828338623, -0.3801095187664032, -0.709784984588623, -0.4055977165699005, 0.5769355297088623, -0.07310668379068375, -0.0532589741051197...
I'm having trouble with my SQL `SELECT` statement. Basically I want to return all the records where the transaction date is between today's date and today's date minus 6 months. What i have tried so far is: ``` SELECT * FROM loan_ledger WHERE trandate <= DATEADD(month,-6,GETDATE()) ``` but it doesn't get the exact ...
[ -0.05402359738945961, 0.16533049941062927, 0.6613131761550903, -0.0038967241998761892, 0.43353405594825745, -0.05002492293715477, -0.01244221068918705, 0.010120024904608727, -0.5631620287895203, -0.29253092408180237, 0.28237077593803406, 0.41002461314201355, 0.25845247507095337, 0.69461494...
on the past and still displaying the 2009, 2001 records which I don't want! Can someone help me? The other answer are close but if you are using BETWEEN you will want to add one to the date if you want to include today ``` select * from loan_ledger where trandate BETWEEN dateadd(month,-6,getdate()) AND getdate()+1 `...
[ 0.28751277923583984, 0.06735441833734512, 0.5546867847442627, 0.018121518194675446, 0.35391488671302795, 0.24013450741767883, 0.09387345612049103, -0.09527624398469925, -0.4243626594543457, -0.3312070965766907, 0.22489729523658752, 0.41911569237709045, 0.09038376063108444, 0.39657098054885...
I want to run a query that selects the latest question a user hasn't answered from 2 separate tables. This is what I came up with: ``` SELECT Q.question_id, Q.question, S.user_id, S.question_id FROM questions Q inner join answers S on Q.question_id=S.question_id WHERE S.user_id != '$userID' ``` This indeed does fi...
[ -0.029201311990618706, 0.06344018131494522, 0.28730061650276184, 0.10859543085098267, -0.06793121993541718, 0.2180185168981552, 0.032731086015701294, -0.25957149267196655, -0.19380688667297363, -0.7068912386894226, -0.04054352268576622, 0.577731192111969, -0.22105726599693298, 0.0411310568...
questions Q WHERE Q.question_id NOT IN ( /* Select all questions's ids, which have been answered by $userId */ SELECT `question_id` FROM `answer` WHERE `answer`.`user_id` = '$userId' ) ```
[ -0.26257386803627014, 0.2678627669811249, 0.28827881813049316, 0.21525591611862183, -0.003878018818795681, 0.16361404955387115, 0.08329043537378311, -0.19740945100784302, 0.10165189951658249, -0.5921599864959717, -0.33115366101264954, 0.15399551391601562, -0.23732590675354004, 0.1865220814...
Unfortunately, for some strange reason the regex method isn't working for me with UTF-8 ([preg\_replace + UTF-8 doesn't work on one server but works on another](https://stackoverflow.com/questions/10063874/preg-replace-utf-8-doesnt-work-on-one-server-but-works-on-another)). What would be the most efficient way to acco...
[ 0.090011827647686, 0.16518546640872955, 0.3533093333244324, 0.011557628400623798, 0.024446994066238403, 0.15954577922821045, 0.7163573503494263, -0.25057095289230347, -0.05086737498641014, -0.5246419310569763, -0.10728389769792557, 0.41941970586776733, -0.38184529542922974, -0.022266510874...
if(strpos(" $haystack ", " $needle ") !== false) { $found = true; break; } echo $found ? "A needle was found." : "A needle was not found."; ```
[ 0.21000024676322937, 0.054385777562856674, -0.08193028718233109, -0.28427547216415405, 0.42315298318862915, -0.05903833732008934, 0.5333564281463623, -0.4677974283695221, -0.24133272469043732, 0.12193413078784943, -0.3195416331291199, 0.36105284094810486, -0.2994348406791687, 0.03935452550...
I defined a cronjob with the `whenever` gem for Ruby. This created a cron job for the user that runs a ruby script every 5 minutes. The user is not root and doesn't have root permissions. I would like to be able to run this job randomly between 3-6 minutes. I'm running this job on CentOS 6.2 Just make the script run c...
[ 0.13044416904449463, 0.25047364830970764, 0.5200233459472656, -0.15254992246627808, -0.10987287759780884, -0.008123400621116161, 0.5962734818458557, 0.2381923794746399, -0.3003518581390381, -0.5057048201560974, -0.03050285391509533, 0.6907256245613098, -0.25404396653175354, 0.1991730481386...
My Models.py, Here I'm using OneToOneField here, to extend StudentProfile. ``` from django.db import models from django.contrib.auth.models import User, UserManager class SecretQuestion(models.Model): question = models.CharField(max_length=200) def __unicode__(self): return self.question class Stude...
[ -0.11194626986980438, 0.10411375015974045, 0.38239914178848267, -0.2295650839805603, 0.3736279308795929, 0.2597116529941559, -0.01983809657394886, -0.09247547388076782, -0.0936119481921196, -0.6056305170059204, -0.03762517496943474, 0.4265882968902588, -0.0015286161797121167, 0.20337450504...
register_page(request): if request.method == 'POST': form = RegistrationForm(request.POST) if form.is_valid(): main_user = User.objects.create_user( username= form.cleaned_data['username'], password = form.cleaned_data['password1'], ) ...
[ -0.06934361904859543, -0.00002569303978816606, 0.41694673895835876, 0.16050493717193604, 0.2707456350326538, 0.3024223744869232, 0.3061932921409607, 0.01150429341942072, -0.22610697150230408, -0.6047547459602356, -0.45091718435287476, -0.23612521588802338, -0.14418326318264008, 0.371580302...
user_id = main_user.id,http://stackoverflow.com/questions/ask batch=form.cleaned_data['batch'], course=form.cleaned_data['course'], date_of_birth=form.cleaned_data['date_of_birth'], secret_question=form.cleaned_data['secret_question'],
[ 0.09878955781459808, 0.24301157891750336, 0.2759001851081848, -0.010760819539427757, 0.41387245059013367, 0.32884904742240906, 0.16892285645008087, 0.11402562260627747, -0.4512966275215149, -0.0530347041785717, -0.2265922576189041, 0.07396477460861206, 0.13410380482673645, 0.47849139571189...
answer=form.cleaned_data['answer'], contact=form.cleaned_data['contact'] ) return HttpResponseRedirect('/register/success/') else: form = RegistrationForm() variables = RequestContext(request, {'form': form}) return render_to_response('registration/register.html',...
[ -0.1506347358226776, 0.04351784661412239, 0.4962518513202667, -0.33138152956962585, 0.06293943524360657, 0.021781742572784424, 0.15843741595745087, -0.1488446593284607, 0.04027848690748215, -0.4959293007850647, -0.3866797387599945, 0.5263900756835938, -0.10243973135948181, -0.0923048853874...
filling registration fields and pressing register button. I'm not able to interpret this error. What does this mean? You need to subclass `RegistrationForm` as described in [Adding extra fields to django-registration form](https://stackoverflow.com/questions/5122542/adding-extra-fields-to-django-registration-form) ---...
[ -0.03287281468510628, 0.5202478766441345, 0.4074321985244751, -0.17437471449375153, -0.11592937260866165, -0.01135492417961359, 0.08009282499551773, -0.01988401636481285, -0.13517805933952332, -0.38716983795166016, 0.01705755852162838, 0.5019636750221252, -0.1422213464975357, 0.13351966440...
Using this code ``` <iframe frameborder="0" style="height: 185px; overflow:scroll; width: 100%" src="http://www.cbox.ws/box/?boxid=439&boxtag=7868&sec=main" marginheight="1" marginwidth="1" name="cboxmain" id="cboxmain" seamless="seamless" scrolling="no" frameborder="0" allowtransparency="true"></iframe> ``` This is...
[ 0.023395385593175888, 0.1940167099237442, 0.7665047645568848, -0.03322943300008774, 0.07517518103122711, -0.07452729344367981, 0.3257209062576294, -0.32875311374664307, -0.2763093411922455, -0.7503734230995178, -0.11546757072210312, 0.23758377134799957, -0.21498028934001923, 0.097207203507...
How do I avoid a filesort when I want to order a query by condition in MySQL? ``` ORDER BY (videos_count > 0) DESC, name ``` Would it be better to cache a `has_videos` boolean column as well as the count? How about partitioning the query into two, first the ones with at least one video, then (only if needed) the res...
[ 0.08839262276887894, 0.09932272136211395, 0.21691663563251495, 0.055076658725738525, -0.0846748948097229, 0.09918335825204849, 0.07723195850849152, -0.28547167778015137, -0.39486053586006165, -0.7249566912651062, 0.010981319472193718, 0.5594152212142944, -0.30734652280807495, 0.00226067728...
I'm setting up a retail business to sell gold over the internet, using opencart. The difference is that I will only accept bitcoins (BTC), a new cryptographic currency. The problem is that precious metal prices and the BTC/GBP exchange are very volatile. Thus I need my opencart prices to automatically update at a fair...
[ 0.6286402344703674, 0.4962919354438782, 0.42769113183021545, 0.24639934301376343, 0.022327253594994545, 0.15834324061870575, -0.4430926740169525, 0.13145416975021362, -0.28547924757003784, -0.11823880672454834, 0.06835149228572845, 0.7710608839988708, 0.028476180508732796, 0.30118855834007...
of all products within the catalogue to change automatically (every 15 minutes would be ideal). **My question is: How do I update prices in the opencart database, according to a script?** The price has to change based on four things: the type of precious metal the item contains. the percentage markup for that item th...
[ 0.5025443434715271, 0.1459931880235672, 0.7987620234489441, 0.17255575954914093, -0.14961127936840057, 0.3819044828414917, -0.2421652227640152, -0.14381206035614014, -0.39842689037323, -0.4115821421146393, -0.055790796875953674, 0.6126042008399963, 0.21246150135993958, 0.324823260307312, ...
weight, price changes) Percentage Markup Percentage (integer?) Weight Integer Coin Markup Integer " So, let's say I'm selling a quarter ounce gold coin, of the Krugerrand type: a quarter ounce gold coin weighs 7.77 grams, so on the product page the weight would be listed with that figure. The base price would be se...
[ 0.2624717056751251, 0.4793371558189392, 0.38066938519477844, -0.09779813885688782, -0.32409602403640747, 0.33737078309059143, 0.14442117512226105, -0.20670267939567566, -0.007904816418886185, 0.15004460513591766, 0.11374163627624512, 0.31555646657943726, 0.0703267976641655, 0.2723421156406...
a value over and above the gold wholesale price. so the coin mark up would be around 5 bitcoins, the price would be increased to reflect this. " None of these price fiddles should be seen by the buyer, they should just see the price changes to reflect all of these Every hour the price of all the products would change,...
[ 0.3717159330844879, -0.14591750502586365, 0.2669665813446045, 0.20511434972286224, 0.004545699805021286, 0.2288791835308075, -0.10871415585279465, -0.19064857065677643, -0.2923019528388977, -0.06626012921333313, 0.042889054864645004, 0.4705571234226227, -0.0005785053945146501, 0.3414020240...
the first thing I've ever programmed, so might be a little verbose, or not follow given conventions. The answer is likely to be very complicated, so I don't expect a full one. It'd be nice to receive some pointers though! ``` <?php /* This is a script that ultimately displays the price of gold in grams, denominated...
[ 0.48814767599105835, 0.04981681704521179, 0.5153965950012207, 0.0038312431424856186, -0.02038644440472126, -0.12228945642709732, -0.2115391045808792, -0.1360495388507843, -0.21738006174564362, -0.2922516465187073, 0.09745171666145325, 0.5956710577011108, -0.1429804414510727, 0.086030244827...
1: grab metal prices $ch1 = curl_init(); curl_setopt( $ch1, CURLOPT_URL, 'http://drayah.no.de/metals/latest' ); curl_setopt( $ch1, CURLOPT_RETURNTRANSFER, 1 ); $metalsdata = curl_exec( $ch1 ); // curl session 2: Grab exchange rate for BTC/GBP $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, 'https://mtgox.com/api/1/B...
[ -0.16855381429195404, 0.17540565133094788, 0.7760459184646606, -0.05773855745792389, -0.2993836998939514, 0.01772686466574669, -0.14794567227363586, -0.28406816720962524, -0.16070635616779327, 0.12708860635757446, -0.6010708808898926, 0.38492363691329956, -0.09458022564649582, 0.0469739772...
= json_decode( $metalsdata, true, 512 ); $goldprice = $metals['gold']['quote']; $silverprice = $metals['silver']['quote']; $platprice = $metals['platinum']['quote']; //BTC digest of JSON $btcgbp = json_decode( $btcgbpdata, true, 512 ); $btcgbpvwap = ($btcgbp['return']['vwap']['value']); echo "$btcgbpvwap pounds per B...
[ 0.13764707744121552, 0.3418104946613312, 0.06083942577242851, -0.1695985198020935, -0.15153661370277405, 0.5242410898208618, 0.6135140657424927, -0.7660123109817505, -0.3731982409954071, 0.0236067958176136, -0.37533724308013916, 0.09774021804332733, -0.321845680475235, 0.34611502289772034,...
/ 31.1034768; $platpoundsgram = $platpounds / 31.1034768; echo "$goldpoundsgram pounds per gram of gold"; echo $br; echo "$silverpoundsgram pounds per gram of silver"; echo $br; echo "$platpoundsgram pounds per gram of platinum"; echo $br; echo $br; // metal prices denominated in BTC $btcgoldgram = ($goldpoundsgram / $...
[ 0.639471709728241, 0.3481612205505371, 0.2238660603761673, -0.23804014921188354, 0.040338966995477676, 0.14549520611763, 0.5173888206481934, -0.8685798048973083, -0.09316809475421906, 0.08652942627668381, -0.2869229018688202, 0.08035792410373688, -0.2544684112071991, 0.5495122671127319, ...
the same table, used just to report income in administration panel. You could update that as well, if you are interested in such report. To recover the `product_id` you can use product' name from `product_description` (beware names are *localized*). Say your DB contains products named *gram of silver* then your update...
[ 0.7030806541442871, 0.06239672750234604, 0.32060277462005615, 0.0072104777209460735, -0.3778846859931946, 0.13115820288658142, 0.0036623242776840925, -0.17768914997577667, -0.039969995617866516, -0.3956120014190674, -0.1002751812338829, 0.35695281624794006, -0.049692071974277496, 0.6002780...
I'm trying this but getting an error `ADODB.Recordset error '800a0e78' Operation is not allowed when the object is closed.` on the line with this code `If ScopeID.EOF Then` Please do not answer to use the `CreateParam` method, Looking for a solution without this method. Thanks. ``` <% set Cmd = Server.CreateObj...
[ 0.20573540031909943, 0.07566379755735397, 0.5576207637786865, -0.215424045920372, 0.19088613986968994, -0.24871021509170532, 0.5423806309700012, -0.3175954520702362, -0.04498155415058136, -0.8014815449714661, -0.20498599112033844, 0.639051616191864, -0.4325881898403168, 0.01376270223408937...
If ScopeID.EOF Then Response.Write "There was an Error in your request, Please try again" Response.End Else ID= ScopeID(0).Value End IF ScopeID.Close Set ScopeID = Nothing Set Cmd = Nothing Response.Write ID %> ``` Applying `.NextRecordSet()` after the command did the...
[ 0.008509896695613861, -0.21971070766448975, 0.9126802682876587, -0.32501500844955444, 0.07033052295446396, -0.08726926892995834, 0.5418125987052917, -0.43009263277053833, -0.10766994208097458, -0.730133056640625, -0.27526944875717163, 0.7455522418022156, -0.4332219362258911, -0.03958782181...
"INSERT INTO TABLE (NAME) VALUES ('test') SELECT SCOPE_IDENTITY() AS ID" Cmd.CommandType = 1 Cmd.CommandTimeout = 0 Cmd.Prepared = true Set ScopeID = Cmd.Execute() ScopeID.NextRecordSet() // <---- Fix If ScopeID.EOF Then Response.Write "There was an Error in your request, Plea...
[ 0.11687789112329483, -0.23304036259651184, 0.32266920804977417, -0.0937924012541771, 0.40911588072776794, -0.10097914934158325, 0.38050347566604614, -0.6499503254890442, -0.08926284313201904, -0.6002066135406494, -0.2016703188419342, 0.7468598484992981, -0.3022048771381378, -0.146169781684...
IF ScopeID.Close Set ScopeID = Nothing Set Cmd = Nothing Response.Write ID %> ```
[ 0.0903206542134285, -0.16963283717632294, 0.33380526304244995, -0.2864418625831604, 0.09281866252422333, -0.3317706286907196, 0.3531319797039032, -0.24789582192897797, 0.15616321563720703, -0.6949989199638367, -0.35633665323257446, 0.7543960809707642, -0.4713820219039917, -0.10169784724712...
As I heard, Apple is no longer to support UDID (not really sure) I'm worry about google analytics, as im not sure will it use UDID for gather data for report if yes, what will happen if there is no more UDID? This is not uncommon. For example, [SDCC](http://sdcc.sourceforge.net/) (Small Device C Compiler) is a popula...
[ 0.06398102641105652, -0.10601522028446198, 0.3147259056568146, 0.06851845234632492, -0.08368352800607681, -0.03327922895550728, 0.08991667628288269, -0.2951548099517822, -0.15343306958675385, -0.5200015306472778, -0.14043405652046204, 0.437785804271698, -0.36712804436683655, 0.250744670629...
the bit addressable memory of > 8051, e.g.: > > > > ``` > __bit test_bit; > > ``` > > Writing 1 to this variable generates the assembly code: > > > > ``` > D2*00 setb _test_bit > > ``` > > The bit addressable memory consists of 128 bits which are located from > 0x20 to 0x2f in data memory. Apart from this...
[ -0.003740732092410326, 0.07469836622476578, 0.10478415340185165, -0.008096416480839252, -0.020798534154891968, 0.4087139070034027, 0.26896774768829346, -0.4946257174015045, 0.0466727688908577, -0.4538476765155792, -0.418375700712204, 0.2589438259601593, -0.13019590079784393, 0.162221863865...
I'm setting up a site to accept credit cards for the first time. I'm using Drupal to manage products and store content, but that isn't important. I'd like to help build a community-generated list of platform-agnostic credit-card acceptance requirements. I'm looking for a checklist of the things I need to have in plac...
[ 0.6770734190940857, 0.3731960356235504, 0.19358384609222412, 0.04521133378148079, 0.2585366368293762, -0.1897348016500473, -0.16317598521709442, 0.22774814069271088, -0.2296725958585739, -0.6556587815284729, 0.3686700761318207, 0.42817869782447815, 0.30812254548072815, 0.07597585022449493,...
this: [Payment Processors - What do I need to know if I want to accept credit cards on my website?](https://stackoverflow.com/questions/51094/payment-processors-what-do-i-need-to-know-if-i-want-to-accept-credit-cards-on) Here's what I think I need: 1. Fixed IP address and SSL certificate (purchased through web host, ...
[ 0.6035543084144592, -0.11161752790212631, 0.4927074909210205, 0.12882255017757416, -0.10820482671260834, -0.3265986442565918, 0.048016175627708435, -0.07826191186904907, -0.26853370666503906, -0.6987340450286865, 0.18003632128238678, 0.6327401995658875, -0.03298051282763481, -0.01130423136...
For example, [SDCC](http://sdcc.sourceforge.net/) (Small Device C Compiler) is a popular compiler for MCS-51. You'll find [the manual here](http://sdcc.sourceforge.net/doc/sdccman.pdf). The most relevant section is 3.4.1, it describes the language extensions for MCS-51: > 3.4.1.6 \_\_bit > > > This is a data-type an...
[ -0.011157134547829628, 0.10809915512800217, 0.13064135611057281, 0.0342298187315464, -0.003983059898018837, -0.037931665778160095, -0.017911484465003014, -0.47309041023254395, -0.07301300019025803, -0.5105478763580322, -0.3160260319709778, 0.41416701674461365, -0.21175822615623474, 0.08688...
of 128 bits which are located from > 0x20 to 0x2f in data memory. Apart from this 8051 specific storage class most architectures support ANSI-C bitfields4. In accordance with ISO/IEC 9899 bits and bitfields without an explicit signed modifier are implemented as unsigned.
[ -0.023061633110046387, 0.18993514776229858, 0.19494743645191193, 0.0668204203248024, 0.21486976742744446, 0.221980482339859, 0.24158772826194763, -0.2438044399023056, -0.23669452965259552, -0.3827607333660126, -0.3989219665527344, 0.21568162739276886, -0.04392033815383911, 0.19082240760326...
I have an MVC3 site with 2 areas plus the common area. I also have a route specified for paginating lists of items. My `Register_Routes` method looks like so: ``` public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( ...
[ -0.1690816730260849, -0.14357952773571014, 0.6939948797225952, -0.03578169643878937, -0.026580147445201874, 0.05842683091759682, 0.18464963138103485, -0.27173227071762085, -0.37434399127960205, -0.9563071727752686, 0.026229433715343475, 0.1930149495601654, -0.21755202114582062, 0.293437451...
{ controller = "Home", action = "Index", itemsPerPage = SiteSettings.ItemsPerPage, pageNumber = 1, searchString = UrlParameter.Optional } // Parameter defaults ); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { con...
[ -0.3092249631881714, -0.5609086751937866, 0.707739531993866, 0.22276578843593597, 0.11580154299736023, 0.05251230672001839, 0.15042352676391602, -0.147083580493927, -0.4868672788143158, -0.8726549744606018, -0.22713106870651245, 0.26720383763313293, -0.3975321650505066, 0.37727615237236023...
); } ``` What I've noticed (and don't understand) is if I log out from my home page, the redirect from my login page looks like ``` http://localhost:62695/Account/LogOn?ReturnUrl=%2fHome%2fPaginate ``` ... and upon logging in, I end up on my home page, except with a URL of: ``` http://localhost:62695/Home/P...
[ -0.01438052672892809, 0.20669712126255035, 0.5111780762672424, -0.2684864401817322, 0.1227128729224205, -0.054646171629428864, 0.7320231795310974, 0.24321378767490387, -0.4280601441860199, -0.8238593935966492, -0.14240185916423798, 0.2459307760000229, -0.4247448146343231, 0.332249313592910...
routes.MapRoute( "Paginate", // Route name "{controller}/Paginate/{itemsPerPage}/{pageNumber}/{searchString}", // URL with parameters new { controller = "Home", action = "Index", searchString = UrlParameter.Optional } // Parameter defaults ); routes.MapRoute( ...
[ -0.3406055271625519, -0.4078761041164398, 0.6388502717018127, 0.12306241691112518, 0.05686739832162857, 0.12395459413528442, -0.12175069749355316, 0.08788616210222244, -0.2969436049461365, -1.0445235967636108, -0.3596227765083313, 0.1821931004524231, -0.439337819814682, 0.05285912379622459...
"{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); } ``` ... and the home index pages do indeed seem to work properly, but now the paginates don't: ``` return RedirectToAction("Pagina...
[ -0.03615179285407066, -0.0731675922870636, 0.8328635692596436, 0.10149981081485748, 0.06070875748991966, -0.23915614187717438, 0.5348969101905823, -0.07796808332204819, -0.4401770234107971, -0.6930922865867615, -0.18926005065441132, 0.4192570745944977, -0.2067214697599411, 0.34643602371215...
how I got it to work the way I wanted it to: My `RegisterRoutes` method now looks like this: ``` public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( null, "{area}/{controller}/Paginate/{itemsPerP...
[ -0.09998174756765366, -0.38026463985443115, 0.6144829392433167, -0.023364484310150146, 0.27083271741867065, 0.06647057086229324, 0.3502499759197235, -0.07035952806472778, -0.42714187502861023, -0.8770430684089661, -0.001515576965175569, 0.25913333892822266, -0.21779361367225647, 0.05243569...
); routes.MapRoute( "Default", // Route name "{area}/{controller}/{action}/{id}", // URL with parameters new {area = string.Empty, controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); } ``` ... but this was not enough to ...
[ -0.31710195541381836, -0.3880660831928253, 0.5520464181900024, 0.07086355984210968, -0.03554892539978027, 0.09137070924043655, 0.22004090249538422, -0.21889463067054749, -0.28623178601264954, -0.9240092635154724, -0.1674739122390747, 0.21294894814491272, -0.46283894777297974, 0.17206496000...
I needed to add the route to my area registrations. My AdminAreaRegistration looks like this: ``` public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( null, "Admin/{controller}/Paginate/{itemsPerPage}/{pageNumber}/{searchString}", // URL with pa...
[ -0.19292160868644714, -0.20053288340568542, 0.6547154784202576, -0.036046478897333145, 0.15105664730072021, 0.14522676169872284, 0.36500829458236694, -0.3103015422821045, -0.0824776291847229, -0.7712637186050415, -0.21482014656066895, 0.11610837280750275, -0.2464064210653305, 0.38668131828...
context.MapRoute( "Admin_default", "Admin/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional } ); } ``` This, in addition to changing to `RedirectToRoute` for my connections, made my URLs all pretty and working at the same time. All the answ...
[ -0.4925132393836975, -0.17807473242282867, 0.5164220929145813, 0.1360245943069458, -0.20825693011283875, 0.2632787823677063, 0.17016227543354034, -0.10071935504674911, -0.031051116064190865, -0.8983484506607056, -0.0483519621193409, 0.460813969373703, -0.2895679473876953, -0.02079738862812...
closest to the path. ``` routes.MapRoute(null, // do not name your routes, it's a "magic string" "{controller}/Paginate/{itemsPerPage}/{pageNumber}/{searchString}", new { controller = "Home", action = "Index", searchString = UrlParameter.Optional } ...
[ -0.36282625794410706, -0.40988731384277344, 0.7161603569984436, 0.14470773935317993, 0.042074210941791534, -0.05091332644224167, 0.31668874621391296, -0.26126334071159363, -0.2684253752231598, -0.8725089430809021, -0.16338935494422913, 0.20763903856277466, -0.3244066536426544, -0.001862822...
not use the route name return RedirectToRoute(new { controller = "Home", area = "AreaName", itemsPerPage = SiteSettings.ItemsPerPage, pageNumber = 1, searchString = string.Empty, } ); ```
[ -0.14336620271205902, -0.12818543612957, 0.520648181438446, -0.15642261505126953, 0.2789292633533478, -0.15221497416496277, 0.6093801259994507, 0.03553567826747894, -0.2041446715593338, -0.6549978256225586, -0.5182005763053894, 0.11030632257461548, -0.4371260702610016, 0.6034339070320129, ...
I was having trouble with class properties in Python 2.7, managed to find a solution, but I don't understand it. In the following contrived code, I expect each Song to have its own dictionary, containing lyrics of the days of the week mentioned. ``` class Song: name = "" artist = "" # If I comment this line and...
[ 0.2693617343902588, 0.08154193311929703, 0.31280913949012756, -0.06259498000144958, -0.004806576296687126, 0.1743422895669937, 0.40924838185310364, 0.10778549313545227, -0.14864332973957062, -0.38181933760643005, -0.09141557663679123, 0.786823570728302, -0.06431909650564194, -0.13975796103...
lyric ): self.week[ "Friday" ] = lyric; def show_week( self ): print self.week def __init__(self, name, artist): self.name = name self.artist = artist # Uncomment the line below to fix this # self.week = {} def main(): songs = {} friday_im_in_love = Song( "Friday I'm in Love", "the ...
[ 0.11749901622533798, 0.20340588688850403, 0.14907975494861603, 0.03334829583764076, -0.3587772846221924, 0.20939195156097412, 0.7776053547859192, -0.3658837676048279, -0.2579759657382965, -0.31051212549209595, 0.05090594291687012, 0.835412323474884, -0.3873043954372406, 0.06665108352899551...
start" ) friday_im_in_love.set_friday( "Friday I'm in love" ) songs[ "Friday I'm in Love" ] = friday_im_in_love manic_monday = Song( "Manic Monday", "the Bangles" ) manic_monday.set_monday( "Just another manic Monday" ) songs[ "Manic Monday" ] = manic_monday for song in songs: # This shows the correct...
[ 0.08965472877025604, 0.007305654231458902, 0.5393938422203064, -0.007907242514193058, -0.19991785287857056, 0.18602348864078522, 0.43829119205474854, -0.034016672521829605, -0.5766275525093079, -0.03352334350347519, -0.2846131920814514, 0.6830920577049255, -0.12505397200584412, 0.072380691...
by the Bangles {'Friday': "Friday I'm in love", 'Tuesday': 'Tuesday can break my heart', 'Thursday': "Thursday doesn't even start", 'Wednesday': 'Wednesday can break my heart', 'Monday': 'Just another manic Monday'} Friday I'm in Love by the Cure {'Friday': "Friday I'm in love", 'Tuesday': 'Tuesday can break my heart...
[ 0.1453324258327484, 0.3947683572769165, -0.013985340483486652, 0.31174951791763306, -0.3169787526130676, 0.020462391898036003, 0.3123708963394165, 0.1377478688955307, -0.38451993465423584, 0.36272573471069336, 0.16750457882881165, 0.305222749710083, -0.33264443278312683, 0.2773225605487823...
by the Bangles {'Monday': 'Just another manic Monday'} Friday I'm in Love by the Cure {'Friday': "Friday I'm in love", 'Tuesday': 'Tuesday can break my heart', 'Thursday': "Thursday doesn't even start", 'Wednesday': 'Wednesday can break my heart', 'Monday': 'Monday you can fall apart'} ``` **Why is this?** I realiz...
[ 0.2875734269618988, 0.24358880519866943, 0.14602012932300568, 0.1837700456380844, -0.31373944878578186, 0.03895815461874008, 0.2287399023771286, -0.056427281349897385, -0.4864178001880646, 0.3441590666770935, 0.017737453803420067, 0.13451983034610748, -0.37067079544067383, 0.32847619056701...
they do work, I must ask: Since the name and artist string properties appear to work fine "initialized" outside the constructor; why doesn't the week dictionary? The code works *exactly because* they are unnecessary. However, the *lines* don't "work fine" because they *don't 'work' at all* because they are irrelevant ...
[ 0.49427303671836853, 0.06245715916156769, 0.3916982114315033, 0.09081822633743286, -0.03345416486263275, 0.08967506885528564, 0.33076173067092896, -0.1535651981830597, -0.1944100707769394, -0.7393694519996643, -0.10093163698911667, 0.7374764680862427, -0.12894664704799652, -0.0939498171210...