text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I'm missing a bit of information here...am I really able to replace my `BeginTransaction()` and `RollbackTransaction(`) calls by surrounding my code using `TransactionScope`? If not, how then does `TransactionScope` work to roll back transactions? Essentially TransactionScope doesn't track your Adapter's, what it does...
[ 0.33019399642944336, -0.06863057613372803, 0.36854320764541626, 0.16026441752910614, -0.10080836713314056, -0.34146323800086975, 0.17501883208751678, -0.3456982970237732, -0.13768894970417023, -0.6568423509597778, 0.10615044832229614, 0.6815541386604309, -0.454740047454834, 0.2303473055362...
ensuring dispose will be called even if an exception occurs. So if dispose is called before txScope.Complete() the TransactionScope will tell the connections to rollback their transactions (or the DTC).
[ 0.49299803376197815, -0.366752952337265, 0.4338902533054352, 0.04304138571023941, 0.4109768867492676, -0.46821117401123047, 0.0693141520023346, -0.1480059176683426, -0.22091950476169586, -0.5243838429450989, -0.28101783990859985, 0.928989589214325, -0.05785420909523964, -0.0699174925684928...
What reasoning exists behind making C# case sensitive? I'm considering switching from VB.NET to take advantage of some language features (CCR and yield), and understanding the reasoning behind this difference may make the transition easier. [UPDATE] Well I took the plunge three days ago. Learning C# hasn't been parti...
[ -0.10544832795858383, 0.13791008293628693, 0.2551165819168091, -0.15591716766357422, -0.4196165204048157, -0.07296013087034225, 0.15618379414081573, -0.0035373279824852943, 0.004694539587944746, -0.6225038170814514, 0.04394567012786865, 1.0405809879302979, -0.13841353356838226, 0.046713244...
current project i'd port the code base into C# to take full advantage. Wouldn't be fair to my client though. Assessing my current project now and I'm seeing blocking threads EVERYWHERE! AHhhh!!! **[UPDATE]** Well i've been programming in C# for nearly a year now. I'm really enjoying the language, and I really REALLY...
[ -0.024755267426371574, -0.07857241481542587, 0.22699828445911407, 0.0038682245649397373, -0.016170814633369446, -0.07664346694946289, 0.313484787940979, 0.176991805434227, -0.25061672925949097, -0.8327383995056152, 0.1465216428041458, 0.511401891708374, -0.19149701297283173, 0.153320252895...
I can't verify. I would also like to point out that this is a very valid use case: ``` public class Child { private Person parent; public Person Parent { get { return parent;} } } ``` Yes you can get around this using prefixes on your member variables but some people don't like to do that.
[ 0.3543055057525635, 0.19404342770576477, -0.3001018762588501, 0.08376561105251312, -0.05036117509007454, -0.1949644833803177, 0.2057618945837021, 0.1305210292339325, -0.0685119777917862, -0.608688235282898, -0.10091595351696014, 0.21498240530490875, -0.1652703732252121, 0.5742565989494324,...
I have a visual studio project which is an ASP.NET MVC project, however it doesn't recognize it as such in Visual Studio so I don't get the nice dropdowns with Add View and such. Rather I just get a very plain add file dialog which doesn't include any MVC file templates. When I create a new MVC project however I get al...
[ 0.8336915373802185, 0.1652427762746811, 0.03619193658232689, 0.012695391662418842, -0.5134349465370178, -0.2410561442375183, 0.27782347798347473, 0.07147402316331863, -0.30380985140800476, -0.6952542662620544, 0.16395249962806702, 0.8465462923049927, -0.2604042589664459, 0.2693641185760498...
In the case of ASP.NET MVC RC1 they are: {603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} Though of course these may vary depending on the version you're targeting.
[ -0.07633974403142929, -0.20419743657112122, 0.29875269532203674, -0.2610022723674774, -0.22212529182434082, 0.2067975550889969, 0.20516811311244965, -0.3337477743625641, -0.4030049443244934, -0.25679871439933777, -0.1748824268579483, 0.4851282238960266, -0.35118699073791504, -0.00121748889...
In Perl, the `%` operator seems to assume integers. For instance: ``` sub foo { my $n1 = shift; my $n2 = shift; print "perl's mod=" . $n1 % $n2, "\n"; my $res = $n1 / $n2; my $t = int($res); print "my div=$t", "\n"; $res = $res - $t; $res = $res * $n2; print "my mod=" . $res . "\n\n...
[ -0.24455629289150238, -0.07012678682804108, 0.5861924290657043, -0.4377266466617584, 0.049973245710134506, 0.2896222174167633, 0.3175227642059326, -0.4704885482788086, -0.017273370176553726, 0.07366125285625458, -0.3633538484573364, 0.5105032920837402, -0.5404790043830872, 0.20877473056316...
-7.1 ); ``` gives ``` perl's mod=6 my div=428 my mod=6.15296300000033 perl's mod=-1 my div=-428 my mod=6.15296300000033 perl's mod=1 my div=-428 my mod=-6.15296300000033 perl's mod=-6 my div=428 my mod=-6.15296300000033 ``` Now as you can see, I've come up with a "solution" already for calculating `div` and `mo...
[ -0.3935036361217499, 0.08855945616960526, 0.624939501285553, -0.35265830159187317, -0.3573143482208252, 0.42354753613471985, 0.3864307403564453, -0.5959343910217285, -0.3676934242248535, -0.05146938934922218, -0.007109719328582287, 0.5871845483779907, 0.030394824221730232, 0.12923713028430...
as: `−42 = 9×(−5) + 3` or `−42 = 8×(−5) + (−2)`. So the remainder is then either 3 or −2. For more info: [Wikipedia:Remainder "Inequality satisfied by the remainder"](http://en.wikipedia.org/wiki/Remainder#The_inequality_satisfied_by_the_remainder) Also, the output in case of negative numbers in mod / div is implem...
[ -0.33944594860076904, -0.10932140797376633, 0.20242935419082642, -0.34345903992652893, -0.12541206181049347, 0.18223650753498077, 0.3000388443470001, -0.8884749412536621, -0.3213616609573364, -0.033837173134088516, -0.416364461183548, 0.39077726006507874, -0.16595476865768433, -0.120506763...
We need to display the result of an SQL SELECT statement on a ASP.NET 3.5 web page. Although there are a number of columns that need to be displayed, only one of the columns needs an editable text box in it... however every record in the result set needs this editable textbox. I know I can do this manually by building...
[ 0.6406886577606201, -0.000565164431463927, 0.3984698951244354, 0.13804323971271515, -0.08878012001514435, -0.21682091057300568, 0.03245466947555542, -0.20240435004234314, -0.2855232059955597, -0.7725275754928589, 0.11385069787502289, 0.4053819179534912, -0.018295489251613617, 0.04727862030...
done this. --Thanks for your help! A little further clarification.... We need all records to be editable immediately after display - so all records either need to be displayed in edit mode simultaneously - or the regular display mode needs to have an editable text box in it. Given `a = qd + r`, there is an ambiguit...
[ -0.06485742330551147, 0.3138379454612732, 0.170741006731987, -0.15277566015720367, 0.1067243441939354, 0.007358054164797068, 0.21075381338596344, -0.4811651408672333, -0.5384339094161987, -0.2683493494987488, -0.25294509530067444, 0.2754989266395569, -0.05104522779583931, 0.315510600805282...
the remainder"](http://en.wikipedia.org/wiki/Remainder#The_inequality_satisfied_by_the_remainder) Also, the output in case of negative numbers in mod / div is implementation dependent in software languages. See [Wikipedia: Modulo operation](http://en.wikipedia.org/wiki/Modulo_operation) (look at the table on right)
[ -0.17714306712150574, -0.09603320807218552, 0.317693293094635, -0.14748422801494598, -0.10073158144950867, -0.010711628943681717, 0.12311205267906189, -0.7462295293807983, -0.25169411301612854, 0.09755787998437881, -0.37820056080818176, 0.4505879580974579, -0.2553038001060486, -0.067778043...
At SO there has been much discussion about how many files in a directory are appropriate: on older filesystems stay below a few thousand on newer stay below a few hundred thousand. Generally the suggestion is to create sub-directories for every few thousand files. So the next question is: what is the maximum number of...
[ 0.18088510632514954, -0.26392126083374023, 0.011373307555913925, 0.2161361575126648, -0.15604907274246216, 0.013915943913161755, 0.5361003279685974, -0.33693432807922363, -0.16129130125045776, -0.6887668371200562, -0.08220846951007843, 0.7458485960960388, -0.11792763322591782, 0.2268480509...
(I've had Vista crash, but XP seems to handle it better). Since you mention nesting directories also keep in mind that there are limits to the length of fully qualified (with drive designator and path) filenames [(See wikipedia 'filename' entry)](http://en.wikipedia.org/wiki/Filename). This will vary with the operatin...
[ 0.1262780874967575, 0.2081390619277954, 0.3141484558582306, 0.12509669363498688, -0.2161252349615097, 0.04039798304438591, 0.35126546025276184, -0.4043225049972534, -0.2827851176261902, -0.7435302734375, 0.09697037190198898, 0.6854162812232971, 0.05319445580244064, 0.04453207179903984, 0...
I.E. Explorer 7). Also there are limitations on the nesting level of subdirectories. For example CD-ROM (ISO 9660) is limited to 8 directory levels (something to keep in mind if you would want to copy your directory structure to a CD-ROM, or another filesystem). So there is a lot of inconsistency when you push the f...
[ 0.1001916453242302, -0.022423718124628067, 0.20286911725997925, 0.24240636825561523, 0.017154650762677193, -0.4612530469894409, 0.5266410112380981, -0.04120499640703201, -0.18898309767246246, -0.7381401062011719, -0.44098642468452454, 0.33482468128204346, -0.4488074481487274, 0.22688759863...
Javascript code: ``` function doSomething(v1,v2){ //blah; } function SomeClass(callbackFunction,callbackFuncParameters(*Array*))={ this.callback = callbackFunction; this.method = function(){ this.callback(parameters[0],parameters[1]) // *.* } } var obj = new SomeClass( doSomething, Array('v1text','v...
[ -0.13253815472126007, 0.026839904487133026, 0.6287338137626648, -0.4375380277633667, -0.03528100997209549, 0.07929255068302155, 0.3855144679546356, -0.5801512002944946, -0.010908267460763454, -0.7876744866371155, -0.15407584607601166, 0.6736748814582825, -0.44860270619392395, -0.1428080201...
value of "this" within the callback and can be set to any value.
[ -0.005462436005473137, 0.05214165896177292, 0.4804702401161194, -0.16401870548725128, 0.24530723690986633, -0.06999070197343826, -0.11365103721618652, -0.25431522727012634, 0.24084924161434174, -0.2014697641134262, -0.5531994104385376, 0.6050196290016174, -0.14721237123012543, 0.1823299527...
I am a C# programmer, but I have a question about Async Workflows in F#. Supposing I have the following class in a C# class library: ``` class File { IAsyncResult BeginReadAll(string fileName, AsyncCallback callback, object state){} string EndReadAll(IAsyncResult result){} } ``` My understanding is that is possibl...
[ 0.7442147135734558, -0.02809373289346695, 0.1897893249988556, -0.14815476536750793, -0.21458785235881805, -0.3196650743484497, 0.11772133409976959, -0.15052196383476257, -0.13060429692268372, -0.561436653137207, 0.24777726829051971, 0.4771018326282501, -0.4343961477279663, 0.34293675422668...
in F# using Async.Primitive, but my question is: can I call this ReadAllAsync function from C# code? If so, how do I package the F# code in a class library to access from C#? AIX 5.3 introduced the `LDR_PRELOAD` (for 32-bit programs) and `LDR_PRELOAD64` (for 64-bit programs) variables. They are analoguous to LD\_PRELOA...
[ 0.11802314221858978, -0.048728033900260925, 0.4005749821662903, -0.2063561975955963, -0.286952942609787, -0.12129608541727066, -0.17926503717899323, -0.2309127002954483, -0.05196452513337135, -0.6759392619132996, -0.15265148878097534, 0.6035112738609314, -0.5347197651863098, -0.07959605008...
multiple entries with a colon: ``` LDR_PRELOAD="foo.so:bar.a(shr.so)" ```
[ 0.07485825568437576, 0.18305936455726624, 0.3861587345600128, -0.2839494049549103, -0.07890002429485321, 0.35326215624809265, 0.15868140757083893, -0.2306964099407196, -0.2743518352508545, -0.44541484117507935, -0.029887238517403603, 0.3155163526535034, -0.43140095472335815, 0.067034296691...
I'd like to be notified when a file has been changed in the file system. I have found nothing but a thread that polls the lastModified File property and clearly this solution is not optimal. Since JDK 1.7, the canonical way to have an application be notified of changes to a file is using the [WatchService](https://docs...
[ 0.6630387306213379, 0.21258287131786346, 0.5536549687385559, -0.21946536004543304, 0.15738123655319214, -0.5194288492202759, 0.09435613453388214, -0.1177966296672821, -0.3188004195690155, -0.5001064538955688, -0.3446836769580841, 0.48687803745269775, -0.4445168375968933, 0.1039755120873451...
* are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documenta...
[ 0.7714505791664124, 0.6201772093772888, -0.41547128558158875, 0.1346139907836914, -0.014416681602597237, -0.15933695435523987, 0.07148927450180054, 0.20006950199604034, 0.043801601976156235, 0.05430806800723076, -0.6814889907836914, 0.2397167831659317, 0.036831822246313095, 0.2414236664772...
or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTI...
[ 0.7899213433265686, 0.35119572281837463, 0.5636897683143616, -0.06825430691242218, 0.22989526391029358, -0.4902638792991638, 0.06602213531732559, 0.5319830179214478, 0.0735163614153862, -0.18386082351207733, -1.03071928024292, 0.31237635016441345, 0.08028458803892136, 0.1515548676252365, ...
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import java.nio.file.*; import static ...
[ 0.6085196137428284, -0.2795603573322296, 0.4394177198410034, -0.0940055176615715, 0.3070595860481262, 0.01072352658957243, 0.12861762940883636, -0.20962917804718018, -0.20025070011615753, -0.389875590801239, -0.41628408432006836, 0.7964377999305725, -0.3489654064178467, 0.15584354102611542...
@SuppressWarnings("unchecked") static <T> WatchEvent<T> cast(WatchEvent<?> event) { return (WatchEvent<T>)event; } /** * Register the given directory with the WatchService */ private void register(Path dir) throws IOException { WatchKey key = dir.register(watcher, ENTRY_CREATE...
[ 0.48699671030044556, -0.6161479353904724, 0.48522627353668213, -0.3410666882991791, 0.41763728857040405, 0.11913277953863144, 0.5732132792472839, -0.39478087425231934, -0.06392214447259903, -0.5093573331832886, -0.0626210942864418, 0.8506258726119995, -0.4730978310108185, 0.017622791230678...
if (prev == null) { System.out.format("register: %s\n", dir); } else { if (!dir.equals(prev)) { System.out.format("update: %s -> %s\n", prev, dir);
[ -0.4157019257545471, -0.191998690366745, 0.4853120744228363, -0.30851489305496216, 0.11000526696443558, 0.2047182023525238, 0.15017127990722656, -0.18728706240653992, 0.26513195037841797, -0.5688459277153015, -0.4195898175239563, 0.6211231350898743, -0.16056078672409058, -0.039189185947179...
} } } keys.put(key, dir); } /** * Register the given directory, and all its sub-directories, with the * WatchService. */ private void registerAll(final Path start) throws IOException { // register directory and sub-directories Files.walkFileTree(st...
[ 0.2763945162296295, -0.38047775626182556, 0.5224778652191162, -0.2725985646247864, 0.502963125705719, 0.1884477287530899, 0.35215094685554504, -0.41826045513153076, -0.14943015575408936, -0.6310119032859802, -0.12252014875411987, 0.7580553293228149, -0.600318193435669, -0.08674439787864685...
@Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { register(dir); return FileVisitResult.CONTINUE;
[ 0.15594659745693207, -0.31104621291160583, 0.30583441257476807, -0.12552869319915771, 0.3147503733634949, 0.06635084003210068, 0.6901451945304871, -0.5061694383621216, 0.2604266405105591, -0.3124944567680359, -0.13304312527179718, 0.7561857104301453, -0.46257057785987854, 0.249530375003814...
} }); } /** * Creates a WatchService and registers the given directory */ WatchDir(Path dir, boolean recursive) throws IOException { this.watcher = FileSystems.getDefault().newWatchService(); this.keys = new HashMap<WatchKey,Path>(); this.recursive = recursive; ...
[ 0.20491936802864075, -0.48359256982803345, 0.771170437335968, -0.16124315559864044, 0.492177814245224, -0.012110665440559387, 0.10616394132375717, -0.3395024836063385, -0.40497025847435, -0.5266143679618835, -0.15424467623233795, 0.8012989163398743, -0.6453288793563843, 0.0377834253013134,...
%s ...\n", dir); registerAll(dir); System.out.println("Done."); } else { register(dir); } // enable trace after initial registration this.trace = true; } /** * Process all events for keys queued to
[ 0.16841144859790802, -0.3220806121826172, 0.36339133977890015, -0.25512412190437317, 0.5381391644477844, -0.07293149828910828, 0.507489800453186, -0.3664296865463257, -0.1746448278427124, -0.47386279702186584, -0.3806672990322113, 0.3878195881843567, -0.16891729831695557, 0.207229122519493...
the watcher */ void processEvents() { for (;;) { // wait for key to be signalled WatchKey key; try { key = watcher.take(); } catch (InterruptedException x)
[ 0.41778868436813354, -0.6408372521400452, 0.758122980594635, -0.193594828248024, 0.48658132553100586, 0.12711437046527863, 0.41724780201911926, -0.06236952543258667, -0.23909464478492737, -0.3153241276741028, -0.1985567957162857, 0.629901111125946, -0.45899420976638794, 0.4038093388080597,...
{ return; } Path dir = keys.get(key); if (dir == null) { System.err.println("WatchKey not recognized!!"); continue;
[ 0.008263854309916496, -0.5047340989112854, 0.5451582074165344, -0.3751812279224396, 0.600678563117981, -0.12242785096168518, 0.714965283870697, -0.14169716835021973, 0.00231468235142529, -0.3095969259738922, -0.44803059101104736, 0.9380034804344177, -0.388603150844574, 0.19802671670913696,...
} for (WatchEvent<?> event: key.pollEvents()) { WatchEvent.Kind kind = event.kind(); // TBD - provide example of how OVERFLOW event is handled if (kind == OVERFLOW) {
[ 0.04491199180483818, -0.5831225514411926, 0.45528849959373474, -0.11014238744974136, 0.28778767585754395, 0.16392426192760468, 0.21329709887504578, -0.19178828597068787, 0.001718821469694376, -0.6434931755065918, 0.14323651790618896, 0.6794425249099731, -0.6919254064559937, 0.0417255759239...
continue; } // Context for directory entry event is the file name of entry WatchEvent<Path> ev = cast(event); Path name = ev.context();
[ 0.14599978923797607, -0.3054218590259552, 0.449584424495697, -0.3908466398715973, 0.6399350166320801, 0.19533637166023254, 0.41779133677482605, -0.06941872835159302, -0.21026307344436646, -0.2843030095100403, -0.24990446865558624, 0.6029680371284485, -0.07985550165176392, 0.253511130809783...
Path child = dir.resolve(name); // print out event System.out.format("%s: %s\n", event.kind().name(), child); // if directory is created, and watching recursively, then // register it and its sub-directories
[ -0.1879463791847229, -0.3226953446865082, 0.17510198056697845, -0.06331141293048859, 0.4400063455104828, 0.14980334043502808, 0.19458380341529846, -0.13219690322875977, -0.034839928150177, -0.7592073082923889, 0.055725034326314926, 0.41664233803749084, -0.23678889870643616, 0.1788888126611...
if (recursive && (kind == ENTRY_CREATE)) { try { if (Files.isDirectory(child, NOFOLLOW_LINKS)) { registerAll(child);
[ -0.19166718423366547, -0.22182011604309082, 0.25968387722969055, -0.21356673538684845, 0.7819666266441345, 0.14411155879497528, 0.3552805185317993, -0.40251120924949646, 0.03750084340572357, -0.5795311331748962, -0.3774479329586029, 0.32197538018226624, -0.13156768679618835, 0.196646645665...
} } catch (IOException x) { // ignore to keep sample readbale }
[ 0.27845498919487, -0.254852294921875, -0.295317143201828, -0.19160635769367218, 0.21982625126838684, 0.030651601031422615, 0.22926723957061768, 0.17379814386367798, 0.17941531538963318, -0.22776030004024506, 0.2553479075431824, 0.4563901722431183, -0.6548271775245667, 0.04188750684261322, ...
} } // reset key and remove from set if directory no longer accessible boolean valid = key.reset(); if (!valid) { keys.remove(key); // all directories are
[ 0.0866420790553093, -0.14330990612506866, 0.6318711638450623, 0.07769070565700531, 0.46538591384887695, -0.28393954038619995, 0.4398585259914398, -0.1386297345161438, -0.22966110706329346, -0.26956722140312195, -0.7280455231666565, 0.3188784718513489, -0.5136038661003113, 0.508201062679290...
inaccessible if (keys.isEmpty()) { break; } } } } static void usage() { System.err.println("usage: java WatchDir [-r] dir");
[ -0.41768965125083923, -0.18964235484600067, 0.3467276990413666, -0.11232134699821472, 0.3285665512084961, -0.1254032850265503, 0.38425344228744507, 0.10675717890262604, -0.00041077318019233644, -0.575613796710968, -0.6082984805107117, 0.6431649923324585, -0.6817703247070312, 0.383912295103...
System.exit(-1); } public static void main(String[] args) throws IOException { // parse arguments if (args.length == 0 || args.length > 2) usage(); boolean recursive = false; int dirArg = 0; if (args[0].equals("-r")) {
[ -0.3644714951515198, -0.0895163044333458, 0.2505374252796173, -0.2766478955745697, 0.247707337141037, 0.35408592224121094, 0.37597599625587463, -0.1969936639070511, -0.04109746962785721, -0.12819336354732513, -0.13467220962047577, 0.5627294182777405, -0.5892764329910278, 0.2974587380886078...
if (args.length < 2) usage(); recursive = true; dirArg++; } // register directory and process its events Path dir = Paths.get(args[dirArg]); new WatchDir(dir, recursive).processEvents(); } } ``` For individual files, various solutions exist,...
[ 0.03559878095984459, -0.34000450372695923, 0.41644784808158875, -0.1627628654241562, 0.2946648895740509, 0.2318861037492752, 0.31438109278678894, -0.4460859000682831, -0.40145638585090637, -0.5153461694717407, -0.34005245566368103, 0.6340603232383728, -0.4514479637145996, 0.066748000681400...
as: * <https://dzone.com/articles/listening-to-fileevents-with-java-nio> Note that Apache VFS uses a polling algorithm, although it may offer greater functionality. Also note that the API does not offer a way to determine whether a file has been closed.
[ 0.3850563168525696, -0.13598354160785675, 0.1541048139333725, 0.028058085590600967, -0.26369380950927734, -0.34075674414634705, 0.4299619197845459, -0.30236923694610596, -0.3183913230895996, -0.3050849735736847, -0.44791528582572937, 0.2799150347709656, -0.2517734467983246, -0.009569293819...
I used this vba code in the ThisWorkbook module to disable the right click menu in an Excel workbook. ``` Private Sub Workbook_Activate() With Application.CommandBars.FindControl(ID:=847) .Visible = False End With End Sub Private Sub Workbook_Deactivate() With Application.CommandBars.FindControl(ID:=84...
[ 0.03683479502797127, 0.14310230314731598, 0.5484526753425598, -0.4579833447933197, 0.035409148782491684, -0.06578322499990463, 0.5846289992332458, -0.28005117177963257, -0.13531433045864105, -0.4707203805446625, -0.23487646877765656, 0.9094083905220032, -0.560096263885498, 0.03354455903172...
workbook, not even a new one, has a menu when I click right on one of the tabs. Is there a general vba codesnippet that "resets" excel maybe? Or a general "enable all menus" thing? **REVISION: This code posted here doesn't disable the rightclick menu, it removes the "delete" option from that specific menu.** omg ```...
[ 0.29967498779296875, 0.2203279435634613, 0.5212944149971008, -0.05127115920186043, 0.1455901712179184, -0.031185368075966835, 0.48119473457336426, -0.05814069136977196, -0.34132423996925354, -0.5627771019935608, -0.14292332530021667, 0.47811001539230347, -0.22389483451843262, 0.02555658668...
I am new to XML-RPC. ``` #client code import xmlrpclib proxy = xmlrpclib.ServerProxy("http://localhost:8000/") x,y = arg1,arg2 print proxy.fun1(x,y) print proxy.fun2(x,y) ``` What server should do: 1. load fun1 2. register fun1 3. return result 4. unload fun1 and then do same with fun2. What is the best way to do...
[ 0.2613881826400757, 0.17818059027194977, 0.4109002351760864, 0.03952423110604286, -0.27554816007614136, -0.4093244969844818, 0.2661146819591522, -0.3237653970718384, -0.35737961530685425, -0.8946592211723328, 0.15972505509853363, 0.4998204708099365, -0.21708588302135468, 0.0655777230858802...
answer I understand that this is not your problem - I'm leaving it here for people coming across the same problem under different circumstances later. **Lookup of JNDI Resources from self-spawned threads** Also, access to JNDI resources might *depend upon the thread looking up* the resources. As far as I remember, th...
[ 0.5584598779678345, -0.12796539068222046, 0.09775672852993011, 0.23287399113178253, -0.1835138201713562, -0.14526304602622986, 0.03790022432804108, 0.05946211516857147, -0.3574313521385193, -0.5270543098449707, 0.1195516288280487, 0.4603655934333801, -0.18028557300567627, 0.140921786427497...
Tomcat6 in this regard, earlier versions used to provide JNDI resources to all threads) You've written that you are looking up JNDI resources from a singleton. **If you**, at the point of looking up resources, **examine the stacktrace** (either in your IDE, by throwing an exception or messing with `Thread.currentThrea...
[ 0.13728336989879608, -0.3007582128047943, 0.3715258538722992, 0.08659610152244568, 0.1930316537618637, -0.17398440837860107, 0.3206326961517334, -0.1364160180091858, -0.5178268551826477, -0.48621678352355957, -0.026850374415516853, 0.6410492062568665, -0.33495068550109863, 0.16984221339225...
Struts Action and call your JNDI lookup code from there, see if this works if placed as close to struts and within the processing of a http request. If it works here, continue with the steps above. **validity of web.xml** Also, you might want to have a look at the schema definition for web.xml to make sure your resou...
[ 0.356952965259552, -0.006317305378615856, 0.7541348338127136, -0.12635648250579834, -0.434979647397995, 0.053707804530858994, 0.5583339929580688, -0.7791299223899841, -0.411914587020874, -0.07212604582309723, 0.1694352775812149, 0.5494068264961243, -0.2289242446422577, -0.261854887008667, ...
my IDEs editor complains when I get it wrong, should I need to write a web.xml) **Tomcat debug options** Many context.xml entries honour the attribute 'debug'. Though I believe that low one-digit values are sufficient, I've adopted the habit to add 'debug="99"' to elements like 'Context' or others. You might want to ...
[ 0.4301186501979828, 0.30925169587135315, 0.334972083568573, 0.08406644314527512, 0.0035018448252230883, -0.24573059380054474, 0.21709153056144714, -0.1555977165699005, -0.2566981911659241, -0.6879606246948242, -0.026823028922080994, 0.49636581540107727, 0.09135469794273376, 0.0269243754446...
You might take unused away once it worked with all libraries in there. **Regarding your classpath question**: The reason for finding the class when put into $CATALINA\_HOME/lib is, that the connection is done by the server (remember - you've defined it in context.xml which is read by the server in order to start the ...
[ -0.12574779987335205, -0.05954904854297638, 0.322683185338974, 0.03879578039050102, 0.17407187819480896, -0.02267848700284958, 0.03148488700389862, -0.2003353238105774, -0.14715956151485443, -0.5530794858932495, -0.07561207562685013, 0.29868847131729126, -0.022414805367588997, 0.0100524201...
for tomcat is either in the webapps META-INF/context.xml or in an xml file (named as you like, ending .xml) in $CATALINA\_HOME/conf/Catalina/localhost/. The later solution is actually prefered with regards to META-INF/context.xml because this way the configuration is independent of the application and doesn't get overw...
[ -0.0018307386199012399, -0.0475505031645298, 0.7176900506019592, 0.07762408256530762, 0.2711903750896454, 0.13857661187648773, 0.31274470686912537, -0.16946078836917877, -0.4293748736381531, -0.11025258153676987, -0.008215456269681454, 0.7458644509315491, -0.32206153869628906, -0.292168021...
and might create the context file. Also, deleting the webapp in order to deploy a new one might cause tomcat to delete the xml config file. Therefor - whatever your problem might be: Try if your context definition / application work when placed in $CATALINA\_HOME/conf/Catalina/localhost/app.xml . I have the feeling th...
[ 0.1099122017621994, -0.06721383333206177, 0.31522154808044434, 0.4066445827484131, 0.05326936021447182, -0.28838279843330383, 0.4334720969200134, -0.07735657691955566, -0.40996837615966797, -0.3881317377090454, -0.08081913739442825, 0.729510486125946, 0.007080698385834694, -0.1229224354028...
I'm writing a WebPart, which means that I inherit from `System.Web.UI.WebControls.WebParts.WebPart` and I override the method `protected override void CreateChildControls()`. However, I'd like to make the class `sealed` if possible, but that gives two issues: Just sealing the class gives a warning "new protected membe...
[ 0.2743712365627289, 0.3895171582698822, 0.1706375926733017, -0.052897270768880844, 0.18275709450244904, -0.5118812322616577, 0.5973246097564697, -0.18029451370239258, -0.00770540302619338, -0.460737943649292, -0.19153159856796265, 0.3125716745853424, -0.06872303038835526, 0.684467494487762...
work just fine, but the devil is usually in the details. **Edit:** I was just being stupid. The "new protected member" error was for a function that was indeed NOT overridden and just accidentially was declared as `protected`. Thanks for the Pragma-Tip though! The fact that it says there's a *new* protected member dec...
[ 0.4427271783351898, -0.0003946640354115516, 0.0699639618396759, -0.03729001060128212, 0.15418888628482819, -0.19780947268009186, 0.5974608659744263, -0.23024271428585052, -0.23220817744731903, -0.40112823247909546, -0.08168195933103561, 0.7505103945732117, -0.08122162520885468, 0.274094820...
} } ``` compiles without warnings with .NET 3.5SP1. Are you *definitely* overriding the base method? Check that you really have got the `override` modifier. (Sorry if that sounds patronising - I'm not trying to accuse you of being lax or anything. I'm just stumped otherwise...)
[ 0.45720812678337097, 0.0032226305920630693, -0.028607169166207314, -0.03965328633785248, 0.16612540185451508, -0.6583558320999146, 0.47511768341064453, 0.23966780304908752, 0.054837487637996674, -0.38884246349334717, -0.16852636635303497, 0.6484109163284302, -0.3664163053035736, -0.0027024...
In my main method, I start the main form as usual: ``` Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); ``` In the main forms load thing I have the following, which will ask the user to log in and stuff. ``` usin...
[ 0.3183552026748657, 0.03973788022994995, 1.0457843542099, -0.3210850954055786, 0.2773095965385437, -0.1807996928691864, 0.416867733001709, -0.4056265652179718, -0.034330110996961594, -0.548180103302002, -0.3678639829158783, 0.6889022588729858, -0.2932903468608856, 0.11191808432340622, 0....
{ case DialogResult.OK: break; default: Application.Exit();
[ -0.49906134605407715, 0.15864737331867218, 0.2661072313785553, -0.2222101241350174, 0.763234555721283, 0.10560660064220428, 0.49157387018203735, 0.054527174681425095, 0.01237163133919239, -0.4435811936855316, -0.7630121111869812, 0.4483126699924469, -0.49154460430145264, 0.2401660233736038...
return; } } ``` My problem is that the main form shows up in the background, and I want it to, well... not. until the login is ok. How should I do this? The Application.Run() method say it automatically shows the form. Is there an alternative way of starting the main form without showing it? Or d...
[ 0.2977250814437866, 0.27368664741516113, 0.31828853487968445, -0.3209681510925293, 0.3201304078102112, -0.28887444734573364, 0.6359561681747437, 0.15168388187885284, 0.0015982764307409525, -0.5506802797317505, -0.3678271770477295, 0.7193832397460938, -0.3988206088542938, 0.184930220246315,...
done, or something similar? What is the recommended way of doing something like that? The login forms intention is like a combined splash screen and login. So first it loads and sets up some different things, and then it tells the user to login. Instead of: ``` Application.Run(new MainForm()); ``` try: ``` LoginDia...
[ 0.22828304767608643, -0.032728731632232666, 0.7642493844032288, -0.13675184547901154, 0.1597900688648224, -0.38329407572746277, 0.4323164224624634, -0.06649833917617798, -0.43170276284217834, -0.47350335121154785, -0.5590323805809021, 0.3965739607810974, -0.5051560401916504, 0.220601528882...
pressing an 'OK' button or 'Cancel' button.
[ -0.3627898395061493, -0.09480220079421997, 0.28897571563720703, -0.14665007591247559, 0.46396100521087646, -0.30360284447669983, -0.03279808908700943, 0.5478349328041077, -0.4425703287124634, -0.26166093349456787, -0.9013051986694336, 0.4626360237598419, -0.5602646470069885, -0.48315048217...
I have a select box with options in it. The value of the options gets the id of the item that is displayed in each option. I do have an other value that should be linked on this option. Is there an easy way to do this? ``` <select id="category" name="data[cat]"> <option value="12" label="0">A</option> <option valu...
[ 0.1436319202184677, -0.5045051574707031, 0.26732510328292847, -0.1497677117586136, 0.14124567806720734, -0.018997834995388985, 0.003766446141526103, -0.31000715494155884, -0.26609569787979126, -0.754315197467804, -0.060640495270490646, 0.6130547523498535, -0.22166243195533752, 0.0518949404...
() { var catId = ($(this)[0].value); }); ``` This works great, but I just don't know how to get the label value of the selected option. Or maybe a better way to solve this problem. Instead of: ``` Application.Run(new MainForm()); ``` try: ``` LoginDialog // the class that handles login UI log...
[ -0.004493901506066322, 0.036906156688928604, 0.9425398111343384, -0.07016707211732864, 0.06344664096832275, -0.1762710064649582, 0.6436996459960938, -0.15449172258377075, -0.39410126209259033, -0.5900112986564636, -0.5278287529945374, 0.5836779475212097, -0.5697569847106934, 0.379284977912...
to user input - by pressing an 'OK' button or 'Cancel' button.
[ -0.11612845957279205, -0.02976769208908081, 0.25402480363845825, 0.03540683537721634, 0.3757445812225342, -0.0963294506072998, 0.2460092455148697, 0.5083165168762207, -0.21644090116024017, -0.33113572001457214, -1.02811861038208, 0.41332170367240906, -0.3059215843677521, -0.105533577501773...
Background I have a component that provides certain CRM services - specificCRM. I have a specificCRMAdapter which implements my IGeneralCRM interface. Another component generalCRM exposes CRM functionality through IGeneralCRM and uses Spring.Net to inject the specificCRMAdapter to provide such functionality. Questio...
[ 0.4722532033920288, -0.10500334203243256, 0.25283852219581604, 0.11080256849527359, -0.09582848101854324, 0.20261482894420624, 0.07675248384475708, 0.022070668637752533, -0.24084801971912384, -0.528188169002533, 0.27921146154403687, 0.6438183784484863, -0.17028604447841644, -0.110684134066...
2, "Bart" }, { 3, "Charlie" } }; ```
[ -0.00613647885620594, 0.42627444863319397, 0.03312038257718086, -0.12170787900686264, 0.11601054668426514, 0.21882358193397522, 0.239295095205307, -0.01031489297747612, 0.08331471681594849, -0.4525890052318573, -0.5155161619186401, 0.4972441792488098, -0.5075327157974243, 0.415598064661026...
I just finished slicing and coding a very nice table-less css template for my website, all the time I was testing with IE7 and Chrome. Then I just had the brilliant idea of testing this template with IE6, I installed Windows XP on a Virtual PC and then I opened my website on IE6. **It looks extremely bad!** The form...
[ 0.6980628967285156, 0.43166083097457886, 0.22733403742313385, -0.09144648164510727, -0.36154139041900635, -0.1290978193283081, 0.5440486073493958, 0.35084205865859985, 0.0001603194250492379, -0.955051600933075, 0.17331580817699432, 0.4507330060005188, -0.06700647622346878, 0.31148949265480...
is a place where I can see what is not supported by IE6 so I can fix my CSS or even create a new one only for IE6. Any info will be very helpful! Thanks! IE6 has LOTS of CSS bugs so that will be contributing to your page rendering. [The official list of what is and isn't supported is here](http://msdn.microsoft.com/e...
[ 0.39592239260673523, -0.005770024843513966, 0.14430448412895203, 0.23650836944580078, -0.10979443788528442, -0.1917557716369629, 0.12955330312252045, 0.47804781794548035, -0.21682403981685638, -0.6997097730636597, 0.039451200515031815, 0.3783610761165619, 0.10663523524999619, 0.31387242674...
image this two tables: ``` Table: Item Columns: ItemID, Title Table: Tag Columns: TagID, ItemID, Title ``` Which is the best way (without changing table structure (yes, I don't mind if they are not normalized)) to retrieve a list of items with all their tags attached using less possible query (i.e. not doing 11 que...
[ 0.06761814653873444, -0.013834409415721893, 0.6024602651596069, 0.25749364495277405, -0.3116244375705719, 0.04671501740813255, -0.2961201071739197, -0.278749942779541, -0.3083252012729645, -0.6777196526527405, -0.10105068981647491, 0.43279320001602173, -0.3246022164821625, -0.1384925842285...
be exactly the same as the original image. JPEG uses lossy compression, the resulting image is an approximation to the original. If you take a lossy JPEG and then save it as a PNG then it will increase in size, often by a large amount as you have seen. The solution to your problem is to do nothing to your images befo...
[ 0.1570635437965393, 0.10357782989740372, 0.4768713414669037, 0.0030902482103556395, -0.008196472190320492, 0.17049534618854523, 0.04308897629380226, 0.06564582884311676, -0.36981648206710815, -0.7269337177276611, -0.06936091184616089, 0.6078301668167114, -0.4580296576023102, -0.36211100220...
and [JPEG](http://en.wikipedia.org/wiki/JPEG) generally.
[ 0.24985302984714508, -0.06318479776382446, 0.1955866515636444, 0.164500892162323, -0.5103448629379272, -0.004761881195008755, -0.42482122778892517, -0.024911323562264442, -0.604682445526123, -0.2692986726760864, -0.7755500078201294, 0.19264346361160278, -0.13225215673446655, 0.139585211873...
I need to create a table on a web page that has two rows. The table needs to fill the entire page so I have set the height and width of the table to 100% in the CSS stylesheet and the height of the HTML and body to 100% too. However, I need to top row of the table to be exactly 100 pixels in height and the second row ...
[ 0.2364358901977539, 0.10420770943164825, 0.6403345465660095, 0.11889922618865967, -0.24286268651485443, 0.25553834438323975, 0.1941569298505783, -0.17864753305912018, -0.11194978654384613, -0.8417358994483948, 0.17408664524555206, 0.0962747186422348, -0.17476747930049896, -0.03120971471071...
work. ``` <table style="border-collapse:collapse;height:100%;width:100%;"> <tr> <td style="border:solid 1px black;height:100px">1</td> <td style="border:solid 1px black">2</td> </tr> <tr> <td style="border:solid 1px black">3</td> <td style="border:solid 1px black">4</td> </tr> </table> ``` Ed...
[ 0.30774009227752686, 0.1166820153594017, 0.7297016382217407, -0.184251070022583, -0.07402036339044571, -0.17208461463451385, 0.4489227831363678, -0.7390719652175903, -0.4618864357471466, -0.8494921922683716, -0.22323714196681976, 0.5023348331451416, -0.18115079402923584, -0.449888825416564...
correct way to do it with the DOCTYPE?** Without CSS this works: ``` <html> <body> <table height="100%" width="100%" border="1"> <tr height="100"> <td>This is item text.</td> </tr> <tr> <td>This is item text 2.</td> </tr> </table> </body> </html> ``` So it is poss...
[ -0.09263957291841507, -0.23461249470710754, 0.6970047950744629, -0.05182429403066635, -0.2653895616531372, -0.15467968583106995, 0.2060355246067047, -0.41958025097846985, -0.15432831645011902, -0.8752797245979309, -0.07101645320653915, 0.6519349813461304, -0.007900469936430454, -0.26299342...
Is it possible to take an existing type and create an anonymous type from it with additional properties? For Example (in VB) ``` Public Class Person Public Name As String Public Age As Integer End Class Dim p As New Person With {.Name = "James", .Age = 100} Dim n = New With {.ShoeSize = 10} ``` What I want is ...
[ 0.20612488687038422, -0.08098754286766052, 0.36827144026756287, -0.21706123650074005, 0.15575507283210754, 0.16682784259319305, 0.2662728428840637, -0.27973487973213196, -0.15495607256889343, -0.5514384508132935, -0.06906293332576752, 0.5011065602302551, -0.22608312964439392, 0.24650520086...
At present I am using eclipse for JAVA project. I always wanted to use VIM for my project. Is there any good resource or tutorial that can help me? I was a vim diehard for years (and still am). However I finally succumbed to the lure of Eclipse, and I wouldn't look back (I've had to make a sideways move to Intellij, bu...
[ 0.5149129629135132, -0.18998481333255768, 0.05788272246718407, -0.1230669841170311, -0.3267236351966858, 0.06635306775569916, 0.14089138805866241, 0.2945062816143036, -0.28908443450927734, -0.2899962067604065, 0.3037201166152954, 0.4017602503299713, -0.18929307162761688, 0.2504368722438812...
this approach. Despite Vim's multitude of plugins, nothing comes close to the language-aware refactoring and coding capabilities of the modern IDE. Update: 20/01/2015. This plugin has moved to <http://www.viplugin.com>
[ 0.2274188995361328, -0.4724767208099365, 0.5956306457519531, -0.11549520492553711, -0.2098412662744522, -0.42406266927719116, 0.47286686301231384, 0.008702658116817474, -0.2609347701072693, -0.24159729480743408, -0.5166553258895874, 0.4291233718395233, -0.4886777400970459, 0.04906637966632...
What we ideally need is, to know how Microsoft handles XAML generated code (Those \*.g.cs files). If you goto a XAML code behind, intellisense will work even if the \*.g.cs file is not part of the project!! --- **Context:** In a custom VS package, we need to have some logic to open a CS file (with out making it a p...
[ 0.19858141243457794, -0.09301251918077469, 0.3677707016468048, 0.250319242477417, -0.06138591840863228, -0.42326387763023376, 0.15189248323440552, -0.022551391273736954, -0.03304249793291092, -0.9226150512695312, -0.23799552023410797, 0.5574839115142822, -0.05860917642712593, -0.1881536394...
the document is opened, Intellisense can't work, for the simple reason that the opened document is not part of the project (sadly, we can't do that, we can't make it code behind). Intellisense is driven by a memory cache of identifiers and types. These types are cached based on the project you are in and the references...
[ -0.006986711639910936, -0.03587031736969948, 0.26423120498657227, 0.2503474950790405, 0.034496426582336426, -0.057308077812194824, 0.010750058107078075, -0.056538209319114685, 0.07777495682239532, -0.7448140978813171, -0.3390361964702606, 0.23680329322814941, -0.27608588337898254, 0.119065...
knowing whether or not your code file required it. I guess Visual Studio *could* load intellisense based on the content of the file but that is not the way it currently works.
[ 0.37508097290992737, -0.19959552586078644, 0.1535153090953827, 0.3162083029747009, -0.07124220579862595, -0.21941107511520386, -0.0284538846462965, 0.21352508664131165, 0.01964167132973671, -0.5339722633361816, 0.1919342279434204, 0.5779036283493042, 0.13955269753932953, -0.262709915637969...
I need to setup a simple IVR system for a friend's company that will let the caller navigate through the menu by pressing phone keys. Its kind of like a bus schedule. > for today's schedule press '1', for tomorrow's schedule press '2' and > so on. It is solely an information system, i.e. no navigation route will end...
[ 0.12366434186697006, 0.10021071135997772, 0.7162768244743347, 0.21312183141708374, 0.04151710122823715, -0.11330724507570267, 0.13395895063877106, 0.0680597722530365, -0.15380564332008362, -0.7758409976959229, 0.3592877984046936, 0.6310076117515564, -0.04147515445947647, 0.0246483944356441...
hardware-wise? * Is a simple Linux server and a VOIP account with a provider in Germany sufficient? * Will a VPS handle the task? * How about multiple concurrent incoming calls? * Are those handled by Asterisk? It's perfectly possible. What you need to know: 1. Asterisk has some problems with `H323`. If your provider...
[ 0.19645170867443085, 0.06860307604074478, 0.4845818281173706, 0.2932373583316803, 0.11702941358089447, 0.3418019711971283, 0.09698024392127991, -0.22712694108486176, -0.34604698419570923, -0.6515928506851196, -0.20069704949855804, 0.3668693006038666, -0.23640888929367065, 0.049511741846799...
a network daemon if you expect frequent connections. 3. Multiple concurrent calls are not a problem, my installation of Asterisk on a simple PC handles *hundreds* sumultaneous calls. 4. The only things that may **really** affect performance are **sound conversion** and **tone detection**. To improve performance, you s...
[ 0.2042246311903, -0.1435805708169937, 0.5356009006500244, 0.20689718425273895, -0.12216795235872269, -0.31874388456344604, 0.46607494354248047, -0.04414307698607445, 0.010736560449004173, -1.1273726224899292, -0.06562501937150955, 0.7626405954360962, -0.2528896629810333, 0.2162712514400482...
There are no math, nothing except simple read-wrap-send operations. 2. Ask your provider to detect tones on his side and send them to you **out of band**, using `RFC 2833`. Tone detection is quite a CPU consuming operation, let them do it theirselves.I personally run Asterisk on a `2,66 MHz Celeron IV` with `2048 MB R...
[ 0.008307941257953644, 0.2578147351741791, 0.3921537399291992, 0.22204601764678955, 0.09289611130952835, 0.2259390503168106, 0.3482256233692169, 0.03480611741542816, -0.24144263565540314, -0.6978168487548828, -0.16553016006946564, 0.7030252814292908, -0.15764784812927246, -0.053590044379234...
If I have have a `WorkflowInstance` can I executed twice in a row? ``` WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(...)); instance.start(); instance.start(); ``` When I do this I get and exception telling me that I don't have a persistence service configured. However my question is: after I exe...
[ 0.16834238171577454, 0.15883061289787292, 0.26836416125297546, -0.2593279480934143, -0.06572695076465607, -0.22683335840702057, 0.479673832654953, -0.14963142573833466, -0.4255932867527008, -0.8217507004737854, -0.10146114975214005, 0.5965677499771118, -0.4718684256076813, 0.42552375793457...
How would I quit all running user applications using Applescript? It's okay... I think I found my answer: ``` tell application "System Events" to set the visible of every process to true set white_list to {"Finder"} try tell application "Finder" set process_list to the name of every process whose visible...
[ 0.3433133363723755, 0.0848744586110115, 0.6229212880134583, -0.14473022520542145, 0.10005883872509003, -0.018185466527938843, 0.6021050214767456, -0.17667286098003387, -0.11072684079408646, -0.7190513610839844, -0.05579543486237526, 0.5966998338699341, -0.2117779403924942, 0.16489730775356...
is not in white_list then tell application this_process quit end tell end if end repeat on error tell the current application to display dialog "An error has occurred!" & return & "This script will now quit" buttons {"Quit"} default button 1 with icon 0 end try `...
[ 0.19683727622032166, 0.11781182140111923, 0.7462021112442017, -0.3327784240245819, 0.41833144426345825, -0.20893730223178864, 0.7277916669845581, -0.03505675867199898, -0.0158399511128664, -0.4503403902053833, -0.33903124928474426, 0.6039202809333801, -0.5595003962516785, 0.122766897082328...
I have a set of textboxes on a form, called sm1, sm2 etc, and I want to assign them to cells A1, A2, etc. Is there a way to put this in a loop, ie: ``` For i = 1 to 100 Cells(i, 1).Value = ("sm" & c).Value Next i ``` Not sure of VBA, but there should be "controls" collection on the form, you can access the elements...
[ 0.29056233167648315, 0.020446788519620895, 0.27377253770828247, 0.020612578839063644, 0.14913205802440643, 0.15902580320835114, 0.10816054046154022, -0.649387776851654, -0.275511234998703, -0.44269660115242004, 0.1328113079071045, 0.09317553788423538, -0.4919902980327606, 0.047713384032249...
I have made a class which a form can inherit from and it handles form Location, Size and State. And it works nicely. Except for one thing: When you maximize the application on a different screen than your main one, the location and size (before you maximized) gets stored correctly, but when it is maximized (according...
[ 0.2967815697193146, 0.10919396579265594, 0.5254837870597839, 0.0067190565168857574, 0.09304188936948776, 0.06524551659822464, 0.1344417929649353, -0.08461866527795792, 0.04456007108092308, -0.776011049747467, 0.16155782341957092, 0.5893772840499878, -0.010617505759000778, 0.039380930364131...
question is... how can I make a form, when it is maximized, remember what screen it was maximized on? And how do I restore that when the form opens again? --- Kind of complete solution to problem ------------------------------------ I accepted the answer which had a very good tip about how to if on screen. But that ...
[ -0.01931067183613777, -0.004515194334089756, 0.8559813499450684, -0.06657850742340088, 0.04695145785808563, -0.2764354944229126, 0.22014600038528442, -0.4354093372821808, -0.09126406162977219, -0.91046142578125, -0.19968019425868988, 0.636518657207489, -0.25345322489738464, -0.061378225684...
window state. **On closing** 1. Store `WindowState`. 2. If `WindowState` is `FormWindowState.Normal`, then store `Bounds`, otherwise store `RestoreBounds`. And thats it! =) Some example code ----------------- So, as suggested by [Oliver](https://stackoverflow.com/users/57488/oliver), here is some code. It needs to...
[ -0.07244706898927689, -0.013545893132686615, 0.8688578605651855, -0.15373259782791138, -0.058484818786382675, -0.24242450296878815, 0.3340814411640167, 0.01327497884631157, -0.2589518427848816, -0.8159360289573669, -0.37339872121810913, 0.3149419128894806, -0.12654784321784973, 0.315043658...
a BI layer, and not require a reference to WinForms)</summary> public int WindowState { get; set; } /// <summary>Gets and sets the window bounds. (X, Y, Width and Height)</summary> public Rectangle WindowBounds { get; set; } /// <summary>Dictionary for other values.</summary> private readonly Dict...
[ 0.21644501388072968, -0.36157694458961487, 0.6182149052619934, 0.13074810802936554, -0.2063770741224289, 0.22129739820957184, 0.13185147941112518, -0.7745950222015381, -0.36562854051589966, -0.5560076236724854, -0.24930121004581451, 0.13164028525352478, -0.5023375153541565, 0.0400490537285...
state of the window.</param> /// <param name="defaultWindowBounds">Default bounds of the window.</param> public PersistentFormHandler(Type windowType, int defaultWindowState, Rectangle defaultWindowBounds) : this(windowType, null, defaultWindowState, defaultWindowBounds) { } /// <summary> /// I...
[ 0.11636333167552948, -0.14765231311321259, 0.5013477802276611, 0.04928625002503395, -0.035785745829343796, 0.3911738991737366, 0.1936936229467392, -0.527951717376709, -0.23067674040794373, -0.8371140360832214, -0.28480345010757446, -0.03452247008681297, -0.3034237325191498, 0.2884262502193...
state of the window.</param> /// <param name="defaultWindowBounds">Default bounds of the window.</param> public PersistentFormHandler(Type windowType, string id, int defaultWindowState, Rectangle defaultWindowBounds) { Name = string.IsNullOrEmpty(id) ? windowType.FullName :...
[ -0.16111424565315247, -0.2005375772714615, 0.6265262365341187, 0.0012507850769907236, 0.2472459077835083, 0.3030772805213928, 0.5280746221542358, -0.2891581654548645, -0.3187819719314575, -0.8206987380981445, -0.39399224519729614, 0.15273205935955048, -0.2336927205324173, 0.428318262100219...
= new Dictionary<string, Binary>(); } /// <summary> /// Looks for previously stored values in database. /// </summary> /// <returns>False if no previously stored values were found.</returns> public bool Load() { // See Note 1 } /// <summary> /// Stores all values in dat...
[ 0.1417897790670395, -0.0008898610831238329, 0.25858184695243835, -0.38359886407852173, 0.024432731792330742, -0.0375315323472023, 0.2144322693347931, -0.083919957280159, -0.1502624750137329, -0.5051167607307434, -0.1839054375886917, 0.2893134355545044, -0.6294608116149902, 0.06600688397884...
// See Note 2 } /// <summary> /// Adds the given <paramref key="value"/> to the collection of values that will be /// stored in database on <see cref="Save"/>. /// </summary> /// <typeparam key="T">Type of object.</typeparam> /// <param name="key">The key you want to use for this value.</pa...
[ 0.27577322721481323, 0.04188194125890732, 0.3861441910266876, 0.08616356551647186, -0.09082105755805969, 0.35634949803352356, -0.0637277364730835, -0.7862183451652527, -0.31471729278564453, -0.44730061292648315, -0.19135162234306335, 0.08038125932216644, -0.4336741268634796, 0.045897983014...
memory stream using (var s = new MemoryStream()) { // Serialize value into binary form var b = new BinaryFormatter(); b.Serialize(s, value); // Store in dictionary otherValues[key] = new Binary(s.ToArray());
[ -0.08735645562410355, -0.3221468925476074, 0.3181385099887848, -0.16578151285648346, 0.04085378348827362, 0.34170544147491455, 0.2691968083381653, -0.17543956637382507, -0.03701676055788994, -0.3967299461364746, -0.2161523699760437, 0.4655942916870117, -0.3026486337184906, 0.27646091580390...
} } /// <summary> /// Same as <see cref="Get{T}(string,T)"/>, but uses default(<typeparamref name="T"/>) as fallback value. /// </summary> /// <typeparam name="T">Type of object</typeparam> /// <param name="key">The key used on <see cref="Set{T}"/>.</param> /// <returns>The stored object, o...
[ -0.06826888769865036, -0.2575289309024811, 0.19119857251644135, 0.03877737373113632, 0.03481157869100571, 0.31036385893821716, 0.16043893992900848, -0.68271803855896, -0.25075244903564453, -0.3290768265724182, -0.399844765663147, 0.4871971905231476, -0.28980493545532227, 0.1860022544860839...
<summary> /// Gets the value identified by the given <paramref name="key"/>. /// </summary> /// <typeparam name="T">Type of object</typeparam> /// <param name="key">The key used on <see cref="Set{T}"/>.</param> /// <param name="fallback">Value to return if the given <paramref name="key"/> could not ...
[ 0.05460074171423912, -0.1855149269104004, 0.28754711151123047, 0.19001969695091248, -0.3497307598590851, 0.46465468406677246, 0.08595157414674759, -0.7718876004219055, -0.3425736725330353, -0.2366950511932373, -0.30164068937301636, 0.1755325198173523, -0.3119978606700897, 0.249608099460601...
// If we have a value with this key if (otherValues.ContainsKey(key)) { // Create memory stream and fill with binary version of value using (var s = new MemoryStream(otherValues[key].ToArray())) { try
[ 0.12898588180541992, -0.46290409564971924, 0.5667160749435425, -0.08014252036809921, 0.4970311224460602, 0.03725391626358032, 0.20870454609394073, -0.3411646783351898, 0.08790762722492218, -0.5390498042106628, 0.06514772772789001, 0.498113751411438, -0.09397497773170471, 0.1693349331617355...