text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Suppose I have a process which creates a file, writes some data to it, then after a short amount of processing (by itself or another process), deletes it and closes all remaining file descriptors. I am assuming here that there is enough ram to keep the pages in memory until the file is deleted, and that nobody calls s...
[ 0.27235811948776245, 0.15447349846363068, 0.0635903924703598, 0.10715236514806747, 0.2631990909576416, -0.03334467485547066, 0.12378130853176117, -0.029754452407360077, -0.1845511943101883, -0.46501022577285767, -0.34919634461402893, 0.35876503586769104, -0.3533628284931183, 0.460822045803...
it is implement. I agree with Jonathan Leffler, but not only for classic Unix file systems: There has been a discussion with a similar topic concerning the ext4 file system. In a [comment](https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/317781/comments/45), Theodore Ts'o (one of the main developers of the ex...
[ 0.6131925582885742, 0.24967922270298004, -0.21817171573638916, -0.32816097140312195, 0.12335816025733948, -0.29517167806625366, 0.0808846652507782, -0.19873256981372833, 0.06713247299194336, -0.3803580105304718, -0.20981164276599884, 0.5219631791114807, -0.44473692774772644, 0.047455165535...
I have a table with a nvarchar column. This column has values for example: * 983 * 294 * a343 * a3546f and so on. I would like to take MAX of this values, but not as text but like from numerics. So in this example numerics are: * 983 * 294 * 343 * 3546 And the MAX value is the last one - 3546. How to do this in T...
[ 0.1853245198726654, 0.24304957687854767, 0.5072556138038635, -0.2205749750137329, -0.21751761436462402, 0.09541159868240356, 0.326632022857666, -0.3853297233581543, -0.1692640781402588, -0.5902172923088074, 0.12116996943950653, 0.5147491693496704, -0.2751750946044922, -0.045418575406074524...
'.*?(\d+).*', myField, '$1' ) AS INT ) ``` Then use this expression inside a `MAX()` function in a `SELECT`.
[ 0.0791536271572113, -0.17039291560649872, 0.34262916445732117, -0.42752569913864136, 0.298448383808136, 0.01352362148463726, 0.16699965298175812, -0.2146533876657486, 0.1526135951280594, -0.31157952547073364, -0.46821141242980957, 0.5029662847518921, -0.4183996021747589, 0.0046951980330049...
I know in PHP you have to intrepret a page like index.php, but in Ruby how does it work? I don't know what is the Ruby extension like index.php for PHP. Could you help me? If you are talking about a command line program this will work. ``` puts "Hello World" ``` or if you want an object oriented version ``` class H...
[ -0.03267405182123184, 0.041349396109580994, 0.14714986085891724, -0.0952974259853363, -0.3742600381374359, -0.16564518213272095, 0.3553078770637512, 0.2776778042316437, -0.10189522802829742, -0.6151142120361328, 0.3657023310661316, 0.5206800103187561, -0.3463073968887329, 0.255147039890289...
the Getting Started [Guide](http://guides.rubyonrails.org/getting_started.html#hello-rails-bang) for Rails.
[ 0.08919305354356766, -0.4367700219154358, 0.27947181463241577, 0.14983898401260376, -0.16758280992507935, -0.3652445375919342, 0.6780343651771545, 0.04930450767278671, -0.48007509112358093, -0.05274011194705963, -0.23070374131202698, 0.43559858202934265, -0.004934839904308319, 0.0701545178...
I have a following setup. Although my working setup deals with ARM compiler Real View Developer Suite (RVDS) 3.2 on a Windows host, the situation could be generic for any other C compiler on any host. I build a ARM library (static library - .a file) of C code using RVDS 3.2 compiler toolchain on Windows host. Then I l...
[ 0.35762619972229004, 0.27106523513793945, -0.003579402808099985, 0.05442369729280472, -0.31990429759025574, -0.3429564833641052, -0.051743872463703156, -0.0787227675318718, -0.2748461067676544, -0.6440951228141785, -0.19069679081439972, 0.44995173811912537, -0.26844510436058044, 0.27279850...
function which is present in the library that is linked, gdb is not able to put breakpoint there citing source not found. So I manually copied all the source files(\*.c) used to create the library in the Linux folder where the executable file is present. Still gdb fails to put a breakpoint. So now I started thinking: ...
[ 0.18254417181015015, -0.24375009536743164, 0.07678212970495224, 0.1106133908033371, -0.0887656882405281, -0.34703731536865234, 0.26313942670822144, -0.12235730141401291, -0.0038242614828050137, -0.36831536889076233, -0.14483985304832458, 0.760516345500946, -0.659832239151001, 0.24827913939...
Is there any compiler option in RVDS compiler toolchain to enable this library source level debug? 2. Do I need to copy the source files to linux in exactly same folder structure as that is present in windows for those source files? Use debugger; or Sys.Debug.assert() which will hit a debugger statement if assert fail...
[ 0.36906665563583374, 0.006553975399583578, -0.048563070595264435, 0.16760285198688507, -0.2348322868347168, -0.5269279479980469, 0.4787675440311432, -0.28717273473739624, 0.1167626678943634, -0.6063334345817566, -0.10255402326583862, 0.9720854759216309, -0.18917132914066315, 0.023280519992...
I have been trying to get a progressbar set to marquee to keep moving while another function is running. After this function runs, I message would display (for this example) The only way I was able to get this working was with a background worker and then have a Do Loop until condition that runs in the main form unt...
[ 0.46497657895088196, -0.12817862629890442, 0.44218939542770386, -0.1528337597846985, 0.057529788464307785, 0.23927846550941467, 0.4328063726425171, 0.11733386665582657, -0.3809170126914978, -0.49139681458473206, 0.28125983476638794, 0.19449037313461304, -0.4070166349411011, 0.1535103768110...
working either. I have included a small demo program if anyone is interested. <http://www.filedropper.com/progressbar> Thanks `Thread.Start` and `Thread.Join` is *not* the way to do it - that basically blocks your UI thread again. `Application.DoEvents` isn't the way to go either - you really do want a separate threa...
[ 0.19396980106830597, -0.16187456250190735, 0.6451347470283508, -0.10361641645431519, 0.16509468853473663, 0.025051983073353767, 0.2158583700656891, -0.37646499276161194, -0.5205274820327759, -0.5997498631477356, -0.13946972787380219, 0.5926864147186279, -0.2997884750366211, -0.337300300598...
UI subscribes to ProgressChanged, and the task calls ReportProgress periodically.)
[ -0.2562512755393982, -0.130597785115242, 0.803796112537384, 0.05474613234400749, -0.006694385781884193, -0.19128897786140442, 0.1517239212989807, -0.11089914292097092, -0.061067089438438416, -0.629143238067627, -0.291835218667984, 0.07275538891553879, -0.12351736426353455, -0.0137119032442...
Awhile ago there was a debate whether we should use a third party installer or write our own. We've had 2 generations of internally developed installers that just do services, msmq, com+, gac and sql script by shelling out to exe's. So I was wondering who out there is using a custom written installer for your companie...
[ 1.0369795560836792, 0.14446218311786652, 0.06328895688056946, 0.07571607828140259, -0.010417759418487549, -0.2512393593788147, 0.07150685787200928, 0.1669646054506302, 0.07207579910755157, -0.5784085392951965, 0.1923246830701828, 0.921126663684845, -0.2580682039260864, 0.05008910968899727,...
feature sets and somewhat (cripling) capabilities others offer more flexibility. This being said I have not yet begun to search for alternatives but it will be something I will do in the comming year. I need something in which I can : 1. Create my own modules, plugins or whatever the supported extention model, in a re...
[ 0.744354784488678, 0.14180326461791992, 0.4271012544631958, -0.26410484313964844, -0.04750688746571541, -0.36408063769340515, 0.3143909275531769, -0.09960205107927322, -0.13426192104816437, -0.7770023941993713, -0.4941451847553253, 0.8799852728843689, -0.11482511460781097, -0.1716066449880...
think it is too much to ask and I am certain someone did something that will allow me to build on. Also quite certain that there is an open source packaging system that will do just that. I much prefer maintaining a few specialized tools and plugins than a complete system for multi-platform deployement. IMHO creating...
[ 0.5691460371017456, 0.27443695068359375, -0.2346675992012024, 0.16601844131946564, 0.04331432282924652, -0.19227969646453857, 0.040069036185741425, 0.40956777334213257, -0.1344667673110962, -0.30633440613746643, 0.31615641713142395, 0.5131516456604004, -0.015890490263700485, 0.110899992287...
how can I query an xml file where I have multiple items with the same name, so that I can get all items back. Currently I only get the first result back. I managed to get it to work with the following code, but this returns all items where the specific search criteria is met. What I want as output is to get two results...
[ 0.31964924931526184, -0.03748291730880737, 0.4421585202217102, 0.15403194725513458, -0.12558022141456604, -0.12389737367630005, 0.4542075991630554, -0.5008736848831177, -0.4719623923301697, -0.4124630093574524, -0.22314752638339996, -0.17270556092262268, 0.22546131908893585, -0.05835631862...
where item.Value.Contains(location) select new {
[ -0.12188585102558136, -0.29483139514923096, 0.1693696677684784, -0.1712217777967453, 0.5604211091995239, 0.03177645802497864, 0.04699697718024254, -0.4169594645500183, -0.32219216227531433, -0.5410528182983398, -0.441800057888031, 0.3701651096343994, -0.12029372900724411, 0.420376539230346...
event = item.Element("event").Value, event_location = item.Element("location").Value }).ToList(); ``` The xml file looks like this ``` <training> <item> <event>C# Training</event> <location>Prague</location> <location>Oslo</location> ...
[ -0.1412254124879837, -0.18773970007896423, 0.059767261147499084, 0.021456625312566757, 0.19872096180915833, 0.09413185715675354, -0.2434556484222412, -0.4204697608947754, -0.39014115929603577, -0.27751797437667847, -0.3950110971927643, 0.09567185491323471, -0.14588283002376556, -0.05422861...
<location>Athens</location> <location>Dublin</location> <location>Helsinki</location> </item> <item> <event>LINQ Training</event> <location>Bucharest</location> <location>Oslo</location> <location>Amsterdam</location> <location>Helsinki</location> ...
[ 0.1460445672273636, -0.1290474832057953, 0.17511026561260223, 0.34132829308509827, 0.26787108182907104, 0.1902451068162918, 0.19002987444400787, -0.14618685841560364, -0.43567702174186707, 0.016651105135679245, -0.3842359781265259, 0.09218779951334, -0.15732716023921967, -0.323382049798965...
</training> ``` You're using `item.Element("location")` which returns the *first* location element under the item. That's not necessarily the location you were looking for! I suspect you *actually* want something more like: ``` string location = "Oslo"; var training = from loc in doc.Descendants("location") ...
[ 0.17202302813529968, -0.16324377059936523, 0.052670471370220184, -0.021679891273379326, 0.37939882278442383, -0.0470300130546093, 0.3506161868572235, -0.39731091260910034, -0.09851624816656113, -0.717251181602478, -0.5499376058578491, 0.1208236813545227, 0.073229119181633, 0.01371723972260...
event = loc.Parent.Element("event").Value, event_location = loc.Value }; ``` But then again, what value does `event_location` then provide, given that it's always going to be the location you've passed into the query? If this isn't what you want, please give more details - your ques...
[ -0.015938619151711464, -0.1203349381685257, 0.08671612292528152, 0.02036830224096775, 0.42554065585136414, -0.1203698068857193, -0.0400739461183548, 0.07219375669956207, -0.14735527336597443, -0.3899505138397217, -0.24386507272720337, 0.25177186727523804, -0.2816336750984192, 0.12858949601...
gives and what you *want* it to give would be helpful - as well as what you mean by "name" (in that it looks like you actually mean "value"). EDIT: Okay, so it sounds like you want: ``` string location = "Oslo"; var training = from loc in doc.Descendants("location") where loc.Value == location ...
[ 0.4058349132537842, -0.2772241532802582, 0.2559542655944824, 0.016624394804239273, 0.36712804436683655, -0.05989084392786026, -0.06376529484987259, -0.5553594827651978, 0.054136406630277634, -0.4380941390991211, -0.4537498950958252, 0.20029546320438385, 0.18816843628883362, -0.175131648778...
event = loc.Parent.Element("event").Value, event_locations = loc.Parent.Elements("location") .Select(e => e.Value) }; ``` event\_locations
[ -0.4059299826622009, -0.059754155576229095, -0.0421290248632431, -0.19995816051959991, 0.6190059781074524, 0.2027822583913803, 0.037540506571531296, -0.03497157618403435, -0.07973121106624603, -0.5457071661949158, -0.42254871129989624, 0.3499709665775299, -0.2714498043060303, 0.21712520718...
will now be a sequence of strings. You can get the output you want with: ``` for (var entry in training) { Console.WriteLine("Event: {0}; Locations: {1}", entry.event, string.Join(", ", entry.event_locations.ToArray()); } ``` Give that a try and see if it's what you...
[ 0.14326752722263336, -0.33966806530952454, 0.4257693290710449, -0.12063771486282349, 0.2110818773508072, 0.022845352068543434, 0.0599626824259758, -0.2827319800853729, 0.17879121005535126, -0.5907232165336609, -0.18179357051849365, 0.5582348108291626, -0.12171652913093567, 0.09394323825836...
WAS Features * Application Pooling * Recycling * Idle time management * Identity Management * Isolation Sounds a lot like COM+ but hosted in IIS 7. Anybody out there using this technology and am I correct comparing the two? I don't think that WAS offers the sort of distributed transaction management that COM+ and its...
[ -0.09141433238983154, -0.44377827644348145, -0.05508799850940704, -0.12691333889961243, -0.5195584893226624, -0.3669970631599426, -0.04659818112850189, 0.09163235872983932, -0.3800206184387207, -0.32550570368766785, 0.04355766996741295, 0.4839443862438202, -0.22772493958473206, -0.11333580...
In IE 7 (haven't tested against other versions of IE), when I resize the browswer, the scrollbars in one of the iframes on my page become active (as I want). However the controls which are visible on the page (textboxes, divs with borders) overlap the (horizontal & vertical) scrollbars. It's as if they have a higher ...
[ -0.046475693583488464, -0.20172815024852753, 1.2342649698257446, -0.24495285749435425, 0.14680109918117523, -0.1187552884221077, 0.7084867358207703, 0.08658906072378159, -0.15177415311336517, -0.7957912087440491, -0.2543877959251404, 1.1796120405197144, -0.22029301524162292, -0.13761791586...
It's a common programming task to loop iteration while not receiving next item. For example: ``` for sLine in oFile : if ... some logic ... : sLine = oFile.next() ... some more logic ... # at this point i want to continue iteration but without # getting next item from oFile. How can this be done in p...
[ -0.08369046449661255, -0.2129233032464981, -0.02887156419456005, -0.10071884840726852, 0.16879115998744965, 0.1974172443151474, 0.2139344960451126, -0.21544457972049713, -0.22362171113491058, -0.6900433897972107, 0.03108258917927742, 0.1387316733598709, -0.2618335485458374, 0.1627356559038...
some logic ... : state = 2 elif state == 2: if ... some logic ... : state = 1 ```
[ -0.11924021691083908, 0.11745939403772354, -0.07032869011163712, -0.24505488574504852, -0.09787457436323166, -0.11544185131788254, 0.4479478895664215, -0.38378801941871643, 0.22453053295612335, -0.48785948753356934, -0.4948250353336334, 0.2998390197753906, -0.1409834772348404, -0.075282707...
Is there a way in XAML to cause the tab item headers to stretch across the width of the tab control? For example, I have three tabs: red, blue and green. If I have a tab control with its width set to auto, the tab headers will only fill up part of the space above the tab content, but I want them to fill up all the spa...
[ 0.3285355865955353, -0.06938397884368896, 0.5424491167068481, -0.004017319064587355, -0.22837936878204346, 0.11920570582151413, -0.10315203666687012, -0.1294485330581665, -0.23326528072357178, -0.5992547273635864, -0.051658015698194504, 0.47293272614479065, -0.2285015881061554, 0.071761325...
this in a code behind which I am working on now, but I am interested in doing this the easiest way possible. I took Jordan's example and made some changes to it. This version should work for any number of tabs: ``` namespace WpfApplication1.Converters { public class TabSizeConverter : IMultiValueConverter { ...
[ 0.2640705108642578, -0.2522300183773041, 0.4462851881980896, -0.16984516382217407, 0.06269534677267075, 0.06554008275270462, 0.13301153481006622, 0.08720646798610687, -0.14799728989601135, -0.7896584272384644, -0.19158387184143066, 0.3860599994659424, -0.46670156717300415, 0.24715903401374...
TabControl tabControl = values[0] as TabControl; double width = tabControl.ActualWidth / tabControl.Items.Count; //Subtract 1, otherwise we could overflow to two rows. return (width <= 1) ? 0 : (width - 1); } public object[] ConvertBack(object value, Type[] targetTyp...
[ -0.10513250529766083, -0.3367036283016205, 0.5620319247245789, -0.1145777627825737, -0.22459344565868378, 0.3344637155532837, 0.13115163147449493, 0.029729504138231277, -0.1406402736902237, -0.3834145665168762, -0.16113607585430145, 0.392993688583374, -0.5108698606491089, 0.427524179220199...
{ throw new NotSupportedException(); } } } ``` Same namespace in the xaml: ``` xmlns:local="clr-namespace:WpfApplication1.Converters" ``` And this will make all tabs use it: ``` <Window.Resources> <local:TabSizeConverter x:Key="tabSizeConverter" /> <Style TargetType="{x:Type TabIte...
[ -0.09661413729190826, -0.03921878710389137, 0.5151384472846985, -0.17627204954624176, -0.09620201587677002, -0.10588110238313675, 0.003477949881926179, -0.32559844851493835, -0.2807891070842743, -0.6132901906967163, -0.3997442424297333, 0.5749942660331726, -0.4196998178958893, 0.1353346556...
<Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type TabControl}}" /> <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type TabControl}}" Path="ActualWidth" /> </MultiBinding> </Setter.Value>
[ -0.4363744258880615, -0.3017648160457611, 0.546872079372406, 0.17746089398860931, 0.11715476959943771, 0.28750842809677124, -0.10369638353586197, -0.40940800309181213, -0.09624391794204712, -0.6749023795127869, 0.06164337694644928, 0.2121223360300064, -0.21602065861225128, 0.30795735120773...
</Setter> </Style> </Window.Resources> ```
[ 0.3973022997379303, 0.24701572954654694, 0.14810751378536224, -0.0030642696656286716, 0.05990464612841606, -0.2114335298538208, -0.07227879017591476, 0.06715267151594162, -0.2110171765089035, -0.7994697093963623, -0.49467095732688904, 0.3852730095386505, -0.29067039489746094, 0.21616961061...
I used [doxygen](http://www.doxygen.nl/) to create HTML files, now I want to convert that documentation into .chm format. How can I do this? NDoc is a dead project, it's successor is [Sandcastle](http://www.sandcastledocs.com/) & [Sandcastle Helpfile Builder](http://www.codeplex.com/SHFB). I've used both of the San...
[ 0.25879812240600586, 0.2150365263223648, 0.4695807993412018, -0.21414463222026825, -0.2325991690158844, -0.22528637945652008, 0.052734289318323135, -0.19278961420059204, -0.2456391155719757, -0.621824324131012, 0.05497831851243973, 0.4399707019329071, -0.33622491359710693, 0.19317205250263...
I had originally defined in my MessageContract a collection of SQLParameters in order to create a simple stored procedure execution through a WCF service. Apparently, SQLParameter type is not serializable, so I need some advice on how to proceed here. Is it possible to still somehow use SQLParameter as part of my WCF ...
[ 0.37382498383522034, -0.1017853245139122, 0.5961141586303711, 0.14929303526878357, -0.12467996776103973, -0.2037341296672821, 0.35476556420326233, -0.19251644611358643, -0.20839087665081024, -0.8401146531105042, 0.3339504301548004, 0.3762624263763428, -0.30963119864463806, 0.48729652166366...
the database to retrieve a DataSet for reporting purposes, using the usual ADO.NET objects. Now, the customer wants a common web service to handle all reports. This is the best I can think of to handle it without too much changes. I was relatively underwhelmed with the accepted-response that: > You might find you want...
[ 0.4388544261455536, 0.12553057074546814, 0.4549586772918701, 0.22067274153232574, -0.1547423005104065, -0.1300903707742691, -0.013554886914789677, -0.2699354887008667, -0.05468624085187912, -0.5961284637451172, 0.09613578021526337, 0.7076966166496277, -0.15492278337478638, 0.30539903044700...
methods into the new services to implement these service contracts, and you're pretty much done. Fundamentally, this is a correct response for simple predefined business logic; however, with different levels of abstraction, say a service that is required to run *ad-hoc* sql queries, one cannot simply provide this leve...
[ 0.3991791307926178, 0.023803075775504112, 0.13126398622989655, 0.17146608233451843, -0.10357734560966492, -0.2525498569011688, 0.44739988446235657, -0.5619739294052124, -0.09245152771472931, -0.5614346861839294, 0.03980148583650589, 0.8027411103248596, -0.31511062383651733, -0.048155136406...
layer away from the client and allow for third-parties to interface with a number of databases on disparate db systems. For this system, I have taken Craig H's approach above and created a **SerializableSqlParam** class to pass as a list object to my service. The benefit of my **SerializableSqlParam** class is as fol...
[ 0.07863220572471619, -0.05714346468448639, 0.4941979646682739, -0.06221797317266464, -0.1717236191034317, -0.0632297471165657, 0.21051429212093353, -0.32346683740615845, -0.22289115190505981, -0.8592573404312134, -0.13957175612449646, 0.4118596017360687, -0.2744748890399933, 0.210520848631...
as follows: ``` SerializedSqlParam sp = new SerializedSqlParam(new SqlParameter("@id", 1)); //or through typecasting: SqlParameter parameter = new SqlParameter("@id", 1); SerializedSqlParam sp = (SerializedSqlParam) parameter; ``` To deserialize simply do the following: ``` SqlParameter parameter = sp.GetSqlParam...
[ -0.03097129799425602, -0.06779477745294571, 0.7403820753097534, 0.21737807989120483, -0.3376152813434601, 0.10859348624944687, 0.2096458077430725, -0.7249747514724731, -0.4216213822364807, -0.4898160994052887, -0.25678375363349915, 0.5073975920677185, -0.40842846035957336, 0.07786804437637...
get; set; } [DataMember] public bool IsNullable { get; set; } [Browsable(false)] [DataMember] public int LocaleId { get; set; } [Browsable(false)] [EditorBrowsable(EditorBrowsableState.Advanced)] [DataMember] public int Offset { get; set; } [DataMember] public string Para...
[ -0.11000468581914902, -0.26993176341056824, 0.7887274622917175, -0.1846615970134735, 0.12782247364521027, 0.055900707840919495, 0.04372008517384529, -0.2498268336057663, -0.07847987860441208, -0.4104812443256378, -0.5999373197555542, 0.7705389857292175, -0.07160171866416931, 0.035245709121...
public byte Scale { get; set; } [DataMember] public int Size { get; set; } [DataMember] public string SourceColumn { get; set; } [DataMember] public bool SourceColumnNullMapping { get; set; } [DataMember] public string SourceVersion { get; set; } [DataMember] public string S...
[ 0.26907339692115784, -0.040200043469667435, 0.5157470107078552, -0.011831441894173622, -0.29579636454582214, 0.057956159114837646, 0.0021020250860601664, -0.0010522688971832395, -0.21009112894535065, -0.3526950478553772, -0.239613875746727, 0.5219758152961731, -0.14499327540397644, 0.38039...
UdtTypeName { get; set; } [DataMember] public string Value { get; set; } [DataMember] public string ValueType { get; protected set; } [DataMember] public string XmlSchemaCollectionDatabase { get; set; } [DataMember] public string XmlSchemaCollectionName { get; set; } [DataMember] ...
[ 0.2535545527935028, -0.2214345633983612, 0.6360965371131897, 0.09690572321414948, -0.21384266018867493, -0.10688143968582153, 0.024539005011320114, -0.4601312279701233, 0.029931504279375076, -0.33663541078567505, -0.26943153142929077, 0.5224331021308899, -0.2478468418121338, 0.473339885473...
this.SerializeParameterValue(p); } public static explicit operator SerializedSqlParam(SqlParameter p) { return new SerializedSqlParam(p); } public static explicit operator SqlParameter(SerializedSqlParam p) { return p.GetSqlParameter(p); } public SqlParameter GetSqlPar...
[ -0.25943487882614136, -0.19044122099876404, 0.7895374298095703, 0.11231105774641037, -0.3003084659576416, 0.3405081033706665, 0.22852052748203278, -0.7371653318405151, -0.3428674042224884, -0.2971244156360626, -0.16842910647392273, 0.23348604142665863, -0.5271674394607544, 0.06340623646974...
SqlParameter p = new SqlParameter(); p.ParameterName = serialized.ParameterName; p.Precision = serialized.Precision; p.Scale = serialized.Scale; p.Size = serialized.Size; p.IsNullable = serialized.IsNullable; p.LocaleId = serialized.LocaleId; p.Offset = serialize...
[ -0.42346832156181335, -0.5049830675125122, 0.8580013513565063, 0.09726301580667496, -0.4082663655281067, 0.1621452420949936, 0.058609507977962494, -0.18583577871322632, -0.1848227083683014, -0.3410836160182953, 0.12584254145622253, 0.1057535782456398, -0.11870205402374268, 0.10506251454353...
p.XmlSchemaCollectionDatabase = serialized.XmlSchemaCollectionDatabase; p.XmlSchemaCollectionName = serialized.XmlSchemaCollectionName; p.XmlSchemaCollectionOwningSchema = serialized.XmlSchemaCollectionOwningSchema; p.TypeName = serialized.TypeName; p.UdtTypeName = serialized.UdtTypeNam...
[ -0.25748491287231445, 0.022691532969474792, 0.7681964635848999, 0.16846999526023865, -0.30323702096939087, 0.5066581964492798, 0.06231193244457245, -0.5812910795211792, 0.0282587893307209, -0.4046556055545807, -0.11602666974067688, 0.4296746253967285, 0.017697321251034737, 0.20777969062328...
} private void SerializeParameterValue(SqlParameter p) { if (p.Value.GetType().IsSerializable) { this.ValueType = this.GetTypeAssemblyQualifiedName(p.Value); this.Value = this.SerializeObject(p.Value); } else { throw new SerializationE...
[ -0.3148937225341797, -0.15459898114204407, 0.5232463479042053, 0.11324236541986465, 0.13185198605060577, 0.2249990701675415, 0.5785156488418579, -0.4359169900417328, -0.18358975648880005, -0.5197981595993042, 0.06107383221387863, 0.428507536649704, -0.39368489384651184, 0.26822271943092346...
object. Recast that object into a primitive or class that can be serialized."); } } private void CopyProperties(SqlParameter p) { this.ParameterName = p.ParameterName; this.Precision = p.Precision; this.Scale = p.Scale; this.Size = p.Size; this.IsNullable = p...
[ -0.02172309160232544, -0.39903873205184937, 0.78917396068573, 0.015883369371294975, 0.12756195664405823, 0.17148785293102264, 0.2221733182668686, -0.44871458411216736, -0.14343497157096863, -0.4382776618003845, 0.02385219931602478, 0.4105389714241028, -0.4153994619846344, 0.277982085943222...
this.Offset = p.Offset; this.SourceColumn = p.SourceColumn; this.SourceColumnNullMapping = p.SourceColumnNullMapping; this.XmlSchemaCollectionDatabase = p.XmlSchemaCollectionDatabase; this.XmlSchemaCollectionName = p.XmlSchemaCollectionName; this.XmlSchemaCollectionOwningSchema ...
[ -0.12095697224140167, -0.19755689799785614, 0.9619467854499817, -0.0422179289162159, -0.16238969564437866, 0.4087246358394623, -0.12604355812072754, -0.4889109134674072, 0.039212796837091446, -0.44402310252189636, -0.25746145844459534, 0.35264715552330017, 0.0762651190161705, 0.06084728240...
this.SourceVersion = p.SourceVersion.ToString(); try { this.SqlDbType = p.SqlDbType.ToString(); } catch { this.SqlDbType = null; } } private string SerializeObject(object value) {
[ 0.00014128036855254322, -0.33345508575439453, 0.4381793737411499, -0.22786982357501984, -0.006179419346153736, 0.11317181587219238, 0.4705141484737396, -0.3041924834251404, -0.24654626846313477, -0.18070536851882935, -0.1207251101732254, 0.41830894351005554, -0.7200754284858704, 0.15502184...
if (value == null) return null; XmlSerializer serializer = new XmlSerializer(value.GetType()); XmlWriterSettings settings = new XmlWriterSettings(); settings.Encoding = new UnicodeEncoding(false, false); settings.Indent = false; settings.OmitXmlDeclaration = false; usi...
[ -0.18521225452423096, -0.22879652678966522, 0.8400794267654419, -0.16392479836940765, 0.40060558915138245, 0.09527652710676193, 0.3647861182689667, -0.6820887327194214, 0.03346775472164154, -0.5472401976585388, -0.2408367097377777, 0.6840746998786926, -0.30601224303245544, 0.09671229869127...
xmlWriter = XmlWriter.Create(textWriter, settings)) { serializer.Serialize(xmlWriter, value); } return textWriter.ToString(); } } private object DeserializeObject(string xml, Type type) { if (string.IsNullOrEmpty(xml)) return null;
[ -0.04442313313484192, -0.3169034719467163, 0.5596069693565369, -0.12205258011817932, 0.08872757107019424, 0.022559314966201782, 0.25276780128479004, -0.4914322793483734, 0.08094472438097, -0.61123126745224, -0.23376499116420746, 0.6099891662597656, -0.44191327691078186, 0.3029080331325531,...
XmlSerializer serializer = new XmlSerializer(type); XmlReaderSettings settings = new XmlReaderSettings(); using (StringReader textReader = new StringReader(xml)) { using (XmlReader xmlReader = XmlReader.Create(textReader, settings)) { return Convert.Chang...
[ -0.12623248994350433, -0.38393107056617737, 0.8775485157966614, -0.03992120176553726, -0.14654119312763214, 0.3317168354988098, 0.11711924523115158, -0.6856188774108887, -0.17209209501743317, -0.8986238837242126, -0.3643134832382202, 0.7006711959838867, -0.3509298861026764, 0.2933376133441...
} } private string GetTypeAssemblyQualifiedName(object obj) { return obj.GetType().AssemblyQualifiedName.ToString(); } } ```
[ -0.32644566893577576, -0.08986846357584, 0.37709692120552063, -0.32503971457481384, 0.16466066241264343, 0.057251084595918655, 0.4779360592365265, -0.07283956557512283, -0.0794123187661171, -0.5422413349151611, -0.385927677154541, 0.7402453422546387, -0.5572395324707031, 0.0857129469513893...
I've got a [Strawberry Perl](http://www.strawberryperl.com) program that accepts a single-file as a command-line argument. How can I set things up such that I can drag and drop the desired file onto the Strawberry Perl program (or a wrapper around it) and the program runs with that file's name as an argument? Under Win...
[ 0.5234922766685486, -0.09316661208868027, 0.25142642855644226, -0.02533107064664364, -0.3116172254085541, 0.15259915590286255, 0.06950641423463821, 0.08198021352291107, -0.2286430448293686, -0.17109842598438263, 0.03710266575217247, 0.31387484073638916, -0.13252758979797363, 0.353937655687...
My Windows Forms application has a `MenuStrip` and some of the menu items (`ToolStripMenuItem`) have an icon (setting the `ToolStripMenuItem.Image` property). When the `RenderMode` property of the `MenuStrip` is set to `ToolStripRenderMode.System`, the checkmark doesn't display when the `Checked` or `CheckOnClick` pro...
[ 0.26304176449775696, 0.12740667164325714, 0.6809569001197815, -0.2759990692138672, 0.060014404356479645, 0.03306225687265396, 0.44568943977355957, -0.17968030273914337, 0.09582528471946716, -0.9160251617431641, -0.20319513976573944, 0.9139739871025085, -0.20130841434001923, -0.111627429723...
`Application.EnableVisualStyles()` and leaving the default `ToolStripRenderMode.RenderManagerMode` on the MenuStrip. But then i can't get my marquee ProgressBar! 3. Setting the `RenderMode` to `ToolStripRenderMode.System` solves the look and feel requirement, but takes away the ability to have checked menu items w/icon...
[ 0.32393041253089905, 0.04467666894197464, 0.6035521030426025, -0.19134528934955597, -0.18735496699810028, -0.25737425684928894, 0.5579562187194824, -0.21536177396774292, -0.02437535673379898, -0.8305791020393372, 0.04598231241106987, 0.8798995018005371, -0.37101438641548157, 0.033250521868...
that draws the checked item. It draws a check if there's no image for the `ToolStripMenuItem`. ``` protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e) { base.OnRenderItemCheck(e); if (e.Item.Selected) { Rectangle rect = new Rectangle(3, 1, 20, 20); Rectangle rect2...
[ -0.04358291253447533, -0.24881640076637268, 0.9447094202041626, -0.2088012844324112, -0.0038977465592324734, 0.494968444108963, 0.10918924957513809, -0.5928030014038086, -0.055260274559259415, -0.64910888671875, -0.2824140787124634, 0.35525834560394287, -0.4675498902797699, -0.044348720461...
e.Graphics.FillRectangle(b2, rect2); e.Graphics.DrawImage(e.Image, new Point(5, 3)); } else { Rectangle rect = new Rectangle(3, 1, 20, 20); Rectangle rect2 = new Rectangle(4, 2, 18, 18); SolidBrush b = new SolidBrush(Color.FromArgb(49, 106, 197)); SolidBrush b2 = new ...
[ -0.3254755139350891, -0.44729888439178467, 1.0049629211425781, -0.27909570932388306, -0.17346087098121643, 0.6529216170310974, -0.04998967796564102, -0.6225560903549194, -0.3240266740322113, -0.68849778175354, -0.30203425884246826, 0.4969255030155182, -0.30014869570732117, 0.05125861987471...
e.Graphics.FillRectangle(b2, rect2); e.Graphics.DrawImage(e.Image, new Point(5, 3)); } } ```
[ -0.2232860028743744, -0.13406513631343842, 0.4509534239768982, -0.23492857813835144, -0.011963733471930027, 0.17136292159557343, -0.11753929406404495, -0.14911684393882751, -0.008580892346799374, -0.8505167365074158, -0.5264312028884888, 0.5676326155662537, -0.44838520884513855, -0.0810789...
I have this table mapping (details don't really matter I think): ``` WithTable("COPACKER_FACILITY"); Id(x => x.FacilityNumber, "FACILITY_NUM").GeneratedBy.Sequence("FACSEQ"); Map(x => x.FacilityName, "FACILITY_NAME").Not.Nullable().Trimmed(); Map(x => x.AddressLine1, "ADDR1").Not.Nullable().Trimmed(); ... WithTable(...
[ -0.05773387476801872, 0.1629955917596817, 0.6671772003173828, -0.016332527622580528, -0.004467691294848919, -0.05651862919330597, 0.13323259353637695, -0.3959777355194092, -0.28390535712242126, -0.786207914352417, -0.1607932150363922, 0.26010337471961975, -0.3198700249195099, 0.27736267447...
for audit reasons. There's a `FACIL_OTH_AUDIT_INFO_HIST` table that should get a record for every insert and update in the main table. **My question:** How can I know when an insert or update happens in that table so I know to insert an audit record? Many thanks! +1 to what kvalcanti said... here's another post that ...
[ 0.4165203273296356, 0.30681535601615906, 0.015475403517484665, 0.24528752267360687, -0.46535104513168335, -0.4545636773109436, 0.473814994096756, -0.11855262517929077, -0.26124975085258484, -0.3175569474697113, 0.14436927437782288, 0.49041709303855896, -0.058729685842990875, -0.03587936237...
project, which I assume will not be a problem, but I can't say for sure since I'm not doing exactly what you're doing.
[ 0.6858769059181213, -0.1704178750514984, -0.0077306777238845825, 0.15198403596878052, 0.3047473728656769, -0.01215888001024723, 0.023650851100683212, 0.10589762032032013, -0.2835307717323303, -0.5071078538894653, 0.30489349365234375, 0.2174580693244934, 0.26760584115982056, -0.179246038198...
I am trying to obtain localized strings for the English language (in en.lproj/Localizable.strings) for use as default values when the localized string for the user's preferred language is not found. I want to pass in that default value to this method: ``` [[NSBundle mainBundle] localizedStringForKey:key value:defaul...
[ 0.3412647247314453, 0.07295886427164078, -0.005125117022544146, -0.2815215289592743, 0.08665738254785538, -0.036050401628017426, 0.47299107909202576, 0.44229263067245483, 0.17603464424610138, -0.9508981704711914, -0.37310025095939636, 0.5771129131317139, -0.4090171754360199, -0.02516691014...
OS on your iPhone(s) and should be able to test immediately.
[ -0.11758486181497574, 0.35418444871902466, 0.4379428029060364, 0.14136405289173126, 0.4240499436855316, -0.057889509946107864, 0.32910987734794617, 0.4269103705883026, 0.07152451574802399, -0.6628363728523254, -0.2813652753829956, 0.7589266896247864, -0.12924659252166748, -0.29767823219299...
I'm taking a Masters capstone course early and doing my project in C# while everyone else is doing theirs in Java. The project has 4 services and requires a name server that maps service names to sockets. The instructor is suggesting that the students use RMI to build this registry. Since I'm not very familiar with Jav...
[ 0.7140260934829712, 0.23557628691196442, 0.31862637400627136, -0.017624789848923683, -0.1866486668586731, -0.3594997525215149, 0.23989687860012054, -0.23786939680576324, -0.09015439450740814, -0.7982389330863953, 0.17897184193134308, 0.4075568914413452, 0.01802840642631054, 0.1385730504989...
demoing the project on my XP laptop using VS 2008/WebDev server. RMI Registery in java works as a container where you can lookup services by a key. This mechanism is similar to resolving services/objects via ServiceLocator (e.g. ServiceLocator pattern) where you use a dependency injection engine, and ask it to resolve ...
[ -0.12154091149568558, -0.10591011494398117, 0.39014431834220886, 0.12695851922035217, -0.07793949544429779, 0.1864020824432373, 0.33921194076538086, -0.4389057457447052, -0.04224739596247673, -1.0080071687698364, -0.15887750685214996, 0.449293851852417, -0.4436173439025879, 0.1096398755908...
opens the port, and registers them in DI container, and later simply ask for an instance of the service as mentioned above.
[ 0.1830282360315323, -0.0535086914896965, 0.3806641697883606, 0.039696138352155685, 0.4462050199508667, 0.15437158942222595, -0.08356641232967377, -0.016537800431251526, 0.14324112236499786, -0.6309242248535156, -0.317873477935791, 0.42393818497657776, 0.16040146350860596, 0.402259558439254...
Add method Adds an object to the end of the `List<T>` What would be a quick and efficient way of adding object to the beginning of a list? Well, `list.Insert(0, obj)` - but that has to move everything. If you need to be able to insert at the start efficiently, consider a `Stack<T>` or a `LinkedList<T>`
[ 0.017286228016018867, -0.1425648033618927, 0.20254623889923096, 0.06376653164625168, -0.1520579606294632, 0.016763858497142792, -0.27203699946403503, -0.24723030626773834, -0.25182801485061646, -0.6487454771995544, 0.06717320531606674, 0.3534305989742279, -0.6618905663490295, -0.0049347542...
I'm having a problem with IE only in my Silverlight application. Since Silverlight 2 doesn't include a mechanism for file downloads I was left to my own devices to come up with a solution. The way I did it was as follows: HtmlPage.Window.Navigate(new Uri(sb.ToString(), UriKind.Relative)); My StringBuilder contains th...
[ 0.043951041996479034, 0.3038414716720581, 0.6195705533027649, -0.2916012406349182, -0.33178824186325073, -0.19840356707572937, 0.5521920323371887, 0.06948524713516235, 0.06412205845117569, -0.9696745276451111, 0.0747043564915657, 0.5177335739135742, -0.492148756980896, 0.1993246078491211, ...
that it is being blocked because it believes that the download wasn't triggered by the user interaction with the web page. The users can choose to allow the download and that setting seems to be remembered for the rest of the session. However next time they open the page it happens again. Even if the site is in the Tru...
[ 0.3693371117115021, -0.058227114379405975, 0.5184412598609924, 0.0807766541838646, 0.07197496294975281, -0.3877594470977783, 0.4219459891319275, 0.3829568326473236, -0.38010579347610474, -0.32620394229888916, -0.2982414960861206, 0.38932064175605774, -0.431832879781723, 0.2494216412305832,...
7), maybe that happens on your local dev instance? I think there's not much you can do, even MSDN pages tells you that "a message will appear on top of...", things that could mitigate this: * Warn the user that the message will be shown, then once he clicks the app is reset (Store the current app state in the isolate...
[ 0.2208694964647293, -0.14213304221630096, 0.7973909378051758, 0.2950884699821472, -0.054312556982040405, -0.10789438337087631, 0.5749685764312744, 0.10854531079530716, -0.3514357805252075, -0.6316169500350952, -0.3980669677257538, 0.8725712299346924, -0.28023794293403625, 0.136748164892196...
When I create an XCode project, there is a copyright notice commented out. I know that there is an special terminal command for editing this. Anyone knows it? ``` defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{ORGANIZATIONNAME = "My Company"; }' ```
[ 0.7006372213363647, 0.6673600673675537, -0.012841646559536457, -0.23889809846878052, 0.38097187876701355, -0.21238045394420624, 0.2267182320356369, 0.5186246633529663, -0.16064219176769257, -0.5786933302879333, -0.16816222667694092, 0.20243504643440247, -0.2629862129688263, 0.2240551859140...
We have a custom list that has a column called "Connection Date" and need to display the most recent list items (relative to this "Connection Date" column) in various places across the portal. the Data View Web Part appears to be the best solution, but I'm having difficulty finding the right method & syntax to filter b...
[ 0.39577561616897583, 0.0077634830959141254, 0.7491585612297058, 0.16800299286842346, 0.08748609572649002, -0.27637356519699097, 0.03618694096803665, 0.1370704174041748, -0.44676828384399414, -0.717059850692749, 0.13030579686164856, 0.14045515656471252, -0.040201686322689056, 0.591269314289...
and [Today]-3". Is this possible? Does anyone know how to do this? Thanks! if you use CAML, you can do it. ``` <Where> <Gt> <FieldRef Name="Created" Nullable="True" Type="DateTime"/> <Value Type="DateTime"><Today OffsetDays="-7"/></Value> </Gt> </Where> ```
[ 0.3909028470516205, -0.3211698830127716, 0.5855711102485657, 0.24981263279914856, 0.36146870255470276, -0.5989036560058594, -0.3398282527923584, 0.020875347778201103, -0.22553035616874695, -0.4105519652366638, -0.10565342009067535, 1.1763044595718384, -0.08583971112966537, -0.1415400356054...
please clarify me on the below questions, who will do the great data model design? Technical lead / Database Admin Thanks, Gunasekaran Sambandhan BuddyPress Links is what you're looking for: <http://wordpress.org/extend/plugins/buddypress-links/>
[ 0.08305515348911285, -0.10865918546915054, 0.28763753175735474, 0.25655341148376465, 0.03880622982978821, -0.34713315963745117, 0.08374369144439697, 0.21362073719501495, -0.4975833594799042, -0.4092494249343872, -0.5493171811103821, 0.40588638186454773, 0.06465209275484085, -0.161231547594...
What command can I run to remove blank lines in Vim? ``` :g/^$/d ``` `:g` will execute a command on lines which match a regex. The regex is 'blank line' and the command is `:d` (delete)
[ 0.019135212525725365, -0.08018684387207031, 0.6051057577133179, -0.16313154995441437, 0.014152911491692066, 0.21228818595409393, 0.3384864032268524, 0.00015781559341121465, 0.07286462932825089, -0.4409102499485016, -0.3105791509151459, 0.5697712898254395, -0.4316534698009491, 0.17238332331...
table1 has 3 columns: Id UserName SubmittedDate 1 Joe 1/1/2006 2 Joe 1/1/2007 3 Nat 1/1/2008 4 Pat 1/1/2009 I want to return this: Id UserName 2 Joe 3 Nat 4 Pat I just want just one record for Joe, the most recent one. How do I write this query? Thanks ``` SELECT MAX(ID), UserName FROM table...
[ -0.009873894974589348, 0.1296924352645874, 0.6477373242378235, -0.13922114670276642, -0.28217843174934387, 0.18636442720890045, -0.10075479000806808, -0.2693619728088379, -0.46166926622390747, -0.5546286106109619, 0.31469109654426575, 0.058500729501247406, -0.12583482265472412, 0.017797090...
I'm using the `json` module in Python 2.6 to load and decode JSON files. However I'm currently getting slower than expected performance. I'm using a test case which is 6MB in size and `json.loads()` is taking 20 seconds. I thought the `json` module had some native code to speed up the decoding? How do I check if this...
[ 0.2204677164554596, -0.025089170783758163, 0.13632716238498688, -0.0151437446475029, -0.12655214965343475, -0.31802648305892944, 0.5665718913078308, -0.22044391930103302, -0.11032368987798691, -0.8008657693862915, -0.3378838896751404, 0.5752178430557251, -0.19295211136341095, -0.1718003451...
developing on Mac OS X, but I getting a similar result on Windows XP.) It may vary by platform, but the builtin json module is based on [simplejson](http://pypi.python.org/pypi/simplejson/), not including the C speedups. I've found simplejson to be as a fast as python-cjson anyway, so I prefer it since it obviously has...
[ -0.19705156981945038, -0.2101048231124878, 0.5278129577636719, -0.18965084850788116, -0.1766185462474823, -0.17031794786453247, 0.235102578997612, -0.045634664595127106, -0.07178988307714462, -0.8867490887641907, -0.31470200419425964, 0.693152129650116, -0.28705665469169617, -0.41902691125...
I'm iterating through an array in ruby with each. Is there an easy way to get the iteration number or array index without going back to a for loop? Ah, got it. ``` each_with_index ``` woo! edit: whoops!
[ 0.2814524471759796, 0.24685516953468323, 0.41623249650001526, -0.009771415032446384, -0.17606806755065918, 0.06884477287530899, 0.19792765378952026, -0.1900365799665451, -0.3106142282485962, -0.5155571103096008, -0.047701697796583176, 0.33035245537757874, -0.04728800058364868, 0.1559040248...
I've got a "works on my machine" situation. I have a website where I'm passing session values from one page to another using ``` Session["foo"] = 'blah'; ``` and on page2 ``` var foo = Session["foo"]; ``` foo doesn't exist on page2. When tracing the page I've found it was using a different sessionid to the o...
[ 0.43355080485343933, 0.36331379413604736, 0.49097198247909546, -0.03888746351003647, 0.12291155755519867, -0.007088944781571627, 0.6307848691940308, -0.1237078383564949, -0.44760578870773315, -0.8156189322471619, 0.06385695189237595, 0.25947079062461853, -0.21219898760318756, 0.04501653462...
website and * Privacy is set to accept all cookies on the target machine. **EDIT:** Difference between running on my machine and target is that I am using <http://localhost/blah> locally and <http://XX_0001/blah> from the other client where XX\_0001 is my machine Well I think I have found the solution: It looks like ...
[ 0.5301607847213745, 0.192901611328125, 0.5442744493484497, -0.1411219984292984, -0.19713230431079865, -0.27740418910980225, 0.5259149670600891, 0.2923261821269989, -0.35621634125709534, -1.0488102436065674, 0.09834896773099899, 0.514571487903595, -0.1749209761619568, 0.13988721370697021, ...
Is there a way in vim to close all files (buffers, let's not get into that) from some directory and its subdirectories? Put the following into your .vimrc or in some custom file inside vim plugin folder. ``` function! s:close_buffers(name_regexp) for buffer_number in range(1, bufnr('$')) if !buflisted(buff...
[ 0.06590110063552856, -0.08816107362508774, 1.073696255683899, -0.3633466064929962, 0.21773377060890198, 0.15008054673671722, 0.27657851576805115, -0.1818312108516693, -0.3681514859199524, -0.5205727219581604, -0.3337257206439972, 0.5643713474273682, -0.3112192749977112, 0.2608592212200165,...
exec 'bdelete '.buffer_number endif endfor endfunction command! -nargs=1 CloseBuffers call s:close_buffers(<f-args>) ``` Use commands like ``` :CloseBuffers include :CloseBuffers in.*e ``` to close buffers which name matches passed regexp. That means that to close all files from the certain folder yo...
[ 0.09285544604063034, 0.0727858766913414, 0.7848324775695801, -0.2838588058948517, -0.06936659663915634, 0.04855158552527428, 0.12655171751976013, -0.17806895077228546, -0.09947115182876587, -0.49061620235443115, -0.7779439687728882, 0.40482982993125916, -0.5594418048858643, 0.0931860879063...
I have a database which tries to acheive point-in-time information by having a master table and a history table which records when fields in the other table will/did change. e.g. **Table: Employee** ``` Id | Name | Department ----------------------------- 0 | Alice | 1 1 | Bob | 1 ``` **Table: H...
[ -0.17921887338161469, 0.13257892429828644, 0.4173891246318817, -0.06176527589559555, 0.04516509920358658, 0.025842096656560898, 0.0104537857696414, -0.2557615041732788, -0.20074452459812164, -0.5522612929344177, 0.18119129538536072, 0.29519107937812805, -0.1385657787322998, 0.5234369039535...
will move to department 2 on 05/05/2009. I want to write a query to determine the employee's department on a particular date. So it needs to: * Find the first history record for that field and employee *before* given date * If none exists then default to the value currently in the master employee table. How can I do...
[ -0.3521215319633484, -0.08847493678331375, 0.7028443813323975, -0.17070268094539642, -0.21002474427223206, -0.10574653744697571, 0.2537989616394043, 0.23038628697395325, -0.43424269556999207, -0.7787817716598511, -0.5181498527526855, 0.3790457546710968, 0.06779994815587997, 0.3731645047664...
but I don't have the required SQL-fu to achieve this. --- *Note: I am conscious that this may not be the best way to implement this system - I am not able to change this in the short term - though if you can suggest a better way to implement this I'd be glad to hear it.* ``` SELECT COALESCE ( ( SELEC...
[ 0.2856663465499878, 0.19434936344623566, 0.14001959562301636, -0.023773571476340294, 0.3711482584476471, -0.30945438146591187, 0.24111588299274445, 0.06963192671537399, 0.05162424594163895, -0.8230876922607422, 0.11384198814630508, 0.7062713503837585, 0.01902104541659355, 0.265307724475860...
'Department' AND rowID = ID AND changeDate = ( SELECT MAX(changedate) FROM history
[ -0.10015779733657837, -0.22210031747817993, 0.4934278428554535, -0.07531052827835083, 0.2615148425102234, 0.318783700466156, -0.036367468535900116, 0.05156666412949562, -0.19148975610733032, -0.4999609589576721, -0.5598224401473999, 0.1742648333311081, -0.1800341010093689, 0.76863443851470...
WHERE field = 'Department' AND rowID = ID AND changeDate <= '01/01/2009' ) ), department) FROM employee WHERE id = @id ``` In both `Oracle` and `MS
[ -0.3028118312358856, -0.07967683672904968, 0.3502490222454071, -0.12864357233047485, 0.22787533700466156, 0.34065449237823486, 0.0020238214638084173, -0.02919764630496502, -0.1486758589744568, -0.44222885370254517, -0.5062394142150879, 0.5040640234947205, -0.14637964963912964, 0.5035299062...
SQL`, you can also use this: ``` SELECT COALESCE(newValue, department) FROM ( SELECT e.*, h.*, ROW_NUMBER() OVER (PARTITION BY e.id ORDER BY changeDate) AS rn FROM employee e LEFT OUTER JOIN history h ON
[ -0.11541126668453217, 0.12749932706356049, 0.25658926367759705, -0.09294045716524124, 0.1233263611793518, -0.12527351081371307, 0.04314349219202995, -0.208782359957695, 0.014964989386498928, -0.31646594405174255, -0.08367480337619781, 0.29318487644195557, -0.23371362686157227, 0.5721210837...
field = 'Department' AND rowID = ID AND changeDate <= '01/01/2009' WHERE e.id = @id ) WHERE rn = 1 ``` Note, though, that `ROWID` is reserved word in `Oracle`, so you'll need to rename this column when porting.
[ -0.27674227952957153, 0.08129634708166122, 0.46324610710144043, -0.30678191781044006, 0.14236605167388916, 0.08179572969675064, -0.01938561722636223, 0.2318510115146637, -0.0825100839138031, -0.35704636573791504, -0.2046157866716385, 0.35315394401550293, -0.10792043805122375, 0.35710355639...
From the windows command line, I need to echo out either the local or utc date and time of the system, but with the parts of the datetime in the order I want, regardless of the current internationalization setting of the pc. I've seen this related question: [How to get current datetime on Windows command line, in a...
[ 0.2812069058418274, -0.16625526547431946, 0.8887268900871277, -0.091860331594944, 0.2996216416358948, -0.18395692110061646, 0.15978220105171204, -0.03752058371901512, -0.26819151639938354, -0.44366320967674255, -0.26600906252861023, 0.6623398065567017, -0.04142583906650543, 0.0183651875704...
Pad(Month(d),2) & "-" & Pad(Day(d),2) & "T" & Pad(Hour(d),2) & ":" & Pad(Minute(d),2) & ":" & Pad(Second(d),2) ``` Run with: ``` cscript GetLocalTime.vbs //Nologo ``` This outputs: ``` 2009-04-02 14:22 ``` And can be adapted to write out the date-time parts in any order.
[ -0.05069351568818092, 0.02421117015182972, 0.9039956331253052, -0.1266583502292633, 0.1524878591299057, 0.07900280505418777, 0.0945376455783844, -0.20431050658226013, -0.26607945561408997, -0.29811859130859375, -0.26911282539367676, 0.22201937437057495, 0.0007622334524057806, 0.06796268373...
For diagnostic purposes I sometimes need to store the call stack that lead to a given state transition (such as granting a lock, committing a transaction, etc.) so that when something goes wrong later I can find out who originally triggered the state transition. Currently, the only way I am aware of to retrieve the ca...
[ 0.1895540952682495, 0.2033795416355133, 0.16927245259284973, 0.07085862010717392, 0.3412800431251526, -0.02478310465812683, 0.5197149515151978, -0.43622153997421265, -0.3350920081138611, -0.46586287021636963, -0.1915055811405182, 0.6453043818473816, -0.1262977123260498, 0.3100815713405609,...
Thread.currentThread().getStackTrace(); ```
[ -0.030407723039388657, -0.1711629033088684, 0.7015669345855713, -0.03958240523934364, 0.3362554609775543, -0.0922379344701767, 0.08403973281383514, 0.18781930208206177, -0.2948673665523529, -0.4777832329273224, 0.03604883328080177, 0.486107736825943, -0.39742156863212585, 0.701270282268524...
I have a a .NET 3.5 windows form which I'd like to embed into another form. Is there a quick way to turn that form into a control? Thanks Change the form to inherit from UserControl instead of Form, then fix any compile errors.
[ 0.3186177611351013, -0.20725925266742706, 0.17385466396808624, 0.34180748462677, 0.07106586545705795, -0.23480115830898285, 0.3234219551086426, 0.06746954470872879, 0.20835836231708527, -0.5909711718559265, 0.11679941415786743, 0.41875797510147095, -0.2249225527048111, -0.26023927330970764...
I'm trying to use [dbunit](http://www.dbunit.org/) to test some our database access code and I'm running into a problem. We are using [MySQL 5](http://www.mysql.com/) something or other as the database itself. I exported a small set of data to a [FlatXmlDataSet](http://www.dbunit.org/apidocs/org/dbunit/dataset/xml/Flat...
[ 0.3167785406112671, 0.05753225088119507, 0.1797650158405304, -0.13206875324249268, 0.06424600630998611, 0.12486471235752106, 0.2272367626428604, -0.16554191708564758, 0.15419302880764008, -0.4577311873435974, -0.08127355575561523, 0.3210647702217102, -0.35223549604415894, 0.325248926877975...
The code using the database is just making the assumption that if the value provided from the database is not 't', then it must be false. How can I make this go? I can't fix the source data, so I have to try to do something with the test case. Export a new dataset, using `"select case when FHEIGHT_FLAG = 't' then 't' e...
[ -0.06273455172777176, 0.18078696727752686, 0.3285132348537445, 0.047824736684560776, 0.23192283511161804, -0.06885756552219391, 0.2529505789279938, -0.14893116056919098, -0.05988909676671028, -0.5688709020614624, -0.242336705327034, 0.4770631194114685, -0.3660241663455963, 0.06587977707386...
FHEIGHT_FLAG, ....(all other columns) .... from tablename"; // database connection Class driverClass = Class.forName("package.of.jdbcDriver"); Connection jdbcConnection = DriverManager.getConnection( "jdbc:url:of:db", "user", "pass"); IDatabaseConnection connection = new DatabaseConnection(jdbcConnection); // ...
[ -0.39351215958595276, -0.08018457144498825, 0.41003796458244324, -0.1706094741821289, -0.42313092947006226, 0.30926409363746643, 0.09817388653755188, -0.17652061581611633, 0.07951539754867554, -0.6315088868141174, -0.25472575426101685, 0.541016161441803, -0.5395920872688293, 0.618104875087...