text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I want to extract only the leaf nodes from an XMLTYPE object in Oracle 10g ``` SELECT t.getStringVal() AS text FROM TABLE( XMLSequence( XMLTYPE( '<xml> <node> <one>text</one> </node>
[ -0.181747704744339, -0.018157746642827988, 0.4133637249469757, -0.016776250675320625, 0.20041754841804504, -0.21468669176101685, 0.11005616933107376, -0.11717744916677475, 0.05432950705289841, -0.5468001961708069, -0.12232064455747604, 0.2790345549583435, -0.18686087429523468, -0.063435979...
<node> <two>text</two> </node> <node> <three>text</three>
[ -0.443804532289505, 0.217137411236763, 0.062134064733982086, -0.24217793345451355, -0.29618048667907715, 0.3155938684940338, 0.2732831835746765, -0.21582791209220886, -0.17480288445949554, -0.6906203627586365, -0.011194099672138691, 0.34056609869003296, -0.2778092622756958, 0.1376873999834...
</node> </xml>' ).extract( '//*' ) ) ) t ``` What should I use as the WHERE clause so this returns only these: ``` <one>text</one> <two>text</two>
[ -0.23751585185527802, -0.013537432067096233, 0.41502857208251953, -0.21371477842330933, 0.17425797879695892, 0.12167846411466599, -0.05019000545144081, -0.15118446946144104, 0.18320699036121368, -0.2920422852039337, -0.32352301478385925, 0.436937540769577, -0.3221968710422516, -0.116752244...
<three>text</three> ``` I've tried the following but they don't work: ``` WHERE t.existsNode( '//*' ) = 0 WHERE t.existsNode( '/.//*' ) = 0 WHERE t.existsNode( './/*' ) = 0 ``` What am I missing? Nevermind, I found it: ``` WHERE t.existsNode( '/*//*' ) = 0 ```
[ -0.1527349352836609, 0.16799594461917877, 0.1684386134147644, 0.027068648487329483, -0.04427525773644447, -0.19683411717414856, 0.5057283043861389, -0.033806212246418, -0.06065479293465614, -0.7120780348777771, 0.11245729774236679, 0.6658050417900085, -0.4345240890979767, 0.379142791032791...
I am trying to install windows server operating system on a DELL optiplex desktop GX600 series, During the installation, In the first step I was asked to choose between: 1)Windows 2008 X86 Architecture OR 2)Windows 2008 X64 Architecture Now, how do I determine what architecture my Dell desktop is built on and which O...
[ 0.28776299953460693, 0.3568882346153259, 0.4893689751625061, -0.10611527413129807, -0.0060779680497944355, 0.14360202848911285, -0.11175979673862457, -0.0836513489484787, -0.16983653604984283, -0.8040430545806885, -0.014563482254743576, 0.745326042175293, -0.2051997035741806, -0.0609293244...
way to go. Most software is now compatible with x64 OSes, and from an x64 development environment, you can develop for both. Also x64 Windows OSes are capable of better utilizing the functionality of the processor, and I've found it to be faster than x86 on my machines.
[ 0.08781758695840836, 0.017660100013017654, 0.5314138531684875, 0.2638733386993408, 0.45558562874794006, -0.20786571502685547, 0.08606628328561783, 0.3620661199092865, -0.14010323584079742, -0.454890638589859, -0.004298686049878597, 0.6188890933990479, 0.4425296485424042, 0.2944583594799042...
I'm near ending the repetitive alarms at my [little learning project](http://www.my-clock.net). It's still full of bugs, but as it is a weekend project I'm correcting them slowly. My problem is inconsistency of layout across browsers. At the moment, I'm trying to improve the "`My Alarms`" box after login (Just don't t...
[ 0.7669621706008911, 0.37077397108078003, 0.2901284396648407, -0.022611524909734726, -0.016554322093725204, -0.22213414311408997, 0.699809730052948, 0.09475797414779663, -0.3129606544971466, -0.818448543548584, 0.1684219390153885, 0.5084900259971619, -0.05780746787786484, 0.0650260001420974...
(and safari/chrome(webkit) and opera) periodically. 2. Use a strict doctype- you don't necessarily need *perfect* markup, but it should be very good — good enough to avoid browser quirks modes, since quirks are by definition not standard 3. Use a [reset style sheet](https://stackoverflow.com/questions/167531/is-it-ok-t...
[ 0.3155173659324646, -0.0818190947175026, 0.5630347728729248, 0.20167365670204163, -0.03094983473420143, -0.43671631813049316, 0.35606154799461365, -0.3450423777103424, -0.23187567293643951, -0.6937088966369629, -0.38738447427749634, 0.669918954372406, -0.0989479273557663, -0.53100025653839...
small variances Follow those rules and there aren't as many problems in the first place. For a TODO reference, see this question: <https://stackoverflow.com/questions/72394/what-should-a-developer-know-before-building-a-public-web-site>
[ 0.21665003895759583, -0.049617886543273926, 0.12802985310554504, 0.05631258338689804, 0.022658193483948708, -0.3999401926994324, 0.06147031486034393, -0.37446704506874084, -0.14882342517375946, -0.1892564594745636, 0.04647599160671234, 0.463413268327713, -0.14295931160449982, -0.0765118971...
What's the best way to get the last N elements of a Perl array? If the array has less than N, I don't want a bunch of `undefs` in the return value. ``` @last_n = @source[-$n..-1]; ``` If you require no `undef`s, then: ``` @last_n = ($n >= @source) ? @source : @source[-$n..-1]; ```
[ -0.02460533194243908, -0.1365615576505661, 0.39695557951927185, -0.2016281932592392, 0.012348577380180359, 0.04903823882341385, 0.2655603587627411, -0.294788122177124, -0.2138168066740036, -0.2202846109867096, -0.0013196414802223444, 0.48019054532051086, -0.3503381311893463, -0.04741303250...
I am trying to use the Extensibility Method Definitions from my datacontext.designer.cs file to do some validation. So I created a new file and added this code: ``` public partial class LawEnforcementDataContext : System.Data.Linq.DataContext { partial void InsertCourse(Course instance) // this definition copied...
[ 0.4831390082836151, 0.21213753521442413, 0.35423892736434937, 0.08146398514509201, 0.3254643976688385, -0.04800086095929146, 0.001685037394054234, -0.3021148443222046, -0.09982099384069443, -0.44354209303855896, -0.14717470109462738, 0.6896487474441528, -0.3790375888347626, 0.2744812667369...
this.ExecuteDynamicUpdate(instance); } private void ValidateCourse(Course instance) { if (instance.StartDate > instance.EndDate) { throw new ApplicationException("Start date cannot be later than end date."); } } } ``` I can't compile because of these errors: ``` E...
[ 0.16826987266540527, -0.0036448154132813215, 0.4326050281524658, -0.1438353806734085, 0.4268763065338135, -0.05362910404801369, 0.48279500007629395, -0.36299556493759155, 0.04803812503814697, -0.42997175455093384, -0.17698906362056732, 0.37164387106895447, -0.1071162149310112, 0.4440551698...
found for implementing declaration of partial method 'LawEnforcementDataContext.UpdateCourse(reservation.lawenforcement.Course)' ``` I don't see what I am doing wrong. I have done this before. Also, after adding the above code, in code that references the classes created by the LINQ to SQL, it complains that my entit...
[ 0.32416650652885437, 0.30205458402633667, 0.37264883518218994, 0.0420338399708271, 0.2614065706729889, -0.12237748503684998, 0.012520847842097282, -0.4424353837966919, -0.004556924104690552, -0.4989660382270813, -0.0018743465188890696, 0.7331538796424866, -0.2520968019962311, 0.15922608971...
instance); partial void UpdateCourse(Course instance); ``` Your two partial classes are defined in different namespaces, so the compiler does not 'share' them. There is a setting under Properties in the DBML designer for this. Perhaps it reset?
[ 0.13564647734165192, -0.05291946604847908, 0.1837877780199051, -0.11802631616592407, 0.18017767369747162, -0.07253172248601913, 0.31480827927589417, 0.039107926189899445, -0.003367329714819789, -0.4765048921108246, -0.34014892578125, 0.6285901665687561, -0.4053492844104767, 0.0690370425581...
I am dynamically generating an anchor tag using jQuery. I have added an onclick attribute to it but when I click on the link the onclick does not fire. I am generating the link as follows: ``` $(document).ready(function() { var attributes = { "id": "xxx", "onclick": "alert('xxxx');", "hre...
[ 0.19947990775108337, -0.06615696847438812, 0.9889627695083618, -0.23066557943820953, 0.14024806022644043, -0.08107197284698486, 0.03218613937497139, -0.391107439994812, -0.06713392585515976, -0.6001883745193481, -0.29780054092407227, 0.7927579283714294, -0.40509697794914246, 0.044627744704...
= { "id": "xxx", "href": "https://localhost/widget/TabTest.aspx#" }; var link = $.create("a", attributes); $(link).append("xxxx").click(function(){ alert("HELLO"); }); $("#WidgetContainer").append(link); ``` What you did will likely work in some browsers but not others (I'd had that work in FF but fail ...
[ 0.5200416445732117, -0.23058049380779266, 0.3669620752334595, -0.04540596902370453, 0.05461227521300316, -0.35341978073120117, 0.4876055419445038, -0.24770399928092957, -0.2188682109117508, -0.592295229434967, -0.459190309047699, 0.42280635237693787, -0.17947687208652496, -0.27561637759208...
in one line (not always in the best idea): ``` $("<a id='xxx' href='https://localhost/widget/TabTest.aspx#'>xxxx</a>") .click(function() { alert("Hello"); }) .appendTo($("#WidgetContainer")); ```
[ 0.029399678111076355, -0.3113047182559967, 0.6575340628623962, -0.1557464748620987, -0.019785387441515923, 0.1086769551038742, 0.32246431708335876, -0.0065381405875086784, 0.005164680071175098, -0.564176082611084, -0.4595613479614258, 0.29588648676872253, -0.5358551740646362, 0.20207895338...
I'm using RSA to encrypt communication between a server and a client. Lets say we have 2 Asymetric keys, key 1 and key2. The server has key1 (Private) from the start and the client has the key1(public) So here is the scenario: 1. the client generates key2 2. client connects to the server 3. sending key2(public) encr...
[ 0.11940157413482666, -0.0623643733561039, 0.4281478524208069, -0.10656200349330902, -0.10720212757587433, -0.11452256143093109, 0.08312620967626572, -0.22588536143302917, -0.3669210374355316, -0.4360698461532593, -0.10771866887807846, 0.5495508909225464, -0.517192542552948, 0.3069539070129...
man-in-the-middle attack, or am I missing something? At point 7 the client should know if someone is trying to give the server the wrong key to encrypt with, as no one else but the server can decrypt key2(public). If there is anything that can be done to improve the security please tell me. The best thing you can do t...
[ -0.1920851767063141, 0.06901220232248306, 0.4539116322994232, 0.16597096621990204, 0.05278679355978966, -0.13220633566379547, 0.2015388458967209, -0.12899011373519897, -0.14607743918895721, -0.6868364214897156, 0.18757499754428864, 0.5831550359725952, -0.050759825855493546, 0.3439363837242...
thinking about this problem. Use TLS instead.
[ 0.38114866614341736, 0.05675995349884033, -0.002812442369759083, 0.1887679547071457, -0.3115728199481964, -0.2745620906352997, 0.2088053971529007, 0.35754531621932983, -0.15780797600746155, -0.6684505939483643, 0.09512799978256226, 0.393264502286911, -0.21687978506088257, 0.005472167860716...
I've got a string like "foo%20bar" and I want "foo bar" out of it. I know there's got to be a built-in function to decode a URL-encoded string (query string) in Emacs Lisp, but for the life of me I can't find it today, either in my *lisp/* folder or with Google. What is it called? `org-link-unescape` does the job for...
[ 0.005225003696978092, 0.5197498798370361, 0.30039486289024353, -0.2825789153575897, -0.08448721468448639, -0.11008547246456146, 0.48349741101264954, 0.399766206741333, -0.24869324266910553, -0.5538473725318909, -0.03620072454214096, 0.5358023643493652, -0.4128451645374298, 0.02065528556704...
This is the hierarchy of widgets I've got: Frame > wxBoxSizer > wxPanel > wxBoxSizer > wxFlexGridSizer (2 columns, 9 rows), with assorted form fields and buttons inside. The first BoxSizer is to place the panel in, and the second is to make a border around the FlexGrid. Everything looks nice, and the frame can expan...
[ 0.10447914898395538, -0.23911556601524353, 0.7149020433425903, -0.12425130605697632, -0.12780940532684326, 0.38303959369659424, -0.22894856333732605, -0.2734166085720062, -0.21985670924186707, -0.8602100014686584, 0.13439299166202545, 0.32010021805763245, -0.27817222476005554, -0.259635388...
the SetMinSize() method on your Frame to set a minimum size will set a limit on the smallest area of the frame (just tested it). Once set, wxWidgets will not allow the frame to be sized smaller than the value specified. I'd set the value like this. In the constructor, set up all the elements of the frame. At the end, ...
[ 0.46198827028274536, -0.25419482588768005, 0.7362678647041321, -0.13802851736545563, 0.21651704609394073, -0.02775033563375473, 0.08727697283029556, -0.45332249999046326, -0.16557112336158752, -0.728308379650116, 0.010175181552767754, 0.7263842821121216, -0.4257488250732422, -0.02126350626...
`SetMinSize()` method to set that default size as the minimum for your Frame. This will take into account all the various padding and borders and such set up by the frame and the contained elements.
[ 0.3973604142665863, -0.29436734318733215, 0.6082735657691956, -0.023090438917279243, 0.2594658136367798, -0.19675977528095245, 0.0320054292678833, -0.4034022390842438, -0.21406130492687225, -0.5530220866203308, -0.19463996589183807, 0.6632443070411682, -0.32923734188079834, -0.319798678159...
I implemented the [YUI rich text editor](http://developer.yahoo.com/yui/editor/) and I would like to get rid of the `<html>`, `<body>` and `DOCTYPE` tags as soon as I save the content from the editor. I know I could do this afterwards by parsing the HTML, but there must be a better solution. Right now this is saved wh...
[ 0.29421481490135193, 0.04860887676477432, 0.3520989716053009, -0.06442643702030182, -0.3402082622051239, -0.18940310180187225, -0.10641859471797943, -0.30993586778640747, 0.09129000455141068, -0.7626794576644897, -0.24806664884090424, 0.6871157884597778, -0.1793791800737381, -0.31663590669...
[yui\_editor plugin for ruby on rails](http://github.com/larsklevan/yui_editor/tree/master), but a YUI editor generic answer would be welcome too! In the meantime I solved the problem myself by parsing the html on submit. Yes I know, I wasn't looking for this solution at first, but finally I came to the conclusion that...
[ 0.014510320499539375, 0.16923360526561737, 0.16261963546276093, 0.1315259486436844, -0.7150430083274841, -0.03631323203444481, 0.3440909683704376, -0.31460851430892944, -0.011413399130105972, -0.5597304701805115, 0.10903599113225937, 0.43524491786956787, -0.41577333211898804, -0.1136121153...
I just wrote this incredibly verbose code to turn numbers like 2 into 02. **Can you make this function shorter, please (maintaning the functionality)?** ``` public static function format(n:int, minimumLength:int):String { var retVal:String = n.toString(); var stillNeed:int = minimumLength - retVal....
[ 0.328340083360672, -0.1266130656003952, 0.5961916446685791, -0.1546950489282608, 0.11586692929267883, 0.021163679659366608, 0.5004424452781677, -0.3543669581413269, -0.3337613642215729, -0.2844107151031494, -0.27466219663619995, 0.5323771238327026, -0.24082204699516296, -0.1162617057561874...
return retVal; } ``` Please use types for variables. Extra points (good-vibe points, not SO points) if there's already a built-in function that I don't know about. If anybody wants to post some extremely short equivalent in some other language, that would be fun too. This wouldn't be the fastest implementation ...
[ 0.32789066433906555, -0.10650740563869476, 0.9851338267326355, -0.12668485939502716, -0.12417502701282501, -0.039444539695978165, 0.44154679775238037, -0.4593803882598877, -0.15609398484230042, -0.3540191352367401, -0.3849108815193176, 0.7415590882301331, -0.3050224184989929, 0.19090907275...
How do I revert all or part of an SVN commit using TortoiseSVN? First, you need to identify rather you want to revert back "all changes" of a revision, or just a single file. TortoiseSVN has only the "1 or all" approach; meaning, you can revert back the entire check-in set, or single files: not partial checkins. Entir...
[ -0.08500045537948608, -0.25578391551971436, 0.8106337785720825, 0.019978102296590805, 0.018967632204294205, 0.061928316950798035, 0.2704917788505554, -0.3912576735019684, -0.533672571182251, -0.49331244826316833, -0.3027425706386566, 0.8577906489372253, -0.01637049950659275, 0.012264894321...
There's another option which might interest you, which is "Revert changes from this revision", which will do a Diff-merge between that revision and your current version, and merge just the differences. I find this more appealing at times; so, I can keep all changes inbetween the changesets. Single file ----------- Th...
[ 0.012784294784069061, -0.2224961221218109, 0.9861677885055542, 0.037249621003866196, 0.08139196038246155, 0.14181794226169586, 0.018048429861664772, -0.2421923577785492, -0.728479266166687, -0.7897853255271912, -0.1288134902715683, 0.8265822529792786, -0.15808068215847015, 0.20973905920982...
reading, make sure "checkins" only involve the files related to that change. This should be common practice these days; but, I still find developers "shotgunning" the checkins at the end of the day, bundling up all changes for the day into a single checkin. I gleam at those devs with w squint. -\_^
[ 0.5353923439979553, 0.23844996094703674, 0.5978965163230896, 0.1080203503370285, 0.20876450836658478, -0.11546164751052856, 0.2131204456090927, 0.03551674261689186, -0.41025692224502563, -0.7444207072257996, -0.3111191689968109, 0.4987560510635376, -0.3193329870700836, 0.17202778160572052,...
Suppose I have some code like this: ``` class Visitor { public: Visitor(callBackFunction) {} void visit() { //do something useful invokeCallback(); } } class ClassThatCanBeVisited { Visitor &visitor; public: ClassThatCanBeVisited(Visitor &_visitor) : visitor(_v...
[ 0.007336505223065615, -0.1762952208518982, 0.24932239949703217, -0.24890603125095367, 0.275674968957901, -0.13715805113315582, 0.41457056999206543, -0.006008255761116743, -0.004197550937533379, -0.45420604944229126, -0.2774822413921356, 0.44329220056533813, -0.2803558111190796, 0.183008328...
visitor.visit(data); } }; void callBackFunction() { //do something useful in the context of the Main file } int main() { Visitor visitor; ClassThatCanBeVisited foo(visitor); foo.someUsefulMethod(); } ``` I need to create a simple callback that will be called whenever the Visitor::visit() is...
[ -0.2727397382259369, -0.08726274222135544, 0.5370637774467468, -0.41754579544067383, 0.06922025233507156, -0.1810460239648819, 0.417400062084198, 0.32882973551750183, -0.12945783138275146, -0.46338510513305664, -0.4101795554161072, 0.6506528258323669, -0.5697040557861328, 0.315530478954315...
my callback function. I looked for things on the web and saw boost::function, but c++ already has the basic functors. Which one should I use for better clarity of the code? The callback is going to be a simple void() function, but it might grow, you never know the future :) What is the recommended way to do this? Yo...
[ -0.25865161418914795, -0.20324841141700745, 0.39224720001220703, -0.03928767517209053, 0.09000825136899948, -0.27634450793266296, 0.15133433043956757, 0.14654788374900818, -0.1828627735376358, -0.33546391129493713, -0.0974334105849266, 0.949516773223877, -0.4627198874950409, 0.178629621863...
all those callback classes. **Edit:** @edisongustavo: boost::function and boost::bind won't probably make your code more readable. But it will give you an opportunity to pass free functions ( I mean functions out of class and static class functions ) as callback as well as existing functions of any class. With b...
[ -0.22132784128189087, -0.33407285809516907, 0.2976548373699188, -0.1273280680179596, -0.22008700668811798, -0.08533552289009094, 0.2343885451555252, -0.3962272107601166, -0.020991457626223564, -0.4911639392375946, -0.1697484850883484, 0.9663166403770447, -0.5228476524353027, -0.24470022320...
favor boost.
[ -0.1901000738143921, -0.08390704542398453, 0.9341760873794556, 0.2303115874528885, -0.5508138537406921, -0.2630975842475891, -0.30741146206855774, -0.5275790691375732, -0.10062183439731598, -0.27999165654182434, 0.031361307948827744, 0.6796166896820068, 0.17270809412002563, -0.061730079352...
Microsoft Visual Studio uses XML to save its `.vcproj` project files. So diffing XML project files *should* be easily. Unfortunately, if you change any of the project file's properties, Visual Studio insists on randomly shuffling the XML nodes of the project file! This makes textual diffing and merging of project file...
[ 0.42849886417388916, 0.11070001125335693, 0.013631002977490425, 0.024629520252346992, -0.45727241039276123, -0.18856793642044067, 0.09517527371644974, 0.10109911859035492, -0.3273637592792511, -0.5707070231437683, -0.07176319509744644, 0.3498172461986542, -0.29247525334358215, 0.0723367705...
in source control? Or a way to convince Visual Studio to **not** rearrange the XML nodes in the `.vcproj` file? (I have also investigated using tools like CMake to generate `.vcproj` files from a more diff-friendly text file, but CMake has its own problems.) This seems to come up every now and then. * [Merging vcpro...
[ 0.4884049594402313, -0.11391188204288483, 0.1372355818748474, 0.3137856423854828, 0.16670015454292297, -0.36759376525878906, -0.04140463471412659, 0.10107883810997009, -0.3037126660346985, -0.4210968613624573, -0.10712701082229614, 0.6116992235183716, -0.1392330378293991, 0.272293955087661...
open source project, or commercial product? I'm game. I might have a go at a stand-alone normalizing tool, then see if I can turn it into a plugin.
[ 0.5712354183197021, 0.05018070712685585, -0.047226034104824066, 0.31008806824684143, 0.08385512977838516, -0.1453317105770111, -0.06639687716960907, 0.2915215492248535, 0.02759787067770958, -0.35364121198654175, 0.019416073337197304, 0.5674887299537659, -0.11857319623231888, -0.03685239702...
What's the best way to detect whether an app is running in debug mode in Managed C++/C++/CLI? ``` array<Object^>^ debuggableAttributes = Assembly::GetExecutingAssembly()->GetCustomAttributes(DebuggableAttribute::typeid, false); Console::WriteLine(debuggableAttributes->Length > 0); ``` (The compiler adds a Debuggable...
[ -0.140053391456604, 0.14995788037776947, 0.5108790993690491, -0.058676984161138535, 0.1915527731180191, -0.00987441185861826, 0.5358856320381165, -0.19744183123111725, -0.007957025431096554, -0.43779921531677246, -0.3774135708808899, 0.5634672045707703, -0.5155541300773621, -0.278183400630...
I'd love to use `render :json` but it seems its not as flexible. Whats the right way to do this? ``` respond_to do |format| format.html # index.html.erb format.xml { render :xml => @things } #This is great format.json { render :text => @things.to_json(:include => :photos) } #This doesn't include photos ...
[ 0.05231825262308121, -0.12979647517204285, 0.5039011836051941, -0.18484999239444733, -0.23210354149341583, -0.27308669686317444, 0.29618197679519653, -0.46997952461242676, -0.22548958659172058, -0.899267852306366, -0.09077723324298859, 0.6487970948219299, -0.07906123995780945, -0.411637991...
:only => [:id, :url] } }) } end ```
[ -0.10859154909849167, 0.012398289516568184, 0.49380385875701904, -0.21308556199073792, 0.12813065946102142, -0.45369306206703186, 0.42911189794540405, -0.20260384678840637, 0.3806737959384918, -0.2928568720817566, -0.6085009574890137, 0.681219220161438, -0.46250399947166443, 0.149198308587...
I wrote some JavaScript to allow editing a list of items within an HTML form, including adding and removing items. Got it working in Firefox. When trying it in Internet Explorer, I found that any added items were not being submitted with the form. Long story short... lots of simplification, debugging, figured out what...
[ 0.20512504875659943, 0.1025666669011116, 0.2904238998889923, -0.12253554910421371, -0.30961570143699646, -0.31814301013946533, 0.312301367521286, -0.2544592320919037, -0.11886932700872421, -0.5369216799736023, 0.06621053814888, 0.565156102180481, -0.4950592815876007, -0.0868716686964035, ...
add() { div = document.getElementById("mylist"); // *** Adding text here works perfectly fine. *** div.innerHTML += " "; e = document.createElement("input"); e.setAttribute("type", "text"); e.setAttribute("name", "field3");
[ 0.10721848160028458, -0.013089260086417198, 0.6031125783920288, -0.42311063408851624, 0.003808159613981843, 0.018222901970148087, 0.30082547664642334, -0.4225059747695923, 0.02065880410373211, -0.5774292349815369, -0.6838499903678894, 0.5012192726135254, -0.4846513569355011, -0.27297067642...
e.setAttribute("value", "--NEWVALUE--"); div.appendChild(e); // *** Adding text here works perfectly fine in Firefox, but for // Internet Explorer it causes field3 to not be submitted. *** //div.innerHTML += " "; } </script> </head> <body> <form actio...
[ 0.09506312012672424, -0.143118217587471, 0.5787151455879211, -0.2388152927160263, -0.18435636162757874, -0.17818816006183624, 0.2935095429420471, -0.669782280921936, 0.09944336861371994, -0.8454412221908569, -0.5613504648208618, 0.6656955480575562, -0.4921565353870392, -0.46292516589164734...
<div id="mylist"> <input type="text" name="field1" value="value1" /> <input type="text" name="field2" value="value2" /> </div> <a href="javascript:" onclick="add()" />Add</a> <input type="submit" value="Submit" /> </form> </body> </html> ``` To try it out, do the ob...
[ 0.2668094038963318, 0.04572470858693123, 0.4737766981124878, -0.24261687695980072, -0.22087329626083374, -0.06314722448587418, 0.0960255041718483, -0.4714508354663849, 0.21191297471523285, -0.804007887840271, -0.24993249773979187, 0.36102694272994995, -0.17381858825683594, -0.3541557192802...
IE will suddenly stop reporting `field3`. It works fine either way in Firefox. Any ideas? A curious mind wants to know. (And how would I add text there if needed, in a portable fashion, so IE is happy?) > Is this an IE bug? Seems so. When you create an <input> element through DOM methods, IE doesn't quite pick up the...
[ 0.1809260994195938, 0.06679177284240723, 0.23629309237003326, -0.12649530172348022, -0.307443231344223, -0.3933553993701935, 0.3351554572582245, 0.11089995503425598, -0.1263660192489624, -0.7304251194000244, -0.09902160614728928, 0.5995000004768372, -0.4632979929447174, -0.1680602282285690...
Level 0 form navigation methods, like ‘myform.elements.x.value’, access through the ‘elements’ array may not work (similarly the direct ‘myform.x’ access some people misguidedly use). In any case these days you might prefer getElementById(). So *either* use innerHTML *or* use DOM methods; best not to mix them when cre...
[ -0.011810149997472763, -0.3803439140319824, 0.8860966563224792, -0.08893172442913055, -0.02117958292365074, -0.38653457164764404, 0.5346634984016418, 0.005675443913787603, 0.0031492463313043118, -0.8181726932525635, -0.3886539041996002, 0.35786646604537964, -0.41667482256889343, 0.00537412...
away all the original content. That means you lose anything that can't be serialised: as well as IE's bogus half-created ‘name’ attributes that also means any JavaScript event handlers, DOM Listeners or other custom properties you have attached to each child element. Also, the unnecessary serialise/parse cycle is slow.
[ 0.05377436801791191, 0.0636892020702362, 0.022713739424943924, 0.27632176876068115, 0.20100310444831848, -0.10983817279338837, 0.36588722467422485, 0.1993262618780136, 0.0629800409078598, -0.19663266837596893, -0.23253583908081055, 0.31059473752975464, -0.1278044879436493, 0.42843881249427...
I have seen code which handles the drawing of this thing (`DFCS_SCROLLSIZEGRIP`), but surely there is a window style which I can apply to get it "for free". Right? In lieu of a better answer, I will post the code I have that draws the size grip and handles the hit-testing. You also need to invalidate the appropriate ar...
[ 0.09528136998414993, 0.096494659781456, 0.6150900721549988, -0.24251049757003784, -0.13729152083396912, -0.15674357116222382, -0.09426673501729965, -0.37651151418685913, -0.2148100584745407, -0.7944368720054626, -0.037244509905576706, 0.7379918098449707, -0.1303871124982834, -0.01666229777...
GetClientRect(&r); int size = GetSystemMetrics(SM_CXVSCROLL); r.left = r.right - size; r.top = r.bottom - size; pDC->DrawFrameControl(&r, DFC_SCROLL, DFCS_SCROLLSIZEGRIP); return TRUE; } else { return FALSE; } } ``` - ``` LRESULT CMyDialog::OnNcHitTest(...
[ -0.4279899299144745, -0.2577553391456604, 1.1567596197128296, -0.09576916694641113, 0.21131062507629395, 0.10851892828941345, 0.12988202273845673, -0.39828139543533325, -0.3176303803920746, -0.5477823615074158, -0.4379264712333679, 0.4380677044391632, -0.026350855827331543, 0.1861962378025...
GetClientRect(&r); int size = GetSystemMetrics(SM_CXVSCROLL); r.left = r.right - size; r.top = r.bottom - size; ScreenToClient(&point); if (r.PtInRect(point)) { return HTBOTTOMRIGHT; } else return CDialog::OnNcHitTest(point); } ``` Source: <http://www.tech-archive.net/...
[ -0.09323210269212723, -0.4149385094642639, 0.7145611047744751, -0.08500006794929504, 0.2259186953306198, -0.06291523575782776, 0.040433600544929504, -0.0892273336648941, -0.09537751227617264, -0.44948095083236694, -0.6880614757537842, 0.5104081630706787, -0.3413659632205963, 0.027950888499...
> **Possible Duplicate:** > > [Way to have compiled python files in a separate folder?](https://stackoverflow.com/questions/471928/way-to-have-compiled-python-files-in-a-separate-folder) When python compiles modules to bytecode, it produces .pyc files from your .py files. My question is, is it possible to have the...
[ 0.7131047248840332, 0.15070924162864685, -0.011636892333626747, 0.040277041494846344, -0.10965323448181152, 0.028385410085320473, 0.1267663836479187, -0.18953771889209747, -0.7746818661689758, -0.5508061647415161, -0.21252824366092682, 0.4276108145713806, -0.3643065094947815, -0.1660536825...
in a seperate folder?](https://stackoverflow.com/questions/471928/way-to-have-compiled-python-files-in-a-seperate-folder)" Short answer: **No** – unless you're running Python 3.2 or later – see [here](https://stackoverflow.com/a/16476434/66851). To clarify: Before 3.2, you *can* compile bytecode and put it elsewhere ...
[ 0.13709227740764618, 0.015901995822787285, -0.13636866211891174, -0.18371210992336273, -0.09149105101823807, -0.2189982533454895, 0.20552179217338562, 0.007051865104585886, -0.16500090062618256, -0.23427307605743408, -0.4001648426055908, 0.41076022386550903, -0.3320421576499939, 0.00780125...
Playing around with creating a NetBeans plugin but I am making very little progress since the process of installing the module fails. What I am doing is right-clicking on the and choosing the 'Install/Reload in Development IDE' option and it fails with the following exception: ``` Enabling StandardModule:org.willcodej...
[ 0.0022995814215391874, -0.16713069379329681, 0.20042359828948975, -0.3244980275630951, 0.2591753304004669, -0.0659029558300972, 0.39487776160240173, -0.37450429797172546, -0.003249178873375058, -0.7109149694442749, -0.24785415828227997, 0.7213878631591797, -0.49964869022369385, -0.06976637...
at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at ...
[ -0.12246553599834442, 0.042452115565538406, 0.1131187304854393, -0.17714720964431763, -0.14550265669822693, 0.48500293493270874, 0.25927454233169556, -0.514560878276825, -0.152187779545784, -0.5300846695899963, -0.07792267948389053, 0.4492857754230499, -0.24351944029331207, -0.120290763676...
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:273) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:499) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151) ``` Using NetBeans 6.5 and running Java 1.6 on Mac OS X 10.5.6 Appere...
[ 0.09139026701450348, 0.3944582939147949, 0.43963897228240967, -0.18823325634002686, -0.2126818597316742, 0.09876199066638947, 0.3275419771671295, -0.3668377101421356, -0.4244271218776703, -0.5314366817474365, -0.06549420207738876, 0.35196736454963684, -0.4983053207397461, 0.069058783352375...
Given a list of FileInfo objects, how do I sort them by date? Specifically I want to sort them by CreationTime in descending order. The Pythonic way of doing this would be: ``` fileInfos = list(DirectoryInfo(path).GetFiles()) fileInfos.sort(key=lambda f: f.CreationTime, reverse=True) ``` The list sort method takes a...
[ 0.1441718488931656, -0.14944468438625336, 0.4511803984642029, -0.2130196988582611, 0.16815410554409027, -0.04812256991863251, -0.12341971695423126, -0.15844137966632843, -0.3596076965332031, -0.5061668157577515, -0.18673497438430786, 0.21073231101036072, -0.3826344311237335, 0.239968940615...
Lets say you have the following entities in your database: [Image http://lh6.ggpht.com/\_UpGtM3B8h1U/Sa7SqfWmgDI/AAAAAAAAAHE/epqtm7EnoFg/test.gif](http://lh6.ggpht.com/_UpGtM3B8h1U/Sa7SqfWmgDI/AAAAAAAAAHE/epqtm7EnoFg/test.gif) You want to be able to add a note to all three of the other entity tables (User, Client and...
[ 0.16504691541194916, 0.14573462307453156, 0.6666299104690552, 0.13756194710731506, -0.11022971570491791, 0.061599839478731155, -0.06986243277788162, -0.25903838872909546, -0.2873704731464386, -0.6954172849655151, 0.04421693831682205, -0.010815858840942383, -0.020320618525147438, 0.05879523...
because there are no nulls. Option 3 is attractive because a note feels like a note no matter what it is associated with. Any thoughts? I would typically go with option 2. I don't stress about the number of tables in a database within reason. The big question is, are these notes going to be handled as a single item? ...
[ 0.05179446563124657, 0.0014858486829325557, 0.12333410978317261, 0.29192328453063965, -0.29807183146476746, -0.05252224579453468, 0.1401897370815277, 0.12609121203422546, -0.4806154668331146, -0.700711190700531, 0.009247408248484135, 0.22582660615444183, -0.3294602632522583, -0.11822722107...
notes" or "Show me THIS PROJECT'S notes." Since they are not logically one item I suggest not trying to model them physically as one item.
[ 0.48247674107551575, 0.11986281722784042, 0.03927750512957573, 0.36601462960243225, -0.07308471947908401, -0.24536952376365662, -0.11537545174360275, 0.0872921571135521, -0.1570947766304016, -0.6682965755462646, 0.1289512664079666, 0.03036162629723549, -0.07572402060031891, 0.0899481922388...
So lets say that in my entry point class (i.e the class which runs when the program starts (which has the `public static void main(String args[])` function). In that class I have this variable: ``` private ArrayList<String> myData=new ArrayList<String>(); ``` This class instantiates another class, which needs to hav...
[ 0.07191511243581772, -0.1569337248802185, 0.10665023326873779, -0.08477853238582611, -0.05831766873598099, -0.10347482562065125, 0.11468695849180222, 0.17340371012687683, -0.25284212827682495, -0.3264686167240143, -0.07220328599214554, 0.5240482687950134, -0.24249139428138733, 0.0679456666...
entry point is still static when it calls some other class, but your ArrayList is a member of an *instance* of it. You need to move out of the static world and into instances. I'd refactor your main method into a private construtor, and put in a new main() which launches it as a new instance. Note that this code is v...
[ -0.3534995913505554, -0.0062773157842457294, 0.4653566777706146, -0.2899848222732544, 0.13438928127288818, 0.02268911898136139, -0.05057957395911217, -0.13253185153007507, -0.06114325299859047, -0.5214166641235352, -0.10899253934621811, 0.21813221275806427, -0.47561386227607727, 0.43716543...
EntryPoint ep = new EntryPoint(); ep.init(); } private void init() { // Populate myData perhaps? SomeOtherClass myClass=new SomeOtherClass(); myClass.someMethod( this ); } public List<String> getMyData() { return myData; } } public class SomeOtherClass ...
[ -0.13879051804542542, -0.274643212556839, 0.6883856654167175, 0.025494322180747986, 0.23168496787548065, 0.19400261342525482, 0.21375180780887604, -0.0005306084640324116, -0.10425739735364914, -0.6145718693733215, -0.2639942169189453, 0.23567695915699005, -0.2495684027671814, 0.22397102415...
List<String> data = entry.getMyData(); // do stuff with data..! } } ```
[ 0.30117425322532654, -0.076815165579319, 0.2880355715751648, -0.044201865792274475, 0.19045686721801758, -0.36049729585647583, 0.3154383599758148, -0.18118014931678772, -0.3502638638019562, -0.43929070234298706, -0.3993682563304901, 0.5630932450294495, -0.5575256943702698, 0.27946880459785...
Say I have app version 1.0 released on the app store. Then I want to release version 1.1. I will keep existing data that was copied out of the app bundle and into the app's sandbox. These are some XML config files and a sqlite db the user can write data to. These files could need updates that preserve their existing d...
[ 0.5623676776885986, 0.2063554972410202, 0.30286216735839844, 0.09095427393913269, -0.0422690212726593, -0.22432607412338257, 0.21128737926483154, -0.19229084253311157, -0.05516780912876129, -0.779424786567688, -0.08355420082807541, 0.804169237613678, -0.3922712802886963, -0.231034472584724...
tested upgrading our Chess game, so it keeps old and current games on the device. As for the files/DB I suggest they should contain some version number.
[ 0.40513062477111816, 0.2964567542076111, 0.23314616084098816, 0.23259344696998596, 0.4178667664527893, -0.3439333140850067, 0.06910812854766846, -0.03918784484267235, 0.05434879660606384, -0.4714648425579071, 0.16248497366905212, 0.4885704219341278, 0.2006683647632599, 0.14873330295085907,...
I am trying to find a class or something that would allow me to do [Shamir's Secret Sharing](http://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing "Shamir's Secret Sharing"). I found a program in C# that allows you to do it but it does not supply source code. I was just wondering if anyone has a class that already do...
[ 0.5245194435119629, 0.5544931888580322, -0.08070185035467148, 0.1566428691148758, -0.17028318345546722, -0.42206233739852905, 0.24023668467998505, -0.09664847701787949, -0.0708668977022171, -0.05592511594295502, 0.014404536224901676, 0.41462787985801697, -0.19209007918834686, 0.19780823588...
[browse the code here](http://secretsharp.svn.sourceforge.net/viewvc/secretsharp/).
[ 0.38889145851135254, 0.09780575335025787, 0.08588731288909912, 0.4741247594356537, 0.13781271874904633, -0.6866720914840698, 0.3910166621208191, 0.47826072573661804, -0.41241365671157837, -0.0631609857082367, -0.29092592000961304, 0.08203441649675369, 0.21095266938209534, 0.426285922527313...
I have a C# program that uses a class from another assembly, and this class calls an unmanaged DLL to do some processing. Here is a snippet: ``` public class Util { const string dllName = "unmanaged.dll"; [DllImport(dllName, EntryPoint = "ExFunc")] unsafe static extern bool ExFunc(StringBuilder path, uint ...
[ -0.021240245550870895, -0.07415562123060226, 0.4840053915977478, -0.18455858528614044, 0.002771473955363035, -0.14805704355239868, 0.26757001876831055, -0.4273300766944885, 0.021974096074700356, -0.5534105896949768, -0.2906208634376526, 0.591858446598053, -0.4704170227050781, 0.34338626265...
if I call "Func" my main C# program will not unload. When I call Close() inside my main form the process will still be there if I look in Task Manager. If I remove the call to "Func" the program unloads fine. I have done some testing and the programs Main function definitely returns so I'm not sure what's going on here...
[ 0.25323060154914856, -0.059508662670850754, 0.48126381635665894, 0.010466835461556911, -0.1442762017250061, -0.3589273989200592, 0.27166301012039185, 0.2022368311882019, -0.6378157138824463, -0.34856119751930237, -0.22517836093902588, 0.5805193185806274, -0.16023340821266174, 0.41714859008...
Is there a way to rewrite this query using the Django QuerySet object: ``` SELECT b.created_on, SUM(a.vote) FROM votes a JOIN votes b ON a.created_on <= b.created_on WHERE a.object_id = 1 GROUP BY 1 ``` Where votes is a table, object\_id is an int that occurs multiple times (foreign key - although that doesn't matte...
[ 0.13491129875183105, 0.10909773409366608, 0.26497548818588257, -0.011120006442070007, -0.1225704550743103, -0.08766628056764603, -0.23769494891166687, -0.3642423748970032, -0.43418189883232117, -0.3670978248119354, 0.40754997730255127, 0.20965778827667236, -0.21383161842823029, 0.372420728...
think it can do exactly what you want. Are you sure that query works? You seem to be missing a check that b.object\_id is 1. This code should work, but it's more than one line and not that efficient. ``` from django.db.models import Sum v_list = votes.objects.filter(object__id=1) for v in v_list: v.previous_sc...
[ 0.4007466733455658, -0.3544500470161438, 0.4126344919204712, -0.1133405938744545, 0.051060713827610016, 0.04301238805055618, -0.050219230353832245, -0.18911422789096832, -0.22259442508220673, -0.550305962562561, 0.1517530232667923, 0.5559114217758179, -0.3224512040615082, -0.18351797759532...
If I am correct, SimpleTest will allow you to assert a PHP error is thrown. However, I can't figure out how to use it, based on the documentation. I want to assert that the object I pass into my constructor is an instance of `MyOtherObject` ``` class Object { public function __construct(MyOtherObject $object) { ...
[ 0.2645760774612427, 0.22451934218406677, 0.3223000764846802, -0.1506562978029251, 0.0631515383720398, -0.10284781455993652, 0.5098586082458496, -0.2464461475610733, 0.2950216233730316, -0.46156013011932373, 0.14758537709712982, 0.5318124294281006, -0.19597044587135315, 0.2579856812953949, ...
throws E\_RECOVERABLE\_ERROR which can be caught by SimpleTest since PHP version 5.2. The following will catch any error containing the text "must be an instance of". The constructor of PatternExpectation takes a perl regex. ``` public function testConstruct_ExpectsAnInstanceOfMyOtherObject() { $notAnObject = 'fo...
[ 0.1075095385313034, -0.031656719744205475, 0.15130621194839478, -0.38522690534591675, 0.1497783213853836, -0.050920337438583374, 0.5681097507476807, -0.3328416347503662, 0.14972376823425293, -0.589316189289093, -0.05304030328989029, 0.4602612257003784, -0.41526708006858826, -0.116350829601...
Is there a C# API to convert .eml to .pdf? Want to convert saved email files to pdf Use OpenOffice (<http://www.openoffice.org>) This will basically convert anything to PDF (doc, xls, ppt, txt). Since eml are just txt, why not just use this? See <http://www.opendocument4all.com/download/OpenOffice.net.pdf> for how to ...
[ 0.2847776412963867, 0.005367448553442955, 0.5344363451004028, 0.37439635396003723, -0.17784906923770905, -0.3636287748813629, -0.22160091996192932, 0.18632769584655762, -0.25073346495628357, -0.5397031903266907, -0.31956928968429565, 0.674338161945343, -0.3133270740509033, -0.0357972010970...
I'm using parallel linq, and I'm trying to download many urls concurrently using essentily code like this: ``` int threads = 10; Dictionary<string, string> results = urls.AsParallel( threads ).ToDictionary( url => url, url => GetPage( url ); ``` Since downloading web pages is Network bound rather than CPU bound, usi...
[ 0.10243280977010727, 0.1051710769534111, 0.6269054412841797, 0.15230076014995575, -0.10118095576763153, 0.03589026257395744, 0.18401119112968445, 0.1796661913394928, -0.3369044065475464, -0.9309772849082947, 0.07692331075668335, 0.5787142515182495, -0.21276333928108215, 0.36683234572410583...
that the treads sent to AsParallel is limited to the number of cores. Is there any way to override this behavior? Is there a similar library available that doesn't have this limitation? (I've found such a library for python, but need something that works in .Net) Do the URLs refer to the same server? If so, it could...
[ 0.6039416193962097, -0.2739444673061371, 0.3717345893383026, 0.3599017560482025, 0.09008072316646576, 0.06228430196642876, 0.42689159512519836, -0.06433077156543732, -0.48201319575309753, -0.5266994833946228, 0.40109196305274963, 0.6372008919715881, -0.23927909135818481, 0.4443654119968414...
url => { Console.WriteLine("On thread {0}", Thread.CurrentThread.ManagedThreadId);
[ -0.16785302758216858, 0.1261121779680252, 0.8078307509422302, -0.07661629468202591, 0.34921473264694214, -0.049571599811315536, 0.1906505674123764, 0.08915884792804718, 0.22655446827411652, -0.5339363813400269, -0.12220588326454163, 0.30343419313430786, -0.15119323134422302, 0.853020846843...
return GetPage(url); }); ``` EDIT: Hmm. I can't get `ToDictionary()` to parallelise *at all* with a bit of sample code. It works fine for `Select(url => GetPage(url))` but not `ToDictionary`. Will search around a bit. EDIT: Okay, I still can't get `ToDictionary` to parallelise, but you can work aro...
[ 0.288282185792923, -0.07975250482559204, 0.37910354137420654, -0.10746341198682785, 0.08182991296052933, 0.2101321816444397, 0.42842090129852295, -0.39806580543518066, -0.08476405590772629, -0.5282371640205383, 0.03983321413397789, 0.40096980333328247, -0.42151084542274475, 0.2459204792976...
i.ToString()); int threads = 10; Dictionary<string, string> results = urls.AsParallel(threads) .Select(url => new { Url=url, Page=GetPage(url) }) .ToDictionary(x => x.Url, x => x.Page); } static string GetPage(string x) { Console.WriteLine("On thread {0} get...
[ -0.019548552110791206, -0.4042406380176544, 0.867902934551239, -0.26461976766586304, 0.3747141361236572, 0.21988557279109955, 0.33203554153442383, -0.25964024662971497, -0.00015024570166133344, -0.7513766884803772, -0.2767437994480133, 0.6459964513778687, -0.39985236525535583, 0.4432672858...
Thread.CurrentThread.ManagedThreadId, x); Thread.Sleep(2000); return x; } } ``` So, how many threads does this use? 5. Why? Goodness knows. I've got 2 processors, so that's not it - and we've specified 10 threads, so that's not it. It still uses 5 even if I change `GetPage` to hammer the CPU. If ...
[ 0.17641131579875946, 0.2344820499420166, 0.3968501091003418, -0.3548375964164734, 0.154863178730011, -0.16012796759605408, 0.21152085065841675, -0.12405553460121155, -0.4289757311344147, -0.5483136773109436, 0.21306078135967255, 0.5873652696609497, -0.38931167125701904, 0.12147211283445358...
it yourself, to be honest.
[ 0.6439247131347656, 0.03943546116352081, -0.22075800597667694, 0.018898891285061836, 0.10099054127931595, 0.4384532570838928, 0.016391169279813766, -0.04230206087231636, -0.25137749314308167, 0.05366707965731621, 0.28184160590171814, 0.5908401608467102, 0.11063384264707565, 0.0513176843523...
I am trying to add a template to a simplified composite control containing a Label and a TextBox. I want my mark up to look something like this: ``` <test:FormItem ID="fi" runat="server" Title="MyTitle" Text="My Text!"> <TestTemplate> <i> <%# Container.Title) %></i> <br /> <%# C...
[ 0.46452149748802185, -0.001492096809670329, 0.1863929033279419, -0.01965084671974182, -0.054240550845861435, -0.21465779840946198, 0.028645966202020645, -0.3079225420951843, 0.17900003492832184, -0.9702426791191101, 0.10735718160867691, 0.3474782109260559, -0.31778937578201294, 0.193318665...
public TextBox Text { get { return m_item.Text; } } public Label Title { get { return m_item.Title; } } private FormItem m_item; public TemplateContainer(FormItem item) { m_item = item; } } ``` In the main FormItem class I have a CreateControlHierarchy() method that is being called from...
[ -0.06732471287250519, -0.2325403392314911, 0.5997157096862793, -0.07004041969776154, 0.012997481040656567, 0.045167647302150726, 0.5772855281829834, -0.4961767792701721, -0.021999958902597427, -0.6400787234306335, -0.5637056827545166, 0.5353366732597351, -0.35741493105888367, 0.37437766790...
Controls.Add(m_itemTemplateContainer); } ``` What I WANT is for the Template to render the actual control. Instead, it's calling ToString() on the control and displaying System.Web.UI.WebControls.Label and System.Web.UI.WebControls.TextBox. Is there a way to make the template add the controls to it's collection ...
[ 0.16753137111663818, 0.006893462035804987, 0.4781973659992218, 0.16950491070747375, -0.04847179725766182, -0.005515615455806255, -0.224778950214386, -0.328448623418808, -0.18538807332515717, -0.7525888681411743, 0.04079408571124077, 0.5822407007217407, -0.48292967677116394, 0.1173759475350...
track of where in the container's Control collection the textbox or label would go. However, the CompiledTemplateBuilder (which is what .Net internally builds for ITemplates specified in mark up) put all of the markup before and after both binding expressions into one DataBoundLiteral control and the Control collection...
[ -0.015866972506046295, -0.1215352863073349, 0.37673935294151306, 0.18185003101825714, 0.19989678263664246, 0.07262349873781204, -0.13767452538013458, -0.3084849715232849, -0.007161484565585852, -0.6408726572990417, 0.08085300028324127, 0.23991088569164276, -0.45907390117645264, 0.135523363...
public WebControl Control { get { if(Controls.Count == 0) return null; return Controls[0] as WebControl; } set {
[ -0.08419360965490341, -0.34269943833351135, 0.42487189173698425, 0.25624579191207886, -0.02705441415309906, -0.1313791126012802, 0.21107937395572662, -0.16035611927509308, -0.02134932018816471, -0.5346854329109192, -0.3267417848110199, 0.3762783706188202, -0.5566249489784241, 0.05329210311...
if (Controls.Count != 0) Controls.Clear(); Controls.Add(value); } } } ``` Then in the mark up, I create a control of this type and bind it's Control property to the correct property in the container. ``` <test:FormItem ID="fi" runat="server" Title="MyTitle" Text="My Text!"> ...
[ 0.25492098927497864, -0.053889818489551544, 0.797516942024231, 0.011572757735848427, 0.4103093445301056, -0.22102905809879303, -0.10620370507240295, -0.587398886680603, 0.32513344287872314, -0.556598961353302, -0.2129250466823578, 0.36567649245262146, -0.22761546075344086, 0.07566908746957...
Control='<%# Container.Title %>' /> </i> <br /> <test:FormItemPlaceHolder ID="ph2" runat="server" Control='<%# Container.Text %>' /> </TestTemplate> </test:FormItem> ``` Does anyone have a better solution?
[ 0.10849010944366455, -0.1337447464466095, 0.33015185594558716, 0.17114420235157013, 0.1907162368297577, -0.24191799759864807, -0.01561347208917141, -0.3041401505470276, 0.09337394684553146, -0.6441881060600281, -0.011634711176156998, 0.21355408430099487, -0.031576842069625854, -0.075637340...
What's the difference between... ``` File.open('abc', 'w') { |f| f.puts 'abcde' } ``` ...and... ``` File.open('abc', 'w') { |f| f.write 'abcde' } ``` ...? puts appends a newline, write does not. Technically, puts appends the record separator (which is usually a newline) to the output if it doesn't have one at the...
[ 0.321299284696579, 0.12491957098245621, -0.016228176653385162, -0.2297150194644928, 0.18201349675655365, 0.03571069985628128, -0.19195619225502014, -0.26050132513046265, -0.17057940363883972, -0.6790405511856079, -0.27512845396995544, 0.2480912208557129, -0.42939552664756775, 0.43814894556...
I have a usercontrol I created. I added a panel and a vertical scrollbar to the right of it. I'd like to be able to scroll it with the mousewheel. The problem is there doesn't seem to be any events that fire on mousewheel. If I take the panel off then the usercontrol has focus and it will fire on mousewheel in the form...
[ 0.08564015477895737, -0.20507994294166565, 0.6671221852302551, 0.19950592517852783, -0.18937081098556519, -0.06564415991306305, 0.053998034447431564, -0.14501434564590454, -0.08092019706964493, -0.5355834364891052, 0.3577619194984436, 0.6910313963890076, -0.2616605758666992, 0.011977104470...
fire in the usercontrol but I'd even accept an event on the form and feed it back into the usercontrol. I'm using vb.net and vs2005 if it matters. I've been researching this all day, I may have figured this out. The mousewheel event is only sent to the control with focus. A panel can't have focus. Since the panel is c...
[ 0.4173784852027893, -0.22689256072044373, 0.6310878396034241, -0.0712367370724678, -0.33661404252052307, -0.24603328108787537, 0.31723421812057495, -0.06900505721569061, -0.1143059954047203, -0.619759202003479, -0.11042845249176025, 0.8244192600250244, -0.37843766808509827, -0.110426008701...
fires in the form and the control both. I'm still open to suggestions if there's a better way though, as this seems a little hacky.
[ 0.5978909730911255, 0.054378703236579895, -0.057497538626194, 0.16172273457050323, -0.20671424269676208, -0.2492208480834961, 0.36182430386543274, -0.4238903522491455, 0.06024138256907463, -0.454179584980011, 0.06970982998609543, 0.6353886127471924, 0.11048151552677155, -0.1537815034389495...
When designing software with databases is it worth normalising enumerations into separate tables? e.g. if I have a class: ``` public class Alert { public int ID public System.DayOfWeek AlertDay; public string Message; } ``` Should my corresponding Alert table simply be something like: ``` CREATE TABLE ...
[ 0.032376132905483246, 0.07843450456857681, 0.39542141556739807, 0.010528668761253357, 0.009984016418457031, 0.05386168137192726, 0.024772411212325096, -0.31326231360435486, -0.3345753252506256, -0.40648651123046875, 0.0094523336738348, 0.28332963585853577, -0.3408510684967041, 0.0853256732...
the week aren't likely to change, and you don't want to have to perform an unnecessary join. On the other hand, you do want to make sure that the source of your "days of the week" is consistent and not going to change (e.g. localization, capitalization, abbreviation, etc).
[ 0.5253835916519165, -0.09371576458215714, 0.3862667679786682, 0.03878804296255112, -0.3138769865036011, -0.005829930305480957, 0.4775623381137848, 0.6334031820297241, -0.5046491622924805, -0.3780904710292816, -0.16891397535800934, 0.07414259761571884, -0.23543758690357208, 0.20709671080112...
In **C++**, is there any difference between: ``` struct Foo { ... }; ``` and: ``` typedef struct { ... } Foo; ``` In C++, there is only a subtle difference. It's a holdover from C, in which it makes a difference. The C language standard ([C89 §3.1.2.3](http://port70.net/~nsz/c/c89/c89-draft.txt), [C99 §6.2.3](htt...
[ 0.15832526981830597, 0.35948190093040466, 0.4182840585708618, -0.4757424294948578, -0.153543621301651, -0.13854238390922546, -0.041521310806274414, -0.2178701013326645, -0.1380910724401474, -0.11752208322286606, -0.37333613634109497, 0.5665518045425415, -0.5937467813491821, -0.047044638544...
refer to a `Foo`, you'd always have to call it a `struct Foo`. This gets annoying fast, so you can add a `typedef`: ``` struct Foo { ... }; typedef struct Foo Foo; ``` Now `struct Foo` (in the tag namespace) and just plain `Foo` (in the ordinary identifier namespace) both refer to the same thing, and you can freely ...
[ -0.06002640724182129, 0.319698691368103, 0.4786188304424286, -0.2119274139404297, -0.28653115034103394, -0.2922886610031128, 0.22219207882881165, -0.13946782052516937, -0.02725755237042904, -0.39759498834609985, -0.2816575765609741, 0.45560401678085327, -0.6428821682929993, 0.2304279506206...
a name in the tag namespace, only a name in the typedef namespace. This means it also cannot be forward-declared. *If you want to make a forward declaration, you have to give it a name in the tag namespace*. --- In C++, all `struct`/`union`/`enum`/`class` declarations act like they are implicitly `typedef`'ed, as lon...
[ -0.2674294710159302, 0.14963118731975555, 0.1622239351272583, -0.1464482694864273, -0.08682321757078171, -0.1310919225215912, 0.18922004103660583, -0.2661212682723999, -0.18670417368412018, -0.12030605971813202, -0.2646265923976898, 0.18894848227500916, -0.2890087068080902, 0.3130414187908...
Im trying to get the total amount of points a user has, as well as current month's points. When a user gets a point, it gets logged into the points table with a timestamp. Totals ignore the timestamp, while the current month's points looks for the points with the correct timestamp (from the first day of the month). ``...
[ 0.06090620532631874, 0.13884441554546356, 0.8290249705314636, 0.01884850673377514, -0.0788031741976738, 0.3997025787830353, 0.06389573216438293, -0.059951841831207275, -0.38662827014923096, -0.5887128114700317, -0.0439939983189106, 0.09178191423416138, -0.09693004935979843, 0.2295011579990...