text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
wsConn.Dispose() wsConn = Nothing End If wsConn = New Wisys.AllSystem.ConnectionInfo
[ 0.006167308893054724, -0.5344270467758179, 0.31967267394065857, -0.02314256876707077, 0.22410821914672852, -0.7233736515045166, 0.2083560824394226, -0.055921461433172226, -0.44480979442596436, -0.703811764717102, -0.29319310188293457, 0.14814652502536774, -0.4393531382083893, 0.47899201512...
OpenWiSysConn(partDepotDbName, partDepotDbServer, True) If Not poNum = "" Then 'for first run don't Dispose it; already equal to nothing If Not IsNothing(wsPartDepotSalesOrd) Then wsPartDepotSalesOrd.Dispose()
[ 0.08204858005046844, -0.35706591606140137, 0.5471361875534058, -0.0668247789144516, 0.16338318586349487, -0.3149586021900177, 0.4669260084629059, -0.48405033349990845, -0.16909968852996826, -0.43878811597824097, -0.2346576452255249, 0.3949355185031891, -0.2772296667098999, 0.28456017374992...
wsPartDepotSalesOrd = Nothing End If wsPartDepotSalesOrd = New Wisys.Oe.OrderEntryTables
[ -0.06078074499964714, -0.2456873208284378, 0.5541827082633972, -0.03283205255866051, -0.1506779044866562, -0.3299081027507782, 0.35396772623062134, -0.2452969253063202, -0.4786604642868042, -0.6081916093826294, -0.35082149505615234, 0.13613422214984894, -0.4376872777938843, 0.4778091907501...
wsPartDepotSalesOrd.Connection(wsConn, errMsg) With wsPartDepotSalesOrd.OrderHeader .UserName = My.User.Name .Ship_to_name = If(IsDBNull(dr("cmp_name")), "", dr("cmp_name"))
[ -0.44052261114120483, 0.0882405936717987, 0.8056933283805847, -0.011839805170893669, 0.0775710716843605, 0.24454954266548157, 0.04434957727789879, -0.11618766188621521, -0.6185176372528076, -0.5775567293167114, -0.20520450174808502, 0.182736337184906, -0.028614591807127, 0.4956239461898803...
.Ship_to_addr_1 = If(IsDBNull(dr("cmp_fadd1")), "", dr("cmp_fadd1")) .Ship_to_addr_2 = If(IsDBNull(dr("cmp_fadd2")), "", dr("cmp_fadd2")) .Ship_to_addr_3 = If(IsDBNull(dr("cmp_fadd3")), "", dr("cmp_fadd3"))
[ -0.6987228989601135, 0.10737191885709763, 0.9041798114776611, -0.1907641738653183, -0.3694261610507965, 0.5768157839775085, 0.009272062219679356, -0.5873387455940247, -0.5512365698814392, -0.49543267488479614, -0.4257124364376068, 0.41708076000213623, -0.09434974193572998, 0.07285010814666...
.Ship_to_addr_4 = If(IsDBNull(dr("cmp_fcity")), "", dr("cmp_fcity")) & " , " & _ If(IsDBNull(dr("StateCode")), "", dr("StateCode")) .Ship_to_country = If(IsDBNull(dr("cmp_fcounty")), "", dr("cmp_fcounty"))
[ -0.3900946080684662, -0.19103215634822845, 0.8940558433532715, 0.34574106335639954, 0.3699756860733032, 0.29552575945854187, 0.22887137532234192, -0.21215178072452545, -0.6333144307136536, -0.38711750507354736, -0.3657588064670563, 0.19102893769741058, -0.21239914000034332, 0.0667505338788...
.Oe_po_no = dr("ord_no") End With ''//wsPartDepotSalesOrd.OrderHeader.Status 'readonly errNum = wsPartDepotSalesOrd.OrderHeader.Insert(TrxEnums.OeOrderTypeEnum.Order, "", billToCompany, "", dr("ord_dt"), errMsg)
[ -0.20546402037143707, 0.11884349584579468, 0.5359304547309875, -0.11231593042612076, 0.21106775104999542, 0.3522203266620636, 0.08719849586486816, -0.04662907496094704, -0.38441842794418335, -0.5915154218673706, -0.5464988946914673, 0.11984220147132874, -0.06898490339517593, 0.233880117535...
If errNum <> 0 Then Console.WriteLine("Error Creating OE header:" & errMsg) Else
[ -0.5805107951164246, 0.06577127426862717, 0.36387088894844055, -0.2707705795764923, 0.3665182292461395, 0.078449547290802, 0.473179429769516, 0.054420363157987595, 0.21132227778434753, -0.7592407464981079, -0.2998395264148712, 0.5571290254592896, -0.17636559903621674, -0.11387144774198532,...
Console.WriteLine("Created OE#" & wsPartDepotSalesOrd.OrderHeader.Ord_no) End If End If poNum = dr("ord_no") ''//if
[ -0.3364751636981964, -0.0474037267267704, 0.6120520830154419, -0.05915350839495659, 0.40983086824417114, 0.15918663144111633, 0.02754184603691101, 0.07510801404714584, 0.09283359348773956, -0.7009238004684448, -0.2655261158943176, 0.4518866539001465, -0.05160747095942497, 0.437010735273361...
error then skip to the next loop iteration until the next PO # and it gets inserted ok If errNum <> 0 Then Continue For End If
[ -0.08061408996582031, -0.09154815971851349, 0.4056369662284851, -0.11586342006921768, 0.052366532385349274, 0.3604288399219513, 0.4979541599750519, 0.03543052449822426, -0.12686513364315033, -0.5373889207839966, -0.048992350697517395, 0.3232235610485077, -0.13673682510852814, 0.11745263636...
lineNum = If(IsDBNull(dr("line_no")), Now(), dr("line_no")) itemNum = dr("item_no").ToString qtyOrd = If(IsDBNull(dr("qty_ordered")), 0, CDbl(dr("qty_ordered"))) requestDate = If(IsDBNull(dr("request_dt")), Now(), dr("request_dt"))
[ -0.05104682222008705, -0.7292507290840149, 0.8443145155906677, -0.21481771767139435, -0.009768008254468441, 0.2781416177749634, 0.06303278356790543, -0.5380703210830688, -0.12451142072677612, -0.5746610164642334, -0.2515474259853363, 0.16740494966506958, -0.06961950659751892, 0.08754197508...
promiseDate = If(IsDBNull(dr("promise_dt")), Now(), dr("promise_dt")) itemPrice = If(IsDBNull(dr("price")), 0, dr("price")) If itemNum.Length > 0 And qtyOrd <> 0 Then CreateLine(wsPartDepotSalesOrd, itemNum, qtyOrd, 0, requestDate, requestDate, promiseDat...
[ 0.3741097152233124, -0.659164309501648, 0.6591395735740662, -0.04542645439505577, 0.07446272671222687, 0.29821181297302246, 0.2897453308105469, -0.4044446647167206, 0.40321215987205505, -0.6773899793624878, -0.03980280086398125, 0.7120971083641052, 0.10291583091020584, 0.20515814423561096,...
''//mark as processed, even if above fails. any lines that fail will be added to SO in parts depot by hand. markPoLineAsProcessed(dbName, dbServer, poNum, lineNum) End If Next
[ 0.29722660779953003, -0.10431911796331406, 0.6893815994262695, -0.07260645925998688, 0.10195118188858032, 0.4656548798084259, 0.249208465218544, -0.13192547857761383, -0.05746475234627724, -0.6827510595321655, -0.38055601716041565, 0.01653730683028698, 0.17813725769519806, 0.21820551156997...
poNum = "" i = +1 If Not IsNothing(wsConn) Then wsConn.CloseWisysConnection(TrxEnums.TransactionAction.Commit, errMsg) wsConn.Dispose()
[ -0.28866466879844666, -0.1327405422925949, 0.3864153027534485, -0.2964397370815277, 0.39568763971328735, -0.05678350105881691, -0.1244039237499237, -0.410970002412796, -0.2143668681383133, -0.49457061290740967, -0.27159053087234497, 0.24327729642391205, -0.2826106548309326, 0.1123698502779...
End If If Not IsNothing(wsPartDepotSalesOrd) Then wsPartDepotSalesOrd.Dispose() wsConn = Nothing wsPartDepotSalesOrd = Nothing Next Console.WriteLine("DONE") Catch ex
[ 0.05103517323732376, -0.2395399510860443, 0.5657433867454529, -0.2105625867843628, 0.3688226342201233, -0.4654424786567688, 0.28361713886260986, -0.444277286529541, -0.013832028955221176, -0.4982879161834717, -0.343129962682724, 0.38082820177078247, -0.08749636262655258, 0.3278745114803314...
As Exception Console.WriteLine("Exception processing part depot: " & ex.Message) Finally Try ''//cleanup If Not IsNothing(wsPartDepotSalesOrd) Then wsPartDepotSalesOrd.Dispose()
[ 0.0983377993106842, -0.24816572666168213, 0.3444901406764984, -0.16809040307998657, 0.19253842532634735, -0.1883409321308136, 0.4740922451019287, -0.40135762095451355, -0.2937033772468567, -0.6149601936340332, -0.23969991505146027, 0.29689711332321167, -0.2532898485660553, 0.13618361949920...
wsPartDepotSalesOrd = Nothing End If If Not IsNothing(wsConn) Then wsConn.CloseWisysConnection(TrxEnums.TransactionAction.Commit, errMsg) wsConn.Dispose()
[ -0.11207957565784454, -0.22396419942378998, 0.4805603623390198, -0.1938890963792801, 0.16969597339630127, -0.3703133165836334, 0.12036498636007309, -0.440937876701355, -0.32955309748649597, -0.46310657262802124, -0.24017374217510223, 0.2603153884410858, -0.41293954849243164, 0.217418432235...
wsConn = Nothing End If Catch ex As Exception Console.WriteLine("Exception exiting part depot: " & ex.Message) End Try End Try End Function
[ -0.16009341180324554, -0.39408960938453674, 0.47578006982803345, -0.2555815279483795, 0.25504225492477417, -0.3640202283859253, 0.701570451259613, -0.13434626162052155, 0.08855300396680832, -0.25525766611099243, -0.43206852674484253, 0.3995107114315033, -0.12728549540042877, 0.168248742818...
Private Function GetCustomer(ByVal CustomerNum As String, ByVal db As String, ByVal server As String) As DataTable Dim cn As New SqlClient.SqlConnection Dim cmd As New SqlClient.SqlCommand Dim da As New SqlClient.SqlDataAdapter Dim ds As New DataSet Try cn.ConnectionS...
[ -0.3143745958805084, -0.3880040645599365, 0.6307694315910339, 0.17407658696174622, -0.219989612698555, 0.2935717701911926, 0.263500839471817, -0.1382475197315216, -0.2464861422777176, -0.15625964105129242, -0.3301733136177063, 0.7157204151153564, -0.5278050899505615, 0.37326908111572266, ...
cn.Open() cmd = cn.CreateCommand cmd.Parameters.Add(New SqlClient.SqlParameter("@cusnum", CustomerNum)) cmd.CommandText = "select cmp_name,cmp_fadd1,coalesce(debnr,crdnr) as CusNum from dbo.cicmpy where ltrim(debnr) = @cusnum or ltrim(crdnr) = @cusnum" cmd.CommandType = C...
[ -0.33715975284576416, 0.0039779674261808395, 0.8964030742645264, 0.06342822313308716, -0.14772076904773712, 0.21851420402526855, -0.17246796190738678, -0.09538035839796066, -0.47182223200798035, -0.43928229808807373, -0.40732890367507935, 0.35445573925971985, -0.18595749139785767, 0.473636...
da.Fill(ds) If ds.Tables.Count > 0 Then Return ds.Tables(0) End If Return Nothing Finally If Not IsNothing(cmd) Then cmd.Dispose() If Not
[ -0.1753043681383133, -0.6714975833892822, 0.6731945872306824, -0.03013293258845806, -0.06803642958402634, -0.06458356231451035, 0.07651758939027786, -0.27387911081314087, -0.18939654529094696, -0.7763216495513916, -0.2964860498905182, 0.36498621106147766, -0.13144157826900482, 0.3834646344...
IsNothing(cn) Then cn.Dispose() If Not IsNothing(da) Then da.Dispose() End Try End Function Private Function GetPoDataset(ByVal db As String, ByVal server As String) As DataSet Dim cn As New SqlClient.SqlConnection Dim ds As New DataSet Dim dsa As New SqlClient.SqlDa...
[ -0.3081994652748108, -0.4156540632247925, 0.6688187122344971, -0.051089994609355927, -0.40460848808288574, 0.1572754979133606, -0.057742685079574585, -0.33318030834198, -0.09770293533802032, -0.33327335119247437, -0.1469438374042511, 0.20895375311374664, -0.437546044588089, 0.3343169391155...
Try Static Dim SQL As String = ConfigurationManager.AppSettings("getPoforPartsDepotSQL") cn.ConnectionString = "Persist Security Info=False;Integrated Security=true;Initial Catalog=" & db & ";server=" & server cn.Open() cmd.Connection = cn cmd.CommandType = Co...
[ -0.14775754511356354, -0.2246560901403427, 0.5546554327011108, -0.081728994846344, 0.1906321793794632, 0.13030126690864563, 0.5135015249252319, -0.0947679728269577, -0.2237158715724945, -0.31971806287765503, -0.20334701240062714, 0.4478576183319092, -0.4589480459690094, 0.09466240555047989...
dsa.SelectCommand = cmd dsa.Fill(ds) Return ds Catch Throw Finally If Not IsNothing(ds) Then ds.Dispose() If Not IsNothing(cmd) Then cmd.Dispose()
[ -0.17363496124744415, -0.800018310546875, 0.03980057314038277, -0.11035740375518799, -0.12325539439916611, -0.12798966467380524, 0.18282483518123627, -0.5230435729026794, -0.09702713787555695, -0.4973071813583374, -0.33397236466407776, 0.3219861686229706, -0.32585859298706055, 0.3731673061...
If Not IsNothing(cn) Then cn.Close() If Not IsNothing(cn) Then cn.Dispose() End Try End Function Private Function OpenWiSysConn(ByVal dbName As String, ByVal dbServer As String, ByVal useTran As Boolean) As Boolean Try Dim errMsg As String = ""
[ -0.10629017651081085, 0.020287930965423584, 0.638938844203949, -0.37094584107398987, 0.14510568976402283, -0.003723716363310814, -0.027860423550009727, -0.15114307403564453, 0.07453994452953339, -0.28961941599845886, -0.26439931988716125, 0.5269147753715515, -0.3755595088005066, 0.21554565...
wsConn.Parameters(dbServer, dbName, "MacMSS") If wsConn.OpenWisysConnection(useTran, errMsg) <> 0 Then Console.WriteLine("Error processing part depot: " & errMsg) Return False End If Return True Catch
[ -0.16102464497089386, -0.16541606187820435, 0.3140515387058258, -0.08713724464178085, 0.33201298117637634, 0.04080033302307129, 0.5616213083267212, -0.1646728664636612, -0.008540862239897251, -0.5163548588752747, -0.2829941511154175, 0.4941399395465851, -0.2597064971923828, 0.2158264368772...
Throw End Try End Function Private Function CreateLine(ByVal p_oOEObj As Wisys.Oe.OrderEntryTables, ByVal partNum As String, ByVal qtyOrdered As Double, ByVal qtyToShip As Double, ByVal RequestDate As Date, ByVal RequestShipDate As Date, ByVal PromiseDate As Date, ByVal price As Double, ByVal PONum As ...
[ -0.09828928112983704, -0.028893819078803062, 0.41093751788139343, -0.4051401615142822, -0.04138045758008957, 0.342406690120697, 0.5385140180587769, -0.36930325627326965, 0.17936518788337708, -0.0708707645535469, -0.3536488115787506, 0.36113110184669495, 0.055201075971126556, 0.260460317134...
Dim p_lRtnLineNumber As Long With p_oOEObj ''//p_lRtnVal = .OrderHeader.Read(TrxEnums.OeOrderTypeEnum.Order, p_sRtnOrder, True, True, True, p_bRtnRecFound, p_sRtnErrMsg) OeLine = .OrderHeader.OrderLines.Add(TrxEnums.OrderLineType.InventoryItem, partNum.ToUpper, "", qtyOrdered, qtyToShi...
[ -0.1806243360042572, -0.3541097640991211, 1.0938739776611328, -0.2334069311618805, 0.08668289333581924, 0.5085045695304871, 0.18400666117668152, -0.2812804579734802, 0.09947273135185242, -0.44103115797042847, -0.33620116114616394, 0.8521398305892944, -0.008543716743588448, 0.14294685423374...
Return True End If Console.WriteLine("Error creating sales order line# " & p_lRtnLineNumber & ": " & p_sRtnErrMsg) sendBadPOLineEmailtoDepot("Error creating sales order line for PO# " & PONum & " becuase of an error: " & p_sRtnErrMsg) Return False End With
[ -0.3480174243450165, 0.0329931378364563, 0.6176869869232178, -0.15076665580272675, -0.013174635358154774, 0.29809901118278503, 0.4239364266395569, -0.22223718464374542, 0.2146099954843521, -0.25830328464508057, -0.5909339189529419, 0.7004633545875549, 0.01555137149989605, 0.130740612745285...
End Function Private Function markPoLineAsProcessed(ByVal DB As String, ByVal server As String, ByVal poOrdNum As String, ByVal poLineNum As String) As Boolean Dim cn As New SqlClient.SqlConnection Dim cmd As New SqlClient.SqlCommand Try Static Dim SQL As String = ConfigurationM...
[ -0.3047919273376465, -0.05751586705446243, 0.8568642139434814, -0.0791993960738182, 0.06367810815572739, 0.33423173427581787, 0.271171510219574, -0.11747793108224869, -0.19441372156143188, 0.014915908686816692, -0.31292521953582764, 0.5319287180900574, -0.2823996841907501, 0.41833740472793...
server & ";" cn.Open() cmd.Connection = cn cmd.Parameters.Add(New SqlClient.SqlParameter("@poOrdNum", poOrdNum)) cmd.Parameters.Add(New SqlClient.SqlParameter("@poLineNum", poLineNum)) cmd.CommandType = CommandType.Text cmd.CommandText = SQL ...
[ -0.33215025067329407, -0.060995154082775116, 0.7716367840766907, 0.10698617994785309, 0.033944107592105865, 0.5148898363113403, 0.21047241985797882, 0.0677444338798523, -0.42022183537483215, -0.5545136332511902, -0.08166037499904633, 0.3556843400001526, -0.2804468870162964, 0.3816812932491...
Return True Catch Throw Finally If Not IsNothing(cmd) Then cmd.Dispose() If Not IsNothing(cn) Then cn.Dispose() End Try End Function Private Function sendBadPOLineEmailtoDepot(ByVal msgText As String) As Boolean
[ 0.09552110731601715, -0.32927370071411133, 0.16181069612503052, -0.12188267707824707, -0.2362244427204132, -0.09505163133144379, 0.21432176232337952, -0.25255000591278076, -0.05671851709485054, -0.0806455984711647, -0.10025256872177124, 0.42750540375709534, -0.24451421201229095, 0.15280035...
Try If ConfigurationManager.AppSettings("EnableSentBadPOMail").ToLower <> "true" Then Return True Dim sMailServer As String = ConfigurationManager.AppSettings("MailServer") Dim mySmtpClient As New System.Net.Mail.SmtpClient(sMailServer) mySmtpClient.UseDefaultCredentials ...
[ 0.13705149292945862, -0.4433404505252838, 0.6523540019989014, -0.007833599112927914, 0.2505485415458679, 0.017715176567435265, 0.7276816964149475, -0.3599903881549835, -0.026851540431380272, -0.7237260937690735, -0.3228380084037781, 0.6116882562637329, -0.2752259075641632, 0.11801701039075...
Dim sFrom As String = ConfigurationManager.AppSettings("BadPOMailFrom") mySmtpClient.Send(sFrom, sTo, msgText, msgText) Return True Catch ex As Exception Console.WriteLine("Exception sending sending bad PO line e-mail to depot: " & ex.Message) Return False ...
[ 0.15971742570400238, -0.3127152621746063, 0.570547878742218, -0.2594578266143799, -0.0033486189786344767, 0.11535614728927612, 0.46342965960502625, -0.2872825264930725, -0.10157323628664017, -0.17211107909679413, -0.1985086053609848, 0.5246313810348511, -0.534536600112915, -0.0895500630140...
End Function End Class ``` Update: I don't want the output to be overwritten, I want it appended. Thus the >> and not > Update: The outlooks the same in the console window, ie. if not redirected to a file. This is the application outputing to this file and only one runs at a time. There doesn't appear to be any b...
[ 0.010425382293760777, 0.09294691681861877, 0.6664325594902039, -0.24859008193016052, -0.06295593827962875, -0.1110256090760231, 0.3488808572292328, 0.30485010147094727, 0.1741260588169098, -0.8127455115318298, -0.055842891335487366, 0.7368179559707642, -0.19446627795696259, 0.0985149145126...
I have updated the code snippet above. Update: I have been running the process "by hand" at my client so I'm sure only one was running. The ProcessPartDepotOrders() is simply called once from sub main(), so I can't see there being any threading issues. Links are inline elements, so setting text-align center on them w...
[ 0.24719375371932983, -0.11901327222585678, 0.7458871006965637, -0.004903544206172228, -0.03581899777054787, -0.10691843926906586, 0.2350252866744995, 0.037546586245298386, -0.295637309551239, -0.9114106893539429, 0.026263386011123657, 0.4252368211746216, -0.03845128417015076, 0.33673062920...
I've read conflicting opinions as to whether every BeginInvoke() has to be matched by an EndInvoke(). Are there any leaks or other problems associated with NOT calling EndInvoke()? Delegate.EndInvoke is documented as a *thou shalt call this* (i.e. necessary - else leaks happen) - from [msdn](http://msdn.microsoft.com/e...
[ 0.09265994280576706, -0.002469161059707403, 0.30420631170272827, 0.16856275498867035, 0.16944070160388947, -0.4240649938583374, 0.5214159488677979, -0.48030441999435425, 0.001343061332590878, -0.599138081073761, -0.2647498548030853, 0.7009866237640381, -0.11279428005218506, -0.010344485752...
using `Delegate.BeginInvoke` and don't want the result, consider using `ThreadPool.QueueUserWorkItem` instead - it'll make life a lot easier, and avoid the pain of `IAsyncResult` etc.
[ 0.2944908142089844, -0.24027182161808014, -0.06007899343967438, 0.14240966737270355, 0.02017159014940262, -0.27559152245521545, 0.29608312249183655, 0.11747463047504425, -0.3088395297527313, -0.676631510257721, 0.17918725311756134, 0.28219929337501526, -0.327696830034256, 0.343536525964736...
Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#? I need a browser independent way of logging visited URLs. You may want to use existing network interfaces capturing libraries like pcap or winpcap to do so. Rewriting all the necessary stuff by yourself would be quite time expens...
[ 0.4090586304664612, -0.12884628772735596, 0.3257821202278137, 0.3947068750858307, -0.18964770436286926, -0.3690487742424011, 0.1589082032442093, 0.05855327844619751, -0.367969274520874, -0.49409353733062744, -0.00607039500027895, 0.5513772964477539, -0.317111998796463, -0.14465712010860443...
My current project is an internal web application built using ASP.Net MVC which I am adding authentication to. I have a pre-built HTTPModule which creates a IPrincipal with the appropriate roles. If the user isn't authenticated I get a user object with the role "Public" As this is an internal application most of the p...
[ -0.02464352361857891, 0.022274790331721306, 0.4736895263195038, 0.2821658253669739, -0.03682571277022362, -0.09029418975114822, 0.17292127013206482, -0.2402963936328888, -0.31119927763938904, -0.6938737630844116, -0.0775437280535698, 0.22162307798862457, -0.2918519377708435, 0.254624366760...
attribute them like so: ``` [Authorize(Roles="Public")] public class LoginController : MyController { public ActionResult Index() { } } ``` The page fails to load as the user isn't authenticated. It would seem the Role of "Public is being ignored on the inherited class. Does anyone know if the roles can...
[ -0.1438632309436798, 0.12685845792293549, 0.48888659477233887, 0.2497037798166275, 0.035753555595874786, -0.21742968261241913, 0.26617321372032166, -0.25858327746391296, -0.054092515259981155, -0.5561037063598633, -0.19514170289039612, 0.5713262557983398, -0.38087934255599976, 0.2239047735...
Controller { ... } [Authorize(Roles="Admin")] public abstract class AdminControllerBase : MyControllerBase { .... } ``` Now any controllers that require authentication can derive from AdminControllerBase while my public controllers can derive from MyControllerBase. OO to the rescue.
[ -0.258807510137558, -0.011537091806530952, 0.5660538673400879, 0.4247000813484192, 0.23844093084335327, -0.43869590759277344, 0.03069351054728031, -0.17496386170387268, 0.08045562356710434, -0.5109590888023376, -0.21833084523677826, 0.49789729714393616, -0.3203887641429901, 0.4330126345157...
In my current Ruby on Rails view we have many views and partials. So many in fact that it's not clear which view uses which partial (which itself may use other partials as well). The question is if there's a tool out there that generates a dependency graph of all views and partials (ideally generating a graph, but tha...
[ 0.4448460638523102, 0.033321429044008255, 0.05408575013279915, -0.009223636239767075, -0.28873229026794434, 0.28637462854385376, 0.41195088624954224, 0.018243126571178436, -0.19221900403499603, -0.8348878622055054, 0.16949008405208588, 0.7312949299812317, -0.31655025482177734, 0.1003229692...
Following on from my BeginInvoke()/EndInvoke() question, are there major differences in performance/anything else between Delegate.BeginInvoke() and using QueueUserWorkItem() to invoke a delegate asynchronously? [http://blogs.msdn.com/cbrumme/archive/2003/07/14/51495.aspx](https://web.archive.org/web/20090201230346/htt...
[ -0.24376428127288818, -0.09803181886672974, 0.2837755084037781, -0.18940405547618866, 0.09271275997161865, -0.2961498498916626, 0.27575382590293884, -0.49040475487709045, -0.3485148549079895, -0.8186483383178711, -0.10515328496694565, 0.41254398226737976, -0.18087947368621826, 0.1446123272...
I am trying to emulate StringBuilder behavior in an XSL. Is there a way to do this. It seems pretty hard given the fact that XSLT is a functional programming language You can get the accumulting concats quite simply with just a little bit of recursion if you're looking at a node-set (so long as you can construct the xp...
[ 0.21621716022491455, -0.11284074932336807, 0.2362438142299652, 0.10368560254573822, -0.1872960776090622, -0.4586903750896454, 0.19469943642616272, -0.012972041964530945, -0.03242679685354233, -0.5905696153640747, 0.12538647651672363, 0.4549046456813812, -0.6942809820175171, 0.0124738859012...
<xsl:call-template name="stringbuilder"> <xsl:with-param name="data" select="*" /><!-- your path here --> </xsl:call-template> </xsl:variable> <xsl:value-of select="$s" /><!-- now contains a big concat string --> </xsl:template> <xsl:template name="stringbuilder"> <xsl:param name="dat...
[ -0.1130475327372551, -0.2527369558811188, 0.6508617401123047, -0.0013610721798613667, -0.337172269821167, 0.1204170435667038, 0.19841405749320984, -0.8021506667137146, -0.21537388861179352, -0.3956739902496338, -0.20991232991218567, 0.08634627610445023, -0.4504975378513336, 0.1127911955118...
<xsl:value-of select="concat($join,child::text())"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="child::text()"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template> ``` All manner of extensions to that may be required: perhaps yo...
[ -0.16024839878082275, -0.2318706214427948, 0.042273830622434616, 0.020724693313241005, 0.2912271320819855, -0.007951153442263603, 0.12232062965631485, -0.426777720451355, -0.11443568766117096, -0.6203018426895142, -0.5619308352470398, 0.28406456112861633, -0.38171982765197754, -0.118221893...
well. I'm not sure a bulletproof general solution exists.
[ 0.25437623262405396, 0.7443852424621582, -0.2089829295873642, 0.1264454573392868, 0.25809982419013977, -0.09268192201852798, 0.43189582228660583, -0.1665266752243042, -0.09006675332784653, -0.12672622501850128, 0.0717245414853096, 0.32216688990592957, 0.020669609308242798, -0.1709579229354...
I have a fairly intensive algorithm that must be run pretty often (many times per second) in my RoR application. Considering how [slow Ruby is](http://shootout.alioth.debian.org/u32q/benchmark.php?test=mandelbrot&lang=all&sort=fullcpu) with this kind of stuff, I don't think it would be good to do the work in Ruby. You...
[ 0.0368167906999588, -0.0053141312673687935, 0.31051987409591675, 0.12733718752861023, -0.2330475151538849, 0.009261580184102058, 0.3642038106918335, -0.09422565996646881, -0.25611546635627747, -0.3727048635482788, -0.14258819818496704, 0.8226303458213806, -0.36091992259025574, -0.171705633...
that just be crazy? Another alternative is [RubyInline](http://www.zenspider.com/ZSS/Products/RubyInline/) which allows you to write C/C++ code within your Ruby code. This fits in nicely with Jonas Kölker's [suggestion](https://stackoverflow.com/questions/532881/heavy-algorthmic-work-in-ruby-on-rails/532914#532914) to ...
[ 0.6547209620475769, -0.12105616182088852, 0.03672186657786369, 0.3220474123954773, 0.19754241406917572, -0.3228193521499634, 0.35966646671295166, -0.13193905353546143, -0.12175067514181137, 0.19242018461227417, -0.13196071982383728, 0.3599459230899811, -0.5096632242202759, -0.1248664781451...
As you most likely already know, it's simple in JQuery to select all elements in the document that have a specific CSS class, and then, using chaining, assign common event handlers to the selected elements: ``` $(".toolWindow").click(toolWindow_click); $(".toolWindow").keypress(toolWindow_keypress); ``` As usual the...
[ 0.2045266032218933, 0.030931461602449417, 0.044782765209674835, -0.25277265906333923, -0.06557510048151016, 0.07695001363754272, 0.1568520963191986, 0.10735708475112915, -0.17606787383556366, -0.6873400211334229, -0.37030190229415894, 0.3321867883205414, -0.3707806169986725, 0.099246121942...
CSS classes. In other words, each class represents both state (CSS styles) and behaviour (events). In some cases I have even created classes with no visual styling and simply use them as a convenient way to assign behaviour to elements. Moreover, the jQuery LiveQuery plugin (and the live() built-in function) make t...
[ 0.2242281585931778, -0.15491783618927002, 0.07308568060398102, -0.004669032990932465, -0.25834399461746216, -0.04315570369362831, 0.33141061663627625, 0.008891373872756958, -0.37609604001045227, -0.48683035373687744, -0.13336984813213348, 0.4094217121601105, -0.24185548722743988, 0.0241348...
a terrible misuse of the CSS "class" attribute, if so why? On the other hand, perhaps it is a perfectly valid approach to further implementing "separate of concerns" and improving the maintainability of HTML/DHTML pages? The "class" is actually part of the document data (and hopefully semantically relevant) not the s...
[ 0.31752902269363403, 0.2264183759689331, 0.051126446574926376, 0.3118528723716736, -0.24048402905464172, -0.28258341550827026, 0.4059855043888092, -0.05232876539230347, -0.19524110853672028, -0.32346311211586, -0.07547716051340103, 0.46939030289649963, -0.15666140615940094, -0.020578032359...
I'm writing some Windows software and when it terminates, I'm getting a lot of incorrect memory leak messages: ``` Detected memory leaks! Dumping objects -> {29745} normal block at 0x02938E38, 36 bytes long. Data: <, E > 2C 0B 45 10 00 00 00 00 01 00 00 00 01 CD CD CD {29732} normal block at 0x02938C08, ...
[ 0.03154255077242851, 0.29751378297805786, 0.29670679569244385, 0.24374525249004364, -0.10362015664577484, -0.006225917022675276, 0.582695722579956, -0.17393657565116882, -0.01844079978764057, -0.3672254681587219, -0.22694827616214752, 0.6094076633453369, -0.05602744221687317, 0.02666765078...
block at 0x028DA8A0, 84 bytes long. Data: < 1D 0 %i> C8 31 44 10 00 00 00 00 01 00 00 00 30 85 25 69 ``` I'm certain these are false positives. Do you have any suggestions on dealing with this? As the software grows, there are likely to be some actual leaks and finding them will be difficult, to say the lea...
[ 0.36386191844940186, 0.193463996052742, 0.17102500796318054, 0.3588349223136902, -0.006098320707678795, 0.1045006811618805, 0.3496737778186798, 0.023213550448417664, -0.3145555555820465, -0.5326947569847107, 0.023550456389784813, 0.08645926415920258, -0.22643598914146423, 0.222746327519416...
that I `new` then pass into the library which promptly wraps it in a `ref_ptr<>`. I know the instances aren't leaking because I've added `fprintf` to the destructor and I do see the message when the smart pointer goes out of scope. Microsoft had a problem like this a while ago with the standard library and I'm wonderin...
[ 0.546364963054657, 0.2580420970916748, 0.35512885451316833, 0.27361923456192017, 0.187519371509552, -0.41990718245506287, 0.35733509063720703, -0.11353831738233566, -0.13101612031459808, -0.6231421232223511, -0.10757314413785934, 0.6029236912727356, -0.10836486518383026, 0.3416152596473694...
In one case an internal object is constructed via the prototype pattern and the prototype object is static and so isn't destroyed until the atexit machinery kicks in. So, nothing is really leaking. It's just that the dump is happening before the app tear-down happens. which compiler? Get another profiling/leak detect...
[ 0.38770902156829834, 0.25693532824516296, -0.015010528266429901, 0.279552698135376, 0.05695725977420807, -0.15431220829486847, 0.3411778509616852, 0.20509804785251617, -0.25533410906791687, -0.5405268669128418, -0.09186211228370667, 0.6159406900405884, -0.4349081516265869, -0.0875915810465...
yourself that these are false. You can also add guards or tags or memory signatures in your objects so you can ensure that they aren't things you created. Not sure what to tell you about 3rd party stuff. I'd contact the 3rd party software company and ask them if they are aware of any issues - false positives or othe...
[ 0.9034526944160461, 0.15383879840373993, -0.07325120270252228, 0.40749844908714294, -0.15360502898693085, -0.18549591302871704, 0.46166589856147766, 0.3524322509765625, -0.0230648722499609, -0.11540578305721283, -0.03073398768901825, 0.4497462809085846, -0.24235355854034424, -0.07030034065...
> **Possible Duplicate:** > > [Why does Microsoft Visual C# 2008 Express Edition debugger randomly exit?](https://stackoverflow.com/questions/310788/why-does-microsoft-visual-c-sharp-2008-express-edition-debugger-randomly-exit) I've faced the strangest problem with Visual Studio C# debugger in my career. In short, ...
[ -0.3068929612636566, 0.27765974402427673, 0.19696570932865143, -0.24284259974956512, -0.20586928725242615, 0.056532640010118484, 0.4846736192703247, -0.16700942814350128, -0.24062104523181915, -0.46816080808639526, -0.1272115409374237, 0.3298289477825165, -0.3777002990245819, -0.0133949164...
My Code". I've disabled "step through properties". I've disabled automatic property evaluation. In despair, I've recreated all project and solution files from scratch. Is there any solution to my problem? **Update** This behavior could be reproduced only on this project. **Update 2** This does not seems like threadi...
[ 0.22330395877361298, 0.41739627718925476, 0.07820597290992737, -0.08175540715456009, -0.09194159507751465, 0.07325813919305801, 0.7581124305725098, 0.07796330004930496, -0.282822847366333, -0.842348575592041, -0.14924804866313934, 0.6198025345802307, -0.23216454684734344, 0.281019926071167...
We're using silverlight in a kiosk type scenario. Is there a way to disable the right click ability to enter the silverlight configuration dialog? //in the SharePoint I have added a Small code to tell SP to run the script after every part is loaded. Works like a charm :) // EDIT or better yet the silverlight forum re...
[ 0.34208396077156067, -0.08993057161569595, 0.4085473418235779, -0.11283805966377258, -0.016571033746004105, -0.4234437644481659, 0.47633999586105347, -0.5174828767776489, -0.08167091757059097, -0.7172544002532959, -0.22769367694854736, 0.5571735501289368, -0.42339906096458435, -0.205856740...
Is it possible to open Microsoft Script Editor, then from within the editor open a .vbs (VBScript) file, then run/debug it? I know I can use the command-line cscript (filename) //X to launch the file, allowing me to select Microsoft Script Editor as the debugger, but I want to do everything from within Microsoft Scrip...
[ 0.5387575030326843, 0.2436506599187851, 0.2677299976348877, -0.0520300418138504, -0.31588634848594666, -0.481931209564209, 0.17056065797805786, 0.08656308799982071, 0.09044460207223892, -0.5832055807113647, -0.19430400431156158, 0.5711007118225098, -0.15483783185482025, 0.17632481455802917...
editing/debugging scripts that are part of a web page? Your script has to be part of a web page. It would be nice if the MS Script Editor lived up to its name but it doesn't. You can make a simple HTML page to include your vbs file and use that in the Script Editor to launch your script. The page can be as simple as th...
[ 0.48868268728256226, 0.17160849273204803, 0.2684153616428375, -0.01590745523571968, -0.27787789702415466, -0.40091589093208313, 0.17811523377895355, -0.0195316132158041, -0.021854624152183533, -0.46920374035835266, 0.04165177792310715, 0.3091636598110199, -0.28050586581230164, 0.1723072677...
Given the following two (simplified) models: ``` class Customer < ActiveRecord::Base # finder sql to include global users in the association has_many :users, :dependent => :destroy, :finder_sql => 'SELECT `u`.* FROM `users` `u` WHERE (`u`.`customer_id` = "#{id}" OR `u`.`customer_id` IS NULL)' validates_pres...
[ -0.40218570828437805, 0.1539004147052765, 0.5267806053161621, -0.1750803291797638, -0.14357413351535797, -0.06673725694417953, -0.08215498179197311, 0.03100801631808281, -0.2923755943775177, -0.48258987069129944, -0.011345429345965385, 0.43286415934562683, -0.6270810961723328, 0.3862459361...
i get an mysql error: ``` >> Customer.first.users.find_by_email("test@example.com") ActiveRecord::StatementInvalid: Mysql::Error: Operand should contain 1 column(s): SELECT * FROM `users` WHERE (`users`.`email` = 'test@example.com') AND ( SELECT `u`.* FROM `users` `u` WHERE (`u`.`customer_id` = "1" OR `u`.`cus...
[ -0.11949222534894943, 0.2604841887950897, 0.6195013523101807, -0.08546437323093414, 0.08758324384689331, 0.21516545116901398, 0.34774550795555115, -0.6194493174552917, -0.15656176209449768, -0.5034037232398987, -0.2580079734325409, 0.5120548009872437, -0.4043145477771759, 0.245913162827491...
finder\_sql works as expected. I've already tried to remove all optional plugins (will\_paginate). The thing I'm trying to achieve is actually quite simple: Include all User Models matching the following the condition `(users.customer_id = 1 OR users.customer_id IS NULL)` in my association. Appreciate any help! Eithe...
[ -0.13170059025287628, 0.09518197923898697, 0.2851659655570984, -0.10607964545488358, -0.06187674030661583, -0.09306956082582474, 0.08922116458415985, -0.1273345947265625, 0.2730877697467804, -0.8012457489967346, 0.05365902930498123, 0.632068932056427, -0.34227317571640015, 0.22452190518379...
Is there a way to enable smooth scroll for ListBox class in Windows Forms framework? (I'm using C# and .NET framework 2.0). It is a system setting. You could change it by P/Invoking SystemParametersInfo with the SPI\_SETLISTBOXSMOOTHSCROLLING argument. Doing so is not recommended.
[ 0.16649773716926575, -0.4740356504917145, 0.5371196866035461, 0.18835216760635376, -0.06110074743628502, -0.44007986783981323, 0.2193268984556198, -0.0817149356007576, -0.30984386801719666, -0.8835353851318359, 0.03195960819721222, 0.5796794295310974, -0.28834056854248047, -0.1867790520191...
We currently have an Excel spreadsheet containing a large amount of VBA code. The VBA code is responsible for: * Manipulating, transforming and formatting sheet data. * Making calls to C# and C++ COM exposed functionality. In doing so marshalling the sheet data into the C#/C++ methods, getting the results and updating...
[ 0.5611857771873474, 0.1328631490468979, 0.49990761280059814, 0.007985135540366173, -0.20466011762619019, -0.04403094947338104, 0.08525297045707703, -0.3325481414794922, -0.1592141091823578, -0.7045873403549194, 0.06555040180683136, 0.5104379653930664, -0.25472018122673035, 0.15538437664508...
manually recoding the VBA as C# in the VSTO project. * Write the new sheet's functionality in C# and expose it via COM. The C# code would make use of the Excel PIAs in order to update the sheet. The sheet would need a very thin layer of VBA to marshall data to the C# methods. I don't think ManagedXLL will help me in t...
[ 0.4376470744609833, -0.1203073114156723, 0.40940946340560913, -0.0031872433610260487, -0.19651779532432556, -0.07839538902044296, 0.2733134627342224, -0.0035099596716463566, -0.3256189525127411, -0.5602988600730896, -0.07847605645656586, 0.5799576044082642, -0.33068281412124634, 0.12489684...
(some of it will just copy/paste) and writing new code in C#. * Put the new sheet in a separate workbook, and call into the old workbook as a datasource.
[ 0.39985746145248413, 0.2836810350418091, 0.21786148846149445, 0.107642762362957, 0.27613556385040283, -0.08214311301708221, 0.20759205520153046, -0.12654249370098114, -0.0718739852309227, -0.660179853439331, -0.32847699522972107, 0.3039625883102417, 0.024269111454486847, -0.139619931578636...
I am building and Anaysis Services project using VS 2005. The goal is to analyse advertising campaigns. I have a single cube with 2 fact tables factCampaign: which contains details of what people interviewed thought of an advertising campaign factDemographics: which contains demographic information of the people inte...
[ 0.676004946231842, 0.4103633463382721, 0.6618701219558716, 0.07925045490264893, -0.38517045974731445, 0.4617611765861511, 0.19384817779064178, -0.49478161334991455, -0.016657864674925804, -0.48162105679512024, 0.43539318442344666, 0.29749608039855957, 0.1609223335981369, -0.051019337028265...
queries to return results of what people thought about campaign (from factCampaign) but using demographic criteria (using dimQuestion and dimAnswer) For example the how many Males, aged 18-25 recalled a particular campaign I am new to OLAP and Analysis Services (2005) so please excuse me if what I am asking is too ba...
[ 0.5427038669586182, -0.058854538947343826, 0.6262413263320923, 0.17664480209350586, -0.40614721179008484, 0.22676685452461243, 0.3505966365337372, -0.33571913838386536, -0.08359474688768387, -0.2708110511302948, 0.27894461154937744, 0.39681199193000793, -0.06722567975521088, 0.067331738770...
dimAnswer to factCampaign in Dimension Usage tabe of the Cube Structure but with out success. Either the project just stalls when I try to deploy it or I get the following error (note the attribute hierarchy enabled is set to true) Errors in the metadata manager. The 'Answer Key' intermediate granularity attribute of ...
[ 0.34760844707489014, -0.20082086324691772, 0.4180421829223633, 0.2777036428451538, 0.041500043123960495, -0.13239999115467072, 0.45289918780326843, -0.11746785044670105, -0.0025781106669455767, -0.39066004753112793, 0.14425641298294067, 0.7396268248558044, -0.3018450140953064, 0.1930414885...
know the type at *compile* time. That lets the compiler check what you're doing with it. In this case, you *don't* know the type at compile time - you're getting it at execution time. All you know is that each item is an object - so either don't specify the type (as suggested by Joel) or specify it as Object: ``` For ...
[ 0.19143345952033997, 0.053617797791957855, -0.09939705580472946, 0.08565777540206909, -0.16480399668216705, -0.029882360249757767, 0.30346614122390747, -0.07991260290145874, -0.03270132839679718, -0.5402074456214905, -0.17022907733917236, 0.13150013983249664, -0.44071292877197266, 0.226015...
I've always understood that each number in the version (ex: 1.2.3.4) is treated as an regular int value. We are using some third party DLLs that follow a different convention and it seems to be causing problems with our patching process (patch won't overwrite the old DLL with the new one). The old version of the DLL i...
[ 0.27797022461891174, 0.27208539843559265, 0.5991809368133545, -0.3320402204990387, -0.25393936038017273, -0.07576870918273926, 0.45467427372932434, 0.13739536702632904, -0.16384966671466827, -0.7336038947105408, 0.012269305996596813, 0.4937446117401123, -0.5067993998527527, 0.2893892228603...
the meanings behind them. So it's time for me to ask for clarification. Any views on this? The convention is 1.4 != 1.40. Versions are a set of numbers, not a single number. They should have been using 1.3.8 if they wanted to increase to 1.4.
[ 0.5963873267173767, 0.18793414533138275, 0.44293156266212463, 0.12051240354776382, -0.20903560519218445, -0.1323920339345932, 0.3030743896961212, 0.011610286310315132, -0.37799039483070374, -0.3258843421936035, -0.04512602463364601, 0.3188031315803528, -0.2707209289073944, 0.21468394994735...
Consider a view consisting of several tables... for example a `v_active_car`, which is made up of the tables `car` joined on to `body`, `engine`, `wheels` and `stereo`. It might look something like this: **`v_active_cars` view** ``` SELECT * FROM car INNER JOIN body ON car.body = body.body_id INNER JOIN engin...
[ 0.28903573751449585, 0.3771774172782898, 0.41503018140792847, 0.17575176060199738, -0.02109716646373272, 0.6831637024879456, -0.12515969574451447, -0.30368632078170776, -0.09107176959514618, -0.5182701945304871, 0.003523874329403043, 0.909619152545929, 0.07333355396986008, -0.0330544076859...
AND stereo.active = 1 ``` Each component of the car has an "active" flag. Now, I need to find all the stereos that are available in active cars. To do this in need to use the whole view, not just the `stereo` table - just because a stereo is active doesn't mean it's available in a car. So I can do ``` SELECT DISTIN...
[ 0.32016992568969727, 0.5173968076705933, 0.25947481393814087, 0.12721793353557587, -0.08877449482679367, 0.16322360932826996, -0.2617035508155823, -0.3899622857570648, 0.021677419543266296, -0.4655624032020569, 0.18449483811855316, 0.904341459274292, -0.08737374097108841, 0.043406769633293...
do to make this faster? 1. make sure that there are indexes for all the JOINs * in your case, each level is selected both by a key, and a flag. adding the flag as part of the index might allow the DB to use only the index, instead of reading the whole record * make sure you have enough RAM to hold the resultset. Inno...
[ 0.3506820499897003, -0.019411902874708176, 0.023180846124887466, 0.19275043904781342, 0.07043034583330154, -0.2508593797683716, 0.20118872821331024, -0.5189915299415588, -0.1958460956811905, -0.5298777222633362, 0.09822915494441986, 0.6324809193611145, -0.3181588649749756, -0.0173424426466...
I have a table constructed like this : ``` oid | identifier | value 1 | 10 | 101 2 | 10 | 102 3 | 20 | 201 4 | 20 | 202 5 | 20 | 203 ``` I'd like to query this table to get a result like this : ``` identifier | values[] 10
[ -0.24404124915599823, 0.4936543107032776, 0.5145496129989624, -0.19299498200416565, 0.01456824503839016, 0.061262715607881546, -0.0719531774520874, -0.31650954484939575, -0.23979930579662323, -0.6527414917945862, -0.03279653936624527, 0.07371582835912704, -0.27349773049354553, 0.1676962971...
| {101, 102} 20 | {201, 202, 203} ``` I can't figure a way to do that. Is that possible? How? This is a Postgres built-in since a few versions so you no longer need to define your own, the name is `array_agg()`. ``` test=> select array_agg(n) from generate_series(1,10) n group by n%2; array_agg -----...
[ 0.006853191647678614, 0.04363982006907463, 0.14915451407432556, -0.32956233620643616, -0.1945868581533432, 0.29147854447364807, 0.25108999013900757, -0.41878098249435425, -0.280790239572525, -0.4166196584701538, -0.06265851855278015, 0.14210854470729828, -0.475707471370697, 0.0462737306952...
from generate_series(1,10) n group by (n%2); ?column? | array_agg ----------+-------------- 1 | {1,3,5,7,9} 0 | {2,4,6,8,10} test=> select (n%2)::TEXT, array_agg(n) from generate_series(1,10) n group by (n%2)::TEXT; text | array_agg ------+-------------- 0 | {2,4,6,8,10} 1 | {1,3,5,7,...
[ -0.05762750655412674, -0.12457429617643356, 0.3659615218639374, -0.19250328838825226, -0.031308613717556, 0.5732251405715942, 0.31767478585243225, -0.6018686294555664, -0.08847617357969284, -0.29341110587120056, -0.16343678534030914, 0.47139379382133484, -0.4080735743045807, 0.170646309852...
I thought I was starting to get a grip on "the Python way" of programming. Methods of a class accept self as the first parameter to refer to the instance of the class whose context the method is being called in. The @classmethod decorator refers to a method whose functionality is associated with the class, but which do...
[ 0.03831978514790535, -0.0596359521150589, 0.03932499140501022, 0.00769456522539258, -0.32458895444869995, 0.14440830051898956, 0.19484759867191315, -0.15294808149337769, 0.07226258516311646, -0.379377543926239, -0.028469398617744446, 0.38559237122535706, -0.283218652009964, 0.2990032732486...
instance method receives the instance. ``` class C: @classmethod def f(cls): print(cls.__name__, type(cls)) >>> C.f() C <class 'type'> ``` and it's `cls` canonically, btw
[ -0.2934934198856354, 0.2133108526468277, 0.5143658518791199, -0.02813955582678318, -0.05549777299165726, -0.13971826434135437, 0.152940571308136, -0.20743761956691742, -0.08324815332889557, -0.40007662773132324, -0.20893731713294983, 0.4879818260669708, -0.4612140357494354, 0.1821437776088...
I suppose most of the developers have an idea of multi-layer architecture. We have DAL (Data access layer), we have BLL (business logic layer) and somewhere near the end of the road we have our UI. If you have a project which somehow follows these principles, do you keep (or at least try) to keep/put the things where t...
[ 0.6656395196914673, 0.18184056878089905, 0.06905877590179443, 0.3707040846347809, 0.17431193590164185, -0.042387839406728745, -0.21127204596996307, 0.3228333294391632, -0.32876983284950256, -0.5008688569068909, -0.09601018577814102, 0.32992446422576904, 0.1970689296722412, 0.19929049909114...
not so easy with big projects where lots of people contributed to the software or overall mess. For example, I happened to see things like UI components going directly to the database to fetch some "missing" extra data which BL does not supply, also both UI and BL working with low level elements like table fields wher...
[ 0.30494174361228943, -0.17392577230930328, -0.1784970611333847, 0.10752451419830322, -0.059074513614177704, -0.34306666254997253, -0.07834053039550781, -0.026980727910995483, -0.4619482159614563, -0.3705396056175232, -0.19575439393520355, 0.2525763213634491, -0.21161353588104248, -0.089356...
and whoever shares my point of view are just being perfectionists, but I clearly saw a very disadvantegous consequence in that it took me prolonged periods of time in some of my tasks to trace all the "parallel" routes that the data is travelling to and from the database and to identify whoever and in which way may now...
[ 0.8101757168769836, 0.3567145764827728, 0.11793548613786697, 0.15382316708564758, 0.19688764214515686, -0.2247631698846817, 0.3971250355243683, 0.3426123559474945, -0.45638570189476013, -0.2891031801700592, 0.27941033244132996, 0.4788563847541809, 0.16153253614902496, 0.23794697225093842, ...
projects "pure" or they abandoned the idea of keeping the clear line between layers a long time ago? If you still keeping it right, how do you deal with colleagues who do not understand these things or don't care about them just building "custom" solutions and hacking hacks all the time? Or at some point in time you st...
[ 0.37121230363845825, -0.0098678357899189, 0.25454726815223694, 0.23438933491706848, -0.023581350222229958, 0.08456917852163315, 0.23216113448143005, -0.14916256070137024, -0.4561336040496826, -0.3096733093261719, -0.08293113112449646, -0.03967387601733208, 0.006909892428666353, 0.103011801...
calls into form methods from the business classes. With much wailing and gnashing of teeth, we separated out the business logic from the display logic. Any class that needed to notify the user of its progress raised an event that was sunk by the UI. And, for a while, all was right with the world. Around 200 klocs, we ...
[ 0.31141042709350586, 0.05469942092895508, 0.37571632862091064, 0.2766983211040497, 0.05004337057471275, -0.04117285832762718, 0.20733314752578735, -0.46389052271842957, 0.31928470730781555, -0.34143203496932983, 0.18326331675052643, 0.32849550247192383, -0.16308370232582092, -0.07198645174...
relationship. But, settings were starting to accumulate in all sorts of odd corners. We wound up with three configuration management systems, all intricately woven into the business logic. With an extensive rewrite, we were able to separate out the configuration information into its own layer and the handling of stream...
[ 0.15450450778007507, 0.07772307842969894, 0.6700067520141602, 0.31926339864730835, 0.309064120054245, -0.0035834764130413532, 0.13377167284488678, -0.12395039945840836, 0.03504437208175659, -0.5115197896957397, 0.08364666253328323, 0.4174511134624481, -0.2368662804365158, 0.149428918957710...
storage, and business logic, this was a fairly seamless integration. Now, approaching 500 klocs, we're moving the application to a grid-based architecture. Not only will the UI be separated from the business logic on a different computer, the actual computation of the quotes and orders that the application sends out w...
[ 0.18082383275032043, 0.27365899085998535, 0.6803471446037292, 0.2529112696647644, 0.13954241573810577, 0.08289636671543121, -0.18170782923698425, -0.08453135192394257, -0.24776186048984528, -0.8171887993812561, -0.13084352016448975, 0.1581524759531021, -0.1284109354019165, 0.30922669172286...
that separation in the creation of this application.
[ 0.14701759815216064, 0.2333785593509674, -0.025247348472476006, 0.12807345390319824, 0.194392591714859, -0.14668570458889008, -0.1318342238664627, -0.45077279210090637, 0.041563730686903, -0.5477311015129089, -0.1271498203277588, 0.37237676978111267, -0.14468377828598022, 0.299959599971771...
I have to use an API to make a call to a third party, and ideally use the response it returns. The API has a built-in 30 second timeout, and does not allow you to set that programatically. I need it to time out in 12 seconds. Here's the call I'm making: string response = theAPI.FunctionA(a, b, c, d); I've been thinki...
[ 0.3134109675884247, -0.10742990672588348, 0.40862837433815, -0.03008631244301796, 0.004102020058780909, -0.13464578986167908, 0.40597662329673767, -0.38564977049827576, -0.1999698132276535, -0.4785749614238739, 0.0692199170589447, 0.5917118191719055, -0.15107373893260956, 0.063697561621665...
Specifically, I keep seeing articles that warn you to call EndInvoke no matter what, and I'm wondering if Abort as in the referenced example will still close the thread appropriately? I see there were some comments with much concern about using Abort. Aborting threads is generally a bad idea. Why not just let the call ...
[ 0.8196278810501099, -0.20646932721138, 0.2754751443862915, 0.10343421995639801, 0.16093216836452484, -0.44810572266578674, 0.6370689868927002, 0.08798044174909592, -0.42010918259620667, -0.11419058591127396, -0.09042798727750778, 0.34511032700538635, -0.2749631404876709, 0.3563457727432251...
I´m using the LinqDataSource to populate a grid. But now I need the SQL query that the LinqDataSource generates, to pass around throught methods (no, I can't modify the methods to not need a SQL query). Is there a way to obtain the generated SQL query from a instantiated and configured LinqDataSource? Hope this helps...
[ 0.18583296239376068, -0.03030369058251381, 0.5460992455482483, 0.049723029136657715, -0.06633065640926361, -0.14306116104125977, 0.06215102970600128, -0.3569111227989197, -0.34587985277175903, -0.6576042175292969, -0.008055314421653748, 0.4809950888156891, -0.36324119567871094, 0.372075229...
IQueryable query) { DbCommand dbCommand = dataContext.GetCommand(query); var result = new SqlQueryText(); result.Text = dbCommand.CommandText; int nParams = dbCommand.Parameters.Count; result.Params = new ParameterText[nParams]; for (int j = 0; j < nParams; j++) ...
[ -0.5312011241912842, -0.13933925330638885, 0.6496778130531311, 0.03474607318639755, -0.24875588715076447, 0.37337812781333923, 0.5667175650596619, -0.73248690366745, -0.24373763799667358, -0.17324672639369965, -0.3252662420272827, 0.4711046814918518, -0.6052597761154175, 0.0719079226255416...
ParameterText(); DbParameter pInfo = dbCommand.Parameters[j]; param.Name = pInfo.ParameterName; param.SqlType = pInfo.DbType.ToString(); object paramValue = pInfo.Value; if (paramValue == null) {
[ -0.37002578377723694, -0.1896052062511444, 0.6796694397926331, -0.08608923107385635, -0.29353103041648865, 0.5845905542373657, 0.4249160587787628, -0.8079345226287842, -0.026083754375576973, -0.23662346601486206, -0.15337836742401123, 0.39467158913612366, -0.3590933680534363, 0.14745409786...
param.Value = null; } else { param.Value = pInfo.Value.ToString(); } result.Params[j] = param; } return
[ -0.19000768661499023, -0.056016355752944946, 0.5403657555580139, -0.15963077545166016, -0.08052652329206467, 0.5813680291175842, 0.4240642488002777, -0.8443772196769714, -0.5269356369972229, 0.15923817455768585, -0.23264695703983307, 0.3546357750892639, -0.4431012272834778, 0.1275361776351...
result; } ``` here is an example var results = db.Medias.Where(somepredicatehere); ClassThatHasThisMethod.GetFullQueryInfo(yourdatacontexthere, results); EDIT: Sorry forgot to include the SqlQueryText data structures ``` public struct SqlQueryText { public ParameterText[] Params; public string Text; }...
[ -0.14284007251262665, 0.24903622269630432, 0.4635564684867859, -0.09931717067956924, -0.17906399071216583, 0.14596273005008698, 0.4952896237373352, -0.5732006430625916, -0.34529322385787964, -0.5132440328598022, -0.4893685579299927, 0.44210579991340637, -0.267574280500412, 0.23131787776947...
I want to use custom jsp tags to help build a menu in my application. However, I want all the actual HTML to live in JSP files, rather than in the Java class. So, suppose I have a tag like this: ``` <mytags:Menu> <mytags:MenuItem name="foo"/> <mytags:MenuItem name="bar"/> <mytags:MenuItem name="baz"/> </mytags:...
[ 0.18790878355503082, -0.008793915621936321, 0.5288233160972595, -0.6197465658187866, -0.005942980293184519, 0.15937189757823944, 0.22435438632965088, -0.4066239297389984, 0.030996151268482208, -0.8685289621353149, -0.17554005980491638, 0.7060181498527527, -0.6795405149459839, -0.2119418829...