text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
other IoC containers that do support something like IInitializable or Init()? Autofac can do it - they call it [Startable](http://code.google.com/p/autofac/wiki/Startable)
[ 0.1663028597831726, -0.31866195797920227, -0.03127665817737579, 0.14909760653972626, -0.09146985411643982, -0.5902436971664429, -0.3085184097290039, 0.07109595835208893, -0.05282643809914589, -0.4352298080921173, -0.4248732924461365, 0.1335444450378418, -0.3410814106464386, -0.244877561926...
I've just finished [my entry](http://tametick.com/fwod/) for the 14th Ludum Dare 48-hours game making competition yesterday, and decided to do it in java using java2d for the graphics. I'm not that familiar with the API and haven't done a lot of graphics programming, but my game is quite small (only a dozen or so very...
[ 0.22644874453544617, 0.003415372222661972, 0.3411743640899658, -0.12459338456392288, -0.2869132459163666, 0.0874340683221817, 0.44561097025871277, -0.32429787516593933, 0.18042857944965363, -0.6902700662612915, 0.24868768453598022, 0.5240277647972107, 0.12146898359060287, -0.10846815258264...
is cranked up too high it start getting visibly slower. I've determined the performance bottleneck to be the screen drawing functions, when those are commented out the game is very fast. Could someone give me a heads up on what I might be doing wrong here? The (very short) source code is located [here](http://github....
[ -0.3700789213180542, 0.14892157912254333, 0.31110307574272156, -0.029152628034353256, -0.09565609693527222, 0.07986923307180405, 0.4075312614440918, -0.1545148491859436, -0.28859853744506836, -0.4018855094909668, 0.313429594039917, 0.6476236581802368, -0.1454104334115982, -0.19150635600090...
don't think any of them will help much. The main thing is that you're painting off of the AWT thread. Override paintComponent() and instead call repaint() on the object. This can cause all sorts of problems otherwise. You recreate colors every frame. This may or may not be one of those things that you want to cache. ...
[ 0.8904304504394531, -0.07518400996923447, 0.12653110921382904, 0.23400017619132996, -0.11148624122142792, 0.23870176076889038, 0.47971490025520325, 0.21567010879516602, -0.38878723978996277, -0.7707133293151855, 0.519525408744812, 0.4778643548488617, -0.41394707560539246, 0.370387613773345...
that changed. You don't need to draw the background. Set the background color and let the parent take care of everything. As a design thing, the bodies should be in charge of drawing themselves. Their owner should notify them that they need to be drawn rather than drawing them. The bodies recreate their state every ...
[ 1.0941500663757324, -0.3259413540363312, 0.04487120360136032, 0.09765718877315521, 0.1789841502904892, 0.19231964647769928, 0.02286355197429657, -0.09960625320672989, -0.36235857009887695, -0.7824351787567139, 0.23507845401763916, 0.10403671860694885, -0.06157265976071358, 0.15073700249195...
more consistent frame rate, but you need to make sure that you can actually meet your obligations (or coalesce multiple frames into one if you miss a deadline) or you'll end up creating too many threads. Consider using a [SwingWorker](http://java.sun.com/javase/6/docs/api/javax/swing/SwingWorker.html) to do the calcul...
[ 0.8402162194252014, -0.05911647900938988, 0.2633815109729767, -0.14000704884529114, -0.21641507744789124, 0.0693373754620552, 0.05399665981531143, -0.5201598405838013, -0.5905629992485046, -0.9182484745979309, 0.3311101198196411, 0.6560057997703552, -0.12284260988235474, -0.328746169805526...
Calling all Oracle Gurus! I am in the process of clustering a well tested application on WebSphere. The application in question made it about half way through processing 1k of JMS messages from a queue before this happened. ``` ---- Begin backtrace for Nested Throwables java.sql.SQLException: ORA-01654: unable to ext...
[ -0.05983700975775719, 0.44943633675575256, 0.3859865367412567, -0.07789940387010574, -0.2147320955991745, 0.12356725335121155, 0.17444927990436554, -0.4284679889678955, -0.22522540390491486, -0.12836772203445435, 0.1419517993927002, 0.6471502780914307, -0.39720314741134644, -0.117384582757...
to why this may have occurred now my application has been clusterd I would be most grateful. Regards Karl You are out of disk space. Increase your `TABLESPACE`: ``` ALTER TABLESPACE DABUAT_TBLSP ADD DATAFILE 'C:\FolderWithPlentyOfSpace\DABUAT_TBLSP001.DBF' SIZE 4M AUTOEXTEND ON NEXT 4M MAXSIZE 64G; -- Put your own...
[ -0.32133767008781433, 0.618763267993927, 0.8192402720451355, -0.034677352756261826, 0.005743436980992556, 0.19646801054477692, 0.4250872731208801, -0.08736085891723633, -0.39918914437294006, -0.6714627146720886, -0.012019549496471882, 0.511257529258728, -0.17515398561954498, 0.114380903542...
Is there a rule of thumb to follow when to use the `new` keyword and when not to when declaring objects? ``` List<MyCustomClass> listCustClass = GetList(); ``` OR ``` List<MyCustomClass> listCustClass = new List<MyCustomClass>(); listCustClass = GetList(); ``` In your scenario it seems that the actual creation of ...
[ -0.0137657904997468, -0.16859941184520721, 0.3843385577201843, -0.10855360329151154, 0.15090268850326538, 0.05710002779960632, 0.1397896707057953, -0.24283292889595032, -0.336836576461792, -0.5570499300956726, -0.5002450942993164, 0.39858877658843994, -0.38732853531837463, 0.21377350389957...
be null). When this happens your original `List<MyCustomClass>` is still in the heap, but no objects point to it, so its just wasting resources until the Garbage Collector comes around and cleans it up. To sum it up everytime you create a new object then abandon it, like the second example, you're essentially wasting ...
[ 0.30191949009895325, -0.011358807794749737, 0.020663918927311897, 0.17534799873828888, 0.06463658064603806, -0.20224812626838684, 0.45064881443977356, 0.13895480334758759, -0.27939608693122864, -0.6533235311508179, -0.16015754640102386, 0.3181307315826416, -0.2924514412879944, 0.4047362804...
Assuming of course we're working with HTML Forms and GET/POST data, backend language agnostic. Asker is most fluent with PHP and Python. Example: Tracking event attendance, there is an HTML page for the event administration that lists all available People. There is a column next to each name with a graphic/widget re...
[ 0.5147759318351746, 0.04973187670111656, 0.14610286056995392, 0.21964597702026367, -0.3591153621673584, -0.22662556171417236, 0.18391607701778412, 0.10614199936389923, -0.060870930552482605, -0.2933555245399475, 0.020897990092635155, 0.4320700764656067, -0.029102860018610954, -0.3111737966...
Attendance status to FALSE/OFF/Not Attending for any Person ID not sent along with the form. This breaks if the list is paginated! The second method I thought about was using a graphic/button next to each name. Is it appropriate that each button be a submit button? As in: Is is allowed that a form element have multipl...
[ 0.523255467414856, -0.32711610198020935, 0.16144707798957825, 0.5048246383666992, -0.1582082211971283, -0.32553452253341675, 0.08724002540111542, 0.20665307343006134, -0.18176162242889404, -0.4588682949542999, 0.41594135761260986, 0.2669374346733093, 0.05721016228199005, -0.055898908525705...
your logic can handle "missing" checkboxes as "off" without breaking everyone that isn't on the page. I don't recommend having multiple submit elements in a single form. If you want to go another direction, you could look into having a link (textual/graphic/button) on each row that uses ajax to toggle the attendance f...
[ 0.3352791965007782, -0.16019871830940247, -0.007969038560986519, 0.5233102440834045, -0.11760233342647552, -0.10005288571119308, 0.24624700844287872, 0.11668752133846283, -0.29101794958114624, -0.6997306942939758, 0.19113530218601227, 0.5377164483070374, 0.03172469511628151, 0.139954462647...
Since DateTime.AddDays() takes a `double` parameter, I'm concerned that when you add a days, there might be some rounding errors. For example let's say I have the following loop: ``` DateTime Now = DateTime.Today; for (int i = 0; i < 365; ++i) { Now = Now.AddDays(1); // do something } ``` I'm concerned that ...
[ 0.6352097988128662, -0.26659440994262695, 0.5205659866333008, -0.31405529379844666, 0.338166743516922, -0.29812705516815186, 0.06958252191543579, 0.21809934079647064, -0.3396347761154175, -0.4459660053253174, -0.02808469906449318, 0.3506307601928711, -0.39570093154907227, 0.486623674631118...
stores the date internaly as 64 bit integer where one tick represents 100 nanoseconds, there is no risk of an error. One day has 864,000,000,000 ticks and `Double` has a precision of at least 15 digits. So every error is vanished when rounding to ticks because `Double` has a higher resolution than one tick if `1.0` equ...
[ 0.23295681178569794, -0.05606619268655777, 0.43861040472984314, 0.0687718540430069, 0.20245638489723206, 0.2893681228160858, 0.14959600567817688, -0.16325131058692932, -0.28072184324264526, -0.41261523962020874, -0.053382355719804764, 0.07547419518232346, 0.07912583649158478, 0.33193832635...
have both integer and not floating point arguments. To check this just execute the following code. ``` DateTime now = DateTime.Now; // Displays 864000000000 Console.WriteLine(now.AddDays(1.0).Ticks - now.Ticks); ```
[ 0.16805879771709442, 0.09680544584989548, 0.5261967182159424, -0.31265193223953247, 0.45197659730911255, 0.1563696265220642, -0.0109300771728158, -0.011091259308159351, -0.12956079840660095, -0.5678330063819885, 0.10812221467494965, 0.4190375506877899, -0.2527412176132202, 0.29850134253501...
I want to filter my result set before I search. I know the correct way to do this is by using the filter query (fq) parameter. However, I want to filter based on the output of a function performed on a field. I have a field 'rating' which is an integer in the range of 1 to ~75000. The upper limit may change. I want to...
[ 0.030837802216410637, 0.16438859701156616, 0.5230172276496887, 0.06550360471010208, -0.042345140129327774, -0.14749519526958466, -0.05115645006299019, -0.346384733915329, 0.010717584751546383, -0.7141197323799133, -0.2685811221599579, 0.561914324760437, -0.0208499263972044, 0.2439479976892...
by using the function rord(rating), so basically I would like to do: ``` fq=rord(rating):[0 TO 500] ``` But that does not seem possible. Does anyone know what else I could do? Thanks to Yonik Seeley on the Solr mailing list: > Solr 1.4 can now do range queries on > arbitrary functions: > <http://lucene.apache.org...
[ -0.17072297632694244, -0.09625467658042908, 0.8023526668548584, 0.028028331696987152, -0.08929238468408585, 0.2206384837627411, 0.04487864673137665, -0.26830413937568665, -0.1826888769865036, -0.6961209177970886, -0.1363562047481537, 0.5653854012489319, -0.02254105918109417, 0.043754458427...
This is a simplified version of a query I have. Say for each customer that has made an order, I want to know what percentage of their total order value was for green items. There can't be multiple items in an order, but it's possible for the order value to be zero so I want to avoid division errors. (And no, I am not ...
[ -0.02394414134323597, -0.003609768347814679, 0.07777344435453415, 0.040052492171525955, 0.04920555278658867, 0.14371271431446075, -0.1577511578798294, -0.1826307475566864, -0.6373853087425232, -0.44605207443237305, 0.0628061518073082, 0.4651840627193451, -0.34962034225463867, 0.11318162828...
order.value ELSE 0 END ) * 100 / sum(order.value) AS percentage, SUM(order.value) AS total_value FROM orders INNER JOIN item ON order.item_id = item.item_id GROUP BY order.customer ``` Add ``` having sum(order.value) <> 0 ``` After your group by
[ -0.10485789179801941, 0.19254320859909058, 0.584021270275116, -0.29317688941955566, -0.21622775495052338, 0.42322731018066406, 0.07268057763576508, -0.6271504163742065, -0.30936625599861145, -0.5478147864341736, -0.20263512432575226, 0.33147892355918884, -0.1502489298582077, 0.413358539342...
I'm relatively new to asynchronous and service-oriented programming and want to do the following: 1. Fire off a stored procedure in a database that could run for minutes or even hours. 2. Return a code to the caller of a job id that the client can use to track the progress of the job. This seems like a simple task, b...
[ 0.7017189860343933, 0.17349942028522491, 0.026146849617362022, 0.016335994005203247, 0.010088687762618065, -0.1590644121170044, 0.2830139398574829, -0.15895648300647736, -0.257938951253891, -0.5693380832672119, 0.0848916620016098, 0.5033186674118042, -0.13989713788032532, 0.021496878936886...
I asked the original question, but I didn't find what I was specifically looking for until recently, when I came across the book Services Design Patterns. The Request Acknowledge Pattern <http://servicedesignpatterns.com/ClientServiceInteractions/RequestAcknowledge> A client would like to manipulate a file or docume...
[ 0.22715377807617188, -0.17754554748535156, 0.5049909353256226, 0.10528755187988281, -0.03523389995098114, 0.04494047537446022, 0.0490238331258297, -0.21922649443149567, -0.45303040742874146, -0.5094008445739746, -0.1271737664937973, 0.15756846964359283, -0.03212742879986763, 0.259399235248...
I have a system that takes dynamic data, puts it in HTML for layout and then converts that to PDF. However the problem I am having is that if an element becomes too big for the remaining page space or pushes something else off the bottom how can I detect this and move the element myself to the right position on the nex...
[ 0.21862584352493286, -0.17823822796344757, 0.3766028881072998, 0.10667109489440918, -0.06317887455224991, 0.08152639865875244, 0.012682825326919556, -0.22123123705387115, -0.4150170385837555, -0.7843149304389954, 0.0519777350127697, 0.4758567214012146, -0.2486926019191742, -0.0440913327038...
the top of the footer then I could tell if the element had overflowed and by how much. Thanks for your help anyway guys and gals.
[ 0.42640551924705505, -0.05568282678723335, -0.023426922038197517, 0.27735990285873413, -0.34206196665763855, -0.11584808677434921, 0.22695127129554749, 0.2746315896511078, -0.24832433462142944, -0.11722540110349655, 0.6068177223205566, 0.5528812408447266, 0.18412581086158752, -0.0990497395...
I use the next code to retrieve data from a table in the database: ``` $check_sql = 'SELECT personID, name, DATE_FORMAT(persons.birthdate, "%d de %M, %Y"), birthplace, countryID FROM persons WHERE personID = ?'; if ($stmt->prepare($check_sql)) { $stmt->bind_param('i', $pid); $stmt->bind_result($per...
[ -0.017594149336218834, 0.028236644342541695, 0.6513315439224243, -0.1661834865808487, 0.1976732611656189, 0.3316721022129059, 0.13740752637386322, -0.5803071856498718, -0.14760476350784302, -0.7983805537223816, -0.16962845623493195, 0.07846397161483765, -0.11763641238212585, 0.216210663318...
DATE\_FORMAT() MySQL function. Now, I want to display the month full names in Spanish, so I want to insert `SET lc_time_names = 'es_ES'` into the query.. How can I do it??? Can I add `SET lc_time_names` to the $check\_sql variable?? Thanks!! ``` $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); $m...
[ -0.20657479763031006, 0.0056127277202904224, 0.8949251770973206, -0.0765630453824997, 0.32974082231521606, 0.2490232288837433, 0.07134668529033661, 0.04415460675954819, -0.1825270801782608, -0.4591570496559143, -0.3149668872356415, 0.1342262625694275, 0.00034200691152364016, 0.322348445653...
$stmt->bind_result($personDB, $name, $birthdate, $birthplace, $countryID); $stmt->execute(); $stmt->fetch(); } ```
[ 0.3222696781158447, -0.14099986851215363, 0.44743892550468445, -0.14392223954200745, 0.12005928158760071, 0.004010661505162716, 0.39672181010246277, -0.33315297961235046, -0.19535399973392487, -0.2973245680332184, -0.29249611496925354, 0.312998503446579, -0.45544663071632385, 0.17391557991...
I have a solution in VS 2008 that consists of multiple Asp.net Web applications. Every time I start a new instance of any one of them, all of them open up ports on the development server and the system tray is littered with asp.net development server icons. This never happened in vs 2005, only the web app that an ins...
[ 0.31053078174591064, 0.05988911911845207, 0.37138238549232483, 0.10931506752967834, -0.3408326208591461, -0.04659103974699974, 0.3326837718486786, -0.07315939664840698, -0.4630762040615082, -0.6675788164138794, 0.2936175763607025, 0.5032703280448914, -0.23195478320121765, 0.297652602195739...
they maybe the same). I have two web-sites in one solution, and as you stated, two IIS ports opened up. Here's how I fixed it. Click on the web-site in the solution explorer and then view the properties for it. If it's a Web Application it should have a property called "Always start when debugging". Set that to false ...
[ 0.3283674716949463, -0.05449267104268074, 0.3386441767215729, -0.051894787698984146, 0.27245134115219116, -0.05110156908631325, 0.2060396671295166, -0.09970849007368088, -0.15930867195129395, -0.5958554148674011, 0.009765955619513988, 0.6430636048316956, -0.2879805564880371, 0.293155878782...
Maybe this is the wrong website to ask, but hopefully somebody knows... How do I break a string in Maple and store it in a list of substrings? i.e. my string is : "i love the weekends" and I want to break it into substrings of size 2... so i would look like this substrs; substrs = [[i ][lo][ve][ t][he][ w][ee][ke]...
[ 0.5531357526779175, 0.31733593344688416, 0.30971986055374146, -0.05904655158519745, -0.029186736792325974, -0.11141856014728546, 0.34038421511650085, 0.2242448776960373, -0.8443105220794678, -0.4562208950519562, -0.08303461223840714, 0.15962016582489014, 0.04251677915453911, -0.07775771617...
I have a class, Order, which I persist to a database using NHibernate. There is a folder futher down in the web application that contains an object that inherits from Order, for our purposes, we can call it CustomOrder. I use CustomOrder to place a few properties onto the Order object for UI purposes. The properties do...
[ 0.1594996452331543, 0.11983806639909744, 0.10791284590959549, -0.045596200972795486, -0.1057216227054596, 0.003984046168625355, 0.04355448856949806, -0.01786126010119915, -0.3754177391529083, -0.5698071718215942, 0.3122658431529999, 0.36904552578926086, -0.14718617498874664, 0.733012974262...
to keep this inheritance structure. Am I thinking in the wrong terms or doing something I shouldn't be doing? **Save Code** ``` public object Save(Order obj, object userID) { Order o = (Order)obj; ISession session = NHibernateHelper.GetCurrentSession(); ITransaction tx = session.BeginTransac...
[ -0.10699645429849625, 0.03582770749926567, 0.4858393669128418, -0.34942954778671265, 0.22302189469337463, 0.025622766464948654, 0.35955944657325745, 0.08214839547872543, -0.2434878647327423, -0.5484070777893066, -0.2598858177661896, 0.7966906428337097, -0.3652358949184418, 0.32731014490127...
that makes it possible. 2. **When loading the instance from the DB, NHibernate wants to create the same type you stored.** That's why it wants a mapping for CustomOrder. How ever you implement it: you need to create a new instance of Order. ``` // get the CustomOrder from somewhere CustomOrder customOrder; // create ...
[ 0.04288595914840698, -0.0029609790071845055, 0.14554110169410706, -0.1454034298658371, -0.08507666736841202, 0.08606571704149246, 0.2871409058570862, -0.25721409916877747, -0.369291752576828, -0.8843028545379639, -0.014402180910110474, 0.7279400825500488, -0.36238598823547363, 0.3621921241...
{ property1 = this.property1, property2 = this.property2, property3 = this.property3 } } } ``` You can use Reflection to do this automatically. Or take a look at [MemberwiseClone()](http://msdn.microsoft.com/de-de/library/system.object.memberwiseclone(VS.80).aspx).
[ 0.1314997673034668, -0.22447265684604645, 0.19864055514335632, 0.08629050850868225, 0.14088384807109833, -0.404314249753952, 0.2414218932390213, -0.49971553683280945, -0.32948020100593567, -0.5224567651748657, -0.21607336401939392, 0.5101900696754456, -0.20641295611858368, 0.00199940870516...
I'd like to get up to speed on web services-- I've found that I really like the video format; I tend to skim when I'm reading (bad habit) and I generally don't get the full value out of the video. I would like to see any kind of good resource that you can recommend though; the best thing to do is to collect the best r...
[ 0.8820703029632568, -0.1505977213382721, 0.325065940618515, 0.2354276180267334, -0.2524322271347046, -0.24231332540512085, 0.24159061908721924, -0.04648711159825325, -0.37561914324760437, -0.7028517723083496, 0.44511622190475464, 0.5693569183349609, 0.38966476917266846, 0.10528358072042465...
I'm a huge erlang noob, and while compiling ejabberd, I get this error: ``` make[1]: Entering directory `/usr/src/ejabberd-2.0.5/src/mod_muc' /usr/local/bin/erlc -W -I .. -pz .. -o .. mod_muc_room.erl Function: '-process_admin_items_set/4-fun-0-'/2 ./mod_muc_room.erl:none: internal error in v3_codegen; crash reason: {...
[ -0.1808527708053589, 0.38770776987075806, 0.3838781714439392, -0.36747410893440247, 0.28602567315101624, -0.20600222051143646, 0.5801345705986023, -0.1331981122493744, -0.39176854491233826, -0.4769042730331421, -0.2219533622264862, 0.6358126401901245, -0.30938535928726196, 0.16310425102710...
[[{ker39},{ker38},{ker37},{ker36},{cor36}], []]}, {v3_codegen,longest,2},
[ 0.06823026388883591, 0.1381361484527588, 0.21646645665168762, -0.06752869486808777, -0.13695944845676422, 0.47816500067710876, 0.3515041768550873, -0.37911257147789, -0.11607863754034042, -0.27085575461387634, -0.19454325735569, -0.03582124039530754, -0.3250387907028198, 0.4092469513416290...
{v3_codegen,sr_merge,2}, {v3_codegen,match_cg,5}, {v3_codegen,guard_match_cg,6},
[ -0.1402747482061386, -0.1610460728406906, 0.21055741608142853, -0.29337191581726074, -0.1949823796749115, 0.26514726877212524, 0.11662838608026505, -0.5527786016464233, 0.06302635371685028, -0.6713462471961975, -0.16387569904327393, 0.38420921564102173, -0.7926892042160034, -0.159329235553...
{v3_codegen,guard_cg,5}, {v3_codegen,'-guard_cg_list/6-anonymous-0-',4}, {v3_codegen,flatmapfoldl,3}]}}}, [{compile,'-select_passes/2-anonymous-2-',2}, {compile,'-internal_comp/4-anonymous-1-',2},
[ -0.07441175729036331, -0.0559004470705986, 0.3057419955730438, -0.018797939643263817, 0.019011737778782845, 0.2692699432373047, 0.33548974990844727, -0.44400814175605774, -0.15395015478134155, -0.6259945034980774, -0.27183645963668823, 0.3645857274532318, -0.5715934634208679, -0.0535521507...
{compile,fold_comp,3}, {compile,internal_comp,4}, {compile,internal,3}]} make[1]: *** [../mod_muc_room.beam] Error 1 make[1]: Leaving directory `/usr/src/ejabberd-2.0.5/src/mod_muc' make: *** [all-recursive] Error 1 ``` What would cause this? This is an internal compiler bug in R13A - ...
[ -0.3098423480987549, 0.13526520133018494, 0.9966115355491638, -0.19250640273094177, -0.2653105556964874, -0.012271680869162083, 0.6034185886383057, -0.39240941405296326, -0.05727914348244667, -0.5813377499580383, -0.3182230293750763, 0.6406157612800598, -0.22756795585155487, 0.145595610141...
support the new unicode option in the IO server protocol, so you won't be able to successfully start ejabberd with R13B until that is fixed. Your best bet for now is R12B-5.
[ 0.06621294468641281, -0.0023420387879014015, 0.3180650770664215, 0.14625591039657593, -0.10836075246334076, -0.2697347104549408, 0.5174301862716675, 0.1357710063457489, -0.21245844662189484, -0.8337624669075012, -0.3095056414604187, 0.6036518812179565, -0.25463882088661194, -0.177014082670...
It took me a long time but I finally got nHibernate's Hello World to work. It worked after I did "lazy loading." Honestly, I couldn't tell you why it all worked, but it did and now I am reading you don't need lazy loading. Is there a hello world that anyone has that is bare bones making nHibernate work? Do you have to ...
[ 0.19790424406528473, 0.11551658809185028, -0.1510513573884964, 0.1234310120344162, -0.4719098210334778, 0.04691848158836365, 0.3033067584037781, 0.4943832457065582, -0.5031647086143494, -0.6255853176116943, 0.18320725858211517, 0.5495384335517883, 0.009219624102115631, 0.29955217242240906,...
use lazy loading? EDIT: I am using asp.net 3.5. Web Application Project. I don't understand what you mean with "I did lazy loading". Lazy loading is a feature, it is turned on by default and you can turn it off if you don't like it. There are two kinds of lazy loading: for references to other entities and for lists. ...
[ 0.3980472981929779, -0.15599118173122406, 0.20926110446453094, -0.15180979669094086, -0.252344012260437, -0.1708916276693344, 0.11805687099695206, 0.12193427979946136, -0.4806411564350128, -0.6055328249931335, 0.07662257552146912, 0.6977024674415588, -0.7147383093833923, 0.1080974414944648...
reference to User** If you have lazy loading on the User, you need to define all members of the User class virtual. NHibernate will create a so called proxy. The proxy is a classed defined at runtime which derives from User. Your code is accessing it as User and is not aware that is is a subclass. But when you access ...
[ -0.27232828736305237, 0.17881403863430023, 0.2679848372936249, 0.140616312623024, -0.14331772923469543, -0.052281979471445084, 0.0873669981956482, 0.01067106518894434, -0.024999387562274933, -1.0127477645874023, 0.3625469505786896, 0.32489243149757385, -0.5707696080207825, 0.54886937141418...
of type User, no proxies. You don't need to have anything virtual. **Lazy loading on the list of comments** If you use lazy loading on the list of comments, it is the list itself that implements the lazy loading. If you access the list the first time, it is loaded from the database. NHibernate uses a list that implem...
[ -0.13589569926261902, -0.14332185685634613, 0.11565274745225906, -0.018217511475086212, -0.25264668464660645, -0.10851180553436279, -0.002151530934497714, 0.01597634330391884, -0.1366872936487198, -0.6697276830673218, 0.08639823645353317, 0.7205295562744141, -0.6430246233940125, 0.03480527...
good thing, and you application does not have to care about it much. But there are some risks. For instance, if you serialize a instance, and it is a proxy, you get a not initialized proxy instead of anything useful. Lazy loading only works as long as the session is open. It is not always faster to use lazy loading. If...
[ 0.03491806983947754, 0.0008210802334360778, 0.025327147915959358, 0.1311073750257492, -0.35521435737609863, -0.3583690822124481, 0.3159797787666321, 0.21729609370231628, -0.17093007266521454, -0.5667752623558044, 0.13415054976940155, 0.5512716770172119, -0.4318176805973053, 0.2775974869728...
in my application? Most probably yes. I think, only small and rather trivial applications don't need lazy loading. If you have a system with many persistent classes, you'll need lazy loading.
[ 0.03462059050798416, 0.11374165862798691, 0.13782894611358643, 0.20457354187965393, -0.03722098842263222, -0.0698472112417221, 0.2472592294216156, 0.41027048230171204, -0.4302918612957001, -0.4840846657752991, -0.07103175669908524, 0.46981269121170044, -0.1749148964881897, 0.08239652961492...
Needs to be padded to this: str\_pad($Month, 2, "0", STR\_PAD\_LEFT) but how/where??? ``` /*******creates the month selection dropdown array****/ function createMonths($id='month_select', $selected=null) { /*** array of months ***/ $months = array( 1=>'Jan', 2=>'F...
[ -0.21657314896583557, 0.3709845244884491, 0.7102259993553162, -0.24572442471981049, 0.33925843238830566, 0.1346137970685959, -0.11869779974222183, -0.15940800309181213, -0.6291282176971436, -0.29334259033203125, -0.25002482533454895, 0.3377743661403656, 0.16479741036891937, 0.1941967308521...
4=>'Apr', 5=>'May', 6=>'Jun', 7=>'Jul', 8=>'Aug', 9=>'Sep',
[ -0.028964640572667122, 0.1802908480167389, 0.583721935749054, -0.24492162466049194, -0.40435510873794556, 0.788246214389801, 0.31307312846183777, 0.5326581597328186, -0.0032238932326436043, -0.23938067257404327, -0.6923473477363586, 0.060265589505434036, 0.04802927374839783, 0.272777795791...
10=>'Oct', 11=>'Nov', 12=>'Dec'); /*** current month ***/ $selected = is_null($selected) ? date('m') : $selected; $select = '<select name="'.$id.'" id="'.$id.'">'."\n"; foreach($months as $key=>$mon) {
[ -0.3792327046394348, -0.29042962193489075, 0.6084778904914856, -0.1553632915019989, 0.40538039803504944, 0.4612520635128021, -0.05395590886473656, 0.4207620918750763, -0.5762425661087036, -0.3774931728839874, -0.4556835889816284, 0.03449825569987297, 0.05360334366559982, 0.5289502143859863...
$select .= "<option value=\"$key\""; $select .= ($key==$selected) ? ' selected="selected"' : ''; $select .= ">$mon</option>\n"; } $select .= '</select>'; return $select; } /********displays the month selection with current month selected/*******</br> echo createMon...
[ -0.19256971776485443, -0.3050728142261505, 0.6044223308563232, -0.2644987106323242, 0.34489142894744873, 0.4977187514305115, -0.19983316957950592, -0.20077304542064667, -0.5811200141906738, -0.2571748197078705, -0.3880789279937744, 0.3212745785713196, -0.14013949036598206, 0.35814619064331...
want to be padded, it's here: ``` $select .= "<option value=\"$key\""; ``` becomes ``` $select .= '<option value="'.str_pad($key, 2, "0", STR_PAD_LEFT).'"'; ``` This assumes that you don't want it padded when you're doing the check against `$selected`, if you do, you need to do it at the beginning of the loop, ov...
[ -0.06051969155669212, -0.2180638462305069, 0.7797998189926147, -0.30653536319732666, 0.6938042640686035, 0.08117210865020752, -0.1393435299396515, -0.4535049498081207, -0.6818230152130127, -0.34254440665245056, -0.36773380637168884, 0.7739967703819275, 0.0021162007469683886, -0.20555397868...
Does anybody know any Ruby on Rails time\_select plugins that have only one select box? So the select box has entries like "9:00 AM", "9:15 AM", etc.? I have seen a few plugins, but nothing like this. Thanks! So you want every possible time in 15 minute increments in one select list? I'd really recommend doing it usi...
[ 0.5981180667877197, -0.02912527695298195, -0.17870159447193146, 0.2560117244720459, 0.07937696576118469, -0.10540445148944855, 0.550187885761261, 0.5087669491767883, -0.4277559518814087, -0.5610834956169128, 0.22152726352214813, 0.6041175127029419, 0.01613861694931984, -0.00190838798880577...
I am working on a web based application that will need to store usernames and passwords. Account information will be needed to perform secondary authentication on behalf of users so I can't simply store usernames and passwords using one-way hashing with salt etc. Assuming that my basic requirement can't change, any su...
[ 0.5706625580787659, 0.23202431201934814, 0.21712492406368256, 0.14616361260414124, 0.20153428614139557, -0.2991642355918884, 0.09293872117996216, -0.15388719737529755, -0.24444366991519928, -0.4903881549835205, 0.11748239398002625, 0.42847368121147156, 0.08504582941532135, 0.16954267024993...
I'm trying to achieve a layout in html that looks exactly like this when printed: ``` Comments: _____________________________________________ _______________________________________________________ ``` ...where the underlined portion is a single input tag of some kind — meaning it could also be a textarea or somethi...
[ 0.27510079741477966, 0.3033648729324341, 0.6057794690132141, -0.21135717630386353, -0.2613082230091095, 0.12404569983482361, -0.027314212173223495, -0.2198486626148224, -0.28952619433403015, -1.0419633388519287, 0.1135261133313179, 0.44601893424987793, -0.2538861334323883, -0.1646992266178...
print: I have do nearly everything client-side. The reason is that I have to visually re-create a paper document from an outside company to be an exact match when the page is printed from a browser. This is part of an internal "forms" system that pre-dates me with this company. It's set up so these forms automatically...
[ 0.7508797645568848, 0.2366287261247635, 0.5645656585693359, -0.2329574078321457, 0.026425382122397423, -0.038012370467185974, -0.22364981472492218, -0.20337355136871338, -0.051124803721904755, -0.7436530590057373, 0.2158883661031723, 0.5555756688117981, -0.18117596209049225, -0.19722247123...
<textarea id="txtArea" style="text-decoration: underline;"></textarea> <div style="position: absolute; left: 5px; top: 5px;">Comments:</div> </div> ``` You'll have to style the textarea a bit to get the effect you desire.
[ 0.40048524737358093, -0.03188582509756088, 0.5174658894538879, -0.10239167511463165, -0.253997802734375, -0.06775444000959396, 0.29439762234687805, -0.08550459146499634, 0.2013774812221527, -0.56548672914505, -0.3819948732852936, 0.6650002002716064, -0.05566710978746414, -0.387835681438446...
I would like to authenticate username and passwords for my application on a windows operating system with any directory service. For example it could be microsoft active directory, Novell eDirecotry, or SunOne. I already know how to do this code natively for Microsoft Active Direcotry with c#. ( I totally gave up using...
[ 0.47087299823760986, 0.23252661526203156, 0.2815103232860565, 0.092718705534935, 0.03488520532846451, -0.42438259720802307, 0.6792921423912048, -0.13181811571121216, 0.23584206402301788, -0.6929247379302979, 0.0060461582615971565, 0.6712021827697754, -0.22886541485786438, 0.205950632691383...
told to use the same code as active direcotry, but the ldap connecton string is a little different.(<http://forums.asp.net/t/354314.aspx>) (<http://technet.microsoft.com/en-us/library/cc720649.aspx>) To complicate my project, most customers use a "Service account:" which means i need to bind with an administrative use...
[ 0.5343862771987915, 0.1491493433713913, 0.30193305015563965, 0.05557149648666382, -0.06824558228254318, -0.16199731826782227, 0.46904876828193665, -0.18677403032779694, 0.21132498979568481, -0.488224059343338, -0.009795211255550385, 0.694335401058197, -0.31961339712142944, 0.16870786249637...
service account is not imporant at all. If all I care about is authenticating a username and password on a windows machine why do i even need to use ldap? I mean think about it. When you login to your machine in the morning, you do not have to provide a service account just to login. I can easily authenticate a usernam...
[ 0.17762765288352966, 0.10437294095754623, 0.42276474833488464, -0.08590096980333328, -0.06729118525981903, -0.153069406747818, 0.6052566170692444, 0.12173450738191605, -0.02125835232436657, -0.8206807374954224, 0.08225513994693756, 0.6125478148460388, -0.24005727469921112, 0.12219347804784...
the windows operating system that i am on and will tell me if a username and password is valid for the domain that it is on. Am i right? If so what suggested ways do you guys have? Michael Evanchik www.MikeEvanchik.com All this can be done with System.DirectoryServices.Protocols. If you create an LdapConnection to the...
[ 0.6818355917930603, 0.3155158460140228, 0.2507176697254181, 0.021811824291944504, 0.18781940639019012, -0.2544271647930145, 0.6255272626876831, 0.3143171966075897, -0.11535146832466125, -0.5048511028289795, -0.24076545238494873, 0.368147075176239, -0.06320135295391083, -0.04137500375509262...
your LDAP server. Also, do you expect that each user will provide their distinguished name when logging in? With Active Directory, only the sAMAccountName is required, yet other providers like eDirectory and SunONE require the distinguished name for authentication. To perform this type of authentication, you would n...
[ 0.036783862859010696, -0.12114056199789047, 0.3981580436229706, 0.19353528320789337, -0.38402488827705383, -0.5797820687294006, 0.26869329810142517, -0.08068858832120895, 0.04167987033724785, -0.7651614546775818, -0.1915460079908371, 0.5265002846717834, -0.4878823757171631, 0.0000922046601...
Active Directory which will be happy with just the sAMAccountName.
[ -0.13118523359298706, -0.20113274455070496, 0.5669026374816895, -0.006700756493955851, 0.06218395009636879, -0.13252492249011993, -0.017628666013479233, 0.22021201252937317, -0.28985360264778137, -0.5799599289894104, -0.3203219473361969, 0.7208434343338013, -0.1277846395969391, -0.08020608...
I have a development database that has fees in it. It has a feeid, which is a unique key that is the identifier. The problem I run into is that the feeid/fee amount may not match when putting updating the table on a production server. This obviously could lead to some bad things happening, like overcharging for somethi...
[ 0.8328222632408142, 0.16663090884685516, 0.14418768882751465, 0.45287278294563293, 0.19357235729694366, -0.4555797576904297, 0.007667705416679382, -0.2637418508529663, -0.12778489291667938, -0.4466301202774048, 0.3783706724643707, 0.5903638005256653, -0.14846573770046234, 0.344543159008026...
you need to hard code an ID somewhere, create another column for it. So-called "natural keys" are more trouble than they're worth 2. If, for some reason, you decide that either you will not or cannot follow the first rule, don't use any automatically generated key values.
[ 0.21784310042858124, 0.062177758663892746, -0.09658188372850418, 0.42978981137275696, 0.2742801904678345, -0.3362431228160858, 0.3032974302768707, -0.13213124871253967, -0.16539821028709412, -0.4573211669921875, -0.2350372076034546, 0.5937643051147461, -0.158656045794487, -0.16228249669075...
For one particular issue in the architecture of an application I'm working on, interfaces seem to be a nice solution. Specifically, some "business objects" depend on a bunch of settings that are pulled from the database in the actual app. Letting those business objects ask for an interface (through *Inversion of Contro...
[ 0.007772822864353657, 0.15273050963878632, 0.2524433732032776, 0.14261244237422943, -0.005290790926665068, -0.02317052148282528, 0.174379363656044, -0.2034883052110672, -0.09050937741994858, -0.7364930510520935, -0.07797683030366898, 0.6125887632369995, -0.5146253108978271, -0.257772386074...
function getMySetting: String; end; TDatabaseSettings = class(..., IMySettings) //... end; TMyBusinessObject = class(TInterfacedObject, IMySettings) property Settings: IMySettings read FSettings write FSettings; end; var DatabaseSettings: TDatabaseSettings; // global object (normally placed in a contr...
[ -0.2645588219165802, -0.4066867530345917, 0.639514148235321, 0.10490037500858307, 0.1845661699771881, 0.10608378052711487, 0.18995264172554016, -0.23310910165309906, -0.2861461937427521, -0.6125321984291077, 0.017903998494148254, 0.5204620361328125, -0.4930323362350464, 0.31631284952163696...
mechanism for the `TDatabaseSettings` class, so I can continue to manage the `DatabaseSettings` as a normal object (which is much more consistent with the rest of the app). **So, in summary, my question is: how do I disable the interface reference counting mechanism for a particular class?** I've been able to find so...
[ 0.028046032413840294, 0.08094299584627151, 0.2103380709886551, 0.2457653135061264, -0.021864430978894234, -0.18861278891563416, 0.47920918464660645, -0.21429409086704254, -0.23179173469543457, -0.6368132829666138, 0.061075542122125626, 0.8119358420372009, -0.45646825432777405, -0.076946057...
but the question is if you really want that. If you want to use interfaces, you better use them completely. So as you have experienced it, you get problems if you mix class and interface variables. ``` var // DatabaseSettings: TDatabaseSettings; DatabaseSettings : IMySettings; //Now, in some function... O := TMy...
[ -0.05996746942400932, -0.05861899256706238, 0.352225661277771, 0.08591462671756744, 0.0403449721634388, -0.0026748310774564743, 0.28015708923339844, -0.1563659906387329, -0.2530801594257355, -0.8126600980758667, -0.04267448931932449, 0.7156721949577332, -0.5557915568351746, -0.052095584571...
the object has been created. If you really want to disable reference counting, you just have to create a new descendant of TObject that implements IInterface. I have tested the example below in D2009 and it works: ``` // Query Interface can stay the same because it does not depend on reference counting. function TMyI...
[ -0.236544668674469, -0.025365008041262627, 0.7041957974433899, -0.16670918464660645, -0.12140481919050217, -0.0643479973077774, 0.5067453980445862, -0.4810686409473419, -0.0869588702917099, -0.7885157465934753, -0.09916940331459045, 0.5622299313545227, -0.4724563658237457, 0.44994059205055...
Destroy; end; function TMyInterfacedObject._AddRef: Integer; begin Result := InterlockedIncrement(FRefCount); end; function TMyInterfacedObject._Release: Integer; begin Result := InterlockedDecrement(FRefCount); if Result = 0 then Destroy; end; ``` FreeRef just lowers the refcount just like \_Release....
[ 0.11491382867097855, 0.09316386282444, 0.28821417689323425, -0.31132662296295166, 0.19897231459617615, -0.2825256288051605, 0.36576780676841736, -0.40817150473594666, -0.16538496315479279, -0.49605119228363037, -0.412733793258667, 0.7912963628768921, -0.47527170181274414, 0.349934220314025...
I am watching the ASP.NET learn videos on asp.net/learn. In this tutorial, they are building a quiz engine. At one point, the narrator explains that we are going to use the Session object to maintain the state between each page (each page contains a question and four answers). He says that "since this is a low traffic ...
[ 0.41977185010910034, 0.029378285631537437, 0.2961072325706482, 0.24561282992362976, -0.14563612639904022, -0.1495191603899002, 0.5269757509231567, 0.2781011462211609, -0.09042959660291672, -0.5699222683906555, 0.10220329463481903, 0.41219562292099, 0.05851907655596733, 0.0781131461262703, ...
in a database, or in cookies or some other method that is not directly tying up web server memory. In addition to load, session also raises issues with the ability to use farms since you would either need to synchronize the session across the farm, or make sessions sticky, which can impact scalability.
[ 0.42510083317756653, 0.012191547080874443, -0.2894435226917267, 0.2909315526485443, -0.028645621612668037, -0.26523369550704956, 0.39133554697036743, -0.19148461520671844, -0.5093798041343689, -0.4987110495567322, -0.048422832041978836, 0.18038992583751678, -0.2705550789833069, 0.297748416...
I have various files that I want to be ignored by SVN when committing. I know that I can go into TortoiseSVN and ignore them in various ways. I know that I can run svn propedit svn:ignore from the command line to do the same thing. The problem is that I have to have everyone on my team to do that, which is a pain. Is ...
[ 0.5582430362701416, 0.20726120471954346, 0.31000104546546936, -0.0026159195695072412, 0.01748141273856163, -0.2830289602279663, 0.5436445474624634, -0.10247078537940979, -0.7193654775619507, -0.4230920374393463, 0.10097267478704453, 0.7428052425384521, -0.1340329498052597, 0.30078604817390...
(either using TortoiseSVN or the commandline), you should commit these changes. As soon as your team-members update their working copies, they will also have the svn:ignore properties set, and the files/folders listed in the properties will be excluded from commits. See this page for details: [TortoiseSVN - Ignoring ...
[ 0.11165336519479752, 0.06460419297218323, 0.5254719853401184, -0.08785755932331085, 0.23941278457641602, -0.1949487328529358, 0.4989389181137085, -0.30670085549354553, -0.9495288133621216, -0.2628929615020752, -0.4710499048233032, 0.5805894732475281, -0.38404130935668945, 0.088273406028747...
For example, in SQLServer, if I have an index with 'unique' set on it, how is that different from a key? How do I know when I want to use a Key vs. an Indexed field? An field which has unique values is, essentially, a key. However, a key is used to uniquely identify a row in a table, while an index is used to sort, or...
[ 0.07700783759355545, -0.0625193864107132, 0.04320039972662926, 0.2397758513689041, 0.06853196024894714, -0.25569266080856323, -0.29750996828079224, -0.07915060967206955, -0.10299111902713776, -0.5758572220802307, -0.15057224035263062, 0.34381628036499023, -0.10507480055093765, 0.4282091259...
When I accidentally click on the Database Diagrams tab, I get one of the following errors: > Database diagram support objects > cannot be installed because this > database does not have a valid owner. > To continue, first use the Files page > of the Database Properties dialog box > or the ALTER AUTHORIZATION stat...
[ 0.28177207708358765, 0.11543704569339752, 0.768704891204834, 0.07525014877319336, 0.10123033821582794, -0.30587852001190186, 0.28841254115104675, -0.3169557452201843, -0.1330377757549286, -0.8855845332145691, 0.02819829247891903, 0.6415578722953796, -0.3066781759262085, 0.2957826256752014,...
create them? What's the syntax for changing the owner of this database to 'sa'? to change the object owner try the following ``` EXEC sp_changedbowner 'sa' ``` that however is not your problem, to see diagrams the Da Vinci Tools objects have to be created (you will see tables and procs that start with dt\_) after t...
[ 0.47932958602905273, -0.061981815844774246, 0.17261101305484772, 0.11561041325330734, -0.1931677907705307, 0.21600545942783356, 0.19388137757778168, -0.007895344868302345, -0.44892778992652893, -0.7709746360778809, -0.05308746546506882, 0.3175208568572998, -0.4996850788593292, 0.0820352286...
I read most questions on StackOverflow with regards to `GetHashCode`. But I am still not sure whether I have to override `GetHashCode` on reference types. I picked up the following from someones answer in another question: > Object.GetHashCode() uses an internal > field in the System.Object class to > generate the h...
[ -0.12894073128700256, 0.09507716447114944, 0.3894854485988617, -0.0029445153195410967, -0.1188761293888092, -0.12054484337568283, 0.2235250174999237, -0.3467855453491211, -0.3438097834587097, -0.646744966506958, -0.040508609265089035, 0.18259364366531372, -0.31977763772010803, 0.3812942802...
please confirm?), then the only problem I see with the default implementations of reference types is that the hash code will have a poor distribution. I'll break up my questions: a) So it it recommended to override `GetHashCode` too if it is used in a `Dictionary` or does the default implementation perform just fine...
[ 0.3474632501602173, 0.3952547013759613, 0.10258323699235916, 0.12411387264728546, -0.04839754104614258, -0.3869554102420807, 0.4194362461566925, -0.2516706883907318, -0.1008741557598114, -0.28508415818214417, 0.053069137036800385, 0.6208943724632263, -0.21846584975719452, 0.195425659418106...
you override Object.Equals(). The reason for this is simple - normally, 2 references will always be distinct (a.Equals(b)==false, unless they're the same object). The default implementation of GetHashCode() will provide 2 distinct hashes in this case, so all is good. If you override Equals(), though, this behavior is...
[ -0.12154083698987961, 0.08502120524644852, 0.3906693160533905, -0.06817277520895004, 0.21416091918945312, -0.4301470220088959, 0.6016221642494202, -0.19624711573123932, -0.05226653441786766, -0.37172505259513855, 0.06857936084270477, 0.6138042211532593, -0.4801326096057892, 0.0513806901872...
I want to use speech recognition in my project and I found this code but when I run it I get an error which is: > ``` > run: java.lang.NullPointerException > at newpackage.HelloWorld.main(HelloWorld.java:55) > > ``` Please could one of you help me in this problem? This is the server code that I use: ``` pa...
[ -0.10500327497720718, 0.08770200610160828, 0.537995457649231, -0.330219030380249, -0.2522200047969818, 0.009432841092348099, 0.6776840686798096, -0.5315254926681519, 0.025273041799664497, -0.578336775302887, -0.41431140899658203, 0.7082691788673401, -0.37124180793762207, 0.1875909715890884...
= r.getBestTokens(); for (int i = 0; i < tokens.length; i++) System.out.print(tokens[i].getSpokenText() + " "); System.out.println(); try { // Deallocate the recognizer and exit rec.deallocate(); } catch (EngineException ex) { Logger.getLogger(HelloWorld.class.getNa...
[ -0.6002210974693298, -0.48519349098205566, 0.7670657634735107, -0.29917922616004944, 0.1663580983877182, 0.03533782437443733, 0.43032389879226685, -0.5820834040641785, -0.07329651713371277, -0.28664806485176086, -0.6371461153030396, 0.6304736137390137, -0.4360477328300476, 0.33443543314933...
} System.exit(0); } public static void main(String args[]) { try { // Create a recognizer that supports English. rec = Central.createRecognizer( new EngineModeDesc(Locale.ENGLISH)); // Start up the recognizer rec.allocate(); // Load the grammar from a file, and...
[ -0.23938921093940735, -0.13751758635044098, 0.4454367756843567, -0.2444676011800766, 0.11233220994472504, -0.12054253369569778, 0.6906135678291321, 0.025326821953058243, 0.14848020672798157, -0.5797208547592163, -0.5836493372917175, 0.6976768374443054, -0.5779291391372681, 0.32589110732078...
RuleGrammar gram = rec.loadJSGF(reader); gram.setEnabled(true); // Add the listener to get results rec.addResultListener(new HelloWorld()); // Commit the grammar rec.commitChanges(); // Request focus and start listening rec.requestFocus(); rec.resume(); } catch (E...
[ 0.11521207541227341, -0.22334739565849304, 0.7466761469841003, -0.23503990471363068, 0.03674387186765671, -0.15776054561138153, 0.7219840288162231, -0.6662677526473999, -0.28841403126716614, -0.516255795955658, -0.35391896963119507, 0.768743097782135, -0.4971729815006256, 0.196847259998321...
to use # before your ids ``` $('#rate-<%=Model.EntityId%>').hide(); $('#login-<%=((GigItModel)Model).EntityId%>').show(); ```
[ 0.39757779240608215, -0.2713487446308136, 0.36443307995796204, -0.0046594953164458275, 0.238615944981575, -0.1759943664073944, 0.21859292685985565, -0.21571896970272064, -0.05383297801017761, -0.6137148141860962, -0.1751193404197693, 0.4984900653362274, -0.290058434009552, 0.05921538919210...
I'm trying to dynamically load modules I've created. Right now this works properly: ``` import structures.index ``` But if I try the same thing by importing it dynamically, it fails. ``` struct = __import__("structures.index") ``` Error supplied is: ``` Error ('No module named structures.index',) ``` Any idea...
[ -0.02187434770166874, -0.10235607624053955, 0.19017456471920013, 0.004248741082847118, -0.0646435096859932, -0.1849239319562912, 0.4202045798301697, -0.3353087306022644, -0.49583277106285095, -0.5644716620445251, -0.30631256103515625, 0.7704945802688599, -0.4844004809856415, -0.07262714207...
ended up being what worked. Not sure why (yet), but the `fromlist` had to be something "anything apparently, since it worked when I put the letter "a" as a value (strange, given that the file only had 1 class in it). ``` def get_struct_module(self, name): try: return = __import__("neoform.structures." + na...
[ -0.002921150764450431, -0.008247872814536095, 0.25088387727737427, -0.2554532587528229, 0.06356237828731537, -0.138827383518219, 0.6886883974075317, -0.4698948264122009, -0.21223755180835724, -0.33266890048980713, -0.27725639939308167, 0.6389644742012024, -0.27294304966926575, -0.052098397...
in fact, work, but it doesn't assign the module name in the current scope. To do that (and then use a class in the dynamically imported module), you'll have to use: ``` structures = __import__('structures.index') structures.index.SomeClass(...) ``` The complete details on `__import__` are available [here](http://doc...
[ 0.2877665162086487, 0.016296232119202614, 0.2032773494720459, -0.3537474572658539, 0.006302830763161182, -0.3469548523426056, 0.013477418571710587, -0.7755730152130127, -0.5120461583137512, -0.34787845611572266, -0.49466490745544434, 0.7730288505554199, -0.4204883873462677, -0.241710230708...
can import their `index` modules and instantiate some `MyClass` class for each using the following code: ``` modules = [ __import__('neoform.%s.index' % pkg, fromlist=['a']) for pkg in packages ] objects = [ m.MyClass() for m in modules ] ```
[ -0.10229604691267014, -0.09415939450263977, 0.40306127071380615, -0.09391768276691437, 0.05970175191760063, -0.008866125717759132, 0.1897871494293213, -0.3492877185344696, -0.4521920084953308, -0.6418476104736328, -0.6764376163482666, 0.5784650444984436, -0.2416052222251892, -0.00317299435...
tar -xvzf $filename.tar.gz || { exit $?; } Here my scripts would exit with errorCode 141. I am using Fedora Core 6 with tar version 1.15 it wont happen all the time, but more than 70 percent of the time it fails. As a workaround we are now using cpio for archiving, that works fine for us now, although I would want to...
[ 0.3285692632198334, 0.1613410860300064, 0.1571684628725052, -0.0401122123003006, -0.07008343189954758, -0.0676860511302948, 0.28469181060791016, 0.5179824233055115, -0.08072910457849503, -0.5499094128608704, 0.35598039627075195, 0.8500708341598511, -0.4322964549064636, 0.25149938464164734,...
All the tables in my schema have a prefix of dbo. Now in my sql statements, I don't like using dbo.tablename all the time. Any workarounds or configuration changes? Actually you should leave those dbo. statements because you SQL will be faster since the optimizer doesn't have to lookup the schema Check out this link a...
[ 0.06778369098901749, 0.46564987301826477, 0.05442798137664795, -0.24069200456142426, -0.18380722403526306, -0.18757939338684082, 0.1798783540725708, -0.14317375421524048, -0.46135905385017395, -0.43062132596969604, 0.05864831805229187, 0.4887486398220062, -0.12499143928289413, 0.1500289738...
I got some set of base classes within one namespace and few sets of derived classes in other namespaces. Everything in one project. Something like: ``` Namespace Base Public Class BaseElement Protected Friend Readonly Property SubElements() as BaseElements End Class End Namespace ... Namespace Books Public Class B...
[ 0.17672975361347198, 0.25111907720565796, 0.18084971606731415, 0.1203267052769661, -0.037549927830696106, -0.14489170908927917, 0.19670262932777405, -0.4065033495426178, 0.1379820555448532, -0.5162914395332336, -0.09493477642536163, 0.2599056661128998, -0.07051102817058563, 0.3813621401786...
BaseElement class. But in this case I cannot access this property from other classes in Base namespace that are not derived from it. I tried adding Friend keyword, but it made this property visible when I'm instantiating derived classes too. So... any way to hide some properties when using derived classes while bein...
[ 0.24853025376796722, -0.2544839382171631, -0.17257097363471985, 0.18039555847644806, -0.11148714274168015, -0.20732754468917847, 0.2444983869791031, 0.035543523728847504, -0.17378251254558563, -0.6106240153312683, 0.06866763532161713, 0.23963205516338348, -0.15301355719566345, 0.3255437910...
I have a managed code Windows Service application that is crashing occasionally in production due to a managed StackOverFlowException. I know this because I've run adplus in crash mode and analyzed the crash dump post mortem using SoS. I have even attached the windbg debugger and set it to "go unhandled exception". My...
[ 0.32206037640571594, 0.36955541372299194, -0.09502331167459488, -0.14428767561912537, -0.03669092804193497, -0.14680540561676025, 0.5278892517089844, 0.10681747645139694, -0.22815634310245514, -0.8165045380592346, -0.08552351593971252, 0.6948375701904297, -0.1019362136721611, 0.29184034466...
using that tool, does anyone have any suggestions as to how I can get a stack trace out of the offending thread? Here's what I'm doing. > !threads > > > ... > > > XXXX 11 27c 000000001b2175f0 b220 Disabled 00000000072c9058:00000000072cad80 0000000019bdd3f0 0 Ukn System.StackOverflowException (0000000000c010d0) > ...
[ 0.03032616712152958, 0.1443427950143814, 0.2923048436641693, -0.06953229755163193, 0.16995999217033386, -0.2560562491416931, 0.20412814617156982, -0.11223296076059341, -0.41342824697494507, -0.5564703345298767, 0.28947222232818604, 0.47004297375679016, -0.08948570489883423, 0.3501036167144...
point - any stack trace you try to get may be corrupted and can easily point you in the wrong direction. Ie, once the StackOverflowException occurs, it's too late. Also, according to [the documentation](http://msdn.microsoft.com/en-us/library/system.stackoverflowexception.aspx) you can't catch a StackOverflowException...
[ 0.026331869885325432, 0.029861271381378174, 0.25089308619499207, 0.0408245250582695, 0.0448809377849102, -0.3803076446056366, 0.338515967130661, 0.06411644071340561, -0.10156503319740295, -0.19281765818595886, -0.007896517403423786, 0.11868380755186081, -0.2185739278793335, 0.1959254890680...
stack overflow, and putting in some sort of markers so you can get an idea where they occur *before* they occur. Eg, obviously any recursive methods are the first place to start, so give them a depth counter and **throw your own exception** if they get to some "unreasonable" value that you define, that way you can actu...
[ -0.07075531780719757, 0.0895046591758728, 0.005464776419103146, 0.04665759950876236, -0.04805053398013115, -0.2789425253868103, 0.1603645533323288, -0.22184400260448456, -0.3846352994441986, -0.35961633920669556, -0.1528186947107315, 0.3471148908138275, -0.16179491579532623, -0.20163154602...
I am looking for suggestions on how to handle a csv file that is being created, then uploaded by our customers, and that may have a comma in a value, like a company name. Some of the ideas we are looking at are: quoted Identifiers (value "," values ","etc) or using a | instead of a comma. The biggest problem is that w...
[ 0.36059269309043884, 0.32047784328460693, 0.23444817960262299, 0.14107051491737366, -0.060419876128435135, -0.20008215308189392, -0.40793225169181824, 0.07406248897314072, -0.17025655508041382, -0.4671509563922882, 0.025660879909992218, 0.5992359519004822, -0.21825768053531647, 0.060153301...
returns. By the way, this is unit-tested code. I’m posting it now because this question seems to come up a lot and others may not want an entire library when simple CSV support will do. You can use it as follows: ```cs using System; public class test { public static void Main() { using ( CsvReader re...
[ 0.33160895109176636, 0.09789396077394485, 0.200127512216568, -0.10378608852624893, -0.15692248940467834, 0.11662598699331284, 0.5058251619338989, -0.283286452293396, -0.01767791248857975, -0.7142676115036011, -0.04516478627920151, 0.3388511836528778, -0.28945472836494446, 0.433847188949584...