text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I have an ASP.NET page that is interacting with a business class. I want to continuously update controls on my page based on user entered values, e.g. update totals. The calculations are embedded in business logic but they're simple enough to reproduce elsewhere. I've thought of three ways to accomplish this: 1. Dynam...
[ 0.13615624606609344, -0.035482753068208694, 0.4186876118183136, 0.1391916126012802, -0.18158215284347534, -0.008213002234697342, 0.2192525714635849, -0.20614542067050934, -0.30515405535697937, -0.7086750864982605, 0.08521609753370285, 0.5174156427383423, -0.2538991868495941, -0.06574262678...
user to click a re-calculate button. This is a poor user experience and wiring up JavaScript to ASP.NET controls is tedious. 3. Use an AJAX UpdatePanel, set data entry controls to autopostback, and handle the "changed" event for the control, e.g. TextChanged for TextBox. The third method seems cleanest to me, provides...
[ -0.1503581702709198, -0.1465747207403183, 0.4716692268848419, 0.07391336560249329, -0.24904581904411316, -0.11890340596437454, 0.33016133308410645, -0.26861387491226196, -0.14912433922290802, -0.8333402872085571, 0.037031520158052444, 0.6565998196601868, -0.22840683162212372, -0.3078320622...
prejudice against autopostback[1]. I've looked at the size of the request and it's currently negligible at 1.5kB. The site will be low use but we may have a small number of users with dial-up connections. 1. And ASP.NET in general but times are tough. You're correct in thinking the third option is your best. This is t...
[ 0.32502609491348267, -0.04376789554953575, 0.010929837822914124, 0.11885900795459747, -0.48845210671424866, 0.043741002678871155, 0.268098920583725, 0.037559665739536285, -0.047677572816610336, -0.6875287294387817, 0.3888016939163208, 0.8034158945083618, -0.3781803846359253, -0.35135090351...
I'd like to put the results of a stored proc into a temp table. It seems that the temp table must be defined beforehand and an INSERT INTO will not work. Anyone know how to get the schema of the recordset being returned from a select statement? sp\_help only gets info on parameters. You should be able to insert into...
[ 0.31312763690948486, 0.03320400416851044, 0.15833218395709991, 0.18117119371891022, -0.06407031416893005, -0.20955687761306763, 0.23363925516605377, -0.09990917891263962, -0.30844977498054504, -0.38694125413894653, -0.11781579256057739, 0.4735741913318634, -0.18273724615573883, 0.221661761...
Here is a snippet of an HTML file I'm exploring with Beautiful Soup. ``` <td width="50%"> <strong class="sans"><a href="http:/website">Site</a></strong> <br /> ``` I would like to get the `<a href>` for any line which has the `<strong class="sans">` and which is inside a `<td width="50%">`. Is it possible to q...
[ 0.10165175050497055, -0.2096857875585556, 0.2331727147102356, -0.2396383136510849, -0.2755584120750427, 0.04568744823336601, 0.2599199116230011, -0.19436822831630707, 0.009795280173420906, -0.6421922445297241, -0.1167929470539093, 0.17071309685707092, -0.29482394456863403, -0.0797785371541...
but the advice reflects an underlying spirit to the BeautifulSoup API). If you want a one-liner: ``` soup.findAll(lambda tag: tag.name == 'a' and \ tag.findParent('strong', 'sans') and \ tag.findParent('strong', 'sans').findParent('td', attrs={'width':'50%'})) ``` I've used a lambda in this example, but in practice...
[ 0.04408406838774681, -0.15844817459583282, 0.06961473077535629, -0.15427333116531372, 0.1321749985218048, -0.04884796962141991, 0.4163144528865814, -0.303263396024704, 0.4617691934108734, -0.3326197564601898, -0.05732356011867523, 0.7383294105529785, -0.3273591995239258, -0.311224967241287...
I am currently faced with XML that looks like this: ``` <ID>345754</ID> ``` This is contained within a hierarchy. I have parsed the xml, and wish to find the ID node by searching on "345754". ``` xmldoc = minidom.parse('your.xml') matchingNodes = [node for node in xmldoc.getElementsByTagName("id") if node.nodeValue ...
[ 0.004292141646146774, -0.08849265426397324, 0.522136390209198, -0.08829759061336517, -0.01638549380004406, -0.1372533142566681, 0.22216811776161194, -0.10902636498212814, -0.19859477877616882, -0.6332717537879944, -0.3096174895763397, 0.2265295684337616, -0.14663302898406982, 0.38476365804...
Aside from the fact that the code itself can access memory directly. What are the other implications of using the "/unsafe" compiler flag and the "fixed" keyword? Are there any knock on effects related to code signing and deployment of my .exe (my app is desktop only)? (This isn't about whether or not I should be doin...
[ 0.4410198926925659, 0.33853355050086975, -0.04083479940891266, 0.10630758106708527, 0.26783686876296997, -0.26320353150367737, 0.6772292256355286, 0.060931216925382614, -0.1529267430305481, -0.3634944558143616, -0.21797135472297668, 0.7318187952041626, -0.18674957752227783, -0.177647829055...
then this might impact you there.
[ 0.2008250206708908, 0.09727977216243744, -0.11232411116361618, 0.05941839888691902, -0.005177320912480354, -0.05747111141681671, -0.152192622423172, 0.12613052129745483, -0.11961676925420761, -0.5470836758613586, 0.32411906123161316, 0.4039701223373413, 0.4305121898651123, 0.05591134727001...
I have a client and server application that transfer message using serialization over TCP. I got the following error when deserializing an object: Any ideas to the cause or possible next steps in analyzing this problem? ``` java.io.StreamCorruptedException: invalid stream header: 383D4649 at java.io.ObjectInputSt...
[ 0.14456793665885925, -0.17405986785888672, 0.4949489235877991, 0.0460529662668705, -0.01032668724656105, 0.006103659979999065, 0.1769164800643921, -0.10680776089429855, -0.33588719367980957, -0.7039164900779724, 0.04784979298710823, 0.5248344540596008, -0.508121907711029, 0.261650115251541...
In Python, is it possible to define an alias for an imported module? For instance: ``` import a_ridiculously_long_module_name ``` ...so that is has an alias of 'short\_name'. ``` import a_ridiculously_long_module_name as short_name ``` also works for ``` import module.submodule.subsubmodule as short_name ```
[ 0.1698576658964157, -0.07434812188148499, -0.03996696323156357, -0.15591321885585785, -0.016092045232653618, -0.46939632296562195, 0.18595567345619202, 0.2626573145389557, -0.31228312849998474, 0.039535604417324066, -0.2936762571334839, 0.5096454620361328, -0.468576580286026, -0.0232944078...
1. What do you do if you're error logging code fails? 2. How do you make sure that its currently working? 3. How do you know if its not working? 4. How do you test that its working in a production environment? 5. Should I throw an exception if all else fails? The code below uses Microsoft's Enterprise Library Logging ...
[ 0.6065595746040344, 0.09187375754117966, 0.03401242196559906, -0.10469954460859299, 0.41441336274147034, -0.19453135132789612, 0.4725944995880127, -0.37576761841773987, -0.21395936608314514, -0.2239171266555786, -0.04974166303873062, 0.7263981699943542, -0.3678698241710663, 0.0299103129655...
// Trying to write some data to the DB ... } catch (Exception ex) { LogHelper.LogException(ex, "Trying to write to the DB"); } } } public class LogHelper { public static void LogException(Exception ex, string exceptionType) {
[ 0.23396742343902588, -0.09263409674167633, 0.061540573835372925, -0.14243119955062866, 0.03878171741962433, 0.04256724566221237, 0.4227626621723175, -0.18360018730163574, 0.12139561027288437, -0.40650057792663574, -0.34190604090690613, 0.4673539400100708, -0.604963481426239, 0.155734047293...
try { // Simplified version, only logging the message Logger.Write(exceptionType); } catch { // What do you do here??? } } } ``` See the answers in my [related
[ 0.31154003739356995, 0.13969558477401733, -0.042223021388053894, -0.034200601279735565, 0.261308491230011, -0.13381093740463257, 0.5855641961097717, -0.05943920835852623, -0.22012721002101898, -0.5562054514884949, -0.15745534002780914, 0.2806064188480377, -0.4505719244480133, 0.03674891591...
question](https://stackoverflow.com/questions/313839/what-is-the-best-way-to-write-event-log-entries): If everything else fails, have a 'last resort logging' in your catch block. Log the exception to a text file in a location where this is highly unlikely to fail. If this last resort logging fails by throwing another ...
[ 0.16304227709770203, 0.1620190292596817, 0.08974646031856537, -0.027455991134047508, 0.2596134841442108, -0.029025571420788765, 0.45944976806640625, -0.06992557644844055, -0.2689068019390106, -0.1979910284280777, -0.2626818120479584, 0.40052706003189087, -0.33567366003990173, 0.08703836053...
I need to store dates in SharePoint that need to go back around 5000 BC. Ideally, I would like to be able to do date addition/subtraction, like this: ``` oldDate = '5000 BC'; newDate = '1995 AD'; DateDiff(oldDate, newDate, 'Years'); // equals 6995 ``` How should I proceed? Build an old\_date class based on strings? ...
[ 0.5242007970809937, 0.3298361599445343, 0.39161330461502075, 0.04342319443821907, -0.05940268561244011, 0.17242954671382904, -0.20573069155216217, -0.009558153338730335, -0.14354005455970764, -0.48596036434173584, 0.07276806235313416, -0.015453144907951355, -0.1303032636642456, 0.631640970...
get my date addition and subtraction very easily, but it was much easier to get the data in there in the format I wanted.
[ 0.1365293562412262, 0.10804484039545059, 0.10877266526222229, 0.1570257842540741, -0.0834498181939125, 0.09288147836923599, -0.1493544578552246, -0.08857586979866028, -0.19120769202709198, -0.24412769079208374, 0.22534595429897308, 0.09982947260141373, 0.3244691789150238, -0.12222599983215...
I have three denormalized tables that I have to take at face value (data comes from some external resource). The three tables have different definitions, but they each describe the same object from different perspectives. ``` object1 A B object2 A object3 B C object4 C ``` The only commona...
[ 0.06268919259309769, 0.14588414132595062, 0.33348023891448975, 0.005408893804997206, -0.047993361949920654, 0.3088134527206421, -0.17603282630443573, -0.5381078124046326, 0.05441322922706604, -0.6021687388420105, 0.005039131734520197, 0.155430868268013, -0.2340046614408493, 0.3625806272029...
field indexed. I could create a view to abstract this query, vw\_object\_ids, but it performs at the same speed. I thought I could add an index to materialize the view, but in SQL Server 2005, you can't index views with UNIONs. What I want is to have a master index of IDs be in sync with with the underlying data, whic...
[ 0.14603903889656067, -0.05153561383485794, 0.4622809886932373, 0.0915551483631134, -0.17548301815986633, -0.3250538408756256, -0.15467439591884613, 0.04207894206047058, -0.27192065119743347, -0.25234201550483704, 0.23976610600948334, 0.6516188979148865, -0.4636286795139313, 0.3256853520870...
options or if this scenario has a name or is indicative of a pattern. Thoughts? Create a master table that contains only the ID: ``` CREATE TABLE master (ID INT NOT NULL PRIMARY KEY) ``` and make all three tables to refer to that master table with `ON DELETE CASCADE`. To populate the table for the first time, issu...
[ 0.07482768595218658, -0.33353686332702637, 0.4604445695877075, 0.13174153864383698, 0.3146451711654663, 0.22831864655017853, -0.24960541725158691, -0.26885026693344116, -0.330312043428421, -0.7875385284423828, -0.08491244912147522, 0.36453568935394287, -0.31966403126716614, -0.145532324910...
silently fail on `PRIMARY KEY` violation. To query, use: ``` SELECT * FROM master m LEFT OUTER JOIN a ON a.id = m.id LEFT OUTER JOIN b ON b.id = m.id LEFT OUTER JOIN c ON c.id = m.id ``` This will use indexes efficienty. To delete, use: ``` DELETE FROM master WHERE ...
[ -0.1883552074432373, 0.20997902750968933, 0.18434222042560577, 0.009222842752933502, 0.12175526469945908, 0.04498017579317093, 0.3031300902366638, -0.5061482191085815, -0.27836552262306213, -0.6400438547134399, -0.01193777285516262, 0.2865670919418335, -0.4850280284881592, 0.44931095838546...
Is there a Java library for rotating JPEG files in increments of 90 degrees, without incurring image degradation? I found this: <http://mediachest.sourceforge.net/mediautil/> API: <http://mediachest.sourceforge.net/mediautil/javadocs/mediautil/image/jpeg/LLJTran.html>
[ 0.34533125162124634, -0.286536306142807, 0.4768756628036499, -0.004109424073249102, -0.15137118101119995, 0.0452556237578392, -0.36557137966156006, -0.2518250346183777, -0.346774160861969, -0.4328664541244507, 0.02492043375968933, 0.4583345651626587, -0.017703717574477196, -0.0407490245997...
I have this class: ``` public abstract class AbstractIncomingCall { /* class properties */ public void changeStatus(/*some parameters*/){ //store parameters in class properties isValid(); } protected abstract boolean isValid(); } ``` ...which is extended by this class: ```...
[ -0.2169627994298935, -0.3496597409248352, 0.7848373055458069, -0.11111599206924438, 0.24837373197078705, 0.007173136342316866, 0.03704710304737091, -0.25910094380378723, 0.21529385447502136, -0.7001340389251709, -0.03614411503076553, 0.6438270211219788, -0.22215387225151062, 0.289002299308...
//do something interesting } protected boolean isValid() throws StatusChangeNotOccurredException { //implement my validation algorithm } ``` What I would like to achieve is ensuring that whenever changeStatus(/\*some parameters\*/) gets called the isValid() method is called; note that the isVali...
[ 0.17272859811782837, -0.195057213306427, 0.3677839934825897, 0.03665047883987427, 0.15910941362380981, -0.37542933225631714, 0.26385578513145447, -0.11093100905418396, -0.14456789195537567, -0.5568566918373108, -0.023281536996364594, 0.6445298194885254, -0.41837814450263977, 0.071641176939...
I have to pass parameters all around, I think I'm going totally in the wrong direction and there is a cleaner way to achieve this. What I would like to keep in my code is the "isValid() calling logic" in the abstract class, because every call needs to be validated and I can't rely on me remembering this in the future :...
[ -0.04869912192225456, -0.205407977104187, 0.18474547564983368, -0.022859908640384674, 0.01249743066728115, -0.1315317004919052, 0.3704169988632202, -0.30798155069351196, -0.04006899148225784, -0.47325262427330017, 0.07558950781822205, 0.7125061750411987, -0.39416444301605225, 0.10903821885...
the required methods: ``` public final void changeStatus() { doSomethingSubclassSpecific(); isValid() } protected abstract doSomethingSubclassSpecific(); ```
[ -0.03335124999284744, 0.1541324406862259, 0.7764386534690857, -0.05989059805870056, 0.4672844409942627, 0.06378316879272461, 0.06266315281391144, -0.35631635785102844, 0.01664215326309204, -0.7221300601959229, -0.3510560691356659, 0.615091860294342, -0.14730282127857208, 0.2088600695133209...
I implemented the following code: ``` NSURL *url = [ NSURL URLWithString:[ NSString stringWithFormat: @"http://www.google.com/search?q=%@", query ] ]; NSURLRequest *request = [ NSURLRequest requestWithURL: url ]; ``` I want to extract the body from what I receive back from the url above. I attempted: ``` NSData *da...
[ 0.416675865650177, 0.004323143046349287, 0.40199846029281616, 0.12004810571670532, -0.2657727897167206, 0.12279941886663437, 0.48677459359169006, -0.30533191561698914, -0.05395619571208954, -0.5592174530029297, -0.03653993457555771, 0.5732102394104004, -0.11389237642288208, -0.124524928629...
can use this: ``` NSString *myString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; ```
[ -0.19651396572589874, -0.13070958852767944, 0.346223384141922, -0.021321503445506096, 0.1163451299071312, -0.196700319647789, 0.2983035445213318, 0.13219690322875977, -0.24670468270778656, -0.6100442409515381, -0.23136350512504578, 0.5331083536148071, -0.15837927162647247, 0.02432453073561...
I am facing strange problem, Whenever I commented second **if** condition, it works in Production, but fail in development. And when I dont comments second if condtion of code, it works for development and fail for production. ``` protected void Page_Load(object sender, EventArgs e) { if (!Pag...
[ -0.0035897030029445887, 0.11021818220615387, 0.5545298457145691, -0.3219691812992096, 0.09759832173585892, 0.14301994442939758, 0.5641106367111206, -0.10595503449440002, -0.15163126587867737, -0.7648993730545044, -0.2772568464279175, 0.5621354579925537, -0.3345775604248047, 0.4139276742935...
//if (!frmViewer.Action.Contains("?")) //{ // frmViewer.Action = String.Format("{0}?A_No={1}&A_Format={2}", //
[ 0.016995400190353394, -0.34436699748039246, 0.4962456226348877, -0.13576249778270721, 0.16953012347221375, -0.05431510508060455, 0.20486189424991608, -0.524313747882843, -0.4080756902694702, -0.15730500221252441, -0.393069863319397, 0.7330374717712402, -0.26190388202667236, -0.244909927248...
frmViewer.Action, //this.Request.QueryString["A_No"].ToString(), //
[ -0.15176939964294434, -0.2562454640865326, 0.6715747714042664, -0.006120976060628891, 0.07271081954240799, 0.005023385398089886, 0.2772826850414276, -0.11961118876934052, -0.5320652723312378, -0.0652453675866127, -0.25738972425460815, 0.6955602765083313, -0.2823188602924347, 0.002568508964...
//this.Request.QueryString["A_Format"].ToString()); // } } } ``` Here is Error message: **CS0117: 'System.Web.UI.HtmlControls.HtmlForm' does not contain a definition for 'Action'** Well **Barbaros Alp** give me following hint to solve this problem... **Right Click on the solution ...
[ -0.2536618411540985, -0.15107829868793488, 0.6804570555686951, -0.08263774961233139, 0.03611033037304878, 0.21927602589130402, 0.6207566261291504, -0.5738843679428101, -0.45184218883514404, -0.6041479110717773, -0.16494499146938324, 0.3779287338256836, -0.2415882796049118, -0.1739668101072...
I have this situation: I have a page where I have a list of events of a day. And these events can be changed theirs status to 'Confirmed' or 'Cancelled'. But, when I, for instance, click on 'Confirmed', this status is saved on SQL Server and this status is shown 'Confirmed'. But, if another person has this same page ...
[ 0.23551718890666962, 0.06690417230129242, 0.3591615855693817, 0.14867612719535828, -0.02573729306459427, -0.44423648715019226, 0.2453378140926361, 0.22829444706439972, -0.5016129016876221, -0.6793558597564697, -0.006822750438004732, 0.2982068657875061, -0.12657040357589722, 0.3127994835376...
seconds. But I was thinking if there's a jQuery or ASP.NET MVC trigger that when I change the event status, the server responds with a browser refresh. Is there any solution for that?? Thanks!! **Option 1**: Use [**jQuery Timer**](http://plugins.jquery.com/project/Timer) and update your control on page every X second...
[ 0.1387471854686737, -0.4073299765586853, 0.5629757642745972, 0.33831581473350525, -0.1286889612674713, -0.13603375852108002, 0.4175803065299988, -0.014783820137381554, -0.29006436467170715, -0.8643796443939209, -0.23851999640464783, 0.36152976751327515, -0.10754822194576263, 0.038602501153...
user has updated status from confirmed to cancelled, another user who will try update this status from confirm to cancelled will recieve a friendly error message.
[ 0.02782556787133217, -0.10729894787073135, 0.37788084149360657, 0.1199602261185646, 0.22795657813549042, -0.5074367523193359, 0.5219842195510864, 0.6556646227836609, -0.6238763928413391, -0.3925156891345978, -0.1851353943347931, 0.0892619863152504, -0.2473713755607605, 0.4419614374637604, ...
I am really confused about why an update is not taking place. This is very simple: ``` int goodID = 100; DataContext db = new DataContext(); Schedule schedule = db.Schedules.Single(s => s.ID == goodID); // this wont persist - WHY NOT?! schedule.Email = txtEmail.Text; // this does persist ...
[ 0.26158663630485535, 0.12814229726791382, 0.6093243360519409, -0.1729942113161087, 0.1449718326330185, -0.3168317973613739, 0.480802059173584, -0.23800043761730194, -0.2815748155117035, -0.6911205649375916, -0.1120351105928421, 0.5571607947349548, -0.3764929473400116, 0.2593085467815399, ...
after assignment. It assigns the textbox value but still no update. I am an idiot. It's fixed. Votes for everyone. Instead of checking in the database, like a normal person would, I was just looking on the webform after refreshing the page. I wasn't initializing the textbox with the value from the db. So the update was...
[ 0.1837688535451889, 0.021451978012919426, 0.24951206147670746, 0.05143153667449951, -0.4546668231487274, -0.16329801082611084, 0.09589731693267822, -0.0953105241060257, -0.1688968688249588, -0.2710244655609131, 0.16524173319339752, 0.2589815557003021, -0.35047411918640137, -0.1991912871599...
I am attempting to stop the music inside of my flash swf that I have loaded in the page ``` <object id="FlashControl1" type="application/x-shockwave-flash" data="Flash/Preloader%20-%20Splash.swf" width="980px" height="316px"> <param name="movie" value="Flash/Preloader%20-%20Splash.swf" /> <param name="wmode" value="Tr...
[ 0.20356708765029907, 0.21229702234268188, 0.5801040530204773, -0.08418548852205276, -0.12067492306232452, 0.06583435833454132, 0.6305440664291382, -0.543059229850769, -0.2906840443611145, -0.3339366912841797, -0.37805312871932983, 0.7328421473503113, -0.36868125200271606, 0.154059737920761...
you must make it available for JavaScript calls ``` ExternalInterface.addCallback('stopSound', stopSound); ``` In your JavaScript code you must have this simple function that selects your swf: ``` function getFlashMovie(movieName) { var isIE = navigator.appName.indexOf("Microsoft") != -1; return (isIE) ? w...
[ 0.31945744156837463, 0.21449525654315948, 0.6034945249557495, -0.2687162458896637, 0.2751621901988983, 0.0705207958817482, 0.17061041295528412, -0.33599263429641724, -0.03946061432361603, -0.44973886013031006, -0.30886417627334595, 1.067723274230957, -0.2149253636598587, 0.1544189602136612...
I have a simple table in mysql with the following fields: * id -- Primary key, int, autoincrement * name -- varchar(50) * description -- varchar(256) Using MySQLdb, a python module, I want to insert a name and description into the table, and get back the id. In pseudocode: ``` db = MySQLdb.connection(...) queryStr...
[ -0.09030989557504654, 0.2419615387916565, 0.4955134093761444, -0.1779276728630066, 0.08186501264572144, 0.010111750103533268, 0.10451016575098038, -0.21453551948070526, -0.2551107704639435, -0.6274804472923279, -0.018059948459267616, 0.3901124894618988, -0.3863072395324707, 0.2464897036552...
me pointed in the right direction.
[ 0.13519808650016785, 0.15466707944869995, 0.2884718179702759, 0.0190525371581316, -0.05996417626738548, 0.12860870361328125, -0.021549638360738754, 0.25852182507514954, 0.009731785394251347, -0.26332876086235046, 0.15470314025878906, 0.15352484583854675, 0.21652096509933472, 0.151868760585...
I have a page that contains multiple inputs - I'm using Ajax.BeginForm to build a form for each set of inputs. ``` <% using (Ajax.BeginForm(new AjaxOptions() { InsertionMode = InsertionMode.InsertAfter, HttpMethod = "POST" })) { %> <input class="smallInput" type="text" name="duration"/> <input type="submi...
[ -0.02724139392375946, -0.44355642795562744, 0.7409144639968872, 0.144918754696846, -0.0810779482126236, -0.049781572073698044, -0.10267201066017151, -0.574027419090271, -0.10599115490913391, -0.6803882718086243, -0.21124425530433655, 0.31938067078590393, -0.2897454500198364, 0.053908485919...
and is saved. However, every time this happens my page is replaced by a blank page. If I explicitly return a View from my Action, that view appears instead. But I want it to submit the form, leaving my existing page in place as-is. I wasn't including the MVC Ajax javascript files in my page. Adding those includes fix...
[ 0.28689712285995483, 0.09036363661289215, 0.5378347039222717, 0.013933093287050724, -0.08072271943092346, -0.12512515485286713, 0.23014988005161285, -0.23844076693058014, -0.23464173078536987, -0.8180986046791077, -0.11690408736467361, 0.4344659447669983, -0.007317199371755123, -0.00669935...
Hi – I wanted to automatically sweep JUnit tests into suites as part of my continuous builds, so I derived a runner from JUnit's Suite which finds all test classes in a package. The runner works just fine, but the results display is less than expected. I have one class in my testing support package with a @RunWith ann...
[ 0.34253770112991333, -0.2068219929933548, 0.1045980378985405, 0.10060900449752808, -0.21398986876010895, -0.3030892014503479, 0.4013282358646393, -0.4813605844974518, 0.4420633912086487, -0.5844721794128418, -0.11573507636785507, 0.3584744334220886, -0.11921235918998718, 0.1139948368072509...
as the name of the class which has the @RunWith annotation, in both Ant and IntelliJ. My runner has an override for ParentRunner.getName() which returns the name of the package under test. I verified that the string gets into the runner's Description object. What am I missing? Environment: * JUnit: 4.5 * Ant: 1.7.0 *...
[ 0.15985023975372314, -0.2629445195198059, -0.14751173555850983, 0.18113726377487183, -0.36384132504463196, -0.2503294050693512, 0.7881758213043213, 0.014147539623081684, -0.009077325463294983, -0.7201006412506104, 0.0198951605707407, 0.4292377829551697, -0.26898401975631714, 0.144987195730...
What's the fastest (best performing) way in PHP to transform a (My)SQL result like: ``` array( array('user_name' => 'john', 'tag_id' => 1, 'tag_name' => 'foo'), array('user_name' => 'john', 'tag_id' => 2, 'tag_name' => 'bar'), array('user_name' => 'rick', 'tag_id' => 3, 'tag_name' => 'foobar'), array('user_name' =...
[ -0.07852015644311905, 0.20393957197666168, 0.47704407572746277, 0.047071460634469986, 0.15859553217887878, 0.15184172987937927, -0.10763688385486603, -0.31877267360687256, 0.07770717144012451, -0.4110181927680969, 0.03809367120265961, 0.38185355067253113, -0.15515545010566711, -0.022375330...
that does this already, without the added inflexibility and performance hit of full ORM? Thanks Try this: ``` $data = array( array('user_name' => 'john', 'tag_id' => 1, 'tag_name' => 'foo'), array('user_name' => 'john', 'tag_id' => 2, 'tag_name' => 'bar'), array('user_name' => 'rick', 'tag_id' => 3, 'tag_...
[ -0.0848378837108612, 0.4042181074619293, 0.6453902125358582, -0.2585400640964508, 0.02090366557240486, 0.043581973761320114, 0.1469828188419342, -0.6143746972084045, -0.12457473576068878, -0.2660476565361023, -0.26974570751190186, 0.5490237474441528, -0.19377802312374115, -0.10989847779273...
$item['user_name'], 'tags' => array() ); } $final[$item['user_name']]['tags'][] = array( 'id' => $item['tag_id'], 'name' => $item['tag_name'] ); } $final = array_values($final); ```
[ -0.3112751543521881, -0.12361659854650497, 0.5079795122146606, -0.27653634548187256, -0.039748601615428925, 0.18187011778354645, 0.146176278591156, -0.7065980434417725, -0.22924478352069855, -0.29804375767707825, -0.5508660078048706, 0.6021133661270142, -0.31542104482650757, 0.248620003461...
When thinking about security and user experience, what information id OK, acceptable, or even a **good idea** to store in a cookie? EDIT: --- With the understanding that sensitive info, like user names, passwords, SSN, credit card numbers don't belong there, what **does**? Definitely not passwords! Or anything sensi...
[ 0.495789498090744, 0.23967844247817993, -0.07216925919055939, 0.44528722763061523, 0.23214119672775269, -0.6442025303840637, 0.3113340437412262, 0.012950487434864044, -0.3818679749965668, -0.5853614211082458, -0.18714109063148499, 0.6114155054092407, 0.056099869310855865, 0.026829132810235...
server, indexed by session ID.
[ -0.1672583669424057, -0.08423933386802673, 0.2467491775751114, 0.17545770108699799, 0.021520936861634254, 0.11664211750030518, 0.2301435023546219, 0.25360843539237976, -0.33630847930908203, -0.5172469019889832, -0.3098560571670532, 0.12942445278167725, -0.31527987122535706, 0.3842434883117...
Where does Intel C++ Compiler store the vptr ( pointer to virtual function table ) in an Object ? I believe MSVC puts it at the beginning of the object, gcc at the end. What is it for icpc ( Intel C++ Compiler )? For Intel C++ compiler, for Linux, I found it to be the beginning of the object. Code: ``` #include <cst...
[ -0.10592226684093475, -0.004427282139658928, 0.30072295665740967, -0.1515776813030243, -0.024550791829824448, 0.3062129318714142, 0.1156490296125412, 0.035624220967292786, -0.23400957882404327, -0.41947558522224426, -0.2907063961029053, 0.4200935363769531, -0.3671692907810211, 0.3468289375...
2); int p=10; A a1(5, 6); B b(3, 4); int q=11; B b2(7, 8); a.p(); b.p(); int * x=(int*)&a; printf("%d %d %d %d\n", x[0], x[1], x[2], x[3]); x=(int*)&b; printf("%d %d %d %d\n", x[0], x[1], x[2], x[3]); } ```
[ -0.03227636218070984, 0.06796258687973022, 0.048737697303295135, -0.5075911283493042, 0.10018569231033325, 0.5891061425209045, 0.4250466525554657, -0.4054870307445526, -0.03690231963992119, -0.32305192947387695, -0.7535029649734497, 0.4889281392097473, -0.5639517307281494, -0.0680600330233...
Does anyone know how to make a macro or something to switch between foo.hpp and foo.cpp? I would really appreciate having a macro like this. I guess it would help if it actually opened the corresponding file, but kept the old one in a tab. Thanks Perhaps one (or a combination) of the following will help you: * [Switc...
[ 0.39373987913131714, 0.0502171516418457, 0.2739948034286499, -0.05567725747823715, 0.05770746245980263, -0.06747013330459595, -0.017538728192448616, 0.03349441662430763, -0.6482083201408386, -0.4614710211753845, 0.27608397603034973, 0.6199122667312622, -0.2616490423679352, -0.1384590715169...
codeguru) * [Macro to Switch Between Header and CPP File](http://www.codeguru.com/cpp/v-s/devstudio_macros/article.php/c3093) (An old macro from codeguru) * **[Several other solutions found on Google...](http://www.google.com/search?q=visual%20studio%20macro%20switch%20header)**
[ -0.07678612321615219, -0.36038801074028015, 0.2967829704284668, 0.05221068486571312, 0.15786811709403992, 0.3952459990978241, 0.31019559502601624, -0.0013810283271595836, -0.42854851484298706, -0.9079148769378662, -0.22937048971652985, 0.2946568727493286, -0.3848649859428406, -0.0337347202...
I have been playing around in expect recently and I for the life of me can't figure out how to perform a simple addition on a variable I passed in. Anyone know how to do this? Also, is there a decent online reference for Expect? I have tried googling with very limited results. The thing to remember about Expect is that...
[ 0.8356783986091614, -0.1231963038444519, 0.024065222591161728, -0.05665290355682373, -0.04425622895359993, -0.23069977760314941, 0.18676404654979706, -0.03735313564538956, 0.10906697064638138, -0.4475942552089691, 0.3696232736110687, 0.9419853091239929, -0.1895122528076172, -0.340836971998...
good starting place is <http://www.tcl.tk>, as well as <http://wiki.tcl.tk>. There are two ways to do what you're trying to do: `incr` and `expr`. `incr` may be used when you are adding an integer value to another integer. It is very fast for that operation. For example: ``` set value 1 incr value ``` However, `inc...
[ 0.17962677776813507, 0.11662711948156357, 0.5263944864273071, -0.10221248120069504, -0.34046652913093567, -0.21011216938495636, 0.10480017960071564, -0.3273436427116394, 0.027481673285365105, -0.27187928557395935, -0.08657035231590271, 0.49446967244148254, -0.33315664529800415, -0.18036276...
they are not required for correct operation in general, they improve performance. If you are doing many arithmetic operations, using braces around the expressions will significantly improve the performance of your script. For more information, see <http://wiki.tcl.tk/10225>. You should get in the habit of *always* brac...
[ 0.44336214661598206, 0.08560190349817276, -0.10089857876300812, -0.13999639451503754, -0.15837323665618896, 0.1830129474401474, 0.679692804813385, -0.5081818103790283, -0.24671222269535065, -0.5657327771186829, 0.27475711703300476, 0.4734243154525757, -0.3485707938671112, -0.69965195655822...
Same intro as my last question: I am re-writing and/or consolidating a bunch of my "app framework" classes (basic mainform, about box, locking routines & purchase linking, auto-update, datamodule initializer, etc) -- Basically, I have a number of small potential shareware apps that I'm wanting to get out the door, and...
[ 0.1903260499238968, 0.2011232227087021, 0.29449376463890076, 0.39119842648506165, 0.05314026027917862, -0.08833824098110199, 0.16923846304416656, -0.08023011684417725, -0.053892552852630615, -0.5678927898406982, -0.20273219048976898, 0.87929767370224, 0.019949978217482567, -0.3590622544288...
lock + trialware component. I've used [ICE License](http://www.ionworx.com/icelicense.html) in the past. Tool was easy to use - which is good, as the support was shocking! None of these types of products is perfect, but, if you've decided that this is the route you want to go, you could do worse than this product.
[ 0.3437502384185791, 0.06351268291473389, 0.19154861569404602, 0.31802740693092346, -0.22070084512233734, -0.2819899916648865, 0.37764304876327515, -0.29545849561691284, 0.1394481658935547, -0.4063601791858673, 0.33070802688598633, 0.34287893772125244, -0.30953678488731384, 0.10016795247793...
From this post [How to use ROW\_NUMBER in the following procedure?](https://stackoverflow.com/questions/706720/how-to-use-rownumber-in-the-following-procedure/706756#706756) There are two versions of answers where one uses a `sub-query` and the other uses a `CTE` to solve the same problem. Now then, what is the advan...
[ -0.23093600571155548, -0.022684136405587196, 0.22002416849136353, 0.09427689015865326, -0.11142206937074661, 0.055237650871276855, -0.06361529976129532, -0.1451532393693924, -0.1514911949634552, -0.6315032839775085, -0.16625335812568665, 0.46667808294296265, -0.10322553664445877, -0.022467...
similar. You would have to use the profiler and actual execution plan to spot any differences, and that would be specific to your setup (so we can't tell you the answer in full). In *general*; A CTE can be used recursively; a sub-query cannot. This makes them especially well suited to tree structures.
[ 0.17223556339740753, -0.1482761800289154, -0.1244899332523346, 0.14679083228111267, -0.19541120529174805, -0.15169526636600494, 0.07976437360048294, -0.16142284870147705, -0.2960851192474365, -0.6396591067314148, -0.40702691674232483, 0.4466378092765808, -0.40861448645591736, 0.05443167686...
On a lab to regarding network topology using port scanners, I am instructed "to develop a network inventory and topology for the 123.218.44.0/24 subnet." What does the notation 0/24 mean there? I had assumed it meant to consider the network range 123.218.44.0 to 123.218.44.24. When I use nmap against a range, using pa...
[ 0.11035457253456116, 0.2394670695066452, 0.49789077043533325, -0.09572058171033859, 0.16669557988643646, 0.10875628143548965, 0.32813316583633423, -0.11783399432897568, -0.40421196818351746, -1.0447100400924683, -0.1509525030851364, 0.2825625240802765, -0.22879303991794586, 0.1867432445287...
I don't understand the notation so I'm not sure. Can anyone clarify for me? That's [Classless Inter-Doman Routing](http://en.wikipedia.org/wiki/CIDR_notation) notation. The /24 means that the routing prefix of the subnet is 24 bits long, which means there's ony 8 bits left for the subnet itself, i.e. 123.218.44.0 to 12...
[ 0.32011550664901733, -0.1811349242925644, 0.3208724856376648, 0.1943894773721695, -0.05378333851695061, 0.06668613851070404, 0.4236565828323364, 0.050200022757053375, -0.3973536491394043, -0.5104892253875732, 0.08946026116609573, 0.12395351380109787, -0.2550394833087921, 0.3693244159221649...
I seem to be having trouble with Rails finding the appropriate path to a textfile I would like to load into memory for processing, for a personal learning project. ``` require "#{RAILS_ROOT}/lib/english.txt" ``` or ``` require "/lib/english.txt" ``` are not working. The textfile is located in the `lib` direc...
[ -0.009927906095981598, 0.21211624145507812, 0.3112887144088745, 0.133812814950943, 0.14193421602249146, -0.1988837867975235, 0.5672614574432373, 0.2718789577484131, -0.014262385666370392, -0.9394726157188416, -0.023426787927746773, 0.791719913482666, -0.06118832156062126, -0.05198290944099...
being executed\n"; } ``` See [caller](http://perldoc.perl.org/functions/caller.html). It returns `undef` in the main script. Note that that doesn't work inside a subroutine, only in top-level code.
[ 0.0983206033706665, -0.22660572826862335, 0.37342569231987, -0.2959473729133606, -0.005166505463421345, -0.07841937988996506, 0.518567681312561, 0.010857227258384228, -0.19423867762088776, -0.34048992395401, -0.5000991821289062, 0.3157329857349396, -0.5074535608291626, 0.27416983246803284,...
Here's my scenario: I have two web applications that are hosted on seperate servers. What I'd like to do is have requests for "\*.mydomain.com" (i.e. no subdomain, 'www', etc) to go to the first server, and requests for "mysubdomain.mydomain.com" to go to the second server. How do I accomplish this? Is it just a "CNA...
[ 0.18196693062782288, 0.10502855479717255, 0.5563585162162781, 0.12227160483598709, -0.030406398698687553, -0.1208779513835907, -0.07688455283641815, 0.3020963668823242, -0.2368953675031662, -0.9621480107307434, 0.08059339970350266, 0.2607976496219635, 0.053044214844703674, 0.46291804313659...
What namespace do I need to get my extension to work Here is my Extension Method ``` using System; using System.Collections.Generic; using System.Web; using System.Data; namespace MyUtilities { public static class DataReaderExtensions { public static DataTable ToDataTable(IDataReader reader) ...
[ -0.098907969892025, -0.1813640147447586, 0.5274338722229004, 0.21837283670902252, 0.07906361669301987, 0.24146722257137299, 0.06862931698560715, -0.4491012394428253, 0.027400754392147064, -0.643100380897522, -0.0781165361404419, 0.4909606873989105, -0.40926215052604675, 0.4656715393066406,...
} } ``` When I try to use it in like this ``` Session["Master"] = cust.GetCustomerOrderSummary((string)Session["CustomerNumber"]).ToDataTable(); ``` it doesn't work. This is .net 2.0 You can't. C# 2.0 doesn't have extension methods at all. You can use extension methods from C# 3.0 in Visual Studio 2008 *targeting...
[ 0.2277495265007019, -0.061590034514665604, 0.402706503868103, -0.24854442477226257, 0.01966053619980812, -0.18734164535999298, 0.11111888289451599, -0.14805324375629425, -0.07259779423475266, -0.5387029647827148, -0.05854285880923271, 0.851733386516571, -0.44091132283210754, 0.129515975713...
I want to be able to implicitly convert Tuples of numbers (Ints and double) into a vector object. Assuming a Vector class with a + method ``` case class Vector(x: Double, y:Double){ def + (v:Vector)= new Vector(x+v.x,y+v.y) } ``` My goal is to have the following code work. ``` val vec = (1,2)+(.5,.3) // vec =...
[ 0.2392529398202896, 0.018971966579556465, 0.5221924781799316, -0.26207321882247925, -0.16947977244853973, 0.3799709677696228, 0.462945818901062, -0.5471119284629822, -0.03214073181152344, -0.7912193536758423, -0.10117743909358978, 0.9809013605117798, -0.30058714747428894, -0.05915815755724...
Vector(1.5,1.3) val d = (1,2)+(.3,.5) // compile error: wrong number of arguments val e = (1,2)+((.3,.5)) // compile error: type mismatch ``` Trying just double per Andri's sugestion ``` implicit def double2vec(t:Tuple2[Double,Double])=new Vector(t._1,t._2) val a = (.5,.3) val b = (1,1)+a // type mismatch found:(Dou...
[ 0.18663859367370605, -0.46032464504241943, 0.3020189702510834, -0.17079196870326996, -0.12210968136787415, 0.28594422340393066, 0.3415314853191376, -0.45451587438583374, -0.31726863980293274, -0.641374945640564, 0.14236967265605927, 0.7144862413406372, -0.7333194613456726, -0.3164830207824...
can. In particular, I suggest you make the following definition: ``` val V = Vector ``` And then all your examples work as you'd expect, without any implicits, magic, or cryptic error messages, and at the cost of only one character per Vector. ``` val a = V(1,2)+V(.5,.3) val b = V(1,2)+V(3,4) val c = V(1,2) val d ...
[ 0.04802029952406883, -0.21324577927589417, 0.535444438457489, 0.16525615751743317, -0.2887234091758728, 0.2254163920879364, 0.4406643211841583, -0.2592043876647949, -0.0025006323121488094, -0.7130478620529175, -0.39398884773254395, 0.8789267539978027, -0.38007238507270813, -0.3820870220661...
Given a composite format string provided by the user (for use with `String.Format`) and a set of types representing the arguments that would be used to format the composite format string, how can you check that the user-provided value is valid? It should be pretty easy to create a regular expression to check that the ...
[ 0.10197900980710983, 0.3010789155960083, 0.3849838972091675, 0.17786981165409088, 0.11603234708309174, 0.2359572798013687, -0.10843533277511597, -0.3656497001647949, -0.14102494716644287, -0.3174828588962555, -0.11545944958925247, 0.4825499951839447, -0.1392633467912674, -0.193154692649841...
won't be given). However, given the types for the arguments that will be passed in are known, it should also be possible to validate the "`:formatString`" is appropriate for those types. For example, you want to validate the user doesn't specify "`{0:dddd MMMM}`" as a format string when the first argument type (0 inde...
[ 0.23537281155586243, 0.12267740070819855, 0.5583767294883728, 0.07723674923181534, 0.19935519993305206, -0.2717900276184082, 0.1407269388437271, -0.37381571531295776, -0.15500065684318542, -0.40804946422576904, -0.4196440577507019, 0.7338651418685913, -0.13833719491958618, 0.19682054221630...
are no custom [`IFormatProvider`](http://msdn.microsoft.com/en-us/library/system.iformatprovider.aspx), [`ICustomFormatter`](http://msdn.microsoft.com/en-us/library/system.icustomformatter.aspx) or [`IFormattable`](http://msdn.microsoft.com/en-us/library/system.iformattable.aspx) implementations in play here. Just basi...
[ 0.21521201729774475, 0.042030781507492065, 0.313586562871933, 0.21452023088932037, 0.0024590599350631237, -0.5203139781951904, -0.006662045139819384, 0.09837713092565536, -0.5480253100395203, -0.6560957431793213, -0.1779654622077942, 0.5880621075630188, -0.13387860357761383, 0.001572789624...
I see that there's the 000-default virtual host and I left it. I created a new file and link for mysite.com and it works, but not how I want it to. I'm wondering, does anyone know if I need to delete or if I shouldn't delete the 000-default vh? For some reason if to go to <http://mysite.com> it takes me to the 000-def...
[ 0.4308883249759674, 0.24303296208381653, 0.7562702894210815, 0.13197185099124908, -0.1719760298728943, -0.030798932537436485, 0.4600704312324524, 0.42095518112182617, -0.3768097162246704, -0.7718904614448547, 0.05923859402537346, 0.18419302999973297, 0.09629331529140472, 0.3334856033325195...
ServerName mysite.com ServerAlias www.mysite.com *.mysite.com DocumentRoot /home/nick/www/mysite.com ErrorLog /var/log/apache2/mysite.com/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel info CustomLog /var/l...
[ 0.1678614318370819, 0.2790139615535736, 0.6929617524147034, -0.049581121653318405, -0.24758467078208923, -0.029817767441272736, 0.3434661328792572, -0.041622843593358994, -0.1983242928981781, -0.5863701105117798, 0.09216661006212234, 0.23991107940673828, 0.012436679564416409, 0.55404913425...
takes you to default? That's a good question, if your configuration is exactly as you've copied, you have restarted the server, then it shouldn't.
[ 0.0989452376961708, -0.48781925439834595, 0.09958106279373169, 0.20181366801261902, 0.33207863569259644, -0.20975615084171295, -0.07671678066253662, 0.3237999379634857, -0.31029191613197327, -0.3016377389431, 0.12861716747283936, 0.6620486378669739, -0.3037944436073303, -0.0701763555407524...
Some cygwin commands are `.exe` files, so you can run them with the standard Windows Scheduler, but others don't have an `.exe` extension so can't be run from DOS (it seems like). For example I want `updatedb` to run nightly. How do I make cron work? You need to also install `cygrunsrv` so you can set cron up as a w...
[ 0.10907625406980515, 0.20799021422863007, 0.29023468494415283, -0.11343370378017426, -0.08921383321285248, -0.3315610885620117, 0.1943262815475464, 0.20524725317955017, -0.006932930555194616, -0.8428016901016235, -0.23484352231025696, 0.9950085282325745, -0.41678836941719055, 0.31907021999...
of some type. If you look at the first line of the file you could see what program you need to use to run them (e.g., "`#!/bin/sh`"), so you could perhaps execute them from the windows scheduler by calling the shell program (e.g., "`C:\cygwin\bin\sh.exe -l /my/cygwin/path/to/prog`".)
[ 0.43198591470718384, -0.029443953186273575, 0.0633697360754013, -0.10208798944950104, 0.2516234517097473, -0.03567596897482872, 0.10412296652793884, -0.02802075259387493, -0.04349568858742714, -0.48218557238578796, -0.4238283634185791, 0.692794680595398, -0.3168316185474396, 0.065853416919...
I'm learning PHP and MySQL to get a hang of server-side scripting and for personal interest/development. The first 'program,' beyond 'hello world' seems to be writing ones' own blog. This is a little beyond me yet and so thought I'd start with a contacts-database type. So far so good, but (and there's always the but!)...
[ -0.0419524721801281, 0.05140503868460655, 0.5751672387123108, -0.052835192531347275, -0.06228754296898842, -0.20824433863162994, 0.08461633324623108, 0.28164058923721313, -0.15601985156536102, -0.5401143431663513, 0.06628335267305374, 0.4543120861053467, -0.2756159007549286, 0.104187145829...
mysql_fetch_array($query)) { echo "<li><a href=\"mailto" . $row['email'] . "\"> . $row['name'] . "</a></li>"; } ``` This is fine until I dare to enter a contact that has no email address in the Db, at which point the obvious lack of an email.contactID to equal the contacts.contactID rears its head. I realise that...
[ 0.11865567415952682, 0.19157180190086365, 0.8614272475242615, -0.19640494883060455, -0.028764883056282997, -0.1531512439250946, 0.36140233278274536, -0.3322550058364868, -0.12545514106750488, -0.6103975772857666, -0.10391031950712204, 0.6473416090011597, -0.20902879536151886, 0.32199883460...
What are the important configuration points needed to enable a scenario where a WCF service can be called with either the logged-on-users windows credentials or a username/password combination. I'm pretty sure I know how to set them up, but what I don't know is how I can force usage of the username/password endpoint. ...
[ 0.11409154534339905, 0.11782080680131912, 0.544535756111145, -0.08724317699670792, 0.08464647829532623, -0.013284849934279919, 0.04451845586299896, -0.30182644724845886, -0.041054822504520416, -0.6921731233596802, 0.018544217571616173, 0.8352147936820984, -0.28437381982803345, 0.2009876668...
update is before running the update (same query, just with a select): ``` select * from QuestionTrackings q inner join QuestionAnswers a on q.AnswerID = a.AnswerID where q.QuestionID is null -- and other conditions you might want ``` Particularly whether each answer id has definitely only 1 associated question id.
[ -0.2050236612558365, -0.1970866620540619, 0.36693379282951355, -0.1950024664402008, -0.12822549045085907, -0.09728308767080307, 0.1698930263519287, -0.29233258962631226, 0.038196414709091187, -0.5695948004722595, -0.256857693195343, 0.5674006938934326, -0.3130444884300232, -0.0183923449367...
If I have the following code: ``` class Foo(object): bar = 1 def bah(self): print(bar) f = Foo() f.bah() ``` It complains > NameError: global name 'bar' is not defined How can I access class/static variable `bar` within method `bah`? Instead of `bar` use `self.bar` or `Foo.bar`. Assigning to `Foo...
[ -0.11125320941209793, 0.3450998365879059, 0.49106454849243164, -0.37878793478012085, 0.019585896283388138, 0.06763595342636108, 0.0867820605635643, -0.3304002285003662, 0.014867986552417278, -0.5034862160682678, -0.005895388312637806, 0.4997325539588928, -0.3481338918209076, 0.354554295539...
I have the code for a javascript calendar and it works perfectly as it creates it when the page loads. However I was wondering if it's possible to add events to it. I found a plugin (jQuery) that enables the user to hover over a td with class "event" and an event will be displayed. So since this calendar will not be us...
[ 0.6921038031578064, -0.18475888669490814, 0.18941375613212585, 0.13919894397258759, -0.4602340757846832, -0.07744941115379333, -0.16270914673805237, 0.1509380042552948, -0.2152828872203827, -0.520649790763855, 0.5079794526100159, 0.30216464400291443, -0.07637982070446014, -0.12259629368782...
say she wants an event on the 3rd then she uploads a file php reads it and tells javascript to add the class "event" that date and jQuery does the rest. Is it possible? I can't even figure out how to do it and I really hope I explained myself. Here's my javascript btw. ``` function buildCal(){ var d = new Date(); ...
[ 0.0575978048145771, -0.15641672909259796, 0.8501414060592651, -0.14577428996562958, 0.12367723137140274, 0.2889364957809448, 0.1983029544353485, 0.050635673105716705, -0.27289125323295593, -0.2646450996398926, -0.19671781361103058, 0.26450708508491516, -0.057974401861429214, 0.379549235105...
when current day is 31st objectDay.od=objectDay.getDay()+1; //fix date bug when current day is 31st var todaydate=new Date() var scanfortoday=(year==todaydate.getFullYear() && month==todaydate.getMonth()+1)? todaydate.getDate() : 0 //DD added daysInMonth[1]=(((objectDay.getFullYear()%100!=0)&&(object...
[ -0.4677933156490326, -0.2099248766899109, 1.2134573459625244, -0.15086989104747772, 0.23552206158638, 0.06148223578929901, 0.4514472186565399, -0.10477028042078018, -0.39977380633354187, -0.44864025712013245, -0.5313595533370972, 0.5119795799255371, -0.09376726299524307, 0.0264394059777259...
x='<td class="today">'+x+'</td>' t+='<td class="days">'+x+'</td>'; if(((i)%7==0)&&(i<36))t+='</tr><tr align="center">'; } return t+='</tr></table></div>'; } ``` Something else, as you can see here, it adds blankspaces until it gets to an actual date. I was trying to make it check if(x was ...
[ 0.2924593985080719, -0.40196022391319275, 0.7943833470344543, 0.02476135827600956, 0.10412795841693878, -0.07910438627004623, 0.00981330219656229, -0.028486628085374832, -0.17087969183921814, -0.5500230193138123, -0.11416742205619812, -0.08017394691705704, -0.16688856482505798, 0.415225088...
be the first time I try to use regex with javascript would anyone know why is that wrong? or how to actually check for it? --- **Edit** Something odd is happening with this script and I don't know why, I tried to change from ``` t+='<td class="days">'+x+'</td>'; ``` to ``` t+='<td class="days' + x +'">'+x+'</td...
[ 0.5455664396286011, -0.17164278030395508, 0.23341815173625946, -0.015488994307816029, -0.18794676661491394, -0.21201321482658386, 0.3679744303226471, -0.18934644758701324, 0.013012772426009178, -0.9048586487770081, 0.13805195689201355, 0.44242197275161743, -0.6052010655403137, 0.2428691387...
is this happening? Yes, it will work, check this running test: ``` [TestMethod] public void TestMethod8() { using (new MyClass() as IDisposable) { } } public class MyClass { } ``` It just runs without any issue. If the corresponding class implements IDisposable it will call it, if not it will still work/...
[ 0.5412503480911255, 0.021462280303239822, 0.34012240171432495, 0.01926378905773163, 0.2523927688598633, -0.1552685797214508, 0.42644405364990234, 0.05960189178586006, -0.17703783512115479, -0.7413703203201294, 0.01769493706524372, 0.5432554483413696, -0.37810903787612915, 0.293855339288711...
I'm not sure if this can be done at all, but it'd certainly make my life easier. I was wondering if maybe the MS spellchecker could be used as a plug-in for other applications... or something like that. Thanks. You can do it via [this free add-in](http://blogs.msdn.com/webdevtools/archive/2007/12/13/spell-checker-for-...
[ 0.3482864201068878, 0.016789987683296204, 0.4181220233440399, 0.08124520629644394, -0.18762128055095673, -0.3840683400630951, 0.4823029637336731, -0.042447060346603394, -0.2964756190776825, -0.37398141622543335, -0.021783730015158653, 0.6906184554100037, -0.02833590842783451, -0.1449339389...
Why is the following code snippet valid in C#? This is a feature of the compiler or a bug? ``` class A { public class B : A { } } class C : A.B { public void Foo(C.B b) { } } class D : A { public void Foo(D.B.B.B.B b) { } } ``` ### See Also > [.NET Nested Classes](https://st...
[ 0.4800938665866852, 0.17179344594478607, 0.22249151766300201, 0.14927725493907928, 0.03135232254862785, -0.45840179920196533, 0.10252609103918076, 0.10140295326709747, -0.3059716522693634, -0.2476985603570938, 0.04753849655389786, 0.5562605857849121, -0.32963594794273376, 0.304193615913391...
legal. I've had a conversation about a similar topic with Eric Lippert before. Strangely enough, that used D.B.B.B.B... too. The conversation came up due to [this earlier question](https://stackoverflow.com/questions/265585/why-cant-a-class-extend-its-own-nested-class-in-c). The relevant section of the C# 3.0 spec is...
[ 0.3896423876285553, 0.17511482536792755, 0.26109668612480164, 0.19220642745494843, 0.31412625312805176, -0.5416589379310608, -0.15089638531208038, -0.27645084261894226, -0.34383320808410645, -0.38301941752433777, -0.11144308000802994, 0.5311296582221985, -0.021310856565833092, 0.0178730990...
I'm working on the bootstrap application of a new installer for some of our products. So far, I've been relying on two things that I read about somewhere: 1. Applications whose name contains "setup" or "install" will run elevated by default. 2. Applications that run elevated will launch other applications in elevated ...
[ 0.627412736415863, 0.20744743943214417, 0.4609757661819458, 0.23044657707214355, 0.24802100658416748, -0.34333550930023193, 0.12746575474739075, -0.19373321533203125, -0.04143138602375984, -0.48223787546157837, 0.18199869990348816, 0.8622345924377441, -0.1942334920167923, -0.26836535334587...
to do with the manifest file. As I'm working in Visual Studio 2008, and the manifest file is generated, I'd like to know what to enter into the project's properties and where to make it require elevation. When I couldn't find application manifest as a new item that could be added to my project, I went into the online h...
[ 0.1550527662038803, -0.08525765687227249, 0.4603137671947479, 0.10028860718011856, -0.029573382809758186, -0.06586692482233047, 0.015635469928383827, -0.3068520128726959, -0.16583089530467987, -0.8412116765975952, 0.38944941759109497, 0.5260773301124573, -0.0051527782343328, -0.16714520752...
We all know that ``` $a1 = array('foo'); $a2 = $a1; $a2[0] = 'bar'; // now $a1[0] is foo, and $a2[0] is bar. The array is copied ``` However, what I remember reading, but cannot confirm by Googling, is that the array is, internally, not copied until it is modified. ``` $a1 = array('foo'); $a2 = $a1; // <-- this sho...
[ 0.2821207344532013, 0.4939036965370178, 0.43207019567489624, -0.4152103662490845, 0.08893823623657227, -0.0009538932936266065, 0.334098219871521, -0.13761833310127258, -0.4767671227455139, -0.255330353975296, -0.02123178355395794, 0.4393868148326874, -0.5132747888565063, 0.2194823026657104...
array a lot, but only reading from it anyway (after creating it once). It may be more than you wanted to know, but [this article](http://derickrethans.nl/files/phparch-php-variables-article.pdf) gives a good description of the way variables work in PHP. In general, you're correct that variables aren't copied until it'...
[ 0.4627886414527893, -0.07346275448799133, 0.059023406356573105, 0.17363616824150085, -0.3954799771308899, -0.09897368401288986, 0.262582391500473, -0.2317880094051361, -0.4566735029220581, -0.2409849911928177, 0.31894415616989136, 0.5552414655685425, -0.044614966958761215, -0.1143388450145...
How do you add CSS rules (eg `strong { color: red }`) by use of Javascript? You can also do this using DOM Level 2 CSS interfaces ([MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document/styleSheets)): ``` var sheet = window.document.styleSheets[0]; sheet.insertRule('strong { color: red; }', sheet.cssRules.len...
[ 0.2241722196340561, -0.16641466319561005, 0.4165089726448059, 0.05982518196105957, -0.12432873249053955, -0.10901733487844467, -0.00001861967393779196, -0.3879949748516083, -0.3190170228481293, -0.7123894095420837, -0.27336904406547546, 0.48496949672698975, -0.12078694999217987, -0.2155633...
in place before you can started appending to it like this. That can be any existing active stylesheet: external, embedded or empty, it doesn't matter. If there isn't one, the only standard way to create it at the moment is with createElement.
[ 0.5308725833892822, -0.14483143389225006, 0.5579198598861694, 0.18552803993225098, 0.1337527632713318, -0.32954418659210205, -0.0713178887963295, 0.18828734755516052, -0.14153651893138885, -0.8483182191848755, -0.09903939813375473, 0.3342391848564148, -0.2712983787059784, 0.067559570074081...
How do i use this to create a tooltip? Ive tried looking through all articles in MSDN website but i just cannot get my head round it. Thanks, Ash What exactly is it you want to do? For most purposes, you just add a `Tooltip` and set values against controls. Some controls provide their own tool-tip (and mechanism to ...
[ 0.3860841691493988, -0.2589927911758423, 0.26311826705932617, 0.08504052460193634, 0.053998593240976334, -0.16179852187633514, 0.4862600862979889, -0.11056813597679138, -0.15234403312206268, -0.6501860022544861, -0.19810916483402252, 0.6257949471473694, -0.5185599327087402, 0.0985340625047...