text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
} catch (Exception ex) { Console.Error.WriteLine(ex.Message); } } } [RunInstaller(true)] public sealed class MyServiceInstallerProcess : ServiceProcessInstaller { public MyServiceInstallerProcess() { this.Account = ServiceAccount.NetworkServ...
[ 0.04918025806546211, 0.0026861289516091347, 0.5270184278488159, -0.3640822470188141, 0.31272414326667786, -0.15887451171875, 0.9244963526725769, -0.11486879736185074, 0.0056628454476594925, -0.5091285109519958, -0.48696237802505493, 0.42400166392326355, -0.28979864716529846, 0.381995975971...
} } [RunInstaller(true)] public sealed class MyServiceInstaller : ServiceInstaller { public MyServiceInstaller() { this.Description = "My Service"; this.DisplayName = "My Service"; this.ServiceName = "My Service"; this.StartType = System.ServiceProcess.Servic...
[ 0.23617100715637207, 0.07719211280345917, 0.4444025754928589, -0.22110319137573242, 0.33310097455978394, 0.013946838676929474, 0.8900547027587891, -0.04212311655282974, 0.03970302641391754, -0.6348327994346619, -0.56868577003479, 0.7728569507598877, -0.33036890625953674, 0.4206066429615021...
can then call from the UI app OR enable the service to run either as a winforms app or a service. The first option is pretty easy - use remoting or WCF to expose the API. The second option can be achieved by moving the "guts" of your app into a separate class then create a service wrapper and a win-forms wrapper that...
[ 0.3636329174041748, -0.48410582542419434, 0.25960013270378113, -0.026371877640485764, 0.20081597566604614, 0.03587007150053978, 0.22884701192378998, -0.12133171409368515, 0.1773565113544464, -0.9517233371734619, -0.1339258998632431, 0.44371092319488525, -0.3213421404361725, -0.012702145613...
System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); FormWrapper fw = new FormWrapper(guts); System.Windows.Forms.Application.Run(fw); } else { ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new ServiceWrapper(guts) }; Service...
[ 0.09985251724720001, -0.16888867318630219, 0.6598511934280396, -0.5053614377975464, 0.00025507636019028723, 0.11873606592416763, 0.5859354734420776, -0.27012690901756287, -0.20043277740478516, -0.9187723398208618, -0.4542107582092285, 0.4043751060962677, -0.3313976228237152, 0.287040829658...
Imagine that I will make an async call in .NET, i.e. HttpWebRequest.BeginGetResponse, and the HttpWebRequest object isn't referenced at a broader scope. Will the Garbage Collector destroy it and cause problems? Example code: ``` using System; using System.Net; public class AsyncHttpWebRequest { void Main() {...
[ 0.07752048224210739, -0.27967748045921326, 0.27001842856407166, -0.13560667634010315, 0.2611241936683655, -0.047905974090099335, 0.6299837231636047, -0.2887941002845764, -0.11478161066770554, -0.6720134615898132, -0.2586643099784851, 0.5910529494285583, -0.5449018478393555, 0.3104696571826...
request being passed as an AsyncState): ``` using System; using System.Net; public class AsyncHttpWebRequest { void Main() { var Request = HttpWebRequest.Create("http://www.contoso.com"); var result = Request.BeginGetResponse(GetResponseCallback, Request); } private void GetResponseCa...
[ 0.06809964776039124, -0.33432766795158386, 0.4604279398918152, 0.008709103800356388, -0.024241978302598, -0.04506009444594383, 0.42052191495895386, -0.2949744462966919, -0.18879714608192444, -0.4453935921192169, -0.5215225219726562, 0.19995778799057007, -0.4389339089393616, 0.3882831335067...
both examples the async API keeps a reference to your request (within the thread pool where async IO operations are lodged) and so it won't be garbage collected until it completes.
[ 0.22945967316627502, -0.14248307049274445, 0.22027140855789185, 0.1318296194076538, 0.23930883407592773, -0.28226128220558167, 0.1903086006641388, 0.0021244396921247244, -0.3974057137966156, -0.5282664895057678, -0.09921260923147202, 0.27382469177246094, -0.20886996388435364, 0.09186383336...
I just found this in some old code, and I'm not sure what it means. ``` Dim sTemp As String * 1 ``` What is the \* 1 at the end? Thanks! It means that the variable is a string of exactly one character in length. Essentially, a fixed-length string.
[ 0.20586203038692474, -0.07663007825613022, 0.501457691192627, 0.06276938319206238, -0.16603679955005646, 0.041736166924238205, -0.15639381110668182, 0.3824087083339691, -0.3556405007839203, -0.06549020111560822, -0.10585502535104752, 0.32960835099220276, -0.30674928426742554, 0.36204642057...
Suppose I have a `std::vector` (let's call it `myVec`) of size `N`. What's the simplest way to construct a new vector consisting of a copy of elements X through Y, where 0 <= X <= Y <= N-1? For example, `myVec [100000]` through `myVec [100999]` in a vector of size `150000`. If this cannot be done efficiently with a ve...
[ -0.2755097448825836, -0.0975741371512413, 0.4355478286743164, -0.24874790012836456, 0.057785794138908386, 0.1914886087179184, -0.12927983701229095, -0.3704996407032013, -0.16762252151966095, -0.9289085865020752, -0.1249808594584465, 0.325824499130249, -0.23675666749477386, 0.13898253440856...
I am doing some population modeling (for fun, mostly to play with the concepts of Carrying Capacity and the Logistics Function). The model works with multiple planets (about 100,000 of them, right now). When the population reaches carrying capacity on one planet, the inhabitants start branching out to nearby planets, a...
[ 0.35260364413261414, -0.07587360590696335, 0.2637491226196289, 0.35530367493629456, 0.15892863273620605, 0.19377724826335907, -0.2689428925514221, 0.21758224070072174, -0.7906166315078735, -0.6131497621536255, 0.1723855435848236, -0.1590452641248703, 0.07060635834932327, 0.3456381857395172...
(or whatever) I can use? Google is being very unhelpful today. I could probably write a class that would work well enough, but I'd rather use something pre-existing, if such a thing exists. Use units of megapeople to achieve more headroom. Also, Decimal lets you have 100,000 planets each with 100000000000000 times th...
[ 0.24303942918777466, 0.26832571625709534, 0.3644602298736572, 0.3062942326068878, 0.12650014460086823, 0.2915733754634857, 0.01329738087952137, 0.10285388678312302, -0.5999948978424072, -0.2660817503929138, 0.06621294468641281, 0.2953883707523346, 0.16933146119117737, 0.34435561299324036, ...
Yo! I'm trying to copy a few chars from a char[] to a char\*. I just want the chars from index 6 to (message length - 9). Maybe the code example will explain my problem more: ``` char buffer[512] = "GET /testfile.htm HTTP/1.0"; char* filename; // I want *filename to hold only "/testfile.htm" msgLen = recv(connectin...
[ 0.39037975668907166, 0.2961350977420807, 0.314180463552475, -0.2348870038986206, 0.004672248847782612, 0.23533527553081512, 0.5311731696128845, 0.054077908396720886, -0.2790314555168152, -0.618848979473114, -0.12496937066316605, 0.6144149303436279, -0.3383278250694275, -0.04123392701148987...
to free() it...) There are a few problems with the use of strncpy() in your code. * buffer+5 points to the sixth character in string (the "T"), while you said you wanted the backslash. * The last parameter is the maximum number of bytes to copy, so should probably be msglen-13. * strncpy() won't null terminate the c...
[ 0.3327310085296631, -0.3607937693595886, 0.2885761559009552, 0.17692598700523376, -0.02058575302362442, -0.3382079303264618, 0.4619147777557373, -0.3776220679283142, -0.5021272897720337, -0.4105084538459778, -0.3374190032482147, 0.551216185092926, -0.42172619700431824, 0.028052624315023422...
be one byte or 512 bytes. It won't just read a line. You should really loop calling recv until you have a complete line to work with.
[ 0.22562359273433685, -0.586331844329834, 0.20328499376773834, 0.2660558819770813, 0.031058290973305702, -0.11561992019414902, 0.3632991909980774, 0.18645991384983063, -0.33003363013267517, -0.5130900740623474, -0.16480013728141785, 0.22618021070957184, -0.23538221418857574, -0.100768633186...
Is there some sort of profiling tool available? View source and search/replace? Although the message is usually a problem in IE, loading the page in Firefox with Firebug will let you see what is going on. Also, you might find it helpful to leave the protocol off of the URLs in the first place: [Http-https transitions ...
[ 0.1540038138628006, -0.07865947484970093, 0.34699755907058716, 0.16251790523529053, -0.22133053839206696, -0.6642008423805237, 0.4985275864601135, -0.06185932457447052, -0.02989051677286625, -0.8369128704071045, -0.18394428491592407, 0.6703559160232544, -0.2563879191875458, 0.0968751236796...
I am not a big fan of datasets so I use POCO to return data. I have achieved paging and sorting using custom methods that I create for a POCO type that work on page size and give me a set of the complete POCO collection at a time, I use methods that check for name of the DataItem clicked and sort order to do that sort....
[ 0.31390127539634705, 0.04707040637731552, 0.08778782933950424, 0.19003859162330627, -0.013836654834449291, -0.07564015686511993, -0.04817209020256996, 0.0633767619729042, -0.23091624677181244, -0.807026743888855, 0.2513591945171356, 0.3265351355075836, -0.12022434175014496, -0.067551590502...
do not need to make such methods every time for a new POCO so that it works as if you were using a DataTable? I can provide some more explanation if required. NOTE: Some people may call POCO as DTOs . EDIT : I found this [article](https://web.archive.org/web/20200127134338/http://geekswithblogs.net:80/czumbano/archiv...
[ 0.17702065408229828, -0.1706192046403885, -0.27262362837791443, 0.22089405357837677, 0.019935928285121918, -0.2505320608615875, 0.14145110547542572, 0.3167228698730469, -0.41286224126815796, -0.44318607449531555, -0.15781863033771515, 0.3177717328071594, -0.19080132246017456, 0.01850170642...
list (for DTO/POCO). This allowed me to sort a list in my presenter or code-behind with only 1 line of code. Typically for SortExpression I return the property name of the DTO you want to sort on. In addition, the SortDirection would be a simple "Ascending" Or "Decending" ``` List<Supplier> SupplierList = mSupplierSe...
[ 0.3587130904197693, -0.17401990294456482, 0.6085652112960815, -0.1703418493270874, -0.12612111866474152, 0.3604777157306671, -0.09235721081495285, -0.3434350788593292, -0.44297853112220764, -0.44736531376838684, -0.3372940123081207, 0.3901364505290985, -0.35762643814086914, 0.5015720129013...
mExpression = Expression; mDirection = Direction; } public int Compare(T x, T y) { PropertyInfo propertyInfo = typeof(T).GetProperty(mExpression); IComparable obj1 = (IComparable)propertyInfo.GetValue(x, null); IComparable obj2 = (IComparable)propertyInfo.GetValue(y, ...
[ -0.5884162783622742, -0.17314843833446503, 0.6518717408180237, -0.1639033854007721, 0.028628798201680183, 0.3632517158985138, 0.37188151478767395, -0.378467857837677, 0.07053643465042114, -0.581825315952301, -0.4404648244380951, 0.7696747183799744, -0.19164781272411346, 0.4179361164569855,...
} else { return obj2.CompareTo(obj1); } } } ```
[ -0.23043864965438843, 0.1852850466966629, 0.08544480055570602, -0.30533453822135925, 0.05112257972359657, 0.139451801776886, 0.44195491075515747, 0.09903303533792496, 0.06204231083393097, -0.613481879234314, -0.27643468976020813, 0.6877813339233398, -0.3129487931728363, 0.0885099396109581,...
I have this regular expression: ``` ^\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$ ``` however it is failing when i have an amount such as this: `41022095.6` anything I am missing? Your regular expression expects either no decimal point, or a decimal point followed by *two* decimal digits. It depends on what you want, b...
[ -0.17861610651016235, 0.28103095293045044, 0.4211771488189697, -0.16645623743534088, 0.028304677456617355, 0.14097899198532104, 0.20252899825572968, -0.1460098773241043, -0.06573724001646042, -0.23853231966495514, -0.21411167085170746, 0.6607846021652222, -0.27893349528312683, 0.0383689515...
``` <{if $ishtml == true}><font face="Verdana, Arial, Helvetica" size="2"><{$contentshtml}> <BR><BR> <{if $settings[t_enhistory] == 1}> <fieldset style="margin-bottom: 6px; color: #333333;FONT: 11px Verdana, Tahoma;PADDING:3px;"> <legend><{$language[tickethistory]}></legend> <{foreach key=key value=post from=$postl...
[ -0.20789799094200134, 0.02054292894899845, 0.5466224551200867, -0.0030434562359005213, -0.33884549140930176, 0.21858066320419312, 0.28272178769111633, -0.6218168139457703, -0.15459021925926208, -0.5211062431335449, -0.1942797303199768, 0.1829403042793274, -0.47799018025398254, 0.2680866420...
from=$post[attachments]}> <{$attachment[filename]}> (<{$attachment[attachmentsize]}>) <{/foreach}> <{/if}> <{/if}> <{/foreach}> <{/if}> <{$language[ticketdetails]}> =================== <{$language[articketid]}><{$ticket[fticketid]}> <{$language[ardepartment]}><{$ticket[department]}> <{$language[arpriority]}><{$ticket...
[ 0.13814277946949005, -0.28511032462120056, 0.4951228201389313, 0.43566232919692993, 0.01645374298095703, 0.10149112343788147, -0.12592813372612, -0.30266255140304565, -0.32932737469673157, -0.5688206553459167, -0.21332506835460663, 0.09137419611215591, -0.3926737904548645, -0.0969991981983...
What I'd like to do is to include settings from a file into my current interactive bash shell like this: $ . /path/to/some/dir/.settings The problem is that the .settings script also needs to use the "." operator to include other files like this: . .extra\_settings How do I reference the relative path for .extra\_s...
[ 0.1952560991048813, -0.09165505319833755, 0.5261527895927429, -0.05178229510784149, 0.21733729541301727, 0.10438713431358337, 0.2277127355337143, -0.34247246384620667, -0.0695657730102539, -0.9654557108879089, 0.2641105055809021, 1.166717767715454, -0.18565304577350616, -0.0834271833300590...
I would rather not have an install process that records the name of the installed directory. I believe `$(dirname "$BASH_SOURCE")` will do what you want, as long as the file you are sourcing is **not** a symlink. If the file you are sourcing may be a symlink, you can do something like the following to get the true dir...
[ 0.37352266907691956, 0.1218751072883606, 0.5197706818580627, -0.1735733300447464, 0.0018519422737881541, -0.16863326728343964, -0.09072231501340866, -0.2600749731063843, -0.04127427935600281, -0.6207354068756104, -0.16045959293842316, 0.9503883719444275, -0.24542760848999023, 0.16493237018...
else PRG=`dirname "$PRG"`"/$link" fi done dir=$(dirname "$PRG") ```
[ -0.04003065451979637, -0.045205458998680115, 0.30097660422325134, -0.2745414674282074, 0.07204464077949524, -0.33083996176719666, 0.012420701794326305, -0.37936466932296753, 0.23975472152233124, -0.16141487658023834, -0.16161508858203888, 0.9629060626029968, -0.3978620767593384, 0.05988328...
I have a Repeater which displays a list of items (in a grid-like/table view). When a user clicks an item, I display an UpdatePanel under this item with additional information relevant to the item (similar to Accordion control). I know how to populate the elements of the UpdatePanel in code-behind (I pass the ID of the ...
[ 0.2537474036216736, 0.02398047223687172, 0.5979341864585876, -0.04289624094963074, -0.039437465369701385, 0.10260413587093353, 0.0002895141369663179, -0.09033716470003128, -0.23567253351211548, -0.8101530075073242, 0.10800932347774506, 0.43357348442077637, -0.09928920120000839, 0.243700936...
the `<%= %>` syntax to assign text fields of the UpdatePanel control the values of the page properties, e.g. `<%= Comment %>`, it sort of worked, but it changed the fields of all UpdatePanels in the repeater. Is there any way to bind the active UpdatePanel to the current values and leave already bound UpdatePanels unch...
[ 0.12966018915176392, 0.08186978846788406, 0.586660623550415, -0.14397361874580383, -0.12653982639312744, -0.03692469745874405, 0.14087440073490143, -0.1031951904296875, -0.014861110597848892, -0.547598659992218, -0.0706905797123909, 0.7401072978973389, -0.33633145689964294, 0.0645650699734...
"$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`"/$link" fi done dir=$(dirname "$PRG") ```
[ -0.22841541469097137, -0.11295589804649353, 0.960223376750946, -0.33770039677619934, -0.11506588757038116, -0.10092610120773315, 0.0842752456665039, -0.5304706692695618, 0.21130721271038055, -0.25750240683555603, -0.318180114030838, 0.8813915848731995, -0.5739300847053528, 0.17602643370628...
My default document is in subfolder not in root how can i make it default in asp.net 2.0 website. Tried iis7 default document setting to '/pages/default.aspx' '~/pages/default.aspx' but it didn't work. Default document is not the same as start page. Default document means if I requested `mysite.com/somefolder` and did...
[ -0.06790492683649063, 0.008238465525209904, 0.6467350125312805, -0.16353484988212585, -0.08408010005950928, -0.20558230578899384, 0.6404609084129333, 0.05591297894716263, 0.03698938712477684, -0.9747810363769531, -0.2067088931798935, 0.3707141578197479, -0.2122761458158493, 0.2551014125347...
However it's best to issue a permanent redirect instead of a simple `Response.Redirect`. Also doing it using JS will be bad from a SEO point of view.
[ -0.16606631875038147, -0.33366671204566956, 0.47384124994277954, -0.06604938954114914, -0.39195409417152405, -0.24083319306373596, 0.4871767461299896, -0.07500389963388443, -0.12376570701599121, -0.49117931723594666, -0.6645743250846863, 0.42872363328933716, -0.4531162977218628, -0.2287998...
I am emulating the functionality of an old app in VB.Net. I have a DataGridView on my form which is bound to a BindingSource. I have a button on the toolbar which lanuches a sort dialog. The sort dialog allows sorting by up to 3 columns. So I'm building a string from the results of the dialog and setting the BindingS...
[ 0.39495667815208435, 0.004111593123525381, 0.6461172103881836, -0.0045392815954983234, -0.12235306948423386, -0.015574336983263493, 0.2211599051952362, -0.12057846784591675, -0.2629028558731079, -0.8898683786392212, 0.317897230386734, 0.1201043576002121, -0.3816530108451843, 0.279579639434...
refresh. Can you post some code? Are you sure you're building up the Sort string correctly?
[ 0.267779141664505, 0.047624602913856506, 0.25115540623664856, 0.23386555910110474, 0.10806003957986832, 0.06331880390644073, 0.3915923237800598, 0.24797013401985168, -0.05995911732316017, -0.7669038772583008, 0.07767053693532944, 0.3108663856983185, -0.22325828671455383, -0.307638287544250...
I'll create a EML file with an attachment using JavaMail. I created a simple EML file successfully, but adding an attachment don't work properly. I'm going to add a PDF file. My EML file will be created successfully. If I open the generated EML file with Outlook I'll find not my PDF file as attachment but I'll find t...
[ 0.3358305096626282, 0.24417166411876678, 0.6760071516036987, 0.1262308657169342, 0.04325610399246216, -0.06615801155567169, 0.24730555713176727, -0.33597832918167114, 0.05527656525373459, -0.7728716135025024, -0.0825931653380394, 0.48790043592453003, -0.2739449441432953, 0.0428737327456474...
session = Session.getInstance(p); MimeMessage message = new MimeMessage(session); // MimeBodyPart txt = new MimeBodyPart(); // txt.setText(""); MimeBodyPart mbp = new MimeBodyPart(); mbp.attachFile(attachment); // FileDataSource fds = new FileDataSource(attachment); // fds.setFileTypeMap(new FileTypeMap() { // // ...
[ -0.11324036866426468, -0.14881020784378052, 1.1110544204711914, 0.005798113998025656, 0.08460683375597, 0.1947651207447052, 0.448650598526001, -0.7148336172103882, -0.5959117412567139, -0.5428571701049805, -0.6244387030601501, 0.5805519223213196, -0.33223289251327515, 0.28097161650657654, ...
MimeMultipart(); // mp.addBodyPart(txt); mp.addBodyPart(mbp); message.setContent(mp); File emlFile = new File("message.eml"); emlFile.createNewFile(); message.writeTo(new FileOutputStream(emlFile)); // do something with the EML file // Desktop.getDesktop().open(emlFile); ``` [Create a .eml (email) file in Java](htt...
[ 0.341570645570755, -0.07305750250816345, 0.6084631085395813, -0.021040627732872963, 0.009956750087440014, -0.026469923555850983, 0.7785691022872925, -0.1336815506219864, 0.032699331641197205, -0.6108327507972717, -0.3584768772125244, 0.4633847773075104, -0.5020594000816345, 0.0720411762595...
not a technical solution. Obviously you can check the referrer field, content scrub and attempt to filter the profane, but enumerating badness *never* works. (It can be an acceptable "first pass", but humans are infinitely resourceful in avoiding such filters). Put the user submitted content into a queue and have mode...
[ 0.42866697907447815, 0.2572863698005676, 0.1916905641555786, 0.2622362971305847, -0.19470573961734772, -0.49954625964164734, 0.3821989595890045, 0.15829800069332123, 0.01572996750473976, -0.513444721698761, -0.1330082267522812, 0.6254463791847229, -0.10104236751794815, 0.06448818743228912,...
they have zero risk tolerance) then I suggest they not accept any user input, don't trust moderators and in fact eliminate the site itself (because an insider could go rogue and put something improper up). Clearly every act has risk; you need to find out how much they can accept, such as a moderator based approval queu...
[ 0.5525847673416138, 0.25130558013916016, 0.10608862340450287, 0.09871093928813934, -0.2362058162689209, -0.6242184638977051, 0.5846524238586426, 0.10605023056268692, 0.053213007748126984, -0.2534033954143524, 0.06654731184244156, 0.45529812574386597, -0.13369324803352356, 0.076091371476650...
I'm developing a 2D game for the iPhone using OpenGL ES and I'd like to use a 320x480 bitmapped image as a persistent background. My first thought was to create a 320x480 quad and then map a texture onto it that represents the background. So... I created a 512x512 texture with a 320x480 image on it. Then I mapped tha...
[ -0.12745799124240875, -0.0031609986908733845, 0.5268692970275879, 0.06751497089862823, 0.09813719242811203, 0.3377901613712311, 0.14027857780456543, 0.11030208319425583, -0.13979162275791168, -0.8129633069038391, 0.19055745005607605, 0.6128654479980469, -0.3508525490760803, 0.0592950619757...
testing and discovered that my slowdown is in the pixel pipeline. Not surprisingly, the large background image is the main culprit. To prove this, I removed the background draw and everything else rendered very fast. I am looking for advice on how to keep my background and also improve performance. Here's some more...
[ 0.3764484226703644, -0.061505720019340515, 0.20752888917922974, 0.23904182016849518, -0.08832165598869324, 0.03129788860678673, 0.3008680045604706, -0.000410104839829728, -0.1352144181728363, -0.728429913520813, 0.15835461020469666, 0.5619045495986938, -0.0356975756585598, -0.1312222480773...
with that. that may be due to my inexperience with OpenGL ES or it just might be a stupid idea that won't work :) 4) I realize that the entire background does not always have to refresh, just the parts that have been drawn over by the moving sprites. I started to look into techniques for refreshing (as necessary) part...
[ 0.4846092164516449, 0.15656709671020508, 0.3236922025680542, 0.31516921520233154, -0.22113151848316193, -0.07848881185054779, 0.15487651526927948, 0.22915859520435333, -0.33033302426338196, -0.49572932720184326, -0.02521688863635063, 0.6040681600570679, 0.23458606004714966, 0.2219362556934...
way or another. However, I wanted to make it clear that the main issue here turned out to be the behavior of simulator itself (as implied by Andreas in his response). Once I was able to get the application on the device, it performed much, much better. I mention this because, prior to developing my game, I had seen a...
[ 0.05218883603811264, -0.2201189547777176, 0.1800624430179596, 0.5128524303436279, -0.09522202610969543, 0.19022423028945923, 0.2748134434223175, -0.15979799628257751, -0.12274341285228729, -0.9042692184448242, -0.016380006447434425, 0.5259488821029663, 0.22029165923595428, -0.1444920897483...
I'm trying to optimize query performance and have had to resort to using optimizer hints. But I've never learned if the optimizer will use more than one hint at a time. e.g. ``` SELECT /*+ INDEX(i dcf_vol_prospect_ids_idx)*/ /*+ LEADING(i vol) */ /*+ ALL_ROWS */ i.id_number, ... FROM i...
[ -0.04807230085134506, 0.0922711193561554, 0.8633496165275574, 0.018801046535372734, 0.08582206815481186, 0.2511591613292694, -0.3135403096675873, -0.5520213842391968, -0.09393449872732162, -1.0504382848739624, 0.19087208807468414, 0.6533300280570984, -0.263664573431015, 0.164112851023674, ...
but I know that's just an estimate. Please assume that all table and index statistics have been calculated. FYI, the index dcf\_vol\_prospect\_ids\_idx is on the i.solicitor\_id column. Thanks, Stew Try specifying all the hints in a single comment block, as shown in this example from the wonderful Oracle documentati...
[ -0.21318797767162323, 0.02373396046459675, 0.4704402983188629, 0.1433817744255066, -0.1028425320982933, 0.19915223121643066, 0.037010934203863144, -0.13408908247947693, -0.1802355796098709, -0.9506401419639587, 0.24167309701442719, 0.22378981113433838, -0.32205531001091003, -0.207951590418...
if > you specify only the INDEX hint for a > given table, then the optimizer needs > to determine the remaining access > paths to be used, as well as the > corresponding join methods. Therefore, > even though you gave the INDEX hint, > the optimizer might not necessarily > use that hint, because the optimizer >...
[ -0.3507106602191925, -0.11004476994276047, 0.3199309706687927, -0.11581335961818695, 0.03534578159451485, -0.1638021618127823, -0.06732417643070221, -0.33186593651771545, 0.053261592984199524, -0.6915184855461121, -0.36703869700431824, 0.3101695775985718, -0.482787162065506, -0.20713219046...
used; the join methods to be used on > the different tables are also > specified. > > > Example 16-1 Specifying a Full Set of > Hints ``` SELECT /*+ LEADING(e2 e1) USE_NL(e1) INDEX(e1 emp_emp_id_pk) USE_MERGE(j) FULL(j) */ e1.first_name, e1.last_name, j.job_id, sum(e2.salary) total_sal FROM emplo...
[ -0.3091411292552948, -0.030772177502512932, 0.6123687028884888, -0.12892143428325653, 0.09925467520952225, 0.28626948595046997, -0.2621489465236664, -0.31050214171409607, -0.31872788071632385, -0.452432781457901, -0.18046630918979645, 0.34681522846221924, -0.0873887911438942, 0.13201819360...
I have some standard-texts, but some portion of it is different. But of these different parts only a few exists. For instance I want: ``` \mytext{...}{a} \mytext{...}{b} ``` That produces: ``` \section{Item: ...}\label{item...} This is a standard item. Items of type a are very precious. \section{Item: ...}\label...
[ 0.09365129470825195, 0.18057462573051453, 0.2974436283111572, 0.017119381576776505, -0.0571955069899559, -0.04515064135193825, 0.12593241035938263, -0.07887028902769089, -0.11824100464582443, -0.6478574275970459, -0.26871606707572937, 0.42016178369522095, -0.032233159989118576, 0.089625798...
used like this: ``` \usepackage{ifthen} \ifthenelse{test}{then-code}{else-code} ``` so you could do something similar to: ``` \newcommand\mytext[1]{% \ifthenelse{\equal{#1}{a}}{very precious}{% \ifthenelse{\equal{#1}{b}}{cheap}{unknown}}} ``` For LaTeX programming, I'd recommend getting a copy of [The LaT...
[ 0.13653531670570374, -0.12020671367645264, 0.08311930298805237, 0.13477548956871033, -0.005387402605265379, -0.23406852781772614, -0.005741387605667114, -0.053706441074609756, -0.07631600648164749, -0.5331918597221375, 0.06494427472352982, 0.5758188366889954, -0.22465427219867706, -0.01292...
I need to open foxpro free tables in vb.net using the oledb connection. But... I only need to get the column names. I don't really need to 'select' anything. I am trying to dynamically browse through all our free tables and set up a listing of every column from every file and xref that to another free table that conta...
[ 0.5768593549728394, 0.23679876327514648, 0.3020190894603729, 0.0440765842795372, 0.04851808398962021, -0.1300215870141983, 0.28397050499916077, -0.0721389427781105, -0.06274724006652832, -0.7570664882659912, 0.15501342713832855, 0.5699977874755859, -0.34464991092681885, 0.11410515755414963...
are over 250 tables. Overall, it takes between 15 and 20 minutes. Or, is there another way to only get the first record of the table without using 'ORDER BY'? Here's what I have so far. "File" is passed in as a parameter. It would contain info like "C:\data\table1.dbf" ``` Dim filePath As String filePath = IO.Pat...
[ 0.11688508838415146, -0.2058825045824051, 1.0623260736465454, -0.06961395591497421, 0.05504203215241432, 0.33132848143577576, 0.0828063115477562, -0.47943785786628723, -0.26808345317840576, -0.9168906807899475, 0.005765002220869064, 0.5456002354621887, -0.10155227780342102, 0.1659768223762...
``` I then take the datatable (dt) and loop through to get the column information. I would like it to be as quick as Visual Studio is when I create a dataset and load all tables from the directory through the wizard. It is able to very quickly find all the column information without reading in the data from the table...
[ 0.6377418637275696, 0.4023200273513794, -0.00037343811709433794, 0.03163396194577217, -0.17063921689987183, -0.05173837020993233, -0.021587209776043892, 0.061297185719013214, -0.24262595176696777, -0.8195388913154602, 0.08978371322154999, 0.704788863658905, -0.26176223158836365, -0.0556235...
* FROM "File" where 1 = 0 ``` This will give you an empty result set, will also give you metadata on the projection returned. You might also want to look into the [`GetOleDbSchemaTable` method](http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection.getoledbschematable.aspx) on the [`OleDbConnectio...
[ 0.1306999772787094, -0.1829468011856079, 0.44520142674446106, 0.29656466841697693, 0.08380016684532166, -0.07686387002468109, 0.011880793608725071, -0.04511994868516922, -0.29174110293388367, -0.6665555238723755, -0.28995513916015625, 0.18843621015548706, -0.11746780574321747, 0.2281389534...
I need to lock the browser scrollbars when I show a div that represent a modal window in Internet Explorer 7 only. Googling I found that I can use `document.body.style.overflow='hidden'` but this doesn't work for IE7. I also tried with `document.body.scroll="no"` which works but only after I mouse over the scrollbar :-...
[ 0.09582289308309555, 0.04465258866548538, 0.7268561720848083, -0.11842616647481918, -0.08644361793994904, -0.027438288554549217, 0.5119382739067078, 0.03798924759030342, -0.05827832594513893, -0.6373007297515869, 0.05531749874353409, 0.8137535452842712, -0.17760741710662842, 0.058810997754...
place on the screen. So with this in mind, you can lay out a `position:fixed` overlay. Within that you can have your `position:absolute` (or `fixed` again, if you prefer -- it *shouldn't* make a difference) modal box.
[ -0.3061812222003937, 0.012130340561270714, 0.3594871461391449, -0.22281315922737122, 0.14105209708213806, 0.004941954277455807, -0.04264336824417114, 0.1822521984577179, -0.018073666840791702, -0.7153396010398865, -0.5079111456871033, 0.49875742197036743, -0.062301263213157654, -0.01007929...
So I have a Stateful .NET webservice (C#) that I would like Flex to use. The only problem is that I don't see a cookie being passed, even though I have the WebMethods decorated with: ``` WebMethod(EnableSession=true) ``` I can't seem to figure out if it is an issue with Flex or .NET. Does Flex 3 (as3) pay attentio...
[ 0.3706783652305603, 0.03818207606673241, 0.3694493770599365, -0.0018536963034421206, -0.1615489274263382, -0.38893625140190125, 0.38840579986572266, -0.1270778626203537, -0.4130198657512665, -0.9652937650680542, 0.016983533278107643, 0.5483534932136536, -0.10867451876401901, -0.01972655951...
(including that in your other comment), I think you're using the wrong positioning method. Try `position:fixed`. It's basically the same as `position:absolute` apart from it's relative to the absolute viewport. Ie: if the user scrolls, the item stays in the same place on the screen. So with this in mind, you can lay ...
[ -0.025293836370110512, -0.1685211956501007, 0.47987398505210876, 0.022232744842767715, 0.05916498228907585, -0.02406616136431694, -0.07695651799440384, 0.3069709837436676, -0.11271844804286957, -0.6465108394622803, -0.22577810287475586, 0.6869751214981079, 0.008222169242799282, -0.21278870...
How can I implement the following in python? ``` #include <iostream> int main() { std::string a; std::cout << "What is your name? "; std::cin >> a; std::cout << std::endl << "You said: " << a << std::endl; } ``` Output: > What is your name? Nick > > > You said: Nick Call ``` name = raw_input('Wh...
[ 0.04683834686875343, 0.4934397041797638, 0.33190640807151794, -0.2620603144168854, 0.0396331250667572, 0.0679607018828392, 0.47874903678894043, -0.051945094019174576, -0.09712125360965729, -0.4624430239200592, -0.32247647643089294, 0.526407778263092, -0.4541859030723572, -0.156381636857986...
Suppose I have a database table that has a timedate column of the last time it was updated or inserted. Which would be preferable: 1. Have a trigger update the field. 2. Have the program that's doing the insertion/update set the field. The first option seems to be the easiest since I don't even have to recompile to d...
[ 0.3574889600276947, -0.14612258970737457, -0.0021335105411708355, 0.024473166093230247, 0.12792213261127472, 0.02485383301973343, -0.21065136790275574, -0.35110053420066833, -0.20609763264656067, -0.4976654350757599, 0.10487080365419388, 0.5713949203491211, -0.19819463789463043, -0.2758861...
possible overhead of using triggers. If you could have other apps writing to this table in the future, via their own interfaces, I'd go with a trigger so you're not repeating that logic anywhere else. If your app is pretty much it, or any other apps would access the database through the same datalayer, then I'd avoid...
[ 0.3773481249809265, 0.06233595684170723, 0.2162064015865326, 0.356147825717926, 0.23675663769245148, 0.07151073962450027, -0.01833878457546234, 0.021286096423864365, -0.40977028012275696, -0.5853486657142639, 0.23365922272205353, 0.6046019196510315, -0.24960792064666748, -0.175877869129180...
triggers: Perhaps I was rash by calling them a nightmare. Like everything else, they are appropriate in moderation. If you use them for very simple things like this, I could get on board. It's when the trigger code gets complex (and expensive) that triggers start to cause lots of problems. They are a hidden tax on e...
[ 0.5755260586738586, 0.014392885379493237, -0.07235832512378693, 0.37158358097076416, -0.13351674377918243, -0.02919377014040947, 0.22428710758686066, -0.23127733170986176, -0.08375345915555954, -0.2193235158920288, 0.22647158801555634, 0.6245501041412354, -0.04461028799414635, 0.0351917110...
I am trying to add the following method to the Math class in Ruby on Rails: ``` class Math def self.round_with_precision(number, precision) scalar = 10.0 ** precision number = number * scalar number = number.round number = number / scalar return number; end end ``` I then added the following ...
[ 0.13874180614948273, 0.2365414947271347, -0.015095051378011703, -0.26815152168273926, -0.2151365578174591, -0.10221599042415619, 0.664792001247406, 0.01815890520811081, 0.17428085207939148, -0.6696414351463318, 0.32157889008522034, 0.7937929034233093, -0.37071719765663147, 0.04293120652437...
rename class to module.
[ 0.144107386469841, -0.35584473609924316, -0.1368638426065445, -0.2548710107803345, 0.020653437823057175, -0.08963146805763245, 0.41781550645828247, -0.0749606043100357, -0.23035573959350586, -0.6051846742630005, -0.5637387633323669, 0.08404762297868729, 0.14384320378303528, 0.3434166610240...
I have a value type that represents a gaussian distribution: ``` struct Gauss { double mean; double variance; } ``` I would like to perform an integral over a series of these values: ``` Gauss eulerIntegrate(double dt, Gauss iv, Gauss[] values) { Gauss r = iv; foreach (Gauss v in values) { r...
[ -0.02272229827940464, -0.07182713598012924, 0.3508742153644562, -0.28410136699676514, -0.3725745379924774, 0.29199278354644775, 0.1727047860622406, -0.49204567074775696, 0.023849064484238625, -0.4800012409687042, -0.0186137892305851, 0.36062851548194885, -0.35942867398262024, 0.09183038771...
for the help: ``` public static Gauss operator * (Gauss g, double d) { return new Gauss(g.mean * d, g.variance * d * d); } ``` However, addition eludes me. I assume I can just add the means; it's the variance that's causing me trouble. Either of these definitions seems "logical" to me. ``` public static Gauss o...
[ 0.0688282698392868, -0.25976333022117615, 0.4131031930446625, 0.09643746167421341, -0.31059765815734863, 0.055703721940517426, -0.0623457171022892, -0.3220910429954529, -0.06959671527147293, -0.35827040672302246, -0.29076799750328064, 0.4179333746433258, -0.5143925547599792, 0.235422834753...
Or this? (nope) //return new Gauss(mean, Math.Max(a.variance, b.variance)); // Or how about this? (nope) //return new Gauss(mean, (a.variance + b.variance)/2); } ``` Can anyone help define a statistically correct - or at least "reasonable" - version of the `+` operator? I suppose I could switch the code ...
[ 0.48573583364486694, -0.24948003888130188, 0.3137866258621216, 0.1495601087808609, -0.06338102370500565, 0.03621359169483185, 0.13167336583137512, -0.14328941702842712, -0.16504664719104767, -0.34483635425567627, 0.11971849948167801, 0.4006873071193695, -0.2734762132167816, 0.1858553439378...
are variances and not standard deviations. ``` // X + Y public static Gauss operator + (Gauss a, Gauss b) { //NOTE: this is valid if X,Y are independent normal random variables return new Gauss(a.mean + b.mean, a.variance + b.variance); } // X*b public static Gauss operator * (Gauss a, double b) { return ...
[ 0.06423363834619522, -0.5108727812767029, 0.30938103795051575, 0.1313048154115677, -0.43900972604751587, 0.1660473346710205, 0.008997039869427681, -0.37642842531204224, -0.06571464240550995, -0.3111838102340698, -0.2483793944120407, 0.3498091399669647, -0.749942421913147, 0.323295116424560...
What is the best way to discover what USB drives are connected, where they are mounted, and their unique details like Serial number, PID and which USB Hub port they are connected to? Something similar to what [USBlyzer](http://www.usblyzer.com/) does for Windows but programmatically. You can use Terminal and execute: ...
[ 0.2667909562587738, -0.26534178853034973, 0.4570501744747162, 0.30685970187187195, -0.0778483897447586, -0.3854607343673706, -0.25275686383247375, 0.25419870018959045, -0.3304477035999298, -0.6908989548683167, 0.06775479763746262, 0.5500468015670776, 0.04089612141251564, 0.0889307707548141...
I need to run a native program and retrieve the output in an Adobe AIR client side only application. I know that AIR does not allow access to native applications, so what is the best way to achieve this? I came across [this](http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=4&postId=111...
[ 0.21082092821598053, 0.20201806724071503, 0.19144241511821747, -0.09699627757072449, -0.2573988735675812, -0.08457991480827332, -0.028531739488244057, -0.2983355224132538, 0.26172080636024475, -0.6835930347442627, -0.05891231819987297, 0.6750699877738953, 0.027141626924276352, 0.1238447800...
you the developer with a > toolkit of commands to extend the > system capabilities of your AIR > application, features include, > controlling external applications, > opening external files, database > connectivity and control, system path > retrieval and screen capture > functionality. I believe that its cros...
[ 0.44323134422302246, 0.16653795540332794, 0.3418303430080414, 0.26759636402130127, -0.11822479218244553, -0.2951711416244507, -0.012972598895430565, -0.15911288559436798, 0.2956876754760742, -0.6852279901504517, -0.23124092817306519, 0.525879442691803, -0.2622526288032532, 0.12546576559543...
Does anyone know of a library to do fixed point arithmetic in Python? Or, does anyone has sample code? If you are interested in doing fixed point arithmetic, the Python Standard Library has a [decimal](http://docs.python.org/library/decimal.html) module that can do it. Actually, it has a more flexible floating point ...
[ 0.34090155363082886, -0.006882837507873774, -0.10411697626113892, 0.36159074306488037, -0.044584039598703384, 0.1038103774189949, -0.1705443114042282, 0.04387367144227028, -0.5067704916000366, -0.06822069734334946, 0.30071577429771423, 0.360810786485672, -0.033722735941410065, -0.355701625...
to set your own min and max values. All in all, it is handy for a [million household uses](http://www.skepticfiles.org/en001/monty16.htm).
[ 0.5666657090187073, -0.2802148163318634, 0.18331214785575867, 0.4194422662258148, 0.14603246748447418, -0.089049331843853, 0.331373929977417, -0.09119963645935059, -0.17521771788597107, -0.27688339352607727, 0.3968237340450287, 0.4643770456314087, 0.2847442924976349, -0.020034104585647583,...
So we decided to go with visual studio team foundation server for version control, etc. Getting ready to deploy today and read in installation guide: "You cannot install Team Foundation Server on a domain controller or a computer that is running other server products such as Exchange Server or Host Integration Server....
[ 0.1713939905166626, -0.2074107527732849, 0.27660509943962097, 0.10301589220762253, -0.26090699434280396, -0.305104523897171, 0.008036347106099129, -0.1899711787700653, -0.26452383399009705, -0.8095842599868774, -0.030856722965836525, 0.2739139497280121, -0.3022564947605133, -0.205346554517...
(mostly for simplicity). Can anyone verify that tfs has to be on a dedicated machine? If so, should I virtualize it and hang it off one of the front end machines? Thanks all... Performance is pretty important for TFS - check-ins, for example, should be pretty instantaneous or it can have a dramtic impact on developer ...
[ 0.4667952060699463, 0.0836094543337822, 0.3980666697025299, 0.2511158883571625, -0.0019617779180407524, -0.1881323605775833, 0.2835935354232788, 0.12727519869804382, -0.34619858860969543, -0.7561356425285339, -0.08462879061698914, 0.6481475234031677, 0.01650265045464039, 0.1554981023073196...
the stated hardware specs. One of the key things to remember, ALL data in TFS is stored in SQL server, so anything running on the same hardware that can affect SQL Server performance will affect TFS's performance. That is why it's important to have Build Server(s) distributed on another machine. Software builds are VE...
[ 0.625400722026825, 0.18076087534427643, 0.4068589210510254, 0.1657148003578186, 0.1314697116613388, -0.17704585194587708, -0.056374769657850266, -0.4081474840641022, -0.1821088194847107, -0.6014100909233093, -0.08455031365156174, 0.5833687782287598, -0.11891869455575943, 0.0398194603621959...
What is the best way to test the speed of a LAMP based site, without factoring in the user's connection? In other words, I have a CMS and I want to see how long it takes for PHP and MySQL to do all their work. Additionally I do not have shell access to the server, it is in a shared hosting environment. The best way i...
[ 0.6796145439147949, 0.05903339013457298, 0.42296358942985535, 0.0927557721734047, -0.0298482496291399, -0.19725699722766876, 0.04294891282916069, -0.08439800888299942, -0.2881426215171814, -0.574977457523346, 0.405830055475235, 0.5243632793426514, -0.1661263406276703, -0.11208213120698929,...
use this code to read the time value: ``` function curtime() { $tm = explode(' ', microtime()); return $tm[1] + $tm[0]; } ```
[ 0.16566911339759827, -0.30061379075050354, 0.2187376469373703, -0.15474353730678558, 0.5812050104141235, 0.10142946988344193, 0.07178425788879395, -0.3485824167728424, -0.008761223405599594, -0.2994120419025421, -0.1967686265707016, 0.7970649600028992, -0.414495587348938, 0.460677713155746...
For Example: Let's say that I want to return a **view** that displays a list of cars and also show a section of dealers in your area. These are two disjointed pieces of data. My **view** inherits a list of cars like the following: ``` public partial class CarLot : ViewPage<List<Cars>> { } ``` Now from the **contro...
[ 0.39989224076271057, 0.005411842372268438, 0.398690789937973, 0.18885134160518646, -0.0058556972071528435, 0.272760808467865, -0.2499099224805832, -0.2680094540119171, -0.27649986743927, -0.4531078636646271, 0.13547827303409576, 0.7716863751411438, 0.25048595666885376, 0.2893584072589874, ...
inheritance or am I going to have to hit the **model** again form the markup? I know it can be done that way, but am not sure if it is the best practice. Create a data transfer object ``` public class CarLotViewModel { public List<Car> Cars { get; set; } public List<Dealer> NearbyDealers { get; set; } } ```...
[ -0.019226117059588432, -0.2390136420726776, 0.3436371088027954, 0.27719563245773315, -0.010978270322084427, -0.04204846918582916, -0.06508157402276993, -0.5907529592514038, -0.10540642589330673, -0.6149160265922546, 0.10330761969089508, 1.039597749710083, -0.12935245037078857, 0.1836801916...
{ %> .... <% foreach (Dealer dealer in ViewData.Model.NearbyDealers) { %> ```
[ 0.13865481317043304, 0.30297303199768066, 0.27751991152763367, -0.22760650515556335, 0.40142297744750977, 0.18810325860977173, 0.07122503221035004, -0.09316251426935196, -0.12849657237529755, -0.6103072166442871, 0.11288363486528397, 0.6093674898147583, -0.07862376421689987, 0.458468645811...
I heard that on Windows you can login from a web browser to the web server without going through the usual login entering username and password but using instead the credentials from Windows directly, using the NTLM protocol. How is this achieved? Does the web server need to support some additional authentication? **...
[ 0.3517630994319916, 0.031159285455942154, 0.45202794671058655, 0.22810272872447968, -0.0561184324324131, -0.43196916580200195, 0.4623623192310333, -0.09901100397109985, -0.37418338656425476, -0.5854083299636841, -0.1530023068189621, 0.3779709041118622, 0.016039198264479637, 0.3333123922348...
IIS or Apache can be configured to do that. The browser also has to support this - at least IE does so (not sure about the others, it may be possible). *edit: looks like firefox has some support for this too, and safari on MacOS* *edit: for details on apache, google modules for NTLM authentication. Kerberos modules a...
[ 0.16611124575138092, -0.09630660712718964, 0.31944939494132996, 0.035259000957012177, -0.21869057416915894, -0.7075577974319458, 0.6593462824821472, -0.17600756883621216, -0.33413270115852356, -0.8257509469985962, -0.3456570506095886, 0.3009427785873413, -0.38456180691719055, -0.1657505333...
trusts will probably not exist. It's also a bit trickier to make work if the apache server is on UNIX, and especially if you also have Kerberos servers on UNIX in the mix, but still possible.*
[ 0.9118945598602295, 0.00046894000843167305, 0.3844650387763977, 0.3323410749435425, 0.0861300453543663, -0.39610978960990906, 0.6754180788993835, -0.16724565625190735, 0.0696893259882927, -0.26240724325180054, 0.3467472791671753, 0.5542432069778442, -0.028451038524508476, -0.03966337442398...
I am struggling a bit to figure this one out. I'm working on an ASP.NET MVC project, using LINQ to SQL for my data layer. The database consists of 10 or so different "exceptions" tables, e.g. "Exceptions.LADM", "Exceptions.USB", "Exceptions.GPO". Basically these tables are tracking user+machine information for relaxa...
[ 0.18994449079036713, 0.2584497630596161, 0.2467590570449829, 0.4251011908054352, -0.009529518894851208, -0.08489701896905899, -0.17178338766098022, -0.34313318133354187, -0.539588212966919, -0.5666559934616089, 0.3745381236076355, 0.10820022970438004, -0.25568994879722595, 0.16226220130920...
this: ``` // Example Request: /Exceptions/List/ladm // Routing: Controller = "Exceptions", Action = "List", type = "ladm" // Controller Action: public ActionResult List(string type) { string viewname = "List-" + type; // refer to "List-ladm" view. if(type == "ladm") { var items = _repository...
[ -0.2829138934612274, -0.3694164752960205, 0.6159868240356445, -0.07621119171380997, -0.0636233538389206, -0.027489887550473213, 0.10992389917373657, -0.48548424243927, -0.48482149839401245, -0.5447245836257935, -0.1730685979127884, 0.4555858075618744, -0.20298872888088226, 0.18467174470424...
think of. May be I'm approaching it from incorrect angle. Any suggestions would be welcomed. Thanks. You could try dynamic method dispatching by using reflection (it's pretty costly, performance-wise): ``` object items = _repository.GetType().GetMethod("ListAll"+type+"Exceptions") .Invoke(_...
[ -0.022543637081980705, -0.17895042896270752, 0.4475473463535309, -0.16541768610477448, 0.09286792576313019, 0.08548180013895035, 0.4556771516799927, -0.32828906178474426, -0.15923897922039032, -0.7283226847648621, -0.31941330432891846, 0.7925828099250793, -0.2509596049785614, 0.12286839634...
In domain driven design, it appears to be a good practice to use Factories to create your domain objects in your domain layer (as opposed to using a direct constructor or IoC). But what about using the domain object factories in a presenter layer. For instance, say that I was creating a domain object from user input ...
[ 0.2625200152397156, -0.14735962450504303, 0.39254051446914673, 0.26405301690101624, -0.22116155922412872, 0.047804612666368484, -0.04781971126794815, -0.045297957956790924, -0.2824084758758545, -0.4655492603778839, 0.2767864763736725, 0.18913321197032928, -0.13620750606060028, 0.5482600927...
layer, rather than the presenter layer, I would have to pass each of these decimal values as function parameters. Creating an unwieldy function definition and call. ie ConfigurationService.CreateConfiguration(temperature, ...(x20), gravity); The perhaps better solution would be to create the Configuration object in t...
[ 0.09059074521064758, -0.10379815846681595, 0.7713786363601685, -0.01242175791412592, -0.0028776538092643023, 0.05071026086807251, 0.12092823535203934, -0.019000060856342316, -0.16190950572490692, -0.7853536009788513, -0.2787379026412964, 0.14209304749965668, -0.14424292743206024, 0.2610559...
why? Thanks! I'd advise against letting your domain objects out of the domain layer and into the presentation layer. Keep the presentation layer focused on presentation. For this reason, I construct Data Transfer Objects to shuffle data to and from the domain and presentation layers. In your case, have the dialog pop...
[ 0.4172830581665039, -0.02493399567902088, 0.40451163053512573, 0.12965181469917297, -0.027959758415818214, -0.08730535209178925, 0.08673998713493347, 0.0890311449766159, -0.3613572418689728, -0.6861744523048401, -0.2457553744316101, 0.3092481195926666, -0.3368147015571594, 0.19485050439834...
you a partial domain object. You'd probably want to maintain a light-weight cache that held the full domain object so you could do a proper update. Essentially, you'd arrive at the DTO solution if you applied the [Introduce Parameter Object](http://www.refactoring.com/catalog/introduceParameterObject.html) refactoring...
[ 0.08443468809127808, -0.3448125422000885, 0.31236517429351807, 0.2155805379152298, -0.2993408441543579, -0.10665807873010635, 0.09602181613445282, -0.031449250876903534, -0.21038834750652313, -0.6186717748641968, 0.14289537072181702, 0.2745632529258728, -0.4434853792190552, 0.2130866795778...
currently writes an application to connect to the device "BTLink Bluetooth to Serial Adapter" More information about device: [device specification](http://cgi.ebay.pl/Bluetooth-to-RS232-Serial-Adapter-Dongle-100m-UK_W0QQitemZ300266522534QQcmdZViewItem?hash=item300266522534&_trkparms=72%3A1399|39%3A1|66%3A2|65%3A12|240...
[ -0.004759333562105894, 0.360496461391449, 0.727412760257721, -0.13421860337257385, 0.019161460921168327, -0.21099866926670074, 0.7522392272949219, -0.36368829011917114, -0.005923026241362095, -0.6573612689971924, -0.31235241889953613, 0.5262689590454102, -0.5284177660942078, 0.459731251001...
objects out of the domain layer and into the presentation layer. Keep the presentation layer focused on presentation. For this reason, I construct Data Transfer Objects to shuffle data to and from the domain and presentation layers. In your case, have the dialog populate a DTO that is passed to your service and transl...
[ 0.20871058106422424, -0.13470914959907532, 0.4800601005554199, 0.10244786739349365, -0.0942772924900055, 0.06830345094203949, 0.005214264616370201, -0.0478338822722435, -0.3159632980823517, -0.7900111675262451, -0.29567790031433105, 0.24969346821308136, -0.4212252199649811, 0.3686721622943...
probably want to maintain a light-weight cache that held the full domain object so you could do a proper update. Essentially, you'd arrive at the DTO solution if you applied the [Introduce Parameter Object](http://www.refactoring.com/catalog/introduceParameterObject.html) refactoring.
[ 0.09147591888904572, -0.32387775182724, 0.3355858325958252, 0.16727857291698456, -0.17435526847839355, -0.26565611362457275, 0.22005879878997803, -0.031394653022289276, -0.20133988559246063, -0.6372240781784058, 0.24559606611728668, 0.2981167435646057, -0.28536456823349, 0.0333177298307418...
I'm using SQL Server 2008. My database is almost 2GB in size. 90% of it is one table (as per sp\_spaceused), that I need don't for most of my work. I was wondering if it was possible to take this table, and have it backed up in a separate file, allowing me to transfer the important data on a more frequent basis than ...
[ 0.012841298244893551, 0.3525724709033966, 0.33937543630599976, -0.058093778789043427, -0.0037106506060808897, -0.08803848177194595, 0.0003157519386149943, 0.08414790034294128, -0.5177791714668274, -0.7303587198257446, 0.26219263672828674, 0.31547656655311584, -0.2508484125137329, 0.3931286...
view pointing to the other database and use that view in my applications. However, I was wondering if you had any pointers to different strategies that I may not be aware of at this point. Create the table in a different **FileGroup**. [Here's a link with some good examples.](http://www.mssqltips.com/tip.asp?tip=11...
[ 0.13917118310928345, -0.027581902220845222, 0.531944215297699, 0.26996755599975586, -0.21377424895763397, 0.06873490661382675, -0.1252387911081314, -0.19012194871902466, -0.4995254874229431, -0.7392643690109253, 0.40044105052948, 0.44287624955177307, -0.2642819881439209, 0.1698003560304641...
methods of dividing large tables across multiple files.
[ -0.14348112046718597, 0.005987275391817093, -0.10550928115844727, 0.10346316546201706, 0.2642035186290741, 0.13181853294372559, -0.4283894896507263, -0.47055676579475403, -0.5382330417633057, -0.6796472668647766, -0.17241695523262024, -0.11886727809906006, -0.19139450788497925, -0.13218952...
I'm just learning ruby and trying to understand the scope of code executed in blocks. For example, I want to be able to create a block that affects the method that it is attached to, like so: ``` def test(&block) block.call() if block_given? puts "in test, foo is #{foo}" puts "in test, bar is #{bar}" end test()...
[ 0.5665414929389954, 0.3136439025402069, 0.026811793446540833, -0.3013991713523865, -0.16463221609592438, -0.16951701045036316, 0.4994218349456787, -0.3674774169921875, 0.10045177489519119, -0.5387377142906189, -0.00009969396342057735, 0.36680227518081665, -0.3765670955181122, 0.06938377022...
'test' method in the above example*, is it possible to access the variables defined in the block? Again, the goal is to leave the block unmodified, but be able to access the created variables from within 'test' after the block executes. First of all, `block.call()` is done with `yield`, and you don't need the `&block`...
[ 0.2126278132200241, -0.21412046253681183, -0.16635018587112427, 0.3577268123626709, -0.08489854633808136, -0.1851648986339569, 0.44209805130958557, -0.27797573804855347, 0.09805405884981155, -0.6046335101127625, -0.2177581787109375, 0.47594237327575684, -0.170429527759552, 0.15467764437198...
is this: ``` def test() foo = yield if block_given? puts "in test, foo is #{foo}" end test() { foo="this is foo" } ``` But that's only a side effect because `foo` is "returned" by the block. If you instead do this: ``` def test() foo = yield if block_given? puts "in test, foo is #{foo}" end test() { f...
[ 0.37221595644950867, 0.09903165698051453, -0.009677830152213573, -0.2957603931427002, -0.2082023024559021, -0.14893707633018494, 0.6000687479972839, -0.7477284073829651, 0.09559015184640884, -0.4889228045940399, -0.14096130430698395, 0.528098464012146, -0.042516179382801056, 0.137468189001...
test" test() { foo = "after test" "ha ha, no foo for you" } ``` That would kind of work, but it breaks if you remove `foo = "before test"` because `foo` becomes a local variable in the block and does not exist in the binding. Summary: you can't access local variables from a block, just the locals where the block...
[ 0.4209815263748169, -0.02560609020292759, -0.007129095960408449, -0.0014581062132492661, 0.10744748264551163, -0.22598300874233246, 0.5846995711326599, -0.22526995837688446, 0.1385398954153061, -0.4844289720058441, -0.1532106250524521, 0.45180127024650574, -0.3397318720817566, 0.1917936205...
from the local in the block (I didn't know this, thanks).
[ 0.4425738453865051, 0.06445491313934326, 0.026507051661610603, -0.3554845154285431, -0.17674042284488678, -0.026256877928972244, 0.16366706788539886, 0.21394705772399902, -0.1942109614610672, -0.09288199245929718, -0.08523952215909958, 0.4026082754135132, 0.23014749586582184, -0.1450749933...