text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
does. Spring is just creating and wiring up the objects for you. Each request from the browser is processed in one request. It is Tomcat that handles the request. It is Tomcat that creates the thread to process the request. Assuming you have just created a singleton bean in Spring called "X". Then the same instance o...
[ 0.29477864503860474, -0.17629733681678772, 0.12673735618591309, 0.08920981734991074, -0.07532280683517456, 0.09824754297733307, -0.1947859823703766, 0.003383420407772064, -0.5109912157058716, -0.333823561668396, -0.03227008134126663, 0.09191184490919113, -0.4028252959251404, 0.121830210089...
Can anyone help me with this error. It works when I try the first procedure but not the second when I enter two numbers. Any ideas? ``` create or replace package LE2_P1 is procedure GENERATE_MULTIPLICATION_TABLE(p_axis_both in number); procedure GENERATE_MUTLIPLICATION_TABLE(p_axis_x in number, p_axis_y in number); en...
[ -0.15693557262420654, 0.11595895141363144, 0.4680955111980438, -0.09858949482440948, -0.08660291135311127, 0.12500162422657013, 0.2309732884168625, -0.31707748770713806, -0.182285875082016, -0.7309578657150269, -0.2380508929491043, 0.484895795583725, -0.2986592650413513, 0.0525530539453029...
eb loop dbms_output.put(CHR(9) || to_char(xyz * (bb + xyx - 1))); end loop; dbms_output.put_line(CHR(13) || CHR(10)); end loop; end GENERATE_MUTLIPLICATION_TABLE; end LE2_P1; / declare x number := 5; y number := 3; begin LE2_P1.GENERATE_MULTIPLICATION_TABLE(x,y); end; / ``` Looks bogus to me - the 'e' parameter certa...
[ -0.08563937246799469, -0.14920452237129211, 0.4404071867465973, -0.448727548122406, 0.017524514347314835, -0.07318706065416336, 0.41686421632766724, -0.2322632521390915, -0.1582007259130478, -0.4252863824367523, -0.5728185176849365, 0.5367843508720398, -0.6509831547737122, 0.27643501758575...
Okay I have two variables in PHP ``` $username; $password; ``` which are initialized to the data retrieved from $\_POST variable :) I have this SQL query ``` $sql = "SELECT * FROM users WHERE username = '" . $username . "' AND password = '" . $password . "')"; ``` But this doesn't works and returns me nothing :(...
[ -0.11924612522125244, 0.2831827998161316, 0.8790703415870667, -0.0788680836558342, 0.0557093471288681, -0.07624606043100357, 0.6815317273139954, -0.055326953530311584, 0.016656702384352684, -0.5069606304168701, 0.07340490818023682, 0.7172853350639343, -0.2750107944011688, -0.06028082221746...
What I'm looking for is a clean method to round the corners of all inputs with the class "submit". I've experimented with a number of javascript techniques, but none worked well for form elements. Pure CSS would be great, but, note, the button needs to expand, and will have arbitrary text. Other methods required really...
[ 0.08030828833580017, 0.009752503596246243, 0.4709832966327667, 0.046199098229408264, -0.3174029588699341, 0.23143604397773743, 0.11809538304805756, -0.3408852517604828, 0.009163033217191696, -0.7492721676826477, 0.23972946405410767, 0.37367311120033264, -0.15727564692497253, 0.171944066882...
5px; border-radius: 5px; border: 1px solid gray; padding:0 3px 0 3px; display:inline-block; text-decoration:none; background:#595651; color:#FFFFFF; cursor:pointer; font:11px sans-serif; } .input-rounded-button:hover { text-decoration:none; color:#ADD8E6; cursor:poin...
[ -0.42801421880722046, 0.0771675780415535, 0.9163379073143005, 0.18483373522758484, -0.03271770849823952, 0.5618873238563538, 0.26104024052619934, -0.3233855068683624, -0.3879960775375366, -0.3889787197113037, -0.5006693601608276, 0.1338263750076294, -0.08403214812278748, 0.0867684856057167...
How can i put the result of a sql server query into a "comma delimited" format? You should be able to go to `Tools->Options->Query Results` in SQL Server Management Studio and set the preferences there to output to a text file. Then expand that and in "Result to Text" you can set the output format there.
[ 0.28865817189216614, -0.14004963636398315, 0.23754043877124786, 0.2625284194946289, 0.10105089098215103, -0.3138284385204315, -0.329486608505249, -0.305349737405777, -0.12720733880996704, -0.7079139351844788, 0.03233839571475983, 0.6163511276245117, -0.08635128289461136, -0.044112429022789...
I have two disconnected sql servers that have to have correlated queries run between them. What is the best way to run a query such as: ``` select * from table where id in (1..100000) ``` Where the 1..100000 are ids I'm getting from the other database and are not contiguous. The in clause doesn't support that many ...
[ 0.10002788156270981, 0.09582452476024628, 0.22775432467460632, 0.144310861825943, -0.45213499665260315, -0.14548276364803314, 0.05561975762248039, -0.17767426371574402, -0.1060912013053894, -0.40181392431259155, 0.2884925305843353, 0.33856067061424255, -0.316646546125412, 0.395960509777069...
other server directly. Once you have your link setup, you should also consider that an INNER JOIN or EXISTS will likely perform better.
[ 0.09536468237638474, -0.2996760904788971, 0.4528960585594177, 0.21056263148784637, 0.010731197893619537, -0.07072035223245621, 0.023269906640052795, 0.20351316034793854, -0.3077411949634552, -0.7759066820144653, -0.07766828685998917, 0.3175702691078186, -0.20985595881938934, 0.049542475491...
How can I call a function from an object in javascript, like for example in jquery you call myDiv.html() to get the html of that div. So what I want is this to work : ``` function bar(){ return this.html(); } alert($('#foo').bar()); ``` this is a simplified example, so please don't say : just do $('#foo').html() ...
[ 0.3158975839614868, 0.020137034356594086, 0.5554549098014832, -0.49574628472328186, -0.05265212804079056, -0.14719824492931366, 0.2787962257862091, -0.46058687567710876, -0.07931319624185562, -0.5439231395721436, -0.25478270649909973, 0.8627964854240417, -0.5630173683166504, -0.14118930697...
Take the following contents of a file: ``` "52245" "528" "06156903" "52246" "530" "00584709" ``` What pattern would match both 52245 and 52246 but nothing else? Something that can only match those two numbers and nothing else: ``` ^\"5224[56]\"$ ``` Now if you're looking for something a bit more general (for exa...
[ 0.01113857701420784, 0.41632065176963806, 0.07271603494882584, 0.05245501548051834, -0.052489906549453735, 0.11414043605327606, 0.1455027163028717, -0.2023283690214157, -0.4058278501033783, -0.4098430871963501, -0.29178303480148315, 0.36599200963974, -0.27036377787590027, -0.15379095077514...
I'm a bit of a Linq newbie, and I couldn't find any documentation to help me with what seems to be a pretty trivial problem - so your help will be much appreciated! I have a table `Table1` in database `DB1`, which has a "pseudo" foreign key `Table2ID` to table `Table2` in database `DB2`, on the same server. "Pseudo", ...
[ 0.09412850439548492, 0.6424182653427124, 0.3516796827316284, -0.06109250336885452, 0.15284758806228638, 0.02015753649175167, 0.03166298568248749, 0.17774604260921478, -0.5467347502708435, -0.49451008439064026, 0.28073543310165405, 0.03734646737575531, -0.09581752866506577, 0.38549020886421...
`Table1` object to have a relationship to `Table2`, just like it has relationships with all the "real" foreign key-related objects in `DB1`. But I can't bring `Table2` into my db diagram, because it's in the wrong DB. To synthesize this, I tried creating a view `Table2` in `DB1`, which is simply `select * from DB2..Ta...
[ -0.2578417658805847, 0.03879493847489357, 0.02305528335273266, -0.1202496737241745, 0.03256583958864212, 0.19091744720935822, -0.0759565681219101, -0.12422781437635422, -0.28187885880470276, -0.7268764972686768, -0.07734581083059311, 0.2665773928165436, -0.22122950851917267, 0.409827113151...
somewhere? Is there a better/recommended way of doing this? Thanks! --- Later... -------- Along the lines of what one person suggested, I tried filling in the partial class of `Table1` with all the methods required to access `Table2`, by copying all the structures for a related object within the same DB. This actu...
[ 0.424726277589798, 0.2734344005584717, -0.08536595106124878, 0.3088114857673645, 0.1936841905117035, -0.19371390342712402, 0.09957470744848251, 0.05159937962889671, -0.35825443267822266, -0.44156089425086975, 0.12502487003803253, 0.1626940816640854, -0.22351528704166412, 0.0313015952706337...
thought about this scenario, and decided that you are **not allowed** to connect objects in different databases. That's really a shame... :( --- ... and even later... --------------------- Thanks to @williammandra.com, I found that you need to create the primary key on a view manually. But there's still another prob...
[ 0.20588639378547668, -0.19088590145111084, 0.5332807302474976, 0.3366655707359314, -0.01168852113187313, -0.14024052023887634, 0.3110239803791046, -0.13123449683189392, -0.5134029388427734, -0.5515021085739136, 0.136260986328125, 0.63194739818573, -0.16788087785243988, 0.3754315972328186, ...
it the O/R designer can't create the relationship). Your solution to use a view gets you halfway there.... The step you are missing is setting the "Primary Key" property to true in the O/R designer for the key field in the Table2 view. You still have to create the association manually, but once you save the dbml the re...
[ 0.1552094966173172, 0.0788271352648735, 0.5787975192070007, -0.13349349796772003, -0.10741164535284042, -0.25874653458595276, 0.47674956917762756, -0.389866441488266, 0.21217525005340576, -0.44861122965812683, -0.15252161026000977, 0.7397893071174622, -0.22084715962409973, 0.21486504375934...
I want to check if a class is a subclass of another without creating an instance. I have a class that receives as a parameter a class name, and as a part of the validation process, I want to check if it's of a specific class family (to prevent security issues and such). Any good way of doing this? [`is_subclass_of()`](...
[ 0.19151966273784637, 0.19657272100448608, -0.015068810433149338, -0.1524088829755783, -0.022759264335036278, -0.1488746702671051, 0.39315369725227356, -0.20920982956886292, -0.03231605514883995, -0.5013086795806885, -0.020092984661459923, 0.5624740123748779, -0.28458139300346375, 0.2770389...
$a == $b || is_subclass_of($a, $b); } ```
[ -0.0523105263710022, 0.28022605180740356, -0.02013755962252617, -0.25974783301353455, 0.2789713144302368, -0.11838266253471375, 0.2966196537017822, -0.24113309383392334, 0.06225043907761574, -0.20726226270198822, -0.23441272974014282, 0.5240139365196228, -0.6415983438491821, 0.326520323753...
I have the following string: > FirstName=John&LastName=Doe&City=London&ConfirmationId=WXASL320330 I want to extract the confirmationId from it. I have done a split on it and passed in the & character, but this returns ConfirmationId=WXASL320330 and I just WXASL320330. What is the best way of doing this? The string i...
[ 0.26235806941986084, 0.11314809322357178, 0.6228751540184021, 0.22274717688560486, 0.10616869479417801, 0.05804106965661049, 0.023344578221440315, -0.23424237966537476, 0.15421348810195923, -0.45932358503341675, -0.08201416581869125, 0.14332418143749237, -0.13623858988285065, 0.24500076472...
As I have said in my previous questions, I'm still new to Java. I'm developing a tile-based game in Java. The movement is on a grid. I'm at the stage where I'm implementing character movement. My plan was to use the code which I pasted in [this question](https://stackoverflow.com/questions/772713/call-repaint-from-ano...
[ 0.06131710112094879, -0.1374710649251938, 0.5469995141029358, -0.455475389957428, -0.1682843565940857, 0.31144553422927856, 0.12478573620319366, -0.41829803586006165, -0.49433717131614685, -0.7617015838623047, 0.05353688448667526, 0.26457905769348145, 0.08958648890256882, -0.10027705132961...
idea was that I could have a method call before the repaint in the event for the timer, which would move all of the people 1 unit nearer to their destination (next square/tile). Would that sort of thing work? Later on in the game, there may be 100 or so people. Would 20ms be enough time to loop through all the people a...
[ 0.19093871116638184, -0.410281240940094, 0.5461868643760681, 0.36247798800468445, -0.08180519938468933, 0.2709607481956482, 0.013277487829327583, -0.16605375707149506, -0.2940400540828705, -0.777167022228241, 0.2375020682811737, 0.26463890075683594, 0.1604236215353012, -0.093217633664608, ...
can get quite a lot of game logic done in 20ms. But I'd say it's too frequently to be updating the display. You should also bear in mind that the OS generally dishes out CPU in the order of 10-20 ms timeslices-- in other words, another process at any moment could easily delay your process by about that amount of time. ...
[ 0.12084421515464783, -0.14993059635162354, 0.2647384703159332, -0.11570048332214355, 0.15955887734889984, -0.16762109100818634, 0.3406102657318115, -0.12444961816072464, -0.6059017777442932, -0.7180661559104919, 0.1298157274723053, 0.4549393057823181, 0.12551981210708618, -0.06862626224756...
sleep between frames of 100ms, then 20ms or so jitter here and there won't be too bad. But 20ms jitter when you asked for 20ms will probably be more noticeable... So I'd probably start at 10 frames per second (100ms pauses) and see how that looks. As far as the code is concerned, if your game logic will take more or ...
[ 0.5263510942459106, -0.16747207939624786, 0.41148605942726135, 0.12330279499292374, 0.22592377662658691, 0.2209264487028122, 0.42587918043136597, -0.49309635162353516, -0.4908900260925293, -0.8932102918624878, 0.2638678550720215, 0.511482298374176, 0.011379967443645, -0.1843399852514267, ...
for too long.
[ 0.4067872166633606, -0.1430419236421585, 0.17167028784751892, -0.013010547496378422, -0.30402833223342896, -0.40314939618110657, -0.05862545967102051, 0.22682207822799683, 0.06830789893865585, 0.08983392268419266, 0.19503718614578247, 0.16067245602607727, -0.12157902121543884, 0.5563989877...
I have an ASP.NET (1.1) web service which authenticates clients using a SoapExtension.ProcessMessage(SoapMessage) override as described in: <http://www.codeguru.com/columns/experts/article.php/c5479> However if the web.config if not set up such that HttpSoap is the only protocol allowed, then ProcessMessage will neve...
[ 0.23837026953697205, 0.02202134020626545, 0.3922629654407501, 0.06900130212306976, -0.12626279890537262, -0.12219427525997162, 0.5008189678192139, -0.24292214214801788, -0.25275787711143494, -0.7803710699081421, 0.1557258814573288, 0.38360118865966797, -0.14896370470523834, 0.1523037701845...
I roamed the site for this question using the search engine, and I don't think it's out there. If it is, apologies in advance and feel free to point me to it. Here is my scenario: I am setting up a web application, Moodle if anyone is familiar with it, with Apache, MySQL, and php on Windows. Moodle supports enablin...
[ 0.2076134830713272, 0.11371473222970963, 0.46776115894317627, -0.26836758852005005, -0.243013396859169, 0.0040943739004433155, 0.043041665107011795, 0.1659063994884491, -0.28099170327186584, -0.6385371685028076, -0.1860305517911911, 0.27747952938079834, -0.10460187494754791, -0.20151604712...
have logins, however there are some generic guest type logins with certain restricted privilages. Currently the MySQL database is not encrypted. My question is this: If my users do an SSL login, and the system then reverts back to http for the remainder of their session, how vulnerable is the data that is transferre...
[ 0.4547244906425476, 0.29087939858436584, 0.30092740058898926, 0.06711972504854202, -0.12480055540800095, -0.4864005744457245, 0.7313802242279053, 0.14375369250774384, -0.38252195715904236, -0.7173420190811157, -0.36858707666397095, 0.36133554577827454, -0.1561485081911087, 0.35515788197517...
extending the functionality in Moodle, I don't necessarily want to have to change it to encrypt everything if already does. I am new to the world of IT security, and my DBA skills are rusty, so if you give me an answer, type slowly so I can understand! ;) Thanks in advance! Carvell A few things. 1. The fact that the...
[ 0.20306143164634705, -0.03615659847855568, 0.41567543148994446, 0.020102165639400482, -0.1442999392747879, -0.17196005582809448, 0.39686158299446106, -0.12786127626895905, -0.2195274829864502, -0.5427405834197998, 0.09887772798538208, 0.49551743268966675, -0.12138751149177551, -0.180390805...
and web server is in that packets could be sniffed if a person was able to interject in the middle of the communication chain. However, this risk is mitigated by the fact that your on an internal network. Therefore, unless you are VERY concerned about the other people in your organization, you are more than likely ok....
[ 0.2874942123889923, 0.14437352120876312, 0.22776615619659424, 0.17039795219898224, -0.2619139552116394, -0.7276984453201294, 0.21010632812976837, -0.050053685903549194, -0.5275799036026001, -0.6609660983085632, -0.17648598551750183, 0.43231308460235596, -0.1355726271867752, 0.0862981379032...
Since PHP's [`call_user_method()`](http://php.net/call_user_method) and [`call_user_method_array()`](http://php.net/manual/function.call-user-method-array.php) are marked deprecated I'm wondering what alternative is recommended? One way would be to use [`call_user_func()`](http://php.net/manual/function.call-user-func...
[ 0.06077587604522705, 0.16993610560894012, 0.22985878586769104, 0.04179549589753151, -0.2485790103673935, -0.12050177901983261, -0.02387310191988945, -0.17898638546466827, -0.27253809571266174, -0.4623188376426697, -0.0367630235850811, 0.7019985318183899, -0.1610715687274933, 0.049856211990...
Is there a completely new technique for calling an object's methods by name? * Which is the fastest/best/official replacement? * What's the reason for deprecation? As you said [`call_user_func`](http://www.php.net/call_user_func) can easily duplicate the behavior of this function. What's the problem? The [`call_user_m...
[ 0.011441404931247234, 0.12703529000282288, 0.3695651888847351, 0.024893436580896378, -0.21609659492969513, -0.07282696664333344, 0.04267365485429764, -0.08322533220052719, -0.6142886877059937, -0.1713632345199585, -0.052575159817934036, 0.5826096534729004, -0.5820915699005127, 0.3730546236...
"here");` > > > new way: > > `call_user_func(array(&$obj, "method"), "method", "args", "go", "here");` Personally, I'd probably go with the variable variables suggestion posted by Chad.
[ -0.04453295096755028, 0.30027660727500916, 0.3319077789783478, 0.00536178657785058, -0.00264416029676795, -0.1505660116672516, 0.3953038156032562, 0.26398274302482605, -0.2845217287540436, -0.4517727792263031, -0.11278833448886871, 0.5286006927490234, -0.3116224408149719, 0.183829128742218...
I'm playing with a new service's very simple API and I'm just curious if its possible to send an xml-rpc request directly from an html form. The api request example is this: ``` <?xml version="1.0"?> <methodCall> <methodName>send</methodName> <params> <param><value><string>YOUR_API_KEY</string></value></pa...
[ 0.26372063159942627, -0.01927880570292473, 0.4214837849140167, -0.05630689114332199, -0.4019359350204468, 0.5328275561332703, 0.19212108850479126, -0.5882326364517212, -0.42799633741378784, -0.4953109920024872, 0.2063337117433548, 0.14973360300064087, -0.08838747441768646, 0.11786807328462...
<input type="hidden" name="api_key" value="MYAPIKEY"/> <label for="from">From</label> <input type="input" name="from" value=""/> <label for="phone">Phone</label> <input type="input" name="phone" value=""/> <label for="text">Text message</label> ...
[ -0.01580742932856083, -0.12263112515211105, 0.18059110641479492, 0.012050176039338112, 0.2731907069683075, 0.4141421616077423, 0.18058782815933228, -0.25914886593818665, -0.08057018369436264, -0.43323996663093567, -0.5432829260826111, 0.5488438606262207, -0.1766645759344101, 0.116214103996...
<input type="submit" value="Send"/> </form> ``` Not without involving either Javascript or server code. The "enc-type" attribute specifies the format that the form data is sent to the server in, and unfortunately "xml-rpc" isn't in the list of accepted formats :)
[ 0.23008984327316284, -0.007791050244122744, 0.6653586030006409, 0.09202729165554047, -0.16574203968048096, -0.49446240067481995, -0.16745203733444214, -0.415932834148407, 0.03739992529153824, -0.4912271499633789, -0.5201210379600525, 0.29317647218704224, -0.09273488819599152, 0.01411117240...
i have this code snippet ``` private List<string> FolderOne(string Folder) { string filena; DirectoryInfo dir = new DirectoryInfo(Folder); FileInfo[] files = dir.GetFiles("*.mp3", SearchOption.AllDirectories); List<string> str = new List<string>(); foreach (FileInfo f...
[ 0.3481171727180481, 0.0093108881264925, 0.6385210156440735, -0.5038503408432007, 0.16903254389762878, 0.0595800057053566, 0.5052666664123535, -0.5615257620811462, 0.13641788065433502, -0.5961040258407593, -0.22103384137153625, 0.5565953850746155, -0.2777790427207947, 0.3232564628124237, ...
filena = file.FullName; filena.Replace("*.mp3", "*.jpg"); if (filena.Length > 0)
[ -0.21538671851158142, -0.7062422037124634, 0.074048712849617, -0.2940066158771515, 0.34780004620552063, -0.07681474834680557, 0.1200864389538765, -0.2753990590572357, -0.4680584967136383, -0.4779248535633087, -0.39339855313301086, 0.4569128751754761, -0.29500648379325867, 0.307330727577209...
{ pictureBox1.Image = new System.Drawing.Bitmap(filena.ToString()); //I receive a error "Parameter is not valid." } } return str; } ``` My purpose was to
[ 0.45374158024787903, 0.01907486654818058, 0.4748075306415558, -0.19944922626018524, -0.08407805114984512, 0.05460827425122261, 0.4873906970024109, -0.352816641330719, -0.19472183287143707, -0.5022485256195068, -0.12211626023054123, 0.7235525846481323, -0.6470873951911926, 0.103529110550880...
make read the picture box the file.fullname ".mp3" in the same folder but end with ".jpg",infact i have 2 file in a folder the first one is a song "firstsong.mp3" and the second one a picture "firstsong.jpg" the difference between them is the final extension so i try to make read to picturebox the same filename but wit...
[ 0.34551647305488586, -0.31081879138946533, 0.604985773563385, -0.06762970983982086, -0.1491665542125702, -0.061914507299661636, 0.26430848240852356, -0.4596192240715027, -0.2615616023540497, -0.6678303480148315, -0.25444668531417847, 0.7949314713478088, -0.35057854652404785, 0.140059053897...
} ``` The main problem is with `filena.Replace("*.mp3", "*.jpg");` There are two issues in that line. First, you're searching on "\*.mp3" instead of just ".mp3". The individual filenames do not have the \* character, and string.Replace doesn't use regular expressions, just string matching. Second, strings in .NET ...
[ 0.07883039861917496, -0.018796592950820923, 0.06051049008965492, -0.0839991346001625, 0.1650969386100769, -0.35214999318122864, 0.36951902508735657, -0.01260936725884676, -0.20339354872703552, -0.6668286323547363, -0.18371880054473877, 0.8065491914749146, -0.5390085577964783, 0.32617676258...
On constrained devices, I often find myself "faking" locks between 2 threads with 2 bools. Each is only read by one thread, and only written by the other. Here's what I mean: ``` bool quitted = false, paused = false; bool should_quit = false, should_pause = false; void downloader_thread() { quitted = false; w...
[ 0.4014745354652405, -0.14406047761440277, 0.38489198684692383, -0.3311663866043091, 0.5402756333351135, -0.07566485553979874, 0.41663968563079834, -0.09007258713245392, -0.3666953146457672, -0.2977398633956909, -0.24582920968532562, 0.8826879858970642, -0.3845501244068146, 0.36386477947235...
sleep(50); is_paused = false; } } quitted = true; } void ui_thread() { // new Thread(downloader_thread).start(); // ... should_pause = true; while(!is_paused) sleep(50); // resize buffer or something else non-thread-safe should_pause = false; } ``` Of course on...
[ 0.36124172806739807, -0.20702306926250458, 0.4030403196811676, -0.32839468121528625, 0.19264493882656097, -0.05951409786939621, 0.30010735988616943, -0.271608829498291, -0.17215418815612793, -0.7549386620521545, -0.2797456979751587, 0.7328870892524719, -0.3236837387084961, 0.21097852289676...
obtaining a lock. Of course I trade off for slower recovery (see "`sleep(50)`") when a change to the buffer is needed. The question -- is it completely thread-safe? Or are there hidden gotchas I need to be aware of when faking locks like this? Or should I not do this at all? Unless you understand the memory architectu...
[ 0.1123121827840805, -0.04907038435339928, 0.2758358418941498, 0.2093483954668045, 0.46520811319351196, -0.20084501802921295, 0.3471279442310333, -0.24989084899425507, -0.3335723578929901, -0.4471935033798218, -0.27531445026397705, 0.565436601638794, -0.04752008989453316, -0.083639569580554...
wouldn't bet against finding a dual-core CPU in a cell phone, for instance. That means I wouldn't bet that the above code would work.
[ 0.4436303377151489, 0.3502863049507141, -0.23874498903751373, 0.45600205659866333, 0.2450414001941681, 0.11971219629049301, 0.042146842926740646, 0.16033029556274414, -0.12181317806243896, -0.37369444966316223, 0.231143057346344, 0.61366206407547, 0.018678728491067886, -0.10977983474731445...
I am wondering if there is any difference with regards to performance between the following ``` SELECT ... FROM ... WHERE someFIELD IN(1,2,3,4) SELECT ... FROM ... WHERE someFIELD between 0 AND 5 SELECT ... FROM ... WHERE someFIELD = 1 OR someFIELD = 2 OR someFIELD = 3 ... ``` or will MySQL optimize the SQL in th...
[ -0.10297288745641708, 0.22074826061725616, 0.15904074907302856, -0.11556646227836609, -0.27032384276390076, -0.09448808431625366, 0.22261124849319458, -0.023308902978897095, 0.053831882774829865, -0.3621819317340851, 0.06646623462438583, 0.4874526560306549, -0.14722774922847748, 0.15915217...
the two are logically equivalent. Not so in MySQL, which sorts the values in the IN() list and uses a fast binary search to see whether a value is in the list. This is O(Log n) in the size of the list, whereas an equivalent series of OR clauses is O(n) in the size of the list (i.e., much slower for large lists)
[ -0.18174834549427032, -0.05215674266219139, 0.11198404431343079, -0.003013762878254056, -0.2793172001838684, 0.12931866943836212, 0.3475159704685211, -0.08106417208909988, -0.14114172756671906, -0.4177245795726776, -0.4782751202583313, 0.16677691042423248, -0.3082255423069, -0.039948571473...
I am upgrading an application a rails application to 2.3.2 and I am finding that I can't display the default validation error messages for ActiveRecord because I don't have a translation file for it. This is the error that is reported: ``` translation missing: en-US, activerecord, errors, template, header translation...
[ 0.13005368411540985, 0.4215754270553589, 0.36284545063972473, -0.15587428212165833, -0.035928331315517426, -0.00029884566902182996, 0.7181665301322937, 0.11307355761528015, 0.26255205273628235, -0.7542693614959717, -0.16379836201667786, 0.7663469910621643, -0.1846517026424408, 0.0156944207...
I copied these translations into a new file en\_US.yml. ``` "en-US": activerecord: errors: template: body: There were problems with the following fields header: one: 1 error prohibited this {{model}} from being saved other: "{{count}} errors
[ 0.44949743151664734, 0.2761457562446594, 0.2827282249927521, 0.0538395531475544, 0.06400372087955475, 0.12112965434789658, 0.4760494828224182, -0.3329847753047943, -0.0602576844394207, -0.3304426670074463, 0.0351802259683609, 0.648370087146759, -0.4181615114212036, 0.02794967032968998, -...
prohibited this {{model}} from being saved" messages: inclusion: "is not included in the list" exclusion: "is reserved" invalid: "is invalid" confirmation: "doesn't match confirmation" accepted: "must be accepted"
[ 0.4238821864128113, 0.15231028199195862, 0.16538125276565552, 0.1026742085814476, 0.020135629922151566, -0.4856855571269989, 0.44936367869377136, -0.1427472084760666, -0.3958181142807007, 0.008502880111336708, -0.27952152490615845, 0.038095831871032715, -0.443791002035141, 0.42397403717041...
empty: "can't be empty" blank: "can't be blank" too_long: "is too long (maximum is {{count}} characters)" too_short: "is too short (minimum is {{count}} characters)" wrong_length: "is the wrong length (should be {{count}} characters)" taken: "has already been ...
[ 0.11802535504102707, -0.24839162826538086, 0.06667742878198624, -0.24894896149635315, 0.25873056054115295, 0.016140166670084, 0.19814816117286682, -0.09018935263156891, -0.18063656985759735, -0.08510347455739975, -0.31157204508781433, 0.19710402190685272, -0.05031375214457512, 0.0027426388...
not_a_number: "is not a number" greater_than: "must be greater than {{count}}" greater_than_or_equal_to: "must be greater than or equal to {{count}}" equal_to: "must be equal to {{count}}" less_than: "must be less than {{count}}" less_than_or_equal_to: "must b...
[ 0.008985573425889015, -0.018317027017474174, -0.03935420140624046, 0.07167798280715942, 0.10738480091094971, -0.1929512917995453, 0.5681037306785583, -0.35915377736091614, -0.28038033843040466, -0.33087605237960815, -0.7455408573150635, 0.2830013036727905, -0.5879439115524292, -0.026144824...
equal to {{count}}" odd: "must be odd" even: "must be even" ``` Then I just added my custom strings after these.
[ -0.3153870403766632, 0.19958196580410004, 0.40844303369522095, -0.08372177183628082, -0.2589803636074066, 0.09138835966587067, 0.02586129494011402, -0.309665322303772, -0.222603440284729, -0.32016390562057495, 0.325141042470932, 0.4318564236164093, -0.1858898252248764, 0.12315090000629425,...
**Question:** I have just wrote my first code using c# lambda expressions. It works, but I am not sure if this is the best way to do it. Any recommendations on a better way to do the lambda expression? It seems odd to have numerous lines of code in the expression like I do below. **Background:** I have a generic list ...
[ 0.5642267465591431, 0.12381727993488312, 0.11569338291883469, 0.2517467439174652, 0.06390458345413208, 0.012892729602754116, 0.03229599818587303, -0.07001239061355591, -0.39659440517425537, -0.5704654455184937, 0.06671849638223648, 0.4832354784011841, 0.015969831496477127, -0.0739503949880...
very generic, the real code actually does stuff in the delegates to determine the return value! --- ``` class Class1 { public enum WhatHappened { ThingA, ThingB, Nothing } private delegate WhatHappened del(); public static List<WhatHappened> DoStuff() { List<d...
[ 0.2020191252231598, -0.3900853097438812, 0.22765490412712097, 0.07816808670759201, -0.09324511885643005, -0.3133017420768738, 0.23351912200450897, -0.24958612024784088, -0.30476269125938416, -0.3054499328136444, -0.43256640434265137, 0.6410606503486633, 0.01809653453528881, 0.2292007505893...
CheckValues.Add(delegate { return method1(); }); CheckValues.Add(delegate { return method2(); }); CheckValues.ForEach(x => { WhatHappened wh = x(); if (wh != WhatHappened.Nothing) returnValue.Add(wh); });
[ 0.19642728567123413, -0.06872397661209106, 0.4564739763736725, -0.2840234935283661, 0.18279482424259186, -0.08953633904457092, 0.6443060040473938, -0.5068889856338501, -0.1289689540863037, -0.3923685550689697, -0.46183687448501587, 0.6368169784545898, -0.25967058539390564, 0.03915435448288...
return returnValue; } private static WhatHappened method1() { return WhatHappened.Nothing; } private static WhatHappened method2() { return WhatHappened.ThingA; } } ``` **Note:** I originally had the lambda like adding all the items (see below), then removing the ones I...
[ 0.11993583291769028, -0.27641531825065613, 0.19552835822105408, -0.09998565167188644, 0.02435649186372757, -0.09249696135520935, 0.3534661829471588, -0.08371075242757797, -0.3334607183933258, -0.1840459257364273, -0.15279385447502136, 0.852830171585083, -0.20405492186546326, 0.169629082083...
own delegate type, give it a more descriptive name, and obey the .NET naming conventions. * Instead of using anonymous methods to add to `CheckValues`, you can just use: ``` CheckValues.Add(method1); CheckValues.Add(method2); ``` The compiler will convert the method groups into delegates. * I'd recommend not using P...
[ 0.3349625766277313, -0.04456375911831856, 0.13414941728115082, 0.3743606209754944, -0.1912408173084259, -0.19444169104099274, 0.1355864703655243, -0.29488152265548706, -0.4575837254524231, -0.50984126329422, 0.155293807387352, 0.2922500967979431, -0.34912973642349243, 0.03607379272580147, ...
lot simpler. * Otherwise you can indeed use LINQ as Jared suggests, but I'd do it slightly differently: ``` return CheckValues.Select(x => x()) .Where(wh => wh != WhatHappened.Nothing) .ToList(); ``` EDIT: As suggested, here's the full example. It's not quite the same as Denis's t...
[ 0.29010581970214844, -0.03975675255060196, 0.3182757794857025, -0.1653793752193451, 0.0135874655097723, -0.03695043921470642, 0.3506689965724945, -0.4310339689254761, -0.31615662574768066, -0.5212543606758118, -0.1513434648513794, 0.7891474366188049, -0.283176064491272, -0.1875563412904739...
functions.Select(function => function()) .Where(result => result != WhatHappened.Nothing) .ToList(); } ``` (I'm assuming that `method1` and `method2` have been renamed to fit the naming convention. Of course in real life I'm sure they'd have more useful names anyway...)
[ -0.07841075956821442, -0.27184033393859863, 0.3208090364933014, -0.2249603569507599, 0.10785766690969467, -0.045763805508613586, 0.23364916443824768, -0.23730674386024475, -0.360741525888443, -0.4293029010295868, -0.2828405797481537, 0.4724208116531372, -0.45105376839637756, 0.249762266874...
I am having trouble getting my flex app to send a POST request to my Rails app. It seems to always send GET. This is my service declaration: ``` <mx:HTTPService id="add_email_service" showBusyCursor="true" result="parseJoinResult();" fault="onJoinFault(event)" useProxy="false" /> ``` In my application init functio...
[ 0.18007010221481323, 0.10826300084590912, 0.6146544814109802, -0.40687546133995056, -0.3138968050479889, 0.05242849513888359, 0.5951862335205078, -0.2769821882247925, -0.09633713960647583, -0.9414159059524536, -0.05711058899760246, 0.2907348573207855, -0.5414985418319702, 0.135723128914833...
:action => 'join', :conditions => { :method => :post} ``` the request faults and I can see in my dev log : "Processing ApplicationController#index (for 127.0.0.1 at 2009-04-23 14:25:35) [GET], ActionController::MethodNotAllowed (Only post requests are allowed.):" Does anyone know why this is happening? Old...
[ -0.04059108346700668, -0.16878870129585266, 0.36281150579452515, -0.038670092821121216, -0.24001313745975494, -0.29844680428504944, 0.46374645829200745, -0.18986596167087555, -0.3980206549167633, -0.40678414702415466, -0.23579718172550201, 0.8125724792480469, -0.5432351231575012, -0.017072...
can only accept HTTP status code of 200, everything else throws an exception and prevents you from getting at the message body. 2. You can't send PUTS or DELETE HTTP methods
[ 0.25233957171440125, -0.15761630237102509, 0.08662088215351105, 0.167236328125, -0.3006819486618042, -0.3454170227050781, 0.7257232666015625, -0.29211002588272095, -0.1583995670080185, -0.5713160634040833, -0.0882721021771431, 0.28577449917793274, -0.3720259964466095, -0.1388837993144989, ...
I am a latecomer to XML - have to parse an XML file. Our company is using xerces already so I managed to cobble together a sample app (SAX) that displays all the data in a file. However, after parsing is complete I was expecting to be able to call the parser or some other entity that had an internal representation of t...
[ 0.3788907825946808, 0.1763586401939392, 0.17943619191646576, 0.04966301470994949, 0.010827961377799511, -0.17079272866249084, -0.0640215128660202, -0.09836720675230026, 0.04541522264480591, -0.4400269389152527, -0.24534858763217926, 0.33425405621528625, -0.11688689142465591, 0.036698658019...
obvious to me that that is a good thing to do. Am I missing something? Is the DOM parsing what I want, or does that fall short too? Xerces provides both SAX and DOM processing. SAX parsing doesn't construct a model, so once parsing is finished there is nothing to examine or iterate through. DOM processing produces a ...
[ -0.14041157066822052, -0.03197166696190834, 0.19099627435207367, 0.21762031316757202, 0.09295987337827682, -0.006710724905133247, -0.016701530665159225, -0.02099786512553692, -0.30762794613838196, -0.3426285684108734, -0.2272282987833023, 0.814188539981842, -0.24076585471630096, -0.1054168...
Can someone direct me to an example or explanation that will help me either: 1. Extend the SilverLight AutoComplete Box to allow watermarks. 2. Extend the Watermark TextBox to allow AutoComplete functionality. It strikes me that option 1 would be easiest, but I'm open. Thanks in advance. Right off the bat, I'd say o...
[ 0.5066794753074646, -0.2806767225265503, 0.44733303785324097, 0.2635205090045929, 0.05904027074575424, -0.33143678307533264, 0.12213681638240814, -0.40821659564971924, 0.21933646500110626, -0.7013813257217407, -0.03646707907319069, 0.7028875946998596, -0.3841409981250763, -0.30388033390045...
of the attached property. The control template should be applied in a style (for example WatermarkedAutoCompleteBoxStyle). You should be good to go with that. Any time you want a watermarked autocomplete box, just set the attached property value and apply the style you defined. If you need more in-depth explanation o...
[ 0.5167614221572876, -0.09172624349594116, 0.23604948818683624, 0.18631047010421753, -0.1445336490869522, -0.4628216624259949, -0.015861250460147858, -0.011205327697098255, -0.03627193719148636, -0.6167870759963989, 0.00008950349729275331, 0.7155265808105469, -0.355052649974823, 0.104539707...
Solution ======== I did some googling and [found this forum post](http://www.vbdotnetforums.com/component-development/26453-custom-control-public-overrides-property-text.html), and here is what I needed to do: ``` Imports System.ComponentModel <EditorBrowsable(EditorBrowsableState.Always), Browsable(True), Bindable(...
[ -0.1453210711479187, -0.188978910446167, 0.8942121267318726, 0.2026064395904541, 0.2712191641330719, 0.09536975622177124, 0.25259721279144287, -0.6323003768920898, -0.10084804892539978, -0.4351804554462433, -0.1291562169790268, 0.6581559777259827, -0.4439871311187744, 0.2512650191783905, ...
a checkbox, but uses two images as checked/unchecked. I am trying to add a Text property, but it gives me this warning: ``` Property Text() As String Get Return ControlText.Text End Get Set(ByVal value As String) ControlText.Text = value End Set End Property ``` > "property 'Text' sha...
[ -0.005510546267032623, 0.05028656870126724, 0.3848896622657776, -0.07105616480112076, 0.04902557656168938, -0.4319497346878052, 0.2947641909122467, -0.3977925777435303, 0.07396505773067474, -0.455439954996109, -0.2846205532550812, 0.564545214176178, -0.4791439473628998, 0.07498044520616531...
Text() As String`, but when I go to test it out 'text' is not listed under properties. Is there additional steps I need take to get my result? More details ------------ My control consists of 2 (or 3, depending on how you look at it): 1. PictureBox - Displays a checked/unchecked image 2. Label - The Text that is bei...
[ -0.093668133020401, 0.0016075791791081429, 0.7856358289718628, 0.2007858157157898, -0.09610900282859802, -0.04559148848056793, 0.008685986511409283, -0.21037286520004272, 0.024407248944044113, -0.36107414960861206, -0.13998283445835114, 0.5038585662841797, -0.33525580167770386, 0.081464529...
But I'm curious, why do you want to do this. In your specific example you're just calling into the base property so it doesn't appear to do anything. Where are you expecting this value to be shown and how are you setting it? Text is a non-virtual / overridable method on Control. There is no way for you to override t...
[ 0.22827230393886566, -0.33296558260917664, 0.2846595346927643, 0.18676672875881195, -0.009578056633472443, -0.2637532949447632, 0.1682691127061844, 0.27606359124183655, -0.23721078038215637, -0.29678794741630554, 0.14605353772640228, 0.5454513430595398, -0.4711349308490753, 0.1072650104761...
I have a list of `AvailableItems` that I want to display as a list of checkboxes, so that users can pick which items to generate, which are then stored in another list called `ItemsToGenerate` (my lists are actually just lists of strings). Showing all available items with corresponding checkboxes is easy: ``` <Items...
[ -0.1681244671344757, -0.03105573169887066, 0.6194373965263367, -0.04731043428182602, -0.1702522337436676, 0.06590396910905838, -0.08968667685985565, -0.3070358335971832, -0.2521464228630066, -0.9892102479934692, -0.09974613785743713, 0.15330857038497925, -0.1909693032503128, 0.302680701017...
each Checkbox.IsChecked property, to the fact that the item is in the `ItemsToGenerate` list. I thought of making a `ListContainmentToBoolConverter` like this: ``` IsChecked="{Binding Path=ItemsToGenerate, Converter={StaticResource ListContainmentToBoolConverter}}" ``` But that doesn't work because I'm ...
[ -0.12241067737340927, -0.09173458069562912, 0.42918694019317627, 0.0781121626496315, -0.17419438064098358, -0.18489179015159607, 0.08616498112678528, -0.36935654282569885, -0.129907488822937, -0.5831993818283081, -0.02412482723593712, 0.2601417005062103, -0.5277201533317566, 0.207110732793...
custom collection to `ListBox.SelectedItems` using a simple attached property. ``` <ListBox ItemsSource="{Binding AvailableItems}" Behaviors:MultiSelectorBehaviours.SynchronizedSelectedItems= "{Binding ItemsToGenerate}" SelectionMode="Multiple" Background="{x:Null}"> <Ite...
[ 0.01294765342026949, -0.5362036228179932, 0.15340760350227356, 0.14867030084133148, -0.023912658914923668, 0.2425406575202942, 0.09992234408855438, -0.5183243751525879, -0.8146027326583862, -0.6214503645896912, 0.011646757833659649, 0.2830362021923065, -0.21031415462493896, 0.2478513717651...
</ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <CheckBox Content="{Binding}" Margin="3" IsChecked="{Binding RelativeSource=
[ -0.0871206521987915, -0.129228875041008, 0.5242357850074768, 0.02684100717306137, -0.02397932857275009, 0.37540268898010254, -0.19014526903629303, -0.41414499282836914, -0.4695943593978882, -0.6025115847587585, 0.01451884489506483, -0.16642309725284576, 0.04405156895518303, 0.2294159978628...
{RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" /> </DataTemplate> </ItemsControl.ItemTemplate> </ListBox> ``` I'm still able to display this as I initially wanted (a list of checkboxes), by adding a data templ...
[ -0.03170081973075867, -0.3999045193195343, 0.6903496384620667, 0.016569970175623894, 0.14182890951633453, 0.4103778898715973, 0.0714200958609581, -0.17746253311634064, -0.24442574381828308, -0.8066942095756531, 0.0841083973646164, 0.10699708759784698, -0.13526307046413422, 0.22316676378250...
`ListBoxItem` to a checkbox and binding each `Checkbox.IsChecked` to `ListBoxItem.IsSelected`. I had this pattern in so many places in my application that this is the ideal solution for me, because now I just need to specify one attached property, and the rest is all handled by the data bindings, and I don't need any ...
[ 0.187005415558815, -0.07506906241178513, 0.7021114826202393, -0.09631320089101791, -0.1102243959903717, -0.34163570404052734, 0.056726112961769104, -0.24609339237213135, -0.41365206241607666, -0.6847829818725586, -0.1402045339345932, -0.04467519745230675, -0.4920911192893982, 0.15777865052...
I'm new to Drupal 6.10 CMS and PHP too. I'm creating my website with drupal and I have found a module called [Webform](http://drupal.org/project/webform) I like it, it's pretty easy to create forms with different types of fields and file uploading. The one thing that i can't figure out is how to add Rich Text before al...
[ 0.56673663854599, 0.10985084623098373, 0.6397194266319275, 0.15408656001091003, -0.23074103891849518, -0.33360105752944946, 0.06460913270711899, 0.03481306508183479, -0.20738151669502258, -0.8850102424621582, 0.1788707971572876, 0.5177890062332153, -0.0007111092563718557, -0.12052708864212...
there any other modules that can allow to do something like that? Thanks the value of the "Description" field is passed through [\_webform\_filter\_descriptions()](http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/webform/webform.module?annotate=1.124.2.95#l2170). this function has a `$strict` parameter, de...
[ 0.44739431142807007, -0.12297132611274719, 0.6223276257514954, 0.085854671895504, 0.01785944029688835, -0.3172107934951782, 0.3070598542690277, -0.4416414797306061, -0.1235542967915535, -0.5916551351547241, -0.29040396213531494, 0.6977630853652954, -0.30499035120010376, 0.17209330201148987...
protects against).
[ 0.06230727210640907, 0.25373250246047974, 0.24324874579906464, -0.16264382004737854, 0.4086195230484009, -0.09917876869440079, 0.6120147109031677, -0.727788507938385, -0.07038270682096481, -0.2014847844839096, -0.26954251527786255, 0.6067433953285217, -0.18977899849414825, -0.1483248323202...
I'm looking to connect to an existing FTP server, upload a file, wait while the server generates a report on it, and download that report back to the local machine in a VB.NET 2.0 WinForms project. Is there an existing FTP library that would be helpful to me for this? My task seems simple enough that I'd rather not ge...
[ 0.4198748767375946, -0.28736090660095215, 0.2637411057949066, 0.08237433433532715, -0.14393869042396545, -0.20822449028491974, 0.040161021053791046, -0.024998031556606293, -0.2780850827693939, -0.8256912231445312, 0.16805413365364075, 0.6688932180404663, -0.29953551292419434, 0.15619036555...
I was inspecting the oflaDemo from Red5. I was wondering how I could change the oflaDemo so that I could stream a certain flv file to all the subscribers... ``` /** {@inheritDoc} */ @Override public boolean appConnect(IConnection conn, Object[] params) { // Trigger calling of "onBWDone", required for s...
[ -0.07910128682851791, -0.17655344307422638, 0.9624738693237305, -0.23372139036655426, 0.18018648028373718, 0.16890719532966614, 0.537125825881958, -0.21285785734653473, -0.08526815474033356, -0.42484137415885925, -0.3727779984474182, 1.0499777793884277, -0.469608873128891, 0.17417229712009...
SimpleConnectionBWConfig bwConfig = new SimpleConnectionBWConfig(); bwConfig.getChannelBandwidth()[IBandwidthConfigure.OVERALL_CHANNEL] = 1024 * 1024; bwConfig.getChannelInitialBurst()[IBandwidthConfigure.OVERALL_CHANNEL] = 128 * 1024; streamConn.setBa...
[ -0.49252548813819885, -0.5517993569374084, 0.9412561058998108, -0.1833275407552719, -0.22279098629951477, 0.20382143557071686, 0.7162920236587524, -0.37319132685661316, -0.19466452300548553, -0.6284855604171753, -0.48908939957618713, 0.5501853227615356, -0.38047873973846436, 0.232753187417...
serverStream = StreamUtils.createServerStream(appScope, "live0"); SimplePlayItem item = new SimplePlayItem(); item.setStart(0); item.setLength(10000); item.setName("IronMan"); serverStream.addItem(item); item = new SimplePlayItem();
[ -0.36652126908302307, -0.39791038632392883, 0.8753384351730347, -0.24420523643493652, 0.06652611494064331, 0.35731902718544006, 0.51047283411026, -0.6489956974983215, -0.30279695987701416, -0.6975725293159485, -0.4914790391921997, 0.4511781334877014, -0.6072936654090881, 0.1933849751949310...
item.setStart(20000); item.setLength(10000); item.setName("DarkKnight"); serverStream.addItem(item); serverStream.start(); serverStream.setRepeat(true); return super.appConnect(conn, params); } ``` The result of the code above is just a blank sc...
[ 0.09820440411567688, -0.16408826410770416, 0.8070673942565918, 0.059968531131744385, 0.17235516011714935, 0.10323549807071686, 0.6061920523643494, -0.06631044298410416, -0.5052742958068848, -0.5410566926002502, -0.44650372862815857, 0.45334500074386597, -0.4019796550273895, 0.1810252219438...
``` xml.Descendants("value") ``` xml.Elements() just returns child elements... if xml is your root XDocument, it wouldn't return anything.
[ -0.07783029228448868, 0.07906928658485413, 0.2502197027206421, 0.2210511863231659, 0.07134629786014557, -0.12172237038612366, -0.1437264233827591, 0.07668039202690125, 0.21352416276931763, -0.5360910892486572, -0.14428593218326569, -0.08079934865236282, -0.25199663639068604, 0.185575872659...
I'm trying to use a somewhat old DAQ, and had to jump through a few hoops to get an old (circa 2004) device driver for it to compile ([DTI-DT340 Linux-DAQ-PCI](http://bmicfl.tripod.com/id12.html)). I've gotten to the point where it compiles, I can load the kernel module, it finds the card, and I can create the charact...
[ -0.28164997696876526, 0.20720241963863373, 0.4560520052909851, 0.028290385380387306, 0.041942376643419266, 0.1210082545876503, 0.18783795833587646, 0.09159233421087265, -0.3939492702484131, -0.884395956993103, -0.12970677018165588, 0.4072510004043579, -0.047627124935388565, 0.2114994376897...
staff 250, 1 2009-04-23 11:02 1 crw-rw-r-- 1 root staff 250, 2 2009-04-23 11:02 2 crw-rw-r-- 1 root staff 250, 3 2009-04-23 11:02 3 ``` Is there something I'm neglecting to do? What might be a reason open fails? Here's the script I use to load the driver and make the devices. ``` #!/bin/bash module="dt340" device="...
[ -0.1746537685394287, 0.4063591957092285, 0.5732825398445129, 0.021865269169211388, -0.009907570667564869, 0.2730166018009186, 0.42704474925994873, -0.613067090511322, -0.05460615083575249, -0.5174353718757629, -0.33399924635887146, 0.7972244024276733, -0.3692956864833832, -0.09834278374910...
not all distributions have staff; some have "users" instead group="staff" grep '^staff:' /etc/group > /dev/null || group="users" chgrp $group /dev/${device}/[0-3] chmod $mode /dev/${device}/[0-3] ``` Some additional info: ``` #grep dt340 /proc/devices 250 dt340 # lsmod | grep dt340 dt340 21516 0...
[ -0.17442578077316284, 0.07945998013019562, 0.6202991008758545, -0.00018613517750054598, 0.02747129276394844, 0.06885029375553131, 0.25121527910232544, -0.2951461374759674, -0.04059132561087608, -0.5772656202316284, -0.3226701617240906, 0.7360926866531372, -0.348835289478302, 0.183487102389...
grep 340 03:01.0 Multimedia controller: Data Translation DT340 ``` ANSWER: A printk confirmed that the -ENODEV was thrown from inside open(). Following an oldstyle ``` while ((pdev = pci_find_device(PCI_VENDOR_ID_DTI, PCI_ANY_ID, pdev))) ``` (which is deprecated), `if(!pdev)` ends up true, and returns the -ENODEV....
[ -0.42345401644706726, 0.23415547609329224, 0.7586478590965271, 0.11937646567821503, -0.1602354198694229, 0.2681509256362915, 0.10589473694562912, -0.05522919073700905, -0.15768133103847504, -0.5067241191864014, -0.5091425776481628, 0.46593520045280457, -0.19430682063102722, 0.1253479570150...
a problem initialising the hardware.
[ -0.12682315707206726, 0.29275432229042053, -0.20001639425754547, 0.020887713879346848, -0.06196600943803787, 0.2777796685695648, 0.03014906495809555, -0.22190821170806885, 0.1536734253168106, -0.404485821723938, -0.10160718113183975, 0.3020467162132263, -0.014353814534842968, -0.0852946341...
I am working on maintaining an ASP.NET website, and I've noticed the business layer and other supporting libraries make heavy use of HttpContext.Current.Session. This makes it hard to keep track of session variables, to determine what they're used for and why they even exist. Is it considered bad practice to use the s...
[ 0.5914708375930786, 0.07110518962144852, 0.117011658847332, 0.00742881977930665, -0.18156109750270844, -0.2577667236328125, 0.2546287775039673, 0.06985253840684891, -0.31059855222702026, -0.6256086230278015, 0.030982211232185364, 0.4577444791793823, 0.12929309904575348, 0.0344291515648365,...
Unit Testing becomes much more of a pain or even impossible. We ran into huge headaches with this exact same situation when we started to build services that utilized common business layer code.
[ 0.45430999994277954, 0.2140968292951584, -0.1356285661458969, 0.27021166682243347, 0.15860594809055328, -0.18458090722560883, 0.28367432951927185, -0.1375076174736023, 0.31281644105911255, -0.6594281196594238, 0.11765360087156296, 0.4656803607940674, 0.21147887408733368, 0.0404141023755073...
Currently I use '`ln`' command via `Runtime.exec()`. It works fine. The only problem is that in order to do this fork, we need twice the heap space of the application. My app is a 64 bit app with heap size around 10Gigs and thus its runs out of swap space. I couldn't find any configuration that could fix this. I also ...
[ 0.3680124282836914, -0.10468506813049316, 0.18592484295368195, -0.22691932320594788, -0.08770647644996643, 0.0494072251021862, 0.3328720033168793, 0.16918103396892548, -0.2603916823863983, -1.0352072715759277, 0.049304552376270294, 0.5397945642471313, -0.08274535089731216, 0.20469495654106...
203](http://jcp.org/en/jsr/detail?id=203)
[ -0.011060687713325024, 0.036452487111091614, 0.15768539905548096, -0.0351000614464283, 0.190431147813797, 0.21280120313167572, -0.15147200226783752, -0.6833696961402893, -0.812244713306427, -0.07684271782636642, -0.04624999687075615, 0.10907244682312012, -0.1450822353363037, -0.17585375905...
Whats the best way to get this layout in CSS? imagine that I have three divs, two divs inside another.. of the two inner divs, the first one has a specific width set, and the second div is expected to take up the remaining space. Generally I'd end up setting a specific width on the second column, and manage updating t...
[ 0.017532391473650932, -0.20025263726711273, 0.6631454825401306, 0.05104779824614525, 0.00186673563439399, 0.31690430641174316, -0.38267382979393005, -0.12708714604377747, -0.22111009061336517, -0.7360796332359314, 0.04204064980149269, 0.3749438524246216, -0.2050759196281433, 0.249245733022...
| +-------+ | fluid | |
[ -0.2648536264896393, -0.052447475492954254, 0.7811421751976013, 0.1090630367398262, -0.31458932161331177, 0.4595538079738617, -0.07132422178983688, -0.3811178207397461, 0.23536746203899384, -0.4017176330089569, -0.06883504986763, 0.16609033942222595, -0.40076228976249695, 0.383052378892898...
| | | +--------------------------------------+ <div> <div>fixed</div> <div>fluid</div> </div> ``` This has to be an entirely css solution, no javascript frameworks-
[ -0.18881504237651825, -0.25116685032844543, 0.7418327331542969, 0.34921061992645264, -0.22566811740398407, -0.12780554592609406, -0.2266688346862793, 0.15486614406108856, -0.05765877664089203, -0.48782241344451904, -0.2542201578617096, 0.22842815518379211, -0.4363359808921814, 0.3317321538...
and ideally works on most commonly used browsers with minimum 'hackage' (if at all). Hope the ASCII art works, Thanks. the markup ``` <div id="fixed">fixed content</div> <div id="fluid">fluid content</div> ``` the css ``` #fixed { float: left; width: 13em; margin-right: -14em; } #fluid { margin-left: 14em...
[ 0.03196050226688385, -0.08645196259021759, 0.6618331670761108, 0.2039279043674469, -0.021235506981611252, -0.2792104184627533, -0.40305769443511963, 0.20068007707595825, -0.22986628115177155, -0.7731432318687439, -0.10944417119026184, 0.595341682434082, -0.002867235103622079, -0.0472332015...
Does anyone know how I can force `CanExecute` to get called on a custom command (Josh Smith's [`RelayCommand`](http://msdn.microsoft.com/en-us/magazine/dd419663.aspx))? Typically, `CanExecute` is called whenever interaction occurs on the UI. If I click something, my commands are updated. I have a situation where the...
[ 0.21249856054782867, -0.010544296354055405, 0.46461907029151917, 0.03626197949051857, 0.08117731660604477, 0.21216337382793427, 0.39808928966522217, 0.24498780071735382, -0.1114000603556633, -0.5839501023292542, -0.10456117987632751, 0.6473801732063293, -0.504077672958374, 0.14695456624031...
but when the user clicks it changes to disabled instead of firing. How can I force an update in code when the timer changes the property that affects `CanExecute`? I tried firing `PropertyChanged` (`INotifyPropertyChanged`) on the property that affects `CanExecute`, but that did not help. Example XAML: ```xml <Butto...
[ 0.12009966373443604, 0.021029014140367508, 0.5289308428764343, -0.2785625457763672, -0.041990846395492554, 0.309639573097229, 0.339971661567688, -0.44996997714042664, -0.40864476561546326, -0.6504949927330017, -0.09529663622379303, 0.5042767524719238, -0.5908970832824707, 0.176227092742919...